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 glib.TrashStack; 26 27 private import gtkc.glib; 28 public import gtkc.glibtypes; 29 30 31 /** 32 * Each piece of memory that is pushed onto the stack 33 * is cast to a GTrashStack*. 34 */ 35 public struct TrashStack 36 { 37 38 /** 39 * Returns the height of a #GTrashStack. 40 * 41 * Note that execution of this function is of O(N) complexity 42 * where N denotes the number of items on the stack. 43 * 44 * Params: 45 * stackP = a #GTrashStack 46 * 47 * Return: the height of the stack 48 */ 49 public static uint height(GTrashStack** stackP) 50 { 51 return g_trash_stack_height(stackP); 52 } 53 54 /** 55 * Returns the element at the top of a #GTrashStack 56 * which may be %NULL. 57 * 58 * Params: 59 * stackP = a #GTrashStack 60 * 61 * Return: the element at the top of the stack 62 */ 63 public static void* peek(GTrashStack** stackP) 64 { 65 return g_trash_stack_peek(stackP); 66 } 67 68 /** 69 * Pops a piece of memory off a #GTrashStack. 70 * 71 * Params: 72 * stackP = a #GTrashStack 73 * 74 * Return: the element at the top of the stack 75 */ 76 public static void* pop(GTrashStack** stackP) 77 { 78 return g_trash_stack_pop(stackP); 79 } 80 81 /** 82 * Pushes a piece of memory onto a #GTrashStack. 83 * 84 * Params: 85 * stackP = a #GTrashStack 86 * dataP = the piece of memory to push on the stack 87 */ 88 public static void push(GTrashStack** stackP, void* dataP) 89 { 90 g_trash_stack_push(stackP, dataP); 91 } 92 }