a8d9df1dfe18390108509f66e34012a7f06a375f
[hildon] / src / hildon-helper.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
7  *
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.
12  *
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.
17  *
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
21  * 02110-1301 USA
22  *
23  */
24
25 #ifndef                                         __HILDON_HELPER_H__
26 #define                                         __HILDON_HELPER_H__
27
28 #include                                        <gtk/gtkwindow.h>
29 #include                                        <gdk/gdkkeysyms.h>
30 #include                                        <gdk/gdkevents.h>
31 #include                                        "hildon-defines.h"
32
33 G_BEGIN_DECLS
34
35 typedef enum {
36    HILDON_SIZE_AUTO_WIDTH                       = 0 << 0, /* set to automatic width */
37    HILDON_SIZE_HALFSCREEN_WIDTH                 = 1 << 0, /* set to 50% screen width */
38    HILDON_SIZE_FULLSCREEN_WIDTH                 = 2 << 0, /* set to 100% screen width */
39    HILDON_SIZE_AUTO_HEIGHT                      = 0 << 2, /* set to automatic height */
40    HILDON_SIZE_FINGER_HEIGHT                    = 1 << 2, /* set to finger height */
41    HILDON_SIZE_THUMB_HEIGHT                     = 2 << 2, /* set to thumb height */
42    HILDON_SIZE_AUTO                             = (HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_AUTO_HEIGHT)
43 }                                               HildonSizeType;
44
45 gulong
46 hildon_helper_set_logical_font                  (GtkWidget *widget, 
47                                                  const gchar *logicalfontname);
48
49 gulong
50 hildon_helper_set_logical_color                 (GtkWidget *widget, 
51                                                  GtkRcFlags rcflags,
52                                                  GtkStateType state, 
53                                                  const gchar *logicalcolorname);
54 gboolean 
55 hildon_helper_event_button_is_finger            (GdkEventButton *event);
56
57 void
58 hildon_helper_set_insensitive_message           (GtkWidget *widget,
59                                                  const gchar *message);
60
61 void
62 hildon_helper_set_insensitive_messagef          (GtkWidget *widget,
63                                                  const gchar *format,
64                                                  ...);
65
66 void
67 hildon_helper_set_thumb_scrollbar               (GtkScrolledWindow *win, 
68                                                  gboolean thumb);
69
70 void
71 hildon_helper_set_theme_size                    (GtkWidget       *button,
72                                                  HildonSizeType   size);
73
74 G_END_DECLS
75
76 #endif                                          /* __HILDON_HELPER_H__ */
77