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 private import gobject.Value;
63 
64 
65 
66 /**
67  * AtkValue should be implemented for components which either display
68  * a value from a bounded range, or which allow the user to specify a
69  * value from a bounded range, or both. For instance, most sliders
70  * and range controls, as well as dials, should have AtkObject
71  * representations which implement AtkValue on the component's
72  * behalf. AtKValues may be read-only, in which case attempts to
73  * alter the value return FALSE to indicate failure.
74  */
75 public class ValueAtk
76 {
77 	
78 	/** the main Gtk struct */
79 	protected AtkValue* atkValue;
80 	
81 	
82 	/** Get the main Gtk struct */
83 	public AtkValue* getValueAtkStruct()
84 	{
85 		return atkValue;
86 	}
87 	
88 	
89 	/** the main Gtk struct as a void* */
90 	protected void* getStruct()
91 	{
92 		return cast(void*)atkValue;
93 	}
94 	
95 	/**
96 	 * Sets our main struct and passes it to the parent class
97 	 */
98 	public this (AtkValue* atkValue)
99 	{
100 		this.atkValue = atkValue;
101 	}
102 	
103 	/**
104 	 */
105 	
106 	/**
107 	 * Gets the value of this object.
108 	 * Params:
109 	 * value = a GValue representing the current accessible value
110 	 */
111 	public void getCurrentValue(Value value)
112 	{
113 		// void atk_value_get_current_value (AtkValue *obj,  GValue *value);
114 		atk_value_get_current_value(atkValue, (value is null) ? null : value.getValueStruct());
115 	}
116 	
117 	/**
118 	 * Gets the maximum value of this object.
119 	 * Params:
120 	 * value = a GValue representing the maximum accessible value
121 	 */
122 	public void getMaximumValue(Value value)
123 	{
124 		// void atk_value_get_maximum_value (AtkValue *obj,  GValue *value);
125 		atk_value_get_maximum_value(atkValue, (value is null) ? null : value.getValueStruct());
126 	}
127 	
128 	/**
129 	 * Gets the minimum value of this object.
130 	 * Params:
131 	 * value = a GValue representing the minimum accessible value
132 	 */
133 	public void getMinimumValue(Value value)
134 	{
135 		// void atk_value_get_minimum_value (AtkValue *obj,  GValue *value);
136 		atk_value_get_minimum_value(atkValue, (value is null) ? null : value.getValueStruct());
137 	}
138 	
139 	/**
140 	 * Sets the value of this object.
141 	 * Params:
142 	 * value = a GValue which is the desired new accessible value.
143 	 * Returns: TRUE if new value is successfully set, FALSE otherwise.
144 	 */
145 	public int setCurrentValue(Value value)
146 	{
147 		// gboolean atk_value_set_current_value (AtkValue *obj,  const GValue *value);
148 		return atk_value_set_current_value(atkValue, (value is null) ? null : value.getValueStruct());
149 	}
150 	
151 	/**
152 	 * Gets the minimum increment by which the value of this object may be changed. If zero,
153 	 * the minimum increment is undefined, which may mean that it is limited only by the
154 	 * floating point precision of the platform.
155 	 * Since 1.12
156 	 * Params:
157 	 * value = a GValue representing the minimum increment by which the accessible value may be changed
158 	 */
159 	public void getMinimumIncrement(Value value)
160 	{
161 		// void atk_value_get_minimum_increment (AtkValue *obj,  GValue *value);
162 		atk_value_get_minimum_increment(atkValue, (value is null) ? null : value.getValueStruct());
163 	}
164 }