gdk/win32/gdkprivate-win32.h gdk/win32/gdkmain-win32.c Define WINVER and

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.
This commit is contained in:
Tor Lillqvist
2006-09-10 17:33:29 +00:00
committed by Tor Lillqvist
parent 52b81bcc3d
commit 8a99fbc640
4 changed files with 19 additions and 52 deletions

View File

@@ -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

View File

@@ -25,8 +25,6 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#define WINVER 0x0500
#include <config.h>
#include <glib/gprintf.h>

View File

@@ -27,6 +27,14 @@
#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>

View File

@@ -29,60 +29,10 @@
#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>