Debian Codegraph @

gtk/deprecated/gtkcelleditable.c

raw symbols SCIP
1 /* gtkcelleditable.c
2 * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <[email protected]>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 /**
19 * GtkCellEditable:
20 *
21 * Interface for widgets that can be used for editing cells
22 *
23 * The `GtkCellEditable` interface must be implemented for widgets to be usable
24 * to edit the contents of a `GtkTreeView` cell. It provides a way to specify how
25 * temporary widgets should be configured for editing, get the new value, etc.
26 *
27 * Deprecated: 4.10: List views use widgets for displaying their
28 * contents. See [[email protected]] for editable text widgets
29 */
30
31 #include "config.h"cxx . . $ `<file>/build/config.h`/
32 #include "gtkcelleditable.h"cxx . . $ `<file>/gtk/deprecated/gtkcelleditable.h`/
33 #include "gtkmarshalers.h"cxx . . $ `<file>/build/gtk/gtkmarshalers.h`/
34 #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/
35
36 G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`!
37
38 typedef GtkCellEditableIfacecxx . . $ GtkCellEditableIface# GtkCellEditableInterfacecxx . . $ GtkCellEditableInterface#;
39 G_DEFINE_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2078:9`!(GtkCellEditable, gtk_cell_editable, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!)
40
41 static void
42 gtk_cell_editable_default_initcxx . . $ gtk_cell_editable_default_init(ea146f79ae920a4e). (GtkCellEditableInterfacecxx . . $ GtkCellEditableInterface# *iface)
43 {
44 /**
45 * GtkCellEditable:editing-canceled:
46 *
47 * Indicates whether editing on the cell has been canceled.
48 */
49 g_object_interface_install_propertycxx . . $ g_object_interface_install_property(76e618752abc489). (iface,
50 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("editing-canceled", 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`!,
51 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
52 GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.));
53
54 /**
55 * GtkCellEditable::editing-done:
56 * @cell_editable: the object on which the signal was emitted
57 *
58 * This signal is a sign for the cell renderer to update its
59 * value from the @cell_editable.
60 *
61 * Implementations of `GtkCellEditable` are responsible for
62 * emitting this signal when they are done editing, e.g.
63 * `GtkEntry` emits this signal when the user presses Enter. Typical things to
64 * do in a handler for ::editing-done are to capture the edited value,
65 * disconnect the @cell_editable from signals on the `GtkCellRenderer`, etc.
66 *
67 * gtk_cell_editable_editing_done() is a convenience method
68 * for emitting `GtkCellEditable::editing-done`.
69 */
70 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("editing-done"),
71 GTK_TYPE_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:28:9`!,
72 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
73 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkCellEditableIface, editing_done),
74 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`!,
75 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
76 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0);
77
78 /**
79 * GtkCellEditable::remove-widget:
80 * @cell_editable: the object on which the signal was emitted
81 *
82 * This signal is meant to indicate that the cell is finished
83 * editing, and the @cell_editable widget is being removed and may
84 * subsequently be destroyed.
85 *
86 * Implementations of `GtkCellEditable` are responsible for
87 * emitting this signal when they are done editing. It must
88 * be emitted after the `GtkCellEditable::editing-done` signal,
89 * to give the cell renderer a chance to update the cell's value
90 * before the widget is removed.
91 *
92 * gtk_cell_editable_remove_widget() is a convenience method
93 * for emitting `GtkCellEditable::remove-widget`.
94 */
95 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("remove-widget"),
96 GTK_TYPE_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:28:9`!,
97 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
98 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkCellEditableIface, remove_widget),
99 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`!,
100 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
101 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0);
102 }
103
104 /**
105 * gtk_cell_editable_start_editing:
106 * @cell_editable: A `GtkCellEditable`
107 * @event: (nullable): The `GdkEvent` that began the editing process, or
108 * %NULL if editing was initiated programmatically
109 *
110 * Begins editing on a @cell_editable.
111 *
112 * The `GtkCellRenderer` for the cell creates and returns a `GtkCellEditable` from
113 * gtk_cell_renderer_start_editing(), configured for the `GtkCellRenderer` type.
114 *
115 * gtk_cell_editable_start_editing() can then set up @cell_editable suitably for
116 * editing a cell, e.g. making the Esc key emit `GtkCellEditable::editing-done`.
117 *
118 * Note that the @cell_editable is created on-demand for the current edit; its
119 * lifetime is temporary and does not persist across other edits and/or cells.
120 **/
121 void
122 gtk_cell_editable_start_editingcxx . . $ gtk_cell_editable_start_editing(68e542018c35747c). (GtkCellEditablecxx . . $ GtkCellEditable# *cell_editable,
123 GdkEventcxx . . $ GdkEvent# *event)
124 {
125 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:30:9`! (cell_editable));
126
127 (* GTK_CELL_EDITABLE_GET_IFACEcxx . . $ `gtk/deprecated/gtkcelleditable.h:31:9`! (cell_editable)->start_editingcxx . . $ _GtkCellEditableIface#start_editing.) (cell_editable, event);
128 }
129
130 /**
131 * gtk_cell_editable_editing_done:
132 * @cell_editable: A `GtkCellEditable`
133 *
134 * Emits the `GtkCellEditable::editing-done` signal.
135 *
136 * Deprecated: 4.10
137 */
138 void
139 gtk_cell_editable_editing_donecxx . . $ gtk_cell_editable_editing_done(403137d4a64484c8). (GtkCellEditablecxx . . $ GtkCellEditable# *cell_editable)
140 {
141 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:30:9`! (cell_editable));
142
143 g_signal_emit_by_namecxx . . $ g_signal_emit_by_name(1ac911bdc4e9a14d). (cell_editable, "editing-done");
144 }
145
146 /**
147 * gtk_cell_editable_remove_widget:
148 * @cell_editable: A `GtkCellEditable`
149 *
150 * Emits the `GtkCellEditable::remove-widget` signal.
151 *
152 * Deprecated: 4.10
153 **/
154 void
155 gtk_cell_editable_remove_widgetcxx . . $ gtk_cell_editable_remove_widget(403137d4a64484c8). (GtkCellEditablecxx . . $ GtkCellEditable# *cell_editable)
156 {
157 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_CELL_EDITABLEcxx . . $ `gtk/deprecated/gtkcelleditable.h:30:9`! (cell_editable));
158
159 g_signal_emit_by_namecxx . . $ g_signal_emit_by_name(1ac911bdc4e9a14d). (cell_editable, "remove-widget");
160 }