Commit 101d4488 authored by Matthias Clasen's avatar Matthias Clasen

Deprecate.

        * gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
        gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
        gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
        gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref):  Deprecate.

        * gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
        GTK_DISABLE_DEPRECATED.

        * gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
        gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.

        * gdk/tmpl/colors.sgml, gdk/tmpl/pixmaps.sgml, gdk/tmpl/dnd.sgml,
        gdk/tmpl/gcs.sgml: Document ref and unref functions as deprecated.
parent d2b64a0b
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
Fri Nov 30 16:37:01 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
......
2001-11-30 Matthias Clasen <matthiasc@poet.de>
* gdk/tmpl/colors.sgml, gdk/tmpl/pixmaps.sgml, gdk/tmpl/dnd.sgml,
gdk/tmpl/gcs.sgml: Document ref and unref functions as deprecated.
2001-11-29 Matthias Clasen <matthiasc@poet.de>
* gtk/gtk-sections.sgml: Add GtkTextChildAnchor.
......
......@@ -127,20 +127,19 @@ Create a new colormap for the given visual.
<!-- ##### FUNCTION gdk_colormap_ref ##### -->
<para>
Increase the reference count of a colormap.
</para>
@cmap: a #GdkColormap.
@Returns: @cmap
@cmap:
@Returns:
<!-- ##### FUNCTION gdk_colormap_unref ##### -->
<para>
Decrease the reference count of a colormap. If the
resulting reference count is zero, destroys the colormap.
</para>
@cmap: a #GdkColormap.
@cmap:
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
......
......@@ -82,7 +82,7 @@ Creates a new #GdkDragContext.
<!-- ##### FUNCTION gdk_drag_context_ref ##### -->
<para>
Increases the reference count of a drag context by one.
Deprecated function; use g_object_ref() instead.
</para>
@context: a #GdkDragContext.
......@@ -154,7 +154,7 @@ which DND is done.
<!-- ##### FUNCTION gdk_drag_context_unref ##### -->
<para>
Decreases the reference count of a drag context by one.
Deprecated function; use g_object_unref() instead.
</para>
@context: a #GdkDragContext.
......
......@@ -152,21 +152,19 @@ Create a new GC with the given initial values.
<!-- ##### FUNCTION gdk_gc_ref ##### -->
<para>
Increase the reference count on a graphics context.
</para>
@gc: a #GdkGC.
@Returns: @gc.
@gc:
@Returns:
<!-- ##### FUNCTION gdk_gc_unref ##### -->
<para>
Decrease the reference count on a graphics context. If
the resulting reference count is zero, the graphics
context will be destroyed.
</para>
@gc: a #GdkGC.
@gc:
<!-- ##### MACRO gdk_gc_destroy ##### -->
......
......@@ -149,7 +149,7 @@ in which case a default color will be used.
<!-- ##### MACRO gdk_pixmap_ref ##### -->
<para>
Increase the reference count of a pixmap.
Deprecated equivalent of g_object_ref().
</para>
@pixmap: a #GdkPixmap
......@@ -158,8 +158,7 @@ Increase the reference count of a pixmap.
<!-- ##### MACRO gdk_pixmap_unref ##### -->
<para>
Decrease the reference count of a pixmap. If the resulting
reference count is zero, destroy the pixmap.
Deprecated equivalent of g_object_unref().
</para>
@pixmap: a #GdkPixmap
......@@ -177,8 +176,7 @@ refers generically to any of these types.
<!-- ##### MACRO gdk_bitmap_ref ##### -->
<para>
Increase the reference count of a bitmap. An alias
for gdk_pixmap_ref().
Deprecated equivalent of g_object_ref().
</para>
@Returns: @pixmap
......@@ -187,8 +185,7 @@ for gdk_pixmap_ref().
<!-- ##### MACRO gdk_bitmap_unref ##### -->
<para>
Decrease the reference count of a bitmap. An alias
for gdk_pixmap_unref().
Deprecated equivalent of g_object_unref().
</para>
@pixmap: a #GdkBitmap
......
......@@ -29,12 +29,28 @@
#include "gdkcolor.h"
#include "gdkinternals.h"
/**
* gdk_colormap_ref:
* @image: a #GdkColormap
*
* Deprecated function; use g_object_ref() instead.
*
* Return value: the colormap
**/
GdkColormap*
gdk_colormap_ref (GdkColormap *cmap)
{
return (GdkColormap *) g_object_ref (G_OBJECT (cmap));
}
/**
* gdk_colormap_unref:
* @image: a #GdkColormap
*
* Deprecated function; use g_object_ref() instead.
*
* Return value: the colormap
**/
void
gdk_colormap_unref (GdkColormap *cmap)
{
......
......@@ -60,13 +60,16 @@ GType gdk_colormap_get_type (void) G_GNUC_CONST;
GdkColormap* gdk_colormap_new (GdkVisual *visual,
gboolean allocate);
#ifndef GDK_DISABLE_DEPRECATED
GdkColormap* gdk_colormap_ref (GdkColormap *cmap);
void gdk_colormap_unref (GdkColormap *cmap);
#endif
GdkColormap* gdk_colormap_get_system (void);
#ifndef GDK_DISABLE_DEPRECATED
gint gdk_colormap_get_system_size (void);
#endif
#endif
void gdk_colormap_change (GdkColormap *colormap,
gint ncolors);
......
......@@ -78,8 +78,11 @@ struct _GdkDragContextClass {
GType gdk_drag_context_get_type (void) G_GNUC_CONST;
GdkDragContext * gdk_drag_context_new (void);
#ifndef GDK_DISABLE_DEPRECATED
void gdk_drag_context_ref (GdkDragContext *context);
void gdk_drag_context_unref (GdkDragContext *context);
#endif
/* Destination side */
......
......@@ -161,8 +161,11 @@ void gdk_drawable_set_colormap (GdkDrawable *drawable,
GdkColormap* gdk_drawable_get_colormap (GdkDrawable *drawable);
GdkVisual* gdk_drawable_get_visual (GdkDrawable *drawable);
gint gdk_drawable_get_depth (GdkDrawable *drawable);
#ifndef GDK_DISABLE_DEPRECATED
GdkDrawable* gdk_drawable_ref (GdkDrawable *drawable);
void gdk_drawable_unref (GdkDrawable *drawable);
#endif /* GDK_DISABLE_DEPRECATED */
/* Drawing
*/
......
......@@ -122,12 +122,28 @@ gdk_gc_finalize (GObject *object)
parent_class->finalize (object);
}
/**
* gdk_gc_ref:
* @gc: a #GdkGC
*
* Deprecated function; use g_object_ref() instead.
*
* Return value: the gc.
**/
GdkGC *
gdk_gc_ref (GdkGC *gc)
{
return (GdkGC *) g_object_ref (G_OBJECT (gc));
}
/**
* gdk_gc_unref:
* @gc: a #GdkGC
*
* Deprecated function; use g_object_unref() instead.
*
* Return value: the gc.
**/
void
gdk_gc_unref (GdkGC *gc)
{
......
......@@ -191,8 +191,12 @@ GdkGC *gdk_gc_new (GdkDrawable *drawable);
GdkGC *gdk_gc_new_with_values (GdkDrawable *drawable,
GdkGCValues *values,
GdkGCValuesMask values_mask);
#ifndef GDK_DISABLE_DEPRECATED
GdkGC *gdk_gc_ref (GdkGC *gc);
void gdk_gc_unref (GdkGC *gc);
#endif
void gdk_gc_get_values (GdkGC *gc,
GdkGCValues *values);
void gdk_gc_set_values (GdkGC *gc,
......
......@@ -80,7 +80,7 @@ GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
GdkVisual* gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type);
#ifndef GTK_DISABLE_DEPRECATED
#ifndef GDK_DISABLE_DEPRECATED
#define gdk_visual_ref(v) g_object_ref(v)
#define gdk_visual_unref(v) g_object_unref(v)
#endif
......
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