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

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;
......
......@@ -37,11 +37,12 @@
extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_BUTTON (gtk_button_get_type ())
#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass))
#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON))
#define GTK_IS_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON))
#define GTK_TYPE_BUTTON (gtk_button_get_type ())
#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON, GtkButtonClass))
#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_BUTTON))
#define GTK_IS_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON))
#define GTK_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_BUTTON, GtkButtonClass))
typedef struct _GtkButton GtkButton;
......
......@@ -39,11 +39,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_CALENDAR (gtk_calendar_get_type ())
#define GTK_CALENDAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CALENDAR, GtkCalendar))
#define GTK_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CALENDAR, GtkCalendarClass))
#define GTK_IS_CALENDAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CALENDAR))
#define GTK_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CALENDAR))
#define GTK_TYPE_CALENDAR (gtk_calendar_get_type ())
#define GTK_CALENDAR(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CALENDAR, GtkCalendar))
#define GTK_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CALENDAR, GtkCalendarClass))
#define GTK_IS_CALENDAR(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CALENDAR))
#define GTK_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CALENDAR))
#define GTK_CALENDAR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CALENDAR, GtkCalendarClass))
typedef struct _GtkCalendar GtkCalendar;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
#define GTK_IS_CHECK_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_BUTTON))
#define GTK_IS_CHECK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_BUTTON))
#define GTK_CHECK_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CHECK_BUTTON, GtkCheckButtonClass))
typedef struct _GtkCheckButton GtkCheckButton;
......
......@@ -37,11 +37,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_CHECK_MENU_ITEM (gtk_check_menu_item_get_type ())
#define GTK_CHECK_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItem))
#define GTK_TYPE_CHECK_MENU_ITEM (gtk_check_menu_item_get_type ())
#define GTK_CHECK_MENU_ITEM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItem))
#define GTK_CHECK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItemClass))
#define GTK_IS_CHECK_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_MENU_ITEM))
#define GTK_IS_CHECK_MENU_ITEM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CHECK_MENU_ITEM))
#define GTK_IS_CHECK_MENU_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_MENU_ITEM))
#define GTK_CHECK_MENU_ITEM_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CHECK_MENU_ITEM, GtkCheckMenuItemClass))
typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
......
......@@ -87,6 +87,8 @@ typedef enum
#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST))
#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
#define GTK_CLIST_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CLIST, GtkCListClass))
#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags)
#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag))
......
......@@ -55,12 +55,15 @@ extern "C" {
#define GTK_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
#define GTK_IS_COLOR_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION))
#define GTK_IS_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION))
#define GTK_COLOR_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
#define GTK_TYPE_COLOR_SELECTION_DIALOG (gtk_color_selection_dialog_get_type ())
#define GTK_COLOR_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialog))
#define GTK_COLOR_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialogClass))
#define GTK_IS_COLOR_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG))
#define GTK_IS_COLOR_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION_DIALOG))
#define GTK_COLOR_SELECTION_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION_DIALOG, GtkColorSelectionDialogClass))
typedef struct _GtkColorSelection GtkColorSelection;
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
......
......@@ -100,7 +100,7 @@ gtk_combo_class_init (GtkComboClass * klass)
GtkObjectClass *oclass;
GtkWidgetClass *widget_class;
parent_class = gtk_type_class (gtk_hbox_get_type ());
parent_class = gtk_type_class (GTK_TYPE_HBOX);
oclass = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
......@@ -757,15 +757,15 @@ gtk_combo_get_type (void)
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
combo_type = gtk_type_unique (gtk_hbox_get_type (), &combo_info);
combo_type = gtk_type_unique (GTK_TYPE_HBOX, &combo_info);
}
return combo_type;
}
GtkWidget *
GtkWidget*
gtk_combo_new (void)
{
return GTK_WIDGET (gtk_type_new (gtk_combo_get_type ()));
return GTK_WIDGET (gtk_type_new (GTK_TYPE_COMBO));
}
void
......
......@@ -34,11 +34,15 @@
extern "C" {
#endif /* __cplusplus */
#define GTK_COMBO(obj) GTK_CHECK_CAST (obj, gtk_combo_get_type (), GtkCombo)
#define GTK_COMBO_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_combo_get_type (), GtkComboClass)
#define GTK_IS_COMBO(obj) GTK_CHECK_TYPE (obj, gtk_combo_get_type ())
#define GTK_TYPE_COMBO (gtk_combo_get_type ())
#define GTK_COMBO(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COMBO, GtkCombo))
#define GTK_COMBO_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COMBO, GtkComboClass))
#define GTK_IS_COMBO(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COMBO))
#define GTK_IS_COMBO_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COMBO))
#define GTK_COMBO_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COMBO, GtkComboClass))
typedef struct _GtkCombo GtkCombo;
typedef struct _GtkCombo GtkCombo;
typedef struct _GtkComboClass GtkComboClass;
/* you should access only the entry and list fields directly */
......@@ -69,7 +73,7 @@ struct _GtkComboClass {
GtkType gtk_combo_get_type (void);
GtkWidget *gtk_combo_new (void);
GtkWidget* gtk_combo_new (void);
/* the text in the entry must be or not be in the list */
void gtk_combo_set_value_in_list (GtkCombo* combo,
gint val,
......
......@@ -39,11 +39,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CONTAINER, GtkContainer))
#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CONTAINER, GtkContainerClass))
#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CONTAINER))
#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CONTAINER))
#define GTK_IS_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER))
#define GTK_CONTAINER_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CONTAINER, GtkContainerClass))
#define GTK_IS_RESIZE_CONTAINER(widget) (GTK_IS_CONTAINER (widget) && ((GtkContainer*) (widget))->resize_mode != GTK_RESIZE_PARENT)
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_CTREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CTREE, GtkCTreeClass))
#define GTK_IS_CTREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CTREE))
#define GTK_IS_CTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CTREE))
#define GTK_CTREE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CTREE, GtkCTreeClass))
#define GTK_CTREE_ROW(_node_) ((GtkCTreeRow *)(((GList *)(_node_))->data))
#define GTK_CTREE_NODE(_node_) ((GtkCTreeNode *)((_node_)))
......
......@@ -41,6 +41,7 @@ extern "C" {
#define GTK_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CURVE, GtkCurveClass))
#define GTK_IS_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CURVE))
#define GTK_IS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CURVE))
#define GTK_CURVE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_CURVE, GtkCurveClass))
typedef struct _GtkCurve GtkCurve;
......
......@@ -37,12 +37,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_DATA (gtk_data_get_type ())
#define GTK_DATA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DATA, GtkData))
#define GTK_DATA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA, GtkDataClass))
#define GTK_IS_DATA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DATA))
#define GTK_TYPE_DATA (gtk_data_get_type ())
#define GTK_DATA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DATA, GtkData))
#define GTK_DATA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATA, GtkDataClass))
#define GTK_IS_DATA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DATA))
#define GTK_IS_DATA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA))
#define GTK_DATA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DATA, GtkDataClass))
typedef struct _GtkData GtkData;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DIALOG, GtkDialogClass))
#define GTK_IS_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DIALOG))
#define GTK_IS_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DIALOG))
#define GTK_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DIALOG, GtkDialogClass))
typedef struct _GtkDialog GtkDialog;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
#define GTK_DRAWING_AREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
typedef struct _GtkDrawingArea GtkDrawingArea;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EDITABLE, GtkEditableClass))
#define GTK_IS_EDITABLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EDITABLE))
#define GTK_IS_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EDITABLE))
#define GTK_EDITABLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_EDITABLE, GtkEditableClass))
typedef struct _GtkEditable GtkEditable;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY, GtkEntryClass))
#define GTK_IS_ENTRY(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ENTRY))
#define GTK_IS_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY))
#define GTK_ENTRY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ENTRY, GtkEntryClass))
typedef struct _GtkEntry GtkEntry;
......
......@@ -37,11 +37,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ())
#define GTK_EVENT_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
#define GTK_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
#define GTK_IS_EVENT_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EVENT_BOX))
#define GTK_IS_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ())
#define GTK_EVENT_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
#define GTK_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
#define GTK_IS_EVENT_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EVENT_BOX))
#define GTK_IS_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
#define GTK_EVENT_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
typedef struct _GtkEventBox GtkEventBox;
......
......@@ -2123,14 +2123,12 @@ open_new_dir(gchar* dir_name, struct stat* sbuf, gboolean stat_subdirs)
{
CompletionDirSent* sent;
DIR* directory;
gchar *buffer_ptr;
struct dirent *dirent_ptr;
gint entry_count = 0;
gint i;
struct stat ent_sbuf;
GString *path;
gchar *xdir, *xname;
int entry_len;
gchar *xdir;
sent = g_new(CompletionDirSent, 1);
sent->mtime = sbuf->st_mtime;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
#define GTK_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FILE_SELECTION))
#define GTK_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_SELECTION))
#define GTK_FILE_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
typedef struct _GtkFileSelection GtkFileSelection;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_FIXED_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FIXED, GtkFixedClass))
#define GTK_IS_FIXED(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FIXED))
#define GTK_IS_FIXED_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FIXED))
#define GTK_FIXED_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FIXED, GtkFixedClass))
typedef struct _GtkFixed GtkFixed;
......
......@@ -41,17 +41,21 @@
extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_FONT_SELECTION (gtk_font_selection_get_type ())
#define GTK_FONT_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelection))
#define GTK_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
#define GTK_IS_FONT_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION))
#define GTK_TYPE_FONT_SELECTION (gtk_font_selection_get_type ())
#define GTK_FONT_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelection))
#define GTK_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
#define GTK_IS_FONT_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION))
#define GTK_IS_FONT_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION))
#define GTK_FONT_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FONT_SELECTION, GtkFontSelectionClass))
#define GTK_TYPE_FONT_SELECTION_DIALOG (gtk_font_selection_dialog_get_type ())
#define GTK_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialog))
#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
#define GTK_IS_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION_DIALOG))
#define GTK_TYPE_FONT_SELECTION_DIALOG (gtk_font_selection_dialog_get_type ())
#define GTK_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialog))
#define GTK_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
#define GTK_IS_FONT_SELECTION_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FONT_SELECTION_DIALOG))
#define GTK_IS_FONT_SELECTION_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FONT_SELECTION_DIALOG))
#define GTK_FONT_SELECTION_DIALOG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FONT_SELECTION_DIALOG, GtkFontSelectionDialogClass))
typedef struct _GtkFontSelection GtkFontSelection;
typedef struct _GtkFontSelectionClass GtkFontSelectionClass;
......
......@@ -42,6 +42,7 @@ extern "C" {
#define GTK_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FRAME, GtkFrameClass))
#define GTK_IS_FRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FRAME))
#define GTK_IS_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FRAME))
#define GTK_FRAME_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_FRAME, GtkFrameClass))
typedef struct _GtkFrame GtkFrame;
......
......@@ -215,7 +215,7 @@ GtkType
gtk_gamma_curve_get_type (void)
{
static GtkType gamma_curve_type = 0;
if (!gamma_curve_type)
{
static const GtkTypeInfo gamma_curve_info =
......@@ -229,9 +229,8 @@ gtk_gamma_curve_get_type (void)
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
gamma_curve_type =
gtk_type_unique (gtk_vbox_get_type (), &gamma_curve_info);
gamma_curve_type = gtk_type_unique (GTK_TYPE_VBOX, &gamma_curve_info);
}
return gamma_curve_type;
}
......@@ -241,7 +240,7 @@ gtk_gamma_curve_class_init (GtkGammaCurveClass *class)
{
GtkObjectClass *object_class;
parent_class = gtk_type_class (gtk_vbox_get_type ());
parent_class = gtk_type_class (GTK_TYPE_VBOX);
object_class = (GtkObjectClass *) class;
object_class->destroy = gtk_gamma_curve_destroy;
......@@ -458,7 +457,7 @@ curve_type_changed_callback (GtkWidget *w, gpointer data)
GtkWidget*
gtk_gamma_curve_new (void)
{
return gtk_type_new (gtk_gamma_curve_get_type ());
return gtk_type_new (GTK_TYPE_GAMMA_CURVE);
}
static void
......
......@@ -37,12 +37,12 @@ extern "C" {