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.
This commit is contained in:
Owen Taylor 1999-09-29 23:47:22 +00:00 committed by Owen Taylor
parent f73d6ee34a
commit 41be586333
20 changed files with 78 additions and 57 deletions

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -1,3 +1,8 @@
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 ]
Wed Sep 8 07:13:29 1999 Tim Janik <timj@gtk.org>

View File

@ -593,7 +593,7 @@ esac
],[
# Currently we always use X11 on those systems where we run configure...
gdk_windowing='
#define GDK_WINDOWING GDK_WINDOWING_X11'
#define GDK_WINDOWING_X11'
if test x$gdk_wchar_h = xyes; then
gdk_wc='
#define GDK_HAVE_WCHAR_H 1'

View File

@ -464,7 +464,7 @@ GdkPixmap* gdk_pixmap_new (GdkWindow *window,
gint width,
gint height,
gint depth);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32
#ifdef GDK_WINDOWING_WIN32
GdkPixmap* gdk_pixmap_create_on_shared_image
(GdkImage **image_return,
GdkWindow *window,
@ -521,7 +521,7 @@ GdkImage* gdk_image_new (GdkImageType type,
GdkVisual *visual,
gint width,
gint height);
#if GDK_WINDOWING == GDK_WINDOWING_WIN32
#ifdef GDK_WINDOWING_WIN32
GdkImage* gdk_image_bitmap_new(GdkImageType type,
GdkVisual *visual,
gint width,

View File

@ -2681,9 +2681,9 @@ gdk_rgb_select_conv (GdkImage *image)
gboolean mask_rgb, mask_bgr;
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;
#elif GDK_WINDOWING == GDK_WINDOWING_WIN32
#elif defined (GDK_WINDOWING_WIN32)
bpp = ((GdkVisualPrivate *) gdk_visual_get_system())->xvisual->bitspixel;
#endif

View File

@ -49,20 +49,6 @@
*/
#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 */
#define GDK_NONE 0L
#define GDK_CURRENT_TIME 0L

View File

@ -1,6 +1,6 @@
/* Handcrafted for Win32 */
#define GDK_WINDOWING GDK_WINDOWING_WIN32
#define GDK_WINDOWING_WIN32
#define GDK_HAVE_WCHAR_H 1
#ifdef _MSC_VER
#define GDK_HAVE_WCTYPE_H 1

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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