![]() |
![]() |
![]() |
GPE Manual: libgpewidget Reference | ![]() |
---|---|---|---|---|
Top | Description |
#define COL_STR_LEN #define COLOR_F_TO_U (v) #define RGBA32_U_COMPOSE (r,g,b,a) #define RGBA32_F_COMPOSE (r,g,b,a) GpeColorDialog; GtkWidget* gpe_color_dialog_new (GtkWindow *parent, GtkDialogFlags flags, const gchar *initcolor); const gchar * gpe_color_dialog_get_color_str (GpeColorDialog *color_dialog); void gpe_color_dialog_set_color_str (GpeColorDialog *color_dialog, const gchar *colordesc); const GdkColor* gpe_color_dialog_get_color_gdk (GpeColorDialog *color_dialog); void gpe_color_dialog_set_color_gdk (GpeColorDialog *color_dialog, const GdkColor *new_color);
The GPE Colour selection dialog is a smal and fast dialog to select free defineable RGB colour values. In contrast to GtkColorDialog it is much faster and simpler to fit the needs of mobile devices.
#define RGBA32_U_COMPOSE(r,g,b,a) ((((r) & 0xff) << 24) | (((g) & 0xff) << 16) | (((b) & 0xff) << 8) | ((a) & 0xff))
|
|
|
|
|
|
|
#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))
|
|
|
|
|
|
|
typedef struct { } GpeColorDialog;
The widget struct has no public members which should accessed directly.
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
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
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
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
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