summaryrefslogtreecommitdiff
path: root/gdk/gdkvisual.h
diff options
context:
space:
mode:
authorAlex Larsson <alexl@redhat.com>2001-06-30 02:56:50 +0000
committerAlexander Larsson <alexl@src.gnome.org>2001-06-30 02:56:50 +0000
commit43696e841d807d9dba7b50314517069634d4cba2 (patch)
tree3418f45d3bc7bdcc326cdf5b64cb08a34dca7933 /gdk/gdkvisual.h
parentee5ff7ddc23a90018b35102ac87e6ac41928da10 (diff)
downloadgdk-pixbuf-43696e841d807d9dba7b50314517069634d4cba2.tar.gz
Convert GdkVisual to a GObject.
2001-06-29 Alex Larsson <alexl@redhat.com> * gdk/gdkvisual.h: * gdk/gdkcolor.c: * gdk/x11/gdkx.h: * gdk/x11/gdkvisual-x11.c: Convert GdkVisual to a GObject. * gdk/gdkinput.h: * gdk/gdkevents.c: * gdk/x11/gdkinputprivate.h: * gdk/x11/gdkinput-gxi.c: * gdk/x11/gdkinput-none.c: * gdk/x11/gdkinput-x11.c: * gdk/x11/gdkinput-xfree.c: * gdk/x11/gdkinput.c: Convert GdkDevice to a GObject.
Diffstat (limited to 'gdk/gdkvisual.h')
-rw-r--r--gdk/gdkvisual.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/gdk/gdkvisual.h b/gdk/gdkvisual.h
index f9ae20c1b..bcae03b43 100644
--- a/gdk/gdkvisual.h
+++ b/gdk/gdkvisual.h
@@ -7,7 +7,14 @@
extern "C" {
#endif /* __cplusplus */
-#define GDK_TYPE_VISUAL gdk_visual_get_type ()
+#define GDK_TYPE_VISUAL (gdk_visual_get_type ())
+#define GDK_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_VISUAL, GdkVisual))
+#define GDK_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_VISUAL, GdkVisualClass))
+#define GDK_IS_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_VISUAL))
+#define GDK_IS_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_VISUAL))
+#define GDK_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_VISUAL, GdkVisualClass))
+
+typedef struct _GdkVisualClass GdkVisualClass;
/* Types of visuals.
* StaticGray:
@@ -41,6 +48,8 @@ typedef enum
*/
struct _GdkVisual
{
+ GObject parent_instance;
+
GdkVisualType type;
gint depth;
GdkByteOrder byte_order;
@@ -71,9 +80,10 @@ GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
GdkVisual* gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type);
-/* Actually, these are no-ops... */
-GdkVisual* gdk_visual_ref (GdkVisual *visual);
-void gdk_visual_unref (GdkVisual *visual);
+#ifndef GTK_DISABLE_DEPRECATED
+#define gdk_visual_ref(v) g_object_ref(v)
+#define gdk_visual_unref(v) g_object_unref(v)
+#endif
void gdk_query_depths (gint **depths,
gint *count);