Author: weiden Date: Wed Sep 26 23:23:50 2007 New Revision: 29215
URL: http://svn.reactos.org/svn/reactos?rev=29215&view=rev Log: Move desk.cpl shell extension interface definition to shared header file
Added: trunk/reactos/include/reactos/dll/desk/ trunk/reactos/include/reactos/dll/desk/deskcplx.h (with props) Modified: trunk/reactos/dll/cpl/desk/advmon.c trunk/reactos/dll/cpl/desk/desk.h trunk/reactos/dll/cpl/desk/devsett.c
Modified: trunk/reactos/dll/cpl/desk/advmon.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/advmon.c?rev=2... ============================================================================== --- trunk/reactos/dll/cpl/desk/advmon.c (original) +++ trunk/reactos/dll/cpl/desk/advmon.c Wed Sep 26 23:23:50 2007 @@ -123,8 +123,8 @@ szFormatBuff[0] = _T('\0'); }
- uiMonitorName = RegisterClipboardFormat(TEXT("Monitor Name")); - uiDisplayName = RegisterClipboardFormat(TEXT("Display Name")); + uiMonitorName = RegisterClipboardFormat(DESK_EXT_MONITORNAME); + uiDisplayName = RegisterClipboardFormat(DESK_EXT_DISPLAYNAME);
lpMonitorName = QueryDevSettingsString(pdo, uiMonitorName); lpDisplayName = QueryDevSettingsString(pdo, uiDisplayName);
Modified: trunk/reactos/dll/cpl/desk/desk.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.h?rev=292... ============================================================================== --- trunk/reactos/dll/cpl/desk/desk.h (original) +++ trunk/reactos/dll/cpl/desk/desk.h Wed Sep 26 23:23:50 2007 @@ -12,6 +12,7 @@ #include <shlobj.h> #include <regstr.h> #include <cplext.h> +#include <dll/desk/deskcplx.h>
#include "resource.h"
Modified: trunk/reactos/dll/cpl/desk/devsett.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/devsett.c?rev=... ============================================================================== --- trunk/reactos/dll/cpl/desk/devsett.c (original) +++ trunk/reactos/dll/cpl/desk/devsett.c Wed Sep 26 23:23:50 2007 @@ -11,37 +11,6 @@ #include <debug.h>
#define DEBUG_DEVSETTINGS - -#define DESK_EXT_CALLBACK CALLBACK - -typedef PDEVMODEW (DESK_EXT_CALLBACK *PDESK_EXT_ENUMALLMODES)(PVOID Context, DWORD Index); -typedef PDEVMODEW (DESK_EXT_CALLBACK *PDESK_EXT_GETCURRENTMODE)(PVOID Context); -typedef BOOL (DESK_EXT_CALLBACK *PDESK_EXT_SETCURRENTMODE)(PVOID Context, const DEVMODEW *pDevMode); -typedef VOID (DESK_EXT_CALLBACK *PDESK_EXT_GETPRUNINGMODE)(PVOID Context, PBOOL pbModesPruned, PBOOL pbKeyIsReadOnly, PBOOL pbPruningOn); -typedef VOID (DESK_EXT_CALLBACK *PDESK_EXT_SETPRUNINGMODE)(PVOID Context, BOOL PruningOn); - -typedef struct _DESK_EXT_INTERFACE -{ - /* NOTE: This structure is binary compatible to XP. The windows shell - extensions rely on this structure to be properly filled! */ - DWORD cbSize; - - PVOID Context; /* This value is passed on to the callback routines */ - - /* Callback routines called by the shell extensions */ - PDESK_EXT_ENUMALLMODES EnumAllModes; - PDESK_EXT_SETCURRENTMODE SetCurrentMode; - PDESK_EXT_GETCURRENTMODE GetCurrentMode; - PDESK_EXT_SETPRUNINGMODE SetPruningMode; - PDESK_EXT_GETPRUNINGMODE GetPruningMode; - - /* HardwareInformation.* values provided in the device registry key */ - WCHAR MemorySize[128]; - WCHAR ChipType[128]; - WCHAR DacType[128]; - WCHAR AdapterString[128]; - WCHAR BiosString[128]; -} DESK_EXT_INTERFACE, *PDESK_EXT_INTERFACE;
typedef struct _CDevSettings { @@ -424,16 +393,16 @@ DPRINT1("This->StateFlags: %x\n", This->StateFlags);
/* Register clipboard formats */ - This->cfExtInterface = RegisterClipboardFormat(TEXT("Desk.cpl extension interface")); - This->cfDisplayDevice = RegisterClipboardFormat(TEXT("Display Device")); - This->cfDisplayName = RegisterClipboardFormat(TEXT("Display Name")); - This->cfDisplayId = RegisterClipboardFormat(TEXT("Display ID")); - This->cfDisplayKey = RegisterClipboardFormat(TEXT("Display Key")); - This->cfDisplayStateFlags = RegisterClipboardFormat(TEXT("Display State Flags")); - This->cfMonitorName = RegisterClipboardFormat(TEXT("Monitor Name")); - This->cfMonitorDevice = RegisterClipboardFormat(TEXT("Monitor Device")); - This->cfMonitorId = RegisterClipboardFormat(TEXT("Monitor ID")); - This->cfPruningMode = RegisterClipboardFormat(TEXT("Pruning Mode")); + This->cfExtInterface = RegisterClipboardFormat(DESK_EXT_EXTINTERFACE); + This->cfDisplayDevice = RegisterClipboardFormat(DESK_EXT_DISPLAYDEVICE); + This->cfDisplayName = RegisterClipboardFormat(DESK_EXT_DISPLAYNAME); + This->cfDisplayId = RegisterClipboardFormat(DESK_EXT_DISPLAYID); + This->cfDisplayKey = RegisterClipboardFormat(DESK_EXT_DISPLAYKEY); + This->cfDisplayStateFlags = RegisterClipboardFormat(DESK_EXT_DISPLAYSTATEFLAGS); + This->cfMonitorName = RegisterClipboardFormat(DESK_EXT_MONITORNAME); + This->cfMonitorDevice = RegisterClipboardFormat(DESK_EXT_MONITORDEVICE); + This->cfMonitorId = RegisterClipboardFormat(DESK_EXT_MONITORID); + This->cfPruningMode = RegisterClipboardFormat(DESK_EXT_PRUNINGMODE);
/* Copy the device name */ This->pDisplayDevice = pCDevSettings_AllocAndCopyString(DisplayDeviceInfo->DeviceName);
Added: trunk/reactos/include/reactos/dll/desk/deskcplx.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/dll/desk/de... ============================================================================== --- trunk/reactos/include/reactos/dll/desk/deskcplx.h (added) +++ trunk/reactos/include/reactos/dll/desk/deskcplx.h Wed Sep 26 23:23:50 2007 @@ -1,0 +1,46 @@ +#ifndef __DESKCPLX__H +#define __DESKCPLX__H + +#define DESK_EXT_CALLBACK CALLBACK + +#define DESK_EXT_EXTINTERFACE TEXT("Desk.cpl extension interface") +#define DESK_EXT_PRUNINGMODE TEXT("Pruning Mode") +#define DESK_EXT_DISPLAYDEVICE TEXT("Display Device") +#define DESK_EXT_DISPLAYNAME TEXT("Display Name") +#define DESK_EXT_DISPLAYID TEXT("Display ID") +#define DESK_EXT_DISPLAYKEY TEXT("Display Key") +#define DESK_EXT_DISPLAYSTATEFLAGS TEXT("Display State Flags") +#define DESK_EXT_MONITORNAME TEXT("Monitor Name") +#define DESK_EXT_MONITORDEVICE TEXT("Monitor Device") +#define DESK_EXT_MONITORID TEXT("Monitor ID") + +typedef PDEVMODEW (DESK_EXT_CALLBACK *PDESK_EXT_ENUMALLMODES)(PVOID Context, DWORD Index); +typedef PDEVMODEW (DESK_EXT_CALLBACK *PDESK_EXT_GETCURRENTMODE)(PVOID Context); +typedef BOOL (DESK_EXT_CALLBACK *PDESK_EXT_SETCURRENTMODE)(PVOID Context, const DEVMODEW *pDevMode); +typedef VOID (DESK_EXT_CALLBACK *PDESK_EXT_GETPRUNINGMODE)(PVOID Context, PBOOL pbModesPruned, PBOOL pbKeyIsReadOnly, PBOOL pbPruningOn); +typedef VOID (DESK_EXT_CALLBACK *PDESK_EXT_SETPRUNINGMODE)(PVOID Context, BOOL PruningOn); + +typedef struct _DESK_EXT_INTERFACE +{ + /* NOTE: This structure is binary compatible to XP. The windows shell + extensions rely on this structure to be properly filled! */ + DWORD cbSize; + + PVOID Context; /* This value is passed on to the callback routines */ + + /* Callback routines called by the shell extensions */ + PDESK_EXT_ENUMALLMODES EnumAllModes; + PDESK_EXT_SETCURRENTMODE SetCurrentMode; + PDESK_EXT_GETCURRENTMODE GetCurrentMode; + PDESK_EXT_SETPRUNINGMODE SetPruningMode; + PDESK_EXT_GETPRUNINGMODE GetPruningMode; + + /* HardwareInformation.* values provided in the device registry key */ + WCHAR MemorySize[128]; + WCHAR ChipType[128]; + WCHAR DacType[128]; + WCHAR AdapterString[128]; + WCHAR BiosString[128]; +} DESK_EXT_INTERFACE, *PDESK_EXT_INTERFACE; + +#endif /* __DESKCPLX__H */
Propchange: trunk/reactos/include/reactos/dll/desk/deskcplx.h ------------------------------------------------------------------------------ svn:eol-style = native