2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = glib-Trash-Stacks.html
27 * outFile = TrashStack
48 module glib
.TrashStack
;
50 private import glib
.glibtypes
;
52 private import lib
.glib
;
57 * A GTrashStack is an efficient way to keep a stack of unused allocated
58 * memory chunks. Each memory chunk is required to be large enough to hold
59 * a gpointer. This allows the stack to be maintained without any space
60 * overhead, since the stack pointers can be stored inside the memory chunks.
61 * There is no function to create a GTrashStack. A NULL GTrashStack*
62 * is a perfectly valid empty stack.
64 public class TrashStack
67 /** the main Gtk struct */
68 protected GTrashStack
* gTrashStack
;
71 public GTrashStack
* getTrashStackStruct()
77 /** the main Gtk struct as a void* */
78 protected void* getStruct()
80 return cast(void*)gTrashStack
;
84 * Sets our main struct and passes it to the parent class
86 public this (GTrashStack
* gTrashStack
)
88 this.gTrashStack
= gTrashStack
;
96 * Pushes a piece of memory onto a GTrashStack.
98 * a pointer to a GTrashStack.
100 * the piece of memory to push on the stack.
102 public static void push(GTrashStack
** stackP
, void* dataP
)
104 // void g_trash_stack_push (GTrashStack **stack_p, gpointer data_p);
105 g_trash_stack_push(stackP
, dataP
);
109 * Pops a piece of memory off a GTrashStack.
111 * a pointer to a GTrashStack.
113 * the element at the top of the stack.
115 public static void* pop(GTrashStack
** stackP
)
117 // gpointer g_trash_stack_pop (GTrashStack **stack_p);
118 return g_trash_stack_pop(stackP
);
122 * Returns the element at the top of a GTrashStack which may be NULL.
124 * a pointer to a GTrashStack.
126 * the element at the top of the stack.
128 public static void* peek(GTrashStack
** stackP
)
130 // gpointer g_trash_stack_peek (GTrashStack **stack_p);
131 return g_trash_stack_peek(stackP
);
135 * Returns the height of a GTrashStack.
136 * Note that execution of this function is of O(N) complexity
137 * where N denotes the number of items on the stack.
139 * a pointer to a GTrashStack.
141 * the height of the stack.
143 public static uint height(GTrashStack
** stackP
)
145 // guint g_trash_stack_height (GTrashStack **stack_p);
146 return g_trash_stack_height(stackP
);