summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1999-09-29 23:47:22 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-09-29 23:47:22 +0000
commit41be586333346e3aa3e75922d8e4de49501df9a6 (patch)
tree37f4096b9f19f806c99609d1b3476015d32d94d0 /gtk
parentf73d6ee34a65ff1faffcd4f5e7fd364d9b7a1e7a (diff)
downloadgtk+-41be586333346e3aa3e75922d8e4de49501df9a6.tar.gz
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.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkdnd.c4
-rw-r--r--gtk/gtkfontsel.c32
-rw-r--r--gtk/gtklayout.c16
-rw-r--r--gtk/gtkmain.c2
-rw-r--r--gtk/gtkplug.c12
-rw-r--r--gtk/gtkrc.c2
-rw-r--r--gtk/gtkselection.c2
-rw-r--r--gtk/gtksocket.c4
8 files changed, 37 insertions, 37 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 101e4da4ce..56dae8894f 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -2048,12 +2048,12 @@ gtk_drag_source_handle_event (GtkWidget *widget,
cursor = gtk_drag_get_cursor (event->dnd.context->action);
if (info->cursor != cursor)
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XChangeActivePointerGrab (GDK_WINDOW_XDISPLAY (widget->window),
PointerMotionMask | PointerMotionHintMask | ButtonReleaseMask,
((GdkCursorPrivate *)cursor)->xcursor,
event->dnd.time);
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
gdk_pointer_grab (widget->window, FALSE,
GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK |
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index 1346e4516e..9fbf067870 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -71,11 +71,11 @@
#include "gdk/gdk.h"
/* Protect against the CHARSET struct in Win32 */
-#if GDK_WINDOWING == GDK_WINDOWING_WIN32
+#ifdef GDK_WINDOWING_WIN32
# define CHARSET CHARSETstruct
#endif
#include "gdkx.h"
-#if GDK_WINDOWING == GDK_WINDOWING_WIN32
+#ifdef GDK_WINDOWING_WIN32
# undef CHARSET
#endif
#include "gdk/gdkkeysyms.h"
@@ -401,7 +401,7 @@ static gint gtk_font_selection_dialog_on_configure(GtkWidget *widget,
GdkEventConfigure *event,
GtkFontSelectionDialog *fsd);
-#if GDK_WINDOWING == GDK_WINDOWING_WIN32
+#ifdef GDK_WINDOWING_WIN32
static char *logfont_to_xlfd (const LOGFONT *lfp,
int size,
int res,
@@ -1816,7 +1816,7 @@ gtk_font_selection_update_preview (GtkFontSelection *fontsel)
GtkStyle *style;
gint text_height, new_height;
gchar *text;
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XFontStruct *xfs;
#endif
@@ -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_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
displayed properly. */
xfs = GDK_FONT_XFONT(fontsel->font);
@@ -1885,7 +1885,7 @@ gtk_font_selection_switch_page (GtkWidget *w,
static void
gtk_font_selection_show_font_info (GtkFontSelection *fontsel)
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
Atom font_atom, atom;
Bool status;
#endif
@@ -1917,7 +1917,7 @@ gtk_font_selection_show_font_info (GtkFontSelection *fontsel)
gtk_clist_set_text(GTK_CLIST(fontsel->info_clist), i, 1,
field ? field : "");
}
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
if (fontsel->font)
{
font_atom = XInternAtom(GDK_DISPLAY(), "FONT", True);
@@ -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)
{
LOGFONT logfont;
@@ -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 font_names_size;
@@ -2839,10 +2839,10 @@ EnumFontFamExProc (const LOGFONT *lfp,
static void
gtk_font_selection_get_fonts (void)
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
gchar **xfontnames;
gint num_fonts;
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
LOGFONT logfont;
#else
gint num_fonts = 0;
@@ -2864,7 +2864,7 @@ gtk_font_selection_get_fonts (void)
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.
Use "-*" as the pattern rather than "-*-*-*-*-*-*-*-*-*-*-*-*-*-*" since
the latter may result in fonts being returned which don't actually exist.
@@ -2874,7 +2874,7 @@ gtk_font_selection_get_fonts (void)
if (num_fonts == MAX_FONTS)
g_warning(_("MAX_FONTS exceeded. Some fonts may be missing."));
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
num_fonts = 0;
hdc = GetDC (NULL);
font_names_size = 100;
@@ -3128,9 +3128,9 @@ gtk_font_selection_get_fonts (void)
sizeof(guint16) * npoint_sizes);
g_free(fontnames);
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XFreeFontNames (xfontnames);
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
for (i = 0; i < num_fonts; i++)
g_free (xfontnames[i]);
g_free (xfontnames);
@@ -3602,7 +3602,7 @@ gtk_font_selection_get_xlfd_field (const gchar *fontname,
return NULL;
strncpy (buffer, t1, len);
buffer[len] = 0;
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
/* Convert to lower case. */
g_strdown (buffer);
#endif
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index 3e07f84bc8..8d8c247864 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -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
*/
@@ -920,7 +920,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
GtkLayout *layout)
{
GtkWidget *widget;
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XEvent xevent;
#endif
gint dx, dy;
@@ -1056,7 +1056,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
gdk_flush();
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (layout->bin_window),
&xevent,
gtk_layout_expose_predicate,
@@ -1090,7 +1090,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
}
}
}
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */
#endif
}
@@ -1110,7 +1110,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data)
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XEvent *xevent;
GtkLayout *layout;
@@ -1144,7 +1144,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent,
}
break;
}
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */
#endif
@@ -1160,7 +1160,7 @@ gtk_layout_main_filter (GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data)
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XEvent *xevent;
GtkLayout *layout;
@@ -1186,7 +1186,7 @@ gtk_layout_main_filter (GdkXEvent *gdk_xevent,
return GDK_FILTER_REMOVE;
}
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */
#endif
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 4109c8ba2c..1ea55fbd64 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -26,7 +26,7 @@
#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 */
#else
#include <locale.h>
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 1e387bcb91..515937b38b 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -271,11 +271,11 @@ gtk_plug_key_press_event (GtkWidget *widget,
gtk_window_set_focus (GTK_WINDOW (widget), NULL);
gdk_error_trap_push ();
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XSetInputFocus (GDK_DISPLAY (),
GDK_WINDOW_XWINDOW (plug->socket_window),
RevertToParent, event->time);
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
SetFocus (GDK_WINDOW_XWINDOW (plug->socket_window));
#endif
gdk_flush ();
@@ -296,7 +296,7 @@ gtk_plug_key_press_event (GtkWidget *widget,
static void
gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event)
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XEvent xevent;
xevent.xkey.type = KeyPress;
@@ -321,7 +321,7 @@ gtk_plug_forward_key_press (GtkPlug *plug, GdkEventKey *event)
False, NoEventMask, &xevent);
gdk_flush ();
gdk_error_trap_pop ();
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
/* This is pretty bogus, and not tested at all. */
WPARAM wParam;
LPARAM lParam;
@@ -568,7 +568,7 @@ gtk_plug_set_focus (GtkWindow *window,
if (focus && !GTK_WIDGET_HAS_FOCUS(window))
{
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
XEvent xevent;
xevent.xfocus.type = FocusIn;
@@ -583,7 +583,7 @@ gtk_plug_set_focus (GtkWindow *window,
False, NoEventMask, &xevent);
gdk_flush ();
gdk_error_trap_pop ();
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
/* XXX Not implemented */
#endif
}
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index 2ea620124e..9c4bcbe566 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -28,7 +28,7 @@
#include "gdkx.h"
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
#include <X11/Xlocale.h> /* so we get the right setlocale */
#else
#include <locale.h>
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index d4ac3fb9fe..8c3b2d3ad4 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -63,7 +63,7 @@
/* Maximum size of a sent chunk, in bytes. Also the default size of
our buffers */
-#if GDK_WINDOWING == GDK_WINDOWING_WIN32
+#ifdef GDK_WINDOWING_WIN32
/* No chunks on Win32 */
#define GTK_SELECTION_MAX_SIZE G_MAXINT
#else
diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c
index 6fe8bd7b59..9988948b91 100644
--- a/gtk/gtksocket.c
+++ b/gtk/gtksocket.c
@@ -32,7 +32,7 @@
#include "gtksocket.h"
#include "gtkdnd.h"
-#if GDK_WINDOWING == GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_X11
/* Forward declararations */
@@ -748,7 +748,7 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
return return_val;
}
-#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
+#elif defined (GDK_WINDOWING_WIN32)
guint
gtk_socket_get_type ()