Commit 3f376d75 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

We no longer need to create the signals here ... they come from the

Sat Nov 17 19:08:13 2001  Owen Taylor  <otaylor@redhat.com>

	* tests/testtreeview.c (gtk_tree_model_types_get_type):
	We no longer need to create the signals here ... they
	come from the interface.

	* gtk/maketypes.awk: Use GType, not GtkType in output.

	* gtk/gtktypeutils.h: Mark virtually all of this
	file deprecated.

	* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
	the only use of this function is the GtkArg using
	GtkCallbackMarshal, since destroy notification is
	silly here.
parent a036c6e5
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
* tests/testtreeview.c (gtk_tree_model_types_get_type):
We no longer need to create the signals here ... they
come from the interface.
* gtk/maketypes.awk: Use GType, not GtkType in output.
* gtk/gtktypeutils.h: Mark virtually all of this
file deprecated.
* gtk/gtkcontainer.h: Deprecate gtk_container_foreach_full;
the only use of this function is the GtkArg using
GtkCallbackMarshal, since destroy notification is
silly here.
Sat Nov 17 18:26:45 2001 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
......
......@@ -118,11 +118,13 @@ void gtk_container_check_resize (GtkContainer *container);
void gtk_container_foreach (GtkContainer *container,
GtkCallback callback,
gpointer callback_data);
#ifndef GTK_DISABLE_DEPRECATED
void gtk_container_foreach_full (GtkContainer *container,
GtkCallback callback,
GtkCallbackMarshal marshal,
gpointer callback_data,
GtkDestroyNotify notify);
#endif /* GTK_DISABLE_DEPRECATED */
GList* gtk_container_get_children (GtkContainer *container);
#ifndef GTK_DISABLE_DEPRECATED
......
......@@ -31,10 +31,9 @@
#include <glib-object.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
G_BEGIN_DECLS
#ifndef GTK_DISABLE_DEPRECATED
/* Fundamental Types
* many of these are just aliases for GLib types to maintain
......@@ -62,49 +61,49 @@ typedef enum /*< skip >*/
GTK_TYPE_POINTER = G_TYPE_POINTER
} GtkFundamentalType;
/* --- type macros --- */
#define GTK_CLASS_NAME(class) (g_type_name (G_TYPE_FROM_CLASS (class)))
#define GTK_CLASS_TYPE(class) (G_TYPE_FROM_CLASS (class))
#define GTK_TYPE_IS_OBJECT(type) (g_type_is_a ((type), GTK_TYPE_OBJECT))
/* outdated macros that really shouldn't e used anymore,
* use the GLib type system instead
*/
#ifndef GTK_DISABLE_DEPRECATED
#define GTK_TYPE_FUNDAMENTAL_LAST (G_TYPE_LAST_RESERVED_FUNDAMENTAL - 1)
#define GTK_TYPE_FUNDAMENTAL_MAX (G_TYPE_FUNDAMENTAL_MAX)
#define GTK_FUNDAMENTAL_TYPE G_TYPE_FUNDAMENTAL
#define GTK_STRUCT_OFFSET G_STRUCT_OFFSET
#endif /* GTK_DISABLE_DEPRECATED */
/* glib macro wrappers (compatibility) */
#define GTK_STRUCT_OFFSET G_STRUCT_OFFSET
#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
#define GTK_CHECK_CLASS_CAST G_TYPE_CHECK_CLASS_CAST
#define GTK_CHECK_GET_CLASS G_TYPE_INSTANCE_GET_CLASS
#define GTK_CHECK_TYPE G_TYPE_CHECK_INSTANCE_TYPE
#define GTK_CHECK_CLASS_TYPE G_TYPE_CHECK_CLASS_TYPE
#define GTK_FUNDAMENTAL_TYPE G_TYPE_FUNDAMENTAL
/* glib type wrappers (compatibility) */
typedef GType GtkType;
#ifndef GTK_DISABLE_DEPRECATED
typedef GTypeInstance GtkTypeObject;
typedef GTypeClass GtkTypeClass;
typedef GBaseInitFunc GtkClassInitFunc;
typedef GInstanceInitFunc GtkObjectInitFunc;
#endif /* GTK_DISABLE_DEPRECATED */
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_END_DECLS
/* Builtin Types
*/
#include <gtk/gtktypebuiltins.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
G_BEGIN_DECLS
/* --- typedefs --- */
......@@ -113,7 +112,6 @@ extern "C" {
*/
typedef struct _GtkArg GtkArg;
typedef struct _GtkObject GtkObject; /* object forward declaration */
typedef struct _GtkTypeInfo GtkTypeInfo;
typedef gboolean (*GtkFunction) (gpointer data);
typedef void (*GtkDestroyNotify) (gpointer data);
typedef void (*GtkCallbackMarshal) (GtkObject *object,
......@@ -121,9 +119,11 @@ typedef void (*GtkCallbackMarshal) (GtkObject *object,
guint n_args,
GtkArg *args);
typedef void (*GtkSignalFunc) (void);
typedef GSignalCMarshaller GtkSignalMarshaller;
#define GTK_SIGNAL_FUNC(f) ((GtkSignalFunc) (f))
#ifndef GTK_DISABLE_DEPRECATED
typedef struct _GtkTypeInfo GtkTypeInfo;
typedef GSignalCMarshaller GtkSignalMarshaller;
/* GtkArg, used to hold differently typed values */
struct _GtkArg
......@@ -217,15 +217,16 @@ struct _GtkTypeInfo
gpointer reserved_2;
GtkClassInitFunc base_class_init_func;
};
GtkType gtk_type_unique (GtkType parent_type,
const GtkTypeInfo *gtkinfo);
gpointer gtk_type_class (GtkType type);
gpointer gtk_type_new (GtkType type);
#endif /* GTK_DISABLE_DEPRECATED */
/* deprecated, use g_type_init() instead */
void gtk_type_init (GTypeDebugFlags debug_flags);
gpointer gtk_type_class (GtkType type);
#ifndef GTK_DISABLE_DEPRECATED
GtkType gtk_type_unique (GtkType parent_type,
const GtkTypeInfo *gtkinfo);
gpointer gtk_type_new (GtkType type);
/* --- compatibility defines --- */
#define gtk_type_name(type) g_type_name (type)
......@@ -233,6 +234,8 @@ void gtk_type_init (GTypeDebugFlags debug_flags);
#define gtk_type_parent(type) g_type_parent (type)
#define gtk_type_is_a(type, is_a_type) g_type_is_a ((type), (is_a_type))
/* deprecated, use g_type_init() instead */
void gtk_type_init (GTypeDebugFlags debug_flags);
/* enum/flags compatibility functions, we strongly
* recommend to use the glib enum/flags classes directly
......@@ -259,10 +262,8 @@ GtkFlagValue* gtk_type_flags_find_value (GtkType flags_type,
/* urg */
GTKTYPEUTILS_VAR GType GTK_TYPE_IDENTIFIER;
#endif /* GTK_DISABLE_DEPRECATED */
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_END_DECLS
#endif /* __GTK_TYPE_UTILS_H__ */
......@@ -75,7 +75,7 @@ function generate (generate_what)
{
if (gen_macros)
{
printf ("GTKTYPEBUILTINS_VAR GtkType %s;\n", type_macro);
printf ("GTKTYPEBUILTINS_VAR GType %s;\n", type_macro);
}
if (gen_entries)
{
......@@ -87,7 +87,7 @@ function generate (generate_what)
}
if (gen_vars)
{
printf ("GTKTYPEBUILTINS_VAR GtkType %s = 0;\n", type_macro);
printf ("GTKTYPEBUILTINS_VAR GType %s = 0;\n", type_macro);
}
}
......
......@@ -767,17 +767,7 @@ main (int argc,
* GtkTreeModelTypes
*/
enum {
CHANGED,
INSERTED,
CHILD_TOGGLED,
DELETED,
LAST_SIGNAL
};
static void gtk_tree_model_types_init (GtkTreeModelTypes *model_types);
static void gtk_tree_model_types_class_init (GtkTreeModelTypesClass *class);
static void gtk_tree_model_types_tree_model_init (GtkTreeModelIface *iface);
static gint gtk_real_model_types_get_n_columns (GtkTreeModel *tree_model);
static GType gtk_real_model_types_get_column_type (GtkTreeModel *tree_model,
......@@ -806,9 +796,6 @@ static gboolean gtk_real_model_types_iter_parent (GtkTreeModel *t
GtkTreeIter *child);
static guint model_types_signals[LAST_SIGNAL] = { 0 };
GtkType
gtk_tree_model_types_get_type (void)
{
......@@ -821,7 +808,7 @@ gtk_tree_model_types_get_type (void)
sizeof (GtkTreeModelTypesClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_tree_model_types_class_init,
NULL, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkTreeModelTypes),
......@@ -855,54 +842,6 @@ gtk_tree_model_types_new (void)
return retval;
}
static void
gtk_tree_model_types_class_init (GtkTreeModelTypesClass *class)
{
GObjectClass *object_class;
object_class = (GObjectClass*) class;
model_types_signals[CHANGED] =
g_signal_new ("changed",
GTK_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
GTK_SIGNAL_OFFSET (GtkTreeModelTypesClass, changed),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_POINTER);
model_types_signals[INSERTED] =
g_signal_new ("inserted",
GTK_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
GTK_SIGNAL_OFFSET (GtkTreeModelTypesClass, inserted),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_POINTER);
model_types_signals[CHILD_TOGGLED] =
g_signal_new ("child_toggled",
GTK_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
GTK_SIGNAL_OFFSET (GtkTreeModelTypesClass, child_toggled),
NULL, NULL,
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_POINTER);
model_types_signals[DELETED] =
g_signal_new ("deleted",
GTK_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
GTK_SIGNAL_OFFSET (GtkTreeModelTypesClass, deleted),
NULL, NULL,
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
}
static void
gtk_tree_model_types_tree_model_init (GtkTreeModelIface *iface)
{
......
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