diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2007-02-22 13:56:32 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2007-02-22 13:56:32 (GMT) |
commit | cd262a6c62fcff7a34b994e706eb9e019b014d0c (patch) | |
tree | d27aec929ff20b2ab6ba34faa14bd56439bf1d33 /win/ttkWinMonitor.c | |
parent | c9eb2dc978954b137eddffea41b69be6efc4e0de (diff) | |
download | tk-cd262a6c62fcff7a34b994e706eb9e019b014d0c.zip tk-cd262a6c62fcff7a34b994e706eb9e019b014d0c.tar.gz tk-cd262a6c62fcff7a34b994e706eb9e019b014d0c.tar.bz2 |
Less of that K&R or wrongly indented function header style!
Diffstat (limited to 'win/ttkWinMonitor.c')
-rw-r--r-- | win/ttkWinMonitor.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c index c0198d9..2f28e71 100644 --- a/win/ttkWinMonitor.c +++ b/win/ttkWinMonitor.c @@ -1,4 +1,4 @@ -/* $Id: ttkWinMonitor.c,v 1.7 2007/02/04 00:10:55 mistachkin Exp $ +/* $Id: ttkWinMonitor.c,v 1.8 2007/02/22 13:56:35 dkf Exp $ */ #ifdef _MSC_VER @@ -74,13 +74,15 @@ static void RegisterSystemColors(Tcl_Interp *interp) } static HWND -CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp) +CreateThemeMonitorWindow( + HINSTANCE hinst, + Tcl_Interp *interp) { WNDCLASSEX wc; - HWND hwnd = NULL; - CHAR title[32] = "TtkMonitorWindow"; - CHAR name[32] = "TtkMonitorClass"; - + HWND hwnd = NULL; + CHAR title[32] = "TtkMonitorWindow"; + CHAR name[32] = "TtkMonitorClass"; + wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; @@ -93,11 +95,11 @@ CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp) wc.hbrBackground = (HBRUSH)COLOR_WINDOW; wc.lpszMenuName = name; wc.lpszClassName = name; - + if (RegisterClassEx(&wc)) { - hwnd = CreateWindow( name, title, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, hinst, NULL ); + hwnd = CreateWindow(name, title, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + NULL, NULL, hinst, NULL ); #ifdef _WIN64 SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG)interp); #else @@ -109,15 +111,20 @@ CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp) return hwnd; } -static void -DestroyThemeMonitorWindow(void *clientData) +static void +DestroyThemeMonitorWindow( + void *clientData) { HWND hwnd = (HWND)clientData; DestroyWindow(hwnd); } static LRESULT WINAPI -WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +WndProc( + HWND hwnd, + UINT msg, + WPARAM wp, + LPARAM lp) { #ifdef _WIN64 Tcl_Interp *interp = (Tcl_Interp *)GetWindowLongPtr(hwnd, GWLP_USERDATA); @@ -157,10 +164,12 @@ WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) MODULE_SCOPE int TtkWinTheme_Init(Tcl_Interp *, HWND hwnd); MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *, HWND hwnd); -MODULE_SCOPE int Ttk_WinPlatformInit(Tcl_Interp *interp) +MODULE_SCOPE int +Ttk_WinPlatformInit( + Tcl_Interp *interp) { HWND hwnd; - + hwnd = CreateThemeMonitorWindow(Tk_GetHINSTANCE(), interp); Ttk_RegisterCleanup(interp, (ClientData)hwnd, DestroyThemeMonitorWindow); @@ -169,4 +178,3 @@ MODULE_SCOPE int Ttk_WinPlatformInit(Tcl_Interp *interp) return TCL_OK; } - |