Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gxkradget.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __GXK_RADGET_H__
3 #define __GXK_RADGET_H__
4 
5 #include "gxkutils.hh"
6 
7 /* --- structures --- */
8 #define GXK_RADGET G_OBJECT
9 #define GXK_IS_RADGET G_IS_OBJECT
10 typedef void GxkRadget;
11 typedef struct _GxkRadgetArgs GxkRadgetArgs;
12 
13 
14 /* --- radget args (aggregation of (name, value) pairs) --- */
15 GxkRadgetArgs* gxk_radget_args (const gchar *name1,
16  ...);
17 GxkRadgetArgs* gxk_radget_args_valist (const gchar *name1,
18  va_list var_args);
19 GxkRadgetArgs* gxk_radget_const_args (void); /* based on intern_string values */
20 GxkRadgetArgs* gxk_radget_args_set (GxkRadgetArgs *args,
21  const gchar *name,
22  const gchar *value);
23 const gchar* gxk_radget_args_get (const GxkRadgetArgs *args,
24  const gchar *name);
25 GxkRadgetArgs* gxk_radget_args_merge (GxkRadgetArgs *dest,
26  const GxkRadgetArgs *source);
27 void gxk_radget_free_args (GxkRadgetArgs *args);
28 
29 
30 /* --- radget functions --- */
31 GxkRadget* gxk_radget_create (const gchar *domain_name,
32  const gchar *name,
33  const gchar *var1,
34  ...);
35 GxkRadget* gxk_radget_complete (GxkRadget *radget,
36  const gchar *domain_name,
37  const gchar *name,
38  const gchar *var1,
39  ...);
40 GxkRadget* gxk_radget_creator (GxkRadget *radget,
41  const gchar *domain_name,
42  const gchar *name,
43  GxkRadget *parent,
44  GSList *call_args, /* const GxkRadgetArgs* */
45  GSList *env_args); /* const GxkRadgetArgs* */
46 const gchar* gxk_radget_get_domain (GxkRadget *radget);
47 void gxk_radget_parse (const gchar *domain_name,
48  const gchar *file_name,
49  const gchar *i18n_domain,
50  GError **error);
51 void gxk_radget_parse_text (const gchar *domain_name,
52  const gchar *text,
53  gint text_len,
54  const gchar *i18n_domain,
55  GError **error);
56 gpointer gxk_radget_find (GxkRadget *radget,
57  const gchar *name);
58 gpointer gxk_radget_find_area (GxkRadget *radget,
59  const gchar *area);
60 void gxk_radget_add (GxkRadget *radget,
61  const gchar *area,
62  gpointer widget);
63 void gxk_radget_sensitize (GxkRadget *radget,
64  const gchar *name,
65  gboolean sensitive);
66 
67 
68 /* --- radget types --- */
69 typedef struct GxkRadgetData GxkRadgetData;
70 typedef struct {
71  GParamSpec* (*find_prop) (GTypeClass *klass,
72  const gchar *construct_param_name);
73  GxkRadget* (*create) (GType type,
74  const gchar *name,
75  guint n_construct_params,
76  GParameter *construct_params,
77  GxkRadgetData *gdgdata);
78  void (*set_prop) (GxkRadget *radget,
79  const gchar *prop_name,
80  const GValue *value);
81  gboolean (*adopt) (GxkRadget *radget,
82  GxkRadget *parent,
83  GxkRadgetData *gdgdata);
84  GParamSpec* (*find_pack) (GxkRadget *radget,
85  const gchar *pack_name);
86  void (*set_pack) (GxkRadget *radget,
87  const gchar *pack_name,
88  const GValue *value);
90 void gxk_radget_define_widget_type (GType type);
91 void gxk_radget_define_type (GType type,
92  const GxkRadgetType *ggtype);
93 gboolean gxk_radget_type_lookup (GType type,
94  GxkRadgetType *ggtype);
95 typedef void (*GxkRadgetHook) (GxkRadget *radget,
96  guint property_id,
97  const GValue *value,
98  GParamSpec *pspec);
99 void gxk_radget_register_hook (GParamSpec *pspec,
100  guint property_id,
101  GxkRadgetHook hook_func);
102 GxkRadgetArgs* gxk_radget_data_copy_call_args (GxkRadgetData *gdgdata);
103 GxkRadget* gxk_radget_data_get_scope_radget (GxkRadgetData *gdgdata);
104 gchar* gxk_radget_data_dup_expand (GxkRadgetData *gdgdata,
105  const gchar *expression);
106 
107 #endif /* __GXK_RADGET_H__ */
void gxk_radget_parse(const gchar *domain_name, const gchar *file_name, const gchar *i18n_domain, GError **error)
Definition: gxkradget.cc:925
Definition: gxkradget.hh:70
GxkRadget * gxk_radget_create(const gchar *domain_name, const gchar *name, const gchar *var1,...)
Definition: gxkradget.cc:1675
GxkRadget * gxk_radget_complete(GxkRadget *radget, const gchar *domain_name, const gchar *name, const gchar *var1,...)
Definition: gxkradget.cc:1704
const gchar * gxk_radget_get_domain(GxkRadget *radget)
Definition: gxkradget.cc:1730
gpointer gxk_radget_find_area(GxkRadget *radget, const gchar *area)
Definition: gxkradget.cc:1797
gpointer gxk_radget_find(GxkRadget *radget, const gchar *name)
Definition: gxkradget.cc:1765
void gxk_radget_parse_text(const gchar *domain_name, const gchar *text, gint text_len, const gchar *i18n_domain, GError **error)
Definition: gxkradget.cc:960
void gxk_radget_add(GxkRadget *radget, const gchar *area, gpointer widget)
Definition: gxkradget.cc:1821