2 * This file is a part of hildon
4 * Copyright (C) 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
25 #ifndef __HILDON_WINDOW_H__
26 #define __HILDON_WINDOW_H__
29 #include "hildon-app-menu.h"
30 #include "hildon-edit-toolbar.h"
34 #ifndef HILDON_DISABLE_DEPRECATED
36 * HILDON_WINDOW_LONG_PRESS_TIME:
38 * Time (in miliseconds) after which a hardware key press is
39 * considered a long press.
41 * Deprecated: Hildon 2.2: this value is only meant to be used
42 * internally by Hildon.
44 #define HILDON_WINDOW_LONG_PRESS_TIME 800
47 #define HILDON_TYPE_WINDOW \
48 (hildon_window_get_type())
50 #define HILDON_WINDOW(obj) \
51 (G_TYPE_CHECK_INSTANCE_CAST (obj, \
52 HILDON_TYPE_WINDOW, HildonWindow))
54 #define HILDON_WINDOW_CLASS(klass) \
55 (G_TYPE_CHECK_CLASS_CAST ((klass),\
56 HILDON_TYPE_WINDOW, HildonWindowClass))
58 #define HILDON_IS_WINDOW(obj) \
59 (G_TYPE_CHECK_INSTANCE_TYPE (obj, HILDON_TYPE_WINDOW))
61 #define HILDON_IS_WINDOW_CLASS(klass) \
62 (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_WINDOW))
64 #define HILDON_WINDOW_GET_CLASS(obj) \
65 ((HildonWindowClass *) G_OBJECT_GET_CLASS(obj))
67 typedef struct _HildonWindow HildonWindow;
69 typedef struct _HildonWindowClass HildonWindowClass;
73 HILDON_WINDOW_CO_COPY,
75 HILDON_WINDOW_CO_PASTE
76 } HildonWindowClipboardOperation;
83 struct _HildonWindowClass
85 GtkWindowClass parent_class;
87 /* opera hacks for clip board operation */
88 void (*clipboard_operation)(HildonWindow *hwindow, int operation);
89 gboolean (*toggle_menu)(HildonWindow * self, guint button, guint32 time);
90 /* Padding for future extension */
91 void (*_hildon_reserved1)(void);
92 void (*_hildon_reserved2)(void);
96 hildon_window_get_type (void);
99 hildon_window_new (void);
102 hildon_window_add_with_scrollbar (HildonWindow *self,
106 hildon_window_set_main_menu (HildonWindow *self,
110 hildon_window_get_main_menu (HildonWindow *self);
113 hildon_window_set_app_menu (HildonWindow *self,
114 HildonAppMenu *menu);
117 hildon_window_get_app_menu (HildonWindow *self);
119 #ifndef HILDON_DISABLE_DEPRECATED
121 hildon_window_set_menu (HildonWindow *self,
125 hildon_window_get_menu (HildonWindow *self);
129 hildon_window_add_toolbar (HildonWindow *self,
130 GtkToolbar *toolbar);
133 hildon_window_remove_toolbar (HildonWindow *self,
134 GtkToolbar *toolbar);
137 hildon_window_set_edit_toolbar (HildonWindow *self,
138 HildonEditToolbar *toolbar);
141 hildon_window_get_is_topmost (HildonWindow *self);
144 hildon_window_get_markup (HildonWindow *window);
147 hildon_window_set_markup (HildonWindow *window,
148 const gchar *markup);
152 #endif /* __HILDON_WINDOW_H__ */