1 /* 2 * This file is part of d-handy. 3 * 4 * d-handy 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 * d-handy 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 d-handy; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 module handy.HeaderGroupChild; 20 21 private import gobject.ObjectG; 22 private import gtk.HeaderBar : GtkdHeaderBar = HeaderBar; 23 private import handy.HeaderBar : HdydHeaderBar = HeaderBar; 24 private import handy.HeaderGroup; 25 private import handy.c.functions; 26 public import handy.c.types; 27 28 29 /** */ 30 public class HeaderGroupChild : ObjectG 31 { 32 /** the main Gtk struct */ 33 protected HdyHeaderGroupChild* hdyHeaderGroupChild; 34 35 /** Get the main Gtk struct */ 36 public HdyHeaderGroupChild* getHeaderGroupChildStruct(bool transferOwnership = false) 37 { 38 if (transferOwnership) 39 ownedRef = false; 40 return hdyHeaderGroupChild; 41 } 42 43 /** the main Gtk struct as a void* */ 44 protected override void* getStruct() 45 { 46 return cast(void*)hdyHeaderGroupChild; 47 } 48 49 /** 50 * Sets our main struct and passes it to the parent class. 51 */ 52 public this (HdyHeaderGroupChild* hdyHeaderGroupChild, bool ownedRef = false) 53 { 54 this.hdyHeaderGroupChild = hdyHeaderGroupChild; 55 super(cast(GObject*)hdyHeaderGroupChild, ownedRef); 56 } 57 58 /** 59 * Gets the child #GtkHeaderBar. 60 * Use hdy_header_group_child_get_child_type() to check the child type. 61 * 62 * Returns: the child #GtkHeaderBar, or %NULL in case of error. 63 * 64 * Since: 1.0 65 */ 66 public GtkdHeaderBar getGtkHeaderBar() 67 { 68 auto __p = hdy_header_group_child_get_gtk_header_bar(hdyHeaderGroupChild); 69 70 if(__p is null) 71 { 72 return null; 73 } 74 75 return ObjectG.getDObject!(GtkdHeaderBar)(cast(GtkHeaderBar*) __p); 76 } 77 78 /** 79 * Gets the child #HdyHeaderBar. 80 * Use hdy_header_group_child_get_child_type() to check the child type. 81 * 82 * Returns: the child #HdyHeaderBar, or %NULL in case of error. 83 * 84 * Since: 1.0 85 */ 86 public HdydHeaderBar getHeaderBar() 87 { 88 auto __p = hdy_header_group_child_get_header_bar(hdyHeaderGroupChild); 89 90 if(__p is null) 91 { 92 return null; 93 } 94 95 return ObjectG.getDObject!(HdydHeaderBar)(cast(HdyHeaderBar*) __p); 96 } 97 98 /** 99 */ 100 101 /** */ 102 public static GType getType() 103 { 104 return hdy_header_group_child_get_type(); 105 } 106 107 /** 108 * Gets the child type. 109 * 110 * Returns: the child type. 111 * 112 * Since: 1.0 113 */ 114 public HdyHeaderGroupChildType getChildType() 115 { 116 return hdy_header_group_child_get_child_type(hdyHeaderGroupChild); 117 } 118 119 /** 120 * Gets the child #HdyHeaderGroup. 121 * Use hdy_header_group_child_get_child_type() to check the child type. 122 * 123 * Returns: the child #HdyHeaderGroup, or %NULL in case of error. 124 * 125 * Since: 1.0 126 */ 127 public HeaderGroup getHeaderGroup() 128 { 129 auto __p = hdy_header_group_child_get_header_group(hdyHeaderGroupChild); 130 131 if(__p is null) 132 { 133 return null; 134 } 135 136 return ObjectG.getDObject!(HeaderGroup)(cast(HdyHeaderGroup*) __p); 137 } 138 }