forked from AuroraMiddleware/gtk
use gdk_cursor_unref instead of destroy
2000-01-30 Havoc Pennington <hp@pobox.com> * gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of destroy * gdk/gdkimage.c (gdk_image_ref): image wasn't being returned * gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then implemented in platform-specific code * gdk/Makefile.am (gdk_c_sources): add gdkcursor.c * gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an underscore in front * gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy): put an underscore in front * gdk/gdkcursor.c: new file, implements gdk_cursor_ref/gdk_cursor_unref * gdk/gdkcursor.h: Refcount GdkCursor * gdk/gdkcompat.h (gdk_cursor_destroy): compat
This commit is contained in:
parent
7d39971922
commit
4d48b106f0
25
ChangeLog
25
ChangeLog
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
2000-01-30 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* gtk/testgtk.c (set_cursor): use gdk_cursor_unref instead of
|
||||||
|
destroy
|
||||||
|
|
||||||
|
* gdk/gdkimage.c (gdk_image_ref): image wasn't being returned
|
||||||
|
|
||||||
|
* gdk/gdkprivate.h: declare _gdk_cursor_destroy which is then
|
||||||
|
implemented in platform-specific code
|
||||||
|
|
||||||
|
* gdk/Makefile.am (gdk_c_sources): add gdkcursor.c
|
||||||
|
|
||||||
|
* gdk/x11/gdkcursor-x11.c (gdk_cursor_destroy): rename with an
|
||||||
|
underscore in front
|
||||||
|
|
||||||
|
* gdk/win32/gdkcursor-win32.c (gdk_cursor_destroy):
|
||||||
|
put an underscore in front
|
||||||
|
|
||||||
|
* gdk/gdkcursor.c: new file, implements
|
||||||
|
gdk_cursor_ref/gdk_cursor_unref
|
||||||
|
|
||||||
|
* gdk/gdkcursor.h: Refcount GdkCursor
|
||||||
|
|
||||||
|
* gdk/gdkcompat.h (gdk_cursor_destroy): compat
|
||||||
|
|
||||||
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
2000-01-29 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/gdkwindow.h
|
* gdk/gdkwindow.h
|
||||||
|
@ -76,6 +76,7 @@ gdk_public_h_sources = @STRIP_BEGIN@ \
|
|||||||
gdk_c_sources = @STRIP_BEGIN@ \
|
gdk_c_sources = @STRIP_BEGIN@ \
|
||||||
gdk.c \
|
gdk.c \
|
||||||
gdkcolor.c \
|
gdkcolor.c \
|
||||||
|
gdkcursor.c \
|
||||||
gdkdraw.c \
|
gdkdraw.c \
|
||||||
gdkevents.c \
|
gdkevents.c \
|
||||||
gdkfont.c \
|
gdkfont.c \
|
||||||
|
@ -34,6 +34,8 @@ extern "C" {
|
|||||||
|
|
||||||
#define gdk_gc_destroy gdk_gc_unref
|
#define gdk_gc_destroy gdk_gc_unref
|
||||||
#define gdk_image_destroy gdk_image_unref
|
#define gdk_image_destroy gdk_image_unref
|
||||||
|
#define gdk_cursor_destroy gdk_cursor_unref
|
||||||
|
|
||||||
|
|
||||||
#define GDK_WINDOW_PIXMAP GDK_DRAWABLE_PIXMAP
|
#define GDK_WINDOW_PIXMAP GDK_DRAWABLE_PIXMAP
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ typedef enum
|
|||||||
struct _GdkCursor
|
struct _GdkCursor
|
||||||
{
|
{
|
||||||
GdkCursorType type;
|
GdkCursorType type;
|
||||||
|
guint refcount;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Cursors
|
/* Cursors
|
||||||
@ -30,7 +31,8 @@ GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
|||||||
GdkColor *bg,
|
GdkColor *bg,
|
||||||
gint x,
|
gint x,
|
||||||
gint y);
|
gint y);
|
||||||
void gdk_cursor_destroy (GdkCursor *cursor);
|
GdkCursor* gdk_cursor_ref (GdkCursor *cursor);
|
||||||
|
void gdk_cursor_unref (GdkCursor *cursor);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,8 @@ gdk_image_ref (GdkImage *image)
|
|||||||
g_return_val_if_fail (image != NULL, NULL);
|
g_return_val_if_fail (image != NULL, NULL);
|
||||||
|
|
||||||
private->ref_count++;
|
private->ref_count++;
|
||||||
|
|
||||||
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -262,6 +262,8 @@ void _gdk_font_destroy (GdkFont *font);
|
|||||||
|
|
||||||
void _gdk_colormap_real_destroy (GdkColormap *colormap);
|
void _gdk_colormap_real_destroy (GdkColormap *colormap);
|
||||||
|
|
||||||
|
void _gdk_cursor_destroy (GdkCursor *cursor);
|
||||||
|
|
||||||
/* Initialization */
|
/* Initialization */
|
||||||
|
|
||||||
extern GdkArgDesc _gdk_windowing_args[];
|
extern GdkArgDesc _gdk_windowing_args[];
|
||||||
|
@ -255,7 +255,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_cursor_destroy (GdkCursor *cursor)
|
_gdk_cursor_destroy (GdkCursor *cursor)
|
||||||
{
|
{
|
||||||
GdkCursorPrivate *private;
|
GdkCursorPrivate *private;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source, GdkPixmap *mask, GdkColor *fg, Gd
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gdk_cursor_destroy (GdkCursor *cursor)
|
_gdk_cursor_destroy (GdkCursor *cursor)
|
||||||
{
|
{
|
||||||
GdkCursorPrivate *private;
|
GdkCursorPrivate *private;
|
||||||
|
|
||||||
|
@ -3270,7 +3270,7 @@ set_cursor (GtkWidget *spinner,
|
|||||||
|
|
||||||
cursor = gdk_cursor_new (c);
|
cursor = gdk_cursor_new (c);
|
||||||
gdk_window_set_cursor (widget->window, cursor);
|
gdk_window_set_cursor (widget->window, cursor);
|
||||||
gdk_cursor_destroy (cursor);
|
gdk_cursor_unref (cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
@ -3270,7 +3270,7 @@ set_cursor (GtkWidget *spinner,
|
|||||||
|
|
||||||
cursor = gdk_cursor_new (c);
|
cursor = gdk_cursor_new (c);
|
||||||
gdk_window_set_cursor (widget->window, cursor);
|
gdk_window_set_cursor (widget->window, cursor);
|
||||||
gdk_cursor_destroy (cursor);
|
gdk_cursor_unref (cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
Loading…
Reference in New Issue
Block a user