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 * Conversion parameters: 26 * inFile = AtkValue.html 27 * outPack = atk 28 * outFile = ValueAtk 29 * strct = AtkValue 30 * realStrct= 31 * ctorStrct= 32 * clss = ValueAtk 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - atk_value_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - gobject.Value 47 * structWrap: 48 * - GValue* -> Value 49 * module aliases: 50 * local aliases: 51 * overrides: 52 */ 53 54 module atk.ValueAtk; 55 56 public import gtkc.atktypes; 57 58 private import gtkc.atk; 59 private import glib.ConstructionException; 60 private import gobject.ObjectG; 61 62 63 private import gobject.Value; 64 65 66 67 68 /** 69 * AtkValue should be implemented for components which either display 70 * a value from a bounded range, or which allow the user to specify a 71 * value from a bounded range, or both. For instance, most sliders 72 * and range controls, as well as dials, should have AtkObject 73 * representations which implement AtkValue on the component's 74 * behalf. AtKValues may be read-only, in which case attempts to 75 * alter the value return FALSE to indicate failure. 76 */ 77 public class ValueAtk 78 { 79 80 /** the main Gtk struct */ 81 protected AtkValue* atkValue; 82 83 84 public AtkValue* getValueAtkStruct() 85 { 86 return atkValue; 87 } 88 89 90 /** the main Gtk struct as a void* */ 91 protected void* getStruct() 92 { 93 return cast(void*)atkValue; 94 } 95 96 /** 97 * Sets our main struct and passes it to the parent class 98 */ 99 public this (AtkValue* atkValue) 100 { 101 this.atkValue = atkValue; 102 } 103 104 /** 105 */ 106 107 /** 108 * Gets the value of this object. 109 * Params: 110 * value = a GValue representing the current accessible value 111 */ 112 public void getCurrentValue(Value value) 113 { 114 // void atk_value_get_current_value (AtkValue *obj, GValue *value); 115 atk_value_get_current_value(atkValue, (value is null) ? null : value.getValueStruct()); 116 } 117 118 /** 119 * Gets the maximum value of this object. 120 * Params: 121 * value = a GValue representing the maximum accessible value 122 */ 123 public void getMaximumValue(Value value) 124 { 125 // void atk_value_get_maximum_value (AtkValue *obj, GValue *value); 126 atk_value_get_maximum_value(atkValue, (value is null) ? null : value.getValueStruct()); 127 } 128 129 /** 130 * Gets the minimum value of this object. 131 * Params: 132 * value = a GValue representing the minimum accessible value 133 */ 134 public void getMinimumValue(Value value) 135 { 136 // void atk_value_get_minimum_value (AtkValue *obj, GValue *value); 137 atk_value_get_minimum_value(atkValue, (value is null) ? null : value.getValueStruct()); 138 } 139 140 /** 141 * Sets the value of this object. 142 * Params: 143 * value = a GValue which is the desired new accessible value. 144 * Returns: TRUE if new value is successfully set, FALSE otherwise. 145 */ 146 public int setCurrentValue(Value value) 147 { 148 // gboolean atk_value_set_current_value (AtkValue *obj, const GValue *value); 149 return atk_value_set_current_value(atkValue, (value is null) ? null : value.getValueStruct()); 150 } 151 152 /** 153 * Gets the minimum increment by which the value of this object may be changed. If zero, 154 * the minimum increment is undefined, which may mean that it is limited only by the 155 * floating point precision of the platform. 156 * Since 1.12 157 * Params: 158 * value = a GValue representing the minimum increment by which the accessible value may be changed 159 */ 160 public void getMinimumIncrement(Value value) 161 { 162 // void atk_value_get_minimum_increment (AtkValue *obj, GValue *value); 163 atk_value_get_minimum_increment(atkValue, (value is null) ? null : value.getValueStruct()); 164 } 165 }