File: presentation_controller.c

package info (click to toggle)
pdf-presenter-console 3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,660 kB
  • sloc: ansic: 18,202; makefile: 6
file content (3048 lines) | stat: -rw-r--r-- 115,457 bytes parent folder | download
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
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
/* presentation_controller.c generated by valac 0.16.0, the Vala compiler
 * generated from presentation_controller.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdio.h>
#include <gdk/gdk.h>
#include <gobject/gvaluecollector.h>


#define PDFPC_TYPE_PRESENTATION_CONTROLLER (pdfpc_presentation_controller_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationController))
#define PDFPC_PRESENTATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationControllerClass))
#define PDFPC_IS_PRESENTATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_PRESENTATION_CONTROLLER))
#define PDFPC_IS_PRESENTATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_PRESENTATION_CONTROLLER))
#define PDFPC_PRESENTATION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationControllerClass))

typedef struct _pdfpcPresentationController pdfpcPresentationController;
typedef struct _pdfpcPresentationControllerClass pdfpcPresentationControllerClass;
typedef struct _pdfpcPresentationControllerPrivate pdfpcPresentationControllerPrivate;

#define PDFPC_TYPE_CONTROLLABLE (pdfpc_controllable_get_type ())
#define PDFPC_CONTROLLABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_CONTROLLABLE, pdfpcControllable))
#define PDFPC_IS_CONTROLLABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_CONTROLLABLE))
#define PDFPC_CONTROLLABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PDFPC_TYPE_CONTROLLABLE, pdfpcControllableIface))

typedef struct _pdfpcControllable pdfpcControllable;
typedef struct _pdfpcControllableIface pdfpcControllableIface;

#define PDFPC_METADATA_TYPE_BASE (pdfpc_metadata_base_get_type ())
#define PDFPC_METADATA_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_METADATA_TYPE_BASE, pdfpcMetadataBase))
#define PDFPC_METADATA_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_METADATA_TYPE_BASE, pdfpcMetadataBaseClass))
#define PDFPC_METADATA_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_METADATA_TYPE_BASE))
#define PDFPC_METADATA_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_METADATA_TYPE_BASE))
#define PDFPC_METADATA_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_METADATA_TYPE_BASE, pdfpcMetadataBaseClass))

typedef struct _pdfpcMetadataBase pdfpcMetadataBase;
typedef struct _pdfpcMetadataBaseClass pdfpcMetadataBaseClass;

#define PDFPC_METADATA_TYPE_PDF (pdfpc_metadata_pdf_get_type ())
#define PDFPC_METADATA_PDF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_METADATA_TYPE_PDF, pdfpcMetadataPdf))
#define PDFPC_METADATA_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_METADATA_TYPE_PDF, pdfpcMetadataPdfClass))
#define PDFPC_METADATA_IS_PDF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_METADATA_TYPE_PDF))
#define PDFPC_METADATA_IS_PDF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_METADATA_TYPE_PDF))
#define PDFPC_METADATA_PDF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_METADATA_TYPE_PDF, pdfpcMetadataPdfClass))

typedef struct _pdfpcMetadataPdf pdfpcMetadataPdf;
typedef struct _pdfpcMetadataPdfClass pdfpcMetadataPdfClass;

#define PDFPC_WINDOW_TYPE_OVERVIEW (pdfpc_window_overview_get_type ())
#define PDFPC_WINDOW_OVERVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_WINDOW_TYPE_OVERVIEW, pdfpcWindowOverview))
#define PDFPC_WINDOW_OVERVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_WINDOW_TYPE_OVERVIEW, pdfpcWindowOverviewClass))
#define PDFPC_WINDOW_IS_OVERVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_WINDOW_TYPE_OVERVIEW))
#define PDFPC_WINDOW_IS_OVERVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_WINDOW_TYPE_OVERVIEW))
#define PDFPC_WINDOW_OVERVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_WINDOW_TYPE_OVERVIEW, pdfpcWindowOverviewClass))

typedef struct _pdfpcWindowOverview pdfpcWindowOverview;
typedef struct _pdfpcWindowOverviewClass pdfpcWindowOverviewClass;

#define PDFPC_TYPE_TIMER_LABEL (pdfpc_timer_label_get_type ())
#define PDFPC_TIMER_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_TIMER_LABEL, pdfpcTimerLabel))
#define PDFPC_TIMER_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_TIMER_LABEL, pdfpcTimerLabelClass))
#define PDFPC_IS_TIMER_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_TIMER_LABEL))
#define PDFPC_IS_TIMER_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_TIMER_LABEL))
#define PDFPC_TIMER_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_TIMER_LABEL, pdfpcTimerLabelClass))

typedef struct _pdfpcTimerLabel pdfpcTimerLabel;
typedef struct _pdfpcTimerLabelClass pdfpcTimerLabelClass;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION (pdfpc_presentation_controller_key_action_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, pdfpcPresentationControllerKeyAction))
#define PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, pdfpcPresentationControllerKeyActionClass))
#define PDFPC_PRESENTATION_CONTROLLER_IS_KEY_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION))
#define PDFPC_PRESENTATION_CONTROLLER_IS_KEY_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION))
#define PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, pdfpcPresentationControllerKeyActionClass))

typedef struct _pdfpcPresentationControllerKeyAction pdfpcPresentationControllerKeyAction;
typedef struct _pdfpcPresentationControllerKeyActionClass pdfpcPresentationControllerKeyActionClass;

#define PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF (pdfpc_presentation_controller_key_def_get_type ())
#define PDFPC_PRESENTATION_CONTROLLER_KEY_DEF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, pdfpcPresentationControllerKeyDef))
#define PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, pdfpcPresentationControllerKeyDefClass))
#define PDFPC_PRESENTATION_CONTROLLER_IS_KEY_DEF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF))
#define PDFPC_PRESENTATION_CONTROLLER_IS_KEY_DEF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF))
#define PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, pdfpcPresentationControllerKeyDefClass))

typedef struct _pdfpcPresentationControllerKeyDef pdfpcPresentationControllerKeyDef;
typedef struct _pdfpcPresentationControllerKeyDefClass pdfpcPresentationControllerKeyDefClass;
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _pdfpc_presentation_controller_key_action_unref0(var) ((var == NULL) ? NULL : (var = (pdfpc_presentation_controller_key_action_unref (var), NULL)))
#define _pdfpc_presentation_controller_key_def_unref0(var) ((var == NULL) ? NULL : (var = (pdfpc_presentation_controller_key_def_unref (var), NULL)))
typedef struct _pdfpcPresentationControllerKeyActionPrivate pdfpcPresentationControllerKeyActionPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _pdfpcPresentationControllerParamSpecKeyAction pdfpcPresentationControllerParamSpecKeyAction;
typedef struct _pdfpcPresentationControllerKeyDefPrivate pdfpcPresentationControllerKeyDefPrivate;
typedef struct _pdfpcPresentationControllerParamSpecKeyDef pdfpcPresentationControllerParamSpecKeyDef;

struct _pdfpcControllableIface {
	GTypeInterface parent_iface;
	pdfpcPresentationController* (*get_controller) (pdfpcControllable* self);
	void (*update) (pdfpcControllable* self);
	void (*edit_note) (pdfpcControllable* self);
	void (*ask_goto_page) (pdfpcControllable* self);
	void (*show_overview) (pdfpcControllable* self);
	void (*hide_overview) (pdfpcControllable* self);
};

struct _pdfpcPresentationController {
	GObject parent_instance;
	pdfpcPresentationControllerPrivate * priv;
	gint current_slide_number;
	gint current_user_slide_number;
	gboolean faded_to_black;
	gboolean frozen;
	gboolean black_on_end;
	gint n_slides;
	GList* controllables;
	gboolean ignore_keyboard_events;
	gboolean ignore_mouse_events;
	pdfpcMetadataPdf* metadata;
	pdfpcWindowOverview* overview;
	gboolean overview_shown;
	guint last_key_event;
	pdfpcTimerLabel* timer;
	GeeHashMap* actionNames;
	GeeHashMap* keyBindings;
	GeeHashMap* mouseBindings;
};

struct _pdfpcPresentationControllerClass {
	GObjectClass parent_class;
};

struct _pdfpcPresentationControllerPrivate {
	guint _accepted_key_mods;
	gint* history;
	gint history_length1;
	gint _history_size_;
};

typedef void (*pdfpcPresentationControllerKeyActionKeyActionDelegate) (void* user_data);
struct _pdfpcPresentationControllerKeyAction {
	GTypeInstance parent_instance;
	volatile int ref_count;
	pdfpcPresentationControllerKeyActionPrivate * priv;
	pdfpcPresentationControllerKeyActionKeyActionDelegate d;
	gpointer d_target;
	GDestroyNotify d_target_destroy_notify;
};

struct _pdfpcPresentationControllerKeyActionClass {
	GTypeClass parent_class;
	void (*finalize) (pdfpcPresentationControllerKeyAction *self);
};

struct _pdfpcPresentationControllerParamSpecKeyAction {
	GParamSpec parent_instance;
};

struct _pdfpcPresentationControllerKeyDef {
	GTypeInstance parent_instance;
	volatile int ref_count;
	pdfpcPresentationControllerKeyDefPrivate * priv;
};

struct _pdfpcPresentationControllerKeyDefClass {
	GTypeClass parent_class;
	void (*finalize) (pdfpcPresentationControllerKeyDef *self);
};

struct _pdfpcPresentationControllerKeyDefPrivate {
	guint _keycode;
	guint _modMask;
};

struct _pdfpcPresentationControllerParamSpecKeyDef {
	GParamSpec parent_instance;
};


static gpointer pdfpc_presentation_controller_parent_class = NULL;
extern gchar* pdfpc_options_start_time;
extern gchar* pdfpc_options_end_time;
extern guint pdfpc_options_duration;
extern guint pdfpc_options_last_minutes;
static gpointer pdfpc_presentation_controller_key_action_parent_class = NULL;
static gpointer pdfpc_presentation_controller_key_def_parent_class = NULL;

GType pdfpc_presentation_controller_get_type (void) G_GNUC_CONST;
GType pdfpc_controllable_get_type (void) G_GNUC_CONST;
GType pdfpc_metadata_base_get_type (void) G_GNUC_CONST;
GType pdfpc_metadata_pdf_get_type (void) G_GNUC_CONST;
GType pdfpc_window_overview_get_type (void) G_GNUC_CONST;
GType pdfpc_timer_label_get_type (void) G_GNUC_CONST;
gpointer pdfpc_presentation_controller_key_action_ref (gpointer instance);
void pdfpc_presentation_controller_key_action_unref (gpointer instance);
GParamSpec* pdfpc_presentation_controller_param_spec_key_action (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void pdfpc_presentation_controller_value_set_key_action (GValue* value, gpointer v_object);
void pdfpc_presentation_controller_value_take_key_action (GValue* value, gpointer v_object);
gpointer pdfpc_presentation_controller_value_get_key_action (const GValue* value);
GType pdfpc_presentation_controller_key_action_get_type (void) G_GNUC_CONST;
gpointer pdfpc_presentation_controller_key_def_ref (gpointer instance);
void pdfpc_presentation_controller_key_def_unref (gpointer instance);
GParamSpec* pdfpc_presentation_controller_param_spec_key_def (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void pdfpc_presentation_controller_value_set_key_def (GValue* value, gpointer v_object);
void pdfpc_presentation_controller_value_take_key_def (GValue* value, gpointer v_object);
gpointer pdfpc_presentation_controller_value_get_key_def (const GValue* value);
GType pdfpc_presentation_controller_key_def_get_type (void) G_GNUC_CONST;
#define PDFPC_PRESENTATION_CONTROLLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PDFPC_TYPE_PRESENTATION_CONTROLLER, pdfpcPresentationControllerPrivate))
enum  {
	PDFPC_PRESENTATION_CONTROLLER_DUMMY_PROPERTY,
	PDFPC_PRESENTATION_CONTROLLER_ACCEPTED_KEY_MODS
};
static void _g_object_unref0_ (gpointer var);
static void _g_list_free__g_object_unref0_ (GList* self);
pdfpcPresentationController* pdfpc_presentation_controller_new (pdfpcMetadataPdf* metadata, gboolean allow_black_on_end);
pdfpcPresentationController* pdfpc_presentation_controller_construct (GType object_type, pdfpcMetadataPdf* metadata, gboolean allow_black_on_end);
static time_t pdfpc_presentation_controller_parseTime (pdfpcPresentationController* self, const gchar* t);
void pdfpc_metadata_pdf_set_duration (pdfpcMetadataPdf* self, guint d);
pdfpcTimerLabel* pdfpc_getTimerLabel (gint duration, time_t end_time, guint last_minutes, time_t start_time);
guint pdfpc_metadata_pdf_get_duration (pdfpcMetadataPdf* self);
void pdfpc_timer_label_reset (pdfpcTimerLabel* self);
guint pdfpc_metadata_base_get_slide_count (pdfpcMetadataBase* self);
guint pdfpc_presentation_controller_key_def_hash (void* _a);
static guint _pdfpc_presentation_controller_key_def_hash_ghash_func (gconstpointer key);
gboolean pdfpc_presentation_controller_key_def_equal (void* _a, void* _b);
static gboolean _pdfpc_presentation_controller_key_def_equal_gequal_func (gconstpointer a, gconstpointer b);
void pdfpc_presentation_controller_fillActionNames (pdfpcPresentationController* self);
void pdfpc_presentation_controller_set_overview (pdfpcPresentationController* self, pdfpcWindowOverview* o);
void pdfpc_presentation_controller_next_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_next_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
pdfpcPresentationControllerKeyAction* pdfpc_presentation_controller_key_action_new (pdfpcPresentationControllerKeyActionKeyActionDelegate d, void* d_target);
pdfpcPresentationControllerKeyAction* pdfpc_presentation_controller_key_action_construct (GType object_type, pdfpcPresentationControllerKeyActionKeyActionDelegate d, void* d_target);
void pdfpc_presentation_controller_jump10 (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_jump10_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_next_user_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_next_user_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_previous_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_previous_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_back10 (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_back10_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_previous_user_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_previous_user_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_controllables_ask_goto_page (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_controllables_ask_goto_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_goto_first (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_goto_first_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_goto_last (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_goto_last_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_toggle_overview (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_overview_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_history_back (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_history_back_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_start (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_start_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_toggle_pause (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_pause_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_reset_timer (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_reset_timer_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_controllables_reset (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_controllables_reset_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_fade_to_black (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_fade_to_black_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_toggle_freeze (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_freeze_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
static void __lambda7_ (pdfpcPresentationController* self);
static void ___lambda7__pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_toggle_skip (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_toggle_skip_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_controllables_edit_note (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_controllables_edit_note_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_set_end_user_slide (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_set_end_user_slide_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_exit_state (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_exit_state_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
void pdfpc_presentation_controller_quit (pdfpcPresentationController* self);
static void _pdfpc_presentation_controller_quit_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self);
gchar** pdfpc_presentation_controller_getActionDescriptions (int* result_length1);
void pdfpc_presentation_controller_bind (pdfpcPresentationController* self, guint keycode, guint modMask, const gchar* function);
pdfpcPresentationControllerKeyDef* pdfpc_presentation_controller_key_def_new (guint k, guint m);
pdfpcPresentationControllerKeyDef* pdfpc_presentation_controller_key_def_construct (GType object_type, guint k, guint m);
void pdfpc_presentation_controller_unbind (pdfpcPresentationController* self, guint keycode, guint modMask);
void pdfpc_presentation_controller_unbindAll (pdfpcPresentationController* self);
void pdfpc_presentation_controller_bindMouse (pdfpcPresentationController* self, guint button, guint modMask, const gchar* function);
void pdfpc_presentation_controller_unbindMouse (pdfpcPresentationController* self, guint keycode, guint modMask);
void pdfpc_presentation_controller_unbindAllMouse (pdfpcPresentationController* self);
gboolean pdfpc_presentation_controller_key_press (pdfpcPresentationController* self, GdkEventKey* key);
guint pdfpc_presentation_controller_get_accepted_key_mods (pdfpcPresentationController* self);
gboolean pdfpc_presentation_controller_button_press (pdfpcPresentationController* self, GdkEventButton* button);
void pdfpc_presentation_controller_scroll (pdfpcPresentationController* self, GdkEventScroll* scroll);
gint pdfpc_presentation_controller_get_current_slide_number (pdfpcPresentationController* self);
gint pdfpc_presentation_controller_get_current_user_slide_number (pdfpcPresentationController* self);
gboolean pdfpc_presentation_controller_skip_previous (pdfpcPresentationController* self);
gint pdfpc_metadata_pdf_user_slide_to_real_slide (pdfpcMetadataPdf* self, gint number);
gboolean pdfpc_presentation_controller_skip_next (pdfpcPresentationController* self);
gint pdfpc_metadata_pdf_get_user_slide_count (pdfpcMetadataPdf* self);
gint pdfpc_presentation_controller_get_n_slide (pdfpcPresentationController* self);
gint pdfpc_presentation_controller_get_user_n_slides (pdfpcPresentationController* self);
gint pdfpc_presentation_controller_get_end_user_slide (pdfpcPresentationController* self);
gint pdfpc_metadata_pdf_get_end_user_slide (pdfpcMetadataPdf* self);
void pdfpc_metadata_pdf_set_end_user_slide (pdfpcMetadataPdf* self, gint slide);
void pdfpc_presentation_controller_controllables_update (pdfpcPresentationController* self);
void pdfpc_presentation_controller_set_end_user_slide_overview (pdfpcPresentationController* self);
gint pdfpc_window_overview_get_current_slide (pdfpcWindowOverview* self);
static void pdfpc_presentation_controller_slide2history (pdfpcPresentationController* self);
static void _vala_array_add1 (gint** array, int* length, int* size, gint value);
void pdfpc_presentation_controller_page_change_request (pdfpcPresentationController* self, gint page_number);
gint pdfpc_metadata_pdf_real_slide_to_user_slide (pdfpcMetadataPdf* self, gint number);
void pdfpc_timer_label_start (pdfpcTimerLabel* self);
void pdfpc_presentation_controller_set_ignore_input_events (pdfpcPresentationController* self, gboolean v);
void pdfpc_presentation_controller_set_ignore_mouse_events (pdfpcPresentationController* self, gboolean v);
pdfpcTimerLabel* pdfpc_presentation_controller_getTimer (pdfpcPresentationController* self);
gboolean pdfpc_presentation_controller_register_controllable (pdfpcPresentationController* self, pdfpcControllable* controllable);
gboolean pdfpc_presentation_controller_is_faded_to_black (pdfpcPresentationController* self);
void pdfpc_presentation_controller_goto_user_page (pdfpcPresentationController* self, gint page_number);
void pdfpc_presentation_controller_controllables_hide_overview (pdfpcPresentationController* self);
void pdfpc_controllable_update (pdfpcControllable* self);
void pdfpc_presentation_controller_controllables_show_overview (pdfpcPresentationController* self);
void pdfpc_controllable_show_overview (pdfpcControllable* self);
void pdfpc_controllable_hide_overview (pdfpcControllable* self);
void pdfpc_controllable_edit_note (pdfpcControllable* self);
void pdfpc_controllable_ask_goto_page (pdfpcControllable* self);
gboolean pdfpc_presentation_controller_is_frozen (pdfpcPresentationController* self);
gint pdfpc_metadata_pdf_toggle_skip (pdfpcMetadataPdf* self, gint slide_number, gint user_slide_number);
void pdfpc_window_overview_remove_current (pdfpcWindowOverview* self, gint newn);
void pdfpc_window_overview_set_n_slides (pdfpcWindowOverview* self, gint n);
gboolean pdfpc_timer_label_pause (pdfpcTimerLabel* self);
gboolean pdfpc_timer_label_is_paused (pdfpcTimerLabel* self);
void pdfpc_metadata_pdf_save_to_disk (pdfpcMetadataPdf* self);
void pdfpc_presentation_controller_set_accepted_key_mods (pdfpcPresentationController* self, guint value);
enum  {
	PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION_DUMMY_PROPERTY
};
static void pdfpc_presentation_controller_key_action_finalize (pdfpcPresentationControllerKeyAction* obj);
#define PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, pdfpcPresentationControllerKeyDefPrivate))
enum  {
	PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_DUMMY_PROPERTY
};
void pdfpc_presentation_controller_key_def_set_keycode (pdfpcPresentationControllerKeyDef* self, guint value);
void pdfpc_presentation_controller_key_def_set_modMask (pdfpcPresentationControllerKeyDef* self, guint value);
guint pdfpc_presentation_controller_key_def_get_keycode (pdfpcPresentationControllerKeyDef* self);
guint pdfpc_presentation_controller_key_def_get_modMask (pdfpcPresentationControllerKeyDef* self);
static void pdfpc_presentation_controller_key_def_finalize (pdfpcPresentationControllerKeyDef* obj);
static void pdfpc_presentation_controller_finalize (GObject* obj);
static void _vala_pdfpc_presentation_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_pdfpc_presentation_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _g_list_free__g_object_unref0_ (GList* self) {
	g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
	g_list_free (self);
}


/**
         * Instantiate a new controller
         */
static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static guint _pdfpc_presentation_controller_key_def_hash_ghash_func (gconstpointer key) {
	guint result;
	result = pdfpc_presentation_controller_key_def_hash (key);
	return result;
}


static gboolean _pdfpc_presentation_controller_key_def_equal_gequal_func (gconstpointer a, gconstpointer b) {
	gboolean result;
	result = pdfpc_presentation_controller_key_def_equal (a, b);
	return result;
}


pdfpcPresentationController* pdfpc_presentation_controller_construct (GType object_type, pdfpcMetadataPdf* metadata, gboolean allow_black_on_end) {
	pdfpcPresentationController * self = NULL;
	pdfpcMetadataPdf* _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gboolean _tmp2_;
	time_t start_time;
	const gchar* _tmp3_;
	time_t end_time;
	const gchar* _tmp6_;
	pdfpcMetadataPdf* _tmp10_;
	guint _tmp11_ = 0U;
	time_t _tmp12_;
	guint _tmp13_;
	time_t _tmp14_;
	pdfpcTimerLabel* _tmp15_ = NULL;
	pdfpcTimerLabel* _tmp16_;
	pdfpcMetadataPdf* _tmp17_;
	guint _tmp18_ = 0U;
	GeeHashMap* _tmp19_;
	GeeHashMap* _tmp20_;
	g_return_val_if_fail (metadata != NULL, NULL);
	self = (pdfpcPresentationController*) g_object_new (object_type, NULL);
	_tmp0_ = metadata;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->metadata);
	self->metadata = _tmp1_;
	_tmp2_ = allow_black_on_end;
	self->black_on_end = _tmp2_;
	__g_list_free__g_object_unref0_0 (self->controllables);
	self->controllables = NULL;
	start_time = (time_t) 0;
	_tmp3_ = pdfpc_options_start_time;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_;
		time_t _tmp5_ = 0;
		_tmp4_ = pdfpc_options_start_time;
		_tmp5_ = pdfpc_presentation_controller_parseTime (self, _tmp4_);
		start_time = _tmp5_;
	}
	end_time = (time_t) 0;
	_tmp6_ = pdfpc_options_end_time;
	if (_tmp6_ != NULL) {
		const gchar* _tmp7_;
		time_t _tmp8_ = 0;
		pdfpcMetadataPdf* _tmp9_;
		_tmp7_ = pdfpc_options_end_time;
		_tmp8_ = pdfpc_presentation_controller_parseTime (self, _tmp7_);
		end_time = _tmp8_;
		pdfpc_options_duration = (guint) 0;
		_tmp9_ = self->metadata;
		pdfpc_metadata_pdf_set_duration (_tmp9_, (guint) 0);
	}
	_tmp10_ = self->metadata;
	_tmp11_ = pdfpc_metadata_pdf_get_duration (_tmp10_);
	_tmp12_ = end_time;
	_tmp13_ = pdfpc_options_last_minutes;
	_tmp14_ = start_time;
	_tmp15_ = pdfpc_getTimerLabel (((gint) _tmp11_) * 60, _tmp12_, _tmp13_, _tmp14_);
	_g_object_unref0 (self->timer);
	self->timer = _tmp15_;
	_tmp16_ = self->timer;
	pdfpc_timer_label_reset (_tmp16_);
	_tmp17_ = metadata;
	_tmp18_ = pdfpc_metadata_base_get_slide_count ((pdfpcMetadataBase*) _tmp17_);
	self->n_slides = (gint) _tmp18_;
	self->current_slide_number = 0;
	self->current_user_slide_number = 0;
	_tmp19_ = gee_hash_map_new (PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, (GBoxedCopyFunc) pdfpc_presentation_controller_key_def_ref, pdfpc_presentation_controller_key_def_unref, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, (GBoxedCopyFunc) pdfpc_presentation_controller_key_action_ref, pdfpc_presentation_controller_key_action_unref, _pdfpc_presentation_controller_key_def_hash_ghash_func, _pdfpc_presentation_controller_key_def_equal_gequal_func, NULL);
	_g_object_unref0 (self->keyBindings);
	self->keyBindings = _tmp19_;
	_tmp20_ = gee_hash_map_new (PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, (GBoxedCopyFunc) pdfpc_presentation_controller_key_def_ref, pdfpc_presentation_controller_key_def_unref, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, (GBoxedCopyFunc) pdfpc_presentation_controller_key_action_ref, pdfpc_presentation_controller_key_action_unref, _pdfpc_presentation_controller_key_def_hash_ghash_func, _pdfpc_presentation_controller_key_def_equal_gequal_func, NULL);
	_g_object_unref0 (self->mouseBindings);
	self->mouseBindings = _tmp20_;
	pdfpc_presentation_controller_fillActionNames (self);
	return self;
}


pdfpcPresentationController* pdfpc_presentation_controller_new (pdfpcMetadataPdf* metadata, gboolean allow_black_on_end) {
	return pdfpc_presentation_controller_construct (PDFPC_TYPE_PRESENTATION_CONTROLLER, metadata, allow_black_on_end);
}


void pdfpc_presentation_controller_set_overview (pdfpcPresentationController* self, pdfpcWindowOverview* o) {
	pdfpcWindowOverview* _tmp0_;
	pdfpcWindowOverview* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (o != NULL);
	_tmp0_ = o;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->overview);
	self->overview = _tmp1_;
}


static void _pdfpc_presentation_controller_next_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_next_page (self);
}


static void _pdfpc_presentation_controller_jump10_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_jump10 (self);
}


static void _pdfpc_presentation_controller_next_user_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_next_user_page (self);
}


static void _pdfpc_presentation_controller_previous_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_previous_page (self);
}


static void _pdfpc_presentation_controller_back10_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_back10 (self);
}


static void _pdfpc_presentation_controller_previous_user_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_previous_user_page (self);
}


static void _pdfpc_presentation_controller_controllables_ask_goto_page_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_controllables_ask_goto_page (self);
}


static void _pdfpc_presentation_controller_goto_first_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_goto_first (self);
}


static void _pdfpc_presentation_controller_goto_last_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_goto_last (self);
}


static void _pdfpc_presentation_controller_toggle_overview_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_toggle_overview (self);
}


static void _pdfpc_presentation_controller_history_back_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_history_back (self);
}


static void _pdfpc_presentation_controller_start_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_start (self);
}


static void _pdfpc_presentation_controller_toggle_pause_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_toggle_pause (self);
}


static void _pdfpc_presentation_controller_reset_timer_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_reset_timer (self);
}


static void _pdfpc_presentation_controller_controllables_reset_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_controllables_reset (self);
}


static void _pdfpc_presentation_controller_fade_to_black_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_fade_to_black (self);
}


static void _pdfpc_presentation_controller_toggle_freeze_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_toggle_freeze (self);
}


static void __lambda7_ (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	_tmp0_ = self->frozen;
	if (!_tmp0_) {
		pdfpc_presentation_controller_toggle_freeze (self);
	}
}


static void ___lambda7__pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	__lambda7_ (self);
}


static void _pdfpc_presentation_controller_toggle_skip_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_toggle_skip (self);
}


static void _pdfpc_presentation_controller_controllables_edit_note_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_controllables_edit_note (self);
}


static void _pdfpc_presentation_controller_set_end_user_slide_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_set_end_user_slide (self);
}


static void _pdfpc_presentation_controller_exit_state_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_exit_state (self);
}


static void _pdfpc_presentation_controller_quit_pdfpc_presentation_controller_key_action_key_action_delegate (gpointer self) {
	pdfpc_presentation_controller_quit (self);
}


void pdfpc_presentation_controller_fillActionNames (pdfpcPresentationController* self) {
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	pdfpcPresentationControllerKeyAction* _tmp2_;
	pdfpcPresentationControllerKeyAction* _tmp3_;
	GeeHashMap* _tmp4_;
	pdfpcPresentationControllerKeyAction* _tmp5_;
	pdfpcPresentationControllerKeyAction* _tmp6_;
	GeeHashMap* _tmp7_;
	pdfpcPresentationControllerKeyAction* _tmp8_;
	pdfpcPresentationControllerKeyAction* _tmp9_;
	GeeHashMap* _tmp10_;
	pdfpcPresentationControllerKeyAction* _tmp11_;
	pdfpcPresentationControllerKeyAction* _tmp12_;
	GeeHashMap* _tmp13_;
	pdfpcPresentationControllerKeyAction* _tmp14_;
	pdfpcPresentationControllerKeyAction* _tmp15_;
	GeeHashMap* _tmp16_;
	pdfpcPresentationControllerKeyAction* _tmp17_;
	pdfpcPresentationControllerKeyAction* _tmp18_;
	GeeHashMap* _tmp19_;
	pdfpcPresentationControllerKeyAction* _tmp20_;
	pdfpcPresentationControllerKeyAction* _tmp21_;
	GeeHashMap* _tmp22_;
	pdfpcPresentationControllerKeyAction* _tmp23_;
	pdfpcPresentationControllerKeyAction* _tmp24_;
	GeeHashMap* _tmp25_;
	pdfpcPresentationControllerKeyAction* _tmp26_;
	pdfpcPresentationControllerKeyAction* _tmp27_;
	GeeHashMap* _tmp28_;
	pdfpcPresentationControllerKeyAction* _tmp29_;
	pdfpcPresentationControllerKeyAction* _tmp30_;
	GeeHashMap* _tmp31_;
	pdfpcPresentationControllerKeyAction* _tmp32_;
	pdfpcPresentationControllerKeyAction* _tmp33_;
	GeeHashMap* _tmp34_;
	pdfpcPresentationControllerKeyAction* _tmp35_;
	pdfpcPresentationControllerKeyAction* _tmp36_;
	GeeHashMap* _tmp37_;
	pdfpcPresentationControllerKeyAction* _tmp38_;
	pdfpcPresentationControllerKeyAction* _tmp39_;
	GeeHashMap* _tmp40_;
	pdfpcPresentationControllerKeyAction* _tmp41_;
	pdfpcPresentationControllerKeyAction* _tmp42_;
	GeeHashMap* _tmp43_;
	pdfpcPresentationControllerKeyAction* _tmp44_;
	pdfpcPresentationControllerKeyAction* _tmp45_;
	GeeHashMap* _tmp46_;
	pdfpcPresentationControllerKeyAction* _tmp47_;
	pdfpcPresentationControllerKeyAction* _tmp48_;
	GeeHashMap* _tmp49_;
	pdfpcPresentationControllerKeyAction* _tmp50_;
	pdfpcPresentationControllerKeyAction* _tmp51_;
	GeeHashMap* _tmp52_;
	pdfpcPresentationControllerKeyAction* _tmp53_;
	pdfpcPresentationControllerKeyAction* _tmp54_;
	GeeHashMap* _tmp55_;
	pdfpcPresentationControllerKeyAction* _tmp56_;
	pdfpcPresentationControllerKeyAction* _tmp57_;
	GeeHashMap* _tmp58_;
	pdfpcPresentationControllerKeyAction* _tmp59_;
	pdfpcPresentationControllerKeyAction* _tmp60_;
	GeeHashMap* _tmp61_;
	pdfpcPresentationControllerKeyAction* _tmp62_;
	pdfpcPresentationControllerKeyAction* _tmp63_;
	GeeHashMap* _tmp64_;
	pdfpcPresentationControllerKeyAction* _tmp65_;
	pdfpcPresentationControllerKeyAction* _tmp66_;
	GeeHashMap* _tmp67_;
	pdfpcPresentationControllerKeyAction* _tmp68_;
	pdfpcPresentationControllerKeyAction* _tmp69_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, (GBoxedCopyFunc) pdfpc_presentation_controller_key_action_ref, pdfpc_presentation_controller_key_action_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->actionNames);
	self->actionNames = _tmp0_;
	_tmp1_ = self->actionNames;
	_tmp2_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_next_page_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp3_ = _tmp2_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, "next", _tmp3_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp3_);
	_tmp4_ = self->actionNames;
	_tmp5_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_jump10_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp6_ = _tmp5_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp4_, "next10", _tmp6_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp6_);
	_tmp7_ = self->actionNames;
	_tmp8_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_next_user_page_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp9_ = _tmp8_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, "nextOverlay", _tmp9_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp9_);
	_tmp10_ = self->actionNames;
	_tmp11_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_previous_page_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp12_ = _tmp11_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp10_, "prev", _tmp12_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp12_);
	_tmp13_ = self->actionNames;
	_tmp14_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_back10_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp15_ = _tmp14_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, "prev10", _tmp15_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp15_);
	_tmp16_ = self->actionNames;
	_tmp17_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_previous_user_page_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp18_ = _tmp17_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, "prevOverlay", _tmp18_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp18_);
	_tmp19_ = self->actionNames;
	_tmp20_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_controllables_ask_goto_page_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp21_ = _tmp20_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp19_, "goto", _tmp21_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp21_);
	_tmp22_ = self->actionNames;
	_tmp23_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_goto_first_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp24_ = _tmp23_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, "gotoFirst", _tmp24_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp24_);
	_tmp25_ = self->actionNames;
	_tmp26_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_goto_last_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp27_ = _tmp26_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, "gotoLast", _tmp27_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp27_);
	_tmp28_ = self->actionNames;
	_tmp29_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_toggle_overview_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp30_ = _tmp29_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp28_, "overview", _tmp30_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp30_);
	_tmp31_ = self->actionNames;
	_tmp32_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_history_back_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp33_ = _tmp32_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp31_, "histBack", _tmp33_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp33_);
	_tmp34_ = self->actionNames;
	_tmp35_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_start_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp36_ = _tmp35_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp34_, "start", _tmp36_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp36_);
	_tmp37_ = self->actionNames;
	_tmp38_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_toggle_pause_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp39_ = _tmp38_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp37_, "pause", _tmp39_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp39_);
	_tmp40_ = self->actionNames;
	_tmp41_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_reset_timer_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp42_ = _tmp41_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp40_, "resetTimer", _tmp42_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp42_);
	_tmp43_ = self->actionNames;
	_tmp44_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_controllables_reset_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp45_ = _tmp44_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp43_, "reset", _tmp45_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp45_);
	_tmp46_ = self->actionNames;
	_tmp47_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_fade_to_black_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp48_ = _tmp47_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp46_, "blank", _tmp48_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp48_);
	_tmp49_ = self->actionNames;
	_tmp50_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_toggle_freeze_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp51_ = _tmp50_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp49_, "freeze", _tmp51_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp51_);
	_tmp52_ = self->actionNames;
	_tmp53_ = pdfpc_presentation_controller_key_action_new (___lambda7__pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp54_ = _tmp53_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp52_, "freezeOn", _tmp54_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp54_);
	_tmp55_ = self->actionNames;
	_tmp56_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_toggle_skip_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp57_ = _tmp56_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp55_, "overlay", _tmp57_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp57_);
	_tmp58_ = self->actionNames;
	_tmp59_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_controllables_edit_note_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp60_ = _tmp59_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp58_, "note", _tmp60_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp60_);
	_tmp61_ = self->actionNames;
	_tmp62_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_set_end_user_slide_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp63_ = _tmp62_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp61_, "endSlide", _tmp63_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp63_);
	_tmp64_ = self->actionNames;
	_tmp65_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_exit_state_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp66_ = _tmp65_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp64_, "exitState", _tmp66_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp66_);
	_tmp67_ = self->actionNames;
	_tmp68_ = pdfpc_presentation_controller_key_action_new (_pdfpc_presentation_controller_quit_pdfpc_presentation_controller_key_action_key_action_delegate, self);
	_tmp69_ = _tmp68_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp67_, "quit", _tmp69_);
	_pdfpc_presentation_controller_key_action_unref0 (_tmp69_);
}


/**
         * Gets an array wit all function names
         *
         * It would be more legant yo use the keys property of actionNames, but
         * we would need an instance for doing this...
         */
gchar** pdfpc_presentation_controller_getActionDescriptions (int* result_length1) {
	gchar** result = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar** _tmp46_ = NULL;
	gchar** _tmp47_;
	gint _tmp47__length1;
	_tmp0_ = g_strdup ("next");
	_tmp1_ = g_strdup ("Go to next slide");
	_tmp2_ = g_strdup ("next10");
	_tmp3_ = g_strdup ("Jump 10 slides forward");
	_tmp4_ = g_strdup ("nextOverlay");
	_tmp5_ = g_strdup ("Jump forward outside of current overlay");
	_tmp6_ = g_strdup ("prev");
	_tmp7_ = g_strdup ("Go to previous slide");
	_tmp8_ = g_strdup ("prev10");
	_tmp9_ = g_strdup ("Jump 10 slides back");
	_tmp10_ = g_strdup ("prevOverlay");
	_tmp11_ = g_strdup ("Jump back outside of current overlay");
	_tmp12_ = g_strdup ("goto");
	_tmp13_ = g_strdup ("Ask for a page to jump to");
	_tmp14_ = g_strdup ("gotoFirst");
	_tmp15_ = g_strdup ("Jump to first slide");
	_tmp16_ = g_strdup ("gotoLast");
	_tmp17_ = g_strdup ("Jump to last slide");
	_tmp18_ = g_strdup ("overview");
	_tmp19_ = g_strdup ("Show the overview mode");
	_tmp20_ = g_strdup ("histBack");
	_tmp21_ = g_strdup ("Go back in history");
	_tmp22_ = g_strdup ("start");
	_tmp23_ = g_strdup ("Start the timer");
	_tmp24_ = g_strdup ("pause");
	_tmp25_ = g_strdup ("Pause the timer");
	_tmp26_ = g_strdup ("resetTimer");
	_tmp27_ = g_strdup ("Reset the timer");
	_tmp28_ = g_strdup ("reset");
	_tmp29_ = g_strdup ("Reset the presentation");
	_tmp30_ = g_strdup ("blank");
	_tmp31_ = g_strdup ("Blank presentation screen");
	_tmp32_ = g_strdup ("freeze");
	_tmp33_ = g_strdup ("Toggle freeze presentation screen");
	_tmp34_ = g_strdup ("freezeOn");
	_tmp35_ = g_strdup ("Freeze presentation screen if unfrozen");
	_tmp36_ = g_strdup ("overlay");
	_tmp37_ = g_strdup ("Mark current slide as overlay slide");
	_tmp38_ = g_strdup ("note");
	_tmp39_ = g_strdup ("Edit note for current slide");
	_tmp40_ = g_strdup ("endSlide");
	_tmp41_ = g_strdup ("Set current slide as end slide");
	_tmp42_ = g_strdup ("exitState");
	_tmp43_ = g_strdup ("Exit \"special\" state (pause, freeze, blank)");
	_tmp44_ = g_strdup ("quit");
	_tmp45_ = g_strdup ("Exit pdfpc");
	_tmp46_ = g_new0 (gchar*, 46 + 1);
	_tmp46_[0] = _tmp0_;
	_tmp46_[1] = _tmp1_;
	_tmp46_[2] = _tmp2_;
	_tmp46_[3] = _tmp3_;
	_tmp46_[4] = _tmp4_;
	_tmp46_[5] = _tmp5_;
	_tmp46_[6] = _tmp6_;
	_tmp46_[7] = _tmp7_;
	_tmp46_[8] = _tmp8_;
	_tmp46_[9] = _tmp9_;
	_tmp46_[10] = _tmp10_;
	_tmp46_[11] = _tmp11_;
	_tmp46_[12] = _tmp12_;
	_tmp46_[13] = _tmp13_;
	_tmp46_[14] = _tmp14_;
	_tmp46_[15] = _tmp15_;
	_tmp46_[16] = _tmp16_;
	_tmp46_[17] = _tmp17_;
	_tmp46_[18] = _tmp18_;
	_tmp46_[19] = _tmp19_;
	_tmp46_[20] = _tmp20_;
	_tmp46_[21] = _tmp21_;
	_tmp46_[22] = _tmp22_;
	_tmp46_[23] = _tmp23_;
	_tmp46_[24] = _tmp24_;
	_tmp46_[25] = _tmp25_;
	_tmp46_[26] = _tmp26_;
	_tmp46_[27] = _tmp27_;
	_tmp46_[28] = _tmp28_;
	_tmp46_[29] = _tmp29_;
	_tmp46_[30] = _tmp30_;
	_tmp46_[31] = _tmp31_;
	_tmp46_[32] = _tmp32_;
	_tmp46_[33] = _tmp33_;
	_tmp46_[34] = _tmp34_;
	_tmp46_[35] = _tmp35_;
	_tmp46_[36] = _tmp36_;
	_tmp46_[37] = _tmp37_;
	_tmp46_[38] = _tmp38_;
	_tmp46_[39] = _tmp39_;
	_tmp46_[40] = _tmp40_;
	_tmp46_[41] = _tmp41_;
	_tmp46_[42] = _tmp42_;
	_tmp46_[43] = _tmp43_;
	_tmp46_[44] = _tmp44_;
	_tmp46_[45] = _tmp45_;
	_tmp47_ = _tmp46_;
	_tmp47__length1 = 46;
	if (result_length1) {
		*result_length1 = _tmp47__length1;
	}
	result = _tmp47_;
	return result;
}


/**
         * Bind the (user-defined) keys
         */
void pdfpc_presentation_controller_bind (pdfpcPresentationController* self, guint keycode, guint modMask, const gchar* function) {
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (function != NULL);
	_tmp0_ = self->actionNames;
	_tmp1_ = function;
	_tmp2_ = gee_map_contains ((GeeMap*) _tmp0_, _tmp1_);
	if (_tmp2_) {
		GeeHashMap* _tmp3_;
		guint _tmp4_;
		guint _tmp5_;
		pdfpcPresentationControllerKeyDef* _tmp6_;
		pdfpcPresentationControllerKeyDef* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		gpointer _tmp10_ = NULL;
		pdfpcPresentationControllerKeyAction* _tmp11_;
		_tmp3_ = self->keyBindings;
		_tmp4_ = keycode;
		_tmp5_ = modMask;
		_tmp6_ = pdfpc_presentation_controller_key_def_new (_tmp4_, _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->actionNames;
		_tmp9_ = function;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp9_);
		_tmp11_ = (pdfpcPresentationControllerKeyAction*) _tmp10_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp7_, _tmp11_);
		_pdfpc_presentation_controller_key_action_unref0 (_tmp11_);
		_pdfpc_presentation_controller_key_def_unref0 (_tmp7_);
	} else {
		FILE* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = stderr;
		_tmp13_ = function;
		fprintf (_tmp12_, "Warning: Unknown function %s\n", _tmp13_);
	}
}


/**
         * Unbind a key
         */
void pdfpc_presentation_controller_unbind (pdfpcPresentationController* self, guint keycode, guint modMask) {
	GeeHashMap* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	pdfpcPresentationControllerKeyDef* _tmp3_;
	pdfpcPresentationControllerKeyDef* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->keyBindings;
	_tmp1_ = keycode;
	_tmp2_ = modMask;
	_tmp3_ = pdfpc_presentation_controller_key_def_new (_tmp1_, _tmp2_);
	_tmp4_ = _tmp3_;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, _tmp4_, NULL);
	_pdfpc_presentation_controller_key_def_unref0 (_tmp4_);
}


/**
         * Unbind all keybindings
         */
void pdfpc_presentation_controller_unbindAll (pdfpcPresentationController* self) {
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->keyBindings;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
}


/**
         * Bind the (user-defined) keys
         */
void pdfpc_presentation_controller_bindMouse (pdfpcPresentationController* self, guint button, guint modMask, const gchar* function) {
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (function != NULL);
	_tmp0_ = self->actionNames;
	_tmp1_ = function;
	_tmp2_ = gee_map_contains ((GeeMap*) _tmp0_, _tmp1_);
	if (_tmp2_) {
		GeeHashMap* _tmp3_;
		guint _tmp4_;
		guint _tmp5_;
		pdfpcPresentationControllerKeyDef* _tmp6_;
		pdfpcPresentationControllerKeyDef* _tmp7_;
		GeeHashMap* _tmp8_;
		const gchar* _tmp9_;
		gpointer _tmp10_ = NULL;
		pdfpcPresentationControllerKeyAction* _tmp11_;
		_tmp3_ = self->mouseBindings;
		_tmp4_ = button;
		_tmp5_ = modMask;
		_tmp6_ = pdfpc_presentation_controller_key_def_new (_tmp4_, _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->actionNames;
		_tmp9_ = function;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp9_);
		_tmp11_ = (pdfpcPresentationControllerKeyAction*) _tmp10_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, _tmp7_, _tmp11_);
		_pdfpc_presentation_controller_key_action_unref0 (_tmp11_);
		_pdfpc_presentation_controller_key_def_unref0 (_tmp7_);
	} else {
		FILE* _tmp12_;
		const gchar* _tmp13_;
		_tmp12_ = stderr;
		_tmp13_ = function;
		fprintf (_tmp12_, "Warning: Unknown function %s\n", _tmp13_);
	}
}


/**
         * Unbind a mouse button
         */
void pdfpc_presentation_controller_unbindMouse (pdfpcPresentationController* self, guint keycode, guint modMask) {
	GeeHashMap* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	pdfpcPresentationControllerKeyDef* _tmp3_;
	pdfpcPresentationControllerKeyDef* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->mouseBindings;
	_tmp1_ = keycode;
	_tmp2_ = modMask;
	_tmp3_ = pdfpc_presentation_controller_key_def_new (_tmp1_, _tmp2_);
	_tmp4_ = _tmp3_;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, _tmp4_, NULL);
	_pdfpc_presentation_controller_key_def_unref0 (_tmp4_);
}


/**
         * Unbind all keybindings
         */
void pdfpc_presentation_controller_unbindAllMouse (pdfpcPresentationController* self) {
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->mouseBindings;
	gee_abstract_map_clear ((GeeAbstractMap*) _tmp0_);
}


/**
         * Handle keypresses to each of the controllables
         *
         * This seperate handling is needed because keypresses from any of the
         * window have implications on the behaviour of both of them. Therefore
         * this controller is needed to take care of the needed actions.
         */
gboolean pdfpc_presentation_controller_key_press (pdfpcPresentationController* self, GdkEventKey* key) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GdkEventKey _tmp1_;
	guint32 _tmp2_;
	guint _tmp3_;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	_tmp1_ = *key;
	_tmp2_ = _tmp1_.time;
	_tmp3_ = self->last_key_event;
	if (_tmp2_ != ((guint32) _tmp3_)) {
		gboolean _tmp4_;
		_tmp4_ = self->ignore_keyboard_events;
		_tmp0_ = !_tmp4_;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp5_ = _tmp0_;
	if (_tmp5_) {
		GdkEventKey _tmp6_;
		guint32 _tmp7_;
		GeeHashMap* _tmp8_;
		GdkEventKey _tmp9_;
		guint _tmp10_;
		GdkEventKey _tmp11_;
		GdkModifierType _tmp12_;
		guint _tmp13_;
		pdfpcPresentationControllerKeyDef* _tmp14_;
		pdfpcPresentationControllerKeyDef* _tmp15_;
		gpointer _tmp16_ = NULL;
		pdfpcPresentationControllerKeyAction* _tmp17_;
		pdfpcPresentationControllerKeyAction* action;
		pdfpcPresentationControllerKeyAction* _tmp18_;
		_tmp6_ = *key;
		_tmp7_ = _tmp6_.time;
		self->last_key_event = (guint) _tmp7_;
		_tmp8_ = self->keyBindings;
		_tmp9_ = *key;
		_tmp10_ = _tmp9_.keyval;
		_tmp11_ = *key;
		_tmp12_ = _tmp11_.state;
		_tmp13_ = self->priv->_accepted_key_mods;
		_tmp14_ = pdfpc_presentation_controller_key_def_new (_tmp10_, (guint) (_tmp12_ & _tmp13_));
		_tmp15_ = _tmp14_;
		_tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _tmp15_);
		_tmp17_ = (pdfpcPresentationControllerKeyAction*) _tmp16_;
		_pdfpc_presentation_controller_key_def_unref0 (_tmp15_);
		action = _tmp17_;
		_tmp18_ = action;
		if (_tmp18_ != NULL) {
			pdfpcPresentationControllerKeyAction* _tmp19_;
			pdfpcPresentationControllerKeyActionKeyActionDelegate _tmp20_;
			void* _tmp20__target;
			_tmp19_ = action;
			_tmp20_ = _tmp19_->d;
			_tmp20__target = _tmp19_->d_target;
			_tmp20_ (_tmp20__target);
		}
		result = TRUE;
		_pdfpc_presentation_controller_key_action_unref0 (action);
		return result;
	} else {
		result = FALSE;
		return result;
	}
}


/**
         * Handle mouse clicks to each of the controllables
         */
gboolean pdfpc_presentation_controller_button_press (pdfpcPresentationController* self, GdkEventButton* button) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_;
	gboolean _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (button != NULL, FALSE);
	_tmp1_ = self->ignore_mouse_events;
	if (!_tmp1_) {
		GdkEventButton _tmp2_;
		GdkEventType _tmp3_;
		_tmp2_ = *button;
		_tmp3_ = _tmp2_.type;
		_tmp0_ = _tmp3_ == GDK_BUTTON_PRESS;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp4_ = _tmp0_;
	if (_tmp4_) {
		GeeHashMap* _tmp5_;
		GdkEventButton _tmp6_;
		guint _tmp7_;
		GdkEventButton _tmp8_;
		GdkModifierType _tmp9_;
		guint _tmp10_;
		pdfpcPresentationControllerKeyDef* _tmp11_;
		pdfpcPresentationControllerKeyDef* _tmp12_;
		gpointer _tmp13_ = NULL;
		pdfpcPresentationControllerKeyAction* _tmp14_;
		pdfpcPresentationControllerKeyAction* action;
		pdfpcPresentationControllerKeyAction* _tmp15_;
		_tmp5_ = self->mouseBindings;
		_tmp6_ = *button;
		_tmp7_ = _tmp6_.button;
		_tmp8_ = *button;
		_tmp9_ = _tmp8_.state;
		_tmp10_ = self->priv->_accepted_key_mods;
		_tmp11_ = pdfpc_presentation_controller_key_def_new (_tmp7_, (guint) (_tmp9_ & _tmp10_));
		_tmp12_ = _tmp11_;
		_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp5_, _tmp12_);
		_tmp14_ = (pdfpcPresentationControllerKeyAction*) _tmp13_;
		_pdfpc_presentation_controller_key_def_unref0 (_tmp12_);
		action = _tmp14_;
		_tmp15_ = action;
		if (_tmp15_ != NULL) {
			pdfpcPresentationControllerKeyAction* _tmp16_;
			pdfpcPresentationControllerKeyActionKeyActionDelegate _tmp17_;
			void* _tmp17__target;
			_tmp16_ = action;
			_tmp17_ = _tmp16_->d;
			_tmp17__target = _tmp16_->d_target;
			_tmp17_ (_tmp17__target);
		}
		result = TRUE;
		_pdfpc_presentation_controller_key_action_unref0 (action);
		return result;
	} else {
		result = FALSE;
		return result;
	}
}


/**
         * Notify each of the controllables of mouse scrolling
         */
void pdfpc_presentation_controller_scroll (pdfpcPresentationController* self, GdkEventScroll* scroll) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (scroll != NULL);
	_tmp0_ = self->ignore_mouse_events;
	if (!_tmp0_) {
		GdkEventScroll _tmp1_;
		GdkScrollDirection _tmp2_;
		_tmp1_ = *scroll;
		_tmp2_ = _tmp1_.direction;
		switch (_tmp2_) {
			case GDK_SCROLL_UP:
			case GDK_SCROLL_LEFT:
			{
				GdkEventScroll _tmp3_;
				GdkModifierType _tmp4_;
				_tmp3_ = *scroll;
				_tmp4_ = _tmp3_.state;
				if ((_tmp4_ & GDK_SHIFT_MASK) != 0) {
					pdfpc_presentation_controller_back10 (self);
				} else {
					pdfpc_presentation_controller_previous_page (self);
				}
				break;
			}
			case GDK_SCROLL_DOWN:
			case GDK_SCROLL_RIGHT:
			{
				GdkEventScroll _tmp5_;
				GdkModifierType _tmp6_;
				_tmp5_ = *scroll;
				_tmp6_ = _tmp5_.state;
				if ((_tmp6_ & GDK_SHIFT_MASK) != 0) {
					pdfpc_presentation_controller_jump10 (self);
				} else {
					pdfpc_presentation_controller_next_page (self);
				}
				break;
			}
			default:
			break;
		}
	}
}


/**
         * Get the current (real) slide number
         */
gint pdfpc_presentation_controller_get_current_slide_number (pdfpcPresentationController* self) {
	gint result = 0;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->current_slide_number;
	result = _tmp0_;
	return result;
}


/**
         * Get the current (user) slide number
         */
gint pdfpc_presentation_controller_get_current_user_slide_number (pdfpcPresentationController* self) {
	gint result = 0;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->current_user_slide_number;
	result = _tmp0_;
	return result;
}


/**
         * Was the previous slide a skip one?
         */
gboolean pdfpc_presentation_controller_skip_previous (pdfpcPresentationController* self) {
	gboolean result = FALSE;
	gint _tmp0_;
	pdfpcMetadataPdf* _tmp1_;
	gint _tmp2_;
	gint _tmp3_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->current_slide_number;
	_tmp1_ = self->metadata;
	_tmp2_ = self->current_user_slide_number;
	_tmp3_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp1_, _tmp2_);
	result = _tmp0_ > _tmp3_;
	return result;
}


/**
         * Is the next slide a skip one?
         */
gboolean pdfpc_presentation_controller_skip_next (pdfpcPresentationController* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gint _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	gint _tmp4_ = 0;
	gboolean _tmp7_;
	gboolean _tmp12_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp2_ = self->current_user_slide_number;
	_tmp3_ = self->metadata;
	_tmp4_ = pdfpc_metadata_pdf_get_user_slide_count (_tmp3_);
	if (_tmp2_ >= (_tmp4_ - 1)) {
		gint _tmp5_;
		gint _tmp6_;
		_tmp5_ = self->current_slide_number;
		_tmp6_ = self->n_slides;
		_tmp1_ = _tmp5_ < _tmp6_;
	} else {
		_tmp1_ = FALSE;
	}
	_tmp7_ = _tmp1_;
	if (_tmp7_) {
		_tmp0_ = TRUE;
	} else {
		gint _tmp8_;
		pdfpcMetadataPdf* _tmp9_;
		gint _tmp10_;
		gint _tmp11_ = 0;
		_tmp8_ = self->current_slide_number;
		_tmp9_ = self->metadata;
		_tmp10_ = self->current_user_slide_number;
		_tmp11_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp9_, _tmp10_ + 1);
		_tmp0_ = (_tmp8_ + 1) < _tmp11_;
	}
	_tmp12_ = _tmp0_;
	result = _tmp12_;
	return result;
}


/**
         * Get the real total number of slides
         */
gint pdfpc_presentation_controller_get_n_slide (pdfpcPresentationController* self) {
	gint result = 0;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->n_slides;
	result = _tmp0_;
	return result;
}


/**
         * Get the user total number of slides
         */
gint pdfpc_presentation_controller_get_user_n_slides (pdfpcPresentationController* self) {
	gint result = 0;
	pdfpcMetadataPdf* _tmp0_;
	gint _tmp1_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->metadata;
	_tmp1_ = pdfpc_metadata_pdf_get_user_slide_count (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
         * Get the last slide as defined by the user
         */
gint pdfpc_presentation_controller_get_end_user_slide (pdfpcPresentationController* self) {
	gint result = 0;
	pdfpcMetadataPdf* _tmp0_;
	gint _tmp1_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->metadata;
	_tmp1_ = pdfpc_metadata_pdf_get_end_user_slide (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
         * Set the last slide as defined by the user
         */
void pdfpc_presentation_controller_set_end_user_slide (pdfpcPresentationController* self) {
	pdfpcMetadataPdf* _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->metadata;
	_tmp1_ = self->current_user_slide_number;
	pdfpc_metadata_pdf_set_end_user_slide (_tmp0_, _tmp1_ + 1);
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Set the last slide as defined by the user
         */
void pdfpc_presentation_controller_set_end_user_slide_overview (pdfpcPresentationController* self) {
	pdfpcWindowOverview* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint user_selected;
	pdfpcMetadataPdf* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview;
	_tmp1_ = pdfpc_window_overview_get_current_slide (_tmp0_);
	_tmp2_ = _tmp1_;
	user_selected = _tmp2_;
	_tmp3_ = self->metadata;
	pdfpc_metadata_pdf_set_end_user_slide (_tmp3_, user_selected + 1);
}


/**
         * Register the current slide in the history
         */
static void _vala_array_add1 (gint** array, int* length, int* size, gint value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gint, *array, *size);
	}
	(*array)[(*length)++] = value;
}


static void pdfpc_presentation_controller_slide2history (pdfpcPresentationController* self) {
	gint* _tmp0_;
	gint _tmp0__length1;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->history;
	_tmp0__length1 = self->priv->history_length1;
	_tmp1_ = self->current_slide_number;
	_vala_array_add1 (&self->priv->history, &self->priv->history_length1, &self->priv->_history_size_, _tmp1_);
}


/**
         * A request to change the page has been issued
         */
void pdfpc_presentation_controller_page_change_request (pdfpcPresentationController* self, gint page_number) {
	gint _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	gint _tmp4_;
	gint _tmp5_ = 0;
	pdfpcTimerLabel* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = page_number;
	_tmp1_ = self->current_slide_number;
	if (_tmp0_ != _tmp1_) {
		pdfpc_presentation_controller_slide2history (self);
	}
	_tmp2_ = page_number;
	self->current_slide_number = _tmp2_;
	_tmp3_ = self->metadata;
	_tmp4_ = self->current_slide_number;
	_tmp5_ = pdfpc_metadata_pdf_real_slide_to_user_slide (_tmp3_, _tmp4_);
	self->current_user_slide_number = _tmp5_;
	_tmp6_ = self->timer;
	pdfpc_timer_label_start (_tmp6_);
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Set the state of ignote_input_events
         */
void pdfpc_presentation_controller_set_ignore_input_events (pdfpcPresentationController* self, gboolean v) {
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = v;
	self->ignore_keyboard_events = _tmp0_;
	_tmp1_ = v;
	self->ignore_mouse_events = _tmp1_;
}


void pdfpc_presentation_controller_set_ignore_mouse_events (pdfpcPresentationController* self, gboolean v) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = v;
	self->ignore_mouse_events = _tmp0_;
}


/**
         * Get the timer
         */
pdfpcTimerLabel* pdfpc_presentation_controller_getTimer (pdfpcPresentationController* self) {
	pdfpcTimerLabel* result = NULL;
	pdfpcTimerLabel* _tmp0_;
	pdfpcTimerLabel* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->timer;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}


/**
         * Register a new Controllable instance on this controller. 
         *
         * On success true is returned, in case the controllable has already been
         * registered false is returned.
         */
gboolean pdfpc_presentation_controller_register_controllable (pdfpcPresentationController* self, pdfpcControllable* controllable) {
	gboolean result = FALSE;
	GList* _tmp0_;
	pdfpcControllable* _tmp1_;
	GList* _tmp2_ = NULL;
	pdfpcControllable* _tmp3_;
	pdfpcControllable* _tmp4_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (controllable != NULL, FALSE);
	_tmp0_ = self->controllables;
	_tmp1_ = controllable;
	_tmp2_ = g_list_find (_tmp0_, _tmp1_);
	if (_tmp2_ != NULL) {
		result = FALSE;
		return result;
	}
	_tmp3_ = controllable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	self->controllables = g_list_append (self->controllables, _tmp4_);
	result = TRUE;
	return result;
}


/**
         * Go to the next slide
         */
void pdfpc_presentation_controller_next_page (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	pdfpcTimerLabel* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->timer;
	pdfpc_timer_label_start (_tmp1_);
	_tmp2_ = self->current_slide_number;
	_tmp3_ = self->n_slides;
	if (_tmp2_ < (_tmp3_ - 1)) {
		gint _tmp4_;
		gint _tmp5_;
		pdfpcMetadataPdf* _tmp6_;
		gint _tmp7_;
		gint _tmp8_ = 0;
		gboolean _tmp10_;
		_tmp4_ = self->current_slide_number;
		self->current_slide_number = _tmp4_ + 1;
		_tmp5_ = self->current_slide_number;
		_tmp6_ = self->metadata;
		_tmp7_ = self->current_user_slide_number;
		_tmp8_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp6_, _tmp7_ + 1);
		if (_tmp5_ == _tmp8_) {
			gint _tmp9_;
			_tmp9_ = self->current_user_slide_number;
			self->current_user_slide_number = _tmp9_ + 1;
		}
		_tmp10_ = self->frozen;
		if (!_tmp10_) {
			self->faded_to_black = FALSE;
		}
		pdfpc_presentation_controller_controllables_update (self);
	} else {
		gboolean _tmp11_ = FALSE;
		gboolean _tmp12_;
		gboolean _tmp14_;
		_tmp12_ = self->black_on_end;
		if (_tmp12_) {
			gboolean _tmp13_ = FALSE;
			_tmp13_ = pdfpc_presentation_controller_is_faded_to_black (self);
			_tmp11_ = !_tmp13_;
		} else {
			_tmp11_ = FALSE;
		}
		_tmp14_ = _tmp11_;
		if (_tmp14_) {
			pdfpc_presentation_controller_fade_to_black (self);
		}
	}
}


/**
         * Go to the next user slide
         */
void pdfpc_presentation_controller_next_user_page (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	gboolean needs_update = FALSE;
	gint _tmp1_;
	pdfpcMetadataPdf* _tmp2_;
	gint _tmp3_ = 0;
	gboolean _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	_tmp1_ = self->current_user_slide_number;
	_tmp2_ = self->metadata;
	_tmp3_ = pdfpc_metadata_pdf_get_user_slide_count (_tmp2_);
	if (_tmp1_ < (_tmp3_ - 1)) {
		gint _tmp4_;
		pdfpcMetadataPdf* _tmp5_;
		gint _tmp6_;
		gint _tmp7_ = 0;
		_tmp4_ = self->current_user_slide_number;
		self->current_user_slide_number = _tmp4_ + 1;
		_tmp5_ = self->metadata;
		_tmp6_ = self->current_user_slide_number;
		_tmp7_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp5_, _tmp6_);
		self->current_slide_number = _tmp7_;
		needs_update = TRUE;
	} else {
		gint _tmp8_;
		gint _tmp9_;
		_tmp8_ = self->current_slide_number;
		_tmp9_ = self->n_slides;
		if (_tmp8_ == (_tmp9_ - 1)) {
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_;
			gboolean _tmp13_;
			needs_update = FALSE;
			_tmp11_ = self->black_on_end;
			if (_tmp11_) {
				gboolean _tmp12_ = FALSE;
				_tmp12_ = pdfpc_presentation_controller_is_faded_to_black (self);
				_tmp10_ = !_tmp12_;
			} else {
				_tmp10_ = FALSE;
			}
			_tmp13_ = _tmp10_;
			if (_tmp13_) {
				pdfpc_presentation_controller_fade_to_black (self);
			}
		} else {
			pdfpcMetadataPdf* _tmp14_;
			gint _tmp15_ = 0;
			gint _tmp16_;
			_tmp14_ = self->metadata;
			_tmp15_ = pdfpc_metadata_pdf_get_user_slide_count (_tmp14_);
			self->current_user_slide_number = _tmp15_ - 1;
			_tmp16_ = self->n_slides;
			self->current_slide_number = _tmp16_ - 1;
			needs_update = FALSE;
		}
	}
	_tmp17_ = needs_update;
	if (_tmp17_) {
		gboolean _tmp18_;
		_tmp18_ = self->frozen;
		if (!_tmp18_) {
			self->faded_to_black = FALSE;
		}
		pdfpc_presentation_controller_controllables_update (self);
	}
}


/**
         * Go to the previous slide
         */
void pdfpc_presentation_controller_previous_page (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	gint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	_tmp1_ = self->current_slide_number;
	if (_tmp1_ > 0) {
		gint _tmp2_;
		pdfpcMetadataPdf* _tmp3_;
		gint _tmp4_;
		gint _tmp5_ = 0;
		gboolean _tmp11_;
		_tmp2_ = self->current_slide_number;
		_tmp3_ = self->metadata;
		_tmp4_ = self->current_user_slide_number;
		_tmp5_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp3_, _tmp4_);
		if (_tmp2_ != _tmp5_) {
			gint _tmp6_;
			_tmp6_ = self->current_slide_number;
			self->current_slide_number = _tmp6_ - 1;
		} else {
			gint _tmp7_;
			pdfpcMetadataPdf* _tmp8_;
			gint _tmp9_;
			gint _tmp10_ = 0;
			_tmp7_ = self->current_user_slide_number;
			self->current_user_slide_number = _tmp7_ - 1;
			_tmp8_ = self->metadata;
			_tmp9_ = self->current_user_slide_number;
			_tmp10_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp8_, _tmp9_);
			self->current_slide_number = _tmp10_;
		}
		_tmp11_ = self->frozen;
		if (!_tmp11_) {
			self->faded_to_black = FALSE;
		}
		pdfpc_presentation_controller_controllables_update (self);
	}
}


/**
         * Go to the previous user slide
         */
void pdfpc_presentation_controller_previous_user_page (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	gint _tmp1_;
	gboolean _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	_tmp1_ = self->current_user_slide_number;
	if (_tmp1_ > 0) {
		gint _tmp2_;
		pdfpcMetadataPdf* _tmp3_;
		gint _tmp4_;
		gint _tmp5_ = 0;
		_tmp2_ = self->current_user_slide_number;
		self->current_user_slide_number = _tmp2_ - 1;
		_tmp3_ = self->metadata;
		_tmp4_ = self->current_user_slide_number;
		_tmp5_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp3_, _tmp4_);
		self->current_slide_number = _tmp5_;
	} else {
		self->current_user_slide_number = 0;
		self->current_slide_number = 0;
	}
	_tmp6_ = self->frozen;
	if (!_tmp6_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Go to the first slide
         */
void pdfpc_presentation_controller_goto_first (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	_tmp1_ = self->current_slide_number;
	if (_tmp1_ != 0) {
		pdfpc_presentation_controller_slide2history (self);
	}
	self->current_slide_number = 0;
	self->current_user_slide_number = 0;
	_tmp2_ = self->frozen;
	if (!_tmp2_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Go to the last slide
         */
void pdfpc_presentation_controller_goto_last (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	gint _tmp1_;
	pdfpcMetadataPdf* _tmp2_;
	gint _tmp3_ = 0;
	pdfpcMetadataPdf* _tmp4_;
	gint _tmp5_ = 0;
	pdfpcMetadataPdf* _tmp6_;
	gint _tmp7_;
	gint _tmp8_ = 0;
	gboolean _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	_tmp1_ = self->current_user_slide_number;
	_tmp2_ = self->metadata;
	_tmp3_ = pdfpc_metadata_pdf_get_end_user_slide (_tmp2_);
	if (_tmp1_ != (_tmp3_ - 1)) {
		pdfpc_presentation_controller_slide2history (self);
	}
	_tmp4_ = self->metadata;
	_tmp5_ = pdfpc_metadata_pdf_get_end_user_slide (_tmp4_);
	self->current_user_slide_number = _tmp5_ - 1;
	_tmp6_ = self->metadata;
	_tmp7_ = self->current_user_slide_number;
	_tmp8_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp6_, _tmp7_);
	self->current_slide_number = _tmp8_;
	_tmp9_ = self->frozen;
	if (!_tmp9_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Jump 10 (user) slides forward
         */
void pdfpc_presentation_controller_jump10 (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	pdfpcTimerLabel* _tmp1_;
	gint _tmp2_;
	pdfpcMetadataPdf* _tmp3_;
	gint _tmp4_ = 0;
	gint max_user_slide;
	gint _tmp5_;
	gint _tmp6_;
	pdfpcMetadataPdf* _tmp8_;
	gint _tmp9_;
	gint _tmp10_ = 0;
	gboolean _tmp11_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->timer;
	pdfpc_timer_label_start (_tmp1_);
	_tmp2_ = self->current_user_slide_number;
	self->current_user_slide_number = _tmp2_ + 10;
	_tmp3_ = self->metadata;
	_tmp4_ = pdfpc_metadata_pdf_get_user_slide_count (_tmp3_);
	max_user_slide = _tmp4_;
	_tmp5_ = self->current_user_slide_number;
	_tmp6_ = max_user_slide;
	if (_tmp5_ >= _tmp6_) {
		gint _tmp7_;
		_tmp7_ = max_user_slide;
		self->current_user_slide_number = _tmp7_ - 1;
	}
	_tmp8_ = self->metadata;
	_tmp9_ = self->current_user_slide_number;
	_tmp10_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp8_, _tmp9_);
	self->current_slide_number = _tmp10_;
	_tmp11_ = self->frozen;
	if (!_tmp11_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Jump 10 (user) slides backward
         */
void pdfpc_presentation_controller_back10 (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	pdfpcTimerLabel* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	pdfpcMetadataPdf* _tmp4_;
	gint _tmp5_;
	gint _tmp6_ = 0;
	gboolean _tmp7_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->timer;
	pdfpc_timer_label_start (_tmp1_);
	_tmp2_ = self->current_user_slide_number;
	self->current_user_slide_number = _tmp2_ - 10;
	_tmp3_ = self->current_user_slide_number;
	if (_tmp3_ < 0) {
		self->current_user_slide_number = 0;
	}
	_tmp4_ = self->metadata;
	_tmp5_ = self->current_user_slide_number;
	_tmp6_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp4_, _tmp5_);
	self->current_slide_number = _tmp6_;
	_tmp7_ = self->frozen;
	if (!_tmp7_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Goto a slide in user page numbers
         */
void pdfpc_presentation_controller_goto_user_page (pdfpcPresentationController* self, gint page_number) {
	pdfpcTimerLabel* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gint destination;
	pdfpcMetadataPdf* _tmp4_;
	gint _tmp5_ = 0;
	gint n_user_slides;
	gint _tmp6_;
	gint _tmp10_;
	pdfpcMetadataPdf* _tmp11_;
	gint _tmp12_;
	gint _tmp13_ = 0;
	gboolean _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	_tmp1_ = self->current_user_slide_number;
	_tmp2_ = page_number;
	if (_tmp1_ != (_tmp2_ - 1)) {
		pdfpc_presentation_controller_slide2history (self);
	}
	pdfpc_presentation_controller_controllables_hide_overview (self);
	_tmp3_ = page_number;
	destination = _tmp3_ - 1;
	_tmp4_ = self->metadata;
	_tmp5_ = pdfpc_metadata_pdf_get_user_slide_count (_tmp4_);
	n_user_slides = _tmp5_;
	_tmp6_ = page_number;
	if (_tmp6_ < 1) {
		destination = 0;
	} else {
		gint _tmp7_;
		gint _tmp8_;
		_tmp7_ = page_number;
		_tmp8_ = n_user_slides;
		if (_tmp7_ >= _tmp8_) {
			gint _tmp9_;
			_tmp9_ = n_user_slides;
			destination = _tmp9_ - 1;
		}
	}
	_tmp10_ = destination;
	self->current_user_slide_number = _tmp10_;
	_tmp11_ = self->metadata;
	_tmp12_ = self->current_user_slide_number;
	_tmp13_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp11_, _tmp12_);
	self->current_slide_number = _tmp13_;
	_tmp14_ = self->frozen;
	if (!_tmp14_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_set_ignore_input_events (self, FALSE);
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Go back in history
         */
void pdfpc_presentation_controller_history_back (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	gint* _tmp1_;
	gint _tmp1__length1;
	gint history_length;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->priv->history;
	_tmp1__length1 = self->priv->history_length1;
	history_length = _tmp1__length1;
	_tmp2_ = history_length;
	if (_tmp2_ == 0) {
		pdfpc_presentation_controller_goto_first (self);
	} else {
		gint* _tmp3_;
		gint _tmp3__length1;
		gint _tmp4_;
		gint _tmp5_;
		pdfpcMetadataPdf* _tmp6_;
		gint _tmp7_;
		gint _tmp8_ = 0;
		gint _tmp9_;
		gint _tmp10_ = 0;
		gboolean _tmp11_;
		_tmp3_ = self->priv->history;
		_tmp3__length1 = self->priv->history_length1;
		_tmp4_ = history_length;
		_tmp5_ = _tmp3_[_tmp4_ - 1];
		self->current_slide_number = _tmp5_;
		_tmp6_ = self->metadata;
		_tmp7_ = self->current_slide_number;
		_tmp8_ = pdfpc_metadata_pdf_real_slide_to_user_slide (_tmp6_, _tmp7_);
		self->current_user_slide_number = _tmp8_;
		_tmp9_ = history_length;
		_tmp10_ = _tmp9_ - 1;
		self->priv->history = g_renew (gint, self->priv->history, _tmp9_ - 1);
		(_tmp10_ > self->priv->history_length1) ? memset (self->priv->history + self->priv->history_length1, 0, sizeof (gint) * (_tmp10_ - self->priv->history_length1)) : NULL;
		self->priv->history_length1 = _tmp10_;
		self->priv->_history_size_ = _tmp10_;
		_tmp11_ = self->frozen;
		if (!_tmp11_) {
			self->faded_to_black = FALSE;
		}
		pdfpc_presentation_controller_controllables_update (self);
	}
}


/**
         * Notify the controllables that they have to update the view
         */
void pdfpc_presentation_controller_controllables_update (pdfpcPresentationController* self) {
	GList* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->controllables;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp0_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			pdfpcControllable* _tmp1_;
			pdfpcControllable* c = NULL;
			_tmp1_ = _g_object_ref0 ((pdfpcControllable*) c_it->data);
			c = _tmp1_;
			{
				pdfpcControllable* _tmp2_;
				_tmp2_ = c;
				pdfpc_controllable_update (_tmp2_);
				_g_object_unref0 (c);
			}
		}
	}
}


/**
         * Reset all registered controllables to their initial state
         */
void pdfpc_presentation_controller_controllables_reset (pdfpcPresentationController* self) {
	g_return_if_fail (self != NULL);
	self->current_slide_number = 0;
	self->current_user_slide_number = 0;
	pdfpc_presentation_controller_controllables_update (self);
	pdfpc_presentation_controller_reset_timer (self);
}


void pdfpc_presentation_controller_toggle_overview (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		pdfpc_presentation_controller_controllables_hide_overview (self);
	} else {
		pdfpc_presentation_controller_controllables_show_overview (self);
	}
}


void pdfpc_presentation_controller_controllables_show_overview (pdfpcPresentationController* self) {
	pdfpcWindowOverview* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview;
	if (_tmp0_ != NULL) {
		GList* _tmp1_;
		pdfpc_presentation_controller_set_ignore_mouse_events (self, TRUE);
		_tmp1_ = self->controllables;
		{
			GList* c_collection = NULL;
			GList* c_it = NULL;
			c_collection = _tmp1_;
			for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
				pdfpcControllable* _tmp2_;
				pdfpcControllable* c = NULL;
				_tmp2_ = _g_object_ref0 ((pdfpcControllable*) c_it->data);
				c = _tmp2_;
				{
					pdfpcControllable* _tmp3_;
					_tmp3_ = c;
					pdfpc_controllable_show_overview (_tmp3_);
					_g_object_unref0 (c);
				}
			}
		}
		self->overview_shown = TRUE;
	}
}


void pdfpc_presentation_controller_controllables_hide_overview (pdfpcPresentationController* self) {
	gint _tmp0_;
	gint _tmp1_ = 0;
	GList* _tmp2_;
	g_return_if_fail (self != NULL);
	pdfpc_presentation_controller_set_ignore_mouse_events (self, FALSE);
	_tmp0_ = self->current_user_slide_number;
	_tmp1_ = pdfpc_presentation_controller_get_user_n_slides (self);
	if (_tmp0_ >= _tmp1_) {
		pdfpc_presentation_controller_goto_last (self);
	}
	self->overview_shown = FALSE;
	_tmp2_ = self->controllables;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp2_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			pdfpcControllable* _tmp3_;
			pdfpcControllable* c = NULL;
			_tmp3_ = _g_object_ref0 ((pdfpcControllable*) c_it->data);
			c = _tmp3_;
			{
				pdfpcControllable* _tmp4_;
				_tmp4_ = c;
				pdfpc_controllable_hide_overview (_tmp4_);
				_g_object_unref0 (c);
			}
		}
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Fill the presentation display with black
         */
void pdfpc_presentation_controller_fade_to_black (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->faded_to_black;
	self->faded_to_black = !_tmp0_;
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Is the presentation blanked?
         */
gboolean pdfpc_presentation_controller_is_faded_to_black (pdfpcPresentationController* self) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->faded_to_black;
	result = _tmp0_;
	return result;
}


/**
         * Edit note for current slide.
         */
void pdfpc_presentation_controller_controllables_edit_note (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->controllables;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp1_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			pdfpcControllable* _tmp2_;
			pdfpcControllable* c = NULL;
			_tmp2_ = _g_object_ref0 ((pdfpcControllable*) c_it->data);
			c = _tmp2_;
			{
				pdfpcControllable* _tmp3_;
				_tmp3_ = c;
				pdfpc_controllable_edit_note (_tmp3_);
				_g_object_unref0 (c);
			}
		}
	}
}


/**
         * Ask for the page to jump to
         */
void pdfpc_presentation_controller_controllables_ask_goto_page (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	GList* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		return;
	}
	_tmp1_ = self->controllables;
	{
		GList* c_collection = NULL;
		GList* c_it = NULL;
		c_collection = _tmp1_;
		for (c_it = c_collection; c_it != NULL; c_it = c_it->next) {
			pdfpcControllable* _tmp2_;
			pdfpcControllable* c = NULL;
			_tmp2_ = _g_object_ref0 ((pdfpcControllable*) c_it->data);
			c = _tmp2_;
			{
				pdfpcControllable* _tmp3_;
				_tmp3_ = c;
				pdfpc_controllable_ask_goto_page (_tmp3_);
				_g_object_unref0 (c);
			}
		}
	}
}


/**
         * Freeze the display
         */
void pdfpc_presentation_controller_toggle_freeze (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->frozen;
	self->frozen = !_tmp0_;
	_tmp1_ = self->frozen;
	if (!_tmp1_) {
		self->faded_to_black = FALSE;
	}
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Is the presentation frozen?
         */
gboolean pdfpc_presentation_controller_is_frozen (pdfpcPresentationController* self) {
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->frozen;
	result = _tmp0_;
	return result;
}


/**
         * Toggle skip for current slide
         */
void pdfpc_presentation_controller_toggle_skip (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->overview_shown;
	if (_tmp0_) {
		pdfpcWindowOverview* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint user_selected;
		pdfpcMetadataPdf* _tmp4_;
		gint _tmp5_;
		gint _tmp6_ = 0;
		gint slide_number;
		pdfpcMetadataPdf* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _tmp10_ = 0;
		_tmp1_ = self->overview;
		_tmp2_ = pdfpc_window_overview_get_current_slide (_tmp1_);
		_tmp3_ = _tmp2_;
		user_selected = _tmp3_;
		_tmp4_ = self->metadata;
		_tmp5_ = user_selected;
		_tmp6_ = pdfpc_metadata_pdf_user_slide_to_real_slide (_tmp4_, _tmp5_);
		slide_number = _tmp6_;
		_tmp7_ = self->metadata;
		_tmp8_ = slide_number;
		_tmp9_ = user_selected;
		_tmp10_ = pdfpc_metadata_pdf_toggle_skip (_tmp7_, _tmp8_, _tmp9_);
		if (_tmp10_ != 0) {
			pdfpcWindowOverview* _tmp11_;
			gint _tmp12_ = 0;
			_tmp11_ = self->overview;
			_tmp12_ = pdfpc_presentation_controller_get_user_n_slides (self);
			pdfpc_window_overview_remove_current (_tmp11_, _tmp12_);
		}
	} else {
		gint _tmp13_;
		pdfpcMetadataPdf* _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		gint _tmp17_ = 0;
		pdfpcWindowOverview* _tmp18_;
		gint _tmp19_ = 0;
		_tmp13_ = self->current_user_slide_number;
		_tmp14_ = self->metadata;
		_tmp15_ = self->current_slide_number;
		_tmp16_ = self->current_user_slide_number;
		_tmp17_ = pdfpc_metadata_pdf_toggle_skip (_tmp14_, _tmp15_, _tmp16_);
		self->current_user_slide_number = _tmp13_ + _tmp17_;
		_tmp18_ = self->overview;
		_tmp19_ = pdfpc_presentation_controller_get_user_n_slides (self);
		pdfpc_window_overview_set_n_slides (_tmp18_, _tmp19_);
		pdfpc_presentation_controller_controllables_update (self);
	}
}


/**
         * Start the presentation (-> timer)
         */
void pdfpc_presentation_controller_start (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_start (_tmp0_);
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Pause the timer
         */
void pdfpc_presentation_controller_toggle_pause (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_pause (_tmp0_);
	pdfpc_presentation_controller_controllables_update (self);
}


/**
         * Reset the timer
         */
void pdfpc_presentation_controller_reset_timer (pdfpcPresentationController* self) {
	pdfpcTimerLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->timer;
	pdfpc_timer_label_reset (_tmp0_);
}


void pdfpc_presentation_controller_exit_state (pdfpcPresentationController* self) {
	gboolean _tmp0_;
	gboolean _tmp1_;
	pdfpcTimerLabel* _tmp2_;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->faded_to_black;
	if (_tmp0_) {
		pdfpc_presentation_controller_fade_to_black (self);
	}
	_tmp1_ = self->frozen;
	if (_tmp1_) {
		pdfpc_presentation_controller_toggle_freeze (self);
	}
	_tmp2_ = self->timer;
	_tmp3_ = pdfpc_timer_label_is_paused (_tmp2_);
	if (_tmp3_) {
		pdfpc_presentation_controller_toggle_pause (self);
	}
}


void pdfpc_presentation_controller_quit (pdfpcPresentationController* self) {
	pdfpcMetadataPdf* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->metadata;
	pdfpc_metadata_pdf_save_to_disk (_tmp0_);
	gtk_main_quit ();
}


/**
         * Parse the given time string to a Time object
         */
static void g_time_local (time_t time, struct tm* result) {
	struct tm _result_ = {0};
	struct tm _tmp0_ = {0};
	localtime_r (&time, &_tmp0_);
	_result_ = _tmp0_;
	*result = _result_;
	return;
}


static time_t pdfpc_presentation_controller_parseTime (pdfpcPresentationController* self, const gchar* t) {
	time_t result = 0;
	time_t _tmp0_;
	struct tm _tmp1_ = {0};
	struct tm tm;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	time_t _tmp5_ = 0;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (t != NULL, 0);
	_tmp0_ = time (NULL);
	g_time_local (_tmp0_, &_tmp1_);
	tm = _tmp1_;
	_tmp2_ = t;
	_tmp3_ = g_strconcat (_tmp2_, ":00", NULL);
	_tmp4_ = _tmp3_;
	strptime (_tmp4_, "%H:%M:%S", &tm);
	_g_free0 (_tmp4_);
	_tmp5_ = mktime (&tm);
	result = _tmp5_;
	return result;
}


guint pdfpc_presentation_controller_get_accepted_key_mods (pdfpcPresentationController* self) {
	guint result;
	guint _tmp0_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_accepted_key_mods;
	result = _tmp0_;
	return result;
}


void pdfpc_presentation_controller_set_accepted_key_mods (pdfpcPresentationController* self, guint value) {
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_accepted_key_mods = _tmp0_;
	g_object_notify ((GObject *) self, "accepted-key-mods");
}


pdfpcPresentationControllerKeyAction* pdfpc_presentation_controller_key_action_construct (GType object_type, pdfpcPresentationControllerKeyActionKeyActionDelegate d, void* d_target) {
	pdfpcPresentationControllerKeyAction* self = NULL;
	pdfpcPresentationControllerKeyActionKeyActionDelegate _tmp0_;
	void* _tmp0__target;
	self = (pdfpcPresentationControllerKeyAction*) g_type_create_instance (object_type);
	_tmp0_ = d;
	_tmp0__target = d_target;
	(self->d_target_destroy_notify == NULL) ? NULL : (self->d_target_destroy_notify (self->d_target), NULL);
	self->d = NULL;
	self->d_target = NULL;
	self->d_target_destroy_notify = NULL;
	self->d = _tmp0_;
	self->d_target = _tmp0__target;
	self->d_target_destroy_notify = NULL;
	return self;
}


pdfpcPresentationControllerKeyAction* pdfpc_presentation_controller_key_action_new (pdfpcPresentationControllerKeyActionKeyActionDelegate d, void* d_target) {
	return pdfpc_presentation_controller_key_action_construct (PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION, d, d_target);
}


static void pdfpc_presentation_controller_value_key_action_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void pdfpc_presentation_controller_value_key_action_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		pdfpc_presentation_controller_key_action_unref (value->data[0].v_pointer);
	}
}


static void pdfpc_presentation_controller_value_key_action_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = pdfpc_presentation_controller_key_action_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer pdfpc_presentation_controller_value_key_action_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* pdfpc_presentation_controller_value_key_action_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		pdfpcPresentationControllerKeyAction* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = pdfpc_presentation_controller_key_action_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* pdfpc_presentation_controller_value_key_action_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	pdfpcPresentationControllerKeyAction** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = pdfpc_presentation_controller_key_action_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* pdfpc_presentation_controller_param_spec_key_action (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	pdfpcPresentationControllerParamSpecKeyAction* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer pdfpc_presentation_controller_value_get_key_action (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION), NULL);
	return value->data[0].v_pointer;
}


void pdfpc_presentation_controller_value_set_key_action (GValue* value, gpointer v_object) {
	pdfpcPresentationControllerKeyAction* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		pdfpc_presentation_controller_key_action_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_presentation_controller_key_action_unref (old);
	}
}


void pdfpc_presentation_controller_value_take_key_action (GValue* value, gpointer v_object) {
	pdfpcPresentationControllerKeyAction* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_ACTION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_presentation_controller_key_action_unref (old);
	}
}


static void pdfpc_presentation_controller_key_action_class_init (pdfpcPresentationControllerKeyActionClass * klass) {
	pdfpc_presentation_controller_key_action_parent_class = g_type_class_peek_parent (klass);
	PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION_CLASS (klass)->finalize = pdfpc_presentation_controller_key_action_finalize;
}


static void pdfpc_presentation_controller_key_action_instance_init (pdfpcPresentationControllerKeyAction * self) {
	self->ref_count = 1;
}


static void pdfpc_presentation_controller_key_action_finalize (pdfpcPresentationControllerKeyAction* obj) {
	pdfpcPresentationControllerKeyAction * self;
	self = PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION (obj);
	(self->d_target_destroy_notify == NULL) ? NULL : (self->d_target_destroy_notify (self->d_target), NULL);
	self->d = NULL;
	self->d_target = NULL;
	self->d_target_destroy_notify = NULL;
}


/**
         * The key bindings as a map from keycodes to actions
         *
         * Vala doesn't allow for delegates as the values in a HashMap (yet?). See
         * http://stackoverflow.com/questions/6145635/gee-hashmap-containing-methods-as-values
         * for this solution.
         */
GType pdfpc_presentation_controller_key_action_get_type (void) {
	static volatile gsize pdfpc_presentation_controller_key_action_type_id__volatile = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_key_action_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { pdfpc_presentation_controller_value_key_action_init, pdfpc_presentation_controller_value_key_action_free_value, pdfpc_presentation_controller_value_key_action_copy_value, pdfpc_presentation_controller_value_key_action_peek_pointer, "p", pdfpc_presentation_controller_value_key_action_collect_value, "p", pdfpc_presentation_controller_value_key_action_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerKeyActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_key_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationControllerKeyAction), 0, (GInstanceInitFunc) pdfpc_presentation_controller_key_action_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 pdfpc_presentation_controller_key_action_type_id;
		pdfpc_presentation_controller_key_action_type_id = g_type_register_fundamental (g_type_fundamental_next (), "pdfpcPresentationControllerKeyAction", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&pdfpc_presentation_controller_key_action_type_id__volatile, pdfpc_presentation_controller_key_action_type_id);
	}
	return pdfpc_presentation_controller_key_action_type_id__volatile;
}


gpointer pdfpc_presentation_controller_key_action_ref (gpointer instance) {
	pdfpcPresentationControllerKeyAction* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void pdfpc_presentation_controller_key_action_unref (gpointer instance) {
	pdfpcPresentationControllerKeyAction* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PDFPC_PRESENTATION_CONTROLLER_KEY_ACTION_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


pdfpcPresentationControllerKeyDef* pdfpc_presentation_controller_key_def_construct (GType object_type, guint k, guint m) {
	pdfpcPresentationControllerKeyDef* self = NULL;
	guint _tmp0_;
	guint _tmp1_;
	self = (pdfpcPresentationControllerKeyDef*) g_type_create_instance (object_type);
	_tmp0_ = k;
	pdfpc_presentation_controller_key_def_set_keycode (self, _tmp0_);
	_tmp1_ = m;
	pdfpc_presentation_controller_key_def_set_modMask (self, _tmp1_);
	return self;
}


pdfpcPresentationControllerKeyDef* pdfpc_presentation_controller_key_def_new (guint k, guint m) {
	return pdfpc_presentation_controller_key_def_construct (PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF, k, m);
}


static gpointer _pdfpc_presentation_controller_key_def_ref0 (gpointer self) {
	return self ? pdfpc_presentation_controller_key_def_ref (self) : NULL;
}


guint pdfpc_presentation_controller_key_def_hash (void* _a) {
	guint result = 0U;
	void* _tmp0_;
	pdfpcPresentationControllerKeyDef* _tmp1_;
	pdfpcPresentationControllerKeyDef* a;
	GType _tmp2_ = 0UL;
	GHashFunc _tmp3_ = NULL;
	GHashFunc uintHashFunc;
	guint _tmp4_;
	guint _tmp5_;
	guint _tmp6_ = 0U;
	_tmp0_ = _a;
	_tmp1_ = _pdfpc_presentation_controller_key_def_ref0 (PDFPC_PRESENTATION_CONTROLLER_KEY_DEF (_tmp0_));
	a = _tmp1_;
	_tmp2_ = g_type_from_name ("uint");
	_tmp3_ = gee_functions_get_hash_func_for (_tmp2_);
	uintHashFunc = _tmp3_;
	_tmp4_ = a->priv->_keycode;
	_tmp5_ = a->priv->_modMask;
	_tmp6_ = uintHashFunc (_tmp4_ | _tmp5_);
	result = _tmp6_;
	_pdfpc_presentation_controller_key_def_unref0 (a);
	return result;
}


gboolean pdfpc_presentation_controller_key_def_equal (void* _a, void* _b) {
	gboolean result = FALSE;
	void* _tmp0_;
	pdfpcPresentationControllerKeyDef* _tmp1_;
	pdfpcPresentationControllerKeyDef* a;
	void* _tmp2_;
	pdfpcPresentationControllerKeyDef* _tmp3_;
	pdfpcPresentationControllerKeyDef* b;
	gboolean _tmp4_ = FALSE;
	pdfpcPresentationControllerKeyDef* _tmp5_;
	guint _tmp6_;
	pdfpcPresentationControllerKeyDef* _tmp7_;
	guint _tmp8_;
	gboolean _tmp13_;
	_tmp0_ = _a;
	_tmp1_ = _pdfpc_presentation_controller_key_def_ref0 (PDFPC_PRESENTATION_CONTROLLER_KEY_DEF (_tmp0_));
	a = _tmp1_;
	_tmp2_ = _b;
	_tmp3_ = _pdfpc_presentation_controller_key_def_ref0 (PDFPC_PRESENTATION_CONTROLLER_KEY_DEF (_tmp2_));
	b = _tmp3_;
	_tmp5_ = a;
	_tmp6_ = _tmp5_->priv->_keycode;
	_tmp7_ = b;
	_tmp8_ = _tmp7_->priv->_keycode;
	if (_tmp6_ == _tmp8_) {
		pdfpcPresentationControllerKeyDef* _tmp9_;
		guint _tmp10_;
		pdfpcPresentationControllerKeyDef* _tmp11_;
		guint _tmp12_;
		_tmp9_ = a;
		_tmp10_ = _tmp9_->priv->_modMask;
		_tmp11_ = b;
		_tmp12_ = _tmp11_->priv->_modMask;
		_tmp4_ = _tmp10_ == _tmp12_;
	} else {
		_tmp4_ = FALSE;
	}
	_tmp13_ = _tmp4_;
	result = _tmp13_;
	_pdfpc_presentation_controller_key_def_unref0 (b);
	_pdfpc_presentation_controller_key_def_unref0 (a);
	return result;
}


guint pdfpc_presentation_controller_key_def_get_keycode (pdfpcPresentationControllerKeyDef* self) {
	guint result;
	guint _tmp0_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_keycode;
	result = _tmp0_;
	return result;
}


void pdfpc_presentation_controller_key_def_set_keycode (pdfpcPresentationControllerKeyDef* self, guint value) {
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_keycode = _tmp0_;
}


guint pdfpc_presentation_controller_key_def_get_modMask (pdfpcPresentationControllerKeyDef* self) {
	guint result;
	guint _tmp0_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_modMask;
	result = _tmp0_;
	return result;
}


void pdfpc_presentation_controller_key_def_set_modMask (pdfpcPresentationControllerKeyDef* self, guint value) {
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_modMask = _tmp0_;
}


static void pdfpc_presentation_controller_value_key_def_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void pdfpc_presentation_controller_value_key_def_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		pdfpc_presentation_controller_key_def_unref (value->data[0].v_pointer);
	}
}


static void pdfpc_presentation_controller_value_key_def_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = pdfpc_presentation_controller_key_def_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer pdfpc_presentation_controller_value_key_def_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* pdfpc_presentation_controller_value_key_def_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		pdfpcPresentationControllerKeyDef* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = pdfpc_presentation_controller_key_def_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* pdfpc_presentation_controller_value_key_def_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	pdfpcPresentationControllerKeyDef** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = pdfpc_presentation_controller_key_def_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* pdfpc_presentation_controller_param_spec_key_def (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	pdfpcPresentationControllerParamSpecKeyDef* spec;
	g_return_val_if_fail (g_type_is_a (object_type, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer pdfpc_presentation_controller_value_get_key_def (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF), NULL);
	return value->data[0].v_pointer;
}


void pdfpc_presentation_controller_value_set_key_def (GValue* value, gpointer v_object) {
	pdfpcPresentationControllerKeyDef* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		pdfpc_presentation_controller_key_def_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_presentation_controller_key_def_unref (old);
	}
}


void pdfpc_presentation_controller_value_take_key_def (GValue* value, gpointer v_object) {
	pdfpcPresentationControllerKeyDef* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, PDFPC_PRESENTATION_CONTROLLER_TYPE_KEY_DEF));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		pdfpc_presentation_controller_key_def_unref (old);
	}
}


static void pdfpc_presentation_controller_key_def_class_init (pdfpcPresentationControllerKeyDefClass * klass) {
	pdfpc_presentation_controller_key_def_parent_class = g_type_class_peek_parent (klass);
	PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_CLASS (klass)->finalize = pdfpc_presentation_controller_key_def_finalize;
	g_type_class_add_private (klass, sizeof (pdfpcPresentationControllerKeyDefPrivate));
}


static void pdfpc_presentation_controller_key_def_instance_init (pdfpcPresentationControllerKeyDef * self) {
	self->priv = PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_GET_PRIVATE (self);
	self->ref_count = 1;
}


static void pdfpc_presentation_controller_key_def_finalize (pdfpcPresentationControllerKeyDef* obj) {
	pdfpcPresentationControllerKeyDef * self;
	self = PDFPC_PRESENTATION_CONTROLLER_KEY_DEF (obj);
}


GType pdfpc_presentation_controller_key_def_get_type (void) {
	static volatile gsize pdfpc_presentation_controller_key_def_type_id__volatile = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_key_def_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { pdfpc_presentation_controller_value_key_def_init, pdfpc_presentation_controller_value_key_def_free_value, pdfpc_presentation_controller_value_key_def_copy_value, pdfpc_presentation_controller_value_key_def_peek_pointer, "p", pdfpc_presentation_controller_value_key_def_collect_value, "p", pdfpc_presentation_controller_value_key_def_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerKeyDefClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_key_def_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationControllerKeyDef), 0, (GInstanceInitFunc) pdfpc_presentation_controller_key_def_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 pdfpc_presentation_controller_key_def_type_id;
		pdfpc_presentation_controller_key_def_type_id = g_type_register_fundamental (g_type_fundamental_next (), "pdfpcPresentationControllerKeyDef", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&pdfpc_presentation_controller_key_def_type_id__volatile, pdfpc_presentation_controller_key_def_type_id);
	}
	return pdfpc_presentation_controller_key_def_type_id__volatile;
}


gpointer pdfpc_presentation_controller_key_def_ref (gpointer instance) {
	pdfpcPresentationControllerKeyDef* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void pdfpc_presentation_controller_key_def_unref (gpointer instance) {
	pdfpcPresentationControllerKeyDef* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		PDFPC_PRESENTATION_CONTROLLER_KEY_DEF_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


static void pdfpc_presentation_controller_class_init (pdfpcPresentationControllerClass * klass) {
	pdfpc_presentation_controller_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (pdfpcPresentationControllerPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_pdfpc_presentation_controller_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_pdfpc_presentation_controller_set_property;
	G_OBJECT_CLASS (klass)->finalize = pdfpc_presentation_controller_finalize;
	/**
	         * Key modifiers that we support
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), PDFPC_PRESENTATION_CONTROLLER_ACCEPTED_KEY_MODS, g_param_spec_uint ("accepted-key-mods", "accepted-key-mods", "accepted-key-mods", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void pdfpc_presentation_controller_instance_init (pdfpcPresentationController * self) {
	self->priv = PDFPC_PRESENTATION_CONTROLLER_GET_PRIVATE (self);
	self->faded_to_black = FALSE;
	self->frozen = FALSE;
	self->ignore_keyboard_events = FALSE;
	self->ignore_mouse_events = FALSE;
	self->overview_shown = FALSE;
	self->last_key_event = (guint) 0;
}


static void pdfpc_presentation_controller_finalize (GObject* obj) {
	pdfpcPresentationController * self;
	self = PDFPC_PRESENTATION_CONTROLLER (obj);
	__g_list_free__g_object_unref0_0 (self->controllables);
	_g_object_unref0 (self->metadata);
	_g_object_unref0 (self->overview);
	self->priv->history = (g_free (self->priv->history), NULL);
	_g_object_unref0 (self->timer);
	_g_object_unref0 (self->actionNames);
	_g_object_unref0 (self->keyBindings);
	_g_object_unref0 (self->mouseBindings);
	G_OBJECT_CLASS (pdfpc_presentation_controller_parent_class)->finalize (obj);
}


/**
     * Controller handling all the triggered events/signals
     */
GType pdfpc_presentation_controller_get_type (void) {
	static volatile gsize pdfpc_presentation_controller_type_id__volatile = 0;
	if (g_once_init_enter (&pdfpc_presentation_controller_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (pdfpcPresentationControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_presentation_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcPresentationController), 0, (GInstanceInitFunc) pdfpc_presentation_controller_instance_init, NULL };
		GType pdfpc_presentation_controller_type_id;
		pdfpc_presentation_controller_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcPresentationController", &g_define_type_info, 0);
		g_once_init_leave (&pdfpc_presentation_controller_type_id__volatile, pdfpc_presentation_controller_type_id);
	}
	return pdfpc_presentation_controller_type_id__volatile;
}


static void _vala_pdfpc_presentation_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	pdfpcPresentationController * self;
	self = PDFPC_PRESENTATION_CONTROLLER (object);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_ACCEPTED_KEY_MODS:
		g_value_set_uint (value, pdfpc_presentation_controller_get_accepted_key_mods (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_pdfpc_presentation_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	pdfpcPresentationController * self;
	self = PDFPC_PRESENTATION_CONTROLLER (object);
	switch (property_id) {
		case PDFPC_PRESENTATION_CONTROLLER_ACCEPTED_KEY_MODS:
		pdfpc_presentation_controller_set_accepted_key_mods (self, g_value_get_uint (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}