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