summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-07-31 20:12:01 +0000
committerDarin Adler <darin@src.gnome.org>2001-07-31 20:12:01 +0000
commit6fe3d87b10596806abadffadde6a3e91edd98fe4 (patch)
treeb32f727affc06f99e4142385ec5d3c6578af225c /gdk
parent3538aeef4348babc22805cdd7aa4eb32271ead8e (diff)
downloadgtk+-6fe3d87b10596806abadffadde6a3e91edd98fe4.tar.gz
Put all mentions of GdkFont inside #ifndef GDK_DISABLE_DEPRECATED.
* gdk/gdkprivate.h: * gdk/x11/gdkx.h: Put all mentions of GdkFont inside #ifndef GDK_DISABLE_DEPRECATED. * demos/gtk-demo/menus.c: (do_menus): Cast to G_OBJECT, not GTK_OBJECT.
Diffstat (limited to 'gdk')
-rw-r--r--gdk/gdkprivate.h27
-rw-r--r--gdk/x11/gdkx.h41
2 files changed, 37 insertions, 31 deletions
diff --git a/gdk/gdkprivate.h b/gdk/gdkprivate.h
index c8799541c0..1bc8cc8626 100644
--- a/gdk/gdkprivate.h
+++ b/gdk/gdkprivate.h
@@ -36,9 +36,7 @@
#include <gdk/gdkvisual.h>
#include <gdk/gdkwindow.h>
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
#define GDK_PARENT_RELATIVE_BG ((GdkPixmap *)1L)
#define GDK_NO_BG ((GdkPixmap *)2L)
@@ -47,16 +45,9 @@ extern "C" {
#define GDK_WINDOW_DESTROYED(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->destroyed)
typedef struct _GdkColorInfo GdkColorInfo;
-typedef struct _GdkFontPrivate GdkFontPrivate;
typedef struct _GdkEventFilter GdkEventFilter;
typedef struct _GdkClientFilter GdkClientFilter;
-struct _GdkFontPrivate
-{
- GdkFont font;
- guint ref_count;
-};
-
typedef enum {
GDK_COLOR_WRITEABLE = 1 << 0
} GdkColorInfoFlags;
@@ -84,14 +75,18 @@ GDKVAR GdkWindow *gdk_parent_root;
GDKVAR gint gdk_error_code;
GDKVAR gint gdk_error_warnings;
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GDK_PRIVATE_H__ */
+#ifndef GDK_DISABLE_DEPRECATED
+typedef struct _GdkFontPrivate GdkFontPrivate;
+struct _GdkFontPrivate
+{
+ GdkFont font;
+ guint ref_count;
+};
+#endif /* GDK_DISABLE_DEPRECATED */
+G_END_DECLS
+#endif /* __GDK_PRIVATE_H__ */
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 40b8b954c0..fdb3848fd5 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -36,9 +36,10 @@
#include <gdk/x11/gdkwindow-x11.h>
#include <gdk/x11/gdkpixmap-x11.h>
+G_BEGIN_DECLS
+
typedef struct _GdkColormapPrivateX11 GdkColormapPrivateX11;
typedef struct _GdkCursorPrivate GdkCursorPrivate;
-typedef struct _GdkFontPrivateX GdkFontPrivateX;
typedef struct _GdkImagePrivateX11 GdkImagePrivateX11;
typedef struct _GdkVisualPrivate GdkVisualPrivate;
@@ -49,17 +50,6 @@ struct _GdkCursorPrivate
Display *xdisplay;
};
-struct _GdkFontPrivateX
-{
- GdkFontPrivate base;
- /* XFontStruct *xfont; */
- /* generic pointer point to XFontStruct or XFontSet */
- gpointer xfont;
- Display *xdisplay;
-
- GSList *names;
-};
-
struct _GdkVisualPrivate
{
GdkVisual visual;
@@ -139,8 +129,6 @@ GType gdk_gc_x11_get_type (void);
#define GDK_COLORMAP_XDISPLAY(cmap) (((GdkColormapPrivateX11 *)GDK_COLORMAP (cmap)->windowing_data)->xdisplay)
#define GDK_COLORMAP_XCOLORMAP(cmap) (((GdkColormapPrivateX11 *)GDK_COLORMAP (cmap)->windowing_data)->xcolormap)
#define GDK_VISUAL_XVISUAL(vis) (((GdkVisualPrivate *) vis)->xvisual)
-#define GDK_FONT_XDISPLAY(font) (((GdkFontPrivate *) font)->xdisplay)
-#define GDK_FONT_XFONT(font) (((GdkFontPrivateX *)font)->xfont)
#define GDK_GC_XGC(gc) (GDK_GC_X11(gc)->xgc)
#define GDK_GC_GET_XGC(gc) (GDK_GC_X11(gc)->dirty_mask ? _gdk_x11_gc_flush (gc) : GDK_GC_XGC (gc))
@@ -186,8 +174,31 @@ void gdk_x11_ungrab_server (void);
#define gdk_window_lookup(xid) ((GdkWindow*) gdk_xid_table_lookup (xid))
#define gdk_pixmap_lookup(xid) ((GdkPixmap*) gdk_xid_table_lookup (xid))
-#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
GC _gdk_x11_gc_flush (GdkGC *gc);
+#ifndef GDK_DISABLE_DEPRECATED
+
+typedef struct _GdkFontPrivateX GdkFontPrivateX;
+
+struct _GdkFontPrivateX
+{
+ GdkFontPrivate base;
+ /* XFontStruct *xfont; */
+ /* generic pointer point to XFontStruct or XFontSet */
+ gpointer xfont;
+ Display *xdisplay;
+
+ GSList *names;
+};
+
+#define GDK_FONT_XDISPLAY(font) (((GdkFontPrivate *) font)->xdisplay)
+#define GDK_FONT_XFONT(font) (((GdkFontPrivateX *)font)->xfont)
+
+#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
+
+#endif /* GDK_DISABLE_DEPRECATED */
+
+G_END_DECLS
+
#endif /* __GDK_X_H__ */