| GPE Manual: libgpewidget Reference | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define COLOR_F_TO_U (v) #define COL_STR_LEN struct GpeColorDialog; struct GpeColorDialogClass; #define RGBA32_F_COMPOSE (r, g, b, a) #define RGBA32_U_COMPOSE (r, g, b, a) const GdkColor * gpe_color_dialog_get_color_gdk (GpeColorDialog *color_dialog); const gchar * gpe_color_dialog_get_color_str (GpeColorDialog *color_dialog); GtkWidget * gpe_color_dialog_new (GtkWindow *parent,GtkDialogFlags flags,const gchar *initcolor); void gpe_color_dialog_set_color_gdk (GpeColorDialog *color_dialog,const GdkColor *new_color); void gpe_color_dialog_set_color_str (GpeColorDialog *color_dialog,const gchar *colordesc);
struct GpeColorDialogClass {
GtkDialogClass parent_class;
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
};
#define RGBA32_F_COMPOSE(r,g,b,a) RGBA32_U_COMPOSE (COLOR_F_TO_U (r), COLOR_F_TO_U (g), COLOR_F_TO_U (b), COLOR_F_TO_U (a))
#define RGBA32_U_COMPOSE(r,g,b,a) ((((r) & 0xff) << 24) | (((g) & 0xff) << 16) | (((b) & 0xff) << 8) | ((a) & 0xff))
const GdkColor * gpe_color_dialog_get_color_gdk (GpeColorDialog *color_dialog);
Get a pointer to the currently selected and allocated colour GdkColor value. The value must not be altered or freed.
|
a GpeColorDialog |
Returns : |
A pointer to a GdkColor struct. |
Since 0.111
const gchar * gpe_color_dialog_get_color_str (GpeColorDialog *color_dialog);
Get a pointer to the string GRB representation of the currently selected colour. The description has the form rrggbb.
|
a GpeColorDialog |
Returns : |
Colour string, the value must not be altered or freed. |
Since 0.111
GtkWidget * gpe_color_dialog_new (GtkWindow *parent,GtkDialogFlags flags,const gchar *initcolor);
Creates a small colour selection dialog suitable for use on small screens. When the user clicks a button a "response" signal is emitted with response IDs from GtkResponseType. See GtkDialog for more details.
|
The transient parent, or NULL for none. |
|
A GtkDialogFlags mask for the dialog window. |
|
initial colour |
Returns : |
a new GpeColorDialog |
Since 0.111
void gpe_color_dialog_set_color_gdk (GpeColorDialog *color_dialog,const GdkColor *new_color);
Set the selection dialog to the given colour defined by a GdkColor value.
|
a GpeColorDialog |
|
new colour |
Since 0.111
void gpe_color_dialog_set_color_str (GpeColorDialog *color_dialog,const gchar *colordesc);
Set the selection dialog to the given colour defined by a string value. This may be any string description XParseColor is able to interpret. e.g. HTML-like values rrggbb or any definition from rgb.txt.
|
a GpeColorDialog |
|
String description of the new colour. |
Since 0.111