hildon-gtk

hildon-gtk — Additional functions for Gtk widgets

Synopsis

enum                HildonSizeType;
void                hildon_gtk_widget_set_theme_size    (GtkWidget *widget,
                                                         HildonSizeType size);
GtkWidget*          hildon_gtk_menu_new                 (void);
GtkWidget*          hildon_gtk_button_new               (HildonSizeType size);
GtkWidget*          hildon_gtk_toggle_button_new        (HildonSizeType size);
GtkWidget*          hildon_gtk_radio_button_new         (HildonSizeType size,
                                                         GSList *group);
GtkWidget*          hildon_gtk_radio_button_new_from_widget
                                                        (HildonSizeType size,
                                                         GtkRadioButton *radio_group_member);
GtkWidget*          hildon_gtk_tree_view_new            (HildonUIMode mode);
GtkWidget*          hildon_gtk_tree_view_new_with_model (HildonUIMode mode,
                                                         GtkTreeModel *model);
GtkWidget*          hildon_gtk_icon_view_new            (HildonUIMode mode);
GtkWidget*          hildon_gtk_icon_view_new_with_model (HildonUIMode mode,
                                                         GtkTreeModel *model);
void                hildon_gtk_window_set_progress_indicator
                                                        (GtkWindow *window,
                                                         guint state);

Description

Hildon provides some functions to extend the functionality of existing Gtk widgets. This also includes convenience functions to easily perform frequent tasks.

Details

enum HildonSizeType

typedef enum {
   HILDON_SIZE_AUTO_WIDTH                       = 0 << 0, /* set to automatic width */
   HILDON_SIZE_HALFSCREEN_WIDTH                 = 1 << 0, /* set to 50% screen width */
   HILDON_SIZE_FULLSCREEN_WIDTH                 = 2 << 0, /* set to 100% screen width */
   HILDON_SIZE_AUTO_HEIGHT                      = 0 << 2, /* set to automatic height */
   HILDON_SIZE_FINGER_HEIGHT                    = 1 << 2, /* set to finger height */
   HILDON_SIZE_THUMB_HEIGHT                     = 2 << 2, /* set to thumb height */
   HILDON_SIZE_AUTO                             = (HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_AUTO_HEIGHT)
}                                               HildonSizeType;


hildon_gtk_widget_set_theme_size ()

void                hildon_gtk_widget_set_theme_size    (GtkWidget *widget,
                                                         HildonSizeType size);

This function sets the requested size of a widget.

widget : A GtkWidget
size : Flags indicating the size of the widget

hildon_gtk_menu_new ()

GtkWidget*          hildon_gtk_menu_new                 (void);

This is a convenience function to create a GtkMenu setting its widget name to allow Hildon specific styling.

Returns : A newly created GtkMenu widget.

hildon_gtk_button_new ()

GtkWidget*          hildon_gtk_button_new               (HildonSizeType size);

This is a convenience function to create a GtkButton setting its size to one of the pre-defined Hildon sizes.

Buttons created with this function also override the "gtk-button-images" setting. Images set using gtk_button_set_image() are always shown.

size : Flags indicating the size of the new button
Returns : A newly created GtkButton widget.

hildon_gtk_toggle_button_new ()

GtkWidget*          hildon_gtk_toggle_button_new        (HildonSizeType size);

This is a convenience function to create a GtkToggleButton setting its size to one of the pre-defined Hildon sizes.

Buttons created with this function also override the "gtk-button-images" setting. Images set using gtk_button_set_image() are always shown.

size : Flags indicating the size of the new button
Returns : A newly created GtkToggleButton widget.

hildon_gtk_radio_button_new ()

GtkWidget*          hildon_gtk_radio_button_new         (HildonSizeType size,
                                                         GSList *group);

This is a convenience function to create a GtkRadioButton setting its size to one of the pre-defined Hildon sizes.

Buttons created with this function also override the "gtk-button-images" setting. Images set using gtk_button_set_image() are always shown.

size : Flags indicating the size of the new button
group : An existing radio button group, or NULL if you are creating a new group
Returns : A newly created GtkRadioButton widget.

hildon_gtk_radio_button_new_from_widget ()

GtkWidget*          hildon_gtk_radio_button_new_from_widget
                                                        (HildonSizeType size,
                                                         GtkRadioButton *radio_group_member);

This is a convenience function to create a GtkRadioButton setting its size to one of the pre-defined Hildon sizes.

Buttons created with this function also override the "gtk-button-images" setting. Images set using gtk_button_set_image() are always shown.

size : Flags indicating the size of the new button
radio_group_member : widget to get radio group from or NULL
Returns : A newly created GtkRadioButton widget.

hildon_gtk_tree_view_new ()

GtkWidget*          hildon_gtk_tree_view_new            (HildonUIMode mode);

Creates a new GtkTreeView widget with the Hildon UI mode set to mode

mode : the Hildon UI mode
Returns : A newly created GtkTreeView widget.

hildon_gtk_tree_view_new_with_model ()

GtkWidget*          hildon_gtk_tree_view_new_with_model (HildonUIMode mode,
                                                         GtkTreeModel *model);

Creates a new GtkTreeView widget with the Hildon UI mode set to mode and the model initialized to model.

mode : the Hildon UI mode
model : the model.
Returns : A newly created GtkTreeView widget.

hildon_gtk_icon_view_new ()

GtkWidget*          hildon_gtk_icon_view_new            (HildonUIMode mode);

Creates a new GtkIconView widget with the Hildon UI mode set to mode

mode : the Hildon UI mode
Returns : A newly created GtkIconView widget

hildon_gtk_icon_view_new_with_model ()

GtkWidget*          hildon_gtk_icon_view_new_with_model (HildonUIMode mode,
                                                         GtkTreeModel *model);

Creates a new GtkIconView widget with the Hildon UI mode set to mode and the model intitialized to model.

mode : the Hildon UI mode
model : The model.
Returns : A newly created GtkIconView widget.

hildon_gtk_window_set_progress_indicator ()

void                hildon_gtk_window_set_progress_indicator
                                                        (GtkWindow *window,
                                                         guint state);

This functions notifies the window manager that it should add a progress indicator in the title of the window. It applies to HildonDialog and HildonWindow.

window : The window, we want to define its state
state : The state we want to set: 1 -> show progress indicator, 0 -> hide progress indicator.

See Also

HildonButton