| 1 | /* |
| 2 | * Copyright (c) 2013 - 2014 Red Hat, Inc. |
| 3 | * |
| 4 | * This program 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 of the License, or (at your |
| 7 | * option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but |
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 11 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
| 12 | * License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public License |
| 15 | * along with this program; if not, write to the Free Software Foundation, |
| 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 21 | |
| 22 | #include "gtkactionbar.h"cxx . . $ `<file>/gtk/gtkactionbar.h`/ |
| 23 | #include "gtkbuildable.h"cxx . . $ `<file>/gtk/gtkbuildable.h`/ |
| 24 | #include "gtktypebuiltins.h"cxx . . $ `<file>/build/gtk/gtktypebuiltins.h`/ |
| 25 | #include "gtkbox.h"cxx . . $ `<file>/gtk/gtkbox.h`/ |
| 26 | #include "gtkrevealer.h"cxx . . $ `<file>/gtk/gtkrevealer.h`/ |
| 27 | #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/ |
| 28 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 29 | #include "gtkcenterbox.h"cxx . . $ `<file>/gtk/gtkcenterbox.h`/ |
| 30 | #include "gtkbinlayout.h"cxx . . $ `<file>/gtk/gtkbinlayout.h`/ |
| 31 | |
| 32 | #include <string.h> |
| 33 | |
| 34 | /** |
| 35 | * GtkActionBar: |
| 36 | * |
| 37 | * Presents contextual actions. |
| 38 | * |
| 39 | * <picture> |
| 40 | * <source srcset="action-bar-dark.png" media="(prefers-color-scheme: dark)"> |
| 41 | * <img alt="An example GtkActionBar" src="action-bar.png"> |
| 42 | * </picture> |
| 43 | * |
| 44 | * `GtkActionBar` is expected to be displayed below the content and expand |
| 45 | * horizontally to fill the area. |
| 46 | * |
| 47 | * It allows placing children at the start or the end. In addition, it |
| 48 | * contains an internal centered box which is centered with respect to |
| 49 | * the full width of the box, even if the children at either side take |
| 50 | * up different amounts of space. |
| 51 | * |
| 52 | * # GtkActionBar as GtkBuildable |
| 53 | * |
| 54 | * The `GtkActionBar` implementation of the `GtkBuildable` interface supports |
| 55 | * adding children at the start or end sides by specifying “start” or “end” as |
| 56 | * the “type” attribute of a `<child>` element, or setting the center widget |
| 57 | * by specifying “center” value. |
| 58 | * |
| 59 | * # CSS nodes |
| 60 | * |
| 61 | * ``` |
| 62 | * actionbar |
| 63 | * ╰── revealer |
| 64 | * ╰── box |
| 65 | * ├── box.start |
| 66 | * │ ╰── [start children] |
| 67 | * ├── [center widget] |
| 68 | * ╰── box.end |
| 69 | * ╰── [end children] |
| 70 | * ``` |
| 71 | * |
| 72 | * A `GtkActionBar`'s CSS node is called `actionbar`. It contains a `revealer` |
| 73 | * subnode, which contains a `box` subnode, which contains two `box` subnodes at |
| 74 | * the start and end of the action bar, with `start` and `end` style classes |
| 75 | * respectively, as well as a center node that represents the center child. |
| 76 | * |
| 77 | * Each of the boxes contains children packed for that side. |
| 78 | */ |
| 79 | |
| 80 | typedef struct _GtkActionBarClasscxx . . $ _GtkActionBarClass# GtkActionBarClasscxx . . $ GtkActionBarClass#; |
| 81 | |
| 82 | struct _GtkActionBarcxx . . $ _GtkActionBar# |
| 83 | { |
| 84 | GtkWidgetcxx . . $ GtkWidget# parentcxx . . $ _GtkActionBar#parent.; |
| 85 | |
| 86 | GtkWidgetcxx . . $ GtkWidget# *center_boxcxx . . $ _GtkActionBar#center_box.; |
| 87 | GtkWidgetcxx . . $ GtkWidget# *start_boxcxx . . $ _GtkActionBar#start_box.; |
| 88 | GtkWidgetcxx . . $ GtkWidget# *end_boxcxx . . $ _GtkActionBar#end_box.; |
| 89 | GtkWidgetcxx . . $ GtkWidget# *revealercxx . . $ _GtkActionBar#revealer.; |
| 90 | }; |
| 91 | |
| 92 | struct _GtkActionBarClasscxx . . $ _GtkActionBarClass# |
| 93 | { |
| 94 | GtkWidgetClasscxx . . $ GtkWidgetClass# parent_classcxx . . $ _GtkActionBarClass#parent_class.; |
| 95 | }; |
| 96 | |
| 97 | enumcxx . . $ $anonymous_type_a82925c6c844770f_0# { |
| 98 | PROP_0cxx . . $ PROP_0., |
| 99 | PROP_REVEALEDcxx . . $ PROP_REVEALED., |
| 100 | LAST_PROPcxx . . $ LAST_PROP. |
| 101 | }; |
| 102 | static GParamSpeccxx . . $ GParamSpec# *propscxx . . $ props.[LAST_PROPcxx . . $ LAST_PROP.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, }; |
| 103 | |
| 104 | static void gtk_action_bar_buildable_interface_initcxx . . $ gtk_action_bar_buildable_interface_init(c5db55232772c4cd). (GtkBuildableIfacecxx . . $ GtkBuildableIface# *iface); |
| 105 | |
| 106 | G_DEFINE_TYPE_WITH_CODEcxx . . $ `<external>/9567554376676449156/gtype.h:1850:9`! (GtkActionBar, gtk_action_bar, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!, |
| 107 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_BUILDABLEcxx . . $ `gtk/gtkbuildable.h:29:9`!, |
| 108 | gtk_action_bar_buildable_interface_init)) |
| 109 | |
| 110 | static void |
| 111 | gtk_action_bar_set_propertycxx . . $ gtk_action_bar_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 112 | guintcxx . . $ guint# prop_id, |
| 113 | const GValuecxx . . $ GValue# *value, |
| 114 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 115 | { |
| 116 | GtkActionBarcxx . . $ GtkActionBar# *self = GTK_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:31:9`! (object); |
| 117 | |
| 118 | switch (prop_id) |
| 119 | { |
| 120 | case PROP_REVEALEDcxx . . $ PROP_REVEALED.: |
| 121 | gtk_action_bar_set_revealedcxx . . $ gtk_action_bar_set_revealed(92c80bb457c90983). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 122 | break; |
| 123 | default: |
| 124 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 125 | break; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | static void |
| 130 | gtk_action_bar_get_propertycxx . . $ gtk_action_bar_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 131 | guintcxx . . $ guint# prop_id, |
| 132 | GValuecxx . . $ GValue# *value, |
| 133 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 134 | { |
| 135 | GtkActionBarcxx . . $ GtkActionBar# *self = GTK_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:31:9`! (object); |
| 136 | |
| 137 | switch (prop_id) |
| 138 | { |
| 139 | case PROP_REVEALEDcxx . . $ PROP_REVEALED.: |
| 140 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, gtk_action_bar_get_revealedcxx . . $ gtk_action_bar_get_revealed(75ba0cc61e8fb76a). (self)); |
| 141 | break; |
| 142 | default: |
| 143 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 144 | break; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | static void |
| 149 | gtk_action_bar_disposecxx . . $ gtk_action_bar_dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 150 | { |
| 151 | GtkActionBarcxx . . $ GtkActionBar# *self = GTK_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:31:9`! (object); |
| 152 | |
| 153 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->revealer, gtk_widget_unparent); |
| 154 | |
| 155 | self->center_boxcxx . . $ _GtkActionBar#center_box. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 156 | self->start_boxcxx . . $ _GtkActionBar#start_box. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 157 | self->end_boxcxx . . $ _GtkActionBar#end_box. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 158 | |
| 159 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_action_bar_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object); |
| 160 | } |
| 161 | |
| 162 | static void |
| 163 | gtk_action_bar_class_initcxx . . $ gtk_action_bar_class_init(379ea43b67fb4379). (GtkActionBarClasscxx . . $ GtkActionBarClass# *klass) |
| 164 | { |
| 165 | GObjectClasscxx . . $ GObjectClass# *object_class; |
| 166 | GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class; |
| 167 | |
| 168 | object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass); |
| 169 | widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (klass); |
| 170 | |
| 171 | object_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_action_bar_set_propertycxx . . $ gtk_action_bar_set_property(d7c4bb29f36c0dc4).; |
| 172 | object_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_action_bar_get_propertycxx . . $ gtk_action_bar_get_property(cee2c52f22407c66).; |
| 173 | object_class->disposecxx . . $ _GObjectClass#dispose. = gtk_action_bar_disposecxx . . $ gtk_action_bar_dispose(6087475fa43034d3).; |
| 174 | |
| 175 | widget_class->focuscxx . . $ _GtkWidgetClass#focus. = gtk_widget_focus_childcxx . . $ gtk_widget_focus_child(8bb1c65c821a69cd).; |
| 176 | |
| 177 | /** |
| 178 | * GtkActionBar:revealed: |
| 179 | * |
| 180 | * Controls whether the action bar shows its contents. |
| 181 | */ |
| 182 | propscxx . . $ props.[PROP_REVEALEDcxx . . $ PROP_REVEALED.] = |
| 183 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("revealed", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 184 | TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, |
| 185 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 186 | |
| 187 | g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (object_class, LAST_PROPcxx . . $ LAST_PROP., propscxx . . $ props.); |
| 188 | |
| 189 | gtk_widget_class_set_layout_manager_typecxx . . $ gtk_widget_class_set_layout_manager_type(2a839cbf4b1b4191). (widget_class, GTK_TYPE_BIN_LAYOUTcxx . . $ `gtk/gtkbinlayout.h:23:9`!); |
| 190 | gtk_widget_class_set_css_namecxx . . $ gtk_widget_class_set_css_name(6333614c746ab65a). (widget_class, I_cxx . . $ `gdk/gdkprivate.h:35:9`!("actionbar")); |
| 191 | } |
| 192 | |
| 193 | static void |
| 194 | gtk_action_bar_initcxx . . $ gtk_action_bar_init(d91a12546d6d5c12). (GtkActionBarcxx . . $ GtkActionBar# *self) |
| 195 | { |
| 196 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 197 | |
| 198 | self->revealercxx . . $ _GtkActionBar#revealer. = gtk_revealer_newcxx . . $ gtk_revealer_new(2369ce5e9f2c7dfd). (); |
| 199 | gtk_widget_set_parentcxx . . $ gtk_widget_set_parent(4f261c0971c30e7). (self->revealercxx . . $ _GtkActionBar#revealer., widget); |
| 200 | |
| 201 | gtk_revealer_set_reveal_childcxx . . $ gtk_revealer_set_reveal_child(ff879eb0a1838655). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (self->revealer), TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 202 | gtk_revealer_set_transition_typecxx . . $ gtk_revealer_set_transition_type(babb1dcdca40b697). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (self->revealer), GTK_REVEALER_TRANSITION_TYPE_SLIDE_UPcxx . . $ GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP.); |
| 203 | |
| 204 | self->start_boxcxx . . $ _GtkActionBar#start_box. = gtk_box_newcxx . . $ gtk_box_new(b19e0ce02196028e). (GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL., 0); |
| 205 | self->end_boxcxx . . $ _GtkActionBar#end_box. = gtk_box_newcxx . . $ gtk_box_new(b19e0ce02196028e). (GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL., 0); |
| 206 | |
| 207 | gtk_widget_add_css_classcxx . . $ gtk_widget_add_css_class(3e0616a87a6c51e5). (self->start_boxcxx . . $ _GtkActionBar#start_box., "start"); |
| 208 | gtk_widget_add_css_classcxx . . $ gtk_widget_add_css_class(3e0616a87a6c51e5). (self->end_boxcxx . . $ _GtkActionBar#end_box., "end"); |
| 209 | |
| 210 | self->center_boxcxx . . $ _GtkActionBar#center_box. = gtk_center_box_newcxx . . $ gtk_center_box_new(2369ce5e9f2c7dfd). (); |
| 211 | gtk_center_box_set_start_widgetcxx . . $ gtk_center_box_set_start_widget(dc414dac38d2eb87). (GTK_CENTER_BOXcxx . . $ `gtk/gtkcenterbox.h:33:9`! (self->center_box), self->start_boxcxx . . $ _GtkActionBar#start_box.); |
| 212 | gtk_center_box_set_end_widgetcxx . . $ gtk_center_box_set_end_widget(dc414dac38d2eb87). (GTK_CENTER_BOXcxx . . $ `gtk/gtkcenterbox.h:33:9`! (self->center_box), self->end_boxcxx . . $ _GtkActionBar#end_box.); |
| 213 | |
| 214 | gtk_revealer_set_childcxx . . $ gtk_revealer_set_child(5b595e03e9edbc1e). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (self->revealer), self->center_boxcxx . . $ _GtkActionBar#center_box.); |
| 215 | } |
| 216 | |
| 217 | static GtkBuildableIfacecxx . . $ GtkBuildableIface# *parent_buildable_ifacecxx . . $ parent_buildable_iface.; |
| 218 | |
| 219 | static void |
| 220 | gtk_action_bar_buildable_add_childcxx . . $ gtk_action_bar_buildable_add_child(784606fbae7a2cc). (GtkBuildablecxx . . $ GtkBuildable# *buildable, |
| 221 | GtkBuildercxx . . $ GtkBuilder# *builder, |
| 222 | GObjectcxx . . $ GObject# *child, |
| 223 | const char *type) |
| 224 | { |
| 225 | GtkActionBarcxx . . $ GtkActionBar# *self = GTK_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:31:9`! (buildable); |
| 226 | |
| 227 | if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (type, "start") == 0) |
| 228 | gtk_action_bar_pack_startcxx . . $ gtk_action_bar_pack_start(5eac137bb01d55bd). (self, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (child)); |
| 229 | else if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (type, "center") == 0) |
| 230 | gtk_action_bar_set_center_widgetcxx . . $ gtk_action_bar_set_center_widget(5eac137bb01d55bd). (self, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (child)); |
| 231 | else if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (type, "end") == 0) |
| 232 | gtk_action_bar_pack_endcxx . . $ gtk_action_bar_pack_end(5eac137bb01d55bd). (self, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (child)); |
| 233 | else if (type == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && GTK_IS_WIDGETcxx . . $ `gtk/gtkwidget.h:46:9`! (child)) |
| 234 | gtk_action_bar_pack_startcxx . . $ gtk_action_bar_pack_start(5eac137bb01d55bd). (self, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (child)); |
| 235 | else |
| 236 | parent_buildable_ifacecxx . . $ parent_buildable_iface.->add_childcxx . . $ _GtkBuildableIface#add_child. (buildable, builder, child, type); |
| 237 | } |
| 238 | |
| 239 | static void |
| 240 | gtk_action_bar_buildable_interface_initcxx . . $ gtk_action_bar_buildable_interface_init(c5db55232772c4cd). (GtkBuildableIfacecxx . . $ GtkBuildableIface# *iface) |
| 241 | { |
| 242 | parent_buildable_ifacecxx . . $ parent_buildable_iface. = g_type_interface_peek_parentcxx . . $ g_type_interface_peek_parent(9f162e79bfc6c74). (iface); |
| 243 | iface->add_childcxx . . $ _GtkBuildableIface#add_child. = gtk_action_bar_buildable_add_childcxx . . $ gtk_action_bar_buildable_add_child(784606fbae7a2cc).; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * gtk_action_bar_pack_start: |
| 248 | * @action_bar: an action bar |
| 249 | * @child: the widget to be added |
| 250 | * |
| 251 | * Adds a child to the action, packed with reference to the |
| 252 | * start of the action bar. |
| 253 | */ |
| 254 | void |
| 255 | gtk_action_bar_pack_startcxx . . $ gtk_action_bar_pack_start(5eac137bb01d55bd). (GtkActionBarcxx . . $ GtkActionBar# *action_bar, |
| 256 | GtkWidgetcxx . . $ GtkWidget# *child) |
| 257 | { |
| 258 | gtk_box_appendcxx . . $ gtk_box_append(72f3a0256788ecaf). (GTK_BOXcxx . . $ `gtk/gtkbox.h:39:9`! (action_bar->start_box), child); |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * gtk_action_bar_pack_end: |
| 263 | * @action_bar: an action bar |
| 264 | * @child: the widget to be added |
| 265 | * |
| 266 | * Adds a child to the action bar, packed with reference to the |
| 267 | * end of the action bar. |
| 268 | */ |
| 269 | void |
| 270 | gtk_action_bar_pack_endcxx . . $ gtk_action_bar_pack_end(5eac137bb01d55bd). (GtkActionBarcxx . . $ GtkActionBar# *action_bar, |
| 271 | GtkWidgetcxx . . $ GtkWidget# *child) |
| 272 | { |
| 273 | gtk_box_insert_child_aftercxx . . $ gtk_box_insert_child_after(d0ded8d662e2b046). (GTK_BOXcxx . . $ `gtk/gtkbox.h:39:9`! (action_bar->end_box), child, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * gtk_action_bar_remove: |
| 278 | * @action_bar: an action bar |
| 279 | * @child: the widget to be removed |
| 280 | * |
| 281 | * Removes a child from the action bar. |
| 282 | */ |
| 283 | void |
| 284 | gtk_action_bar_removecxx . . $ gtk_action_bar_remove(5eac137bb01d55bd). (GtkActionBarcxx . . $ GtkActionBar# *action_bar, |
| 285 | GtkWidgetcxx . . $ GtkWidget# *child) |
| 286 | { |
| 287 | if (gtk_widget_get_parentcxx . . $ gtk_widget_get_parent(ef973e1b01680070). (child) == action_bar->start_boxcxx . . $ _GtkActionBar#start_box.) |
| 288 | gtk_box_removecxx . . $ gtk_box_remove(72f3a0256788ecaf). (GTK_BOXcxx . . $ `gtk/gtkbox.h:39:9`! (action_bar->start_box), child); |
| 289 | else if (gtk_widget_get_parentcxx . . $ gtk_widget_get_parent(ef973e1b01680070). (child) == action_bar->end_boxcxx . . $ _GtkActionBar#end_box.) |
| 290 | gtk_box_removecxx . . $ gtk_box_remove(72f3a0256788ecaf). (GTK_BOXcxx . . $ `gtk/gtkbox.h:39:9`! (action_bar->end_box), child); |
| 291 | else if (child == gtk_center_box_get_center_widgetcxx . . $ gtk_center_box_get_center_widget(d00b11c7c3678ea5). (GTK_CENTER_BOXcxx . . $ `gtk/gtkcenterbox.h:33:9`! (action_bar->center_box))) |
| 292 | gtk_center_box_set_center_widgetcxx . . $ gtk_center_box_set_center_widget(dc414dac38d2eb87). (GTK_CENTER_BOXcxx . . $ `gtk/gtkcenterbox.h:33:9`! (action_bar->center_box), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 293 | else |
| 294 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Can't remove non-child %s %p from GtkActionBar %p", |
| 295 | G_OBJECT_TYPE_NAMEcxx . . $ `<external>/1341695927569185362/gobject.h:108:9`! (child), child, action_bar); |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * gtk_action_bar_set_center_widget: |
| 300 | * @action_bar: an action bar |
| 301 | * @center_widget: (nullable): a widget to use for the center |
| 302 | * |
| 303 | * Sets the center widget for the action bar. |
| 304 | */ |
| 305 | void |
| 306 | gtk_action_bar_set_center_widgetcxx . . $ gtk_action_bar_set_center_widget(5eac137bb01d55bd). (GtkActionBarcxx . . $ GtkActionBar# *action_bar, |
| 307 | GtkWidgetcxx . . $ GtkWidget# *center_widget) |
| 308 | { |
| 309 | gtk_center_box_set_center_widgetcxx . . $ gtk_center_box_set_center_widget(dc414dac38d2eb87). (GTK_CENTER_BOXcxx . . $ `gtk/gtkcenterbox.h:33:9`! (action_bar->center_box), center_widget); |
| 310 | } |
| 311 | |
| 312 | /** |
| 313 | * gtk_action_bar_get_center_widget: |
| 314 | * @action_bar: an action bsar |
| 315 | * |
| 316 | * Retrieves the center bar widget of the bar. |
| 317 | * |
| 318 | * Returns: (transfer none) (nullable): the center widget |
| 319 | */ |
| 320 | GtkWidgetcxx . . $ GtkWidget# * |
| 321 | gtk_action_bar_get_center_widgetcxx . . $ gtk_action_bar_get_center_widget(9d89232b23ea5df9). (GtkActionBarcxx . . $ GtkActionBar# *action_bar) |
| 322 | { |
| 323 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:32:9`! (action_bar), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 324 | |
| 325 | return gtk_center_box_get_center_widgetcxx . . $ gtk_center_box_get_center_widget(d00b11c7c3678ea5). (GTK_CENTER_BOXcxx . . $ `gtk/gtkcenterbox.h:33:9`! (action_bar->center_box)); |
| 326 | } |
| 327 | |
| 328 | /** |
| 329 | * gtk_action_bar_new: |
| 330 | * |
| 331 | * Creates a new action bar widget. |
| 332 | * |
| 333 | * Returns: a new `GtkActionBar` |
| 334 | */ |
| 335 | GtkWidgetcxx . . $ GtkWidget# * |
| 336 | gtk_action_bar_newcxx . . $ gtk_action_bar_new(2369ce5e9f2c7dfd). (void) |
| 337 | { |
| 338 | return GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (g_object_new (GTK_TYPE_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:30:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * gtk_action_bar_set_revealed: |
| 343 | * @action_bar: an action bar |
| 344 | * @revealed: the new value for the property |
| 345 | * |
| 346 | * Reveals or conceals the content of the action bar. |
| 347 | * |
| 348 | * Note: this does not show or hide the action bar in the |
| 349 | * [[email protected]:visible] sense, so revealing has |
| 350 | * no effect if the action bar is hidden. |
| 351 | */ |
| 352 | void |
| 353 | gtk_action_bar_set_revealedcxx . . $ gtk_action_bar_set_revealed(92c80bb457c90983). (GtkActionBarcxx . . $ GtkActionBar# *action_bar, |
| 354 | gbooleancxx . . $ gboolean# revealed) |
| 355 | { |
| 356 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:32:9`! (action_bar)); |
| 357 | |
| 358 | if (revealed == gtk_revealer_get_reveal_childcxx . . $ gtk_revealer_get_reveal_child(841e49c7801cc64c). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (action_bar->revealer))) |
| 359 | return; |
| 360 | |
| 361 | gtk_revealer_set_reveal_childcxx . . $ gtk_revealer_set_reveal_child(ff879eb0a1838655). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (action_bar->revealer), revealed); |
| 362 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (action_bar), propscxx . . $ props.[PROP_REVEALEDcxx . . $ PROP_REVEALED.]); |
| 363 | } |
| 364 | |
| 365 | /** |
| 366 | * gtk_action_bar_get_revealed: |
| 367 | * @action_bar: an action bar |
| 368 | * |
| 369 | * Gets whether the contents of the action bar are revealed. |
| 370 | * |
| 371 | * Returns: the current value of the [[email protected]:revealed] |
| 372 | * property |
| 373 | */ |
| 374 | gbooleancxx . . $ gboolean# |
| 375 | gtk_action_bar_get_revealedcxx . . $ gtk_action_bar_get_revealed(75ba0cc61e8fb76a). (GtkActionBarcxx . . $ GtkActionBar# *action_bar) |
| 376 | { |
| 377 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_ACTION_BARcxx . . $ `gtk/gtkactionbar.h:32:9`! (action_bar), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 378 | |
| 379 | return gtk_revealer_get_reveal_childcxx . . $ gtk_revealer_get_reveal_child(841e49c7801cc64c). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (action_bar->revealer)); |
| 380 | } |