summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2004-10-31 14:47:15 +0000
committerTor Lillqvist <tml@src.gnome.org>2004-10-31 14:47:15 +0000
commita841d12888638e86d1ed43562ed4c55a3fed2af9 (patch)
treef09bcbf3f069255c2ec378a343bd4d1a5788ac59 /gdk/win32
parent1c8e6a0e4fe16dcb9dafc5f1c90bc34bd7b3a9c4 (diff)
downloadgdk-pixbuf-a841d12888638e86d1ed43562ed4c55a3fed2af9.tar.gz
gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Remove
2004-10-31 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkprivate-win32.h * gdk/win32/gdkglobals-win32.c * gdk/win32/gdkmain-win32.c: Remove _windows_version and the IS_WIN_NT() macro. * gdk/win32/*.c: Use G_WIN32_IS_NT_BASED() from GLib instead.
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkdrawable-win32.c8
-rw-r--r--gdk/win32/gdkevents-win32.c2
-rw-r--r--gdk/win32/gdkgc-win32.c4
-rw-r--r--gdk/win32/gdkglobals-win32.c2
-rw-r--r--gdk/win32/gdkmain-win32.c9
-rw-r--r--gdk/win32/gdkprivate-win32.h3
-rw-r--r--gdk/win32/gdkproperty-win32.c2
-rw-r--r--gdk/win32/gdkselection-win32.c2
8 files changed, 10 insertions, 22 deletions
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 286cea928..bea0b0e90 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -612,7 +612,7 @@ generic_draw (GdkDrawable *drawable,
* the areas where mask is one. (It is filled with said pattern.)
*/
- if (IS_WIN_NT ())
+ if (G_WIN32_IS_NT_BASED ())
{
GDI_CALL (MaskBlt, (hdc, region->extents.x1, region->extents.y1,
width, height,
@@ -727,7 +727,7 @@ draw_rectangle (GdkGCWin32 *gcwin32,
x -= x_offset;
y -= y_offset;
- if (!filled && gcwin32->pen_dashes && !IS_WIN_NT ())
+ if (!filled && gcwin32->pen_dashes && !G_WIN32_IS_NT_BASED ())
{
render_line_vertical (hdc, x, y, y+height+1,
gcwin32->pen_width,
@@ -1187,7 +1187,7 @@ draw_segments (GdkGCWin32 *gcwin32,
}
}
- if (gcwin32->pen_dashes && !IS_WIN_NT ())
+ if (gcwin32->pen_dashes && !G_WIN32_IS_NT_BASED ())
{
for (i = 0; i < nsegs; i++)
{
@@ -1329,7 +1329,7 @@ draw_lines (GdkGCWin32 *gcwin32,
pts[i].y -= y_offset;
}
- if (gcwin32->pen_dashes && !IS_WIN_NT ())
+ if (gcwin32->pen_dashes && !G_WIN32_IS_NT_BASED ())
{
for (i = 0; i < npoints - 1; i++)
{
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index a7c20f7e7..e9eea03ce 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -850,7 +850,7 @@ build_key_event_state (GdkEvent *event,
* does indicate correctly whether it is the right Control or Alt
* key. But that would be a bit messy.
*/
- if (!IS_WIN_NT () &&
+ if (!G_WIN32_IS_NT_BASED () &&
_gdk_keyboard_has_altgr &&
key_state[VK_CONTROL] & 0x80 &&
key_state[VK_MENU] & 0x80)
diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c
index 3dbaaf013..4d4b09d44 100644
--- a/gdk/win32/gdkgc-win32.c
+++ b/gdk/win32/gdkgc-win32.c
@@ -238,7 +238,7 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
* it shouldn't be necessary at all, but win9x would do the clipping
*/
if ( (sw != 8 || sh != 8)
- && !IS_WIN_NT ()) /* HB: the MSDN says it's a Win95 limitation */
+ && !G_WIN32_IS_NT_BASED ()) /* HB: the MSDN says it's a Win95 limitation */
{
/* It seems that it *must* be 8x8, at least on my machine.
* Thus, tile an 8x8 bitmap with the stipple in case it is
@@ -955,7 +955,7 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
logbrush.lbColor = fg;
logbrush.lbHatch = 0;
- if (win32_gc->pen_num_dashes > 0 && !IS_WIN_NT ())
+ if (win32_gc->pen_num_dashes > 0 && !G_WIN32_IS_NT_BASED ())
{
/* The Win9x GDI is rather limited so we either draw dashed
* lines ourselves (only horizontal and vertical) or let them be
diff --git a/gdk/win32/gdkglobals-win32.c b/gdk/win32/gdkglobals-win32.c
index 8a0c7d483..4af1eb72d 100644
--- a/gdk/win32/gdkglobals-win32.c
+++ b/gdk/win32/gdkglobals-win32.c
@@ -62,8 +62,6 @@ GdkAtom _gdk_selection_property;
GdkAtom _wm_transient_for;
-DWORD _windows_version;
-
gint _gdk_input_ignore_wintab = FALSE;
gint _gdk_max_colors = 0;
diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c
index 49bbe61b9..161549416 100644
--- a/gdk/win32/gdkmain-win32.c
+++ b/gdk/win32/gdkmain-win32.c
@@ -98,13 +98,6 @@ _gdk_windowing_init (void)
_gdk_app_hmodule = GetModuleHandle (NULL);
_gdk_display_hdc = CreateDC ("DISPLAY", NULL, NULL, NULL);
_gdk_root_window = GetDesktopWindow ();
- _windows_version = GetVersion ();
-
- if (getenv ("PRETEND_WIN9X"))
- _windows_version = 0x80000004;
-
- GDK_NOTE (MISC, g_print ("Windows version: %08x\n", (guint) _windows_version));
-
_gdk_input_locale = GetKeyboardLayout (0);
_gdk_input_locale_is_ime = ImmIsIME (_gdk_input_locale);
GetLocaleInfo (MAKELCID (LOWORD (_gdk_input_locale), SORT_DEFAULT),
@@ -160,7 +153,7 @@ _gdk_win32_gdi_failed (const gchar *where,
/* On Win9x GDI calls are implemented in 16-bit code and thus
* don't set the 32-bit error code, sigh.
*/
- if (IS_WIN_NT ())
+ if (G_WIN32_IS_NT_BASED ())
_gdk_win32_api_failed (where, line, api);
else
_gdk_other_api_failed (where, line, api);
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index 2cfc89910..188401b4a 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -488,9 +488,6 @@ extern GdkAtom _gdk_selection_property;
extern GdkAtom _wm_transient_for;
-extern DWORD _windows_version;
-#define IS_WIN_NT() (_windows_version < 0x80000000)
-
/* Options */
extern gboolean _gdk_input_ignore_wintab;
extern gint _gdk_max_colors;
diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c
index fc42812c3..344913103 100644
--- a/gdk/win32/gdkproperty-win32.c
+++ b/gdk/win32/gdkproperty-win32.c
@@ -321,7 +321,7 @@ gdk_property_change (GdkWindow *window,
size++;
GDK_NOTE (DND, g_print ("...as text: %.40s\n", data));
}
- else if (IS_WIN_NT ())
+ else if (G_WIN32_IS_NT_BASED ())
{
/* On NT, use CF_UNICODETEXT if any non-system codepage char
* present.
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index 63fff2f68..1e22293da 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -417,7 +417,7 @@ gdk_selection_convert (GdkWindow *requestor,
return;
/* Try various formats. First the simplest, CF_UNICODETEXT. */
- if (IS_WIN_NT () && (hdata = GetClipboardData (CF_UNICODETEXT)) != NULL)
+ if (G_WIN32_IS_NT_BASED () && (hdata = GetClipboardData (CF_UNICODETEXT)) != NULL)
{
wchar_t *ptr, *wcs, *p, *q;
guchar *data;