![]() |
![]() |
![]() |
hildon-extras Reference Manual | ![]() |
---|---|---|---|---|
#define HE_SIMPLE_COLOR_DIALOG_DEFAULT_TITLE HeSimpleColorDialogPrivate; HeSimpleColorDialog; GtkWidget* he_simple_color_dialog_new (void); void he_simple_color_dialog_set_color (HeSimpleColorDialog *scd, GdkColor *color); GdkColor* he_simple_color_dialog_get_color (HeSimpleColorDialog *scd); void he_simple_color_dialog_add_advanced_button (HeSimpleColorDialog *scd); GdkColor* he_simple_color_dialog_present (GtkWindow *parent, gboolean add_advanced_button, GdkColor *default_color, gchar *title); GdkColor* he_simple_color_dialog_present_interop (GdkNativeWindow parent_winid, gboolean add_advanced_button, GdkColor *default_color, gchar *title);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----HeSimpleColorDialog
GtkWidget* he_simple_color_dialog_new (void);
Creates a new HeSimpleColorDialog
Returns : | The HeSimpleColorDialog |
void he_simple_color_dialog_set_color (HeSimpleColorDialog *scd, GdkColor *color);
Sets the currently selected color of this color dialog. The color is copied to an internal structure, so the caller can free the GdkColor passed to this object after the function call.
scd : |
The HeSimpleColorDialog |
color : |
The GdkColor to display |
GdkColor* he_simple_color_dialog_get_color (HeSimpleColorDialog *scd);
Retrieve the GdkColor from the HeSimpleColorDialog.
scd : |
The HeSimpleColorDialog whose GdkColor to retrieve |
Returns : | the currently selected color. The caller has to
free the returned value using gdk_color_free() .
|
void he_simple_color_dialog_add_advanced_button (HeSimpleColorDialog *scd);
Adds an "Advanced" button to a HeSimpleColorDialog. This method should only be called once on a given dialog. Its behaviour is undefined if it is called more than once.
scd : |
The HeSimpleColorDialog |
GdkColor* he_simple_color_dialog_present (GtkWindow *parent, gboolean add_advanced_button, GdkColor *default_color, gchar *title);
Creates and presents a HeSimpleColorDialog with a default color.
If the title is NULL
, the default is displayed instead.
parent : |
The parent GtkWindow, or NULL
|
add_advanced_button : |
Whether to display the "Advanced" button |
default_color : |
The GdkColor to display initially, or NULL
|
title : |
The title of the dialog, or NULL
|
Returns : | If the dialog is cancelled, a copy of the default_color parameter is returned. (Or NULL if default_color is NULL .)
Otherwise, the color chosen by the user is returned. The caller is responsible for freeing the returned value using gdk_color_free() .
|
GdkColor* he_simple_color_dialog_present_interop (GdkNativeWindow parent_winid, gboolean add_advanced_button, GdkColor *default_color, gchar *title);
Creates and presents a HeSimpleColorDialog with a default color.
If the title is NULL
, the default is displayed instead.
parent_winid : |
The parent GdkNativeWindow, or 0
|
add_advanced_button : |
Whether to display the "Advanced" button |
default_color : |
The GdkColor to display initially, or NULL
|
title : |
The title of the dialog, or NULL
|
Returns : | If the dialog is cancelled, a copy of the default_color parameter is returned. (Or NULL if default_color is NULL .)
Otherwise, the color chosen by the user is returned. The caller is responsible for freeing the returned value using gdk_color_free() .
|