hildon-defines

hildon-defines — Not a widget, just a helper

Synopsis




void        hildon_icon_sizes_init          (void);
            HildonIconSizes;
extern      const HildonIconSizes *hildoniconsizes;
#define     HILDON_ICON_SIZE_CHECK_AND_GET  (iconvar)
#define     HILDON_ICON_SIZE_LIST
#define     HILDON_ICON_SIZE_SMALL
#define     HILDON_ICON_SIZE_TOOLBAR
#define     HILDON_ICON_SIZE_WIDG
#define     HILDON_ICON_SIZE_WIDG_WIZARD
#define     HILDON_ICON_SIZE_GRID
#define     HILDON_ICON_SIZE_BIG_NOTE
#define     HILDON_ICON_SIZE_NOTE
#define     HILDON_ICON_SIZE_STATUSBAR
#define     HILDON_ICON_SIZE_INDI_VIDEO_PLAYER_PRE_ROLL
#define     HILDON_ICON_SIZE_INDI_COPY
#define     HILDON_ICON_SIZE_INDI_DELETE
#define     HILDON_ICON_SIZE_INDI_PROCESS
#define     HILDON_ICON_SIZE_INDI_PROGRESSBALL
#define     HILDON_ICON_SIZE_INDI_SEND
#define     HILDON_ICON_SIZE_INDI_OFFMODE_CHARGING
#define     HILDON_ICON_SIZE_INDI_TAP_AND_HOLD
#define     HILDON_ICON_SIZE_INDI_SEND_RECEIVE
#define     HILDON_ICON_SIZE_INDI_WLAN_STRENGTH
#define     HILDON_IMAGE_SIZE_INDI_NOKIA_LOGO
#define     HILDON_IMAGE_SIZE_INDI_STARTUP_FAILED
#define     HILDON_IMAGE_SIZE_INDI_STARTUP_NOKIA_LOGO
#define     HILDON_IMAGE_SIZE_INDI_NOKIA_HAND
#define     HILDON_ICON_PIXEL_SIZE_LIST
#define     HILDON_ICON_PIXEL_SIZE_SMALL
#define     HILDON_ICON_PIXEL_SIZE_TOOLBAR
#define     HILDON_ICON_PIXEL_SIZE_WIDG
#define     HILDON_ICON_PIXEL_SIZE_WIDG_WIZARD
#define     HILDON_ICON_PIXEL_SIZE_GRID
#define     HILDON_ICON_PIXEL_SIZE_BIG_NOTE
#define     HILDON_ICON_PIXEL_SIZE_NOTE
#define     HILDON_ICON_PIXEL_SIZE_STATUSBAR
#define     HILDON_ICON_PIXEL_SIZE_INDI_VIDEO_PLAYER_PRE_ROLL
#define     HILDON_ICON_PIXEL_SIZE_INDI_KEY_PAD_LOCK
#define     HILDON_ICON_PIXEL_SIZE_INDI_COPY
#define     HILDON_ICON_PIXEL_SIZE_INDI_DELETE
#define     HILDON_ICON_PIXEL_SIZE_INDI_PROCESS
#define     HILDON_ICON_PIXEL_SIZE_INDI_PROGRESSBALL
#define     HILDON_ICON_PIXEL_SIZE_INDI_SEND
#define     HILDON_ICON_PIXEL_SIZE_INDI_OFFMODE_CHARGING
#define     HILDON_ICON_PIXEL_SIZE_INDI_TAP_AND_HOLD
#define     HILDON_ICON_PIXEL_SIZE_INDI_SEND_RECEIVE
#define     HILDON_ICON_PIXEL_SIZE_INDI_WLAN_STRENGTH
#define     HILDON_IMAGE_PIXEL_SIZE_INDI_NOKIA_LOGO
#define     HILDON_IMAGE_PIXEL_SIZE_INDI_STARTUP_FAILED
#define     HILDON_IMAGE_PIXEL_SIZE_INDI_STARTUP_NOKIA_LOGO
#define     HILDON_IMAGE_PIXEL_SIZE_INDI_NOKIA_HANDS
#define     HILDON_MARGIN_HALF
#define     HILDON_MARGIN_DEFAULT
#define     HILDON_MARGIN_DOUBLE
#define     HILDON_MARGIN_TRIPLE
#define     HILDON_HARDKEY_UP
#define     HILDON_HARDKEY_LEFT
#define     HILDON_HARDKEY_RIGHT
#define     HILDON_HARDKEY_DOWN
#define     HILDON_HARDKEY_SELECT
#define     HILDON_HARDKEY_MENU
#define     HILDON_HARDKEY_HOME
#define     HILDON_HARDKEY_ESC
#define     HILDON_HARDKEY_FULLSCREEN
#define     HILDON_HARDKEY_INCREASE
#define     HILDON_HARDKEY_DECREASE
gulong      hildon_gtk_widget_set_logical_font
                                            (GtkWidget *widget,
                                             const gchar *logicalfontname);
gulong      hildon_gtk_widget_set_logical_color
                                            (GtkWidget *widget,
                                             GtkRcFlags rcflags,
                                             GtkStateType state,
                                             const gchar *logicalcolorname);

Description

Details

hildon_icon_sizes_init ()

void        hildon_icon_sizes_init          (void);

Initializes the icon sizes. This is automatically called when the icon sizes have not been initialized and one is requested.


HildonIconSizes

typedef struct {
  GtkIconSize icon_size_list;
  GtkIconSize icon_size_small;
  GtkIconSize icon_size_toolbar;
  GtkIconSize icon_size_widg;
  GtkIconSize icon_size_widg_wizard;
  GtkIconSize icon_size_grid;
  GtkIconSize icon_size_big_note;
  GtkIconSize icon_size_note;
  GtkIconSize icon_size_statusbar;
  GtkIconSize icon_size_indi_video_player_pre_roll;
  GtkIconSize icon_size_indi_key_pad_lock;
  GtkIconSize icon_size_indi_copy;
  GtkIconSize icon_size_indi_delete;
  GtkIconSize icon_size_indi_process;
  GtkIconSize icon_size_indi_progressball;
  GtkIconSize icon_size_indi_send;
  GtkIconSize icon_size_indi_offmode_charging;
  GtkIconSize icon_size_indi_tap_and_hold;
  GtkIconSize icon_size_indi_send_receive;
  GtkIconSize icon_size_indi_wlan_strength;
  GtkIconSize image_size_indi_nokia_logo;
  GtkIconSize image_size_indi_startup_failed;
  GtkIconSize image_size_indi_startup_nokia_logo;
  GtkIconSize image_size_indi_nokia_hands;
} HildonIconSizes;


hildoniconsizes

extern const HildonIconSizes *hildoniconsizes;


HILDON_ICON_SIZE_CHECK_AND_GET()

#define HILDON_ICON_SIZE_CHECK_AND_GET(iconvar) (!hildoniconsizes ? hildon_icon_sizes_init (), hildoniconsizes->iconvar : hildoniconsizes->iconvar)

iconvar :

HILDON_ICON_SIZE_LIST

#define HILDON_ICON_SIZE_LIST HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_list)


HILDON_ICON_SIZE_SMALL

#define HILDON_ICON_SIZE_SMALL HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_small)


HILDON_ICON_SIZE_TOOLBAR

#define HILDON_ICON_SIZE_TOOLBAR HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_toolbar)


HILDON_ICON_SIZE_WIDG

#define HILDON_ICON_SIZE_WIDG HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_widg)


HILDON_ICON_SIZE_WIDG_WIZARD

#define HILDON_ICON_SIZE_WIDG_WIZARD HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_widg_wizard)


HILDON_ICON_SIZE_GRID

#define HILDON_ICON_SIZE_GRID HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_grid)


HILDON_ICON_SIZE_BIG_NOTE

#define HILDON_ICON_SIZE_BIG_NOTE HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_big_note)


HILDON_ICON_SIZE_NOTE

#define HILDON_ICON_SIZE_NOTE HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_note)


HILDON_ICON_SIZE_STATUSBAR

#define HILDON_ICON_SIZE_STATUSBAR HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_statusbar)


HILDON_ICON_SIZE_INDI_VIDEO_PLAYER_PRE_ROLL

#define HILDON_ICON_SIZE_INDI_VIDEO_PLAYER_PRE_ROLL HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_video_player_pre_roll)


HILDON_ICON_SIZE_INDI_COPY

#define HILDON_ICON_SIZE_INDI_COPY HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_copy)


HILDON_ICON_SIZE_INDI_DELETE

#define HILDON_ICON_SIZE_INDI_DELETE HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_delete)


HILDON_ICON_SIZE_INDI_PROCESS

#define HILDON_ICON_SIZE_INDI_PROCESS HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_process)


HILDON_ICON_SIZE_INDI_PROGRESSBALL

#define HILDON_ICON_SIZE_INDI_PROGRESSBALL HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_progressball)


HILDON_ICON_SIZE_INDI_SEND

#define HILDON_ICON_SIZE_INDI_SEND HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_send)


HILDON_ICON_SIZE_INDI_OFFMODE_CHARGING

#define HILDON_ICON_SIZE_INDI_OFFMODE_CHARGING HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_offmode)


HILDON_ICON_SIZE_INDI_TAP_AND_HOLD

#define HILDON_ICON_SIZE_INDI_TAP_AND_HOLD HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_tap_and_hold)


HILDON_ICON_SIZE_INDI_SEND_RECEIVE

#define HILDON_ICON_SIZE_INDI_SEND_RECEIVE HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_send_receive)


HILDON_ICON_SIZE_INDI_WLAN_STRENGTH

#define HILDON_ICON_SIZE_INDI_WLAN_STRENGTH HILDON_ICON_SIZE_CHECK_AND_GET(icon_size_indi_wlan_strength)


HILDON_IMAGE_SIZE_INDI_NOKIA_LOGO

#define HILDON_IMAGE_SIZE_INDI_NOKIA_LOGO HILDON_ICON_SIZE_CHECK_AND_GET(image_size_indi_nokia_logo)


HILDON_IMAGE_SIZE_INDI_STARTUP_FAILED

#define HILDON_IMAGE_SIZE_INDI_STARTUP_FAILED HILDON_ICON_SIZE_CHECK_AND_GET(image_size_indi_startup_nokia_failed)


HILDON_IMAGE_SIZE_INDI_STARTUP_NOKIA_LOGO

#define HILDON_IMAGE_SIZE_INDI_STARTUP_NOKIA_LOGO HILDON_ICON_SIZE_CHECK_AND_GET(image_size_indi_startup_nokia_logo)


HILDON_IMAGE_SIZE_INDI_NOKIA_HAND

#define HILDON_IMAGE_SIZE_INDI_NOKIA_HAND HILDON_ICON_SIZE_CHECK_AND_GET(image_size_indi_nokia_hands)


HILDON_ICON_PIXEL_SIZE_LIST

#define HILDON_ICON_PIXEL_SIZE_LIST 64


HILDON_ICON_PIXEL_SIZE_SMALL

#define HILDON_ICON_PIXEL_SIZE_SMALL 26


HILDON_ICON_PIXEL_SIZE_TOOLBAR

#define HILDON_ICON_PIXEL_SIZE_TOOLBAR 26


HILDON_ICON_PIXEL_SIZE_WIDG

#define HILDON_ICON_PIXEL_SIZE_WIDG 26


HILDON_ICON_PIXEL_SIZE_WIDG_WIZARD

#define HILDON_ICON_PIXEL_SIZE_WIDG_WIZARD 50


HILDON_ICON_PIXEL_SIZE_GRID

#define HILDON_ICON_PIXEL_SIZE_GRID 64


HILDON_ICON_PIXEL_SIZE_BIG_NOTE

#define HILDON_ICON_PIXEL_SIZE_BIG_NOTE 50


HILDON_ICON_PIXEL_SIZE_NOTE

#define HILDON_ICON_PIXEL_SIZE_NOTE 26


HILDON_ICON_PIXEL_SIZE_STATUSBAR

#define HILDON_ICON_PIXEL_SIZE_STATUSBAR 40


HILDON_ICON_PIXEL_SIZE_INDI_VIDEO_PLAYER_PRE_ROLL

#define HILDON_ICON_PIXEL_SIZE_INDI_VIDEO_PLAYER_PRE_ROLL 64


HILDON_ICON_PIXEL_SIZE_INDI_KEY_PAD_LOCK

#define HILDON_ICON_PIXEL_SIZE_INDI_KEY_PAD_LOCK 50


HILDON_ICON_PIXEL_SIZE_INDI_COPY

#define HILDON_ICON_PIXEL_SIZE_INDI_COPY 64


HILDON_ICON_PIXEL_SIZE_INDI_DELETE

#define HILDON_ICON_PIXEL_SIZE_INDI_DELETE 64


HILDON_ICON_PIXEL_SIZE_INDI_PROCESS

#define HILDON_ICON_PIXEL_SIZE_INDI_PROCESS 64


HILDON_ICON_PIXEL_SIZE_INDI_PROGRESSBALL

#define HILDON_ICON_PIXEL_SIZE_INDI_PROGRESSBALL 64


HILDON_ICON_PIXEL_SIZE_INDI_SEND

#define HILDON_ICON_PIXEL_SIZE_INDI_SEND 64


HILDON_ICON_PIXEL_SIZE_INDI_OFFMODE_CHARGING

#define HILDON_ICON_PIXEL_SIZE_INDI_OFFMODE_CHARGING 50


HILDON_ICON_PIXEL_SIZE_INDI_TAP_AND_HOLD

#define HILDON_ICON_PIXEL_SIZE_INDI_TAP_AND_HOLD 34


HILDON_ICON_PIXEL_SIZE_INDI_SEND_RECEIVE

#define HILDON_ICON_PIXEL_SIZE_INDI_SEND_RECEIVE 64


HILDON_ICON_PIXEL_SIZE_INDI_WLAN_STRENGTH

#define HILDON_ICON_PIXEL_SIZE_INDI_WLAN_STRENGTH 64


HILDON_IMAGE_PIXEL_SIZE_INDI_NOKIA_LOGO

#define HILDON_IMAGE_PIXEL_SIZE_INDI_NOKIA_LOGO 64


HILDON_IMAGE_PIXEL_SIZE_INDI_STARTUP_FAILED

#define HILDON_IMAGE_PIXEL_SIZE_INDI_STARTUP_FAILED 64


HILDON_IMAGE_PIXEL_SIZE_INDI_STARTUP_NOKIA_LOGO

#define HILDON_IMAGE_PIXEL_SIZE_INDI_STARTUP_NOKIA_LOGO 64


HILDON_IMAGE_PIXEL_SIZE_INDI_NOKIA_HANDS

#define HILDON_IMAGE_PIXEL_SIZE_INDI_NOKIA_HANDS 64


HILDON_MARGIN_HALF

#define HILDON_MARGIN_HALF 3


HILDON_MARGIN_DEFAULT

#define HILDON_MARGIN_DEFAULT 6


HILDON_MARGIN_DOUBLE

#define HILDON_MARGIN_DOUBLE 12


HILDON_MARGIN_TRIPLE

#define HILDON_MARGIN_TRIPLE 18


HILDON_HARDKEY_UP

#define HILDON_HARDKEY_UP         GDK_Up


HILDON_HARDKEY_LEFT

#define HILDON_HARDKEY_LEFT       GDK_Left


HILDON_HARDKEY_RIGHT

#define HILDON_HARDKEY_RIGHT      GDK_Right


HILDON_HARDKEY_DOWN

#define HILDON_HARDKEY_DOWN       GDK_Down


HILDON_HARDKEY_SELECT

#define HILDON_HARDKEY_SELECT     GDK_Return


HILDON_HARDKEY_MENU

#define HILDON_HARDKEY_MENU       GDK_F4


HILDON_HARDKEY_HOME

#define HILDON_HARDKEY_HOME       GDK_F5


HILDON_HARDKEY_ESC

#define HILDON_HARDKEY_ESC        GDK_Escape


HILDON_HARDKEY_FULLSCREEN

#define HILDON_HARDKEY_FULLSCREEN GDK_F6


HILDON_HARDKEY_INCREASE

#define HILDON_HARDKEY_INCREASE   GDK_F7


HILDON_HARDKEY_DECREASE

#define HILDON_HARDKEY_DECREASE   GDK_F8


hildon_gtk_widget_set_logical_font ()

gulong      hildon_gtk_widget_set_logical_font
                                            (GtkWidget *widget,
                                             const gchar *logicalfontname);

This function assigns a defined logical font to the widget and all its child widgets. It also connects to the "style_set" signal which will retrieve & assign the new font for the given logical name each time the theme is changed. The returned signal id can be used to disconnect the signal. The previous signal (obtained by calling this function) is disconnected automatically and should not be used.

Return value : The signal id that is triggered every time theme is changed. 0 if font set failed.

widget : A GtkWidget to assign this logical font for.
logicalfontname : A gchar* with the logical font name to assign to the widget with an "osso-" -prefix.
Returns :

hildon_gtk_widget_set_logical_color ()

gulong      hildon_gtk_widget_set_logical_color
                                            (GtkWidget *widget,
                                             GtkRcFlags rcflags,
                                             GtkStateType state,
                                             const gchar *logicalcolorname);

This function assigns a defined logical color to the widget and all it's child widgets. It also connects to the "style_set" signal which will retrieve & assign the new color for the given logical name each time the theme is changed. The returned signal id can be used to disconnect the signal. The previous signal (obtained by calling this function) is disconnected automatically and should not be used.

Example : If the style you want to modify is bg[NORMAL] then set rcflags to GTK_RC_BG and state to GTK_STATE_NORMAL.

Return value : The signal id that is triggered every time theme is changed. 0 if color set failed.

widget : A GtkWidget to assign this logical font for.
rcflags : GtkRcFlags enumeration defining whether to assign to FG, BG, TEXT or BASE style.
state : GtkStateType indicating to which state to assign the logical color
logicalcolorname : A gchar* with the logical font name to assign to the widget.
Returns :