| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#ifndef _GSM_COLOR_BUTTON_H_ |
| 22 |
#define _GSM_COLOR_BUTTON_H_ |
| 23 |
|
| 24 |
#include <gtk/gtk.h> |
| 25 |
|
| 26 |
G_BEGIN_DECLS |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
#define GSM_TYPE_COLOR_BUTTON (gsm_color_button_get_type ()) |
| 34 |
#define GSM_COLOR_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSM_TYPE_COLOR_BUTTON, GsmColorButton)) |
| 35 |
#define GSM_COLOR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSM_TYPE_COLOR_BUTTON, GsmColorButtonClass)) |
| 36 |
#define GSM_IS_COLOR_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSM_TYPE_COLOR_BUTTON)) |
| 37 |
#define GSM_IS_COLOR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSM_TYPE_COLOR_BUTTON)) |
| 38 |
#define GSM_COLOR_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSM_TYPE_COLOR_BUTTON, GsmColorButtonClass)) |
| 39 |
|
| 40 |
typedef struct _GsmColorButton GsmColorButton; |
| 41 |
typedef struct _GsmColorButtonClass GsmColorButtonClass; |
| 42 |
|
| 43 |
struct _GsmColorButton |
| 44 |
{ |
| 45 |
GtkWidget parent_instance; |
| 46 |
}; |
| 47 |
|
| 48 |
|
| 49 |
enum |
| 50 |
{ |
| 51 |
GSMCP_TYPE_CPU, |
| 52 |
GSMCP_TYPE_PIE, |
| 53 |
GSMCP_TYPE_NETWORK_IN, |
| 54 |
GSMCP_TYPE_NETWORK_OUT, |
| 55 |
GSMCP_TYPE_DISK_READ, |
| 56 |
GSMCP_TYPE_DISK_WRITE, |
| 57 |
GSMCP_TYPES |
| 58 |
}; |
| 59 |
|
| 60 |
struct _GsmColorButtonClass |
| 61 |
{ |
| 62 |
GtkWidgetClass parent_class; |
| 63 |
}; |
| 64 |
|
| 65 |
GType gsm_color_button_get_type (void); |
| 66 |
GsmColorButton * gsm_color_button_new (const GdkRGBA *color, |
| 67 |
guint type); |
| 68 |
void gsm_color_button_set_color (GsmColorButton *color_button, |
| 69 |
const GdkRGBA *color); |
| 70 |
void gsm_color_button_set_fraction (GsmColorButton *color_button, |
| 71 |
const gdouble fraction); |
| 72 |
void gsm_color_button_set_cbtype (GsmColorButton *color_button, |
| 73 |
guint type); |
| 74 |
void gsm_color_button_get_color (GsmColorButton *color_button, |
| 75 |
GdkRGBA *color); |
| 76 |
gdouble gsm_color_button_get_fraction (GsmColorButton *color_button); |
| 77 |
guint gsm_color_button_get_cbtype (GsmColorButton *color_button); |
| 78 |
void gsm_color_button_set_title (GsmColorButton *color_button, |
| 79 |
const gchar *title); |
| 80 |
gchar * gsm_color_button_get_title (GsmColorButton *color_button); |
| 81 |
|
| 82 |
G_END_DECLS |
| 83 |
|
| 84 |
#endif |