xref: /reactos/dll/cpl/timedate/timedate.h (revision ebaf247c)
1 #ifndef _TIMEDATE_H
2 #define _TIMEDATE_H
3 
4 #include <stdarg.h>
5 
6 #define _INC_WINDOWS
7 #define COM_NO_WINDOWS_H
8 #define WIN32_NO_STATUS
9 
10 #include <windef.h>
11 #include <winbase.h>
12 #include <winnls.h>
13 #include <winreg.h>
14 #include <wingdi.h>
15 #include <winuser.h>
16 #include <wchar.h>
17 #include <commctrl.h>
18 #include <cpl.h>
19 
20 #include "resource.h"
21 
22 #define MAX_KEY_LENGTH 255
23 #define MAX_VALUE_NAME 16383
24 #define SERVERLISTSIZE 6
25 #define BUFSIZE 1024
26 #define ID_TIMER 1
27 
28 typedef struct
29 {
30   UINT idIcon;
31   UINT idName;
32   UINT idDescription;
33   APPLET_PROC AppletProc;
34 } APPLET, *PAPPLET;
35 
36 extern HINSTANCE hApplet;
37 
38 
39 /* dateandtime.c */
40 INT_PTR CALLBACK DateTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
41 BOOL SystemSetLocalTime(LPSYSTEMTIME lpSystemTime);
42 
43 
44 /* timezone.c */
45 INT_PTR CALLBACK TimeZonePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
46 
47 
48 /* internettime.c */
49 INT_PTR CALLBACK InetTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
50 
51 
52 /* timedate.c */
53 #if DBG
54 VOID DisplayWin32ErrorDbg(DWORD dwErrorCode, const char *file, int line);
55 #define DisplayWin32Error(e) DisplayWin32ErrorDbg(e, __FILE__, __LINE__);
56 #else
57 VOID DisplayWin32Error(DWORD dwErrorCode);
58 #endif
59 
60 
61 /* clock.c */
62 #define CLM_STOPCLOCK (WM_USER + 1)
63 #define CLM_STARTCLOCK (WM_USER + 2)
64 
65 BOOL RegisterClockControl(VOID);
66 VOID UnregisterClockControl(VOID);
67 
68 
69 /* monthcal.c */
70 #define MCCM_SETDATE    (WM_USER + 1)
71 #define MCCM_GETDATE    (WM_USER + 2)
72 #define MCCM_RESET      (WM_USER + 3)
73 #define MCCM_CHANGED    (WM_USER + 4)
74 
75 #define MCCN_SELCHANGE   (1)
76 typedef struct _NMMCCSELCHANGE
77 {
78     NMHDR hdr;
79     WORD OldDay;
80     WORD OldMonth;
81     WORD OldYear;
82     WORD NewDay;
83     WORD NewMonth;
84     WORD NewYear;
85 } NMMCCSELCHANGE, *PNMMCCSELCHANGE;
86 #define MCCN_AUTOUPDATE (2)
87 typedef struct _NMMCCAUTOUPDATE
88 {
89     NMHDR hdr;
90     SYSTEMTIME SystemTime;
91 } NMMCCAUTOUPDATE, *PNMMCCAUTOUPDATE;
92 
93 BOOL RegisterMonthCalControl(IN HINSTANCE hInstance);
94 VOID UnregisterMonthCalControl(IN HINSTANCE hInstance);
95 
96 #endif /* _TIMEDATE_H */
97