-
Notifications
You must be signed in to change notification settings - Fork 16
/
mousewheelzoom.c
1921 lines (1773 loc) · 81.5 KB
/
mousewheelzoom.c
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
/* mousewheelzoom.c generated by valac 0.40.7, the Vala compiler
* generated from mousewheelzoom.vala, do not modify */
/* gnome-shell-mousewheel-zoom*/
/* (c) Mar 2012, Tobias Quinn <[email protected]>*/
/* GPLv3*/
#include <glib.h>
#include <glib-object.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/Xregion.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#define TYPE_MAGNIFIER (magnifier_get_type ())
#define MAGNIFIER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MAGNIFIER, Magnifier))
#define IS_MAGNIFIER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MAGNIFIER))
#define MAGNIFIER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MAGNIFIER, MagnifierIface))
typedef struct _Magnifier Magnifier;
typedef struct _MagnifierIface MagnifierIface;
#define TYPE_MAGNIFIER_PROXY (magnifier_proxy_get_type ())
typedef GDBusProxy MagnifierProxy;
typedef GDBusProxyClass MagnifierProxyClass;
#define TYPE_ZOOM_REGION (zoom_region_get_type ())
#define ZOOM_REGION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZOOM_REGION, ZoomRegion))
#define IS_ZOOM_REGION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZOOM_REGION))
#define ZOOM_REGION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_ZOOM_REGION, ZoomRegionIface))
typedef struct _ZoomRegion ZoomRegion;
typedef struct _ZoomRegionIface ZoomRegionIface;
#define TYPE_ZOOM_REGION_PROXY (zoom_region_proxy_get_type ())
typedef GDBusProxy ZoomRegionProxy;
typedef GDBusProxyClass ZoomRegionProxyClass;
#define TYPE_ZOOMER (zoomer_get_type ())
#define ZOOMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZOOMER, Zoomer))
#define ZOOMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ZOOMER, ZoomerClass))
#define IS_ZOOMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZOOMER))
#define IS_ZOOMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZOOMER))
#define ZOOMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ZOOMER, ZoomerClass))
typedef struct _Zoomer Zoomer;
typedef struct _ZoomerClass ZoomerClass;
typedef struct _ZoomerPrivate ZoomerPrivate;
enum {
ZOOMER_0_PROPERTY,
ZOOMER_NUM_PROPERTIES
};
static GParamSpec* zoomer_properties[ZOOMER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define TYPE_WATCH_FOR_MAGNIFIER (watch_for_magnifier_get_type ())
#define WATCH_FOR_MAGNIFIER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WATCH_FOR_MAGNIFIER, WatchForMagnifier))
#define WATCH_FOR_MAGNIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WATCH_FOR_MAGNIFIER, WatchForMagnifierClass))
#define IS_WATCH_FOR_MAGNIFIER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WATCH_FOR_MAGNIFIER))
#define IS_WATCH_FOR_MAGNIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WATCH_FOR_MAGNIFIER))
#define WATCH_FOR_MAGNIFIER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WATCH_FOR_MAGNIFIER, WatchForMagnifierClass))
typedef struct _WatchForMagnifier WatchForMagnifier;
typedef struct _WatchForMagnifierClass WatchForMagnifierClass;
typedef struct _WatchForMagnifierPrivate WatchForMagnifierPrivate;
enum {
WATCH_FOR_MAGNIFIER_0_PROPERTY,
WATCH_FOR_MAGNIFIER_NUM_PROPERTIES
};
static GParamSpec* watch_for_magnifier_properties[WATCH_FOR_MAGNIFIER_NUM_PROPERTIES];
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _XCloseDisplay0(var) ((var == NULL) ? NULL : (var = (XCloseDisplay (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
struct _MagnifierIface {
GTypeInterface parent_iface;
gboolean (*isActive) (Magnifier* self, GError** error);
void (*setActive) (Magnifier* self, gboolean active, GError** error);
char** (*getZoomRegions) (Magnifier* self, int* result_length1, GError** error);
};
struct _ZoomRegionIface {
GTypeInterface parent_iface;
void (*setMagFactor) (ZoomRegion* self, gdouble xMagFactor, gdouble yMagFactor, GError** error);
gdouble (*getMagFactor) (ZoomRegion* self, GError** error);
};
struct _Zoomer {
GObject parent_instance;
ZoomerPrivate * priv;
};
struct _ZoomerClass {
GObjectClass parent_class;
};
struct _ZoomerPrivate {
Magnifier* mag;
ZoomRegion* zoom;
gdouble current_zoom;
gboolean zoom_active;
gboolean interfaces_active;
};
struct _WatchForMagnifier {
GObject parent_instance;
WatchForMagnifierPrivate * priv;
};
struct _WatchForMagnifierClass {
GObjectClass parent_class;
};
struct _WatchForMagnifierPrivate {
GMainLoop* loop;
};
static gpointer zoomer_parent_class = NULL;
static gpointer watch_for_magnifier_parent_class = NULL;
#define MOUSEWHEEL_UP 4
#define MOUSEWHEEL_DOWN 5
GType magnifier_proxy_get_type (void) G_GNUC_CONST;
guint magnifier_register_object (void* object,
GDBusConnection* connection,
const gchar* path,
GError** error);
GType magnifier_get_type (void) G_GNUC_CONST;
gboolean magnifier_isActive (Magnifier* self,
GError** error);
void magnifier_setActive (Magnifier* self,
gboolean active,
GError** error);
char** magnifier_getZoomRegions (Magnifier* self,
int* result_length1,
GError** error);
static void magnifier_proxy_g_signal (GDBusProxy* proxy,
const gchar* sender_name,
const gchar* signal_name,
GVariant* parameters);
static gboolean magnifier_proxy_isActive (Magnifier* self,
GError** error);
static void magnifier_proxy_setActive (Magnifier* self,
gboolean active,
GError** error);
static char** magnifier_proxy_getZoomRegions (Magnifier* self,
int* result_length1,
GError** error);
static void magnifier_proxy_magnifier_interface_init (MagnifierIface* iface);
static void _dbus_magnifier_isActive (Magnifier* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation);
static void _dbus_magnifier_setActive (Magnifier* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation);
static void _dbus_magnifier_getZoomRegions (Magnifier* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation);
static void magnifier_dbus_interface_method_call (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* method_name,
GVariant* parameters,
GDBusMethodInvocation* invocation,
gpointer user_data);
static GVariant* magnifier_dbus_interface_get_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GError** error,
gpointer user_data);
static gboolean magnifier_dbus_interface_set_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GVariant* value,
GError** error,
gpointer user_data);
static void _magnifier_unregister_object (gpointer user_data);
GType zoom_region_proxy_get_type (void) G_GNUC_CONST;
guint zoom_region_register_object (void* object,
GDBusConnection* connection,
const gchar* path,
GError** error);
GType zoom_region_get_type (void) G_GNUC_CONST;
void zoom_region_setMagFactor (ZoomRegion* self,
gdouble xMagFactor,
gdouble yMagFactor,
GError** error);
gdouble zoom_region_getMagFactor (ZoomRegion* self,
GError** error);
static void zoom_region_proxy_g_signal (GDBusProxy* proxy,
const gchar* sender_name,
const gchar* signal_name,
GVariant* parameters);
static void zoom_region_proxy_setMagFactor (ZoomRegion* self,
gdouble xMagFactor,
gdouble yMagFactor,
GError** error);
static gdouble zoom_region_proxy_getMagFactor (ZoomRegion* self,
GError** error);
static void zoom_region_proxy_zoom_region_interface_init (ZoomRegionIface* iface);
static void _dbus_zoom_region_setMagFactor (ZoomRegion* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation);
static void _dbus_zoom_region_getMagFactor (ZoomRegion* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation);
static void zoom_region_dbus_interface_method_call (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* method_name,
GVariant* parameters,
GDBusMethodInvocation* invocation,
gpointer user_data);
static GVariant* zoom_region_dbus_interface_get_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GError** error,
gpointer user_data);
static gboolean zoom_region_dbus_interface_set_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GVariant* value,
GError** error,
gpointer user_data);
static void _zoom_region_unregister_object (gpointer user_data);
GType zoomer_get_type (void) G_GNUC_CONST;
#define ZOOMER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ZOOMER, ZoomerPrivate))
#define ZOOMER_incr 0.1
Zoomer* zoomer_new (void);
Zoomer* zoomer_construct (GType object_type);
static void zoomer_refresh_dbus (Zoomer* self);
void zoomer_zoomIn (Zoomer* self);
void zoomer_zoomOut (Zoomer* self);
static void zoomer_finalize (GObject * obj);
GType watch_for_magnifier_get_type (void) G_GNUC_CONST;
#define WATCH_FOR_MAGNIFIER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_WATCH_FOR_MAGNIFIER, WatchForMagnifierPrivate))
WatchForMagnifier* watch_for_magnifier_new (void);
WatchForMagnifier* watch_for_magnifier_construct (GType object_type);
static void watch_for_magnifier_on_name_appeared (WatchForMagnifier* self);
static void _watch_for_magnifier_on_name_appeared_gbus_name_appeared_callback (GDBusConnection* connection,
const gchar* name,
const gchar* name_owner,
gpointer self);
static void watch_for_magnifier_on_name_vanished (WatchForMagnifier* self);
static void _watch_for_magnifier_on_name_vanished_gbus_name_vanished_callback (GDBusConnection* connection,
const gchar* name,
gpointer self);
static void watch_for_magnifier_finalize (GObject * obj);
void _vala_main (gchar** arg,
int arg_length1);
static void _vala_array_destroy (gpointer array,
gint array_length,
GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
gint array_length,
GDestroyNotify destroy_func);
const gint BUTTONS[2] = {MOUSEWHEEL_UP, MOUSEWHEEL_DOWN};
const gint MASKS[4] = {0, (gint) Mod2Mask, (gint) LockMask, (gint) (LockMask | Mod2Mask)};
static const GDBusArgInfo _magnifier_dbus_arg_info_isActive_result = {-1, "result", "b"};
static const GDBusArgInfo * const _magnifier_dbus_arg_info_isActive_in[] = {NULL};
static const GDBusArgInfo * const _magnifier_dbus_arg_info_isActive_out[] = {&_magnifier_dbus_arg_info_isActive_result, NULL};
static const GDBusMethodInfo _magnifier_dbus_method_info_isActive = {-1, "isActive", (GDBusArgInfo **) (&_magnifier_dbus_arg_info_isActive_in), (GDBusArgInfo **) (&_magnifier_dbus_arg_info_isActive_out)};
static const GDBusArgInfo _magnifier_dbus_arg_info_setActive_active = {-1, "active", "b"};
static const GDBusArgInfo * const _magnifier_dbus_arg_info_setActive_in[] = {&_magnifier_dbus_arg_info_setActive_active, NULL};
static const GDBusArgInfo * const _magnifier_dbus_arg_info_setActive_out[] = {NULL};
static const GDBusMethodInfo _magnifier_dbus_method_info_setActive = {-1, "setActive", (GDBusArgInfo **) (&_magnifier_dbus_arg_info_setActive_in), (GDBusArgInfo **) (&_magnifier_dbus_arg_info_setActive_out)};
static const GDBusArgInfo _magnifier_dbus_arg_info_getZoomRegions_result = {-1, "result", "ao"};
static const GDBusArgInfo * const _magnifier_dbus_arg_info_getZoomRegions_in[] = {NULL};
static const GDBusArgInfo * const _magnifier_dbus_arg_info_getZoomRegions_out[] = {&_magnifier_dbus_arg_info_getZoomRegions_result, NULL};
static const GDBusMethodInfo _magnifier_dbus_method_info_getZoomRegions = {-1, "getZoomRegions", (GDBusArgInfo **) (&_magnifier_dbus_arg_info_getZoomRegions_in), (GDBusArgInfo **) (&_magnifier_dbus_arg_info_getZoomRegions_out)};
static const GDBusMethodInfo * const _magnifier_dbus_method_info[] = {&_magnifier_dbus_method_info_isActive, &_magnifier_dbus_method_info_setActive, &_magnifier_dbus_method_info_getZoomRegions, NULL};
static const GDBusSignalInfo * const _magnifier_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _magnifier_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _magnifier_dbus_interface_info = {-1, "org.gnome.Magnifier", (GDBusMethodInfo **) (&_magnifier_dbus_method_info), (GDBusSignalInfo **) (&_magnifier_dbus_signal_info), (GDBusPropertyInfo **) (&_magnifier_dbus_property_info)};
static const GDBusInterfaceVTable _magnifier_dbus_interface_vtable = {magnifier_dbus_interface_method_call, magnifier_dbus_interface_get_property, magnifier_dbus_interface_set_property};
static const GDBusArgInfo _zoom_region_dbus_arg_info_setMagFactor_xMagFactor = {-1, "xMagFactor", "d"};
static const GDBusArgInfo _zoom_region_dbus_arg_info_setMagFactor_yMagFactor = {-1, "yMagFactor", "d"};
static const GDBusArgInfo * const _zoom_region_dbus_arg_info_setMagFactor_in[] = {&_zoom_region_dbus_arg_info_setMagFactor_xMagFactor, &_zoom_region_dbus_arg_info_setMagFactor_yMagFactor, NULL};
static const GDBusArgInfo * const _zoom_region_dbus_arg_info_setMagFactor_out[] = {NULL};
static const GDBusMethodInfo _zoom_region_dbus_method_info_setMagFactor = {-1, "setMagFactor", (GDBusArgInfo **) (&_zoom_region_dbus_arg_info_setMagFactor_in), (GDBusArgInfo **) (&_zoom_region_dbus_arg_info_setMagFactor_out)};
static const GDBusArgInfo _zoom_region_dbus_arg_info_getMagFactor_result = {-1, "result", "d"};
static const GDBusArgInfo * const _zoom_region_dbus_arg_info_getMagFactor_in[] = {NULL};
static const GDBusArgInfo * const _zoom_region_dbus_arg_info_getMagFactor_out[] = {&_zoom_region_dbus_arg_info_getMagFactor_result, NULL};
static const GDBusMethodInfo _zoom_region_dbus_method_info_getMagFactor = {-1, "getMagFactor", (GDBusArgInfo **) (&_zoom_region_dbus_arg_info_getMagFactor_in), (GDBusArgInfo **) (&_zoom_region_dbus_arg_info_getMagFactor_out)};
static const GDBusMethodInfo * const _zoom_region_dbus_method_info[] = {&_zoom_region_dbus_method_info_setMagFactor, &_zoom_region_dbus_method_info_getMagFactor, NULL};
static const GDBusSignalInfo * const _zoom_region_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _zoom_region_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _zoom_region_dbus_interface_info = {-1, "org.gnome.Magnifier.ZoomRegion", (GDBusMethodInfo **) (&_zoom_region_dbus_method_info), (GDBusSignalInfo **) (&_zoom_region_dbus_signal_info), (GDBusPropertyInfo **) (&_zoom_region_dbus_property_info)};
static const GDBusInterfaceVTable _zoom_region_dbus_interface_vtable = {zoom_region_dbus_interface_method_call, zoom_region_dbus_interface_get_property, zoom_region_dbus_interface_set_property};
gboolean
magnifier_isActive (Magnifier* self,
GError** error)
{
#line 17 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
g_return_val_if_fail (self != NULL, FALSE);
#line 17 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
return MAGNIFIER_GET_INTERFACE (self)->isActive (self, error);
#line 321 "mousewheelzoom.c"
}
void
magnifier_setActive (Magnifier* self,
gboolean active,
GError** error)
{
#line 18 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
g_return_if_fail (self != NULL);
#line 18 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
MAGNIFIER_GET_INTERFACE (self)->setActive (self, active, error);
#line 334 "mousewheelzoom.c"
}
char**
magnifier_getZoomRegions (Magnifier* self,
int* result_length1,
GError** error)
{
#line 19 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
g_return_val_if_fail (self != NULL, NULL);
#line 19 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
return MAGNIFIER_GET_INTERFACE (self)->getZoomRegions (self, result_length1, error);
#line 347 "mousewheelzoom.c"
}
static void
magnifier_default_init (MagnifierIface * iface)
{
}
GType
magnifier_get_type (void)
{
static volatile gsize magnifier_type_id__volatile = 0;
if (g_once_init_enter (&magnifier_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (MagnifierIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) magnifier_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
GType magnifier_type_id;
magnifier_type_id = g_type_register_static (G_TYPE_INTERFACE, "Magnifier", &g_define_type_info, 0);
g_type_interface_add_prerequisite (magnifier_type_id, G_TYPE_OBJECT);
g_type_set_qdata (magnifier_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) magnifier_proxy_get_type);
g_type_set_qdata (magnifier_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.Magnifier");
g_type_set_qdata (magnifier_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_magnifier_dbus_interface_info));
g_type_set_qdata (magnifier_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) magnifier_register_object);
g_once_init_leave (&magnifier_type_id__volatile, magnifier_type_id);
}
return magnifier_type_id__volatile;
}
G_DEFINE_TYPE_EXTENDED (MagnifierProxy, magnifier_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_MAGNIFIER, magnifier_proxy_magnifier_interface_init) )
static void
magnifier_proxy_class_init (MagnifierProxyClass* klass)
{
G_DBUS_PROXY_CLASS (klass)->g_signal = magnifier_proxy_g_signal;
}
static void
magnifier_proxy_g_signal (GDBusProxy* proxy,
const gchar* sender_name,
const gchar* signal_name,
GVariant* parameters)
{
}
static void
magnifier_proxy_init (MagnifierProxy* self)
{
}
static gboolean
magnifier_proxy_isActive (Magnifier* self,
GError** error)
{
GDBusMessage *_message;
GVariant *_arguments;
GVariantBuilder _arguments_builder;
GDBusMessage *_reply_message;
GVariant *_reply;
GVariantIter _reply_iter;
gboolean _result = FALSE;
GVariant* _tmp2_;
G_IO_ERROR;
_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Magnifier", "isActive");
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
_arguments = g_variant_builder_end (&_arguments_builder);
g_dbus_message_set_body (_message, _arguments);
_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
g_object_unref (_message);
if (!_reply_message) {
gboolean _tmp0_ = FALSE;
return _tmp0_;
}
if (g_dbus_message_to_gerror (_reply_message, error)) {
gboolean _tmp1_ = FALSE;
g_object_unref (_reply_message);
return _tmp1_;
}
_reply = g_dbus_message_get_body (_reply_message);
g_variant_iter_init (&_reply_iter, _reply);
_tmp2_ = g_variant_iter_next_value (&_reply_iter);
_result = g_variant_get_boolean (_tmp2_);
g_variant_unref (_tmp2_);
g_object_unref (_reply_message);
return _result;
}
static void
magnifier_proxy_setActive (Magnifier* self,
gboolean active,
GError** error)
{
GDBusMessage *_message;
GVariant *_arguments;
GVariantBuilder _arguments_builder;
GDBusMessage *_reply_message;
G_IO_ERROR;
_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Magnifier", "setActive");
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (active));
_arguments = g_variant_builder_end (&_arguments_builder);
g_dbus_message_set_body (_message, _arguments);
_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
g_object_unref (_message);
if (!_reply_message) {
return;
}
if (g_dbus_message_to_gerror (_reply_message, error)) {
g_object_unref (_reply_message);
return;
}
g_object_unref (_reply_message);
}
static char**
magnifier_proxy_getZoomRegions (Magnifier* self,
int* result_length1,
GError** error)
{
GDBusMessage *_message;
GVariant *_arguments;
GVariantBuilder _arguments_builder;
GDBusMessage *_reply_message;
GVariant *_reply;
GVariantIter _reply_iter;
char** _result = NULL;
int _result_length1;
GVariant* _tmp3_;
char** _tmp4_;
int _tmp4__length;
int _tmp4__size;
int _tmp4__length1;
GVariantIter _tmp5_;
GVariant* _tmp6_;
G_IO_ERROR;
_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Magnifier", "getZoomRegions");
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
_arguments = g_variant_builder_end (&_arguments_builder);
g_dbus_message_set_body (_message, _arguments);
_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
g_object_unref (_message);
if (!_reply_message) {
return NULL;
}
if (g_dbus_message_to_gerror (_reply_message, error)) {
g_object_unref (_reply_message);
return NULL;
}
_reply = g_dbus_message_get_body (_reply_message);
g_variant_iter_init (&_reply_iter, _reply);
_result_length1 = 0;
_tmp3_ = g_variant_iter_next_value (&_reply_iter);
_tmp4_ = g_new (char*, 5);
_tmp4__length = 0;
_tmp4__size = 4;
_tmp4__length1 = 0;
g_variant_iter_init (&_tmp5_, _tmp3_);
for (; (_tmp6_ = g_variant_iter_next_value (&_tmp5_)) != NULL; _tmp4__length1++) {
if (_tmp4__size == _tmp4__length) {
_tmp4__size = 2 * _tmp4__size;
_tmp4_ = g_renew (char*, _tmp4_, _tmp4__size + 1);
}
_tmp4_[_tmp4__length++] = g_variant_dup_string (_tmp6_, NULL);
g_variant_unref (_tmp6_);
}
_result_length1 = _tmp4__length1;
_tmp4_[_tmp4__length] = NULL;
_result = _tmp4_;
g_variant_unref (_tmp3_);
*result_length1 = _result_length1;
g_object_unref (_reply_message);
return _result;
}
static void
magnifier_proxy_magnifier_interface_init (MagnifierIface* iface)
{
iface->isActive = magnifier_proxy_isActive;
iface->setActive = magnifier_proxy_setActive;
iface->getZoomRegions = magnifier_proxy_getZoomRegions;
}
static void
_dbus_magnifier_isActive (Magnifier* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation)
{
GError* error = NULL;
GVariantIter _arguments_iter;
GDBusMessage* _reply_message = NULL;
GVariant* _reply;
GVariantBuilder _reply_builder;
gboolean result;
g_variant_iter_init (&_arguments_iter, _parameters_);
result = magnifier_isActive (self, &error);
if (error) {
g_dbus_method_invocation_return_gerror (invocation, error);
return;
}
_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
g_variant_builder_add_value (&_reply_builder, g_variant_new_boolean (result));
_reply = g_variant_builder_end (&_reply_builder);
g_dbus_message_set_body (_reply_message, _reply);
g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (invocation);
g_object_unref (_reply_message);
}
static void
_dbus_magnifier_setActive (Magnifier* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation)
{
GError* error = NULL;
GVariantIter _arguments_iter;
gboolean active = FALSE;
GVariant* _tmp7_;
GDBusMessage* _reply_message = NULL;
GVariant* _reply;
GVariantBuilder _reply_builder;
g_variant_iter_init (&_arguments_iter, _parameters_);
_tmp7_ = g_variant_iter_next_value (&_arguments_iter);
active = g_variant_get_boolean (_tmp7_);
g_variant_unref (_tmp7_);
magnifier_setActive (self, active, &error);
if (error) {
g_dbus_method_invocation_return_gerror (invocation, error);
return;
}
_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
_reply = g_variant_builder_end (&_reply_builder);
g_dbus_message_set_body (_reply_message, _reply);
g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (invocation);
g_object_unref (_reply_message);
}
static void
_dbus_magnifier_getZoomRegions (Magnifier* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation)
{
GError* error = NULL;
GVariantIter _arguments_iter;
GDBusMessage* _reply_message = NULL;
GVariant* _reply;
GVariantBuilder _reply_builder;
char** result;
int result_length1 = 0;
char** _tmp8_;
GVariantBuilder _tmp9_;
int _tmp10_;
g_variant_iter_init (&_arguments_iter, _parameters_);
result = magnifier_getZoomRegions (self, &result_length1, &error);
if (error) {
g_dbus_method_invocation_return_gerror (invocation, error);
return;
}
_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
_tmp8_ = result;
g_variant_builder_init (&_tmp9_, G_VARIANT_TYPE ("ao"));
for (_tmp10_ = 0; _tmp10_ < result_length1; _tmp10_++) {
g_variant_builder_add_value (&_tmp9_, g_variant_new_object_path (*_tmp8_));
_tmp8_++;
}
g_variant_builder_add_value (&_reply_builder, g_variant_builder_end (&_tmp9_));
result = (_vala_array_free (result, result_length1, (GDestroyNotify) g_free), NULL);
_reply = g_variant_builder_end (&_reply_builder);
g_dbus_message_set_body (_reply_message, _reply);
g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (invocation);
g_object_unref (_reply_message);
}
static void
magnifier_dbus_interface_method_call (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* method_name,
GVariant* parameters,
GDBusMethodInvocation* invocation,
gpointer user_data)
{
gpointer* data;
gpointer object;
data = user_data;
object = data[0];
if (strcmp (method_name, "isActive") == 0) {
_dbus_magnifier_isActive (object, parameters, invocation);
} else if (strcmp (method_name, "setActive") == 0) {
_dbus_magnifier_setActive (object, parameters, invocation);
} else if (strcmp (method_name, "getZoomRegions") == 0) {
_dbus_magnifier_getZoomRegions (object, parameters, invocation);
} else {
g_object_unref (invocation);
}
}
static GVariant*
magnifier_dbus_interface_get_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GError** error,
gpointer user_data)
{
gpointer* data;
gpointer object;
data = user_data;
object = data[0];
return NULL;
}
static gboolean
magnifier_dbus_interface_set_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GVariant* value,
GError** error,
gpointer user_data)
{
gpointer* data;
gpointer object;
data = user_data;
object = data[0];
return FALSE;
}
guint
magnifier_register_object (gpointer object,
GDBusConnection* connection,
const gchar* path,
GError** error)
{
guint result;
gpointer *data;
data = g_new (gpointer, 3);
data[0] = g_object_ref (object);
data[1] = g_object_ref (connection);
data[2] = g_strdup (path);
result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_magnifier_dbus_interface_info), &_magnifier_dbus_interface_vtable, data, _magnifier_unregister_object, error);
if (!result) {
return 0;
}
return result;
}
static void
_magnifier_unregister_object (gpointer user_data)
{
gpointer* data;
data = user_data;
g_object_unref (data[0]);
g_object_unref (data[1]);
g_free (data[2]);
g_free (data);
}
void
zoom_region_setMagFactor (ZoomRegion* self,
gdouble xMagFactor,
gdouble yMagFactor,
GError** error)
{
#line 24 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
g_return_if_fail (self != NULL);
#line 24 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
ZOOM_REGION_GET_INTERFACE (self)->setMagFactor (self, xMagFactor, yMagFactor, error);
#line 736 "mousewheelzoom.c"
}
gdouble
zoom_region_getMagFactor (ZoomRegion* self,
GError** error)
{
#line 25 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
g_return_val_if_fail (self != NULL, 0.0);
#line 25 "/home/pdostal/Documents/gnome-shell-mousewheel-zoom/mousewheelzoom.vala"
return ZOOM_REGION_GET_INTERFACE (self)->getMagFactor (self, error);
#line 748 "mousewheelzoom.c"
}
static void
zoom_region_default_init (ZoomRegionIface * iface)
{
}
GType
zoom_region_get_type (void)
{
static volatile gsize zoom_region_type_id__volatile = 0;
if (g_once_init_enter (&zoom_region_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (ZoomRegionIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zoom_region_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
GType zoom_region_type_id;
zoom_region_type_id = g_type_register_static (G_TYPE_INTERFACE, "ZoomRegion", &g_define_type_info, 0);
g_type_interface_add_prerequisite (zoom_region_type_id, G_TYPE_OBJECT);
g_type_set_qdata (zoom_region_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) zoom_region_proxy_get_type);
g_type_set_qdata (zoom_region_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.Magnifier.ZoomRegion");
g_type_set_qdata (zoom_region_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_zoom_region_dbus_interface_info));
g_type_set_qdata (zoom_region_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) zoom_region_register_object);
g_once_init_leave (&zoom_region_type_id__volatile, zoom_region_type_id);
}
return zoom_region_type_id__volatile;
}
G_DEFINE_TYPE_EXTENDED (ZoomRegionProxy, zoom_region_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_ZOOM_REGION, zoom_region_proxy_zoom_region_interface_init) )
static void
zoom_region_proxy_class_init (ZoomRegionProxyClass* klass)
{
G_DBUS_PROXY_CLASS (klass)->g_signal = zoom_region_proxy_g_signal;
}
static void
zoom_region_proxy_g_signal (GDBusProxy* proxy,
const gchar* sender_name,
const gchar* signal_name,
GVariant* parameters)
{
}
static void
zoom_region_proxy_init (ZoomRegionProxy* self)
{
}
static void
zoom_region_proxy_setMagFactor (ZoomRegion* self,
gdouble xMagFactor,
gdouble yMagFactor,
GError** error)
{
GDBusMessage *_message;
GVariant *_arguments;
GVariantBuilder _arguments_builder;
GDBusMessage *_reply_message;
G_IO_ERROR;
_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Magnifier.ZoomRegion", "setMagFactor");
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
g_variant_builder_add_value (&_arguments_builder, g_variant_new_double (xMagFactor));
g_variant_builder_add_value (&_arguments_builder, g_variant_new_double (yMagFactor));
_arguments = g_variant_builder_end (&_arguments_builder);
g_dbus_message_set_body (_message, _arguments);
_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
g_object_unref (_message);
if (!_reply_message) {
return;
}
if (g_dbus_message_to_gerror (_reply_message, error)) {
g_object_unref (_reply_message);
return;
}
g_object_unref (_reply_message);
}
static gdouble
zoom_region_proxy_getMagFactor (ZoomRegion* self,
GError** error)
{
GDBusMessage *_message;
GVariant *_arguments;
GVariantBuilder _arguments_builder;
GDBusMessage *_reply_message;
GVariant *_reply;
GVariantIter _reply_iter;
gdouble _result = 0.0;
GVariant* _tmp13_;
G_IO_ERROR;
_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.gnome.Magnifier.ZoomRegion", "getMagFactor");
g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
_arguments = g_variant_builder_end (&_arguments_builder);
g_dbus_message_set_body (_message, _arguments);
_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
g_object_unref (_message);
if (!_reply_message) {
gdouble _tmp11_ = 0.0;
return _tmp11_;
}
if (g_dbus_message_to_gerror (_reply_message, error)) {
gdouble _tmp12_ = 0.0;
g_object_unref (_reply_message);
return _tmp12_;
}
_reply = g_dbus_message_get_body (_reply_message);
g_variant_iter_init (&_reply_iter, _reply);
_tmp13_ = g_variant_iter_next_value (&_reply_iter);
_result = g_variant_get_double (_tmp13_);
g_variant_unref (_tmp13_);
g_object_unref (_reply_message);
return _result;
}
static void
zoom_region_proxy_zoom_region_interface_init (ZoomRegionIface* iface)
{
iface->setMagFactor = zoom_region_proxy_setMagFactor;
iface->getMagFactor = zoom_region_proxy_getMagFactor;
}
static void
_dbus_zoom_region_setMagFactor (ZoomRegion* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation)
{
GError* error = NULL;
GVariantIter _arguments_iter;
gdouble xMagFactor = 0.0;
GVariant* _tmp14_;
gdouble yMagFactor = 0.0;
GVariant* _tmp15_;
GDBusMessage* _reply_message = NULL;
GVariant* _reply;
GVariantBuilder _reply_builder;
g_variant_iter_init (&_arguments_iter, _parameters_);
_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
xMagFactor = g_variant_get_double (_tmp14_);
g_variant_unref (_tmp14_);
_tmp15_ = g_variant_iter_next_value (&_arguments_iter);
yMagFactor = g_variant_get_double (_tmp15_);
g_variant_unref (_tmp15_);
zoom_region_setMagFactor (self, xMagFactor, yMagFactor, &error);
if (error) {
g_dbus_method_invocation_return_gerror (invocation, error);
return;
}
_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
_reply = g_variant_builder_end (&_reply_builder);
g_dbus_message_set_body (_reply_message, _reply);
g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (invocation);
g_object_unref (_reply_message);
}
static void
_dbus_zoom_region_getMagFactor (ZoomRegion* self,
GVariant* _parameters_,
GDBusMethodInvocation* invocation)
{
GError* error = NULL;
GVariantIter _arguments_iter;
GDBusMessage* _reply_message = NULL;
GVariant* _reply;
GVariantBuilder _reply_builder;
gdouble result;
g_variant_iter_init (&_arguments_iter, _parameters_);
result = zoom_region_getMagFactor (self, &error);
if (error) {
g_dbus_method_invocation_return_gerror (invocation, error);
return;
}
_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
g_variant_builder_add_value (&_reply_builder, g_variant_new_double (result));
_reply = g_variant_builder_end (&_reply_builder);
g_dbus_message_set_body (_reply_message, _reply);
g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
g_object_unref (invocation);
g_object_unref (_reply_message);
}
static void
zoom_region_dbus_interface_method_call (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* method_name,
GVariant* parameters,
GDBusMethodInvocation* invocation,
gpointer user_data)
{
gpointer* data;
gpointer object;
data = user_data;
object = data[0];
if (strcmp (method_name, "setMagFactor") == 0) {
_dbus_zoom_region_setMagFactor (object, parameters, invocation);
} else if (strcmp (method_name, "getMagFactor") == 0) {
_dbus_zoom_region_getMagFactor (object, parameters, invocation);
} else {
g_object_unref (invocation);
}
}
static GVariant*
zoom_region_dbus_interface_get_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GError** error,
gpointer user_data)
{
gpointer* data;
gpointer object;
data = user_data;
object = data[0];
return NULL;
}
static gboolean
zoom_region_dbus_interface_set_property (GDBusConnection* connection,
const gchar* sender,
const gchar* object_path,
const gchar* interface_name,
const gchar* property_name,
GVariant* value,
GError** error,
gpointer user_data)
{
gpointer* data;
gpointer object;
data = user_data;
object = data[0];
return FALSE;
}
guint
zoom_region_register_object (gpointer object,
GDBusConnection* connection,