2 * This file is a part of hildon
4 * Copyright (C) 2006 Nokia Corporation, all rights reserved.
6 * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@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 <glib-object.h>
30 #include <gtk/gtkwindow.h>
31 #include <gtk/gtkmenu.h>
32 #include <gtk/gtktoolbar.h>
35 #include "hildon-defines.h"
39 #define HILDON_WINDOW_LONG_PRESS_TIME 800 /* in ms */
41 #define HILDON_TYPE_WINDOW \
42 (hildon_window_get_type())
44 #define HILDON_WINDOW(obj) \
45 (GTK_CHECK_CAST (obj, HILDON_TYPE_WINDOW, HildonWindow))
47 #define HILDON_WINDOW_CLASS(klass) \
48 (GTK_CHECK_CLASS_CAST ((klass),\
49 HILDON_TYPE_WINDOW, HildonWindowClass))
51 #define HILDON_IS_WINDOW(obj) \
52 (GTK_CHECK_TYPE (obj, HILDON_TYPE_WINDOW))
54 #define HILDON_IS_WINDOW_CLASS(klass) \
55 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_WINDOW))
57 #define HILDON_WINDOW_GET_CLASS(obj) \
58 ((HildonWindowClass *) G_OBJECT_GET_CLASS(obj))
60 typedef struct _HildonWindow HildonWindow;
62 typedef struct _HildonWindowClass HildonWindowClass;
66 HILDON_WINDOW_CO_COPY,
68 HILDON_WINDOW_CO_PASTE
69 } HildonWindowClipboardOperation;
76 struct _HildonWindowClass
78 GtkWindowClass parent_class;
80 /* opera hacks for clip board operation */
81 void (*clipboard_operation)(HildonWindow *hwindow, int operation);
82 void (*unset_program)(HildonWindow *hwindow);
83 gboolean (*toggle_menu)(HildonWindow * self, guint button, guint32 time);
84 /* Padding for future extension */
85 void (*_hildon_reserved1)(void);
89 hildon_window_get_type (void);
92 hildon_window_new (void);
95 hildon_window_add_with_scrollbar (HildonWindow *self,
99 hildon_window_get_menu (HildonWindow *self);
102 hildon_window_set_main_menu (HildonWindow *self,
105 #ifndef HILDON_DISABLE_DEPRECATED
107 hildon_window_set_menu (HildonWindow *self,
112 hildon_window_add_toolbar (HildonWindow *self,
113 GtkToolbar *toolbar);
116 hildon_window_remove_toolbar (HildonWindow *self,
117 GtkToolbar *toolbar);
120 hildon_window_get_is_topmost (HildonWindow *self);
124 #endif /* __HILDON_WINDOW_H__ */