summaryrefslogtreecommitdiffstats
path: root/win/ttkWinMonitor.c
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2007-10-25 07:08:25 (GMT)
committerjenglish <jenglish@flightlab.com>2007-10-25 07:08:25 (GMT)
commit504f22c2002890ce5b39d30561d76cae861d0d40 (patch)
treecc3ec59b3743ffde75e375f9a9f2c21fcfbf95a2 /win/ttkWinMonitor.c
parenta9b41e61dd1f2274961a88385d433a9bac66d44a (diff)
downloadtk-504f22c2002890ce5b39d30561d76cae861d0d40.zip
tk-504f22c2002890ce5b39d30561d76cae861d0d40.tar.gz
tk-504f22c2002890ce5b39d30561d76cae861d0d40.tar.bz2
Move widget layout registration from TtkElements_Init()
to widget *_Init() routines. Renaming/consistency: s/...ElementGeometry()/...ElementSize()/
Diffstat (limited to 'win/ttkWinMonitor.c')
-rw-r--r--win/ttkWinMonitor.c49
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:
- */