#include <CArchMiscWindows.h>
Public Types | |
typedef int(*) | RunFunc (void) |
kUNKNOWN | |
kNO_VALUE | |
kUINT | |
kSTRING | |
kBINARY | |
kIDLE = 0x0000 | |
kSYSTEM = 0x0001 | |
kDISPLAY = 0x0002 | |
enum | EValueType { kUNKNOWN, kNO_VALUE, kUINT, kSTRING, kBINARY } |
enum | EBusyModes { kIDLE = 0x0000, kSYSTEM = 0x0001, kDISPLAY = 0x0002 } |
Static Public Member Functions | |
static void | init () |
Initialize. | |
static bool | isWindows95Family () |
Test if windows 95, et al. | |
static bool | isWindowsModern () |
Test if windows 95, et al. | |
static void | setIcons (HICON largeIcon, HICON smallIcon) |
Set the application icons. | |
static void | getIcons (HICON &largeIcon, HICON &smallIcon) |
Get the application icons. | |
static int | runDaemon (RunFunc runFunc) |
Run the daemon. | |
static void | daemonRunning (bool running) |
Indicate daemon is in main loop. | |
static void | daemonFailed (int result) |
Indicate failure of running daemon. | |
static UINT | getDaemonQuitMessage () |
Get daemon quit message. | |
static HKEY | openKey (HKEY parent, const TCHAR *child) |
Open and return a registry key, closing the parent key. | |
static HKEY | openKey (HKEY parent, const TCHAR *const *keyPath) |
Open and return a registry key, closing the parent key. | |
static HKEY | addKey (HKEY parent, const TCHAR *child) |
Open/create and return a registry key, closing the parent key. | |
static HKEY | addKey (HKEY parent, const TCHAR *const *keyPath) |
Open/create and return a registry key, closing the parent key. | |
static void | closeKey (HKEY) |
Close a key. | |
static void | deleteKey (HKEY parent, const TCHAR *name) |
Delete a key (which should have no subkeys). | |
static void | deleteValue (HKEY parent, const TCHAR *name) |
Delete a value. | |
static bool | hasValue (HKEY key, const TCHAR *name) |
Test if a value exists. | |
static EValueType | typeOfValue (HKEY key, const TCHAR *name) |
Get type of value. | |
static void | setValue (HKEY key, const TCHAR *name, const std::string &value) |
Set a string value in the registry. | |
static void | setValue (HKEY key, const TCHAR *name, DWORD value) |
Set a DWORD value in the registry. | |
static void | setValueBinary (HKEY key, const TCHAR *name, const std::string &value) |
Set a BINARY value in the registry. | |
static std::string | readValueString (HKEY, const TCHAR *name) |
Read a string value from the registry. | |
static DWORD | readValueInt (HKEY, const TCHAR *name) |
Read a DWORD value from the registry. | |
static std::string | readValueBinary (HKEY, const TCHAR *name) |
Read a BINARY value from the registry. | |
static void | addDialog (HWND) |
Add a dialog. | |
static void | removeDialog (HWND) |
Remove a dialog. | |
static bool | processDialog (MSG *) |
Process dialog message. | |
static void | addBusyState (DWORD busyModes) |
Disable power saving. | |
static void | removeBusyState (DWORD busyModes) |
Enable power saving. | |
static void | wakeupDisplay () |
Briefly interrupt power saving. |
Definition at line 26 of file CArchMiscWindows.h.
void CArchMiscWindows::daemonFailed | ( | int | result | ) | [static] |
Indicate failure of running daemon.
Delegates to CArchDaemonWindows.
Definition at line 119 of file CArchMiscWindows.cpp.
References CArchDaemonWindows::daemonFailed().
void CArchMiscWindows::daemonRunning | ( | bool | running | ) | [static] |
Indicate daemon is in main loop.
Delegates to CArchDaemonWindows.
Definition at line 113 of file CArchMiscWindows.cpp.
References CArchDaemonWindows::daemonRunning().
UINT CArchMiscWindows::getDaemonQuitMessage | ( | ) | [static] |
Get daemon quit message.
Delegates to CArchDaemonWindows.
Definition at line 125 of file CArchMiscWindows.cpp.
References CArchDaemonWindows::getDaemonQuitMessage().
Referenced by CMSWindowsEventQueueBuffer::CMSWindowsEventQueueBuffer().
void CArchMiscWindows::getIcons | ( | HICON & | largeIcon, | |
HICON & | smallIcon | |||
) | [static] |
Get the application icons.
Get the application icons.
Definition at line 100 of file CArchMiscWindows.cpp.
bool CArchMiscWindows::isWindows95Family | ( | ) | [static] |
Test if windows 95, et al.
Returns true iff the platform is win95/98/me.
Definition at line 47 of file CArchMiscWindows.cpp.
References init().
Referenced by CArchDaemonWindows::canInstallDaemon(), CMSWindowsClipboard::CMSWindowsClipboard(), CArchDaemonWindows::daemonize(), init(), CArchDaemonWindows::installDaemon(), CArchDaemonWindows::isDaemonInstalled(), CArchLogWindows::openLog(), and CArchDaemonWindows::uninstallDaemon().
bool CArchMiscWindows::isWindowsModern | ( | ) | [static] |
Test if windows 95, et al.
Returns true iff the platform is win98 or win2k or higher (i.e. not windows 95 or windows NT).
Definition at line 68 of file CArchMiscWindows.cpp.
References init().
bool CArchMiscWindows::processDialog | ( | MSG * | ) | [static] |
Process dialog message.
Checks if the message is destined for a dialog. If so the message is passed to the dialog and returns true, otherwise returns false.
Definition at line 355 of file CArchMiscWindows.cpp.
Referenced by CMSWindowsScreen::handleSystemEvent().
int CArchMiscWindows::runDaemon | ( | RunFunc | runFunc | ) | [static] |
Run the daemon.
Delegates to CArchDaemonWindows.
Definition at line 107 of file CArchMiscWindows.cpp.
References CArchDaemonWindows::runDaemon().
void CArchMiscWindows::setIcons | ( | HICON | largeIcon, | |
HICON | smallIcon | |||
) | [static] |
Set the application icons.
Set the application icons.
Definition at line 93 of file CArchMiscWindows.cpp.
void CArchMiscWindows::setValueBinary | ( | HKEY | key, | |
const TCHAR * | name, | |||
const std::string & | value | |||
) | [static] |
Set a BINARY value in the registry.
Sets the name
value of key
to value.data()
.
Definition at line 269 of file CArchMiscWindows.cpp.