source: appstream-generator/contrib/girwrap/APILookupGio.txt @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 17.6 KB
Line 
1#
2# Licensed under the GNU Lesser General Public License Version 3
3#
4# This library is free software: you can redistribute it and/or modify
5# it under the terms of the GNU Lesser General Public License as published by
6# the Free Software Foundation, either version 3 of the license, or
7# (at your option) any later version.
8#
9# This software is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with this library.  If not, see <http://www.gnu.org/licenses/>.
16
17#############################################
18### Definitions for wrapping Gtk+ ###########
19#############################################
20
21# must start with wrap
22wrap: gio
23file: /usr/share/gir-1.0/Gio-2.0.gir
24
25addAliases: start
26        public import gi.glibtypes;
27        public import gi.gobjecttypes;
28addAliases: end
29
30struct:
31class: Action
32extend: GObject.Object
33implements: Action
34
35struct:
36class: ActionGroup
37extend: GObject.Object
38implements: ActionGroup
39
40struct:
41class: AppInfo
42extend: GObject.Object
43implements: AppInfo
44
45struct: Application
46code: start
47        protected class ScopedOnCommandLineDelegateWrapper
48        {
49                static ScopedOnCommandLineDelegateWrapper[] listeners;
50                int delegate(Scoped!ApplicationCommandLine, Application) dlg;
51                gulong handlerId;
52
53                this(int delegate(Scoped!ApplicationCommandLine, Application) dlg)
54                {
55                        this.dlg = dlg;
56                        this.listeners ~= this;
57                }
58
59                void remove(ScopedOnCommandLineDelegateWrapper source)
60                {
61                        foreach(index, wrapper; listeners)
62                        {
63                                if (wrapper.handlerId == source.handlerId)
64                                {
65                                        listeners[index] = null;
66                                        listeners = std.algorithm.remove(listeners, index);
67                                        break;
68                                }
69                        }
70                }
71        }
72
73        /**
74         * The ::command-line signal is emitted on the primary instance when
75         * a commandline is not handled locally. See g_application_run() and
76         * the #GApplicationCommandLine documentation for more information.
77         *
78         * Params:
79         *     commandLine = a #GApplicationCommandLine representing the
80         *         passed commandline
81         *
82         * Return: An integer that is set as the exit status for the calling
83         *     process. See g_application_command_line_set_exit_status().
84         */
85        gulong addOnCommandLine(int delegate(Scoped!ApplicationCommandLine, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
86        {
87                auto wrapper = new ScopedOnCommandLineDelegateWrapper(dlg);
88                wrapper.handlerId = Signals.connectData(
89                        this,
90                        "command-line",
91                        cast(GCallback)&callBackScopedCommandLine,
92                        cast(void*)wrapper,
93                        cast(GClosureNotify)&callBackScopedCommandLineDestroy,
94                        connectFlags);
95                return wrapper.handlerId;
96        }
97
98        extern(C) static int callBackScopedCommandLine(GApplication* applicationStruct, GApplicationCommandLine* commandLine, ScopedOnCommandLineDelegateWrapper wrapper)
99        {
100                return wrapper.dlg(scoped!ApplicationCommandLine(commandLine), wrapper.outer);
101        }
102
103        extern(C) static void callBackScopedCommandLineDestroy(ScopedOnCommandLineDelegateWrapper wrapper, GClosure* closure)
104        {
105                wrapper.remove(wrapper);
106        }
107code: end
108
109struct: BufferedInputStream
110noCode: peek_buffer
111code: start
112        /**
113         * Returns the buffer with the currently available bytes. The returned
114         * buffer must not be modified and will become invalid when reading from
115         * the stream or filling the buffer.
116         *
117         * Params:
118         *     count = a #gsize to get the number of bytes available in the buffer
119         *
120         * Return: read-only buffer
121         */
122        public ubyte[] peekBuffer()
123        {
124                size_t count;
125
126                auto p = g_buffered_input_stream_peek_buffer(gBufferedInputStream, &count);
127
128                return (cast(ubyte*)p)[0 .. count];
129        }
130code: end
131
132struct:
133class: Converter
134extend: GObject.Object
135implements: Converter
136
137struct: DataInputStream
138noCode: read_byte
139
140struct: DBusActionGroup
141import: glib.ConstructionException
142code: start
143        /**
144         * See_Also: get().
145         */
146        this(DBusConnection connection, string busName, string objectPath)
147        {
148                auto p =  g_dbus_action_group_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath));
149
150                if(p is null)
151                {
152                        throw new ConstructionException("null returned by g_dbus_action_group_get");
153                }
154                this(cast(GDBusActionGroup*) p, true);
155        }
156code: end
157
158struct: DBusAnnotationInfo
159import: glib.Str
160noCode: lookup
161code: start
162        /**
163         * Looks up the value of an annotation.
164         *
165         * The cost of this function is O(n) in number of annotations.
166         *
167         * Params:
168         *     annotations = A %NULL-terminated array of annotations or %NULL.
169         *     name = The name of the annotation to look up.
170         *
171         * Return: The value or %NULL if not found. Do not free, it is owned by @annotations.
172         *
173         * Since: 2.26
174         */
175        public static string lookup(DBusAnnotationInfo[] annotations, string name)
176        {
177                GDBusAnnotationInfo*[] annotationsArray = new GDBusAnnotationInfo*[annotations.length+1];
178                for ( int i = 0; i < annotations.length ; i++ )
179                {
180                        annotationsArray[i] = annotations[i].getDBusAnnotationInfoStruct();
181                }
182                annotationsArray[$-1] = null;
183
184                return Str.toString(g_dbus_annotation_info_lookup(annotationsArray.ptr, Str.toStringz(name)));
185        }
186code: end
187
188struct: DBusConnection
189alias: new newConnection
190noCode: new_finish
191noCode: new_for_address_finish
192code: start
193        /**
194         * Finishes an operation started with g_dbus_connection_new().
195         *
196         * Params:
197         *     res    = A GAsyncResult obtained from the GAsyncReadyCallback
198         *               passed to g_dbus_connection_new().
199         *     address = If true finish an address.
200         *
201         * Throws: GException on failure.
202         * Throws: ConstructionException GTK+ fails to create the object.
203         *
204         * Since: 2.26
205         */
206        public this (AsyncResultIF res, bool address = false)
207        {
208                GError* err = null;
209                GDBusConnection* p;
210
211                if ( address )
212                {
213                        p = g_dbus_connection_new_for_address_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
214                }
215                else
216                {
217                        p = g_dbus_connection_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
218                }
219
220                if (err !is null)
221                {
222                        throw new GException( new ErrorG(err) );
223                }
224
225                if(p is null)
226                {
227                        throw new ConstructionException("null returned by g_dbus_connection_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)");
228                }
229                this(p, true);
230        }
231code: end
232
233struct: DBusMenuModel
234import: glib.ConstructionException
235code: start
236        /**
237         * See_Also: get().
238         */
239        this(DBusConnection connection, string busName, string objectPath)
240        {
241                auto p =  g_dbus_menu_model_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath));
242
243                if(p is null)
244                {
245                        throw new ConstructionException("null returned by g_dbus_menu_model_get");
246                }
247
248                this(cast(GDBusMenuModel*) p, true);
249        }
250code: end
251
252struct:
253class: DBusObject
254extend: GObject.Object
255implements: DBusObject
256
257struct: DBusObjectManagerClient
258alias: new newObjectManagerClient
259noCode: new_finish
260noCode: new_for_bus_finish
261code: start
262        /**
263         * Finishes an operation started with g_dbus_object_manager_client_new().
264         *
265         * Params:
266         *     res    = A GAsyncResult obtained from the GAsyncReadyCallback passed to the DBusObjectManager constructor.
267         *     forBus = If true finish an address.
268         *
269         * Throws: GException on failure.
270         * Throws: ConstructionException GTK+ fails to create the object.
271         *
272         * Since: 2.30
273         */
274        public this (AsyncResultIF res, bool forBus = false)
275        {
276                GError* err = null;
277                GDBusObjectManager* p;
278
279                if ( forBus )
280                {
281                        p = g_dbus_object_manager_client_new_for_bus_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
282                }
283                else
284                {
285                        p = g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
286                }
287
288                if (err !is null)
289                {
290                        throw new GException( new ErrorG(err) );
291                }
292
293                if(p is null)
294                {
295                        throw new ConstructionException("null returned by g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)");
296                }
297                this(cast(GDBusObjectManagerClient*) p, true);
298        }
299code: end
300
301struct:
302class: DBusInterface
303extend: GObject.Object
304implements: DBusInterface
305
306struct: DBusProxy
307alias: new newProxy
308noCode: new_finish
309noCode: new_for_bus_finish
310code: start
311        /**
312         * Finishes creating a GDBusProxy.
313         *
314         * Params:
315         *     res    = A GAsyncResult obtained from the GAsyncReadyCallback
316         *              function passed to g_dbus_proxy_new().
317         *     forBus = If true finish an address.
318         *
319         * Throws: GException on failure.
320         * Throws: ConstructionException GTK+ fails to create the object.
321         *
322         * Since: 2.26
323         */
324        public this (AsyncResultIF res, bool forBus = false)
325        {
326                GError* err = null;
327                GDBusProxy* p;
328
329                if ( forBus )
330                {
331                        p = g_dbus_proxy_new_for_bus_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
332                }
333                else
334                {
335                        p = g_dbus_proxy_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
336                }
337
338                if (err !is null)
339                {
340                        throw new GException( new ErrorG(err) );
341                }
342
343                if(p is null)
344                {
345                        throw new ConstructionException("null returned by g_dbus_proxy_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)");
346                }
347                this(p, true);
348        }
349code: end
350
351struct: DesktopAppInfo
352noCode: new_from_filename
353code: start
354        /**
355         * Creates a new #GDesktopAppInfo.
356         *
357         * Params:
358         *     filename = the path of a desktop file, in the GLib filename encoding
359         *
360         * Return: a new #GDesktopAppInfo or %NULL on error.
361         *
362         * Throws: ConstructionException GTK+ fails to create the object.
363         */
364        public static DesktopAppInfo createFromFilename(string filename)
365        {
366                auto p = g_desktop_app_info_new_from_filename(Str.toStringz(filename));
367
368                if(p is null)
369                {
370                        throw new ConstructionException("null returned by g_desktop_app_info_new_from_filename");
371                }
372
373                return new DesktopAppInfo(p, true);
374        }
375code: end
376
377struct:
378class: Drive
379extend: GObject.Object
380implements: Drive
381
382struct:
383class: File
384extend: GObject.Object
385implements: File
386
387struct:
388class: Icon
389extend: GObject.Object
390implements: Icon
391
392struct: InetAddress
393noCode: new_any
394noCode: new_loopback
395code: start
396        /**
397         * Creates a InetAddress for the "any" address (unassigned/"don't
398         * care") for family.
399         *
400         * Params:
401         *     family = the address family
402         *     loopback = If true create an InetAddress for the loopback address.
403         *
404         * Throws: ConstructionException GTK+ fails to create the object.
405         *
406         * Since: 2.22
407         */
408        public this (GSocketFamily family, bool loopback = false)
409        {
410                GInetAddress* p;
411
412                if ( loopback )
413                {
414                        p = g_inet_address_new_loopback(family);
415                }
416                else
417                {
418                        p = g_inet_address_new_any(family);
419                }
420
421                if(p is null)
422                {
423                        throw new ConstructionException("null returned by g_inet_address_new_any(family)");
424                }
425                this(p, true);
426        }
427code: end
428
429struct: NoExternal
430noCode: true
431noExternal: true
432
433struct: IOModule
434move: load NoExternal
435move: unload NoExternal
436move: query NoExternal
437
438struct: IOModuleScope
439
440struct: MenuItem
441noCode: new_section
442noCode: new_submenu
443
444struct:
445class: Mount
446extend: GObject.Object
447implements: Mount
448
449struct:
450class: NetworkMonitor
451extend: GObject.Object
452implements: NetworkMonitor
453
454struct: OutputStream
455out: vprintf error
456
457struct: PollableUtils
458namespace:
459
460struct:
461class: Proxy
462extend: GObject.Object
463implements: Proxy
464
465struct:
466class: ProxyResolver
467extend: GObject.Object
468implements: ProxyResolver
469
470struct: Resource
471alias: _register register
472alias: _unregister unregister
473
474struct: SettingsSchema
475
476struct: SettingsSchemaSource
477
478struct: SimpleAsyncResult
479noCode: new_take_error
480
481struct: SimpleProxyResolver
482array: new ignore_hosts
483array: set_ignore_hosts ignore_hosts
484
485struct: Socket
486ref: receive buffer
487ref: receive_from buffer
488out: receive_message messages
489out: receive_message num_messages
490
491struct:
492class: SocketConnectable
493extend: GObject.Object
494implements: SocketConnectable
495
496struct: SubprocessLauncher
497array: set_environ env
498
499struct: ThemedIcon
500noCode: new
501
502struct:
503class: TlsBackend
504extend: GObject.Object
505implements: TlsBackend
506
507struct: TlsPassword
508out: get_value length
509array: get_value Return length
510array: set_value value length
511array: set_value_full value length
512
513struct: UnixSocketAddress
514noCode: new_abstract
515
516struct:
517class: Volume
518extend: GObject.Object
519implements: Volume
520
521struct: VolumeMonitor
522import: glib.ConstructionException
523noCode: get
524code: start
525        /**
526         * Gets the volume monitor used by gio.
527         *
528         * Return: a reference to the #GVolumeMonitor used by gio. Call
529         *     g_object_unref() when done with it.
530         */
531        public this()
532        {
533                auto p = g_volume_monitor_get();
534
535                if(p is null)
536                {
537                        throw new ConstructionException("g_volume_monitor_get()");
538                }
539
540                this(cast(GVolumeMonitor*) p, true);
541        }
542code: end
543
544struct:
545
546move: bus_get DBusConnection get
547move: bus_get_finish DBusConnection get_finish
548move: bus_get_sync DBusConnection get_sync
549
550move: bus_own_name DBusNames own_name
551move: bus_own_name_on_connection DBusNames own_name_on_connection
552move: bus_own_name_on_connection_with_closures DBusNames own_name_on_connection_with_closures
553move: bus_own_name_with_closures DBusNames own_name_with_closures
554move: bus_unown_name DBusNames unown_name
555move: bus_unwatch_name DBusNames unwatch_name
556move: bus_watch_name DBusNames watch_name
557move: bus_watch_name_on_connection DBusNames watch_name_on_connection
558move: bus_watch_name_on_connection_with_closures DBusNames watch_name_on_connection_with_closures
559move: bus_watch_name_with_closures DBusNames watch_name_with_closures
560
561move: content_type_can_be_executable ContentType can_be_executable
562move: content_type_equals ContentType equals
563move: content_type_from_mime_type ContentType from_mime_type
564move: content_type_get_description ContentType get_description
565move: content_type_get_generic_icon_name ContentType get_generic_icon_name
566move: content_type_get_icon ContentType get_icon
567move: content_type_get_mime_type ContentType get_mime_type
568move: content_type_get_symbolic_icon ContentType get_symbolic_icon
569move: content_type_guess ContentType type_guess
570move: content_type_guess_for_tree ContentType guess_for_tree
571move: content_type_is_a ContentType is_a
572move: content_type_is_unknown ContentType is_unknown
573move: content_types_get_registered ContentType
574
575move: dbus_error_encode_gerror DBusError encode_gerror
576move: dbus_error_get_remote_error DBusError get_remote_error
577move: dbus_error_is_remote_error DBusError is_remote_error
578move: dbus_error_new_for_dbus_error DBusError new_for_dbus_error
579move: dbus_error_quark DBusError quark
580move: dbus_error_register_error DBusError register_error
581move: dbus_error_register_error_domain DBusError register_error_domain
582move: dbus_error_strip_remote_error DBusError strip_remote_error
583move: dbus_error_unregister_error DBusError unregister_error
584
585move: dbus_address_escape_value DBusUtilities address_escape_value
586move: dbus_address_get_for_bus_sync DBusUtilities address_get_for_bus_sync
587move: dbus_address_get_stream DBusUtilities address_get_stream
588move: dbus_address_get_stream_finish DBusUtilities address_get_stream_finish
589move: dbus_address_get_stream_sync DBusUtilities address_get_stream_sync
590move: dbus_generate_guid DBusUtilities generate_guid
591move: dbus_gvalue_to_gvariant DBusUtilities gvalue_to_gvariant
592move: dbus_gvariant_to_gvalue DBusUtilities gvariant_to_gvalue
593move: dbus_is_address DBusUtilities is_address
594move: dbus_is_guid DBusUtilities is_guid
595move: dbus_is_interface_name DBusUtilities is_interface_name
596move: dbus_is_member_name DBusUtilities is_member_name
597move: dbus_is_name DBusUtilities is_name
598move: dbus_is_supported_address DBusUtilities is_supported_address
599move: dbus_is_unique_name DBusUtilities is_unique_name
600
601struct: DBusUtilities
602out: address_get_stream_finish out_guid
603out: address_get_stream_sync out_guid
604
605move: io_error_from_errno ErrorGIO
606move: io_error_quark ErrorGIO
607
608move: io_modules_load_all_in_directory IOModule load_all_in_directory
609move: io_modules_load_all_in_directory_with_scope IOModule load_all_in_directory_with_scope
610move: io_modules_scan_all_in_directory IOModule scan_all_in_directory
611move: io_modules_scan_all_in_directory_with_scope IOModule scan_all_in_directory_with_scope
612
613move: io_scheduler_cancel_all_jobs IOSchedulerJob cancel_all_jobs
614move: io_scheduler_push_job IOSchedulerJob push_job
615
616move: pollable_source_new PollableUtils
617move: pollable_source_new_full PollableUtils
618move: pollable_stream_read PollableUtils
619move: pollable_stream_write PollableUtils
620move: pollable_stream_write_all PollableUtils
621
622move: resources_enumerate_children Resource
623move: resources_get_info Resource
624move: resources_lookup_data Resource
625move: resources_open_stream Resource
626move: resources_register Resource _register
627move: resources_unregister Resource _unregister
628
629move: simple_async_report_error_in_idle SimpleAsyncResult
630move: simple_async_report_gerror_in_idle SimpleAsyncResult
631move: simple_async_report_take_gerror_in_idle SimpleAsyncResult
632
633move: unix_is_mount_path_system_internal UnixMountEntry is_mount_path_system_internal
634move: unix_mount_at UnixMountEntry at
635move: unix_mount_compare UnixMountEntry compare
636move: unix_mount_free UnixMountEntry free
637move: unix_mount_get_device_path UnixMountEntry get_device_path
638move: unix_mount_get_fs_type UnixMountEntry get_fs_type
639move: unix_mount_get_mount_path UnixMountEntry get_mount_path
640move: unix_mount_guess_can_eject UnixMountEntry guess_can_eject
641move: unix_mount_guess_icon UnixMountEntry guess_icon
642move: unix_mount_guess_name UnixMountEntry guess_name
643move: unix_mount_guess_should_display UnixMountEntry guess_should_display
644move: unix_mount_guess_symbolic_icon UnixMountEntry guess_symbolic_icon
645move: unix_mount_is_readonly UnixMountEntry is_readonly
646move: unix_mount_is_system_internal UnixMountEntry is_system_internal
647move: unix_mount_points_changed_since UnixMountEntry points_changed_since
648move: unix_mount_points_get UnixMountEntry mount_points_get
649move: unix_mounts_changed_since UnixMountEntry mounts_changed_since
650move: unix_mounts_get UnixMountEntry mounts_get
Note: See TracBrowser for help on using the repository browser.