| 1 | /* GtkCellRendererCombo |
| 2 | * Copyright (C) 2004 Lorenzo Gil Sanchez |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library 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 GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 19 | #include <string.h> |
| 20 | |
| 21 | #include "gtkentry.h"cxx . . $ `<file>/gtk/gtkentry.h`/ |
| 22 | #include "deprecated/gtkcelllayout.h"cxx . . $ `<file>/gtk/deprecated/gtkcelllayout.h`/ |
| 23 | #include "gtkcellrenderercombo.h"cxx . . $ `<file>/gtk/deprecated/gtkcellrenderercombo.h`/ |
| 24 | #include "deprecated/gtkcellrenderertext.h"cxx . . $ `<file>/gtk/deprecated/gtkcellrenderertext.h`/ |
| 25 | #include "deprecated/gtkcombobox.h"cxx . . $ `<file>/gtk/deprecated/gtkcombobox.h`/ |
| 26 | #include "gtkmarshalers.h"cxx . . $ `<file>/build/gtk/gtkmarshalers.h`/ |
| 27 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 28 | |
| 29 | G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`! |
| 30 | |
| 31 | /** |
| 32 | * GtkCellRendererCombo: |
| 33 | * |
| 34 | * Renders a combobox in a cell |
| 35 | * |
| 36 | * `GtkCellRendererCombo` renders text in a cell like `GtkCellRendererText` from |
| 37 | * which it is derived. But while `GtkCellRendererText` offers a simple entry to |
| 38 | * edit the text, `GtkCellRendererCombo` offers a `GtkComboBox` |
| 39 | * widget to edit the text. The values to display in the combo box are taken from |
| 40 | * the tree model specified in the `GtkCellRendererCombo`:model property. |
| 41 | * |
| 42 | * The combo cell renderer takes care of adding a text cell renderer to the combo |
| 43 | * box and sets it to display the column specified by its |
| 44 | * `GtkCellRendererCombo`:text-column property. Further properties of the combo box |
| 45 | * can be set in a handler for the `GtkCellRenderer::editing-started` signal. |
| 46 | * |
| 47 | * Deprecated: 4.10: List views use widgets to display their contents. You |
| 48 | * should use [[email protected]] instead |
| 49 | */ |
| 50 | |
| 51 | typedef struct _GtkCellRendererComboPrivatecxx . . $ _GtkCellRendererComboPrivate# GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate#; |
| 52 | typedef struct _GtkCellRendererComboClasscxx . . $ _GtkCellRendererComboClass# GtkCellRendererComboClasscxx . . $ GtkCellRendererComboClass#; |
| 53 | |
| 54 | struct _GtkCellRendererCombocxx . . $ _GtkCellRendererCombo# |
| 55 | { |
| 56 | GtkCellRendererTextcxx . . $ GtkCellRendererText# parentcxx . . $ _GtkCellRendererCombo#parent.; |
| 57 | }; |
| 58 | |
| 59 | struct _GtkCellRendererComboClasscxx . . $ _GtkCellRendererComboClass# |
| 60 | { |
| 61 | GtkCellRendererTextClasscxx . . $ GtkCellRendererTextClass# parentcxx . . $ _GtkCellRendererComboClass#parent.; |
| 62 | }; |
| 63 | |
| 64 | |
| 65 | struct _GtkCellRendererComboPrivatecxx . . $ _GtkCellRendererComboPrivate# |
| 66 | { |
| 67 | GtkTreeModelcxx . . $ GtkTreeModel# *modelcxx . . $ _GtkCellRendererComboPrivate#model.; |
| 68 | |
| 69 | GtkWidgetcxx . . $ GtkWidget# *combocxx . . $ _GtkCellRendererComboPrivate#combo.; |
| 70 | |
| 71 | gbooleancxx . . $ gboolean# has_entrycxx . . $ _GtkCellRendererComboPrivate#has_entry.; |
| 72 | |
| 73 | int text_columncxx . . $ _GtkCellRendererComboPrivate#text_column.; |
| 74 | |
| 75 | gulongcxx . . $ gulong# focus_out_idcxx . . $ _GtkCellRendererComboPrivate#focus_out_id.; |
| 76 | }; |
| 77 | |
| 78 | |
| 79 | static void gtk_cell_renderer_combo_finalizecxx . . $ gtk_cell_renderer_combo_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *object); |
| 80 | static void gtk_cell_renderer_combo_get_propertycxx . . $ gtk_cell_renderer_combo_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 81 | guintcxx . . $ guint# prop_id, |
| 82 | GValuecxx . . $ GValue# *value, |
| 83 | GParamSpeccxx . . $ GParamSpec# *pspec); |
| 84 | |
| 85 | static void gtk_cell_renderer_combo_set_propertycxx . . $ gtk_cell_renderer_combo_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 86 | guintcxx . . $ guint# prop_id, |
| 87 | const GValuecxx . . $ GValue# *value, |
| 88 | GParamSpeccxx . . $ GParamSpec# *pspec); |
| 89 | |
| 90 | static GtkCellEditablecxx . . $ GtkCellEditable# *gtk_cell_renderer_combo_start_editingcxx . . $ gtk_cell_renderer_combo_start_editing(ea43edb464ffc494). (GtkCellRenderercxx . . $ GtkCellRenderer# *cell, |
| 91 | GdkEventcxx . . $ GdkEvent# *event, |
| 92 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 93 | const char *path, |
| 94 | const GdkRectanglecxx . . $ GdkRectangle# *background_area, |
| 95 | const GdkRectanglecxx . . $ GdkRectangle# *cell_area, |
| 96 | GtkCellRendererStatecxx . . $ GtkCellRendererState# flags); |
| 97 | |
| 98 | enumcxx . . $ $anonymous_type_8cbd27804dd14a8f_0# { |
| 99 | PROP_0cxx . . $ PROP_0., |
| 100 | PROP_MODELcxx . . $ PROP_MODEL., |
| 101 | PROP_TEXT_COLUMNcxx . . $ PROP_TEXT_COLUMN., |
| 102 | PROP_HAS_ENTRYcxx . . $ PROP_HAS_ENTRY. |
| 103 | }; |
| 104 | |
| 105 | enumcxx . . $ $anonymous_type_8cbd27804dd14a8f_1# { |
| 106 | CHANGEDcxx . . $ CHANGED., |
| 107 | LAST_SIGNALcxx . . $ LAST_SIGNAL. |
| 108 | }; |
| 109 | |
| 110 | static guintcxx . . $ guint# cell_renderer_combo_signalscxx . . $ cell_renderer_combo_signals.[LAST_SIGNALcxx . . $ LAST_SIGNAL.] = { 0, }; |
| 111 | |
| 112 | #define GTK_CELL_RENDERER_COMBO_PATHcxx . . $ `gtk/deprecated/gtkcellrenderercombo.c:112:9`! "gtk-cell-renderer-combo-path" |
| 113 | |
| 114 | G_DEFINE_TYPE_WITH_PRIVATEcxx . . $ `<external>/9567554376676449156/gtype.h:1876:9`! (GtkCellRendererCombo, gtk_cell_renderer_combo, GTK_TYPE_CELL_RENDERER_TEXTcxx . . $ `gtk/deprecated/gtkcellrenderertext.h:31:9`!) |
| 115 | |
| 116 | static void |
| 117 | gtk_cell_renderer_combo_class_initcxx . . $ gtk_cell_renderer_combo_class_init(d9ccd9da6c75bfe3). (GtkCellRendererComboClasscxx . . $ GtkCellRendererComboClass# *klass) |
| 118 | { |
| 119 | GObjectClasscxx . . $ GObjectClass# *object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass); |
| 120 | GtkCellRendererClasscxx . . $ GtkCellRendererClass# *cell_class = GTK_CELL_RENDERER_CLASScxx . . $ `gtk/deprecated/gtkcellrenderer.h:78:9`! (klass); |
| 121 | |
| 122 | object_class->finalizecxx . . $ _GObjectClass#finalize. = gtk_cell_renderer_combo_finalizecxx . . $ gtk_cell_renderer_combo_finalize(6087475fa43034d3).; |
| 123 | object_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_cell_renderer_combo_get_propertycxx . . $ gtk_cell_renderer_combo_get_property(cee2c52f22407c66).; |
| 124 | object_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_cell_renderer_combo_set_propertycxx . . $ gtk_cell_renderer_combo_set_property(d7c4bb29f36c0dc4).; |
| 125 | |
| 126 | cell_class->start_editingcxx . . $ _GtkCellRendererClass#start_editing. = gtk_cell_renderer_combo_start_editingcxx . . $ gtk_cell_renderer_combo_start_editing(ea43edb464ffc494).; |
| 127 | |
| 128 | /** |
| 129 | * GtkCellRendererCombo:model: |
| 130 | * |
| 131 | * Holds a tree model containing the possible values for the combo box. |
| 132 | * Use the text_column property to specify the column holding the values. |
| 133 | */ |
| 134 | g_object_class_install_propertycxx . . $ g_object_class_install_property(9c80cb614dbe5a26). (object_class, |
| 135 | PROP_MODELcxx . . $ PROP_MODEL., |
| 136 | g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("model", 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`!, |
| 137 | GTK_TYPE_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:29:9`!, |
| 138 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!)); |
| 139 | |
| 140 | /** |
| 141 | * GtkCellRendererCombo:text-column: |
| 142 | * |
| 143 | * Specifies the model column which holds the possible values for the |
| 144 | * combo box. |
| 145 | * |
| 146 | * Note that this refers to the model specified in the model property, |
| 147 | * not the model backing the tree view to which |
| 148 | * this cell renderer is attached. |
| 149 | * |
| 150 | * `GtkCellRendererCombo` automatically adds a text cell renderer for |
| 151 | * this column to its combo box. |
| 152 | */ |
| 153 | g_object_class_install_propertycxx . . $ g_object_class_install_property(9c80cb614dbe5a26). (object_class, |
| 154 | PROP_TEXT_COLUMNcxx . . $ PROP_TEXT_COLUMN., |
| 155 | g_param_spec_intcxx . . $ g_param_spec_int(eedf0a930522f60e). ("text-column", 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`!, |
| 156 | -1, |
| 157 | G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!, |
| 158 | -1, |
| 159 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.)); |
| 160 | |
| 161 | /** |
| 162 | * GtkCellRendererCombo:has-entry: |
| 163 | * |
| 164 | * If %TRUE, the cell renderer will include an entry and allow to enter |
| 165 | * values other than the ones in the popup list. |
| 166 | */ |
| 167 | g_object_class_install_propertycxx . . $ g_object_class_install_property(9c80cb614dbe5a26). (object_class, |
| 168 | PROP_HAS_ENTRYcxx . . $ PROP_HAS_ENTRY., |
| 169 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("has-entry", 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`!, |
| 170 | TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, |
| 171 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.)); |
| 172 | |
| 173 | |
| 174 | /** |
| 175 | * GtkCellRendererCombo::changed: |
| 176 | * @combo: the object on which the signal is emitted |
| 177 | * @path_string: a string of the path identifying the edited cell |
| 178 | * (relative to the tree view model) |
| 179 | * @new_iter: the new iter selected in the combo box |
| 180 | * (relative to the combo box model) |
| 181 | * |
| 182 | * This signal is emitted each time after the user selected an item in |
| 183 | * the combo box, either by using the mouse or the arrow keys. Contrary |
| 184 | * to GtkComboBox, GtkCellRendererCombo::changed is not emitted for |
| 185 | * changes made to a selected item in the entry. The argument @new_iter |
| 186 | * corresponds to the newly selected item in the combo box and it is relative |
| 187 | * to the GtkTreeModel set via the model property on GtkCellRendererCombo. |
| 188 | * |
| 189 | * Note that as soon as you change the model displayed in the tree view, |
| 190 | * the tree view will immediately cease the editing operating. This |
| 191 | * means that you most probably want to refrain from changing the model |
| 192 | * until the combo cell renderer emits the edited or editing_canceled signal. |
| 193 | */ |
| 194 | cell_renderer_combo_signalscxx . . $ cell_renderer_combo_signals.[CHANGEDcxx . . $ CHANGED.] = |
| 195 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("changed"), |
| 196 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (object_class), |
| 197 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 198 | 0, |
| 199 | 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`!, |
| 200 | _gtk_marshal_VOID__STRING_BOXEDcxx . . $ _gtk_marshal_VOID__STRING_BOXED(cba270afb0f82555)., |
| 201 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 2, |
| 202 | G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!, |
| 203 | GTK_TYPE_TREE_ITERcxx . . $ `gtk/deprecated/gtktreemodel.h:34:9`!); |
| 204 | g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (cell_renderer_combo_signalscxx . . $ cell_renderer_combo_signals.[CHANGEDcxx . . $ CHANGED.], |
| 205 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (object_class), |
| 206 | _gtk_marshal_VOID__STRING_BOXEDvcxx . . $ _gtk_marshal_VOID__STRING_BOXEDv(d309f4be92d1737c).); |
| 207 | } |
| 208 | |
| 209 | static void |
| 210 | gtk_cell_renderer_combo_initcxx . . $ gtk_cell_renderer_combo_init(91384189eb6c3aea). (GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *self) |
| 211 | { |
| 212 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (self); |
| 213 | |
| 214 | priv->modelcxx . . $ _GtkCellRendererComboPrivate#model. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 215 | priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column. = -1; |
| 216 | priv->has_entrycxx . . $ _GtkCellRendererComboPrivate#has_entry. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 217 | priv->focus_out_idcxx . . $ _GtkCellRendererComboPrivate#focus_out_id. = 0; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * gtk_cell_renderer_combo_new: |
| 222 | * |
| 223 | * Creates a new `GtkCellRendererCombo`. |
| 224 | * Adjust how text is drawn using object properties. |
| 225 | * Object properties can be set globally (with g_object_set()). |
| 226 | * Also, with `GtkTreeViewColumn`, you can bind a property to a value |
| 227 | * in a `GtkTreeModel`. For example, you can bind the “text” property |
| 228 | * on the cell renderer to a string value in the model, thus rendering |
| 229 | * a different string in each row of the `GtkTreeView`. |
| 230 | * |
| 231 | * Returns: the new cell renderer |
| 232 | * |
| 233 | * Deprecated: 4.10 |
| 234 | */ |
| 235 | GtkCellRenderercxx . . $ GtkCellRenderer# * |
| 236 | gtk_cell_renderer_combo_newcxx . . $ gtk_cell_renderer_combo_new(6d6b6a1a12ffe86f). (void) |
| 237 | { |
| 238 | return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:29:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 239 | } |
| 240 | |
| 241 | static void |
| 242 | gtk_cell_renderer_combo_finalizecxx . . $ gtk_cell_renderer_combo_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 243 | { |
| 244 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cell = GTK_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:30:9`! (object); |
| 245 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (cell); |
| 246 | |
| 247 | if (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.) |
| 248 | { |
| 249 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.); |
| 250 | priv->modelcxx . . $ _GtkCellRendererComboPrivate#model. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 251 | } |
| 252 | |
| 253 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_cell_renderer_combo_parent_class)->finalizecxx . . $ _GObjectClass#finalize. (object); |
| 254 | } |
| 255 | |
| 256 | static void |
| 257 | gtk_cell_renderer_combo_get_propertycxx . . $ gtk_cell_renderer_combo_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 258 | guintcxx . . $ guint# prop_id, |
| 259 | GValuecxx . . $ GValue# *value, |
| 260 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 261 | { |
| 262 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cell = GTK_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:30:9`! (object); |
| 263 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (cell); |
| 264 | |
| 265 | switch (prop_id) |
| 266 | { |
| 267 | case PROP_MODELcxx . . $ PROP_MODEL.: |
| 268 | g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.); |
| 269 | break; |
| 270 | case PROP_TEXT_COLUMNcxx . . $ PROP_TEXT_COLUMN.: |
| 271 | g_value_set_intcxx . . $ g_value_set_int(b698c61e8e30c4ea). (value, priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column.); |
| 272 | break; |
| 273 | case PROP_HAS_ENTRYcxx . . $ PROP_HAS_ENTRY.: |
| 274 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, priv->has_entrycxx . . $ _GtkCellRendererComboPrivate#has_entry.); |
| 275 | break; |
| 276 | default: |
| 277 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 278 | break; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | static void |
| 283 | gtk_cell_renderer_combo_set_propertycxx . . $ gtk_cell_renderer_combo_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 284 | guintcxx . . $ guint# prop_id, |
| 285 | const GValuecxx . . $ GValue# *value, |
| 286 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 287 | { |
| 288 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cell = GTK_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:30:9`! (object); |
| 289 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (cell); |
| 290 | |
| 291 | switch (prop_id) |
| 292 | { |
| 293 | case PROP_MODELcxx . . $ PROP_MODEL.: |
| 294 | { |
| 295 | if (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.) |
| 296 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.); |
| 297 | priv->modelcxx . . $ _GtkCellRendererComboPrivate#model. = GTK_TREE_MODELcxx . . $ `gtk/deprecated/gtktreemodel.h:30:9`! (g_value_get_object (value)); |
| 298 | if (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.) |
| 299 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (priv->model); |
| 300 | break; |
| 301 | } |
| 302 | case PROP_TEXT_COLUMNcxx . . $ PROP_TEXT_COLUMN.: |
| 303 | if (priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column. != g_value_get_intcxx . . $ g_value_get_int(f890c5c75ead5b21). (value)) |
| 304 | { |
| 305 | priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column. = g_value_get_intcxx . . $ g_value_get_int(f890c5c75ead5b21). (value); |
| 306 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (object, pspec); |
| 307 | } |
| 308 | break; |
| 309 | case PROP_HAS_ENTRYcxx . . $ PROP_HAS_ENTRY.: |
| 310 | if (priv->has_entrycxx . . $ _GtkCellRendererComboPrivate#has_entry. != g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)) |
| 311 | { |
| 312 | priv->has_entrycxx . . $ _GtkCellRendererComboPrivate#has_entry. = g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value); |
| 313 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (object, pspec); |
| 314 | } |
| 315 | break; |
| 316 | default: |
| 317 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 318 | break; |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | static void |
| 323 | gtk_cell_renderer_combo_changedcxx . . $ gtk_cell_renderer_combo_changed(af2105e950cb2b53). (GtkComboBoxcxx . . $ GtkComboBox# *combo, |
| 324 | gpointercxx . . $ gpointer# data) |
| 325 | { |
| 326 | GtkTreeItercxx . . $ GtkTreeIter# iter; |
| 327 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cell; |
| 328 | |
| 329 | cell = GTK_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:30:9`! (data); |
| 330 | |
| 331 | if (gtk_combo_box_get_active_itercxx . . $ gtk_combo_box_get_active_iter(fc491ad567338652). (combo, &iter)) |
| 332 | { |
| 333 | const char *path; |
| 334 | |
| 335 | path = g_object_get_datacxx . . $ g_object_get_data(973400aee2f864c2). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (combo), GTK_CELL_RENDERER_COMBO_PATHcxx . . $ `gtk/deprecated/gtkcellrenderercombo.c:112:9`!); |
| 336 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (cell, cell_renderer_combo_signalscxx . . $ cell_renderer_combo_signals.[CHANGEDcxx . . $ CHANGED.], 0, |
| 337 | path, &iter); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | static void |
| 342 | gtk_cell_renderer_combo_editing_donecxx . . $ gtk_cell_renderer_combo_editing_done(fe0413adfcf09f66). (GtkCellEditablecxx . . $ GtkCellEditable# *combo, |
| 343 | gpointercxx . . $ gpointer# data) |
| 344 | { |
| 345 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cell = GTK_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:30:9`! (data); |
| 346 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (cell); |
| 347 | const char *path; |
| 348 | char *new_text = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 349 | GtkTreeModelcxx . . $ GtkTreeModel# *model; |
| 350 | GtkTreeItercxx . . $ GtkTreeIter# iter; |
| 351 | GtkEntrycxx . . $ GtkEntry# *entry; |
| 352 | gbooleancxx . . $ gboolean# canceled; |
| 353 | |
| 354 | if (priv->focus_out_idcxx . . $ _GtkCellRendererComboPrivate#focus_out_id. > 0) |
| 355 | { |
| 356 | g_signal_handler_disconnectcxx . . $ g_signal_handler_disconnect(5500c4293b1bbef0). (combo, priv->focus_out_idcxx . . $ _GtkCellRendererComboPrivate#focus_out_id.); |
| 357 | priv->focus_out_idcxx . . $ _GtkCellRendererComboPrivate#focus_out_id. = 0; |
| 358 | } |
| 359 | |
| 360 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (combo, |
| 361 | "editing-canceled", &canceled, |
| 362 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 363 | gtk_cell_renderer_stop_editingcxx . . $ gtk_cell_renderer_stop_editing(ce63b40b733b81ac). (GTK_CELL_RENDERERcxx . . $ `gtk/deprecated/gtkcellrenderer.h:77:9`! (data), canceled); |
| 364 | if (canceled) |
| 365 | { |
| 366 | priv->combocxx . . $ _GtkCellRendererComboPrivate#combo. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 367 | return; |
| 368 | } |
| 369 | |
| 370 | if (gtk_combo_box_get_has_entrycxx . . $ gtk_combo_box_get_has_entry(86225318ecdc1bc). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo))) |
| 371 | { |
| 372 | entry = GTK_ENTRYcxx . . $ `gtk/gtkentry.h:46:9`! (gtk_combo_box_get_child (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo))); |
| 373 | new_text = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (gtk_editable_get_text (GTK_EDITABLEcxx . . $ `gtk/gtkeditable.h:38:9`! (entry))); |
| 374 | } |
| 375 | else |
| 376 | { |
| 377 | model = gtk_combo_box_get_modelcxx . . $ gtk_combo_box_get_model(10cf59bf945d3294). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo)); |
| 378 | |
| 379 | if (model |
| 380 | && gtk_combo_box_get_active_itercxx . . $ gtk_combo_box_get_active_iter(fc491ad567338652). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo), &iter)) |
| 381 | gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (model, &iter, priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column., &new_text, -1); |
| 382 | } |
| 383 | |
| 384 | path = g_object_get_datacxx . . $ g_object_get_data(973400aee2f864c2). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (combo), GTK_CELL_RENDERER_COMBO_PATHcxx . . $ `gtk/deprecated/gtkcellrenderercombo.c:112:9`!); |
| 385 | g_signal_emit_by_namecxx . . $ g_signal_emit_by_name(1ac911bdc4e9a14d). (cell, "edited", path, new_text); |
| 386 | |
| 387 | priv->combocxx . . $ _GtkCellRendererComboPrivate#combo. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 388 | |
| 389 | g_freecxx . . $ g_free(5d22bdacc48458e8). (new_text); |
| 390 | } |
| 391 | |
| 392 | static void |
| 393 | gtk_cell_renderer_combo_focus_changecxx . . $ gtk_cell_renderer_combo_focus_change(e6f813de8be39d8a). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 394 | GParamSpeccxx . . $ GParamSpec# *pspec, |
| 395 | gpointercxx . . $ gpointer# data) |
| 396 | { |
| 397 | if (!gtk_widget_has_focuscxx . . $ gtk_widget_has_focus(9247ef2dc26c5426). (widget)) |
| 398 | gtk_cell_renderer_combo_editing_donecxx . . $ gtk_cell_renderer_combo_editing_done(fe0413adfcf09f66). (GTK_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:29:9`! (widget), data); |
| 399 | } |
| 400 | |
| 401 | typedef structcxx . . $ $anonymous_type_8cbd27804dd14a8f_2# |
| 402 | { |
| 403 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cellcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#cell.; |
| 404 | gbooleancxx . . $ gboolean# foundcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#found.; |
| 405 | GtkTreeItercxx . . $ GtkTreeIter# itercxx . . $ $anonymous_type_8cbd27804dd14a8f_2#iter.; |
| 406 | } SearchDatacxx . . $ SearchData#; |
| 407 | |
| 408 | static gbooleancxx . . $ gboolean# |
| 409 | find_textcxx . . $ find_text(b48434c5af0e88bd). (GtkTreeModelcxx . . $ GtkTreeModel# *model, |
| 410 | GtkTreePathcxx . . $ GtkTreePath# *path, |
| 411 | GtkTreeItercxx . . $ GtkTreeIter# *iter, |
| 412 | gpointercxx . . $ gpointer# data) |
| 413 | { |
| 414 | SearchDatacxx . . $ SearchData# *search_data = (SearchDatacxx . . $ SearchData# *)data; |
| 415 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (search_data->cellcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#cell.); |
| 416 | char *text, *cell_text; |
| 417 | |
| 418 | gtk_tree_model_getcxx . . $ gtk_tree_model_get(6d4913a405196bb7). (model, iter, priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column., &text, -1); |
| 419 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (GTK_CELL_RENDERER_TEXTcxx . . $ `gtk/deprecated/gtkcellrenderertext.h:32:9`! (search_data->cell), |
| 420 | "text", &cell_text, |
| 421 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 422 | if (text && cell_text && g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (text, cell_text) == 0) |
| 423 | { |
| 424 | search_data->itercxx . . $ $anonymous_type_8cbd27804dd14a8f_2#iter. = *iter; |
| 425 | search_data->foundcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#found. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 426 | } |
| 427 | |
| 428 | g_freecxx . . $ g_free(5d22bdacc48458e8). (cell_text); |
| 429 | g_freecxx . . $ g_free(5d22bdacc48458e8). (text); |
| 430 | |
| 431 | return search_data->foundcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#found.; |
| 432 | } |
| 433 | |
| 434 | static GtkCellEditablecxx . . $ GtkCellEditable# * |
| 435 | gtk_cell_renderer_combo_start_editingcxx . . $ gtk_cell_renderer_combo_start_editing(ea43edb464ffc494). (GtkCellRenderercxx . . $ GtkCellRenderer# *cell, |
| 436 | GdkEventcxx . . $ GdkEvent# *event, |
| 437 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 438 | const char *path, |
| 439 | const GdkRectanglecxx . . $ GdkRectangle# *background_area, |
| 440 | const GdkRectanglecxx . . $ GdkRectangle# *cell_area, |
| 441 | GtkCellRendererStatecxx . . $ GtkCellRendererState# flags) |
| 442 | { |
| 443 | GtkCellRendererCombocxx . . $ GtkCellRendererCombo# *cell_combo = GTK_CELL_RENDERER_COMBOcxx . . $ `gtk/deprecated/gtkcellrenderercombo.h:30:9`! (cell); |
| 444 | GtkCellRendererComboPrivatecxx . . $ GtkCellRendererComboPrivate# *priv = gtk_cell_renderer_combo_get_instance_privatecxx . . $ gtk_cell_renderer_combo_get_instance_private(c10703a71dce6d77). (cell_combo); |
| 445 | GtkWidgetcxx . . $ GtkWidget# *combo; |
| 446 | SearchDatacxx . . $ SearchData# search_data; |
| 447 | gbooleancxx . . $ gboolean# editable; |
| 448 | char *text; |
| 449 | |
| 450 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (cell, "editable", &editable, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 451 | if (editable == FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) |
| 452 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 453 | |
| 454 | if (priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column. < 0) |
| 455 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 456 | |
| 457 | if (priv->has_entrycxx . . $ _GtkCellRendererComboPrivate#has_entry.) |
| 458 | { |
| 459 | combo = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:30:9`!, "has-entry", TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 460 | |
| 461 | if (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.) |
| 462 | gtk_combo_box_set_modelcxx . . $ gtk_combo_box_set_model(60ebebe6d2f9366d). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo), priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.); |
| 463 | gtk_combo_box_set_entry_text_columncxx . . $ gtk_combo_box_set_entry_text_column(786f96f974cbfb1d). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo), |
| 464 | priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column.); |
| 465 | |
| 466 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (cell, "text", &text, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 467 | if (text) |
| 468 | gtk_editable_set_textcxx . . $ gtk_editable_set_text(dd7674303aab4ac4). (GTK_EDITABLEcxx . . $ `gtk/gtkeditable.h:38:9`! (gtk_combo_box_get_child (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo))), text); |
| 469 | g_freecxx . . $ g_free(5d22bdacc48458e8). (text); |
| 470 | } |
| 471 | else |
| 472 | { |
| 473 | cell = gtk_cell_renderer_text_newcxx . . $ gtk_cell_renderer_text_new(6d6b6a1a12ffe86f). (); |
| 474 | |
| 475 | combo = gtk_combo_box_newcxx . . $ gtk_combo_box_new(2369ce5e9f2c7dfd). (); |
| 476 | if (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.) |
| 477 | gtk_combo_box_set_modelcxx . . $ gtk_combo_box_set_model(60ebebe6d2f9366d). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo), priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.); |
| 478 | |
| 479 | gtk_cell_layout_pack_startcxx . . $ gtk_cell_layout_pack_start(6bf22d458dd3339a). (GTK_CELL_LAYOUTcxx . . $ `gtk/deprecated/gtkcelllayout.h:32:9`! (combo), cell, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 480 | gtk_cell_layout_set_attributescxx . . $ gtk_cell_layout_set_attributes(e786233378383675). (GTK_CELL_LAYOUTcxx . . $ `gtk/deprecated/gtkcelllayout.h:32:9`! (combo), |
| 481 | cell, "text", priv->text_columncxx . . $ _GtkCellRendererComboPrivate#text_column., |
| 482 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 483 | |
| 484 | /* determine the current value */ |
| 485 | if (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model.) |
| 486 | { |
| 487 | search_data.cellcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#cell. = cell_combo; |
| 488 | search_data.foundcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#found. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 489 | gtk_tree_model_foreachcxx . . $ gtk_tree_model_foreach(f62bc634465d8c2c). (priv->modelcxx . . $ _GtkCellRendererComboPrivate#model., find_textcxx . . $ find_text(b48434c5af0e88bd)., &search_data); |
| 490 | if (search_data.foundcxx . . $ $anonymous_type_8cbd27804dd14a8f_2#found.) |
| 491 | gtk_combo_box_set_active_itercxx . . $ gtk_combo_box_set_active_iter(d315ff5d1c40d93a). (GTK_COMBO_BOXcxx . . $ `gtk/deprecated/gtkcombobox.h:31:9`! (combo), |
| 492 | &(search_data.itercxx . . $ $anonymous_type_8cbd27804dd14a8f_2#iter.)); |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d). (combo, "has-frame", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 497 | g_object_set_data_fullcxx . . $ g_object_set_data_full(218df00be1d2a06c). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (combo), |
| 498 | I_cxx . . $ `gdk/gdkprivate.h:35:9`!(GTK_CELL_RENDERER_COMBO_PATHcxx . . $ `gtk/deprecated/gtkcellrenderercombo.c:112:9`!), |
| 499 | g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (path), g_freecxx . . $ g_free(5d22bdacc48458e8).); |
| 500 | |
| 501 | gtk_widget_showcxx . . $ gtk_widget_show(d7cf858254b37903). (combo); |
| 502 | |
| 503 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (GTK_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:29:9`! (combo), "editing-done", |
| 504 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_cell_renderer_combo_editing_done), |
| 505 | cell_combo); |
| 506 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (GTK_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:29:9`! (combo), "changed", |
| 507 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_cell_renderer_combo_changed), |
| 508 | cell_combo); |
| 509 | priv->focus_out_idcxx . . $ _GtkCellRendererComboPrivate#focus_out_id. = g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (combo, "notify::has-focus", |
| 510 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_cell_renderer_combo_focus_change), |
| 511 | cell_combo); |
| 512 | |
| 513 | priv->combocxx . . $ _GtkCellRendererComboPrivate#combo. = combo; |
| 514 | |
| 515 | return GTK_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:29:9`! (combo); |
| 516 | } |