2 * This file is a part of hildon
4 * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
6 * Contact: Rodrigo Novo <rodrigo.novo@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; version 2.1 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 * SECTION:hildon-defines
28 * @Short_Description: Definitions for icon sizes, margins, and hard keys definitions.
30 * The macros of this section should be used for a consistent sizing
31 * of icons and spacing of between user interface elements.
33 * The icon sizes here presented must be registered during the
34 * application initialization by calling hildon_init(). It is
35 * recommended to use these sizes for a consistent look of
36 * applications in the Hildon platform.
38 * The margin definitions are used internally in the widgets to define the spacing
39 * and padding between widgets; as well as the margins for dialogs and other windows.
40 * Using them to create a new interface layout will guarantee it to be consistent
41 * with the widgets and other applications.
43 * The hardkey macros are mapping between the Hildon supported keys and the GDK
47 #ifndef __HILDON_DEFINES_H__
48 #define __HILDON_DEFINES_H__
51 #include <gdk/gdkkeysyms.h>
55 /* New hildon icon sizes. */
60 * HILDON_ICON_SIZE_XSMALL:
62 * #GtkIconSize for extra small icons.
66 #define HILDON_ICON_SIZE_XSMALL gtk_icon_size_from_name ("hildon-xsmall")
69 * HILDON_ICON_SIZE_SMALL:
71 * #GtkIconSize for small icons.
75 #define HILDON_ICON_SIZE_SMALL gtk_icon_size_from_name ("hildon-small")
78 * HILDON_ICON_SIZE_STYLUS:
80 * #GtkIconSize for stylus-size icons.
84 #define HILDON_ICON_SIZE_STYLUS gtk_icon_size_from_name ("hildon-stylus")
87 * HILDON_ICON_SIZE_FINGER:
89 * #GtkIconSize for finger-size icons.
93 #define HILDON_ICON_SIZE_FINGER gtk_icon_size_from_name ("hildon-finger")
96 * HILDON_ICON_SIZE_THUMB:
98 * #GtkIconSize for thumb-size icons.
102 #define HILDON_ICON_SIZE_THUMB gtk_icon_size_from_name ("hildon-thumb")
105 * HILDON_ICON_SIZE_LARGE:
107 * #GtkIconSize for large icons.
111 #define HILDON_ICON_SIZE_LARGE gtk_icon_size_from_name ("hildon-large")
114 * HILDON_ICON_SIZE_XLARGE:
116 * #GtkIconSize for extra large icons.
120 #define HILDON_ICON_SIZE_XLARGE gtk_icon_size_from_name ("hildon-xlarge")
122 /* legacy hildon icon sizes, updated for new hildon */
125 * HILDON_ICON_SIZE_TOOLBAR:
127 * #GtkIconSize for toolbar icons.
129 * Deprecated: Use %HILDON_ICON_SIZE_FINGER instead.
131 #ifndef HILDON_DISABLE_DEPRECATED
132 #define HILDON_ICON_SIZE_TOOLBAR gtk_icon_size_from_name ("hildon-finger")
134 /* Actual icon sizes */
138 * HILDON_ICON_PIXEL_SIZE_XSMALL:
140 * Pixel size for extra small icons.
144 #define HILDON_ICON_PIXEL_SIZE_XSMALL hildon_get_icon_pixel_size (HILDON_ICON_SIZE_XSMALL)
147 * HILDON_ICON_PIXEL_SIZE_SMALL:
149 * Pixel size for small icons.
153 #define HILDON_ICON_PIXEL_SIZE_SMALL hildon_get_icon_pixel_size (HILDON_ICON_SIZE_SMALL)
156 * HILDON_ICON_PIXEL_SIZE_STYLUS:
158 * Pixel size for stylus-size icons.
162 #define HILDON_ICON_PIXEL_SIZE_STYLUS hildon_get_icon_pixel_size (HILDON_ICON_SIZE_STYLUS)
165 * HILDON_ICON_PIXEL_SIZE_FINGER:
167 * Pixel size for finger-size icons.
171 #define HILDON_ICON_PIXEL_SIZE_FINGER hildon_get_icon_pixel_size (HILDON_ICON_SIZE_FINGER)
174 * HILDON_ICON_PIXEL_SIZE_THUMB:
176 * Pixel size for thumb-size icons.
180 #define HILDON_ICON_PIXEL_SIZE_THUMB hildon_get_icon_pixel_size (HILDON_ICON_SIZE_THUMB)
183 * HILDON_ICON_PIXEL_SIZE_LARGE:
185 * Pixel size for large icons.
189 #define HILDON_ICON_PIXEL_SIZE_LARGE hildon_get_icon_pixel_size (HILDON_ICON_SIZE_LARGE)
192 * HILDON_ICON_PIXEL_SIZE_XLARGE:
194 * Pixel size for extra large icons.
198 #define HILDON_ICON_PIXEL_SIZE_XLARGE hildon_get_icon_pixel_size (HILDON_ICON_SIZE_XLARGE)
202 * HILDON_ICON_PIXEL_SIZE_TOOLBAR:
204 * Pixel size for toolbar icons.
206 * Deprecated: Use %HILDON_ICON_PIXEL_SIZE_FINGER instead.
208 #ifndef HILDON_DISABLE_DEPRECATED
209 #define HILDON_ICON_PIXEL_SIZE_TOOLBAR hildon_get_icon_pixel_size (HILDON_ICON_SIZE_TOOLBAR)
214 * HILDON_MARGIN_HALF:
216 * Half of the default pixel-size margin to be used for padding between widgets.
220 #define HILDON_MARGIN_HALF 4
223 * HILDON_MARGIN_DEFAULT:
225 * Default pixel-size margin to be used for padding between widgets.
229 #define HILDON_MARGIN_DEFAULT 8
232 * HILDON_MARGIN_DOUBLE:
234 * Double pixel-size margin to be used for padding between widgets.
238 #define HILDON_MARGIN_DOUBLE 16
241 * HILDON_MARGIN_TRIPLE:
243 * Triple pixel-size margin to be used for padding between widgets.
247 #define HILDON_MARGIN_TRIPLE 24
250 * HILDON_WINDOW_TITLEBAR_HEIGHT:
252 * Height of the window titlebar according to Hildon Desktop.
256 #define HILDON_WINDOW_TITLEBAR_HEIGHT 56
263 * Key definition for the Up hardkey.
265 #define HILDON_HARDKEY_UP GDK_Up
268 * HILDON_HARDKEY_LEFT:
270 * Key definition for the Left hardkey.
272 #define HILDON_HARDKEY_LEFT GDK_Left
275 * HILDON_HARDKEY_RIGHT:
277 * Key definition for the Right hardkey.
279 #define HILDON_HARDKEY_RIGHT GDK_Right
282 * HILDON_HARDKEY_DOWN:
284 * Key definition for the Down hardkey.
286 #define HILDON_HARDKEY_DOWN GDK_Down
289 * HILDON_HARDKEY_SELECT:
291 * Key definition for the Select hardkey.
293 #define HILDON_HARDKEY_SELECT GDK_Return
296 * HILDON_HARDKEY_Menu:
298 * Key definition for the Menu hardkey.
300 #define HILDON_HARDKEY_MENU GDK_F4
303 * HILDON_HARDKEY_HOME:
305 * Key definition for the Home hardkey.
307 #define HILDON_HARDKEY_HOME GDK_F5
310 * HILDON_HARDKEY_ESC:
312 * Key definition for the Esc hardkey.
314 #define HILDON_HARDKEY_ESC GDK_Escape
317 * HILDON_HARDKEY_FULLSCREEN:
319 * Key definition for the Fullscreen hardkey.
321 #define HILDON_HARDKEY_FULLSCREEN GDK_F6
324 * HILDON_HARDKEY_INCREASE:
326 * Key definition for the Increase hardkey.
328 #define HILDON_HARDKEY_INCREASE GDK_F7
331 * HILDON_HARDKEY_DECREASE:
333 * Key definition for the Decrease hardkey.
335 #define HILDON_HARDKEY_DECREASE GDK_F8
338 hildon_get_icon_pixel_size (GtkIconSize size);
342 #endif /* HILDON_DEFINES_H */