gtk+ r21584 - in branches/gtk-2-14: . gdk/win32



Author: tml
Date: Sat Oct  4 20:27:31 2008
New Revision: 21584
URL: http://svn.gnome.org/viewvc/gtk+?rev=21584&view=rev

Log:
2008-10-04  Tor Lillqvist  <tml novell com>

	* gdk/win32/gdkmain-win32.c (_gdk_win32_window_exstyle_to_string):
	New debugging printout function. Decodes the WS_EX_* bits.
	
	* gdk/win32/gdkprivate-win32.h: Declare it. Define
	GDK_DEBUG_MISC_OR_EVENTS for use in GDK_NOTE() to match either
	"misc" or "events".



Modified:
   branches/gtk-2-14/ChangeLog
   branches/gtk-2-14/gdk/win32/gdkmain-win32.c
   branches/gtk-2-14/gdk/win32/gdkprivate-win32.h

Modified: branches/gtk-2-14/gdk/win32/gdkmain-win32.c
==============================================================================
--- branches/gtk-2-14/gdk/win32/gdkmain-win32.c	(original)
+++ branches/gtk-2-14/gdk/win32/gdkmain-win32.c	Sat Oct  4 20:27:31 2008
@@ -553,7 +553,7 @@
   buf[0] = '\0';
 
 #define BIT(x)						\
-  if (style & WS_ ## x)			\
+  if (style & WS_ ## x)					\
     (bufp += sprintf (bufp, "%s" #x, s), s = "|")
 
   /* Note that many of the WS_* macros are in face several bits.
@@ -586,6 +586,49 @@
 }
 
 gchar *
+_gdk_win32_window_exstyle_to_string (LONG style)
+{
+  gchar buf[1000];
+  gchar *bufp = buf;
+  gchar *s = "";
+
+  buf[0] = '\0';
+
+#define BIT(x)						\
+  if (style & WS_EX_ ## x)				\
+    (bufp += sprintf (bufp, "%s" #x, s), s = "|")
+
+  /* Note that many of the WS_EX_* macros are in face several bits.
+   * Handle just the individual bits here. Sort as in w32api's
+   * winuser.h.
+   */
+  BIT (ACCEPTFILES);
+  BIT (APPWINDOW);
+  BIT (CLIENTEDGE);
+  BIT (COMPOSITED);
+  BIT (CONTEXTHELP);
+  BIT (CONTROLPARENT);
+  BIT (DLGMODALFRAME);
+  BIT (LAYERED);
+  BIT (LAYOUTRTL);
+  BIT (LEFTSCROLLBAR);
+  BIT (MDICHILD);
+  BIT (NOACTIVATE);
+  BIT (NOINHERITLAYOUT);
+  BIT (NOPARENTNOTIFY);
+  BIT (RIGHT);
+  BIT (RTLREADING);
+  BIT (STATICEDGE);
+  BIT (TOOLWINDOW);
+  BIT (TOPMOST);
+  BIT (TRANSPARENT);
+  BIT (WINDOWEDGE);
+#undef BIT
+
+  return static_printf ("%s", buf);  
+}
+
+gchar *
 _gdk_win32_rop2_to_string (int rop2)
 {
   switch (rop2)

Modified: branches/gtk-2-14/gdk/win32/gdkprivate-win32.h
==============================================================================
--- branches/gtk-2-14/gdk/win32/gdkprivate-win32.h	(original)
+++ branches/gtk-2-14/gdk/win32/gdkprivate-win32.h	Sat Oct  4 20:27:31 2008
@@ -98,6 +98,7 @@
 #define GDK_DEBUG_EVENTS_OR_INPUT (GDK_DEBUG_EVENTS|GDK_DEBUG_INPUT)
 #define GDK_DEBUG_PIXMAP_OR_COLORMAP (GDK_DEBUG_PIXMAP|GDK_DEBUG_COLORMAP)
 #define GDK_DEBUG_MISC_OR_COLORMAP (GDK_DEBUG_MISC|GDK_DEBUG_COLORMAP)
+#define GDK_DEBUG_MISC_OR_EVENTS (GDK_DEBUG_MISC|GDK_DEBUG_EVENTS)
 
 #define GDK_TYPE_GC_WIN32              (_gdk_gc_win32_get_type ())
 #define GDK_GC_WIN32(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_WIN32, GdkGCWin32))
@@ -311,6 +312,7 @@
 gchar *_gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask);
 gchar *_gdk_win32_window_state_to_string (GdkWindowState state);
 gchar *_gdk_win32_window_style_to_string (LONG style);
+gchar *_gdk_win32_window_exstyle_to_string (LONG style);
 gchar *_gdk_win32_drawable_description (GdkDrawable *d);
 
 gchar *_gdk_win32_rop2_to_string       (int          rop2);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]