ReactOS 0.4.15-dev-5666-gc548b97
main.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <wingdi.h>
#include <wincon.h>
#include <devguid.h>
#include <shlobj.h>
#include <cpl.h>
#include <regstr.h>
#include "resource.h"
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _APPLET
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define MAX_CPL_PAGES   32
 

Typedefs

typedef enum HWPAGE_DISPLAYMODEPHWPAGE_DISPLAYMODE
 
typedef struct _APPLET APPLET
 
typedef struct _APPLETPAPPLET
 

Enumerations

enum  HWPAGE_DISPLAYMODE {
  HWPD_STANDARDLIST = 0 , HWPD_LARGELIST , HWPD_MAX = HWPD_LARGELIST , HWPD_STANDARDLIST = 0 ,
  HWPD_LARGELIST , HWPD_MAX = HWPD_LARGELIST , HWPD_STANDARDLIST = 0 , HWPD_LARGELIST ,
  HWPD_MAX = HWPD_LARGELIST , HWPD_STANDARDLIST = 0 , HWPD_LARGELIST , HWPD_MAX = HWPD_LARGELIST
}
 

Functions

HWND WINAPI DeviceCreateHardwarePageEx (HWND hWndParent, LPGUID lpGuids, UINT uNumberOfGuids, HWPAGE_DISPLAYMODE DisplayMode)
 
LONG APIENTRY KeyboardApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 
BOOL InitPropSheetPage (PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc)
 
BOOL CALLBACK PropSheetAddPage (HPROPSHEETPAGE hpage, LPARAM lParam)
 
LONG APIENTRY MouseApplet (HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
 

Variables

HINSTANCE hApplet
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 7 of file main.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 8 of file main.h.

◆ MAX_CPL_PAGES

#define MAX_CPL_PAGES   32

Definition at line 47 of file main.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 6 of file main.h.

Typedef Documentation

◆ APPLET

◆ PAPPLET

typedef struct _APPLET * PAPPLET

◆ PHWPAGE_DISPLAYMODE

Enumeration Type Documentation

◆ HWPAGE_DISPLAYMODE

Enumerator
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 
HWPD_STANDARDLIST 
HWPD_LARGELIST 
HWPD_MAX 

Definition at line 22 of file main.h.

23{
HWPAGE_DISPLAYMODE
Definition: main.h:23
@ HWPD_STANDARDLIST
Definition: main.h:24
@ HWPD_LARGELIST
Definition: main.h:25
@ HWPD_MAX
Definition: main.h:26
enum HWPAGE_DISPLAYMODE * PHWPAGE_DISPLAYMODE

Function Documentation

◆ DeviceCreateHardwarePageEx()

HWND WINAPI DeviceCreateHardwarePageEx ( HWND  hWndParent,
LPGUID  lpGuids,
UINT  uNumberOfGuids,
HWPAGE_DISPLAYMODE  DisplayMode 
)

◆ InitPropSheetPage()

BOOL InitPropSheetPage ( PROPSHEETHEADER ppsh,
WORD  idDlg,
DLGPROC  DlgProc 
)

Definition at line 45 of file main.c.

46{
47 HPROPSHEETPAGE hPage;
48 PROPSHEETPAGE psp;
49
50 if (ppsh->nPages < MAX_CPL_PAGES)
51 {
52 ZeroMemory(&psp, sizeof(psp));
53 psp.dwSize = sizeof(psp);
54 psp.dwFlags = PSP_DEFAULT;
55 psp.hInstance = hApplet;
56 psp.pszTemplate = MAKEINTRESOURCE(idDlg);
57 psp.pfnDlgProc = DlgProc;
58
59 hPage = CreatePropertySheetPage(&psp);
60 if (hPage != NULL)
61 {
62 return PropSheetAddPage(hPage, (LPARAM)ppsh);
63 }
64 }
65
66 return FALSE;
67}
WORD idDlg
Definition: desk.c:110
DLGPROC DlgProc
Definition: desk.c:111
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
BOOL CALLBACK PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: main.c:70
HINSTANCE hApplet
Definition: main.c:33
#define MAX_CPL_PAGES
Definition: main.h:47
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_DEFAULT
Definition: prsht.h:22
#define PROPSHEETPAGE
Definition: prsht.h:389
#define ZeroMemory
Definition: winbase.h:1670
LONG_PTR LPARAM
Definition: windef.h:208
#define MAKEINTRESOURCE
Definition: winuser.h:591

◆ KeyboardApplet()

LONG APIENTRY KeyboardApplet ( HWND  hwnd,
UINT  uMsg,
LPARAM  wParam,
LPARAM  lParam 
)

Definition at line 357 of file keyboard.c.

358{
360 PROPSHEETHEADER psh;
361 HPSXA hpsxa;
362 INT nPage = 0;
363 LONG ret;
364
369
370 if (uMsg == CPL_STARTWPARMSW && lParam != 0)
371 nPage = _wtoi((PWSTR)lParam);
372
373 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
374 psh.dwSize = sizeof(PROPSHEETHEADER);
376 psh.hwndParent = hwnd;
377 psh.hInstance = hApplet;
378 psh.pszIcon = MAKEINTRESOURCE(IDC_CPLICON_2);
379 psh.pszCaption = MAKEINTRESOURCE(IDS_CPLNAME_2);
380 psh.nStartPage = 0;
381 psh.phpage = hpsp;
382 psh.pfnCallback = PropSheetProc;
383
384 /* Load additional pages provided by shell extensions */
386
387 /* NOTE: The speed page (CPLPAGE_KEYBOARD_SPEED) cannot be replaced by
388 shell extensions since Win2k! */
391
392 if (hpsxa != NULL)
394
395 if (nPage != 0 && nPage <= psh.nPages)
396 psh.nStartPage = nPage;
397
398 ret = (LONG)(PropertySheet(&psh) != -1);
399
400 if (hpsxa != NULL)
402
403 return ret;
404}
static BOOL CALLBACK PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
Definition: advmon.c:13
static VOID InitPropSheetPage(PROPSHEETPAGE *psp, PSERVICEPROPSHEET dlgInfo, WORD idDlg, DLGPROC DlgProc)
Definition: propsheet.c:15
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define CPL_STARTWPARMSW
Definition: cpl.h:21
HINSTANCE hApplet
Definition: access.c:17
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: keyboard.c:340
static INT_PTR CALLBACK KeybHardwareProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: keyboard.c:314
static INT_PTR CALLBACK KeyboardSpeedProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: keyboard.c:69
#define IDC_CPLICON_2
Definition: resource.h:6
#define IDS_CPLNAME_2
Definition: resource.h:37
#define IDD_HARDWARE
Definition: resource.h:29
#define IDD_KEYBSPEED
Definition: resource.h:30
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define TEXT(s)
Definition: k32.h:26
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
long LONG
Definition: pedump.c:60
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_PROPTITLE
Definition: prsht.h:40
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PropertySheet
Definition: prsht.h:400
#define PSH_USEICONID
Definition: prsht.h:42
#define REGSTR_PATH_CONTROLSFOLDER
Definition: regstr.h:76
void WINAPI SHDestroyPropSheetExtArray(HPSXA hpsxa)
Definition: shellord.c:2150
UINT WINAPI SHAddFromPropSheetExtArray(HPSXA hpsxa, LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
Definition: shellord.c:1973
HPSXA WINAPI SHCreatePropSheetExtArray(HKEY hKey, LPCWSTR pszSubKey, UINT max_iface)
Definition: shellord.c:2003
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
int ret
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

◆ MouseApplet()

LONG APIENTRY MouseApplet ( HWND  hwnd,
UINT  uMsg,
LPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1829 of file mouse.c.

1830{
1832 PROPSHEETHEADER psh;
1833 HPSXA hpsxa;
1834 UINT i;
1835 INT nPage = 0;
1836 LONG ret;
1837
1838 UNREFERENCED_PARAMETER(lParam1);
1839 UNREFERENCED_PARAMETER(lParam2);
1842
1843 if (uMsg == CPL_STARTWPARMSW && lParam2 != 0)
1844 nPage = _wtoi((PWSTR)lParam2);
1845
1846 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
1847 psh.dwSize = sizeof(PROPSHEETHEADER);
1849 psh.hwndParent = hwnd;
1850 psh.hInstance = hApplet;
1851 psh.pszIcon = MAKEINTRESOURCEW(IDC_CPLICON_1);
1852 psh.pszCaption = MAKEINTRESOURCEW(IDS_CPLNAME_1);
1853 psh.nStartPage = 0;
1854 psh.phpage = hpsp;
1855 psh.pfnCallback = PropSheetProc;
1856
1857 /* Load additional pages provided by shell extensions */
1859
1860 for (i = 0; i != sizeof(PropPages) / sizeof(PropPages[0]); i++)
1861 {
1862 /* Override the background page if requested by a shell extension */
1863 if (PropPages[i].uiReplaceWith != 0 && hpsxa != NULL &&
1865 {
1866 /* The shell extension added one or more pages to replace a page.
1867 Don't create the built-in page anymore! */
1868 continue;
1869 }
1870
1872 }
1873
1874 if (hpsxa != NULL)
1876
1877 if (nPage != 0 && nPage <= psh.nPages)
1878 psh.nStartPage = nPage;
1879
1880 ret = (LONG)(PropertySheet(&psh) != -1);
1881
1882 if (hpsxa != NULL)
1884
1885 return ret;
1886}
#define IDC_CPLICON_1
Definition: resource.h:4
#define IDS_CPLNAME_1
Definition: resource.h:6
WORD idDlg
Definition: mouse.c:1816
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: mouse.c:1798
UINT uiReplaceWith
Definition: mouse.c:1818
static const struct @218 PropPages[]
DLGPROC DlgProc
Definition: mouse.c:1817
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
unsigned int UINT
Definition: ndis.h:50
UINT WINAPI SHReplaceFromPropSheetExtArray(HPSXA hpsxa, UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam)
Definition: shellord.c:2119
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

◆ PropSheetAddPage()

BOOL CALLBACK PropSheetAddPage ( HPROPSHEETPAGE  hpage,
LPARAM  lParam 
)

Definition at line 70 of file main.c.

71{
73 if (ppsh != NULL && ppsh->nPages < MAX_CPL_PAGES)
74 {
75 ppsh->phpage[ppsh->nPages++] = hpage;
76 return TRUE;
77 }
78
79 return FALSE;
80}
#define TRUE
Definition: types.h:120

Referenced by InitPropSheetPage().

Variable Documentation

◆ hApplet

HINSTANCE hApplet
extern

Definition at line 17 of file access.c.