diff options
author | jenglish <jenglish@noemail.net> | 2007-10-25 07:08:24 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2007-10-25 07:08:24 (GMT) |
commit | c64a8d99981285cedfa14d0b63da44771a5e75fb (patch) | |
tree | cc3ec59b3743ffde75e375f9a9f2c21fcfbf95a2 /win/ttkWinMonitor.c | |
parent | 78457997c54f8e15462b6753221cb9a4f7d79ba5 (diff) | |
download | tk-c64a8d99981285cedfa14d0b63da44771a5e75fb.zip tk-c64a8d99981285cedfa14d0b63da44771a5e75fb.tar.gz tk-c64a8d99981285cedfa14d0b63da44771a5e75fb.tar.bz2 |
Move widget layout registration from TtkElements_Init()
to widget *_Init() routines.
Renaming/consistency: s/...ElementGeometry()/...ElementSize()/
FossilOrigin-Name: 05eaff8c5983b921fdf93a2f1415a3fff3453cbb
Diffstat (limited to 'win/ttkWinMonitor.c')
-rw-r--r-- | win/ttkWinMonitor.c | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c index 2c9229f..cdfc2e6 100644 --- a/win/ttkWinMonitor.c +++ b/win/ttkWinMonitor.c @@ -1,4 +1,4 @@ -/* $Id: ttkWinMonitor.c,v 1.12 2007/09/08 16:13:45 dkf Exp $ +/* $Id: ttkWinMonitor.c,v 1.13 2007/10/25 07:08:26 jenglish Exp $ */ #ifdef _MSC_VER @@ -56,9 +56,7 @@ static SystemColorEntry sysColors[] = { { NULL, 0 } }; -static void -RegisterSystemColors( - Tcl_Interp *interp) +static void RegisterSystemColors(Tcl_Interp *interp) { Ttk_ResourceCache cache = Ttk_GetResourceCache(interp); SystemColorEntry *sysColor; @@ -74,14 +72,12 @@ RegisterSystemColors( } 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; @@ -97,9 +93,9 @@ CreateThemeMonitorWindow( 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 @@ -112,20 +108,14 @@ CreateThemeMonitorWindow( } static void -DestroyThemeMonitorWindow( - void *clientData) +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); @@ -144,8 +134,9 @@ WndProc( case WM_THEMECHANGED: /* - * Reset the application theme to 'xpnative' if present, which will in - * turn fall back to 'winnative' if XP theming is disabled. + * Reset the application theme to 'xpnative' if present, + * which will in turn fall back to 'winnative' if XP theming + * is disabled. */ theme = Ttk_GetTheme(interp, "xpnative"); @@ -165,9 +156,7 @@ WndProc( 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; @@ -179,11 +168,3 @@ Ttk_WinPlatformInit( return TCL_OK; } - -/* - * Local Variables: - * mode: c - * c-basic-offset: 4 - * fill-column: 78 - * End: - */ |