Commit 41be5863 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11 to #ifdef

Wed Sep 29 19:55:35 1999  Owen Taylor  <otaylor@redhat.com>

	* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
	to #ifdef GDK_WINDOWING_X11.
parent f73d6ee3
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
Wed Sep 29 19:55:35 1999 Owen Taylor <otaylor@redhat.com>
* */*.[ch]: Changed from #if GDK_WINDOWING == GDK_WINDOWING_X11
to #ifdef GDK_WINDOWING_X11.
[ Merges from gtk-1-2 ] [ Merges from gtk-1-2 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org> Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>
......
...@@ -593,7 +593,7 @@ esac ...@@ -593,7 +593,7 @@ esac
],[ ],[
# Currently we always use X11 on those systems where we run configure... # Currently we always use X11 on those systems where we run configure...
gdk_windowing=' gdk_windowing='
#define GDK_WINDOWING GDK_WINDOWING_X11' #define GDK_WINDOWING_X11'
if test x$gdk_wchar_h = xyes; then if test x$gdk_wchar_h = xyes; then
gdk_wc=' gdk_wc='
#define GDK_HAVE_WCHAR_H 1' #define GDK_HAVE_WCHAR_H 1'
......
...@@ -464,7 +464,7 @@ GdkPixmap* gdk_pixmap_new (GdkWindow *window, ...@@ -464,7 +464,7 @@ GdkPixmap* gdk_pixmap_new (GdkWindow *window,
gint width, gint width,
gint height, gint height,
gint depth); gint depth);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
GdkPixmap* gdk_pixmap_create_on_shared_image GdkPixmap* gdk_pixmap_create_on_shared_image
(GdkImage **image_return, (GdkImage **image_return,
GdkWindow *window, GdkWindow *window,
...@@ -521,7 +521,7 @@ GdkImage* gdk_image_new (GdkImageType type, ...@@ -521,7 +521,7 @@ GdkImage* gdk_image_new (GdkImageType type,
GdkVisual *visual, GdkVisual *visual,
gint width, gint width,
gint height); gint height);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
GdkImage* gdk_image_bitmap_new(GdkImageType type, GdkImage* gdk_image_bitmap_new(GdkImageType type,
GdkVisual *visual, GdkVisual *visual,
gint width, gint width,
......
...@@ -2681,9 +2681,9 @@ gdk_rgb_select_conv (GdkImage *image) ...@@ -2681,9 +2681,9 @@ gdk_rgb_select_conv (GdkImage *image)
gboolean mask_rgb, mask_bgr; gboolean mask_rgb, mask_bgr;
depth = image_info->visual->depth; depth = image_info->visual->depth;
#if defined (GDK_RGB_STANDALONE) || (GDK_WINDOWING == GDK_WINDOWING_X11) #if defined (GDK_RGB_STANDALONE) || defined (GDK_WINDOWING_X11)
bpp = ((GdkImagePrivate *)image)->ximage->bits_per_pixel; bpp = ((GdkImagePrivate *)image)->ximage->bits_per_pixel;
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
bpp = ((GdkVisualPrivate *) gdk_visual_get_system())->xvisual->bitspixel; bpp = ((GdkVisualPrivate *) gdk_visual_get_system())->xvisual->bitspixel;
#endif #endif
......
...@@ -49,20 +49,6 @@ ...@@ -49,20 +49,6 @@
*/ */
#include <gdkconfig.h> #include <gdkconfig.h>
/* Windowing API alternatives. Note that these macros indicate just
* what windowing system is in use, not what operating system. It is
* possible to built GDK for X11 in a Win32 environment, for instance.
*
* gdkconfig.h defines GDK_WINDOWING as one of the following. In
* addition to the original X11 only the Win32 implementation exists
* yet.
*/
#define GDK_WINDOWING_X11 1 /* X11 */
#define GDK_WINDOWING_WIN32 2 /* Win32 GDI */
#define GDK_WINDOWING_BEOS 3 /* BeOS */
#define GDK_WINDOWING_MACOS 4 /* MacOS */
#define GDK_WINDOWING_GGI 5 /* Linux GGI */
/* some common magic values */ /* some common magic values */
#define GDK_NONE 0L #define GDK_NONE 0L
#define GDK_CURRENT_TIME 0L #define GDK_CURRENT_TIME 0L
......
/* Handcrafted for Win32 */ /* Handcrafted for Win32 */
#define GDK_WINDOWING GDK_WINDOWING_WIN32 #define GDK_WINDOWING_WIN32
#define GDK_HAVE_WCHAR_H 1 #define GDK_HAVE_WCHAR_H 1
#ifdef _MSC_VER #ifdef _MSC_VER
#define GDK_HAVE_WCTYPE_H 1 #define GDK_HAVE_WCTYPE_H 1
......
...@@ -2048,12 +2048,12 @@ gtk_drag_source_handle_event (GtkWidget *widget, ...@@ -2048,12 +2048,12 @@ gtk_drag_source_handle_event (GtkWidget *widget,
cursor = gtk_drag_get_cursor (event->dnd.context->action); cursor = gtk_drag_get_cursor (event->dnd.context->action);
if (info->cursor != cursor) if (info->cursor != cursor)
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XChangeActivePointerGrab (GDK_WINDOW_XDISPLAY (widget->window), XChangeActivePointerGrab (GDK_WINDOW_XDISPLAY (widget->window),
PointerMotionMask | PointerMotionHintMask | ButtonReleaseMask, PointerMotionMask | PointerMotionHintMask | ButtonReleaseMask,
((GdkCursorPrivate *)cursor)->xcursor, ((GdkCursorPrivate *)cursor)->xcursor,
event->dnd.time); event->dnd.time);
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
gdk_pointer_grab (widget->window, FALSE, gdk_pointer_grab (widget->window, FALSE,
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK | GDK_POINTER_MOTION_HINT_MASK |
......
...@@ -71,11 +71,11 @@ ...@@ -71,11 +71,11 @@
#include "gdk/gdk.h" #include "gdk/gdk.h"
/* Protect against the CHARSET struct in Win32 */ /* Protect against the CHARSET struct in Win32 */
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
# define CHARSET CHARSETstruct # define CHARSET CHARSETstruct
#endif #endif
#include "gdkx.h" #include "gdkx.h"
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
# undef CHARSET # undef CHARSET
#endif #endif
#include "gdk/gdkkeysyms.h" #include "gdk/gdkkeysyms.h"
...@@ -401,7 +401,7 @@ static gint gtk_font_selection_dialog_on_configure(GtkWidget *widget, ...@@ -401,7 +401,7 @@ static gint gtk_font_selection_dialog_on_configure(GtkWidget *widget,
GdkEventConfigure *event, GdkEventConfigure *event,
GtkFontSelectionDialog *fsd); GtkFontSelectionDialog *fsd);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
static char *logfont_to_xlfd (const LOGFONT *lfp, static char *logfont_to_xlfd (const LOGFONT *lfp,
int size, int size,
int res, int res,
...@@ -1816,7 +1816,7 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel) ...@@ -1816,7 +1816,7 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel)
GtkStyle *style; GtkStyle *style;
gint text_height, new_height; gint text_height, new_height;
gchar *text; gchar *text;
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XFontStruct *xfs; XFontStruct *xfs;
#endif #endif
...@@ -1851,7 +1851,7 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel) ...@@ -1851,7 +1851,7 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel)
gtk_entry_set_text(GTK_ENTRY(fontsel->preview_entry), PREVIEW_TEXT); gtk_entry_set_text(GTK_ENTRY(fontsel->preview_entry), PREVIEW_TEXT);
gtk_entry_set_position(GTK_ENTRY(fontsel->preview_entry), 0); gtk_entry_set_position(GTK_ENTRY(fontsel->preview_entry), 0);
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
/* If this is a 2-byte font display a message to say it may not be /* If this is a 2-byte font display a message to say it may not be
displayed properly. */ displayed properly. */
xfs = GDK_FONT_XFONT(fontsel->font); xfs = GDK_FONT_XFONT(fontsel->font);
...@@ -1885,7 +1885,7 @@ gtk_font_selection_switch_page (GtkWidget *w, ...@@ -1885,7 +1885,7 @@ gtk_font_selection_switch_page (GtkWidget *w,
static void static void
gtk_font_selection_show_font_info (GtkFontSelection *fontsel) gtk_font_selection_show_font_info (GtkFontSelection *fontsel)
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
Atom font_atom, atom; Atom font_atom, atom;
Bool status; Bool status;
#endif #endif
...@@ -1917,7 +1917,7 @@ gtk_font_selection_show_font_info (GtkFontSelection *fontsel) ...@@ -1917,7 +1917,7 @@ gtk_font_selection_show_font_info (GtkFontSelection *fontsel)
gtk_clist_set_text(GTK_CLIST(fontsel->info_clist), i, 1, gtk_clist_set_text(GTK_CLIST(fontsel->info_clist), i, 1,
field ? field : ""); field ? field : "");
} }
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
if (fontsel->font) if (fontsel->font)
{ {
font_atom = XInternAtom(GDK_DISPLAY(), "FONT", True); font_atom = XInternAtom(GDK_DISPLAY(), "FONT", True);
...@@ -1946,7 +1946,7 @@ gtk_font_selection_show_font_info (GtkFontSelection *fontsel) ...@@ -1946,7 +1946,7 @@ gtk_font_selection_show_font_info (GtkFontSelection *fontsel)
} }
} }
} }
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
if (fontsel->font) if (fontsel->font)
{ {
LOGFONT logfont; LOGFONT logfont;
...@@ -2648,7 +2648,7 @@ gtk_font_selection_filter_state (GtkFontSelection *fontsel, ...@@ -2648,7 +2648,7 @@ gtk_font_selection_filter_state (GtkFontSelection *fontsel,
} }
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
static gint num_fonts; static gint num_fonts;
static gint font_names_size; static gint font_names_size;
...@@ -2839,10 +2839,10 @@ EnumFontFamExProc (const LOGFONT *lfp, ...@@ -2839,10 +2839,10 @@ EnumFontFamExProc (const LOGFONT *lfp,
static void static void
gtk_font_selection_get_fonts (void) gtk_font_selection_get_fonts (void)
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
gchar **xfontnames; gchar **xfontnames;
gint num_fonts; gint num_fonts;
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
LOGFONT logfont; LOGFONT logfont;
#else #else
gint num_fonts = 0; gint num_fonts = 0;
...@@ -2864,7 +2864,7 @@ gtk_font_selection_get_fonts (void) ...@@ -2864,7 +2864,7 @@ gtk_font_selection_get_fonts (void)
fontsel_info = g_new (GtkFontSelInfo, 1); fontsel_info = g_new (GtkFontSelInfo, 1);
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
/* Get a maximum of MAX_FONTS fontnames from the X server. /* Get a maximum of MAX_FONTS fontnames from the X server.
Use "-*" as the pattern rather than "-*-*-*-*-*-*-*-*-*-*-*-*-*-*" since Use "-*" as the pattern rather than "-*-*-*-*-*-*-*-*-*-*-*-*-*-*" since
the latter may result in fonts being returned which don't actually exist. the latter may result in fonts being returned which don't actually exist.
...@@ -2874,7 +2874,7 @@ gtk_font_selection_get_fonts (void) ...@@ -2874,7 +2874,7 @@ gtk_font_selection_get_fonts (void)
if (num_fonts == MAX_FONTS) if (num_fonts == MAX_FONTS)
g_warning(_("MAX_FONTS exceeded. Some fonts may be missing.")); g_warning(_("MAX_FONTS exceeded. Some fonts may be missing."));
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
num_fonts = 0; num_fonts = 0;
hdc = GetDC (NULL); hdc = GetDC (NULL);
font_names_size = 100; font_names_size = 100;
...@@ -3128,9 +3128,9 @@ gtk_font_selection_get_fonts (void) ...@@ -3128,9 +3128,9 @@ gtk_font_selection_get_fonts (void)
sizeof(guint16) * npoint_sizes); sizeof(guint16) * npoint_sizes);
g_free(fontnames); g_free(fontnames);
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XFreeFontNames (xfontnames); XFreeFontNames (xfontnames);
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
for (i = 0; i < num_fonts; i++) for (i = 0; i < num_fonts; i++)
g_free (xfontnames[i]); g_free (xfontnames[i]);
g_free (xfontnames); g_free (xfontnames);
...@@ -3602,7 +3602,7 @@ gtk_font_selection_get_xlfd_field (const gchar *fontname, ...@@ -3602,7 +3602,7 @@ gtk_font_selection_get_xlfd_field (const gchar *fontname,
return NULL; return NULL;
strncpy (buffer, t1, len); strncpy (buffer, t1, len);
buffer[len] = 0; buffer[len] = 0;
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
/* Convert to lower case. */ /* Convert to lower case. */
g_strdown (buffer); g_strdown (buffer);
#endif #endif
......
...@@ -869,7 +869,7 @@ gtk_layout_expose_area (GtkLayout *layout, ...@@ -869,7 +869,7 @@ gtk_layout_expose_area (GtkLayout *layout,
} }
} }
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
/* This function is used to find events to process while scrolling /* This function is used to find events to process while scrolling
*/ */
...@@ -920,7 +920,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment, ...@@ -920,7 +920,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
GtkLayout *layout) GtkLayout *layout)
{ {
GtkWidget *widget; GtkWidget *widget;
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XEvent xevent; XEvent xevent;
#endif #endif
gint dx, dy; gint dx, dy;
...@@ -1056,7 +1056,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment, ...@@ -1056,7 +1056,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
gdk_flush(); gdk_flush();
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (layout->bin_window), while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (layout->bin_window),
&xevent, &xevent,
gtk_layout_expose_predicate, gtk_layout_expose_predicate,
...@@ -1090,7 +1090,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment, ...@@ -1090,7 +1090,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
} }
} }
} }
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */ /* XXX Not implemented */
#endif #endif
} }
...@@ -1110,7 +1110,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent, ...@@ -1110,7 +1110,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent,
GdkEvent *event, GdkEvent *event,
gpointer data) gpointer data)
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XEvent *xevent; XEvent *xevent;
GtkLayout *layout; GtkLayout *layout;
...@@ -1144,7 +1144,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent, ...@@ -1144,7 +1144,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent,
} }
break; break;
} }
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */ /* XXX Not implemented */
#endif #endif
...@@ -1160,7 +1160,7 @@ gtk_layout_main_filter (GdkXEvent *gdk_xevent, ...@@ -1160,7 +1160,7 @@ gtk_layout_main_filter (GdkXEvent *gdk_xevent,
GdkEvent *event, GdkEvent *event,
gpointer data) gpointer data)
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XEvent *xevent; XEvent *xevent;
GtkLayout *layout; GtkLayout *layout;
...@@ -1186,7 +1186,7 @@ gtk_layout_main_filter (GdkXEvent *gdk_xevent, ...@@ -1186,7 +1186,7 @@ gtk_layout_main_filter (GdkXEvent *gdk_xevent,
return GDK_FILTER_REMOVE; return GDK_FILTER_REMOVE;
} }
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */ /* XXX Not implemented */
#endif #endif
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "gdkx.h" /* For GDK_WINDOWING */ #include "gdkx.h" /* For GDK_WINDOWING */
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <X11/Xlocale.h> /* so we get the right setlocale */ #include <X11/Xlocale.h> /* so we get the right setlocale */
#else #else
#include <locale.h> #include <locale.h>
......
...@@ -271,11 +271,11 @@ gtk_plug_key_press_event (GtkWidget *widget, ...@@ -271,11 +271,11 @@ gtk_plug_key_press_event (GtkWidget *widget,
gtk_window_set_focus (GTK_WINDOW (widget), NULL); gtk_window_set_focus (GTK_WINDOW (widget), NULL);
gdk_error_trap_push (); gdk_error_trap_push ();
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XSetInputFocus (GDK_DISPLAY (), XSetInputFocus (GDK_DISPLAY (),
GDK_WINDOW_XWINDOW (plug->socket_window), GDK_WINDOW_XWINDOW (plug->socket_window),
RevertToParent, event->time); RevertToParent, event->time);
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
SetFocus (GDK_WINDOW_XWINDOW (plug->socket_window)); SetFocus (GDK_WINDOW_XWINDOW (plug->socket_window));
#endif #endif
gdk_flush (); gdk_flush ();
...@@ -296,7 +296,7 @@ gtk_plug_key_press_event (GtkWidget *widget, ...@@ -296,7 +296,7 @@ gtk_plug_key_press_event (GtkWidget *widget,
static void static void
gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event) gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event)
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XEvent xevent; XEvent xevent;
xevent.xkey.type = KeyPress; xevent.xkey.type = KeyPress;
...@@ -321,7 +321,7 @@ gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event) ...@@ -321,7 +321,7 @@ gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event)
False, NoEventMask, &xevent); False, NoEventMask, &xevent);
gdk_flush (); gdk_flush ();
gdk_error_trap_pop (); gdk_error_trap_pop ();
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
/* This is pretty bogus, and not tested at all. */ /* This is pretty bogus, and not tested at all. */
WPARAM wParam; WPARAM wParam;
LPARAM lParam; LPARAM lParam;
...@@ -568,7 +568,7 @@ gtk_plug_set_focus (GtkWindow *window, ...@@ -568,7 +568,7 @@ gtk_plug_set_focus (GtkWindow *window,
if (focus && !GTK_WIDGET_HAS_FOCUS(window)) if (focus && !GTK_WIDGET_HAS_FOCUS(window))
{ {
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
XEvent xevent; XEvent xevent;
xevent.xfocus.type = FocusIn; xevent.xfocus.type = FocusIn;
...@@ -583,7 +583,7 @@ gtk_plug_set_focus (GtkWindow *window, ...@@ -583,7 +583,7 @@ gtk_plug_set_focus (GtkWindow *window,
False, NoEventMask, &xevent); False, NoEventMask, &xevent);
gdk_flush (); gdk_flush ();
gdk_error_trap_pop (); gdk_error_trap_pop ();
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */ /* XXX Not implemented */
#endif #endif
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "gdkx.h" #include "gdkx.h"
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <X11/Xlocale.h> /* so we get the right setlocale */ #include <X11/Xlocale.h> /* so we get the right setlocale */
#else #else
#include <locale.h> #include <locale.h>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
/* Maximum size of a sent chunk, in bytes. Also the default size of /* Maximum size of a sent chunk, in bytes. Also the default size of
our buffers */ our buffers */
#if GDK_WINDOWING == GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
/* No chunks on Win32 */ /* No chunks on Win32 */
#define GTK_SELECTION_MAX_SIZE G_MAXINT #define GTK_SELECTION_MAX_SIZE G_MAXINT
#else #else
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "gtksocket.h" #include "gtksocket.h"
#include "gtkdnd.h" #include "gtkdnd.h"
#if GDK_WINDOWING == GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
/* Forward declararations */ /* Forward declararations */
...@@ -748,7 +748,7 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) ...@@ -748,7 +748,7 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
return return_val; return return_val;
} }
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32 #elif defined (GDK_WINDOWING_WIN32)
guint guint
gtk_socket_get_type () gtk_socket_get_type ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment