| 1 |
/* |
| 2 |
* This file is a part of hildon |
| 3 |
* |
| 4 |
* Copyright (C) 2008, 2009 Nokia Corporation, all rights reserved. |
| 5 |
* |
| 6 |
* This program is free software; you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU Lesser Public License as published by |
| 8 |
* the Free Software Foundation; version 2 of the license. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU Lesser Public License for more details. |
| 14 |
* |
| 15 |
*/ |
| 16 |
|
| 17 |
#ifndef __HILDON_GTK_H__ |
| 18 |
#define __HILDON_GTK_H__ |
| 19 |
|
| 20 |
#include <gtk/gtk.h> |
| 21 |
|
| 22 |
G_BEGIN_DECLS |
| 23 |
|
| 24 |
GtkWidget * |
| 25 |
hildon_gtk_menu_new (void); |
| 26 |
|
| 27 |
GtkWidget * |
| 28 |
hildon_gtk_button_new (HildonSizeType size); |
| 29 |
|
| 30 |
GtkWidget * |
| 31 |
hildon_gtk_toggle_button_new (HildonSizeType size); |
| 32 |
|
| 33 |
GtkWidget * |
| 34 |
hildon_gtk_radio_button_new (HildonSizeType size, |
| 35 |
GSList *group); |
| 36 |
|
| 37 |
GtkWidget * |
| 38 |
hildon_gtk_radio_button_new_from_widget (HildonSizeType size, |
| 39 |
GtkRadioButton *radio_group_member); |
| 40 |
|
| 41 |
#ifdef MAEMO_GTK |
| 42 |
GtkWidget * |
| 43 |
hildon_gtk_tree_view_new (HildonUIMode mode); |
| 44 |
|
| 45 |
GtkWidget * |
| 46 |
hildon_gtk_tree_view_new_with_model (HildonUIMode mode, |
| 47 |
GtkTreeModel *model); |
| 48 |
|
| 49 |
void |
| 50 |
hildon_gtk_tree_view_set_ui_mode (GtkTreeView *treeview, |
| 51 |
HildonUIMode mode); |
| 52 |
|
| 53 |
GtkWidget * |
| 54 |
hildon_gtk_icon_view_new (HildonUIMode mode); |
| 55 |
|
| 56 |
GtkWidget * |
| 57 |
hildon_gtk_icon_view_new_with_model (HildonUIMode mode, |
| 58 |
GtkTreeModel *model); |
| 59 |
|
| 60 |
void |
| 61 |
hildon_gtk_icon_view_set_ui_mode (GtkIconView *iconview, |
| 62 |
HildonUIMode mode); |
| 63 |
#endif /* MAEMO_GTK */ |
| 64 |
|
| 65 |
void |
| 66 |
hildon_gtk_window_set_progress_indicator (GtkWindow *window, |
| 67 |
guint state); |
| 68 |
|
| 69 |
void |
| 70 |
hildon_gtk_window_set_do_not_disturb (GtkWindow *window, |
| 71 |
gboolean dndflag); |
| 72 |
|
| 73 |
/** |
| 74 |
* HildonPortraitFlags: |
| 75 |
* |
| 76 |
* These flags are used to tell the window manager whether the current |
| 77 |
* window needs to be in portrait or landscape mode. |
| 78 |
* |
| 79 |
* If no flags are set then the window is meant to be used in |
| 80 |
* landscape mode only. |
| 81 |
* |
| 82 |
* If %HILDON_PORTRAIT_MODE_REQUEST is set then the window is meant to |
| 83 |
* be used in portrait mode only. |
| 84 |
* |
| 85 |
* If only %HILDON_PORTRAIT_MODE_SUPPORT is set then the current |
| 86 |
* orientation will be kept, no matter if it's portrait or landscape. |
| 87 |
* |
| 88 |
* It is important to note that, while these flags can be used to |
| 89 |
* change between portrait and landscape according to the physical |
| 90 |
* orientation of the display, Hildon does not provide any method to |
| 91 |
* obtain this information. |
| 92 |
**/ |
| 93 |
typedef enum { |
| 94 |
HILDON_PORTRAIT_MODE_REQUEST = 1 << 0, |
| 95 |
HILDON_PORTRAIT_MODE_SUPPORT = 1 << 1 |
| 96 |
} HildonPortraitFlags; |
| 97 |
|
| 98 |
void |
| 99 |
hildon_gtk_window_set_portrait_flags (GtkWindow *window, |
| 100 |
HildonPortraitFlags portrait_flags); |
| 101 |
|
| 102 |
void |
| 103 |
hildon_gtk_window_take_screenshot (GtkWindow *window, |
| 104 |
gboolean take); |
| 105 |
void |
| 106 |
hildon_gtk_window_take_screenshot_sync (GtkWindow *window, |
| 107 |
gboolean take); |
| 108 |
|
| 109 |
void |
| 110 |
hildon_gtk_window_enable_zoom_keys (GtkWindow *window, |
| 111 |
gboolean enable); |
| 112 |
|
| 113 |
GtkWidget* |
| 114 |
hildon_gtk_hscale_new (void); |
| 115 |
|
| 116 |
GtkWidget* |
| 117 |
hildon_gtk_vscale_new (void); |
| 118 |
|
| 119 |
G_END_DECLS |
| 120 |
|
| 121 |
#endif /* __HILDON_GTK_H__ */ |