Defines

Defines — Definitions for icon sizes, margins, and hard keys definitions.

Synopsis


#include <hildon/hildon.h>

#define             HILDON_ICON_SIZE_XSMALL
#define             HILDON_ICON_SIZE_SMALL
#define             HILDON_ICON_SIZE_STYLUS
#define             HILDON_ICON_SIZE_FINGER
#define             HILDON_ICON_SIZE_THUMB
#define             HILDON_ICON_SIZE_LARGE
#define             HILDON_ICON_SIZE_XLARGE
#define             HILDON_ICON_SIZE_TOOLBAR

#define             HILDON_ICON_PIXEL_SIZE_XSMALL
#define             HILDON_ICON_PIXEL_SIZE_SMALL
#define             HILDON_ICON_PIXEL_SIZE_STYLUS
#define             HILDON_ICON_PIXEL_SIZE_FINGER
#define             HILDON_ICON_PIXEL_SIZE_THUMB
#define             HILDON_ICON_PIXEL_SIZE_LARGE
#define             HILDON_ICON_PIXEL_SIZE_XLARGE
#define             HILDON_ICON_PIXEL_SIZE_TOOLBAR
gint                hildon_get_icon_pixel_size          (GtkIconSize size);

#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

#define             HILDON_WINDOW_TITLEBAR_HEIGHT

Description

The macros of this section should be used for a consistent sizing of icons and spacing of between user interface elements.

The icon sizes here presented must be registered during the application initialization by calling hildon_init(). It is recommended to use these sizes for a consistent look of applications in the Hildon platform.

The margin definitions are used internally in the widgets to define the spacing and padding between widgets; as well as the margins for dialogs and other windows. Using them to create a new interface layout will guarantee it to be consistent with the widgets and other applications.

The hardkey macros are mapping between the Hildon supported keys and the GDK key definitions.

Details

HILDON_ICON_SIZE_XSMALL

#define HILDON_ICON_SIZE_XSMALL                  gtk_icon_size_from_name ("hildon-xsmall")

GtkIconSize for extra small icons.

Since 2.2


HILDON_ICON_SIZE_SMALL

#define HILDON_ICON_SIZE_SMALL                   gtk_icon_size_from_name ("hildon-small")

GtkIconSize for small icons.

Since 2.2


HILDON_ICON_SIZE_STYLUS

#define HILDON_ICON_SIZE_STYLUS                  gtk_icon_size_from_name ("hildon-stylus")

GtkIconSize for stylus-size icons.

Since 2.2


HILDON_ICON_SIZE_FINGER

#define HILDON_ICON_SIZE_FINGER                  gtk_icon_size_from_name ("hildon-finger")

GtkIconSize for finger-size icons.

Since 2.2


HILDON_ICON_SIZE_THUMB

#define HILDON_ICON_SIZE_THUMB                   gtk_icon_size_from_name ("hildon-thumb")

GtkIconSize for thumb-size icons.

Since 2.2


HILDON_ICON_SIZE_LARGE

#define HILDON_ICON_SIZE_LARGE                   gtk_icon_size_from_name ("hildon-large")

GtkIconSize for large icons.

Since 2.2


HILDON_ICON_SIZE_XLARGE

#define HILDON_ICON_SIZE_XLARGE                  gtk_icon_size_from_name ("hildon-xlarge")

GtkIconSize for extra large icons.

Since 2.2


HILDON_ICON_SIZE_TOOLBAR

#define HILDON_ICON_SIZE_TOOLBAR                 gtk_icon_size_from_name ("hildon-finger")

Warning

HILDON_ICON_SIZE_TOOLBAR is deprecated and should not be used in newly-written code. Use HILDON_ICON_SIZE_FINGER instead.

GtkIconSize for toolbar icons.


HILDON_ICON_PIXEL_SIZE_XSMALL

#define HILDON_ICON_PIXEL_SIZE_XSMALL            hildon_get_icon_pixel_size (HILDON_ICON_SIZE_XSMALL)

Pixel size for extra small icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_SMALL

#define HILDON_ICON_PIXEL_SIZE_SMALL             hildon_get_icon_pixel_size (HILDON_ICON_SIZE_SMALL)

Pixel size for small icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_STYLUS

#define HILDON_ICON_PIXEL_SIZE_STYLUS            hildon_get_icon_pixel_size (HILDON_ICON_SIZE_STYLUS)

Pixel size for stylus-size icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_FINGER

#define HILDON_ICON_PIXEL_SIZE_FINGER            hildon_get_icon_pixel_size (HILDON_ICON_SIZE_FINGER)

Pixel size for finger-size icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_THUMB

#define HILDON_ICON_PIXEL_SIZE_THUMB             hildon_get_icon_pixel_size (HILDON_ICON_SIZE_THUMB)

Pixel size for thumb-size icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_LARGE

#define HILDON_ICON_PIXEL_SIZE_LARGE             hildon_get_icon_pixel_size (HILDON_ICON_SIZE_LARGE)

Pixel size for large icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_XLARGE

#define HILDON_ICON_PIXEL_SIZE_XLARGE            hildon_get_icon_pixel_size (HILDON_ICON_SIZE_XLARGE)

Pixel size for extra large icons.

Since 2.2


HILDON_ICON_PIXEL_SIZE_TOOLBAR

#define HILDON_ICON_PIXEL_SIZE_TOOLBAR           hildon_get_icon_pixel_size (HILDON_ICON_SIZE_TOOLBAR)

Warning

HILDON_ICON_PIXEL_SIZE_TOOLBAR is deprecated and should not be used in newly-written code. Use HILDON_ICON_PIXEL_SIZE_FINGER instead.

Pixel size for toolbar icons.


hildon_get_icon_pixel_size ()

gint                hildon_get_icon_pixel_size          (GtkIconSize size);

Returns the icon size (height) for the given, named icon. In most cases it's much more convienient to call one of the predefined macros instead of this function directly.

size : the icon size to get pixel size for
Returns : the height/width of icon to use. O if icon could not be found.

HILDON_MARGIN_HALF

#define HILDON_MARGIN_HALF                       4

Half of the default pixel-size margin to be used for padding between widgets.

Since 2.2


HILDON_MARGIN_DEFAULT

#define HILDON_MARGIN_DEFAULT                    8

Default pixel-size margin to be used for padding between widgets.

Since 2.2


HILDON_MARGIN_DOUBLE

#define HILDON_MARGIN_DOUBLE                     16

Double pixel-size margin to be used for padding between widgets.

Since 2.2


HILDON_MARGIN_TRIPLE

#define HILDON_MARGIN_TRIPLE                     24

Triple pixel-size margin to be used for padding between widgets.

Since 2.2


HILDON_HARDKEY_UP

#define HILDON_HARDKEY_UP                        GDK_Up

Key definition for the Up hardkey.


HILDON_HARDKEY_LEFT

#define HILDON_HARDKEY_LEFT                      GDK_Left

Key definition for the Left hardkey.


HILDON_HARDKEY_RIGHT

#define HILDON_HARDKEY_RIGHT                     GDK_Right

Key definition for the Right hardkey.


HILDON_HARDKEY_DOWN

#define HILDON_HARDKEY_DOWN                      GDK_Down

Key definition for the Down hardkey.


HILDON_HARDKEY_SELECT

#define HILDON_HARDKEY_SELECT                    GDK_Return

Key definition for the Select hardkey.


HILDON_HARDKEY_MENU

#define HILDON_HARDKEY_MENU                      GDK_F4


HILDON_HARDKEY_HOME

#define HILDON_HARDKEY_HOME                      GDK_F5

Key definition for the Home hardkey.


HILDON_HARDKEY_ESC

#define HILDON_HARDKEY_ESC                       GDK_Escape

Key definition for the Esc hardkey.


HILDON_HARDKEY_FULLSCREEN

#define HILDON_HARDKEY_FULLSCREEN                GDK_F6

Key definition for the Fullscreen hardkey.


HILDON_HARDKEY_INCREASE

#define HILDON_HARDKEY_INCREASE                  GDK_F7

Key definition for the Increase hardkey.


HILDON_HARDKEY_DECREASE

#define HILDON_HARDKEY_DECREASE                  GDK_F8

Key definition for the Decrease hardkey.


HILDON_WINDOW_TITLEBAR_HEIGHT

#define HILDON_WINDOW_TITLEBAR_HEIGHT            56

Height of the window titlebar according to Hildon Desktop.

Since 2.2