hildon-libs 0.14.11 Reference Manual |
---|
HildonColorSelectorHildonColorSelector — A widget for selecting a color |
HildonColorSelectorPriv; GtkWidget* hildon_color_selector_new (GtkWindow *parent); const GdkColor* hildon_color_selector_get_color (HildonColorSelector *selector); void hildon_color_selector_set_color (HildonColorSelector *selector, GdkColor *color);
HildonColorSelector allows selection of a color from a standard 16-color palette or a palette of 8 user-customizable colors. The user-customizable colors can be modified through HildonColorPopup.
Here is an example for using a color selector.
GtkWidget *selector; GdkColor *color; gint result; selector = hildon_color_selector_new( GTK_WINDOW(gtk_widget_get_toplevel( data ) )); result = gtk_dialog_run( GTK_DIALOG ( selector ) ); switch (result) { case GTK_RESPONSE_OK: color = hildon_color_selector_get_color( HILDON_COLOR_SELECTOR( selector ) ); break; default: break; } gtk_widget_destroy( selector );
typedef struct _HildonColorSelectorPriv HildonColorSelectorPriv;
Internal struct for color selector.
GtkWidget* hildon_color_selector_new (GtkWindow *parent);
Creates a new HildonColorSelector dialog with 3x8 layout of base colors and 'OK', 'More..' and 'Cancel' buttons.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application |
Returns : | new HildonColorSelector |
const GdkColor* hildon_color_selector_get_color (HildonColorSelector *selector);
selector : |
a HildonColorSelector |
Returns : | the currently selected GdkColor. The returned pointer must not be freed. |
<< HildonColorChooserDialog | hildon-color-popup >> |