Commit 518a8a9c authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

reimplemented the signal storage system to use a linear array rather than

Wed May  6 02:16:34 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c: reimplemented the signal storage system to use a
        linear array rather than a hash table.
        be carefull *not* to keep any GtkSignal pointers across invokations
        of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
        general code cleanups, made all allocations through memchunks.
        (gtk_signal_lookup): we now do the lookup of signals through a key_id
        for the signal names to avoid multiple hashing of the signal name on
        lookups for the several hirarchy levels of an object.

Tue May  5 15:33:27 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
        checking for signal initialization in gtksignal.c.

        * gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
        a long debugging period ;)

Mon May  4 00:30:11 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
        gtk_type_is_a().
        * gtk/gtktypeutils.c: reimplemented the type storage system to use a
        linear array rather than a hash table. it actually speeded up testgtk
        for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
        pointers across invokations of gtk_type_node_next_and_invalidate() and
        therefore gtk_type_unique()!

        * gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
        inheritance of a class pointer.
        (GTK_OBJECT): modifications for speedups.
        (GTK_IS_OBJECT): likewise.
        (GTK_OBJECT_CLASS): likewise.
        (suggested by owen).

        * gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.

        * gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.

        * gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
        since its derivation changed 4 month ago ;(. showed up with the unique
        type name checking code in gtk_type_unique().

        * random guint->GtkType and macro fixups.
parent c3e04d86
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c: reimplemented the signal storage system to use a
linear array rather than a hash table.
be carefull *not* to keep any GtkSignal pointers across invokations
of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
general code cleanups, made all allocations through memchunks.
(gtk_signal_lookup): we now do the lookup of signals through a key_id
for the signal names to avoid multiple hashing of the signal name on
lookups for the several hirarchy levels of an object.
Tue May 5 15:33:27 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
checking for signal initialization in gtksignal.c.
* gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
a long debugging period ;)
1998-05-05 Stefan Jeske <stefan@gtk.org>
* gdk/gdkgc.c gdk/gdk.h gtk/gtkctree.c (gdk_gc_set_dashes):
......@@ -8,6 +27,33 @@
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Mon May 4 00:30:11 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
gtk_type_is_a().
* gtk/gtktypeutils.c: reimplemented the type storage system to use a
linear array rather than a hash table. it actually speeded up testgtk
for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
pointers across invokations of gtk_type_node_next_and_invalidate() and
therefore gtk_type_unique()!
* gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
inheritance of a class pointer.
(GTK_OBJECT): modifications for speedups.
(GTK_IS_OBJECT): likewise.
(GTK_OBJECT_CLASS): likewise.
(suggested by owen).
* gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.
* gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.
* gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
since its derivation changed 4 month ago ;(. showed up with the unique
type name checking code in gtk_type_unique().
* random guint->GtkType and macro fixups.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
......@@ -138,7 +184,6 @@ Sat May 2 20:19:03 1998 Tim Janik <timj@gtk.org>
(gtk_adjustment_set_value): new function to emit the "value_changed"
signal.
>>>>>>> 1.372
Fri May 1 12:28:35 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcombo.c: Further changes to the way the window
......
......@@ -1094,7 +1094,7 @@
;; Tooltips
(define-boxed GtkTooltips
(define-object GtkTooltips
gtk_tooltips_ref
gtk_tooltips_unref)
......
......@@ -37,10 +37,10 @@ static void gtk_aspect_frame_size_allocate (GtkWidget *widget,
#define MAX_RATIO 10000.0
#define MIN_RATIO 0.0001
guint
GtkType
gtk_aspect_frame_get_type (void)
{
static guint aspect_frame_type = 0;
static GtkType aspect_frame_type = 0;
if (!aspect_frame_type)
{
......
......@@ -26,12 +26,16 @@
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
#define GTK_ASPECT_FRAME(obj) ((GtkAspectFrame*) obj)
#define GTK_ASPECT_FRAME_CLASS(obj) ((GtkAspectFrameClass*) GTK_OBJECT_CLASS (obj))
#define GTK_IS_ASPECT_FRAME(obj) (gtk_type_is_a (GTK_WIDGET_TYPE (obj), gtk_aspect_frame_get_type ()))
#define GTK_TYPE_ASPECT_FRAME (gtk_aspect_frame_get_type ())
#define GTK_ASPECT_FRAME(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ASPECT_FRAME, GtkAspectFrame))
#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))
typedef struct _GtkAspectFrame GtkAspectFrame;
......@@ -55,7 +59,7 @@ struct _GtkAspectFrameClass
};
guint gtk_aspect_frame_get_type (void);
GtkType gtk_aspect_frame_get_type (void);
GtkWidget* gtk_aspect_frame_new (const gchar *label,
gfloat xalign,
gfloat yalign,
......
......@@ -93,10 +93,10 @@ static GtkContainerClass *parent_class;
static guint button_signals[LAST_SIGNAL] = { 0 };
guint
GtkType
gtk_button_get_type (void)
{
static guint button_type = 0;
static GtkType button_type = 0;
if (!button_type)
{
......
......@@ -26,12 +26,14 @@
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
#define GTK_BUTTON(obj) (GTK_CHECK_CAST ((obj), gtk_button_get_type (), GtkButton))
#define GTK_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_button_get_type (), GtkButtonClass))
#define GTK_IS_BUTTON(obj) (GTK_CHECK_TYPE ((obj), gtk_button_get_type ()))
#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))
typedef struct _GtkButton GtkButton;
......@@ -59,7 +61,7 @@ struct _GtkButtonClass
};
guint gtk_button_get_type (void);
GtkType gtk_button_get_type (void);
GtkWidget* gtk_button_new (void);
GtkWidget* gtk_button_new_with_label (const gchar *label);
void gtk_button_pressed (GtkButton *button);
......
......@@ -47,10 +47,10 @@ static GtkMenuItemClass *parent_class = NULL;
static guint check_menu_item_signals[LAST_SIGNAL] = { 0 };
guint
GtkType
gtk_check_menu_item_get_type (void)
{
static guint check_menu_item_type = 0;
static GtkType check_menu_item_type = 0;
if (!check_menu_item_type)
{
......
......@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
......@@ -26,12 +26,15 @@
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
#define GTK_CHECK_MENU_ITEM(obj) ((GtkCheckMenuItem*) obj)
#define GTK_CHECK_MENU_ITEM_CLASS(obj) ((GtkCheckMenuItemClass*) GTK_OBJECT_CLASS (obj))
#define GTK_IS_CHECK_MENU_ITEM(obj) (gtk_type_is_a (GTK_WIDGET_TYPE (obj), gtk_check_menu_item_get_type ()))
#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_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHECK_MENU_ITEM))
typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
......@@ -40,7 +43,7 @@ typedef struct _GtkCheckMenuItemClass GtkCheckMenuItemClass;
struct _GtkCheckMenuItem
{
GtkMenuItem menu_item;
guint active : 1;
guint always_show_toggle : 1;
};
......@@ -48,21 +51,21 @@ struct _GtkCheckMenuItem
struct _GtkCheckMenuItemClass
{
GtkMenuItemClass parent_class;
void (* toggled) (GtkCheckMenuItem *check_menu_item);
void (* toggled) (GtkCheckMenuItem *check_menu_item);
void (* draw_indicator) (GtkCheckMenuItem *check_menu_item,
GdkRectangle *area);
GdkRectangle *area);
};
guint gtk_check_menu_item_get_type (void);
GtkWidget* gtk_check_menu_item_new (void);
GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label);
void gtk_check_menu_item_set_state (GtkCheckMenuItem *check_menu_item,
gint state);
GtkType gtk_check_menu_item_get_type (void);
GtkWidget* gtk_check_menu_item_new (void);
GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label);
void gtk_check_menu_item_set_state (GtkCheckMenuItem *check_menu_item,
gint state);
void gtk_check_menu_item_set_show_toggle(GtkCheckMenuItem *menu_item,
gboolean always);
void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item);
gboolean always);
void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item);
#ifdef __cplusplus
......
......@@ -32,11 +32,12 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), gtk_container_get_type (), GtkContainer))
#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_container_get_type (), GtkContainerClass))
#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), gtk_container_get_type ()))
#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_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CONTAINER))
#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
typedef struct _GtkContainer GtkContainer;
typedef struct _GtkContainerClass GtkContainerClass;
......
......@@ -32,10 +32,10 @@ static void gtk_data_class_init (GtkDataClass *klass);
static guint data_signals[LAST_SIGNAL] = { 0 };
guint
GtkType
gtk_data_get_type (void)
{
static guint data_type = 0;
static GtkType data_type = 0;
if (!data_type)
{
......
......@@ -26,12 +26,16 @@
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
#define GTK_DATA(obj) GTK_CHECK_CAST (obj, gtk_data_get_type (), GtkData)
#define GTK_DATA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_data_get_type (), GtkDataClass)
#define GTK_IS_DATA(obj) GTK_CHECK_TYPE (obj, gtk_data_get_type ())
#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))
typedef struct _GtkData GtkData;
......@@ -50,7 +54,7 @@ struct _GtkDataClass
};
guint gtk_data_get_type (void);
GtkType gtk_data_get_type (void);
#ifdef __cplusplus
......
......@@ -327,7 +327,7 @@ gtk_init (int *argc,
* C locale, or were using X's mb functions. (-DX_LOCALE && locale != C)
*/
current_locale = g_strdup(setlocale (LC_CTYPE, NULL));
current_locale = g_strdup (setlocale (LC_CTYPE, NULL));
#ifdef X_LOCALE
if ((strcmp (current_locale, "C")) && (strcmp (current_locale, "POSIX")))
......@@ -342,7 +342,7 @@ gtk_init (int *argc,
g_free (current_locale);
GTK_NOTE(MISC, g_print("%s multi-byte string functions.\n",
GTK_NOTE (MISC, g_print("%s multi-byte string functions.\n",
gtk_use_mb ? "Using" : "Not using"));
/* Initialize the default visual and colormap to be
......@@ -351,9 +351,11 @@ gtk_init (int *argc,
*/
gtk_visual = gdk_visual_get_system ();
gtk_colormap = gdk_colormap_get_system ();
gtk_type_init ();
gtk_signal_init ();
gtk_rc_init ();
gtk_type_init ();
/* Register an exit function to make sure we are able to cleanup.
*/
......
......@@ -640,7 +640,7 @@ gtk_object_getv (GtkObject *object,
g_free (lookup_name);
continue;
}
else if (!gtk_type_is_a (object->klass->type, info->class_type))
else if (!GTK_TYPE_IS_A (object->klass->type, info->class_type))
{
g_warning ("invalid arg for %s: \"%s\"\n", gtk_type_name (object->klass->type), lookup_name);
args[i].type = GTK_TYPE_INVALID;
......@@ -704,7 +704,7 @@ gtk_object_query_args (GtkType class_type,
*arg_flags = NULL;
g_return_val_if_fail (nargs != NULL, NULL);
*nargs = 0;
g_return_val_if_fail (gtk_type_is_a (class_type, gtk_object_get_type ()), NULL);
g_return_val_if_fail (GTK_TYPE_IS_A (class_type, gtk_object_get_type ()), NULL);
if (!arg_info_ht)
return NULL;
......@@ -844,7 +844,7 @@ gtk_object_setv (GtkObject *object,
g_warning ("invalid arg type for: \"%s\"\n", lookup_name);
arg_ok = FALSE;
}
else if (!gtk_type_is_a (object->klass->type, info->class_type))
else if (!GTK_TYPE_IS_A (object->klass->type, info->class_type))
{
g_warning ("invalid arg for %s: \"%s\"\n", gtk_type_name (object->klass->type), lookup_name);
arg_ok = FALSE;
......@@ -1270,7 +1270,7 @@ gtk_object_check_cast (GtkObject *obj,
gtk_object_descriptive_type_name (cast_type));
return obj;
}
if (!gtk_type_is_a (obj->klass->type, cast_type))
if (!GTK_TYPE_IS_A (obj->klass->type, cast_type))
{
g_warning ("invalid cast from `%s' to `%s'",
gtk_object_descriptive_type_name (obj->klass->type),
......@@ -1306,7 +1306,7 @@ gtk_object_check_class_cast (GtkObjectClass *klass,
gtk_object_descriptive_type_name (cast_type));
return klass;
}
if (!gtk_type_is_a (klass->type, cast_type))
if (!GTK_TYPE_IS_A (klass->type, cast_type))
{
g_warning ("invalid class cast from `%s' to `%s'",
gtk_object_descriptive_type_name (klass->type),
......
......@@ -27,6 +27,7 @@
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
......@@ -51,18 +52,43 @@ extern "C" {
#endif /* GTK_NO_CHECK_CASTS */
/* Determines whether 'obj' is a type of 'otype'.
/* Determines whether `obj' and `klass' are a type of `otype'.
*/