source: appstream-generator/build/girepo/gobject/Boxed.d @ 4841

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

Initial release

File size: 2.5 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 gobject.Boxed;
22
23private import gi.gobject;
24public  import gi.gobjecttypes;
25private import glib.Str;
26
27
28/** */
29public struct Boxed
30{
31
32        /**
33         * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type.
34         *
35         * Params:
36         *     boxedType = The type of @src_boxed.
37         *     srcBoxed = The boxed structure to be copied.
38         *
39         * Returns: The newly created copy of the boxed structure.
40         */
41        public static void* copy(GType boxedType, void* srcBoxed)
42        {
43                return g_boxed_copy(boxedType, srcBoxed);
44        }
45
46        /**
47         * Free the boxed structure @boxed which is of type @boxed_type.
48         *
49         * Params:
50         *     boxedType = The type of @boxed.
51         *     boxed = The boxed structure to be freed.
52         */
53        public static void free(GType boxedType, void* boxed)
54        {
55                g_boxed_free(boxedType, boxed);
56        }
57
58        /**
59         * This function creates a new %G_TYPE_BOXED derived type id for a new
60         * boxed type with name @name. Boxed type handling functions have to be
61         * provided to copy and free opaque boxed structures of this type.
62         *
63         * Params:
64         *     name = Name of the new boxed type.
65         *     boxedCopy = Boxed structure copy function.
66         *     boxedFree = Boxed structure free function.
67         *
68         * Returns: New %G_TYPE_BOXED derived type id for @name.
69         */
70        public static GType typeRegisterStatic(string name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree)
71        {
72                return g_boxed_type_register_static(Str.toStringz(name), boxedCopy, boxedFree);
73        }
74
75        /**
76         * Creates a new %G_TYPE_POINTER derived type id for a new
77         * pointer type with name @name.
78         *
79         * Params:
80         *     name = the name of the new pointer type.
81         *
82         * Returns: a new %G_TYPE_POINTER derived type id for @name.
83         */
84        public static GType pointerTypeRegisterStatic(string name)
85        {
86                return g_pointer_type_register_static(Str.toStringz(name));
87        }
88}
Note: See TracBrowser for help on using the repository browser.