sync
[gir-1.1] / Unique-1.0.gir
1 <?xml version="1.0"?>
2 <!-- This file was automatically generated from C sources - DO NOT EDIT!
3 To affect the contents of this file, edit the original C definitions,
4 and/or use gtk-doc annotations.  -->
5 <repository version="1.1"
6             xmlns="http://www.gtk.org/introspection/core/1.0"
7             xmlns:c="http://www.gtk.org/introspection/c/1.0"
8             xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
9   <include name="Atk" version="1.0"/>
10   <include name="GLib" version="2.0"/>
11   <include name="GModule" version="2.0"/>
12   <include name="GObject" version="2.0"/>
13   <include name="Gdk" version="2.0"/>
14   <include name="GdkPixbuf" version="2.0"/>
15   <include name="Gio" version="2.0"/>
16   <include name="Gtk" version="2.0"/>
17   <include name="Pango" version="1.0"/>
18   <include name="cairo" version="1.0"/>
19   <include name="xlib" version="2.0"/>
20   <package name="unique-1.0"/>
21   <namespace name="Unique"
22              version="1.0"
23              shared-library="libunique-1.0.so.0"
24              c:prefix="Unique">
25     <constant name="API_VERSION" value="1.0">
26       <type name="double"/>
27     </constant>
28     <constant name="API_VERSION_S" value="1.0">
29       <type name="utf8"/>
30     </constant>
31     <class name="App"
32            c:type="UniqueApp"
33            parent="GObject.Object"
34            glib:type-name="UniqueApp"
35            glib:get-type="unique_app_get_type"
36            glib:type-struct="AppClass">
37       <doc xml:whitespace="preserve">The base class for every single instance application. The #UniqueApp
38 structure contains only private data and should be manipulated only
39 with the provided functions.</doc>
40       <constructor name="new" c:identifier="unique_app_new">
41         <return-value transfer-ownership="full">
42           <type name="App" c:type="UniqueApp*"/>
43         </return-value>
44         <parameters>
45           <parameter name="name" transfer-ownership="none">
46             <type name="utf8" c:type="gchar*"/>
47           </parameter>
48           <parameter name="startup_id" transfer-ownership="none">
49             <type name="utf8" c:type="gchar*"/>
50           </parameter>
51         </parameters>
52       </constructor>
53       <constructor name="new_with_commands"
54                    c:identifier="unique_app_new_with_commands"
55                    introspectable="0">
56         <return-value transfer-ownership="full">
57           <type name="App" c:type="UniqueApp*"/>
58         </return-value>
59         <parameters>
60           <parameter name="name" transfer-ownership="none">
61             <type name="utf8" c:type="gchar*"/>
62           </parameter>
63           <parameter name="startup_id" transfer-ownership="none">
64             <type name="utf8" c:type="gchar*"/>
65           </parameter>
66           <parameter name="first_command_name" transfer-ownership="none">
67             <type name="utf8" c:type="gchar*"/>
68           </parameter>
69           <parameter transfer-ownership="none">
70             <varargs>
71             </varargs>
72           </parameter>
73         </parameters>
74       </constructor>
75       <method name="add_command" c:identifier="unique_app_add_command">
76         <return-value transfer-ownership="none">
77           <type name="none" c:type="void"/>
78         </return-value>
79         <parameters>
80           <parameter name="command_name" transfer-ownership="none">
81             <type name="utf8" c:type="gchar*"/>
82           </parameter>
83           <parameter name="command_id" transfer-ownership="none">
84             <type name="int" c:type="gint"/>
85           </parameter>
86         </parameters>
87       </method>
88       <method name="watch_window" c:identifier="unique_app_watch_window">
89         <return-value transfer-ownership="none">
90           <type name="none" c:type="void"/>
91         </return-value>
92         <parameters>
93           <parameter name="window" transfer-ownership="none">
94             <type name="Gtk.Window" c:type="GtkWindow*"/>
95           </parameter>
96         </parameters>
97       </method>
98       <method name="is_running" c:identifier="unique_app_is_running">
99         <return-value transfer-ownership="none">
100           <type name="boolean" c:type="gboolean"/>
101         </return-value>
102       </method>
103       <method name="send_message" c:identifier="unique_app_send_message">
104         <return-value transfer-ownership="full">
105           <type name="Response" c:type="UniqueResponse"/>
106         </return-value>
107         <parameters>
108           <parameter name="command_id" transfer-ownership="none">
109             <type name="int" c:type="gint"/>
110           </parameter>
111           <parameter name="message_data" transfer-ownership="none">
112             <type name="MessageData" c:type="UniqueMessageData*"/>
113           </parameter>
114         </parameters>
115       </method>
116       <property name="is-running" transfer-ownership="none">
117         <type name="boolean" c:type="gboolean"/>
118       </property>
119       <property name="name"
120                 writable="1"
121                 construct-only="1"
122                 transfer-ownership="none">
123         <type name="utf8" c:type="gchararray"/>
124       </property>
125       <property name="screen"
126                 writable="1"
127                 construct="1"
128                 transfer-ownership="none">
129         <type name="Gdk.Screen" c:type="GdkScreen"/>
130       </property>
131       <property name="startup-id"
132                 writable="1"
133                 construct-only="1"
134                 transfer-ownership="none">
135         <type name="utf8" c:type="gchararray"/>
136       </property>
137       <field name="parent_instance">
138         <type name="GObject.Object" c:type="GObject"/>
139       </field>
140       <field name="priv">
141         <type name="AppPrivate" c:type="UniqueAppPrivate*"/>
142       </field>
143       <glib:signal name="message-received">
144         <return-value transfer-ownership="full">
145           <type name="Response" c:type="UniqueResponse"/>
146         </return-value>
147         <parameters>
148           <parameter name="object" transfer-ownership="none">
149             <type name="int" c:type="gint"/>
150           </parameter>
151           <parameter name="p0" transfer-ownership="none">
152             <type name="MessageData" c:type="UniqueMessageData"/>
153           </parameter>
154           <parameter name="p1" transfer-ownership="none">
155             <type name="uint" c:type="guint"/>
156           </parameter>
157         </parameters>
158       </glib:signal>
159     </class>
160     <record name="AppClass"
161             c:type="UniqueAppClass"
162             glib:is-gtype-struct-for="App">
163       <doc xml:whitespace="preserve">Base class for every single instance application.</doc>
164       <field name="parent_class">
165         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
166       </field>
167       <field name="message_received">
168         <callback name="message_received" c:type="message_received">
169           <return-value transfer-ownership="full">
170             <type name="Response" c:type="UniqueResponse"/>
171           </return-value>
172           <parameters>
173             <parameter name="app" transfer-ownership="none">
174               <type name="App" c:type="UniqueApp*"/>
175             </parameter>
176             <parameter name="command" transfer-ownership="none">
177               <type name="int" c:type="gint"/>
178             </parameter>
179             <parameter name="message_data" transfer-ownership="none">
180               <type name="MessageData" c:type="UniqueMessageData*"/>
181             </parameter>
182             <parameter name="time_" transfer-ownership="none">
183               <type name="uint" c:type="guint"/>
184             </parameter>
185           </parameters>
186         </callback>
187       </field>
188       <field name="unique_reserved1">
189         <callback name="unique_reserved1" c:type="_unique_reserved1">
190           <return-value transfer-ownership="none">
191             <type name="none" c:type="void"/>
192           </return-value>
193         </callback>
194       </field>
195       <field name="unique_reserved2">
196         <callback name="unique_reserved2" c:type="_unique_reserved2">
197           <return-value transfer-ownership="none">
198             <type name="none" c:type="void"/>
199           </return-value>
200         </callback>
201       </field>
202       <field name="unique_reserved3">
203         <callback name="unique_reserved3" c:type="_unique_reserved3">
204           <return-value transfer-ownership="none">
205             <type name="none" c:type="void"/>
206           </return-value>
207         </callback>
208       </field>
209       <field name="unique_reserved4">
210         <callback name="unique_reserved4" c:type="_unique_reserved4">
211           <return-value transfer-ownership="none">
212             <type name="none" c:type="void"/>
213           </return-value>
214         </callback>
215       </field>
216     </record>
217     <record name="AppPrivate" c:type="UniqueAppPrivate">
218     </record>
219     <class name="Backend"
220            c:type="UniqueBackend"
221            parent="GObject.Object"
222            abstract="1"
223            glib:type-name="UniqueBackend"
224            glib:get-type="unique_backend_get_type"
225            glib:type-struct="BackendClass">
226       <doc xml:whitespace="preserve">The #UniqueBackend structure contains only private data and should only
227 be accessed using the provided functions.</doc>
228       <function name="create" c:identifier="unique_backend_create">
229         <return-value transfer-ownership="full">
230           <type name="Backend" c:type="UniqueBackend*"/>
231         </return-value>
232       </function>
233       <virtual-method name="request_name" invoker="request_name">
234         <return-value transfer-ownership="none">
235           <type name="boolean" c:type="gboolean"/>
236         </return-value>
237       </virtual-method>
238       <virtual-method name="send_message" invoker="send_message">
239         <return-value transfer-ownership="full">
240           <type name="Response" c:type="UniqueResponse"/>
241         </return-value>
242         <parameters>
243           <parameter name="command_id" transfer-ownership="none">
244             <type name="int" c:type="gint"/>
245           </parameter>
246           <parameter name="message_data" transfer-ownership="none">
247             <type name="MessageData" c:type="UniqueMessageData*"/>
248           </parameter>
249           <parameter name="time_" transfer-ownership="none">
250             <type name="uint" c:type="guint"/>
251           </parameter>
252         </parameters>
253       </virtual-method>
254       <method name="get_name" c:identifier="unique_backend_get_name">
255         <return-value transfer-ownership="none">
256           <type name="utf8" c:type="gchar*"/>
257         </return-value>
258       </method>
259       <method name="set_name" c:identifier="unique_backend_set_name">
260         <return-value transfer-ownership="none">
261           <type name="none" c:type="void"/>
262         </return-value>
263         <parameters>
264           <parameter name="name" transfer-ownership="none">
265             <type name="utf8" c:type="gchar*"/>
266           </parameter>
267         </parameters>
268       </method>
269       <method name="get_startup_id"
270               c:identifier="unique_backend_get_startup_id">
271         <return-value transfer-ownership="none">
272           <type name="utf8" c:type="gchar*"/>
273         </return-value>
274       </method>
275       <method name="set_startup_id"
276               c:identifier="unique_backend_set_startup_id">
277         <return-value transfer-ownership="none">
278           <type name="none" c:type="void"/>
279         </return-value>
280         <parameters>
281           <parameter name="startup_id" transfer-ownership="none">
282             <type name="utf8" c:type="gchar*"/>
283           </parameter>
284         </parameters>
285       </method>
286       <method name="get_screen" c:identifier="unique_backend_get_screen">
287         <return-value transfer-ownership="full">
288           <type name="Gdk.Screen" c:type="GdkScreen*"/>
289         </return-value>
290       </method>
291       <method name="set_screen" c:identifier="unique_backend_set_screen">
292         <return-value transfer-ownership="none">
293           <type name="none" c:type="void"/>
294         </return-value>
295         <parameters>
296           <parameter name="screen" transfer-ownership="none">
297             <type name="Gdk.Screen" c:type="GdkScreen*"/>
298           </parameter>
299         </parameters>
300       </method>
301       <method name="get_workspace" c:identifier="unique_backend_get_workspace">
302         <return-value transfer-ownership="none">
303           <type name="uint" c:type="guint"/>
304         </return-value>
305       </method>
306       <method name="request_name" c:identifier="unique_backend_request_name">
307         <return-value transfer-ownership="none">
308           <type name="boolean" c:type="gboolean"/>
309         </return-value>
310       </method>
311       <method name="send_message" c:identifier="unique_backend_send_message">
312         <return-value transfer-ownership="full">
313           <type name="Response" c:type="UniqueResponse"/>
314         </return-value>
315         <parameters>
316           <parameter name="command_id" transfer-ownership="none">
317             <type name="int" c:type="gint"/>
318           </parameter>
319           <parameter name="message_data" transfer-ownership="none">
320             <type name="MessageData" c:type="UniqueMessageData*"/>
321           </parameter>
322           <parameter name="time_" transfer-ownership="none">
323             <type name="uint" c:type="guint"/>
324           </parameter>
325         </parameters>
326       </method>
327       <field name="parent_instance">
328         <type name="GObject.Object" c:type="GObject"/>
329       </field>
330       <field name="parent">
331         <type name="App" c:type="UniqueApp*"/>
332       </field>
333       <field name="name">
334         <type name="utf8" c:type="gchar*"/>
335       </field>
336       <field name="startup_id">
337         <type name="utf8" c:type="gchar*"/>
338       </field>
339       <field name="screen">
340         <type name="Gdk.Screen" c:type="GdkScreen*"/>
341       </field>
342       <field name="workspace">
343         <type name="uint" c:type="guint"/>
344       </field>
345     </class>
346     <record name="BackendClass"
347             c:type="UniqueBackendClass"
348             glib:is-gtype-struct-for="Backend">
349       <doc xml:whitespace="preserve">The class that should be implemented by every backend for #UniqueApp.</doc>
350       <field name="parent_instance">
351         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
352       </field>
353       <field name="request_name">
354         <callback name="request_name" c:type="request_name">
355           <return-value transfer-ownership="none">
356             <type name="boolean" c:type="gboolean"/>
357           </return-value>
358           <parameters>
359             <parameter name="backend" transfer-ownership="none">
360               <type name="Backend" c:type="UniqueBackend*"/>
361             </parameter>
362           </parameters>
363         </callback>
364       </field>
365       <field name="send_message">
366         <callback name="send_message" c:type="send_message">
367           <return-value transfer-ownership="full">
368             <type name="Response" c:type="UniqueResponse"/>
369           </return-value>
370           <parameters>
371             <parameter name="backend" transfer-ownership="none">
372               <type name="Backend" c:type="UniqueBackend*"/>
373             </parameter>
374             <parameter name="command_id" transfer-ownership="none">
375               <type name="int" c:type="gint"/>
376             </parameter>
377             <parameter name="message_data" transfer-ownership="none">
378               <type name="MessageData" c:type="UniqueMessageData*"/>
379             </parameter>
380             <parameter name="time_" transfer-ownership="none">
381               <type name="uint" c:type="guint"/>
382             </parameter>
383           </parameters>
384         </callback>
385       </field>
386       <field name="unique_reserved1">
387         <callback name="unique_reserved1" c:type="_unique_reserved1">
388           <return-value transfer-ownership="none">
389             <type name="none" c:type="void"/>
390           </return-value>
391         </callback>
392       </field>
393       <field name="unique_reserved2">
394         <callback name="unique_reserved2" c:type="_unique_reserved2">
395           <return-value transfer-ownership="none">
396             <type name="none" c:type="void"/>
397           </return-value>
398         </callback>
399       </field>
400       <field name="unique_reserved3">
401         <callback name="unique_reserved3" c:type="_unique_reserved3">
402           <return-value transfer-ownership="none">
403             <type name="none" c:type="void"/>
404           </return-value>
405         </callback>
406       </field>
407       <field name="unique_reserved4">
408         <callback name="unique_reserved4" c:type="_unique_reserved4">
409           <return-value transfer-ownership="none">
410             <type name="none" c:type="void"/>
411           </return-value>
412         </callback>
413       </field>
414       <field name="unique_reserved5">
415         <callback name="unique_reserved5" c:type="_unique_reserved5">
416           <return-value transfer-ownership="none">
417             <type name="none" c:type="void"/>
418           </return-value>
419         </callback>
420       </field>
421       <field name="unique_reserved6">
422         <callback name="unique_reserved6" c:type="_unique_reserved6">
423           <return-value transfer-ownership="none">
424             <type name="none" c:type="void"/>
425           </return-value>
426         </callback>
427       </field>
428     </record>
429     <enumeration name="Command"
430                  glib:type-name="UniqueCommand"
431                  glib:get-type="unique_command_get_type"
432                  c:type="UniqueCommand">
433       <doc xml:whitespace="preserve">Command to send to a currently active instance. User defined commands
434 should be positive integers, and should be added using the
435 unique_app_add_command() function after creating a #UniqueApp instance</doc>
436       <member name="invalid"
437               value="0"
438               c:identifier="UNIQUE_INVALID"
439               glib:nick="invalid"/>
440       <member name="activate"
441               value="-1"
442               c:identifier="UNIQUE_ACTIVATE"
443               glib:nick="activate"/>
444       <member name="new" value="-2" c:identifier="UNIQUE_NEW" glib:nick="new"/>
445       <member name="open"
446               value="-3"
447               c:identifier="UNIQUE_OPEN"
448               glib:nick="open"/>
449       <member name="close"
450               value="-4"
451               c:identifier="UNIQUE_CLOSE"
452               glib:nick="close"/>
453     </enumeration>
454     <constant name="DEFAULT_BACKEND_S" value="dbus">
455       <type name="utf8"/>
456     </constant>
457     <constant name="MAJOR_VERSION" value="1">
458       <type name="int"/>
459     </constant>
460     <constant name="MICRO_VERSION" value="7">
461       <type name="int"/>
462     </constant>
463     <constant name="MINOR_VERSION" value="1">
464       <type name="int"/>
465     </constant>
466     <record name="MessageData"
467             c:type="UniqueMessageData"
468             glib:type-name="UniqueMessageData"
469             glib:get-type="unique_message_data_get_type">
470       <doc xml:whitespace="preserve">#UniqueMessageData contains the data passed between instances of
471 a #UniqueApp. The #UniqueMessageData structure received inside
472 the signal handlers for UniqueApp::message-received is guaranteed
473 to contain the #GdkScreen, the workspace and the startup notification
474 id of the instance sending the message.</doc>
475       <constructor name="new" c:identifier="unique_message_data_new">
476         <return-value transfer-ownership="full">
477           <type name="MessageData" c:type="UniqueMessageData*"/>
478         </return-value>
479       </constructor>
480       <method name="copy" c:identifier="unique_message_data_copy">
481         <return-value transfer-ownership="full">
482           <type name="MessageData" c:type="UniqueMessageData*"/>
483         </return-value>
484       </method>
485       <method name="free" c:identifier="unique_message_data_free">
486         <return-value transfer-ownership="none">
487           <type name="none" c:type="void"/>
488         </return-value>
489       </method>
490       <method name="set" c:identifier="unique_message_data_set">
491         <return-value transfer-ownership="none">
492           <type name="none" c:type="void"/>
493         </return-value>
494         <parameters>
495           <parameter name="data" transfer-ownership="none">
496             <array c:type="guchar*">
497               <type name="uint8"/>
498             </array>
499           </parameter>
500           <parameter name="length" transfer-ownership="none">
501             <type name="gsize" c:type="gsize"/>
502           </parameter>
503         </parameters>
504       </method>
505       <method name="get" c:identifier="unique_message_data_get">
506         <return-value transfer-ownership="none">
507           <array c:type="guchar*">
508             <type name="uint8"/>
509           </array>
510         </return-value>
511         <parameters>
512           <parameter name="length"
513                      direction="out"
514                      caller-allocates="0"
515                      transfer-ownership="full">
516             <type name="gsize" c:type="gsize*"/>
517           </parameter>
518         </parameters>
519       </method>
520       <method name="set_text" c:identifier="unique_message_data_set_text">
521         <return-value transfer-ownership="none">
522           <type name="boolean" c:type="gboolean"/>
523         </return-value>
524         <parameters>
525           <parameter name="str" transfer-ownership="none">
526             <type name="utf8" c:type="gchar*"/>
527           </parameter>
528           <parameter name="length" transfer-ownership="none">
529             <type name="gssize" c:type="gssize"/>
530           </parameter>
531         </parameters>
532       </method>
533       <method name="get_text" c:identifier="unique_message_data_get_text">
534         <return-value transfer-ownership="full">
535           <type name="utf8" c:type="gchar*"/>
536         </return-value>
537       </method>
538       <method name="set_uris" c:identifier="unique_message_data_set_uris">
539         <return-value transfer-ownership="none">
540           <type name="boolean" c:type="gboolean"/>
541         </return-value>
542         <parameters>
543           <parameter name="uris" transfer-ownership="none">
544             <array c:type="gchar**">
545               <type name="utf8"/>
546             </array>
547           </parameter>
548         </parameters>
549       </method>
550       <method name="get_uris" c:identifier="unique_message_data_get_uris">
551         <return-value transfer-ownership="full">
552           <array c:type="gchar**">
553             <type name="utf8"/>
554           </array>
555         </return-value>
556       </method>
557       <method name="set_filename"
558               c:identifier="unique_message_data_set_filename">
559         <return-value transfer-ownership="none">
560           <type name="none" c:type="void"/>
561         </return-value>
562         <parameters>
563           <parameter name="filename" transfer-ownership="none">
564             <type name="utf8" c:type="gchar*"/>
565           </parameter>
566         </parameters>
567       </method>
568       <method name="get_filename"
569               c:identifier="unique_message_data_get_filename">
570         <return-value transfer-ownership="full">
571           <type name="utf8" c:type="gchar*"/>
572         </return-value>
573       </method>
574       <method name="get_screen" c:identifier="unique_message_data_get_screen">
575         <return-value transfer-ownership="full">
576           <type name="Gdk.Screen" c:type="GdkScreen*"/>
577         </return-value>
578       </method>
579       <method name="get_startup_id"
580               c:identifier="unique_message_data_get_startup_id">
581         <return-value transfer-ownership="none">
582           <type name="utf8" c:type="gchar*"/>
583         </return-value>
584       </method>
585       <method name="get_workspace"
586               c:identifier="unique_message_data_get_workspace">
587         <return-value transfer-ownership="none">
588           <type name="uint" c:type="guint"/>
589         </return-value>
590       </method>
591     </record>
592     <constant name="PROTOCOL_VERSION" value="1.0">
593       <type name="double"/>
594     </constant>
595     <constant name="PROTOCOL_VERSION_S" value="1.0">
596       <type name="utf8"/>
597     </constant>
598     <enumeration name="Response"
599                  glib:type-name="UniqueResponse"
600                  glib:get-type="unique_response_get_type"
601                  c:type="UniqueResponse">
602       <doc xml:whitespace="preserve">Response that a currently active instance of the application should
603 return to the caller which sent a command.</doc>
604       <member name="invalid"
605               value="0"
606               c:identifier="UNIQUE_RESPONSE_INVALID"
607               glib:nick="invalid"/>
608       <member name="ok"
609               value="1"
610               c:identifier="UNIQUE_RESPONSE_OK"
611               glib:nick="ok"/>
612       <member name="cancel"
613               value="2"
614               c:identifier="UNIQUE_RESPONSE_CANCEL"
615               glib:nick="cancel"/>
616       <member name="fail"
617               value="3"
618               c:identifier="UNIQUE_RESPONSE_FAIL"
619               glib:nick="fail"/>
620       <member name="passthrough"
621               value="4"
622               c:identifier="UNIQUE_RESPONSE_PASSTHROUGH"
623               glib:nick="passthrough"/>
624     </enumeration>
625     <constant name="VERSION_HEX" value="0">
626       <type name="int"/>
627     </constant>
628     <constant name="VERSION_S" value="1.1.7">
629       <type name="utf8"/>
630     </constant>
631   </namespace>
632 </repository>