Commit ef03cb52 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik
Browse files

s/refcount/ref_count/.

Sun Feb 13 08:54:45 2000  Tim Janik  <timj@gtk.org>

        * gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
        * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
        * gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
        * gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
        parameters given and cursor->ref_count. coding style fixups.

        * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
        not GtkWidget.

        * gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
        fix up widget macros and add _GET_CLASS() variant.

        * gtk/*.c: some GtkType fixups.
parent 196d4843
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
Sun Feb 13 08:54:45 2000 Tim Janik <timj@gtk.org>
* gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
* gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
* gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
parameters given and cursor->ref_count. coding style fixups.
* gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
not GtkWidget.
* gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
fix up widget macros and add _GET_CLASS() variant.
* gtk/*.c: some GtkType fixups.
2000-02-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkproperty-win32.c
......
......@@ -86,18 +86,18 @@ gint gdk_input_add (gint source,
gpointer data);
void gdk_input_remove (gint tag);
gint gdk_pointer_grab (GdkWindow * window,
gint gdk_pointer_grab (GdkWindow *window,
gint owner_events,
GdkEventMask event_mask,
GdkWindow * confine_to,
GdkCursor * cursor,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time);
void gdk_pointer_ungrab (guint32 time);
gint gdk_keyboard_grab (GdkWindow * window,
gint owner_events,
guint32 time);
void gdk_keyboard_ungrab (guint32 time);
gint gdk_keyboard_grab (GdkWindow *window,
gint owner_events,
guint32 time);
void gdk_keyboard_ungrab (guint32 time);
gint gdk_pointer_is_grabbed (void);
......
......@@ -30,7 +30,10 @@
GdkCursor*
gdk_cursor_ref (GdkCursor *cursor)
{
cursor->refcount += 1;
g_return_val_if_fail (cursor != NULL, NULL);
g_return_val_if_fail (cursor->ref_count > 0, NULL);
cursor->ref_count += 1;
return cursor;
}
......@@ -39,11 +42,11 @@ void
gdk_cursor_unref (GdkCursor *cursor)
{
g_return_if_fail (cursor != NULL);
g_return_if_fail (cursor->refcount > 0);
g_return_if_fail (cursor->ref_count > 0);
cursor->refcount -= 1;
cursor->ref_count -= 1;
if (cursor->refcount == 0)
_gdk_cursor_destroy(cursor);
if (cursor->ref_count == 0)
_gdk_cursor_destroy (cursor);
}
......@@ -19,12 +19,12 @@ typedef enum
struct _GdkCursor
{
GdkCursorType type;
guint refcount;
guint ref_count;
};
/* Cursors
*/
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
GdkPixmap *mask,
GdkColor *fg,
......
......@@ -48,14 +48,23 @@ gdk_cursor_new (GdkCursorType cursor_type)
}
GdkCursor*
gdk_cursor_new_from_pixmap (GdkPixmap *source, GdkPixmap *mask, GdkColor *fg, GdkColor *bg, gint x, gint y)
gdk_cursor_new_from_pixmap (GdkPixmap *source,
GdkPixmap *mask,
GdkColor *fg,
GdkColor *bg,
gint x,
gint y)
{
GdkCursorPrivate *private;
GdkCursor *cursor;
Pixmap source_pixmap, mask_pixmap;
Cursor xcursor;
XColor xfg, xbg;
g_return_val_if_fail (source != NULL, NULL);
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);
source_pixmap = GDK_DRAWABLE_XID (source);
mask_pixmap = GDK_DRAWABLE_XID (mask);
......@@ -84,6 +93,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
GdkCursorPrivate *private;
g_return_if_fail (cursor != NULL);
g_return_if_fail (cursor->ref_count == 0);
private = (GdkCursorPrivate *) cursor;
XFreeCursor (private->xdisplay, private->xcursor);
......
......@@ -78,7 +78,7 @@ gtk_accel_label_get_type (void)
(GtkClassInitFunc) NULL,
};
accel_label_type = gtk_type_unique (gtk_label_get_type (), &accel_label_info);
accel_label_type = gtk_type_unique (GTK_TYPE_LABEL, &accel_label_info);
}
return accel_label_type;
......@@ -98,7 +98,7 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
misc_class = (GtkMiscClass*) class;
label_class = (GtkLabelClass*) class;
parent_class = gtk_type_class (gtk_label_get_type ());
parent_class = gtk_type_class (GTK_TYPE_LABEL);
gtk_object_add_arg_type ("GtkAccelLabel::accel_widget", GTK_TYPE_WIDGET, GTK_ARG_READWRITE, ARG_ACCEL_WIDGET);
......
......@@ -44,6 +44,7 @@ extern "C" {
#define GTK_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
#define GTK_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ACCEL_LABEL))
#define GTK_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACCEL_LABEL))
#define GTK_ACCEL_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ACCEL_LABEL, GtkAccelLabelClass))
typedef struct _GtkAccelLabel GtkAccelLabel;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
#define GTK_IS_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
#define GTK_ADJUSTMENT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
typedef struct _GtkAdjustment GtkAdjustment;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ALIGNMENT, GtkAlignmentClass))
#define GTK_IS_ALIGNMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ALIGNMENT))
#define GTK_IS_ALIGNMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ALIGNMENT))
#define GTK_ALIGNMENT_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ALIGNMENT, GtkAlignmentClass))
typedef struct _GtkAlignment GtkAlignment;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_ARROW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ARROW, GtkArrowClass))
#define GTK_IS_ARROW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ARROW))
#define GTK_IS_ARROW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ARROW))
#define GTK_ARROW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ARROW, GtkArrowClass))
typedef struct _GtkArrow GtkArrow;
......
......@@ -42,7 +42,7 @@ extern "C" {
#define GTK_ASPECT_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASPECT_FRAME, GtkAspectFrameClass))
#define GTK_IS_ASPECT_FRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ASPECT_FRAME))
#define GTK_IS_ASPECT_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASPECT_FRAME))
#define GTK_ASPECT_FRAME_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ASPECT_FRAME, GtkAspectFrameClass))
typedef struct _GtkAspectFrame GtkAspectFrame;
......
......@@ -35,11 +35,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ())
#define GTK_BUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
#define GTK_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
#define GTK_IS_BUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
#define GTK_IS_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ())
#define GTK_BUTTON_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
#define GTK_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
#define GTK_IS_BUTTON_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
#define GTK_IS_BUTTON_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
#define GTK_BUTTON_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
#define GTK_BUTTONBOX_DEFAULT -1
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_BIN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BIN, GtkBinClass))
#define GTK_IS_BIN(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BIN))
#define GTK_IS_BIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BIN))
#define GTK_BIN_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BIN, GtkBinClass))
typedef struct _GtkBin GtkBin;
......
......@@ -37,11 +37,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_BOX (gtk_box_get_type ())
#define GTK_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BOX, GtkBox))
#define GTK_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX, GtkBoxClass))
#define GTK_IS_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BOX))
#define GTK_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX))
#define GTK_TYPE_BOX (gtk_box_get_type ())
#define GTK_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BOX, GtkBox))
#define GTK_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BOX, GtkBoxClass))
#define GTK_IS_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BOX))
#define GTK_IS_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BOX))
#define GTK_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BOX, GtkBoxClass))
typedef struct _GtkBox GtkBox;
......
Supports Markdown
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