1 | /* GTK - The GIMP Toolkit |
---|
2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
---|
3 | * |
---|
4 | * This library is free software; you can redistribute it and/or |
---|
5 | * modify it under the terms of the GNU Library General Public |
---|
6 | * License as published by the Free Software Foundation; either |
---|
7 | * version 2 of the License, or (at your option) any later version. |
---|
8 | * |
---|
9 | * This library is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
12 | * Library General Public License for more details. |
---|
13 | * |
---|
14 | * You should have received a copy of the GNU Library General Public |
---|
15 | * License along with this library; if not, write to the |
---|
16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
17 | * Boston, MA 02111-1307, USA. |
---|
18 | */ |
---|
19 | |
---|
20 | /* |
---|
21 | * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS |
---|
22 | * file for a list of people on the GTK+ Team. See the ChangeLog |
---|
23 | * files for a list of changes. These files are distributed with |
---|
24 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
---|
25 | */ |
---|
26 | |
---|
27 | #ifndef __GTK_ARG_H__ |
---|
28 | #define __GTK_ARG_H__ |
---|
29 | |
---|
30 | |
---|
31 | #include <gtk/gtktypeutils.h> |
---|
32 | |
---|
33 | |
---|
34 | #ifdef __cplusplus |
---|
35 | extern "C" { |
---|
36 | #endif /* __cplusplus */ |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | |
---|
41 | typedef struct _GtkArgInfo GtkArgInfo; |
---|
42 | |
---|
43 | struct _GtkArgInfo |
---|
44 | { |
---|
45 | /* hash key portion */ |
---|
46 | GtkType class_type; |
---|
47 | gchar *name; |
---|
48 | |
---|
49 | GtkType type; |
---|
50 | guint arg_flags; |
---|
51 | gchar *full_name; |
---|
52 | |
---|
53 | /* private fields */ |
---|
54 | guint arg_id; |
---|
55 | guint seq_id; |
---|
56 | }; |
---|
57 | |
---|
58 | |
---|
59 | /* Non-public methods */ |
---|
60 | |
---|
61 | GtkArg* gtk_arg_new (GtkType arg_type); |
---|
62 | GtkArg* gtk_arg_copy (GtkArg *src_arg, |
---|
63 | GtkArg *dest_arg); |
---|
64 | void gtk_arg_free (GtkArg *arg, |
---|
65 | gboolean free_contents); |
---|
66 | void gtk_arg_reset (GtkArg *arg); |
---|
67 | gboolean gtk_arg_values_equal (const GtkArg *arg1, |
---|
68 | const GtkArg *arg2); |
---|
69 | gchar* gtk_args_collect (GtkType object_type, |
---|
70 | GHashTable *arg_info_hash_table, |
---|
71 | GSList **arg_list_p, |
---|
72 | GSList **info_list_p, |
---|
73 | const gchar *first_arg_name, |
---|
74 | va_list var_args); |
---|
75 | void gtk_args_collect_cleanup (GSList *arg_list, |
---|
76 | GSList *info_list); |
---|
77 | gchar* gtk_arg_get_info (GtkType object_type, |
---|
78 | GHashTable *arg_info_hash_table, |
---|
79 | const gchar *arg_name, |
---|
80 | GtkArgInfo **info_p); |
---|
81 | GtkArgInfo* gtk_arg_type_new_static (GtkType base_class_type, |
---|
82 | const gchar *arg_name, |
---|
83 | guint class_n_args_offset, |
---|
84 | GHashTable *arg_info_hash_table, |
---|
85 | GtkType arg_type, |
---|
86 | guint arg_flags, |
---|
87 | guint arg_id); |
---|
88 | GtkArg* gtk_args_query (GtkType class_type, |
---|
89 | GHashTable *arg_info_hash_table, |
---|
90 | guint32 **arg_flags, |
---|
91 | guint *n_args_p); |
---|
92 | gchar* gtk_arg_name_strip_type (const gchar *arg_name); |
---|
93 | gint gtk_arg_info_equal (gconstpointer arg_info_1, |
---|
94 | gconstpointer arg_info_2); |
---|
95 | guint gtk_arg_info_hash (gconstpointer arg_info); |
---|
96 | void gtk_arg_to_valueloc (GtkArg *arg, |
---|
97 | gpointer value_pointer); |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | #ifdef __cplusplus |
---|
103 | } |
---|
104 | #endif /* __cplusplus */ |
---|
105 | |
---|
106 | |
---|
107 | #endif /* __GTK_ARG_H__ */ |
---|