xref: /reactos/base/applications/osk/precomp.h (revision 34593d93)
1 /*
2  * PROJECT:         ReactOS On-Screen Keyboard
3  * LICENSE:         GPL - See COPYING in the top level directory
4  * PURPOSE:         Pre-compiled header
5  * COPYRIGHT:       Denis ROBERT
6  *                  Copyright 2019 George Bișoc (george.bisoc@reactos.org)
7  */
8 
9 #ifndef _OSK_PRECOMP_H
10 #define _OSK_PRECOMP_H
11 
12 /* INCLUDES *******************************************************************/
13 
14 #include <stdio.h>
15 
16 #include <windows.h>
17 #include <commctrl.h>
18 #include <debug.h>
19 #include <uxtheme.h>
20 #include <vsstyle.h>
21 #include "windef.h"
22 #include "winbase.h"
23 #include "winuser.h"
24 #include "winnls.h"
25 #include "commctrl.h"
26 
27 #include "osk_res.h"
28 
29 /* TYPES **********************************************************************/
30 
31 typedef struct
32 {
33     HINSTANCE  hInstance;
34     HWND       hMainWnd;
35     HBRUSH     hBrushGreenLed;
36     UINT_PTR   iTimer;
37     /* FIXME: To be deleted when ReactOS will support WS_EX_NOACTIVATE */
38     HWND       hActiveWnd;
39 
40     /* On-Screen Keyboard registry settings */
41     BOOL       bShowWarning;
42     BOOL       bIsEnhancedKeyboard;
43     BOOL       bSoundClick;
44     BOOL       bAlwaysOnTop;
45     INT        PosX;
46     INT        PosY;
47 } OSK_GLOBALS;
48 
49 typedef struct
50 {
51     INT vKey;
52     INT DlgResource;
53     WORD wScanCode;
54     BOOL bWasKeyPressed;
55 } OSK_KEYLEDINDICATOR;
56 
57 /* PROTOTYPES *****************************************************************/
58 
59 /* main.c */
60 int OSK_SetImage(int IdDlgItem, int IdResource);
61 int OSK_DlgInitDialog(HWND hDlg);
62 int OSK_DlgClose(void);
63 int OSK_DlgTimer(void);
64 BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl);
65 BOOL OSK_ReleaseKey(WORD ScanCode);
66 INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
67 LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw);
68 DWORD WINAPI OSK_WarningDlgThread(LPVOID lpParameter);
69 int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
70 VOID OSK_RestoreDlgPlacement(HWND hDlg);
71 VOID OSK_RefreshLEDKeys(VOID);
72 INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
73 
74 /* settings.c */
75 LONG LoadDataFromRegistry(IN LPCWSTR lpValueDataName,
76                           OUT PDWORD pdwValueData);
77 
78 LONG SaveDataToRegistry(IN LPCWSTR lpValueDataName,
79                         IN DWORD dwValueData);
80 
81 VOID LoadSettings(VOID);
82 VOID SaveSettings(VOID);
83 
84 /* DEFINES ********************************************************************/
85 
86 extern OSK_GLOBALS Globals;
87 
88 #define countof(x) (sizeof(x) / sizeof((x)[0]))
89 #define MAX_BUFF 256
90 
91 #endif /* _OSK_PRECOMP_H */
92 
93 /* EOF */
94