| 1 |
/* |
| 2 |
* This file is a part of hildon |
| 3 |
* |
| 4 |
* Copyright (C) 2006 Nokia Corporation, all rights reserved. |
| 5 |
* |
| 6 |
* Contact: Rodrigo Novo <rodrigo.novo@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_WINDOW_H__ |
| 26 |
#define __HILDON_WINDOW_H__ |
| 27 |
|
| 28 |
#include <gtk/gtk.h> |
| 29 |
#include "hildon-app-menu.h" |
| 30 |
#include "hildon-edit-toolbar.h" |
| 31 |
|
| 32 |
G_BEGIN_DECLS |
| 33 |
|
| 34 |
#ifndef HILDON_DISABLE_DEPRECATED |
| 35 |
/** |
| 36 |
* HILDON_WINDOW_LONG_PRESS_TIME: |
| 37 |
* |
| 38 |
* Time (in miliseconds) after which a hardware key press is |
| 39 |
* considered a long press. |
| 40 |
* |
| 41 |
* Deprecated: Hildon 2.2: this value is only meant to be used |
| 42 |
* internally by Hildon. |
| 43 |
*/ |
| 44 |
#define HILDON_WINDOW_LONG_PRESS_TIME 800 |
| 45 |
#endif |
| 46 |
|
| 47 |
#define HILDON_TYPE_WINDOW \ |
| 48 |
(hildon_window_get_type()) |
| 49 |
|
| 50 |
#define HILDON_WINDOW(obj) \ |
| 51 |
(G_TYPE_CHECK_INSTANCE_CAST (obj, \ |
| 52 |
HILDON_TYPE_WINDOW, HildonWindow)) |
| 53 |
|
| 54 |
#define HILDON_WINDOW_CLASS(klass) \ |
| 55 |
(G_TYPE_CHECK_CLASS_CAST ((klass),\ |
| 56 |
HILDON_TYPE_WINDOW, HildonWindowClass)) |
| 57 |
|
| 58 |
#define HILDON_IS_WINDOW(obj) \ |
| 59 |
(G_TYPE_CHECK_INSTANCE_TYPE (obj, HILDON_TYPE_WINDOW)) |
| 60 |
|
| 61 |
#define HILDON_IS_WINDOW_CLASS(klass) \ |
| 62 |
(G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_WINDOW)) |
| 63 |
|
| 64 |
#define HILDON_WINDOW_GET_CLASS(obj) \ |
| 65 |
((HildonWindowClass *) G_OBJECT_GET_CLASS(obj)) |
| 66 |
|
| 67 |
typedef struct _HildonWindow HildonWindow; |
| 68 |
|
| 69 |
typedef struct _HildonWindowClass HildonWindowClass; |
| 70 |
|
| 71 |
#ifndef HILDON_DISABLE_DEPRECATED |
| 72 |
/** |
| 73 |
* HildonWindowClipboardOperation: |
| 74 |
* |
| 75 |
* Deprecated: Hildon 2.2: this value is only meant to be used |
| 76 |
* internally by Hildon |
| 77 |
*/ |
| 78 |
typedef enum |
| 79 |
{ |
| 80 |
HILDON_WINDOW_CO_COPY, |
| 81 |
HILDON_WINDOW_CO_CUT, |
| 82 |
HILDON_WINDOW_CO_PASTE |
| 83 |
} HildonWindowClipboardOperation; |
| 84 |
#endif /* HILDON_DISABLE_DEPRECATED */ |
| 85 |
|
| 86 |
struct _HildonWindow |
| 87 |
{ |
| 88 |
GtkWindow parent; |
| 89 |
}; |
| 90 |
|
| 91 |
struct _HildonWindowClass |
| 92 |
{ |
| 93 |
GtkWindowClass parent_class; |
| 94 |
|
| 95 |
/* opera hacks for clip board operation */ |
| 96 |
void (*clipboard_operation)(HildonWindow *hwindow, int operation); |
| 97 |
gboolean (*toggle_menu)(HildonWindow * self, guint button, guint32 time); |
| 98 |
/* Padding for future extension */ |
| 99 |
void (*_hildon_reserved1)(void); |
| 100 |
void (*_hildon_reserved2)(void); |
| 101 |
}; |
| 102 |
|
| 103 |
GType G_GNUC_CONST |
| 104 |
hildon_window_get_type (void); |
| 105 |
|
| 106 |
GtkWidget* |
| 107 |
hildon_window_new (void); |
| 108 |
|
| 109 |
void |
| 110 |
hildon_window_add_with_scrollbar (HildonWindow *self, |
| 111 |
GtkWidget *child); |
| 112 |
|
| 113 |
void |
| 114 |
hildon_window_set_main_menu (HildonWindow *self, |
| 115 |
GtkMenu *menu); |
| 116 |
|
| 117 |
GtkMenu* |
| 118 |
hildon_window_get_main_menu (HildonWindow *self); |
| 119 |
|
| 120 |
void |
| 121 |
hildon_window_set_app_menu (HildonWindow *self, |
| 122 |
HildonAppMenu *menu); |
| 123 |
|
| 124 |
HildonAppMenu * |
| 125 |
hildon_window_get_app_menu (HildonWindow *self); |
| 126 |
|
| 127 |
#ifndef HILDON_DISABLE_DEPRECATED |
| 128 |
void |
| 129 |
hildon_window_set_menu (HildonWindow *self, |
| 130 |
GtkMenu *menu); |
| 131 |
|
| 132 |
GtkMenu* |
| 133 |
hildon_window_get_menu (HildonWindow *self); |
| 134 |
#endif |
| 135 |
|
| 136 |
void |
| 137 |
hildon_window_add_toolbar (HildonWindow *self, |
| 138 |
GtkToolbar *toolbar); |
| 139 |
|
| 140 |
void |
| 141 |
hildon_window_remove_toolbar (HildonWindow *self, |
| 142 |
GtkToolbar *toolbar); |
| 143 |
|
| 144 |
void |
| 145 |
hildon_window_set_edit_toolbar (HildonWindow *self, |
| 146 |
HildonEditToolbar *toolbar); |
| 147 |
|
| 148 |
gboolean |
| 149 |
hildon_window_get_is_topmost (HildonWindow *self); |
| 150 |
|
| 151 |
const gchar * |
| 152 |
hildon_window_get_markup (HildonWindow *window); |
| 153 |
|
| 154 |
void |
| 155 |
hildon_window_set_markup (HildonWindow *window, |
| 156 |
const gchar *markup); |
| 157 |
|
| 158 |
G_END_DECLS |
| 159 |
|
| 160 |
#endif /* __HILDON_WINDOW_H__ */ |