1 #ifndef __KRY_WAVEFORM_GROUP_ITEM_H__
2 #define __KRY_WAVEFORM_GROUP_ITEM_H__
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif /* __cplusplus */
7 
8 
9 #define KRY_TYPE_WAVEFORM_GROUP_ITEM                  (kry_waveform_group_item_get_type ())
10 #define KRY_WAVEFORM_GROUP_ITEM(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), KRY_TYPE_WAVEFORM_GROUP_ITEM, KryWaveformGroupItem))
11 #define KRY_WAVEFORM_GROUP_ITEM_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), KRY_TYPE_WAVEFORM_GROUP_ITEM, KryWaveformGroupItemClass))
12 #define KRY_IS_WAVEFORM_GROUP_ITEM(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KRY_TYPE_WAVEFORM_GROUP_ITEM))
13 #define KRY_IS_WAVEFORM_GROUP_ITEM_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), KRY_TYPE_WAVEFORM_GROUP_ITEM))
14 #define KRY_WAVEFORM_GROUP_ITEM_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), KRY_TYPE_WAVEFORM_GROUP_ITEM, KryWaveformGroupItemClass))
15 
16 
17 typedef struct _KryWaveformGroupItem	    KryWaveformGroupItem;
18 typedef struct _KryWaveformGroupItemClass  KryWaveformGroupItemClass;
19 
20 struct _KryWaveformGroupItem
21 {
22   GObject parent_instance;
23 
24   GtkWidget *group;
25 
26   GtkWidget *toolbar;
27   KryWaveform *waveform;
28   GtkWidget *scrollbar;
29 
30   KryWaveformGroupItem *parent_item;
31   GList *markers;
32 
33   gboolean zoom_sync;
34   double zoom;
35 
36   gboolean scale_sync;
37   int scale;
38 
39   gboolean scroll_sync;
40 };
41 
42 struct _KryWaveformGroupItemClass
43 {
44   GObjectClass parent_class;
45 
46   void (*zoom_sync_changed) (KryWaveformGroupItem *item, gboolean val);
47   void (*scale_sync_changed) (KryWaveformGroupItem *item, gboolean val);
48   void (*scroll_sync_changed) (KryWaveformGroupItem *item, gboolean val);
49 };
50 
51 
52 GType kry_waveform_group_item_get_type (void) G_GNUC_CONST;
53 GObject* kry_waveform_group_item_new(KryWaveform *waveform);
54 KryWaveform *kry_waveform_group_item_get_waveform(KryWaveformGroupItem *item);
55 
56 void kry_waveform_group_item_set_toolbar(KryWaveformGroupItem *item, GtkWidget *widget);
57 GtkWidget *kry_waveform_group_item_get_toolbar(KryWaveformGroupItem *item);
58 
59 GtkWidget *kry_waveform_group_item_get_scrollbar(KryWaveformGroupItem *item);
60 void kry_waveform_group_item_set_scrollbar(KryWaveformGroupItem *item, GtkWidget *widget);
61 
62 void kry_waveform_group_item_set_waveform(KryWaveformGroupItem *item, KryWaveform *waveform);
63 void kry_waveform_group_item_set_group(KryWaveformGroupItem *item, GtkWidget *group);
64 
65 void kry_waveform_group_item_show(KryWaveformGroupItem *item);
66 void kry_waveform_group_item_hide(KryWaveformGroupItem *item);
67 
68 void kry_waveform_group_item_set_zoom_sync(KryWaveformGroupItem *item, gboolean zoom_sync);
69 void kry_waveform_group_item_set_scale_sync(KryWaveformGroupItem *item, gboolean scale_sync);
70 void kry_waveform_group_item_set_scroll_sync(KryWaveformGroupItem *item, gboolean scroll_sync);
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 
77 #endif /* __KRY_WAVEFORM_GROUP_ITEM_H__ */
78 
79