source: appstream-generator/build/girepo/gio/IOExtension.d @ 4841

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

Initial release

File size: 2.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// generated automatically - do not change
19
20
21module gio.IOExtension;
22
23private import gi.gio;
24public  import gi.giotypes;
25private import glib.Str;
26private import gobject.ObjectG;
27private import gobject.TypeClass;
28
29
30/**
31 * #GIOExtension is an opaque data structure and can only be accessed
32 * using the following functions.
33 */
34public class IOExtension
35{
36        /** the main Gtk struct */
37        protected GIOExtension* gIOExtension;
38        protected bool ownedRef;
39
40        /** Get the main Gtk struct */
41        public GIOExtension* getIOExtensionStruct()
42        {
43                return gIOExtension;
44        }
45
46        /** the main Gtk struct as a void* */
47        protected void* getStruct()
48        {
49                return cast(void*)gIOExtension;
50        }
51
52        /**
53         * Sets our main struct and passes it to the parent class.
54         */
55        public this (GIOExtension* gIOExtension, bool ownedRef = false)
56        {
57                this.gIOExtension = gIOExtension;
58                this.ownedRef = ownedRef;
59        }
60
61
62        /**
63         * Gets the name under which @extension was registered.
64         *
65         * Note that the same type may be registered as extension
66         * for multiple extension points, under different names.
67         *
68         * Returns: the name of @extension.
69         */
70        public string getName()
71        {
72                return Str.toString(g_io_extension_get_name(gIOExtension));
73        }
74
75        /**
76         * Gets the priority with which @extension was registered.
77         *
78         * Returns: the priority of @extension
79         */
80        public int getPriority()
81        {
82                return g_io_extension_get_priority(gIOExtension);
83        }
84
85        /**
86         * Gets the type associated with @extension.
87         *
88         * Returns: the type of @extension
89         */
90        public GType getType()
91        {
92                return g_io_extension_get_type(gIOExtension);
93        }
94
95        /**
96         * Gets a reference to the class for the type that is
97         * associated with @extension.
98         *
99         * Returns: the #GTypeClass for the type of @extension
100         */
101        public TypeClass refClass()
102        {
103                auto p = g_io_extension_ref_class(gIOExtension);
104               
105                if(p is null)
106                {
107                        return null;
108                }
109               
110                return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p, true);
111        }
112}
Note: See TracBrowser for help on using the repository browser.