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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
|
/* util.c generated by valac 0.32.1, the Vala compiler
* generated from util.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.
*/
/* SingletonCollection is a read-only collection designed to hold exactly one item in it. This*/
/* is far more efficient than creating a dummy collection (such as ArrayList) merely to pass around*/
/* a single item, particularly for signals which require Iterables and Collections.*/
/**/
/* This collection cannot be used to store null.*/
#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>
#define TYPE_SINGLETON_COLLECTION (singleton_collection_get_type ())
#define SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollection))
#define SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass))
#define IS_SINGLETON_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SINGLETON_COLLECTION))
#define IS_SINGLETON_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SINGLETON_COLLECTION))
#define SINGLETON_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SINGLETON_COLLECTION, SingletonCollectionClass))
typedef struct _SingletonCollection SingletonCollection;
typedef struct _SingletonCollectionClass SingletonCollectionClass;
typedef struct _SingletonCollectionPrivate SingletonCollectionPrivate;
#define _g_destroy_func0(var) (((var == NULL) || (g_destroy_func == NULL)) ? NULL : (var = (g_destroy_func (var), NULL)))
#define SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR (singleton_collection_singleton_iterator_get_type ())
#define SINGLETON_COLLECTION_SINGLETON_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator))
#define SINGLETON_COLLECTION_SINGLETON_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIteratorClass))
#define SINGLETON_COLLECTION_IS_SINGLETON_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR))
#define SINGLETON_COLLECTION_IS_SINGLETON_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR))
#define SINGLETON_COLLECTION_SINGLETON_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIteratorClass))
typedef struct _SingletonCollectionSingletonIterator SingletonCollectionSingletonIterator;
typedef struct _SingletonCollectionSingletonIteratorClass SingletonCollectionSingletonIteratorClass;
typedef struct _SingletonCollectionSingletonIteratorPrivate SingletonCollectionSingletonIteratorPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_MARKER (marker_get_type ())
#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker))
#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER))
#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface))
typedef struct _Marker Marker;
typedef struct _MarkerIface MarkerIface;
#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;
#define TYPE_UNKNOWN_TOTAL_MONITOR (unknown_total_monitor_get_type ())
#define UNKNOWN_TOTAL_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitor))
#define UNKNOWN_TOTAL_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitorClass))
#define IS_UNKNOWN_TOTAL_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UNKNOWN_TOTAL_MONITOR))
#define IS_UNKNOWN_TOTAL_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UNKNOWN_TOTAL_MONITOR))
#define UNKNOWN_TOTAL_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitorClass))
typedef struct _UnknownTotalMonitor UnknownTotalMonitor;
typedef struct _UnknownTotalMonitorClass UnknownTotalMonitorClass;
typedef struct _UnknownTotalMonitorPrivate UnknownTotalMonitorPrivate;
typedef struct _ParamSpecUnknownTotalMonitor ParamSpecUnknownTotalMonitor;
#define TYPE_AGGREGATE_PROGRESS_MONITOR (aggregate_progress_monitor_get_type ())
#define AGGREGATE_PROGRESS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitor))
#define AGGREGATE_PROGRESS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorClass))
#define IS_AGGREGATE_PROGRESS_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR))
#define IS_AGGREGATE_PROGRESS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AGGREGATE_PROGRESS_MONITOR))
#define AGGREGATE_PROGRESS_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorClass))
typedef struct _AggregateProgressMonitor AggregateProgressMonitor;
typedef struct _AggregateProgressMonitorClass AggregateProgressMonitorClass;
typedef struct _AggregateProgressMonitorPrivate AggregateProgressMonitorPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _ParamSpecAggregateProgressMonitor ParamSpecAggregateProgressMonitor;
struct _SingletonCollection {
GeeAbstractCollection parent_instance;
SingletonCollectionPrivate * priv;
};
struct _SingletonCollectionClass {
GeeAbstractCollectionClass parent_class;
};
struct _SingletonCollectionPrivate {
GType g_type;
GBoxedCopyFunc g_dup_func;
GDestroyNotify g_destroy_func;
gpointer object;
};
struct _SingletonCollectionSingletonIterator {
GObject parent_instance;
SingletonCollectionSingletonIteratorPrivate * priv;
};
struct _SingletonCollectionSingletonIteratorClass {
GObjectClass parent_class;
};
struct _SingletonCollectionSingletonIteratorPrivate {
GType g_type;
GBoxedCopyFunc g_dup_func;
GDestroyNotify g_destroy_func;
SingletonCollection* c;
gboolean done;
gpointer current;
};
struct _MarkerIface {
GTypeInterface parent_iface;
void (*mark) (Marker* self, DataObject* object);
void (*unmark) (Marker* self, DataObject* object);
gboolean (*toggle) (Marker* self, DataObject* object);
void (*mark_many) (Marker* self, GeeCollection* list);
void (*unmark_many) (Marker* self, GeeCollection* list);
void (*mark_all) (Marker* self);
gint (*get_count) (Marker* self);
GeeCollection* (*get_all) (Marker* self);
};
typedef gboolean (*MarkedAction) (DataObject* object, GObject* user, void* user_data);
typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data);
struct _UnknownTotalMonitor {
GTypeInstance parent_instance;
volatile int ref_count;
UnknownTotalMonitorPrivate * priv;
};
struct _UnknownTotalMonitorClass {
GTypeClass parent_class;
void (*finalize) (UnknownTotalMonitor *self);
};
struct _UnknownTotalMonitorPrivate {
guint64 total;
ProgressMonitor wrapped_monitor;
gpointer wrapped_monitor_target;
};
struct _ParamSpecUnknownTotalMonitor {
GParamSpec parent_instance;
};
struct _AggregateProgressMonitor {
GTypeInstance parent_instance;
volatile int ref_count;
AggregateProgressMonitorPrivate * priv;
};
struct _AggregateProgressMonitorClass {
GTypeClass parent_class;
void (*finalize) (AggregateProgressMonitor *self);
};
struct _AggregateProgressMonitorPrivate {
guint64 grand_total;
ProgressMonitor wrapped_monitor;
gpointer wrapped_monitor_target;
guint64 aggregate_count;
guint64 last_count;
};
struct _ParamSpecAggregateProgressMonitor {
GParamSpec parent_instance;
};
static gpointer singleton_collection_parent_class = NULL;
static gpointer singleton_collection_singleton_iterator_parent_class = NULL;
static GeeTraversableIface* singleton_collection_singleton_iterator_gee_traversable_parent_iface = NULL;
static GeeIteratorIface* singleton_collection_singleton_iterator_gee_iterator_parent_iface = NULL;
static gpointer unknown_total_monitor_parent_class = NULL;
static gpointer aggregate_progress_monitor_parent_class = NULL;
GType singleton_collection_get_type (void) G_GNUC_CONST;
#define SINGLETON_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SINGLETON_COLLECTION, SingletonCollectionPrivate))
enum {
SINGLETON_COLLECTION_DUMMY_PROPERTY,
SINGLETON_COLLECTION_G_TYPE,
SINGLETON_COLLECTION_G_DUP_FUNC,
SINGLETON_COLLECTION_G_DESTROY_FUNC,
SINGLETON_COLLECTION_READ_ONLY,
SINGLETON_COLLECTION_SIZE
};
SingletonCollection* singleton_collection_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, gconstpointer object);
SingletonCollection* singleton_collection_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, gconstpointer object);
static gboolean singleton_collection_real_add (GeeAbstractCollection* base, gconstpointer object);
static void singleton_collection_real_clear (GeeAbstractCollection* base);
static gboolean singleton_collection_real_contains (GeeAbstractCollection* base, gconstpointer object);
static GeeIterator* singleton_collection_real_iterator (GeeAbstractCollection* base);
static SingletonCollectionSingletonIterator* singleton_collection_singleton_iterator_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, SingletonCollection* c);
static SingletonCollectionSingletonIterator* singleton_collection_singleton_iterator_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, SingletonCollection* c);
static GType singleton_collection_singleton_iterator_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static gboolean singleton_collection_real_remove (GeeAbstractCollection* base, gconstpointer item);
#define SINGLETON_COLLECTION_SINGLETON_ITERATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIteratorPrivate))
enum {
SINGLETON_COLLECTION_SINGLETON_ITERATOR_DUMMY_PROPERTY,
SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_TYPE,
SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DUP_FUNC,
SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DESTROY_FUNC,
SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY,
SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID
};
static gboolean singleton_collection_singleton_iterator_real_foreach (GeeTraversable* base, GeeForallFunc f, void* f_target);
static gpointer singleton_collection_singleton_iterator_real_get (GeeIterator* base);
static gboolean singleton_collection_singleton_iterator_real_has_next (GeeIterator* base);
static gboolean singleton_collection_singleton_iterator_real_next (GeeIterator* base);
static void singleton_collection_singleton_iterator_real_remove (GeeIterator* base);
static void singleton_collection_singleton_iterator_finalize (GObject* obj);
static void _vala_singleton_collection_singleton_iterator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_singleton_collection_singleton_iterator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void singleton_collection_finalize (GObject* obj);
static void _vala_singleton_collection_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_singleton_collection_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType data_object_get_type (void) G_GNUC_CONST;
GType marker_get_type (void) G_GNUC_CONST;
void marker_mark (Marker* self, DataObject* object);
void marker_unmark (Marker* self, DataObject* object);
gboolean marker_toggle (Marker* self, DataObject* object);
void marker_mark_many (Marker* self, GeeCollection* list);
void marker_unmark_many (Marker* self, GeeCollection* list);
void marker_mark_all (Marker* self);
gint marker_get_count (Marker* self);
GeeCollection* marker_get_all (Marker* self);
gpointer unknown_total_monitor_ref (gpointer instance);
void unknown_total_monitor_unref (gpointer instance);
GParamSpec* param_spec_unknown_total_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_unknown_total_monitor (GValue* value, gpointer v_object);
void value_take_unknown_total_monitor (GValue* value, gpointer v_object);
gpointer value_get_unknown_total_monitor (const GValue* value);
GType unknown_total_monitor_get_type (void) G_GNUC_CONST;
#define UNKNOWN_TOTAL_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitorPrivate))
enum {
UNKNOWN_TOTAL_MONITOR_DUMMY_PROPERTY
};
UnknownTotalMonitor* unknown_total_monitor_new (guint64 total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target);
UnknownTotalMonitor* unknown_total_monitor_construct (GType object_type, guint64 total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target);
gboolean unknown_total_monitor_monitor (UnknownTotalMonitor* self, guint64 count, guint64 total);
static void unknown_total_monitor_finalize (UnknownTotalMonitor* obj);
gpointer aggregate_progress_monitor_ref (gpointer instance);
void aggregate_progress_monitor_unref (gpointer instance);
GParamSpec* param_spec_aggregate_progress_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_aggregate_progress_monitor (GValue* value, gpointer v_object);
void value_take_aggregate_progress_monitor (GValue* value, gpointer v_object);
gpointer value_get_aggregate_progress_monitor (const GValue* value);
GType aggregate_progress_monitor_get_type (void) G_GNUC_CONST;
#define AGGREGATE_PROGRESS_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitorPrivate))
enum {
AGGREGATE_PROGRESS_MONITOR_DUMMY_PROPERTY
};
AggregateProgressMonitor* aggregate_progress_monitor_new (guint64 grand_total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target);
AggregateProgressMonitor* aggregate_progress_monitor_construct (GType object_type, guint64 grand_total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target);
void aggregate_progress_monitor_next_step (AggregateProgressMonitor* self, const gchar* name);
gboolean aggregate_progress_monitor_monitor (AggregateProgressMonitor* self, guint64 count, guint64 total);
static void aggregate_progress_monitor_finalize (AggregateProgressMonitor* obj);
gboolean null_progress_monitor (guint64 count, guint64 total);
gdouble degrees_to_radians (gdouble theta);
SingletonCollection* singleton_collection_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, gconstpointer object) {
SingletonCollection * self = NULL;
gconstpointer _tmp0_ = NULL;
gpointer _tmp1_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/core/util.vala"
self = (SingletonCollection*) gee_abstract_collection_construct (object_type, g_type, (GBoxedCopyFunc) g_dup_func, g_destroy_func);
#line 65 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_type = g_type;
#line 65 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_dup_func = g_dup_func;
#line 65 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_destroy_func = g_destroy_func;
#line 66 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = object;
#line 66 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = ((_tmp0_ != NULL) && (g_dup_func != NULL)) ? g_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
#line 66 "/home/jens/Source/shotwell/src/core/util.vala"
_g_destroy_func0 (self->priv->object);
#line 66 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->object = _tmp1_;
#line 65 "/home/jens/Source/shotwell/src/core/util.vala"
return self;
#line 300 "util.c"
}
SingletonCollection* singleton_collection_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, gconstpointer object) {
#line 65 "/home/jens/Source/shotwell/src/core/util.vala"
return singleton_collection_construct (TYPE_SINGLETON_COLLECTION, g_type, g_dup_func, g_destroy_func, object);
#line 307 "util.c"
}
static gboolean singleton_collection_real_add (GeeAbstractCollection* base, gconstpointer object) {
SingletonCollection * self;
gboolean result = FALSE;
#line 73 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 74 "/home/jens/Source/shotwell/src/core/util.vala"
g_warning ("util.vala:74: Cannot add to SingletonCollection");
#line 76 "/home/jens/Source/shotwell/src/core/util.vala"
result = FALSE;
#line 76 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 322 "util.c"
}
static void singleton_collection_real_clear (GeeAbstractCollection* base) {
SingletonCollection * self;
#line 79 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 80 "/home/jens/Source/shotwell/src/core/util.vala"
((self->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->object = (self->priv->g_destroy_func (self->priv->object), NULL));
#line 80 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->object = NULL;
#line 334 "util.c"
}
static gboolean singleton_collection_real_contains (GeeAbstractCollection* base, gconstpointer object) {
SingletonCollection * self;
gboolean result = FALSE;
gconstpointer _tmp0_ = NULL;
gconstpointer _tmp1_ = NULL;
#line 83 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 84 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->object;
#line 84 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = object;
#line 84 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp0_ == _tmp1_;
#line 84 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 353 "util.c"
}
static GeeIterator* singleton_collection_real_iterator (GeeAbstractCollection* base) {
SingletonCollection * self;
GeeIterator* result = NULL;
SingletonCollectionSingletonIterator* _tmp0_ = NULL;
#line 87 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 88 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = singleton_collection_singleton_iterator_new (self->priv->g_type, (GBoxedCopyFunc) self->priv->g_dup_func, self->priv->g_destroy_func, self);
#line 88 "/home/jens/Source/shotwell/src/core/util.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERATOR, GeeIterator);
#line 88 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 369 "util.c"
}
static gboolean singleton_collection_real_remove (GeeAbstractCollection* base, gconstpointer item) {
SingletonCollection * self;
gboolean result = FALSE;
gconstpointer _tmp0_ = NULL;
gconstpointer _tmp1_ = NULL;
#line 91 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 92 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = item;
#line 92 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->object;
#line 92 "/home/jens/Source/shotwell/src/core/util.vala"
if (_tmp0_ == _tmp1_) {
#line 93 "/home/jens/Source/shotwell/src/core/util.vala"
((self->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->object = (self->priv->g_destroy_func (self->priv->object), NULL));
#line 93 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->object = NULL;
#line 95 "/home/jens/Source/shotwell/src/core/util.vala"
result = TRUE;
#line 95 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 394 "util.c"
}
#line 98 "/home/jens/Source/shotwell/src/core/util.vala"
result = FALSE;
#line 98 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 400 "util.c"
}
static gboolean singleton_collection_real_get_read_only (GeeAbstractCollection* base) {
gboolean result;
SingletonCollection* self;
#line 70 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 70 "/home/jens/Source/shotwell/src/core/util.vala"
result = FALSE;
#line 70 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 413 "util.c"
}
static gint singleton_collection_real_get_size (GeeAbstractCollection* base) {
gint result;
SingletonCollection* self;
gint _tmp0_ = 0;
gconstpointer _tmp1_ = NULL;
#line 102 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 103 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->object;
#line 103 "/home/jens/Source/shotwell/src/core/util.vala"
if (_tmp1_ != NULL) {
#line 103 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = 1;
#line 430 "util.c"
} else {
#line 103 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = 0;
#line 434 "util.c"
}
#line 103 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp0_;
#line 103 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 440 "util.c"
}
static gpointer _g_object_ref0 (gpointer self) {
#line 20 "/home/jens/Source/shotwell/src/core/util.vala"
return self ? g_object_ref (self) : NULL;
#line 447 "util.c"
}
static SingletonCollectionSingletonIterator* singleton_collection_singleton_iterator_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, SingletonCollection* c) {
SingletonCollectionSingletonIterator * self = NULL;
SingletonCollection* _tmp0_ = NULL;
SingletonCollection* _tmp1_ = NULL;
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (IS_SINGLETON_COLLECTION (c), NULL);
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
self = (SingletonCollectionSingletonIterator*) g_object_new (object_type, NULL);
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_type = g_type;
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_dup_func = g_dup_func;
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_destroy_func = g_destroy_func;
#line 20 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = c;
#line 20 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 20 "/home/jens/Source/shotwell/src/core/util.vala"
_g_object_unref0 (self->priv->c);
#line 20 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->c = _tmp1_;
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
return self;
#line 475 "util.c"
}
static SingletonCollectionSingletonIterator* singleton_collection_singleton_iterator_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, SingletonCollection* c) {
#line 19 "/home/jens/Source/shotwell/src/core/util.vala"
return singleton_collection_singleton_iterator_construct (SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, g_type, g_dup_func, g_destroy_func, c);
#line 482 "util.c"
}
static gboolean singleton_collection_singleton_iterator_real_foreach (GeeTraversable* base, GeeForallFunc f, void* f_target) {
SingletonCollectionSingletonIterator * self;
gboolean result = FALSE;
GeeForallFunc _tmp0_ = NULL;
void* _tmp0__target = NULL;
SingletonCollection* _tmp1_ = NULL;
gconstpointer _tmp2_ = NULL;
gpointer _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
#line 31 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = f;
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0__target = f_target;
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->c;
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp2_ = _tmp1_->priv->object;
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp3_ = ((_tmp2_ != NULL) && (self->priv->g_dup_func != NULL)) ? self->priv->g_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_);
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp4_ = _tmp0_ (_tmp3_, _tmp0__target);
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp4_;
#line 32 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 513 "util.c"
}
static gpointer singleton_collection_singleton_iterator_real_get (GeeIterator* base) {
SingletonCollectionSingletonIterator * self;
gpointer result = NULL;
gconstpointer _tmp0_ = NULL;
gpointer _tmp1_ = NULL;
#line 35 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 36 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->current;
#line 36 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = ((_tmp0_ != NULL) && (self->priv->g_dup_func != NULL)) ? self->priv->g_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
#line 36 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp1_;
#line 36 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 532 "util.c"
}
static gboolean singleton_collection_singleton_iterator_real_has_next (GeeIterator* base) {
SingletonCollectionSingletonIterator * self;
gboolean result = FALSE;
#line 39 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 40 "/home/jens/Source/shotwell/src/core/util.vala"
result = FALSE;
#line 40 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 545 "util.c"
}
static gboolean singleton_collection_singleton_iterator_real_next (GeeIterator* base) {
SingletonCollectionSingletonIterator * self;
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
SingletonCollection* _tmp1_ = NULL;
gconstpointer _tmp2_ = NULL;
gpointer _tmp3_ = NULL;
#line 43 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 44 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->done;
#line 44 "/home/jens/Source/shotwell/src/core/util.vala"
if (_tmp0_) {
#line 45 "/home/jens/Source/shotwell/src/core/util.vala"
result = FALSE;
#line 45 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 566 "util.c"
}
#line 47 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->done = TRUE;
#line 48 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->c;
#line 48 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp2_ = _tmp1_->priv->object;
#line 48 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp3_ = ((_tmp2_ != NULL) && (self->priv->g_dup_func != NULL)) ? self->priv->g_dup_func ((gpointer) _tmp2_) : ((gpointer) _tmp2_);
#line 48 "/home/jens/Source/shotwell/src/core/util.vala"
((self->priv->current == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->current = (self->priv->g_destroy_func (self->priv->current), NULL));
#line 48 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->current = _tmp3_;
#line 50 "/home/jens/Source/shotwell/src/core/util.vala"
result = TRUE;
#line 50 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 584 "util.c"
}
static void singleton_collection_singleton_iterator_real_remove (GeeIterator* base) {
SingletonCollectionSingletonIterator * self;
gboolean _tmp0_ = FALSE;
#line 53 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 54 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->done;
#line 54 "/home/jens/Source/shotwell/src/core/util.vala"
if (!_tmp0_) {
#line 597 "util.c"
SingletonCollection* _tmp1_ = NULL;
#line 55 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->c;
#line 55 "/home/jens/Source/shotwell/src/core/util.vala"
((_tmp1_->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (_tmp1_->priv->object = (self->priv->g_destroy_func (_tmp1_->priv->object), NULL));
#line 55 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_->priv->object = NULL;
#line 56 "/home/jens/Source/shotwell/src/core/util.vala"
((self->priv->current == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->current = (self->priv->g_destroy_func (self->priv->current), NULL));
#line 56 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->current = NULL;
#line 609 "util.c"
}
#line 59 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->done = TRUE;
#line 613 "util.c"
}
static gboolean singleton_collection_singleton_iterator_real_get_read_only (GeeIterator* base) {
gboolean result;
SingletonCollectionSingletonIterator* self;
gboolean _tmp0_ = FALSE;
#line 24 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 24 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->done;
#line 24 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp0_;
#line 24 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 629 "util.c"
}
static gboolean singleton_collection_singleton_iterator_real_get_valid (GeeIterator* base) {
gboolean result;
SingletonCollectionSingletonIterator* self;
gboolean _tmp0_ = FALSE;
#line 28 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (base, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 28 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->done;
#line 28 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp0_;
#line 28 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 645 "util.c"
}
static void singleton_collection_singleton_iterator_class_init (SingletonCollectionSingletonIteratorClass * klass) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
singleton_collection_singleton_iterator_parent_class = g_type_class_peek_parent (klass);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_type_class_add_private (klass, sizeof (SingletonCollectionSingletonIteratorPrivate));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (klass)->get_property = _vala_singleton_collection_singleton_iterator_get_property;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (klass)->set_property = _vala_singleton_collection_singleton_iterator_set_property;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (klass)->finalize = singleton_collection_singleton_iterator_finalize;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_TYPE, g_param_spec_gtype ("g-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DUP_FUNC, g_param_spec_pointer ("g-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DESTROY_FUNC, g_param_spec_pointer ("g-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY, g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID, g_param_spec_boolean ("valid", "valid", "valid", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 670 "util.c"
}
static GType singleton_collection_singleton_iterator_gee_traversable_get_g_type (SingletonCollectionSingletonIterator* self) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
return self->priv->g_type;
#line 677 "util.c"
}
static GBoxedCopyFunc singleton_collection_singleton_iterator_gee_traversable_get_g_dup_func (SingletonCollectionSingletonIterator* self) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
return self->priv->g_dup_func;
#line 684 "util.c"
}
static GDestroyNotify singleton_collection_singleton_iterator_gee_traversable_get_g_destroy_func (SingletonCollectionSingletonIterator* self) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
return self->priv->g_destroy_func;
#line 691 "util.c"
}
static void singleton_collection_singleton_iterator_gee_traversable_interface_init (GeeTraversableIface * iface) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
singleton_collection_singleton_iterator_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->foreach = (gboolean (*)(GeeTraversable*, GeeForallFunc, void*)) singleton_collection_singleton_iterator_real_foreach;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->get_g_type = (GType(*)(GeeTraversable*)) singleton_collection_singleton_iterator_gee_traversable_get_g_type;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeTraversable*)) singleton_collection_singleton_iterator_gee_traversable_get_g_dup_func;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->get_g_destroy_func = (GDestroyNotify(*)(GeeTraversable*)) singleton_collection_singleton_iterator_gee_traversable_get_g_destroy_func;
#line 706 "util.c"
}
static void singleton_collection_singleton_iterator_gee_iterator_interface_init (GeeIteratorIface * iface) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
singleton_collection_singleton_iterator_gee_iterator_parent_iface = g_type_interface_peek_parent (iface);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->get = (gpointer (*)(GeeIterator*)) singleton_collection_singleton_iterator_real_get;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->has_next = (gboolean (*)(GeeIterator*)) singleton_collection_singleton_iterator_real_has_next;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->next = (gboolean (*)(GeeIterator*)) singleton_collection_singleton_iterator_real_next;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->remove = (void (*)(GeeIterator*)) singleton_collection_singleton_iterator_real_remove;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->get_read_only = singleton_collection_singleton_iterator_real_get_read_only;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
iface->get_valid = singleton_collection_singleton_iterator_real_get_valid;
#line 725 "util.c"
}
static void singleton_collection_singleton_iterator_instance_init (SingletonCollectionSingletonIterator * self) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv = SINGLETON_COLLECTION_SINGLETON_ITERATOR_GET_PRIVATE (self);
#line 16 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->done = FALSE;
#line 17 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->current = NULL;
#line 736 "util.c"
}
static void singleton_collection_singleton_iterator_finalize (GObject* obj) {
SingletonCollectionSingletonIterator * self;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 15 "/home/jens/Source/shotwell/src/core/util.vala"
_g_object_unref0 (self->priv->c);
#line 17 "/home/jens/Source/shotwell/src/core/util.vala"
((self->priv->current == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->current = (self->priv->g_destroy_func (self->priv->current), NULL));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (singleton_collection_singleton_iterator_parent_class)->finalize (obj);
#line 750 "util.c"
}
static GType singleton_collection_singleton_iterator_get_type (void) {
static volatile gsize singleton_collection_singleton_iterator_type_id__volatile = 0;
if (g_once_init_enter (&singleton_collection_singleton_iterator_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (SingletonCollectionSingletonIteratorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) singleton_collection_singleton_iterator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SingletonCollectionSingletonIterator), 0, (GInstanceInitFunc) singleton_collection_singleton_iterator_instance_init, NULL };
static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) singleton_collection_singleton_iterator_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
static const GInterfaceInfo gee_iterator_info = { (GInterfaceInitFunc) singleton_collection_singleton_iterator_gee_iterator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType singleton_collection_singleton_iterator_type_id;
singleton_collection_singleton_iterator_type_id = g_type_register_static (G_TYPE_OBJECT, "SingletonCollectionSingletonIterator", &g_define_type_info, 0);
g_type_add_interface_static (singleton_collection_singleton_iterator_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
g_type_add_interface_static (singleton_collection_singleton_iterator_type_id, GEE_TYPE_ITERATOR, &gee_iterator_info);
g_once_init_leave (&singleton_collection_singleton_iterator_type_id__volatile, singleton_collection_singleton_iterator_type_id);
}
return singleton_collection_singleton_iterator_type_id__volatile;
}
static void _vala_singleton_collection_singleton_iterator_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
SingletonCollectionSingletonIterator * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
switch (property_id) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_SINGLETON_ITERATOR_READ_ONLY:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_value_set_boolean (value, gee_iterator_get_read_only (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ITERATOR, GeeIterator)));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_SINGLETON_ITERATOR_VALID:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
g_value_set_boolean (value, gee_iterator_get_valid (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ITERATOR, GeeIterator)));
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 787 "util.c"
default:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 793 "util.c"
}
}
static void _vala_singleton_collection_singleton_iterator_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
SingletonCollectionSingletonIterator * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, SINGLETON_COLLECTION_TYPE_SINGLETON_ITERATOR, SingletonCollectionSingletonIterator);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
switch (property_id) {
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_TYPE:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_type = g_value_get_gtype (value);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DUP_FUNC:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_dup_func = g_value_get_pointer (value);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_SINGLETON_ITERATOR_G_DESTROY_FUNC:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_destroy_func = g_value_get_pointer (value);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 821 "util.c"
default:
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 14 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 827 "util.c"
}
}
static void singleton_collection_class_init (SingletonCollectionClass * klass) {
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
singleton_collection_parent_class = g_type_class_peek_parent (klass);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_type_class_add_private (klass, sizeof (SingletonCollectionPrivate));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
((GeeAbstractCollectionClass *) klass)->add = singleton_collection_real_add;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
((GeeAbstractCollectionClass *) klass)->clear = singleton_collection_real_clear;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
((GeeAbstractCollectionClass *) klass)->contains = singleton_collection_real_contains;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
((GeeAbstractCollectionClass *) klass)->iterator = singleton_collection_real_iterator;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
((GeeAbstractCollectionClass *) klass)->remove = singleton_collection_real_remove;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_read_only = singleton_collection_real_get_read_only;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
GEE_ABSTRACT_COLLECTION_CLASS (klass)->get_size = singleton_collection_real_get_size;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (klass)->get_property = _vala_singleton_collection_get_property;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (klass)->set_property = _vala_singleton_collection_set_property;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (klass)->finalize = singleton_collection_finalize;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_G_TYPE, g_param_spec_gtype ("g-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_G_DUP_FUNC, g_param_spec_pointer ("g-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_G_DESTROY_FUNC, g_param_spec_pointer ("g-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_READ_ONLY, g_param_spec_boolean ("read-only", "read-only", "read-only", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_object_class_install_property (G_OBJECT_CLASS (klass), SINGLETON_COLLECTION_SIZE, g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 867 "util.c"
}
static void singleton_collection_instance_init (SingletonCollection * self) {
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv = SINGLETON_COLLECTION_GET_PRIVATE (self);
#line 874 "util.c"
}
static void singleton_collection_finalize (GObject* obj) {
SingletonCollection * self;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 63 "/home/jens/Source/shotwell/src/core/util.vala"
((self->priv->object == NULL) || (self->priv->g_destroy_func == NULL)) ? NULL : (self->priv->object = (self->priv->g_destroy_func (self->priv->object), NULL));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_CLASS (singleton_collection_parent_class)->finalize (obj);
#line 886 "util.c"
}
GType singleton_collection_get_type (void) {
static volatile gsize singleton_collection_type_id__volatile = 0;
if (g_once_init_enter (&singleton_collection_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (SingletonCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) singleton_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SingletonCollection), 0, (GInstanceInitFunc) singleton_collection_instance_init, NULL };
GType singleton_collection_type_id;
singleton_collection_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_COLLECTION, "SingletonCollection", &g_define_type_info, 0);
g_once_init_leave (&singleton_collection_type_id__volatile, singleton_collection_type_id);
}
return singleton_collection_type_id__volatile;
}
static void _vala_singleton_collection_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
SingletonCollection * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
switch (property_id) {
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_READ_ONLY:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_value_set_boolean (value, gee_abstract_collection_get_read_only (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_SIZE:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
g_value_set_int (value, gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (self, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection)));
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 919 "util.c"
default:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 925 "util.c"
}
}
static void _vala_singleton_collection_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
SingletonCollection * self;
self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_SINGLETON_COLLECTION, SingletonCollection);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
switch (property_id) {
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_G_TYPE:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_type = g_value_get_gtype (value);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_G_DUP_FUNC:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_dup_func = g_value_get_pointer (value);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
case SINGLETON_COLLECTION_G_DESTROY_FUNC:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->g_destroy_func = g_value_get_pointer (value);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 953 "util.c"
default:
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 13 "/home/jens/Source/shotwell/src/core/util.vala"
break;
#line 959 "util.c"
}
}
void marker_mark (Marker* self, DataObject* object) {
#line 113 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (IS_MARKER (self));
#line 113 "/home/jens/Source/shotwell/src/core/util.vala"
MARKER_GET_INTERFACE (self)->mark (self, object);
#line 969 "util.c"
}
void marker_unmark (Marker* self, DataObject* object) {
#line 115 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (IS_MARKER (self));
#line 115 "/home/jens/Source/shotwell/src/core/util.vala"
MARKER_GET_INTERFACE (self)->unmark (self, object);
#line 978 "util.c"
}
gboolean marker_toggle (Marker* self, DataObject* object) {
#line 117 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (IS_MARKER (self), FALSE);
#line 117 "/home/jens/Source/shotwell/src/core/util.vala"
return MARKER_GET_INTERFACE (self)->toggle (self, object);
#line 987 "util.c"
}
void marker_mark_many (Marker* self, GeeCollection* list) {
#line 119 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (IS_MARKER (self));
#line 119 "/home/jens/Source/shotwell/src/core/util.vala"
MARKER_GET_INTERFACE (self)->mark_many (self, list);
#line 996 "util.c"
}
void marker_unmark_many (Marker* self, GeeCollection* list) {
#line 121 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (IS_MARKER (self));
#line 121 "/home/jens/Source/shotwell/src/core/util.vala"
MARKER_GET_INTERFACE (self)->unmark_many (self, list);
#line 1005 "util.c"
}
void marker_mark_all (Marker* self) {
#line 123 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (IS_MARKER (self));
#line 123 "/home/jens/Source/shotwell/src/core/util.vala"
MARKER_GET_INTERFACE (self)->mark_all (self);
#line 1014 "util.c"
}
gint marker_get_count (Marker* self) {
#line 127 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (IS_MARKER (self), 0);
#line 127 "/home/jens/Source/shotwell/src/core/util.vala"
return MARKER_GET_INTERFACE (self)->get_count (self);
#line 1023 "util.c"
}
GeeCollection* marker_get_all (Marker* self) {
#line 130 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (IS_MARKER (self), NULL);
#line 130 "/home/jens/Source/shotwell/src/core/util.vala"
return MARKER_GET_INTERFACE (self)->get_all (self);
#line 1032 "util.c"
}
static void marker_base_init (MarkerIface * iface) {
#line 112 "/home/jens/Source/shotwell/src/core/util.vala"
static gboolean initialized = FALSE;
#line 112 "/home/jens/Source/shotwell/src/core/util.vala"
if (!initialized) {
#line 112 "/home/jens/Source/shotwell/src/core/util.vala"
initialized = TRUE;
#line 1043 "util.c"
}
}
GType marker_get_type (void) {
static volatile gsize marker_type_id__volatile = 0;
if (g_once_init_enter (&marker_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (MarkerIface), (GBaseInitFunc) marker_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
GType marker_type_id;
marker_type_id = g_type_register_static (G_TYPE_INTERFACE, "Marker", &g_define_type_info, 0);
g_type_interface_add_prerequisite (marker_type_id, G_TYPE_OBJECT);
g_once_init_leave (&marker_type_id__volatile, marker_type_id);
}
return marker_type_id__volatile;
}
UnknownTotalMonitor* unknown_total_monitor_construct (GType object_type, guint64 total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target) {
UnknownTotalMonitor* self = NULL;
guint64 _tmp0_ = 0ULL;
ProgressMonitor _tmp1_ = NULL;
void* _tmp1__target = NULL;
#line 147 "/home/jens/Source/shotwell/src/core/util.vala"
self = (UnknownTotalMonitor*) g_type_create_instance (object_type);
#line 148 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = total;
#line 148 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->total = _tmp0_;
#line 149 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = wrapped_monitor;
#line 149 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1__target = wrapped_monitor_target;
#line 149 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->wrapped_monitor = _tmp1_;
#line 149 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->wrapped_monitor_target = _tmp1__target;
#line 147 "/home/jens/Source/shotwell/src/core/util.vala"
return self;
#line 1082 "util.c"
}
UnknownTotalMonitor* unknown_total_monitor_new (guint64 total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target) {
#line 147 "/home/jens/Source/shotwell/src/core/util.vala"
return unknown_total_monitor_construct (TYPE_UNKNOWN_TOTAL_MONITOR, total, wrapped_monitor, wrapped_monitor_target);
#line 1089 "util.c"
}
gboolean unknown_total_monitor_monitor (UnknownTotalMonitor* self, guint64 count, guint64 total) {
gboolean result = FALSE;
ProgressMonitor _tmp0_ = NULL;
void* _tmp0__target = NULL;
guint64 _tmp1_ = 0ULL;
guint64 _tmp2_ = 0ULL;
gboolean _tmp3_ = FALSE;
#line 152 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (IS_UNKNOWN_TOTAL_MONITOR (self), FALSE);
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = self->priv->wrapped_monitor;
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0__target = self->priv->wrapped_monitor_target;
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = count;
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp2_ = self->priv->total;
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp3_ = _tmp0_ (_tmp1_, _tmp2_, TRUE, _tmp0__target);
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp3_;
#line 153 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 1116 "util.c"
}
static void value_unknown_total_monitor_init (GValue* value) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1123 "util.c"
}
static void value_unknown_total_monitor_free_value (GValue* value) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (value->data[0].v_pointer) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
unknown_total_monitor_unref (value->data[0].v_pointer);
#line 1132 "util.c"
}
}
static void value_unknown_total_monitor_copy_value (const GValue* src_value, GValue* dest_value) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (src_value->data[0].v_pointer) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
dest_value->data[0].v_pointer = unknown_total_monitor_ref (src_value->data[0].v_pointer);
#line 1142 "util.c"
} else {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
dest_value->data[0].v_pointer = NULL;
#line 1146 "util.c"
}
}
static gpointer value_unknown_total_monitor_peek_pointer (const GValue* value) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return value->data[0].v_pointer;
#line 1154 "util.c"
}
static gchar* value_unknown_total_monitor_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (collect_values[0].v_pointer) {
#line 1161 "util.c"
UnknownTotalMonitor* object;
object = collect_values[0].v_pointer;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (object->parent_instance.g_class == NULL) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1168 "util.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1172 "util.c"
}
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = unknown_total_monitor_ref (object);
#line 1176 "util.c"
} else {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1180 "util.c"
}
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return NULL;
#line 1184 "util.c"
}
static gchar* value_unknown_total_monitor_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
UnknownTotalMonitor** object_p;
object_p = collect_values[0].v_pointer;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (!object_p) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1195 "util.c"
}
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (!value->data[0].v_pointer) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
*object_p = NULL;
#line 1201 "util.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
*object_p = value->data[0].v_pointer;
#line 1205 "util.c"
} else {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
*object_p = unknown_total_monitor_ref (value->data[0].v_pointer);
#line 1209 "util.c"
}
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return NULL;
#line 1213 "util.c"
}
GParamSpec* param_spec_unknown_total_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
ParamSpecUnknownTotalMonitor* spec;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_UNKNOWN_TOTAL_MONITOR), NULL);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return G_PARAM_SPEC (spec);
#line 1227 "util.c"
}
gpointer value_get_unknown_total_monitor (const GValue* value) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_UNKNOWN_TOTAL_MONITOR), NULL);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return value->data[0].v_pointer;
#line 1236 "util.c"
}
void value_set_unknown_total_monitor (GValue* value, gpointer v_object) {
UnknownTotalMonitor* old;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_UNKNOWN_TOTAL_MONITOR));
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
old = value->data[0].v_pointer;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (v_object) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_UNKNOWN_TOTAL_MONITOR));
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = v_object;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
unknown_total_monitor_ref (value->data[0].v_pointer);
#line 1256 "util.c"
} else {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1260 "util.c"
}
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (old) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
unknown_total_monitor_unref (old);
#line 1266 "util.c"
}
}
void value_take_unknown_total_monitor (GValue* value, gpointer v_object) {
UnknownTotalMonitor* old;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_UNKNOWN_TOTAL_MONITOR));
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
old = value->data[0].v_pointer;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (v_object) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_UNKNOWN_TOTAL_MONITOR));
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = v_object;
#line 1285 "util.c"
} else {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1289 "util.c"
}
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (old) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
unknown_total_monitor_unref (old);
#line 1295 "util.c"
}
}
static void unknown_total_monitor_class_init (UnknownTotalMonitorClass * klass) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
unknown_total_monitor_parent_class = g_type_class_peek_parent (klass);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
((UnknownTotalMonitorClass *) klass)->finalize = unknown_total_monitor_finalize;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_type_class_add_private (klass, sizeof (UnknownTotalMonitorPrivate));
#line 1307 "util.c"
}
static void unknown_total_monitor_instance_init (UnknownTotalMonitor * self) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv = UNKNOWN_TOTAL_MONITOR_GET_PRIVATE (self);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
self->ref_count = 1;
#line 1316 "util.c"
}
static void unknown_total_monitor_finalize (UnknownTotalMonitor* obj) {
UnknownTotalMonitor * self;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UNKNOWN_TOTAL_MONITOR, UnknownTotalMonitor);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_signal_handlers_destroy (self);
#line 1326 "util.c"
}
GType unknown_total_monitor_get_type (void) {
static volatile gsize unknown_total_monitor_type_id__volatile = 0;
if (g_once_init_enter (&unknown_total_monitor_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_unknown_total_monitor_init, value_unknown_total_monitor_free_value, value_unknown_total_monitor_copy_value, value_unknown_total_monitor_peek_pointer, "p", value_unknown_total_monitor_collect_value, "p", value_unknown_total_monitor_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (UnknownTotalMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unknown_total_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnknownTotalMonitor), 0, (GInstanceInitFunc) unknown_total_monitor_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType unknown_total_monitor_type_id;
unknown_total_monitor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnknownTotalMonitor", &g_define_type_info, &g_define_type_fundamental_info, 0);
g_once_init_leave (&unknown_total_monitor_type_id__volatile, unknown_total_monitor_type_id);
}
return unknown_total_monitor_type_id__volatile;
}
gpointer unknown_total_monitor_ref (gpointer instance) {
UnknownTotalMonitor* self;
self = instance;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_atomic_int_inc (&self->ref_count);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
return instance;
#line 1351 "util.c"
}
void unknown_total_monitor_unref (gpointer instance) {
UnknownTotalMonitor* self;
self = instance;
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
UNKNOWN_TOTAL_MONITOR_GET_CLASS (self)->finalize (self);
#line 143 "/home/jens/Source/shotwell/src/core/util.vala"
g_type_free_instance ((GTypeInstance *) self);
#line 1364 "util.c"
}
}
AggregateProgressMonitor* aggregate_progress_monitor_construct (GType object_type, guint64 grand_total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target) {
AggregateProgressMonitor* self = NULL;
guint64 _tmp0_ = 0ULL;
ProgressMonitor _tmp1_ = NULL;
void* _tmp1__target = NULL;
#line 165 "/home/jens/Source/shotwell/src/core/util.vala"
self = (AggregateProgressMonitor*) g_type_create_instance (object_type);
#line 166 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = grand_total;
#line 166 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->grand_total = _tmp0_;
#line 167 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = wrapped_monitor;
#line 167 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1__target = wrapped_monitor_target;
#line 167 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->wrapped_monitor = _tmp1_;
#line 167 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->wrapped_monitor_target = _tmp1__target;
#line 165 "/home/jens/Source/shotwell/src/core/util.vala"
return self;
#line 1390 "util.c"
}
AggregateProgressMonitor* aggregate_progress_monitor_new (guint64 grand_total, ProgressMonitor wrapped_monitor, void* wrapped_monitor_target) {
#line 165 "/home/jens/Source/shotwell/src/core/util.vala"
return aggregate_progress_monitor_construct (TYPE_AGGREGATE_PROGRESS_MONITOR, grand_total, wrapped_monitor, wrapped_monitor_target);
#line 1397 "util.c"
}
void aggregate_progress_monitor_next_step (AggregateProgressMonitor* self, const gchar* name) {
const gchar* _tmp0_ = NULL;
guint64 _tmp1_ = 0ULL;
gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
guint64 _tmp4_ = 0ULL;
gchar* _tmp5_ = NULL;
gchar* _tmp6_ = NULL;
#line 170 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (IS_AGGREGATE_PROGRESS_MONITOR (self));
#line 170 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (name != NULL);
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = name;
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->aggregate_count;
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp2_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp1_);
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp3_ = _tmp2_;
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp4_ = self->priv->grand_total;
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp5_ = g_strdup_printf ("%" G_GUINT64_FORMAT, _tmp4_);
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp6_ = _tmp5_;
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
g_debug ("util.vala:171: next step: %s (%s/%s)", _tmp0_, _tmp3_, _tmp6_);
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_g_free0 (_tmp6_);
#line 171 "/home/jens/Source/shotwell/src/core/util.vala"
_g_free0 (_tmp3_);
#line 172 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->last_count = G_MAXUINT64;
#line 1435 "util.c"
}
gboolean aggregate_progress_monitor_monitor (AggregateProgressMonitor* self, guint64 count, guint64 total) {
gboolean result = FALSE;
guint64 _tmp0_ = 0ULL;
guint64 _tmp1_ = 0ULL;
guint64 _tmp5_ = 0ULL;
guint64 _tmp6_ = 0ULL;
guint64 _tmp7_ = 0ULL;
guint64 _tmp9_ = 0ULL;
ProgressMonitor _tmp10_ = NULL;
void* _tmp10__target = NULL;
guint64 _tmp11_ = 0ULL;
guint64 _tmp12_ = 0ULL;
gboolean _tmp13_ = FALSE;
#line 175 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (IS_AGGREGATE_PROGRESS_MONITOR (self), FALSE);
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp1_ = self->priv->last_count;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
if (_tmp1_ != G_MAXUINT64) {
#line 1458 "util.c"
guint64 _tmp2_ = 0ULL;
guint64 _tmp3_ = 0ULL;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp2_ = count;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp3_ = self->priv->last_count;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = _tmp2_ - _tmp3_;
#line 1467 "util.c"
} else {
guint64 _tmp4_ = 0ULL;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp4_ = count;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = _tmp4_;
#line 1474 "util.c"
}
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp5_ = self->priv->aggregate_count;
#line 177 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->aggregate_count = _tmp5_ + _tmp0_;
#line 178 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp6_ = self->priv->aggregate_count;
#line 178 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp7_ = self->priv->grand_total;
#line 178 "/home/jens/Source/shotwell/src/core/util.vala"
if (_tmp6_ > _tmp7_) {
#line 1486 "util.c"
guint64 _tmp8_ = 0ULL;
#line 179 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp8_ = self->priv->grand_total;
#line 179 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->aggregate_count = _tmp8_;
#line 1492 "util.c"
}
#line 182 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp9_ = count;
#line 182 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->last_count = _tmp9_;
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp10_ = self->priv->wrapped_monitor;
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp10__target = self->priv->wrapped_monitor_target;
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp11_ = self->priv->aggregate_count;
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp12_ = self->priv->grand_total;
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp13_ = _tmp10_ (_tmp11_, _tmp12_, TRUE, _tmp10__target);
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp13_;
#line 184 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 1512 "util.c"
}
static void value_aggregate_progress_monitor_init (GValue* value) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1519 "util.c"
}
static void value_aggregate_progress_monitor_free_value (GValue* value) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (value->data[0].v_pointer) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
aggregate_progress_monitor_unref (value->data[0].v_pointer);
#line 1528 "util.c"
}
}
static void value_aggregate_progress_monitor_copy_value (const GValue* src_value, GValue* dest_value) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (src_value->data[0].v_pointer) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
dest_value->data[0].v_pointer = aggregate_progress_monitor_ref (src_value->data[0].v_pointer);
#line 1538 "util.c"
} else {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
dest_value->data[0].v_pointer = NULL;
#line 1542 "util.c"
}
}
static gpointer value_aggregate_progress_monitor_peek_pointer (const GValue* value) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return value->data[0].v_pointer;
#line 1550 "util.c"
}
static gchar* value_aggregate_progress_monitor_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (collect_values[0].v_pointer) {
#line 1557 "util.c"
AggregateProgressMonitor* object;
object = collect_values[0].v_pointer;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (object->parent_instance.g_class == NULL) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1564 "util.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1568 "util.c"
}
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = aggregate_progress_monitor_ref (object);
#line 1572 "util.c"
} else {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1576 "util.c"
}
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return NULL;
#line 1580 "util.c"
}
static gchar* value_aggregate_progress_monitor_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
AggregateProgressMonitor** object_p;
object_p = collect_values[0].v_pointer;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (!object_p) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1591 "util.c"
}
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (!value->data[0].v_pointer) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
*object_p = NULL;
#line 1597 "util.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
*object_p = value->data[0].v_pointer;
#line 1601 "util.c"
} else {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
*object_p = aggregate_progress_monitor_ref (value->data[0].v_pointer);
#line 1605 "util.c"
}
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return NULL;
#line 1609 "util.c"
}
GParamSpec* param_spec_aggregate_progress_monitor (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
ParamSpecAggregateProgressMonitor* spec;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_AGGREGATE_PROGRESS_MONITOR), NULL);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return G_PARAM_SPEC (spec);
#line 1623 "util.c"
}
gpointer value_get_aggregate_progress_monitor (const GValue* value) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AGGREGATE_PROGRESS_MONITOR), NULL);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return value->data[0].v_pointer;
#line 1632 "util.c"
}
void value_set_aggregate_progress_monitor (GValue* value, gpointer v_object) {
AggregateProgressMonitor* old;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AGGREGATE_PROGRESS_MONITOR));
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
old = value->data[0].v_pointer;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (v_object) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AGGREGATE_PROGRESS_MONITOR));
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = v_object;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
aggregate_progress_monitor_ref (value->data[0].v_pointer);
#line 1652 "util.c"
} else {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1656 "util.c"
}
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (old) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
aggregate_progress_monitor_unref (old);
#line 1662 "util.c"
}
}
void value_take_aggregate_progress_monitor (GValue* value, gpointer v_object) {
AggregateProgressMonitor* old;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AGGREGATE_PROGRESS_MONITOR));
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
old = value->data[0].v_pointer;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (v_object) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_AGGREGATE_PROGRESS_MONITOR));
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = v_object;
#line 1681 "util.c"
} else {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
value->data[0].v_pointer = NULL;
#line 1685 "util.c"
}
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (old) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
aggregate_progress_monitor_unref (old);
#line 1691 "util.c"
}
}
static void aggregate_progress_monitor_class_init (AggregateProgressMonitorClass * klass) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
aggregate_progress_monitor_parent_class = g_type_class_peek_parent (klass);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
((AggregateProgressMonitorClass *) klass)->finalize = aggregate_progress_monitor_finalize;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_type_class_add_private (klass, sizeof (AggregateProgressMonitorPrivate));
#line 1703 "util.c"
}
static void aggregate_progress_monitor_instance_init (AggregateProgressMonitor * self) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv = AGGREGATE_PROGRESS_MONITOR_GET_PRIVATE (self);
#line 162 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->aggregate_count = (guint64) 0;
#line 163 "/home/jens/Source/shotwell/src/core/util.vala"
self->priv->last_count = G_MAXUINT64;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
self->ref_count = 1;
#line 1716 "util.c"
}
static void aggregate_progress_monitor_finalize (AggregateProgressMonitor* obj) {
AggregateProgressMonitor * self;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_AGGREGATE_PROGRESS_MONITOR, AggregateProgressMonitor);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_signal_handlers_destroy (self);
#line 1726 "util.c"
}
GType aggregate_progress_monitor_get_type (void) {
static volatile gsize aggregate_progress_monitor_type_id__volatile = 0;
if (g_once_init_enter (&aggregate_progress_monitor_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_aggregate_progress_monitor_init, value_aggregate_progress_monitor_free_value, value_aggregate_progress_monitor_copy_value, value_aggregate_progress_monitor_peek_pointer, "p", value_aggregate_progress_monitor_collect_value, "p", value_aggregate_progress_monitor_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (AggregateProgressMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) aggregate_progress_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AggregateProgressMonitor), 0, (GInstanceInitFunc) aggregate_progress_monitor_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType aggregate_progress_monitor_type_id;
aggregate_progress_monitor_type_id = g_type_register_fundamental (g_type_fundamental_next (), "AggregateProgressMonitor", &g_define_type_info, &g_define_type_fundamental_info, 0);
g_once_init_leave (&aggregate_progress_monitor_type_id__volatile, aggregate_progress_monitor_type_id);
}
return aggregate_progress_monitor_type_id__volatile;
}
gpointer aggregate_progress_monitor_ref (gpointer instance) {
AggregateProgressMonitor* self;
self = instance;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_atomic_int_inc (&self->ref_count);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
return instance;
#line 1751 "util.c"
}
void aggregate_progress_monitor_unref (gpointer instance) {
AggregateProgressMonitor* self;
self = instance;
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
AGGREGATE_PROGRESS_MONITOR_GET_CLASS (self)->finalize (self);
#line 159 "/home/jens/Source/shotwell/src/core/util.vala"
g_type_free_instance ((GTypeInstance *) self);
#line 1764 "util.c"
}
}
gboolean null_progress_monitor (guint64 count, guint64 total) {
gboolean result = FALSE;
#line 190 "/home/jens/Source/shotwell/src/core/util.vala"
result = TRUE;
#line 190 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 1775 "util.c"
}
gdouble degrees_to_radians (gdouble theta) {
gdouble result = 0.0;
gdouble _tmp0_ = 0.0;
#line 195 "/home/jens/Source/shotwell/src/core/util.vala"
_tmp0_ = theta;
#line 195 "/home/jens/Source/shotwell/src/core/util.vala"
result = _tmp0_ * (G_PI / 180.0);
#line 195 "/home/jens/Source/shotwell/src/core/util.vala"
return result;
#line 1788 "util.c"
}
|