diff options
author | Ted Gould <ted@canonical.com> | 2008-11-20 17:04:30 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2008-11-20 17:04:30 -0600 |
commit | a29584a83acfabcfe173441ebe8e3a2369c39e80 (patch) | |
tree | dac18cd9405718e26b3e03c7bbe00cd052fddb58 /src/slidermenuitem.h | |
parent | 712bddcdd12a7f4ee16bf9b1e2bdce9fe35bde46 (diff) | |
download | libayatana-indicator-a29584a83acfabcfe173441ebe8e3a2369c39e80.tar.gz libayatana-indicator-a29584a83acfabcfe173441ebe8e3a2369c39e80.tar.bz2 libayatana-indicator-a29584a83acfabcfe173441ebe8e3a2369c39e80.zip |
Clean compile, but something is broken in the _init function. Not sure what.
Diffstat (limited to 'src/slidermenuitem.h')
-rw-r--r-- | src/slidermenuitem.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/slidermenuitem.h b/src/slidermenuitem.h new file mode 100644 index 0000000..7a560d2 --- /dev/null +++ b/src/slidermenuitem.h @@ -0,0 +1,59 @@ + +#ifndef SLIDER_MENU_ITEM_H__ +#define SLIDER_MENU_ITEM_H__ + +#include <gtk/gtk.h> +#include <gtk/gtkmenuitem.h> + +G_BEGIN_DECLS + +#define TYPE_SLIDER_MENU_ITEM (slider_menu_item_get_type()) +#define SLIDER_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST((o), TYPE_SLIDER_MENU_ITEM), SliderMenuItem) +#define SLIDER_MENU_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), TYPE_SLIDER_MENU_ITEM), SliderMenuItemClass) +#define IS_SLIDER_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), TYPE_SLIDER_MENU_ITEM)) +#define IS_SLIDER_MENU_ITEM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), TYPE_SLIDER_MENU_ITEM)) +#define SLIDER_MENU_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_SLIDER_MENU_ITEM), SliderMenuItemClass) + +typedef struct _SliderMenuItem SliderMenuItem; +typedef struct _SliderMenuItemClass SliderMenuItemClass; + +struct _SliderMenuItem +{ + GtkMenuItem menu_item; + + GtkWidget * label; + GtkWidget * slider; + GtkWidget * button_up; + GtkWidget * button_down; +}; + +struct _SliderMenuItemClass +{ + GtkMenuItemClass parent_class; + + /* Everyone else does this :) */ + void (*_gtk_reserved1) (void); + void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); +}; + + +GType slider_menu_item_get_type (void) G_GNUC_CONST; +GtkWidget * slider_menu_item_new (const gchar * label, + gdouble min, + gdouble max, + gdouble step); +GtkWidget * slider_menu_get_plus_button (SliderMenuItem * smi); +GtkWidget * slider_menu_get_minus_button (SliderMenuItem * smi); +GtkAdjustment * slider_menu_get_adjustment (SliderMenuItem * smi); +gdouble slider_menu_get_value (SliderMenuItem * smi); +void slider_menu_set_value (SliderMenuItem * smi, + gdouble value); +void slider_menu_slider_size_group (SliderMenuItem * smi, + GtkSizeGroup * size_group); + +G_END_DECLS + +#endif /* GTK_SLIDER_MENU_ITEM_H__ */ + |