summaryrefslogtreecommitdiffstats
path: root/src/extension/dbus/wrapper/inkscape-dbus-wrapper.h
blob: e2abd305e0708a2b222f1e55b84cb11b958c45d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
// SPDX-License-Identifier: GPL-2.0-or-later
/** @file
 * TODO: insert short description here
 *//*
 * Authors: see git history
 *
 * Copyright (C) 2013 Authors
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */
#ifndef INKSCAPE_EXTENSION_DOCUMENT_INTERFACE_H_
#define INKSCAPE_EXTENSION_DOCUMENT_INTERFACE_H_

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

//#include "document-client-glue-mod.h"

//#include <dbus/dbus-glib-bindings.h>
//#include <dbus/dbus-glib-lowlevel.h>
        
#define TYPE_DOCUMENT_INTERFACE            (document_interface_get_type ())
#define DOCUMENT_INTERFACE(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), TYPE_DOCUMENT_INTERFACE, DocumentInterface))
#define DOCUMENT_INTERFACE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DOCUMENT_INTERFACE, DocumentInterfaceClass))
#define IS_DOCUMENT_INTERFACE(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), TYPE_DOCUMENT_INTERFACE))
#define IS_DOCUMENT_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DOCUMENT_INTERFACE))
#define DOCUMENT_INTERFACE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DOCUMENT_INTERFACE, DocumentInterfaceClass))

G_BEGIN_DECLS

typedef struct _DocumentInterface DocumentInterface;
typedef struct _DocumentInterfaceClass DocumentInterfaceClass;

struct _DocumentInterface;

struct _DocumentInterfaceClass {
	GObjectClass parent;
};


DocumentInterface *document_interface_new (void);
GType document_interface_get_type (void);



DocumentInterface * 
inkscape_desktop_init_dbus ();

//static
gboolean
inkscape_delete_all (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_call_verb (DocumentInterface *doc, const char * IN_verbid, GError **error);

 
//static
gchar *
inkscape_rectangle (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_width, const gint IN_height, GError **error);

//static
char *
inkscape_ellipse (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_width, const gint IN_height, GError **error);

//static
char *
inkscape_polygon (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_radius, const gint IN_rotation, const gint IN_sides, GError **error);

//static
char *
inkscape_star (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_r1, const gint IN_r2, const gdouble IN_arg1, const gdouble IN_arg2, const gint IN_sides, const gdouble IN_rounded, GError **error);

//static
char *
inkscape_spiral (DocumentInterface *doc, const gint IN_cx, const gint IN_cy, const gint IN_r, const gint IN_revolutions, GError **error);

//static
char *
inkscape_line (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_x2, const gint IN_y2, GError **error);

//static
char *
inkscape_text (DocumentInterface *doc, const gint IN_x, const gint IN_y, const char * IN_text, GError **error);

//static
char *
inkscape_image (DocumentInterface *doc, const gint IN_x, const gint IN_y, const char * IN_text, GError **error);

//static
char *
inkscape_node (DocumentInterface *doc, const char * IN_svgtype, GError **error);

//static
gdouble
inkscape_document_get_width (DocumentInterface *doc, GError **error);

//static
gdouble
inkscape_document_get_height (DocumentInterface *doc, GError **error);

//static
char *
inkscape_document_get_css (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_document_set_css (DocumentInterface *doc, const char * IN_stylestring, GError **error);

//static
gboolean
inkscape_document_merge_css (DocumentInterface *doc, const char * IN_stylestring, GError **error);

//static
gboolean
inkscape_document_resize_to_fit_selection (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_set_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const char * IN_newval, GError **error);

//static
gboolean
inkscape_set_int_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const gint IN_newval, GError **error);

//static
gboolean
inkscape_set_double_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, const gdouble IN_newval, GError **error);

//static
char *
inkscape_get_attribute (DocumentInterface *doc, const char * IN_shape, const char * IN_attribute, GError **error);

//static
gboolean
inkscape_move (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x, const gdouble IN_y, GError **error);

//static
gboolean
inkscape_move_to (DocumentInterface *doc, const char * IN_shape, const gdouble IN_x, const gdouble IN_y, GError **error);

//static
gboolean
inkscape_object_to_path (DocumentInterface *doc, const char * IN_objectname, GError **error);

//static
char *
inkscape_get_path (DocumentInterface *doc, const char * IN_shape, GError **error);

//static
gboolean
inkscape_transform (DocumentInterface *doc, const char * IN_shape, const char * IN_transformstr, GError **error);

//static
char *
inkscape_get_css (DocumentInterface *doc, const char * IN_shape, GError **error);

//static
gboolean
inkscape_modify_css (DocumentInterface *doc, const char * IN_shape, const char * IN_cssattrib, const char * IN_newval, GError **error);

//static
gboolean
inkscape_inkscape_merge_css (DocumentInterface *doc, const char * IN_shape, const char * IN_stylestring, GError **error);

//static
gboolean
inkscape_set_color (DocumentInterface *doc, const char * IN_shape, const gint IN_red, const gint IN_green, const gint IN_blue, const gboolean IN_fill, GError **error);

//static
gboolean
inkscape_move_to_layer (DocumentInterface *doc, const char * IN_objectname, const char * IN_layername, GError **error);

//static
GArray*
inkscape_get_node_coordinates (DocumentInterface *doc, const char * IN_shape, GError **error);

//static
gboolean
inkscape_save (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_save_as (DocumentInterface *doc, const char * IN_pathname, GError **error);

//static
gboolean
inkscape_load (DocumentInterface *doc, const char * IN_pathname, GError **error);

//static
gboolean
inkscape_mark_as_unmodified (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_close (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_inkscape_exit (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_undo (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_redo (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_pause_updates (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_resume_updates (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_update (DocumentInterface *doc, GError **error);

//static
char **
inkscape_selection_get (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_add (DocumentInterface *doc, const char * IN_name, GError **error);

//static
gboolean
inkscape_selection_add_list (DocumentInterface *doc, const char ** IN_name, GError **error);

//static
gboolean
inkscape_selection_set (DocumentInterface *doc, const char * IN_name, GError **error);

//static
gboolean
inkscape_selection_set_list (DocumentInterface *doc, const char ** IN_name, GError **error);

//static
gboolean
inkscape_selection_rotate (DocumentInterface *doc, const gint IN_angle, GError **error);

//static
gboolean
inkscape_selection_delete (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_clear (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_select_all (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_select_all_in_all_layers (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_box (DocumentInterface *doc, const gint IN_x, const gint IN_y, const gint IN_x2, const gint IN_y2, const gboolean IN_replace, GError **error);

//static
gboolean
inkscape_selection_invert (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_group (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_ungroup (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_cut (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_copy (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_paste (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_scale (DocumentInterface *doc, const gdouble IN_grow, GError **error);

//static
gboolean
inkscape_selection_move (DocumentInterface *doc, const gdouble IN_x, const gdouble IN_y, GError **error);

//static
gboolean
inkscape_selection_move_to (DocumentInterface *doc, const gdouble IN_x, const gdouble IN_y, GError **error);

//static
gboolean
inkscape_selection_move_to_layer (DocumentInterface *doc, const char * IN_layer, GError **error);

//static
GArray *
inkscape_selection_get_center (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_selection_to_path (DocumentInterface *doc, GError **error);

//static
char **
inkscape_selection_combine (DocumentInterface *doc, const char * IN_type, GError **error);

//static
gboolean
inkscape_selection_change_level (DocumentInterface *doc, const char * IN_command, GError **error);

//static
char *
inkscape_layer_new (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_layer_set (DocumentInterface *doc, const char * IN_layer, GError **error);

//static
char **
inkscape_layer_get_all (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_layer_change_level (DocumentInterface *doc, const char * IN_command, GError **error);

//static
gboolean
inkscape_layer_next (DocumentInterface *doc, GError **error);

//static
gboolean
inkscape_layer_previous (DocumentInterface *doc, GError **error);

G_END_DECLS

#endif // INKSCAPE_EXTENSION_DOCUMENT_INTERFACE_H_