Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gxkassortment.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_ASSORTMENT_H__
3 #define __GXK_ASSORTMENT_H__
4 
5 #include "gxkutils.hh"
6 
7 #define GXK_ASSORTMENT_PRIORITY (G_PRIORITY_HIGH - 10)
8 
9 /* --- assortment --- */
10 #define GXK_TYPE_ASSORTMENT_ENTRY (gxk_assortment_entry_get_type ())
11 #define GXK_TYPE_ASSORTMENT (gxk_assortment_get_type ())
12 #define GXK_ASSORTMENT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GXK_TYPE_ASSORTMENT, GxkAssortment))
13 #define GXK_ASSORTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXK_TYPE_ASSORTMENT, GxkAssortmentClass))
14 #define GXK_IS_ASSORTMENT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GXK_TYPE_ASSORTMENT))
15 #define GXK_IS_ASSORTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXK_TYPE_ASSORTMENT))
16 #define GXK_ASSORTMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GXK_TYPE_ASSORTMENT, GxkAssortmentClass))
17 typedef struct GxkAssortment GxkAssortment;
18 typedef void (*GxkAssortmentDelete) (gpointer user_data,
19  GObject *object,
20  gpointer owner);
21 typedef struct {
22  gchar *label;
23  gchar *stock_icon; /* stock_id for the icon or NULL */
24  gchar *tooltip;
25  gpointer user_data;
26  gpointer owner;
27  GObject *object;
28  GxkAssortmentDelete free_func;
29  guint ref_count;
32 {
33  GObject parent_instance;
34  gchar *publishing_name;
35  GSList *entries;
36  GxkAssortmentEntry *selected;
37  guint block_count;
38 };
39 typedef struct {
40  GObjectClass parent_class;
41  void (*entry_added) (GxkAssortment *self,
42  GxkAssortmentEntry *entry);
43  void (*entry_changed) (GxkAssortment *self,
44  GxkAssortmentEntry *entry);
45  void (*entry_remove) (GxkAssortment *self,
46  GxkAssortmentEntry *entry);
47  void (*selection_changed) (GxkAssortment *self);
49 
50 /* --- assortment --- */
51 GType gxk_assortment_entry_get_type (void);
52 GType gxk_assortment_get_type (void);
53 GxkAssortment* gxk_assortment_new (void);
54 GxkAssortmentEntry* gxk_assortment_find_data (GxkAssortment *self,
55  gpointer entry_user_data);
56 GxkAssortmentEntry* gxk_assortment_insert (GxkAssortment *self,
57  guint position,
58  const gchar *label,
59  const gchar *stock_icon, /* maybe NULL */
60  const gchar *tooltip,
61  gpointer user_data,
62  GObject *object,
63  gpointer owner,
64  GxkAssortmentDelete free_func);
65 void gxk_assortment_changed (GxkAssortment *self,
66  GxkAssortmentEntry *entry);
67 void gxk_assortment_remove (GxkAssortment *self,
68  GxkAssortmentEntry *entry);
69 void gxk_assortment_dispose (GxkAssortment *self);
70 void gxk_assortment_block_selection (GxkAssortment *self);
71 void gxk_assortment_select (GxkAssortment *self,
72  GxkAssortmentEntry *entry);
73 void gxk_assortment_select_data (GxkAssortment *self,
74  gpointer entry_user_data);
75 void gxk_assortment_unblock_selection (GxkAssortment *self);
76 void gxk_assortment_manage_menu (GxkAssortment *self,
77  GtkMenu *menu);
78 
79 /* --- publishing --- */
80 void gxk_widget_publish_assortment (gpointer widget,
81  const gchar *publishing_name,
82  GxkAssortment *assortment);
83 typedef void (*GxkAssortmentClient) (gpointer client_data,
84  GtkWindow *window,
85  GxkAssortment *assortment,
86  GtkWidget *publisher);
87 void gxk_window_add_assortment_client (GtkWindow *window,
88  GxkAssortmentClient added_func,
89  GxkAssortmentClient removed_func,
90  gpointer client_data);
91 void gxk_window_remove_assortment_client (GtkWindow *window,
92  gpointer client_data);
93 
94 
95 #endif /* __GXK_ASSORTMENT_H__ */
Definition: gxkassortment.hh:39
Definition: gxkassortment.hh:21
Definition: gxkassortment.hh:31