summaryrefslogtreecommitdiff
path: root/plugins/common/WebAuthenticationPane.c
blob: 14900454956054d21cbcbc52d66a28adf3736b94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
/* WebAuthenticationPane.c generated by valac 0.34.4, the Vala compiler
 * generated from WebAuthenticationPane.vala, do not modify */

/* Copyright 2016 Jens Georg <mail@jensge.org>
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */

#include <glib.h>
#include <glib-object.h>
#include "shotwell-plugin-dev-1.0.h"
#include <stdlib.h>
#include <string.h>
#include <webkit2/webkit2.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>


#define SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE (shotwell_plugins_common_web_authentication_pane_get_type ())
#define SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane))
#define SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPaneClass))
#define SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE))
#define SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE))
#define SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPaneClass))

typedef struct _ShotwellPluginsCommonWebAuthenticationPane ShotwellPluginsCommonWebAuthenticationPane;
typedef struct _ShotwellPluginsCommonWebAuthenticationPaneClass ShotwellPluginsCommonWebAuthenticationPaneClass;
typedef struct _ShotwellPluginsCommonWebAuthenticationPanePrivate ShotwellPluginsCommonWebAuthenticationPanePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ShotwellPluginsCommonWebAuthenticationPane {
	GObject parent_instance;
	ShotwellPluginsCommonWebAuthenticationPanePrivate * priv;
};

struct _ShotwellPluginsCommonWebAuthenticationPaneClass {
	GObjectClass parent_class;
	void (*on_page_load) (ShotwellPluginsCommonWebAuthenticationPane* self);
};

struct _ShotwellPluginsCommonWebAuthenticationPanePrivate {
	SpitPublishingDialogPaneGeometryOptions _preferred_geometry;
	gchar* _login_uri;
	WebKitWebView* webview;
};


static gpointer shotwell_plugins_common_web_authentication_pane_parent_class = NULL;
static SpitPublishingDialogPaneIface* shotwell_plugins_common_web_authentication_pane_spit_publishing_dialog_pane_parent_iface = NULL;

GType shotwell_plugins_common_web_authentication_pane_get_type (void) G_GNUC_CONST;
#define SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPanePrivate))
enum  {
	SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_DUMMY_PROPERTY,
	SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_PREFERRED_GEOMETRY,
	SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_LOGIN_URI
};
static void shotwell_plugins_common_web_authentication_pane_real_constructed (GObject* base);
static void shotwell_plugins_common_web_authentication_pane_on_page_load_changed (ShotwellPluginsCommonWebAuthenticationPane* self, WebKitLoadEvent load_event);
static void _shotwell_plugins_common_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender, WebKitLoadEvent load_event, gpointer self);
static gboolean __lambda4_ (ShotwellPluginsCommonWebAuthenticationPane* self);
static gboolean ___lambda4__webkit_web_view_context_menu (WebKitWebView* _sender, WebKitContextMenu* context_menu, GdkEvent* event, WebKitHitTestResult* hit_test_result, gpointer self);
void shotwell_plugins_common_web_authentication_pane_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* self);
static void shotwell_plugins_common_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* self);
void shotwell_plugins_common_web_authentication_pane_set_cursor (ShotwellPluginsCommonWebAuthenticationPane* self, GdkCursorType type);
WebKitWebView* shotwell_plugins_common_web_authentication_pane_get_view (ShotwellPluginsCommonWebAuthenticationPane* self);
static SpitPublishingDialogPaneGeometryOptions shotwell_plugins_common_web_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base);
SpitPublishingDialogPaneGeometryOptions shotwell_plugins_common_web_authentication_pane_get_preferred_geometry (ShotwellPluginsCommonWebAuthenticationPane* self);
static GtkWidget* shotwell_plugins_common_web_authentication_pane_real_get_widget (SpitPublishingDialogPane* base);
static void shotwell_plugins_common_web_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base);
gchar* shotwell_plugins_common_web_authentication_pane_get_login_uri (ShotwellPluginsCommonWebAuthenticationPane* self);
static void shotwell_plugins_common_web_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base);
ShotwellPluginsCommonWebAuthenticationPane* shotwell_plugins_common_web_authentication_pane_construct (GType object_type);
static void shotwell_plugins_common_web_authentication_pane_set_preferred_geometry (ShotwellPluginsCommonWebAuthenticationPane* self, SpitPublishingDialogPaneGeometryOptions value);
static void shotwell_plugins_common_web_authentication_pane_set_login_uri (ShotwellPluginsCommonWebAuthenticationPane* self, const gchar* value);
static void shotwell_plugins_common_web_authentication_pane_finalize (GObject* obj);
static void _vala_shotwell_plugins_common_web_authentication_pane_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_shotwell_plugins_common_web_authentication_pane_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void _shotwell_plugins_common_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender, WebKitLoadEvent load_event, gpointer self) {
#line 24 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	shotwell_plugins_common_web_authentication_pane_on_page_load_changed ((ShotwellPluginsCommonWebAuthenticationPane*) self, load_event);
#line 87 "WebAuthenticationPane.c"
}


static gboolean __lambda4_ (ShotwellPluginsCommonWebAuthenticationPane* self) {
	gboolean result = FALSE;
#line 25 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	result = FALSE;
#line 25 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 97 "WebAuthenticationPane.c"
}


static gboolean ___lambda4__webkit_web_view_context_menu (WebKitWebView* _sender, WebKitContextMenu* context_menu, GdkEvent* event, WebKitHitTestResult* hit_test_result, gpointer self) {
	gboolean result;
	result = __lambda4_ ((ShotwellPluginsCommonWebAuthenticationPane*) self);
#line 25 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 106 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_real_constructed (GObject* base) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
	WebKitWebView* _tmp0_ = NULL;
	WebKitWebView* _tmp1_ = NULL;
	WebKitSettings* _tmp2_ = NULL;
	WebKitWebView* _tmp3_ = NULL;
	WebKitWebView* _tmp4_ = NULL;
#line 18 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 19 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	G_OBJECT_CLASS (shotwell_plugins_common_web_authentication_pane_parent_class)->constructed (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject));
#line 21 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = (WebKitWebView*) webkit_web_view_new ();
#line 21 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_object_ref_sink (_tmp0_);
#line 21 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_object_unref0 (self->priv->webview);
#line 21 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self->priv->webview = _tmp0_;
#line 22 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = self->priv->webview;
#line 22 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp2_ = webkit_web_view_get_settings (_tmp1_);
#line 22 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	webkit_settings_set_enable_plugins (_tmp2_, FALSE);
#line 24 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp3_ = self->priv->webview;
#line 24 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_signal_connect_object (_tmp3_, "load-changed", (GCallback) _shotwell_plugins_common_web_authentication_pane_on_page_load_changed_webkit_web_view_load_changed, self, 0);
#line 25 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp4_ = self->priv->webview;
#line 25 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_signal_connect_object (_tmp4_, "context-menu", (GCallback) ___lambda4__webkit_web_view_context_menu, self, 0);
#line 143 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_real_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* self) {
#line 28 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_critical ("Type `%s' does not implement abstract method `shotwell_plugins_common_web_authentication_pane_on_page_load'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 28 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return;
#line 152 "WebAuthenticationPane.c"
}


void shotwell_plugins_common_web_authentication_pane_on_page_load (ShotwellPluginsCommonWebAuthenticationPane* self) {
#line 28 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self));
#line 28 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_GET_CLASS (self)->on_page_load (self);
#line 161 "WebAuthenticationPane.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 31 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return self ? g_object_ref (self) : NULL;
#line 168 "WebAuthenticationPane.c"
}


void shotwell_plugins_common_web_authentication_pane_set_cursor (ShotwellPluginsCommonWebAuthenticationPane* self, GdkCursorType type) {
	GdkWindow* window = NULL;
	WebKitWebView* _tmp0_ = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkWindow* _tmp2_ = NULL;
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp3_ = NULL;
	GdkDisplay* _tmp4_ = NULL;
	GdkCursor* cursor = NULL;
	GdkCursorType _tmp5_ = 0;
	GdkCursor* _tmp6_ = NULL;
#line 30 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self));
#line 31 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = self->priv->webview;
#line 31 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = gtk_widget_get_window (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 31 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 31 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	window = _tmp2_;
#line 32 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp3_ = gdk_window_get_display (window);
#line 32 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 32 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	display = _tmp4_;
#line 33 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp5_ = type;
#line 33 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp6_ = gdk_cursor_new_for_display (display, _tmp5_);
#line 33 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	cursor = _tmp6_;
#line 34 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	gdk_window_set_cursor (window, cursor);
#line 30 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_object_unref0 (cursor);
#line 30 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_object_unref0 (display);
#line 30 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_object_unref0 (window);
#line 213 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_on_page_load_changed (ShotwellPluginsCommonWebAuthenticationPane* self, WebKitLoadEvent load_event) {
	WebKitLoadEvent _tmp0_ = 0;
#line 37 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self));
#line 38 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = load_event;
#line 38 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	switch (_tmp0_) {
#line 38 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case WEBKIT_LOAD_STARTED:
#line 38 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case WEBKIT_LOAD_REDIRECTED:
#line 229 "WebAuthenticationPane.c"
		{
#line 41 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
			shotwell_plugins_common_web_authentication_pane_set_cursor (self, GDK_WATCH);
#line 42 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
			break;
#line 235 "WebAuthenticationPane.c"
		}
#line 38 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case WEBKIT_LOAD_FINISHED:
#line 239 "WebAuthenticationPane.c"
		{
#line 44 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
			shotwell_plugins_common_web_authentication_pane_set_cursor (self, GDK_LEFT_PTR);
#line 45 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
			shotwell_plugins_common_web_authentication_pane_on_page_load (self);
#line 46 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
			break;
#line 247 "WebAuthenticationPane.c"
		}
		default:
		{
#line 48 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
			break;
#line 253 "WebAuthenticationPane.c"
		}
	}
}


WebKitWebView* shotwell_plugins_common_web_authentication_pane_get_view (ShotwellPluginsCommonWebAuthenticationPane* self) {
	WebKitWebView* result = NULL;
	WebKitWebView* _tmp0_ = NULL;
	WebKitWebView* _tmp1_ = NULL;
#line 52 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_val_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self), NULL);
#line 53 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = self->priv->webview;
#line 53 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 53 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	result = _tmp1_;
#line 53 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 273 "WebAuthenticationPane.c"
}


static SpitPublishingDialogPaneGeometryOptions shotwell_plugins_common_web_authentication_pane_real_get_preferred_geometry (SpitPublishingDialogPane* base) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
	SpitPublishingDialogPaneGeometryOptions result = 0;
	SpitPublishingDialogPaneGeometryOptions _tmp0_ = 0;
#line 56 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 57 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = self->priv->_preferred_geometry;
#line 57 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	result = _tmp0_;
#line 57 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 289 "WebAuthenticationPane.c"
}


static GtkWidget* shotwell_plugins_common_web_authentication_pane_real_get_widget (SpitPublishingDialogPane* base) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
	GtkWidget* result = NULL;
	WebKitWebView* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
#line 60 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 61 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = self->priv->webview;
#line 61 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_widget_get_type (), GtkWidget));
#line 61 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	result = _tmp1_;
#line 61 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 308 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_real_on_pane_installed (SpitPublishingDialogPane* base) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
	WebKitWebView* _tmp0_ = NULL;
	WebKitWebView* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 64 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = shotwell_plugins_common_web_authentication_pane_get_view (self);
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = _tmp0_;
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp2_ = shotwell_plugins_common_web_authentication_pane_get_login_uri (self);
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp3_ = _tmp2_;
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp4_ = _tmp3_;
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	webkit_web_view_load_uri (_tmp1_, _tmp4_);
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_free0 (_tmp4_);
#line 65 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_object_unref0 (_tmp1_);
#line 337 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_real_on_pane_uninstalled (SpitPublishingDialogPane* base) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
#line 68 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 345 "WebAuthenticationPane.c"
}


ShotwellPluginsCommonWebAuthenticationPane* shotwell_plugins_common_web_authentication_pane_construct (GType object_type) {
	ShotwellPluginsCommonWebAuthenticationPane * self = NULL;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = (ShotwellPluginsCommonWebAuthenticationPane*) g_object_new (object_type, NULL);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return self;
#line 355 "WebAuthenticationPane.c"
}


SpitPublishingDialogPaneGeometryOptions shotwell_plugins_common_web_authentication_pane_get_preferred_geometry (ShotwellPluginsCommonWebAuthenticationPane* self) {
	SpitPublishingDialogPaneGeometryOptions result;
	SpitPublishingDialogPaneGeometryOptions _tmp0_ = 0;
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_val_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self), 0);
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = self->priv->_preferred_geometry;
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	result = _tmp0_;
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 370 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_set_preferred_geometry (ShotwellPluginsCommonWebAuthenticationPane* self, SpitPublishingDialogPaneGeometryOptions value) {
	SpitPublishingDialogPaneGeometryOptions _tmp0_ = 0;
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self));
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = value;
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self->priv->_preferred_geometry = _tmp0_;
#line 11 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_object_notify ((GObject *) self, "preferred-geometry");
#line 384 "WebAuthenticationPane.c"
}


gchar* shotwell_plugins_common_web_authentication_pane_get_login_uri (ShotwellPluginsCommonWebAuthenticationPane* self) {
	gchar* result;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_val_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self), NULL);
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = self->priv->_login_uri;
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	result = _tmp1_;
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	return result;
#line 402 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_set_login_uri (ShotwellPluginsCommonWebAuthenticationPane* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_return_if_fail (SHOTWELL_PLUGINS_COMMON_IS_WEB_AUTHENTICATION_PANE (self));
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp0_ = value;
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_free0 (self->priv->_login_uri);
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self->priv->_login_uri = _tmp1_;
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_object_notify ((GObject *) self, "login-uri");
#line 421 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_class_init (ShotwellPluginsCommonWebAuthenticationPaneClass * klass) {
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	shotwell_plugins_common_web_authentication_pane_parent_class = g_type_class_peek_parent (klass);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_type_class_add_private (klass, sizeof (ShotwellPluginsCommonWebAuthenticationPanePrivate));
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	((GObjectClass *) klass)->constructed = shotwell_plugins_common_web_authentication_pane_real_constructed;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	((ShotwellPluginsCommonWebAuthenticationPaneClass *) klass)->on_page_load = shotwell_plugins_common_web_authentication_pane_real_on_page_load;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_shotwell_plugins_common_web_authentication_pane_get_property;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_shotwell_plugins_common_web_authentication_pane_set_property;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	G_OBJECT_CLASS (klass)->finalize = shotwell_plugins_common_web_authentication_pane_finalize;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_PREFERRED_GEOMETRY, g_param_spec_enum ("preferred-geometry", "preferred-geometry", "preferred-geometry", SPIT_PUBLISHING_DIALOG_PANE_TYPE_GEOMETRY_OPTIONS, SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_LOGIN_URI, g_param_spec_string ("login-uri", "login-uri", "login-uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 444 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_spit_publishing_dialog_pane_interface_init (SpitPublishingDialogPaneIface * iface) {
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	shotwell_plugins_common_web_authentication_pane_spit_publishing_dialog_pane_parent_iface = g_type_interface_peek_parent (iface);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	iface->get_preferred_geometry = (SpitPublishingDialogPaneGeometryOptions (*)(SpitPublishingDialogPane*)) shotwell_plugins_common_web_authentication_pane_real_get_preferred_geometry;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	iface->get_widget = (GtkWidget* (*)(SpitPublishingDialogPane*)) shotwell_plugins_common_web_authentication_pane_real_get_widget;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	iface->on_pane_installed = (void (*)(SpitPublishingDialogPane*)) shotwell_plugins_common_web_authentication_pane_real_on_pane_installed;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	iface->on_pane_uninstalled = (void (*)(SpitPublishingDialogPane*)) shotwell_plugins_common_web_authentication_pane_real_on_pane_uninstalled;
#line 459 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_instance_init (ShotwellPluginsCommonWebAuthenticationPane * self) {
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self->priv = SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_GET_PRIVATE (self);
#line 10 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self->priv->_preferred_geometry = SPIT_PUBLISHING_DIALOG_PANE_GEOMETRY_OPTIONS_NONE;
#line 468 "WebAuthenticationPane.c"
}


static void shotwell_plugins_common_web_authentication_pane_finalize (GObject* obj) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 14 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_free0 (self->priv->_login_uri);
#line 16 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	_g_object_unref0 (self->priv->webview);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	G_OBJECT_CLASS (shotwell_plugins_common_web_authentication_pane_parent_class)->finalize (obj);
#line 482 "WebAuthenticationPane.c"
}


GType shotwell_plugins_common_web_authentication_pane_get_type (void) {
	static volatile gsize shotwell_plugins_common_web_authentication_pane_type_id__volatile = 0;
	if (g_once_init_enter (&shotwell_plugins_common_web_authentication_pane_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ShotwellPluginsCommonWebAuthenticationPaneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_plugins_common_web_authentication_pane_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellPluginsCommonWebAuthenticationPane), 0, (GInstanceInitFunc) shotwell_plugins_common_web_authentication_pane_instance_init, NULL };
		static const GInterfaceInfo spit_publishing_dialog_pane_info = { (GInterfaceInitFunc) shotwell_plugins_common_web_authentication_pane_spit_publishing_dialog_pane_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType shotwell_plugins_common_web_authentication_pane_type_id;
		shotwell_plugins_common_web_authentication_pane_type_id = g_type_register_static (G_TYPE_OBJECT, "ShotwellPluginsCommonWebAuthenticationPane", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (shotwell_plugins_common_web_authentication_pane_type_id, SPIT_PUBLISHING_TYPE_DIALOG_PANE, &spit_publishing_dialog_pane_info);
		g_once_init_leave (&shotwell_plugins_common_web_authentication_pane_type_id__volatile, shotwell_plugins_common_web_authentication_pane_type_id);
	}
	return shotwell_plugins_common_web_authentication_pane_type_id__volatile;
}


static void _vala_shotwell_plugins_common_web_authentication_pane_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	switch (property_id) {
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_PREFERRED_GEOMETRY:
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		g_value_set_enum (value, shotwell_plugins_common_web_authentication_pane_get_preferred_geometry (self));
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		break;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_LOGIN_URI:
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		g_value_take_string (value, shotwell_plugins_common_web_authentication_pane_get_login_uri (self));
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		break;
#line 517 "WebAuthenticationPane.c"
		default:
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		break;
#line 523 "WebAuthenticationPane.c"
	}
}


static void _vala_shotwell_plugins_common_web_authentication_pane_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ShotwellPluginsCommonWebAuthenticationPane * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SHOTWELL_PLUGINS_COMMON_TYPE_WEB_AUTHENTICATION_PANE, ShotwellPluginsCommonWebAuthenticationPane);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
	switch (property_id) {
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_PREFERRED_GEOMETRY:
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		shotwell_plugins_common_web_authentication_pane_set_preferred_geometry (self, g_value_get_enum (value));
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		break;
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		case SHOTWELL_PLUGINS_COMMON_WEB_AUTHENTICATION_PANE_LOGIN_URI:
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		shotwell_plugins_common_web_authentication_pane_set_login_uri (self, g_value_get_string (value));
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		break;
#line 545 "WebAuthenticationPane.c"
		default:
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 9 "/home/jens/Source/shotwell/plugins/common/WebAuthenticationPane.vala"
		break;
#line 551 "WebAuthenticationPane.c"
	}
}