1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gio.StaticResource;
26 
27 private import gio.Resource;
28 private import gobject.ObjectG;
29 private import gtkc.gio;
30 public  import gtkc.giotypes;
31 
32 
33 public class StaticResource
34 {
35 	/** the main Gtk struct */
36 	protected GStaticResource* gStaticResource;
37 
38 	/** Get the main Gtk struct */
39 	public GStaticResource* getStaticResourceStruct()
40 	{
41 		return gStaticResource;
42 	}
43 
44 	/** the main Gtk struct as a void* */
45 	protected void* getStruct()
46 	{
47 		return cast(void*)gStaticResource;
48 	}
49 
50 	/**
51 	 * Sets our main struct and passes it to the parent class.
52 	 */
53 	public this (GStaticResource* gStaticResource)
54 	{
55 		this.gStaticResource = gStaticResource;
56 	}
57 
58 	/**
59 	 */
60 
61 	/**
62 	 * Finalized a GResource initialized by g_static_resource_init().
63 	 *
64 	 * This is normally used by code generated by
65 	 * [glib-compile-resources][glib-compile-resources]
66 	 * and is not typically used by other code.
67 	 *
68 	 * Since: 2.32
69 	 */
70 	public void fini()
71 	{
72 		g_static_resource_fini(gStaticResource);
73 	}
74 
75 	/**
76 	 * Gets the GResource that was registered by a call to g_static_resource_init().
77 	 *
78 	 * This is normally used by code generated by
79 	 * [glib-compile-resources][glib-compile-resources]
80 	 * and is not typically used by other code.
81 	 *
82 	 * Return: a #GResource
83 	 *
84 	 * Since: 2.32
85 	 */
86 	public Resource getResource()
87 	{
88 		auto p = g_static_resource_get_resource(gStaticResource);
89 		
90 		if(p is null)
91 		{
92 			return null;
93 		}
94 		
95 		return ObjectG.getDObject!(Resource)(cast(GResource*) p);
96 	}
97 
98 	/**
99 	 * Initializes a GResource from static data using a
100 	 * GStaticResource.
101 	 *
102 	 * This is normally used by code generated by
103 	 * [glib-compile-resources][glib-compile-resources]
104 	 * and is not typically used by other code.
105 	 *
106 	 * Since: 2.32
107 	 */
108 	public void init()
109 	{
110 		g_static_resource_init(gStaticResource);
111 	}
112 }