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 change21 // find conversion definition on APILookup.txt22 // implement new conversion functionalities on the wrap.utils pakage23 24 25 moduleatk.State;
26 27 privateimportatk.c.functions;
28 publicimportatk.c.types;
29 privateimportglib.Str;
30 privateimportglib.c.functions;
31 32 33 /** */34 publicstructState35 {
36 37 /**
38 * Gets the #AtkStateType corresponding to the description string @name.
39 *
40 * Params:
41 * name = a character string state name
42 *
43 * Returns: an #AtkStateType corresponding to @name
44 */45 publicstaticAtkStateTypetypeForName(stringname)
46 {
47 returnatk_state_type_for_name(Str.toStringz(name));
48 }
49 50 /**
51 * Gets the description string describing the #AtkStateType @type.
52 *
53 * Params:
54 * type = The #AtkStateType whose name is required
55 *
56 * Returns: the string describing the AtkStateType
57 */58 publicstaticstringtypeGetName(AtkStateTypetype)
59 {
60 returnStr.toString(atk_state_type_get_name(type));
61 }
62 63 /**
64 * Register a new object state.
65 *
66 * Params:
67 * name = a character string describing the new state.
68 *
69 * Returns: an #AtkState value for the new state.
70 */71 publicstaticAtkStateTypetypeRegister(stringname)
72 {
73 returnatk_state_type_register(Str.toStringz(name));
74 }
75 }