]> Pileus Git - ~andy/gtk/commitdiff
gdk/win32/gdkprivate-win32.h gdk/win32/gdkmain-win32.c Define WINVER and
authorTor Lillqvist <tml@novell.com>
Sun, 10 Sep 2006 17:33:29 +0000 (17:33 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sun, 10 Sep 2006 17:33:29 +0000 (17:33 +0000)
2006-09-10  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkmain-win32.c
* gdk/win32/gdkwindow-win32.c: Define WINVER and _WIN32_WINNT as
0x0500 in gdkprivate-win32.h instead of doing it in two source
files. (#355212, Mike Edenfield)

* gdk/win32/gdkwindow-win32.c: We can also remove the ersatz
GetAncestor() for the _MSC_VER && WINVER < 0x0500 case, I hope.

ChangeLog
gdk/win32/gdkmain-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdkwindow-win32.c

index 9dc67e473957f9ee27b760660f7e0035e8e71074..97450f53e89d0a4b98174bc84631acfe316a7848 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-09-10  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkprivate-win32.h
+       * gdk/win32/gdkmain-win32.c
+       * gdk/win32/gdkwindow-win32.c: Define WINVER and _WIN32_WINNT as
+       0x0500 in gdkprivate-win32.h instead of doing it in two source
+       files. (#355212, Mike Edenfield)
+
+       * gdk/win32/gdkwindow-win32.c: We can also remove the ersatz
+       GetAncestor() for the _MSC_VER && WINVER < 0x0500 case, I hope.
+
 2006-09-10  Matthias Clasen  <mclasen@redhat.com>
 
        * Commit a patch by Behdad to fix typos, omissions and other
index 3bc5920936f971e6bc101a3181ccba3050ba5f40..d38db8c1a59129523bc616f86087cbf7af44a5ed 100644 (file)
@@ -25,8 +25,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
-#define WINVER 0x0500
-
 #include <config.h>
 
 #include <glib/gprintf.h>
index 2b7637234b38005173e94989b85bd68dad5ea4c1..79202631e1588b23d9ca5cd9bc6df7269c067058 100644 (file)
 #ifndef __GDK_PRIVATE_WIN32_H__
 #define __GDK_PRIVATE_WIN32_H__
 
+#ifndef WINVER
+#define WINVER 0x0500
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT WINVER
+#endif
+
 #include <gdk/gdkprivate.h>
 #include <gdk/win32/gdkwindow-win32.h>
 #include <gdk/win32/gdkpixmap-win32.h>
index b5a83e1b49a27c2f88385b01079a8a55f69e4d15..22959242fd4a2d60d13cefd4f037c92bd1b80b0a 100644 (file)
 #include <config.h>
 #include <stdlib.h>
 
-#ifndef _MSC_VER
-#define _WIN32_WINNT 0x0500
-#define WINVER _WIN32_WINNT
-#endif
-
 #include "gdk.h"
 #include "gdkprivate-win32.h"
 #include "gdkinput-win32.h"
 
-#if defined(_MSC_VER) && (WINVER < 0x0500)
-
-typedef struct
-{
-  UINT cbSize;
-  HWND hwnd;
-  DWORD dwFlags;
-  UINT uCount;
-  DWORD dwTimeout;
-} FLASHWINFO;
-
-#define FLASHW_STOP 0
-#define FLASHW_CAPTION 1
-#define FLASHW_TRAY 2
-#define FLASHW_ALL (FLASHW_CAPTION|FLASHW_TRAY)
-#define FLASHW_TIMER 4
-
-#define GetAncestor(hwnd,what) _gdk_win32_get_ancestor_parent (hwnd)
-
-static HWND
-_gdk_win32_get_ancestor_parent (HWND hwnd)
-{
-#ifndef GA_PARENT
-#  define GA_PARENT 1 
-#endif
-  typedef HWND (WINAPI *PFN_GetAncestor) (HWND,UINT);
-  static PFN_GetAncestor p_GetAncestor = NULL;
-  static gboolean once = FALSE;
-  
-  if (!once)
-    {
-      HMODULE user32;
-
-      user32 = GetModuleHandle ("user32.dll");
-      p_GetAncestor = (PFN_GetAncestor)GetProcAddress (user32, "GetAncestor");
-      once = TRUE;
-    }
-  if (p_GetAncestor)
-    return p_GetAncestor (hwnd, GA_PARENT);
-  else /* not completely right, but better than nothing ? */
-    return GetParent (hwnd);
-}
-
-#endif
-
 #if 0
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <stdio.h>