ReactOS  0.4.15-dev-1397-g19779b3
input.c File Reference
#include "input.h"
Include dependency graph for input.c:

Go to the source code of this file.

Macros

#define NUM_APPLETS   (1)
 

Functions

static LONG CALLBACK SystemApplet (HWND hwnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
static VOID InitPropSheetPage (PROPSHEETPAGEW *page, WORD idDlg, DLGPROC DlgProc)
 
static int CALLBACK PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 
LONG CALLBACK CPlApplet (HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
 

Variables

HINSTANCE hApplet = NULL
 
static APPLET Applets [NUM_APPLETS]
 

Macro Definition Documentation

◆ NUM_APPLETS

#define NUM_APPLETS   (1)

Definition at line 13 of file input.c.

Function Documentation

◆ CPlApplet()

LONG CALLBACK CPlApplet ( HWND  hwndCPl,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 90 of file input.c.

91 {
92  CPLINFO *CPlInfo;
93  DWORD i;
94 
95  i = (DWORD)lParam1;
96 
97  switch (uMsg)
98  {
99  case CPL_INIT:
100  return TRUE;
101 
102  case CPL_GETCOUNT:
103  return NUM_APPLETS;
104 
105  case CPL_INQUIRE:
106  CPlInfo = (CPLINFO*)lParam2;
107  CPlInfo->lData = 0;
108  CPlInfo->idIcon = Applets[i].idIcon;
109  CPlInfo->idName = Applets[i].idName;
110  CPlInfo->idInfo = Applets[i].idDescription;
111  break;
112 
113  case CPL_DBLCLK:
114  Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
115  break;
116  }
117 
118  return FALSE;
119 }
Definition: cpl.h:24
#define TRUE
Definition: types.h:120
int idName
Definition: hotplug.h:36
int idIcon
Definition: hotplug.h:35
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
int idDescription
Definition: hotplug.h:37
#define CPL_DBLCLK
Definition: cpl.h:16
#define FALSE
Definition: types.h:117
#define NUM_APPLETS
Definition: input.c:13
APPLET_PROC AppletProc
Definition: hotplug.h:38
unsigned long DWORD
Definition: ntddk_ex.h:95
static APPLET Applets[NUM_APPLETS]
Definition: input.c:20
#define CPL_INIT
Definition: cpl.h:12
#define CPL_INQUIRE
Definition: cpl.h:14
static POINTER_INPUT_TYPE *static DWORD
Definition: input.c:84
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define CPL_GETCOUNT
Definition: cpl.h:13

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  dwReason,
LPVOID  lpvReserved 
)

Definition at line 123 of file input.c.

124 {
126 
127  switch (dwReason)
128  {
129  case DLL_PROCESS_ATTACH:
130  case DLL_THREAD_ATTACH:
131  hApplet = hinstDLL;
132  break;
133  }
134 
135  return TRUE;
136 }
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define DLL_THREAD_ATTACH
Definition: compat.h:132
HINSTANCE hApplet
Definition: input.c:17
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
static IN DWORD IN LPVOID lpvReserved
DWORD dwReason
Definition: misc.cpp:154

◆ InitPropSheetPage()

static VOID InitPropSheetPage ( PROPSHEETPAGEW page,
WORD  idDlg,
DLGPROC  DlgProc 
)
static

Definition at line 27 of file input.c.

28 {
29  ZeroMemory(page, sizeof(*page));
30 
31  page->dwSize = sizeof(*page);
32  page->dwFlags = PSP_DEFAULT;
33  page->hInstance = hApplet;
34  page->pszTemplate = MAKEINTRESOURCEW(idDlg);
35  page->pfnDlgProc = DlgProc;
36 }
WORD idDlg
Definition: desk.c:110
HINSTANCE hApplet
Definition: input.c:17
#define ZeroMemory
Definition: winbase.h:1648
Definition: module.h:566
#define PSP_DEFAULT
Definition: prsht.h:22
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
DLGPROC DlgProc
Definition: desk.c:111

Referenced by SystemApplet().

◆ PropSheetProc()

static int CALLBACK PropSheetProc ( HWND  hwndDlg,
UINT  uMsg,
LPARAM  lParam 
)
static

Definition at line 39 of file input.c.

40 {
41  // NOTE: This callback is needed to set large icon correctly.
42  HICON hIcon;
43  switch (uMsg)
44  {
45  case PSCB_INITIALIZED:
46  {
48  SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
49  break;
50  }
51  }
52  return 0;
53 }
static HICON
Definition: imagelist.c:84
HINSTANCE hApplet
Definition: input.c:17
#define IDI_KEY_SHORT_ICO
Definition: resource.h:7
LONG_PTR LPARAM
Definition: windef.h:208
#define PSCB_INITIALIZED
Definition: prsht.h:75
HICON hIcon
Definition: msconfig.c:44
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define ICON_BIG
Definition: tnclass.cpp:51

Referenced by SystemApplet().

◆ SystemApplet()

static LONG CALLBACK SystemApplet ( HWND  hwnd,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)
static

Definition at line 57 of file input.c.

58 {
61  WCHAR szCaption[MAX_STR_LEN];
62 
63  LoadStringW(hApplet, IDS_CPLSYSTEMNAME, szCaption, ARRAYSIZE(szCaption));
64 
65  ZeroMemory(&header, sizeof(header));
66 
67  header.dwSize = sizeof(header);
69  header.hwndParent = hwnd;
70  header.hInstance = hApplet;
72  header.pszCaption = szCaption;
73  header.nPages = ARRAYSIZE(page);
74  header.nStartPage = 0;
75  header.ppsp = page;
76  header.pfnCallback = PropSheetProc;
77 
78  /* Settings */
80 
81  /* Advanced Settings */
83 
84  return (LONG)(PropertySheetW(&header) != -1);
85 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
INT_PTR CALLBACK AdvancedSettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
HINSTANCE hApplet
Definition: input.c:17
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define ZeroMemory
Definition: winbase.h:1648
#define PSH_USECALLBACK
Definition: prsht.h:48
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define PSH_USEICONID
Definition: prsht.h:42
#define IDI_KEY_SHORT_ICO
Definition: resource.h:7
long LONG
Definition: pedump.c:60
Definition: module.h:566
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2905
#define IDS_CPLSYSTEMNAME
Definition: resource.h:23
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
static VOID InitPropSheetPage(PROPSHEETPAGEW *page, WORD idDlg, DLGPROC DlgProc)
Definition: input.c:27
#define MAX_STR_LEN
Definition: defines.h:35
#define IDD_PROPPAGEADVANCEDSETTINGS
Definition: resource.h:13
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: input.c:39
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
struct CFHEADER header
Definition: fdi.c:101
#define IDD_PROPPAGESETTINGS
Definition: resource.h:12

Variable Documentation

◆ Applets

APPLET Applets[NUM_APPLETS]
static
Initial value:
=
{
}
#define IDI_CPLSYSTEM
Definition: resource.h:4
#define IDS_CPLSYSTEMNAME
Definition: resource.h:23
#define IDS_CPLSYSTEMDESCRIPTION
Definition: resource.h:24
static LONG CALLBACK SystemApplet(HWND hwnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
Definition: input.c:57

Definition at line 20 of file input.c.

Referenced by CPlApplet().

◆ hApplet

HINSTANCE hApplet = NULL

Definition at line 17 of file input.c.

Referenced by DllMain(), InitPropSheetPage(), PropSheetProc(), and SystemApplet().