| 1 | /* GTK - The GIMP Toolkit |
| 2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
| 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/>.Free |
| 16 | */ |
| 17 | |
| 18 | /* |
| 19 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
| 20 | * file for a list of people on the GTK+ Team. See the ChangeLog |
| 21 | * files for a list of changes. These files are distributed with |
| 22 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
| 23 | */ |
| 24 | |
| 25 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 26 | |
| 27 | #include "gtklabelprivate.h"cxx . . $ `<file>/gtk/gtklabelprivate.h`/ |
| 28 | |
| 29 | #include "gtkaccessibletextprivate.h"cxx . . $ `<file>/gtk/gtkaccessibletextprivate.h`/ |
| 30 | #include "gtkaccessiblehypertextprivate.h"cxx . . $ `<file>/gtk/gtkaccessiblehypertextprivate.h`/ |
| 31 | #include "gtkbuildable.h"cxx . . $ `<file>/gtk/gtkbuildable.h`/ |
| 32 | #include "gtkbuilderprivate.h"cxx . . $ `<file>/gtk/gtkbuilderprivate.h`/ |
| 33 | #include "gtkcsscolorvalueprivate.h"cxx . . $ `<file>/gtk/gtkcsscolorvalueprivate.h`/ |
| 34 | #include "gtkdragsourceprivate.h"cxx . . $ `<file>/gtk/gtkdragsourceprivate.h`/ |
| 35 | #include "gtkdragicon.h"cxx . . $ `<file>/gtk/gtkdragicon.h`/ |
| 36 | #include "gtkeventcontrollermotion.h"cxx . . $ `<file>/gtk/gtkeventcontrollermotion.h`/ |
| 37 | #include "gtkeventcontrollerfocus.h"cxx . . $ `<file>/gtk/gtkeventcontrollerfocus.h`/ |
| 38 | #include "gtkfilelauncher.h"cxx . . $ `<file>/gtk/gtkfilelauncher.h`/ |
| 39 | #include "gtkgesturedrag.h"cxx . . $ `<file>/gtk/gtkgesturedrag.h`/ |
| 40 | #include "gtkgestureclick.h"cxx . . $ `<file>/gtk/gtkgestureclick.h`/ |
| 41 | #include "gtkgesturesingle.h"cxx . . $ `<file>/gtk/gtkgesturesingle.h`/ |
| 42 | #include "gtkjoinedmenuprivate.h"cxx . . $ `<file>/gtk/gtkjoinedmenuprivate.h`/ |
| 43 | #include "gtkmarshalers.h"cxx . . $ `<file>/build/gtk/gtkmarshalers.h`/ |
| 44 | #include "gtknative.h"cxx . . $ `<file>/gtk/gtknative.h`/ |
| 45 | #include "gtknotebook.h"cxx . . $ `<file>/gtk/gtknotebook.h`/ |
| 46 | #include "gtkpangoprivate.h"cxx . . $ `<file>/gtk/gtkpangoprivate.h`/ |
| 47 | #include "gtkpopovermenu.h"cxx . . $ `<file>/gtk/gtkpopovermenu.h`/ |
| 48 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 49 | #include "gtkrenderbackgroundprivate.h"cxx . . $ `<file>/gtk/gtkrenderbackgroundprivate.h`/ |
| 50 | #include "gtkrenderborderprivate.h"cxx . . $ `<file>/gtk/gtkrenderborderprivate.h`/ |
| 51 | #include "gtkrenderlayoutprivate.h"cxx . . $ `<file>/gtk/gtkrenderlayoutprivate.h`/ |
| 52 | #include "gtkshortcut.h"cxx . . $ `<file>/gtk/gtkshortcut.h`/ |
| 53 | #include "gtkshortcutcontroller.h"cxx . . $ `<file>/gtk/gtkshortcutcontroller.h`/ |
| 54 | #include "gtkshortcuttrigger.h"cxx . . $ `<file>/gtk/gtkshortcuttrigger.h`/ |
| 55 | #include "gtksnapshot.h"cxx . . $ `<file>/gtk/gtksnapshot.h`/ |
| 56 | #include "gtktextutilprivate.h"cxx . . $ `<file>/gtk/gtktextutilprivate.h`/ |
| 57 | #include "gtktooltip.h"cxx . . $ `<file>/gtk/gtktooltip.h`/ |
| 58 | #include "gtktypebuiltins.h"cxx . . $ `<file>/build/gtk/gtktypebuiltins.h`/ |
| 59 | #include "gtkurilauncher.h"cxx . . $ `<file>/gtk/gtkurilauncher.h`/ |
| 60 | #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/ |
| 61 | |
| 62 | #include <math.h> |
| 63 | #include <stdlib.h> |
| 64 | #include <string.h> |
| 65 | #include <glib/gi18n-lib.h> |
| 66 | |
| 67 | /** |
| 68 | * GtkLabel: |
| 69 | * |
| 70 | * Displays a small amount of text. |
| 71 | * |
| 72 | * Most labels are used to label another widget (such as an [class@Entry]). |
| 73 | * |
| 74 | * <picture> |
| 75 | * <source srcset="label-dark.png" media="(prefers-color-scheme: dark)"> |
| 76 | * <img alt="An example GtkLabel" src="label.png"> |
| 77 | * </picture> |
| 78 | * |
| 79 | * ## Shortcuts and Gestures |
| 80 | * |
| 81 | * `GtkLabel` supports the following keyboard shortcuts, when the cursor is |
| 82 | * visible: |
| 83 | * |
| 84 | * - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu. |
| 85 | * - <kbd>Ctrl</kbd>+<kbd>A</kbd> or <kbd>Ctrl</kbd>+<kbd>/</kbd> |
| 86 | * selects all. |
| 87 | * - <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> or |
| 88 | * <kbd>Ctrl</kbd>+<kbd>\</kbd> unselects all. |
| 89 | * |
| 90 | * Additionally, the following signals have default keybindings: |
| 91 | * |
| 92 | * - [[email protected]::activate-current-link] |
| 93 | * - [[email protected]::copy-clipboard] |
| 94 | * - [[email protected]::move-cursor] |
| 95 | * |
| 96 | * ## Actions |
| 97 | * |
| 98 | * `GtkLabel` defines a set of built-in actions: |
| 99 | * |
| 100 | * - `clipboard.copy` copies the text to the clipboard. |
| 101 | * - `clipboard.cut` doesn't do anything, since text in labels can't be deleted. |
| 102 | * - `clipboard.paste` doesn't do anything, since text in labels can't be |
| 103 | * edited. |
| 104 | * - `link.open` opens the link, when activated on a link inside the label. |
| 105 | * - `link.copy` copies the link to the clipboard, when activated on a link |
| 106 | * inside the label. |
| 107 | * - `menu.popup` opens the context menu. |
| 108 | * - `selection.delete` doesn't do anything, since text in labels can't be |
| 109 | * deleted. |
| 110 | * - `selection.select-all` selects all of the text, if the label allows |
| 111 | * selection. |
| 112 | * |
| 113 | * ## CSS nodes |
| 114 | * |
| 115 | * ``` |
| 116 | * label |
| 117 | * ├── [selection] |
| 118 | * ├── [link] |
| 119 | * ┊ |
| 120 | * ╰── [link] |
| 121 | * ``` |
| 122 | * |
| 123 | * `GtkLabel` has a single CSS node with the name label. A wide variety |
| 124 | * of style classes may be applied to labels, such as .title, .subtitle, |
| 125 | * .dim-label, etc. In the `GtkShortcutsWindow`, labels are used with the |
| 126 | * .keycap style class. |
| 127 | * |
| 128 | * If the label has a selection, it gets a subnode with name selection. |
| 129 | * |
| 130 | * If the label has links, there is one subnode per link. These subnodes |
| 131 | * carry the link or visited state depending on whether they have been |
| 132 | * visited. In this case, label node also gets a .link style class. |
| 133 | * |
| 134 | * ## GtkLabel as GtkBuildable |
| 135 | * |
| 136 | * The GtkLabel implementation of the GtkBuildable interface supports a |
| 137 | * custom `<attributes>` element, which supports any number of `<attribute>` |
| 138 | * elements. The `<attribute>` element has attributes named “name“, “value“, |
| 139 | * “start“ and “end“ and allows you to specify [[email protected]] |
| 140 | * values for this label. |
| 141 | * |
| 142 | * An example of a UI definition fragment specifying Pango attributes: |
| 143 | * |
| 144 | * ```xml |
| 145 | * <object class="GtkLabel"> |
| 146 | * <attributes> |
| 147 | * <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> |
| 148 | * <attribute name="background" value="red" start="5" end="10"/> |
| 149 | * </attributes> |
| 150 | * </object> |
| 151 | * ``` |
| 152 | * |
| 153 | * The start and end attributes specify the range of characters to which the |
| 154 | * Pango attribute applies. If start and end are not specified, the attribute is |
| 155 | * applied to the whole text. Note that specifying ranges does not make much |
| 156 | * sense with translatable attributes. Use markup embedded in the translatable |
| 157 | * content instead. |
| 158 | * |
| 159 | * ## Accessibility |
| 160 | * |
| 161 | * `GtkLabel` uses the [[email protected]] role. |
| 162 | * |
| 163 | * ## Mnemonics |
| 164 | * |
| 165 | * Labels may contain “mnemonics”. Mnemonics are underlined characters in the |
| 166 | * label, used for keyboard navigation. Mnemonics are created by providing a |
| 167 | * string with an underscore before the mnemonic character, such as `"_File"`, |
| 168 | * to the functions [[email protected]_with_mnemonic] or |
| 169 | * [[email protected]_text_with_mnemonic]. |
| 170 | * |
| 171 | * Mnemonics automatically activate any activatable widget the label is |
| 172 | * inside, such as a [[email protected]]; if the label is not inside the |
| 173 | * mnemonic’s target widget, you have to tell the label about the target |
| 174 | * using [[email protected]_mnemonic_widget]. |
| 175 | * |
| 176 | * Here’s a simple example where the label is inside a button: |
| 177 | * |
| 178 | * ```c |
| 179 | * // Pressing Alt+H will activate this button |
| 180 | * GtkWidget *button = gtk_button_new (); |
| 181 | * GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello"); |
| 182 | * gtk_button_set_child (GTK_BUTTON (button), label); |
| 183 | * ``` |
| 184 | * |
| 185 | * There’s a convenience function to create buttons with a mnemonic label |
| 186 | * already inside: |
| 187 | * |
| 188 | * ```c |
| 189 | * // Pressing Alt+H will activate this button |
| 190 | * GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello"); |
| 191 | * ``` |
| 192 | * |
| 193 | * To create a mnemonic for a widget alongside the label, such as a |
| 194 | * [[email protected]], you have to point the label at the entry with |
| 195 | * [[email protected]_mnemonic_widget]: |
| 196 | * |
| 197 | * ```c |
| 198 | * // Pressing Alt+H will focus the entry |
| 199 | * GtkWidget *entry = gtk_entry_new (); |
| 200 | * GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello"); |
| 201 | * gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry); |
| 202 | * ``` |
| 203 | * |
| 204 | * ## Markup (styled text) |
| 205 | * |
| 206 | * To make it easy to format text in a label (changing colors, fonts, etc.), |
| 207 | * label text can be provided in a simple markup format: |
| 208 | * |
| 209 | * Here’s how to create a label with a small font: |
| 210 | * ```c |
| 211 | * GtkWidget *label = gtk_label_new (NULL); |
| 212 | * gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>"); |
| 213 | * ``` |
| 214 | * |
| 215 | * (See the Pango manual for complete documentation] of available |
| 216 | * tags, [[email protected]_markup]) |
| 217 | * |
| 218 | * The markup passed to [[email protected]_markup] must be valid XML; for example, |
| 219 | * literal `<`, `>` and `&` characters must be escaped as `<`, `>`, and `&`. |
| 220 | * If you pass text obtained from the user, file, or a network to |
| 221 | * [[email protected]_markup], you’ll want to escape it with |
| 222 | * [[email protected]_escape_text] or [[email protected]_printf_escaped]. |
| 223 | * |
| 224 | * Markup strings are just a convenient way to set the [[email protected]] |
| 225 | * on a label; [[email protected]_attributes] may be a simpler way to set |
| 226 | * attributes in some cases. Be careful though; [[email protected]] tends |
| 227 | * to cause internationalization problems, unless you’re applying attributes |
| 228 | * to the entire string (i.e. unless you set the range of each attribute |
| 229 | * to [0, `G_MAXINT`)). The reason is that specifying the `start_index` and |
| 230 | * `end_index` for a [[email protected]] requires knowledge of the exact |
| 231 | * string being displayed, so translations will cause problems. |
| 232 | * |
| 233 | * ## Selectable labels |
| 234 | * |
| 235 | * Labels can be made selectable with [[email protected]_selectable]. |
| 236 | * Selectable labels allow the user to copy the label contents to the |
| 237 | * clipboard. Only labels that contain useful-to-copy information — such |
| 238 | * as error messages — should be made selectable. |
| 239 | * |
| 240 | * ## Text layout |
| 241 | * |
| 242 | * A label can contain any number of paragraphs, but will have |
| 243 | * performance problems if it contains more than a small number. |
| 244 | * Paragraphs are separated by newlines or other paragraph separators |
| 245 | * understood by Pango. |
| 246 | * |
| 247 | * Labels can automatically wrap text if you call [[email protected]_wrap]. |
| 248 | * |
| 249 | * [[email protected]_justify] sets how the lines in a label align |
| 250 | * with one another. If you want to set how the label as a whole aligns |
| 251 | * in its available space, see the [[email protected]:halign] and |
| 252 | * [[email protected]:valign] properties. |
| 253 | * |
| 254 | * The [[email protected]:width-chars] and [[email protected]:max-width-chars] |
| 255 | * properties can be used to control the size allocation of ellipsized or |
| 256 | * wrapped labels. For ellipsizing labels, if either is specified (and less |
| 257 | * than the actual text size), it is used as the minimum width, and the actual |
| 258 | * text size is used as the natural width of the label. For wrapping labels, |
| 259 | * width-chars is used as the minimum width, if specified, and max-width-chars |
| 260 | * is used as the natural width. Even if max-width-chars specified, wrapping |
| 261 | * labels will be rewrapped to use all of the available width. |
| 262 | * |
| 263 | * ## Links |
| 264 | * |
| 265 | * GTK supports markup for clickable hyperlinks in addition to regular Pango |
| 266 | * markup. The markup for links is borrowed from HTML, using the `<a>` tag |
| 267 | * with “href“, “title“ and “class“ attributes. GTK renders links similar to |
| 268 | * the way they appear in web browsers, with colored, underlined text. The |
| 269 | * “title“ attribute is displayed as a tooltip on the link. The “class“ |
| 270 | * attribute is used as style class on the CSS node for the link. |
| 271 | * |
| 272 | * An example of inline links looks like this: |
| 273 | * |
| 274 | * ```c |
| 275 | * const char *text = |
| 276 | * "Go to the " |
| 277 | * "<a href=\"https://www.gtk.org\" title=\"<i>Our</i> website\">" |
| 278 | * "GTK website</a> for more..."; |
| 279 | * GtkWidget *label = gtk_label_new (NULL); |
| 280 | * gtk_label_set_markup (GTK_LABEL (label), text); |
| 281 | * ``` |
| 282 | * |
| 283 | * It is possible to implement custom handling for links and their tooltips |
| 284 | * with the [[email protected]::activate-link] signal and the |
| 285 | * [[email protected]_current_uri] function. |
| 286 | */ |
| 287 | |
| 288 | typedef struct _GtkLabelClasscxx . . $ _GtkLabelClass# GtkLabelClasscxx . . $ GtkLabelClass#; |
| 289 | typedef struct _GtkLabelSelectionInfocxx . . $ _GtkLabelSelectionInfo# GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo#; |
| 290 | |
| 291 | struct _GtkLabelcxx . . $ _GtkLabel# |
| 292 | { |
| 293 | GtkWidgetcxx . . $ GtkWidget# parent_instancecxx . . $ _GtkLabel#parent_instance.; |
| 294 | |
| 295 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *select_infocxx . . $ _GtkLabel#select_info.; |
| 296 | GtkWidgetcxx . . $ GtkWidget# *mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.; |
| 297 | GtkEventControllercxx . . $ GtkEventController# *mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller.; |
| 298 | |
| 299 | PangoAttrListcxx . . $ PangoAttrList# *attrscxx . . $ _GtkLabel#attrs.; |
| 300 | PangoAttrListcxx . . $ PangoAttrList# *markup_attrscxx . . $ _GtkLabel#markup_attrs.; |
| 301 | PangoLayoutcxx . . $ PangoLayout# *layoutcxx . . $ _GtkLabel#layout.; |
| 302 | PangoTabArraycxx . . $ PangoTabArray# *tabscxx . . $ _GtkLabel#tabs.; |
| 303 | |
| 304 | GtkWidgetcxx . . $ GtkWidget# *popup_menucxx . . $ _GtkLabel#popup_menu.; |
| 305 | GMenuModelcxx . . $ GMenuModel# *extra_menucxx . . $ _GtkLabel#extra_menu.; |
| 306 | |
| 307 | char *labelcxx . . $ _GtkLabel#label.; |
| 308 | char *textcxx . . $ _GtkLabel#text.; |
| 309 | |
| 310 | float xaligncxx . . $ _GtkLabel#xalign.; |
| 311 | float yaligncxx . . $ _GtkLabel#yalign.; |
| 312 | |
| 313 | guintcxx . . $ guint# mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. : 1; |
| 314 | guintcxx . . $ guint# jtypecxx . . $ _GtkLabel#jtype. : 2; |
| 315 | guintcxx . . $ guint# wrapcxx . . $ _GtkLabel#wrap. : 1; |
| 316 | guintcxx . . $ guint# use_underlinecxx . . $ _GtkLabel#use_underline. : 1; |
| 317 | guintcxx . . $ guint# ellipsizecxx . . $ _GtkLabel#ellipsize. : 3; |
| 318 | guintcxx . . $ guint# use_markupcxx . . $ _GtkLabel#use_markup. : 1; |
| 319 | guintcxx . . $ guint# wrap_modecxx . . $ _GtkLabel#wrap_mode. : 3; |
| 320 | guintcxx . . $ guint# natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. : 3; |
| 321 | guintcxx . . $ guint# single_line_modecxx . . $ _GtkLabel#single_line_mode. : 1; |
| 322 | guintcxx . . $ guint# in_clickcxx . . $ _GtkLabel#in_click. : 1; |
| 323 | guintcxx . . $ guint# track_linkscxx . . $ _GtkLabel#track_links. : 1; |
| 324 | |
| 325 | guintcxx . . $ guint# mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.; |
| 326 | |
| 327 | int width_charscxx . . $ _GtkLabel#width_chars.; |
| 328 | int max_width_charscxx . . $ _GtkLabel#max_width_chars.; |
| 329 | int linescxx . . $ _GtkLabel#lines.; |
| 330 | }; |
| 331 | |
| 332 | struct _GtkLabelClasscxx . . $ _GtkLabelClass# |
| 333 | { |
| 334 | GtkWidgetClasscxx . . $ GtkWidgetClass# parent_classcxx . . $ _GtkLabelClass#parent_class.; |
| 335 | |
| 336 | void (* move_cursorcxx . . $ _GtkLabelClass#move_cursor.) (GtkLabelcxx . . $ GtkLabel# *self, |
| 337 | GtkMovementStepcxx . . $ GtkMovementStep# step, |
| 338 | int count, |
| 339 | gbooleancxx . . $ gboolean# extend_selection); |
| 340 | void (* copy_clipboardcxx . . $ _GtkLabelClass#copy_clipboard.) (GtkLabelcxx . . $ GtkLabel# *self); |
| 341 | |
| 342 | gbooleancxx . . $ gboolean# (*activate_linkcxx . . $ _GtkLabelClass#activate_link.) (GtkLabelcxx . . $ GtkLabel# *self, |
| 343 | const char *uri); |
| 344 | }; |
| 345 | |
| 346 | /* Notes about the handling of links: |
| 347 | * |
| 348 | * Links share the GtkLabelSelectionInfo struct with selectable labels. |
| 349 | * There are some new fields for links. The links field contains the list |
| 350 | * of GtkLabelLink structs that describe the links which are embedded in |
| 351 | * the label. The active_link field points to the link under the mouse |
| 352 | * pointer. For keyboard navigation, the “focus” link is determined by |
| 353 | * finding the link which contains the selection_anchor position. |
| 354 | * The link_clicked field is used with button press and release events |
| 355 | * to ensure that pressing inside a link and releasing outside of it |
| 356 | * does not activate the link. |
| 357 | * |
| 358 | * Links are rendered with the GTK_STATE_FLAG_LINK/GTK_STATE_FLAG_VISITED |
| 359 | * state flags. When the mouse pointer is over a link, the pointer is changed |
| 360 | * to indicate the link. |
| 361 | * |
| 362 | * Labels with links accept keyboard focus, and it is possible to move |
| 363 | * the focus between the embedded links using Tab/Shift-Tab. The focus |
| 364 | * is indicated by a focus rectangle that is drawn around the link text. |
| 365 | * Pressing Enter activates the focused link, and there is a suitable |
| 366 | * context menu for links that can be opened with the Menu key. Pressing |
| 367 | * Control-C copies the link URI to the clipboard. |
| 368 | * |
| 369 | * In selectable labels with links, link functionality is only available |
| 370 | * when the selection is empty. |
| 371 | */ |
| 372 | typedef structcxx . . $ $anonymous_type_52cf8198354a9553_0# |
| 373 | { |
| 374 | char *uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri.; |
| 375 | char *titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title.; /* the title attribute, used as tooltip */ |
| 376 | |
| 377 | GtkCssNodecxx . . $ GtkCssNode# *cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode.; |
| 378 | GtkAccessibleHyperlinkcxx . . $ GtkAccessibleHyperlink# *accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.; |
| 379 | |
| 380 | gbooleancxx . . $ gboolean# visitedcxx . . $ $anonymous_type_52cf8198354a9553_0#visited.; /* get set when the link is activated; this flag |
| 381 | * gets preserved over later set_markup() calls |
| 382 | */ |
| 383 | int startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; /* position of the link in the PangoLayout */ |
| 384 | int endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.; |
| 385 | } GtkLabelLinkcxx . . $ GtkLabelLink#; |
| 386 | |
| 387 | struct _GtkLabelSelectionInfocxx . . $ _GtkLabelSelectionInfo# |
| 388 | { |
| 389 | int selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.; |
| 390 | int selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.; |
| 391 | GtkCssNodecxx . . $ GtkCssNode# *selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node.; |
| 392 | GdkContentProvidercxx . . $ GdkContentProvider# *providercxx . . $ _GtkLabelSelectionInfo#provider.; |
| 393 | |
| 394 | GtkLabelLinkcxx . . $ GtkLabelLink# *linkscxx . . $ _GtkLabelSelectionInfo#links.; |
| 395 | guintcxx . . $ guint# n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; |
| 396 | GtkLabelLinkcxx . . $ GtkLabelLink# *active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.; |
| 397 | GtkLabelLinkcxx . . $ GtkLabelLink# *context_linkcxx . . $ _GtkLabelSelectionInfo#context_link.; |
| 398 | |
| 399 | GtkGesturecxx . . $ GtkGesture# *drag_gesturecxx . . $ _GtkLabelSelectionInfo#drag_gesture.; |
| 400 | GtkGesturecxx . . $ GtkGesture# *click_gesturecxx . . $ _GtkLabelSelectionInfo#click_gesture.; |
| 401 | GtkEventControllercxx . . $ GtkEventController# *motion_controllercxx . . $ _GtkLabelSelectionInfo#motion_controller.; |
| 402 | GtkEventControllercxx . . $ GtkEventController# *focus_controllercxx . . $ _GtkLabelSelectionInfo#focus_controller.; |
| 403 | |
| 404 | int drag_start_xcxx . . $ _GtkLabelSelectionInfo#drag_start_x.; |
| 405 | int drag_start_ycxx . . $ _GtkLabelSelectionInfo#drag_start_y.; |
| 406 | |
| 407 | guintcxx . . $ guint# in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag. : 1; |
| 408 | guintcxx . . $ guint# select_wordscxx . . $ _GtkLabelSelectionInfo#select_words. : 1; |
| 409 | guintcxx . . $ guint# selectablecxx . . $ _GtkLabelSelectionInfo#selectable. : 1; |
| 410 | guintcxx . . $ guint# link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. : 1; |
| 411 | }; |
| 412 | |
| 413 | enumcxx . . $ $anonymous_type_52cf8198354a9553_1# { |
| 414 | MOVE_CURSORcxx . . $ MOVE_CURSOR., |
| 415 | COPY_CLIPBOARDcxx . . $ COPY_CLIPBOARD., |
| 416 | ACTIVATE_LINKcxx . . $ ACTIVATE_LINK., |
| 417 | ACTIVATE_CURRENT_LINKcxx . . $ ACTIVATE_CURRENT_LINK., |
| 418 | LAST_SIGNALcxx . . $ LAST_SIGNAL. |
| 419 | }; |
| 420 | |
| 421 | enumcxx . . $ $anonymous_type_52cf8198354a9553_2# { |
| 422 | PROP_0cxx . . $ PROP_0., |
| 423 | PROP_LABELcxx . . $ PROP_LABEL., |
| 424 | PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES., |
| 425 | PROP_USE_MARKUPcxx . . $ PROP_USE_MARKUP., |
| 426 | PROP_USE_UNDERLINEcxx . . $ PROP_USE_UNDERLINE., |
| 427 | PROP_JUSTIFYcxx . . $ PROP_JUSTIFY., |
| 428 | PROP_WRAPcxx . . $ PROP_WRAP., |
| 429 | PROP_WRAP_MODEcxx . . $ PROP_WRAP_MODE., |
| 430 | PROP_NATURAL_WRAP_MODEcxx . . $ PROP_NATURAL_WRAP_MODE., |
| 431 | PROP_SELECTABLEcxx . . $ PROP_SELECTABLE., |
| 432 | PROP_MNEMONIC_KEYVALcxx . . $ PROP_MNEMONIC_KEYVAL., |
| 433 | PROP_MNEMONIC_WIDGETcxx . . $ PROP_MNEMONIC_WIDGET., |
| 434 | PROP_ELLIPSIZEcxx . . $ PROP_ELLIPSIZE., |
| 435 | PROP_WIDTH_CHARScxx . . $ PROP_WIDTH_CHARS., |
| 436 | PROP_SINGLE_LINE_MODEcxx . . $ PROP_SINGLE_LINE_MODE., |
| 437 | PROP_MAX_WIDTH_CHARScxx . . $ PROP_MAX_WIDTH_CHARS., |
| 438 | PROP_LINEScxx . . $ PROP_LINES., |
| 439 | PROP_XALIGNcxx . . $ PROP_XALIGN., |
| 440 | PROP_YALIGNcxx . . $ PROP_YALIGN., |
| 441 | PROP_EXTRA_MENUcxx . . $ PROP_EXTRA_MENU., |
| 442 | PROP_TABScxx . . $ PROP_TABS., |
| 443 | NUM_PROPERTIEScxx . . $ NUM_PROPERTIES. |
| 444 | }; |
| 445 | |
| 446 | static GParamSpeccxx . . $ GParamSpec# *label_propscxx . . $ label_props.[NUM_PROPERTIEScxx . . $ NUM_PROPERTIES.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, }; |
| 447 | |
| 448 | static guintcxx . . $ guint# signalscxx . . $ signals.[LAST_SIGNALcxx . . $ LAST_SIGNAL.] = { 0 }; |
| 449 | |
| 450 | static GQuarkcxx . . $ GQuark# quark_mnemonics_visible_connectedcxx . . $ quark_mnemonics_visible_connected.; |
| 451 | |
| 452 | static void gtk_label_set_markup_internalcxx . . $ gtk_label_set_markup_internal(12f10c424a963dfd). (GtkLabelcxx . . $ GtkLabel# *self, |
| 453 | const char *str, |
| 454 | gbooleancxx . . $ gboolean# with_uline); |
| 455 | static void gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 456 | static void gtk_label_do_popupcxx . . $ gtk_label_do_popup(51c7cb9c710cadb5). (GtkLabelcxx . . $ GtkLabel# *self, |
| 457 | double x, |
| 458 | double y); |
| 459 | static void gtk_label_ensure_select_infocxx . . $ gtk_label_ensure_select_info(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 460 | static void gtk_label_clear_select_infocxx . . $ gtk_label_clear_select_info(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 461 | static void gtk_label_clear_provider_infocxx . . $ gtk_label_clear_provider_info(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 462 | static void gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 463 | static void gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 464 | static void gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 465 | int anchor_index, |
| 466 | int end_index); |
| 467 | static void gtk_label_update_active_linkcxx . . $ gtk_label_update_active_link(ef87130a2c0aa836). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 468 | double x, |
| 469 | double y); |
| 470 | static void gtk_label_setup_mnemoniccxx . . $ gtk_label_setup_mnemonic(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self); |
| 471 | |
| 472 | /* For selectable labels: */ |
| 473 | static void gtk_label_move_cursorcxx . . $ gtk_label_move_cursor(8db45717b1dfc2f8). (GtkLabelcxx . . $ GtkLabel# *self, |
| 474 | GtkMovementStepcxx . . $ GtkMovementStep# step, |
| 475 | int count, |
| 476 | gbooleancxx . . $ gboolean# extend_selection); |
| 477 | |
| 478 | static void gtk_label_buildable_interface_initcxx . . $ gtk_label_buildable_interface_init(c5db55232772c4cd). (GtkBuildableIfacecxx . . $ GtkBuildableIface# *iface); |
| 479 | static GtkBuildableIfacecxx . . $ GtkBuildableIface# *buildable_parent_ifacecxx . . $ buildable_parent_iface. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 480 | |
| 481 | static void gtk_label_accessible_initcxx . . $ gtk_label_accessible_init(2a3ee8376ba476c7). (GtkAccessibleInterfacecxx . . $ GtkAccessibleInterface# *iface); |
| 482 | static void gtk_label_accessible_text_initcxx . . $ gtk_label_accessible_text_init(f16ef2bef1583fe). (GtkAccessibleTextInterfacecxx . . $ GtkAccessibleTextInterface# *iface); |
| 483 | static void gtk_label_accessible_hypertext_initcxx . . $ gtk_label_accessible_hypertext_init(76d84d2a50ed55e6). (GtkAccessibleHypertextInterfacecxx . . $ GtkAccessibleHypertextInterface# *iface); |
| 484 | |
| 485 | G_DEFINE_TYPE_WITH_CODEcxx . . $ `<external>/9567554376676449156/gtype.h:1850:9`! (GtkLabel, gtk_label, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!, |
| 486 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_BUILDABLEcxx . . $ `gtk/gtkbuildable.h:29:9`!, |
| 487 | gtk_label_buildable_interface_init) |
| 488 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_ACCESSIBLEcxx . . $ `gtk/gtkaccessible.h:33:9`!, |
| 489 | gtk_label_accessible_init) |
| 490 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_ACCESSIBLE_TEXTcxx . . $ `gtk/gtkaccessibletext.h:18:9`!, |
| 491 | gtk_label_accessible_text_init) |
| 492 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (GTK_TYPE_ACCESSIBLE_HYPERTEXTcxx . . $ `gtk/gtkaccessiblehypertext.h:24:9`!, |
| 493 | gtk_label_accessible_hypertext_init)) |
| 494 | |
| 495 | static void |
| 496 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class, |
| 497 | guintcxx . . $ guint# keyval, |
| 498 | guintcxx . . $ guint# modmask, |
| 499 | GtkMovementStepcxx . . $ GtkMovementStep# step, |
| 500 | int count) |
| 501 | { |
| 502 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! ((modmask & GDK_SHIFT_MASK) == 0); |
| 503 | |
| 504 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 505 | keyval, modmask, |
| 506 | "move-cursor", |
| 507 | "(iib)", step, count, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 508 | |
| 509 | /* Selection-extending version */ |
| 510 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 511 | keyval, modmask | GDK_SHIFT_MASKcxx . . $ GDK_SHIFT_MASK., |
| 512 | "move-cursor", |
| 513 | "(iib)", step, count, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 514 | } |
| 515 | |
| 516 | static void |
| 517 | gtk_label_set_propertycxx . . $ gtk_label_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 518 | guintcxx . . $ guint# prop_id, |
| 519 | const GValuecxx . . $ GValue# *value, |
| 520 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 521 | { |
| 522 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (object); |
| 523 | |
| 524 | switch (prop_id) |
| 525 | { |
| 526 | case PROP_LABELcxx . . $ PROP_LABEL.: |
| 527 | gtk_label_set_labelcxx . . $ gtk_label_set_label(3d016a7109913fca). (self, g_value_get_stringcxx . . $ g_value_get_string(cc0a2be2b8f7bdc8). (value)); |
| 528 | break; |
| 529 | case PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.: |
| 530 | gtk_label_set_attributescxx . . $ gtk_label_set_attributes(5f4d5ccde1b15dea). (self, g_value_get_boxedcxx . . $ g_value_get_boxed(e12dff36056c2cce). (value)); |
| 531 | break; |
| 532 | case PROP_USE_MARKUPcxx . . $ PROP_USE_MARKUP.: |
| 533 | gtk_label_set_use_markupcxx . . $ gtk_label_set_use_markup(ae51c99326df3b2e). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 534 | break; |
| 535 | case PROP_USE_UNDERLINEcxx . . $ PROP_USE_UNDERLINE.: |
| 536 | gtk_label_set_use_underlinecxx . . $ gtk_label_set_use_underline(ae51c99326df3b2e). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 537 | break; |
| 538 | case PROP_JUSTIFYcxx . . $ PROP_JUSTIFY.: |
| 539 | gtk_label_set_justifycxx . . $ gtk_label_set_justify(3d0fd43de82dcdc6). (self, g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value)); |
| 540 | break; |
| 541 | case PROP_WRAPcxx . . $ PROP_WRAP.: |
| 542 | gtk_label_set_wrapcxx . . $ gtk_label_set_wrap(ae51c99326df3b2e). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 543 | break; |
| 544 | case PROP_WRAP_MODEcxx . . $ PROP_WRAP_MODE.: |
| 545 | gtk_label_set_wrap_modecxx . . $ gtk_label_set_wrap_mode(27c72e772b9f8576). (self, g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value)); |
| 546 | break; |
| 547 | case PROP_NATURAL_WRAP_MODEcxx . . $ PROP_NATURAL_WRAP_MODE.: |
| 548 | gtk_label_set_natural_wrap_modecxx . . $ gtk_label_set_natural_wrap_mode(551a546107157de7). (self, g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value)); |
| 549 | break; |
| 550 | case PROP_SELECTABLEcxx . . $ PROP_SELECTABLE.: |
| 551 | gtk_label_set_selectablecxx . . $ gtk_label_set_selectable(ae51c99326df3b2e). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 552 | break; |
| 553 | case PROP_MNEMONIC_WIDGETcxx . . $ PROP_MNEMONIC_WIDGET.: |
| 554 | gtk_label_set_mnemonic_widgetcxx . . $ gtk_label_set_mnemonic_widget(906eecb9afda53b9). (self, (GtkWidgetcxx . . $ GtkWidget#*) g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce). (value)); |
| 555 | break; |
| 556 | case PROP_ELLIPSIZEcxx . . $ PROP_ELLIPSIZE.: |
| 557 | gtk_label_set_ellipsizecxx . . $ gtk_label_set_ellipsize(671bf0a445f46a82). (self, g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value)); |
| 558 | break; |
| 559 | case PROP_WIDTH_CHARScxx . . $ PROP_WIDTH_CHARS.: |
| 560 | gtk_label_set_width_charscxx . . $ gtk_label_set_width_chars(ae51c99326df3b2e). (self, g_value_get_intcxx . . $ g_value_get_int(f890c5c75ead5b21). (value)); |
| 561 | break; |
| 562 | case PROP_SINGLE_LINE_MODEcxx . . $ PROP_SINGLE_LINE_MODE.: |
| 563 | gtk_label_set_single_line_modecxx . . $ gtk_label_set_single_line_mode(ae51c99326df3b2e). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 564 | break; |
| 565 | case PROP_MAX_WIDTH_CHARScxx . . $ PROP_MAX_WIDTH_CHARS.: |
| 566 | gtk_label_set_max_width_charscxx . . $ gtk_label_set_max_width_chars(ae51c99326df3b2e). (self, g_value_get_intcxx . . $ g_value_get_int(f890c5c75ead5b21). (value)); |
| 567 | break; |
| 568 | case PROP_LINEScxx . . $ PROP_LINES.: |
| 569 | gtk_label_set_linescxx . . $ gtk_label_set_lines(ae51c99326df3b2e). (self, g_value_get_intcxx . . $ g_value_get_int(f890c5c75ead5b21). (value)); |
| 570 | break; |
| 571 | case PROP_XALIGNcxx . . $ PROP_XALIGN.: |
| 572 | gtk_label_set_xaligncxx . . $ gtk_label_set_xalign(5155ad053c7b621). (self, g_value_get_floatcxx . . $ g_value_get_float(19582a908f876f88). (value)); |
| 573 | break; |
| 574 | case PROP_YALIGNcxx . . $ PROP_YALIGN.: |
| 575 | gtk_label_set_yaligncxx . . $ gtk_label_set_yalign(5155ad053c7b621). (self, g_value_get_floatcxx . . $ g_value_get_float(19582a908f876f88). (value)); |
| 576 | break; |
| 577 | case PROP_EXTRA_MENUcxx . . $ PROP_EXTRA_MENU.: |
| 578 | gtk_label_set_extra_menucxx . . $ gtk_label_set_extra_menu(eab1131cd29cad37). (self, g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce). (value)); |
| 579 | break; |
| 580 | case PROP_TABScxx . . $ PROP_TABS.: |
| 581 | gtk_label_set_tabscxx . . $ gtk_label_set_tabs(65de53a7c9847453). (self, g_value_get_boxedcxx . . $ g_value_get_boxed(e12dff36056c2cce). (value)); |
| 582 | break; |
| 583 | default: |
| 584 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 585 | break; |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | static void |
| 590 | gtk_label_get_propertycxx . . $ gtk_label_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 591 | guintcxx . . $ guint# prop_id, |
| 592 | GValuecxx . . $ GValue# *value, |
| 593 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 594 | { |
| 595 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (object); |
| 596 | |
| 597 | switch (prop_id) |
| 598 | { |
| 599 | case PROP_LABELcxx . . $ PROP_LABEL.: |
| 600 | g_value_set_stringcxx . . $ g_value_set_string(65b9ea7708b82b9b). (value, self->labelcxx . . $ _GtkLabel#label.); |
| 601 | break; |
| 602 | case PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.: |
| 603 | g_value_set_boxedcxx . . $ g_value_set_boxed(806599f585dac18b). (value, self->attrscxx . . $ _GtkLabel#attrs.); |
| 604 | break; |
| 605 | case PROP_USE_MARKUPcxx . . $ PROP_USE_MARKUP.: |
| 606 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->use_markupcxx . . $ _GtkLabel#use_markup.); |
| 607 | break; |
| 608 | case PROP_USE_UNDERLINEcxx . . $ PROP_USE_UNDERLINE.: |
| 609 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->use_underlinecxx . . $ _GtkLabel#use_underline.); |
| 610 | break; |
| 611 | case PROP_JUSTIFYcxx . . $ PROP_JUSTIFY.: |
| 612 | g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, self->jtypecxx . . $ _GtkLabel#jtype.); |
| 613 | break; |
| 614 | case PROP_WRAPcxx . . $ PROP_WRAP.: |
| 615 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->wrapcxx . . $ _GtkLabel#wrap.); |
| 616 | break; |
| 617 | case PROP_WRAP_MODEcxx . . $ PROP_WRAP_MODE.: |
| 618 | g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, self->wrap_modecxx . . $ _GtkLabel#wrap_mode.); |
| 619 | break; |
| 620 | case PROP_NATURAL_WRAP_MODEcxx . . $ PROP_NATURAL_WRAP_MODE.: |
| 621 | g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode.); |
| 622 | break; |
| 623 | case PROP_SELECTABLEcxx . . $ PROP_SELECTABLE.: |
| 624 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (self)); |
| 625 | break; |
| 626 | case PROP_MNEMONIC_KEYVALcxx . . $ PROP_MNEMONIC_KEYVAL.: |
| 627 | g_value_set_uintcxx . . $ g_value_set_uint(f81c5c84daf56975). (value, self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.); |
| 628 | break; |
| 629 | case PROP_MNEMONIC_WIDGETcxx . . $ PROP_MNEMONIC_WIDGET.: |
| 630 | g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, (GObjectcxx . . $ GObject#*) self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.); |
| 631 | break; |
| 632 | case PROP_ELLIPSIZEcxx . . $ PROP_ELLIPSIZE.: |
| 633 | g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, self->ellipsizecxx . . $ _GtkLabel#ellipsize.); |
| 634 | break; |
| 635 | case PROP_WIDTH_CHARScxx . . $ PROP_WIDTH_CHARS.: |
| 636 | g_value_set_intcxx . . $ g_value_set_int(b698c61e8e30c4ea). (value, gtk_label_get_width_charscxx . . $ gtk_label_get_width_chars(f95750b06aaf936a). (self)); |
| 637 | break; |
| 638 | case PROP_SINGLE_LINE_MODEcxx . . $ PROP_SINGLE_LINE_MODE.: |
| 639 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, gtk_label_get_single_line_modecxx . . $ gtk_label_get_single_line_mode(f95750b06aaf936a). (self)); |
| 640 | break; |
| 641 | case PROP_MAX_WIDTH_CHARScxx . . $ PROP_MAX_WIDTH_CHARS.: |
| 642 | g_value_set_intcxx . . $ g_value_set_int(b698c61e8e30c4ea). (value, gtk_label_get_max_width_charscxx . . $ gtk_label_get_max_width_chars(f95750b06aaf936a). (self)); |
| 643 | break; |
| 644 | case PROP_LINEScxx . . $ PROP_LINES.: |
| 645 | g_value_set_intcxx . . $ g_value_set_int(b698c61e8e30c4ea). (value, gtk_label_get_linescxx . . $ gtk_label_get_lines(f95750b06aaf936a). (self)); |
| 646 | break; |
| 647 | case PROP_XALIGNcxx . . $ PROP_XALIGN.: |
| 648 | g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb). (value, gtk_label_get_xaligncxx . . $ gtk_label_get_xalign(c27ac19384a22bcd). (self)); |
| 649 | break; |
| 650 | case PROP_YALIGNcxx . . $ PROP_YALIGN.: |
| 651 | g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb). (value, gtk_label_get_yaligncxx . . $ gtk_label_get_yalign(c27ac19384a22bcd). (self)); |
| 652 | break; |
| 653 | case PROP_EXTRA_MENUcxx . . $ PROP_EXTRA_MENU.: |
| 654 | g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, gtk_label_get_extra_menucxx . . $ gtk_label_get_extra_menu(a8c8bf24dbc74d89). (self)); |
| 655 | break; |
| 656 | case PROP_TABScxx . . $ PROP_TABS.: |
| 657 | g_value_set_boxedcxx . . $ g_value_set_boxed(806599f585dac18b). (value, self->tabscxx . . $ _GtkLabel#tabs.); |
| 658 | break; |
| 659 | default: |
| 660 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 661 | break; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | static void |
| 666 | gtk_label_initcxx . . $ gtk_label_init(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 667 | { |
| 668 | self->width_charscxx . . $ _GtkLabel#width_chars. = -1; |
| 669 | self->max_width_charscxx . . $ _GtkLabel#max_width_chars. = -1; |
| 670 | self->labelcxx . . $ _GtkLabel#label. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (""); |
| 671 | self->linescxx . . $ _GtkLabel#lines. = -1; |
| 672 | |
| 673 | self->xaligncxx . . $ _GtkLabel#xalign. = 0.5; |
| 674 | self->yaligncxx . . $ _GtkLabel#yalign. = 0.5; |
| 675 | |
| 676 | self->jtypecxx . . $ _GtkLabel#jtype. = GTK_JUSTIFY_LEFTcxx . . $ GTK_JUSTIFY_LEFT.; |
| 677 | self->wrapcxx . . $ _GtkLabel#wrap. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 678 | self->wrap_modecxx . . $ _GtkLabel#wrap_mode. = PANGO_WRAP_WORDcxx . . $ PANGO_WRAP_WORD.; |
| 679 | self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. = GTK_NATURAL_WRAP_INHERITcxx . . $ GTK_NATURAL_WRAP_INHERIT.; |
| 680 | self->ellipsizecxx . . $ _GtkLabel#ellipsize. = PANGO_ELLIPSIZE_NONEcxx . . $ PANGO_ELLIPSIZE_NONE.; |
| 681 | |
| 682 | self->use_underlinecxx . . $ _GtkLabel#use_underline. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 683 | self->use_markupcxx . . $ _GtkLabel#use_markup. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 684 | |
| 685 | self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval. = GDK_KEY_VoidSymbolcxx . . $ `gdk/gdkkeysyms.h:31:9`!; |
| 686 | self->layoutcxx . . $ _GtkLabel#layout. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 687 | self->textcxx . . $ _GtkLabel#text. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (""); |
| 688 | self->attrscxx . . $ _GtkLabel#attrs. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 689 | self->tabscxx . . $ _GtkLabel#tabs. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 690 | |
| 691 | self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 692 | |
| 693 | self->mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 694 | } |
| 695 | |
| 696 | static const GtkBuildableParsercxx . . $ GtkBuildableParser# pango_parsercxx . . $ pango_parser. = |
| 697 | { |
| 698 | gtk_pango_attribute_start_elementcxx . . $ gtk_pango_attribute_start_element(1a4a7e835e3f8d1e)., |
| 699 | }; |
| 700 | |
| 701 | static gbooleancxx . . $ gboolean# |
| 702 | gtk_label_buildable_custom_tag_startcxx . . $ gtk_label_buildable_custom_tag_start(b259140ba88dbccf). (GtkBuildablecxx . . $ GtkBuildable# *buildable, |
| 703 | GtkBuildercxx . . $ GtkBuilder# *builder, |
| 704 | GObjectcxx . . $ GObject# *child, |
| 705 | const char *tagname, |
| 706 | GtkBuildableParsercxx . . $ GtkBuildableParser# *parser, |
| 707 | gpointercxx . . $ gpointer# *data) |
| 708 | { |
| 709 | if (buildable_parent_ifacecxx . . $ buildable_parent_iface.->custom_tag_startcxx . . $ _GtkBuildableIface#custom_tag_start. (buildable, builder, child, |
| 710 | tagname, parser, data)) |
| 711 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 712 | |
| 713 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (tagname, "attributes") == 0) |
| 714 | { |
| 715 | GtkPangoAttributeParserDatacxx . . $ GtkPangoAttributeParserData# *parser_data; |
| 716 | |
| 717 | gtk_buildable_tag_deprecation_warningcxx . . $ gtk_buildable_tag_deprecation_warning(f47ca88812b837c7). (buildable, builder, "attributes", "attributes"); |
| 718 | |
| 719 | parser_data = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (GtkPangoAttributeParserData, 1); |
| 720 | parser_data->buildercxx . . $ $anonymous_type_ba1456fcbd0cd707_0#builder. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (builder); |
| 721 | parser_data->objectcxx . . $ $anonymous_type_ba1456fcbd0cd707_0#object. = (GObjectcxx . . $ GObject# *) g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (buildable); |
| 722 | *parser = pango_parsercxx . . $ pango_parser.; |
| 723 | *data = parser_data; |
| 724 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 725 | } |
| 726 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 727 | } |
| 728 | |
| 729 | static void |
| 730 | gtk_label_buildable_custom_finishedcxx . . $ gtk_label_buildable_custom_finished(9c109889ce297a82). (GtkBuildablecxx . . $ GtkBuildable# *buildable, |
| 731 | GtkBuildercxx . . $ GtkBuilder# *builder, |
| 732 | GObjectcxx . . $ GObject# *child, |
| 733 | const char *tagname, |
| 734 | gpointercxx . . $ gpointer# user_data) |
| 735 | { |
| 736 | GtkPangoAttributeParserDatacxx . . $ GtkPangoAttributeParserData# *data = user_data; |
| 737 | |
| 738 | buildable_parent_ifacecxx . . $ buildable_parent_iface.->custom_finishedcxx . . $ _GtkBuildableIface#custom_finished. (buildable, builder, child, |
| 739 | tagname, user_data); |
| 740 | |
| 741 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (tagname, "attributes") == 0) |
| 742 | { |
| 743 | if (data->attrscxx . . $ $anonymous_type_ba1456fcbd0cd707_0#attrs.) |
| 744 | { |
| 745 | gtk_label_set_attributescxx . . $ gtk_label_set_attributes(5f4d5ccde1b15dea). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (buildable), data->attrscxx . . $ $anonymous_type_ba1456fcbd0cd707_0#attrs.); |
| 746 | pango_attr_list_unrefcxx . . $ pango_attr_list_unref(c4bf0c0856846d1b). (data->attrscxx . . $ $anonymous_type_ba1456fcbd0cd707_0#attrs.); |
| 747 | } |
| 748 | |
| 749 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (data->objectcxx . . $ $anonymous_type_ba1456fcbd0cd707_0#object.); |
| 750 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (data->buildercxx . . $ $anonymous_type_ba1456fcbd0cd707_0#builder.); |
| 751 | g_freecxx . . $ g_free(5d22bdacc48458e8). (data); |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | static void |
| 756 | gtk_label_buildable_interface_initcxx . . $ gtk_label_buildable_interface_init(c5db55232772c4cd). (GtkBuildableIfacecxx . . $ GtkBuildableIface# *iface) |
| 757 | { |
| 758 | buildable_parent_ifacecxx . . $ buildable_parent_iface. = g_type_interface_peek_parentcxx . . $ g_type_interface_peek_parent(9f162e79bfc6c74). (iface); |
| 759 | |
| 760 | iface->custom_tag_startcxx . . $ _GtkBuildableIface#custom_tag_start. = gtk_label_buildable_custom_tag_startcxx . . $ gtk_label_buildable_custom_tag_start(b259140ba88dbccf).; |
| 761 | iface->custom_finishedcxx . . $ _GtkBuildableIface#custom_finished. = gtk_label_buildable_custom_finishedcxx . . $ gtk_label_buildable_custom_finished(9c109889ce297a82).; |
| 762 | } |
| 763 | |
| 764 | static void |
| 765 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 766 | { |
| 767 | GtkStateFlagscxx . . $ GtkStateFlags# state; |
| 768 | guintcxx . . $ guint# i; |
| 769 | |
| 770 | if (!self->select_infocxx . . $ _GtkLabel#select_info.) |
| 771 | return; |
| 772 | |
| 773 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 774 | { |
| 775 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 776 | |
| 777 | state = gtk_widget_get_state_flagscxx . . $ gtk_widget_get_state_flags(d8976ba950f6e7f). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 778 | if (link->visitedcxx . . $ $anonymous_type_52cf8198354a9553_0#visited.) |
| 779 | state |= GTK_STATE_FLAG_VISITEDcxx . . $ GTK_STATE_FLAG_VISITED.; |
| 780 | else |
| 781 | state |= GTK_STATE_FLAG_LINKcxx . . $ GTK_STATE_FLAG_LINK.; |
| 782 | if (link == self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.) |
| 783 | { |
| 784 | if (self->select_infocxx . . $ _GtkLabel#select_info.->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked.) |
| 785 | state |= GTK_STATE_FLAG_ACTIVEcxx . . $ GTK_STATE_FLAG_ACTIVE.; |
| 786 | else |
| 787 | state |= GTK_STATE_FLAG_PRELIGHTcxx . . $ GTK_STATE_FLAG_PRELIGHT.; |
| 788 | } |
| 789 | gtk_css_node_set_statecxx . . $ gtk_css_node_set_state(98eae1fca7a7008b). (link->cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode., state); |
| 790 | } |
| 791 | } |
| 792 | |
| 793 | static void |
| 794 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 795 | { |
| 796 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 797 | |
| 798 | if (!self->select_infocxx . . $ _GtkLabel#select_info.) |
| 799 | return; |
| 800 | |
| 801 | if (gtk_widget_is_sensitivecxx . . $ gtk_widget_is_sensitive(9247ef2dc26c5426). (widget)) |
| 802 | { |
| 803 | if (self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.) |
| 804 | gtk_widget_set_cursor_from_namecxx . . $ gtk_widget_set_cursor_from_name(3e0616a87a6c51e5). (widget, "pointer"); |
| 805 | else if (self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 806 | gtk_widget_set_cursor_from_namecxx . . $ gtk_widget_set_cursor_from_name(3e0616a87a6c51e5). (widget, "text"); |
| 807 | else |
| 808 | gtk_widget_set_cursorcxx . . $ gtk_widget_set_cursor(ccca0ca28f2292d8). (widget, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 809 | } |
| 810 | else |
| 811 | gtk_widget_set_cursorcxx . . $ gtk_widget_set_cursor(ccca0ca28f2292d8). (widget, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 812 | } |
| 813 | |
| 814 | static void |
| 815 | gtk_label_state_flags_changedcxx . . $ gtk_label_state_flags_changed(e7d7ee4ea524d63). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 816 | GtkStateFlagscxx . . $ GtkStateFlags# prev_state) |
| 817 | { |
| 818 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 819 | |
| 820 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 821 | { |
| 822 | GtkStateFlagscxx . . $ GtkStateFlags# state; |
| 823 | |
| 824 | if (!gtk_widget_is_sensitivecxx . . $ gtk_widget_is_sensitive(9247ef2dc26c5426). (widget)) |
| 825 | gtk_label_select_regioncxx . . $ gtk_label_select_region(236c15b30fe93ff9). (self, 0, 0); |
| 826 | |
| 827 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (self); |
| 828 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (self); |
| 829 | |
| 830 | state = gtk_widget_get_state_flagscxx . . $ gtk_widget_get_state_flags(d8976ba950f6e7f). (widget) & ~GTK_STATE_FLAG_DROP_ACTIVEcxx . . $ GTK_STATE_FLAG_DROP_ACTIVE.; |
| 831 | |
| 832 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node.) |
| 833 | { |
| 834 | gtk_css_node_set_statecxx . . $ gtk_css_node_set_state(98eae1fca7a7008b). (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node., state); |
| 835 | |
| 836 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (widget); |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | if (GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->state_flags_changedcxx . . $ _GtkWidgetClass#state_flags_changed.) |
| 841 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->state_flags_changedcxx . . $ _GtkWidgetClass#state_flags_changed. (widget, prev_state); |
| 842 | } |
| 843 | |
| 844 | static void |
| 845 | gtk_label_update_layout_attributescxx . . $ gtk_label_update_layout_attributes(5f4d5ccde1b15dea). (GtkLabelcxx . . $ GtkLabel# *self, |
| 846 | PangoAttrListcxx . . $ PangoAttrList# *style_attrs) |
| 847 | { |
| 848 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 849 | GtkCssStylecxx . . $ GtkCssStyle# *style; |
| 850 | PangoAttrListcxx . . $ PangoAttrList# *attrs; |
| 851 | |
| 852 | if (self->layoutcxx . . $ _GtkLabel#layout. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 853 | { |
| 854 | pango_attr_list_unrefcxx . . $ pango_attr_list_unref(c4bf0c0856846d1b). (style_attrs); |
| 855 | return; |
| 856 | } |
| 857 | |
| 858 | if (self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.) |
| 859 | { |
| 860 | guintcxx . . $ guint# i; |
| 861 | |
| 862 | attrs = pango_attr_list_newcxx . . $ pango_attr_list_new(169bebe072f9142e). (); |
| 863 | |
| 864 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 865 | { |
| 866 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 867 | const GdkRGBAcxx . . $ GdkRGBA# *link_color; |
| 868 | PangoAttrListcxx . . $ PangoAttrList# *link_attrs; |
| 869 | PangoAttributecxx . . $ PangoAttribute# *attr; |
| 870 | |
| 871 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (link->cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode.); |
| 872 | link_attrs = gtk_css_style_get_pango_attributescxx . . $ gtk_css_style_get_pango_attributes(a0654fff2b6079ee). (style); |
| 873 | if (link_attrs) |
| 874 | { |
| 875 | GSListcxx . . $ GSList# *attributes = pango_attr_list_get_attributescxx . . $ pango_attr_list_get_attributes(8dfd0bcb7b7af988). (link_attrs); |
| 876 | GSListcxx . . $ GSList# *l; |
| 877 | for (l = attributes; l; l = l->nextcxx . . $ _GSList#next.) |
| 878 | { |
| 879 | attr = l->datacxx . . $ _GSList#data.; |
| 880 | |
| 881 | attr->start_indexcxx . . $ _PangoAttribute#start_index. = link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 882 | attr->end_indexcxx . . $ _PangoAttribute#end_index. = link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.; |
| 883 | pango_attr_list_insertcxx . . $ pango_attr_list_insert(db91f5ecbb0f813c). (attrs, attr); |
| 884 | } |
| 885 | g_slist_freecxx . . $ g_slist_free(e7f64dba92841206). (attributes); |
| 886 | } |
| 887 | |
| 888 | link_color = gtk_css_color_value_get_rgbacxx . . $ gtk_css_color_value_get_rgba(f067075b082ed3df). (style->usedcxx . . $ _GtkCssStyle#used.->colorcxx . . $ _GtkCssUsedValues#color.); |
| 889 | |
| 890 | attr = pango_attr_foreground_newcxx . . $ pango_attr_foreground_new(bcf6984e22aba7a7). (CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (link_color->red * 65535. + 0.5, 0, 65535), |
| 891 | CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (link_color->green * 65535. + 0.5, 0, 65535), |
| 892 | CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (link_color->blue * 65535. + 0.5, 0, 65535)); |
| 893 | |
| 894 | attr->start_indexcxx . . $ _PangoAttribute#start_index. = link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 895 | attr->end_indexcxx . . $ _PangoAttribute#end_index. = link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.; |
| 896 | pango_attr_list_insertcxx . . $ pango_attr_list_insert(db91f5ecbb0f813c). (attrs, attr); |
| 897 | |
| 898 | if (link_color->alphacxx . . $ _GdkRGBA#alpha. < 0.999) |
| 899 | { |
| 900 | attr = pango_attr_foreground_alpha_newcxx . . $ pango_attr_foreground_alpha_new(c31a1b50e6c3c86). (CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (link_color->alpha * 65535. + 0.5, 0, 65535)); |
| 901 | |
| 902 | attr->start_indexcxx . . $ _PangoAttribute#start_index. = link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 903 | attr->end_indexcxx . . $ _PangoAttribute#end_index. = link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.; |
| 904 | pango_attr_list_insertcxx . . $ pango_attr_list_insert(db91f5ecbb0f813c). (attrs, attr); |
| 905 | } |
| 906 | |
| 907 | pango_attr_list_unrefcxx . . $ pango_attr_list_unref(c4bf0c0856846d1b). (link_attrs); |
| 908 | } |
| 909 | } |
| 910 | else |
| 911 | attrs = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 912 | |
| 913 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (gtk_widget_get_css_nodecxx . . $ gtk_widget_get_css_node(e7b0819f4c134bd6). (widget)); |
| 914 | if (!style_attrs) |
| 915 | style_attrs = gtk_css_style_get_pango_attributescxx . . $ gtk_css_style_get_pango_attributes(a0654fff2b6079ee). (style); |
| 916 | |
| 917 | if (style_attrs) |
| 918 | { |
| 919 | attrs = _gtk_pango_attr_list_mergecxx . . $ _gtk_pango_attr_list_merge(8163de8e8a798b7f). (attrs, style_attrs); |
| 920 | pango_attr_list_unrefcxx . . $ pango_attr_list_unref(c4bf0c0856846d1b). (style_attrs); |
| 921 | } |
| 922 | |
| 923 | attrs = _gtk_pango_attr_list_mergecxx . . $ _gtk_pango_attr_list_merge(8163de8e8a798b7f). (attrs, self->markup_attrscxx . . $ _GtkLabel#markup_attrs.); |
| 924 | attrs = _gtk_pango_attr_list_mergecxx . . $ _gtk_pango_attr_list_merge(8163de8e8a798b7f). (attrs, self->attrscxx . . $ _GtkLabel#attrs.); |
| 925 | |
| 926 | pango_layout_set_attributescxx . . $ pango_layout_set_attributes(b6ddc5fc8bc1382). (self->layoutcxx . . $ _GtkLabel#layout., attrs); |
| 927 | |
| 928 | pango_attr_list_unrefcxx . . $ pango_attr_list_unref(c4bf0c0856846d1b). (attrs); |
| 929 | } |
| 930 | |
| 931 | static void |
| 932 | gtk_label_css_changedcxx . . $ gtk_label_css_changed(4442664c79e1955d). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 933 | GtkCssStyleChangecxx . . $ GtkCssStyleChange# *change) |
| 934 | { |
| 935 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 936 | gbooleancxx . . $ gboolean# attrs_affected; |
| 937 | PangoAttrListcxx . . $ PangoAttrList# *new_attrs = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 938 | |
| 939 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->css_changedcxx . . $ _GtkWidgetClass#css_changed. (widget, change); |
| 940 | |
| 941 | if (gtk_css_style_change_affectscxx . . $ gtk_css_style_change_affects(dd611ee2c95fff96). (change, GTK_CSS_AFFECTS_TEXT_ATTRScxx . . $ GTK_CSS_AFFECTS_TEXT_ATTRS.)) |
| 942 | { |
| 943 | new_attrs = gtk_css_style_get_pango_attributescxx . . $ gtk_css_style_get_pango_attributes(a0654fff2b6079ee). (gtk_css_style_change_get_new_stylecxx . . $ gtk_css_style_change_get_new_style(2e0189e831cadff). (change)); |
| 944 | attrs_affected = (self->layoutcxx . . $ _GtkLabel#layout. && pango_layout_get_attributescxx . . $ pango_layout_get_attributes(d96f565cb938b965). (self->layoutcxx . . $ _GtkLabel#layout.)) || |
| 945 | new_attrs; |
| 946 | } |
| 947 | else |
| 948 | attrs_affected = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 949 | |
| 950 | if (change == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || attrs_affected || (self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.)) |
| 951 | { |
| 952 | gtk_label_update_layout_attributescxx . . $ gtk_label_update_layout_attributes(5f4d5ccde1b15dea). (self, new_attrs); |
| 953 | |
| 954 | if (attrs_affected) |
| 955 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (widget); |
| 956 | } |
| 957 | } |
| 958 | |
| 959 | static PangoDirectioncxx . . $ PangoDirection# |
| 960 | get_cursor_directioncxx . . $ get_cursor_direction(145f4c570d45e2f9). (GtkLabelcxx . . $ GtkLabel# *self) |
| 961 | { |
| 962 | GSListcxx . . $ GSList# *l; |
| 963 | |
| 964 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (self->select_info); |
| 965 | |
| 966 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 967 | |
| 968 | for (l = pango_layout_get_lines_readonlycxx . . $ pango_layout_get_lines_readonly(7d3dce961223f226). (self->layoutcxx . . $ _GtkLabel#layout.); l; l = l->nextcxx . . $ _GSList#next.) |
| 969 | { |
| 970 | PangoLayoutLinecxx . . $ PangoLayoutLine# *line = l->datacxx . . $ _GSList#data.; |
| 971 | |
| 972 | /* If self->select_info->selection_end is at the very end of |
| 973 | * the line, we don't know if the cursor is on this line or |
| 974 | * the next without looking ahead at the next line. (End |
| 975 | * of paragraph is different from line break.) But it's |
| 976 | * definitely in this paragraph, which is good enough |
| 977 | * to figure out the resolved direction. |
| 978 | */ |
| 979 | if (pango_layout_line_get_start_indexcxx . . $ pango_layout_line_get_start_index(64c8ccdfc447c118). (line) + pango_layout_line_get_lengthcxx . . $ pango_layout_line_get_length(64c8ccdfc447c118). (line) >= self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) |
| 980 | return pango_layout_line_get_resolved_directioncxx . . $ pango_layout_line_get_resolved_direction(491aa4469783fa0c). (line); |
| 981 | } |
| 982 | |
| 983 | return PANGO_DIRECTION_LTRcxx . . $ PANGO_DIRECTION_LTR.; |
| 984 | } |
| 985 | |
| 986 | static int |
| 987 | _gtk_label_get_link_atcxx . . $ _gtk_label_get_link_at(7d3bc1c500b2b3a9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 988 | int pos) |
| 989 | { |
| 990 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 991 | { |
| 992 | guintcxx . . $ guint# i; |
| 993 | |
| 994 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 995 | { |
| 996 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 997 | |
| 998 | if (link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start. <= pos && pos < link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.) |
| 999 | return i; |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | return -1; |
| 1004 | } |
| 1005 | |
| 1006 | static GtkLabelLinkcxx . . $ GtkLabelLink# * |
| 1007 | gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1008 | int *out_index) |
| 1009 | { |
| 1010 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 1011 | int link_index; |
| 1012 | |
| 1013 | if (!info || |
| 1014 | info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) |
| 1015 | goto nope; |
| 1016 | |
| 1017 | link_index = _gtk_label_get_link_atcxx . . $ _gtk_label_get_link_at(7d3bc1c500b2b3a9). (self, info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.); |
| 1018 | |
| 1019 | if (link_index != -1) |
| 1020 | { |
| 1021 | if (out_index) |
| 1022 | *out_index = link_index; |
| 1023 | |
| 1024 | return &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[link_index]; |
| 1025 | } |
| 1026 | |
| 1027 | nope: |
| 1028 | if (out_index) |
| 1029 | *out_index = -1; |
| 1030 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1031 | } |
| 1032 | |
| 1033 | /** |
| 1034 | * gtk_label_get_measuring_layout: |
| 1035 | * @self: the label |
| 1036 | * @existing_layout: an existing layout already in use |
| 1037 | * @width: the width to measure with, in Pango units, or -1 for infinite |
| 1038 | * |
| 1039 | * Gets a layout that can be used for measuring sizes. |
| 1040 | * |
| 1041 | * The returned layout will be identical to the label’s layout except |
| 1042 | * for the layout’s width, which will be set to @width. Do not modify |
| 1043 | * the returned layout. |
| 1044 | * |
| 1045 | * Returns: a Pango layout |
| 1046 | */ |
| 1047 | static PangoLayoutcxx . . $ PangoLayout# * |
| 1048 | gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1049 | PangoLayoutcxx . . $ PangoLayout# *existing_layout, |
| 1050 | int width) |
| 1051 | { |
| 1052 | PangoLayoutcxx . . $ PangoLayout# *copy; |
| 1053 | |
| 1054 | if (existing_layout != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1055 | { |
| 1056 | if (existing_layout != self->layoutcxx . . $ _GtkLabel#layout.) |
| 1057 | { |
| 1058 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (existing_layout, width); |
| 1059 | return existing_layout; |
| 1060 | } |
| 1061 | |
| 1062 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (existing_layout); |
| 1063 | } |
| 1064 | |
| 1065 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1066 | |
| 1067 | if (pango_layout_get_widthcxx . . $ pango_layout_get_width(dd36b00c04a5085b). (self->layoutcxx . . $ _GtkLabel#layout.) == width) |
| 1068 | { |
| 1069 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (self->layout); |
| 1070 | return self->layoutcxx . . $ _GtkLabel#layout.; |
| 1071 | } |
| 1072 | |
| 1073 | /* We can use the label's own layout if we're not allocated a size yet, |
| 1074 | * because we don't need it to be properly setup at that point. |
| 1075 | * This way we can make use of caching upon the label's creation. |
| 1076 | */ |
| 1077 | if (gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)) <= 1) |
| 1078 | { |
| 1079 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (self->layout); |
| 1080 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., width); |
| 1081 | return self->layoutcxx . . $ _GtkLabel#layout.; |
| 1082 | } |
| 1083 | |
| 1084 | /* oftentimes we want to measure a width that is far wider than the current width, |
| 1085 | * even though the layout would not change if we made it wider. In that case, we |
| 1086 | * can just return the current layout, because for measuring purposes, it will be |
| 1087 | * identical. |
| 1088 | */ |
| 1089 | if (!pango_layout_is_wrappedcxx . . $ pango_layout_is_wrapped(dd36b00c04a5085b). (self->layoutcxx . . $ _GtkLabel#layout.) && |
| 1090 | !pango_layout_is_ellipsizedcxx . . $ pango_layout_is_ellipsized(dd36b00c04a5085b). (self->layoutcxx . . $ _GtkLabel#layout.)) |
| 1091 | { |
| 1092 | PangoRectanglecxx . . $ PangoRectangle# rect; |
| 1093 | |
| 1094 | if (width == -1) |
| 1095 | return g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (self->layout); |
| 1096 | |
| 1097 | pango_layout_get_extentscxx . . $ pango_layout_get_extents(387377cd6f424af2). (self->layoutcxx . . $ _GtkLabel#layout., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &rect); |
| 1098 | if (rect.widthcxx . . $ _PangoRectangle#width. <= width) |
| 1099 | return g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (self->layout); |
| 1100 | } |
| 1101 | |
| 1102 | copy = pango_layout_copycxx . . $ pango_layout_copy(84608a3c920215dc). (self->layoutcxx . . $ _GtkLabel#layout.); |
| 1103 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (copy, width); |
| 1104 | return copy; |
| 1105 | } |
| 1106 | |
| 1107 | static int |
| 1108 | get_char_pixelscxx . . $ get_char_pixels(dd36b00c04a5085b). (PangoLayoutcxx . . $ PangoLayout# *layout) |
| 1109 | { |
| 1110 | PangoContextcxx . . $ PangoContext# *context; |
| 1111 | PangoFontMetricscxx . . $ PangoFontMetrics# *metrics; |
| 1112 | int char_width, digit_width; |
| 1113 | |
| 1114 | context = pango_layout_get_contextcxx . . $ pango_layout_get_context(2a2e0adaaef4fc4b). (layout); |
| 1115 | metrics = pango_context_get_metricscxx . . $ pango_context_get_metrics(cdce0291782eec9). (context, 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`!); |
| 1116 | char_width = pango_font_metrics_get_approximate_char_widthcxx . . $ pango_font_metrics_get_approximate_char_width(2ff6b600e79c21c6). (metrics); |
| 1117 | digit_width = pango_font_metrics_get_approximate_digit_widthcxx . . $ pango_font_metrics_get_approximate_digit_width(2ff6b600e79c21c6). (metrics); |
| 1118 | pango_font_metrics_unrefcxx . . $ pango_font_metrics_unref(81d751d76b5b3fd4). (metrics); |
| 1119 | |
| 1120 | return MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (char_width, digit_width); |
| 1121 | } |
| 1122 | |
| 1123 | static void |
| 1124 | get_default_widthscxx . . $ get_default_widths(55274c6742c17302). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1125 | int *minimum, |
| 1126 | int *natural) |
| 1127 | { |
| 1128 | int char_pixels; |
| 1129 | |
| 1130 | if (self->width_charscxx . . $ _GtkLabel#width_chars. < 0 && self->max_width_charscxx . . $ _GtkLabel#max_width_chars. < 0) |
| 1131 | { |
| 1132 | if (minimum) |
| 1133 | *minimum = -1; |
| 1134 | if (natural) |
| 1135 | *natural = -1; |
| 1136 | return; |
| 1137 | } |
| 1138 | |
| 1139 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1140 | char_pixels = get_char_pixelscxx . . $ get_char_pixels(dd36b00c04a5085b). (self->layoutcxx . . $ _GtkLabel#layout.); |
| 1141 | |
| 1142 | if (minimum) |
| 1143 | { |
| 1144 | if (self->width_charscxx . . $ _GtkLabel#width_chars. < 0) |
| 1145 | *minimum = -1; |
| 1146 | else |
| 1147 | *minimum = char_pixels * self->width_charscxx . . $ _GtkLabel#width_chars.; |
| 1148 | } |
| 1149 | |
| 1150 | if (natural) |
| 1151 | { |
| 1152 | if (self->max_width_charscxx . . $ _GtkLabel#max_width_chars. < 0) |
| 1153 | *natural = -1; |
| 1154 | else |
| 1155 | *natural = char_pixels * MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->width_chars, self->max_width_chars); |
| 1156 | } |
| 1157 | } |
| 1158 | |
| 1159 | static void |
| 1160 | get_static_sizecxx . . $ get_static_size(a9c6b6332efad161). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1161 | GtkOrientationcxx . . $ GtkOrientation# orientation, |
| 1162 | int *minimum, |
| 1163 | int *natural, |
| 1164 | int *minimum_baseline, |
| 1165 | int *natural_baseline) |
| 1166 | { |
| 1167 | int minimum_default, natural_default; |
| 1168 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 1169 | |
| 1170 | get_default_widthscxx . . $ get_default_widths(55274c6742c17302). (self, &minimum_default, &natural_default); |
| 1171 | |
| 1172 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, self->ellipsizecxx . . $ _GtkLabel#ellipsize. ? natural_default : -1); |
| 1173 | |
| 1174 | if (orientation == GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.) |
| 1175 | { |
| 1176 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, natural, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1177 | if (self->ellipsizecxx . . $ _GtkLabel#ellipsize.) |
| 1178 | { |
| 1179 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, layout, 0); |
| 1180 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, minimum, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1181 | /* yes, Pango ellipsizes even when that needs more space */ |
| 1182 | *minimum = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (*minimum, *natural); |
| 1183 | } |
| 1184 | else |
| 1185 | *minimum = *natural; |
| 1186 | |
| 1187 | if (minimum_default > *minimum) |
| 1188 | *minimum = minimum_default; |
| 1189 | *natural = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (*minimum, *natural); |
| 1190 | } |
| 1191 | else |
| 1192 | { |
| 1193 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, minimum); |
| 1194 | *minimum_baseline = pango_layout_get_baselinecxx . . $ pango_layout_get_baseline(dd36b00c04a5085b). (layout); |
| 1195 | |
| 1196 | *natural = *minimum; |
| 1197 | *natural_baseline = *minimum_baseline; |
| 1198 | } |
| 1199 | |
| 1200 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (layout); |
| 1201 | } |
| 1202 | |
| 1203 | static void |
| 1204 | get_height_for_widthcxx . . $ get_height_for_width(a3ff1b4f1ee3f703). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1205 | int width, |
| 1206 | int *minimum_height, |
| 1207 | int *natural_height, |
| 1208 | int *minimum_baseline, |
| 1209 | int *natural_baseline) |
| 1210 | { |
| 1211 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 1212 | int natural_width, text_height, baseline; |
| 1213 | |
| 1214 | if (width < 0) |
| 1215 | { |
| 1216 | /* Minimum height is assuming infinite width */ |
| 1217 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, -1); |
| 1218 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, minimum_height); |
| 1219 | baseline = pango_layout_get_baselinecxx . . $ pango_layout_get_baseline(dd36b00c04a5085b). (layout); |
| 1220 | *minimum_baseline = baseline; |
| 1221 | |
| 1222 | /* Natural height is assuming natural width */ |
| 1223 | get_default_widthscxx . . $ get_default_widths(55274c6742c17302). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &natural_width); |
| 1224 | |
| 1225 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, layout, natural_width); |
| 1226 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, natural_height); |
| 1227 | baseline = pango_layout_get_baselinecxx . . $ pango_layout_get_baseline(dd36b00c04a5085b). (layout); |
| 1228 | *natural_baseline = baseline; |
| 1229 | } |
| 1230 | else |
| 1231 | { |
| 1232 | /* minimum = natural for any given width */ |
| 1233 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, width); |
| 1234 | |
| 1235 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &text_height); |
| 1236 | |
| 1237 | *minimum_height = text_height; |
| 1238 | *natural_height = text_height; |
| 1239 | |
| 1240 | baseline = pango_layout_get_baselinecxx . . $ pango_layout_get_baseline(dd36b00c04a5085b). (layout); |
| 1241 | *minimum_baseline = baseline; |
| 1242 | *natural_baseline = baseline; |
| 1243 | } |
| 1244 | |
| 1245 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (layout); |
| 1246 | } |
| 1247 | |
| 1248 | static int |
| 1249 | my_pango_layout_get_width_for_heightcxx . . $ my_pango_layout_get_width_for_height(e9a7203fb7f41a73). (PangoLayoutcxx . . $ PangoLayout# *layout, |
| 1250 | int for_height, |
| 1251 | int min, |
| 1252 | int max) |
| 1253 | { |
| 1254 | int mid, text_width, text_height; |
| 1255 | |
| 1256 | min = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (min); |
| 1257 | max = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (max); |
| 1258 | |
| 1259 | while (min < max) |
| 1260 | { |
| 1261 | mid = (min + max) / 2; |
| 1262 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (layout, mid * PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 1263 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, &text_width, &text_height); |
| 1264 | text_width = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (text_width); |
| 1265 | if (text_width > mid) |
| 1266 | min = text_width; |
| 1267 | else if (text_height > for_height) |
| 1268 | min = mid + 1; |
| 1269 | else |
| 1270 | max = text_width; |
| 1271 | } |
| 1272 | |
| 1273 | return min * PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 1274 | } |
| 1275 | |
| 1276 | static void |
| 1277 | get_width_for_heightcxx . . $ get_width_for_height(26f30bf72e0ae158). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1278 | int height, |
| 1279 | int *minimum_width, |
| 1280 | int *natural_width) |
| 1281 | { |
| 1282 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 1283 | int minimum_default, natural_default; |
| 1284 | |
| 1285 | get_default_widthscxx . . $ get_default_widths(55274c6742c17302). (self, &minimum_default, &natural_default); |
| 1286 | |
| 1287 | if (height < 0) |
| 1288 | { |
| 1289 | /* Minimum width is as many line breaks as possible */ |
| 1290 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (minimum_default, 0)); |
| 1291 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, minimum_width, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1292 | *minimum_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (*minimum_width, minimum_default); |
| 1293 | |
| 1294 | /* Natural width is natural width - or as wide as possible */ |
| 1295 | layout = gtk_label_get_measuring_layoutcxx . . $ gtk_label_get_measuring_layout(8392dbc57809c0d3). (self, layout, natural_default); |
| 1296 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, natural_width, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1297 | *natural_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (*natural_width, *minimum_width); |
| 1298 | } |
| 1299 | else |
| 1300 | { |
| 1301 | int min, max; |
| 1302 | |
| 1303 | /* Can't use a measuring layout here, because we need to force |
| 1304 | * ellipsizing mode */ |
| 1305 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1306 | layout = pango_layout_copycxx . . $ pango_layout_copy(84608a3c920215dc). (self->layoutcxx . . $ _GtkLabel#layout.); |
| 1307 | pango_layout_set_ellipsizecxx . . $ pango_layout_set_ellipsize(f91af10e808ea17f). (layout, PANGO_ELLIPSIZE_NONEcxx . . $ PANGO_ELLIPSIZE_NONE.); |
| 1308 | |
| 1309 | /* binary search for the smallest width where the height doesn't |
| 1310 | * eclipse the given height */ |
| 1311 | min = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (minimum_default, 0); |
| 1312 | |
| 1313 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (layout, -1); |
| 1314 | pango_layout_get_sizecxx . . $ pango_layout_get_size(4e8562eb28bfa385). (layout, &max, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1315 | |
| 1316 | /* first, do natural width */ |
| 1317 | if (self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. == GTK_NATURAL_WRAP_NONEcxx . . $ GTK_NATURAL_WRAP_NONE.) |
| 1318 | { |
| 1319 | *natural_width = max; |
| 1320 | } |
| 1321 | else |
| 1322 | { |
| 1323 | if (self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. == GTK_NATURAL_WRAP_WORDcxx . . $ GTK_NATURAL_WRAP_WORD.) |
| 1324 | pango_layout_set_wrapcxx . . $ pango_layout_set_wrap(1c7526d419bcfe09). (layout, PANGO_WRAP_WORDcxx . . $ PANGO_WRAP_WORD.); |
| 1325 | *natural_width = my_pango_layout_get_width_for_heightcxx . . $ my_pango_layout_get_width_for_height(e9a7203fb7f41a73). (layout, height, min, max); |
| 1326 | } |
| 1327 | |
| 1328 | /* then, do minimum width */ |
| 1329 | if (self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. == GTK_NATURAL_WRAP_INHERITcxx . . $ GTK_NATURAL_WRAP_INHERIT. && self->ellipsizecxx . . $ _GtkLabel#ellipsize. == PANGO_ELLIPSIZE_NONEcxx . . $ PANGO_ELLIPSIZE_NONE.) |
| 1330 | { |
| 1331 | *minimum_width = *natural_width; |
| 1332 | } |
| 1333 | else |
| 1334 | { |
| 1335 | pango_layout_set_wrapcxx . . $ pango_layout_set_wrap(1c7526d419bcfe09). (layout, self->wrap_modecxx . . $ _GtkLabel#wrap_mode.); |
| 1336 | pango_layout_set_ellipsizecxx . . $ pango_layout_set_ellipsize(f91af10e808ea17f). (layout, self->ellipsizecxx . . $ _GtkLabel#ellipsize.); |
| 1337 | *minimum_width = my_pango_layout_get_width_for_heightcxx . . $ my_pango_layout_get_width_for_height(e9a7203fb7f41a73). (layout, height, min, *natural_width); |
| 1338 | } |
| 1339 | } |
| 1340 | |
| 1341 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (layout); |
| 1342 | } |
| 1343 | |
| 1344 | static void |
| 1345 | gtk_label_measurecxx . . $ gtk_label_measure(d91afbd837fc0c19). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1346 | GtkOrientationcxx . . $ GtkOrientation# orientation, |
| 1347 | int for_size, |
| 1348 | int *minimum, |
| 1349 | int *natural, |
| 1350 | int *minimum_baseline, |
| 1351 | int *natural_baseline) |
| 1352 | { |
| 1353 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1354 | |
| 1355 | if (for_size > 0) |
| 1356 | for_size *= PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 1357 | |
| 1358 | if (!self->wrapcxx . . $ _GtkLabel#wrap.) |
| 1359 | get_static_sizecxx . . $ get_static_size(a9c6b6332efad161). (self, orientation, minimum, natural, minimum_baseline, natural_baseline); |
| 1360 | else if (orientation == GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.) |
| 1361 | get_height_for_widthcxx . . $ get_height_for_width(a3ff1b4f1ee3f703). (self, for_size, minimum, natural, minimum_baseline, natural_baseline); |
| 1362 | else |
| 1363 | get_width_for_heightcxx . . $ get_width_for_height(26f30bf72e0ae158). (self, for_size, minimum, natural); |
| 1364 | |
| 1365 | *minimum = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (*minimum); |
| 1366 | *natural = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (*natural); |
| 1367 | if (*minimum_baseline > 0) |
| 1368 | *minimum_baseline = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (*minimum_baseline); |
| 1369 | if (*natural_baseline > 0) |
| 1370 | *natural_baseline = PANGO_PIXELS_CEILcxx . . $ `<external>/16549852590339199443/pango-types.h:99:9`! (*natural_baseline); |
| 1371 | } |
| 1372 | |
| 1373 | void |
| 1374 | gtk_label_get_layout_locationcxx . . $ gtk_label_get_layout_location(8c422bc0344df158). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1375 | float *xp, |
| 1376 | float *yp) |
| 1377 | { |
| 1378 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 1379 | const int widget_width = gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (widget); |
| 1380 | const int widget_height = gtk_widget_get_heightcxx . . $ gtk_widget_get_height(9247ef2dc26c5426). (widget); |
| 1381 | PangoRectanglecxx . . $ PangoRectangle# logical; |
| 1382 | float xalign; |
| 1383 | int baseline; |
| 1384 | float x, y; |
| 1385 | |
| 1386 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (xp); |
| 1387 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (yp); |
| 1388 | |
| 1389 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1390 | |
| 1391 | xalign = self->xaligncxx . . $ _GtkLabel#xalign.; |
| 1392 | |
| 1393 | if (_gtk_widget_get_directioncxx . . $ _gtk_widget_get_direction(a6537c3bfdacec30). (widget) != GTK_TEXT_DIR_LTRcxx . . $ GTK_TEXT_DIR_LTR.) |
| 1394 | xalign = 1.0 - xalign; |
| 1395 | |
| 1396 | pango_layout_get_pixel_extentscxx . . $ pango_layout_get_pixel_extents(387377cd6f424af2). (self->layoutcxx . . $ _GtkLabel#layout., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &logical); |
| 1397 | x = floor ((xalign * (widget_width - logical.widthcxx . . $ _PangoRectangle#width.)) - logical.xcxx . . $ _PangoRectangle#x.); |
| 1398 | |
| 1399 | baseline = gtk_widget_get_baselinecxx . . $ gtk_widget_get_baseline(9247ef2dc26c5426). (widget); |
| 1400 | if (baseline != -1) |
| 1401 | { |
| 1402 | int layout_baseline = pango_layout_get_baselinecxx . . $ pango_layout_get_baseline(dd36b00c04a5085b). (self->layoutcxx . . $ _GtkLabel#layout.) / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 1403 | /* yalign is 0 because we can't support yalign while baseline aligning */ |
| 1404 | y = baseline - layout_baseline; |
| 1405 | } |
| 1406 | else |
| 1407 | { |
| 1408 | y = floor ((widget_height - logical.heightcxx . . $ _PangoRectangle#height.) * self->yaligncxx . . $ _GtkLabel#yalign.); |
| 1409 | } |
| 1410 | |
| 1411 | *xp = x; |
| 1412 | *yp = y; |
| 1413 | } |
| 1414 | |
| 1415 | static void |
| 1416 | gtk_label_size_allocatecxx . . $ gtk_label_size_allocate(598a503332136822). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1417 | int width, |
| 1418 | int height, |
| 1419 | int baseline) |
| 1420 | { |
| 1421 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1422 | |
| 1423 | if (self->layoutcxx . . $ _GtkLabel#layout.) |
| 1424 | { |
| 1425 | if (self->ellipsizecxx . . $ _GtkLabel#ellipsize. || self->wrapcxx . . $ _GtkLabel#wrap.) |
| 1426 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., width * PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 1427 | else |
| 1428 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., -1); |
| 1429 | } |
| 1430 | |
| 1431 | if (self->popup_menucxx . . $ _GtkLabel#popup_menu.) |
| 1432 | gtk_popover_presentcxx . . $ gtk_popover_present(b785fb6a7faea117). (GTK_POPOVERcxx . . $ `gtk/gtkpopover.h:32:9`! (self->popup_menu)); |
| 1433 | } |
| 1434 | |
| 1435 | |
| 1436 | |
| 1437 | #define GRAPHENE_RECT_FROM_RECTcxx . . $ `gtk/gtklabel.c:1437:9`!(_r) (GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! ((_r)->x, (_r)->y, (_r)->width, (_r)->height)) |
| 1438 | |
| 1439 | static void |
| 1440 | gtk_label_snapshotcxx . . $ gtk_label_snapshot(80012d1141bb3efa). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1441 | GtkSnapshotcxx . . $ GtkSnapshot# *snapshot) |
| 1442 | { |
| 1443 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1444 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info; |
| 1445 | GtkCssStylecxx . . $ GtkCssStyle# *style; |
| 1446 | float lx, ly; |
| 1447 | int width, height; |
| 1448 | GtkCssBoxescxx . . $ GtkCssBoxes# boxes; |
| 1449 | |
| 1450 | if (!self->textcxx . . $ _GtkLabel#text. || (*self->textcxx . . $ _GtkLabel#text. == '\0')) |
| 1451 | return; |
| 1452 | |
| 1453 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1454 | |
| 1455 | gtk_label_get_layout_locationcxx . . $ gtk_label_get_layout_location(8c422bc0344df158). (self, &lx, &ly); |
| 1456 | |
| 1457 | gtk_css_boxes_initcxx . . $ gtk_css_boxes_init(b9ce2e386df4236c). (&boxes, widget); |
| 1458 | gtk_css_style_snapshot_layoutcxx . . $ gtk_css_style_snapshot_layout(dad263d465d8b3e9). (&boxes, snapshot, lx, ly, self->layoutcxx . . $ _GtkLabel#layout.); |
| 1459 | |
| 1460 | info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 1461 | if (!info) |
| 1462 | return; |
| 1463 | |
| 1464 | width = gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (widget); |
| 1465 | height = gtk_widget_get_heightcxx . . $ gtk_widget_get_height(9247ef2dc26c5426). (widget); |
| 1466 | |
| 1467 | if (info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) |
| 1468 | { |
| 1469 | int range[2]; |
| 1470 | cairo_region_tcxx . . $ cairo_region_t# *range_clip; |
| 1471 | cairo_rectangle_int_tcxx . . $ cairo_rectangle_int_t# clip_rect; |
| 1472 | int i; |
| 1473 | |
| 1474 | range[0] = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (info->selection_anchor, info->selection_end); |
| 1475 | range[1] = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (info->selection_anchor, info->selection_end); |
| 1476 | |
| 1477 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (info->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node.); |
| 1478 | gtk_css_boxes_init_border_boxcxx . . $ gtk_css_boxes_init_border_box(b910b0485ae2fb69). (&boxes, style, 0, 0, width, height); |
| 1479 | |
| 1480 | range_clip = gdk_pango_layout_get_clip_regioncxx . . $ gdk_pango_layout_get_clip_region(1098c307f6d08449). (self->layoutcxx . . $ _GtkLabel#layout., lx, ly, range, 1); |
| 1481 | for (i = 0; i < cairo_region_num_rectanglescxx . . $ cairo_region_num_rectangles(fa9faa7bc920d0b7). (range_clip); i++) |
| 1482 | { |
| 1483 | cairo_region_get_rectanglecxx . . $ cairo_region_get_rectangle(641dcc7a8b17ec5a). (range_clip, i, &clip_rect); |
| 1484 | |
| 1485 | gtk_snapshot_push_clipcxx . . $ gtk_snapshot_push_clip(f2e77ce91ee65beb). (snapshot, &GRAPHENE_RECT_FROM_RECTcxx . . $ `gtk/gtklabel.c:1437:9`! (&clip_rect)); |
| 1486 | gtk_css_style_snapshot_backgroundcxx . . $ gtk_css_style_snapshot_background(576772ddd1050635). (&boxes, snapshot); |
| 1487 | gtk_css_style_snapshot_layoutcxx . . $ gtk_css_style_snapshot_layout(dad263d465d8b3e9). (&boxes, snapshot, lx, ly, self->layoutcxx . . $ _GtkLabel#layout.); |
| 1488 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (snapshot); |
| 1489 | } |
| 1490 | |
| 1491 | cairo_region_destroycxx . . $ cairo_region_destroy(35bc32d2a20e1aad). (range_clip); |
| 1492 | } |
| 1493 | else |
| 1494 | { |
| 1495 | GtkLabelLinkcxx . . $ GtkLabelLink# *focus_link; |
| 1496 | GtkLabelLinkcxx . . $ GtkLabelLink# *active_link; |
| 1497 | int range[2]; |
| 1498 | cairo_region_tcxx . . $ cairo_region_t# *range_clip; |
| 1499 | cairo_rectangle_int_tcxx . . $ cairo_rectangle_int_t# clip_rect; |
| 1500 | int i; |
| 1501 | GdkRectanglecxx . . $ GdkRectangle# rect; |
| 1502 | |
| 1503 | if (info->selectablecxx . . $ _GtkLabelSelectionInfo#selectable. && |
| 1504 | gtk_widget_has_focuscxx . . $ gtk_widget_has_focus(9247ef2dc26c5426). (widget) && |
| 1505 | gtk_widget_is_drawablecxx . . $ gtk_widget_is_drawable(9247ef2dc26c5426). (widget)) |
| 1506 | { |
| 1507 | PangoDirectioncxx . . $ PangoDirection# cursor_direction; |
| 1508 | |
| 1509 | cursor_direction = get_cursor_directioncxx . . $ get_cursor_direction(145f4c570d45e2f9). (self); |
| 1510 | gtk_css_style_snapshot_caretcxx . . $ gtk_css_style_snapshot_caret(7f26b8c45781f733). (&boxes, gtk_widget_get_displaycxx . . $ gtk_widget_get_display(6423c64908d5796a). (widget), |
| 1511 | snapshot, |
| 1512 | lx, ly, |
| 1513 | self->layoutcxx . . $ _GtkLabel#layout., |
| 1514 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end., |
| 1515 | cursor_direction); |
| 1516 | } |
| 1517 | |
| 1518 | focus_link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1519 | active_link = info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.; |
| 1520 | |
| 1521 | if (active_link) |
| 1522 | { |
| 1523 | range[0] = active_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 1524 | range[1] = active_link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.; |
| 1525 | |
| 1526 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (active_link->cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode.); |
| 1527 | gtk_css_boxes_init_border_boxcxx . . $ gtk_css_boxes_init_border_box(b910b0485ae2fb69). (&boxes, style, 0, 0, width, height); |
| 1528 | |
| 1529 | range_clip = gdk_pango_layout_get_clip_regioncxx . . $ gdk_pango_layout_get_clip_region(1098c307f6d08449). (self->layoutcxx . . $ _GtkLabel#layout., lx, ly, range, 1); |
| 1530 | for (i = 0; i < cairo_region_num_rectanglescxx . . $ cairo_region_num_rectangles(fa9faa7bc920d0b7). (range_clip); i++) |
| 1531 | { |
| 1532 | cairo_region_get_rectanglecxx . . $ cairo_region_get_rectangle(641dcc7a8b17ec5a). (range_clip, i, &clip_rect); |
| 1533 | |
| 1534 | gtk_snapshot_push_clipcxx . . $ gtk_snapshot_push_clip(f2e77ce91ee65beb). (snapshot, &GRAPHENE_RECT_FROM_RECTcxx . . $ `gtk/gtklabel.c:1437:9`! (&clip_rect)); |
| 1535 | gtk_css_style_snapshot_backgroundcxx . . $ gtk_css_style_snapshot_background(576772ddd1050635). (&boxes, snapshot); |
| 1536 | gtk_css_style_snapshot_layoutcxx . . $ gtk_css_style_snapshot_layout(dad263d465d8b3e9). (&boxes, snapshot, lx, ly, self->layoutcxx . . $ _GtkLabel#layout.); |
| 1537 | gtk_snapshot_popcxx . . $ gtk_snapshot_pop(afbd0a0317d5665f). (snapshot); |
| 1538 | } |
| 1539 | |
| 1540 | cairo_region_destroycxx . . $ cairo_region_destroy(35bc32d2a20e1aad). (range_clip); |
| 1541 | } |
| 1542 | |
| 1543 | if (focus_link && gtk_widget_has_visible_focuscxx . . $ gtk_widget_has_visible_focus(9247ef2dc26c5426). (widget)) |
| 1544 | { |
| 1545 | range[0] = focus_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 1546 | range[1] = focus_link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.; |
| 1547 | |
| 1548 | style = gtk_css_node_get_stylecxx . . $ gtk_css_node_get_style(a1a4b0668e9a2428). (focus_link->cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode.); |
| 1549 | |
| 1550 | range_clip = gdk_pango_layout_get_clip_regioncxx . . $ gdk_pango_layout_get_clip_region(1098c307f6d08449). (self->layoutcxx . . $ _GtkLabel#layout., lx, ly, range, 1); |
| 1551 | cairo_region_get_extentscxx . . $ cairo_region_get_extents(bd22ca9d1a86fc40). (range_clip, &rect); |
| 1552 | |
| 1553 | gtk_css_boxes_init_border_boxcxx . . $ gtk_css_boxes_init_border_box(b910b0485ae2fb69). (&boxes, style, rect.xcxx . . $ _cairo_rectangle_int#x., rect.ycxx . . $ _cairo_rectangle_int#y., rect.widthcxx . . $ _cairo_rectangle_int#width., rect.heightcxx . . $ _cairo_rectangle_int#height.); |
| 1554 | gtk_css_style_snapshot_outlinecxx . . $ gtk_css_style_snapshot_outline(576772ddd1050635). (&boxes, snapshot); |
| 1555 | |
| 1556 | cairo_region_destroycxx . . $ cairo_region_destroy(35bc32d2a20e1aad). (range_clip); |
| 1557 | } |
| 1558 | } |
| 1559 | } |
| 1560 | |
| 1561 | static GtkSizeRequestModecxx . . $ GtkSizeRequestMode# |
| 1562 | gtk_label_get_request_modecxx . . $ gtk_label_get_request_mode(2c9e09fe52fe0412). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 1563 | { |
| 1564 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1565 | |
| 1566 | if (self->wrapcxx . . $ _GtkLabel#wrap.) |
| 1567 | return GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTHcxx . . $ GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH.; |
| 1568 | |
| 1569 | return GTK_SIZE_REQUEST_CONSTANT_SIZEcxx . . $ GTK_SIZE_REQUEST_CONSTANT_SIZE.; |
| 1570 | } |
| 1571 | |
| 1572 | static void |
| 1573 | gtk_label_disposecxx . . $ gtk_label_dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 1574 | { |
| 1575 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (object); |
| 1576 | |
| 1577 | gtk_label_set_mnemonic_widgetcxx . . $ gtk_label_set_mnemonic_widget(906eecb9afda53b9). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1578 | gtk_label_clear_select_infocxx . . $ gtk_label_clear_select_info(e9c0e7bdc16b978e). (self); |
| 1579 | gtk_label_clear_provider_infocxx . . $ gtk_label_clear_provider_info(e9c0e7bdc16b978e). (self); |
| 1580 | |
| 1581 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_label_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object); |
| 1582 | } |
| 1583 | |
| 1584 | static void |
| 1585 | gtk_label_clear_linkscxx . . $ gtk_label_clear_links(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 1586 | { |
| 1587 | guintcxx . . $ guint# i; |
| 1588 | |
| 1589 | if (!self->select_infocxx . . $ _GtkLabel#select_info.) |
| 1590 | return; |
| 1591 | |
| 1592 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 1593 | { |
| 1594 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 1595 | gtk_css_node_set_parentcxx . . $ gtk_css_node_set_parent(cf2c49e3ac800954). (link->cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1596 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&link->accessible); |
| 1597 | g_freecxx . . $ g_free(5d22bdacc48458e8). (link->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri.); |
| 1598 | g_freecxx . . $ g_free(5d22bdacc48458e8). (link->titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title.); |
| 1599 | } |
| 1600 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.); |
| 1601 | self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1602 | self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links. = 0; |
| 1603 | self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1604 | gtk_widget_remove_css_classcxx . . $ gtk_widget_remove_css_class(3e0616a87a6c51e5). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), "link"); |
| 1605 | } |
| 1606 | |
| 1607 | static void |
| 1608 | gtk_label_finalizecxx . . $ gtk_label_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 1609 | { |
| 1610 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (object); |
| 1611 | |
| 1612 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->labelcxx . . $ _GtkLabel#label.); |
| 1613 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->textcxx . . $ _GtkLabel#text.); |
| 1614 | |
| 1615 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->layout); |
| 1616 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->attrs, pango_attr_list_unref); |
| 1617 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->markup_attrs, pango_attr_list_unref); |
| 1618 | |
| 1619 | if (self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.) |
| 1620 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.); |
| 1621 | |
| 1622 | gtk_label_clear_linkscxx . . $ gtk_label_clear_links(e9c0e7bdc16b978e). (self); |
| 1623 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->select_infocxx . . $ _GtkLabel#select_info.); |
| 1624 | |
| 1625 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->popup_menu, gtk_widget_unparent); |
| 1626 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->extra_menu); |
| 1627 | |
| 1628 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->tabs, pango_tab_array_free); |
| 1629 | |
| 1630 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_label_parent_class)->finalizecxx . . $ _GObjectClass#finalize. (object); |
| 1631 | } |
| 1632 | |
| 1633 | static void |
| 1634 | gtk_label_unrealizecxx . . $ gtk_label_unrealize(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 1635 | { |
| 1636 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1637 | |
| 1638 | if (self->select_infocxx . . $ _GtkLabel#select_info. && |
| 1639 | self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.) |
| 1640 | { |
| 1641 | GdkClipboardcxx . . $ GdkClipboard# *clipboard = gtk_widget_get_primary_clipboardcxx . . $ gtk_widget_get_primary_clipboard(4e1a3be1a7ff0ce4). (widget); |
| 1642 | |
| 1643 | if (gdk_clipboard_get_contentcxx . . $ gdk_clipboard_get_content(f1f7a1fe02e36ae1). (clipboard) == self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.) |
| 1644 | gdk_clipboard_set_contentcxx . . $ gdk_clipboard_set_content(87ff779b686590dd). (clipboard, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1645 | } |
| 1646 | |
| 1647 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->unrealizecxx . . $ _GtkWidgetClass#unrealize. (widget); |
| 1648 | } |
| 1649 | |
| 1650 | static gbooleancxx . . $ gboolean# |
| 1651 | range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1652 | int range_start, |
| 1653 | int range_end, |
| 1654 | int *ellipsis_start, |
| 1655 | int *ellipsis_end) |
| 1656 | { |
| 1657 | PangoLayoutItercxx . . $ PangoLayoutIter# *iter; |
| 1658 | gbooleancxx . . $ gboolean# in_ellipsis; |
| 1659 | |
| 1660 | if (!self->ellipsizecxx . . $ _GtkLabel#ellipsize.) |
| 1661 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1662 | |
| 1663 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1664 | |
| 1665 | if (!pango_layout_is_ellipsizedcxx . . $ pango_layout_is_ellipsized(dd36b00c04a5085b). (self->layoutcxx . . $ _GtkLabel#layout.)) |
| 1666 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1667 | |
| 1668 | iter = pango_layout_get_itercxx . . $ pango_layout_get_iter(7655ba191e41e2de). (self->layoutcxx . . $ _GtkLabel#layout.); |
| 1669 | |
| 1670 | in_ellipsis = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1671 | |
| 1672 | do { |
| 1673 | PangoLayoutRuncxx . . $ PangoLayoutRun# *run; |
| 1674 | |
| 1675 | run = pango_layout_iter_get_run_readonlycxx . . $ pango_layout_iter_get_run_readonly(7038a8a71d37d3a3). (iter); |
| 1676 | if (run) |
| 1677 | { |
| 1678 | PangoItemcxx . . $ PangoItem# *item; |
| 1679 | |
| 1680 | item = ((PangoGlyphItemcxx . . $ PangoGlyphItem#*)run)->itemcxx . . $ _PangoGlyphItem#item.; |
| 1681 | |
| 1682 | if (item->offsetcxx . . $ _PangoItem#offset. <= range_start && range_end <= item->offsetcxx . . $ _PangoItem#offset. + item->lengthcxx . . $ _PangoItem#length.) |
| 1683 | { |
| 1684 | if (item->analysiscxx . . $ _PangoItem#analysis..flagscxx . . $ _PangoAnalysis#flags. & PANGO_ANALYSIS_FLAG_IS_ELLIPSIScxx . . $ `<external>/7770315642034853588/pango-item.h:51:9`!) |
| 1685 | { |
| 1686 | if (ellipsis_start) |
| 1687 | *ellipsis_start = item->offsetcxx . . $ _PangoItem#offset.; |
| 1688 | if (ellipsis_end) |
| 1689 | *ellipsis_end = item->offsetcxx . . $ _PangoItem#offset. + item->lengthcxx . . $ _PangoItem#length.; |
| 1690 | in_ellipsis = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1691 | } |
| 1692 | break; |
| 1693 | } |
| 1694 | else if (item->offsetcxx . . $ _PangoItem#offset. + item->lengthcxx . . $ _PangoItem#length. >= range_end) |
| 1695 | break; |
| 1696 | } |
| 1697 | } while (pango_layout_iter_next_runcxx . . $ pango_layout_iter_next_run(5ad9625bb5cf9402). (iter)); |
| 1698 | |
| 1699 | pango_layout_iter_freecxx . . $ pango_layout_iter_free(7c49264df6892503). (iter); |
| 1700 | |
| 1701 | return in_ellipsis; |
| 1702 | } |
| 1703 | |
| 1704 | static gbooleancxx . . $ gboolean# |
| 1705 | range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1706 | int range_start, |
| 1707 | int range_end) |
| 1708 | { |
| 1709 | return range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (self, range_start, range_end, 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`!); |
| 1710 | } |
| 1711 | |
| 1712 | static gbooleancxx . . $ gboolean# |
| 1713 | gtk_label_grab_focuscxx . . $ gtk_label_grab_focus(9247ef2dc26c5426). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 1714 | { |
| 1715 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1716 | gbooleancxx . . $ gboolean# select_on_focus; |
| 1717 | GtkWidgetcxx . . $ GtkWidget# *prev_focus; |
| 1718 | |
| 1719 | if (self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1720 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1721 | |
| 1722 | prev_focus = gtk_root_get_focuscxx . . $ gtk_root_get_focus(6cfa63b8db06e3bd). (gtk_widget_get_rootcxx . . $ gtk_widget_get_root(978ce13b0a79da4). (widget)); |
| 1723 | |
| 1724 | if (!GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->grab_focuscxx . . $ _GtkWidgetClass#grab_focus. (widget)) |
| 1725 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1726 | |
| 1727 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 1728 | { |
| 1729 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (gtk_widget_get_settingscxx . . $ gtk_widget_get_settings(ffe4fbf99830fa29). (widget), |
| 1730 | "gtk-label-select-on-focus", |
| 1731 | &select_on_focus, |
| 1732 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1733 | |
| 1734 | if (select_on_focus && !self->in_clickcxx . . $ _GtkLabel#in_click. && |
| 1735 | !(prev_focus && gtk_widget_is_ancestorcxx . . $ gtk_widget_is_ancestor(d05965862da967f). (prev_focus, widget))) |
| 1736 | gtk_label_select_regioncxx . . $ gtk_label_select_region(236c15b30fe93ff9). (self, 0, -1); |
| 1737 | } |
| 1738 | else |
| 1739 | { |
| 1740 | if (self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links. && !self->in_clickcxx . . $ _GtkLabel#in_click. && |
| 1741 | !(prev_focus && gtk_widget_is_ancestorcxx . . $ gtk_widget_is_ancestor(d05965862da967f). (prev_focus, widget))) |
| 1742 | { |
| 1743 | guintcxx . . $ guint# i; |
| 1744 | |
| 1745 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 1746 | { |
| 1747 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 1748 | |
| 1749 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 1750 | { |
| 1751 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. = link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 1752 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. = link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 1753 | break; |
| 1754 | } |
| 1755 | } |
| 1756 | } |
| 1757 | } |
| 1758 | |
| 1759 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1760 | } |
| 1761 | |
| 1762 | static gbooleancxx . . $ gboolean# |
| 1763 | get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (GtkLabelcxx . . $ GtkLabel# *self, |
| 1764 | int x, |
| 1765 | int y, |
| 1766 | int *index) |
| 1767 | { |
| 1768 | int trailing = 0; |
| 1769 | const char *cluster; |
| 1770 | const char *cluster_end; |
| 1771 | gbooleancxx . . $ gboolean# inside; |
| 1772 | float lx, ly; |
| 1773 | |
| 1774 | *index = 0; |
| 1775 | |
| 1776 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 1777 | gtk_label_get_layout_locationcxx . . $ gtk_label_get_layout_location(8c422bc0344df158). (self, &lx, &ly); |
| 1778 | |
| 1779 | /* Translate x/y to layout position */ |
| 1780 | x -= lx; |
| 1781 | y -= ly; |
| 1782 | |
| 1783 | x *= PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 1784 | y *= PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 1785 | |
| 1786 | inside = pango_layout_xy_to_indexcxx . . $ pango_layout_xy_to_index(707a76589c6c677b). (self->layoutcxx . . $ _GtkLabel#layout., |
| 1787 | x, y, |
| 1788 | index, &trailing); |
| 1789 | |
| 1790 | cluster = self->textcxx . . $ _GtkLabel#text. + *index; |
| 1791 | cluster_end = cluster; |
| 1792 | while (trailing) |
| 1793 | { |
| 1794 | cluster_end = g_utf8_next_charcxx . . $ `<external>/15988913817814236715/gunicode.h:837:9`! (cluster_end); |
| 1795 | --trailing; |
| 1796 | } |
| 1797 | |
| 1798 | *index += (cluster_end - cluster); |
| 1799 | |
| 1800 | return inside; |
| 1801 | } |
| 1802 | |
| 1803 | static gbooleancxx . . $ gboolean# |
| 1804 | gtk_label_query_tooltipcxx . . $ gtk_label_query_tooltip(6b967861d7ded342). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1805 | int x, |
| 1806 | int y, |
| 1807 | gbooleancxx . . $ gboolean# keyboard_tip, |
| 1808 | GtkTooltipcxx . . $ GtkTooltip# *tooltip) |
| 1809 | { |
| 1810 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1811 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 1812 | int index = -1; |
| 1813 | |
| 1814 | if (info && info->linkscxx . . $ _GtkLabelSelectionInfo#links.) |
| 1815 | { |
| 1816 | if (keyboard_tip) |
| 1817 | { |
| 1818 | if (info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) |
| 1819 | index = info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.; |
| 1820 | } |
| 1821 | else |
| 1822 | { |
| 1823 | if (!get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (self, x, y, &index)) |
| 1824 | index = -1; |
| 1825 | } |
| 1826 | |
| 1827 | if (index != -1) |
| 1828 | { |
| 1829 | const int link_index = _gtk_label_get_link_atcxx . . $ _gtk_label_get_link_at(7d3bc1c500b2b3a9). (self, index); |
| 1830 | |
| 1831 | if (link_index != -1) |
| 1832 | { |
| 1833 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[link_index]; |
| 1834 | |
| 1835 | if (link->titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title.) |
| 1836 | { |
| 1837 | gtk_tooltip_set_markupcxx . . $ gtk_tooltip_set_markup(a1199148fb44a606). (tooltip, link->titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title.); |
| 1838 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1839 | } |
| 1840 | } |
| 1841 | } |
| 1842 | } |
| 1843 | |
| 1844 | return GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->query_tooltipcxx . . $ _GtkWidgetClass#query_tooltip. (widget, |
| 1845 | x, y, |
| 1846 | keyboard_tip, |
| 1847 | tooltip); |
| 1848 | } |
| 1849 | |
| 1850 | static void |
| 1851 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (GtkLabelLinkcxx . . $ GtkLabelLink# *link, |
| 1852 | gbooleancxx . . $ gboolean# focused) |
| 1853 | { |
| 1854 | if (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.) |
| 1855 | gtk_accessible_hyperlink_set_platform_statecxx . . $ gtk_accessible_hyperlink_set_platform_state(e771b93471ea0ba2). (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible., |
| 1856 | GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSEDcxx . . $ GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED., |
| 1857 | focused); |
| 1858 | } |
| 1859 | |
| 1860 | static gbooleancxx . . $ gboolean# |
| 1861 | gtk_label_focuscxx . . $ gtk_label_focus(8bb1c65c821a69cd). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1862 | GtkDirectionTypecxx . . $ GtkDirectionType# direction) |
| 1863 | { |
| 1864 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 1865 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 1866 | GtkWidgetcxx . . $ GtkWidget# *focus_child = gtk_widget_get_focus_childcxx . . $ gtk_widget_get_focus_child(ef973e1b01680070). (widget); |
| 1867 | GtkLabelLinkcxx . . $ GtkLabelLink# *focus_link; |
| 1868 | gbooleancxx . . $ gboolean# focus_in_child = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1869 | |
| 1870 | if (focus_child) |
| 1871 | { |
| 1872 | focus_in_child = gtk_widget_child_focuscxx . . $ gtk_widget_child_focus(8bb1c65c821a69cd). (focus_child, direction); |
| 1873 | if (focus_in_child) |
| 1874 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1875 | } |
| 1876 | |
| 1877 | if (!gtk_widget_is_focuscxx . . $ gtk_widget_is_focus(9247ef2dc26c5426). (widget)) |
| 1878 | { |
| 1879 | gtk_widget_grab_focuscxx . . $ gtk_widget_grab_focus(9247ef2dc26c5426). (widget); |
| 1880 | if (info) |
| 1881 | { |
| 1882 | focus_link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1883 | if (focus_link && direction == GTK_DIR_TAB_BACKWARDcxx . . $ GTK_DIR_TAB_BACKWARD.) |
| 1884 | { |
| 1885 | int i; |
| 1886 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (focus_link, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 1887 | for (i = info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links. - 1; i >= 0; i--) |
| 1888 | { |
| 1889 | focus_link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 1890 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, focus_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., focus_link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 1891 | { |
| 1892 | info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. = focus_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 1893 | info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. = focus_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 1894 | break; |
| 1895 | } |
| 1896 | } |
| 1897 | } |
| 1898 | |
| 1899 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1900 | } |
| 1901 | |
| 1902 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1903 | } |
| 1904 | |
| 1905 | if (!info) |
| 1906 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1907 | |
| 1908 | if (info->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 1909 | { |
| 1910 | int index; |
| 1911 | |
| 1912 | if (info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) |
| 1913 | goto out; |
| 1914 | |
| 1915 | focus_link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1916 | if (focus_link) |
| 1917 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (focus_link, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1918 | |
| 1919 | index = info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.; |
| 1920 | |
| 1921 | if (direction == GTK_DIR_TAB_FORWARDcxx . . $ GTK_DIR_TAB_FORWARD.) |
| 1922 | { |
| 1923 | guintcxx . . $ guint# i; |
| 1924 | for (i = 0; i < info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 1925 | { |
| 1926 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 1927 | |
| 1928 | if (link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start. > index) |
| 1929 | { |
| 1930 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (link, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 1931 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 1932 | { |
| 1933 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.); |
| 1934 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1935 | } |
| 1936 | } |
| 1937 | } |
| 1938 | } |
| 1939 | else if (direction == GTK_DIR_TAB_BACKWARDcxx . . $ GTK_DIR_TAB_BACKWARD.) |
| 1940 | { |
| 1941 | int i; |
| 1942 | for (i = info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links. - 1; i >= 0; i--) |
| 1943 | { |
| 1944 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 1945 | |
| 1946 | if (link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end. < index) |
| 1947 | { |
| 1948 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (link, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 1949 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 1950 | { |
| 1951 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.); |
| 1952 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1953 | } |
| 1954 | } |
| 1955 | } |
| 1956 | } |
| 1957 | |
| 1958 | goto out; |
| 1959 | } |
| 1960 | else |
| 1961 | { |
| 1962 | int focus_link_index; |
| 1963 | int new_index = -1; |
| 1964 | |
| 1965 | if (info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links. == 0) |
| 1966 | goto out; |
| 1967 | |
| 1968 | focus_link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, &focus_link_index); |
| 1969 | |
| 1970 | if (!focus_link) |
| 1971 | goto out; |
| 1972 | |
| 1973 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (focus_link, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1974 | |
| 1975 | switch (direction) |
| 1976 | { |
| 1977 | case GTK_DIR_TAB_FORWARDcxx . . $ GTK_DIR_TAB_FORWARD.: |
| 1978 | if (focus_link) |
| 1979 | new_index = focus_link_index + 1; |
| 1980 | else |
| 1981 | new_index = 0; |
| 1982 | |
| 1983 | if (new_index >= info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.) |
| 1984 | goto out; |
| 1985 | |
| 1986 | while (new_index < info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.) |
| 1987 | { |
| 1988 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[new_index]; |
| 1989 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 1990 | break; |
| 1991 | |
| 1992 | new_index++; |
| 1993 | } |
| 1994 | break; |
| 1995 | |
| 1996 | case GTK_DIR_TAB_BACKWARDcxx . . $ GTK_DIR_TAB_BACKWARD.: |
| 1997 | if (focus_link) |
| 1998 | new_index = focus_link_index - 1; |
| 1999 | else |
| 2000 | new_index = info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links. - 1; |
| 2001 | |
| 2002 | if (new_index < 0) |
| 2003 | goto out; |
| 2004 | |
| 2005 | while (new_index >= 0) |
| 2006 | { |
| 2007 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[new_index]; |
| 2008 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 2009 | break; |
| 2010 | |
| 2011 | new_index--; |
| 2012 | } |
| 2013 | break; |
| 2014 | |
| 2015 | default: |
| 2016 | case GTK_DIR_UPcxx . . $ GTK_DIR_UP.: |
| 2017 | case GTK_DIR_DOWNcxx . . $ GTK_DIR_DOWN.: |
| 2018 | case GTK_DIR_LEFTcxx . . $ GTK_DIR_LEFT.: |
| 2019 | case GTK_DIR_RIGHTcxx . . $ GTK_DIR_RIGHT.: |
| 2020 | goto out; |
| 2021 | } |
| 2022 | |
| 2023 | if (new_index != -1 && new_index < info->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.) |
| 2024 | { |
| 2025 | focus_link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[new_index]; |
| 2026 | set_link_focuscxx . . $ set_link_focus(dc4a2a486e26c8d0). (focus_link, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 2027 | info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. = focus_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 2028 | info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. = focus_link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 2029 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (widget); |
| 2030 | |
| 2031 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2032 | } |
| 2033 | } |
| 2034 | |
| 2035 | out: |
| 2036 | |
| 2037 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2038 | } |
| 2039 | |
| 2040 | static void |
| 2041 | emit_activate_linkcxx . . $ emit_activate_link(50da53902840a995). (GtkLabelcxx . . $ GtkLabel# *self, |
| 2042 | GtkLabelLinkcxx . . $ GtkLabelLink# *link) |
| 2043 | { |
| 2044 | gbooleancxx . . $ gboolean# handled; |
| 2045 | |
| 2046 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (self, signalscxx . . $ signals.[ACTIVATE_LINKcxx . . $ ACTIVATE_LINK.], 0, link->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri., &handled); |
| 2047 | |
| 2048 | /* signal handler might have invalidated the layout */ |
| 2049 | if (!self->layoutcxx . . $ _GtkLabel#layout.) |
| 2050 | return; |
| 2051 | |
| 2052 | if (handled && !link->visitedcxx . . $ $anonymous_type_52cf8198354a9553_0#visited. && |
| 2053 | self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.) |
| 2054 | { |
| 2055 | link->visitedcxx . . $ $anonymous_type_52cf8198354a9553_0#visited. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2056 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (self); |
| 2057 | } |
| 2058 | } |
| 2059 | |
| 2060 | static void |
| 2061 | gtk_label_activate_link_opencxx . . $ gtk_label_activate_link_open(77ff13cc9e0e653e). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2062 | const char *name, |
| 2063 | GVariantcxx . . $ GVariant# *parameter) |
| 2064 | { |
| 2065 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 2066 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 2067 | { |
| 2068 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = self->select_infocxx . . $ _GtkLabel#select_info.->context_linkcxx . . $ _GtkLabelSelectionInfo#context_link.; |
| 2069 | |
| 2070 | if (link) |
| 2071 | emit_activate_linkcxx . . $ emit_activate_link(50da53902840a995). (self, link); |
| 2072 | } |
| 2073 | } |
| 2074 | |
| 2075 | static void |
| 2076 | gtk_label_activate_link_copycxx . . $ gtk_label_activate_link_copy(77ff13cc9e0e653e). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2077 | const char *name, |
| 2078 | GVariantcxx . . $ GVariant# *parameter) |
| 2079 | { |
| 2080 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 2081 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 2082 | { |
| 2083 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = self->select_infocxx . . $ _GtkLabel#select_info.->context_linkcxx . . $ _GtkLabelSelectionInfo#context_link.; |
| 2084 | |
| 2085 | if (link) |
| 2086 | { |
| 2087 | GdkClipboardcxx . . $ GdkClipboard# *clipboard; |
| 2088 | |
| 2089 | clipboard = gtk_widget_get_clipboardcxx . . $ gtk_widget_get_clipboard(4e1a3be1a7ff0ce4). (widget); |
| 2090 | gdk_clipboard_set_textcxx . . $ gdk_clipboard_set_text(cd5df9b714d66581). (clipboard, link->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri.); |
| 2091 | } |
| 2092 | } |
| 2093 | } |
| 2094 | |
| 2095 | static void |
| 2096 | gtk_label_activate_clipboard_copycxx . . $ gtk_label_activate_clipboard_copy(77ff13cc9e0e653e). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2097 | const char *name, |
| 2098 | GVariantcxx . . $ GVariant# *parameter) |
| 2099 | { |
| 2100 | g_signal_emit_by_namecxx . . $ g_signal_emit_by_name(1ac911bdc4e9a14d). (widget, "copy-clipboard"); |
| 2101 | } |
| 2102 | |
| 2103 | static gbooleancxx . . $ gboolean# |
| 2104 | gtk_label_select_allcxx . . $ gtk_label_select_all(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 2105 | { |
| 2106 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, 0, strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.)); |
| 2107 | return gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (self); |
| 2108 | } |
| 2109 | |
| 2110 | static void |
| 2111 | gtk_label_activate_selection_select_allcxx . . $ gtk_label_activate_selection_select_all(77ff13cc9e0e653e). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2112 | const char *name, |
| 2113 | GVariantcxx . . $ GVariant# *parameter) |
| 2114 | { |
| 2115 | gtk_label_select_allcxx . . $ gtk_label_select_all(f95750b06aaf936a). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget)); |
| 2116 | } |
| 2117 | |
| 2118 | static void |
| 2119 | gtk_label_nopcxx . . $ gtk_label_nop(77ff13cc9e0e653e). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2120 | const char *name, |
| 2121 | GVariantcxx . . $ GVariant# *parameter) |
| 2122 | { |
| 2123 | } |
| 2124 | |
| 2125 | static gbooleancxx . . $ gboolean# |
| 2126 | gtk_label_mnemonic_activatecxx . . $ gtk_label_mnemonic_activate(65d75a856eec1919). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2127 | gbooleancxx . . $ gboolean# group_cycling) |
| 2128 | { |
| 2129 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 2130 | GtkWidgetcxx . . $ GtkWidget# *parent; |
| 2131 | |
| 2132 | if (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.) |
| 2133 | return gtk_widget_mnemonic_activatecxx . . $ gtk_widget_mnemonic_activate(65d75a856eec1919). (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget., group_cycling); |
| 2134 | |
| 2135 | /* Not a label for something else, but is selectable, so set focus into |
| 2136 | * the label itself. |
| 2137 | */ |
| 2138 | if (gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (self) && gtk_widget_get_focusablecxx . . $ gtk_widget_get_focusable(9247ef2dc26c5426). (widget)) |
| 2139 | return gtk_label_grab_focuscxx . . $ gtk_label_grab_focus(9247ef2dc26c5426). (widget); |
| 2140 | |
| 2141 | /* Try to find the widget to activate by traversing the |
| 2142 | * widget's ancestry. |
| 2143 | */ |
| 2144 | parent = gtk_widget_get_parentcxx . . $ gtk_widget_get_parent(ef973e1b01680070). (widget); |
| 2145 | |
| 2146 | if (GTK_IS_NOTEBOOKcxx . . $ `gtk/gtknotebook.h:40:9`! (parent)) |
| 2147 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2148 | |
| 2149 | while (parent) |
| 2150 | { |
| 2151 | if (gtk_widget_get_focusablecxx . . $ gtk_widget_get_focusable(9247ef2dc26c5426). (parent) || |
| 2152 | (!group_cycling && gtk_widget_can_activatecxx . . $ gtk_widget_can_activate(9247ef2dc26c5426). (parent)) || |
| 2153 | GTK_IS_NOTEBOOKcxx . . $ `gtk/gtknotebook.h:40:9`! (gtk_widget_get_parent (parent))) |
| 2154 | return gtk_widget_mnemonic_activatecxx . . $ gtk_widget_mnemonic_activate(65d75a856eec1919). (parent, group_cycling); |
| 2155 | parent = gtk_widget_get_parentcxx . . $ gtk_widget_get_parent(ef973e1b01680070). (parent); |
| 2156 | } |
| 2157 | |
| 2158 | /* barf if there was nothing to activate */ |
| 2159 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Couldn't find a target for a mnemonic activation."); |
| 2160 | gtk_widget_error_bellcxx . . $ gtk_widget_error_bell(d7cf858254b37903). (widget); |
| 2161 | |
| 2162 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2163 | } |
| 2164 | |
| 2165 | static void |
| 2166 | gtk_label_popup_menucxx . . $ gtk_label_popup_menu(77ff13cc9e0e653e). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2167 | const char *action_name, |
| 2168 | GVariantcxx . . $ GVariant# *parameters) |
| 2169 | { |
| 2170 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 2171 | |
| 2172 | gtk_label_do_popupcxx . . $ gtk_label_do_popup(51c7cb9c710cadb5). (self, -1, -1); |
| 2173 | } |
| 2174 | |
| 2175 | static void |
| 2176 | gtk_label_rootcxx . . $ gtk_label_root(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 2177 | { |
| 2178 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 2179 | |
| 2180 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->rootcxx . . $ _GtkWidgetClass#root. (widget); |
| 2181 | |
| 2182 | gtk_label_setup_mnemoniccxx . . $ gtk_label_setup_mnemonic(e9c0e7bdc16b978e). (self); |
| 2183 | |
| 2184 | /* The PangoContext is replaced when the display changes, so clear the layouts */ |
| 2185 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget)); |
| 2186 | } |
| 2187 | |
| 2188 | static void |
| 2189 | gtk_label_unrootcxx . . $ gtk_label_unroot(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 2190 | { |
| 2191 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 2192 | |
| 2193 | gtk_label_setup_mnemoniccxx . . $ gtk_label_setup_mnemonic(e9c0e7bdc16b978e). (self); |
| 2194 | |
| 2195 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_label_parent_class)->unrootcxx . . $ _GtkWidgetClass#unroot. (widget); |
| 2196 | } |
| 2197 | |
| 2198 | static void |
| 2199 | launch_donecxx . . $ launch_done(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source, |
| 2200 | GAsyncResultcxx . . $ GAsyncResult# *result, |
| 2201 | gpointercxx . . $ gpointer# data) |
| 2202 | { |
| 2203 | GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2204 | gbooleancxx . . $ gboolean# success; |
| 2205 | |
| 2206 | if (GTK_IS_FILE_LAUNCHERcxx . . $ GTK_IS_FILE_LAUNCHER(dedf1e9b1c614a07). (source)) |
| 2207 | success = gtk_file_launcher_launch_finishcxx . . $ gtk_file_launcher_launch_finish(e11507dadaa706a7). (GTK_FILE_LAUNCHERcxx . . $ GTK_FILE_LAUNCHER(d6b0dc3b02b8aca3). (source), result, &error); |
| 2208 | else if (GTK_IS_URI_LAUNCHERcxx . . $ GTK_IS_URI_LAUNCHER(dedf1e9b1c614a07). (source)) |
| 2209 | success = gtk_uri_launcher_launch_finishcxx . . $ gtk_uri_launcher_launch_finish(78dba78deeb06eec). (GTK_URI_LAUNCHERcxx . . $ GTK_URI_LAUNCHER(bd9e038bf62c1267). (source), result, &error); |
| 2210 | else |
| 2211 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 2212 | |
| 2213 | if (!success) |
| 2214 | { |
| 2215 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Failed to launch handler: %s", error->message); |
| 2216 | g_error_freecxx . . $ g_error_free(2ff7d11a2ecc01bd). (error); |
| 2217 | } |
| 2218 | } |
| 2219 | |
| 2220 | static gbooleancxx . . $ gboolean# |
| 2221 | gtk_label_activate_linkcxx . . $ gtk_label_activate_link(20045daa3ee49671). (GtkLabelcxx . . $ GtkLabel# *self, |
| 2222 | const char *uri) |
| 2223 | { |
| 2224 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 2225 | GtkWidgetcxx . . $ GtkWidget# *toplevel = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (gtk_widget_get_root (widget)); |
| 2226 | const char *uri_scheme; |
| 2227 | |
| 2228 | if (!GTK_IS_WINDOWcxx . . $ `gtk/gtkwindow.h:41:9`! (toplevel)) |
| 2229 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2230 | |
| 2231 | uri_scheme = g_uri_peek_schemecxx . . $ g_uri_peek_scheme(fb58d2e09a2a1ce6). (uri); |
| 2232 | if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (uri_scheme, "file") == 0) |
| 2233 | { |
| 2234 | GFilecxx . . $ GFile# *file; |
| 2235 | GtkFileLaunchercxx . . $ GtkFileLauncher# *launcher; |
| 2236 | |
| 2237 | file = g_file_new_for_uricxx . . $ g_file_new_for_uri(ba1fd5950b7d7bd5). (uri); |
| 2238 | launcher = gtk_file_launcher_newcxx . . $ gtk_file_launcher_new(f0f0815e8c3f427e). (file); |
| 2239 | gtk_file_launcher_launchcxx . . $ gtk_file_launcher_launch(46d3a7bfb4dff97f). (launcher, GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (toplevel), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, launch_donecxx . . $ launch_done(aa1d200d824d915d)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2240 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (launcher); |
| 2241 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (file); |
| 2242 | } |
| 2243 | else |
| 2244 | { |
| 2245 | GtkUriLaunchercxx . . $ GtkUriLauncher# *launcher; |
| 2246 | |
| 2247 | launcher = gtk_uri_launcher_newcxx . . $ gtk_uri_launcher_new(7333ec991a823e14). (uri); |
| 2248 | gtk_uri_launcher_launchcxx . . $ gtk_uri_launcher_launch(21e4d7fa8aedf350). (launcher, GTK_WINDOWcxx . . $ `gtk/gtkwindow.h:39:9`! (toplevel), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, launch_donecxx . . $ launch_done(aa1d200d824d915d)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2249 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (launcher); |
| 2250 | } |
| 2251 | |
| 2252 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2253 | } |
| 2254 | |
| 2255 | static void |
| 2256 | gtk_label_activate_current_linkcxx . . $ gtk_label_activate_current_link(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 2257 | { |
| 2258 | GtkLabelLinkcxx . . $ GtkLabelLink# *link; |
| 2259 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 2260 | |
| 2261 | link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2262 | |
| 2263 | if (link) |
| 2264 | emit_activate_linkcxx . . $ emit_activate_link(50da53902840a995). (self, link); |
| 2265 | else |
| 2266 | gtk_widget_activate_defaultcxx . . $ gtk_widget_activate_default(d7cf858254b37903). (widget); |
| 2267 | } |
| 2268 | |
| 2269 | static void |
| 2270 | gtk_label_copy_clipboardcxx . . $ gtk_label_copy_clipboard(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 2271 | { |
| 2272 | if (self->textcxx . . $ _GtkLabel#text. && self->select_infocxx . . $ _GtkLabel#select_info.) |
| 2273 | { |
| 2274 | int start, end; |
| 2275 | int len; |
| 2276 | GdkClipboardcxx . . $ GdkClipboard# *clipboard; |
| 2277 | |
| 2278 | start = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (self->select_info->selection_anchor, |
| 2279 | self->select_info->selection_end); |
| 2280 | end = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->select_info->selection_anchor, |
| 2281 | self->select_info->selection_end); |
| 2282 | |
| 2283 | len = strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.); |
| 2284 | |
| 2285 | if (end > len) |
| 2286 | end = len; |
| 2287 | |
| 2288 | if (start > len) |
| 2289 | start = len; |
| 2290 | |
| 2291 | clipboard = gtk_widget_get_clipboardcxx . . $ gtk_widget_get_clipboard(4e1a3be1a7ff0ce4). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 2292 | |
| 2293 | if (start != end) |
| 2294 | { |
| 2295 | char *str = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (self->textcxx . . $ _GtkLabel#text. + start, end - start); |
| 2296 | gdk_clipboard_set_textcxx . . $ gdk_clipboard_set_text(cd5df9b714d66581). (clipboard, str); |
| 2297 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 2298 | } |
| 2299 | else |
| 2300 | { |
| 2301 | GtkLabelLinkcxx . . $ GtkLabelLink# *link; |
| 2302 | |
| 2303 | link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2304 | if (link) |
| 2305 | gdk_clipboard_set_textcxx . . $ gdk_clipboard_set_text(cd5df9b714d66581). (clipboard, link->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri.); |
| 2306 | } |
| 2307 | } |
| 2308 | } |
| 2309 | |
| 2310 | static void |
| 2311 | gtk_label_direction_changedcxx . . $ gtk_label_direction_changed(ca8bba12f0ec948f). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2312 | GtkTextDirectioncxx . . $ GtkTextDirection# previous_direction) |
| 2313 | { |
| 2314 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget)); |
| 2315 | } |
| 2316 | |
| 2317 | static void |
| 2318 | gtk_label_class_initcxx . . $ gtk_label_class_init(55c5a7a88ed0e756). (GtkLabelClasscxx . . $ GtkLabelClass# *class) |
| 2319 | { |
| 2320 | GObjectClasscxx . . $ GObjectClass# *gobject_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (class); |
| 2321 | GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (class); |
| 2322 | |
| 2323 | gobject_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_label_set_propertycxx . . $ gtk_label_set_property(d7c4bb29f36c0dc4).; |
| 2324 | gobject_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_label_get_propertycxx . . $ gtk_label_get_property(cee2c52f22407c66).; |
| 2325 | gobject_class->finalizecxx . . $ _GObjectClass#finalize. = gtk_label_finalizecxx . . $ gtk_label_finalize(6087475fa43034d3).; |
| 2326 | gobject_class->disposecxx . . $ _GObjectClass#dispose. = gtk_label_disposecxx . . $ gtk_label_dispose(6087475fa43034d3).; |
| 2327 | |
| 2328 | widget_class->size_allocatecxx . . $ _GtkWidgetClass#size_allocate. = gtk_label_size_allocatecxx . . $ gtk_label_size_allocate(598a503332136822).; |
| 2329 | widget_class->state_flags_changedcxx . . $ _GtkWidgetClass#state_flags_changed. = gtk_label_state_flags_changedcxx . . $ gtk_label_state_flags_changed(e7d7ee4ea524d63).; |
| 2330 | widget_class->css_changedcxx . . $ _GtkWidgetClass#css_changed. = gtk_label_css_changedcxx . . $ gtk_label_css_changed(4442664c79e1955d).; |
| 2331 | widget_class->query_tooltipcxx . . $ _GtkWidgetClass#query_tooltip. = gtk_label_query_tooltipcxx . . $ gtk_label_query_tooltip(6b967861d7ded342).; |
| 2332 | widget_class->snapshotcxx . . $ _GtkWidgetClass#snapshot. = gtk_label_snapshotcxx . . $ gtk_label_snapshot(80012d1141bb3efa).; |
| 2333 | widget_class->unrealizecxx . . $ _GtkWidgetClass#unrealize. = gtk_label_unrealizecxx . . $ gtk_label_unrealize(d7cf858254b37903).; |
| 2334 | widget_class->rootcxx . . $ _GtkWidgetClass#root. = gtk_label_rootcxx . . $ gtk_label_root(d7cf858254b37903).; |
| 2335 | widget_class->unrootcxx . . $ _GtkWidgetClass#unroot. = gtk_label_unrootcxx . . $ gtk_label_unroot(d7cf858254b37903).; |
| 2336 | widget_class->mnemonic_activatecxx . . $ _GtkWidgetClass#mnemonic_activate. = gtk_label_mnemonic_activatecxx . . $ gtk_label_mnemonic_activate(65d75a856eec1919).; |
| 2337 | widget_class->grab_focuscxx . . $ _GtkWidgetClass#grab_focus. = gtk_label_grab_focuscxx . . $ gtk_label_grab_focus(9247ef2dc26c5426).; |
| 2338 | widget_class->focuscxx . . $ _GtkWidgetClass#focus. = gtk_label_focuscxx . . $ gtk_label_focus(8bb1c65c821a69cd).; |
| 2339 | widget_class->get_request_modecxx . . $ _GtkWidgetClass#get_request_mode. = gtk_label_get_request_modecxx . . $ gtk_label_get_request_mode(2c9e09fe52fe0412).; |
| 2340 | widget_class->measurecxx . . $ _GtkWidgetClass#measure. = gtk_label_measurecxx . . $ gtk_label_measure(d91afbd837fc0c19).; |
| 2341 | widget_class->direction_changedcxx . . $ _GtkWidgetClass#direction_changed. = gtk_label_direction_changedcxx . . $ gtk_label_direction_changed(ca8bba12f0ec948f).; |
| 2342 | |
| 2343 | class->move_cursorcxx . . $ _GtkLabelClass#move_cursor. = gtk_label_move_cursorcxx . . $ gtk_label_move_cursor(8db45717b1dfc2f8).; |
| 2344 | class->copy_clipboardcxx . . $ _GtkLabelClass#copy_clipboard. = gtk_label_copy_clipboardcxx . . $ gtk_label_copy_clipboard(e9c0e7bdc16b978e).; |
| 2345 | class->activate_linkcxx . . $ _GtkLabelClass#activate_link. = gtk_label_activate_linkcxx . . $ gtk_label_activate_link(20045daa3ee49671).; |
| 2346 | |
| 2347 | /** |
| 2348 | * GtkLabel::move-cursor: |
| 2349 | * @entry: the label which emitted the signal |
| 2350 | * @step: the granularity of the move, as a `GtkMovementStep` |
| 2351 | * @count: the number of @step units to move |
| 2352 | * @extend_selection: true if the move should extend the selection |
| 2353 | * |
| 2354 | * Gets emitted when the user initiates a cursor movement. |
| 2355 | * |
| 2356 | * The `::move-cursor` signal is a [keybinding signal](class.SignalAction.html). |
| 2357 | * If the cursor is not visible in @entry, this signal causes the viewport to |
| 2358 | * be moved instead. |
| 2359 | * |
| 2360 | * Applications should not connect to it, but may emit it with |
| 2361 | * [[email protected]_emit_by_name] if they need to control |
| 2362 | * the cursor programmatically. |
| 2363 | * |
| 2364 | * The default bindings for this signal come in two variants, the |
| 2365 | * variant with the <kbd>Shift</kbd> modifier extends the selection, |
| 2366 | * the variant without the <kbd>Shift</kbd> modifier does not. |
| 2367 | * There are too many key combinations to list them all here. |
| 2368 | * |
| 2369 | * - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> |
| 2370 | * move by individual characters/lines |
| 2371 | * - <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs |
| 2372 | * - <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer |
| 2373 | */ |
| 2374 | signalscxx . . $ signals.[MOVE_CURSORcxx . . $ MOVE_CURSOR.] = |
| 2375 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("move-cursor"), |
| 2376 | G_OBJECT_CLASS_TYPEcxx . . $ `<external>/1341695927569185362/gobject.h:117:9`! (gobject_class), |
| 2377 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST. | G_SIGNAL_ACTIONcxx . . $ G_SIGNAL_ACTION., |
| 2378 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkLabelClass, move_cursor), |
| 2379 | 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`!, |
| 2380 | _gtk_marshal_VOID__ENUM_INT_BOOLEANcxx . . $ _gtk_marshal_VOID__ENUM_INT_BOOLEAN(cba270afb0f82555)., |
| 2381 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 3, |
| 2382 | GTK_TYPE_MOVEMENT_STEPcxx . . $ `build/gtk/gtktypebuiltins.h:144:9`!, |
| 2383 | G_TYPE_INTcxx . . $ `<external>/9567554376676449156/gtype.h:105:9`!, |
| 2384 | G_TYPE_BOOLEANcxx . . $ `<external>/9567554376676449156/gtype.h:99:9`!); |
| 2385 | g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (signalscxx . . $ signals.[MOVE_CURSORcxx . . $ MOVE_CURSOR.], |
| 2386 | G_OBJECT_CLASS_TYPEcxx . . $ `<external>/1341695927569185362/gobject.h:117:9`! (gobject_class), |
| 2387 | _gtk_marshal_VOID__ENUM_INT_BOOLEANvcxx . . $ _gtk_marshal_VOID__ENUM_INT_BOOLEANv(d309f4be92d1737c).); |
| 2388 | |
| 2389 | /** |
| 2390 | * GtkLabel::copy-clipboard: |
| 2391 | * @self: the label which emitted the signal |
| 2392 | * |
| 2393 | * Gets emitted to copy the selection to the clipboard. |
| 2394 | * |
| 2395 | * The `::copy-clipboard` signal is a [keybinding signal](class.SignalAction.html). |
| 2396 | * |
| 2397 | * The default binding for this signal is <kbd>Ctrl</kbd>+<kbd>c</kbd>. |
| 2398 | */ |
| 2399 | signalscxx . . $ signals.[COPY_CLIPBOARDcxx . . $ COPY_CLIPBOARD.] = |
| 2400 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("copy-clipboard"), |
| 2401 | G_OBJECT_CLASS_TYPEcxx . . $ `<external>/1341695927569185362/gobject.h:117:9`! (gobject_class), |
| 2402 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST. | G_SIGNAL_ACTIONcxx . . $ G_SIGNAL_ACTION., |
| 2403 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkLabelClass, copy_clipboard), |
| 2404 | 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`!, |
| 2405 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2406 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0); |
| 2407 | |
| 2408 | /** |
| 2409 | * GtkLabel::activate-current-link: |
| 2410 | * @self: the label which emitted the signal |
| 2411 | * |
| 2412 | * Gets emitted when the user activates a link in the label. |
| 2413 | * |
| 2414 | * The `::activate-current-link` is a [keybinding signal](class.SignalAction.html). |
| 2415 | * |
| 2416 | * Applications may also emit the signal with g_signal_emit_by_name() |
| 2417 | * if they need to control activation of URIs programmatically. |
| 2418 | * |
| 2419 | * The default bindings for this signal are all forms of the <kbd>Enter</kbd> key. |
| 2420 | */ |
| 2421 | signalscxx . . $ signals.[ACTIVATE_CURRENT_LINKcxx . . $ ACTIVATE_CURRENT_LINK.] = |
| 2422 | g_signal_new_class_handlercxx . . $ g_signal_new_class_handler(46127c9a6c6cedae). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("activate-current-link"), |
| 2423 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (gobject_class), |
| 2424 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST. | G_SIGNAL_ACTIONcxx . . $ G_SIGNAL_ACTION., |
| 2425 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_activate_current_link), |
| 2426 | 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`!, |
| 2427 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2428 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 0); |
| 2429 | |
| 2430 | /** |
| 2431 | * GtkLabel::activate-link: |
| 2432 | * @self: the label which emitted the signal |
| 2433 | * @uri: the URI that is activated |
| 2434 | * |
| 2435 | * Gets emitted to activate a URI. |
| 2436 | * |
| 2437 | * Applications may connect to it to override the default behaviour, |
| 2438 | * which is to call [[email protected]]. |
| 2439 | * |
| 2440 | * Returns: true if the link has been activated |
| 2441 | */ |
| 2442 | signalscxx . . $ signals.[ACTIVATE_LINKcxx . . $ ACTIVATE_LINK.] = |
| 2443 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("activate-link"), |
| 2444 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (gobject_class), |
| 2445 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 2446 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkLabelClass, activate_link), |
| 2447 | _gtk_boolean_handled_accumulatorcxx . . $ _gtk_boolean_handled_accumulator(76292f232a01f816)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2448 | _gtk_marshal_BOOLEAN__STRINGcxx . . $ _gtk_marshal_BOOLEAN__STRING(cba270afb0f82555)., |
| 2449 | G_TYPE_BOOLEANcxx . . $ `<external>/9567554376676449156/gtype.h:99:9`!, 1, G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!); |
| 2450 | g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (signalscxx . . $ signals.[ACTIVATE_LINKcxx . . $ ACTIVATE_LINK.], |
| 2451 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (gobject_class), |
| 2452 | _gtk_marshal_BOOLEAN__STRINGvcxx . . $ _gtk_marshal_BOOLEAN__STRINGv(d309f4be92d1737c).); |
| 2453 | |
| 2454 | /** |
| 2455 | * GtkLabel:label: |
| 2456 | * |
| 2457 | * The contents of the label. |
| 2458 | * |
| 2459 | * If the string contains Pango markup (see [[email protected]_markup]), |
| 2460 | * you will have to set the [[email protected]:use-markup] property to |
| 2461 | * true in order for the label to display the markup attributes. See also |
| 2462 | * [[email protected]_markup] for a convenience function that sets both |
| 2463 | * this property and the [[email protected]:use-markup] property at the |
| 2464 | * same time. |
| 2465 | * |
| 2466 | * If the string contains underlines acting as mnemonics, you will have to |
| 2467 | * set the [[email protected]:use-underline] property to true in order |
| 2468 | * for the label to display them. |
| 2469 | */ |
| 2470 | label_propscxx . . $ label_props.[PROP_LABELcxx . . $ PROP_LABEL.] = |
| 2471 | g_param_spec_stringcxx . . $ g_param_spec_string(378e8746be5cd899). ("label", 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`!, |
| 2472 | "", |
| 2473 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!); |
| 2474 | |
| 2475 | /** |
| 2476 | * GtkLabel:attributes: |
| 2477 | * |
| 2478 | * A list of style attributes to apply to the text of the label. |
| 2479 | */ |
| 2480 | label_propscxx . . $ label_props.[PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.] = |
| 2481 | g_param_spec_boxedcxx . . $ g_param_spec_boxed(faf99966f027a127). ("attributes", 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`!, |
| 2482 | PANGO_TYPE_ATTR_LISTcxx . . $ `<external>/6266610838560427104/pango-attributes.h:637:9`!, |
| 2483 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!); |
| 2484 | |
| 2485 | /** |
| 2486 | * GtkLabel:use-markup: |
| 2487 | * |
| 2488 | * True if the text of the label includes Pango markup. |
| 2489 | * |
| 2490 | * See [[email protected]_markup]. |
| 2491 | */ |
| 2492 | label_propscxx . . $ label_props.[PROP_USE_MARKUPcxx . . $ PROP_USE_MARKUP.] = |
| 2493 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("use-markup", 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`!, |
| 2494 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 2495 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2496 | |
| 2497 | /** |
| 2498 | * GtkLabel:use-underline: |
| 2499 | * |
| 2500 | * True if the text of the label indicates a mnemonic with an `_` |
| 2501 | * before the mnemonic character. |
| 2502 | */ |
| 2503 | label_propscxx . . $ label_props.[PROP_USE_UNDERLINEcxx . . $ PROP_USE_UNDERLINE.] = |
| 2504 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("use-underline", 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`!, |
| 2505 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 2506 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2507 | |
| 2508 | /** |
| 2509 | * GtkLabel:justify: |
| 2510 | * |
| 2511 | * The alignment of the lines in the text of the label, relative to each other. |
| 2512 | * |
| 2513 | * This does *not* affect the alignment of the label within its allocation. |
| 2514 | * See [[email protected]:xalign] for that. |
| 2515 | */ |
| 2516 | label_propscxx . . $ label_props.[PROP_JUSTIFYcxx . . $ PROP_JUSTIFY.] = |
| 2517 | g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("justify", 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`!, |
| 2518 | GTK_TYPE_JUSTIFICATIONcxx . . $ `build/gtk/gtktypebuiltins.h:136:9`!, |
| 2519 | GTK_JUSTIFY_LEFTcxx . . $ GTK_JUSTIFY_LEFT., |
| 2520 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2521 | |
| 2522 | /** |
| 2523 | * GtkLabel:xalign: |
| 2524 | * |
| 2525 | * The horizontal alignment of the label text inside its size allocation. |
| 2526 | * |
| 2527 | * Compare this to [[email protected]:halign], which determines how the |
| 2528 | * labels size allocation is positioned in the space available for the label. |
| 2529 | */ |
| 2530 | label_propscxx . . $ label_props.[PROP_XALIGNcxx . . $ PROP_XALIGN.] = |
| 2531 | g_param_spec_floatcxx . . $ g_param_spec_float(62471560c2840e09). ("xalign", 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`!, |
| 2532 | 0.0, 1.0, |
| 2533 | 0.5, |
| 2534 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2535 | |
| 2536 | /** |
| 2537 | * GtkLabel:yalign: |
| 2538 | * |
| 2539 | * The vertical alignment of the label text inside its size allocation. |
| 2540 | * |
| 2541 | * Compare this to [[email protected]:valign], which determines how the |
| 2542 | * labels size allocation is positioned in the space available for the label. |
| 2543 | */ |
| 2544 | label_propscxx . . $ label_props.[PROP_YALIGNcxx . . $ PROP_YALIGN.] = |
| 2545 | g_param_spec_floatcxx . . $ g_param_spec_float(62471560c2840e09). ("yalign", 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`!, |
| 2546 | 0.0, 1.0, |
| 2547 | 0.5, |
| 2548 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2549 | |
| 2550 | /** |
| 2551 | * GtkLabel:wrap: |
| 2552 | * |
| 2553 | * True if the label text will wrap if it gets too wide. |
| 2554 | */ |
| 2555 | label_propscxx . . $ label_props.[PROP_WRAPcxx . . $ PROP_WRAP.] = |
| 2556 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("wrap", 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`!, |
| 2557 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 2558 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2559 | |
| 2560 | /** |
| 2561 | * GtkLabel:wrap-mode: |
| 2562 | * |
| 2563 | * Controls how the line wrapping is done. |
| 2564 | * |
| 2565 | * This only affects the formatting if line wrapping is on (see the |
| 2566 | * [[email protected]:wrap] property). The default is [[email protected]], |
| 2567 | * which means wrap on word boundaries. |
| 2568 | * |
| 2569 | * For sizing behavior, also consider the [[email protected]:natural-wrap-mode] |
| 2570 | * property. |
| 2571 | */ |
| 2572 | label_propscxx . . $ label_props.[PROP_WRAP_MODEcxx . . $ PROP_WRAP_MODE.] = |
| 2573 | g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("wrap-mode", 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`!, |
| 2574 | PANGO_TYPE_WRAP_MODEcxx . . $ `<external>/8512660167370014205/pango-enum-types.h:90:9`!, |
| 2575 | PANGO_WRAP_WORDcxx . . $ PANGO_WRAP_WORD., |
| 2576 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2577 | |
| 2578 | /** |
| 2579 | * GtkLabel:natural-wrap-mode: |
| 2580 | * |
| 2581 | * Select the line wrapping for the natural size request. |
| 2582 | * |
| 2583 | * This only affects the natural size requested. For the actual wrapping |
| 2584 | * used, see the [[email protected]:wrap-mode] property. |
| 2585 | * |
| 2586 | * The default is [[email protected]], which inherits |
| 2587 | * the behavior of the [[email protected]:wrap-mode] property. |
| 2588 | * |
| 2589 | * Since: 4.6 |
| 2590 | */ |
| 2591 | label_propscxx . . $ label_props.[PROP_NATURAL_WRAP_MODEcxx . . $ PROP_NATURAL_WRAP_MODE.] = |
| 2592 | g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("natural-wrap-mode", 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`!, |
| 2593 | GTK_TYPE_NATURAL_WRAP_MODEcxx . . $ `build/gtk/gtktypebuiltins.h:146:9`!, |
| 2594 | GTK_NATURAL_WRAP_INHERITcxx . . $ GTK_NATURAL_WRAP_INHERIT., |
| 2595 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2596 | |
| 2597 | /** |
| 2598 | * GtkLabel:selectable: |
| 2599 | * |
| 2600 | * Whether the label text can be selected with the mouse. |
| 2601 | */ |
| 2602 | label_propscxx . . $ label_props.[PROP_SELECTABLEcxx . . $ PROP_SELECTABLE.] = |
| 2603 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("selectable", 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`!, |
| 2604 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 2605 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2606 | |
| 2607 | /** |
| 2608 | * GtkLabel:mnemonic-keyval: |
| 2609 | * |
| 2610 | * The mnemonic accelerator key for the label. |
| 2611 | */ |
| 2612 | label_propscxx . . $ label_props.[PROP_MNEMONIC_KEYVALcxx . . $ PROP_MNEMONIC_KEYVAL.] = |
| 2613 | g_param_spec_uintcxx . . $ g_param_spec_uint(503a1013c8de17d5). ("mnemonic-keyval", 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`!, |
| 2614 | 0, G_MAXUINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:40:9`!, |
| 2615 | GDK_KEY_VoidSymbolcxx . . $ `gdk/gdkkeysyms.h:31:9`!, |
| 2616 | GTK_PARAM_READABLEcxx . . $ `gtk/gtkprivate.h:42:9`!); |
| 2617 | |
| 2618 | /** |
| 2619 | * GtkLabel:mnemonic-widget: |
| 2620 | * |
| 2621 | * The widget to be activated when the labels mnemonic key is pressed. |
| 2622 | */ |
| 2623 | label_propscxx . . $ label_props.[PROP_MNEMONIC_WIDGETcxx . . $ PROP_MNEMONIC_WIDGET.] = |
| 2624 | g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("mnemonic-widget", 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`!, |
| 2625 | GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!, |
| 2626 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2627 | |
| 2628 | /** |
| 2629 | * GtkLabel:ellipsize: |
| 2630 | * |
| 2631 | * The preferred place to ellipsize the string, if the label does |
| 2632 | * not have enough room to display the entire string. |
| 2633 | * |
| 2634 | * Note that setting this property to a value other than |
| 2635 | * [enum.Pango.EllipsizeMode.none] has the side-effect that the label requests |
| 2636 | * only enough space to display the ellipsis "...". In particular, this |
| 2637 | * means that ellipsizing labels do not work well in notebook tabs, unless |
| 2638 | * the [[email protected]:tab-expand] child property is set to true. |
| 2639 | * |
| 2640 | * Other ways to set a label's width are [[email protected]_size_request] |
| 2641 | * and [[email protected]_width_chars]. |
| 2642 | */ |
| 2643 | label_propscxx . . $ label_props.[PROP_ELLIPSIZEcxx . . $ PROP_ELLIPSIZE.] = |
| 2644 | g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("ellipsize", 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`!, |
| 2645 | PANGO_TYPE_ELLIPSIZE_MODEcxx . . $ `<external>/8512660167370014205/pango-enum-types.h:93:9`!, |
| 2646 | PANGO_ELLIPSIZE_NONEcxx . . $ PANGO_ELLIPSIZE_NONE., |
| 2647 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2648 | |
| 2649 | /** |
| 2650 | * GtkLabel:width-chars: |
| 2651 | * |
| 2652 | * The desired width of the label, in characters. |
| 2653 | * |
| 2654 | * If this property is set to -1, the width will be calculated automatically. |
| 2655 | * |
| 2656 | * See the section on [text layout](class.Label.html#text-layout) for details |
| 2657 | * of how [[email protected]:width-chars] and [[email protected]:max-width-chars] |
| 2658 | * determine the width of ellipsized and wrapped labels. |
| 2659 | */ |
| 2660 | label_propscxx . . $ label_props.[PROP_WIDTH_CHARScxx . . $ PROP_WIDTH_CHARS.] = |
| 2661 | g_param_spec_intcxx . . $ g_param_spec_int(eedf0a930522f60e). ("width-chars", 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`!, |
| 2662 | -1, G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!, |
| 2663 | -1, |
| 2664 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2665 | |
| 2666 | /** |
| 2667 | * GtkLabel:single-line-mode: |
| 2668 | * |
| 2669 | * Whether the label is in single line mode. |
| 2670 | * |
| 2671 | * In single line mode, the height of the label does not depend on the |
| 2672 | * actual text, it is always set to ascent + descent of the font. This |
| 2673 | * can be an advantage in situations where resizing the label because |
| 2674 | * of text changes would be distracting, e.g. in a statusbar. |
| 2675 | */ |
| 2676 | label_propscxx . . $ label_props.[PROP_SINGLE_LINE_MODEcxx . . $ PROP_SINGLE_LINE_MODE.] = |
| 2677 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("single-line-mode", 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`!, |
| 2678 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 2679 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2680 | |
| 2681 | /** |
| 2682 | * GtkLabel:max-width-chars: |
| 2683 | * |
| 2684 | * The desired maximum width of the label, in characters. |
| 2685 | * |
| 2686 | * If this property is set to -1, the width will be calculated automatically. |
| 2687 | * |
| 2688 | * See the section on [text layout](class.Label.html#text-layout) for details |
| 2689 | * of how [[email protected]:width-chars] and [[email protected]:max-width-chars] |
| 2690 | * determine the width of ellipsized and wrapped labels. |
| 2691 | */ |
| 2692 | label_propscxx . . $ label_props.[PROP_MAX_WIDTH_CHARScxx . . $ PROP_MAX_WIDTH_CHARS.] = |
| 2693 | g_param_spec_intcxx . . $ g_param_spec_int(eedf0a930522f60e). ("max-width-chars", 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`!, |
| 2694 | -1, G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!, |
| 2695 | -1, |
| 2696 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2697 | |
| 2698 | /** |
| 2699 | * GtkLabel:lines: |
| 2700 | * |
| 2701 | * The number of lines to which an ellipsized, wrapping label |
| 2702 | * should display before it gets ellipsized. This both prevents the label |
| 2703 | * from ellipsizing before this many lines are displayed, and limits the |
| 2704 | * height request of the label to this many lines. |
| 2705 | * |
| 2706 | * ::: warning |
| 2707 | * Setting this property has unintuitive and unfortunate consequences |
| 2708 | * for the minimum _width_ of the label. Specifically, if the height |
| 2709 | * of the label is such that it fits a smaller number of lines than |
| 2710 | * the value of this property, the label can not be ellipsized at all, |
| 2711 | * which means it must be wide enough to fit all the text fully. |
| 2712 | * |
| 2713 | * This property has no effect if the label is not wrapping or ellipsized. |
| 2714 | * |
| 2715 | * Set this property to -1 if you don't want to limit the number of lines. |
| 2716 | */ |
| 2717 | label_propscxx . . $ label_props.[PROP_LINEScxx . . $ PROP_LINES.] = |
| 2718 | g_param_spec_intcxx . . $ g_param_spec_int(eedf0a930522f60e). ("lines", 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`!, |
| 2719 | -1, G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!, |
| 2720 | -1, |
| 2721 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2722 | |
| 2723 | /** |
| 2724 | * GtkLabel:extra-menu: |
| 2725 | * |
| 2726 | * A menu model whose contents will be appended to the context menu. |
| 2727 | */ |
| 2728 | label_propscxx . . $ label_props.[PROP_EXTRA_MENUcxx . . $ PROP_EXTRA_MENU.] = |
| 2729 | g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("extra-menu", 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`!, |
| 2730 | G_TYPE_MENU_MODELcxx . . $ `<external>/17783962342109199441/gmenumodel.h:115:9`!, |
| 2731 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2732 | |
| 2733 | /** |
| 2734 | * GtkLabel:tabs: |
| 2735 | * |
| 2736 | * Custom tabs for this label. |
| 2737 | * |
| 2738 | * Since: 4.8 |
| 2739 | */ |
| 2740 | label_propscxx . . $ label_props.[PROP_TABScxx . . $ PROP_TABS.] = |
| 2741 | g_param_spec_boxedcxx . . $ g_param_spec_boxed(faf99966f027a127). ("tabs", 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`!, |
| 2742 | PANGO_TYPE_TAB_ARRAYcxx . . $ `<external>/17262436396366379098/pango-tabs.h:53:9`!, |
| 2743 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`!|G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 2744 | |
| 2745 | g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (gobject_class, NUM_PROPERTIEScxx . . $ NUM_PROPERTIES., label_propscxx . . $ label_props.); |
| 2746 | |
| 2747 | /** |
| 2748 | * GtkLabel|menu.popup: |
| 2749 | * |
| 2750 | * Opens the context menu. |
| 2751 | */ |
| 2752 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "menu.popup", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, gtk_label_popup_menucxx . . $ gtk_label_popup_menu(77ff13cc9e0e653e).); |
| 2753 | |
| 2754 | /* |
| 2755 | * Key bindings |
| 2756 | */ |
| 2757 | |
| 2758 | gtk_widget_class_add_binding_actioncxx . . $ gtk_widget_class_add_binding_action(ec56357b390cb2a6). (widget_class, |
| 2759 | GDK_KEY_F10cxx . . $ `gdk/gdkkeysyms.h:138:9`!, GDK_SHIFT_MASKcxx . . $ GDK_SHIFT_MASK., |
| 2760 | "menu.popup", |
| 2761 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2762 | gtk_widget_class_add_binding_actioncxx . . $ gtk_widget_class_add_binding_action(ec56357b390cb2a6). (widget_class, |
| 2763 | GDK_KEY_Menucxx . . $ `gdk/gdkkeysyms.h:84:9`!, 0, |
| 2764 | "menu.popup", |
| 2765 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2766 | |
| 2767 | /* Moving the insertion point */ |
| 2768 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Rightcxx . . $ `gdk/gdkkeysyms.h:70:9`!, 0, |
| 2769 | GTK_MOVEMENT_VISUAL_POSITIONScxx . . $ GTK_MOVEMENT_VISUAL_POSITIONS., 1); |
| 2770 | |
| 2771 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Leftcxx . . $ `gdk/gdkkeysyms.h:68:9`!, 0, |
| 2772 | GTK_MOVEMENT_VISUAL_POSITIONScxx . . $ GTK_MOVEMENT_VISUAL_POSITIONS., -1); |
| 2773 | |
| 2774 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Rightcxx . . $ `gdk/gdkkeysyms.h:102:9`!, 0, |
| 2775 | GTK_MOVEMENT_VISUAL_POSITIONScxx . . $ GTK_MOVEMENT_VISUAL_POSITIONS., 1); |
| 2776 | |
| 2777 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Leftcxx . . $ `gdk/gdkkeysyms.h:100:9`!, 0, |
| 2778 | GTK_MOVEMENT_VISUAL_POSITIONScxx . . $ GTK_MOVEMENT_VISUAL_POSITIONS., -1); |
| 2779 | |
| 2780 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_fcxx . . $ `gdk/gdkkeysyms.h:452:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2781 | GTK_MOVEMENT_LOGICAL_POSITIONScxx . . $ GTK_MOVEMENT_LOGICAL_POSITIONS., 1); |
| 2782 | |
| 2783 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_bcxx . . $ `gdk/gdkkeysyms.h:448:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2784 | GTK_MOVEMENT_LOGICAL_POSITIONScxx . . $ GTK_MOVEMENT_LOGICAL_POSITIONS., -1); |
| 2785 | |
| 2786 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Rightcxx . . $ `gdk/gdkkeysyms.h:70:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2787 | GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS., 1); |
| 2788 | |
| 2789 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Leftcxx . . $ `gdk/gdkkeysyms.h:68:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2790 | GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS., -1); |
| 2791 | |
| 2792 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Rightcxx . . $ `gdk/gdkkeysyms.h:102:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2793 | GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS., 1); |
| 2794 | |
| 2795 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Leftcxx . . $ `gdk/gdkkeysyms.h:100:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2796 | GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS., -1); |
| 2797 | |
| 2798 | /* select all */ |
| 2799 | #ifdef __APPLE__ |
| 2800 | gtk_widget_class_add_binding (widget_class, |
| 2801 | GDK_KEY_a, GDK_META_MASK, |
| 2802 | (GtkShortcutFunc) gtk_label_select_all, |
| 2803 | NULL); |
| 2804 | #else |
| 2805 | gtk_widget_class_add_bindingcxx . . $ gtk_widget_class_add_binding(7fb63288a34c5bae). (widget_class, |
| 2806 | GDK_KEY_acxx . . $ `gdk/gdkkeysyms.h:447:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2807 | (GtkShortcutFunccxx . . $ GtkShortcutFunc#) gtk_label_select_allcxx . . $ gtk_label_select_all(f95750b06aaf936a)., |
| 2808 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2809 | gtk_widget_class_add_bindingcxx . . $ gtk_widget_class_add_binding(7fb63288a34c5bae). (widget_class, |
| 2810 | GDK_KEY_slashcxx . . $ `gdk/gdkkeysyms.h:396:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2811 | (GtkShortcutFunccxx . . $ GtkShortcutFunc#) gtk_label_select_allcxx . . $ gtk_label_select_all(f95750b06aaf936a)., |
| 2812 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2813 | #endif |
| 2814 | |
| 2815 | /* unselect all */ |
| 2816 | #ifdef __APPLE__ |
| 2817 | gtk_widget_class_add_binding_signal (widget_class, |
| 2818 | GDK_KEY_a, GDK_SHIFT_MASK | GDK_META_MASK, |
| 2819 | "move-cursor", |
| 2820 | "(iib)", GTK_MOVEMENT_PARAGRAPH_ENDS, 0, FALSE); |
| 2821 | #else |
| 2822 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 2823 | GDK_KEY_acxx . . $ `gdk/gdkkeysyms.h:447:9`!, GDK_SHIFT_MASKcxx . . $ GDK_SHIFT_MASK. | GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2824 | "move-cursor", |
| 2825 | "(iib)", GTK_MOVEMENT_PARAGRAPH_ENDScxx . . $ GTK_MOVEMENT_PARAGRAPH_ENDS., 0, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 2826 | |
| 2827 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 2828 | GDK_KEY_backslashcxx . . $ `gdk/gdkkeysyms.h:441:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2829 | "move-cursor", |
| 2830 | "(iib)", GTK_MOVEMENT_PARAGRAPH_ENDScxx . . $ GTK_MOVEMENT_PARAGRAPH_ENDS., 0, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 2831 | #endif |
| 2832 | |
| 2833 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_fcxx . . $ `gdk/gdkkeysyms.h:452:9`!, GDK_ALT_MASKcxx . . $ GDK_ALT_MASK., |
| 2834 | GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS., 1); |
| 2835 | |
| 2836 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_bcxx . . $ `gdk/gdkkeysyms.h:448:9`!, GDK_ALT_MASKcxx . . $ GDK_ALT_MASK., |
| 2837 | GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS., -1); |
| 2838 | |
| 2839 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Homecxx . . $ `gdk/gdkkeysyms.h:67:9`!, 0, |
| 2840 | GTK_MOVEMENT_DISPLAY_LINE_ENDScxx . . $ GTK_MOVEMENT_DISPLAY_LINE_ENDS., -1); |
| 2841 | |
| 2842 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Endcxx . . $ `gdk/gdkkeysyms.h:76:9`!, 0, |
| 2843 | GTK_MOVEMENT_DISPLAY_LINE_ENDScxx . . $ GTK_MOVEMENT_DISPLAY_LINE_ENDS., 1); |
| 2844 | |
| 2845 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Homecxx . . $ `gdk/gdkkeysyms.h:99:9`!, 0, |
| 2846 | GTK_MOVEMENT_DISPLAY_LINE_ENDScxx . . $ GTK_MOVEMENT_DISPLAY_LINE_ENDS., -1); |
| 2847 | |
| 2848 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Endcxx . . $ `gdk/gdkkeysyms.h:108:9`!, 0, |
| 2849 | GTK_MOVEMENT_DISPLAY_LINE_ENDScxx . . $ GTK_MOVEMENT_DISPLAY_LINE_ENDS., 1); |
| 2850 | |
| 2851 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Homecxx . . $ `gdk/gdkkeysyms.h:67:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2852 | GTK_MOVEMENT_BUFFER_ENDScxx . . $ GTK_MOVEMENT_BUFFER_ENDS., -1); |
| 2853 | |
| 2854 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_Endcxx . . $ `gdk/gdkkeysyms.h:76:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2855 | GTK_MOVEMENT_BUFFER_ENDScxx . . $ GTK_MOVEMENT_BUFFER_ENDS., 1); |
| 2856 | |
| 2857 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Homecxx . . $ `gdk/gdkkeysyms.h:99:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2858 | GTK_MOVEMENT_BUFFER_ENDScxx . . $ GTK_MOVEMENT_BUFFER_ENDS., -1); |
| 2859 | |
| 2860 | add_move_bindingcxx . . $ add_move_binding(4002446a33fb92fd). (widget_class, GDK_KEY_KP_Endcxx . . $ `gdk/gdkkeysyms.h:108:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2861 | GTK_MOVEMENT_BUFFER_ENDScxx . . $ GTK_MOVEMENT_BUFFER_ENDS., 1); |
| 2862 | |
| 2863 | #ifdef __APPLE__ |
| 2864 | add_move_binding (widget_class, GDK_KEY_Right, GDK_ALT_MASK, |
| 2865 | GTK_MOVEMENT_WORDS, 1); |
| 2866 | |
| 2867 | add_move_binding (widget_class, GDK_KEY_Left, GDK_ALT_MASK, |
| 2868 | GTK_MOVEMENT_WORDS, -1); |
| 2869 | |
| 2870 | add_move_binding (widget_class, GDK_KEY_KP_Right, GDK_ALT_MASK, |
| 2871 | GTK_MOVEMENT_WORDS, 1); |
| 2872 | |
| 2873 | add_move_binding (widget_class, GDK_KEY_KP_Left, GDK_ALT_MASK, |
| 2874 | GTK_MOVEMENT_WORDS, -1); |
| 2875 | |
| 2876 | add_move_binding (widget_class, GDK_KEY_Right, GDK_META_MASK, |
| 2877 | GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1); |
| 2878 | |
| 2879 | add_move_binding (widget_class, GDK_KEY_Left, GDK_META_MASK, |
| 2880 | GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1); |
| 2881 | |
| 2882 | add_move_binding (widget_class, GDK_KEY_KP_Right, GDK_META_MASK, |
| 2883 | GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1); |
| 2884 | |
| 2885 | add_move_binding (widget_class, GDK_KEY_KP_Left, GDK_META_MASK, |
| 2886 | GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1); |
| 2887 | |
| 2888 | add_move_binding (widget_class, GDK_KEY_Up, GDK_META_MASK, |
| 2889 | GTK_MOVEMENT_BUFFER_ENDS, -1); |
| 2890 | |
| 2891 | add_move_binding (widget_class, GDK_KEY_Down, GDK_META_MASK, |
| 2892 | GTK_MOVEMENT_BUFFER_ENDS, 1); |
| 2893 | |
| 2894 | add_move_binding (widget_class, GDK_KEY_KP_Up, GDK_META_MASK, |
| 2895 | GTK_MOVEMENT_BUFFER_ENDS, -1); |
| 2896 | |
| 2897 | add_move_binding (widget_class, GDK_KEY_KP_Down, GDK_META_MASK, |
| 2898 | GTK_MOVEMENT_BUFFER_ENDS, 1); |
| 2899 | #endif |
| 2900 | |
| 2901 | /* copy */ |
| 2902 | #ifdef __APPLE__ |
| 2903 | gtk_widget_class_add_binding_signal (widget_class, |
| 2904 | GDK_KEY_c, GDK_META_MASK, |
| 2905 | "copy-clipboard", |
| 2906 | NULL); |
| 2907 | #else |
| 2908 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 2909 | GDK_KEY_ccxx . . $ `gdk/gdkkeysyms.h:449:9`!, GDK_CONTROL_MASKcxx . . $ GDK_CONTROL_MASK., |
| 2910 | "copy-clipboard", |
| 2911 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2912 | #endif |
| 2913 | |
| 2914 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 2915 | GDK_KEY_Returncxx . . $ `gdk/gdkkeysyms.h:36:9`!, 0, |
| 2916 | "activate-current-link", |
| 2917 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2918 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 2919 | GDK_KEY_ISO_Entercxx . . $ `gdk/gdkkeysyms.h:242:9`!, 0, |
| 2920 | "activate-current-link", |
| 2921 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2922 | gtk_widget_class_add_binding_signalcxx . . $ gtk_widget_class_add_binding_signal(ec56357b390cb2a6). (widget_class, |
| 2923 | GDK_KEY_KP_Entercxx . . $ `gdk/gdkkeysyms.h:94:9`!, 0, |
| 2924 | "activate-current-link", |
| 2925 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2926 | |
| 2927 | gtk_widget_class_set_css_namecxx . . $ gtk_widget_class_set_css_name(6333614c746ab65a). (widget_class, I_cxx . . $ `gdk/gdkprivate.h:35:9`!("label")); |
| 2928 | gtk_widget_class_set_accessible_rolecxx . . $ gtk_widget_class_set_accessible_role(a3df1a29abf28273). (widget_class, GTK_ACCESSIBLE_ROLE_LABELcxx . . $ GTK_ACCESSIBLE_ROLE_LABEL.); |
| 2929 | |
| 2930 | quark_mnemonics_visible_connectedcxx . . $ quark_mnemonics_visible_connected. = g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("gtk-label-mnemonics-visible-connected"); |
| 2931 | |
| 2932 | /** |
| 2933 | * GtkLabel|clipboard.cut: |
| 2934 | * |
| 2935 | * Doesn't do anything, since text in labels can't be deleted. |
| 2936 | */ |
| 2937 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "clipboard.cut", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2938 | gtk_label_nopcxx . . $ gtk_label_nop(77ff13cc9e0e653e).); |
| 2939 | |
| 2940 | /** |
| 2941 | * GtkLabel|clipboard.copy: |
| 2942 | * |
| 2943 | * Copies the text to the clipboard. |
| 2944 | */ |
| 2945 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "clipboard.copy", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2946 | gtk_label_activate_clipboard_copycxx . . $ gtk_label_activate_clipboard_copy(77ff13cc9e0e653e).); |
| 2947 | |
| 2948 | /** |
| 2949 | * GtkLabel|clipboard.paste: |
| 2950 | * |
| 2951 | * Doesn't do anything, since text in labels can't be edited. |
| 2952 | */ |
| 2953 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "clipboard.paste", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2954 | gtk_label_nopcxx . . $ gtk_label_nop(77ff13cc9e0e653e).); |
| 2955 | |
| 2956 | /** |
| 2957 | * GtkLabel|selection.delete: |
| 2958 | * |
| 2959 | * Doesn't do anything, since text in labels can't be deleted. |
| 2960 | */ |
| 2961 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "selection.delete", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2962 | gtk_label_nopcxx . . $ gtk_label_nop(77ff13cc9e0e653e).); |
| 2963 | |
| 2964 | /** |
| 2965 | * GtkLabel|selection.select-all: |
| 2966 | * |
| 2967 | * Selects all of the text, if the label allows selection. |
| 2968 | */ |
| 2969 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "selection.select-all", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2970 | gtk_label_activate_selection_select_allcxx . . $ gtk_label_activate_selection_select_all(77ff13cc9e0e653e).); |
| 2971 | |
| 2972 | /** |
| 2973 | * GtkLabel|link.open: |
| 2974 | * |
| 2975 | * Opens the link, when activated on a link inside the label. |
| 2976 | */ |
| 2977 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "link.open", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2978 | gtk_label_activate_link_opencxx . . $ gtk_label_activate_link_open(77ff13cc9e0e653e).); |
| 2979 | |
| 2980 | /** |
| 2981 | * GtkLabel|link.copy: |
| 2982 | * |
| 2983 | * Copies the link to the clipboard, when activated on a link |
| 2984 | * inside the label. |
| 2985 | */ |
| 2986 | gtk_widget_class_install_actioncxx . . $ gtk_widget_class_install_action(44272af64b8ada52). (widget_class, "link.copy", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 2987 | gtk_label_activate_link_copycxx . . $ gtk_label_activate_link_copy(77ff13cc9e0e653e).); |
| 2988 | } |
| 2989 | |
| 2990 | /** |
| 2991 | * gtk_label_new: |
| 2992 | * @str: (nullable): the text of the label |
| 2993 | * |
| 2994 | * Creates a new label with the given text inside it. |
| 2995 | * |
| 2996 | * You can pass `NULL` to get an empty label widget. |
| 2997 | * |
| 2998 | * Returns: the new label |
| 2999 | **/ |
| 3000 | GtkWidgetcxx . . $ GtkWidget#* |
| 3001 | gtk_label_newcxx . . $ gtk_label_new(6d90f3ec8782e10d). (const char *str) |
| 3002 | { |
| 3003 | GtkLabelcxx . . $ GtkLabel# *self; |
| 3004 | |
| 3005 | self = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_LABELcxx . . $ `gtk/gtklabel.h:35:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3006 | |
| 3007 | if (str && *str) |
| 3008 | gtk_label_set_textcxx . . $ gtk_label_set_text(3d016a7109913fca). (self, str); |
| 3009 | |
| 3010 | return GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 3011 | } |
| 3012 | |
| 3013 | /** |
| 3014 | * gtk_label_new_with_mnemonic: |
| 3015 | * @str: (nullable): the text of the label, with an underscore in front of the |
| 3016 | * mnemonic character |
| 3017 | * |
| 3018 | * Creates a new label with the given text inside it, and a mnemonic. |
| 3019 | * |
| 3020 | * If characters in @str are preceded by an underscore, they are |
| 3021 | * underlined. If you need a literal underscore character in a label, use |
| 3022 | * '__' (two underscores). The first underlined character represents a |
| 3023 | * keyboard accelerator called a mnemonic. The mnemonic key can be used |
| 3024 | * to activate another widget, chosen automatically, or explicitly using |
| 3025 | * [[email protected]_mnemonic_widget]. |
| 3026 | * |
| 3027 | * If [[email protected]_mnemonic_widget] is not called, then the first |
| 3028 | * activatable ancestor of the label will be chosen as the mnemonic |
| 3029 | * widget. For instance, if the label is inside a button or menu item, |
| 3030 | * the button or menu item will automatically become the mnemonic widget |
| 3031 | * and be activated by the mnemonic. |
| 3032 | * |
| 3033 | * Returns: the new label |
| 3034 | **/ |
| 3035 | GtkWidgetcxx . . $ GtkWidget#* |
| 3036 | gtk_label_new_with_mnemoniccxx . . $ gtk_label_new_with_mnemonic(6d90f3ec8782e10d). (const char *str) |
| 3037 | { |
| 3038 | GtkLabelcxx . . $ GtkLabel# *self; |
| 3039 | |
| 3040 | self = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_LABELcxx . . $ `gtk/gtklabel.h:35:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3041 | |
| 3042 | if (str && *str) |
| 3043 | gtk_label_set_text_with_mnemoniccxx . . $ gtk_label_set_text_with_mnemonic(3d016a7109913fca). (self, str); |
| 3044 | |
| 3045 | return GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 3046 | } |
| 3047 | |
| 3048 | static void |
| 3049 | _gtk_label_mnemonics_visible_apply_recursivelycxx . . $ _gtk_label_mnemonics_visible_apply_recursively(81f145f668a0074f). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 3050 | gbooleancxx . . $ gboolean# visible) |
| 3051 | { |
| 3052 | if (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (widget)) |
| 3053 | { |
| 3054 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 3055 | |
| 3056 | if (self->mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. != visible) |
| 3057 | { |
| 3058 | self->mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. = visible; |
| 3059 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 3060 | } |
| 3061 | } |
| 3062 | else |
| 3063 | { |
| 3064 | GtkWidgetcxx . . $ GtkWidget# *child; |
| 3065 | |
| 3066 | for (child = gtk_widget_get_first_childcxx . . $ gtk_widget_get_first_child(ef973e1b01680070). (widget); |
| 3067 | child; |
| 3068 | child = gtk_widget_get_next_siblingcxx . . $ gtk_widget_get_next_sibling(ef973e1b01680070). (child)) |
| 3069 | { |
| 3070 | if (GTK_IS_NATIVEcxx . . $ GTK_IS_NATIVE(dedf1e9b1c614a07). (child)) |
| 3071 | continue; |
| 3072 | |
| 3073 | _gtk_label_mnemonics_visible_apply_recursivelycxx . . $ _gtk_label_mnemonics_visible_apply_recursively(81f145f668a0074f). (child, visible); |
| 3074 | } |
| 3075 | } |
| 3076 | } |
| 3077 | |
| 3078 | static void |
| 3079 | label_mnemonics_visible_changedcxx . . $ label_mnemonics_visible_changed(e6f813de8be39d8a). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 3080 | GParamSpeccxx . . $ GParamSpec# *pspec, |
| 3081 | gpointercxx . . $ gpointer# data) |
| 3082 | { |
| 3083 | gbooleancxx . . $ gboolean# visible; |
| 3084 | |
| 3085 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (widget, "mnemonics-visible", &visible, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3086 | _gtk_label_mnemonics_visible_apply_recursivelycxx . . $ _gtk_label_mnemonics_visible_apply_recursively(81f145f668a0074f). (widget, visible); |
| 3087 | } |
| 3088 | |
| 3089 | static void |
| 3090 | gtk_label_setup_mnemoniccxx . . $ gtk_label_setup_mnemonic(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3091 | { |
| 3092 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 3093 | GtkShortcutcxx . . $ GtkShortcut# *shortcut; |
| 3094 | GtkNativecxx . . $ GtkNative# *native; |
| 3095 | gbooleancxx . . $ gboolean# connected; |
| 3096 | gbooleancxx . . $ gboolean# mnemonics_visible; |
| 3097 | |
| 3098 | if (self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval. == GDK_KEY_VoidSymbolcxx . . $ `gdk/gdkkeysyms.h:31:9`!) |
| 3099 | { |
| 3100 | if (self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller.) |
| 3101 | { |
| 3102 | gtk_widget_remove_controllercxx . . $ gtk_widget_remove_controller(6d1262f1b7c2f702). (widget, self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller.); |
| 3103 | self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3104 | } |
| 3105 | return; |
| 3106 | } |
| 3107 | |
| 3108 | if (self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3109 | { |
| 3110 | self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller. = gtk_shortcut_controller_newcxx . . $ gtk_shortcut_controller_new(f1c553b571625c41). (); |
| 3111 | gtk_event_controller_set_propagation_phasecxx . . $ gtk_event_controller_set_propagation_phase(c64e5c05e4165a3c). (self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller., GTK_PHASE_CAPTUREcxx . . $ GTK_PHASE_CAPTURE.); |
| 3112 | gtk_shortcut_controller_set_scopecxx . . $ gtk_shortcut_controller_set_scope(a2ef248521f6860b). (GTK_SHORTCUT_CONTROLLERcxx . . $ `gtk/gtkshortcutcontroller.h:32:9`! (self->mnemonic_controller), GTK_SHORTCUT_SCOPE_MANAGEDcxx . . $ GTK_SHORTCUT_SCOPE_MANAGED.); |
| 3113 | shortcut = gtk_shortcut_newcxx . . $ gtk_shortcut_new(63730520632a9b85). (gtk_mnemonic_trigger_newcxx . . $ gtk_mnemonic_trigger_new(4b390bfe0415673a). (self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.), |
| 3114 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (gtk_mnemonic_action_get ())); |
| 3115 | gtk_shortcut_controller_add_shortcutcxx . . $ gtk_shortcut_controller_add_shortcut(fa9eaacbd132a2a9). (GTK_SHORTCUT_CONTROLLERcxx . . $ `gtk/gtkshortcutcontroller.h:32:9`! (self->mnemonic_controller), shortcut); |
| 3116 | gtk_widget_add_controllercxx . . $ gtk_widget_add_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller.); |
| 3117 | } |
| 3118 | else |
| 3119 | { |
| 3120 | shortcut = g_list_model_get_itemcxx . . $ g_list_model_get_item(9715a6516b430a30). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self->mnemonic_controllercxx . . $ _GtkLabel#mnemonic_controller.), 0); |
| 3121 | gtk_shortcut_set_triggercxx . . $ gtk_shortcut_set_trigger(98987e7950fa7a9). (shortcut, gtk_mnemonic_trigger_newcxx . . $ gtk_mnemonic_trigger_new(4b390bfe0415673a). (self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.)); |
| 3122 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (shortcut); |
| 3123 | } |
| 3124 | |
| 3125 | /* Connect to notify::mnemonics-visible of the root */ |
| 3126 | native = gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3127 | if (!GTK_IS_WINDOWcxx . . $ `gtk/gtkwindow.h:41:9`! (native) && !GTK_IS_POPOVERcxx . . $ `gtk/gtkpopover.h:34:9`! (native)) |
| 3128 | return; |
| 3129 | |
| 3130 | /* always set up this widgets initial value */ |
| 3131 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (native, "mnemonics-visible", &mnemonics_visible, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3132 | if (self->mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. != mnemonics_visible) |
| 3133 | { |
| 3134 | self->mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. = mnemonics_visible; |
| 3135 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 3136 | } |
| 3137 | |
| 3138 | connected = GPOINTER_TO_INTcxx . . $ `<external>/10505296616216143549/glibconfig.h:103:9`! (g_object_get_qdata (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (native), |
| 3139 | quark_mnemonics_visible_connected)); |
| 3140 | |
| 3141 | if (!connected) |
| 3142 | { |
| 3143 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (native, |
| 3144 | "notify::mnemonics-visible", |
| 3145 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (label_mnemonics_visible_changed), |
| 3146 | self); |
| 3147 | g_object_set_qdatacxx . . $ g_object_set_qdata(d7e2e719dfad0cc9). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (native), |
| 3148 | quark_mnemonics_visible_connectedcxx . . $ quark_mnemonics_visible_connected., |
| 3149 | GINT_TO_POINTERcxx . . $ `<external>/10505296616216143549/glibconfig.h:106:9`! (1)); |
| 3150 | } |
| 3151 | } |
| 3152 | |
| 3153 | static void |
| 3154 | label_mnemonic_widget_weak_notifycxx . . $ label_mnemonic_widget_weak_notify(554ab6d9108a3d1e). (gpointercxx . . $ gpointer# data, |
| 3155 | GObjectcxx . . $ GObject# *where_the_object_was) |
| 3156 | { |
| 3157 | GtkLabelcxx . . $ GtkLabel# *self = data; |
| 3158 | |
| 3159 | self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3160 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_MNEMONIC_WIDGETcxx . . $ PROP_MNEMONIC_WIDGET.]); |
| 3161 | } |
| 3162 | |
| 3163 | /** |
| 3164 | * gtk_label_set_mnemonic_widget: |
| 3165 | * @self: a label |
| 3166 | * @widget: (nullable): the target widget |
| 3167 | * |
| 3168 | * Associate the label with its mnemonic target. |
| 3169 | * |
| 3170 | * If the label has been set so that it has a mnemonic key (using |
| 3171 | * i.e. [[email protected]_markup_with_mnemonic], |
| 3172 | * [[email protected]_text_with_mnemonic], |
| 3173 | * [[email protected]_with_mnemonic] |
| 3174 | * or the [[email protected]:use_underline] property) the label can |
| 3175 | * be associated with a widget that is the target of the mnemonic. |
| 3176 | * When the label is inside a widget (like a [[email protected]] or a |
| 3177 | * [[email protected]] tab) it is automatically associated with the |
| 3178 | * correct widget, but sometimes (i.e. when the target is a [[email protected]] |
| 3179 | * next to the label) you need to set it explicitly using this function. |
| 3180 | * |
| 3181 | * The target widget will be accelerated by emitting the |
| 3182 | * [[email protected]::mnemonic-activate] signal on it. The default handler |
| 3183 | * for this signal will activate the widget if there are no mnemonic |
| 3184 | * collisions and toggle focus between the colliding widgets otherwise. |
| 3185 | */ |
| 3186 | void |
| 3187 | gtk_label_set_mnemonic_widgetcxx . . $ gtk_label_set_mnemonic_widget(906eecb9afda53b9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3188 | GtkWidgetcxx . . $ GtkWidget# *widget) |
| 3189 | { |
| 3190 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 3191 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (widget == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || GTK_IS_WIDGETcxx . . $ `gtk/gtkwidget.h:46:9`! (widget)); |
| 3192 | |
| 3193 | if (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget. == widget) |
| 3194 | return; |
| 3195 | |
| 3196 | if (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.) |
| 3197 | { |
| 3198 | gtk_widget_remove_mnemonic_labelcxx . . $ gtk_widget_remove_mnemonic_label(4f261c0971c30e7). (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget., GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3199 | g_object_weak_unrefcxx . . $ g_object_weak_unref(a513422a6c5b79d2). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self->mnemonic_widget), |
| 3200 | label_mnemonic_widget_weak_notifycxx . . $ label_mnemonic_widget_weak_notify(554ab6d9108a3d1e)., |
| 3201 | self); |
| 3202 | } |
| 3203 | self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget. = widget; |
| 3204 | if (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.) |
| 3205 | { |
| 3206 | g_object_weak_refcxx . . $ g_object_weak_ref(a513422a6c5b79d2). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self->mnemonic_widget), |
| 3207 | label_mnemonic_widget_weak_notifycxx . . $ label_mnemonic_widget_weak_notify(554ab6d9108a3d1e)., |
| 3208 | self); |
| 3209 | gtk_widget_add_mnemonic_labelcxx . . $ gtk_widget_add_mnemonic_label(4f261c0971c30e7). (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget., GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3210 | } |
| 3211 | |
| 3212 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_MNEMONIC_WIDGETcxx . . $ PROP_MNEMONIC_WIDGET.]); |
| 3213 | } |
| 3214 | |
| 3215 | /** |
| 3216 | * gtk_label_get_mnemonic_widget: |
| 3217 | * @self: a label |
| 3218 | * |
| 3219 | * Retrieves the mnemonic target of this label. |
| 3220 | * |
| 3221 | * See [[email protected]_mnemonic_widget]. |
| 3222 | * |
| 3223 | * Returns: (nullable) (transfer none): the target of the label’s mnemonic, |
| 3224 | * or `NULL` if none has been set and the default algorithm will be used. |
| 3225 | **/ |
| 3226 | GtkWidgetcxx . . $ GtkWidget# * |
| 3227 | gtk_label_get_mnemonic_widgetcxx . . $ gtk_label_get_mnemonic_widget(1cf50bfc47b4ed95). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3228 | { |
| 3229 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3230 | |
| 3231 | return self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.; |
| 3232 | } |
| 3233 | |
| 3234 | /** |
| 3235 | * gtk_label_get_mnemonic_keyval: |
| 3236 | * @self: a label |
| 3237 | * |
| 3238 | * Return the mnemonic accelerator. |
| 3239 | * |
| 3240 | * If the label has been set so that it has a mnemonic key this function |
| 3241 | * returns the keyval used for the mnemonic accelerator. If there is no |
| 3242 | * mnemonic set up it returns `GDK_KEY_VoidSymbol`. |
| 3243 | * |
| 3244 | * Returns: GDK keyval usable for accelerators, or `GDK_KEY_VoidSymbol` |
| 3245 | **/ |
| 3246 | guintcxx . . $ guint# |
| 3247 | gtk_label_get_mnemonic_keyvalcxx . . $ gtk_label_get_mnemonic_keyval(1b06847e4917401c). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3248 | { |
| 3249 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), GDK_KEY_VoidSymbolcxx . . $ `gdk/gdkkeysyms.h:31:9`!); |
| 3250 | |
| 3251 | return self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.; |
| 3252 | } |
| 3253 | |
| 3254 | static void |
| 3255 | gtk_label_set_text_internalcxx . . $ gtk_label_set_text_internal(9aff2537204fd333). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3256 | char *str) |
| 3257 | { |
| 3258 | GtkAccessibleRolecxx . . $ GtkAccessibleRole# role; |
| 3259 | |
| 3260 | if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (self->textcxx . . $ _GtkLabel#text., str) == 0) |
| 3261 | { |
| 3262 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 3263 | return; |
| 3264 | } |
| 3265 | |
| 3266 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->textcxx . . $ _GtkLabel#text.); |
| 3267 | self->textcxx . . $ _GtkLabel#text. = str; |
| 3268 | |
| 3269 | role = gtk_accessible_get_accessible_rolecxx . . $ gtk_accessible_get_accessible_role(f116a87e5d5a98e5). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (self)); |
| 3270 | |
| 3271 | if (gtk_accessible_role_get_namingcxx . . $ gtk_accessible_role_get_naming(7da4462d3a52c419). (role) != GTK_ACCESSIBLE_NAME_PROHIBITEDcxx . . $ GTK_ACCESSIBLE_NAME_PROHIBITED.) |
| 3272 | { |
| 3273 | gtk_accessible_update_propertycxx . . $ gtk_accessible_update_property(7f02be67e42032aa). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (self), |
| 3274 | GTK_ACCESSIBLE_PROPERTY_LABELcxx . . $ GTK_ACCESSIBLE_PROPERTY_LABEL., |
| 3275 | self->textcxx . . $ _GtkLabel#text., |
| 3276 | -1); |
| 3277 | } |
| 3278 | |
| 3279 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, 0, 0); |
| 3280 | } |
| 3281 | |
| 3282 | static gbooleancxx . . $ gboolean# |
| 3283 | gtk_label_set_label_internalcxx . . $ gtk_label_set_label_internal(20045daa3ee49671). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3284 | const char *str) |
| 3285 | { |
| 3286 | if (g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (str, self->labelcxx . . $ _GtkLabel#label.) == 0) |
| 3287 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3288 | |
| 3289 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->labelcxx . . $ _GtkLabel#label.); |
| 3290 | self->labelcxx . . $ _GtkLabel#label. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (str ? str : ""); |
| 3291 | |
| 3292 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_LABELcxx . . $ PROP_LABEL.]); |
| 3293 | |
| 3294 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 3295 | } |
| 3296 | |
| 3297 | static gbooleancxx . . $ gboolean# |
| 3298 | gtk_label_set_use_markup_internalcxx . . $ gtk_label_set_use_markup_internal(7d3bc1c500b2b3a9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3299 | gbooleancxx . . $ gboolean# val) |
| 3300 | { |
| 3301 | if (self->use_markupcxx . . $ _GtkLabel#use_markup. != val) |
| 3302 | { |
| 3303 | self->use_markupcxx . . $ _GtkLabel#use_markup. = val; |
| 3304 | |
| 3305 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_USE_MARKUPcxx . . $ PROP_USE_MARKUP.]); |
| 3306 | |
| 3307 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 3308 | } |
| 3309 | |
| 3310 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3311 | } |
| 3312 | |
| 3313 | static gbooleancxx . . $ gboolean# |
| 3314 | gtk_label_set_use_underline_internalcxx . . $ gtk_label_set_use_underline_internal(7d3bc1c500b2b3a9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3315 | gbooleancxx . . $ gboolean# val) |
| 3316 | { |
| 3317 | if (self->use_underlinecxx . . $ _GtkLabel#use_underline. != val) |
| 3318 | { |
| 3319 | self->use_underlinecxx . . $ _GtkLabel#use_underline. = val; |
| 3320 | |
| 3321 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_USE_UNDERLINEcxx . . $ PROP_USE_UNDERLINE.]); |
| 3322 | |
| 3323 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 3324 | } |
| 3325 | |
| 3326 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3327 | } |
| 3328 | |
| 3329 | /* Calculates text, attrs and mnemonic_keyval from |
| 3330 | * label, use_underline and use_markup |
| 3331 | */ |
| 3332 | static void |
| 3333 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3334 | { |
| 3335 | guintcxx . . $ guint# keyval = self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.; |
| 3336 | |
| 3337 | gtk_label_clear_linkscxx . . $ gtk_label_clear_links(e9c0e7bdc16b978e). (self); |
| 3338 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 3339 | gtk_label_clear_select_infocxx . . $ gtk_label_clear_select_info(e9c0e7bdc16b978e). (self); |
| 3340 | |
| 3341 | if (self->use_markupcxx . . $ _GtkLabel#use_markup.) |
| 3342 | { |
| 3343 | gtk_label_set_markup_internalcxx . . $ gtk_label_set_markup_internal(12f10c424a963dfd). (self, self->labelcxx . . $ _GtkLabel#label., self->use_underlinecxx . . $ _GtkLabel#use_underline.); |
| 3344 | } |
| 3345 | else if (self->use_underlinecxx . . $ _GtkLabel#use_underline.) |
| 3346 | { |
| 3347 | char *text; |
| 3348 | |
| 3349 | text = g_markup_escape_textcxx . . $ g_markup_escape_text(a8ddf37f112087c3). (self->labelcxx . . $ _GtkLabel#label., -1); |
| 3350 | gtk_label_set_markup_internalcxx . . $ gtk_label_set_markup_internal(12f10c424a963dfd). (self, text, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 3351 | g_freecxx . . $ g_free(5d22bdacc48458e8). (text); |
| 3352 | } |
| 3353 | else |
| 3354 | { |
| 3355 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->markup_attrs, pango_attr_list_unref); |
| 3356 | |
| 3357 | gtk_label_set_text_internalcxx . . $ gtk_label_set_text_internal(9aff2537204fd333). (self, g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (self->label)); |
| 3358 | } |
| 3359 | |
| 3360 | if (!self->use_underlinecxx . . $ _GtkLabel#use_underline.) |
| 3361 | self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval. = GDK_KEY_VoidSymbolcxx . . $ `gdk/gdkkeysyms.h:31:9`!; |
| 3362 | |
| 3363 | if (keyval != self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval.) |
| 3364 | { |
| 3365 | gtk_label_setup_mnemoniccxx . . $ gtk_label_setup_mnemonic(e9c0e7bdc16b978e). (self); |
| 3366 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_MNEMONIC_KEYVALcxx . . $ PROP_MNEMONIC_KEYVAL.]); |
| 3367 | } |
| 3368 | |
| 3369 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3370 | } |
| 3371 | |
| 3372 | /** |
| 3373 | * gtk_label_set_text: |
| 3374 | * @self: a label |
| 3375 | * @str: the text to show in @self |
| 3376 | * |
| 3377 | * Sets the text for the label. |
| 3378 | * |
| 3379 | * It overwrites any text that was there before and clears any |
| 3380 | * previously set mnemonic accelerators, and sets the |
| 3381 | * [[email protected]:use-underline] and |
| 3382 | * [[email protected]:use-markup] properties to false. |
| 3383 | * |
| 3384 | * Also see [[email protected]_markup]. |
| 3385 | */ |
| 3386 | void |
| 3387 | gtk_label_set_textcxx . . $ gtk_label_set_text(3d016a7109913fca). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3388 | const char *str) |
| 3389 | { |
| 3390 | gbooleancxx . . $ gboolean# changed; |
| 3391 | |
| 3392 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 3393 | |
| 3394 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 3395 | |
| 3396 | changed = gtk_label_set_label_internalcxx . . $ gtk_label_set_label_internal(20045daa3ee49671). (self, str); |
| 3397 | changed = gtk_label_set_use_markup_internalcxx . . $ gtk_label_set_use_markup_internal(7d3bc1c500b2b3a9). (self, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) || changed; |
| 3398 | changed = gtk_label_set_use_underline_internalcxx . . $ gtk_label_set_use_underline_internal(7d3bc1c500b2b3a9). (self, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) || changed; |
| 3399 | |
| 3400 | if (changed) |
| 3401 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 3402 | |
| 3403 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 3404 | } |
| 3405 | |
| 3406 | /** |
| 3407 | * gtk_label_set_attributes: |
| 3408 | * @self: a label |
| 3409 | * @attrs: (nullable): a list of style attributes |
| 3410 | * |
| 3411 | * Apply attributes to the label text. |
| 3412 | * |
| 3413 | * The attributes set with this function will be applied and merged with |
| 3414 | * any other attributes previously effected by way of the |
| 3415 | * [[email protected]:use-underline] or [[email protected]:use-markup] |
| 3416 | * properties |
| 3417 | * |
| 3418 | * While it is not recommended to mix markup strings with manually set |
| 3419 | * attributes, if you must; know that the attributes will be applied |
| 3420 | * to the label after the markup string is parsed. |
| 3421 | */ |
| 3422 | void |
| 3423 | gtk_label_set_attributescxx . . $ gtk_label_set_attributes(5f4d5ccde1b15dea). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3424 | PangoAttrListcxx . . $ PangoAttrList# *attrs) |
| 3425 | { |
| 3426 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 3427 | |
| 3428 | if (!attrs && !self->attrscxx . . $ _GtkLabel#attrs.) |
| 3429 | return; |
| 3430 | |
| 3431 | if (attrs) |
| 3432 | pango_attr_list_refcxx . . $ pango_attr_list_ref(a08ff48611643c1a). (attrs); |
| 3433 | |
| 3434 | if (self->attrscxx . . $ _GtkLabel#attrs.) |
| 3435 | pango_attr_list_unrefcxx . . $ pango_attr_list_unref(c4bf0c0856846d1b). (self->attrscxx . . $ _GtkLabel#attrs.); |
| 3436 | self->attrscxx . . $ _GtkLabel#attrs. = attrs; |
| 3437 | |
| 3438 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.]); |
| 3439 | |
| 3440 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 3441 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3442 | } |
| 3443 | |
| 3444 | /** |
| 3445 | * gtk_label_get_attributes: |
| 3446 | * @self: a label |
| 3447 | * |
| 3448 | * Gets the label's attribute list. |
| 3449 | * |
| 3450 | * This is the [[email protected]] that was set on the label using |
| 3451 | * [[email protected]_attributes], if any. This function does not |
| 3452 | * reflect attributes that come from the label's markup (see |
| 3453 | * [[email protected]_markup]). If you want to get the effective |
| 3454 | * attributes for the label, use |
| 3455 | * `pango_layout_get_attributes (gtk_label_get_layout (self))`. |
| 3456 | * |
| 3457 | * Returns: (nullable) (transfer none): the attribute list |
| 3458 | */ |
| 3459 | PangoAttrListcxx . . $ PangoAttrList# * |
| 3460 | gtk_label_get_attributescxx . . $ gtk_label_get_attributes(2830caf65ca3fdb5). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3461 | { |
| 3462 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3463 | |
| 3464 | return self->attrscxx . . $ _GtkLabel#attrs.; |
| 3465 | } |
| 3466 | |
| 3467 | /** |
| 3468 | * gtk_label_set_label: |
| 3469 | * @self: a label |
| 3470 | * @str: the new text to set for the label |
| 3471 | * |
| 3472 | * Sets the text of the label. |
| 3473 | * |
| 3474 | * The label is interpreted as including embedded underlines and/or Pango |
| 3475 | * markup depending on the values of the [[email protected]:use-underline] |
| 3476 | * and [[email protected]:use-markup] properties. |
| 3477 | */ |
| 3478 | void |
| 3479 | gtk_label_set_labelcxx . . $ gtk_label_set_label(3d016a7109913fca). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3480 | const char *str) |
| 3481 | { |
| 3482 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 3483 | |
| 3484 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 3485 | |
| 3486 | if (gtk_label_set_label_internalcxx . . $ gtk_label_set_label_internal(20045daa3ee49671). (self, str)) |
| 3487 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 3488 | |
| 3489 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 3490 | } |
| 3491 | |
| 3492 | /** |
| 3493 | * gtk_label_get_label: |
| 3494 | * @self: a label |
| 3495 | * |
| 3496 | * Fetches the text from a label. |
| 3497 | * |
| 3498 | * The returned text includes any embedded underlines indicating |
| 3499 | * mnemonics and Pango markup. (See [[email protected]_text]). |
| 3500 | * |
| 3501 | * Returns: the text of the label widget |
| 3502 | */ |
| 3503 | const char * |
| 3504 | gtk_label_get_labelcxx . . $ gtk_label_get_label(204bfb80200b298b). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3505 | { |
| 3506 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3507 | |
| 3508 | return self->labelcxx . . $ _GtkLabel#label.; |
| 3509 | } |
| 3510 | |
| 3511 | typedef structcxx . . $ $anonymous_type_52cf8198354a9553_3# |
| 3512 | { |
| 3513 | GtkLabelcxx . . $ GtkLabel# *labelcxx . . $ $anonymous_type_52cf8198354a9553_3#label.; |
| 3514 | GArraycxx . . $ GArray# *linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links.; |
| 3515 | GStringcxx . . $ GString# *new_strcxx . . $ $anonymous_type_52cf8198354a9553_3#new_str.; |
| 3516 | gsizecxx . . $ gsize# text_lencxx . . $ $anonymous_type_52cf8198354a9553_3#text_len.; |
| 3517 | gbooleancxx . . $ gboolean# strip_ulinescxx . . $ $anonymous_type_52cf8198354a9553_3#strip_ulines.; |
| 3518 | GStringcxx . . $ GString# *text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.; |
| 3519 | gunicharcxx . . $ gunichar# accel_keycxx . . $ $anonymous_type_52cf8198354a9553_3#accel_key.; |
| 3520 | } UriParserDatacxx . . $ UriParserData#; |
| 3521 | |
| 3522 | static char * |
| 3523 | strip_ulinescxx . . $ strip_ulines(1341cc70633bd954). (const char *text, |
| 3524 | guintcxx . . $ guint# *accel_key) |
| 3525 | { |
| 3526 | char *new_text; |
| 3527 | const char *p; |
| 3528 | char *q; |
| 3529 | gbooleancxx . . $ gboolean# after_uline = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3530 | |
| 3531 | new_text = g_malloccxx . . $ g_malloc(bfcfa4d6b7f7ef64). (strlencxx . . $ strlen(751346f8406fd082). (text) + 1); |
| 3532 | |
| 3533 | q = new_text; |
| 3534 | for (p = text; *p; p++) |
| 3535 | { |
| 3536 | if (*p == '_' && !after_uline) |
| 3537 | { |
| 3538 | after_uline = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 3539 | continue; |
| 3540 | } |
| 3541 | |
| 3542 | *q = *p; |
| 3543 | if (after_uline && *p != '_' && *accel_key == 0) |
| 3544 | *accel_key = g_utf8_get_charcxx . . $ g_utf8_get_char(c61c63047ce273de). (p); |
| 3545 | |
| 3546 | q++; |
| 3547 | after_uline = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3548 | } |
| 3549 | |
| 3550 | if (after_uline) |
| 3551 | { |
| 3552 | *q = '_'; |
| 3553 | q++; |
| 3554 | } |
| 3555 | |
| 3556 | *q = '\0'; |
| 3557 | |
| 3558 | return new_text; |
| 3559 | } |
| 3560 | |
| 3561 | static void |
| 3562 | finish_textcxx . . $ finish_text(654940bc20686533). (UriParserDatacxx . . $ UriParserData# *pdata) |
| 3563 | { |
| 3564 | if (pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.->lencxx . . $ _GString#len. > 0) |
| 3565 | { |
| 3566 | char *text; |
| 3567 | gsizecxx . . $ gsize# text_len; |
| 3568 | char *newtext; |
| 3569 | |
| 3570 | if (pdata->strip_ulinescxx . . $ $anonymous_type_52cf8198354a9553_3#strip_ulines. && strchrcxx . . $ strchr(2050848944e00d54). (pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.->strcxx . . $ _GString#str., '_')) |
| 3571 | { |
| 3572 | text = strip_ulinescxx . . $ strip_ulines(1341cc70633bd954). (pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.->strcxx . . $ _GString#str., &pdata->accel_keycxx . . $ $anonymous_type_52cf8198354a9553_3#accel_key.); |
| 3573 | text_len = strlencxx . . $ strlen(751346f8406fd082). (text); |
| 3574 | } |
| 3575 | else |
| 3576 | { |
| 3577 | text = pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.->strcxx . . $ _GString#str.; |
| 3578 | text_len = pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.->lencxx . . $ _GString#len.; |
| 3579 | } |
| 3580 | |
| 3581 | newtext = g_markup_escape_textcxx . . $ g_markup_escape_text(a8ddf37f112087c3). (text, text_len); |
| 3582 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, newtext); |
| 3583 | pdata->text_lencxx . . $ $anonymous_type_52cf8198354a9553_3#text_len. += text_len; |
| 3584 | g_freecxx . . $ g_free(5d22bdacc48458e8). (newtext); |
| 3585 | |
| 3586 | if (text != pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data.->strcxx . . $ _GString#str.) |
| 3587 | g_freecxx . . $ g_free(5d22bdacc48458e8). (text); |
| 3588 | |
| 3589 | g_string_set_sizecxx . . $ g_string_set_size(fff8c88e3865544b). (pdata->text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data., 0); |
| 3590 | } |
| 3591 | } |
| 3592 | |
| 3593 | static void |
| 3594 | link_style_changed_cbcxx . . $ link_style_changed_cb(d2225b00beb4e236). (GtkCssNodecxx . . $ GtkCssNode# *node, |
| 3595 | GtkCssStyleChangecxx . . $ GtkCssStyleChange# *change, |
| 3596 | GtkLabelcxx . . $ GtkLabel# *self) |
| 3597 | { |
| 3598 | if (gtk_css_style_change_affectscxx . . $ gtk_css_style_change_affects(dd611ee2c95fff96). (change, |
| 3599 | GTK_CSS_AFFECTS_CONTENTcxx . . $ GTK_CSS_AFFECTS_CONTENT. | |
| 3600 | GTK_CSS_AFFECTS_TEXT_ATTRScxx . . $ GTK_CSS_AFFECTS_TEXT_ATTRS.)) |
| 3601 | { |
| 3602 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 3603 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3604 | } |
| 3605 | } |
| 3606 | |
| 3607 | static void |
| 3608 | selection_style_changed_cbcxx . . $ selection_style_changed_cb(d2225b00beb4e236). (GtkCssNodecxx . . $ GtkCssNode# *node, |
| 3609 | GtkCssStyleChangecxx . . $ GtkCssStyleChange# *change, |
| 3610 | GtkLabelcxx . . $ GtkLabel# *self) |
| 3611 | { |
| 3612 | if (gtk_css_style_change_affectscxx . . $ gtk_css_style_change_affects(dd611ee2c95fff96). (change, GTK_CSS_AFFECTS_REDRAWcxx . . $ `gtk/gtkcsstypesprivate.h:176:9`!)) |
| 3613 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 3614 | } |
| 3615 | |
| 3616 | static void |
| 3617 | clear_label_linkcxx . . $ clear_label_link(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data) |
| 3618 | { |
| 3619 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = data; |
| 3620 | |
| 3621 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&link->accessible); |
| 3622 | } |
| 3623 | |
| 3624 | static void |
| 3625 | start_element_handlercxx . . $ start_element_handler(8107764f6935ef7e). (GMarkupParseContextcxx . . $ GMarkupParseContext# *context, |
| 3626 | const char *element_name, |
| 3627 | const char **attribute_names, |
| 3628 | const char **attribute_values, |
| 3629 | gpointercxx . . $ gpointer# user_data, |
| 3630 | GErrorcxx . . $ GError# **error) |
| 3631 | { |
| 3632 | UriParserDatacxx . . $ UriParserData# *pdata = user_data; |
| 3633 | GtkLabelcxx . . $ GtkLabel# *self = pdata->labelcxx . . $ $anonymous_type_52cf8198354a9553_3#label.; |
| 3634 | |
| 3635 | finish_textcxx . . $ finish_text(654940bc20686533). (pdata); |
| 3636 | |
| 3637 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (element_name, "a") == 0) |
| 3638 | { |
| 3639 | GtkLabelLinkcxx . . $ GtkLabelLink# link; |
| 3640 | const char *uri = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3641 | const char *title = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3642 | const char *class = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3643 | gbooleancxx . . $ gboolean# visited = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3644 | int line_number; |
| 3645 | int char_number; |
| 3646 | int i; |
| 3647 | GtkCssNodecxx . . $ GtkCssNode# *widget_node; |
| 3648 | GtkStateFlagscxx . . $ GtkStateFlags# state; |
| 3649 | |
| 3650 | g_markup_parse_context_get_positioncxx . . $ g_markup_parse_context_get_position(be0223bf058b31b5). (context, &line_number, &char_number); |
| 3651 | |
| 3652 | for (i = 0; attribute_names[i] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; i++) |
| 3653 | { |
| 3654 | const char *attr = attribute_names[i]; |
| 3655 | |
| 3656 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr, "href") == 0) |
| 3657 | uri = attribute_values[i]; |
| 3658 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr, "title") == 0) |
| 3659 | title = attribute_values[i]; |
| 3660 | else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (attr, "class") == 0) |
| 3661 | class = attribute_values[i]; |
| 3662 | else |
| 3663 | { |
| 3664 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, |
| 3665 | G_MARKUP_ERRORcxx . . $ `<external>/3876300978290409103/gmarkup.h:72:9`!, |
| 3666 | G_MARKUP_ERROR_UNKNOWN_ATTRIBUTEcxx . . $ G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE., |
| 3667 | "Attribute '%s' is not allowed on the <a> tag " |
| 3668 | "on line %d char %d", |
| 3669 | attr, line_number, char_number); |
| 3670 | return; |
| 3671 | } |
| 3672 | } |
| 3673 | |
| 3674 | if (uri == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3675 | { |
| 3676 | g_set_errorcxx . . $ g_set_error(ca0c191bc68fc328). (error, |
| 3677 | G_MARKUP_ERRORcxx . . $ `<external>/3876300978290409103/gmarkup.h:72:9`!, |
| 3678 | G_MARKUP_ERROR_INVALID_CONTENTcxx . . $ G_MARKUP_ERROR_INVALID_CONTENT., |
| 3679 | "Attribute 'href' was missing on the <a> tag " |
| 3680 | "on line %d char %d", |
| 3681 | line_number, char_number); |
| 3682 | return; |
| 3683 | } |
| 3684 | |
| 3685 | visited = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3686 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 3687 | { |
| 3688 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 3689 | { |
| 3690 | const GtkLabelLinkcxx . . $ GtkLabelLink# *l = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 3691 | |
| 3692 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (uri, l->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri.) == 0) |
| 3693 | { |
| 3694 | visited = l->visitedcxx . . $ $anonymous_type_52cf8198354a9553_0#visited.; |
| 3695 | break; |
| 3696 | } |
| 3697 | } |
| 3698 | } |
| 3699 | |
| 3700 | if (!pdata->linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links.) |
| 3701 | { |
| 3702 | pdata->linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links. = g_array_newcxx . . $ g_array_new(fe898421933afc00). (FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, sizeof (GtkLabelLinkcxx . . $ GtkLabelLink#)); |
| 3703 | g_array_set_clear_funccxx . . $ g_array_set_clear_func(231326da27099c95). (pdata->linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links., clear_label_linkcxx . . $ clear_label_link(5d22bdacc48458e8).); |
| 3704 | } |
| 3705 | |
| 3706 | link.uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (uri); |
| 3707 | link.titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (title); |
| 3708 | link.accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3709 | |
| 3710 | widget_node = gtk_widget_get_css_nodecxx . . $ gtk_widget_get_css_node(e7b0819f4c134bd6). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (pdata->label)); |
| 3711 | link.cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode. = gtk_css_node_newcxx . . $ gtk_css_node_new(e224e8bde524454e). (); |
| 3712 | |
| 3713 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (link.cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode., g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("link")); |
| 3714 | gtk_css_node_set_parentcxx . . $ gtk_css_node_set_parent(cf2c49e3ac800954). (link.cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode., widget_node); |
| 3715 | if (class) |
| 3716 | gtk_css_node_add_classcxx . . $ gtk_css_node_add_class(232e7a68103302e0). (link.cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode., g_quark_from_stringcxx . . $ g_quark_from_string(c61c63047ce273de). (class)); |
| 3717 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (link.cssnode, "style-changed", G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (link_style_changed_cb), self); |
| 3718 | |
| 3719 | state = gtk_css_node_get_statecxx . . $ gtk_css_node_get_state(87b66d9f17380d4). (widget_node); |
| 3720 | if (visited) |
| 3721 | state |= GTK_STATE_FLAG_VISITEDcxx . . $ GTK_STATE_FLAG_VISITED.; |
| 3722 | else |
| 3723 | state |= GTK_STATE_FLAG_LINKcxx . . $ GTK_STATE_FLAG_LINK.; |
| 3724 | gtk_css_node_set_statecxx . . $ gtk_css_node_set_state(98eae1fca7a7008b). (link.cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode., state); |
| 3725 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (link.cssnodecxx . . $ $anonymous_type_52cf8198354a9553_0#cssnode.); |
| 3726 | |
| 3727 | link.visitedcxx . . $ $anonymous_type_52cf8198354a9553_0#visited. = visited; |
| 3728 | link.startcxx . . $ $anonymous_type_52cf8198354a9553_0#start. = pdata->text_lencxx . . $ $anonymous_type_52cf8198354a9553_3#text_len.; |
| 3729 | g_array_append_valcxx . . $ `<external>/13165152102340786875/garray.h:66:9`! (pdata->links, link); |
| 3730 | } |
| 3731 | else |
| 3732 | { |
| 3733 | int i; |
| 3734 | |
| 3735 | g_string_append_ccxx . . $ `<external>/2906017559248664336/gstring.h:215:9`! (pdata->new_str, '<'); |
| 3736 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, element_name); |
| 3737 | |
| 3738 | for (i = 0; attribute_names[i] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; i++) |
| 3739 | { |
| 3740 | const char *attr = attribute_names[i]; |
| 3741 | const char *value = attribute_values[i]; |
| 3742 | char *newvalue; |
| 3743 | |
| 3744 | newvalue = g_markup_escape_textcxx . . $ g_markup_escape_text(a8ddf37f112087c3). (value, -1); |
| 3745 | |
| 3746 | g_string_append_ccxx . . $ `<external>/2906017559248664336/gstring.h:215:9`! (pdata->new_str, ' '); |
| 3747 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, attr); |
| 3748 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, "=\""); |
| 3749 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, newvalue); |
| 3750 | g_string_append_ccxx . . $ `<external>/2906017559248664336/gstring.h:215:9`! (pdata->new_str, '\"'); |
| 3751 | |
| 3752 | g_freecxx . . $ g_free(5d22bdacc48458e8). (newvalue); |
| 3753 | } |
| 3754 | g_string_append_ccxx . . $ `<external>/2906017559248664336/gstring.h:215:9`! (pdata->new_str, '>'); |
| 3755 | } |
| 3756 | } |
| 3757 | |
| 3758 | static void |
| 3759 | end_element_handlercxx . . $ end_element_handler(88c67377f91c666). (GMarkupParseContextcxx . . $ GMarkupParseContext# *context, |
| 3760 | const char *element_name, |
| 3761 | gpointercxx . . $ gpointer# user_data, |
| 3762 | GErrorcxx . . $ GError# **error) |
| 3763 | { |
| 3764 | UriParserDatacxx . . $ UriParserData# *pdata = user_data; |
| 3765 | |
| 3766 | finish_textcxx . . $ finish_text(654940bc20686533). (pdata); |
| 3767 | |
| 3768 | if (!strcmpcxx . . $ strcmp(5ae29d726ae57f88). (element_name, "a")) |
| 3769 | { |
| 3770 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = &g_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:69:9`! (pdata->links, GtkLabelLink, pdata->links->len - 1); |
| 3771 | |
| 3772 | link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end. = pdata->text_lencxx . . $ $anonymous_type_52cf8198354a9553_3#text_len.; |
| 3773 | } |
| 3774 | else |
| 3775 | { |
| 3776 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, "</"); |
| 3777 | g_string_appendcxx . . $ `<external>/2906017559248664336/gstring.h:270:9`! (pdata->new_str, element_name); |
| 3778 | g_string_append_ccxx . . $ `<external>/2906017559248664336/gstring.h:215:9`! (pdata->new_str, '>'); |
| 3779 | } |
| 3780 | } |
| 3781 | |
| 3782 | static void |
| 3783 | text_handlercxx . . $ text_handler(a4e7eccacb0cda8f). (GMarkupParseContextcxx . . $ GMarkupParseContext# *context, |
| 3784 | const char *text, |
| 3785 | gsizecxx . . $ gsize# text_len, |
| 3786 | gpointercxx . . $ gpointer# user_data, |
| 3787 | GErrorcxx . . $ GError# **error) |
| 3788 | { |
| 3789 | UriParserDatacxx . . $ UriParserData# *pdata = user_data; |
| 3790 | |
| 3791 | g_string_append_lencxx . . $ `<external>/2906017559248664336/gstring.h:252:9`! (pdata->text_data, text, text_len); |
| 3792 | } |
| 3793 | |
| 3794 | static const GMarkupParsercxx . . $ GMarkupParser# markup_parsercxx . . $ markup_parser. = |
| 3795 | { |
| 3796 | start_element_handlercxx . . $ start_element_handler(8107764f6935ef7e)., |
| 3797 | end_element_handlercxx . . $ end_element_handler(88c67377f91c666)., |
| 3798 | text_handlercxx . . $ text_handler(a4e7eccacb0cda8f)., |
| 3799 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 3800 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! |
| 3801 | }; |
| 3802 | |
| 3803 | static gbooleancxx . . $ gboolean# |
| 3804 | xml_isspacecxx . . $ xml_isspace(784f3405e7e545be). (char c) |
| 3805 | { |
| 3806 | return (c == ' ' || c == '\t' || c == '\n' || c == '\r'); |
| 3807 | } |
| 3808 | |
| 3809 | static gbooleancxx . . $ gboolean# |
| 3810 | parse_uri_markupcxx . . $ parse_uri_markup(f00896bfa8b77d5b). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3811 | const char *str, |
| 3812 | gbooleancxx . . $ gboolean# strip_ulines, |
| 3813 | gunicharcxx . . $ gunichar# *accel_key, |
| 3814 | char **new_str, |
| 3815 | GtkLabelLinkcxx . . $ GtkLabelLink# **links, |
| 3816 | guintcxx . . $ guint# *out_n_links, |
| 3817 | GErrorcxx . . $ GError# **error) |
| 3818 | { |
| 3819 | GMarkupParseContextcxx . . $ GMarkupParseContext# *context; |
| 3820 | const char *p, *end; |
| 3821 | gsizecxx . . $ gsize# length; |
| 3822 | UriParserDatacxx . . $ UriParserData# pdata; |
| 3823 | |
| 3824 | length = strlencxx . . $ strlen(751346f8406fd082). (str); |
| 3825 | p = str; |
| 3826 | end = str + length; |
| 3827 | |
| 3828 | pdata.labelcxx . . $ $anonymous_type_52cf8198354a9553_3#label. = self; |
| 3829 | pdata.linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3830 | pdata.new_strcxx . . $ $anonymous_type_52cf8198354a9553_3#new_str. = g_string_sized_newcxx . . $ g_string_sized_new(ee4460282f9a0309). (length); |
| 3831 | pdata.text_lencxx . . $ $anonymous_type_52cf8198354a9553_3#text_len. = 0; |
| 3832 | pdata.strip_ulinescxx . . $ $anonymous_type_52cf8198354a9553_3#strip_ulines. = strip_ulines; |
| 3833 | pdata.text_datacxx . . $ $anonymous_type_52cf8198354a9553_3#text_data. = g_string_newcxx . . $ g_string_new(e8737c02110bb79b). (""); |
| 3834 | pdata.accel_keycxx . . $ $anonymous_type_52cf8198354a9553_3#accel_key. = 0; |
| 3835 | |
| 3836 | while (p != end && xml_isspacecxx . . $ xml_isspace(784f3405e7e545be). (*p)) |
| 3837 | p++; |
| 3838 | |
| 3839 | context = g_markup_parse_context_newcxx . . $ g_markup_parse_context_new(bbd4b9d670618561). (&markup_parsercxx . . $ markup_parser., 0, &pdata, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3840 | |
| 3841 | if (end - p >= 8 && strncmpcxx . . $ strncmp(fd278af2f295fa2e). (p, "<markup>", 8) == 0) |
| 3842 | { |
| 3843 | if (!g_markup_parse_context_parsecxx . . $ g_markup_parse_context_parse(cec1c160dff461d8). (context, str, length, error)) |
| 3844 | goto failed; |
| 3845 | } |
| 3846 | else |
| 3847 | { |
| 3848 | if (!g_markup_parse_context_parsecxx . . $ g_markup_parse_context_parse(cec1c160dff461d8). (context, "<markup>", 8, error)) |
| 3849 | goto failed; |
| 3850 | |
| 3851 | if (!g_markup_parse_context_parsecxx . . $ g_markup_parse_context_parse(cec1c160dff461d8). (context, str, length, error)) |
| 3852 | goto failed; |
| 3853 | |
| 3854 | if (!g_markup_parse_context_parsecxx . . $ g_markup_parse_context_parse(cec1c160dff461d8). (context, "</markup>", 9, error)) |
| 3855 | goto failed; |
| 3856 | } |
| 3857 | |
| 3858 | if (!g_markup_parse_context_end_parsecxx . . $ g_markup_parse_context_end_parse(bf918b4b692b1a78). (context, error)) |
| 3859 | goto failed; |
| 3860 | |
| 3861 | g_markup_parse_context_freecxx . . $ g_markup_parse_context_free(b00266ed2919e4ce). (context); |
| 3862 | |
| 3863 | g_string_freecxx . . $ `<external>/2906017559248664336/gstring.h:73:9`! (pdata.text_data, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 3864 | |
| 3865 | *new_str = g_string_freecxx . . $ `<external>/2906017559248664336/gstring.h:73:9`! (pdata.new_str, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3866 | |
| 3867 | if (pdata.linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links.) |
| 3868 | { |
| 3869 | *out_n_links = pdata.linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links.->lencxx . . $ _GArray#len.; |
| 3870 | *links = (GtkLabelLinkcxx . . $ GtkLabelLink# *)g_array_freecxx . . $ g_array_free(59928813d5e6bdfc). (pdata.linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links., FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3871 | } |
| 3872 | else |
| 3873 | { |
| 3874 | *links = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3875 | } |
| 3876 | |
| 3877 | if (accel_key) |
| 3878 | *accel_key = pdata.accel_keycxx . . $ $anonymous_type_52cf8198354a9553_3#accel_key.; |
| 3879 | |
| 3880 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 3881 | |
| 3882 | failed: |
| 3883 | g_markup_parse_context_freecxx . . $ g_markup_parse_context_free(b00266ed2919e4ce). (context); |
| 3884 | g_string_freecxx . . $ `<external>/2906017559248664336/gstring.h:73:9`! (pdata.new_str, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 3885 | |
| 3886 | if (pdata.linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links.) |
| 3887 | g_array_freecxx . . $ g_array_free(59928813d5e6bdfc). (pdata.linkscxx . . $ $anonymous_type_52cf8198354a9553_3#links., TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 3888 | |
| 3889 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3890 | } |
| 3891 | |
| 3892 | static void |
| 3893 | gtk_label_ensure_has_tooltipcxx . . $ gtk_label_ensure_has_tooltip(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 3894 | { |
| 3895 | guintcxx . . $ guint# i; |
| 3896 | gbooleancxx . . $ gboolean# has_tooltip = gtk_widget_get_has_tooltipcxx . . $ gtk_widget_get_has_tooltip(9247ef2dc26c5426).(GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`!(self)); |
| 3897 | |
| 3898 | if (has_tooltip) { |
| 3899 | return; |
| 3900 | } |
| 3901 | |
| 3902 | for (i = 0; i < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; i++) |
| 3903 | { |
| 3904 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[i]; |
| 3905 | |
| 3906 | if (link->titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title.) |
| 3907 | { |
| 3908 | has_tooltip = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 3909 | break; |
| 3910 | } |
| 3911 | } |
| 3912 | |
| 3913 | gtk_widget_set_has_tooltipcxx . . $ gtk_widget_set_has_tooltip(81f145f668a0074f). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), has_tooltip); |
| 3914 | } |
| 3915 | |
| 3916 | static void |
| 3917 | gtk_label_set_markup_internalcxx . . $ gtk_label_set_markup_internal(12f10c424a963dfd). (GtkLabelcxx . . $ GtkLabel# *self, |
| 3918 | const char *str, |
| 3919 | gbooleancxx . . $ gboolean# with_uline) |
| 3920 | { |
| 3921 | char *text = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3922 | GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3923 | PangoAttrListcxx . . $ PangoAttrList# *attrs = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3924 | char *str_for_display = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3925 | GtkLabelLinkcxx . . $ GtkLabelLink# *links = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3926 | guintcxx . . $ guint# n_links = 0; |
| 3927 | gunicharcxx . . $ gunichar# accel_keyval = 0; |
| 3928 | gbooleancxx . . $ gboolean# do_mnemonics; |
| 3929 | |
| 3930 | do_mnemonics = self->mnemonics_visiblecxx . . $ _GtkLabel#mnemonics_visible. && |
| 3931 | gtk_widget_is_sensitivecxx . . $ gtk_widget_is_sensitive(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)) && |
| 3932 | (!self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget. || gtk_widget_is_sensitivecxx . . $ gtk_widget_is_sensitive(9247ef2dc26c5426). (self->mnemonic_widgetcxx . . $ _GtkLabel#mnemonic_widget.)); |
| 3933 | |
| 3934 | if (!parse_uri_markupcxx . . $ parse_uri_markup(f00896bfa8b77d5b). (self, str, |
| 3935 | with_uline && !do_mnemonics, |
| 3936 | &accel_keyval, |
| 3937 | &str_for_display, |
| 3938 | &links, &n_links, |
| 3939 | &error)) |
| 3940 | goto error_set; |
| 3941 | |
| 3942 | if (links) |
| 3943 | { |
| 3944 | gtk_label_ensure_select_infocxx . . $ gtk_label_ensure_select_info(e9c0e7bdc16b978e). (self); |
| 3945 | self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links. = g_steal_pointercxx . . $ `<external>/1123956534522462559/gmem.h:250:9`! (&links); |
| 3946 | self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links. = n_links; |
| 3947 | gtk_label_ensure_has_tooltipcxx . . $ gtk_label_ensure_has_tooltip(e9c0e7bdc16b978e). (self); |
| 3948 | gtk_widget_add_css_classcxx . . $ gtk_widget_add_css_class(3e0616a87a6c51e5). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), "link"); |
| 3949 | } |
| 3950 | |
| 3951 | if (!pango_parse_markupcxx . . $ pango_parse_markup(f9f004ffc964b354). (str_for_display, -1, |
| 3952 | with_uline && do_mnemonics ? '_' : 0, |
| 3953 | &attrs, &text, |
| 3954 | with_uline && do_mnemonics ? &accel_keyval : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 3955 | &error)) |
| 3956 | goto error_set; |
| 3957 | |
| 3958 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str_for_display); |
| 3959 | |
| 3960 | if (text) |
| 3961 | gtk_label_set_text_internalcxx . . $ gtk_label_set_text_internal(9aff2537204fd333). (self, text); |
| 3962 | |
| 3963 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->markup_attrs, pango_attr_list_unref); |
| 3964 | self->markup_attrscxx . . $ _GtkLabel#markup_attrs. = attrs; |
| 3965 | |
| 3966 | self->mnemonic_keyvalcxx . . $ _GtkLabel#mnemonic_keyval. = accel_keyval ? accel_keyval : GDK_KEY_VoidSymbolcxx . . $ `gdk/gdkkeysyms.h:31:9`!; |
| 3967 | |
| 3968 | return; |
| 3969 | |
| 3970 | error_set: |
| 3971 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Failed to set text '%s' from markup due to error parsing markup: %s", |
| 3972 | str, error->message); |
| 3973 | g_error_freecxx . . $ g_error_free(2ff7d11a2ecc01bd). (error); |
| 3974 | |
| 3975 | } |
| 3976 | |
| 3977 | /** |
| 3978 | * gtk_label_set_markup: |
| 3979 | * @self: a label |
| 3980 | * @str: the markup string |
| 3981 | * |
| 3982 | * Sets the labels text and attributes from markup. |
| 3983 | * |
| 3984 | * The string must be marked up with Pango markup |
| 3985 | * (see [[email protected]_markup]). |
| 3986 | * |
| 3987 | * If @str is external data, you may need to escape it |
| 3988 | * with [[email protected]_escape_text] or [[email protected]_printf_escaped]: |
| 3989 | * |
| 3990 | * ```c |
| 3991 | * GtkWidget *self = gtk_label_new (NULL); |
| 3992 | * const char *str = "..."; |
| 3993 | * const char *format = "<span style=\"italic\">\%s</span>"; |
| 3994 | * char *markup; |
| 3995 | * |
| 3996 | * markup = g_markup_printf_escaped (format, str); |
| 3997 | * gtk_label_set_markup (GTK_LABEL (self), markup); |
| 3998 | * g_free (markup); |
| 3999 | * ``` |
| 4000 | * |
| 4001 | * This function sets the [[email protected]:use-markup] property |
| 4002 | * to true. |
| 4003 | * |
| 4004 | * Also see [[email protected]_text]. |
| 4005 | */ |
| 4006 | void |
| 4007 | gtk_label_set_markupcxx . . $ gtk_label_set_markup(3d016a7109913fca). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4008 | const char *str) |
| 4009 | { |
| 4010 | gbooleancxx . . $ gboolean# changed; |
| 4011 | |
| 4012 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4013 | |
| 4014 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 4015 | |
| 4016 | changed = gtk_label_set_label_internalcxx . . $ gtk_label_set_label_internal(20045daa3ee49671). (self, str); |
| 4017 | changed = gtk_label_set_use_markup_internalcxx . . $ gtk_label_set_use_markup_internal(7d3bc1c500b2b3a9). (self, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!) || changed; |
| 4018 | changed = gtk_label_set_use_underline_internalcxx . . $ gtk_label_set_use_underline_internal(7d3bc1c500b2b3a9). (self, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) || changed; |
| 4019 | |
| 4020 | if (changed) |
| 4021 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 4022 | |
| 4023 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 4024 | } |
| 4025 | |
| 4026 | /** |
| 4027 | * gtk_label_set_markup_with_mnemonic: |
| 4028 | * @self: a label |
| 4029 | * @str: the markup string |
| 4030 | * |
| 4031 | * Sets the labels text, attributes and mnemonic from markup. |
| 4032 | * |
| 4033 | * Parses @str which is marked up with Pango markup (see [[email protected]_markup]), |
| 4034 | * setting the label’s text and attribute list based on the parse results. |
| 4035 | * If characters in @str are preceded by an underscore, they are underlined |
| 4036 | * indicating that they represent a keyboard accelerator called a mnemonic. |
| 4037 | * |
| 4038 | * The mnemonic key can be used to activate another widget, chosen |
| 4039 | * automatically, or explicitly using [[email protected]_mnemonic_widget]. |
| 4040 | */ |
| 4041 | void |
| 4042 | gtk_label_set_markup_with_mnemoniccxx . . $ gtk_label_set_markup_with_mnemonic(3d016a7109913fca). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4043 | const char *str) |
| 4044 | { |
| 4045 | gbooleancxx . . $ gboolean# changed; |
| 4046 | |
| 4047 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4048 | |
| 4049 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 4050 | |
| 4051 | changed = gtk_label_set_label_internalcxx . . $ gtk_label_set_label_internal(20045daa3ee49671). (self, str); |
| 4052 | changed = gtk_label_set_use_markup_internalcxx . . $ gtk_label_set_use_markup_internal(7d3bc1c500b2b3a9). (self, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!) || changed; |
| 4053 | changed = gtk_label_set_use_underline_internalcxx . . $ gtk_label_set_use_underline_internal(7d3bc1c500b2b3a9). (self, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!) || changed; |
| 4054 | |
| 4055 | if (changed) |
| 4056 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 4057 | |
| 4058 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 4059 | } |
| 4060 | |
| 4061 | /** |
| 4062 | * gtk_label_get_text: |
| 4063 | * @self: a label |
| 4064 | * |
| 4065 | * Gets the text of the label. |
| 4066 | * |
| 4067 | * The returned text is as it appears on screen. This does not include |
| 4068 | * any embedded underlines indicating mnemonics or Pango markup. (See |
| 4069 | * [[email protected]_label]) |
| 4070 | * |
| 4071 | * Returns: the text in the label widget |
| 4072 | **/ |
| 4073 | const char * |
| 4074 | gtk_label_get_textcxx . . $ gtk_label_get_text(204bfb80200b298b). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4075 | { |
| 4076 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4077 | |
| 4078 | return self->textcxx . . $ _GtkLabel#text.; |
| 4079 | } |
| 4080 | |
| 4081 | /** |
| 4082 | * gtk_label_set_justify: |
| 4083 | * @self: a label |
| 4084 | * @jtype: the new justification |
| 4085 | * |
| 4086 | * Sets the alignment of lines in the label relative to each other. |
| 4087 | * |
| 4088 | * This function has no effect on labels containing only a single line. |
| 4089 | * |
| 4090 | * [[email protected]] is the default value when the widget |
| 4091 | * is first created with [[email protected]]. |
| 4092 | * |
| 4093 | * If you instead want to set the alignment of the label as a whole, |
| 4094 | * use [[email protected]_halign] instead. |
| 4095 | */ |
| 4096 | void |
| 4097 | gtk_label_set_justifycxx . . $ gtk_label_set_justify(3d0fd43de82dcdc6). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4098 | GtkJustificationcxx . . $ GtkJustification# jtype) |
| 4099 | { |
| 4100 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4101 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (jtype >= GTK_JUSTIFY_LEFT && jtype <= GTK_JUSTIFY_FILL); |
| 4102 | |
| 4103 | if ((GtkJustificationcxx . . $ GtkJustification#) self->jtypecxx . . $ _GtkLabel#jtype. != jtype) |
| 4104 | { |
| 4105 | self->jtypecxx . . $ _GtkLabel#jtype. = jtype; |
| 4106 | |
| 4107 | /* No real need to be this drastic, but easier than duplicating the code */ |
| 4108 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 4109 | |
| 4110 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_JUSTIFYcxx . . $ PROP_JUSTIFY.]); |
| 4111 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4112 | } |
| 4113 | } |
| 4114 | |
| 4115 | /** |
| 4116 | * gtk_label_get_justify: |
| 4117 | * @self: a label |
| 4118 | * |
| 4119 | * Returns the justification of the label. |
| 4120 | * |
| 4121 | * See [[email protected]_justify]. |
| 4122 | * |
| 4123 | * Returns: the justification value |
| 4124 | **/ |
| 4125 | GtkJustificationcxx . . $ GtkJustification# |
| 4126 | gtk_label_get_justifycxx . . $ gtk_label_get_justify(a875b5a2e1a94228). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4127 | { |
| 4128 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), 0); |
| 4129 | |
| 4130 | return self->jtypecxx . . $ _GtkLabel#jtype.; |
| 4131 | } |
| 4132 | |
| 4133 | /** |
| 4134 | * gtk_label_set_ellipsize: |
| 4135 | * @self: a label |
| 4136 | * @mode: the ellipsization mode |
| 4137 | * |
| 4138 | * Sets the mode used to ellipsize the text. |
| 4139 | * |
| 4140 | * The text will be ellipsized if there is not |
| 4141 | * enough space to render the entire string. |
| 4142 | */ |
| 4143 | void |
| 4144 | gtk_label_set_ellipsizecxx . . $ gtk_label_set_ellipsize(671bf0a445f46a82). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4145 | PangoEllipsizeModecxx . . $ PangoEllipsizeMode# mode) |
| 4146 | { |
| 4147 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4148 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (mode >= PANGO_ELLIPSIZE_NONE && mode <= PANGO_ELLIPSIZE_END); |
| 4149 | |
| 4150 | if ((PangoEllipsizeModecxx . . $ PangoEllipsizeMode#) self->ellipsizecxx . . $ _GtkLabel#ellipsize. != mode) |
| 4151 | { |
| 4152 | self->ellipsizecxx . . $ _GtkLabel#ellipsize. = mode; |
| 4153 | |
| 4154 | /* No real need to be this drastic, but easier than duplicating the code */ |
| 4155 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 4156 | |
| 4157 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_ELLIPSIZEcxx . . $ PROP_ELLIPSIZE.]); |
| 4158 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4159 | } |
| 4160 | } |
| 4161 | |
| 4162 | /** |
| 4163 | * gtk_label_get_ellipsize: |
| 4164 | * @self: a label |
| 4165 | * |
| 4166 | * Returns the ellipsization mode of the label. |
| 4167 | * |
| 4168 | * See [[email protected]_ellipsize]. |
| 4169 | * |
| 4170 | * Returns: the ellipsization mode |
| 4171 | **/ |
| 4172 | PangoEllipsizeModecxx . . $ PangoEllipsizeMode# |
| 4173 | gtk_label_get_ellipsizecxx . . $ gtk_label_get_ellipsize(24d41779ba21f4a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4174 | { |
| 4175 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), PANGO_ELLIPSIZE_NONE); |
| 4176 | |
| 4177 | return self->ellipsizecxx . . $ _GtkLabel#ellipsize.; |
| 4178 | } |
| 4179 | |
| 4180 | /** |
| 4181 | * gtk_label_set_width_chars: |
| 4182 | * @self: a label |
| 4183 | * @n_chars: the new desired width, in characters. |
| 4184 | * |
| 4185 | * Sets the desired width in characters of the label. |
| 4186 | */ |
| 4187 | void |
| 4188 | gtk_label_set_width_charscxx . . $ gtk_label_set_width_chars(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4189 | int n_chars) |
| 4190 | { |
| 4191 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4192 | |
| 4193 | if (self->width_charscxx . . $ _GtkLabel#width_chars. != n_chars) |
| 4194 | { |
| 4195 | self->width_charscxx . . $ _GtkLabel#width_chars. = n_chars; |
| 4196 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_WIDTH_CHARScxx . . $ PROP_WIDTH_CHARS.]); |
| 4197 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4198 | } |
| 4199 | } |
| 4200 | |
| 4201 | /** |
| 4202 | * gtk_label_get_width_chars: |
| 4203 | * @self: a label |
| 4204 | * |
| 4205 | * Retrieves the desired width of the label in characters. |
| 4206 | * |
| 4207 | * See [[email protected]_width_chars]. |
| 4208 | * |
| 4209 | * Returns: the desired width of the label, in characters |
| 4210 | */ |
| 4211 | int |
| 4212 | gtk_label_get_width_charscxx . . $ gtk_label_get_width_chars(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4213 | { |
| 4214 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), -1); |
| 4215 | |
| 4216 | return self->width_charscxx . . $ _GtkLabel#width_chars.; |
| 4217 | } |
| 4218 | |
| 4219 | /** |
| 4220 | * gtk_label_set_max_width_chars: |
| 4221 | * @self: a label |
| 4222 | * @n_chars: the new maximum width, in characters. |
| 4223 | * |
| 4224 | * Sets the maximum width of the label in characters. |
| 4225 | */ |
| 4226 | void |
| 4227 | gtk_label_set_max_width_charscxx . . $ gtk_label_set_max_width_chars(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4228 | int n_chars) |
| 4229 | { |
| 4230 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4231 | |
| 4232 | if (self->max_width_charscxx . . $ _GtkLabel#max_width_chars. != n_chars) |
| 4233 | { |
| 4234 | self->max_width_charscxx . . $ _GtkLabel#max_width_chars. = n_chars; |
| 4235 | |
| 4236 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_MAX_WIDTH_CHARScxx . . $ PROP_MAX_WIDTH_CHARS.]); |
| 4237 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4238 | } |
| 4239 | } |
| 4240 | |
| 4241 | /** |
| 4242 | * gtk_label_get_max_width_chars: |
| 4243 | * @self: a label |
| 4244 | * |
| 4245 | * Retrieves the maximum width of the label in characters. |
| 4246 | * |
| 4247 | * See [[email protected]_width_chars]. |
| 4248 | * |
| 4249 | * Returns: the maximum width of the label, in characters |
| 4250 | **/ |
| 4251 | int |
| 4252 | gtk_label_get_max_width_charscxx . . $ gtk_label_get_max_width_chars(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4253 | { |
| 4254 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), -1); |
| 4255 | |
| 4256 | return self->max_width_charscxx . . $ _GtkLabel#max_width_chars.; |
| 4257 | } |
| 4258 | |
| 4259 | /** |
| 4260 | * gtk_label_set_wrap: |
| 4261 | * @self: a label |
| 4262 | * @wrap: whether to wrap lines |
| 4263 | * |
| 4264 | * Toggles line wrapping within the label. |
| 4265 | * |
| 4266 | * True makes it break lines if text exceeds the widget’s size. |
| 4267 | * false lets the text get cut off by the edge of the widget if |
| 4268 | * it exceeds the widget size. |
| 4269 | * |
| 4270 | * Note that setting line wrapping to true does not make the label |
| 4271 | * wrap at its parent widget’s width, because GTK widgets conceptually |
| 4272 | * can’t make their requisition depend on the parent widget’s size. |
| 4273 | * For a label that wraps at a specific position, set the label’s width |
| 4274 | * using [[email protected]_size_request]. |
| 4275 | */ |
| 4276 | void |
| 4277 | gtk_label_set_wrapcxx . . $ gtk_label_set_wrap(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4278 | gbooleancxx . . $ gboolean# wrap) |
| 4279 | { |
| 4280 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4281 | |
| 4282 | wrap = wrap != FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4283 | |
| 4284 | if (self->wrapcxx . . $ _GtkLabel#wrap. != wrap) |
| 4285 | { |
| 4286 | self->wrapcxx . . $ _GtkLabel#wrap. = wrap; |
| 4287 | |
| 4288 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 4289 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4290 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_WRAPcxx . . $ PROP_WRAP.]); |
| 4291 | } |
| 4292 | } |
| 4293 | |
| 4294 | /** |
| 4295 | * gtk_label_get_wrap: |
| 4296 | * @self: a label |
| 4297 | * |
| 4298 | * Returns whether lines in the label are automatically wrapped. |
| 4299 | * |
| 4300 | * See [[email protected]_wrap]. |
| 4301 | * |
| 4302 | * Returns: true if the lines of the label are automatically wrapped |
| 4303 | */ |
| 4304 | gbooleancxx . . $ gboolean# |
| 4305 | gtk_label_get_wrapcxx . . $ gtk_label_get_wrap(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4306 | { |
| 4307 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 4308 | |
| 4309 | return self->wrapcxx . . $ _GtkLabel#wrap.; |
| 4310 | } |
| 4311 | |
| 4312 | /** |
| 4313 | * gtk_label_set_wrap_mode: |
| 4314 | * @self: a label |
| 4315 | * @wrap_mode: the line wrapping mode |
| 4316 | * |
| 4317 | * Controls how line wrapping is done. |
| 4318 | * |
| 4319 | * This only affects the label if line wrapping is on. (See |
| 4320 | * [[email protected]_wrap]) |
| 4321 | * |
| 4322 | * The default is [[email protected]], which means |
| 4323 | * wrap on word boundaries. |
| 4324 | * |
| 4325 | * For sizing behavior, also consider the |
| 4326 | * [[email protected]:natural-wrap-mode] property. |
| 4327 | */ |
| 4328 | void |
| 4329 | gtk_label_set_wrap_modecxx . . $ gtk_label_set_wrap_mode(27c72e772b9f8576). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4330 | PangoWrapModecxx . . $ PangoWrapMode# wrap_mode) |
| 4331 | { |
| 4332 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4333 | |
| 4334 | if (self->wrap_modecxx . . $ _GtkLabel#wrap_mode. != wrap_mode) |
| 4335 | { |
| 4336 | self->wrap_modecxx . . $ _GtkLabel#wrap_mode. = wrap_mode; |
| 4337 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_WRAP_MODEcxx . . $ PROP_WRAP_MODE.]); |
| 4338 | |
| 4339 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 4340 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4341 | } |
| 4342 | } |
| 4343 | |
| 4344 | /** |
| 4345 | * gtk_label_get_wrap_mode: |
| 4346 | * @self: a label |
| 4347 | * |
| 4348 | * Returns line wrap mode used by the label. |
| 4349 | * |
| 4350 | * See [[email protected]_wrap_mode]. |
| 4351 | * |
| 4352 | * Returns: the line wrap mode |
| 4353 | */ |
| 4354 | PangoWrapModecxx . . $ PangoWrapMode# |
| 4355 | gtk_label_get_wrap_modecxx . . $ gtk_label_get_wrap_mode(d42a0b238d09b189). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4356 | { |
| 4357 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), PANGO_WRAP_WORD); |
| 4358 | |
| 4359 | return self->wrap_modecxx . . $ _GtkLabel#wrap_mode.; |
| 4360 | } |
| 4361 | |
| 4362 | /** |
| 4363 | * gtk_label_set_natural_wrap_mode: |
| 4364 | * @self: a label |
| 4365 | * @wrap_mode: the line wrapping mode |
| 4366 | * |
| 4367 | * Selects the line wrapping for the natural size request. |
| 4368 | * |
| 4369 | * This only affects the natural size requested, for the actual wrapping used, |
| 4370 | * see the [[email protected]:wrap-mode] property. |
| 4371 | * |
| 4372 | * Since: 4.6 |
| 4373 | */ |
| 4374 | void |
| 4375 | gtk_label_set_natural_wrap_modecxx . . $ gtk_label_set_natural_wrap_mode(551a546107157de7). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4376 | GtkNaturalWrapModecxx . . $ GtkNaturalWrapMode# wrap_mode) |
| 4377 | { |
| 4378 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4379 | |
| 4380 | if (self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. != wrap_mode) |
| 4381 | { |
| 4382 | self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode. = wrap_mode; |
| 4383 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_NATURAL_WRAP_MODEcxx . . $ PROP_NATURAL_WRAP_MODE.]); |
| 4384 | |
| 4385 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4386 | } |
| 4387 | } |
| 4388 | |
| 4389 | /** |
| 4390 | * gtk_label_get_natural_wrap_mode: |
| 4391 | * @self: a label |
| 4392 | * |
| 4393 | * Returns natural line wrap mode used by the label. |
| 4394 | * |
| 4395 | * See [[email protected]_natural_wrap_mode]. |
| 4396 | * |
| 4397 | * Returns: the natural line wrap mode |
| 4398 | * |
| 4399 | * Since: 4.6 |
| 4400 | */ |
| 4401 | GtkNaturalWrapModecxx . . $ GtkNaturalWrapMode# |
| 4402 | gtk_label_get_natural_wrap_modecxx . . $ gtk_label_get_natural_wrap_mode(630a9cdcb4409ff4). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4403 | { |
| 4404 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), GTK_NATURAL_WRAP_INHERIT); |
| 4405 | |
| 4406 | return self->natural_wrap_modecxx . . $ _GtkLabel#natural_wrap_mode.; |
| 4407 | } |
| 4408 | |
| 4409 | static void |
| 4410 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4411 | { |
| 4412 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->layout); |
| 4413 | } |
| 4414 | |
| 4415 | static void |
| 4416 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4417 | { |
| 4418 | PangoAlignmentcxx . . $ PangoAlignment# align; |
| 4419 | gbooleancxx . . $ gboolean# rtl; |
| 4420 | |
| 4421 | if (self->layoutcxx . . $ _GtkLabel#layout.) |
| 4422 | return; |
| 4423 | |
| 4424 | rtl = _gtk_widget_get_directioncxx . . $ _gtk_widget_get_direction(a6537c3bfdacec30). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)) == GTK_TEXT_DIR_RTLcxx . . $ GTK_TEXT_DIR_RTL.; |
| 4425 | self->layoutcxx . . $ _GtkLabel#layout. = gtk_widget_create_pango_layoutcxx . . $ gtk_widget_create_pango_layout(e1804973e9b72966). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), self->textcxx . . $ _GtkLabel#text.); |
| 4426 | |
| 4427 | gtk_label_update_layout_attributescxx . . $ gtk_label_update_layout_attributes(5f4d5ccde1b15dea). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4428 | |
| 4429 | switch (self->jtypecxx . . $ _GtkLabel#jtype.) |
| 4430 | { |
| 4431 | case GTK_JUSTIFY_LEFTcxx . . $ GTK_JUSTIFY_LEFT.: |
| 4432 | align = rtl ? PANGO_ALIGN_RIGHTcxx . . $ PANGO_ALIGN_RIGHT. : PANGO_ALIGN_LEFTcxx . . $ PANGO_ALIGN_LEFT.; |
| 4433 | break; |
| 4434 | case GTK_JUSTIFY_RIGHTcxx . . $ GTK_JUSTIFY_RIGHT.: |
| 4435 | align = rtl ? PANGO_ALIGN_LEFTcxx . . $ PANGO_ALIGN_LEFT. : PANGO_ALIGN_RIGHTcxx . . $ PANGO_ALIGN_RIGHT.; |
| 4436 | break; |
| 4437 | case GTK_JUSTIFY_CENTERcxx . . $ GTK_JUSTIFY_CENTER.: |
| 4438 | align = PANGO_ALIGN_CENTERcxx . . $ PANGO_ALIGN_CENTER.; |
| 4439 | break; |
| 4440 | case GTK_JUSTIFY_FILLcxx . . $ GTK_JUSTIFY_FILL.: |
| 4441 | align = rtl ? PANGO_ALIGN_RIGHTcxx . . $ PANGO_ALIGN_RIGHT. : PANGO_ALIGN_LEFTcxx . . $ PANGO_ALIGN_LEFT.; |
| 4442 | pango_layout_set_justifycxx . . $ pango_layout_set_justify(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 4443 | break; |
| 4444 | default: |
| 4445 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`!(); |
| 4446 | } |
| 4447 | |
| 4448 | pango_layout_set_alignmentcxx . . $ pango_layout_set_alignment(ce52377b35eb0c94). (self->layoutcxx . . $ _GtkLabel#layout., align); |
| 4449 | pango_layout_set_ellipsizecxx . . $ pango_layout_set_ellipsize(f91af10e808ea17f). (self->layoutcxx . . $ _GtkLabel#layout., self->ellipsizecxx . . $ _GtkLabel#ellipsize.); |
| 4450 | pango_layout_set_wrapcxx . . $ pango_layout_set_wrap(1c7526d419bcfe09). (self->layoutcxx . . $ _GtkLabel#layout., self->wrap_modecxx . . $ _GtkLabel#wrap_mode.); |
| 4451 | pango_layout_set_single_paragraph_modecxx . . $ pango_layout_set_single_paragraph_mode(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., self->single_line_modecxx . . $ _GtkLabel#single_line_mode.); |
| 4452 | if (self->linescxx . . $ _GtkLabel#lines. > 0) |
| 4453 | pango_layout_set_heightcxx . . $ pango_layout_set_height(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., - self->linescxx . . $ _GtkLabel#lines.); |
| 4454 | |
| 4455 | if (self->ellipsizecxx . . $ _GtkLabel#ellipsize. || self->wrapcxx . . $ _GtkLabel#wrap.) |
| 4456 | pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (self->layoutcxx . . $ _GtkLabel#layout., gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)) * PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!); |
| 4457 | |
| 4458 | pango_layout_set_tabscxx . . $ pango_layout_set_tabs(d916d107921f868e). (self->layoutcxx . . $ _GtkLabel#layout., self->tabscxx . . $ _GtkLabel#tabs.); |
| 4459 | } |
| 4460 | |
| 4461 | /** |
| 4462 | * gtk_label_set_text_with_mnemonic: |
| 4463 | * @self: a label |
| 4464 | * @str: the text |
| 4465 | * |
| 4466 | * Sets the text for the label, with mnemonics. |
| 4467 | * |
| 4468 | * If characters in @str are preceded by an underscore, they are underlined |
| 4469 | * indicating that they represent a keyboard accelerator called a mnemonic. |
| 4470 | * The mnemonic key can be used to activate another widget, chosen |
| 4471 | * automatically, or explicitly using [[email protected]_mnemonic_widget]. |
| 4472 | */ |
| 4473 | void |
| 4474 | gtk_label_set_text_with_mnemoniccxx . . $ gtk_label_set_text_with_mnemonic(3d016a7109913fca). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4475 | const char *str) |
| 4476 | { |
| 4477 | gbooleancxx . . $ gboolean# changed; |
| 4478 | |
| 4479 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 4480 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (str != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4481 | |
| 4482 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 4483 | |
| 4484 | changed = gtk_label_set_label_internalcxx . . $ gtk_label_set_label_internal(20045daa3ee49671). (self, str); |
| 4485 | changed = gtk_label_set_use_markup_internalcxx . . $ gtk_label_set_use_markup_internal(7d3bc1c500b2b3a9). (self, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) || changed; |
| 4486 | changed = gtk_label_set_use_underline_internalcxx . . $ gtk_label_set_use_underline_internal(7d3bc1c500b2b3a9). (self, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!) || changed; |
| 4487 | |
| 4488 | if (changed) |
| 4489 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 4490 | |
| 4491 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 4492 | } |
| 4493 | |
| 4494 | static int |
| 4495 | gtk_label_move_forward_wordcxx . . $ gtk_label_move_forward_word(7d3bc1c500b2b3a9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4496 | int start) |
| 4497 | { |
| 4498 | int new_pos = g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (self->textcxx . . $ _GtkLabel#text., self->textcxx . . $ _GtkLabel#text. + start); |
| 4499 | int length; |
| 4500 | |
| 4501 | length = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (self->textcxx . . $ _GtkLabel#text., -1); |
| 4502 | if (new_pos < length) |
| 4503 | { |
| 4504 | const PangoLogAttrcxx . . $ PangoLogAttr# *log_attrs; |
| 4505 | int n_attrs; |
| 4506 | |
| 4507 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 4508 | |
| 4509 | log_attrs = pango_layout_get_log_attrs_readonlycxx . . $ pango_layout_get_log_attrs_readonly(8a9afc2b5af67c16). (self->layoutcxx . . $ _GtkLabel#layout., &n_attrs); |
| 4510 | |
| 4511 | /* Find the next word end */ |
| 4512 | new_pos++; |
| 4513 | while (new_pos < n_attrs && !log_attrs[new_pos].is_word_endcxx . . $ _PangoLogAttr#is_word_end.) |
| 4514 | new_pos++; |
| 4515 | } |
| 4516 | |
| 4517 | return g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (self->textcxx . . $ _GtkLabel#text., new_pos) - self->textcxx . . $ _GtkLabel#text.; |
| 4518 | } |
| 4519 | |
| 4520 | static int |
| 4521 | gtk_label_move_backward_wordcxx . . $ gtk_label_move_backward_word(7d3bc1c500b2b3a9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 4522 | int start) |
| 4523 | { |
| 4524 | int new_pos = g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (self->textcxx . . $ _GtkLabel#text., self->textcxx . . $ _GtkLabel#text. + start); |
| 4525 | |
| 4526 | if (new_pos > 0) |
| 4527 | { |
| 4528 | const PangoLogAttrcxx . . $ PangoLogAttr# *log_attrs; |
| 4529 | int n_attrs; |
| 4530 | |
| 4531 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 4532 | |
| 4533 | log_attrs = pango_layout_get_log_attrs_readonlycxx . . $ pango_layout_get_log_attrs_readonly(8a9afc2b5af67c16). (self->layoutcxx . . $ _GtkLabel#layout., &n_attrs); |
| 4534 | |
| 4535 | new_pos -= 1; |
| 4536 | |
| 4537 | /* Find the previous word beginning */ |
| 4538 | while (new_pos > 0 && !log_attrs[new_pos].is_word_startcxx . . $ _PangoLogAttr#is_word_start.) |
| 4539 | new_pos--; |
| 4540 | } |
| 4541 | |
| 4542 | return g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (self->textcxx . . $ _GtkLabel#text., new_pos) - self->textcxx . . $ _GtkLabel#text.; |
| 4543 | } |
| 4544 | |
| 4545 | static void |
| 4546 | gtk_label_select_wordcxx . . $ gtk_label_select_word(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4547 | { |
| 4548 | int min, max; |
| 4549 | |
| 4550 | int start_index = gtk_label_move_backward_wordcxx . . $ gtk_label_move_backward_word(7d3bc1c500b2b3a9). (self, self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.); |
| 4551 | int end_index = gtk_label_move_forward_wordcxx . . $ gtk_label_move_forward_word(7d3bc1c500b2b3a9). (self, self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.); |
| 4552 | |
| 4553 | min = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (self->select_info->selection_anchor, |
| 4554 | self->select_info->selection_end); |
| 4555 | max = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->select_info->selection_anchor, |
| 4556 | self->select_info->selection_end); |
| 4557 | |
| 4558 | min = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (min, start_index); |
| 4559 | max = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (max, end_index); |
| 4560 | |
| 4561 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, min, max); |
| 4562 | } |
| 4563 | |
| 4564 | static void |
| 4565 | gtk_label_click_gesture_pressedcxx . . $ gtk_label_click_gesture_pressed(cdfb3579e3a5b456). (GtkGestureClickcxx . . $ GtkGestureClick# *gesture, |
| 4566 | int n_press, |
| 4567 | double widget_x, |
| 4568 | double widget_y, |
| 4569 | GtkLabelcxx . . $ GtkLabel# *self) |
| 4570 | { |
| 4571 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 4572 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 4573 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 4574 | GdkEventcxx . . $ GdkEvent# *event; |
| 4575 | guintcxx . . $ guint# button; |
| 4576 | |
| 4577 | button = gtk_gesture_single_get_current_buttoncxx . . $ gtk_gesture_single_get_current_button(421c170ebfc922c4). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (gesture)); |
| 4578 | sequence = gtk_gesture_single_get_current_sequencecxx . . $ gtk_gesture_single_get_current_sequence(eacc6d2458a1513d). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (gesture)); |
| 4579 | event = gtk_gesture_get_last_eventcxx . . $ gtk_gesture_get_last_event(bb392b7a95f5154a). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), sequence); |
| 4580 | gtk_label_update_active_linkcxx . . $ gtk_label_update_active_link(ef87130a2c0aa836). (widget, widget_x, widget_y); |
| 4581 | |
| 4582 | gtk_gesture_set_statecxx . . $ gtk_gesture_set_state(e8b82f7bdf7c1c23). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), GTK_EVENT_SEQUENCE_CLAIMEDcxx . . $ GTK_EVENT_SEQUENCE_CLAIMED.); |
| 4583 | |
| 4584 | if (info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.) |
| 4585 | { |
| 4586 | if (gdk_event_triggers_context_menucxx . . $ gdk_event_triggers_context_menu(c727dcafa855acc7). (event)) |
| 4587 | { |
| 4588 | info->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4589 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (self); |
| 4590 | gtk_label_do_popupcxx . . $ gtk_label_do_popup(51c7cb9c710cadb5). (self, widget_x, widget_y); |
| 4591 | return; |
| 4592 | } |
| 4593 | else if (button == GDK_BUTTON_PRIMARYcxx . . $ `gdk/gdkevents.h:83:9`!) |
| 4594 | { |
| 4595 | info->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4596 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (self); |
| 4597 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (widget); |
| 4598 | if (!info->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 4599 | return; |
| 4600 | } |
| 4601 | } |
| 4602 | |
| 4603 | if (!info->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 4604 | { |
| 4605 | gtk_gesture_set_statecxx . . $ gtk_gesture_set_state(e8b82f7bdf7c1c23). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.); |
| 4606 | return; |
| 4607 | } |
| 4608 | |
| 4609 | info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4610 | info->select_wordscxx . . $ _GtkLabelSelectionInfo#select_words. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4611 | |
| 4612 | if (gdk_event_triggers_context_menucxx . . $ gdk_event_triggers_context_menu(c727dcafa855acc7). (event)) |
| 4613 | gtk_label_do_popupcxx . . $ gtk_label_do_popup(51c7cb9c710cadb5). (self, widget_x, widget_y); |
| 4614 | else if (button == GDK_BUTTON_PRIMARYcxx . . $ `gdk/gdkevents.h:83:9`!) |
| 4615 | { |
| 4616 | if (!gtk_widget_has_focuscxx . . $ gtk_widget_has_focus(9247ef2dc26c5426). (widget)) |
| 4617 | { |
| 4618 | self->in_clickcxx . . $ _GtkLabel#in_click. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4619 | gtk_widget_grab_focuscxx . . $ gtk_widget_grab_focus(9247ef2dc26c5426). (widget); |
| 4620 | self->in_clickcxx . . $ _GtkLabel#in_click. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4621 | } |
| 4622 | |
| 4623 | if (n_press == 3) |
| 4624 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, 0, strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.)); |
| 4625 | else if (n_press == 2) |
| 4626 | { |
| 4627 | info->select_wordscxx . . $ _GtkLabelSelectionInfo#select_words. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4628 | gtk_label_select_wordcxx . . $ gtk_label_select_word(e9c0e7bdc16b978e). (self); |
| 4629 | } |
| 4630 | } |
| 4631 | else |
| 4632 | { |
| 4633 | gtk_gesture_set_statecxx . . $ gtk_gesture_set_state(e8b82f7bdf7c1c23). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.); |
| 4634 | return; |
| 4635 | } |
| 4636 | |
| 4637 | if (n_press >= 3) |
| 4638 | gtk_event_controller_resetcxx . . $ gtk_event_controller_reset(9b408ea79d359342). (GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (gesture)); |
| 4639 | } |
| 4640 | |
| 4641 | static void |
| 4642 | gtk_label_click_gesture_releasedcxx . . $ gtk_label_click_gesture_released(cdfb3579e3a5b456). (GtkGestureClickcxx . . $ GtkGestureClick# *gesture, |
| 4643 | int n_press, |
| 4644 | double x, |
| 4645 | double y, |
| 4646 | GtkLabelcxx . . $ GtkLabel# *self) |
| 4647 | { |
| 4648 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 4649 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 4650 | int index; |
| 4651 | |
| 4652 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4653 | return; |
| 4654 | |
| 4655 | sequence = gtk_gesture_single_get_current_sequencecxx . . $ gtk_gesture_single_get_current_sequence(eacc6d2458a1513d). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (gesture)); |
| 4656 | |
| 4657 | if (!gtk_gesture_handles_sequencecxx . . $ gtk_gesture_handles_sequence(6aa08b709753b55f). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), sequence)) |
| 4658 | return; |
| 4659 | |
| 4660 | if (n_press != 1) |
| 4661 | return; |
| 4662 | |
| 4663 | if (info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag.) |
| 4664 | { |
| 4665 | info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4666 | get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (self, x, y, &index); |
| 4667 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, index, index); |
| 4668 | } |
| 4669 | else if (info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. && |
| 4670 | info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. && |
| 4671 | info->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked.) |
| 4672 | { |
| 4673 | emit_activate_linkcxx . . $ emit_activate_link(50da53902840a995). (self, info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.); |
| 4674 | info->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4675 | } |
| 4676 | } |
| 4677 | |
| 4678 | static GdkPaintablecxx . . $ GdkPaintable# * |
| 4679 | get_selection_paintablecxx . . $ get_selection_paintable(c567328436397edb). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4680 | { |
| 4681 | if ((self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != |
| 4682 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) && |
| 4683 | self->textcxx . . $ _GtkLabel#text.) |
| 4684 | { |
| 4685 | int start, end; |
| 4686 | int len; |
| 4687 | |
| 4688 | start = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (self->select_info->selection_anchor, |
| 4689 | self->select_info->selection_end); |
| 4690 | end = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->select_info->selection_anchor, |
| 4691 | self->select_info->selection_end); |
| 4692 | |
| 4693 | len = strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.); |
| 4694 | |
| 4695 | if (end > len) |
| 4696 | end = len; |
| 4697 | |
| 4698 | if (start > len) |
| 4699 | start = len; |
| 4700 | |
| 4701 | return gtk_text_util_create_drag_iconcxx . . $ gtk_text_util_create_drag_icon(2064aaeef4701545). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), self->textcxx . . $ _GtkLabel#text. + start, end - start); |
| 4702 | } |
| 4703 | |
| 4704 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4705 | } |
| 4706 | |
| 4707 | static void |
| 4708 | gtk_label_drag_gesture_begincxx . . $ gtk_label_drag_gesture_begin(a732c07dab9b7938). (GtkGestureDragcxx . . $ GtkGestureDrag# *gesture, |
| 4709 | double start_x, |
| 4710 | double start_y, |
| 4711 | GtkLabelcxx . . $ GtkLabel# *self) |
| 4712 | { |
| 4713 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 4714 | GdkModifierTypecxx . . $ GdkModifierType# state_mask; |
| 4715 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 4716 | GdkEventcxx . . $ GdkEvent# *event; |
| 4717 | int min, max, index; |
| 4718 | |
| 4719 | if (!info || !info->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 4720 | { |
| 4721 | gtk_gesture_set_statecxx . . $ gtk_gesture_set_state(e8b82f7bdf7c1c23). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.); |
| 4722 | return; |
| 4723 | } |
| 4724 | |
| 4725 | get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (self, start_x, start_y, &index); |
| 4726 | min = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (info->selection_anchor, info->selection_end); |
| 4727 | max = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (info->selection_anchor, info->selection_end); |
| 4728 | |
| 4729 | sequence = gtk_gesture_single_get_current_sequencecxx . . $ gtk_gesture_single_get_current_sequence(eacc6d2458a1513d). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (gesture)); |
| 4730 | event = gtk_gesture_get_last_eventcxx . . $ gtk_gesture_get_last_event(bb392b7a95f5154a). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), sequence); |
| 4731 | state_mask = gdk_event_get_modifier_statecxx . . $ gdk_event_get_modifier_state(75c35027a2dedee4). (event); |
| 4732 | |
| 4733 | if ((info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) && |
| 4734 | ((state_mask & GDK_SHIFT_MASKcxx . . $ GDK_SHIFT_MASK.) != 0)) |
| 4735 | { |
| 4736 | if (index > min && index < max) |
| 4737 | { |
| 4738 | /* truncate selection, but keep it as big as possible */ |
| 4739 | if (index - min > max - index) |
| 4740 | max = index; |
| 4741 | else |
| 4742 | min = index; |
| 4743 | } |
| 4744 | else |
| 4745 | { |
| 4746 | /* extend (same as motion) */ |
| 4747 | min = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (min, index); |
| 4748 | max = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (max, index); |
| 4749 | } |
| 4750 | |
| 4751 | /* ensure the anchor is opposite index */ |
| 4752 | if (index == min) |
| 4753 | { |
| 4754 | int tmp = min; |
| 4755 | min = max; |
| 4756 | max = tmp; |
| 4757 | } |
| 4758 | |
| 4759 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, min, max); |
| 4760 | } |
| 4761 | else |
| 4762 | { |
| 4763 | if (min < max && min <= index && index <= max) |
| 4764 | { |
| 4765 | if (!info->select_wordscxx . . $ _GtkLabelSelectionInfo#select_words.) |
| 4766 | info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4767 | info->drag_start_xcxx . . $ _GtkLabelSelectionInfo#drag_start_x. = start_x; |
| 4768 | info->drag_start_ycxx . . $ _GtkLabelSelectionInfo#drag_start_y. = start_y; |
| 4769 | } |
| 4770 | else |
| 4771 | /* start a replacement */ |
| 4772 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, index, index); |
| 4773 | } |
| 4774 | } |
| 4775 | |
| 4776 | static void |
| 4777 | gtk_label_drag_gesture_updatecxx . . $ gtk_label_drag_gesture_update(a732c07dab9b7938). (GtkGestureDragcxx . . $ GtkGestureDrag# *gesture, |
| 4778 | double offset_x, |
| 4779 | double offset_y, |
| 4780 | GtkLabelcxx . . $ GtkLabel# *self) |
| 4781 | { |
| 4782 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 4783 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 4784 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 4785 | double x, y; |
| 4786 | int index; |
| 4787 | |
| 4788 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || !info->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 4789 | return; |
| 4790 | |
| 4791 | sequence = gtk_gesture_single_get_current_sequencecxx . . $ gtk_gesture_single_get_current_sequence(eacc6d2458a1513d). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (gesture)); |
| 4792 | gtk_gesture_get_pointcxx . . $ gtk_gesture_get_point(c2c448b15d15778f). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), sequence, &x, &y); |
| 4793 | |
| 4794 | if (info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag.) |
| 4795 | { |
| 4796 | if (gtk_drag_check_threshold_doublecxx . . $ gtk_drag_check_threshold_double(e6a6e33a050930d2). (widget, info->drag_start_xcxx . . $ _GtkLabelSelectionInfo#drag_start_x., info->drag_start_ycxx . . $ _GtkLabelSelectionInfo#drag_start_y., x, y)) |
| 4797 | { |
| 4798 | GdkDragcxx . . $ GdkDrag# *drag; |
| 4799 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 4800 | GdkDevicecxx . . $ GdkDevice# *device; |
| 4801 | |
| 4802 | surface = gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (widget)); |
| 4803 | device = gtk_gesture_get_devicecxx . . $ gtk_gesture_get_device(b8870bc3920be57d). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture)); |
| 4804 | |
| 4805 | drag = gdk_drag_begincxx . . $ gdk_drag_begin(59900c86f044f891). (surface, |
| 4806 | device, |
| 4807 | info->providercxx . . $ _GtkLabelSelectionInfo#provider., |
| 4808 | GDK_ACTION_COPYcxx . . $ GDK_ACTION_COPY., |
| 4809 | info->drag_start_xcxx . . $ _GtkLabelSelectionInfo#drag_start_x., |
| 4810 | info->drag_start_ycxx . . $ _GtkLabelSelectionInfo#drag_start_y.); |
| 4811 | |
| 4812 | gtk_drag_icon_set_from_paintablecxx . . $ gtk_drag_icon_set_from_paintable(26c3715d0bf2b78c). (drag, get_selection_paintablecxx . . $ get_selection_paintable(c567328436397edb). (self), 0, 0); |
| 4813 | |
| 4814 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (drag); |
| 4815 | info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4816 | } |
| 4817 | } |
| 4818 | else |
| 4819 | { |
| 4820 | get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (self, x, y, &index); |
| 4821 | |
| 4822 | if (index != info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.) |
| 4823 | gtk_gesture_set_statecxx . . $ gtk_gesture_set_state(e8b82f7bdf7c1c23). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (gesture), GTK_EVENT_SEQUENCE_CLAIMEDcxx . . $ GTK_EVENT_SEQUENCE_CLAIMED.); |
| 4824 | |
| 4825 | if (info->select_wordscxx . . $ _GtkLabelSelectionInfo#select_words.) |
| 4826 | { |
| 4827 | int min, max; |
| 4828 | int old_min, old_max; |
| 4829 | int anchor, end; |
| 4830 | |
| 4831 | min = gtk_label_move_backward_wordcxx . . $ gtk_label_move_backward_word(7d3bc1c500b2b3a9). (self, index); |
| 4832 | max = gtk_label_move_forward_wordcxx . . $ gtk_label_move_forward_word(7d3bc1c500b2b3a9). (self, index); |
| 4833 | |
| 4834 | anchor = info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.; |
| 4835 | end = info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.; |
| 4836 | |
| 4837 | old_min = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (anchor, end); |
| 4838 | old_max = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (anchor, end); |
| 4839 | |
| 4840 | if (min < old_min) |
| 4841 | { |
| 4842 | anchor = min; |
| 4843 | end = old_max; |
| 4844 | } |
| 4845 | else if (old_max < max) |
| 4846 | { |
| 4847 | anchor = max; |
| 4848 | end = old_min; |
| 4849 | } |
| 4850 | else if (anchor == old_min) |
| 4851 | { |
| 4852 | if (anchor != min) |
| 4853 | anchor = max; |
| 4854 | } |
| 4855 | else |
| 4856 | { |
| 4857 | if (anchor != max) |
| 4858 | anchor = min; |
| 4859 | } |
| 4860 | |
| 4861 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, anchor, end); |
| 4862 | } |
| 4863 | else |
| 4864 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor., index); |
| 4865 | } |
| 4866 | } |
| 4867 | |
| 4868 | static void |
| 4869 | gtk_label_update_actionscxx . . $ gtk_label_update_actions(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 4870 | { |
| 4871 | GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self); |
| 4872 | gbooleancxx . . $ gboolean# has_selection; |
| 4873 | GtkLabelLinkcxx . . $ GtkLabelLink# *link; |
| 4874 | |
| 4875 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 4876 | { |
| 4877 | has_selection = self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.; |
| 4878 | link = self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.; |
| 4879 | } |
| 4880 | else |
| 4881 | { |
| 4882 | has_selection = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4883 | link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4884 | } |
| 4885 | |
| 4886 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "clipboard.cut", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 4887 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "clipboard.copy", has_selection); |
| 4888 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "clipboard.paste", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 4889 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "selection.select-all", |
| 4890 | gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (self)); |
| 4891 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "selection.delete", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 4892 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "link.open", !has_selection && link); |
| 4893 | gtk_widget_action_set_enabledcxx . . $ gtk_widget_action_set_enabled(f8c30f6941c629db). (widget, "link.copy", !has_selection && link); |
| 4894 | } |
| 4895 | |
| 4896 | static void |
| 4897 | gtk_label_update_active_linkcxx . . $ gtk_label_update_active_link(ef87130a2c0aa836). (GtkWidgetcxx . . $ GtkWidget# *widget, |
| 4898 | double x, |
| 4899 | double y) |
| 4900 | { |
| 4901 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (widget); |
| 4902 | GtkLabelSelectionInfocxx . . $ GtkLabelSelectionInfo# *info = self->select_infocxx . . $ _GtkLabel#select_info.; |
| 4903 | int index; |
| 4904 | |
| 4905 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4906 | return; |
| 4907 | |
| 4908 | if (info->linkscxx . . $ _GtkLabelSelectionInfo#links. && !info->in_dragcxx . . $ _GtkLabelSelectionInfo#in_drag.) |
| 4909 | { |
| 4910 | GtkLabelLinkcxx . . $ GtkLabelLink# *link = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4911 | gbooleancxx . . $ gboolean# found = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4912 | |
| 4913 | if (info->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == info->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) |
| 4914 | { |
| 4915 | if (get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (self, x, y, &index)) |
| 4916 | { |
| 4917 | const int link_index = _gtk_label_get_link_atcxx . . $ _gtk_label_get_link_at(7d3bc1c500b2b3a9). (self, index); |
| 4918 | |
| 4919 | if (link_index != -1) |
| 4920 | { |
| 4921 | link = &info->linkscxx . . $ _GtkLabelSelectionInfo#links.[link_index]; |
| 4922 | |
| 4923 | if (!range_is_in_ellipsiscxx . . $ range_is_in_ellipsis(7e56390baa2555d). (self, link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start., link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end.)) |
| 4924 | found = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4925 | } |
| 4926 | } |
| 4927 | } |
| 4928 | |
| 4929 | if (found) |
| 4930 | { |
| 4931 | if (info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. != link) |
| 4932 | { |
| 4933 | info->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4934 | info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. = link; |
| 4935 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (self); |
| 4936 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (self); |
| 4937 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (widget); |
| 4938 | } |
| 4939 | } |
| 4940 | else |
| 4941 | { |
| 4942 | if (info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4943 | { |
| 4944 | info->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4945 | info->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4946 | update_link_statecxx . . $ update_link_state(e9c0e7bdc16b978e). (self); |
| 4947 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (self); |
| 4948 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (widget); |
| 4949 | } |
| 4950 | } |
| 4951 | |
| 4952 | gtk_label_update_actionscxx . . $ gtk_label_update_actions(e9c0e7bdc16b978e). (self); |
| 4953 | } |
| 4954 | } |
| 4955 | |
| 4956 | static void |
| 4957 | gtk_label_motioncxx . . $ gtk_label_motion(674966698813af7a). (GtkEventControllerMotioncxx . . $ GtkEventControllerMotion# *controller, |
| 4958 | double x, |
| 4959 | double y, |
| 4960 | gpointercxx . . $ gpointer# data) |
| 4961 | { |
| 4962 | gtk_label_update_active_linkcxx . . $ gtk_label_update_active_link(ef87130a2c0aa836). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (data), x, y); |
| 4963 | } |
| 4964 | |
| 4965 | static void |
| 4966 | gtk_label_leavecxx . . $ gtk_label_leave(34ec4c09045c886a). (GtkEventControllerMotioncxx . . $ GtkEventControllerMotion# *controller, |
| 4967 | gpointercxx . . $ gpointer# data) |
| 4968 | { |
| 4969 | GtkLabelcxx . . $ GtkLabel# *self = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (data); |
| 4970 | |
| 4971 | if (self->select_infocxx . . $ _GtkLabel#select_info.) |
| 4972 | { |
| 4973 | self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4974 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (self); |
| 4975 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 4976 | } |
| 4977 | } |
| 4978 | |
| 4979 | #define GTK_TYPE_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4979:9`! (gtk_label_content_get_type ()) |
| 4980 | #define GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`!(obj) (G_TYPE_CHECK_INSTANCE_CASTcxx . . $ `<external>/9567554376676449156/gtype.h:528:9`! ((obj), GTK_TYPE_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4979:9`!, GtkLabelContent)) |
| 4981 | #define GTK_IS_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4981:9`!(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LABEL_CONTENT)) |
| 4982 | #define GTK_LABEL_CONTENT_CLASScxx . . $ `gtk/gtklabel.c:4982:9`!(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LABEL_CONTENT, GtkLabelContentClass)) |
| 4983 | #define GTK_IS_LABEL_CONTENT_CLASScxx . . $ `gtk/gtklabel.c:4983:9`!(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LABEL_CONTENT)) |
| 4984 | #define GTK_LABEL_CONTENT_GET_CLASScxx . . $ `gtk/gtklabel.c:4984:9`!(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LABEL_CONTENT, GtkLabelContentClass)) |
| 4985 | |
| 4986 | typedef struct _GtkLabelContentcxx . . $ _GtkLabelContent# GtkLabelContentcxx . . $ GtkLabelContent#; |
| 4987 | typedef struct _GtkLabelContentClasscxx . . $ _GtkLabelContentClass# GtkLabelContentClasscxx . . $ GtkLabelContentClass#; |
| 4988 | |
| 4989 | struct _GtkLabelContentcxx . . $ _GtkLabelContent# |
| 4990 | { |
| 4991 | GdkContentProvidercxx . . $ GdkContentProvider# parentcxx . . $ _GtkLabelContent#parent.; |
| 4992 | |
| 4993 | GtkLabelcxx . . $ GtkLabel# *labelcxx . . $ _GtkLabelContent#label.; |
| 4994 | }; |
| 4995 | |
| 4996 | struct _GtkLabelContentClasscxx . . $ _GtkLabelContentClass# |
| 4997 | { |
| 4998 | GdkContentProviderClasscxx . . $ GdkContentProviderClass# parent_classcxx . . $ _GtkLabelContentClass#parent_class.; |
| 4999 | }; |
| 5000 | |
| 5001 | GTypecxx . . $ GType# gtk_label_content_get_typecxx . . $ gtk_label_content_get_type(f708dce9a8856c70). (void) G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!; |
| 5002 | |
| 5003 | G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GtkLabelContent, gtk_label_content, GDK_TYPE_CONTENT_PROVIDERcxx . . $ `gdk/gdkcontentprovider.h:29:9`!) |
| 5004 | |
| 5005 | static GdkContentFormatscxx . . $ GdkContentFormats# * |
| 5006 | gtk_label_content_ref_formatscxx . . $ gtk_label_content_ref_formats(653aea2a3e0e059b). (GdkContentProvidercxx . . $ GdkContentProvider# *provider) |
| 5007 | { |
| 5008 | GtkLabelContentcxx . . $ GtkLabelContent# *content = GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`! (provider); |
| 5009 | |
| 5010 | if (content->labelcxx . . $ _GtkLabelContent#label.) |
| 5011 | return gdk_content_formats_new_for_gtypecxx . . $ gdk_content_formats_new_for_gtype(a0709f62cae49ca3). (G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!); |
| 5012 | else |
| 5013 | return gdk_content_formats_newcxx . . $ gdk_content_formats_new(97755e6c06de7b31). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 5014 | } |
| 5015 | |
| 5016 | static gbooleancxx . . $ gboolean# |
| 5017 | gtk_label_content_get_valuecxx . . $ gtk_label_content_get_value(f131bc8b1035f9ef). (GdkContentProvidercxx . . $ GdkContentProvider# *provider, |
| 5018 | GValuecxx . . $ GValue# *value, |
| 5019 | GErrorcxx . . $ GError# **error) |
| 5020 | { |
| 5021 | GtkLabelContentcxx . . $ GtkLabelContent# *content = GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`! (provider); |
| 5022 | |
| 5023 | if (G_VALUE_HOLDScxx . . $ `<external>/17218264759549183453/gvalue.h:91:9`! (value, G_TYPE_STRINGcxx . . $ `<external>/9567554376676449156/gtype.h:165:9`!) && |
| 5024 | content->labelcxx . . $ _GtkLabelContent#label. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5025 | { |
| 5026 | GtkLabelcxx . . $ GtkLabel# *self = content->labelcxx . . $ _GtkLabelContent#label.; |
| 5027 | |
| 5028 | if (self->select_infocxx . . $ _GtkLabel#select_info. && |
| 5029 | (self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. != |
| 5030 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.) && |
| 5031 | self->textcxx . . $ _GtkLabel#text.) |
| 5032 | { |
| 5033 | int start, end; |
| 5034 | int len; |
| 5035 | char *str; |
| 5036 | |
| 5037 | start = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (self->select_info->selection_anchor, |
| 5038 | self->select_info->selection_end); |
| 5039 | end = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->select_info->selection_anchor, |
| 5040 | self->select_info->selection_end); |
| 5041 | |
| 5042 | len = strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.); |
| 5043 | |
| 5044 | if (end > len) |
| 5045 | end = len; |
| 5046 | |
| 5047 | if (start > len) |
| 5048 | start = len; |
| 5049 | |
| 5050 | str = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (self->textcxx . . $ _GtkLabel#text. + start, end - start); |
| 5051 | g_value_take_stringcxx . . $ g_value_take_string(1934021d7ed92e84). (value, str); |
| 5052 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5053 | } |
| 5054 | } |
| 5055 | |
| 5056 | return GDK_CONTENT_PROVIDER_CLASScxx . . $ `gdk/gdkcontentprovider.h:32:9`! (gtk_label_content_parent_class)->get_valuecxx . . $ _GdkContentProviderClass#get_value. (provider, value, error); |
| 5057 | } |
| 5058 | |
| 5059 | static void |
| 5060 | gtk_label_content_detachcxx . . $ gtk_label_content_detach(199e2608edc99908). (GdkContentProvidercxx . . $ GdkContentProvider# *provider, |
| 5061 | GdkClipboardcxx . . $ GdkClipboard# *clipboard) |
| 5062 | { |
| 5063 | GtkLabelContentcxx . . $ GtkLabelContent# *content = GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`! (provider); |
| 5064 | GtkLabelcxx . . $ GtkLabel# *self = content->labelcxx . . $ _GtkLabelContent#label.; |
| 5065 | |
| 5066 | if (self == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5067 | return; |
| 5068 | |
| 5069 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. = self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.; |
| 5070 | |
| 5071 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5072 | } |
| 5073 | |
| 5074 | static void |
| 5075 | gtk_label_content_class_initcxx . . $ gtk_label_content_class_init(f4ca25b5faacf36b). (GtkLabelContentClasscxx . . $ GtkLabelContentClass# *class) |
| 5076 | { |
| 5077 | GdkContentProviderClasscxx . . $ GdkContentProviderClass# *provider_class = GDK_CONTENT_PROVIDER_CLASScxx . . $ `gdk/gdkcontentprovider.h:32:9`! (class); |
| 5078 | |
| 5079 | provider_class->ref_formatscxx . . $ _GdkContentProviderClass#ref_formats. = gtk_label_content_ref_formatscxx . . $ gtk_label_content_ref_formats(653aea2a3e0e059b).; |
| 5080 | provider_class->get_valuecxx . . $ _GdkContentProviderClass#get_value. = gtk_label_content_get_valuecxx . . $ gtk_label_content_get_value(f131bc8b1035f9ef).; |
| 5081 | provider_class->detach_clipboardcxx . . $ _GdkContentProviderClass#detach_clipboard. = gtk_label_content_detachcxx . . $ gtk_label_content_detach(199e2608edc99908).; |
| 5082 | } |
| 5083 | |
| 5084 | static void |
| 5085 | gtk_label_content_initcxx . . $ gtk_label_content_init(3a1a3d10b0ff2bdf). (GtkLabelContentcxx . . $ GtkLabelContent# *content) |
| 5086 | { |
| 5087 | } |
| 5088 | |
| 5089 | static void |
| 5090 | focus_changecxx . . $ focus_change(c530e9fb96269a30). (GtkEventControllerFocuscxx . . $ GtkEventControllerFocus# *controller, |
| 5091 | GtkLabelcxx . . $ GtkLabel# *self) |
| 5092 | { |
| 5093 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5094 | } |
| 5095 | |
| 5096 | static void |
| 5097 | gtk_label_ensure_select_infocxx . . $ gtk_label_ensure_select_info(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5098 | { |
| 5099 | if (self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5100 | { |
| 5101 | self->select_infocxx . . $ _GtkLabel#select_info. = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (GtkLabelSelectionInfo, 1); |
| 5102 | |
| 5103 | gtk_widget_set_focusablecxx . . $ gtk_widget_set_focusable(81f145f668a0074f). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 5104 | |
| 5105 | self->select_infocxx . . $ _GtkLabel#select_info.->drag_gesturecxx . . $ _GtkLabelSelectionInfo#drag_gesture. = gtk_gesture_drag_newcxx . . $ gtk_gesture_drag_new(5d22ad75f7119eec). (); |
| 5106 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->drag_gesture, "drag-begin", |
| 5107 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_drag_gesture_begin), self); |
| 5108 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->drag_gesture, "drag-update", |
| 5109 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_drag_gesture_update), self); |
| 5110 | gtk_gesture_single_set_exclusivecxx . . $ gtk_gesture_single_set_exclusive(724cedb1e56be9d7). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (self->select_info->drag_gesture), TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 5111 | gtk_widget_add_controllercxx . . $ gtk_widget_add_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (self->select_info->drag_gesture)); |
| 5112 | |
| 5113 | self->select_infocxx . . $ _GtkLabel#select_info.->click_gesturecxx . . $ _GtkLabelSelectionInfo#click_gesture. = gtk_gesture_click_newcxx . . $ gtk_gesture_click_new(5d22ad75f7119eec). (); |
| 5114 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->click_gesture, "pressed", |
| 5115 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_click_gesture_pressed), self); |
| 5116 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->click_gesture, "released", |
| 5117 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_click_gesture_released), self); |
| 5118 | gtk_gesture_single_set_buttoncxx . . $ gtk_gesture_single_set_button(2f8820310a790616). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (self->select_info->click_gesture), 0); |
| 5119 | gtk_gesture_single_set_exclusivecxx . . $ gtk_gesture_single_set_exclusive(724cedb1e56be9d7). (GTK_GESTURE_SINGLEcxx . . $ `gtk/gtkgesturesingle.h:32:9`! (self->select_info->click_gesture), TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 5120 | gtk_widget_add_controllercxx . . $ gtk_widget_add_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (self->select_info->click_gesture)); |
| 5121 | |
| 5122 | self->select_infocxx . . $ _GtkLabel#select_info.->motion_controllercxx . . $ _GtkLabelSelectionInfo#motion_controller. = gtk_event_controller_motion_newcxx . . $ gtk_event_controller_motion_new(f1c553b571625c41). (); |
| 5123 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->motion_controller, "motion", |
| 5124 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_motion), self); |
| 5125 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->motion_controller, "leave", |
| 5126 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_label_leave), self); |
| 5127 | gtk_widget_add_controllercxx . . $ gtk_widget_add_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), self->select_infocxx . . $ _GtkLabel#select_info.->motion_controllercxx . . $ _GtkLabelSelectionInfo#motion_controller.); |
| 5128 | |
| 5129 | self->select_infocxx . . $ _GtkLabel#select_info.->focus_controllercxx . . $ _GtkLabelSelectionInfo#focus_controller. = gtk_event_controller_focus_newcxx . . $ gtk_event_controller_focus_new(f1c553b571625c41). (); |
| 5130 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->focus_controller, "enter", |
| 5131 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (focus_change), self); |
| 5132 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->focus_controller, "leave", |
| 5133 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (focus_change), self); |
| 5134 | gtk_widget_add_controllercxx . . $ gtk_widget_add_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (self->select_info->focus_controller)); |
| 5135 | |
| 5136 | self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider. = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4979:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5137 | GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`! (self->select_info->provider)->labelcxx . . $ _GtkLabelContent#label. = self; |
| 5138 | |
| 5139 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (self); |
| 5140 | } |
| 5141 | } |
| 5142 | |
| 5143 | static void |
| 5144 | gtk_label_clear_select_infocxx . . $ gtk_label_clear_select_info(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5145 | { |
| 5146 | if (self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5147 | return; |
| 5148 | |
| 5149 | if (!self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable. && !self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.) |
| 5150 | { |
| 5151 | gtk_widget_remove_controllercxx . . $ gtk_widget_remove_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (self->select_info->drag_gesture)); |
| 5152 | gtk_widget_remove_controllercxx . . $ gtk_widget_remove_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (self->select_info->click_gesture)); |
| 5153 | gtk_widget_remove_controllercxx . . $ gtk_widget_remove_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), self->select_infocxx . . $ _GtkLabel#select_info.->motion_controllercxx . . $ _GtkLabelSelectionInfo#motion_controller.); |
| 5154 | gtk_widget_remove_controllercxx . . $ gtk_widget_remove_controller(6d1262f1b7c2f702). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), self->select_infocxx . . $ _GtkLabel#select_info.->focus_controllercxx . . $ _GtkLabelSelectionInfo#focus_controller.); |
| 5155 | GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`! (self->select_info->provider)->labelcxx . . $ _GtkLabelContent#label. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5156 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->select_info->provider); |
| 5157 | |
| 5158 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->select_infocxx . . $ _GtkLabel#select_info.); |
| 5159 | self->select_infocxx . . $ _GtkLabel#select_info. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5160 | |
| 5161 | gtk_widget_set_cursorcxx . . $ gtk_widget_set_cursor(ccca0ca28f2292d8). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5162 | |
| 5163 | gtk_widget_set_focusablecxx . . $ gtk_widget_set_focusable(81f145f668a0074f). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5164 | } |
| 5165 | } |
| 5166 | |
| 5167 | static void |
| 5168 | gtk_label_clear_provider_infocxx . . $ gtk_label_clear_provider_info(e9c0e7bdc16b978e). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5169 | { |
| 5170 | if (self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5171 | return; |
| 5172 | |
| 5173 | GTK_LABEL_CONTENTcxx . . $ `gtk/gtklabel.c:4980:9`! (self->select_info->provider)->labelcxx . . $ _GtkLabelContent#label. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5174 | } |
| 5175 | |
| 5176 | /** |
| 5177 | * gtk_label_set_selectable: |
| 5178 | * @self: a label |
| 5179 | * @setting: true to allow selecting text in the label |
| 5180 | * |
| 5181 | * Makes text in the label selectable. |
| 5182 | * |
| 5183 | * Selectable labels allow the user to select text from the label, |
| 5184 | * for copy-and-paste. |
| 5185 | */ |
| 5186 | void |
| 5187 | gtk_label_set_selectablecxx . . $ gtk_label_set_selectable(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5188 | gbooleancxx . . $ gboolean# setting) |
| 5189 | { |
| 5190 | gbooleancxx . . $ gboolean# old_setting; |
| 5191 | |
| 5192 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5193 | |
| 5194 | setting = setting != FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5195 | old_setting = self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.; |
| 5196 | |
| 5197 | if (setting) |
| 5198 | { |
| 5199 | gtk_label_ensure_select_infocxx . . $ gtk_label_ensure_select_info(e9c0e7bdc16b978e). (self); |
| 5200 | self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5201 | gtk_label_update_cursorcxx . . $ gtk_label_update_cursor(e9c0e7bdc16b978e). (self); |
| 5202 | |
| 5203 | gtk_accessible_update_propertycxx . . $ gtk_accessible_update_property(7f02be67e42032aa). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (self), |
| 5204 | GTK_ACCESSIBLE_PROPERTY_HAS_POPUPcxx . . $ GTK_ACCESSIBLE_PROPERTY_HAS_POPUP., TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, |
| 5205 | -1); |
| 5206 | } |
| 5207 | else |
| 5208 | { |
| 5209 | if (old_setting) |
| 5210 | { |
| 5211 | /* unselect, to give up the selection */ |
| 5212 | gtk_label_select_regioncxx . . $ gtk_label_select_region(236c15b30fe93ff9). (self, 0, 0); |
| 5213 | |
| 5214 | self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5215 | gtk_label_clear_select_infocxx . . $ gtk_label_clear_select_info(e9c0e7bdc16b978e). (self); |
| 5216 | } |
| 5217 | |
| 5218 | gtk_accessible_reset_propertycxx . . $ gtk_accessible_reset_property(58234f89de8af20e). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (self), GTK_ACCESSIBLE_PROPERTY_HAS_POPUPcxx . . $ GTK_ACCESSIBLE_PROPERTY_HAS_POPUP.); |
| 5219 | } |
| 5220 | |
| 5221 | if (setting != old_setting) |
| 5222 | { |
| 5223 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5224 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_SELECTABLEcxx . . $ PROP_SELECTABLE.]); |
| 5225 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5226 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5227 | } |
| 5228 | } |
| 5229 | |
| 5230 | /** |
| 5231 | * gtk_label_get_selectable: |
| 5232 | * @self: a label |
| 5233 | * |
| 5234 | * Returns whether the label is selectable. |
| 5235 | * |
| 5236 | * Returns: true if the user can copy text from the label |
| 5237 | */ |
| 5238 | gbooleancxx . . $ gboolean# |
| 5239 | gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5240 | { |
| 5241 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5242 | |
| 5243 | return self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.; |
| 5244 | } |
| 5245 | |
| 5246 | static void |
| 5247 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5248 | int anchor_index, |
| 5249 | int end_index) |
| 5250 | { |
| 5251 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5252 | |
| 5253 | if (self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 5254 | { |
| 5255 | GdkClipboardcxx . . $ GdkClipboard# *clipboard; |
| 5256 | int s, e; |
| 5257 | |
| 5258 | /* Ensure that we treat an ellipsized region like a single |
| 5259 | * character with respect to selection. |
| 5260 | */ |
| 5261 | if (anchor_index < end_index) |
| 5262 | { |
| 5263 | if (range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (self, anchor_index, anchor_index + 1, &s, &e)) |
| 5264 | { |
| 5265 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == s) |
| 5266 | anchor_index = e; |
| 5267 | else |
| 5268 | anchor_index = s; |
| 5269 | } |
| 5270 | if (range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (self, end_index - 1, end_index, &s, &e)) |
| 5271 | { |
| 5272 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. == e) |
| 5273 | end_index = s; |
| 5274 | else |
| 5275 | end_index = e; |
| 5276 | } |
| 5277 | } |
| 5278 | else if (end_index < anchor_index) |
| 5279 | { |
| 5280 | if (range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (self, end_index, end_index + 1, &s, &e)) |
| 5281 | { |
| 5282 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. == s) |
| 5283 | end_index = e; |
| 5284 | else |
| 5285 | end_index = s; |
| 5286 | } |
| 5287 | if (range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (self, anchor_index - 1, anchor_index, &s, &e)) |
| 5288 | { |
| 5289 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == e) |
| 5290 | anchor_index = s; |
| 5291 | else |
| 5292 | anchor_index = e; |
| 5293 | } |
| 5294 | } |
| 5295 | else |
| 5296 | { |
| 5297 | if (range_is_in_ellipsis_fullcxx . . $ range_is_in_ellipsis_full(ae726ec5f7806d5f). (self, anchor_index, anchor_index, &s, &e)) |
| 5298 | { |
| 5299 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == s) |
| 5300 | anchor_index = e; |
| 5301 | else if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == e) |
| 5302 | anchor_index = s; |
| 5303 | else if (anchor_index - s < e - anchor_index) |
| 5304 | anchor_index = s; |
| 5305 | else |
| 5306 | anchor_index = e; |
| 5307 | end_index = anchor_index; |
| 5308 | } |
| 5309 | } |
| 5310 | |
| 5311 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. == anchor_index && |
| 5312 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. == end_index) |
| 5313 | return; |
| 5314 | |
| 5315 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5316 | |
| 5317 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. = anchor_index; |
| 5318 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. = end_index; |
| 5319 | |
| 5320 | clipboard = gtk_widget_get_primary_clipboardcxx . . $ gtk_widget_get_primary_clipboard(4e1a3be1a7ff0ce4). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5321 | |
| 5322 | if (anchor_index != end_index) |
| 5323 | { |
| 5324 | gdk_content_provider_content_changedcxx . . $ gdk_content_provider_content_changed(7bbe389d01a130d0). (self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.); |
| 5325 | gdk_clipboard_set_contentcxx . . $ gdk_clipboard_set_content(87ff779b686590dd). (clipboard, self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.); |
| 5326 | |
| 5327 | if (!self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node.) |
| 5328 | { |
| 5329 | GtkCssNodecxx . . $ GtkCssNode# *widget_node; |
| 5330 | |
| 5331 | widget_node = gtk_widget_get_css_nodecxx . . $ gtk_widget_get_css_node(e7b0819f4c134bd6). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5332 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node. = gtk_css_node_newcxx . . $ gtk_css_node_new(e224e8bde524454e). (); |
| 5333 | gtk_css_node_set_namecxx . . $ gtk_css_node_set_name(cf183a8f03fd81f6). (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node., g_quark_from_static_stringcxx . . $ g_quark_from_static_string(c61c63047ce273de). ("selection")); |
| 5334 | gtk_css_node_set_parentcxx . . $ gtk_css_node_set_parent(cf2c49e3ac800954). (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node., widget_node); |
| 5335 | gtk_css_node_set_statecxx . . $ gtk_css_node_set_state(98eae1fca7a7008b). (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node., gtk_css_node_get_statecxx . . $ gtk_css_node_get_state(87b66d9f17380d4). (widget_node)); |
| 5336 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->select_info->selection_node, "style-changed", |
| 5337 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (selection_style_changed_cb), self); |
| 5338 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node.); |
| 5339 | } |
| 5340 | } |
| 5341 | else |
| 5342 | { |
| 5343 | if (gdk_clipboard_get_contentcxx . . $ gdk_clipboard_get_content(f1f7a1fe02e36ae1). (clipboard) == self->select_infocxx . . $ _GtkLabel#select_info.->providercxx . . $ _GtkLabelSelectionInfo#provider.) |
| 5344 | gdk_clipboard_set_contentcxx . . $ gdk_clipboard_set_content(87ff779b686590dd). (clipboard, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5345 | |
| 5346 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node.) |
| 5347 | { |
| 5348 | gtk_css_node_set_parentcxx . . $ gtk_css_node_set_parent(cf2c49e3ac800954). (self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5349 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_nodecxx . . $ _GtkLabelSelectionInfo#selection_node. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5350 | } |
| 5351 | } |
| 5352 | |
| 5353 | |
| 5354 | gtk_label_update_actionscxx . . $ gtk_label_update_actions(e9c0e7bdc16b978e). (self); |
| 5355 | |
| 5356 | gtk_accessible_text_update_caret_positioncxx . . $ gtk_accessible_text_update_caret_position(dc61a57f27d78b91). (GTK_ACCESSIBLE_TEXTcxx . . $ GTK_ACCESSIBLE_TEXT(a1bf900f6492873d). (self)); |
| 5357 | gtk_accessible_text_update_selection_boundcxx . . $ gtk_accessible_text_update_selection_bound(dc61a57f27d78b91). (GTK_ACCESSIBLE_TEXTcxx . . $ GTK_ACCESSIBLE_TEXT(a1bf900f6492873d). (self)); |
| 5358 | |
| 5359 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5360 | |
| 5361 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5362 | } |
| 5363 | } |
| 5364 | |
| 5365 | /** |
| 5366 | * gtk_label_select_region: |
| 5367 | * @self: a label |
| 5368 | * @start_offset: start offset, in characters |
| 5369 | * @end_offset: end offset, in characters |
| 5370 | * |
| 5371 | * Selects a range of characters in the label, if the label is selectable. |
| 5372 | * |
| 5373 | * See [[email protected]_selectable]. If the label is not selectable, |
| 5374 | * this function has no effect. If @start_offset or |
| 5375 | * @end_offset are -1, then the end of the label will be substituted. |
| 5376 | */ |
| 5377 | void |
| 5378 | gtk_label_select_regioncxx . . $ gtk_label_select_region(236c15b30fe93ff9). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5379 | int start_offset, |
| 5380 | int end_offset) |
| 5381 | { |
| 5382 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5383 | |
| 5384 | if (self->textcxx . . $ _GtkLabel#text. && self->select_infocxx . . $ _GtkLabel#select_info.) |
| 5385 | { |
| 5386 | if (start_offset < 0) |
| 5387 | start_offset = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (self->textcxx . . $ _GtkLabel#text., -1); |
| 5388 | |
| 5389 | if (end_offset < 0) |
| 5390 | end_offset = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (self->textcxx . . $ _GtkLabel#text., -1); |
| 5391 | |
| 5392 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, |
| 5393 | g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (self->textcxx . . $ _GtkLabel#text., start_offset) - self->textcxx . . $ _GtkLabel#text., |
| 5394 | g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (self->textcxx . . $ _GtkLabel#text., end_offset) - self->textcxx . . $ _GtkLabel#text.); |
| 5395 | } |
| 5396 | } |
| 5397 | |
| 5398 | /** |
| 5399 | * gtk_label_get_selection_bounds: |
| 5400 | * @self: a label |
| 5401 | * @start: (out) (optional): return location for start of selection |
| 5402 | * @end: (out) (optional): return location for end of selection |
| 5403 | * |
| 5404 | * Gets the selected range of characters in the label. |
| 5405 | * |
| 5406 | * The returned @start and @end positions are in characters. |
| 5407 | * |
| 5408 | * Returns: true if selection is non-empty |
| 5409 | **/ |
| 5410 | gbooleancxx . . $ gboolean# |
| 5411 | gtk_label_get_selection_boundscxx . . $ gtk_label_get_selection_bounds(bc170c9d14475c46). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5412 | int *start, |
| 5413 | int *end) |
| 5414 | { |
| 5415 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5416 | |
| 5417 | if (self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5418 | { |
| 5419 | /* not a selectable label */ |
| 5420 | if (start) |
| 5421 | *start = 0; |
| 5422 | if (end) |
| 5423 | *end = 0; |
| 5424 | |
| 5425 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5426 | } |
| 5427 | else |
| 5428 | { |
| 5429 | int start_index, end_index; |
| 5430 | int start_offset, end_offset; |
| 5431 | int len; |
| 5432 | |
| 5433 | start_index = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (self->select_info->selection_anchor, |
| 5434 | self->select_info->selection_end); |
| 5435 | end_index = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->select_info->selection_anchor, |
| 5436 | self->select_info->selection_end); |
| 5437 | |
| 5438 | len = strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.); |
| 5439 | |
| 5440 | if (end_index > len) |
| 5441 | end_index = len; |
| 5442 | |
| 5443 | if (start_index > len) |
| 5444 | start_index = len; |
| 5445 | |
| 5446 | start_offset = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (self->textcxx . . $ _GtkLabel#text., start_index); |
| 5447 | end_offset = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (self->textcxx . . $ _GtkLabel#text., end_index); |
| 5448 | |
| 5449 | if (start_offset > end_offset) |
| 5450 | { |
| 5451 | int tmp = start_offset; |
| 5452 | start_offset = end_offset; |
| 5453 | end_offset = tmp; |
| 5454 | } |
| 5455 | |
| 5456 | if (start) |
| 5457 | *start = start_offset; |
| 5458 | |
| 5459 | if (end) |
| 5460 | *end = end_offset; |
| 5461 | |
| 5462 | return start_offset != end_offset; |
| 5463 | } |
| 5464 | } |
| 5465 | |
| 5466 | |
| 5467 | /** |
| 5468 | * gtk_label_get_layout: |
| 5469 | * @self: a label |
| 5470 | * |
| 5471 | * Gets the Pango layout used to display the label. |
| 5472 | * |
| 5473 | * The layout is useful to e.g. convert text positions to pixel |
| 5474 | * positions, in combination with [[email protected]_layout_offsets]. |
| 5475 | * The returned layout is owned by the @label so need not be |
| 5476 | * freed by the caller. The @label is free to recreate its layout |
| 5477 | * at any time, so it should be considered read-only. |
| 5478 | * |
| 5479 | * Returns: (transfer none): the [[email protected]] for this label |
| 5480 | */ |
| 5481 | PangoLayoutcxx . . $ PangoLayout#* |
| 5482 | gtk_label_get_layoutcxx . . $ gtk_label_get_layout(ced3673be56a6075). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5483 | { |
| 5484 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5485 | |
| 5486 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 5487 | |
| 5488 | return self->layoutcxx . . $ _GtkLabel#layout.; |
| 5489 | } |
| 5490 | |
| 5491 | /** |
| 5492 | * gtk_label_get_layout_offsets: |
| 5493 | * @self: a label |
| 5494 | * @x: (out) (optional): location to store X offset of layout |
| 5495 | * @y: (out) (optional): location to store Y offset of layout |
| 5496 | * |
| 5497 | * Obtains the coordinates where the label will draw its Pango layout. |
| 5498 | * |
| 5499 | * The coordinates are useful to convert mouse events into coordinates |
| 5500 | * inside the [[email protected]], e.g. to take some action if some part |
| 5501 | * of the label is clicked. Remember when using the [[email protected]] |
| 5502 | * functions you need to convert to and from pixels using `PANGO_PIXELS()` |
| 5503 | * or [[email protected]]. |
| 5504 | */ |
| 5505 | void |
| 5506 | gtk_label_get_layout_offsetscxx . . $ gtk_label_get_layout_offsets(55274c6742c17302). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5507 | int *x, |
| 5508 | int *y) |
| 5509 | { |
| 5510 | float local_x, local_y; |
| 5511 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5512 | |
| 5513 | gtk_label_get_layout_locationcxx . . $ gtk_label_get_layout_location(8c422bc0344df158). (self, &local_x, &local_y); |
| 5514 | |
| 5515 | if (x) |
| 5516 | *x = (int) local_x; |
| 5517 | |
| 5518 | if (y) |
| 5519 | *y = (int) local_y; |
| 5520 | } |
| 5521 | |
| 5522 | /** |
| 5523 | * gtk_label_set_use_markup: |
| 5524 | * @self: a label |
| 5525 | * @setting: true if the label’s text should be parsed for markup. |
| 5526 | * |
| 5527 | * Sets whether the text of the label contains markup. |
| 5528 | * |
| 5529 | * See [[email protected]_markup]. |
| 5530 | */ |
| 5531 | void |
| 5532 | gtk_label_set_use_markupcxx . . $ gtk_label_set_use_markup(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5533 | gbooleancxx . . $ gboolean# setting) |
| 5534 | { |
| 5535 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5536 | |
| 5537 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5538 | |
| 5539 | if (gtk_label_set_use_markup_internalcxx . . $ gtk_label_set_use_markup_internal(7d3bc1c500b2b3a9). (self, !!setting)) |
| 5540 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 5541 | |
| 5542 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5543 | } |
| 5544 | |
| 5545 | /** |
| 5546 | * gtk_label_get_use_markup: |
| 5547 | * @self: a label |
| 5548 | * |
| 5549 | * Returns whether the label’s text is interpreted as Pango markup. |
| 5550 | * |
| 5551 | * See [[email protected]_use_markup]. |
| 5552 | * |
| 5553 | * Returns: true if the label’s text will be parsed for markup |
| 5554 | */ |
| 5555 | gbooleancxx . . $ gboolean# |
| 5556 | gtk_label_get_use_markupcxx . . $ gtk_label_get_use_markup(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5557 | { |
| 5558 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5559 | |
| 5560 | return self->use_markupcxx . . $ _GtkLabel#use_markup.; |
| 5561 | } |
| 5562 | |
| 5563 | /** |
| 5564 | * gtk_label_set_use_underline: |
| 5565 | * @self: a label |
| 5566 | * @setting: true if underlines in the text indicate mnemonics |
| 5567 | * |
| 5568 | * Sets whether underlines in the text indicate mnemonics. |
| 5569 | */ |
| 5570 | void |
| 5571 | gtk_label_set_use_underlinecxx . . $ gtk_label_set_use_underline(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5572 | gbooleancxx . . $ gboolean# setting) |
| 5573 | { |
| 5574 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5575 | |
| 5576 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5577 | |
| 5578 | if (gtk_label_set_use_underline_internalcxx . . $ gtk_label_set_use_underline_internal(7d3bc1c500b2b3a9). (self, !!setting)) |
| 5579 | gtk_label_recalculatecxx . . $ gtk_label_recalculate(e9c0e7bdc16b978e). (self); |
| 5580 | |
| 5581 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 5582 | } |
| 5583 | |
| 5584 | /** |
| 5585 | * gtk_label_get_use_underline: |
| 5586 | * @self: a label |
| 5587 | * |
| 5588 | * Returns whether underlines in the label indicate mnemonics. |
| 5589 | * |
| 5590 | * See [[email protected]_use_underline]. |
| 5591 | * |
| 5592 | * Returns: true if underlines in the label indicate mnemonics |
| 5593 | */ |
| 5594 | gbooleancxx . . $ gboolean# |
| 5595 | gtk_label_get_use_underlinecxx . . $ gtk_label_get_use_underline(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5596 | { |
| 5597 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5598 | |
| 5599 | return self->use_underlinecxx . . $ _GtkLabel#use_underline.; |
| 5600 | } |
| 5601 | |
| 5602 | /** |
| 5603 | * gtk_label_set_single_line_mode: |
| 5604 | * @self: a label |
| 5605 | * @single_line_mode: true to enable single line mode |
| 5606 | * |
| 5607 | * Sets whether the label is in single line mode. |
| 5608 | */ |
| 5609 | void |
| 5610 | gtk_label_set_single_line_modecxx . . $ gtk_label_set_single_line_mode(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5611 | gbooleancxx . . $ gboolean# single_line_mode) |
| 5612 | { |
| 5613 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 5614 | |
| 5615 | single_line_mode = single_line_mode != FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5616 | |
| 5617 | if (self->single_line_modecxx . . $ _GtkLabel#single_line_mode. != single_line_mode) |
| 5618 | { |
| 5619 | self->single_line_modecxx . . $ _GtkLabel#single_line_mode. = single_line_mode; |
| 5620 | |
| 5621 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 5622 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5623 | |
| 5624 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_SINGLE_LINE_MODEcxx . . $ PROP_SINGLE_LINE_MODE.]); |
| 5625 | } |
| 5626 | } |
| 5627 | |
| 5628 | /** |
| 5629 | * gtk_label_get_single_line_mode: |
| 5630 | * @self: a label |
| 5631 | * |
| 5632 | * Returns whether the label is in single line mode. |
| 5633 | * |
| 5634 | * Returns: true if the label is in single line mode |
| 5635 | **/ |
| 5636 | gbooleancxx . . $ gboolean# |
| 5637 | gtk_label_get_single_line_modecxx . . $ gtk_label_get_single_line_mode(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5638 | { |
| 5639 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5640 | |
| 5641 | return self->single_line_modecxx . . $ _GtkLabel#single_line_mode.; |
| 5642 | } |
| 5643 | |
| 5644 | /* Compute the X position for an offset that corresponds to the more important |
| 5645 | * cursor position for that offset. We use this when trying to guess to which |
| 5646 | * end of the selection we should go to when the user hits the left or |
| 5647 | * right arrow key. |
| 5648 | */ |
| 5649 | static void |
| 5650 | get_better_cursorcxx . . $ get_better_cursor(26f30bf72e0ae158). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5651 | int index, |
| 5652 | int *x, |
| 5653 | int *y) |
| 5654 | { |
| 5655 | GdkSeatcxx . . $ GdkSeat# *seat; |
| 5656 | GdkDevicecxx . . $ GdkDevice# *keyboard; |
| 5657 | PangoDirectioncxx . . $ PangoDirection# keymap_direction; |
| 5658 | PangoDirectioncxx . . $ PangoDirection# cursor_direction; |
| 5659 | gbooleancxx . . $ gboolean# split_cursor; |
| 5660 | PangoRectanglecxx . . $ PangoRectangle# strong_pos, weak_pos; |
| 5661 | |
| 5662 | seat = gdk_display_get_default_seatcxx . . $ gdk_display_get_default_seat(b8d4640ca7588d07). (gtk_widget_get_displaycxx . . $ gtk_widget_get_display(6423c64908d5796a). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))); |
| 5663 | if (seat) |
| 5664 | keyboard = gdk_seat_get_keyboardcxx . . $ gdk_seat_get_keyboard(bcf9d88e6a2df60a). (seat); |
| 5665 | else |
| 5666 | keyboard = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5667 | if (keyboard) |
| 5668 | keymap_direction = gdk_device_get_directioncxx . . $ gdk_device_get_direction(30249433fb57118a). (keyboard); |
| 5669 | else |
| 5670 | keymap_direction = PANGO_DIRECTION_LTRcxx . . $ PANGO_DIRECTION_LTR.; |
| 5671 | |
| 5672 | cursor_direction = get_cursor_directioncxx . . $ get_cursor_direction(145f4c570d45e2f9). (self); |
| 5673 | |
| 5674 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (gtk_widget_get_settingscxx . . $ gtk_widget_get_settings(ffe4fbf99830fa29). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)), |
| 5675 | "gtk-split-cursor", &split_cursor, |
| 5676 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5677 | |
| 5678 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 5679 | |
| 5680 | pango_layout_get_cursor_poscxx . . $ pango_layout_get_cursor_pos(b8afa7428a6e202f). (self->layoutcxx . . $ _GtkLabel#layout., index, |
| 5681 | &strong_pos, &weak_pos); |
| 5682 | |
| 5683 | if (split_cursor) |
| 5684 | { |
| 5685 | *x = strong_pos.xcxx . . $ _PangoRectangle#x. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 5686 | *y = strong_pos.ycxx . . $ _PangoRectangle#y. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 5687 | } |
| 5688 | else |
| 5689 | { |
| 5690 | if (keymap_direction == cursor_direction) |
| 5691 | { |
| 5692 | *x = strong_pos.xcxx . . $ _PangoRectangle#x. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 5693 | *y = strong_pos.ycxx . . $ _PangoRectangle#y. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 5694 | } |
| 5695 | else |
| 5696 | { |
| 5697 | *x = weak_pos.xcxx . . $ _PangoRectangle#x. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 5698 | *y = weak_pos.ycxx . . $ _PangoRectangle#y. / PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!; |
| 5699 | } |
| 5700 | } |
| 5701 | } |
| 5702 | |
| 5703 | |
| 5704 | static int |
| 5705 | gtk_label_move_logicallycxx . . $ gtk_label_move_logically(7e56390baa2555d). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5706 | int start, |
| 5707 | int count) |
| 5708 | { |
| 5709 | int offset = g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (self->textcxx . . $ _GtkLabel#text., self->textcxx . . $ _GtkLabel#text. + start); |
| 5710 | |
| 5711 | if (self->textcxx . . $ _GtkLabel#text.) |
| 5712 | { |
| 5713 | const PangoLogAttrcxx . . $ PangoLogAttr# *log_attrs; |
| 5714 | int n_attrs; |
| 5715 | int length; |
| 5716 | |
| 5717 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 5718 | |
| 5719 | length = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (self->textcxx . . $ _GtkLabel#text., -1); |
| 5720 | |
| 5721 | log_attrs = pango_layout_get_log_attrs_readonlycxx . . $ pango_layout_get_log_attrs_readonly(8a9afc2b5af67c16). (self->layoutcxx . . $ _GtkLabel#layout., &n_attrs); |
| 5722 | |
| 5723 | while (count > 0 && offset < length) |
| 5724 | { |
| 5725 | do |
| 5726 | offset++; |
| 5727 | while (offset < length && !log_attrs[offset].is_cursor_positioncxx . . $ _PangoLogAttr#is_cursor_position.); |
| 5728 | |
| 5729 | count--; |
| 5730 | } |
| 5731 | while (count < 0 && offset > 0) |
| 5732 | { |
| 5733 | do |
| 5734 | offset--; |
| 5735 | while (offset > 0 && !log_attrs[offset].is_cursor_positioncxx . . $ _PangoLogAttr#is_cursor_position.); |
| 5736 | |
| 5737 | count++; |
| 5738 | } |
| 5739 | } |
| 5740 | |
| 5741 | return g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (self->textcxx . . $ _GtkLabel#text., offset) - self->textcxx . . $ _GtkLabel#text.; |
| 5742 | } |
| 5743 | |
| 5744 | static int |
| 5745 | gtk_label_move_visuallycxx . . $ gtk_label_move_visually(7e56390baa2555d). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5746 | int start, |
| 5747 | int count) |
| 5748 | { |
| 5749 | int index; |
| 5750 | |
| 5751 | index = start; |
| 5752 | |
| 5753 | while (count != 0) |
| 5754 | { |
| 5755 | int new_index, new_trailing; |
| 5756 | gbooleancxx . . $ gboolean# split_cursor; |
| 5757 | gbooleancxx . . $ gboolean# strong; |
| 5758 | |
| 5759 | gtk_label_ensure_layoutcxx . . $ gtk_label_ensure_layout(e9c0e7bdc16b978e). (self); |
| 5760 | |
| 5761 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d). (gtk_widget_get_settingscxx . . $ gtk_widget_get_settings(ffe4fbf99830fa29). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)), |
| 5762 | "gtk-split-cursor", &split_cursor, |
| 5763 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5764 | |
| 5765 | if (split_cursor) |
| 5766 | strong = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5767 | else |
| 5768 | { |
| 5769 | GdkSeatcxx . . $ GdkSeat# *seat; |
| 5770 | GdkDevicecxx . . $ GdkDevice# *keyboard; |
| 5771 | PangoDirectioncxx . . $ PangoDirection# keymap_direction; |
| 5772 | |
| 5773 | seat = gdk_display_get_default_seatcxx . . $ gdk_display_get_default_seat(b8d4640ca7588d07). (gtk_widget_get_displaycxx . . $ gtk_widget_get_display(6423c64908d5796a). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))); |
| 5774 | if (seat) |
| 5775 | keyboard = gdk_seat_get_keyboardcxx . . $ gdk_seat_get_keyboard(bcf9d88e6a2df60a). (seat); |
| 5776 | else |
| 5777 | keyboard = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5778 | if (keyboard) |
| 5779 | keymap_direction = gdk_device_get_directioncxx . . $ gdk_device_get_direction(30249433fb57118a). (keyboard); |
| 5780 | else |
| 5781 | keymap_direction = PANGO_DIRECTION_LTRcxx . . $ PANGO_DIRECTION_LTR.; |
| 5782 | |
| 5783 | strong = keymap_direction == get_cursor_directioncxx . . $ get_cursor_direction(145f4c570d45e2f9). (self); |
| 5784 | } |
| 5785 | |
| 5786 | if (count > 0) |
| 5787 | { |
| 5788 | pango_layout_move_cursor_visuallycxx . . $ pango_layout_move_cursor_visually(2e9b5f35e4c1e0e7). (self->layoutcxx . . $ _GtkLabel#layout., strong, index, 0, 1, &new_index, &new_trailing); |
| 5789 | count--; |
| 5790 | } |
| 5791 | else |
| 5792 | { |
| 5793 | pango_layout_move_cursor_visuallycxx . . $ pango_layout_move_cursor_visually(2e9b5f35e4c1e0e7). (self->layoutcxx . . $ _GtkLabel#layout., strong, index, 0, -1, &new_index, &new_trailing); |
| 5794 | count++; |
| 5795 | } |
| 5796 | |
| 5797 | if (new_index < 0 || new_index == G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!) |
| 5798 | break; |
| 5799 | |
| 5800 | index = new_index; |
| 5801 | |
| 5802 | while (new_trailing--) |
| 5803 | index = g_utf8_next_charcxx . . $ `<external>/15988913817814236715/gunicode.h:837:9`! (self->text + new_index) - self->textcxx . . $ _GtkLabel#text.; |
| 5804 | } |
| 5805 | |
| 5806 | return index; |
| 5807 | } |
| 5808 | |
| 5809 | static void |
| 5810 | gtk_label_move_cursorcxx . . $ gtk_label_move_cursor(8db45717b1dfc2f8). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5811 | GtkMovementStepcxx . . $ GtkMovementStep# step, |
| 5812 | int count, |
| 5813 | gbooleancxx . . $ gboolean# extend_selection) |
| 5814 | { |
| 5815 | int old_pos; |
| 5816 | int new_pos; |
| 5817 | |
| 5818 | if (self->select_infocxx . . $ _GtkLabel#select_info. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5819 | return; |
| 5820 | |
| 5821 | old_pos = new_pos = self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.; |
| 5822 | |
| 5823 | if (self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. != self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor. && |
| 5824 | !extend_selection) |
| 5825 | { |
| 5826 | /* If we have a current selection and aren't extending it, move to the |
| 5827 | * start/or end of the selection as appropriate |
| 5828 | */ |
| 5829 | switch (step) |
| 5830 | { |
| 5831 | case GTK_MOVEMENT_VISUAL_POSITIONScxx . . $ GTK_MOVEMENT_VISUAL_POSITIONS.: |
| 5832 | { |
| 5833 | int end_x, end_y; |
| 5834 | int anchor_x, anchor_y; |
| 5835 | gbooleancxx . . $ gboolean# end_is_left; |
| 5836 | |
| 5837 | get_better_cursorcxx . . $ get_better_cursor(26f30bf72e0ae158). (self, self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end., &end_x, &end_y); |
| 5838 | get_better_cursorcxx . . $ get_better_cursor(26f30bf72e0ae158). (self, self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor., &anchor_x, &anchor_y); |
| 5839 | |
| 5840 | end_is_left = (end_y < anchor_y) || (end_y == anchor_y && end_x < anchor_x); |
| 5841 | |
| 5842 | if (count < 0) |
| 5843 | new_pos = end_is_left ? self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. : self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.; |
| 5844 | else |
| 5845 | new_pos = !end_is_left ? self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end. : self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.; |
| 5846 | break; |
| 5847 | } |
| 5848 | case GTK_MOVEMENT_LOGICAL_POSITIONScxx . . $ GTK_MOVEMENT_LOGICAL_POSITIONS.: |
| 5849 | case GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS.: |
| 5850 | if (count < 0) |
| 5851 | new_pos = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (self->select_info->selection_end, self->select_info->selection_anchor); |
| 5852 | else |
| 5853 | new_pos = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (self->select_info->selection_end, self->select_info->selection_anchor); |
| 5854 | break; |
| 5855 | case GTK_MOVEMENT_DISPLAY_LINE_ENDScxx . . $ GTK_MOVEMENT_DISPLAY_LINE_ENDS.: |
| 5856 | case GTK_MOVEMENT_PARAGRAPH_ENDScxx . . $ GTK_MOVEMENT_PARAGRAPH_ENDS.: |
| 5857 | case GTK_MOVEMENT_BUFFER_ENDScxx . . $ GTK_MOVEMENT_BUFFER_ENDS.: |
| 5858 | /* FIXME: Can do better here */ |
| 5859 | new_pos = count < 0 ? 0 : strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.); |
| 5860 | break; |
| 5861 | case GTK_MOVEMENT_DISPLAY_LINEScxx . . $ GTK_MOVEMENT_DISPLAY_LINES.: |
| 5862 | case GTK_MOVEMENT_PARAGRAPHScxx . . $ GTK_MOVEMENT_PARAGRAPHS.: |
| 5863 | case GTK_MOVEMENT_PAGEScxx . . $ GTK_MOVEMENT_PAGES.: |
| 5864 | case GTK_MOVEMENT_HORIZONTAL_PAGEScxx . . $ GTK_MOVEMENT_HORIZONTAL_PAGES.: |
| 5865 | default: |
| 5866 | break; |
| 5867 | } |
| 5868 | } |
| 5869 | else |
| 5870 | { |
| 5871 | switch (step) |
| 5872 | { |
| 5873 | case GTK_MOVEMENT_LOGICAL_POSITIONScxx . . $ GTK_MOVEMENT_LOGICAL_POSITIONS.: |
| 5874 | new_pos = gtk_label_move_logicallycxx . . $ gtk_label_move_logically(7e56390baa2555d). (self, new_pos, count); |
| 5875 | break; |
| 5876 | case GTK_MOVEMENT_VISUAL_POSITIONScxx . . $ GTK_MOVEMENT_VISUAL_POSITIONS.: |
| 5877 | new_pos = gtk_label_move_visuallycxx . . $ gtk_label_move_visually(7e56390baa2555d). (self, new_pos, count); |
| 5878 | if (new_pos == old_pos) |
| 5879 | { |
| 5880 | if (!extend_selection) |
| 5881 | { |
| 5882 | if (!gtk_widget_keynav_failedcxx . . $ gtk_widget_keynav_failed(8bb1c65c821a69cd). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), |
| 5883 | count > 0 ? |
| 5884 | GTK_DIR_RIGHTcxx . . $ GTK_DIR_RIGHT. : GTK_DIR_LEFTcxx . . $ GTK_DIR_LEFT.)) |
| 5885 | { |
| 5886 | GtkRootcxx . . $ GtkRoot# *root = gtk_widget_get_rootcxx . . $ gtk_widget_get_root(978ce13b0a79da4). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5887 | |
| 5888 | if (root) |
| 5889 | gtk_widget_child_focuscxx . . $ gtk_widget_child_focus(8bb1c65c821a69cd). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (root), count > 0 ? GTK_DIR_RIGHTcxx . . $ GTK_DIR_RIGHT. : GTK_DIR_LEFTcxx . . $ GTK_DIR_LEFT.); |
| 5890 | } |
| 5891 | } |
| 5892 | else |
| 5893 | { |
| 5894 | gtk_widget_error_bellcxx . . $ gtk_widget_error_bell(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5895 | } |
| 5896 | } |
| 5897 | break; |
| 5898 | case GTK_MOVEMENT_WORDScxx . . $ GTK_MOVEMENT_WORDS.: |
| 5899 | while (count > 0) |
| 5900 | { |
| 5901 | new_pos = gtk_label_move_forward_wordcxx . . $ gtk_label_move_forward_word(7d3bc1c500b2b3a9). (self, new_pos); |
| 5902 | count--; |
| 5903 | } |
| 5904 | while (count < 0) |
| 5905 | { |
| 5906 | new_pos = gtk_label_move_backward_wordcxx . . $ gtk_label_move_backward_word(7d3bc1c500b2b3a9). (self, new_pos); |
| 5907 | count++; |
| 5908 | } |
| 5909 | if (new_pos == old_pos) |
| 5910 | gtk_widget_error_bellcxx . . $ gtk_widget_error_bell(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5911 | break; |
| 5912 | case GTK_MOVEMENT_DISPLAY_LINE_ENDScxx . . $ GTK_MOVEMENT_DISPLAY_LINE_ENDS.: |
| 5913 | case GTK_MOVEMENT_PARAGRAPH_ENDScxx . . $ GTK_MOVEMENT_PARAGRAPH_ENDS.: |
| 5914 | case GTK_MOVEMENT_BUFFER_ENDScxx . . $ GTK_MOVEMENT_BUFFER_ENDS.: |
| 5915 | /* FIXME: Can do better here */ |
| 5916 | new_pos = count < 0 ? 0 : strlencxx . . $ strlen(751346f8406fd082). (self->textcxx . . $ _GtkLabel#text.); |
| 5917 | if (new_pos == old_pos) |
| 5918 | gtk_widget_error_bellcxx . . $ gtk_widget_error_bell(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 5919 | break; |
| 5920 | case GTK_MOVEMENT_DISPLAY_LINEScxx . . $ GTK_MOVEMENT_DISPLAY_LINES.: |
| 5921 | case GTK_MOVEMENT_PARAGRAPHScxx . . $ GTK_MOVEMENT_PARAGRAPHS.: |
| 5922 | case GTK_MOVEMENT_PAGEScxx . . $ GTK_MOVEMENT_PAGES.: |
| 5923 | case GTK_MOVEMENT_HORIZONTAL_PAGEScxx . . $ GTK_MOVEMENT_HORIZONTAL_PAGES.: |
| 5924 | default: |
| 5925 | break; |
| 5926 | } |
| 5927 | } |
| 5928 | |
| 5929 | if (extend_selection) |
| 5930 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, |
| 5931 | self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor., |
| 5932 | new_pos); |
| 5933 | else |
| 5934 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (self, new_pos, new_pos); |
| 5935 | } |
| 5936 | |
| 5937 | static GMenuModelcxx . . $ GMenuModel# * |
| 5938 | gtk_label_get_menu_modelcxx . . $ gtk_label_get_menu_model(a8c8bf24dbc74d89). (GtkLabelcxx . . $ GtkLabel# *self) |
| 5939 | { |
| 5940 | GtkJoinedMenucxx . . $ GtkJoinedMenu# *joined; |
| 5941 | GMenucxx . . $ GMenu# *menu, *section; |
| 5942 | GMenuItemcxx . . $ GMenuItem# *item; |
| 5943 | |
| 5944 | joined = gtk_joined_menu_newcxx . . $ gtk_joined_menu_new(cfb6532739c41039). (); |
| 5945 | menu = g_menu_newcxx . . $ g_menu_new(19bd89629a99dfed). (); |
| 5946 | |
| 5947 | section = g_menu_newcxx . . $ g_menu_new(19bd89629a99dfed). (); |
| 5948 | g_menu_appendcxx . . $ g_menu_append(e0dcbbb727250072). (section, _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("Cu_t"), "clipboard.cut"); |
| 5949 | g_menu_appendcxx . . $ g_menu_append(e0dcbbb727250072). (section, _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("_Copy"), "clipboard.copy"); |
| 5950 | g_menu_appendcxx . . $ g_menu_append(e0dcbbb727250072). (section, _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("_Paste"), "clipboard.paste"); |
| 5951 | g_menu_appendcxx . . $ g_menu_append(e0dcbbb727250072). (section, _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("_Delete"), "selection.delete"); |
| 5952 | g_menu_append_sectioncxx . . $ g_menu_append_section(c86cfc865e6bc98d). (menu, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, G_MENU_MODELcxx . . $ `<external>/17783962342109199441/gmenumodel.h:116:9`! (section)); |
| 5953 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (section); |
| 5954 | |
| 5955 | section = g_menu_newcxx . . $ g_menu_new(19bd89629a99dfed). (); |
| 5956 | g_menu_appendcxx . . $ g_menu_append(e0dcbbb727250072). (section, _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("Select _All"), "selection.select-all"); |
| 5957 | g_menu_append_sectioncxx . . $ g_menu_append_section(c86cfc865e6bc98d). (menu, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, G_MENU_MODELcxx . . $ `<external>/17783962342109199441/gmenumodel.h:116:9`! (section)); |
| 5958 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (section); |
| 5959 | |
| 5960 | section = g_menu_newcxx . . $ g_menu_new(19bd89629a99dfed). (); |
| 5961 | item = g_menu_item_newcxx . . $ g_menu_item_new(985141034a53aa83). (_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("_Open Link"), "link.open"); |
| 5962 | g_menu_item_set_attributecxx . . $ g_menu_item_set_attribute(3bc81e74d1cbee70). (item, "hidden-when", "s", "action-disabled"); |
| 5963 | g_menu_append_itemcxx . . $ g_menu_append_item(ee09c6623c9aeb66). (section, item); |
| 5964 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (item); |
| 5965 | item = g_menu_item_newcxx . . $ g_menu_item_new(985141034a53aa83). (_cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("Copy _Link Address"), "link.copy"); |
| 5966 | g_menu_item_set_attributecxx . . $ g_menu_item_set_attribute(3bc81e74d1cbee70). (item, "hidden-when", "s", "action-disabled"); |
| 5967 | g_menu_append_itemcxx . . $ g_menu_append_item(ee09c6623c9aeb66). (section, item); |
| 5968 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (item); |
| 5969 | g_menu_append_sectioncxx . . $ g_menu_append_section(c86cfc865e6bc98d). (menu, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, G_MENU_MODELcxx . . $ `<external>/17783962342109199441/gmenumodel.h:116:9`! (section)); |
| 5970 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (section); |
| 5971 | |
| 5972 | gtk_joined_menu_append_menucxx . . $ gtk_joined_menu_append_menu(857889049a4b00dd). (joined, G_MENU_MODELcxx . . $ `<external>/17783962342109199441/gmenumodel.h:116:9`! (menu)); |
| 5973 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (menu); |
| 5974 | |
| 5975 | if (self->extra_menucxx . . $ _GtkLabel#extra_menu.) |
| 5976 | gtk_joined_menu_append_menucxx . . $ gtk_joined_menu_append_menu(857889049a4b00dd). (joined, self->extra_menucxx . . $ _GtkLabel#extra_menu.); |
| 5977 | |
| 5978 | return G_MENU_MODELcxx . . $ `<external>/17783962342109199441/gmenumodel.h:116:9`! (joined); |
| 5979 | } |
| 5980 | |
| 5981 | static void |
| 5982 | gtk_label_do_popupcxx . . $ gtk_label_do_popup(51c7cb9c710cadb5). (GtkLabelcxx . . $ GtkLabel# *self, |
| 5983 | double x, |
| 5984 | double y) |
| 5985 | { |
| 5986 | if (!self->select_infocxx . . $ _GtkLabel#select_info.) |
| 5987 | return; |
| 5988 | |
| 5989 | if (self->select_infocxx . . $ _GtkLabel#select_info.->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked.) |
| 5990 | self->select_infocxx . . $ _GtkLabel#select_info.->context_linkcxx . . $ _GtkLabelSelectionInfo#context_link. = self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.; |
| 5991 | else |
| 5992 | self->select_infocxx . . $ _GtkLabel#select_info.->context_linkcxx . . $ _GtkLabelSelectionInfo#context_link. = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5993 | |
| 5994 | gtk_label_update_actionscxx . . $ gtk_label_update_actions(e9c0e7bdc16b978e). (self); |
| 5995 | |
| 5996 | if (!self->popup_menucxx . . $ _GtkLabel#popup_menu.) |
| 5997 | { |
| 5998 | GMenuModelcxx . . $ GMenuModel# *model; |
| 5999 | |
| 6000 | model = gtk_label_get_menu_modelcxx . . $ gtk_label_get_menu_model(a8c8bf24dbc74d89). (self); |
| 6001 | self->popup_menucxx . . $ _GtkLabel#popup_menu. = gtk_popover_menu_new_from_modelcxx . . $ gtk_popover_menu_new_from_model(f2b4d3daa6c23d55). (model); |
| 6002 | gtk_widget_set_parentcxx . . $ gtk_widget_set_parent(4f261c0971c30e7). (self->popup_menucxx . . $ _GtkLabel#popup_menu., GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 6003 | gtk_popover_set_positioncxx . . $ gtk_popover_set_position(c8e9e28dedbd3540). (GTK_POPOVERcxx . . $ `gtk/gtkpopover.h:32:9`! (self->popup_menu), GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.); |
| 6004 | |
| 6005 | gtk_popover_set_has_arrowcxx . . $ gtk_popover_set_has_arrow(20283c8f4c8e9815). (GTK_POPOVERcxx . . $ `gtk/gtkpopover.h:32:9`! (self->popup_menu), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 6006 | gtk_widget_set_haligncxx . . $ gtk_widget_set_halign(71362b4a1e4eb244). (self->popup_menucxx . . $ _GtkLabel#popup_menu., GTK_ALIGN_STARTcxx . . $ GTK_ALIGN_START.); |
| 6007 | |
| 6008 | gtk_accessible_update_propertycxx . . $ gtk_accessible_update_property(7f02be67e42032aa). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (self->popup_menucxx . . $ _GtkLabel#popup_menu.), |
| 6009 | GTK_ACCESSIBLE_PROPERTY_LABELcxx . . $ GTK_ACCESSIBLE_PROPERTY_LABEL., _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("Context menu"), |
| 6010 | -1); |
| 6011 | |
| 6012 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (model); |
| 6013 | } |
| 6014 | |
| 6015 | if (x != -1 && y != -1) |
| 6016 | { |
| 6017 | GdkRectanglecxx . . $ GdkRectangle# rect = { x, y, 1, 1 }; |
| 6018 | gtk_popover_set_pointing_tocxx . . $ gtk_popover_set_pointing_to(475af423499fed4). (GTK_POPOVERcxx . . $ `gtk/gtkpopover.h:32:9`! (self->popup_menu), &rect); |
| 6019 | } |
| 6020 | else |
| 6021 | gtk_popover_set_pointing_tocxx . . $ gtk_popover_set_pointing_to(475af423499fed4). (GTK_POPOVERcxx . . $ `gtk/gtkpopover.h:32:9`! (self->popup_menu), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6022 | |
| 6023 | gtk_popover_popupcxx . . $ gtk_popover_popup(b785fb6a7faea117). (GTK_POPOVERcxx . . $ `gtk/gtkpopover.h:32:9`! (self->popup_menu)); |
| 6024 | } |
| 6025 | |
| 6026 | /** |
| 6027 | * gtk_label_get_current_uri: |
| 6028 | * @self: a label |
| 6029 | * |
| 6030 | * Returns the URI for the active link in the label. |
| 6031 | * |
| 6032 | * The active link is the one under the mouse pointer or, in a |
| 6033 | * selectable label, the link in which the text cursor is currently |
| 6034 | * positioned. |
| 6035 | * |
| 6036 | * This function is intended for use in a [[email protected]::activate-link] |
| 6037 | * handler or for use in a [[email protected]::query-tooltip] handler. |
| 6038 | * |
| 6039 | * Returns: (nullable): the active URI |
| 6040 | */ |
| 6041 | const char * |
| 6042 | gtk_label_get_current_uricxx . . $ gtk_label_get_current_uri(204bfb80200b298b). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6043 | { |
| 6044 | const GtkLabelLinkcxx . . $ GtkLabelLink# *link; |
| 6045 | |
| 6046 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6047 | |
| 6048 | if (!self->select_infocxx . . $ _GtkLabel#select_info.) |
| 6049 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6050 | |
| 6051 | if (!self->select_infocxx . . $ _GtkLabel#select_info.->link_clickedcxx . . $ _GtkLabelSelectionInfo#link_clicked. && self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 6052 | link = gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6053 | else |
| 6054 | link = self->select_infocxx . . $ _GtkLabel#select_info.->active_linkcxx . . $ _GtkLabelSelectionInfo#active_link.; |
| 6055 | |
| 6056 | if (link) |
| 6057 | return link->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri.; |
| 6058 | |
| 6059 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6060 | } |
| 6061 | |
| 6062 | int |
| 6063 | _gtk_label_get_cursor_positioncxx . . $ _gtk_label_get_cursor_position(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6064 | { |
| 6065 | if (self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 6066 | return g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (self->textcxx . . $ _GtkLabel#text., |
| 6067 | self->textcxx . . $ _GtkLabel#text. + self->select_infocxx . . $ _GtkLabel#select_info.->selection_endcxx . . $ _GtkLabelSelectionInfo#selection_end.); |
| 6068 | |
| 6069 | return 0; |
| 6070 | } |
| 6071 | |
| 6072 | int |
| 6073 | _gtk_label_get_selection_boundcxx . . $ _gtk_label_get_selection_bound(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6074 | { |
| 6075 | if (self->select_infocxx . . $ _GtkLabel#select_info. && self->select_infocxx . . $ _GtkLabel#select_info.->selectablecxx . . $ _GtkLabelSelectionInfo#selectable.) |
| 6076 | return g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (self->textcxx . . $ _GtkLabel#text., |
| 6077 | self->textcxx . . $ _GtkLabel#text. + self->select_infocxx . . $ _GtkLabel#select_info.->selection_anchorcxx . . $ _GtkLabelSelectionInfo#selection_anchor.); |
| 6078 | |
| 6079 | return 0; |
| 6080 | } |
| 6081 | |
| 6082 | /** |
| 6083 | * gtk_label_set_lines: |
| 6084 | * @self: a label |
| 6085 | * @lines: the desired number of lines, or -1 |
| 6086 | * |
| 6087 | * Sets the number of lines to which an ellipsized, wrapping label |
| 6088 | * should be limited. |
| 6089 | * |
| 6090 | * This has no effect if the label is not wrapping or ellipsized. |
| 6091 | * Set this to -1 if you don’t want to limit the number of lines. |
| 6092 | */ |
| 6093 | void |
| 6094 | gtk_label_set_linescxx . . $ gtk_label_set_lines(ae51c99326df3b2e). (GtkLabelcxx . . $ GtkLabel# *self, |
| 6095 | int lines) |
| 6096 | { |
| 6097 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 6098 | |
| 6099 | if (self->linescxx . . $ _GtkLabel#lines. != lines) |
| 6100 | { |
| 6101 | self->linescxx . . $ _GtkLabel#lines. = lines; |
| 6102 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 6103 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_LINEScxx . . $ PROP_LINES.]); |
| 6104 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 6105 | } |
| 6106 | } |
| 6107 | |
| 6108 | /** |
| 6109 | * gtk_label_get_lines: |
| 6110 | * @self: a label |
| 6111 | * |
| 6112 | * Gets the number of lines to which an ellipsized, wrapping |
| 6113 | * label should be limited. |
| 6114 | * |
| 6115 | * See [[email protected]_lines]. |
| 6116 | * |
| 6117 | * Returns: the number of lines |
| 6118 | */ |
| 6119 | int |
| 6120 | gtk_label_get_linescxx . . $ gtk_label_get_lines(f95750b06aaf936a). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6121 | { |
| 6122 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), -1); |
| 6123 | |
| 6124 | return self->linescxx . . $ _GtkLabel#lines.; |
| 6125 | } |
| 6126 | |
| 6127 | /** |
| 6128 | * gtk_label_set_xalign: |
| 6129 | * @self: a label |
| 6130 | * @xalign: the new xalign value, between 0 and 1 |
| 6131 | * |
| 6132 | * Sets the `xalign` of the label. |
| 6133 | * |
| 6134 | * See the [[email protected]:xalign] property. |
| 6135 | */ |
| 6136 | void |
| 6137 | gtk_label_set_xaligncxx . . $ gtk_label_set_xalign(5155ad053c7b621). (GtkLabelcxx . . $ GtkLabel# *self, |
| 6138 | float xalign) |
| 6139 | { |
| 6140 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 6141 | |
| 6142 | xalign = CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (xalign, 0.0, 1.0); |
| 6143 | |
| 6144 | if (self->xaligncxx . . $ _GtkLabel#xalign. == xalign) |
| 6145 | return; |
| 6146 | |
| 6147 | self->xaligncxx . . $ _GtkLabel#xalign. = xalign; |
| 6148 | |
| 6149 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 6150 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_XALIGNcxx . . $ PROP_XALIGN.]); |
| 6151 | } |
| 6152 | |
| 6153 | /** |
| 6154 | * gtk_label_get_xalign: |
| 6155 | * @self: a label |
| 6156 | * |
| 6157 | * Gets the `xalign` of the label. |
| 6158 | * |
| 6159 | * See the [[email protected]:xalign] property. |
| 6160 | * |
| 6161 | * Returns: the xalign value |
| 6162 | */ |
| 6163 | float |
| 6164 | gtk_label_get_xaligncxx . . $ gtk_label_get_xalign(c27ac19384a22bcd). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6165 | { |
| 6166 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), 0.5); |
| 6167 | |
| 6168 | return self->xaligncxx . . $ _GtkLabel#xalign.; |
| 6169 | } |
| 6170 | |
| 6171 | /** |
| 6172 | * gtk_label_set_yalign: |
| 6173 | * @self: a label |
| 6174 | * @yalign: the new yalign value, between 0 and 1 |
| 6175 | * |
| 6176 | * Sets the `yalign` of the label. |
| 6177 | * |
| 6178 | * See the [[email protected]:yalign] property. |
| 6179 | */ |
| 6180 | void |
| 6181 | gtk_label_set_yaligncxx . . $ gtk_label_set_yalign(5155ad053c7b621). (GtkLabelcxx . . $ GtkLabel# *self, |
| 6182 | float yalign) |
| 6183 | { |
| 6184 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 6185 | |
| 6186 | yalign = CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (yalign, 0.0, 1.0); |
| 6187 | |
| 6188 | if (self->yaligncxx . . $ _GtkLabel#yalign. == yalign) |
| 6189 | return; |
| 6190 | |
| 6191 | self->yaligncxx . . $ _GtkLabel#yalign. = yalign; |
| 6192 | |
| 6193 | gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 6194 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_YALIGNcxx . . $ PROP_YALIGN.]); |
| 6195 | } |
| 6196 | |
| 6197 | /** |
| 6198 | * gtk_label_get_yalign: |
| 6199 | * @self: a label |
| 6200 | * |
| 6201 | * Gets the `yalign` of the label. |
| 6202 | * |
| 6203 | * See the [[email protected]:yalign] property. |
| 6204 | * |
| 6205 | * Returns: the yalign value |
| 6206 | */ |
| 6207 | float |
| 6208 | gtk_label_get_yaligncxx . . $ gtk_label_get_yalign(c27ac19384a22bcd). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6209 | { |
| 6210 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), 0.5); |
| 6211 | |
| 6212 | return self->yaligncxx . . $ _GtkLabel#yalign.; |
| 6213 | } |
| 6214 | |
| 6215 | /** |
| 6216 | * gtk_label_set_extra_menu: |
| 6217 | * @self: a label |
| 6218 | * @model: (nullable): a menu model |
| 6219 | * |
| 6220 | * Sets a menu model to add to the context menu of the label. |
| 6221 | */ |
| 6222 | void |
| 6223 | gtk_label_set_extra_menucxx . . $ gtk_label_set_extra_menu(eab1131cd29cad37). (GtkLabelcxx . . $ GtkLabel# *self, |
| 6224 | GMenuModelcxx . . $ GMenuModel# *model) |
| 6225 | { |
| 6226 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 6227 | |
| 6228 | if (g_set_objectcxx . . $ `<external>/1341695927569185362/gobject.h:762:9`! (&self->extra_menu, model)) |
| 6229 | { |
| 6230 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->popup_menu, gtk_widget_unparent); |
| 6231 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_EXTRA_MENUcxx . . $ PROP_EXTRA_MENU.]); |
| 6232 | } |
| 6233 | } |
| 6234 | |
| 6235 | /** |
| 6236 | * gtk_label_get_extra_menu: |
| 6237 | * @self: a label |
| 6238 | * |
| 6239 | * Gets the extra menu model of the label. |
| 6240 | * |
| 6241 | * See [[email protected]_extra_menu]. |
| 6242 | * |
| 6243 | * Returns: (transfer none) (nullable): the menu model |
| 6244 | */ |
| 6245 | GMenuModelcxx . . $ GMenuModel# * |
| 6246 | gtk_label_get_extra_menucxx . . $ gtk_label_get_extra_menu(a8c8bf24dbc74d89). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6247 | { |
| 6248 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6249 | |
| 6250 | return self->extra_menucxx . . $ _GtkLabel#extra_menu.; |
| 6251 | } |
| 6252 | |
| 6253 | /** |
| 6254 | * gtk_label_set_tabs: |
| 6255 | * @self: a label |
| 6256 | * @tabs: (nullable): tab stops |
| 6257 | * |
| 6258 | * Sets tab stops for the label. |
| 6259 | * |
| 6260 | * Since: 4.8 |
| 6261 | */ |
| 6262 | void |
| 6263 | gtk_label_set_tabscxx . . $ gtk_label_set_tabs(65de53a7c9847453). (GtkLabelcxx . . $ GtkLabel# *self, |
| 6264 | PangoTabArraycxx . . $ PangoTabArray# *tabs) |
| 6265 | { |
| 6266 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self)); |
| 6267 | |
| 6268 | if (self->tabscxx . . $ _GtkLabel#tabs. == tabs) |
| 6269 | return; |
| 6270 | |
| 6271 | if (self->tabscxx . . $ _GtkLabel#tabs.) |
| 6272 | pango_tab_array_freecxx . . $ pango_tab_array_free(41638b23f39bcdfc). (self->tabscxx . . $ _GtkLabel#tabs.); |
| 6273 | self->tabscxx . . $ _GtkLabel#tabs. = pango_tab_array_copycxx . . $ pango_tab_array_copy(be1edf785c82c6b7). (tabs); |
| 6274 | |
| 6275 | gtk_label_clear_layoutcxx . . $ gtk_label_clear_layout(e9c0e7bdc16b978e). (self); |
| 6276 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), label_propscxx . . $ label_props.[PROP_TABScxx . . $ PROP_TABS.]); |
| 6277 | gtk_widget_queue_resizecxx . . $ gtk_widget_queue_resize(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 6278 | } |
| 6279 | |
| 6280 | /** |
| 6281 | * gtk_label_get_tabs: |
| 6282 | * @self: a label |
| 6283 | * |
| 6284 | * Gets the tab stops for the label. |
| 6285 | * |
| 6286 | * The returned array will be `NULL` if “standard” (8-space) tabs are used. |
| 6287 | * |
| 6288 | * Returns: (nullable) (transfer full): copy of default tab array, |
| 6289 | * or `NULL` if standard tabs are used |
| 6290 | * |
| 6291 | * Since: 4.8 |
| 6292 | */ |
| 6293 | PangoTabArraycxx . . $ PangoTabArray# * |
| 6294 | gtk_label_get_tabscxx . . $ gtk_label_get_tabs(6c1fef69483a40ff). (GtkLabelcxx . . $ GtkLabel# *self) |
| 6295 | { |
| 6296 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_LABELcxx . . $ `gtk/gtklabel.h:37:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6297 | |
| 6298 | return self->tabscxx . . $ _GtkLabel#tabs. ? pango_tab_array_copycxx . . $ pango_tab_array_copy(be1edf785c82c6b7). (self->tabscxx . . $ _GtkLabel#tabs.) : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6299 | } |
| 6300 | |
| 6301 | /* {{{ GtkAccessible implementation */ |
| 6302 | |
| 6303 | static void |
| 6304 | gtk_label_link_ensure_accessiblecxx . . $ gtk_label_link_ensure_accessible(5d07af12ff5fbeb). (GtkLabelcxx . . $ GtkLabel# *self, |
| 6305 | GtkLabelLinkcxx . . $ GtkLabelLink# *link, |
| 6306 | gsizecxx . . $ gsize# index) |
| 6307 | { |
| 6308 | if (!link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.) |
| 6309 | { |
| 6310 | GtkAccessibleTextRangecxx . . $ GtkAccessibleTextRange# range; |
| 6311 | GtkLabelLinkcxx . . $ GtkLabelLink# *next = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6312 | |
| 6313 | range.startcxx . . $ $anonymous_type_cb8706e802dea826_0#start. = link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 6314 | range.lengthcxx . . $ $anonymous_type_cb8706e802dea826_0#length. = link->endcxx . . $ $anonymous_type_52cf8198354a9553_0#end. - link->startcxx . . $ $anonymous_type_52cf8198354a9553_0#start.; |
| 6315 | link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible. = gtk_accessible_hyperlink_newcxx . . $ gtk_accessible_hyperlink_new(92e232f8ba5304e3). (GTK_ACCESSIBLE_HYPERTEXTcxx . . $ GTK_ACCESSIBLE_HYPERTEXT(e4206c114fdb8235). (self), index, link->uricxx . . $ $anonymous_type_52cf8198354a9553_0#uri., &range); |
| 6316 | |
| 6317 | if (index + 1 < self->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.) |
| 6318 | { |
| 6319 | next = &self->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[index + 1]; |
| 6320 | gtk_label_link_ensure_accessiblecxx . . $ gtk_label_link_ensure_accessible(5d07af12ff5fbeb). (self, next, index + 1); |
| 6321 | } |
| 6322 | |
| 6323 | gtk_accessible_set_accessible_parentcxx . . $ gtk_accessible_set_accessible_parent(7907974e87fb079f). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.), |
| 6324 | GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (self), |
| 6325 | next ? GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (next->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.) : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6326 | |
| 6327 | if (link->titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title.) |
| 6328 | gtk_accessible_update_propertycxx . . $ gtk_accessible_update_property(7f02be67e42032aa). (GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.), |
| 6329 | GTK_ACCESSIBLE_PROPERTY_DESCRIPTIONcxx . . $ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION., |
| 6330 | link->titlecxx . . $ $anonymous_type_52cf8198354a9553_0#title., |
| 6331 | -1); |
| 6332 | |
| 6333 | gtk_accessible_hyperlink_set_platform_statecxx . . $ gtk_accessible_hyperlink_set_platform_state(e771b93471ea0ba2). (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible., |
| 6334 | GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLEcxx . . $ GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE., |
| 6335 | TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 6336 | |
| 6337 | if (link == gtk_label_get_focus_linkcxx . . $ gtk_label_get_focus_link(fba94915d93cc5f). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) |
| 6338 | gtk_accessible_hyperlink_set_platform_statecxx . . $ gtk_accessible_hyperlink_set_platform_state(e771b93471ea0ba2). (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible., |
| 6339 | GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSEDcxx . . $ GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED., |
| 6340 | TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 6341 | } |
| 6342 | } |
| 6343 | |
| 6344 | static GtkAccessiblecxx . . $ GtkAccessible# * |
| 6345 | gtk_label_accessible_get_first_accessible_childcxx . . $ gtk_label_accessible_get_first_accessible_child(ef1fb94f5b667752). (GtkAccessiblecxx . . $ GtkAccessible# *self) |
| 6346 | { |
| 6347 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6348 | |
| 6349 | if (label->select_infocxx . . $ _GtkLabel#select_info. && label->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links. && |
| 6350 | 0 < label->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.) |
| 6351 | { |
| 6352 | GtkLabelLinkcxx . . $ GtkLabelLink# *link; |
| 6353 | |
| 6354 | link = &label->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[0]; |
| 6355 | |
| 6356 | gtk_label_link_ensure_accessiblecxx . . $ gtk_label_link_ensure_accessible(5d07af12ff5fbeb). (label, link, 0); |
| 6357 | |
| 6358 | return GTK_ACCESSIBLEcxx . . $ GTK_ACCESSIBLE(4ecffd44f086533a). (g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (link->accessible)); |
| 6359 | } |
| 6360 | |
| 6361 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6362 | } |
| 6363 | |
| 6364 | static void |
| 6365 | gtk_label_accessible_initcxx . . $ gtk_label_accessible_init(2a3ee8376ba476c7). (GtkAccessibleInterfacecxx . . $ GtkAccessibleInterface# *iface) |
| 6366 | { |
| 6367 | GtkAccessibleInterfacecxx . . $ GtkAccessibleInterface# *parent = g_type_interface_peek_parentcxx . . $ g_type_interface_peek_parent(9f162e79bfc6c74). (iface); |
| 6368 | |
| 6369 | *iface = *parent; |
| 6370 | iface->get_first_accessible_childcxx . . $ _GtkAccessibleInterface#get_first_accessible_child. = gtk_label_accessible_get_first_accessible_childcxx . . $ gtk_label_accessible_get_first_accessible_child(ef1fb94f5b667752).; |
| 6371 | } |
| 6372 | |
| 6373 | /* }}} */ |
| 6374 | /* {{{ GtkAccessibleText implementation */ |
| 6375 | |
| 6376 | static GBytescxx . . $ GBytes# * |
| 6377 | gtk_label_accessible_text_get_contentscxx . . $ gtk_label_accessible_text_get_contents(ef0e26a5af5fd4eb). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6378 | unsigned int start, |
| 6379 | unsigned int end) |
| 6380 | { |
| 6381 | const char *text; |
| 6382 | int len; |
| 6383 | char *string; |
| 6384 | gsizecxx . . $ gsize# size; |
| 6385 | |
| 6386 | text = gtk_label_get_textcxx . . $ gtk_label_get_text(204bfb80200b298b). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self)); |
| 6387 | len = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (text, -1); |
| 6388 | |
| 6389 | start = CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (start, 0, len); |
| 6390 | end = CLAMPcxx . . $ `<external>/12741050725406041920/gmacros.h:984:9`! (end, 0, len); |
| 6391 | |
| 6392 | if (end <= start) |
| 6393 | { |
| 6394 | string = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (""); |
| 6395 | size = 1; |
| 6396 | } |
| 6397 | else |
| 6398 | { |
| 6399 | const char *p, *q; |
| 6400 | p = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (text, start); |
| 6401 | q = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (text, end); |
| 6402 | size = q - p + 1; |
| 6403 | string = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (p, q - p); |
| 6404 | } |
| 6405 | |
| 6406 | return g_bytes_new_takecxx . . $ g_bytes_new_take(390e96c79791c315). (string, size); |
| 6407 | } |
| 6408 | |
| 6409 | static GBytescxx . . $ GBytes# * |
| 6410 | gtk_label_accessible_text_get_contents_atcxx . . $ gtk_label_accessible_text_get_contents_at(78f96e6aab6cfa63). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6411 | unsigned int offset, |
| 6412 | GtkAccessibleTextGranularitycxx . . $ GtkAccessibleTextGranularity# granularity, |
| 6413 | unsigned int *start, |
| 6414 | unsigned int *end) |
| 6415 | { |
| 6416 | PangoLayoutcxx . . $ PangoLayout# *layout = gtk_label_get_layoutcxx . . $ gtk_label_get_layout(ced3673be56a6075). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self)); |
| 6417 | char *string = gtk_pango_get_string_atcxx . . $ gtk_pango_get_string_at(ac2432dbfd77d4e9). (layout, offset, granularity, start, end); |
| 6418 | |
| 6419 | return g_bytes_new_takecxx . . $ g_bytes_new_take(390e96c79791c315). (string, strlencxx . . $ strlen(751346f8406fd082). (string)); |
| 6420 | } |
| 6421 | |
| 6422 | static unsigned |
| 6423 | gtk_label_accessible_text_get_caret_positioncxx . . $ gtk_label_accessible_text_get_caret_position(9deda8c0ec2ab2fa). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self) |
| 6424 | { |
| 6425 | return _gtk_label_get_cursor_positioncxx . . $ _gtk_label_get_cursor_position(f95750b06aaf936a). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self)); |
| 6426 | } |
| 6427 | |
| 6428 | static gbooleancxx . . $ gboolean# |
| 6429 | gtk_label_accessible_text_get_selectioncxx . . $ gtk_label_accessible_text_get_selection(afc5abb486d456af). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6430 | gsizecxx . . $ gsize# *n_ranges, |
| 6431 | GtkAccessibleTextRangecxx . . $ GtkAccessibleTextRange# **ranges) |
| 6432 | { |
| 6433 | int start, end; |
| 6434 | |
| 6435 | if (!gtk_label_get_selection_boundscxx . . $ gtk_label_get_selection_bounds(bc170c9d14475c46). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self), &start, &end)) |
| 6436 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 6437 | |
| 6438 | *n_ranges = 1; |
| 6439 | *ranges = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (GtkAccessibleTextRange, 1); |
| 6440 | (*ranges)[0].startcxx . . $ $anonymous_type_cb8706e802dea826_0#start. = start; |
| 6441 | (*ranges)[0].lengthcxx . . $ $anonymous_type_cb8706e802dea826_0#length. = end - start; |
| 6442 | |
| 6443 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 6444 | } |
| 6445 | |
| 6446 | static void |
| 6447 | gtk_label_accessible_text_get_default_attributescxx . . $ gtk_label_accessible_text_get_default_attributes(93dcf5f400df7edf). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6448 | char ***attribute_names, |
| 6449 | char ***attribute_values) |
| 6450 | { |
| 6451 | PangoLayoutcxx . . $ PangoLayout# *layout = gtk_label_get_layoutcxx . . $ gtk_label_get_layout(ced3673be56a6075). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self)); |
| 6452 | char **names, **values; |
| 6453 | |
| 6454 | gtk_pango_get_default_attributescxx . . $ gtk_pango_get_default_attributes(dd2bba0c10e66d74). (layout, &names, &values); |
| 6455 | |
| 6456 | *attribute_names = names; |
| 6457 | *attribute_values = values; |
| 6458 | } |
| 6459 | |
| 6460 | static gbooleancxx . . $ gboolean# |
| 6461 | gtk_label_accessible_text_get_attributescxx . . $ gtk_label_accessible_text_get_attributes(ae86da8ca61e4586). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6462 | unsigned int offset, |
| 6463 | gsizecxx . . $ gsize# *n_ranges, |
| 6464 | GtkAccessibleTextRangecxx . . $ GtkAccessibleTextRange# **ranges, |
| 6465 | char ***attribute_names, |
| 6466 | char ***attribute_values) |
| 6467 | { |
| 6468 | PangoLayoutcxx . . $ PangoLayout# *layout = gtk_label_get_layoutcxx . . $ gtk_label_get_layout(ced3673be56a6075). (GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self)); |
| 6469 | unsigned int start, end; |
| 6470 | char **names, **values; |
| 6471 | |
| 6472 | gtk_pango_get_run_attributescxx . . $ gtk_pango_get_run_attributes(58710b5c7bfc1dd7). (layout, offset, &names, &values, &start, &end); |
| 6473 | |
| 6474 | *n_ranges = g_strv_lengthcxx . . $ g_strv_length(658e6f1ffe3b2f0c). (names); |
| 6475 | *ranges = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (GtkAccessibleTextRange, *n_ranges); |
| 6476 | |
| 6477 | for (unsigned i = 0; i < *n_ranges; i++) |
| 6478 | { |
| 6479 | GtkAccessibleTextRangecxx . . $ GtkAccessibleTextRange# *range = &(*ranges)[i]; |
| 6480 | |
| 6481 | range->startcxx . . $ $anonymous_type_cb8706e802dea826_0#start. = start; |
| 6482 | range->lengthcxx . . $ $anonymous_type_cb8706e802dea826_0#length. = end - start; |
| 6483 | } |
| 6484 | |
| 6485 | *attribute_names = names; |
| 6486 | *attribute_values = values; |
| 6487 | |
| 6488 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 6489 | } |
| 6490 | |
| 6491 | static gbooleancxx . . $ gboolean# |
| 6492 | gtk_label_accessible_text_get_extentscxx . . $ gtk_label_accessible_text_get_extents(d74fd6499cf9105e). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6493 | unsigned int start, |
| 6494 | unsigned int end, |
| 6495 | graphene_rect_tcxx . . $ graphene_rect_t# *extents) |
| 6496 | { |
| 6497 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6498 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 6499 | const char *text; |
| 6500 | float lx, ly; |
| 6501 | cairo_region_tcxx . . $ cairo_region_t# *range_clip; |
| 6502 | cairo_rectangle_int_tcxx . . $ cairo_rectangle_int_t# clip_rect; |
| 6503 | int range[2]; |
| 6504 | |
| 6505 | layout = label->layoutcxx . . $ _GtkLabel#layout.; |
| 6506 | text = label->textcxx . . $ _GtkLabel#text.; |
| 6507 | gtk_label_get_layout_locationcxx . . $ gtk_label_get_layout_location(8c422bc0344df158). (label, &lx, &ly); |
| 6508 | |
| 6509 | range[0] = g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (text, text + start); |
| 6510 | range[1] = g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (text, text + end); |
| 6511 | |
| 6512 | range_clip = gdk_pango_layout_get_clip_regioncxx . . $ gdk_pango_layout_get_clip_region(1098c307f6d08449). (layout, lx, ly, range, 1); |
| 6513 | cairo_region_get_extentscxx . . $ cairo_region_get_extents(bd22ca9d1a86fc40). (range_clip, &clip_rect); |
| 6514 | cairo_region_destroycxx . . $ cairo_region_destroy(35bc32d2a20e1aad). (range_clip); |
| 6515 | |
| 6516 | extents->origincxx . . $ _graphene_rect_t#origin..xcxx . . $ _graphene_point_t#x. = clip_rect.xcxx . . $ _cairo_rectangle_int#x.; |
| 6517 | extents->origincxx . . $ _graphene_rect_t#origin..ycxx . . $ _graphene_point_t#y. = clip_rect.ycxx . . $ _cairo_rectangle_int#y.; |
| 6518 | extents->sizecxx . . $ _graphene_rect_t#size..widthcxx . . $ _graphene_size_t#width. = clip_rect.widthcxx . . $ _cairo_rectangle_int#width.; |
| 6519 | extents->sizecxx . . $ _graphene_rect_t#size..heightcxx . . $ _graphene_size_t#height. = clip_rect.heightcxx . . $ _cairo_rectangle_int#height.; |
| 6520 | |
| 6521 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 6522 | } |
| 6523 | |
| 6524 | static gbooleancxx . . $ gboolean# |
| 6525 | gtk_label_accessible_text_get_offsetcxx . . $ gtk_label_accessible_text_get_offset(a9c664956c048c76). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6526 | const graphene_point_tcxx . . $ graphene_point_t# *point, |
| 6527 | unsigned int *offset) |
| 6528 | { |
| 6529 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6530 | int index; |
| 6531 | |
| 6532 | if (!get_layout_indexcxx . . $ get_layout_index(fdb5e341e448c584). (label, roundf (point->xcxx . . $ _graphene_point_t#x.), roundf (point->ycxx . . $ _graphene_point_t#y.), &index)) |
| 6533 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 6534 | |
| 6535 | *offset = (unsigned int) g_utf8_pointer_to_offsetcxx . . $ g_utf8_pointer_to_offset(c8a2ad4d5b2b629c). (label->textcxx . . $ _GtkLabel#text., label->textcxx . . $ _GtkLabel#text. + index); |
| 6536 | |
| 6537 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 6538 | } |
| 6539 | |
| 6540 | static gbooleancxx . . $ gboolean# |
| 6541 | gtk_label_accessible_text_set_caret_positioncxx . . $ gtk_label_accessible_text_set_caret_position(4ad510edc32da3ee). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6542 | unsigned int offset) |
| 6543 | { |
| 6544 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6545 | int index; |
| 6546 | |
| 6547 | if (!gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (label)) |
| 6548 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 6549 | |
| 6550 | index = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (label->textcxx . . $ _GtkLabel#text., offset) - label->textcxx . . $ _GtkLabel#text.; |
| 6551 | |
| 6552 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (label, index, index); |
| 6553 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 6554 | } |
| 6555 | |
| 6556 | static gbooleancxx . . $ gboolean# |
| 6557 | gtk_label_accessible_text_set_selectioncxx . . $ gtk_label_accessible_text_set_selection(9b81715a7e2c6418). (GtkAccessibleTextcxx . . $ GtkAccessibleText# *self, |
| 6558 | gsizecxx . . $ gsize# i, |
| 6559 | GtkAccessibleTextRangecxx . . $ GtkAccessibleTextRange# *range) |
| 6560 | { |
| 6561 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6562 | int index1, index2; |
| 6563 | |
| 6564 | if (!gtk_label_get_selectablecxx . . $ gtk_label_get_selectable(f95750b06aaf936a). (label)) |
| 6565 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 6566 | |
| 6567 | if (i != 0) |
| 6568 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 6569 | |
| 6570 | index1 = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (label->textcxx . . $ _GtkLabel#text., range->startcxx . . $ $anonymous_type_cb8706e802dea826_0#start.) - label->textcxx . . $ _GtkLabel#text.; |
| 6571 | index2 = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (label->textcxx . . $ _GtkLabel#text., range->startcxx . . $ $anonymous_type_cb8706e802dea826_0#start. + range->lengthcxx . . $ $anonymous_type_cb8706e802dea826_0#length.) - label->textcxx . . $ _GtkLabel#text.; |
| 6572 | |
| 6573 | gtk_label_select_region_indexcxx . . $ gtk_label_select_region_index(236c15b30fe93ff9). (label, index1, index2); |
| 6574 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 6575 | } |
| 6576 | |
| 6577 | static void |
| 6578 | gtk_label_accessible_text_initcxx . . $ gtk_label_accessible_text_init(f16ef2bef1583fe). (GtkAccessibleTextInterfacecxx . . $ GtkAccessibleTextInterface# *iface) |
| 6579 | { |
| 6580 | iface->get_contentscxx . . $ _GtkAccessibleTextInterface#get_contents. = gtk_label_accessible_text_get_contentscxx . . $ gtk_label_accessible_text_get_contents(ef0e26a5af5fd4eb).; |
| 6581 | iface->get_contents_atcxx . . $ _GtkAccessibleTextInterface#get_contents_at. = gtk_label_accessible_text_get_contents_atcxx . . $ gtk_label_accessible_text_get_contents_at(78f96e6aab6cfa63).; |
| 6582 | iface->get_caret_positioncxx . . $ _GtkAccessibleTextInterface#get_caret_position. = gtk_label_accessible_text_get_caret_positioncxx . . $ gtk_label_accessible_text_get_caret_position(9deda8c0ec2ab2fa).; |
| 6583 | iface->get_selectioncxx . . $ _GtkAccessibleTextInterface#get_selection. = gtk_label_accessible_text_get_selectioncxx . . $ gtk_label_accessible_text_get_selection(afc5abb486d456af).; |
| 6584 | iface->get_attributescxx . . $ _GtkAccessibleTextInterface#get_attributes. = gtk_label_accessible_text_get_attributescxx . . $ gtk_label_accessible_text_get_attributes(ae86da8ca61e4586).; |
| 6585 | iface->get_default_attributescxx . . $ _GtkAccessibleTextInterface#get_default_attributes. = gtk_label_accessible_text_get_default_attributescxx . . $ gtk_label_accessible_text_get_default_attributes(93dcf5f400df7edf).; |
| 6586 | iface->get_extentscxx . . $ _GtkAccessibleTextInterface#get_extents. = gtk_label_accessible_text_get_extentscxx . . $ gtk_label_accessible_text_get_extents(d74fd6499cf9105e).; |
| 6587 | iface->get_offsetcxx . . $ _GtkAccessibleTextInterface#get_offset. = gtk_label_accessible_text_get_offsetcxx . . $ gtk_label_accessible_text_get_offset(a9c664956c048c76).; |
| 6588 | iface->set_caret_positioncxx . . $ _GtkAccessibleTextInterface#set_caret_position. = gtk_label_accessible_text_set_caret_positioncxx . . $ gtk_label_accessible_text_set_caret_position(4ad510edc32da3ee).; |
| 6589 | iface->set_selectioncxx . . $ _GtkAccessibleTextInterface#set_selection. = gtk_label_accessible_text_set_selectioncxx . . $ gtk_label_accessible_text_set_selection(9b81715a7e2c6418).; |
| 6590 | } |
| 6591 | |
| 6592 | /* }}} */ |
| 6593 | /* {{{ GtkAccessibleHypertext implementation */ |
| 6594 | |
| 6595 | static unsigned int |
| 6596 | gtk_label_accessible_hypertext_get_n_linkscxx . . $ gtk_label_accessible_hypertext_get_n_links(53738b10784cf2cc). (GtkAccessibleHypertextcxx . . $ GtkAccessibleHypertext# *self) |
| 6597 | { |
| 6598 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6599 | |
| 6600 | if (label->select_infocxx . . $ _GtkLabel#select_info. && label->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.) |
| 6601 | return label->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.; |
| 6602 | |
| 6603 | return 0; |
| 6604 | } |
| 6605 | |
| 6606 | static GtkAccessibleHyperlinkcxx . . $ GtkAccessibleHyperlink# * |
| 6607 | gtk_label_accessible_hypertext_get_linkcxx . . $ gtk_label_accessible_hypertext_get_link(d850b4ec79a5b9b8). (GtkAccessibleHypertextcxx . . $ GtkAccessibleHypertext# *self, |
| 6608 | unsigned int index) |
| 6609 | { |
| 6610 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6611 | |
| 6612 | if (label->select_infocxx . . $ _GtkLabel#select_info. && label->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links. && |
| 6613 | index < label->select_infocxx . . $ _GtkLabel#select_info.->n_linkscxx . . $ _GtkLabelSelectionInfo#n_links.) |
| 6614 | { |
| 6615 | GtkLabelLinkcxx . . $ GtkLabelLink# *link; |
| 6616 | |
| 6617 | link = &label->select_infocxx . . $ _GtkLabel#select_info.->linkscxx . . $ _GtkLabelSelectionInfo#links.[index]; |
| 6618 | |
| 6619 | gtk_label_link_ensure_accessiblecxx . . $ gtk_label_link_ensure_accessible(5d07af12ff5fbeb). (label, link, index); |
| 6620 | |
| 6621 | return GTK_ACCESSIBLE_HYPERLINKcxx . . $ GTK_ACCESSIBLE_HYPERLINK(29c9a84cb9e9c536). (link->accessiblecxx . . $ $anonymous_type_52cf8198354a9553_0#accessible.); |
| 6622 | } |
| 6623 | |
| 6624 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6625 | } |
| 6626 | |
| 6627 | static unsigned int |
| 6628 | gtk_label_accessible_hypertext_get_link_atcxx . . $ gtk_label_accessible_hypertext_get_link_at(7a3381dd084a62ce). (GtkAccessibleHypertextcxx . . $ GtkAccessibleHypertext# *self, |
| 6629 | unsigned int offset) |
| 6630 | { |
| 6631 | GtkLabelcxx . . $ GtkLabel# *label = GTK_LABELcxx . . $ `gtk/gtklabel.h:36:9`! (self); |
| 6632 | int pos; |
| 6633 | int link_index; |
| 6634 | |
| 6635 | pos = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (label->textcxx . . $ _GtkLabel#text., offset) - label->textcxx . . $ _GtkLabel#text.; |
| 6636 | link_index = _gtk_label_get_link_atcxx . . $ _gtk_label_get_link_at(7d3bc1c500b2b3a9). (label, pos); |
| 6637 | |
| 6638 | if (link_index != -1) |
| 6639 | return (unsigned int) link_index; |
| 6640 | |
| 6641 | return G_MAXUINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:40:9`!; |
| 6642 | } |
| 6643 | |
| 6644 | static void |
| 6645 | gtk_label_accessible_hypertext_initcxx . . $ gtk_label_accessible_hypertext_init(76d84d2a50ed55e6). (GtkAccessibleHypertextInterfacecxx . . $ GtkAccessibleHypertextInterface# *iface) |
| 6646 | { |
| 6647 | iface->get_n_linkscxx . . $ _GtkAccessibleHypertextInterface#get_n_links. = gtk_label_accessible_hypertext_get_n_linkscxx . . $ gtk_label_accessible_hypertext_get_n_links(53738b10784cf2cc).; |
| 6648 | iface->get_linkcxx . . $ _GtkAccessibleHypertextInterface#get_link. = gtk_label_accessible_hypertext_get_linkcxx . . $ gtk_label_accessible_hypertext_get_link(d850b4ec79a5b9b8).; |
| 6649 | iface->get_link_atcxx . . $ _GtkAccessibleHypertextInterface#get_link_at. = gtk_label_accessible_hypertext_get_link_atcxx . . $ gtk_label_accessible_hypertext_get_link_at(7a3381dd084a62ce).; |
| 6650 | } |
| 6651 | |
| 6652 | /* }}} */ |
| 6653 | |
| 6654 | /* vim:set foldmethod=marker: */ |
| 6655 |