~ubuntu-branches/ubuntu/quantal/pdf-presenter-console/quantal

« back to all changes in this revision

Viewing changes to c-src/classes/window/fullscreen.c

  • Committer: Package Import Robot
  • Author(s): Barak A. Pearlmutter
  • Date: 2012-06-27 12:13:08 UTC
  • mfrom: (3.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20120627121308-1o56k7h3o1xl1ta3
Tags: 3.1-1
* Move man page tweak to quilt patch
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#include <gdk/gdk.h>
9
9
 
10
10
 
11
 
#define ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN (org_westhoffswelt_pdfpresenter_window_fullscreen_get_type ())
12
 
#define ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_FULLSCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN, orgwesthoffsweltpdfpresenterWindowFullscreen))
13
 
#define ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_FULLSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN, orgwesthoffsweltpdfpresenterWindowFullscreenClass))
14
 
#define ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_IS_FULLSCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN))
15
 
#define ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_IS_FULLSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN))
16
 
#define ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_FULLSCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN, orgwesthoffsweltpdfpresenterWindowFullscreenClass))
 
11
#define PDFPC_WINDOW_TYPE_FULLSCREEN (pdfpc_window_fullscreen_get_type ())
 
12
#define PDFPC_WINDOW_FULLSCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_FULLSCREEN, pdfpcWindowFullscreen))
 
13
#define PDFPC_WINDOW_FULLSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_FULLSCREEN, pdfpcWindowFullscreenClass))
 
14
#define PDFPC_WINDOW_IS_FULLSCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_FULLSCREEN))
 
15
#define PDFPC_WINDOW_IS_FULLSCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_FULLSCREEN))
 
16
#define PDFPC_WINDOW_FULLSCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_FULLSCREEN, pdfpcWindowFullscreenClass))
17
17
 
18
 
typedef struct _orgwesthoffsweltpdfpresenterWindowFullscreen orgwesthoffsweltpdfpresenterWindowFullscreen;
19
 
typedef struct _orgwesthoffsweltpdfpresenterWindowFullscreenClass orgwesthoffsweltpdfpresenterWindowFullscreenClass;
20
 
typedef struct _orgwesthoffsweltpdfpresenterWindowFullscreenPrivate orgwesthoffsweltpdfpresenterWindowFullscreenPrivate;
 
18
typedef struct _pdfpcWindowFullscreen pdfpcWindowFullscreen;
 
19
typedef struct _pdfpcWindowFullscreenClass pdfpcWindowFullscreenClass;
 
20
typedef struct _pdfpcWindowFullscreenPrivate pdfpcWindowFullscreenPrivate;
21
21
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
22
22
#define _gdk_cursor_unref0(var) ((var == NULL) ? NULL : (var = (gdk_cursor_unref (var), NULL)))
23
23
 
24
 
struct _orgwesthoffsweltpdfpresenterWindowFullscreen {
 
24
struct _pdfpcWindowFullscreen {
25
25
        GtkWindow parent_instance;
26
 
        orgwesthoffsweltpdfpresenterWindowFullscreenPrivate * priv;
 
26
        pdfpcWindowFullscreenPrivate * priv;
27
27
        GdkRectangle screen_geometry;
28
28
        guint hide_cursor_timeout;
29
29
        gboolean faded_to_black;
30
30
        gboolean frozen;
31
31
};
32
32
 
33
 
struct _orgwesthoffsweltpdfpresenterWindowFullscreenClass {
 
33
struct _pdfpcWindowFullscreenClass {
34
34
        GtkWindowClass parent_class;
35
35
};
36
36
 
37
37
 
38
 
static gpointer org_westhoffswelt_pdfpresenter_window_fullscreen_parent_class = NULL;
 
38
static gpointer pdfpc_window_fullscreen_parent_class = NULL;
 
39
extern gboolean pdfpc_options_windowed;
39
40
 
40
 
GType org_westhoffswelt_pdfpresenter_window_fullscreen_get_type (void) G_GNUC_CONST;
 
41
GType pdfpc_window_fullscreen_get_type (void) G_GNUC_CONST;
41
42
enum  {
42
 
        ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_FULLSCREEN_DUMMY_PROPERTY
 
43
        PDFPC_WINDOW_FULLSCREEN_DUMMY_PROPERTY
43
44
};
44
 
orgwesthoffsweltpdfpresenterWindowFullscreen* org_westhoffswelt_pdfpresenter_window_fullscreen_new (gint screen_num);
45
 
orgwesthoffsweltpdfpresenterWindowFullscreen* org_westhoffswelt_pdfpresenter_window_fullscreen_construct (GType object_type, gint screen_num);
46
 
void org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate (orgwesthoffsweltpdfpresenterWindowFullscreen* self, GtkWidget* source, GdkRectangle* r);
47
 
static void _org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender, GdkRectangle* allocation, gpointer self);
48
 
gboolean org_westhoffswelt_pdfpresenter_window_fullscreen_on_mouse_move (orgwesthoffsweltpdfpresenterWindowFullscreen* self, GtkWidget* source, GdkEventMotion* event);
49
 
static gboolean _org_westhoffswelt_pdfpresenter_window_fullscreen_on_mouse_move_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self);
50
 
void org_westhoffswelt_pdfpresenter_window_fullscreen_restart_hide_cursor_timer (orgwesthoffsweltpdfpresenterWindowFullscreen* self);
51
 
gboolean org_westhoffswelt_pdfpresenter_window_fullscreen_on_hide_cursor_timeout (orgwesthoffsweltpdfpresenterWindowFullscreen* self);
52
 
static gboolean _org_westhoffswelt_pdfpresenter_window_fullscreen_on_hide_cursor_timeout_gsource_func (gpointer self);
53
 
static void org_westhoffswelt_pdfpresenter_window_fullscreen_finalize (GObject* obj);
 
45
pdfpcWindowFullscreen* pdfpc_window_fullscreen_new (gint screen_num);
 
46
pdfpcWindowFullscreen* pdfpc_window_fullscreen_construct (GType object_type, gint screen_num);
 
47
void pdfpc_window_fullscreen_on_size_allocate (pdfpcWindowFullscreen* self, GtkWidget* source, GdkRectangle* r);
 
48
static void _pdfpc_window_fullscreen_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender, GdkRectangle* allocation, gpointer self);
 
49
gboolean pdfpc_window_fullscreen_on_configure (pdfpcWindowFullscreen* self, GdkEventConfigure* e);
 
50
static gboolean _pdfpc_window_fullscreen_on_configure_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self);
 
51
gboolean pdfpc_window_fullscreen_on_mouse_move (pdfpcWindowFullscreen* self, GtkWidget* source, GdkEventMotion* event);
 
52
static gboolean _pdfpc_window_fullscreen_on_mouse_move_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self);
 
53
void pdfpc_window_fullscreen_restart_hide_cursor_timer (pdfpcWindowFullscreen* self);
 
54
gboolean pdfpc_window_fullscreen_on_hide_cursor_timeout (pdfpcWindowFullscreen* self);
 
55
static gboolean _pdfpc_window_fullscreen_on_hide_cursor_timeout_gsource_func (gpointer self);
 
56
static void pdfpc_window_fullscreen_finalize (GObject* obj);
54
57
 
55
58
 
56
59
static gpointer _g_object_ref0 (gpointer self) {
58
61
}
59
62
 
60
63
 
61
 
static void _org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender, GdkRectangle* allocation, gpointer self) {
62
 
        org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate (self, _sender, allocation);
63
 
}
64
 
 
65
 
 
66
 
static gboolean _org_westhoffswelt_pdfpresenter_window_fullscreen_on_mouse_move_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self) {
67
 
        gboolean result;
68
 
        result = org_westhoffswelt_pdfpresenter_window_fullscreen_on_mouse_move (self, _sender, event);
69
 
        return result;
70
 
}
71
 
 
72
 
 
73
 
orgwesthoffsweltpdfpresenterWindowFullscreen* org_westhoffswelt_pdfpresenter_window_fullscreen_construct (GType object_type, gint screen_num) {
74
 
        orgwesthoffsweltpdfpresenterWindowFullscreen * self = NULL;
 
64
static void _pdfpc_window_fullscreen_on_size_allocate_gtk_widget_size_allocate (GtkWidget* _sender, GdkRectangle* allocation, gpointer self) {
 
65
        pdfpc_window_fullscreen_on_size_allocate (self, _sender, allocation);
 
66
}
 
67
 
 
68
 
 
69
static gboolean _pdfpc_window_fullscreen_on_configure_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
 
70
        gboolean result;
 
71
        result = pdfpc_window_fullscreen_on_configure (self, event);
 
72
        return result;
 
73
}
 
74
 
 
75
 
 
76
static gboolean _pdfpc_window_fullscreen_on_mouse_move_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self) {
 
77
        gboolean result;
 
78
        result = pdfpc_window_fullscreen_on_mouse_move (self, _sender, event);
 
79
        return result;
 
80
}
 
81
 
 
82
 
 
83
pdfpcWindowFullscreen* pdfpc_window_fullscreen_construct (GType object_type, gint screen_num) {
 
84
        pdfpcWindowFullscreen * self = NULL;
75
85
        GdkScreen* screen = NULL;
76
86
        gint _tmp0_;
77
 
        GdkRectangle _tmp20_;
78
 
        gint _tmp21_;
79
 
        GdkRectangle _tmp22_;
80
 
        gint _tmp23_;
81
 
        self = (orgwesthoffsweltpdfpresenterWindowFullscreen*) g_object_new (object_type, NULL);
 
87
        gboolean _tmp20_;
 
88
        self = (pdfpcWindowFullscreen*) g_object_new (object_type, NULL);
82
89
        _tmp0_ = screen_num;
83
90
        if (_tmp0_ >= 0) {
84
91
                GdkScreen* _tmp1_ = NULL;
134
141
                self->screen_geometry = _tmp19_;
135
142
                _g_object_unref0 (display);
136
143
        }
137
 
        _tmp20_ = self->screen_geometry;
138
 
        _tmp21_ = _tmp20_.x;
139
 
        _tmp22_ = self->screen_geometry;
140
 
        _tmp23_ = _tmp22_.y;
141
 
        gtk_window_move ((GtkWindow*) self, _tmp21_, _tmp23_);
142
 
        gtk_window_fullscreen ((GtkWindow*) self);
143
 
        g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) _org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate_gtk_widget_size_allocate, self, 0);
 
144
        _tmp20_ = pdfpc_options_windowed;
 
145
        if (!_tmp20_) {
 
146
                GdkRectangle _tmp21_;
 
147
                gint _tmp22_;
 
148
                GdkRectangle _tmp23_;
 
149
                gint _tmp24_;
 
150
                _tmp21_ = self->screen_geometry;
 
151
                _tmp22_ = _tmp21_.x;
 
152
                _tmp23_ = self->screen_geometry;
 
153
                _tmp24_ = _tmp23_.y;
 
154
                gtk_window_move ((GtkWindow*) self, _tmp22_, _tmp24_);
 
155
                g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) _pdfpc_window_fullscreen_on_size_allocate_gtk_widget_size_allocate, self, 0);
 
156
                g_signal_connect_object ((GtkWidget*) self, "configure-event", (GCallback) _pdfpc_window_fullscreen_on_configure_gtk_widget_configure_event, self, 0);
 
157
        } else {
 
158
                gint _tmp25_;
 
159
                gint _tmp26_;
 
160
                _tmp25_ = self->screen_geometry.width;
 
161
                self->screen_geometry.width = _tmp25_ / 2;
 
162
                _tmp26_ = self->screen_geometry.height;
 
163
                self->screen_geometry.height = _tmp26_ / 2;
 
164
                gtk_window_set_resizable ((GtkWindow*) self, FALSE);
 
165
        }
144
166
        gtk_widget_add_events ((GtkWidget*) self, (gint) GDK_POINTER_MOTION_MASK);
145
 
        g_signal_connect_object ((GtkWidget*) self, "motion-notify-event", (GCallback) _org_westhoffswelt_pdfpresenter_window_fullscreen_on_mouse_move_gtk_widget_motion_notify_event, self, 0);
146
 
        org_westhoffswelt_pdfpresenter_window_fullscreen_restart_hide_cursor_timer (self);
 
167
        g_signal_connect_object ((GtkWidget*) self, "motion-notify-event", (GCallback) _pdfpc_window_fullscreen_on_mouse_move_gtk_widget_motion_notify_event, self, 0);
 
168
        pdfpc_window_fullscreen_restart_hide_cursor_timer (self);
147
169
        _g_object_unref0 (screen);
148
170
        return self;
149
171
}
150
172
 
151
173
 
152
 
orgwesthoffsweltpdfpresenterWindowFullscreen* org_westhoffswelt_pdfpresenter_window_fullscreen_new (gint screen_num) {
153
 
        return org_westhoffswelt_pdfpresenter_window_fullscreen_construct (ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_TYPE_FULLSCREEN, screen_num);
 
174
pdfpcWindowFullscreen* pdfpc_window_fullscreen_new (gint screen_num) {
 
175
        return pdfpc_window_fullscreen_construct (PDFPC_WINDOW_TYPE_FULLSCREEN, screen_num);
 
176
}
 
177
 
 
178
 
 
179
gboolean pdfpc_window_fullscreen_on_configure (pdfpcWindowFullscreen* self, GdkEventConfigure* e) {
 
180
        gboolean result = FALSE;
 
181
        guint _tmp0_ = 0U;
 
182
        g_return_val_if_fail (self != NULL, FALSE);
 
183
        g_return_val_if_fail (e != NULL, FALSE);
 
184
        gtk_window_fullscreen ((GtkWindow*) self);
 
185
        g_signal_parse_name ("configure-event", GTK_TYPE_WIDGET, &_tmp0_, NULL, FALSE);
 
186
        g_signal_handlers_disconnect_matched ((GtkWidget*) self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _pdfpc_window_fullscreen_on_configure_gtk_widget_configure_event, self);
 
187
        result = FALSE;
 
188
        return result;
154
189
}
155
190
 
156
191
 
161
196
         * movement commands before the window has been displayed for the first
162
197
         * time.
163
198
         */
164
 
void org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate (orgwesthoffsweltpdfpresenterWindowFullscreen* self, GtkWidget* source, GdkRectangle* r) {
 
199
void pdfpc_window_fullscreen_on_size_allocate (pdfpcWindowFullscreen* self, GtkWidget* source, GdkRectangle* r) {
165
200
        gboolean _tmp0_ = FALSE;
166
201
        g_return_if_fail (self != NULL);
167
202
        g_return_if_fail (source != NULL);
182
217
                gint _tmp13_;
183
218
                GdkRectangle _tmp14_;
184
219
                gint _tmp15_;
185
 
                GdkRectangle _tmp16_;
186
 
                gint _tmp17_;
187
 
                GdkRectangle _tmp18_;
188
 
                gint _tmp19_;
189
220
                g_signal_parse_name ("size-allocate", GTK_TYPE_WIDGET, &_tmp1_, NULL, FALSE);
190
 
                g_signal_handlers_disconnect_matched ((GtkWidget*) self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _org_westhoffswelt_pdfpresenter_window_fullscreen_on_size_allocate_gtk_widget_size_allocate, self);
 
221
                g_signal_handlers_disconnect_matched ((GtkWidget*) self, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _pdfpc_window_fullscreen_on_size_allocate_gtk_widget_size_allocate, self);
191
222
                gtk_window_get_position ((GtkWindow*) self, &_tmp2_, &_tmp3_);
192
223
                x = _tmp2_;
193
224
                y = _tmp3_;
209
240
                if (_tmp11_) {
210
241
                        return;
211
242
                }
212
 
                gtk_window_unfullscreen ((GtkWindow*) self);
213
 
                gtk_window_unmaximize ((GtkWindow*) self);
214
243
                _tmp12_ = self->screen_geometry;
215
244
                _tmp13_ = _tmp12_.x;
216
245
                _tmp14_ = self->screen_geometry;
217
246
                _tmp15_ = _tmp14_.y;
218
247
                gtk_window_move ((GtkWindow*) self, _tmp13_, _tmp15_);
219
 
                _tmp16_ = self->screen_geometry;
220
 
                _tmp17_ = _tmp16_.width;
221
 
                _tmp18_ = self->screen_geometry;
222
 
                _tmp19_ = _tmp18_.height;
223
 
                gtk_window_resize ((GtkWindow*) self, _tmp17_, _tmp19_);
224
248
                gtk_window_fullscreen ((GtkWindow*) self);
225
249
        }
226
250
}
229
253
/**
230
254
         * Called every time the mouse cursor is moved
231
255
         */
232
 
gboolean org_westhoffswelt_pdfpresenter_window_fullscreen_on_mouse_move (orgwesthoffsweltpdfpresenterWindowFullscreen* self, GtkWidget* source, GdkEventMotion* event) {
 
256
gboolean pdfpc_window_fullscreen_on_mouse_move (pdfpcWindowFullscreen* self, GtkWidget* source, GdkEventMotion* event) {
233
257
        gboolean result = FALSE;
234
258
        GdkWindow* _tmp0_;
235
259
        g_return_val_if_fail (self != NULL, FALSE);
237
261
        g_return_val_if_fail (event != NULL, FALSE);
238
262
        _tmp0_ = ((GtkWidget*) self)->window;
239
263
        gdk_window_set_cursor (_tmp0_, NULL);
240
 
        org_westhoffswelt_pdfpresenter_window_fullscreen_restart_hide_cursor_timer (self);
 
264
        pdfpc_window_fullscreen_restart_hide_cursor_timer (self);
241
265
        result = FALSE;
242
266
        return result;
243
267
}
246
270
/**
247
271
         * Restart the 5 seconds timeout before hiding the mouse cursor
248
272
         */
249
 
static gboolean _org_westhoffswelt_pdfpresenter_window_fullscreen_on_hide_cursor_timeout_gsource_func (gpointer self) {
 
273
static gboolean _pdfpc_window_fullscreen_on_hide_cursor_timeout_gsource_func (gpointer self) {
250
274
        gboolean result;
251
 
        result = org_westhoffswelt_pdfpresenter_window_fullscreen_on_hide_cursor_timeout (self);
 
275
        result = pdfpc_window_fullscreen_on_hide_cursor_timeout (self);
252
276
        return result;
253
277
}
254
278
 
255
279
 
256
 
void org_westhoffswelt_pdfpresenter_window_fullscreen_restart_hide_cursor_timer (orgwesthoffsweltpdfpresenterWindowFullscreen* self) {
 
280
void pdfpc_window_fullscreen_restart_hide_cursor_timer (pdfpcWindowFullscreen* self) {
257
281
        guint _tmp0_;
258
282
        guint _tmp2_ = 0U;
259
283
        g_return_if_fail (self != NULL);
263
287
                _tmp1_ = self->hide_cursor_timeout;
264
288
                g_source_remove (_tmp1_);
265
289
        }
266
 
        _tmp2_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, _org_westhoffswelt_pdfpresenter_window_fullscreen_on_hide_cursor_timeout_gsource_func, g_object_ref (self), g_object_unref);
 
290
        _tmp2_ = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 5, _pdfpc_window_fullscreen_on_hide_cursor_timeout_gsource_func, g_object_ref (self), g_object_unref);
267
291
        self->hide_cursor_timeout = _tmp2_;
268
292
}
269
293
 
272
296
         * Timeout method called if the mouse pointer has not been moved for 5
273
297
         * seconds
274
298
         */
275
 
gboolean org_westhoffswelt_pdfpresenter_window_fullscreen_on_hide_cursor_timeout (orgwesthoffsweltpdfpresenterWindowFullscreen* self) {
 
299
gboolean pdfpc_window_fullscreen_on_hide_cursor_timeout (pdfpcWindowFullscreen* self) {
276
300
        gboolean result = FALSE;
277
301
        GdkWindow* _tmp0_;
278
302
        g_return_val_if_fail (self != NULL, FALSE);
296
320
}
297
321
 
298
322
 
299
 
static void org_westhoffswelt_pdfpresenter_window_fullscreen_class_init (orgwesthoffsweltpdfpresenterWindowFullscreenClass * klass) {
300
 
        org_westhoffswelt_pdfpresenter_window_fullscreen_parent_class = g_type_class_peek_parent (klass);
301
 
        G_OBJECT_CLASS (klass)->finalize = org_westhoffswelt_pdfpresenter_window_fullscreen_finalize;
 
323
static void pdfpc_window_fullscreen_class_init (pdfpcWindowFullscreenClass * klass) {
 
324
        pdfpc_window_fullscreen_parent_class = g_type_class_peek_parent (klass);
 
325
        G_OBJECT_CLASS (klass)->finalize = pdfpc_window_fullscreen_finalize;
302
326
}
303
327
 
304
328
 
305
 
static void org_westhoffswelt_pdfpresenter_window_fullscreen_instance_init (orgwesthoffsweltpdfpresenterWindowFullscreen * self) {
 
329
static void pdfpc_window_fullscreen_instance_init (pdfpcWindowFullscreen * self) {
306
330
        self->hide_cursor_timeout = (guint) 0;
307
331
        self->faded_to_black = FALSE;
308
332
        self->frozen = FALSE;
309
333
}
310
334
 
311
335
 
312
 
static void org_westhoffswelt_pdfpresenter_window_fullscreen_finalize (GObject* obj) {
313
 
        orgwesthoffsweltpdfpresenterWindowFullscreen * self;
314
 
        self = ORG_WESTHOFFSWELT_PDFPRESENTER_WINDOW_FULLSCREEN (obj);
315
 
        G_OBJECT_CLASS (org_westhoffswelt_pdfpresenter_window_fullscreen_parent_class)->finalize (obj);
 
336
static void pdfpc_window_fullscreen_finalize (GObject* obj) {
 
337
        pdfpcWindowFullscreen * self;
 
338
        self = PDFPC_WINDOW_FULLSCREEN (obj);
 
339
        G_OBJECT_CLASS (pdfpc_window_fullscreen_parent_class)->finalize (obj);
316
340
}
317
341
 
318
342
 
323
347
     * Methods to specify the monitor to be displayed on in a multi-head setup
324
348
     * are provided as well.
325
349
     */
326
 
GType org_westhoffswelt_pdfpresenter_window_fullscreen_get_type (void) {
327
 
        static volatile gsize org_westhoffswelt_pdfpresenter_window_fullscreen_type_id__volatile = 0;
328
 
        if (g_once_init_enter (&org_westhoffswelt_pdfpresenter_window_fullscreen_type_id__volatile)) {
329
 
                static const GTypeInfo g_define_type_info = { sizeof (orgwesthoffsweltpdfpresenterWindowFullscreenClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) org_westhoffswelt_pdfpresenter_window_fullscreen_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (orgwesthoffsweltpdfpresenterWindowFullscreen), 0, (GInstanceInitFunc) org_westhoffswelt_pdfpresenter_window_fullscreen_instance_init, NULL };
330
 
                GType org_westhoffswelt_pdfpresenter_window_fullscreen_type_id;
331
 
                org_westhoffswelt_pdfpresenter_window_fullscreen_type_id = g_type_register_static (GTK_TYPE_WINDOW, "orgwesthoffsweltpdfpresenterWindowFullscreen", &g_define_type_info, 0);
332
 
                g_once_init_leave (&org_westhoffswelt_pdfpresenter_window_fullscreen_type_id__volatile, org_westhoffswelt_pdfpresenter_window_fullscreen_type_id);
 
350
GType pdfpc_window_fullscreen_get_type (void) {
 
351
        static volatile gsize pdfpc_window_fullscreen_type_id__volatile = 0;
 
352
        if (g_once_init_enter (&pdfpc_window_fullscreen_type_id__volatile)) {
 
353
                static const GTypeInfo g_define_type_info = { sizeof (pdfpcWindowFullscreenClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_window_fullscreen_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcWindowFullscreen), 0, (GInstanceInitFunc) pdfpc_window_fullscreen_instance_init, NULL };
 
354
                GType pdfpc_window_fullscreen_type_id;
 
355
                pdfpc_window_fullscreen_type_id = g_type_register_static (GTK_TYPE_WINDOW, "pdfpcWindowFullscreen", &g_define_type_info, 0);
 
356
                g_once_init_leave (&pdfpc_window_fullscreen_type_id__volatile, pdfpc_window_fullscreen_type_id);
333
357
        }
334
 
        return org_westhoffswelt_pdfpresenter_window_fullscreen_type_id__volatile;
 
358
        return pdfpc_window_fullscreen_type_id__volatile;
335
359
}
336
360
 
337
361