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



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

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

	* gdk/win32/gdkmain-win32.c
	(_gdk_win32_window_pos_bits_to_string): New debugging
	printout function. Decodes the SWP_* bits.

	* gdk/win32/gdkprivate-win32.h: Declare it.



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 23:20:26 2008
@@ -629,6 +629,38 @@
 }
 
 gchar *
+_gdk_win32_window_pos_bits_to_string (UINT flags)
+{
+  gchar buf[1000];
+  gchar *bufp = buf;
+  gchar *s = "";
+
+  buf[0] = '\0';
+
+#define BIT(x)						\
+  if (flags & SWP_ ## x)				\
+    (bufp += sprintf (bufp, "%s" #x, s), s = "|")
+
+  BIT (DRAWFRAME);
+  BIT (FRAMECHANGED);
+  BIT (HIDEWINDOW);
+  BIT (NOACTIVATE);
+  BIT (NOCOPYBITS);
+  BIT (NOMOVE);
+  BIT (NOSIZE);
+  BIT (NOREDRAW);
+  BIT (NOZORDER);
+  BIT (SHOWWINDOW);
+  BIT (NOOWNERZORDER);
+  BIT (NOSENDCHANGING);
+  BIT (DEFERERASE);
+  BIT (ASYNCWINDOWPOS);
+#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 23:20:26 2008
@@ -313,6 +313,7 @@
 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_window_pos_bits_to_string (UINT flags);
 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]