mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 02:13:29 +00:00
![Bișoc George](/assets/img/avatar_default.png)
200 ms would mean that the LEDs redraw each 0,2 second and this adds a slight delay. This can be seen if you press the Num lock key (for example) many times in a row and the LED resources won't update instantly. Therefore reducing the value of uElapse should significantly decrease the delay and the LEDs should update in a realistic way. Furthermore, before invalidating the LED resource check the toggle state of the keys.
87 lines
2.2 KiB
C
87 lines
2.2 KiB
C
/*
|
|
* PROJECT: ReactOS On-Screen Keyboard
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* PURPOSE: Pre-compiled header
|
|
* COPYRIGHT: Denis ROBERT
|
|
* Copyright 2019 Bișoc George (fraizeraust99 at gmail dot com)
|
|
*/
|
|
|
|
#ifndef _OSK_PRECOMP_H
|
|
#define _OSK_PRECOMP_H
|
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <windows.h>
|
|
#include <commctrl.h>
|
|
#include <debug.h>
|
|
#include <uxtheme.h>
|
|
#include <vsstyle.h>
|
|
#include "windef.h"
|
|
#include "winbase.h"
|
|
#include "winuser.h"
|
|
#include "winnls.h"
|
|
#include "commctrl.h"
|
|
|
|
#include "osk_res.h"
|
|
|
|
/* TYPES **********************************************************************/
|
|
|
|
typedef struct
|
|
{
|
|
HINSTANCE hInstance;
|
|
HWND hMainWnd;
|
|
HBRUSH hBrushGreenLed;
|
|
UINT_PTR iTimer;
|
|
/* FIXME: To be deleted when ReactOS will support WS_EX_NOACTIVATE */
|
|
HWND hActiveWnd;
|
|
|
|
/* On-Screen Keyboard registry settings */
|
|
BOOL bShowWarning;
|
|
BOOL bIsEnhancedKeyboard;
|
|
BOOL bSoundClick;
|
|
BOOL bAlwaysOnTop;
|
|
INT PosX;
|
|
INT PosY;
|
|
} OSK_GLOBALS;
|
|
|
|
typedef struct
|
|
{
|
|
INT vKey;
|
|
INT DlgResource;
|
|
WORD wScanCode;
|
|
BOOL bWasKeyPressed;
|
|
} OSK_KEYLEDINDICATOR;
|
|
|
|
/* PROTOTYPES *****************************************************************/
|
|
|
|
/* main.c */
|
|
int OSK_SetImage(int IdDlgItem, int IdResource);
|
|
int OSK_DlgInitDialog(HWND hDlg);
|
|
int OSK_DlgClose(void);
|
|
int OSK_DlgTimer(void);
|
|
BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl);
|
|
BOOL OSK_ReleaseKey(WORD ScanCode);
|
|
INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw);
|
|
int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
|
|
VOID OSK_RestoreDlgPlacement(HWND hDlg);
|
|
VOID OSK_RefreshLEDKeys(VOID);
|
|
|
|
/* settings.c */
|
|
BOOL LoadDataFromRegistry(VOID);
|
|
BOOL SaveDataToRegistry(VOID);
|
|
INT_PTR CALLBACK OSK_WarningProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
extern OSK_GLOBALS Globals;
|
|
|
|
#define countof(x) (sizeof(x) / sizeof((x)[0]))
|
|
#define MAX_BUFF 256
|
|
|
|
#endif /* _OSK_PRECOMP_H */
|
|
|
|
/* EOF */
|