| 1 | /* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */cxx . . $ `<file>/gtk/gtktextviewchild.c`/ |
| 2 | /* GTK - The GIMP Toolkit |
| 3 | * gtk_text_view_child.c Copyright (C) 2019 Red Hat, Inc. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library 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 GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 20 | |
| 21 | #include "gtkcssnodeprivate.h"cxx . . $ `<file>/gtk/gtkcssnodeprivate.h`/ |
| 22 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 23 | #include "gtktextview.h"cxx . . $ `<file>/gtk/gtktextview.h`/ |
| 24 | #include "gtktextviewchildprivate.h"cxx . . $ `<file>/gtk/gtktextviewchildprivate.h`/ |
| 25 | #include "gtktypebuiltins.h"cxx . . $ `<file>/build/gtk/gtktypebuiltins.h`/ |
| 26 | #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/ |
| 27 | |
| 28 | typedef structcxx . . $ $anonymous_type_a0d33019041ef297_0# |
| 29 | { |
| 30 | GListcxx . . $ GList# linkcxx . . $ $anonymous_type_a0d33019041ef297_0#link.; |
| 31 | GtkWidgetcxx . . $ GtkWidget# *widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget.; |
| 32 | int xcxx . . $ $anonymous_type_a0d33019041ef297_0#x.; |
| 33 | int ycxx . . $ $anonymous_type_a0d33019041ef297_0#y.; |
| 34 | } Overlaycxx . . $ Overlay#; |
| 35 | |
| 36 | struct _GtkTextViewChildcxx . . $ _GtkTextViewChild# |
| 37 | { |
| 38 | GtkWidgetcxx . . $ GtkWidget# parent_instancecxx . . $ _GtkTextViewChild#parent_instance.; |
| 39 | GtkTextWindowTypecxx . . $ GtkTextWindowType# window_typecxx . . $ _GtkTextViewChild#window_type.; |
| 40 | GQueuecxx . . $ GQueue# overlayscxx . . $ _GtkTextViewChild#overlays.; |
| 41 | int xoffsetcxx . . $ _GtkTextViewChild#xoffset.; |
| 42 | int yoffsetcxx . . $ _GtkTextViewChild#yoffset.; |
| 43 | GtkWidgetcxx . . $ GtkWidget# *childcxx . . $ _GtkTextViewChild#child.; |
| 44 | }; |
| 45 | |
| 46 | enumcxx . . $ $anonymous_type_a0d33019041ef297_1# { |
| 47 | PROP_0cxx . . $ PROP_0., |
| 48 | PROP_WINDOW_TYPEcxx . . $ PROP_WINDOW_TYPE., |
| 49 | N_PROPScxx . . $ N_PROPS. |
| 50 | }; |
| 51 | |
| 52 | G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GtkTextViewChild, gtk_text_view_child, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!) |
| 53 | |
| 54 | static GParamSpeccxx . . $ GParamSpec# *propertiescxx . . $ properties.[N_PROPScxx . . $ N_PROPS.]; |
| 55 | |
| 56 | static Overlaycxx . . $ Overlay# * |
| 57 | overlay_newcxx . . $ overlay_new(112605decb8ea06b). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 58 | int x, |
| 59 | int y) |
| 60 | { |
| 61 | Overlaycxx . . $ Overlay# *overlay; |
| 62 | |
| 63 | overlay = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (Overlay, 1); |
| 64 | overlay->linkcxx . . $ $anonymous_type_a0d33019041ef297_0#link..datacxx . . $ _GList#data. = overlay; |
| 65 | overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (widget); |
| 66 | overlay->xcxx . . $ $anonymous_type_a0d33019041ef297_0#x. = x; |
| 67 | overlay->ycxx . . $ $anonymous_type_a0d33019041ef297_0#y. = y; |
| 68 | |
| 69 | return overlay; |
| 70 | } |
| 71 | |
| 72 | static void |
| 73 | overlay_freecxx . . $ overlay_free(fefdbc87dcc9b78c). (Overlaycxx . . $ Overlay# *overlay) |
| 74 | { |
| 75 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (overlay->link.prev == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 76 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (overlay->link.next == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 77 | |
| 78 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget.); |
| 79 | g_freecxx . . $ g_free(5d22bdacc48458e8). (overlay); |
| 80 | } |
| 81 | |
| 82 | static void |
| 83 | gtk_text_view_child_remove_overlaycxx . . $ gtk_text_view_child_remove_overlay(dd9c42f60c318557). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 84 | Overlaycxx . . $ Overlay# *overlay) |
| 85 | { |
| 86 | g_queue_unlinkcxx . . $ g_queue_unlink(96ce99f588d6cd0e). (&self->overlayscxx . . $ _GtkTextViewChild#overlays., &overlay->linkcxx . . $ $anonymous_type_a0d33019041ef297_0#link.); |
| 87 | gtk_widget_unparentcxx . . $ gtk_widget_unparent(d7cf858254b37903). (overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget.); |
| 88 | overlay_freecxx . . $ overlay_free(fefdbc87dcc9b78c). (overlay); |
| 89 | } |
| 90 | |
| 91 | static Overlaycxx . . $ Overlay# * |
| 92 | gtk_text_view_child_get_overlaycxx . . $ gtk_text_view_child_get_overlay(1af50a8253ea6d39). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 93 | GtkWidgetcxx . . $ GtkWidget# *widget) |
| 94 | { |
| 95 | GListcxx . . $ GList# *iter; |
| 96 | |
| 97 | for (iter = self->overlayscxx . . $ _GtkTextViewChild#overlays..headcxx . . $ _GQueue#head.; iter; iter = iter->nextcxx . . $ _GList#next.) |
| 98 | { |
| 99 | Overlaycxx . . $ Overlay# *overlay = iter->datacxx . . $ _GList#data.; |
| 100 | |
| 101 | if (overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget. == widget) |
| 102 | return overlay; |
| 103 | } |
| 104 | |
| 105 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 106 | } |
| 107 | |
| 108 | void |
| 109 | gtk_text_view_child_addcxx . . $ gtk_text_view_child_add(7e303cef3aa2b2ee). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 110 | GtkWidgetcxx . . $ GtkWidget# *widget) |
| 111 | { |
| 112 | if (self->childcxx . . $ _GtkTextViewChild#child. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 113 | { |
| 114 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("%s allows a single child and already contains a %s", |
| 115 | G_OBJECT_TYPE_NAMEcxx . . $ `<external>/1341695927569185362/gobject.h:108:9`! (self), |
| 116 | G_OBJECT_TYPE_NAMEcxx . . $ `<external>/1341695927569185362/gobject.h:108:9`! (widget)); |
| 117 | return; |
| 118 | } |
| 119 | |
| 120 | self->childcxx . . $ _GtkTextViewChild#child. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (widget); |
| 121 | gtk_widget_set_parentcxx . . $ gtk_widget_set_parent(4f261c0971c30e7). (widget, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 122 | } |
| 123 | |
| 124 | void |
| 125 | gtk_text_view_child_removecxx . . $ gtk_text_view_child_remove(7e303cef3aa2b2ee). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 126 | GtkWidgetcxx . . $ GtkWidget# *widget) |
| 127 | { |
| 128 | if (widget == self->childcxx . . $ _GtkTextViewChild#child.) |
| 129 | { |
| 130 | self->childcxx . . $ _GtkTextViewChild#child. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 131 | gtk_widget_unparentcxx . . $ gtk_widget_unparent(d7cf858254b37903). (widget); |
| 132 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (widget); |
| 133 | } |
| 134 | else |
| 135 | { |
| 136 | Overlaycxx . . $ Overlay# *overlay = gtk_text_view_child_get_overlaycxx . . $ gtk_text_view_child_get_overlay(1af50a8253ea6d39). (self, widget); |
| 137 | |
| 138 | if (overlay != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 139 | gtk_text_view_child_remove_overlaycxx . . $ gtk_text_view_child_remove_overlay(dd9c42f60c318557). (self, overlay); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | static void |
| 144 | gtk_text_view_child_measurecxx . . $ gtk_text_view_child_measure(d91afbd837fc0c19). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 145 | GtkOrientationcxx . . $ GtkOrientation# orientation, |
| 146 | int for_size, |
| 147 | int *min_size, |
| 148 | int *nat_size, |
| 149 | int *min_baseline, |
| 150 | int *nat_baseline) |
| 151 | { |
| 152 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (widget); |
| 153 | const GListcxx . . $ GList# *iter; |
| 154 | int real_min_size = 0; |
| 155 | int real_nat_size = 0; |
| 156 | |
| 157 | if (self->childcxx . . $ _GtkTextViewChild#child. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 158 | gtk_widget_measurecxx . . $ gtk_widget_measure(d91afbd837fc0c19). (self->childcxx . . $ _GtkTextViewChild#child., |
| 159 | orientation, |
| 160 | for_size, |
| 161 | &real_min_size, |
| 162 | &real_nat_size, |
| 163 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 164 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 165 | |
| 166 | for (iter = self->overlayscxx . . $ _GtkTextViewChild#overlays..headcxx . . $ _GQueue#head.; iter; iter = iter->nextcxx . . $ _GList#next.) |
| 167 | { |
| 168 | Overlaycxx . . $ Overlay# *overlay = iter->datacxx . . $ _GList#data.; |
| 169 | int child_min_size = 0; |
| 170 | int child_nat_size = 0; |
| 171 | |
| 172 | gtk_widget_measurecxx . . $ gtk_widget_measure(d91afbd837fc0c19). (overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget., |
| 173 | orientation, |
| 174 | for_size, |
| 175 | &child_min_size, |
| 176 | &child_nat_size, |
| 177 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 178 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 179 | |
| 180 | if (child_min_size > real_min_size) |
| 181 | real_min_size = child_min_size; |
| 182 | |
| 183 | if (child_nat_size > real_nat_size) |
| 184 | real_nat_size = child_nat_size; |
| 185 | } |
| 186 | |
| 187 | if (min_size) |
| 188 | *min_size = real_min_size; |
| 189 | |
| 190 | if (nat_size) |
| 191 | *nat_size = real_nat_size; |
| 192 | |
| 193 | if (min_baseline) |
| 194 | *min_baseline = -1; |
| 195 | |
| 196 | if (nat_baseline) |
| 197 | *nat_baseline = -1; |
| 198 | } |
| 199 | |
| 200 | static void |
| 201 | gtk_text_view_child_size_allocatecxx . . $ gtk_text_view_child_size_allocate(598a503332136822). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 202 | int width, |
| 203 | int height, |
| 204 | int baseline) |
| 205 | { |
| 206 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (widget); |
| 207 | GtkRequisitioncxx . . $ GtkRequisition# min_req; |
| 208 | GdkRectanglecxx . . $ GdkRectangle# rect; |
| 209 | const GListcxx . . $ GList# *iter; |
| 210 | |
| 211 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_text_view_child_parent_class)->size_allocatecxx . . $ _GtkWidgetClass#size_allocate. (widget, width, height, baseline); |
| 212 | |
| 213 | if (self->childcxx . . $ _GtkTextViewChild#child. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 214 | { |
| 215 | rect.xcxx . . $ _cairo_rectangle_int#x. = 0; |
| 216 | rect.ycxx . . $ _cairo_rectangle_int#y. = 0; |
| 217 | rect.widthcxx . . $ _cairo_rectangle_int#width. = width; |
| 218 | rect.heightcxx . . $ _cairo_rectangle_int#height. = height; |
| 219 | |
| 220 | gtk_widget_size_allocatecxx . . $ gtk_widget_size_allocate(6dbef67925be57e3). (self->childcxx . . $ _GtkTextViewChild#child., &rect, baseline); |
| 221 | } |
| 222 | |
| 223 | for (iter = self->overlayscxx . . $ _GtkTextViewChild#overlays..headcxx . . $ _GQueue#head.; iter; iter = iter->nextcxx . . $ _GList#next.) |
| 224 | { |
| 225 | Overlaycxx . . $ Overlay# *overlay = iter->datacxx . . $ _GList#data.; |
| 226 | |
| 227 | gtk_widget_get_preferred_sizecxx . . $ gtk_widget_get_preferred_size(a04c30c006717235). (overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget., &min_req, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 228 | |
| 229 | rect.widthcxx . . $ _cairo_rectangle_int#width. = min_req.widthcxx . . $ _GtkRequisition#width.; |
| 230 | rect.heightcxx . . $ _cairo_rectangle_int#height. = min_req.heightcxx . . $ _GtkRequisition#height.; |
| 231 | |
| 232 | if (self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT. || |
| 233 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_TOPcxx . . $ GTK_TEXT_WINDOW_TOP. || |
| 234 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_BOTTOMcxx . . $ GTK_TEXT_WINDOW_BOTTOM.) |
| 235 | rect.xcxx . . $ _cairo_rectangle_int#x. = overlay->xcxx . . $ $anonymous_type_a0d33019041ef297_0#x. - self->xoffsetcxx . . $ _GtkTextViewChild#xoffset.; |
| 236 | else |
| 237 | rect.xcxx . . $ _cairo_rectangle_int#x. = overlay->xcxx . . $ $anonymous_type_a0d33019041ef297_0#x.; |
| 238 | |
| 239 | if (self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT. || |
| 240 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_RIGHTcxx . . $ GTK_TEXT_WINDOW_RIGHT. || |
| 241 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_LEFTcxx . . $ GTK_TEXT_WINDOW_LEFT.) |
| 242 | rect.ycxx . . $ _cairo_rectangle_int#y. = overlay->ycxx . . $ $anonymous_type_a0d33019041ef297_0#y. - self->yoffsetcxx . . $ _GtkTextViewChild#yoffset.; |
| 243 | else |
| 244 | rect.ycxx . . $ _cairo_rectangle_int#y. = overlay->ycxx . . $ $anonymous_type_a0d33019041ef297_0#y.; |
| 245 | |
| 246 | gtk_widget_size_allocatecxx . . $ gtk_widget_size_allocate(6dbef67925be57e3). (overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget., &rect, -1); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | static void |
| 251 | gtk_text_view_child_snapshotcxx . . $ gtk_text_view_child_snapshot(80012d1141bb3efa). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 252 | GtkSnapshotcxx . . $ GtkSnapshot# *snapshot) |
| 253 | { |
| 254 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (widget); |
| 255 | const GListcxx . . $ GList# *iter; |
| 256 | |
| 257 | if (self->childcxx . . $ _GtkTextViewChild#child.) |
| 258 | gtk_widget_snapshot_childcxx . . $ gtk_widget_snapshot_child(70f87a8b59fe0054). (widget, self->childcxx . . $ _GtkTextViewChild#child., snapshot); |
| 259 | |
| 260 | for (iter = self->overlayscxx . . $ _GtkTextViewChild#overlays..headcxx . . $ _GQueue#head.; iter; iter = iter->nextcxx . . $ _GList#next.) |
| 261 | { |
| 262 | Overlaycxx . . $ Overlay# *overlay = iter->datacxx . . $ _GList#data.; |
| 263 | |
| 264 | gtk_widget_snapshot_childcxx . . $ gtk_widget_snapshot_child(70f87a8b59fe0054). (widget, overlay->widgetcxx . . $ $anonymous_type_a0d33019041ef297_0#widget., snapshot); |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | static void |
| 269 | gtk_text_view_child_constructedcxx . . $ gtk_text_view_child_constructed(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 270 | { |
| 271 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (object); |
| 272 | GtkCssNodecxx . . $ GtkCssNode# *css_node; |
| 273 | |
| 274 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_text_view_child_parent_class)->constructedcxx . . $ _GObjectClass#constructed. (object); |
| 275 | |
| 276 | css_node = gtk_widget_get_css_nodecxx . . $ gtk_widget_get_css_node(e7b0819f4c134bd6). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 277 | |
| 278 | switch (self->window_typecxx . . $ _GtkTextViewChild#window_type.) |
| 279 | { |
| 280 | case GTK_TEXT_WINDOW_LEFTcxx . . $ GTK_TEXT_WINDOW_LEFT.: |
| 281 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("border")); |
| 282 | gtk_css_node_add_classcxx . . $ gtk_css_node_add_class(232e7a68103302e0). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("left")); |
| 283 | break; |
| 284 | |
| 285 | case GTK_TEXT_WINDOW_RIGHTcxx . . $ GTK_TEXT_WINDOW_RIGHT.: |
| 286 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("border")); |
| 287 | gtk_css_node_add_classcxx . . $ gtk_css_node_add_class(232e7a68103302e0). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("right")); |
| 288 | break; |
| 289 | |
| 290 | case GTK_TEXT_WINDOW_TOPcxx . . $ GTK_TEXT_WINDOW_TOP.: |
| 291 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("border")); |
| 292 | gtk_css_node_add_classcxx . . $ gtk_css_node_add_class(232e7a68103302e0). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("top")); |
| 293 | break; |
| 294 | |
| 295 | case GTK_TEXT_WINDOW_BOTTOMcxx . . $ GTK_TEXT_WINDOW_BOTTOM.: |
| 296 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("border")); |
| 297 | gtk_css_node_add_classcxx . . $ gtk_css_node_add_class(232e7a68103302e0). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("bottom")); |
| 298 | break; |
| 299 | |
| 300 | case GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT.: |
| 301 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (css_node, g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("child")); |
| 302 | break; |
| 303 | |
| 304 | case GTK_TEXT_WINDOW_WIDGETcxx . . $ GTK_TEXT_WINDOW_WIDGET.: |
| 305 | default: |
| 306 | break; |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | static void |
| 311 | gtk_text_view_child_get_propertycxx . . $ gtk_text_view_child_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 312 | guintcxx . . $ guint# prop_id, |
| 313 | GValuecxx . . $ GValue# *value, |
| 314 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 315 | { |
| 316 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (object); |
| 317 | |
| 318 | switch (prop_id) |
| 319 | { |
| 320 | case PROP_WINDOW_TYPEcxx . . $ PROP_WINDOW_TYPE.: |
| 321 | g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, self->window_typecxx . . $ _GtkTextViewChild#window_type.); |
| 322 | break; |
| 323 | |
| 324 | default: |
| 325 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | static void |
| 330 | gtk_text_view_child_set_propertycxx . . $ gtk_text_view_child_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 331 | guintcxx . . $ guint# prop_id, |
| 332 | const GValuecxx . . $ GValue# *value, |
| 333 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 334 | { |
| 335 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (object); |
| 336 | |
| 337 | switch (prop_id) |
| 338 | { |
| 339 | case PROP_WINDOW_TYPEcxx . . $ PROP_WINDOW_TYPE.: |
| 340 | self->window_typecxx . . $ _GtkTextViewChild#window_type. = g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value); |
| 341 | break; |
| 342 | |
| 343 | default: |
| 344 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | static void |
| 349 | gtk_text_view_child_disposecxx . . $ gtk_text_view_child_dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 350 | { |
| 351 | GtkTextViewChildcxx . . $ GtkTextViewChild# *self = GTK_TEXT_VIEW_CHILDcxx . . $ GTK_TEXT_VIEW_CHILD(9b146f39aafbc3f3). (object); |
| 352 | GtkWidgetcxx . . $ GtkWidget# *child; |
| 353 | |
| 354 | while ((child = gtk_widget_get_first_childcxx . . $ gtk_widget_get_first_child(ef973e1b01680070). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)))) |
| 355 | gtk_text_view_child_removecxx . . $ gtk_text_view_child_remove(7e303cef3aa2b2ee). (self, child); |
| 356 | |
| 357 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_text_view_child_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object); |
| 358 | } |
| 359 | |
| 360 | static void |
| 361 | gtk_text_view_child_class_initcxx . . $ gtk_text_view_child_class_init(61debab1f1489ad3). (GtkTextViewChildClasscxx . . $ GtkTextViewChildClass# *klass) |
| 362 | { |
| 363 | GObjectClasscxx . . $ GObjectClass# *object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass); |
| 364 | GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (klass); |
| 365 | |
| 366 | object_class->disposecxx . . $ _GObjectClass#dispose. = gtk_text_view_child_disposecxx . . $ gtk_text_view_child_dispose(6087475fa43034d3).; |
| 367 | object_class->constructedcxx . . $ _GObjectClass#constructed. = gtk_text_view_child_constructedcxx . . $ gtk_text_view_child_constructed(6087475fa43034d3).; |
| 368 | object_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_text_view_child_get_propertycxx . . $ gtk_text_view_child_get_property(cee2c52f22407c66).; |
| 369 | object_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_text_view_child_set_propertycxx . . $ gtk_text_view_child_set_property(d7c4bb29f36c0dc4).; |
| 370 | |
| 371 | widget_class->measurecxx . . $ _GtkWidgetClass#measure. = gtk_text_view_child_measurecxx . . $ gtk_text_view_child_measure(d91afbd837fc0c19).; |
| 372 | widget_class->size_allocatecxx . . $ _GtkWidgetClass#size_allocate. = gtk_text_view_child_size_allocatecxx . . $ gtk_text_view_child_size_allocate(598a503332136822).; |
| 373 | widget_class->snapshotcxx . . $ _GtkWidgetClass#snapshot. = gtk_text_view_child_snapshotcxx . . $ gtk_text_view_child_snapshot(80012d1141bb3efa).; |
| 374 | |
| 375 | /** |
| 376 | * GtkTextViewChild:window-type: |
| 377 | * |
| 378 | * The "window-type" property is the `GtkTextWindowType` of the |
| 379 | * `GtkTextView` that the child is attached. |
| 380 | */ |
| 381 | propertiescxx . . $ properties.[PROP_WINDOW_TYPEcxx . . $ PROP_WINDOW_TYPE.] = |
| 382 | g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("window-type", 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`!, |
| 383 | GTK_TYPE_TEXT_WINDOW_TYPEcxx . . $ `build/gtk/gtktypebuiltins.h:348:9`!, |
| 384 | GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT., |
| 385 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_CONSTRUCT_ONLYcxx . . $ G_PARAM_CONSTRUCT_ONLY.|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 386 | |
| 387 | g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (object_class, N_PROPScxx . . $ N_PROPS., propertiescxx . . $ properties.); |
| 388 | } |
| 389 | |
| 390 | static void |
| 391 | gtk_text_view_child_initcxx . . $ gtk_text_view_child_init(3aeb2e8da9d753c0). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self) |
| 392 | { |
| 393 | self->window_typecxx . . $ _GtkTextViewChild#window_type. = GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT.; |
| 394 | |
| 395 | gtk_widget_set_overflowcxx . . $ gtk_widget_set_overflow(2238e5c1f303423). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), GTK_OVERFLOW_HIDDENcxx . . $ GTK_OVERFLOW_HIDDEN.); |
| 396 | } |
| 397 | |
| 398 | GtkWidgetcxx . . $ GtkWidget# * |
| 399 | gtk_text_view_child_newcxx . . $ gtk_text_view_child_new(afa92606cbc84749). (GtkTextWindowTypecxx . . $ GtkTextWindowType# window_type) |
| 400 | { |
| 401 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (window_type == GTK_TEXT_WINDOW_LEFT || |
| 402 | window_type == GTK_TEXT_WINDOW_RIGHT || |
| 403 | window_type == GTK_TEXT_WINDOW_TOP || |
| 404 | window_type == GTK_TEXT_WINDOW_BOTTOM || |
| 405 | window_type == GTK_TEXT_WINDOW_TEXT, |
| 406 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 407 | |
| 408 | return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_TEXT_VIEW_CHILDcxx . . $ `gtk/gtktextviewchildprivate.h:23:9`!, |
| 409 | "window-type", window_type, |
| 410 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 411 | } |
| 412 | |
| 413 | void |
| 414 | gtk_text_view_child_add_overlaycxx . . $ gtk_text_view_child_add_overlay(968c873d71ec574c). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 415 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 416 | int xpos, |
| 417 | int ypos) |
| 418 | { |
| 419 | Overlaycxx . . $ Overlay# *overlay; |
| 420 | |
| 421 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_TEXT_VIEW_CHILD (self)); |
| 422 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_WIDGETcxx . . $ `gtk/gtkwidget.h:46:9`! (widget)); |
| 423 | |
| 424 | overlay = overlay_newcxx . . $ overlay_new(112605decb8ea06b). (widget, xpos, ypos); |
| 425 | g_queue_push_tailcxx . . $ g_queue_push_tail(e8f7e029e141fccb). (&self->overlayscxx . . $ _GtkTextViewChild#overlays., &overlay->linkcxx . . $ $anonymous_type_a0d33019041ef297_0#link.); |
| 426 | gtk_widget_set_parentcxx . . $ gtk_widget_set_parent(4f261c0971c30e7). (widget, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 427 | } |
| 428 | |
| 429 | void |
| 430 | gtk_text_view_child_move_overlaycxx . . $ gtk_text_view_child_move_overlay(968c873d71ec574c). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 431 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 432 | int xpos, |
| 433 | int ypos) |
| 434 | { |
| 435 | Overlaycxx . . $ Overlay# *overlay; |
| 436 | |
| 437 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_TEXT_VIEW_CHILD (self)); |
| 438 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_WIDGETcxx . . $ `gtk/gtkwidget.h:46:9`! (widget)); |
| 439 | |
| 440 | overlay = gtk_text_view_child_get_overlaycxx . . $ gtk_text_view_child_get_overlay(1af50a8253ea6d39). (self, widget); |
| 441 | |
| 442 | if (overlay != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 443 | { |
| 444 | overlay->xcxx . . $ $anonymous_type_a0d33019041ef297_0#x. = xpos; |
| 445 | overlay->ycxx . . $ $anonymous_type_a0d33019041ef297_0#y. = ypos; |
| 446 | |
| 447 | if (gtk_widget_get_visiblecxx . . $ gtk_widget_get_visible(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)) && |
| 448 | gtk_widget_get_visiblecxx . . $ gtk_widget_get_visible(9247ef2dc26c5426). (widget)) |
| 449 | gtk_widget_queue_allocatecxx . . $ gtk_widget_queue_allocate(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | GtkTextWindowTypecxx . . $ GtkTextWindowType# |
| 454 | gtk_text_view_child_get_window_typecxx . . $ gtk_text_view_child_get_window_type(caa3e8c781736458). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self) |
| 455 | { |
| 456 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_TEXT_VIEW_CHILD (self), 0); |
| 457 | |
| 458 | return self->window_typecxx . . $ _GtkTextViewChild#window_type.; |
| 459 | } |
| 460 | |
| 461 | void |
| 462 | gtk_text_view_child_set_offsetcxx . . $ gtk_text_view_child_set_offset(694e31aa3570917d). (GtkTextViewChildcxx . . $ GtkTextViewChild# *self, |
| 463 | int xoffset, |
| 464 | int yoffset) |
| 465 | { |
| 466 | gbooleancxx . . $ gboolean# changed = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 467 | |
| 468 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_TEXT_VIEW_CHILD (self)); |
| 469 | |
| 470 | if (self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT. || |
| 471 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_TOPcxx . . $ GTK_TEXT_WINDOW_TOP. || |
| 472 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_BOTTOMcxx . . $ GTK_TEXT_WINDOW_BOTTOM.) |
| 473 | { |
| 474 | if (self->xoffsetcxx . . $ _GtkTextViewChild#xoffset. != xoffset) |
| 475 | { |
| 476 | self->xoffsetcxx . . $ _GtkTextViewChild#xoffset. = xoffset; |
| 477 | changed = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | if (self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_TEXTcxx . . $ GTK_TEXT_WINDOW_TEXT. || |
| 482 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_LEFTcxx . . $ GTK_TEXT_WINDOW_LEFT. || |
| 483 | self->window_typecxx . . $ _GtkTextViewChild#window_type. == GTK_TEXT_WINDOW_RIGHTcxx . . $ GTK_TEXT_WINDOW_RIGHT.) |
| 484 | { |
| 485 | if (self->yoffsetcxx . . $ _GtkTextViewChild#yoffset. != yoffset) |
| 486 | { |
| 487 | self->yoffsetcxx . . $ _GtkTextViewChild#yoffset. = yoffset; |
| 488 | changed = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | if (changed) |
| 493 | gtk_widget_queue_allocatecxx . . $ gtk_widget_queue_allocate(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 494 | } |