+Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
+ + * gtk/gtktypeutils.h (gtk_type_get_arg): new function. + * gtk/gtkobject.h (gtk_object_query_args): new function. + * gtk/gtkobject.h (gtk_object_getv): new function. + * gtk/gtkwidget.h (gtk_widget_get): new function.
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -1,3 +1,10 @@
|
||||
Sat Jan 17 06:24:05 1998 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtktypeutils.h (gtk_type_get_arg): new function.
|
||||
* gtk/gtkobject.h (gtk_object_query_args): new function.
|
||||
* gtk/gtkobject.h (gtk_object_getv): new function.
|
||||
* gtk/gtkwidget.h (gtk_widget_get): new function.
|
||||
|
||||
Fri Jan 16 00:36:31 1998 Federico Mena <federico@bananoid.nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkhandlebox.c: Now we use a GtkWindow of type
|
||||
|
@ -371,6 +371,88 @@ gtk_object_getv (GtkObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* gtk_object_query_args:
|
||||
*
|
||||
* arguments:
|
||||
*
|
||||
* results:
|
||||
*****************************************/
|
||||
|
||||
struct _GtkQueryArgData
|
||||
{
|
||||
GList *arg_list;
|
||||
GtkType class_type;
|
||||
};
|
||||
typedef struct _GtkQueryArgData GtkQueryArgData;
|
||||
|
||||
static void
|
||||
gtk_query_arg_foreach (gpointer key,
|
||||
gpointer value,
|
||||
gpointer user_data)
|
||||
{
|
||||
register GtkArgInfo *info;
|
||||
register GtkQueryArgData *data;
|
||||
|
||||
info = value;
|
||||
data = user_data;
|
||||
|
||||
if (info->class_type == data->class_type)
|
||||
data->arg_list = g_list_prepend (data->arg_list, info);
|
||||
}
|
||||
|
||||
GtkArg*
|
||||
gtk_object_query_args (GtkType class_type,
|
||||
guint *nargs)
|
||||
{
|
||||
GtkArg *args;
|
||||
GtkQueryArgData query_data;
|
||||
|
||||
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);
|
||||
|
||||
if (!arg_info_ht)
|
||||
return NULL;
|
||||
|
||||
query_data.arg_list = NULL;
|
||||
query_data.class_type = class_type;
|
||||
g_hash_table_foreach (arg_info_ht, gtk_query_arg_foreach, &query_data);
|
||||
|
||||
if (query_data.arg_list)
|
||||
{
|
||||
register GList *list;
|
||||
register guint i;
|
||||
|
||||
list = query_data.arg_list;
|
||||
|
||||
i = g_list_length (list);
|
||||
args = g_new0 (GtkArg, i);
|
||||
*nargs = i;
|
||||
|
||||
do
|
||||
{
|
||||
GtkArgInfo *info;
|
||||
|
||||
i--;
|
||||
info = list->data;
|
||||
list = list->next;
|
||||
|
||||
args[i].type = info->type;
|
||||
args[i].name = info->name;
|
||||
}
|
||||
while (i > 0);
|
||||
|
||||
g_assert (list == NULL); /* paranoid */
|
||||
|
||||
g_list_free (query_data.arg_list);
|
||||
}
|
||||
else
|
||||
args = NULL;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* gtk_object_set:
|
||||
*
|
||||
|
@ -135,7 +135,7 @@ struct _GtkObjectClass
|
||||
/* The type identifier for the objects class. There is
|
||||
* one unique identifier per class.
|
||||
*/
|
||||
guint type;
|
||||
GtkType type;
|
||||
|
||||
/* The signals this object class handles. "signals" is an
|
||||
* array of signal ID's.
|
||||
@ -199,6 +199,15 @@ void gtk_object_setv (GtkObject *object,
|
||||
guint nargs,
|
||||
GtkArg *args);
|
||||
|
||||
/* Allocate a GtkArg array of size nargs that hold the
|
||||
* names and types of the args that can be used with
|
||||
* gtk_object_set/gtk_object_get.
|
||||
* It is the callers response to do a
|
||||
* g_free (returned_args).
|
||||
*/
|
||||
GtkArg* gtk_object_query_args (GtkType class_type,
|
||||
guint *nargs);
|
||||
|
||||
void gtk_object_add_arg_type (const gchar *arg_name,
|
||||
GtkType arg_type,
|
||||
guint arg_id);
|
||||
|
Reference in New Issue
Block a user