Irreco for N900 (Maemo 5) update. Push for 0.8.* changes.
[irreco.git] / irreco / src / core / irreco_window.h
blob1fd56d85a3caf7ae9be0cae44ad26ea0e04e1adf
1 /*
2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
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 General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 /**
21 * @addtogroup IrrecoWindow
22 * @{
25 /**
26 * @file
27 * Header file of @ref IrrecoWindow.
30 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
31 /* Typedef */
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 * Make sure that typedefs are available before we include anything elese.
36 * This makes sure that whatever other structures that depend on structures
37 * defined in this file will compile OK recardles of header inclusion order.
39 #ifndef __IRRECO_WINDOW_H_TYPEDEF__
40 #define __IRRECO_WINDOW_H_TYPEDEF__
42 #define IRRECO_TYPE_WINDOW irreco_window_get_type()
44 #define IRRECO_WINDOW(obj) \
45 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
46 IRRECO_TYPE_WINDOW, IrrecoWindow))
48 #define IRRECO_WINDOW_CLASS(klass) \
49 (G_TYPE_CHECK_CLASS_CAST ((klass), \
50 IRRECO_TYPE_WINDOW, IrrecoWindowClass))
52 #define IRRECO_IS_WINDOW(obj) \
53 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
54 IRRECO_TYPE_WINDOW))
56 #define IRRECO_IS_WINDOW_CLASS(klass) \
57 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
58 IRRECO_TYPE_WINDOW))
60 #define IRRECO_WINDOW_GET_CLASS(obj) \
61 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
62 IRRECO_TYPE_WINDOW, IrrecoWindowClass))
64 typedef struct _IrrecoWindow IrrecoWindow;
65 typedef struct _IrrecoWindowClass IrrecoWindowClass;
67 #endif /* __IRRECO_WINDOW_H_TYPEDEF__ */
71 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
72 /* Include */
73 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
74 #ifndef __IRRECO_WINDOW_H__
75 #define __IRRECO_WINDOW_H__
76 #include "irreco.h"
77 #include <hildon/hildon-pannable-area.h>
80 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
81 /* Datatypes */
82 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
84 struct _IrrecoWindow {
85 HildonWindow parent;
87 GtkWidget *layout;
88 GtkWidget *scrolled_window;
89 GtkWidget *event_box;
92 struct _IrrecoWindowClass{
93 HildonWindowClass parent_class;
98 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
99 /* Macro */
100 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
102 #define irreco_window_get_gtk_window(irreco_window) \
103 (GTK_WINDOW((irreco_window)))
105 #define irreco_window_get_gdk_window(irreco_window) \
106 ((irreco_window)->window)
108 #define irreco_window_create() \
109 IRRECO_WINDOW(irreco_window_new())
111 #define irreco_window_destroy(_window) \
112 gtk_widget_destroy(GTK_WIDGET(_window))
116 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
117 /* Prototypes */
118 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
119 GType irreco_window_get_type ();
120 GtkWidget* irreco_window_new ();
123 gboolean irreco_window_set_background_image(IrrecoWindow *self,
124 const GdkColor * color,
125 const gchar * image1,
126 const gchar * image2);
127 void irreco_window_set_background_buf(IrrecoWindow *self,
128 const GdkColor * color,
129 GdkPixbuf * pixbuf1,
130 GdkPixbuf * pixbuf2);
131 void irreco_window_get_scroll_offset(IrrecoWindow *self,
132 gdouble *x, gdouble *y);
133 void irreco_window_scroll_visible(IrrecoWindow *self, gdouble x, gdouble y);
134 gboolean irreco_window_is_fullscreen(IrrecoWindow *self);
135 void irreco_window_toggle_fullscreen(IrrecoWindow *self);
136 void irreco_window_scrollbar_hide(IrrecoWindow *self);
137 void irreco_window_scrollbar_show(IrrecoWindow *self);
140 #endif /* __IRRECO_WINDOW_H__ */
142 /** @} */