HeSimpleColorDialog

HeSimpleColorDialog — An simple_color dialog for Hildon-based applications

Synopsis

#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);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----HeSimpleColorDialog

Implemented Interfaces

HeSimpleColorDialog implements AtkImplementorIface and GtkBuildable.

Description

HeSimpleColorDialog works as a nice default simple_color dialog for Maemo apps

Details

HE_SIMPLE_COLOR_DIALOG_DEFAULT_TITLE

  #define                                         HE_SIMPLE_COLOR_DIALOG_DEFAULT_TITLE "Select a color"


HeSimpleColorDialogPrivate

typedef struct _HeSimpleColorDialogPrivate HeSimpleColorDialogPrivate;


HeSimpleColorDialog

typedef struct _HeSimpleColorDialog HeSimpleColorDialog;


he_simple_color_dialog_new ()

GtkWidget*          he_simple_color_dialog_new          (void);

Creates a new HeSimpleColorDialog

Returns : The HeSimpleColorDialog

he_simple_color_dialog_set_color ()

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

he_simple_color_dialog_get_color ()

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().

he_simple_color_dialog_add_advanced_button ()

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

he_simple_color_dialog_present ()

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().

he_simple_color_dialog_present_interop ()

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().