Debian Codegraph @

gtk/inspector/recorderrow.c

raw symbols SCIP
1 /*
2 * Copyright (c) 2021 Red Hat, Inc.
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 <glib/gi18n-lib.h>
20
21 #include "recorderrow.h"cxx . . $ `<file>/gtk/inspector/recorderrow.h`/
22
23 #include <gtk/gtkbinlayout.h>cxx . . $ `<file>/gtk/gtkbinlayout.h`/
24
25 /* This is a minimal widget whose purpose it is to compare the event sequence
26 * of its row in the recordings list with the event sequence of the selected
27 * row, and highlight itself if they match.
28 */
29
30 struct _GtkInspectorRecorderRowcxx . . $ _GtkInspectorRecorderRow#
31 {
32 GtkWidgetcxx . . $ GtkWidget# parentcxx . . $ _GtkInspectorRecorderRow#parent.;
33
34 gpointercxx . . $ gpointer# sequencecxx . . $ _GtkInspectorRecorderRow#sequence.;
35 gpointercxx . . $ gpointer# match_sequencecxx . . $ _GtkInspectorRecorderRow#match_sequence.;
36 };
37
38 enumcxx . . $ $anonymous_type_bd4a5a239e053108_0# {
39 PROP_SEQUENCEcxx . . $ PROP_SEQUENCE. = 1,
40 PROP_MATCH_SEQUENCEcxx . . $ PROP_MATCH_SEQUENCE.,
41 LAST_PROPcxx . . $ LAST_PROP.
42 };
43
44 static GParamSpeccxx . . $ GParamSpec# *propscxx . . $ props.[LAST_PROPcxx . . $ LAST_PROP.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, };
45
46 G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GtkInspectorRecorderRow, gtk_inspector_recorder_row, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!)
47
48 static void
49 gtk_inspector_recorder_row_initcxx . . $ gtk_inspector_recorder_row_init(a42f80802dac59be). (GtkInspectorRecorderRowcxx . . $ GtkInspectorRecorderRow# *self)
50 {
51 }
52
53 static void
54 disposecxx . . $ dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object)
55 {
56 GtkInspectorRecorderRowcxx . . $ GtkInspectorRecorderRow# *self = GTK_INSPECTOR_RECORDER_ROWcxx . . $ GTK_INSPECTOR_RECORDER_ROW(3e81e143be5070b). (object);
57
58 gtk_widget_unparentcxx . . $ gtk_widget_unparent(d7cf858254b37903). (gtk_widget_get_first_childcxx . . $ gtk_widget_get_first_child(ef973e1b01680070). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)));
59
60 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_inspector_recorder_row_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object);
61 }
62
63 static void
64 update_stylecxx . . $ update_style(a42f80802dac59be). (GtkInspectorRecorderRowcxx . . $ GtkInspectorRecorderRow# *self)
65 {
66 if (self->sequencecxx . . $ _GtkInspectorRecorderRow#sequence. == self->match_sequencecxx . . $ _GtkInspectorRecorderRow#match_sequence. && self->sequencecxx . . $ _GtkInspectorRecorderRow#sequence. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
67 gtk_widget_add_css_classcxx . . $ gtk_widget_add_css_class(3e0616a87a6c51e5). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), "highlight");
68 else
69 gtk_widget_remove_css_classcxx . . $ gtk_widget_remove_css_class(3e0616a87a6c51e5). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), "highlight");
70 }
71
72 static void
73 gtk_inspector_recorder_row_get_propertycxx . . $ gtk_inspector_recorder_row_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object,
74 guintcxx . . $ guint# param_id,
75 GValuecxx . . $ GValue# *value,
76 GParamSpeccxx . . $ GParamSpec# *pspec)
77 {
78 GtkInspectorRecorderRowcxx . . $ GtkInspectorRecorderRow# *self = GTK_INSPECTOR_RECORDER_ROWcxx . . $ GTK_INSPECTOR_RECORDER_ROW(3e81e143be5070b). (object);
79
80 switch (param_id)
81 {
82 case PROP_SEQUENCEcxx . . $ PROP_SEQUENCE.:
83 g_value_set_pointercxx . . $ g_value_set_pointer(e945b84c1e9702f). (value, self->sequencecxx . . $ _GtkInspectorRecorderRow#sequence.);
84 break;
85
86 case PROP_MATCH_SEQUENCEcxx . . $ PROP_MATCH_SEQUENCE.:
87 g_value_set_pointercxx . . $ g_value_set_pointer(e945b84c1e9702f). (value, self->match_sequencecxx . . $ _GtkInspectorRecorderRow#match_sequence.);
88 break;
89
90 default:
91 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, param_id, pspec);
92 break;
93 }
94 }
95
96 static void
97 gtk_inspector_recorder_row_set_propertycxx . . $ gtk_inspector_recorder_row_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object,
98 guintcxx . . $ guint# param_id,
99 const GValuecxx . . $ GValue# *value,
100 GParamSpeccxx . . $ GParamSpec# *pspec)
101 {
102 GtkInspectorRecorderRowcxx . . $ GtkInspectorRecorderRow# *self = GTK_INSPECTOR_RECORDER_ROWcxx . . $ GTK_INSPECTOR_RECORDER_ROW(3e81e143be5070b). (object);
103
104 switch (param_id)
105 {
106 case PROP_SEQUENCEcxx . . $ PROP_SEQUENCE.:
107 self->sequencecxx . . $ _GtkInspectorRecorderRow#sequence. = g_value_get_pointercxx . . $ g_value_get_pointer(e12dff36056c2cce). (value);
108 update_stylecxx . . $ update_style(a42f80802dac59be). (self);
109 break;
110
111 case PROP_MATCH_SEQUENCEcxx . . $ PROP_MATCH_SEQUENCE.:
112 self->match_sequencecxx . . $ _GtkInspectorRecorderRow#match_sequence. = g_value_get_pointercxx . . $ g_value_get_pointer(e12dff36056c2cce). (value);
113 update_stylecxx . . $ update_style(a42f80802dac59be). (self);
114 break;
115
116 default:
117 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, param_id, pspec);
118 break;
119 }
120 }
121
122 static void
123 gtk_inspector_recorder_row_class_initcxx . . $ gtk_inspector_recorder_row_class_init(1540f99ff3953d17). (GtkInspectorRecorderRowClasscxx . . $ GtkInspectorRecorderRowClass# *klass)
124 {
125 GObjectClasscxx . . $ GObjectClass# *object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass);
126 GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (klass);
127
128 object_class->disposecxx . . $ _GObjectClass#dispose. = disposecxx . . $ dispose(6087475fa43034d3).;
129 object_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_inspector_recorder_row_set_propertycxx . . $ gtk_inspector_recorder_row_set_property(d7c4bb29f36c0dc4).;
130 object_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_inspector_recorder_row_get_propertycxx . . $ gtk_inspector_recorder_row_get_property(cee2c52f22407c66).;
131
132 propscxx . . $ props.[PROP_SEQUENCEcxx . . $ PROP_SEQUENCE.] = g_param_spec_pointercxx . . $ g_param_spec_pointer(62b842d07fa2276c). ("sequence", 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`!, G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE.);
133 propscxx . . $ props.[PROP_MATCH_SEQUENCEcxx . . $ PROP_MATCH_SEQUENCE.] = g_param_spec_pointercxx . . $ g_param_spec_pointer(62b842d07fa2276c). ("match-sequence", 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`!, G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE.);
134
135 g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (object_class, LAST_PROPcxx . . $ LAST_PROP., propscxx . . $ props.);
136
137 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`!);
138 }