reactos/dll/cpl/timedate/timedate.h
Bișoc George 5a81a5bc14
[TIMEDATE] Implement the dynamic NTP status notification (#2352)
Time/Date control panel applet displays the status of the NTP server synchronization with the system informing the user the actual condition of the said sync, if it has failed or suceeded. The commit also implements IDS_INETTIMEWELCOME which serves as a placeholder as Time/Date loads the last successful attempt of NTP synchronization which I don't know how the CPL remembers it. With that said, IDS_INETTIMEWELCOME will stay for a while until someone figures out how timedate.cpl works internally.
CORE-16684
2020-02-24 19:56:02 +09:00

109 lines
2.3 KiB
C

#ifndef _TIMEDATE_H
#define _TIMEDATE_H
#include <stdarg.h>
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <winreg.h>
#include <wingdi.h>
#include <winuser.h>
#include <wchar.h>
#include <commctrl.h>
#include <cpl.h>
#include <debug.h>
#include <strsafe.h>
#include "resource.h"
#define MAX_KEY_LENGTH 255
#define MAX_VALUE_NAME 16383
#define SERVERLISTSIZE 6
#define BUFSIZE 1024
#define ID_TIMER 1
typedef struct
{
UINT idIcon;
UINT idName;
UINT idDescription;
APPLET_PROC AppletProc;
} APPLET, *PAPPLET;
typedef struct
{
WCHAR szSyncSuc[BUFSIZE];
WCHAR szSyncWait[BUFSIZE];
WCHAR szSyncErr[BUFSIZE];
WCHAR szSyncType[BUFSIZE];
WCHAR szSyncInit[BUFSIZE];
LPWSTR lpszSyncStatus;
} SYNC_STATUS, *PSYNC_STATUS;
extern HINSTANCE hApplet;
/* dateandtime.c */
INT_PTR CALLBACK DateTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
BOOL SystemSetLocalTime(LPSYSTEMTIME lpSystemTime);
/* timezone.c */
INT_PTR CALLBACK TimeZonePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* internettime.c */
INT_PTR CALLBACK InetTimePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* timedate.c */
#if DBG
VOID DisplayWin32ErrorDbg(DWORD dwErrorCode, const char *file, int line);
#define DisplayWin32Error(e) DisplayWin32ErrorDbg(e, __FILE__, __LINE__);
#else
VOID DisplayWin32Error(DWORD dwErrorCode);
#endif
/* clock.c */
#define CLM_STOPCLOCK (WM_USER + 1)
#define CLM_STARTCLOCK (WM_USER + 2)
BOOL RegisterClockControl(VOID);
VOID UnregisterClockControl(VOID);
/* monthcal.c */
#define MCCM_SETDATE (WM_USER + 1)
#define MCCM_GETDATE (WM_USER + 2)
#define MCCM_RESET (WM_USER + 3)
#define MCCM_CHANGED (WM_USER + 4)
#define MCCN_SELCHANGE (1)
typedef struct _NMMCCSELCHANGE
{
NMHDR hdr;
WORD OldDay;
WORD OldMonth;
WORD OldYear;
WORD NewDay;
WORD NewMonth;
WORD NewYear;
} NMMCCSELCHANGE, *PNMMCCSELCHANGE;
#define MCCN_AUTOUPDATE (2)
typedef struct _NMMCCAUTOUPDATE
{
NMHDR hdr;
SYSTEMTIME SystemTime;
} NMMCCAUTOUPDATE, *PNMMCCAUTOUPDATE;
BOOL RegisterMonthCalControl(IN HINSTANCE hInstance);
VOID UnregisterMonthCalControl(IN HINSTANCE hInstance);
#endif /* _TIMEDATE_H */