summaryrefslogtreecommitdiff
path: root/src/core/DataView.c
blob: 2e70156b1a0d59c786ad1bf98a486f751a0cb916 (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
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
/* DataView.c generated by valac 0.34.4, the Vala compiler
 * generated from DataView.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>


#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;
typedef struct _DataObjectPrivate DataObjectPrivate;

#define TYPE_ALTERATION (alteration_get_type ())
#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration))
#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass))
#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION))
#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION))
#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass))

typedef struct _Alteration Alteration;
typedef struct _AlterationClass AlterationClass;

#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_DATA_VIEW (data_view_get_type ())
#define DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_VIEW, DataView))
#define DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_VIEW, DataViewClass))
#define IS_DATA_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_VIEW))
#define IS_DATA_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_VIEW))
#define DATA_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_VIEW, DataViewClass))

typedef struct _DataView DataView;
typedef struct _DataViewClass DataViewClass;
typedef struct _DataViewPrivate DataViewPrivate;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_VIEW_COLLECTION (view_collection_get_type ())
#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection))
#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass))
#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION))
#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION))
#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass))

typedef struct _ViewCollection ViewCollection;
typedef struct _ViewCollectionClass ViewCollectionClass;
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))

struct _DataObject {
	GObject parent_instance;
	DataObjectPrivate * priv;
};

struct _DataObjectClass {
	GObjectClass parent_class;
	void (*notify_altered) (DataObject* self, Alteration* alteration);
	void (*notify_membership_changed) (DataObject* self, DataCollection* collection);
	void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val);
	void (*notify_collection_property_cleared) (DataObject* self, const gchar* name);
	gchar* (*get_name) (DataObject* self);
	gchar* (*to_string) (DataObject* self);
};

struct _DataView {
	DataObject parent_instance;
	DataViewPrivate * priv;
};

struct _DataViewClass {
	DataObjectClass parent_class;
	void (*notify_view_altered) (DataView* self);
	void (*notify_geometry_altered) (DataView* self);
	void (*notify_unsubscribed) (DataView* self, DataSource* source);
	void (*state_changed) (DataView* self, gboolean selected);
	void (*visibility_changed) (DataView* self, gboolean visible);
	void (*view_altered) (DataView* self);
	void (*geometry_altered) (DataView* self);
	void (*unsubscribed) (DataView* self, DataSource* source);
};

struct _DataViewPrivate {
	DataSource* source;
	gboolean selected;
	gboolean visible;
};


static gpointer data_view_parent_class = NULL;

GType data_object_get_type (void) G_GNUC_CONST;
gpointer alteration_ref (gpointer instance);
void alteration_unref (gpointer instance);
GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_alteration (GValue* value, gpointer v_object);
void value_take_alteration (GValue* value, gpointer v_object);
gpointer value_get_alteration (const GValue* value);
GType alteration_get_type (void) G_GNUC_CONST;
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType data_view_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
#define DATA_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DATA_VIEW, DataViewPrivate))
enum  {
	DATA_VIEW_DUMMY_PROPERTY
};
void data_source_internal_unsubscribe (DataSource* self, DataView* view);
DataView* data_view_new (DataSource* source);
DataView* data_view_construct (GType object_type, DataSource* source);
#define DATA_OBJECT_INVALID_OBJECT_ID ((gint64) -1)
DataObject* data_object_construct (GType object_type, gint64 object_id);
void data_source_internal_subscribe (DataSource* self, DataView* view);
static gchar* data_view_real_get_name (DataObject* base);
gchar* data_object_get_name (DataObject* self);
static gchar* data_view_real_to_string (DataObject* base);
gchar* data_object_to_string (DataObject* self);
DataSource* data_view_get_source (DataView* self);
gboolean data_view_is_selected (DataView* self);
void data_view_internal_set_selected (DataView* self, gboolean selected);
gboolean data_view_internal_toggle (DataView* self);
gboolean data_view_is_visible (DataView* self);
void data_view_internal_set_visible (DataView* self, gboolean visible);
void data_view_notify_view_altered (DataView* self);
static void data_view_real_notify_view_altered (DataView* self);
GType view_collection_get_type (void) G_GNUC_CONST;
DataCollection* data_object_get_membership (DataObject* self);
gboolean data_collection_are_notifications_frozen (DataCollection* self);
void view_collection_internal_notify_view_altered (ViewCollection* self, DataView* view);
void data_view_notify_geometry_altered (DataView* self);
static void data_view_real_notify_geometry_altered (DataView* self);
void view_collection_internal_notify_geometry_altered (ViewCollection* self, DataView* view);
void data_view_notify_unsubscribed (DataView* self, DataSource* source);
static void data_view_real_notify_unsubscribed (DataView* self, DataSource* source);
static void data_view_real_state_changed (DataView* self, gboolean selected);
static void data_view_real_visibility_changed (DataView* self, gboolean visible);
static void data_view_real_view_altered (DataView* self);
static void data_view_real_geometry_altered (DataView* self);
static void data_view_real_unsubscribed (DataView* self, DataSource* source);
static void data_view_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return self ? g_object_ref (self) : NULL;
#line 182 "DataView.c"
}


DataView* data_view_construct (GType object_type, DataSource* source) {
	DataView * self = NULL;
	DataSource* _tmp0_ = NULL;
	DataSource* _tmp1_ = NULL;
	DataSource* _tmp2_ = NULL;
#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_val_if_fail (IS_DATA_SOURCE (source), NULL);
#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self = (DataView*) data_object_construct (object_type, DATA_OBJECT_INVALID_OBJECT_ID);
#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = source;
#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_g_object_unref0 (self->priv->source);
#line 33 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv->source = _tmp1_;
#line 37 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = source;
#line 37 "/home/jens/Source/shotwell/src/core/DataView.vala"
	data_source_internal_subscribe (_tmp2_, self);
#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return self;
#line 209 "DataView.c"
}


DataView* data_view_new (DataSource* source) {
#line 32 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return data_view_construct (TYPE_DATA_VIEW, source);
#line 216 "DataView.c"
}


static gchar* data_view_real_get_name (DataObject* base) {
	DataView * self;
	gchar* result = NULL;
	DataSource* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
#line 47 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATA_VIEW, DataView);
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->source;
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_DATA_OBJECT, DataObject));
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = _tmp1_;
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp3_ = g_strdup_printf ("View of %s", _tmp2_);
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp4_ = _tmp3_;
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_g_free0 (_tmp2_);
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	result = _tmp4_;
#line 48 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return result;
#line 246 "DataView.c"
}


static gchar* data_view_real_to_string (DataObject* base) {
	DataView * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	DataSource* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
#line 51 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_DATA_VIEW, DataView);
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = data_object_get_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = _tmp0_;
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = self->priv->source;
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp3_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_OBJECT, DataObject));
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp4_ = _tmp3_;
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp5_ = g_strdup_printf ("DataView %s [DataSource %s]", _tmp1_, _tmp4_);
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp6_ = _tmp5_;
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_g_free0 (_tmp4_);
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_g_free0 (_tmp1_);
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	result = _tmp6_;
#line 52 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return result;
#line 284 "DataView.c"
}


DataSource* data_view_get_source (DataView* self) {
	DataSource* result = NULL;
	DataSource* _tmp0_ = NULL;
	DataSource* _tmp1_ = NULL;
#line 55 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_val_if_fail (IS_DATA_VIEW (self), NULL);
#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->source;
#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala"
	result = _tmp1_;
#line 56 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return result;
#line 302 "DataView.c"
}


gboolean data_view_is_selected (DataView* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 59 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_val_if_fail (IS_DATA_VIEW (self), FALSE);
#line 60 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->selected;
#line 60 "/home/jens/Source/shotwell/src/core/DataView.vala"
	result = _tmp0_;
#line 60 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return result;
#line 317 "DataView.c"
}


void data_view_internal_set_selected (DataView* self, gboolean selected) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
#line 64 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_VIEW (self));
#line 65 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->selected;
#line 65 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = selected;
#line 65 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (_tmp0_ == _tmp1_) {
#line 66 "/home/jens/Source/shotwell/src/core/DataView.vala"
		return;
#line 336 "DataView.c"
	}
#line 68 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = selected;
#line 68 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv->selected = _tmp2_;
#line 69 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp3_ = selected;
#line 69 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_emit_by_name (self, "state-changed", _tmp3_);
#line 346 "DataView.c"
}


gboolean data_view_internal_toggle (DataView* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
#line 73 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_val_if_fail (IS_DATA_VIEW (self), FALSE);
#line 74 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->selected;
#line 74 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv->selected = !_tmp0_;
#line 75 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = self->priv->selected;
#line 75 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_emit_by_name (self, "state-changed", _tmp1_);
#line 77 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = self->priv->selected;
#line 77 "/home/jens/Source/shotwell/src/core/DataView.vala"
	result = _tmp2_;
#line 77 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return result;
#line 371 "DataView.c"
}


gboolean data_view_is_visible (DataView* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 80 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_val_if_fail (IS_DATA_VIEW (self), FALSE);
#line 81 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->visible;
#line 81 "/home/jens/Source/shotwell/src/core/DataView.vala"
	result = _tmp0_;
#line 81 "/home/jens/Source/shotwell/src/core/DataView.vala"
	return result;
#line 386 "DataView.c"
}


void data_view_internal_set_visible (DataView* self, gboolean visible) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
#line 85 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_VIEW (self));
#line 86 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->visible;
#line 86 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = visible;
#line 86 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (_tmp0_ == _tmp1_) {
#line 87 "/home/jens/Source/shotwell/src/core/DataView.vala"
		return;
#line 405 "DataView.c"
	}
#line 89 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = visible;
#line 89 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv->visible = _tmp2_;
#line 90 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp3_ = visible;
#line 90 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_emit_by_name (self, "visibility-changed", _tmp3_);
#line 415 "DataView.c"
}


static void data_view_real_notify_view_altered (DataView* self) {
	gboolean _tmp0_ = FALSE;
	ViewCollection* vc = NULL;
	DataCollection* _tmp1_ = NULL;
	ViewCollection* _tmp2_ = NULL;
	ViewCollection* _tmp3_ = NULL;
#line 95 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->visible;
#line 95 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (!_tmp0_) {
#line 96 "/home/jens/Source/shotwell/src/core/DataView.vala"
		return;
#line 431 "DataView.c"
	}
#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIEW_COLLECTION) ? ((ViewCollection*) _tmp1_) : NULL;
#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (_tmp2_ == NULL) {
#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_data_collection_unref0 (_tmp1_);
#line 441 "DataView.c"
	}
#line 98 "/home/jens/Source/shotwell/src/core/DataView.vala"
	vc = _tmp2_;
#line 99 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp3_ = vc;
#line 99 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (_tmp3_ != NULL) {
#line 449 "DataView.c"
		ViewCollection* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		ViewCollection* _tmp6_ = NULL;
#line 100 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_tmp4_ = vc;
#line 100 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_tmp5_ = data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection));
#line 100 "/home/jens/Source/shotwell/src/core/DataView.vala"
		if (!_tmp5_) {
#line 101 "/home/jens/Source/shotwell/src/core/DataView.vala"
			g_signal_emit_by_name (self, "view-altered");
#line 461 "DataView.c"
		}
#line 104 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_tmp6_ = vc;
#line 104 "/home/jens/Source/shotwell/src/core/DataView.vala"
		view_collection_internal_notify_view_altered (_tmp6_, self);
#line 467 "DataView.c"
	} else {
#line 106 "/home/jens/Source/shotwell/src/core/DataView.vala"
		g_signal_emit_by_name (self, "view-altered");
#line 471 "DataView.c"
	}
#line 93 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_data_collection_unref0 (vc);
#line 475 "DataView.c"
}


void data_view_notify_view_altered (DataView* self) {
#line 93 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_VIEW (self));
#line 93 "/home/jens/Source/shotwell/src/core/DataView.vala"
	DATA_VIEW_GET_CLASS (self)->notify_view_altered (self);
#line 484 "DataView.c"
}


static void data_view_real_notify_geometry_altered (DataView* self) {
	gboolean _tmp0_ = FALSE;
	ViewCollection* vc = NULL;
	DataCollection* _tmp1_ = NULL;
	ViewCollection* _tmp2_ = NULL;
	ViewCollection* _tmp3_ = NULL;
#line 112 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->visible;
#line 112 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (!_tmp0_) {
#line 113 "/home/jens/Source/shotwell/src/core/DataView.vala"
		return;
#line 500 "DataView.c"
	}
#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp1_ = data_object_get_membership (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIEW_COLLECTION) ? ((ViewCollection*) _tmp1_) : NULL;
#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (_tmp2_ == NULL) {
#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_data_collection_unref0 (_tmp1_);
#line 510 "DataView.c"
	}
#line 115 "/home/jens/Source/shotwell/src/core/DataView.vala"
	vc = _tmp2_;
#line 116 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp3_ = vc;
#line 116 "/home/jens/Source/shotwell/src/core/DataView.vala"
	if (_tmp3_ != NULL) {
#line 518 "DataView.c"
		ViewCollection* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		ViewCollection* _tmp6_ = NULL;
#line 117 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_tmp4_ = vc;
#line 117 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_tmp5_ = data_collection_are_notifications_frozen (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_DATA_COLLECTION, DataCollection));
#line 117 "/home/jens/Source/shotwell/src/core/DataView.vala"
		if (!_tmp5_) {
#line 118 "/home/jens/Source/shotwell/src/core/DataView.vala"
			g_signal_emit_by_name (self, "geometry-altered");
#line 530 "DataView.c"
		}
#line 121 "/home/jens/Source/shotwell/src/core/DataView.vala"
		_tmp6_ = vc;
#line 121 "/home/jens/Source/shotwell/src/core/DataView.vala"
		view_collection_internal_notify_geometry_altered (_tmp6_, self);
#line 536 "DataView.c"
	} else {
#line 123 "/home/jens/Source/shotwell/src/core/DataView.vala"
		g_signal_emit_by_name (self, "geometry-altered");
#line 540 "DataView.c"
	}
#line 110 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_data_collection_unref0 (vc);
#line 544 "DataView.c"
}


void data_view_notify_geometry_altered (DataView* self) {
#line 110 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_VIEW (self));
#line 110 "/home/jens/Source/shotwell/src/core/DataView.vala"
	DATA_VIEW_GET_CLASS (self)->notify_geometry_altered (self);
#line 553 "DataView.c"
}


static void data_view_real_notify_unsubscribed (DataView* self, DataSource* source) {
	DataSource* _tmp0_ = NULL;
#line 128 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 129 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = source;
#line 129 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_emit_by_name (self, "unsubscribed", _tmp0_);
#line 565 "DataView.c"
}


void data_view_notify_unsubscribed (DataView* self, DataSource* source) {
#line 128 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_VIEW (self));
#line 128 "/home/jens/Source/shotwell/src/core/DataView.vala"
	DATA_VIEW_GET_CLASS (self)->notify_unsubscribed (self, source);
#line 574 "DataView.c"
}


static void data_view_real_state_changed (DataView* self, gboolean selected) {
}


static void data_view_real_visibility_changed (DataView* self, gboolean visible) {
}


static void data_view_real_view_altered (DataView* self) {
}


static void data_view_real_geometry_altered (DataView* self) {
}


static void data_view_real_unsubscribed (DataView* self, DataSource* source) {
#line 29 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 597 "DataView.c"
}


static void data_view_class_init (DataViewClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	data_view_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_type_class_add_private (klass, sizeof (DataViewPrivate));
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataObjectClass *) klass)->get_name = data_view_real_get_name;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataObjectClass *) klass)->to_string = data_view_real_to_string;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->notify_view_altered = data_view_real_notify_view_altered;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->notify_geometry_altered = data_view_real_notify_geometry_altered;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->notify_unsubscribed = data_view_real_notify_unsubscribed;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->state_changed = data_view_real_state_changed;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->visibility_changed = data_view_real_visibility_changed;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->view_altered = data_view_real_view_altered;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->geometry_altered = data_view_real_geometry_altered;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	((DataViewClass *) klass)->unsubscribed = data_view_real_unsubscribed;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	G_OBJECT_CLASS (klass)->finalize = data_view_finalize;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_new ("state_changed", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, state_changed), NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_new ("visibility_changed", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, visibility_changed), NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_new ("view_altered", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, view_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_new ("geometry_altered", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, geometry_altered), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	g_signal_new ("unsubscribed", TYPE_DATA_VIEW, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (DataViewClass, unsubscribed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TYPE_DATA_SOURCE);
#line 638 "DataView.c"
}


static void data_view_instance_init (DataView * self) {
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv = DATA_VIEW_GET_PRIVATE (self);
#line 9 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv->selected = FALSE;
#line 10 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self->priv->visible = TRUE;
#line 649 "DataView.c"
}


static void data_view_finalize (GObject* obj) {
	DataView * self;
	DataSource* _tmp0_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATA_VIEW, DataView);
#line 44 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_tmp0_ = self->priv->source;
#line 44 "/home/jens/Source/shotwell/src/core/DataView.vala"
	data_source_internal_unsubscribe (_tmp0_, self);
#line 8 "/home/jens/Source/shotwell/src/core/DataView.vala"
	_g_object_unref0 (self->priv->source);
#line 7 "/home/jens/Source/shotwell/src/core/DataView.vala"
	G_OBJECT_CLASS (data_view_parent_class)->finalize (obj);
#line 666 "DataView.c"
}


GType data_view_get_type (void) {
	static volatile gsize data_view_type_id__volatile = 0;
	if (g_once_init_enter (&data_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DataViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataView), 0, (GInstanceInitFunc) data_view_instance_init, NULL };
		GType data_view_type_id;
		data_view_type_id = g_type_register_static (TYPE_DATA_OBJECT, "DataView", &g_define_type_info, 0);
		g_once_init_leave (&data_view_type_id__volatile, data_view_type_id);
	}
	return data_view_type_id__volatile;
}