2 * psychlops_app_state_Win32.h
3 * Psychlops Standard Library (Win32)
5 * Last Modified 2007/06/22 by Kenchi HOSOKAWA
6 * (C) 2006 Kenchi HOSOKAWA, Kazushi MARUYA and Takao SATO
10 #ifndef HEADER_PSYCHLOPS_APP_STATE_WIN32
11 #define HEADER_PSYCHLOPS_APP_STATE_WIN32
19 class APIInputProperties;
20 class APICanvasProperties;
21 class APICanvasPropertiesWindow;
24 class APIApplicationProperties {
25 friend class APIInputProperties;
26 friend class APICanvasProperties;
27 friend class APICanvasPropertiesWindow;
28 friend void initialize();
31 HINSTANCE hInstance_; // Handle for Application INSTANCE
32 HINSTANCE hPrevInstance_; // Legacy of Win16 API
33 LPSTR lpCmdLine_; // Synonym of arg* of ordinary C-language "main(int argc, char **argv)" function
34 int iCmdShow_; // To show or not to show when the application starts
36 unsigned long thread_state_[5];
43 HANDLE primaryThread; // Handle for primary thread of Psychrops process
44 DWORD primaryThreadID; // ID of primary thread of Psychrops process
47 APIApplicationProperties();
48 APIApplicationProperties(HINSTANCE _hInstance, HINSTANCE _hPrevInstance, LPSTR _lpCmdLine, int _iCmdShow);
49 ~APIApplicationProperties();
51 void set(HINSTANCE _hInstance, HINSTANCE _hPrevInstance, LPSTR _lpCmdLine, int _iCmdShow);
52 DWORD getPrimaryThreadID();
53 static LRESULT CALLBACK proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
54 void setThreadPriority( unsigned int priority );
55 int getThreadPriority();
57 static void analyzeAPIError();
58 static APIApplicationProperties startupinfo;
65 } /* <- namespace Psychlops */