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 gtk.RcProperty;
26 
27 private import glib.StringG;
28 private import gobject.ParamSpec;
29 private import gobject.Value;
30 private import gtkc.gtk;
31 public  import gtkc.gtktypes;
32 
33 
34 /**
35  * Deprecated
36  */
37 public struct RcProperty
38 {
39 
40 	/**
41 	 * A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
42 	 * or gtk_widget_class_install_style_property_parser() which parses
43 	 * borders in the form
44 	 * `"{ left, right, top, bottom }"` for integers
45 	 * left, right, top and bottom.
46 	 *
47 	 * Params:
48 	 *     pspec = a #GParamSpec
49 	 *     gstring = the #GString to be parsed
50 	 *     propertyValue = a #GValue which must hold boxed values.
51 	 *
52 	 * Return: %TRUE if @gstring could be parsed and @property_value
53 	 *     has been set to the resulting #GtkBorder.
54 	 */
55 	public static bool parseBorder(ParamSpec pspec, StringG gstring, Value propertyValue)
56 	{
57 		return gtk_rc_property_parse_border((pspec is null) ? null : pspec.getParamSpecStruct(), (gstring is null) ? null : gstring.getStringGStruct(), (propertyValue is null) ? null : propertyValue.getValueStruct()) != 0;
58 	}
59 
60 	/**
61 	 * A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
62 	 * or gtk_widget_class_install_style_property_parser() which parses a
63 	 * color given either by its name or in the form
64 	 * `{ red, green, blue }` where red, green and
65 	 * blue are integers between 0 and 65535 or floating-point numbers
66 	 * between 0 and 1.
67 	 *
68 	 * Params:
69 	 *     pspec = a #GParamSpec
70 	 *     gstring = the #GString to be parsed
71 	 *     propertyValue = a #GValue which must hold #GdkColor values.
72 	 *
73 	 * Return: %TRUE if @gstring could be parsed and @property_value
74 	 *     has been set to the resulting #GdkColor.
75 	 */
76 	public static bool parseColor(ParamSpec pspec, StringG gstring, Value propertyValue)
77 	{
78 		return gtk_rc_property_parse_color((pspec is null) ? null : pspec.getParamSpecStruct(), (gstring is null) ? null : gstring.getStringGStruct(), (propertyValue is null) ? null : propertyValue.getValueStruct()) != 0;
79 	}
80 
81 	/**
82 	 * A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
83 	 * or gtk_widget_class_install_style_property_parser() which parses a single
84 	 * enumeration value.
85 	 *
86 	 * The enumeration value can be specified by its name, its nickname or
87 	 * its numeric value. For consistency with flags parsing, the value
88 	 * may be surrounded by parentheses.
89 	 *
90 	 * Params:
91 	 *     pspec = a #GParamSpec
92 	 *     gstring = the #GString to be parsed
93 	 *     propertyValue = a #GValue which must hold enum values.
94 	 *
95 	 * Return: %TRUE if @gstring could be parsed and @property_value
96 	 *     has been set to the resulting #GEnumValue.
97 	 */
98 	public static bool parseEnum(ParamSpec pspec, StringG gstring, Value propertyValue)
99 	{
100 		return gtk_rc_property_parse_enum((pspec is null) ? null : pspec.getParamSpecStruct(), (gstring is null) ? null : gstring.getStringGStruct(), (propertyValue is null) ? null : propertyValue.getValueStruct()) != 0;
101 	}
102 
103 	/**
104 	 * A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
105 	 * or gtk_widget_class_install_style_property_parser() which parses flags.
106 	 *
107 	 * Flags can be specified by their name, their nickname or
108 	 * numerically. Multiple flags can be specified in the form
109 	 * `"( flag1 | flag2 | ... )"`.
110 	 *
111 	 * Params:
112 	 *     pspec = a #GParamSpec
113 	 *     gstring = the #GString to be parsed
114 	 *     propertyValue = a #GValue which must hold flags values.
115 	 *
116 	 * Return: %TRUE if @gstring could be parsed and @property_value
117 	 *     has been set to the resulting flags value.
118 	 */
119 	public static bool parseFlags(ParamSpec pspec, StringG gstring, Value propertyValue)
120 	{
121 		return gtk_rc_property_parse_flags((pspec is null) ? null : pspec.getParamSpecStruct(), (gstring is null) ? null : gstring.getStringGStruct(), (propertyValue is null) ? null : propertyValue.getValueStruct()) != 0;
122 	}
123 
124 	/**
125 	 * A #GtkRcPropertyParser for use with gtk_settings_install_property_parser()
126 	 * or gtk_widget_class_install_style_property_parser() which parses a
127 	 * requisition in the form
128 	 * `"{ width, height }"` for integers %width and %height.
129 	 *
130 	 * Params:
131 	 *     pspec = a #GParamSpec
132 	 *     gstring = the #GString to be parsed
133 	 *     propertyValue = a #GValue which must hold boxed values.
134 	 *
135 	 * Return: %TRUE if @gstring could be parsed and @property_value
136 	 *     has been set to the resulting #GtkRequisition.
137 	 */
138 	public static bool parseRequisition(ParamSpec pspec, StringG gstring, Value propertyValue)
139 	{
140 		return gtk_rc_property_parse_requisition((pspec is null) ? null : pspec.getParamSpecStruct(), (gstring is null) ? null : gstring.getStringGStruct(), (propertyValue is null) ? null : propertyValue.getValueStruct()) != 0;
141 	}
142 }