| 1 | /* |
| 2 | * Copyright (C) 2017 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 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, write to the |
| 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 17 | * Boston, MA 02111-1307, USA. |
| 18 | */ |
| 19 | |
| 20 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 21 | |
| 22 | #include "gsk/gsk.h"cxx . . $ `<file>/gsk/gsk.h`/ |
| 23 | #include "gsk/gskrendernodeprivate.h"cxx . . $ `<file>/gsk/gskrendernodeprivate.h`/ |
| 24 | #include "gskpangoprivate.h"cxx . . $ `<file>/gtk/gskpangoprivate.h`/ |
| 25 | #include "gtkpangoprivate.h"cxx . . $ `<file>/gtk/gtkpangoprivate.h`/ |
| 26 | #include "gtksnapshotprivate.h"cxx . . $ `<file>/gtk/gtksnapshotprivate.h`/ |
| 27 | #include "gtktextlayoutprivate.h"cxx . . $ `<file>/gtk/gtktextlayoutprivate.h`/ |
| 28 | #include "gtktextviewprivate.h"cxx . . $ `<file>/gtk/gtktextviewprivate.h`/ |
| 29 | #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/ |
| 30 | #include "gtkcsscolorvalueprivate.h"cxx . . $ `<file>/gtk/gtkcsscolorvalueprivate.h`/ |
| 31 | #include "gdk/gdkrgbaprivate.h"cxx . . $ `<file>/gdk/gdkrgbaprivate.h`/ |
| 32 | #include "gdk/gdkcolorprivate.h"cxx . . $ `<file>/gdk/gdkcolorprivate.h`/ |
| 33 | #include "gdk/gdkcairoprivate.h"cxx . . $ `<file>/gdk/gdkcairoprivate.h`/ |
| 34 | #include "gtkcssshadowvalueprivate.h"cxx . . $ `<file>/gtk/gtkcssshadowvalueprivate.h`/ |
| 35 | |
| 36 | #include <math.h> |
| 37 | |
| 38 | #include <pango/pango.h> |
| 39 | #include <cairo.h> |
| 40 | |
| 41 | G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GskPangoRenderer, gsk_pango_renderer, PANGO_TYPE_RENDERERcxx . . $ `<external>/9172916499229551938/pango-renderer.h:28:9`!) |
| 42 | |
| 43 | void |
| 44 | gsk_pango_renderer_set_statecxx . . $ gsk_pango_renderer_set_state(c78afd67ab7c879b). (GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer, |
| 45 | GskPangoRendererStatecxx . . $ GskPangoRendererState# state) |
| 46 | { |
| 47 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GSK_IS_PANGO_RENDERERcxx . . $ `gtk/gskpangoprivate.h:29:9`! (crenderer)); |
| 48 | |
| 49 | crenderer->statecxx . . $ _GskPangoRenderer#state. = state; |
| 50 | } |
| 51 | |
| 52 | void |
| 53 | gsk_pango_renderer_set_shape_handlercxx . . $ gsk_pango_renderer_set_shape_handler(d05e6c41947b29b9). (GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer, |
| 54 | GskPangoShapeHandlercxx . . $ GskPangoShapeHandler# handler) |
| 55 | { |
| 56 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GSK_IS_PANGO_RENDERERcxx . . $ `gtk/gskpangoprivate.h:29:9`! (crenderer)); |
| 57 | |
| 58 | crenderer->shape_handlercxx . . $ _GskPangoRenderer#shape_handler. = handler; |
| 59 | } |
| 60 | |
| 61 | static void |
| 62 | get_colorcxx . . $ get_color(6b3287f187041684). (GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer, |
| 63 | PangoRenderPartcxx . . $ PangoRenderPart# part, |
| 64 | GdkColorcxx . . $ GdkColor# *out_color) |
| 65 | { |
| 66 | const PangoColorcxx . . $ PangoColor# *color = pango_renderer_get_colorcxx . . $ pango_renderer_get_color(30c850831fd541f4). ((PangoRenderercxx . . $ PangoRenderer# *) (crenderer), part); |
| 67 | const guint16cxx . . $ guint16# a = pango_renderer_get_alphacxx . . $ pango_renderer_get_alpha(ac275297f35e42f). ((PangoRenderercxx . . $ PangoRenderer# *) (crenderer), part); |
| 68 | |
| 69 | if (color) |
| 70 | { |
| 71 | gdk_color_initcxx . . $ `gdk/gdkcolorimpl.h:26:9`! (out_color, GDK_COLOR_STATE_SRGBcxx . . $ `gdk/gdkcolorstateprivate.h:87:9`!, |
| 72 | (float[]) { |
| 73 | color->red / 65535., |
| 74 | color->green / 65535., |
| 75 | color->blue / 65535., |
| 76 | a ? a / 65535. : crenderer->fg_color.alpha, |
| 77 | }); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | gdk_color_init_copycxx . . $ `gdk/gdkcolorimpl.h:36:9`! (out_color, &crenderer->fg_color); |
| 82 | if (a) |
| 83 | out_color->alphacxx . . $ _GdkColor#$anonymous_type_0#$anonymous_type_2#alpha. = a / 65535.; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | static void |
| 88 | set_colorcxx . . $ set_color(7f458e9f58048887). (GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer, |
| 89 | PangoRenderPartcxx . . $ PangoRenderPart# part, |
| 90 | cairo_tcxx . . $ cairo_t# *cr) |
| 91 | { |
| 92 | GdkColorcxx . . $ GdkColor# color; |
| 93 | |
| 94 | get_colorcxx . . $ get_color(6b3287f187041684). (crenderer, part, &color); |
| 95 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(c5da13cceeadde2d). (cr, GDK_COLOR_STATE_SRGBcxx . . $ `gdk/gdkcolorstateprivate.h:87:9`!, &color); |
| 96 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&color); |
| 97 | } |
| 98 | |
| 99 | static void |
| 100 | get_item_boundscxx . . $ get_item_bounds(d54e9736191192a6). (PangoGlyphItemcxx . . $ PangoGlyphItem# *run, |
| 101 | graphene_rect_tcxx . . $ graphene_rect_t# *bounds) |
| 102 | { |
| 103 | PangoRectanglecxx . . $ PangoRectangle# ink_rect; |
| 104 | |
| 105 | pango_glyph_string_extentscxx . . $ pango_glyph_string_extents(703990e83ec1240f). (run->glyphscxx . . $ _PangoGlyphItem#glyphs., run->itemcxx . . $ _PangoGlyphItem#item.->analysiscxx . . $ _PangoItem#analysis..fontcxx . . $ _PangoAnalysis#font., &ink_rect, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 106 | pango_extents_to_pixelscxx . . $ pango_extents_to_pixels(42adcddf8c59c820). (&ink_rect, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 107 | graphene_rect_initcxx . . $ graphene_rect_init(41a513f04ded43b4). (bounds, ink_rect.xcxx . . $ _PangoRectangle#x., ink_rect.ycxx . . $ _PangoRectangle#y., ink_rect.widthcxx . . $ _PangoRectangle#width., ink_rect.heightcxx . . $ _PangoRectangle#height.); |
| 108 | } |
| 109 | |
| 110 | static void |
| 111 | gsk_pango_renderer_draw_glyph_itemcxx . . $ gsk_pango_renderer_draw_glyph_item(c30bc1835675b706). (PangoRenderercxx . . $ PangoRenderer# *renderer, |
| 112 | const char *text, |
| 113 | PangoGlyphItemcxx . . $ PangoGlyphItem# *glyph_item, |
| 114 | int x, |
| 115 | int y) |
| 116 | { |
| 117 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer = (GskPangoRenderercxx . . $ GskPangoRenderer# *) (renderer); |
| 118 | GdkColorcxx . . $ GdkColor# text_color; |
| 119 | GtkCssValuecxx . . $ GtkCssValue# *text_shadow; |
| 120 | gbooleancxx . . $ gboolean# has_color_glyphs; |
| 121 | gbooleancxx . . $ gboolean# has_alpha; |
| 122 | |
| 123 | if (!glyph_item->itemcxx . . $ _PangoGlyphItem#item.->analysiscxx . . $ _PangoItem#analysis..fontcxx . . $ _PangoAnalysis#font.) |
| 124 | return; |
| 125 | |
| 126 | has_color_glyphs = gtk_pango_glyph_item_has_color_glyphscxx . . $ gtk_pango_glyph_item_has_color_glyphs(f118a5b2d4d715bc). (glyph_item); |
| 127 | |
| 128 | if (crenderer->shadow_stylecxx . . $ _GskPangoRenderer#shadow_style.) |
| 129 | text_shadow = crenderer->shadow_stylecxx . . $ _GskPangoRenderer#shadow_style.->usedcxx . . $ _GtkCssStyle#used.->text_shadowcxx . . $ _GtkCssUsedValues#text_shadow.; |
| 130 | else |
| 131 | text_shadow = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 132 | |
| 133 | if (text_shadow && !gtk_css_shadow_value_is_clearcxx . . $ gtk_css_shadow_value_is_clear(8222c132d23033c0). (text_shadow)) |
| 134 | { |
| 135 | graphene_point_tcxx . . $ graphene_point_t# offset; |
| 136 | GdkColorcxx . . $ GdkColor# color; |
| 137 | double radius; |
| 138 | |
| 139 | gtk_css_shadow_value_get_offsetcxx . . $ gtk_css_shadow_value_get_offset(d74035d2ab4b09e). (text_shadow, 0, &offset); |
| 140 | gtk_css_shadow_value_get_colorcxx . . $ gtk_css_shadow_value_get_color(ffbeeafd2743167b). (text_shadow, 0, &color); |
| 141 | radius = gtk_css_shadow_value_get_radiuscxx . . $ gtk_css_shadow_value_get_radius(9576244cd12fd531). (text_shadow, 0); |
| 142 | |
| 143 | gtk_snapshot_savecxx . . $ gtk_snapshot_save(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 144 | gtk_snapshot_translatecxx . . $ gtk_snapshot_translate(c73e8a4383f18867). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., &offset); |
| 145 | |
| 146 | if (radius != 0) |
| 147 | gtk_snapshot_push_blurcxx . . $ gtk_snapshot_push_blur(2e366f2d8f7ead54). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., radius); |
| 148 | |
| 149 | if (has_color_glyphs) |
| 150 | { |
| 151 | GdkColorcxx . . $ GdkColor# black = GDK_COLOR_SRGBcxx . . $ `gdk/gdkcolorprivate.h:67:9`! (0, 0, 0, 1); |
| 152 | graphene_rect_tcxx . . $ graphene_rect_t# bounds; |
| 153 | |
| 154 | get_item_boundscxx . . $ get_item_bounds(d54e9736191192a6). (glyph_item, &bounds); |
| 155 | gtk_snapshot_push_maskcxx . . $ gtk_snapshot_push_mask(d50594115173f4c). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., GSK_MASK_MODE_ALPHAcxx . . $ GSK_MASK_MODE_ALPHA.); |
| 156 | |
| 157 | gtk_snapshot_add_textcxx . . $ gtk_snapshot_add_text(7f59cabde7933430). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 158 | glyph_item->itemcxx . . $ _PangoGlyphItem#item.->analysiscxx . . $ _PangoItem#analysis..fontcxx . . $ _PangoAnalysis#font., |
| 159 | glyph_item->glyphscxx . . $ _PangoGlyphItem#glyphs., |
| 160 | &black, |
| 161 | (float) x / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 162 | (float) y / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 163 | |
| 164 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 165 | gtk_snapshot_add_colorcxx . . $ gtk_snapshot_add_color(9c0a6ce7ee2317a7). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., &color, &bounds); |
| 166 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 167 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&black); |
| 168 | } |
| 169 | else |
| 170 | { |
| 171 | gtk_snapshot_add_textcxx . . $ gtk_snapshot_add_text(7f59cabde7933430). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 172 | glyph_item->itemcxx . . $ _PangoGlyphItem#item.->analysiscxx . . $ _PangoItem#analysis..fontcxx . . $ _PangoAnalysis#font., |
| 173 | glyph_item->glyphscxx . . $ _PangoGlyphItem#glyphs., |
| 174 | &color, |
| 175 | (float) x / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 176 | (float) y / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 177 | } |
| 178 | |
| 179 | if (radius != 0) |
| 180 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 181 | |
| 182 | gtk_snapshot_restorecxx . . $ gtk_snapshot_restore(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 183 | |
| 184 | } |
| 185 | |
| 186 | get_colorcxx . . $ get_color(6b3287f187041684). (crenderer, PANGO_RENDER_PART_FOREGROUNDcxx . . $ PANGO_RENDER_PART_FOREGROUND., &text_color); |
| 187 | |
| 188 | has_alpha = !gdk_color_is_opaquecxx . . $ `gdk/gdkcolorimpl.h:86:9`! (&text_color); |
| 189 | |
| 190 | if (has_color_glyphs && has_alpha) |
| 191 | { |
| 192 | gtk_snapshot_push_opacitycxx . . $ gtk_snapshot_push_opacity(2e366f2d8f7ead54). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., text_color.alphacxx . . $ _GdkColor#$anonymous_type_0#$anonymous_type_2#alpha.); |
| 193 | text_color.alphacxx . . $ _GdkColor#$anonymous_type_0#$anonymous_type_2#alpha. = 1; |
| 194 | } |
| 195 | |
| 196 | gtk_snapshot_add_textcxx . . $ gtk_snapshot_add_text(7f59cabde7933430). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 197 | glyph_item->itemcxx . . $ _PangoGlyphItem#item.->analysiscxx . . $ _PangoItem#analysis..fontcxx . . $ _PangoAnalysis#font., |
| 198 | glyph_item->glyphscxx . . $ _PangoGlyphItem#glyphs., |
| 199 | &text_color, |
| 200 | (float) x / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 201 | (float) y / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 202 | |
| 203 | if (has_color_glyphs && has_alpha) |
| 204 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 205 | |
| 206 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&text_color); |
| 207 | } |
| 208 | |
| 209 | static void |
| 210 | gsk_pango_renderer_draw_rectanglecxx . . $ gsk_pango_renderer_draw_rectangle(2724915d8391417e). (PangoRenderercxx . . $ PangoRenderer# *renderer, |
| 211 | PangoRenderPartcxx . . $ PangoRenderPart# part, |
| 212 | int x, |
| 213 | int y, |
| 214 | int width, |
| 215 | int height) |
| 216 | { |
| 217 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer = (GskPangoRenderercxx . . $ GskPangoRenderer# *) (renderer); |
| 218 | GdkColorcxx . . $ GdkColor# color; |
| 219 | |
| 220 | get_colorcxx . . $ get_color(6b3287f187041684). (crenderer, part, &color); |
| 221 | |
| 222 | gtk_snapshot_add_colorcxx . . $ gtk_snapshot_add_color(9c0a6ce7ee2317a7). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 223 | &color, |
| 224 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! ((double)x / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 225 | (double)y / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 226 | (double)width / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 227 | (double)height / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!)); |
| 228 | |
| 229 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&color); |
| 230 | } |
| 231 | |
| 232 | static void |
| 233 | gsk_pango_renderer_draw_trapezoidcxx . . $ gsk_pango_renderer_draw_trapezoid(689b614ee66a9b76). (PangoRenderercxx . . $ PangoRenderer# *renderer, |
| 234 | PangoRenderPartcxx . . $ PangoRenderPart# part, |
| 235 | double y1_, |
| 236 | double x11, |
| 237 | double x21, |
| 238 | double y2, |
| 239 | double x12, |
| 240 | double x22) |
| 241 | { |
| 242 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer = (GskPangoRenderercxx . . $ GskPangoRenderer# *) (renderer); |
| 243 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 244 | PangoRectanglecxx . . $ PangoRectangle# ink_rect; |
| 245 | cairo_tcxx . . $ cairo_t# *cr; |
| 246 | double x, y; |
| 247 | |
| 248 | layout = pango_renderer_get_layoutcxx . . $ pango_renderer_get_layout(2a3c6400d843cf8e). (renderer); |
| 249 | if (!layout) |
| 250 | return; |
| 251 | |
| 252 | pango_layout_get_pixel_extentscxx . . $ pango_layout_get_pixel_extents(387377cd6f424af2). (layout, &ink_rect, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 253 | cr = gtk_snapshot_append_cairocxx . . $ gtk_snapshot_append_cairo(ad8a49234cd904b). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 254 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (ink_rect.x, ink_rect.y, |
| 255 | ink_rect.width, ink_rect.height)); |
| 256 | set_colorcxx . . $ set_color(7f458e9f58048887). (crenderer, part, cr); |
| 257 | |
| 258 | x = y = 0; |
| 259 | cairo_user_to_device_distancecxx . . $ cairo_user_to_device_distance(655da8de2e4236e3). (cr, &x, &y); |
| 260 | cairo_identity_matrixcxx . . $ cairo_identity_matrix(21788b7825b29bf). (cr); |
| 261 | cairo_translatecxx . . $ cairo_translate(e818af540ecaa23a). (cr, x, y); |
| 262 | |
| 263 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x11, y1_); |
| 264 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x21, y1_); |
| 265 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x22, y2); |
| 266 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x12, y2); |
| 267 | cairo_close_pathcxx . . $ cairo_close_path(21788b7825b29bf). (cr); |
| 268 | |
| 269 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 270 | |
| 271 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 272 | } |
| 273 | |
| 274 | static void |
| 275 | gsk_pango_renderer_draw_error_underlinecxx . . $ gsk_pango_renderer_draw_error_underline(af09d08dcda2d65f). (PangoRenderercxx . . $ PangoRenderer# *renderer, |
| 276 | int x, |
| 277 | int y, |
| 278 | int width, |
| 279 | int height) |
| 280 | { |
| 281 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer = (GskPangoRenderercxx . . $ GskPangoRenderer# *) (renderer); |
| 282 | double xx, yy, ww, hh; |
| 283 | GdkColorcxx . . $ GdkColor# color; |
| 284 | GskRoundedRectcxx . . $ GskRoundedRect# dot; |
| 285 | |
| 286 | xx = (double)x / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 287 | yy = (double)y / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 288 | ww = (double)width / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 289 | hh = (double)height / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 290 | |
| 291 | /* Pango sets the height of error underlines to be 3 * underline thickness. |
| 292 | * That is appropriate for the traditional zigzag pattern, but our balls |
| 293 | * get just too big with that, so scale things down to 1.3 * underline |
| 294 | * thickness, which looks good, experimentally. |
| 295 | */ |
| 296 | hh = hh * 1.3 / 3.0; |
| 297 | |
| 298 | get_colorcxx . . $ get_color(6b3287f187041684). (crenderer, PANGO_RENDER_PART_UNDERLINEcxx . . $ PANGO_RENDER_PART_UNDERLINE., &color); |
| 299 | |
| 300 | gtk_snapshot_push_repeatcxx . . $ gtk_snapshot_push_repeat(fa32e4828e98b9e2). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 301 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (xx, yy, ww, hh), |
| 302 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (xx, yy, 1.5 * hh, hh)); |
| 303 | |
| 304 | gsk_rounded_rect_init_from_rectcxx . . $ gsk_rounded_rect_init_from_rect(7058f22f9f9c13a8). (&dot, |
| 305 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (xx, yy, hh, hh), |
| 306 | hh / 2); |
| 307 | |
| 308 | gtk_snapshot_push_rounded_clipcxx . . $ gtk_snapshot_push_rounded_clip(3a4945ce8b923592). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., &dot); |
| 309 | gtk_snapshot_add_colorcxx . . $ gtk_snapshot_add_color(9c0a6ce7ee2317a7). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., &color, &dot.boundscxx . . $ _GskRoundedRect#bounds.); |
| 310 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 311 | |
| 312 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&color); |
| 313 | |
| 314 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 315 | } |
| 316 | |
| 317 | static void |
| 318 | gsk_pango_renderer_draw_shapecxx . . $ gsk_pango_renderer_draw_shape(b723930eddf9bce9). (PangoRenderercxx . . $ PangoRenderer# *renderer, |
| 319 | PangoAttrShapecxx . . $ PangoAttrShape# *attr, |
| 320 | int x, |
| 321 | int y) |
| 322 | { |
| 323 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer = (GskPangoRenderercxx . . $ GskPangoRenderer# *) (renderer); |
| 324 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 325 | PangoCairoShapeRendererFunccxx . . $ PangoCairoShapeRendererFunc# shape_renderer; |
| 326 | gpointercxx . . $ gpointer# shape_renderer_data; |
| 327 | double base_x = (double)x / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 328 | double base_y = (double)y / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 329 | gbooleancxx . . $ gboolean# handled = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 330 | |
| 331 | if (crenderer->shape_handlercxx . . $ _GskPangoRenderer#shape_handler.) |
| 332 | { |
| 333 | double shape_x = base_x; |
| 334 | double shape_y = (double) (y + attr->logical_rectcxx . . $ _PangoAttrShape#logical_rect..ycxx . . $ _PangoRectangle#y.) / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 335 | |
| 336 | if (shape_x != 0 || shape_y != 0) |
| 337 | { |
| 338 | gtk_snapshot_savecxx . . $ gtk_snapshot_save(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 339 | gtk_snapshot_translatecxx . . $ gtk_snapshot_translate(c73e8a4383f18867). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (shape_x, shape_y)); |
| 340 | } |
| 341 | |
| 342 | handled = crenderer->shape_handlercxx . . $ _GskPangoRenderer#shape_handler. (attr, |
| 343 | crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 344 | (double)attr->logical_rectcxx . . $ _PangoAttrShape#logical_rect..widthcxx . . $ _PangoRectangle#width. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!, |
| 345 | (double)attr->logical_rectcxx . . $ _PangoAttrShape#logical_rect..heightcxx . . $ _PangoRectangle#height. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 346 | if (shape_x != 0 || shape_y != 0) |
| 347 | gtk_snapshot_restorecxx . . $ gtk_snapshot_restore(afbd0a0317d5665f). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot.); |
| 348 | } |
| 349 | |
| 350 | if (!handled) |
| 351 | { |
| 352 | cairo_tcxx . . $ cairo_t# *cr; |
| 353 | PangoRectanglecxx . . $ PangoRectangle# ink_rect; |
| 354 | |
| 355 | layout = pango_renderer_get_layoutcxx . . $ pango_renderer_get_layout(2a3c6400d843cf8e). (renderer); |
| 356 | if (!layout) |
| 357 | return; |
| 358 | |
| 359 | pango_layout_get_pixel_extentscxx . . $ pango_layout_get_pixel_extents(387377cd6f424af2). (layout, &ink_rect, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 360 | cr = gtk_snapshot_append_cairocxx . . $ gtk_snapshot_append_cairo(ad8a49234cd904b). (crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot., |
| 361 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (ink_rect.x, ink_rect.y, |
| 362 | ink_rect.width, ink_rect.height)); |
| 363 | shape_renderer = pango_cairo_context_get_shape_renderercxx . . $ pango_cairo_context_get_shape_renderer(d7a6b5a2f943edf8). (pango_layout_get_contextcxx . . $ pango_layout_get_context(2a2e0adaaef4fc4b). (layout), |
| 364 | &shape_renderer_data); |
| 365 | |
| 366 | if (!shape_renderer) |
| 367 | { |
| 368 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 369 | return; |
| 370 | } |
| 371 | |
| 372 | set_colorcxx . . $ set_color(7f458e9f58048887). (crenderer, PANGO_RENDER_PART_FOREGROUNDcxx . . $ PANGO_RENDER_PART_FOREGROUND., cr); |
| 373 | |
| 374 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, base_x, base_y); |
| 375 | |
| 376 | shape_renderer (cr, attr, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, shape_renderer_data); |
| 377 | |
| 378 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | static void |
| 383 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer, |
| 384 | PangoRenderPartcxx . . $ PangoRenderPart# part, |
| 385 | const GdkRGBAcxx . . $ GdkRGBA# *rgba) |
| 386 | { |
| 387 | PangoRenderercxx . . $ PangoRenderer# *renderer = PANGO_RENDERERcxx . . $ `<external>/9172916499229551938/pango-renderer.h:29:9`! (crenderer); |
| 388 | PangoColorcxx . . $ PangoColor# color = { 0, }; |
| 389 | guint16cxx . . $ guint16# alpha; |
| 390 | |
| 391 | if (rgba) |
| 392 | { |
| 393 | color.redcxx . . $ _PangoColor#red. = (guint16cxx . . $ guint16#)(rgba->redcxx . . $ _GdkRGBA#red. * 65535); |
| 394 | color.greencxx . . $ _PangoColor#green. = (guint16cxx . . $ guint16#)(rgba->greencxx . . $ _GdkRGBA#green. * 65535); |
| 395 | color.bluecxx . . $ _PangoColor#blue. = (guint16cxx . . $ guint16#)(rgba->bluecxx . . $ _GdkRGBA#blue. * 65535); |
| 396 | alpha = (guint16cxx . . $ guint16#)(rgba->alphacxx . . $ _GdkRGBA#alpha. * 65535); |
| 397 | pango_renderer_set_colorcxx . . $ pango_renderer_set_color(d77dd0e09311fc5). (renderer, part, &color); |
| 398 | pango_renderer_set_alphacxx . . $ pango_renderer_set_alpha(ff046e43a4b1620e). (renderer, part, alpha); |
| 399 | } |
| 400 | else |
| 401 | { |
| 402 | pango_renderer_set_colorcxx . . $ pango_renderer_set_color(d77dd0e09311fc5). (renderer, part, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 403 | pango_renderer_set_alphacxx . . $ pango_renderer_set_alpha(ff046e43a4b1620e). (renderer, part, 0); |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | static GtkTextAppearancecxx . . $ GtkTextAppearance# * |
| 408 | get_item_appearancecxx . . $ get_item_appearance(23ee066189cf3e7a). (PangoItemcxx . . $ PangoItem# *item) |
| 409 | { |
| 410 | GSListcxx . . $ GSList# *tmp_list = item->analysiscxx . . $ _PangoItem#analysis..extra_attrscxx . . $ _PangoAnalysis#extra_attrs.; |
| 411 | |
| 412 | while (tmp_list) |
| 413 | { |
| 414 | PangoAttributecxx . . $ PangoAttribute# *attr = tmp_list->datacxx . . $ _GSList#data.; |
| 415 | |
| 416 | if (attr->klasscxx . . $ _PangoAttribute#klass.->typecxx . . $ _PangoAttrClass#type. == gtk_text_attr_appearance_typecxx . . $ gtk_text_attr_appearance_type.) |
| 417 | return &((GtkTextAttrAppearancecxx . . $ GtkTextAttrAppearance# *)attr)->appearancecxx . . $ _GtkTextAttrAppearance#appearance.; |
| 418 | |
| 419 | tmp_list = tmp_list->nextcxx . . $ _GSList#next.; |
| 420 | } |
| 421 | |
| 422 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 423 | } |
| 424 | |
| 425 | static void |
| 426 | gsk_pango_renderer_prepare_runcxx . . $ gsk_pango_renderer_prepare_run(6e18d39d7b8238ef). (PangoRenderercxx . . $ PangoRenderer# *renderer, |
| 427 | PangoLayoutRuncxx . . $ PangoLayoutRun# *run) |
| 428 | { |
| 429 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer = GSK_PANGO_RENDERERcxx . . $ `gtk/gskpangoprivate.h:28:9`! (renderer); |
| 430 | const GdkRGBAcxx . . $ GdkRGBA# *bg_rgba = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 431 | const GdkRGBAcxx . . $ GdkRGBA# *fg_rgba = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 432 | GtkTextAppearancecxx . . $ GtkTextAppearance# *appearance; |
| 433 | |
| 434 | PANGO_RENDERER_CLASScxx . . $ `<external>/9172916499229551938/pango-renderer.h:31:9`! (gsk_pango_renderer_parent_class)->prepare_runcxx . . $ _PangoRendererClass#prepare_run. (renderer, run); |
| 435 | |
| 436 | appearance = get_item_appearancecxx . . $ get_item_appearance(23ee066189cf3e7a). (run->itemcxx . . $ _PangoGlyphItem#item.); |
| 437 | |
| 438 | if (appearance == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 439 | return; |
| 440 | |
| 441 | if (appearance->draw_bgcxx . . $ _GtkTextAppearance#draw_bg. && crenderer->statecxx . . $ _GskPangoRenderer#state. == GSK_PANGO_RENDERER_NORMALcxx . . $ GSK_PANGO_RENDERER_NORMAL.) |
| 442 | bg_rgba = appearance->bg_rgbacxx . . $ _GtkTextAppearance#bg_rgba.; |
| 443 | else |
| 444 | bg_rgba = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 445 | |
| 446 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_BACKGROUNDcxx . . $ PANGO_RENDER_PART_BACKGROUND., bg_rgba); |
| 447 | |
| 448 | if (crenderer->statecxx . . $ _GskPangoRenderer#state. == GSK_PANGO_RENDERER_SELECTEDcxx . . $ GSK_PANGO_RENDERER_SELECTED. && |
| 449 | GTK_IS_TEXT_VIEWcxx . . $ `gtk/gtktextview.h:40:9`! (crenderer->widget)) |
| 450 | { |
| 451 | GtkCssNodecxx . . $ GtkCssNode# *node; |
| 452 | GtkCssStylecxx . . $ GtkCssStyle# *style; |
| 453 | |
| 454 | node = gtk_text_view_get_selection_nodecxx . . $ gtk_text_view_get_selection_node(56ee8d650df0a0e9). ((GtkTextViewcxx . . $ GtkTextView# *)crenderer->widgetcxx . . $ _GskPangoRenderer#widget.); |
| 455 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (node); |
| 456 | fg_rgba = gtk_css_color_value_get_rgbacxx . . $ gtk_css_color_value_get_rgba(f067075b082ed3df). (style->usedcxx . . $ _GtkCssStyle#used.->colorcxx . . $ _GtkCssUsedValues#color.); |
| 457 | } |
| 458 | else if (crenderer->statecxx . . $ _GskPangoRenderer#state. == GSK_PANGO_RENDERER_CURSORcxx . . $ GSK_PANGO_RENDERER_CURSOR. && gtk_widget_has_focuscxx . . $ gtk_widget_has_focus(9247ef2dc26c5426). (crenderer->widgetcxx . . $ _GskPangoRenderer#widget.)) |
| 459 | { |
| 460 | GtkCssNodecxx . . $ GtkCssNode# *node; |
| 461 | GtkCssStylecxx . . $ GtkCssStyle# *style; |
| 462 | |
| 463 | node = gtk_widget_get_css_nodecxx . . $ gtk_widget_get_css_node(e7b0819f4c134bd6). (crenderer->widgetcxx . . $ _GskPangoRenderer#widget.); |
| 464 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (node); |
| 465 | fg_rgba = gtk_css_color_value_get_rgbacxx . . $ gtk_css_color_value_get_rgba(f067075b082ed3df). (style->usedcxx . . $ _GtkCssStyle#used.->background_colorcxx . . $ _GtkCssUsedValues#background_color.); |
| 466 | } |
| 467 | else |
| 468 | fg_rgba = appearance->fg_rgbacxx . . $ _GtkTextAppearance#fg_rgba.; |
| 469 | |
| 470 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_FOREGROUNDcxx . . $ PANGO_RENDER_PART_FOREGROUND., fg_rgba); |
| 471 | |
| 472 | if (appearance->strikethrough_rgbacxx . . $ _GtkTextAppearance#strikethrough_rgba.) |
| 473 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_STRIKETHROUGHcxx . . $ PANGO_RENDER_PART_STRIKETHROUGH., appearance->strikethrough_rgbacxx . . $ _GtkTextAppearance#strikethrough_rgba.); |
| 474 | else |
| 475 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_STRIKETHROUGHcxx . . $ PANGO_RENDER_PART_STRIKETHROUGH., fg_rgba); |
| 476 | |
| 477 | if (appearance->underline_rgbacxx . . $ _GtkTextAppearance#underline_rgba.) |
| 478 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_UNDERLINEcxx . . $ PANGO_RENDER_PART_UNDERLINE., appearance->underline_rgbacxx . . $ _GtkTextAppearance#underline_rgba.); |
| 479 | else if (appearance->underlinecxx . . $ _GtkTextAppearance#underline. == PANGO_UNDERLINE_ERRORcxx . . $ PANGO_UNDERLINE_ERROR.) |
| 480 | { |
| 481 | if (!crenderer->error_colorcxx . . $ _GskPangoRenderer#error_color.) |
| 482 | { |
| 483 | static const GdkRGBAcxx . . $ GdkRGBA# red = { 1, 0, 0, 1 }; |
| 484 | crenderer->error_colorcxx . . $ _GskPangoRenderer#error_color. = gdk_rgba_copycxx . . $ gdk_rgba_copy(eaf0956d4439d587). (&red); |
| 485 | } |
| 486 | |
| 487 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_UNDERLINEcxx . . $ PANGO_RENDER_PART_UNDERLINE., crenderer->error_colorcxx . . $ _GskPangoRenderer#error_color.); |
| 488 | } |
| 489 | else |
| 490 | text_renderer_set_rgbacxx . . $ text_renderer_set_rgba(36fd3ea9182c8477). (crenderer, PANGO_RENDER_PART_UNDERLINEcxx . . $ PANGO_RENDER_PART_UNDERLINE., fg_rgba); |
| 491 | |
| 492 | crenderer->shadow_stylecxx . . $ _GskPangoRenderer#shadow_style. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 493 | if (GTK_IS_TEXT_VIEWcxx . . $ `gtk/gtktextview.h:40:9`! (crenderer->widget)) |
| 494 | { |
| 495 | if (crenderer->statecxx . . $ _GskPangoRenderer#state. == GSK_PANGO_RENDERER_SELECTEDcxx . . $ GSK_PANGO_RENDERER_SELECTED.) |
| 496 | crenderer->shadow_stylecxx . . $ _GskPangoRenderer#shadow_style. = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (gtk_text_view_get_selection_nodecxx . . $ gtk_text_view_get_selection_node(56ee8d650df0a0e9). ((GtkTextViewcxx . . $ GtkTextView# *)crenderer->widgetcxx . . $ _GskPangoRenderer#widget.)); |
| 497 | else if (crenderer->statecxx . . $ _GskPangoRenderer#state. != GSK_PANGO_RENDERER_CURSORcxx . . $ GSK_PANGO_RENDERER_CURSOR.) |
| 498 | crenderer->shadow_stylecxx . . $ _GskPangoRenderer#shadow_style. = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (gtk_widget_get_css_nodecxx . . $ gtk_widget_get_css_node(e7b0819f4c134bd6). (crenderer->widgetcxx . . $ _GskPangoRenderer#widget.)); |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | static void |
| 503 | gsk_pango_renderer_initcxx . . $ gsk_pango_renderer_init(6dde6c0d75e7a000). (GskPangoRenderercxx . . $ GskPangoRenderer# *renderer G_GNUC_UNUSEDcxx . . $ `<external>/12741050725406041920/gmacros.h:647:9`!) |
| 504 | { |
| 505 | } |
| 506 | |
| 507 | static void |
| 508 | gsk_pango_renderer_class_initcxx . . $ gsk_pango_renderer_class_init(578fcbc21bbb7b48). (GskPangoRendererClasscxx . . $ GskPangoRendererClass# *klass) |
| 509 | { |
| 510 | PangoRendererClasscxx . . $ PangoRendererClass# *renderer_class = PANGO_RENDERER_CLASScxx . . $ `<external>/9172916499229551938/pango-renderer.h:31:9`! (klass); |
| 511 | |
| 512 | renderer_class->draw_glyph_itemcxx . . $ _PangoRendererClass#draw_glyph_item. = gsk_pango_renderer_draw_glyph_itemcxx . . $ gsk_pango_renderer_draw_glyph_item(c30bc1835675b706).; |
| 513 | renderer_class->draw_rectanglecxx . . $ _PangoRendererClass#draw_rectangle. = gsk_pango_renderer_draw_rectanglecxx . . $ gsk_pango_renderer_draw_rectangle(2724915d8391417e).; |
| 514 | renderer_class->draw_trapezoidcxx . . $ _PangoRendererClass#draw_trapezoid. = gsk_pango_renderer_draw_trapezoidcxx . . $ gsk_pango_renderer_draw_trapezoid(689b614ee66a9b76).; |
| 515 | renderer_class->draw_error_underlinecxx . . $ _PangoRendererClass#draw_error_underline. = gsk_pango_renderer_draw_error_underlinecxx . . $ gsk_pango_renderer_draw_error_underline(af09d08dcda2d65f).; |
| 516 | renderer_class->draw_shapecxx . . $ _PangoRendererClass#draw_shape. = gsk_pango_renderer_draw_shapecxx . . $ gsk_pango_renderer_draw_shape(b723930eddf9bce9).; |
| 517 | renderer_class->prepare_runcxx . . $ _PangoRendererClass#prepare_run. = gsk_pango_renderer_prepare_runcxx . . $ gsk_pango_renderer_prepare_run(6e18d39d7b8238ef).; |
| 518 | } |
| 519 | |
| 520 | static GskPangoRenderercxx . . $ GskPangoRenderer# *cached_renderercxx . . $ cached_renderer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* MT-safe */ |
| 521 | G_LOCK_DEFINE_STATICcxx . . $ `<external>/457917468643292165/gthread.h:112:9`! (cached_renderer); |
| 522 | |
| 523 | GskPangoRenderercxx . . $ GskPangoRenderer# * |
| 524 | gsk_pango_renderer_acquirecxx . . $ gsk_pango_renderer_acquire(1b53e98689e87f27). (void) |
| 525 | { |
| 526 | GskPangoRenderercxx . . $ GskPangoRenderer# *renderer; |
| 527 | |
| 528 | if (G_LIKELYcxx . . $ `<external>/12741050725406041920/gmacros.h:1284:9`! (G_TRYLOCKcxx . . $ `<external>/457917468643292165/gthread.h:139:11`! (cached_renderer))) |
| 529 | { |
| 530 | if (G_UNLIKELYcxx . . $ `<external>/12741050725406041920/gmacros.h:1285:9`! (!cached_renderer)) |
| 531 | { |
| 532 | cached_renderercxx . . $ cached_renderer. = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GSK_TYPE_PANGO_RENDERERcxx . . $ `gtk/gskpangoprivate.h:27:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 533 | cached_renderercxx . . $ cached_renderer.->is_cached_renderercxx . . $ _GskPangoRenderer#is_cached_renderer. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 534 | } |
| 535 | |
| 536 | renderer = cached_renderercxx . . $ cached_renderer.; |
| 537 | |
| 538 | /* Reset to standard state */ |
| 539 | renderer->statecxx . . $ _GskPangoRenderer#state. = GSK_PANGO_RENDERER_NORMALcxx . . $ GSK_PANGO_RENDERER_NORMAL.; |
| 540 | renderer->shape_handlercxx . . $ _GskPangoRenderer#shape_handler. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 541 | } |
| 542 | else |
| 543 | { |
| 544 | renderer = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GSK_TYPE_PANGO_RENDERERcxx . . $ `gtk/gskpangoprivate.h:27:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 545 | } |
| 546 | |
| 547 | return renderer; |
| 548 | } |
| 549 | |
| 550 | void |
| 551 | gsk_pango_renderer_releasecxx . . $ gsk_pango_renderer_release(6dde6c0d75e7a000). (GskPangoRenderercxx . . $ GskPangoRenderer# *renderer) |
| 552 | { |
| 553 | if (G_LIKELYcxx . . $ `<external>/12741050725406041920/gmacros.h:1284:9`! (renderer->is_cached_renderer)) |
| 554 | { |
| 555 | renderer->widgetcxx . . $ _GskPangoRenderer#widget. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 556 | renderer->snapshotcxx . . $ _GskPangoRenderer#snapshot. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 557 | renderer->shadow_stylecxx . . $ _GskPangoRenderer#shadow_style. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 558 | |
| 559 | if (renderer->error_colorcxx . . $ _GskPangoRenderer#error_color.) |
| 560 | { |
| 561 | gdk_rgba_freecxx . . $ gdk_rgba_free(3f3ea8ff31dcaa39). (renderer->error_colorcxx . . $ _GskPangoRenderer#error_color.); |
| 562 | renderer->error_colorcxx . . $ _GskPangoRenderer#error_color. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 563 | } |
| 564 | |
| 565 | G_UNLOCKcxx . . $ `<external>/457917468643292165/gthread.h:138:11`! (cached_renderer); |
| 566 | } |
| 567 | else |
| 568 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (renderer); |
| 569 | } |
| 570 | |
| 571 | /** |
| 572 | * gtk_snapshot_append_layout: |
| 573 | * @snapshot: a `GtkSnapshot` |
| 574 | * @layout: the `PangoLayout` to render |
| 575 | * @color: the foreground color to render the layout in |
| 576 | * |
| 577 | * Creates render nodes for rendering @layout in the given foregound @color |
| 578 | * and appends them to the current node of @snapshot without changing the |
| 579 | * current node. The current theme's foreground color for a widget can be |
| 580 | * obtained with [[email protected]_color]. |
| 581 | * |
| 582 | * Note that if the layout does not produce any visible output, then nodes |
| 583 | * may not be added to the @snapshot. |
| 584 | **/ |
| 585 | void |
| 586 | gtk_snapshot_append_layoutcxx . . $ gtk_snapshot_append_layout(a0c9cba849bb8038). (GtkSnapshotcxx . . $ GtkSnapshot# *snapshot, |
| 587 | PangoLayoutcxx . . $ PangoLayout# *layout, |
| 588 | const GdkRGBAcxx . . $ GdkRGBA# *color) |
| 589 | { |
| 590 | GdkColorcxx . . $ GdkColor# color2; |
| 591 | |
| 592 | gdk_color_init_from_rgbacxx . . $ gdk_color_init_from_rgba(589eb61072587365). (&color2, color); |
| 593 | gtk_snapshot_add_layoutcxx . . $ gtk_snapshot_add_layout(b332be74bf3fc3af). (snapshot, layout, &color2); |
| 594 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&color2); |
| 595 | } |
| 596 | |
| 597 | /* < private > |
| 598 | * gtk_snapshot_add_layout: |
| 599 | * @snapshot: a `GtkSnapshot` |
| 600 | * @layout: the `PangoLayout` to render |
| 601 | * @color: the foreground color to render the layout in |
| 602 | * |
| 603 | * Creates render nodes for rendering @layout in the given foregound @color |
| 604 | * and appends them to the current node of @snapshot without changing the |
| 605 | * current node. The current theme's foreground color for a widget can be |
| 606 | * obtained with [[email protected]_color]. |
| 607 | * |
| 608 | * Note that if the layout does not produce any visible output, then nodes |
| 609 | * may not be added to the @snapshot. |
| 610 | **/ |
| 611 | void |
| 612 | gtk_snapshot_add_layoutcxx . . $ gtk_snapshot_add_layout(b332be74bf3fc3af). (GtkSnapshotcxx . . $ GtkSnapshot# *snapshot, |
| 613 | PangoLayoutcxx . . $ PangoLayout# *layout, |
| 614 | const GdkColorcxx . . $ GdkColor# *color) |
| 615 | { |
| 616 | GskPangoRenderercxx . . $ GskPangoRenderer# *crenderer; |
| 617 | |
| 618 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (snapshot != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 619 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (PANGO_IS_LAYOUTcxx . . $ `<external>/12061588177389520350/pango-layout.h:148:9`! (layout)); |
| 620 | |
| 621 | crenderer = gsk_pango_renderer_acquirecxx . . $ gsk_pango_renderer_acquire(1b53e98689e87f27). (); |
| 622 | |
| 623 | crenderer->snapshotcxx . . $ _GskPangoRenderer#snapshot. = snapshot; |
| 624 | gdk_color_init_copycxx . . $ `gdk/gdkcolorimpl.h:36:9`! (&crenderer->fg_color, color); |
| 625 | |
| 626 | pango_renderer_draw_layoutcxx . . $ pango_renderer_draw_layout(6247d6a0f0bf5368). (PANGO_RENDERERcxx . . $ `<external>/9172916499229551938/pango-renderer.h:29:9`! (crenderer), layout, 0, 0); |
| 627 | |
| 628 | gdk_color_finishcxx . . $ `gdk/gdkcolorimpl.h:52:9`! (&crenderer->fg_color); |
| 629 | |
| 630 | gsk_pango_renderer_releasecxx . . $ gsk_pango_renderer_release(6dde6c0d75e7a000). (crenderer); |
| 631 | } |