| 1 | /* |
| 2 | * Gtktextbtree.c -- |
| 3 | * |
| 4 | * This file contains code that manages the B-tree representation |
| 5 | * of text for the text buffer and implements character and |
| 6 | * toggle segment types. |
| 7 | * |
| 8 | * Copyright (c) 1992-1994 The Regents of the University of California. |
| 9 | * Copyright (c) 1994-1995 Sun Microsystems, Inc. |
| 10 | * Copyright (c) 2000 Red Hat, Inc. |
| 11 | * Tk -> Gtk port by Havoc Pennington <[email protected]> |
| 12 | * |
| 13 | * This software is copyrighted by the Regents of the University of |
| 14 | * California, Sun Microsystems, Inc., and other parties. The |
| 15 | * following terms apply to all files associated with the software |
| 16 | * unless explicitly disclaimed in individual files. |
| 17 | * |
| 18 | * The authors hereby grant permission to use, copy, modify, |
| 19 | * distribute, and license this software and its documentation for any |
| 20 | * purpose, provided that existing copyright notices are retained in |
| 21 | * all copies and that this notice is included verbatim in any |
| 22 | * distributions. No written agreement, license, or royalty fee is |
| 23 | * required for any of the authorized uses. Modifications to this |
| 24 | * software may be copyrighted by their authors and need not follow |
| 25 | * the licensing terms described here, provided that the new terms are |
| 26 | * clearly indicated on the first page of each file where they apply. |
| 27 | * |
| 28 | * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY |
| 29 | * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL |
| 30 | * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, |
| 31 | * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED |
| 32 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
| 33 | * |
| 34 | * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, |
| 35 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 36 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND |
| 37 | * NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, |
| 38 | * AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE |
| 39 | * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 40 | * |
| 41 | * GOVERNMENT USE: If you are acquiring this software on behalf of the |
| 42 | * U.S. government, the Government shall have only "Restricted Rights" |
| 43 | * in the software and related documentation as defined in the Federal |
| 44 | * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you |
| 45 | * are acquiring the software on behalf of the Department of Defense, |
| 46 | * the software shall be classified as "Commercial Computer Software" |
| 47 | * and the Government shall have only "Restricted Rights" as defined |
| 48 | * in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the |
| 49 | * foregoing, the authors grant the U.S. Government and others acting |
| 50 | * in its behalf permission to use and distribute the software in |
| 51 | * accordance with the terms specified in this license. |
| 52 | * |
| 53 | */ |
| 54 | |
| 55 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 56 | #include "gtktextbtreeprivate.h"cxx . . $ `<file>/gtk/gtktextbtreeprivate.h`/ |
| 57 | #include <string.h> |
| 58 | #include <stdlib.h> |
| 59 | #include <stdio.h> |
| 60 | #include "gtktextbufferprivate.h"cxx . . $ `<file>/gtk/gtktextbufferprivate.h`/ |
| 61 | #include "gtktexttag.h"cxx . . $ `<file>/gtk/gtktexttag.h`/ |
| 62 | #include "gtktexttagprivate.h"cxx . . $ `<file>/gtk/gtktexttagprivate.h`/ |
| 63 | #include "gtktexttagtableprivate.h"cxx . . $ `<file>/gtk/gtktexttagtableprivate.h`/ |
| 64 | #include "gtktextlayoutprivate.h"cxx . . $ `<file>/gtk/gtktextlayoutprivate.h`/ |
| 65 | #include "gtktextiterprivate.h"cxx . . $ `<file>/gtk/gtktextiterprivate.h`/ |
| 66 | #include "gtkdebug.h"cxx . . $ `<file>/gtk/gtkdebug.h`/ |
| 67 | #include "gtktextmarkprivate.h"cxx . . $ `<file>/gtk/gtktextmarkprivate.h`/ |
| 68 | #include "gtktextsegmentprivate.h"cxx . . $ `<file>/gtk/gtktextsegmentprivate.h`/ |
| 69 | #include "gtkpangoprivate.h"cxx . . $ `<file>/gtk/gtkpangoprivate.h`/ |
| 70 | #include "gdkprivate.h"cxx . . $ `<file>/gdk/gdkprivate.h`/ |
| 71 | |
| 72 | /* |
| 73 | * Types |
| 74 | */ |
| 75 | |
| 76 | |
| 77 | /* |
| 78 | * The structure below is used to pass information between |
| 79 | * _gtk_text_btree_get_tags and inc_count: |
| 80 | */ |
| 81 | |
| 82 | typedef struct TagInfocxx . . $ TagInfo# { |
| 83 | GPtrArraycxx . . $ GPtrArray# *tagscxx . . $ TagInfo#tags.; |
| 84 | GArraycxx . . $ GArray# *countscxx . . $ TagInfo#counts.; |
| 85 | } TagInfocxx . . $ TagInfo#; |
| 86 | |
| 87 | |
| 88 | /* |
| 89 | * This is used to store per-view width/height info at the tree nodes. |
| 90 | */ |
| 91 | |
| 92 | typedef struct _NodeDatacxx . . $ _NodeData# NodeDatacxx . . $ NodeData#; |
| 93 | |
| 94 | struct _NodeDatacxx . . $ _NodeData# { |
| 95 | gpointercxx . . $ gpointer# view_idcxx . . $ _NodeData#view_id.; |
| 96 | NodeDatacxx . . $ NodeData# *nextcxx . . $ _NodeData#next.; |
| 97 | |
| 98 | /* Height and width of this node */ |
| 99 | int heightcxx . . $ _NodeData#height.; |
| 100 | signed int widthcxx . . $ _NodeData#width. : 24; |
| 101 | |
| 102 | /* boolean indicating whether the lines below this node are in need of validation. |
| 103 | * However, width/height should always represent the current total width and |
| 104 | * max height for lines below this node; the valid flag indicates whether the |
| 105 | * width/height on the lines needs recomputing, not whether the totals |
| 106 | * need recomputing. |
| 107 | */ |
| 108 | guintcxx . . $ guint# validcxx . . $ _NodeData#valid. : 8; /* Actually a boolean */ |
| 109 | }; |
| 110 | |
| 111 | |
| 112 | /* |
| 113 | * The data structure below keeps summary information about one tag as part |
| 114 | * of the tag information in a node. |
| 115 | */ |
| 116 | |
| 117 | typedef struct Summarycxx . . $ Summary# { |
| 118 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *infocxx . . $ Summary#info.; /* Handle for tag. */ |
| 119 | int toggle_countcxx . . $ Summary#toggle_count.; /* Number of transitions into or |
| 120 | * out of this tag that occur in |
| 121 | * the subtree rooted at this node. */ |
| 122 | struct Summarycxx . . $ Summary# *nextcxx . . $ Summary#next.; /* Next in list of all tags for same |
| 123 | * node, or NULL if at end of list. */ |
| 124 | } Summarycxx . . $ Summary#; |
| 125 | |
| 126 | /* |
| 127 | * The data structure below defines a node in the B-tree. |
| 128 | */ |
| 129 | |
| 130 | struct _GtkTextBTreeNodecxx . . $ _GtkTextBTreeNode# { |
| 131 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *parentcxx . . $ _GtkTextBTreeNode#parent.; /* Pointer to parent node, or NULL if |
| 132 | * this is the root. */ |
| 133 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *nextcxx . . $ _GtkTextBTreeNode#next.; /* Next in list of siblings with the |
| 134 | * same parent node, or NULL for end |
| 135 | * of list. */ |
| 136 | Summarycxx . . $ Summary# *summarycxx . . $ _GtkTextBTreeNode#summary.; /* First in malloc-ed list of info |
| 137 | * about tags in this subtree (NULL if |
| 138 | * no tag info in the subtree). */ |
| 139 | int levelcxx . . $ _GtkTextBTreeNode#level.; /* Level of this node in the B-tree. |
| 140 | * 0 refers to the bottom of the tree |
| 141 | * (children are lines, not nodes). */ |
| 142 | int num_linescxx . . $ _GtkTextBTreeNode#num_lines.; /* Total number of lines (leaves) in |
| 143 | * the subtree rooted here. */ |
| 144 | int num_charscxx . . $ _GtkTextBTreeNode#num_chars.; /* Number of chars below here */ |
| 145 | int num_childrencxx . . $ _GtkTextBTreeNode#num_children.; /* Number of children of this node. */ |
| 146 | unioncxx . . $ _GtkTextBTreeNode#$anonymous_type_0# { /* First in linked list of children. */ |
| 147 | struct _GtkTextBTreeNodecxx . . $ _GtkTextBTreeNode# *nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; /* Used if level > 0. */ |
| 148 | GtkTextLinecxx . . $ GtkTextLine# *linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; /* Used if level == 0. */ |
| 149 | } childrencxx . . $ _GtkTextBTreeNode#children.; |
| 150 | |
| 151 | NodeDatacxx . . $ NodeData# *node_datacxx . . $ _GtkTextBTreeNode#node_data.; |
| 152 | }; |
| 153 | |
| 154 | |
| 155 | /* |
| 156 | * Used to store the list of views in our btree |
| 157 | */ |
| 158 | |
| 159 | typedef struct _BTreeViewcxx . . $ _BTreeView# BTreeViewcxx . . $ BTreeView#; |
| 160 | |
| 161 | struct _BTreeViewcxx . . $ _BTreeView# { |
| 162 | gpointercxx . . $ gpointer# view_idcxx . . $ _BTreeView#view_id.; |
| 163 | GtkTextLayoutcxx . . $ GtkTextLayout# *layoutcxx . . $ _BTreeView#layout.; |
| 164 | BTreeViewcxx . . $ BTreeView# *nextcxx . . $ _BTreeView#next.; |
| 165 | BTreeViewcxx . . $ BTreeView# *prevcxx . . $ _BTreeView#prev.; |
| 166 | }; |
| 167 | |
| 168 | /* |
| 169 | * And the tree itself |
| 170 | */ |
| 171 | |
| 172 | struct _GtkTextBTreecxx . . $ _GtkTextBTree# { |
| 173 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *root_nodecxx . . $ _GtkTextBTree#root_node.; /* Pointer to root of B-tree. */ |
| 174 | GtkTextTagTablecxx . . $ GtkTextTagTable# *tablecxx . . $ _GtkTextBTree#table.; |
| 175 | GHashTablecxx . . $ GHashTable# *mark_tablecxx . . $ _GtkTextBTree#mark_table.; |
| 176 | guintcxx . . $ guint# refcountcxx . . $ _GtkTextBTree#refcount.; |
| 177 | GtkTextMarkcxx . . $ GtkTextMark# *insert_markcxx . . $ _GtkTextBTree#insert_mark.; |
| 178 | GtkTextMarkcxx . . $ GtkTextMark# *selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.; |
| 179 | GtkTextBuffercxx . . $ GtkTextBuffer# *buffercxx . . $ _GtkTextBTree#buffer.; |
| 180 | BTreeViewcxx . . $ BTreeView# *viewscxx . . $ _GtkTextBTree#views.; |
| 181 | GSListcxx . . $ GSList# *tag_infoscxx . . $ _GtkTextBTree#tag_infos.; |
| 182 | gulongcxx . . $ gulong# tag_changed_handlercxx . . $ _GtkTextBTree#tag_changed_handler.; |
| 183 | |
| 184 | /* Incremented when a segment with a byte size > 0 |
| 185 | * is added to or removed from the tree (i.e. the |
| 186 | * length of a line may have changed, and lines may |
| 187 | * have been added or removed). This invalidates |
| 188 | * all outstanding iterators. |
| 189 | */ |
| 190 | guintcxx . . $ guint# chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp.; |
| 191 | /* Incremented when any segments are added or deleted; |
| 192 | * this makes outstanding iterators recalculate their |
| 193 | * pointed-to segment and segment offset. |
| 194 | */ |
| 195 | guintcxx . . $ guint# segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp.; |
| 196 | |
| 197 | /* Cache the last line in the buffer */ |
| 198 | GtkTextLinecxx . . $ GtkTextLine# *last_linecxx . . $ _GtkTextBTree#last_line.; |
| 199 | guintcxx . . $ guint# last_line_stampcxx . . $ _GtkTextBTree#last_line_stamp.; |
| 200 | |
| 201 | /* Cache the next-to-last line in the buffer, |
| 202 | * containing the end iterator |
| 203 | */ |
| 204 | GtkTextLinecxx . . $ GtkTextLine# *end_iter_linecxx . . $ _GtkTextBTree#end_iter_line.; |
| 205 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *end_iter_segmentcxx . . $ _GtkTextBTree#end_iter_segment.; |
| 206 | int end_iter_segment_byte_indexcxx . . $ _GtkTextBTree#end_iter_segment_byte_index.; |
| 207 | int end_iter_segment_char_offsetcxx . . $ _GtkTextBTree#end_iter_segment_char_offset.; |
| 208 | guintcxx . . $ guint# end_iter_line_stampcxx . . $ _GtkTextBTree#end_iter_line_stamp.; |
| 209 | guintcxx . . $ guint# end_iter_segment_stampcxx . . $ _GtkTextBTree#end_iter_segment_stamp.; |
| 210 | |
| 211 | GHashTablecxx . . $ GHashTable# *child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table.; |
| 212 | }; |
| 213 | |
| 214 | |
| 215 | /* |
| 216 | * Upper and lower bounds on how many children a node may have: |
| 217 | * rebalance when either of these limits is exceeded. MAX_CHILDREN |
| 218 | * should be twice MIN_CHILDREN and MIN_CHILDREN must be >= 2. |
| 219 | */ |
| 220 | |
| 221 | /* Tk used MAX of 12 and MIN of 6. This makes the tree wide and |
| 222 | shallow. It appears to be faster to locate a particular line number |
| 223 | if the tree is narrow and deep, since it is more finely sorted. I |
| 224 | guess this may increase memory use though, and make it slower to |
| 225 | walk the tree in order, or locate a particular byte index (which |
| 226 | is done by walking the tree in order). |
| 227 | |
| 228 | There's basically a tradeoff here. However I'm thinking we want to |
| 229 | add pixels, byte counts, and char counts to the tree nodes, |
| 230 | at that point narrow and deep should speed up all operations, |
| 231 | not just the line number searches. |
| 232 | */ |
| 233 | |
| 234 | #if 1 |
| 235 | #define MAX_CHILDRENcxx . . $ `gtk/gtktextbtree.c:235:9`! 12 |
| 236 | #define MIN_CHILDRENcxx . . $ `gtk/gtktextbtree.c:236:9`! 6 |
| 237 | #else |
| 238 | #define MAX_CHILDREN 6 |
| 239 | #define MIN_CHILDREN 3 |
| 240 | #endif |
| 241 | |
| 242 | /* |
| 243 | * Prototypes |
| 244 | */ |
| 245 | |
| 246 | static BTreeViewcxx . . $ BTreeView# *gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 247 | gpointercxx . . $ gpointer# view_id); |
| 248 | static void gtk_text_btree_rebalancecxx . . $ gtk_text_btree_rebalance(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 249 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node); |
| 250 | static GtkTextLinecxx . . $ GtkTextLine# * get_last_linecxx . . $ get_last_line(76b79c735937395b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree); |
| 251 | static void post_insert_fixupcxx . . $ post_insert_fixup(94e44c90f71c53cf). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 252 | GtkTextLinecxx . . $ GtkTextLine# *insert_line, |
| 253 | int line_count_delta, |
| 254 | int char_count_delta); |
| 255 | static void gtk_text_btree_node_adjust_toggle_countcxx . . $ gtk_text_btree_node_adjust_toggle_count(80783df9392c55b3). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 256 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info, |
| 257 | int adjust); |
| 258 | static gbooleancxx . . $ gboolean# gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 259 | GtkTextTagcxx . . $ GtkTextTag# *tag); |
| 260 | |
| 261 | static void segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree); |
| 262 | static void chars_changedcxx . . $ chars_changed(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree); |
| 263 | static void summary_list_destroycxx . . $ summary_list_destroy(da23a492de438288). (Summarycxx . . $ Summary# *summary); |
| 264 | static GtkTextLinecxx . . $ GtkTextLine# *gtk_text_line_newcxx . . $ gtk_text_line_new(afb6c06b1061482). (void); |
| 265 | static void gtk_text_line_destroycxx . . $ gtk_text_line_destroy(1061b1d198db82df). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 266 | GtkTextLinecxx . . $ GtkTextLine# *line); |
| 267 | static void gtk_text_line_set_parentcxx . . $ gtk_text_line_set_parent(7d665b62c00717d7). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 268 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node); |
| 269 | static void gtk_text_btree_node_remove_datacxx . . $ gtk_text_btree_node_remove_data(eec353699738d68c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 270 | gpointercxx . . $ gpointer# view_id); |
| 271 | |
| 272 | static GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *gtk_text_btree_node_newcxx . . $ gtk_text_btree_node_new(a680a392ceeb9bf1). (void); |
| 273 | #if 0 |
| 274 | static void gtk_text_btree_node_invalidate_downward (GtkTextBTreeNode *node); |
| 275 | #endif |
| 276 | static void gtk_text_btree_node_invalidate_upwardcxx . . $ gtk_text_btree_node_invalidate_upward(eec353699738d68c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 277 | gpointercxx . . $ gpointer# view_id); |
| 278 | static NodeDatacxx . . $ NodeData# * gtk_text_btree_node_check_validcxx . . $ gtk_text_btree_node_check_valid(862e614253708acc). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 279 | gpointercxx . . $ gpointer# view_id); |
| 280 | static NodeDatacxx . . $ NodeData# * gtk_text_btree_node_check_valid_downwardcxx . . $ gtk_text_btree_node_check_valid_downward(862e614253708acc). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 281 | gpointercxx . . $ gpointer# view_id); |
| 282 | static void gtk_text_btree_node_check_valid_upwardcxx . . $ gtk_text_btree_node_check_valid_upward(eec353699738d68c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 283 | gpointercxx . . $ gpointer# view_id); |
| 284 | |
| 285 | static void gtk_text_btree_node_remove_viewcxx . . $ gtk_text_btree_node_remove_view(ff44ee98a63e7187). (BTreeViewcxx . . $ BTreeView# *view, |
| 286 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 287 | gpointercxx . . $ gpointer# view_id); |
| 288 | static void gtk_text_btree_node_destroycxx . . $ gtk_text_btree_node_destroy(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 289 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node); |
| 290 | static void gtk_text_btree_node_free_emptycxx . . $ gtk_text_btree_node_free_empty(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 291 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node); |
| 292 | static NodeDatacxx . . $ NodeData# * gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 293 | gpointercxx . . $ gpointer# view_id); |
| 294 | static void gtk_text_btree_node_get_sizecxx . . $ gtk_text_btree_node_get_size(15e034dfd1dcbc08). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 295 | gpointercxx . . $ gpointer# view_id, |
| 296 | int *width, |
| 297 | int *height); |
| 298 | static GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# * gtk_text_btree_node_common_parentcxx . . $ gtk_text_btree_node_common_parent(d950424c3bfd6289). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node1, |
| 299 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node2); |
| 300 | static void get_tree_boundscxx . . $ get_tree_bounds(9e3d90874c713417). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 301 | GtkTextItercxx . . $ GtkTextIter# *start, |
| 302 | GtkTextItercxx . . $ GtkTextIter# *end); |
| 303 | static void tag_changed_cbcxx . . $ tag_changed_cb(eec6fbdb772e3911). (GtkTextTagTablecxx . . $ GtkTextTagTable# *table, |
| 304 | GtkTextTagcxx . . $ GtkTextTag# *tag, |
| 305 | gbooleancxx . . $ gboolean# size_changed, |
| 306 | GtkTextBTreecxx . . $ GtkTextBTree# *tree); |
| 307 | static void cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (GtkTextLinecxx . . $ GtkTextLine# *line); |
| 308 | static void recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 309 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node); |
| 310 | static void inc_countcxx . . $ inc_count(12efdf60738d4d4a). (GtkTextTagcxx . . $ GtkTextTag# *tag, |
| 311 | int inc, |
| 312 | TagInfocxx . . $ TagInfo# *tagInfoPtr); |
| 313 | |
| 314 | static void summary_destroycxx . . $ summary_destroy(da23a492de438288). (Summarycxx . . $ Summary# *summary); |
| 315 | |
| 316 | static void gtk_text_btree_link_segmentcxx . . $ gtk_text_btree_link_segment(fafcfc58c576ceba). (GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, |
| 317 | const GtkTextItercxx . . $ GtkTextIter# *iter); |
| 318 | static void gtk_text_btree_unlink_segmentcxx . . $ gtk_text_btree_unlink_segment(7c91a0bf59e632d8). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 319 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, |
| 320 | GtkTextLinecxx . . $ GtkTextLine# *line); |
| 321 | |
| 322 | |
| 323 | static GtkTextTagInfocxx . . $ GtkTextTagInfo# *gtk_text_btree_get_tag_infocxx . . $ gtk_text_btree_get_tag_info(dabcf248e7392eb5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 324 | GtkTextTagcxx . . $ GtkTextTag# *tag); |
| 325 | static GtkTextTagInfocxx . . $ GtkTextTagInfo# *gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 326 | GtkTextTagcxx . . $ GtkTextTag# *tag); |
| 327 | static void gtk_text_btree_remove_tag_infocxx . . $ gtk_text_btree_remove_tag_info(7d59af89fb7d77fc). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 328 | GtkTextTagcxx . . $ GtkTextTag# *tag); |
| 329 | |
| 330 | static void redisplay_regioncxx . . $ redisplay_region(45085b43b37ed786). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 331 | const GtkTextItercxx . . $ GtkTextIter# *start, |
| 332 | const GtkTextItercxx . . $ GtkTextIter# *end, |
| 333 | gbooleancxx . . $ gboolean# cursors_only); |
| 334 | |
| 335 | /* Inline thingies */ |
| 336 | |
| 337 | static inline void |
| 338 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 339 | { |
| 340 | tree->segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp. += 1; |
| 341 | } |
| 342 | |
| 343 | static inline void |
| 344 | chars_changedcxx . . $ chars_changed(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 345 | { |
| 346 | tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp. += 1; |
| 347 | } |
| 348 | |
| 349 | /* |
| 350 | * BTree operations |
| 351 | */ |
| 352 | |
| 353 | GtkTextBTreecxx . . $ GtkTextBTree#* |
| 354 | _gtk_text_btree_newcxx . . $ _gtk_text_btree_new(4dabb852328f845a). (GtkTextTagTablecxx . . $ GtkTextTagTable# *table, |
| 355 | GtkTextBuffercxx . . $ GtkTextBuffer# *buffer) |
| 356 | { |
| 357 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 358 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *root_node; |
| 359 | GtkTextLinecxx . . $ GtkTextLine# *line, *line2; |
| 360 | |
| 361 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_TEXT_TAG_TABLEcxx . . $ `gtk/gtktexttagtable.h:47:9`! (table), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 362 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_TEXT_BUFFERcxx . . $ `gtk/gtktextbuffer.h:42:9`! (buffer), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 363 | |
| 364 | /* |
| 365 | * The tree will initially have two empty lines. The second line |
| 366 | * isn't actually part of the tree's contents, but its presence |
| 367 | * makes several operations easier. The tree will have one GtkTextBTreeNode, |
| 368 | * which is also the root of the tree. |
| 369 | */ |
| 370 | |
| 371 | /* Create the root node. */ |
| 372 | |
| 373 | root_node = gtk_text_btree_node_newcxx . . $ gtk_text_btree_node_new(a680a392ceeb9bf1). (); |
| 374 | |
| 375 | line = gtk_text_line_newcxx . . $ gtk_text_line_new(afb6c06b1061482). (); |
| 376 | line2 = gtk_text_line_newcxx . . $ gtk_text_line_new(afb6c06b1061482). (); |
| 377 | |
| 378 | root_node->parentcxx . . $ _GtkTextBTreeNode#parent. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 379 | root_node->nextcxx . . $ _GtkTextBTreeNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 380 | root_node->summarycxx . . $ _GtkTextBTreeNode#summary. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 381 | root_node->levelcxx . . $ _GtkTextBTreeNode#level. = 0; |
| 382 | root_node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = line; |
| 383 | root_node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. = 2; |
| 384 | root_node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. = 2; |
| 385 | root_node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. = 2; |
| 386 | |
| 387 | line->parentcxx . . $ _GtkTextLine#parent. = root_node; |
| 388 | line->nextcxx . . $ _GtkTextLine#next. = line2; |
| 389 | |
| 390 | line->segmentscxx . . $ _GtkTextLine#segments. = _gtk_char_segment_newcxx . . $ _gtk_char_segment_new(8b37d961e8104b49). ("\n", 1); |
| 391 | |
| 392 | line2->parentcxx . . $ _GtkTextLine#parent. = root_node; |
| 393 | line2->nextcxx . . $ _GtkTextLine#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 394 | line2->segmentscxx . . $ _GtkTextLine#segments. = _gtk_char_segment_newcxx . . $ _gtk_char_segment_new(8b37d961e8104b49). ("\n", 1); |
| 395 | |
| 396 | /* Create the tree itself */ |
| 397 | |
| 398 | tree = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (GtkTextBTree, 1); |
| 399 | tree->root_nodecxx . . $ _GtkTextBTree#root_node. = root_node; |
| 400 | tree->tablecxx . . $ _GtkTextBTree#table. = table; |
| 401 | tree->viewscxx . . $ _GtkTextBTree#views. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 402 | |
| 403 | /* Set these to values that are unlikely to be found |
| 404 | * in random memory garbage, and also avoid |
| 405 | * duplicates between tree instances. |
| 406 | */ |
| 407 | tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp. = g_random_intcxx . . $ g_random_int(db52760e79bf9054). (); |
| 408 | tree->segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp. = g_random_intcxx . . $ g_random_int(db52760e79bf9054). (); |
| 409 | |
| 410 | tree->last_line_stampcxx . . $ _GtkTextBTree#last_line_stamp. = tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp. - 1; |
| 411 | tree->last_linecxx . . $ _GtkTextBTree#last_line. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 412 | |
| 413 | tree->end_iter_line_stampcxx . . $ _GtkTextBTree#end_iter_line_stamp. = tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp. - 1; |
| 414 | tree->end_iter_segment_stampcxx . . $ _GtkTextBTree#end_iter_segment_stamp. = tree->segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp. - 1; |
| 415 | tree->end_iter_linecxx . . $ _GtkTextBTree#end_iter_line. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 416 | tree->end_iter_segment_byte_indexcxx . . $ _GtkTextBTree#end_iter_segment_byte_index. = 0; |
| 417 | tree->end_iter_segment_char_offsetcxx . . $ _GtkTextBTree#end_iter_segment_char_offset. = 0; |
| 418 | |
| 419 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (tree->table); |
| 420 | |
| 421 | tree->tag_changed_handlercxx . . $ _GtkTextBTree#tag_changed_handler. = g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (tree->table, |
| 422 | "tag-changed", |
| 423 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (tag_changed_cb), |
| 424 | tree); |
| 425 | |
| 426 | tree->mark_tablecxx . . $ _GtkTextBTree#mark_table. = g_hash_table_newcxx . . $ g_hash_table_new(444186de27d60923). (g_str_hashcxx . . $ g_str_hash(b11f534102b1ad6)., g_str_equalcxx . . $ g_str_equal(9148c8c3ff42c9d8).); |
| 427 | tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 428 | |
| 429 | /* We don't ref the buffer, since the buffer owns us; |
| 430 | * we'd have some circularity issues. The buffer always |
| 431 | * lasts longer than the BTree |
| 432 | */ |
| 433 | tree->buffercxx . . $ _GtkTextBTree#buffer. = buffer; |
| 434 | |
| 435 | { |
| 436 | GtkTextItercxx . . $ GtkTextIter# start; |
| 437 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 438 | |
| 439 | _gtk_text_btree_get_iter_at_line_charcxx . . $ _gtk_text_btree_get_iter_at_line_char(6fbe15d16839bedf). (tree, &start, 0, 0); |
| 440 | |
| 441 | |
| 442 | tree->insert_markcxx . . $ _GtkTextBTree#insert_mark. = _gtk_text_btree_set_markcxx . . $ _gtk_text_btree_set_mark(b36acfd47245e118). (tree, |
| 443 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 444 | "insert", |
| 445 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 446 | &start, |
| 447 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 448 | |
| 449 | seg = tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.->segmentcxx . . $ _GtkTextMark#segment.; |
| 450 | |
| 451 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..not_deleteablecxx . . $ _GtkTextMarkBody#not_deleteable. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 452 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 453 | |
| 454 | tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark. = _gtk_text_btree_set_markcxx . . $ _gtk_text_btree_set_mark(b36acfd47245e118). (tree, |
| 455 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 456 | "selection_bound", |
| 457 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 458 | &start, |
| 459 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 460 | |
| 461 | seg = tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.->segmentcxx . . $ _GtkTextMark#segment.; |
| 462 | |
| 463 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..not_deleteablecxx . . $ _GtkTextMarkBody#not_deleteable. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 464 | |
| 465 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (tree->insert_mark); |
| 466 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (tree->selection_bound_mark); |
| 467 | } |
| 468 | |
| 469 | tree->refcountcxx . . $ _GtkTextBTree#refcount. = 1; |
| 470 | |
| 471 | return tree; |
| 472 | } |
| 473 | |
| 474 | void |
| 475 | _gtk_text_btree_refcxx . . $ _gtk_text_btree_ref(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 476 | { |
| 477 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 478 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree->refcount > 0); |
| 479 | |
| 480 | tree->refcountcxx . . $ _GtkTextBTree#refcount. += 1; |
| 481 | } |
| 482 | |
| 483 | void |
| 484 | _gtk_text_btree_unrefcxx . . $ _gtk_text_btree_unref(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 485 | { |
| 486 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 487 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree->refcount > 0); |
| 488 | |
| 489 | tree->refcountcxx . . $ _GtkTextBTree#refcount. -= 1; |
| 490 | |
| 491 | if (tree->refcountcxx . . $ _GtkTextBTree#refcount. == 0) |
| 492 | { |
| 493 | g_signal_handler_disconnectcxx . . $ g_signal_handler_disconnect(5500c4293b1bbef0). (tree->tablecxx . . $ _GtkTextBTree#table., |
| 494 | tree->tag_changed_handlercxx . . $ _GtkTextBTree#tag_changed_handler.); |
| 495 | |
| 496 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (tree->tablecxx . . $ _GtkTextBTree#table.); |
| 497 | tree->tablecxx . . $ _GtkTextBTree#table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 498 | |
| 499 | gtk_text_btree_node_destroycxx . . $ gtk_text_btree_node_destroy(7e0fdd5226bb948b). (tree, tree->root_nodecxx . . $ _GtkTextBTree#root_node.); |
| 500 | tree->root_nodecxx . . $ _GtkTextBTree#root_node. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 501 | |
| 502 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (g_hash_table_size (tree->mark_table) == 0); |
| 503 | g_hash_table_destroycxx . . $ g_hash_table_destroy(ce4eddf544b9218). (tree->mark_tablecxx . . $ _GtkTextBTree#mark_table.); |
| 504 | tree->mark_tablecxx . . $ _GtkTextBTree#mark_table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 505 | if (tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 506 | { |
| 507 | g_hash_table_destroycxx . . $ g_hash_table_destroy(ce4eddf544b9218). (tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table.); |
| 508 | tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 509 | } |
| 510 | |
| 511 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.); |
| 512 | tree->insert_markcxx . . $ _GtkTextBTree#insert_mark. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 513 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.); |
| 514 | tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 515 | tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp. = 0; |
| 516 | |
| 517 | g_freecxx . . $ g_free(5d22bdacc48458e8). (tree); |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | GtkTextBuffercxx . . $ GtkTextBuffer#* |
| 522 | _gtk_text_btree_get_buffercxx . . $ _gtk_text_btree_get_buffer(b89f01655f9d4d89). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 523 | { |
| 524 | return tree->buffercxx . . $ _GtkTextBTree#buffer.; |
| 525 | } |
| 526 | |
| 527 | guintcxx . . $ guint# |
| 528 | _gtk_text_btree_get_chars_changed_stampcxx . . $ _gtk_text_btree_get_chars_changed_stamp(b5683403cbc42073). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 529 | { |
| 530 | return tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp.; |
| 531 | } |
| 532 | |
| 533 | guintcxx . . $ guint# |
| 534 | _gtk_text_btree_get_segments_changed_stampcxx . . $ _gtk_text_btree_get_segments_changed_stamp(b5683403cbc42073). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 535 | { |
| 536 | return tree->segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp.; |
| 537 | } |
| 538 | |
| 539 | void |
| 540 | _gtk_text_btree_segments_changedcxx . . $ _gtk_text_btree_segments_changed(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 541 | { |
| 542 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 543 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 544 | } |
| 545 | |
| 546 | /* |
| 547 | * Indexable segment mutation |
| 548 | */ |
| 549 | |
| 550 | /* |
| 551 | * The following function is responsible for resolving the bidi direction |
| 552 | * for the lines between start and end. But it also calculates any |
| 553 | * dependent bidi direction for surrounding lines that change as a result |
| 554 | * of the bidi direction decisions within the range. The function is |
| 555 | * trying to do as little propagation as is needed. |
| 556 | */ |
| 557 | static void |
| 558 | gtk_text_btree_resolve_bidicxx . . $ gtk_text_btree_resolve_bidi(46b6b30b5a2f58be). (GtkTextItercxx . . $ GtkTextIter# *start, |
| 559 | GtkTextItercxx . . $ GtkTextIter# *end) |
| 560 | { |
| 561 | GtkTextBTreecxx . . $ GtkTextBTree# *tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (start); |
| 562 | GtkTextLinecxx . . $ GtkTextLine# *start_line, *end_line, *start_line_prev, *end_line_next, *line; |
| 563 | PangoDirectioncxx . . $ PangoDirection# last_strong, dir_above_propagated, dir_below_propagated; |
| 564 | |
| 565 | /* Resolve the strong bidi direction for all lines between |
| 566 | * start and end. |
| 567 | */ |
| 568 | start_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (start); |
| 569 | start_line_prev = _gtk_text_line_previouscxx . . $ _gtk_text_line_previous(cf600876af6c7fcb). (start_line); |
| 570 | end_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (end); |
| 571 | end_line_next = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (end_line); |
| 572 | |
| 573 | line = start_line; |
| 574 | while (line && line != end_line_next) |
| 575 | { |
| 576 | /* Loop through the segments and search for a strong character |
| 577 | */ |
| 578 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 579 | line->dir_strongcxx . . $ _GtkTextLine#dir_strong. = PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.; |
| 580 | |
| 581 | while (seg) |
| 582 | { |
| 583 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type. && seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count. > 0) |
| 584 | { |
| 585 | PangoDirectioncxx . . $ PangoDirection# pango_dir; |
| 586 | |
| 587 | pango_dir = gdk_find_base_dircxx . . $ gdk_find_base_dir(f81c2655286be73e). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars., seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.); |
| 588 | |
| 589 | if (pango_dir != PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.) |
| 590 | { |
| 591 | line->dir_strongcxx . . $ _GtkTextLine#dir_strong. = pango_dir; |
| 592 | break; |
| 593 | } |
| 594 | } |
| 595 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 596 | } |
| 597 | |
| 598 | line = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (line); |
| 599 | } |
| 600 | |
| 601 | /* Sweep forward */ |
| 602 | |
| 603 | /* The variable dir_above_propagated contains the forward propagated |
| 604 | * direction before start. It is neutral if start is in the beginning |
| 605 | * of the buffer. |
| 606 | */ |
| 607 | dir_above_propagated = PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.; |
| 608 | if (start_line_prev) |
| 609 | dir_above_propagated = start_line_prev->dir_propagated_forwardcxx . . $ _GtkTextLine#dir_propagated_forward.; |
| 610 | |
| 611 | /* Loop forward and propagate the direction of each paragraph |
| 612 | * to all neutral lines. |
| 613 | */ |
| 614 | line = start_line; |
| 615 | last_strong = dir_above_propagated; |
| 616 | while (line != end_line_next) |
| 617 | { |
| 618 | if (line->dir_strongcxx . . $ _GtkTextLine#dir_strong. != PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.) |
| 619 | last_strong = line->dir_strongcxx . . $ _GtkTextLine#dir_strong.; |
| 620 | |
| 621 | line->dir_propagated_forwardcxx . . $ _GtkTextLine#dir_propagated_forward. = last_strong; |
| 622 | |
| 623 | line = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (line); |
| 624 | } |
| 625 | |
| 626 | /* Continue propagating as long as the previous resolved forward |
| 627 | * is different from last_strong. |
| 628 | */ |
| 629 | { |
| 630 | GtkTextItercxx . . $ GtkTextIter# end_propagate; |
| 631 | |
| 632 | while (line && |
| 633 | line->dir_strongcxx . . $ _GtkTextLine#dir_strong. == PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL. && |
| 634 | line->dir_propagated_forwardcxx . . $ _GtkTextLine#dir_propagated_forward. != last_strong) |
| 635 | { |
| 636 | GtkTextLinecxx . . $ GtkTextLine# *prev = line; |
| 637 | line->dir_propagated_forwardcxx . . $ _GtkTextLine#dir_propagated_forward. = last_strong; |
| 638 | |
| 639 | line = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb).(line); |
| 640 | if (!line) |
| 641 | { |
| 642 | line = prev; |
| 643 | break; |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | /* The last line to invalidate is the last line before the |
| 648 | * line with the strong character. Or in case of the end of the |
| 649 | * buffer, the last line of the buffer. (There seems to be an |
| 650 | * extra "virtual" last line in the buffer that must not be used |
| 651 | * calling _gtk_text_btree_get_iter_at_line (causes crash). Thus the |
| 652 | * _gtk_text_line_previous is ok in that case as well.) |
| 653 | */ |
| 654 | line = _gtk_text_line_previouscxx . . $ _gtk_text_line_previous(cf600876af6c7fcb). (line); |
| 655 | _gtk_text_btree_get_iter_at_linecxx . . $ _gtk_text_btree_get_iter_at_line(cc2a24529bedc6e8). (tree, &end_propagate, line, 0); |
| 656 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, end, &end_propagate, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 657 | } |
| 658 | |
| 659 | /* Sweep backward */ |
| 660 | |
| 661 | /* The variable dir_below_propagated contains the backward propagated |
| 662 | * direction after end. It is neutral if end is at the end of |
| 663 | * the buffer. |
| 664 | */ |
| 665 | dir_below_propagated = PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.; |
| 666 | if (end_line_next) |
| 667 | dir_below_propagated = end_line_next->dir_propagated_backcxx . . $ _GtkTextLine#dir_propagated_back.; |
| 668 | |
| 669 | /* Loop backward and propagate the direction of each paragraph |
| 670 | * to all neutral lines. |
| 671 | */ |
| 672 | line = end_line; |
| 673 | last_strong = dir_below_propagated; |
| 674 | while (line != start_line_prev) |
| 675 | { |
| 676 | if (line->dir_strongcxx . . $ _GtkTextLine#dir_strong. != PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.) |
| 677 | last_strong = line->dir_strongcxx . . $ _GtkTextLine#dir_strong.; |
| 678 | |
| 679 | line->dir_propagated_backcxx . . $ _GtkTextLine#dir_propagated_back. = last_strong; |
| 680 | |
| 681 | line = _gtk_text_line_previouscxx . . $ _gtk_text_line_previous(cf600876af6c7fcb). (line); |
| 682 | } |
| 683 | |
| 684 | /* Continue propagating as long as the resolved backward dir |
| 685 | * is different from last_strong. |
| 686 | */ |
| 687 | { |
| 688 | GtkTextItercxx . . $ GtkTextIter# start_propagate; |
| 689 | |
| 690 | while (line && |
| 691 | line->dir_strongcxx . . $ _GtkTextLine#dir_strong. == PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL. && |
| 692 | line->dir_propagated_backcxx . . $ _GtkTextLine#dir_propagated_back. != last_strong) |
| 693 | { |
| 694 | GtkTextLinecxx . . $ GtkTextLine# *prev = line; |
| 695 | line->dir_propagated_backcxx . . $ _GtkTextLine#dir_propagated_back. = last_strong; |
| 696 | |
| 697 | line = _gtk_text_line_previouscxx . . $ _gtk_text_line_previous(cf600876af6c7fcb). (line); |
| 698 | if (!line) |
| 699 | { |
| 700 | line = prev; |
| 701 | break; |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | /* We only need to invalidate for backwards propagation if the |
| 706 | * line we ended up on didn't get a direction from forwards |
| 707 | * propagation. |
| 708 | */ |
| 709 | if (line && line->dir_propagated_forwardcxx . . $ _GtkTextLine#dir_propagated_forward. == PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.) |
| 710 | { |
| 711 | _gtk_text_btree_get_iter_at_linecxx . . $ _gtk_text_btree_get_iter_at_line(cc2a24529bedc6e8). (tree, &start_propagate, line, 0); |
| 712 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, &start_propagate, start, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 713 | } |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | void |
| 718 | _gtk_text_btree_deletecxx . . $ _gtk_text_btree_delete(46b6b30b5a2f58be). (GtkTextItercxx . . $ GtkTextIter# *start, |
| 719 | GtkTextItercxx . . $ GtkTextIter# *end) |
| 720 | { |
| 721 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *prev_seg; /* The segment just before the start |
| 722 | * of the deletion range. */ |
| 723 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *last_seg; /* The segment just after the end |
| 724 | * of the deletion range. */ |
| 725 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, *next, *next2; |
| 726 | GtkTextLinecxx . . $ GtkTextLine# *curline; |
| 727 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *curnode, *node; |
| 728 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 729 | GtkTextLinecxx . . $ GtkTextLine# *start_line; |
| 730 | GtkTextLinecxx . . $ GtkTextLine# *end_line; |
| 731 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 732 | GtkTextLinecxx . . $ GtkTextLine# *deleted_lines = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* List of lines we've deleted */ |
| 733 | int start_byte_offset; |
| 734 | |
| 735 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (start != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 736 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (end != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 737 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (_gtk_text_iter_get_btree (start) == |
| 738 | _gtk_text_iter_get_btree (end)); |
| 739 | |
| 740 | gtk_text_iter_ordercxx . . $ gtk_text_iter_order(46b6b30b5a2f58be). (start, end); |
| 741 | |
| 742 | tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (start); |
| 743 | |
| 744 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 745 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 746 | |
| 747 | /* Broadcast the need for redisplay before we break the iterators */ |
| 748 | DVcxx . . $ `gtk/gtktextbtreeprivate.h:34:9`! (g_print ("invalidating due to deleting some text (%s)\n", G_STRLOC)); |
| 749 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, start, end, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 750 | |
| 751 | /* Save the byte offset so we can reset the iterators */ |
| 752 | start_byte_offset = gtk_text_iter_get_line_indexcxx . . $ gtk_text_iter_get_line_index(5a5b43ca5e929c7e). (start); |
| 753 | |
| 754 | start_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (start); |
| 755 | end_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (end); |
| 756 | |
| 757 | /* |
| 758 | * Split the start and end segments, so we have a place |
| 759 | * to insert our new text. |
| 760 | * |
| 761 | * Tricky point: split at end first; otherwise the split |
| 762 | * at end may invalidate seg and/or prev_seg. This allows |
| 763 | * us to avoid invalidating segments for start. |
| 764 | */ |
| 765 | |
| 766 | last_seg = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (end); |
| 767 | if (last_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 768 | last_seg = last_seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 769 | else |
| 770 | last_seg = end_line->segmentscxx . . $ _GtkTextLine#segments.; |
| 771 | |
| 772 | prev_seg = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (start); |
| 773 | if (prev_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 774 | { |
| 775 | seg = prev_seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 776 | prev_seg->nextcxx . . $ _GtkTextLineSegment#next. = last_seg; |
| 777 | } |
| 778 | else |
| 779 | { |
| 780 | seg = start_line->segmentscxx . . $ _GtkTextLine#segments.; |
| 781 | start_line->segmentscxx . . $ _GtkTextLine#segments. = last_seg; |
| 782 | } |
| 783 | |
| 784 | /* notify iterators that their segments need recomputation, |
| 785 | just for robustness. */ |
| 786 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 787 | |
| 788 | /* |
| 789 | * Delete all of the segments between prev_seg and last_seg. |
| 790 | */ |
| 791 | |
| 792 | curline = start_line; |
| 793 | curnode = curline->parentcxx . . $ _GtkTextLine#parent.; |
| 794 | while (seg != last_seg) |
| 795 | { |
| 796 | int char_count = 0; |
| 797 | |
| 798 | if (seg == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 799 | { |
| 800 | GtkTextLinecxx . . $ GtkTextLine# *nextline; |
| 801 | |
| 802 | /* |
| 803 | * We just ran off the end of a line. First find the |
| 804 | * next line, then go back to the old line and delete it |
| 805 | * (unless it's the starting line for the range). |
| 806 | */ |
| 807 | |
| 808 | nextline = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (curline); |
| 809 | if (curline != start_line) |
| 810 | { |
| 811 | if (curnode == start_line->parentcxx . . $ _GtkTextLine#parent.) |
| 812 | start_line->nextcxx . . $ _GtkTextLine#next. = curline->nextcxx . . $ _GtkTextLine#next.; |
| 813 | else |
| 814 | curnode->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = curline->nextcxx . . $ _GtkTextLine#next.; |
| 815 | |
| 816 | for (node = curnode; node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 817 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 818 | { |
| 819 | /* Don't update node->num_chars, because |
| 820 | * that was done when we deleted the segments. |
| 821 | */ |
| 822 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. -= 1; |
| 823 | } |
| 824 | |
| 825 | curnode->num_childrencxx . . $ _GtkTextBTreeNode#num_children. -= 1; |
| 826 | curline->nextcxx . . $ _GtkTextLine#next. = deleted_lines; |
| 827 | deleted_lines = curline; |
| 828 | } |
| 829 | |
| 830 | curline = nextline; |
| 831 | seg = curline->segmentscxx . . $ _GtkTextLine#segments.; |
| 832 | |
| 833 | /* |
| 834 | * If the GtkTextBTreeNode is empty then delete it and its parents, |
| 835 | * recursively upwards until a non-empty GtkTextBTreeNode is found. |
| 836 | */ |
| 837 | |
| 838 | while (curnode->num_childrencxx . . $ _GtkTextBTreeNode#num_children. == 0) |
| 839 | { |
| 840 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *parent; |
| 841 | |
| 842 | parent = curnode->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 843 | if (parent->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. == curnode) |
| 844 | { |
| 845 | parent->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = curnode->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 846 | } |
| 847 | else |
| 848 | { |
| 849 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *prevnode = parent->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 850 | while (prevnode->nextcxx . . $ _GtkTextBTreeNode#next. != curnode) |
| 851 | { |
| 852 | prevnode = prevnode->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 853 | } |
| 854 | prevnode->nextcxx . . $ _GtkTextBTreeNode#next. = curnode->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 855 | } |
| 856 | parent->num_childrencxx . . $ _GtkTextBTreeNode#num_children.--; |
| 857 | gtk_text_btree_node_free_emptycxx . . $ gtk_text_btree_node_free_empty(7e0fdd5226bb948b). (tree, curnode); |
| 858 | curnode = parent; |
| 859 | } |
| 860 | curnode = curline->parentcxx . . $ _GtkTextLine#parent.; |
| 861 | continue; |
| 862 | } |
| 863 | |
| 864 | next = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 865 | char_count = seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 866 | |
| 867 | if ((*seg->typecxx . . $ _GtkTextLineSegment#type.->deleteFunccxx . . $ _GtkTextLineSegmentClass#deleteFunc.)(seg, curline, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) != 0) |
| 868 | { |
| 869 | /* |
| 870 | * This segment refuses to die. Move it to prev_seg and |
| 871 | * advance prev_seg if the segment has left gravity. |
| 872 | */ |
| 873 | |
| 874 | if (prev_seg == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 875 | { |
| 876 | seg->nextcxx . . $ _GtkTextLineSegment#next. = start_line->segmentscxx . . $ _GtkTextLine#segments.; |
| 877 | start_line->segmentscxx . . $ _GtkTextLine#segments. = seg; |
| 878 | } |
| 879 | else if (prev_seg->nextcxx . . $ _GtkTextLineSegment#next. && |
| 880 | prev_seg->nextcxx . . $ _GtkTextLineSegment#next. != last_seg && |
| 881 | seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type. && |
| 882 | prev_seg->nextcxx . . $ _GtkTextLineSegment#next.->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type. && |
| 883 | seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info. == prev_seg->nextcxx . . $ _GtkTextLineSegment#next.->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.) |
| 884 | { |
| 885 | /* Try to match an off toggle with the matching on toggle |
| 886 | * if it immediately follows. This is a common case, and |
| 887 | * handling it here prevents quadratic blowup in |
| 888 | * cleanup_line() below. See bug 317125. |
| 889 | */ |
| 890 | next2 = prev_seg->nextcxx . . $ _GtkTextLineSegment#next.->nextcxx . . $ _GtkTextLineSegment#next.; |
| 891 | _gtk_toggle_segment_freecxx . . $ _gtk_toggle_segment_free(e00ee75c9b2241e9). (prev_seg->nextcxx . . $ _GtkTextLineSegment#next.); |
| 892 | prev_seg->nextcxx . . $ _GtkTextLineSegment#next. = next2; |
| 893 | _gtk_toggle_segment_freecxx . . $ _gtk_toggle_segment_free(e00ee75c9b2241e9). (seg); |
| 894 | seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 895 | } |
| 896 | else |
| 897 | { |
| 898 | seg->nextcxx . . $ _GtkTextLineSegment#next. = prev_seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 899 | prev_seg->nextcxx . . $ _GtkTextLineSegment#next. = seg; |
| 900 | } |
| 901 | |
| 902 | if (seg && seg->typecxx . . $ _GtkTextLineSegment#type.->leftGravitycxx . . $ _GtkTextLineSegmentClass#leftGravity.) |
| 903 | { |
| 904 | prev_seg = seg; |
| 905 | } |
| 906 | } |
| 907 | else |
| 908 | { |
| 909 | /* Segment is gone. Decrement the char count of the node and |
| 910 | all its parents. */ |
| 911 | for (node = curnode; node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 912 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 913 | { |
| 914 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. -= char_count; |
| 915 | } |
| 916 | } |
| 917 | |
| 918 | seg = next; |
| 919 | } |
| 920 | |
| 921 | /* |
| 922 | * If the beginning and end of the deletion range are in different |
| 923 | * lines, join the two lines together and discard the ending line. |
| 924 | */ |
| 925 | |
| 926 | if (start_line != end_line) |
| 927 | { |
| 928 | BTreeViewcxx . . $ BTreeView# *view; |
| 929 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *ancestor_node; |
| 930 | GtkTextLinecxx . . $ GtkTextLine# *prevline; |
| 931 | int chars_moved; |
| 932 | |
| 933 | /* last_seg was appended to start_line up at the top of this function */ |
| 934 | chars_moved = 0; |
| 935 | for (seg = last_seg; seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 936 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.) |
| 937 | { |
| 938 | chars_moved += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 939 | if (seg->typecxx . . $ _GtkTextLineSegment#type.->lineChangeFunccxx . . $ _GtkTextLineSegmentClass#lineChangeFunc. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 940 | { |
| 941 | (*seg->typecxx . . $ _GtkTextLineSegment#type.->lineChangeFunccxx . . $ _GtkTextLineSegmentClass#lineChangeFunc.)(seg, end_line); |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | for (node = start_line->parentcxx . . $ _GtkTextLine#parent.; node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 946 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 947 | { |
| 948 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. += chars_moved; |
| 949 | } |
| 950 | |
| 951 | curnode = end_line->parentcxx . . $ _GtkTextLine#parent.; |
| 952 | for (node = curnode; node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 953 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 954 | { |
| 955 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. -= chars_moved; |
| 956 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines.--; |
| 957 | } |
| 958 | curnode->num_childrencxx . . $ _GtkTextBTreeNode#num_children.--; |
| 959 | prevline = curnode->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 960 | if (prevline == end_line) |
| 961 | { |
| 962 | curnode->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = end_line->nextcxx . . $ _GtkTextLine#next.; |
| 963 | } |
| 964 | else |
| 965 | { |
| 966 | while (prevline->nextcxx . . $ _GtkTextLine#next. != end_line) |
| 967 | { |
| 968 | prevline = prevline->nextcxx . . $ _GtkTextLine#next.; |
| 969 | } |
| 970 | prevline->nextcxx . . $ _GtkTextLine#next. = end_line->nextcxx . . $ _GtkTextLine#next.; |
| 971 | } |
| 972 | end_line->nextcxx . . $ _GtkTextLine#next. = deleted_lines; |
| 973 | deleted_lines = end_line; |
| 974 | |
| 975 | /* We now fix up the per-view aggregates. We add all the height and |
| 976 | * width for the deleted lines to the start line, so that when revalidation |
| 977 | * occurs, the correct change in size is seen. |
| 978 | */ |
| 979 | ancestor_node = gtk_text_btree_node_common_parentcxx . . $ gtk_text_btree_node_common_parent(d950424c3bfd6289). (curnode, start_line->parentcxx . . $ _GtkTextLine#parent.); |
| 980 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 981 | while (view) |
| 982 | { |
| 983 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 984 | |
| 985 | int deleted_width = 0; |
| 986 | int deleted_height = 0; |
| 987 | |
| 988 | line = deleted_lines; |
| 989 | while (line) |
| 990 | { |
| 991 | GtkTextLinecxx . . $ GtkTextLine# *next_line = line->nextcxx . . $ _GtkTextLine#next.; |
| 992 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 993 | |
| 994 | if (ld) |
| 995 | { |
| 996 | deleted_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (deleted_width, ld->width); |
| 997 | deleted_height += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 998 | } |
| 999 | |
| 1000 | line = next_line; |
| 1001 | } |
| 1002 | |
| 1003 | if (deleted_width > 0 || deleted_height > 0) |
| 1004 | { |
| 1005 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (start_line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 1006 | |
| 1007 | if (ld == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1008 | { |
| 1009 | /* This means that start_line has never been validated. |
| 1010 | * We don't really want to do the validation here but |
| 1011 | * we do need to store our temporary sizes. So we |
| 1012 | * create the line data and assume a line w/h of 0. |
| 1013 | */ |
| 1014 | ld = _gtk_text_line_data_newcxx . . $ _gtk_text_line_data_new(b4e5603bb86d08ec). (view->layoutcxx . . $ _BTreeView#layout., start_line); |
| 1015 | _gtk_text_line_add_datacxx . . $ _gtk_text_line_add_data(b071f505967e561c). (start_line, ld); |
| 1016 | ld->widthcxx . . $ _GtkTextLineData#width. = 0; |
| 1017 | ld->heightcxx . . $ _GtkTextLineData#height. = 0; |
| 1018 | ld->validcxx . . $ _GtkTextLineData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1019 | } |
| 1020 | |
| 1021 | ld->widthcxx . . $ _GtkTextLineData#width. = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (deleted_width, ld->width); |
| 1022 | ld->heightcxx . . $ _GtkTextLineData#height. += deleted_height; |
| 1023 | ld->validcxx . . $ _GtkTextLineData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1024 | } |
| 1025 | |
| 1026 | gtk_text_btree_node_check_valid_downwardcxx . . $ gtk_text_btree_node_check_valid_downward(862e614253708acc). (ancestor_node, view->view_idcxx . . $ _BTreeView#view_id.); |
| 1027 | if (ancestor_node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 1028 | gtk_text_btree_node_check_valid_upwardcxx . . $ gtk_text_btree_node_check_valid_upward(eec353699738d68c). (ancestor_node->parentcxx . . $ _GtkTextBTreeNode#parent., view->view_idcxx . . $ _BTreeView#view_id.); |
| 1029 | |
| 1030 | view = view->nextcxx . . $ _BTreeView#next.; |
| 1031 | } |
| 1032 | |
| 1033 | line = deleted_lines; |
| 1034 | while (line) |
| 1035 | { |
| 1036 | GtkTextLinecxx . . $ GtkTextLine# *next_line = line->nextcxx . . $ _GtkTextLine#next.; |
| 1037 | |
| 1038 | gtk_text_line_destroycxx . . $ gtk_text_line_destroy(1061b1d198db82df). (tree, line); |
| 1039 | |
| 1040 | line = next_line; |
| 1041 | } |
| 1042 | |
| 1043 | /* avoid dangling pointer */ |
| 1044 | deleted_lines = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1045 | |
| 1046 | gtk_text_btree_rebalancecxx . . $ gtk_text_btree_rebalance(7e0fdd5226bb948b). (tree, curnode); |
| 1047 | } |
| 1048 | |
| 1049 | /* |
| 1050 | * Cleanup the segments in the new line. |
| 1051 | */ |
| 1052 | |
| 1053 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (start_line); |
| 1054 | |
| 1055 | /* |
| 1056 | * Lastly, rebalance the first GtkTextBTreeNode of the range. |
| 1057 | */ |
| 1058 | |
| 1059 | gtk_text_btree_rebalancecxx . . $ gtk_text_btree_rebalance(7e0fdd5226bb948b). (tree, start_line->parentcxx . . $ _GtkTextLine#parent.); |
| 1060 | |
| 1061 | /* Notify outstanding iterators that they |
| 1062 | are now hosed */ |
| 1063 | chars_changedcxx . . $ chars_changed(1eb40b89a5a0e9e5). (tree); |
| 1064 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 1065 | |
| 1066 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 1067 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 1068 | |
| 1069 | /* Re-initialize our iterators */ |
| 1070 | _gtk_text_btree_get_iter_at_linecxx . . $ _gtk_text_btree_get_iter_at_line(cc2a24529bedc6e8). (tree, start, start_line, start_byte_offset); |
| 1071 | *end = *start; |
| 1072 | |
| 1073 | gtk_text_btree_resolve_bidicxx . . $ gtk_text_btree_resolve_bidi(46b6b30b5a2f58be). (start, end); |
| 1074 | } |
| 1075 | |
| 1076 | void |
| 1077 | _gtk_text_btree_insertcxx . . $ _gtk_text_btree_insert(54bcdbed35e7b494). (GtkTextItercxx . . $ GtkTextIter# *iter, |
| 1078 | const char *text, |
| 1079 | int len) |
| 1080 | { |
| 1081 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *prev_seg; /* The segment just before the first |
| 1082 | * new segment (NULL means new segment |
| 1083 | * is at beginning of line). */ |
| 1084 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *cur_seg; /* Current segment; new characters |
| 1085 | * are inserted just after this one. |
| 1086 | * NULL means insert at beginning of |
| 1087 | * line. */ |
| 1088 | GtkTextLinecxx . . $ GtkTextLine# *line; /* Current line (new segments are |
| 1089 | * added to this line). */ |
| 1090 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 1091 | GtkTextLinecxx . . $ GtkTextLine# *newline; |
| 1092 | int chunk_len; /* # characters in current chunk. */ |
| 1093 | int sol; /* start of line */ |
| 1094 | int eol; /* Pointer to character just after last |
| 1095 | * one in current chunk. |
| 1096 | */ |
| 1097 | int delim; /* index of paragraph delimiter */ |
| 1098 | int line_count_delta; /* Counts change to total number of |
| 1099 | * lines in file. |
| 1100 | */ |
| 1101 | |
| 1102 | int char_count_delta; /* change to number of chars */ |
| 1103 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 1104 | int start_byte_index; |
| 1105 | GtkTextLinecxx . . $ GtkTextLine# *start_line; |
| 1106 | |
| 1107 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (text != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1108 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1109 | |
| 1110 | if (len < 0) |
| 1111 | len = strlencxx . . $ strlen(751346f8406fd082). (text); |
| 1112 | |
| 1113 | /* extract iterator info */ |
| 1114 | tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (iter); |
| 1115 | line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 1116 | |
| 1117 | start_line = line; |
| 1118 | start_byte_index = gtk_text_iter_get_line_indexcxx . . $ gtk_text_iter_get_line_index(5a5b43ca5e929c7e). (iter); |
| 1119 | |
| 1120 | /* Get our insertion segment split. Note this assumes line allows |
| 1121 | * char insertions, which isn't true of the "last" line. But iter |
| 1122 | * should not be on that line, as we assert here. |
| 1123 | */ |
| 1124 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (!_gtk_text_line_is_last (line, tree)); |
| 1125 | prev_seg = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (iter); |
| 1126 | cur_seg = prev_seg; |
| 1127 | |
| 1128 | /* Invalidate all iterators */ |
| 1129 | chars_changedcxx . . $ chars_changed(1eb40b89a5a0e9e5). (tree); |
| 1130 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 1131 | |
| 1132 | /* |
| 1133 | * Chop the text up into lines and create a new segment for |
| 1134 | * each line, plus a new line for the leftovers from the |
| 1135 | * previous line. |
| 1136 | */ |
| 1137 | |
| 1138 | eol = 0; |
| 1139 | sol = 0; |
| 1140 | line_count_delta = 0; |
| 1141 | char_count_delta = 0; |
| 1142 | while (eol < len) |
| 1143 | { |
| 1144 | sol = eol; |
| 1145 | |
| 1146 | pango_find_paragraph_boundarycxx . . $ pango_find_paragraph_boundary(6ae0beb7137fba07). (text + sol, |
| 1147 | len - sol, |
| 1148 | &delim, |
| 1149 | &eol); |
| 1150 | |
| 1151 | /* make these relative to the start of the text */ |
| 1152 | delim += sol; |
| 1153 | eol += sol; |
| 1154 | |
| 1155 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (eol >= sol); |
| 1156 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (delim >= sol); |
| 1157 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (eol >= delim); |
| 1158 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (sol >= 0); |
| 1159 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (eol <= len); |
| 1160 | |
| 1161 | chunk_len = eol - sol; |
| 1162 | |
| 1163 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (g_utf8_validate (&text[sol], chunk_len, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 1164 | seg = _gtk_char_segment_newcxx . . $ _gtk_char_segment_new(8b37d961e8104b49). (&text[sol], chunk_len); |
| 1165 | |
| 1166 | char_count_delta += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 1167 | |
| 1168 | if (cur_seg == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1169 | { |
| 1170 | seg->nextcxx . . $ _GtkTextLineSegment#next. = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 1171 | line->segmentscxx . . $ _GtkTextLine#segments. = seg; |
| 1172 | } |
| 1173 | else |
| 1174 | { |
| 1175 | seg->nextcxx . . $ _GtkTextLineSegment#next. = cur_seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1176 | cur_seg->nextcxx . . $ _GtkTextLineSegment#next. = seg; |
| 1177 | } |
| 1178 | |
| 1179 | if (delim == eol) |
| 1180 | { |
| 1181 | /* chunk didn't end with a paragraph separator */ |
| 1182 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (eol == len); |
| 1183 | break; |
| 1184 | } |
| 1185 | |
| 1186 | /* |
| 1187 | * The chunk ended with a newline, so create a new GtkTextLine |
| 1188 | * and move the remainder of the old line to it. |
| 1189 | */ |
| 1190 | |
| 1191 | newline = gtk_text_line_newcxx . . $ gtk_text_line_new(afb6c06b1061482). (); |
| 1192 | gtk_text_line_set_parentcxx . . $ gtk_text_line_set_parent(7d665b62c00717d7). (newline, line->parentcxx . . $ _GtkTextLine#parent.); |
| 1193 | newline->nextcxx . . $ _GtkTextLine#next. = line->nextcxx . . $ _GtkTextLine#next.; |
| 1194 | line->nextcxx . . $ _GtkTextLine#next. = newline; |
| 1195 | newline->segmentscxx . . $ _GtkTextLine#segments. = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1196 | seg->nextcxx . . $ _GtkTextLineSegment#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1197 | line = newline; |
| 1198 | cur_seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1199 | line_count_delta++; |
| 1200 | } |
| 1201 | |
| 1202 | /* |
| 1203 | * Cleanup the starting line for the insertion, plus the ending |
| 1204 | * line if it's different. |
| 1205 | */ |
| 1206 | |
| 1207 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (start_line); |
| 1208 | if (line != start_line) |
| 1209 | { |
| 1210 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (line); |
| 1211 | } |
| 1212 | |
| 1213 | post_insert_fixupcxx . . $ post_insert_fixup(94e44c90f71c53cf). (tree, line, line_count_delta, char_count_delta); |
| 1214 | |
| 1215 | /* Invalidate our region, and reset the iterator the user |
| 1216 | passed in to point to the end of the inserted text. */ |
| 1217 | { |
| 1218 | GtkTextItercxx . . $ GtkTextIter# start; |
| 1219 | GtkTextItercxx . . $ GtkTextIter# end; |
| 1220 | |
| 1221 | |
| 1222 | _gtk_text_btree_get_iter_at_linecxx . . $ _gtk_text_btree_get_iter_at_line(cc2a24529bedc6e8). (tree, |
| 1223 | &start, |
| 1224 | start_line, |
| 1225 | start_byte_index); |
| 1226 | end = start; |
| 1227 | |
| 1228 | /* We could almost certainly be more efficient here |
| 1229 | by saving the information from the insertion loop |
| 1230 | above. FIXME */ |
| 1231 | gtk_text_iter_forward_charscxx . . $ gtk_text_iter_forward_chars(44ad360b5fdb574c). (&end, char_count_delta); |
| 1232 | |
| 1233 | DVcxx . . $ `gtk/gtktextbtreeprivate.h:34:9`! (g_print ("invalidating due to inserting some text (%s)\n", G_STRLOC)); |
| 1234 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, &start, &end, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1235 | |
| 1236 | |
| 1237 | /* Convenience for the user */ |
| 1238 | *iter = end; |
| 1239 | |
| 1240 | gtk_text_btree_resolve_bidicxx . . $ gtk_text_btree_resolve_bidi(46b6b30b5a2f58be). (&start, &end); |
| 1241 | } |
| 1242 | } |
| 1243 | |
| 1244 | static void |
| 1245 | insert_paintable_or_widget_segmentcxx . . $ insert_paintable_or_widget_segment(823f50d72b47b3a9). (GtkTextItercxx . . $ GtkTextIter# *iter, |
| 1246 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg) |
| 1247 | { |
| 1248 | GtkTextItercxx . . $ GtkTextIter# start; |
| 1249 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *prevPtr; |
| 1250 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 1251 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 1252 | int start_byte_offset; |
| 1253 | |
| 1254 | line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 1255 | tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (iter); |
| 1256 | start_byte_offset = gtk_text_iter_get_line_indexcxx . . $ gtk_text_iter_get_line_index(5a5b43ca5e929c7e). (iter); |
| 1257 | |
| 1258 | prevPtr = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (iter); |
| 1259 | if (prevPtr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1260 | { |
| 1261 | seg->nextcxx . . $ _GtkTextLineSegment#next. = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 1262 | line->segmentscxx . . $ _GtkTextLine#segments. = seg; |
| 1263 | } |
| 1264 | else |
| 1265 | { |
| 1266 | seg->nextcxx . . $ _GtkTextLineSegment#next. = prevPtr->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1267 | prevPtr->nextcxx . . $ _GtkTextLineSegment#next. = seg; |
| 1268 | } |
| 1269 | |
| 1270 | post_insert_fixupcxx . . $ post_insert_fixup(94e44c90f71c53cf). (tree, line, 0, seg->char_countcxx . . $ _GtkTextLineSegment#char_count.); |
| 1271 | |
| 1272 | chars_changedcxx . . $ chars_changed(1eb40b89a5a0e9e5). (tree); |
| 1273 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 1274 | |
| 1275 | /* reset *iter for the user, and invalidate tree nodes */ |
| 1276 | |
| 1277 | _gtk_text_btree_get_iter_at_linecxx . . $ _gtk_text_btree_get_iter_at_line(cc2a24529bedc6e8). (tree, &start, line, start_byte_offset); |
| 1278 | |
| 1279 | *iter = start; |
| 1280 | gtk_text_iter_forward_charcxx . . $ gtk_text_iter_forward_char(5e3286410dd2bd0c). (iter); /* skip forward past the segment */ |
| 1281 | |
| 1282 | DVcxx . . $ `gtk/gtktextbtreeprivate.h:34:9`! (g_print ("invalidating due to inserting paintable/widget (%s)\n", G_STRLOC)); |
| 1283 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, &start, iter, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1284 | } |
| 1285 | |
| 1286 | void |
| 1287 | _gtk_text_btree_insert_paintablecxx . . $ _gtk_text_btree_insert_paintable(cbbd10d5504ee00f). (GtkTextItercxx . . $ GtkTextIter# *iter, |
| 1288 | GdkPaintablecxx . . $ GdkPaintable# *paintable) |
| 1289 | { |
| 1290 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 1291 | |
| 1292 | seg = _gtk_paintable_segment_newcxx . . $ _gtk_paintable_segment_new(27585ddb6f846783). (paintable); |
| 1293 | seg->bodycxx . . $ _GtkTextLineSegment#body..paintablecxx . . $ _GtkTextLineSegment#$anonymous_type_0#paintable..treecxx . . $ _GtkTextPaintable#tree. = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (iter); |
| 1294 | seg->bodycxx . . $ _GtkTextLineSegment#body..paintablecxx . . $ _GtkTextLineSegment#$anonymous_type_0#paintable..linecxx . . $ _GtkTextPaintable#line. = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 1295 | |
| 1296 | insert_paintable_or_widget_segmentcxx . . $ insert_paintable_or_widget_segment(823f50d72b47b3a9). (iter, seg); |
| 1297 | } |
| 1298 | |
| 1299 | void |
| 1300 | _gtk_text_btree_insert_child_anchorcxx . . $ _gtk_text_btree_insert_child_anchor(f68b6e5a86cf6a8e). (GtkTextItercxx . . $ GtkTextIter# *iter, |
| 1301 | GtkTextChildAnchorcxx . . $ GtkTextChildAnchor# *anchor) |
| 1302 | { |
| 1303 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 1304 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 1305 | |
| 1306 | if (anchor->segmentcxx . . $ _GtkTextChildAnchor#segment. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1307 | { |
| 1308 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! (G_STRLOCcxx . . $ `<external>/12741050725406041920/gmacros.h:928:9`!": Same child anchor can't be inserted twice"); |
| 1309 | return; |
| 1310 | } |
| 1311 | |
| 1312 | seg = _gtk_widget_segment_newcxx . . $ _gtk_widget_segment_new(7979535cfa6959b). (anchor); |
| 1313 | |
| 1314 | tree = seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..treecxx . . $ _GtkTextChildBody#tree. = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (iter); |
| 1315 | seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..linecxx . . $ _GtkTextChildBody#line. = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 1316 | |
| 1317 | insert_paintable_or_widget_segmentcxx . . $ insert_paintable_or_widget_segment(823f50d72b47b3a9). (iter, seg); |
| 1318 | |
| 1319 | if (tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1320 | tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table. = g_hash_table_newcxx . . $ g_hash_table_new(444186de27d60923). (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`!); |
| 1321 | |
| 1322 | g_hash_table_insertcxx . . $ g_hash_table_insert(6a7c46015dd5ef26). (tree->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table., |
| 1323 | seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..objcxx . . $ _GtkTextChildBody#obj., |
| 1324 | seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..objcxx . . $ _GtkTextChildBody#obj.); |
| 1325 | } |
| 1326 | |
| 1327 | void |
| 1328 | _gtk_text_btree_unregister_child_anchorcxx . . $ _gtk_text_btree_unregister_child_anchor(9f73a74cd191b1a3). (GtkTextChildAnchorcxx . . $ GtkTextChildAnchor# *anchor) |
| 1329 | { |
| 1330 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 1331 | |
| 1332 | seg = anchor->segmentcxx . . $ _GtkTextChildAnchor#segment.; |
| 1333 | |
| 1334 | g_hash_table_removecxx . . $ g_hash_table_remove(453ebbf4abdbe50e). (seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..treecxx . . $ _GtkTextChildBody#tree.->child_anchor_tablecxx . . $ _GtkTextBTree#child_anchor_table., |
| 1335 | anchor); |
| 1336 | } |
| 1337 | |
| 1338 | /* |
| 1339 | * View stuff |
| 1340 | */ |
| 1341 | |
| 1342 | static GtkTextLinecxx . . $ GtkTextLine#* |
| 1343 | find_line_by_ycxx . . $ find_line_by_y(6a13517014d8b870). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, BTreeViewcxx . . $ BTreeView# *view, |
| 1344 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, int y, int *line_top, |
| 1345 | GtkTextLinecxx . . $ GtkTextLine# *last_line) |
| 1346 | { |
| 1347 | int current_y = 0; |
| 1348 | |
| 1349 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 1350 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 1351 | |
| 1352 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 1353 | { |
| 1354 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 1355 | |
| 1356 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 1357 | |
| 1358 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && line != last_line) |
| 1359 | { |
| 1360 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 1361 | |
| 1362 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 1363 | |
| 1364 | if (ld) |
| 1365 | { |
| 1366 | if (y < (current_y + ld->heightcxx . . $ _GtkTextLineData#height.)) |
| 1367 | return line; |
| 1368 | |
| 1369 | current_y += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 1370 | *line_top += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 1371 | } |
| 1372 | |
| 1373 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 1374 | } |
| 1375 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1376 | } |
| 1377 | else |
| 1378 | { |
| 1379 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child; |
| 1380 | |
| 1381 | child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 1382 | |
| 1383 | while (child != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1384 | { |
| 1385 | int width; |
| 1386 | int height; |
| 1387 | |
| 1388 | gtk_text_btree_node_get_sizecxx . . $ gtk_text_btree_node_get_size(15e034dfd1dcbc08). (child, view->view_idcxx . . $ _BTreeView#view_id., |
| 1389 | &width, &height); |
| 1390 | |
| 1391 | if (y < (current_y + height)) |
| 1392 | return find_line_by_ycxx . . $ find_line_by_y(6a13517014d8b870). (tree, view, child, |
| 1393 | y - current_y, line_top, |
| 1394 | last_line); |
| 1395 | |
| 1396 | current_y += height; |
| 1397 | *line_top += height; |
| 1398 | |
| 1399 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 1400 | } |
| 1401 | |
| 1402 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1403 | } |
| 1404 | } |
| 1405 | |
| 1406 | GtkTextLinecxx . . $ GtkTextLine# * |
| 1407 | _gtk_text_btree_find_line_by_ycxx . . $ _gtk_text_btree_find_line_by_y(971c0577d86cfb95). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1408 | gpointercxx . . $ gpointer# view_id, |
| 1409 | int ypixel, |
| 1410 | int *line_top_out) |
| 1411 | { |
| 1412 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 1413 | BTreeViewcxx . . $ BTreeView# *view; |
| 1414 | GtkTextLinecxx . . $ GtkTextLine# *last_line; |
| 1415 | int line_top = 0; |
| 1416 | |
| 1417 | view = gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (tree, view_id); |
| 1418 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (view != 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`!); |
| 1419 | |
| 1420 | last_line = get_last_linecxx . . $ get_last_line(76b79c735937395b). (tree); |
| 1421 | |
| 1422 | line = find_line_by_ycxx . . $ find_line_by_y(6a13517014d8b870). (tree, view, tree->root_nodecxx . . $ _GtkTextBTree#root_node., ypixel, &line_top, |
| 1423 | last_line); |
| 1424 | |
| 1425 | if (line_top_out) |
| 1426 | *line_top_out = line_top; |
| 1427 | |
| 1428 | return line; |
| 1429 | } |
| 1430 | |
| 1431 | static int |
| 1432 | find_line_top_in_line_listcxx . . $ find_line_top_in_line_list(9d9adf5f2861a0f3). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1433 | BTreeViewcxx . . $ BTreeView# *view, |
| 1434 | GtkTextLinecxx . . $ GtkTextLine# *line, |
| 1435 | GtkTextLinecxx . . $ GtkTextLine# *target_line, |
| 1436 | int y) |
| 1437 | { |
| 1438 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1439 | { |
| 1440 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 1441 | |
| 1442 | if (line == target_line) |
| 1443 | return y; |
| 1444 | |
| 1445 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 1446 | if (ld) |
| 1447 | y += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 1448 | |
| 1449 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 1450 | } |
| 1451 | |
| 1452 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); /* If we get here, our |
| 1453 | target line didn't exist |
| 1454 | under its parent node */ |
| 1455 | return 0; |
| 1456 | } |
| 1457 | |
| 1458 | int |
| 1459 | _gtk_text_btree_find_line_topcxx . . $ _gtk_text_btree_find_line_top(961e3c8dc8590ef7). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1460 | GtkTextLinecxx . . $ GtkTextLine# *target_line, |
| 1461 | gpointercxx . . $ gpointer# view_id) |
| 1462 | { |
| 1463 | int y = 0; |
| 1464 | BTreeViewcxx . . $ BTreeView# *view; |
| 1465 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 1466 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *nodes[64]; |
| 1467 | int tos = 0; |
| 1468 | |
| 1469 | view = gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (tree, view_id); |
| 1470 | |
| 1471 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 1472 | |
| 1473 | node = target_line->parentcxx . . $ _GtkTextLine#parent.; |
| 1474 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1475 | { |
| 1476 | nodes[tos++] = node; |
| 1477 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 1478 | } |
| 1479 | |
| 1480 | tos--; |
| 1481 | while (tos >= 0) |
| 1482 | { |
| 1483 | node = nodes[tos]; |
| 1484 | |
| 1485 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 1486 | { |
| 1487 | return find_line_top_in_line_listcxx . . $ find_line_top_in_line_list(9d9adf5f2861a0f3). (tree, view, |
| 1488 | node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line., |
| 1489 | target_line, y); |
| 1490 | } |
| 1491 | else |
| 1492 | { |
| 1493 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child; |
| 1494 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *target_node; |
| 1495 | |
| 1496 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (tos > 0); /* not at level 0 */ |
| 1497 | target_node = nodes[tos - 1]; |
| 1498 | |
| 1499 | child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 1500 | |
| 1501 | while (child != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1502 | { |
| 1503 | int width; |
| 1504 | int height; |
| 1505 | |
| 1506 | if (child == target_node) |
| 1507 | break; |
| 1508 | else |
| 1509 | { |
| 1510 | gtk_text_btree_node_get_sizecxx . . $ gtk_text_btree_node_get_size(15e034dfd1dcbc08). (child, view->view_idcxx . . $ _BTreeView#view_id., |
| 1511 | &width, &height); |
| 1512 | y += height; |
| 1513 | } |
| 1514 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 1515 | } |
| 1516 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (child != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* should have broken out before we |
| 1517 | ran out of nodes */ |
| 1518 | } |
| 1519 | |
| 1520 | tos--; |
| 1521 | } |
| 1522 | |
| 1523 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); /* we return when we find the target line */ |
| 1524 | return 0; |
| 1525 | } |
| 1526 | |
| 1527 | void |
| 1528 | _gtk_text_btree_add_viewcxx . . $ _gtk_text_btree_add_view(39c469d9cc342868). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1529 | GtkTextLayoutcxx . . $ GtkTextLayout# *layout) |
| 1530 | { |
| 1531 | BTreeViewcxx . . $ BTreeView# *view; |
| 1532 | GtkTextLinecxx . . $ GtkTextLine# *last_line; |
| 1533 | GtkTextLineDatacxx . . $ GtkTextLineData# *line_data; |
| 1534 | |
| 1535 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1536 | |
| 1537 | view = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (BTreeView, 1); |
| 1538 | |
| 1539 | view->view_idcxx . . $ _BTreeView#view_id. = layout; |
| 1540 | view->layoutcxx . . $ _BTreeView#layout. = layout; |
| 1541 | |
| 1542 | view->nextcxx . . $ _BTreeView#next. = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 1543 | view->prevcxx . . $ _BTreeView#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1544 | |
| 1545 | if (tree->viewscxx . . $ _GtkTextBTree#views.) |
| 1546 | { |
| 1547 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (tree->views->prev == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1548 | tree->viewscxx . . $ _GtkTextBTree#views.->prevcxx . . $ _BTreeView#prev. = view; |
| 1549 | } |
| 1550 | |
| 1551 | tree->viewscxx . . $ _GtkTextBTree#views. = view; |
| 1552 | |
| 1553 | /* The last line in the buffer has identity values for the per-view |
| 1554 | * data so that we can avoid special case checks for it in a large |
| 1555 | * number of loops |
| 1556 | */ |
| 1557 | last_line = get_last_linecxx . . $ get_last_line(76b79c735937395b). (tree); |
| 1558 | |
| 1559 | line_data = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (GtkTextLineData, 1); |
| 1560 | line_data->view_idcxx . . $ _GtkTextLineData#view_id. = layout; |
| 1561 | line_data->nextcxx . . $ _GtkTextLineData#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1562 | line_data->widthcxx . . $ _GtkTextLineData#width. = 0; |
| 1563 | line_data->heightcxx . . $ _GtkTextLineData#height. = 0; |
| 1564 | line_data->validcxx . . $ _GtkTextLineData#valid. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1565 | |
| 1566 | _gtk_text_line_add_datacxx . . $ _gtk_text_line_add_data(b071f505967e561c). (last_line, line_data); |
| 1567 | } |
| 1568 | |
| 1569 | void |
| 1570 | _gtk_text_btree_remove_viewcxx . . $ _gtk_text_btree_remove_view(43771eedc3e9acc5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1571 | gpointercxx . . $ gpointer# view_id) |
| 1572 | { |
| 1573 | BTreeViewcxx . . $ BTreeView# *view; |
| 1574 | GtkTextLinecxx . . $ GtkTextLine# *last_line; |
| 1575 | GtkTextLineDatacxx . . $ GtkTextLineData# *line_data; |
| 1576 | |
| 1577 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1578 | |
| 1579 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 1580 | |
| 1581 | while (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1582 | { |
| 1583 | if (view->view_idcxx . . $ _BTreeView#view_id. == view_id) |
| 1584 | break; |
| 1585 | |
| 1586 | view = view->nextcxx . . $ _BTreeView#next.; |
| 1587 | } |
| 1588 | |
| 1589 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1590 | |
| 1591 | if (view->nextcxx . . $ _BTreeView#next.) |
| 1592 | view->nextcxx . . $ _BTreeView#next.->prevcxx . . $ _BTreeView#prev. = view->prevcxx . . $ _BTreeView#prev.; |
| 1593 | |
| 1594 | if (view->prevcxx . . $ _BTreeView#prev.) |
| 1595 | view->prevcxx . . $ _BTreeView#prev.->nextcxx . . $ _BTreeView#next. = view->nextcxx . . $ _BTreeView#next.; |
| 1596 | |
| 1597 | if (view == tree->viewscxx . . $ _GtkTextBTree#views.) |
| 1598 | tree->viewscxx . . $ _GtkTextBTree#views. = view->nextcxx . . $ _BTreeView#next.; |
| 1599 | |
| 1600 | /* Remove the line data for the last line which we added ourselves. |
| 1601 | * (Do this first, so that we don't try to call the view's line data destructor on it.) |
| 1602 | */ |
| 1603 | last_line = get_last_linecxx . . $ get_last_line(76b79c735937395b). (tree); |
| 1604 | line_data = _gtk_text_line_remove_datacxx . . $ _gtk_text_line_remove_data(fe7e31bd387752f3). (last_line, view_id); |
| 1605 | g_freecxx . . $ g_free(5d22bdacc48458e8). (line_data); |
| 1606 | |
| 1607 | gtk_text_btree_node_remove_viewcxx . . $ gtk_text_btree_node_remove_view(ff44ee98a63e7187). (view, tree->root_nodecxx . . $ _GtkTextBTree#root_node., view_id); |
| 1608 | |
| 1609 | g_freecxx . . $ g_free(5d22bdacc48458e8). (view); |
| 1610 | } |
| 1611 | |
| 1612 | void |
| 1613 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1614 | const GtkTextItercxx . . $ GtkTextIter# *start, |
| 1615 | const GtkTextItercxx . . $ GtkTextIter# *end, |
| 1616 | gbooleancxx . . $ gboolean# cursors_only) |
| 1617 | { |
| 1618 | BTreeViewcxx . . $ BTreeView# *view; |
| 1619 | |
| 1620 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 1621 | |
| 1622 | while (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1623 | { |
| 1624 | if (cursors_only) |
| 1625 | gtk_text_layout_invalidate_cursorscxx . . $ gtk_text_layout_invalidate_cursors(ff0ac842c1e6749f). (view->layoutcxx . . $ _BTreeView#layout., start, end); |
| 1626 | else |
| 1627 | gtk_text_layout_invalidatecxx . . $ gtk_text_layout_invalidate(ff0ac842c1e6749f). (view->layoutcxx . . $ _BTreeView#layout., start, end); |
| 1628 | |
| 1629 | view = view->nextcxx . . $ _BTreeView#next.; |
| 1630 | } |
| 1631 | } |
| 1632 | |
| 1633 | void |
| 1634 | _gtk_text_btree_get_view_sizecxx . . $ _gtk_text_btree_get_view_size(e97c191e081171b6). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1635 | gpointercxx . . $ gpointer# view_id, |
| 1636 | int *width, |
| 1637 | int *height) |
| 1638 | { |
| 1639 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1640 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (view_id != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1641 | |
| 1642 | gtk_text_btree_node_get_sizecxx . . $ gtk_text_btree_node_get_size(15e034dfd1dcbc08). (tree->root_nodecxx . . $ _GtkTextBTree#root_node., view_id, |
| 1643 | width, height); |
| 1644 | } |
| 1645 | |
| 1646 | /* |
| 1647 | * Tag |
| 1648 | */ |
| 1649 | |
| 1650 | typedef structcxx . . $ $anonymous_type_e2cf652e6d88616d_1# { |
| 1651 | GtkTextItercxx . . $ GtkTextIter# *iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.; |
| 1652 | guintcxx . . $ guint# countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count.; |
| 1653 | guintcxx . . $ guint# allocatedcxx . . $ $anonymous_type_e2cf652e6d88616d_1#allocated.; |
| 1654 | } IterStackcxx . . $ IterStack#; |
| 1655 | |
| 1656 | static IterStackcxx . . $ IterStack#* |
| 1657 | iter_stack_newcxx . . $ iter_stack_new(b6ba59dd69638a18). (void) |
| 1658 | { |
| 1659 | IterStackcxx . . $ IterStack# *stack; |
| 1660 | stack = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (IterStack, 1); |
| 1661 | stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1662 | stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. = 0; |
| 1663 | stack->allocatedcxx . . $ $anonymous_type_e2cf652e6d88616d_1#allocated. = 0; |
| 1664 | return stack; |
| 1665 | } |
| 1666 | |
| 1667 | static void |
| 1668 | iter_stack_pushcxx . . $ iter_stack_push(1f4ad22b7253736d). (IterStackcxx . . $ IterStack# *stack, |
| 1669 | const GtkTextItercxx . . $ GtkTextIter# *iter) |
| 1670 | { |
| 1671 | stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. += 1; |
| 1672 | if (stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. > stack->allocatedcxx . . $ $anonymous_type_e2cf652e6d88616d_1#allocated.) |
| 1673 | { |
| 1674 | stack->allocatedcxx . . $ $anonymous_type_e2cf652e6d88616d_1#allocated. = stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count.*2; |
| 1675 | stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters. = g_realloccxx . . $ g_realloc(417ab160f6baadc6). (stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters., |
| 1676 | stack->allocatedcxx . . $ $anonymous_type_e2cf652e6d88616d_1#allocated. * sizeof (GtkTextItercxx . . $ GtkTextIter#)); |
| 1677 | } |
| 1678 | stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.[stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count.-1] = *iter; |
| 1679 | } |
| 1680 | |
| 1681 | static gbooleancxx . . $ gboolean# |
| 1682 | iter_stack_popcxx . . $ iter_stack_pop(7b2654f0872462d9). (IterStackcxx . . $ IterStack# *stack, |
| 1683 | GtkTextItercxx . . $ GtkTextIter# *iter) |
| 1684 | { |
| 1685 | if (stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. == 0) |
| 1686 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1687 | else |
| 1688 | { |
| 1689 | stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. -= 1; |
| 1690 | *iter = stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.[stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count.]; |
| 1691 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1692 | } |
| 1693 | } |
| 1694 | |
| 1695 | static void |
| 1696 | iter_stack_freecxx . . $ iter_stack_free(dc541c95c555cca9). (IterStackcxx . . $ IterStack# *stack) |
| 1697 | { |
| 1698 | g_freecxx . . $ g_free(5d22bdacc48458e8). (stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.); |
| 1699 | g_freecxx . . $ g_free(5d22bdacc48458e8). (stack); |
| 1700 | } |
| 1701 | |
| 1702 | static void |
| 1703 | iter_stack_invertcxx . . $ iter_stack_invert(dc541c95c555cca9). (IterStackcxx . . $ IterStack# *stack) |
| 1704 | { |
| 1705 | if (stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. > 0) |
| 1706 | { |
| 1707 | guintcxx . . $ guint# i = 0; |
| 1708 | guintcxx . . $ guint# j = stack->countcxx . . $ $anonymous_type_e2cf652e6d88616d_1#count. - 1; |
| 1709 | while (i < j) |
| 1710 | { |
| 1711 | GtkTextItercxx . . $ GtkTextIter# tmp; |
| 1712 | |
| 1713 | tmp = stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.[i]; |
| 1714 | stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.[i] = stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.[j]; |
| 1715 | stack->iterscxx . . $ $anonymous_type_e2cf652e6d88616d_1#iters.[j] = tmp; |
| 1716 | |
| 1717 | ++i; |
| 1718 | --j; |
| 1719 | } |
| 1720 | } |
| 1721 | } |
| 1722 | |
| 1723 | static void |
| 1724 | queue_tag_redisplaycxx . . $ queue_tag_redisplay(3b52a3b4833f9a8d). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 1725 | GtkTextTagcxx . . $ GtkTextTag# *tag, |
| 1726 | const GtkTextItercxx . . $ GtkTextIter# *start, |
| 1727 | const GtkTextItercxx . . $ GtkTextIter# *end) |
| 1728 | { |
| 1729 | if (_gtk_text_tag_affects_sizecxx . . $ _gtk_text_tag_affects_size(9b8b9f64a6e2d898). (tag)) |
| 1730 | { |
| 1731 | DVcxx . . $ `gtk/gtktextbtreeprivate.h:34:9`! (g_print ("invalidating due to size-affecting tag (%s)\n", G_STRLOC)); |
| 1732 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, start, end, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1733 | } |
| 1734 | else if (_gtk_text_tag_affects_nonsize_appearancecxx . . $ _gtk_text_tag_affects_nonsize_appearance(9b8b9f64a6e2d898). (tag)) |
| 1735 | { |
| 1736 | /* We only need to queue a redraw, not a relayout */ |
| 1737 | redisplay_regioncxx . . $ redisplay_region(45085b43b37ed786). (tree, start, end, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1738 | } |
| 1739 | |
| 1740 | /* We don't need to do anything if the tag doesn't affect display */ |
| 1741 | } |
| 1742 | |
| 1743 | void |
| 1744 | _gtk_text_btree_tagcxx . . $ _gtk_text_btree_tag(45db65c10a5d807a). (const GtkTextItercxx . . $ GtkTextIter# *start_orig, |
| 1745 | const GtkTextItercxx . . $ GtkTextIter# *end_orig, |
| 1746 | GtkTextTagcxx . . $ GtkTextTag# *tag, |
| 1747 | gbooleancxx . . $ gboolean# add) |
| 1748 | { |
| 1749 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, *prev; |
| 1750 | GtkTextLinecxx . . $ GtkTextLine# *cleanupline; |
| 1751 | gbooleancxx . . $ gboolean# toggled_on; |
| 1752 | GtkTextLinecxx . . $ GtkTextLine# *start_line; |
| 1753 | GtkTextLinecxx . . $ GtkTextLine# *end_line; |
| 1754 | GtkTextItercxx . . $ GtkTextIter# iter; |
| 1755 | GtkTextItercxx . . $ GtkTextIter# start, end; |
| 1756 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 1757 | IterStackcxx . . $ IterStack# *stack; |
| 1758 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 1759 | |
| 1760 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (start_orig != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1761 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (end_orig != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1762 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_TEXT_TAGcxx . . $ `gtk/gtktexttag.h:69:9`! (tag)); |
| 1763 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (_gtk_text_iter_get_btree (start_orig) == |
| 1764 | _gtk_text_iter_get_btree (end_orig)); |
| 1765 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tag->priv->table == _gtk_text_iter_get_btree (start_orig)->table); |
| 1766 | |
| 1767 | #if 0 |
| 1768 | printf ("%s tag %s from %d to %d\n", |
| 1769 | add ? "Adding" : "Removing", |
| 1770 | tag->name, |
| 1771 | gtk_text_buffer_get_offset (start_orig), |
| 1772 | gtk_text_buffer_get_offset (end_orig)); |
| 1773 | #endif |
| 1774 | |
| 1775 | if (gtk_text_iter_equalcxx . . $ gtk_text_iter_equal(d4eab490b36c1539). (start_orig, end_orig)) |
| 1776 | return; |
| 1777 | |
| 1778 | start = *start_orig; |
| 1779 | end = *end_orig; |
| 1780 | |
| 1781 | gtk_text_iter_ordercxx . . $ gtk_text_iter_order(46b6b30b5a2f58be). (&start, &end); |
| 1782 | |
| 1783 | tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (&start); |
| 1784 | |
| 1785 | queue_tag_redisplaycxx . . $ queue_tag_redisplay(3b52a3b4833f9a8d). (tree, tag, &start, &end); |
| 1786 | |
| 1787 | info = gtk_text_btree_get_tag_infocxx . . $ gtk_text_btree_get_tag_info(dabcf248e7392eb5). (tree, tag); |
| 1788 | |
| 1789 | start_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (&start); |
| 1790 | end_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (&end); |
| 1791 | |
| 1792 | /* Find all tag toggles in the region; we are going to delete them. |
| 1793 | We need to find them in advance, because |
| 1794 | forward_find_tag_toggle () won't work once we start playing around |
| 1795 | with the tree. */ |
| 1796 | stack = iter_stack_newcxx . . $ iter_stack_new(b6ba59dd69638a18). (); |
| 1797 | iter = start; |
| 1798 | |
| 1799 | /* forward_to_tag_toggle() skips a toggle at the start iterator, |
| 1800 | * which is deliberate - we don't want to delete a toggle at the |
| 1801 | * start. |
| 1802 | */ |
| 1803 | while (gtk_text_iter_forward_to_tag_togglecxx . . $ gtk_text_iter_forward_to_tag_toggle(6703c864d650cc91). (&iter, tag)) |
| 1804 | { |
| 1805 | if (gtk_text_iter_comparecxx . . $ gtk_text_iter_compare(d4eab490b36c1539). (&iter, &end) >= 0) |
| 1806 | break; |
| 1807 | else |
| 1808 | iter_stack_pushcxx . . $ iter_stack_push(1f4ad22b7253736d). (stack, &iter); |
| 1809 | } |
| 1810 | |
| 1811 | /* We need to traverse the toggles in order. */ |
| 1812 | iter_stack_invertcxx . . $ iter_stack_invert(dc541c95c555cca9). (stack); |
| 1813 | |
| 1814 | /* |
| 1815 | * See whether the tag is present at the start of the range. If |
| 1816 | * the state doesn't already match what we want then add a toggle |
| 1817 | * there. |
| 1818 | */ |
| 1819 | |
| 1820 | toggled_on = gtk_text_iter_has_tagcxx . . $ gtk_text_iter_has_tag(ae070b55ac07a228). (&start, tag); |
| 1821 | if ( (add && !toggled_on) || |
| 1822 | (!add && toggled_on) ) |
| 1823 | { |
| 1824 | /* This could create a second toggle at the start position; |
| 1825 | cleanup_line () will remove it if so. */ |
| 1826 | seg = _gtk_toggle_segment_newcxx . . $ _gtk_toggle_segment_new(6f19aecbf74c9023). (info, add); |
| 1827 | |
| 1828 | prev = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (&start); |
| 1829 | if (prev == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1830 | { |
| 1831 | seg->nextcxx . . $ _GtkTextLineSegment#next. = start_line->segmentscxx . . $ _GtkTextLine#segments.; |
| 1832 | start_line->segmentscxx . . $ _GtkTextLine#segments. = seg; |
| 1833 | } |
| 1834 | else |
| 1835 | { |
| 1836 | seg->nextcxx . . $ _GtkTextLineSegment#next. = prev->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1837 | prev->nextcxx . . $ _GtkTextLineSegment#next. = seg; |
| 1838 | } |
| 1839 | |
| 1840 | /* cleanup_line adds the new toggle to the node counts. */ |
| 1841 | #if 0 |
| 1842 | printf ("added toggle at start\n"); |
| 1843 | #endif |
| 1844 | /* we should probably call segments_changed, but in theory |
| 1845 | any still-cached segments in the iters we are about to |
| 1846 | use are still valid, since they're in front |
| 1847 | of this spot. */ |
| 1848 | } |
| 1849 | |
| 1850 | /* |
| 1851 | * |
| 1852 | * Scan the range of characters and delete any internal tag |
| 1853 | * transitions. Keep track of what the old state was at the end |
| 1854 | * of the range, and add a toggle there if it's needed. |
| 1855 | * |
| 1856 | */ |
| 1857 | |
| 1858 | cleanupline = start_line; |
| 1859 | while (iter_stack_popcxx . . $ iter_stack_pop(7b2654f0872462d9). (stack, &iter)) |
| 1860 | { |
| 1861 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *indexable_seg; |
| 1862 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 1863 | |
| 1864 | line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (&iter); |
| 1865 | seg = _gtk_text_iter_get_any_segmentcxx . . $ _gtk_text_iter_get_any_segment(844d619f98f748d3). (&iter); |
| 1866 | indexable_seg = _gtk_text_iter_get_indexable_segmentcxx . . $ _gtk_text_iter_get_indexable_segment(844d619f98f748d3). (&iter); |
| 1867 | |
| 1868 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1869 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (indexable_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1870 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != indexable_seg); |
| 1871 | |
| 1872 | prev = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 1873 | |
| 1874 | /* Find the segment that actually toggles this tag. */ |
| 1875 | while (seg != indexable_seg) |
| 1876 | { |
| 1877 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1878 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (indexable_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1879 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != indexable_seg); |
| 1880 | |
| 1881 | if ( (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type. || |
| 1882 | seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.) && |
| 1883 | (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info. == info) ) |
| 1884 | break; |
| 1885 | else |
| 1886 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1887 | } |
| 1888 | |
| 1889 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1890 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (indexable_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1891 | |
| 1892 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != indexable_seg); /* If this happens, then |
| 1893 | forward_to_tag_toggle was |
| 1894 | full of shit. */ |
| 1895 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg->body.toggle.info->tag == tag); |
| 1896 | |
| 1897 | /* If this happens, when previously tagging we didn't merge |
| 1898 | overlapping tags. */ |
| 1899 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! ( (toggled_on && seg->type == >k_text_toggle_off_type) || |
| 1900 | (!toggled_on && seg->type == >k_text_toggle_on_type) ); |
| 1901 | |
| 1902 | toggled_on = !toggled_on; |
| 1903 | |
| 1904 | #if 0 |
| 1905 | printf ("deleting %s toggle\n", |
| 1906 | seg->type == >k_text_toggle_on_type ? "on" : "off"); |
| 1907 | #endif |
| 1908 | /* Remove toggle segment from the list. */ |
| 1909 | if (prev == seg) |
| 1910 | { |
| 1911 | line->segmentscxx . . $ _GtkTextLine#segments. = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1912 | } |
| 1913 | else |
| 1914 | { |
| 1915 | while (prev->nextcxx . . $ _GtkTextLineSegment#next. != seg) |
| 1916 | { |
| 1917 | prev = prev->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1918 | } |
| 1919 | prev->nextcxx . . $ _GtkTextLineSegment#next. = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1920 | } |
| 1921 | |
| 1922 | /* Inform iterators we've hosed them. This actually reflects a |
| 1923 | bit of inefficiency; if you have the same tag toggled on and |
| 1924 | off a lot in a single line, we keep having the rescan from |
| 1925 | the front of the line. Of course we have to do that to get |
| 1926 | "prev" anyway, but here we are doing it an additional |
| 1927 | time. FIXME */ |
| 1928 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 1929 | |
| 1930 | /* Update node counts */ |
| 1931 | if (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..inNodeCountscxx . . $ _GtkTextToggleBody#inNodeCounts.) |
| 1932 | { |
| 1933 | _gtk_change_node_toggle_countcxx . . $ _gtk_change_node_toggle_count(80783df9392c55b3). (line->parentcxx . . $ _GtkTextLine#parent., |
| 1934 | info, -1); |
| 1935 | seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..inNodeCountscxx . . $ _GtkTextToggleBody#inNodeCounts. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1936 | } |
| 1937 | |
| 1938 | _gtk_toggle_segment_freecxx . . $ _gtk_toggle_segment_free(e00ee75c9b2241e9). (seg); |
| 1939 | |
| 1940 | /* We only clean up lines when we're done with them, saves some |
| 1941 | gratuitous line-segment-traversals */ |
| 1942 | |
| 1943 | if (cleanupline != line) |
| 1944 | { |
| 1945 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (cleanupline); |
| 1946 | cleanupline = line; |
| 1947 | } |
| 1948 | } |
| 1949 | |
| 1950 | iter_stack_freecxx . . $ iter_stack_free(dc541c95c555cca9). (stack); |
| 1951 | |
| 1952 | /* toggled_on now reflects the toggle state _just before_ the |
| 1953 | end iterator. The end iterator could already have a toggle |
| 1954 | on or a toggle off. */ |
| 1955 | if ( (add && !toggled_on) || |
| 1956 | (!add && toggled_on) ) |
| 1957 | { |
| 1958 | /* This could create a second toggle at the start position; |
| 1959 | cleanup_line () will remove it if so. */ |
| 1960 | |
| 1961 | seg = _gtk_toggle_segment_newcxx . . $ _gtk_toggle_segment_new(6f19aecbf74c9023). (info, !add); |
| 1962 | |
| 1963 | prev = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (&end); |
| 1964 | if (prev == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1965 | { |
| 1966 | seg->nextcxx . . $ _GtkTextLineSegment#next. = end_line->segmentscxx . . $ _GtkTextLine#segments.; |
| 1967 | end_line->segmentscxx . . $ _GtkTextLine#segments. = seg; |
| 1968 | } |
| 1969 | else |
| 1970 | { |
| 1971 | seg->nextcxx . . $ _GtkTextLineSegment#next. = prev->nextcxx . . $ _GtkTextLineSegment#next.; |
| 1972 | prev->nextcxx . . $ _GtkTextLineSegment#next. = seg; |
| 1973 | } |
| 1974 | /* cleanup_line adds the new toggle to the node counts. */ |
| 1975 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg->body.toggle.inNodeCounts == FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1976 | #if 0 |
| 1977 | printf ("added toggle at end\n"); |
| 1978 | #endif |
| 1979 | } |
| 1980 | |
| 1981 | /* |
| 1982 | * Cleanup cleanupline and the last line of the range, if |
| 1983 | * these are different. |
| 1984 | */ |
| 1985 | |
| 1986 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (cleanupline); |
| 1987 | if (cleanupline != end_line) |
| 1988 | { |
| 1989 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (end_line); |
| 1990 | } |
| 1991 | |
| 1992 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 1993 | |
| 1994 | queue_tag_redisplaycxx . . $ queue_tag_redisplay(3b52a3b4833f9a8d). (tree, tag, &start, &end); |
| 1995 | |
| 1996 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 1997 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 1998 | } |
| 1999 | |
| 2000 | |
| 2001 | /* |
| 2002 | * "Getters" |
| 2003 | */ |
| 2004 | |
| 2005 | static GtkTextLinecxx . . $ GtkTextLine#* |
| 2006 | get_line_internalcxx . . $ get_line_internal(92587ef1ecf2ccdf). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2007 | int line_number, |
| 2008 | int *real_line_number, |
| 2009 | gbooleancxx . . $ gboolean# include_last) |
| 2010 | { |
| 2011 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 2012 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 2013 | int lines_left; |
| 2014 | int line_count; |
| 2015 | |
| 2016 | line_count = _gtk_text_btree_line_countcxx . . $ _gtk_text_btree_line_count(8affb14981d0feb). (tree); |
| 2017 | if (!include_last) |
| 2018 | line_count -= 1; |
| 2019 | |
| 2020 | if (line_number < 0) |
| 2021 | { |
| 2022 | line_number = line_count; |
| 2023 | } |
| 2024 | else if (line_number > line_count) |
| 2025 | { |
| 2026 | line_number = line_count; |
| 2027 | } |
| 2028 | |
| 2029 | if (real_line_number) |
| 2030 | *real_line_number = line_number; |
| 2031 | |
| 2032 | node = tree->root_nodecxx . . $ _GtkTextBTree#root_node.; |
| 2033 | lines_left = line_number; |
| 2034 | |
| 2035 | /* |
| 2036 | * Work down through levels of the tree until a GtkTextBTreeNode is found at |
| 2037 | * level 0. |
| 2038 | */ |
| 2039 | |
| 2040 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. != 0) |
| 2041 | { |
| 2042 | for (node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 2043 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. <= lines_left; |
| 2044 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 2045 | { |
| 2046 | #if 0 |
| 2047 | if (node == NULL) |
| 2048 | { |
| 2049 | g_error ("gtk_text_btree_find_line ran out of GtkTextBTreeNodes"); |
| 2050 | } |
| 2051 | #endif |
| 2052 | lines_left -= node->num_linescxx . . $ _GtkTextBTreeNode#num_lines.; |
| 2053 | } |
| 2054 | } |
| 2055 | |
| 2056 | /* |
| 2057 | * Work through the lines attached to the level-0 GtkTextBTreeNode. |
| 2058 | */ |
| 2059 | |
| 2060 | for (line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; lines_left > 0; |
| 2061 | line = line->nextcxx . . $ _GtkTextLine#next.) |
| 2062 | { |
| 2063 | #if 0 |
| 2064 | if (line == NULL) |
| 2065 | { |
| 2066 | g_error ("gtk_text_btree_find_line ran out of lines"); |
| 2067 | } |
| 2068 | #endif |
| 2069 | lines_left -= 1; |
| 2070 | } |
| 2071 | return line; |
| 2072 | } |
| 2073 | |
| 2074 | GtkTextLinecxx . . $ GtkTextLine#* |
| 2075 | _gtk_text_btree_get_end_iter_linecxx . . $ _gtk_text_btree_get_end_iter_line(76b79c735937395b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 2076 | { |
| 2077 | return |
| 2078 | _gtk_text_btree_get_linecxx . . $ _gtk_text_btree_get_line(57cf43dcab45dd23). (tree, |
| 2079 | _gtk_text_btree_line_countcxx . . $ _gtk_text_btree_line_count(8affb14981d0feb). (tree) - 1, |
| 2080 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2081 | } |
| 2082 | |
| 2083 | GtkTextLinecxx . . $ GtkTextLine#* |
| 2084 | _gtk_text_btree_get_linecxx . . $ _gtk_text_btree_get_line(57cf43dcab45dd23). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2085 | int line_number, |
| 2086 | int *real_line_number) |
| 2087 | { |
| 2088 | return get_line_internalcxx . . $ get_line_internal(92587ef1ecf2ccdf). (tree, line_number, real_line_number, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 2089 | } |
| 2090 | |
| 2091 | GtkTextLinecxx . . $ GtkTextLine#* |
| 2092 | _gtk_text_btree_get_line_no_lastcxx . . $ _gtk_text_btree_get_line_no_last(57cf43dcab45dd23). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2093 | int line_number, |
| 2094 | int *real_line_number) |
| 2095 | { |
| 2096 | return get_line_internalcxx . . $ get_line_internal(92587ef1ecf2ccdf). (tree, line_number, real_line_number, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 2097 | } |
| 2098 | |
| 2099 | GtkTextLinecxx . . $ GtkTextLine#* |
| 2100 | _gtk_text_btree_get_line_at_charcxx . . $ _gtk_text_btree_get_line_at_char(a60e86ae56e54b53). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2101 | int char_index, |
| 2102 | int *line_start_index, |
| 2103 | int *real_char_index) |
| 2104 | { |
| 2105 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 2106 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 2107 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2108 | int chars_left; |
| 2109 | int chars_in_line; |
| 2110 | |
| 2111 | node = tree->root_nodecxx . . $ _GtkTextBTree#root_node.; |
| 2112 | |
| 2113 | /* Clamp to valid indexes (-1 is magic for "highest index"), |
| 2114 | * node->num_chars includes the two newlines that aren't really |
| 2115 | * in the buffer. |
| 2116 | */ |
| 2117 | if (char_index < 0 || char_index >= (node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. - 1)) |
| 2118 | { |
| 2119 | char_index = node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. - 2; |
| 2120 | } |
| 2121 | |
| 2122 | *real_char_index = char_index; |
| 2123 | |
| 2124 | /* |
| 2125 | * Work down through levels of the tree until a GtkTextBTreeNode is found at |
| 2126 | * level 0. |
| 2127 | */ |
| 2128 | |
| 2129 | chars_left = char_index; |
| 2130 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. != 0) |
| 2131 | { |
| 2132 | for (node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 2133 | chars_left >= node->num_charscxx . . $ _GtkTextBTreeNode#num_chars.; |
| 2134 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 2135 | { |
| 2136 | chars_left -= node->num_charscxx . . $ _GtkTextBTreeNode#num_chars.; |
| 2137 | |
| 2138 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (chars_left >= 0); |
| 2139 | } |
| 2140 | } |
| 2141 | |
| 2142 | if (chars_left == 0) |
| 2143 | { |
| 2144 | /* Start of a line */ |
| 2145 | |
| 2146 | *line_start_index = char_index; |
| 2147 | return node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 2148 | } |
| 2149 | |
| 2150 | /* |
| 2151 | * Work through the lines attached to the level-0 GtkTextBTreeNode. |
| 2152 | */ |
| 2153 | |
| 2154 | chars_in_line = 0; |
| 2155 | seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2156 | for (line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; line = line->nextcxx . . $ _GtkTextLine#next.) |
| 2157 | { |
| 2158 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 2159 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 2160 | { |
| 2161 | if (chars_in_line + seg->char_countcxx . . $ _GtkTextLineSegment#char_count. > chars_left) |
| 2162 | goto found; /* found our line/segment */ |
| 2163 | |
| 2164 | chars_in_line += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 2165 | |
| 2166 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 2167 | } |
| 2168 | |
| 2169 | chars_left -= chars_in_line; |
| 2170 | |
| 2171 | chars_in_line = 0; |
| 2172 | seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2173 | } |
| 2174 | |
| 2175 | found: |
| 2176 | |
| 2177 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* hosage, ran out of lines */ |
| 2178 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2179 | |
| 2180 | *line_start_index = char_index - chars_left; |
| 2181 | return line; |
| 2182 | } |
| 2183 | |
| 2184 | /* It returns an array sorted by tags priority, ready to pass to |
| 2185 | * _gtk_text_attributes_fill_from_tags() */ |
| 2186 | GPtrArraycxx . . $ GPtrArray# * |
| 2187 | _gtk_text_btree_get_tagscxx . . $ _gtk_text_btree_get_tags(787c170c1bbd902f). (const GtkTextItercxx . . $ GtkTextIter# *iter) |
| 2188 | { |
| 2189 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 2190 | GtkTextLinecxx . . $ GtkTextLine# *siblingline; |
| 2191 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2192 | int src, dst, index; |
| 2193 | TagInfocxx . . $ TagInfo# tagInfo; |
| 2194 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 2195 | int byte_index; |
| 2196 | |
| 2197 | #define NUM_TAG_INFOScxx . . $ `gtk/gtktextbtree.c:2197:9`! 10 |
| 2198 | |
| 2199 | line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 2200 | byte_index = gtk_text_iter_get_line_indexcxx . . $ gtk_text_iter_get_line_index(5a5b43ca5e929c7e). (iter); |
| 2201 | |
| 2202 | tagInfo.tagscxx . . $ TagInfo#tags. = g_ptr_array_sized_newcxx . . $ g_ptr_array_sized_new(ecefafac130ff34b). (NUM_TAG_INFOScxx . . $ `gtk/gtktextbtree.c:2197:9`!); |
| 2203 | tagInfo.countscxx . . $ TagInfo#counts. = g_array_newcxx . . $ g_array_new(fe898421933afc00). (FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, sizeof (int)); |
| 2204 | |
| 2205 | /* |
| 2206 | * Record tag toggles within the line of indexPtr but preceding |
| 2207 | * indexPtr. Note that if this loop segfaults, your |
| 2208 | * byte_index probably points past the sum of all |
| 2209 | * seg->byte_count */ |
| 2210 | |
| 2211 | for (index = 0, seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 2212 | (index + seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) <= byte_index; |
| 2213 | index += seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count., seg = seg->nextcxx . . $ _GtkTextLineSegment#next.) |
| 2214 | { |
| 2215 | if ((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 2216 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 2217 | { |
| 2218 | inc_countcxx . . $ inc_count(12efdf60738d4d4a). (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag., 1, &tagInfo); |
| 2219 | } |
| 2220 | } |
| 2221 | |
| 2222 | /* |
| 2223 | * Record toggles for tags in lines that are predecessors of |
| 2224 | * line but under the same level-0 GtkTextBTreeNode. |
| 2225 | */ |
| 2226 | |
| 2227 | for (siblingline = line->parentcxx . . $ _GtkTextLine#parent.->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 2228 | siblingline != line; |
| 2229 | siblingline = siblingline->nextcxx . . $ _GtkTextLine#next.) |
| 2230 | { |
| 2231 | for (seg = siblingline->segmentscxx . . $ _GtkTextLine#segments.; seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2232 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.) |
| 2233 | { |
| 2234 | if ((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 2235 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 2236 | { |
| 2237 | inc_countcxx . . $ inc_count(12efdf60738d4d4a). (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag., 1, &tagInfo); |
| 2238 | } |
| 2239 | } |
| 2240 | } |
| 2241 | |
| 2242 | /* |
| 2243 | * For each GtkTextBTreeNode in the ancestry of this line, record tag |
| 2244 | * toggles for all siblings that precede that GtkTextBTreeNode. |
| 2245 | */ |
| 2246 | |
| 2247 | for (node = line->parentcxx . . $ _GtkTextLine#parent.; node->parentcxx . . $ _GtkTextBTreeNode#parent. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2248 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 2249 | { |
| 2250 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *siblingPtr; |
| 2251 | Summarycxx . . $ Summary# *summary; |
| 2252 | |
| 2253 | for (siblingPtr = node->parentcxx . . $ _GtkTextBTreeNode#parent.->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 2254 | siblingPtr != node; siblingPtr = siblingPtr->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 2255 | { |
| 2256 | for (summary = siblingPtr->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2257 | summary = summary->nextcxx . . $ Summary#next.) |
| 2258 | { |
| 2259 | if (summary->toggle_countcxx . . $ Summary#toggle_count. & 1) |
| 2260 | { |
| 2261 | inc_countcxx . . $ inc_count(12efdf60738d4d4a). (summary->infocxx . . $ Summary#info.->tagcxx . . $ _GtkTextTagInfo#tag., summary->toggle_countcxx . . $ Summary#toggle_count., |
| 2262 | &tagInfo); |
| 2263 | } |
| 2264 | } |
| 2265 | } |
| 2266 | } |
| 2267 | |
| 2268 | /* |
| 2269 | * Go through the tag information and squash out all of the tags |
| 2270 | * that have even toggle counts (these tags exist before the point |
| 2271 | * of interest, but not at the desired character itself). |
| 2272 | */ |
| 2273 | |
| 2274 | for (src = 0, dst = 0; src < tagInfo.tagscxx . . $ TagInfo#tags.->lencxx . . $ _GPtrArray#len.; src++) |
| 2275 | { |
| 2276 | if (g_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:69:9`! (tagInfo.counts, int, src) & 1) |
| 2277 | { |
| 2278 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (GTK_IS_TEXT_TAGcxx . . $ `gtk/gtktexttag.h:69:9`! (g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (tagInfo.tags, src))); |
| 2279 | g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (tagInfo.tags, dst) = g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (tagInfo.tags, src); |
| 2280 | dst++; |
| 2281 | } |
| 2282 | } |
| 2283 | |
| 2284 | g_ptr_array_set_sizecxx . . $ g_ptr_array_set_size(a9bf79c3455f9f51). (tagInfo.tagscxx . . $ TagInfo#tags., dst); |
| 2285 | g_array_unrefcxx . . $ g_array_unref(3e7fee704de2a37e). (tagInfo.countscxx . . $ TagInfo#counts.); |
| 2286 | if (dst == 0) |
| 2287 | { |
| 2288 | g_ptr_array_unrefcxx . . $ g_ptr_array_unref(ebd7774315fc8cef). (tagInfo.tagscxx . . $ TagInfo#tags.); |
| 2289 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2290 | } |
| 2291 | |
| 2292 | /* Sort tags in ascending order of priority */ |
| 2293 | _gtk_text_tag_array_sortcxx . . $ _gtk_text_tag_array_sort(ebd7774315fc8cef). (tagInfo.tagscxx . . $ TagInfo#tags.); |
| 2294 | |
| 2295 | return tagInfo.tagscxx . . $ TagInfo#tags.; |
| 2296 | } |
| 2297 | |
| 2298 | static void |
| 2299 | copy_segmentcxx . . $ copy_segment(b3c87f9f947a34f). (GStringcxx . . $ GString# *string, |
| 2300 | gbooleancxx . . $ gboolean# include_hidden, |
| 2301 | gbooleancxx . . $ gboolean# include_nonchars, |
| 2302 | const GtkTextItercxx . . $ GtkTextIter# *start, |
| 2303 | const GtkTextItercxx . . $ GtkTextIter# *end) |
| 2304 | { |
| 2305 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *end_seg; |
| 2306 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2307 | |
| 2308 | if (gtk_text_iter_equalcxx . . $ gtk_text_iter_equal(d4eab490b36c1539). (start, end)) |
| 2309 | return; |
| 2310 | |
| 2311 | seg = _gtk_text_iter_get_indexable_segmentcxx . . $ _gtk_text_iter_get_indexable_segment(844d619f98f748d3). (start); |
| 2312 | end_seg = _gtk_text_iter_get_indexable_segmentcxx . . $ _gtk_text_iter_get_indexable_segment(844d619f98f748d3). (end); |
| 2313 | |
| 2314 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 2315 | { |
| 2316 | gbooleancxx . . $ gboolean# copy = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2317 | int copy_bytes = 0; |
| 2318 | int copy_start = 0; |
| 2319 | |
| 2320 | /* Don't copy if we're invisible; segments are invisible/not |
| 2321 | as a whole, no need to check each char */ |
| 2322 | if (!include_hidden && |
| 2323 | _gtk_text_btree_char_is_invisiblecxx . . $ _gtk_text_btree_char_is_invisible(5a5b43ca5e929c7e). (start)) |
| 2324 | { |
| 2325 | copy = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2326 | /* printf (" <invisible>\n"); */ |
| 2327 | } |
| 2328 | |
| 2329 | copy_start = _gtk_text_iter_get_segment_bytecxx . . $ _gtk_text_iter_get_segment_byte(5a5b43ca5e929c7e). (start); |
| 2330 | |
| 2331 | if (seg == end_seg) |
| 2332 | { |
| 2333 | /* End is in the same segment; need to copy fewer bytes. */ |
| 2334 | int end_byte = _gtk_text_iter_get_segment_bytecxx . . $ _gtk_text_iter_get_segment_byte(5a5b43ca5e929c7e). (end); |
| 2335 | |
| 2336 | copy_bytes = end_byte - copy_start; |
| 2337 | } |
| 2338 | else |
| 2339 | copy_bytes = seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count. - copy_start; |
| 2340 | |
| 2341 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (copy_bytes != 0); /* Due to iter equality check at |
| 2342 | front of this function. */ |
| 2343 | |
| 2344 | if (copy) |
| 2345 | { |
| 2346 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! ((copy_start + copy_bytes) <= seg->byte_count); |
| 2347 | |
| 2348 | g_string_append_lencxx . . $ `<external>/2906017559248664336/gstring.h:252:9`! (string, |
| 2349 | seg->body.chars + copy_start, |
| 2350 | copy_bytes); |
| 2351 | } |
| 2352 | |
| 2353 | /* printf (" :%s\n", string->str); */ |
| 2354 | } |
| 2355 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_paintable_typecxx . . $ gtk_text_paintable_type.) |
| 2356 | { |
| 2357 | gbooleancxx . . $ gboolean# copy = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2358 | |
| 2359 | if (!include_nonchars) |
| 2360 | { |
| 2361 | copy = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2362 | } |
| 2363 | else if (!include_hidden && |
| 2364 | _gtk_text_btree_char_is_invisiblecxx . . $ _gtk_text_btree_char_is_invisible(5a5b43ca5e929c7e). (start)) |
| 2365 | { |
| 2366 | copy = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2367 | } |
| 2368 | |
| 2369 | if (copy) |
| 2370 | { |
| 2371 | g_string_append_lencxx . . $ `<external>/2906017559248664336/gstring.h:252:9`! (string, |
| 2372 | _gtk_text_unknown_char_utf8, |
| 2373 | GTK_TEXT_UNKNOWN_CHAR_UTF8_LENcxx . . $ `gtk/gtktexttypesprivate.h:67:9`!); |
| 2374 | } |
| 2375 | } |
| 2376 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_child_typecxx . . $ gtk_text_child_type.) |
| 2377 | { |
| 2378 | gbooleancxx . . $ gboolean# copy = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2379 | if (!include_nonchars && |
| 2380 | g_strcmp0cxx . . $ g_strcmp0(5ae29d726ae57f88). (_gtk_text_unknown_char_utf8cxx . . $ _gtk_text_unknown_char_utf8., gtk_text_child_anchor_get_replacementcxx . . $ gtk_text_child_anchor_get_replacement(e0251fe23e9ffed4). (seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..objcxx . . $ _GtkTextChildBody#obj.)) == 0) |
| 2381 | { |
| 2382 | copy = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2383 | } |
| 2384 | else if (!include_hidden && |
| 2385 | _gtk_text_btree_char_is_invisiblecxx . . $ _gtk_text_btree_char_is_invisible(5a5b43ca5e929c7e). (start)) |
| 2386 | { |
| 2387 | copy = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2388 | } |
| 2389 | |
| 2390 | if (copy) |
| 2391 | { |
| 2392 | g_string_append_lencxx . . $ `<external>/2906017559248664336/gstring.h:252:9`! (string, |
| 2393 | gtk_text_child_anchor_get_replacement (seg->body.child.obj), |
| 2394 | seg->byte_count); |
| 2395 | } |
| 2396 | } |
| 2397 | } |
| 2398 | |
| 2399 | char * |
| 2400 | _gtk_text_btree_get_textcxx . . $ _gtk_text_btree_get_text(f43541d54a7f0cdc). (const GtkTextItercxx . . $ GtkTextIter# *start_orig, |
| 2401 | const GtkTextItercxx . . $ GtkTextIter# *end_orig, |
| 2402 | gbooleancxx . . $ gboolean# include_hidden, |
| 2403 | gbooleancxx . . $ gboolean# include_nonchars) |
| 2404 | { |
| 2405 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2406 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *end_seg; |
| 2407 | GStringcxx . . $ GString# *retval; |
| 2408 | GtkTextItercxx . . $ GtkTextIter# iter; |
| 2409 | GtkTextItercxx . . $ GtkTextIter# start; |
| 2410 | GtkTextItercxx . . $ GtkTextIter# end; |
| 2411 | |
| 2412 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (start_orig != 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`!); |
| 2413 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (end_orig != 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`!); |
| 2414 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (_gtk_text_iter_get_btree (start_orig) == |
| 2415 | _gtk_text_iter_get_btree (end_orig), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2416 | |
| 2417 | start = *start_orig; |
| 2418 | end = *end_orig; |
| 2419 | |
| 2420 | gtk_text_iter_ordercxx . . $ gtk_text_iter_order(46b6b30b5a2f58be). (&start, &end); |
| 2421 | |
| 2422 | retval = g_string_newcxx . . $ g_string_new(e8737c02110bb79b). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2423 | |
| 2424 | end_seg = _gtk_text_iter_get_indexable_segmentcxx . . $ _gtk_text_iter_get_indexable_segment(844d619f98f748d3). (&end); |
| 2425 | iter = start; |
| 2426 | seg = _gtk_text_iter_get_indexable_segmentcxx . . $ _gtk_text_iter_get_indexable_segment(844d619f98f748d3). (&iter); |
| 2427 | while (seg != end_seg) |
| 2428 | { |
| 2429 | copy_segmentcxx . . $ copy_segment(b3c87f9f947a34f). (retval, include_hidden, include_nonchars, |
| 2430 | &iter, &end); |
| 2431 | |
| 2432 | _gtk_text_iter_forward_indexable_segmentcxx . . $ _gtk_text_iter_forward_indexable_segment(5e3286410dd2bd0c). (&iter); |
| 2433 | |
| 2434 | seg = _gtk_text_iter_get_indexable_segmentcxx . . $ _gtk_text_iter_get_indexable_segment(844d619f98f748d3). (&iter); |
| 2435 | } |
| 2436 | |
| 2437 | copy_segmentcxx . . $ copy_segment(b3c87f9f947a34f). (retval, include_hidden, include_nonchars, &iter, &end); |
| 2438 | |
| 2439 | return g_string_freecxx . . $ `<external>/2906017559248664336/gstring.h:73:9`! (retval, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 2440 | } |
| 2441 | |
| 2442 | int |
| 2443 | _gtk_text_btree_line_countcxx . . $ _gtk_text_btree_line_count(8affb14981d0feb). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 2444 | { |
| 2445 | /* Subtract bogus line at the end; we return a count |
| 2446 | of usable lines. */ |
| 2447 | return tree->root_nodecxx . . $ _GtkTextBTree#root_node.->num_linescxx . . $ _GtkTextBTreeNode#num_lines. - 1; |
| 2448 | } |
| 2449 | |
| 2450 | int |
| 2451 | _gtk_text_btree_char_countcxx . . $ _gtk_text_btree_char_count(8affb14981d0feb). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 2452 | { |
| 2453 | /* Exclude newline in bogus last line and the |
| 2454 | * one in the last line that is after the end iterator |
| 2455 | */ |
| 2456 | return tree->root_nodecxx . . $ _GtkTextBTree#root_node.->num_charscxx . . $ _GtkTextBTreeNode#num_chars. - 2; |
| 2457 | } |
| 2458 | |
| 2459 | gbooleancxx . . $ gboolean# |
| 2460 | _gtk_text_btree_char_is_invisiblecxx . . $ _gtk_text_btree_char_is_invisible(5a5b43ca5e929c7e). (const GtkTextItercxx . . $ GtkTextIter# *iter) |
| 2461 | { |
| 2462 | gbooleancxx . . $ gboolean# invisible = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; /* if nobody says otherwise, it's visible */ |
| 2463 | int *tagCnts; |
| 2464 | GtkTextTagcxx . . $ GtkTextTag# **tags; |
| 2465 | int numTags; |
| 2466 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 2467 | GtkTextLinecxx . . $ GtkTextLine# *siblingline; |
| 2468 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2469 | GtkTextTagcxx . . $ GtkTextTag# *tag; |
| 2470 | int i, index; |
| 2471 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 2472 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 2473 | int byte_index; |
| 2474 | |
| 2475 | tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (iter); |
| 2476 | |
| 2477 | /* Short-circuit if we've never seen a visibility tag within the |
| 2478 | * tag table (meaning everything must be visible). |
| 2479 | */ |
| 2480 | if G_LIKELYcxx . . $ `<external>/12741050725406041920/gmacros.h:1284:9`! (!_gtk_text_tag_table_affects_visibility (tree->table)) |
| 2481 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2482 | |
| 2483 | line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 2484 | |
| 2485 | byte_index = gtk_text_iter_get_line_indexcxx . . $ gtk_text_iter_get_line_index(5a5b43ca5e929c7e). (iter); |
| 2486 | |
| 2487 | numTags = gtk_text_tag_table_get_sizecxx . . $ gtk_text_tag_table_get_size(818f52f65dea3084). (tree->tablecxx . . $ _GtkTextBTree#table.); |
| 2488 | |
| 2489 | tagCnts = g_allocacxx . . $ `<external>/2019178843399655176/galloca.h:99:9`! (sizeof (int) * numTags); |
| 2490 | tags = g_allocacxx . . $ `<external>/2019178843399655176/galloca.h:99:9`! (sizeof (GtkTextTag *) * numTags); |
| 2491 | |
| 2492 | memsetcxx . . $ memset(d1de1e4fb215f1c6). (tagCnts, 0, sizeof (int) * numTags); |
| 2493 | |
| 2494 | /* |
| 2495 | * Record tag toggles within the line of indexPtr but preceding |
| 2496 | * indexPtr. |
| 2497 | */ |
| 2498 | |
| 2499 | for (index = 0, seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 2500 | (index + seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) <= byte_index; /* segfault here means invalid index */ |
| 2501 | index += seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count., seg = seg->nextcxx . . $ _GtkTextLineSegment#next.) |
| 2502 | { |
| 2503 | if ((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 2504 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 2505 | { |
| 2506 | tag = seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag.; |
| 2507 | if (tag->privcxx . . $ _GtkTextTag#priv.->invisible_setcxx . . $ _GtkTextTagPrivate#invisible_set.) |
| 2508 | { |
| 2509 | tags[tag->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.] = tag; |
| 2510 | tagCnts[tag->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.]++; |
| 2511 | } |
| 2512 | } |
| 2513 | } |
| 2514 | |
| 2515 | /* |
| 2516 | * Record toggles for tags in lines that are predecessors of |
| 2517 | * line but under the same level-0 GtkTextBTreeNode. |
| 2518 | */ |
| 2519 | |
| 2520 | for (siblingline = line->parentcxx . . $ _GtkTextLine#parent.->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 2521 | siblingline != line; |
| 2522 | siblingline = siblingline->nextcxx . . $ _GtkTextLine#next.) |
| 2523 | { |
| 2524 | for (seg = siblingline->segmentscxx . . $ _GtkTextLine#segments.; seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2525 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.) |
| 2526 | { |
| 2527 | if ((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 2528 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 2529 | { |
| 2530 | tag = seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag.; |
| 2531 | if (tag->privcxx . . $ _GtkTextTag#priv.->invisible_setcxx . . $ _GtkTextTagPrivate#invisible_set.) |
| 2532 | { |
| 2533 | tags[tag->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.] = tag; |
| 2534 | tagCnts[tag->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.]++; |
| 2535 | } |
| 2536 | } |
| 2537 | } |
| 2538 | } |
| 2539 | |
| 2540 | /* |
| 2541 | * For each GtkTextBTreeNode in the ancestry of this line, record tag toggles |
| 2542 | * for all siblings that precede that GtkTextBTreeNode. |
| 2543 | */ |
| 2544 | |
| 2545 | for (node = line->parentcxx . . $ _GtkTextLine#parent.; node->parentcxx . . $ _GtkTextBTreeNode#parent. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2546 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 2547 | { |
| 2548 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *siblingPtr; |
| 2549 | Summarycxx . . $ Summary# *summary; |
| 2550 | |
| 2551 | for (siblingPtr = node->parentcxx . . $ _GtkTextBTreeNode#parent.->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 2552 | siblingPtr != node; siblingPtr = siblingPtr->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 2553 | { |
| 2554 | for (summary = siblingPtr->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2555 | summary = summary->nextcxx . . $ Summary#next.) |
| 2556 | { |
| 2557 | if (summary->toggle_countcxx . . $ Summary#toggle_count. & 1) |
| 2558 | { |
| 2559 | tag = summary->infocxx . . $ Summary#info.->tagcxx . . $ _GtkTextTagInfo#tag.; |
| 2560 | if (tag->privcxx . . $ _GtkTextTag#priv.->invisible_setcxx . . $ _GtkTextTagPrivate#invisible_set.) |
| 2561 | { |
| 2562 | tags[tag->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.] = tag; |
| 2563 | tagCnts[tag->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.] += summary->toggle_countcxx . . $ Summary#toggle_count.; |
| 2564 | } |
| 2565 | } |
| 2566 | } |
| 2567 | } |
| 2568 | } |
| 2569 | |
| 2570 | /* |
| 2571 | * Now traverse from highest priority to lowest, |
| 2572 | * take invisible value from first odd count (= on) |
| 2573 | */ |
| 2574 | |
| 2575 | for (i = numTags-1; i >=0; i--) |
| 2576 | { |
| 2577 | if (tagCnts[i] & 1) |
| 2578 | { |
| 2579 | /* FIXME not sure this should be if 0 */ |
| 2580 | #if 0 |
| 2581 | #ifndef ALWAYS_SHOW_SELECTION |
| 2582 | /* who would make the selection invisible? */ |
| 2583 | if ((tag == tkxt->seltag) |
| 2584 | && !(tkxt->flags & GOT_FOCUS)) |
| 2585 | { |
| 2586 | continue; |
| 2587 | } |
| 2588 | #endif |
| 2589 | #endif |
| 2590 | invisible = tags[i]->privcxx . . $ _GtkTextTag#priv.->valuescxx . . $ _GtkTextTagPrivate#values.->invisiblecxx . . $ _GtkTextAttributes#invisible.; |
| 2591 | break; |
| 2592 | } |
| 2593 | } |
| 2594 | |
| 2595 | return invisible; |
| 2596 | } |
| 2597 | |
| 2598 | |
| 2599 | /* |
| 2600 | * Manipulate marks |
| 2601 | */ |
| 2602 | |
| 2603 | static void |
| 2604 | redisplay_regioncxx . . $ redisplay_region(45085b43b37ed786). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2605 | const GtkTextItercxx . . $ GtkTextIter# *start, |
| 2606 | const GtkTextItercxx . . $ GtkTextIter# *end, |
| 2607 | gbooleancxx . . $ gboolean# cursors_only) |
| 2608 | { |
| 2609 | BTreeViewcxx . . $ BTreeView# *view; |
| 2610 | GtkTextLinecxx . . $ GtkTextLine# *start_line, *end_line; |
| 2611 | |
| 2612 | if (gtk_text_iter_comparecxx . . $ gtk_text_iter_compare(d4eab490b36c1539). (start, end) > 0) |
| 2613 | { |
| 2614 | const GtkTextItercxx . . $ GtkTextIter# *tmp = start; |
| 2615 | start = end; |
| 2616 | end = tmp; |
| 2617 | } |
| 2618 | |
| 2619 | start_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (start); |
| 2620 | end_line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (end); |
| 2621 | |
| 2622 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 2623 | while (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 2624 | { |
| 2625 | int start_y, end_y; |
| 2626 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 2627 | |
| 2628 | start_y = _gtk_text_btree_find_line_topcxx . . $ _gtk_text_btree_find_line_top(961e3c8dc8590ef7). (tree, start_line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 2629 | |
| 2630 | if (end_line == start_line) |
| 2631 | end_y = start_y; |
| 2632 | else |
| 2633 | end_y = _gtk_text_btree_find_line_topcxx . . $ _gtk_text_btree_find_line_top(961e3c8dc8590ef7). (tree, end_line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 2634 | |
| 2635 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (start_line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 2636 | if (ld) |
| 2637 | start_y -= ld->top_inkcxx . . $ _GtkTextLineData#top_ink.; |
| 2638 | |
| 2639 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (end_line, view->view_idcxx . . $ _BTreeView#view_id.); |
| 2640 | if (ld) |
| 2641 | end_y += ld->heightcxx . . $ _GtkTextLineData#height. + ld->bottom_inkcxx . . $ _GtkTextLineData#bottom_ink.; |
| 2642 | |
| 2643 | if (cursors_only) |
| 2644 | gtk_text_layout_cursors_changedcxx . . $ gtk_text_layout_cursors_changed(76872bf4df3f228a). (view->layoutcxx . . $ _BTreeView#layout., start_y, |
| 2645 | end_y - start_y, |
| 2646 | end_y - start_y); |
| 2647 | else |
| 2648 | gtk_text_layout_changedcxx . . $ gtk_text_layout_changed(76872bf4df3f228a). (view->layoutcxx . . $ _BTreeView#layout., start_y, |
| 2649 | end_y - start_y, |
| 2650 | end_y - start_y); |
| 2651 | |
| 2652 | view = view->nextcxx . . $ _BTreeView#next.; |
| 2653 | } |
| 2654 | } |
| 2655 | |
| 2656 | static void |
| 2657 | redisplay_markcxx . . $ redisplay_mark(e00ee75c9b2241e9). (GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *mark) |
| 2658 | { |
| 2659 | GtkTextItercxx . . $ GtkTextIter# iter; |
| 2660 | GtkTextItercxx . . $ GtkTextIter# end; |
| 2661 | gbooleancxx . . $ gboolean# cursor_only; |
| 2662 | |
| 2663 | _gtk_text_btree_get_iter_at_markcxx . . $ _gtk_text_btree_get_iter_at_mark(ad958e517ae5d648). (mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..treecxx . . $ _GtkTextMarkBody#tree., |
| 2664 | &iter, |
| 2665 | mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..objcxx . . $ _GtkTextMarkBody#obj.); |
| 2666 | |
| 2667 | end = iter; |
| 2668 | gtk_text_iter_forward_charcxx . . $ gtk_text_iter_forward_char(5e3286410dd2bd0c). (&end); |
| 2669 | |
| 2670 | DVcxx . . $ `gtk/gtktextbtreeprivate.h:34:9`! (g_print ("invalidating due to moving visible mark (%s)\n", G_STRLOC)); |
| 2671 | cursor_only = mark == mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..treecxx . . $ _GtkTextMarkBody#tree.->insert_markcxx . . $ _GtkTextBTree#insert_mark.->segmentcxx . . $ _GtkTextMark#segment.; |
| 2672 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..treecxx . . $ _GtkTextMarkBody#tree., &iter, &end, cursor_only); |
| 2673 | } |
| 2674 | |
| 2675 | static void |
| 2676 | redisplay_mark_if_visiblecxx . . $ redisplay_mark_if_visible(e00ee75c9b2241e9). (GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *mark) |
| 2677 | { |
| 2678 | if (!mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible.) |
| 2679 | return; |
| 2680 | else |
| 2681 | redisplay_markcxx . . $ redisplay_mark(e00ee75c9b2241e9). (mark); |
| 2682 | } |
| 2683 | |
| 2684 | static void |
| 2685 | ensure_not_off_endcxx . . $ ensure_not_off_end(1d83426d65b262be). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2686 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *mark, |
| 2687 | GtkTextItercxx . . $ GtkTextIter# *iter) |
| 2688 | { |
| 2689 | if (gtk_text_iter_get_linecxx . . $ gtk_text_iter_get_line(5a5b43ca5e929c7e). (iter) == _gtk_text_btree_line_countcxx . . $ _gtk_text_btree_line_count(8affb14981d0feb). (tree)) |
| 2690 | gtk_text_iter_backward_charcxx . . $ gtk_text_iter_backward_char(5e3286410dd2bd0c). (iter); |
| 2691 | } |
| 2692 | |
| 2693 | static GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 2694 | real_set_markcxx . . $ real_set_mark(24098c57f1e31a08). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2695 | GtkTextMarkcxx . . $ GtkTextMark# *existing_mark, |
| 2696 | const char *name, |
| 2697 | gbooleancxx . . $ gboolean# left_gravity, |
| 2698 | const GtkTextItercxx . . $ GtkTextIter# *where, |
| 2699 | gbooleancxx . . $ gboolean# should_exist, |
| 2700 | gbooleancxx . . $ gboolean# redraw_selections) |
| 2701 | { |
| 2702 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *mark; |
| 2703 | GtkTextItercxx . . $ GtkTextIter# iter; |
| 2704 | |
| 2705 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (tree != 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`!); |
| 2706 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (where != 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`!); |
| 2707 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (_gtk_text_iter_get_btree (where) == tree, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2708 | |
| 2709 | if (existing_mark) |
| 2710 | { |
| 2711 | if (gtk_text_mark_get_buffercxx . . $ gtk_text_mark_get_buffer(c953b74ad48cffc9). (existing_mark) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 2712 | mark = existing_mark->segmentcxx . . $ _GtkTextMark#segment.; |
| 2713 | else |
| 2714 | mark = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2715 | } |
| 2716 | else if (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 2717 | mark = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (tree->mark_tablecxx . . $ _GtkTextBTree#mark_table., |
| 2718 | name); |
| 2719 | else |
| 2720 | mark = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2721 | |
| 2722 | if (should_exist && mark == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 2723 | { |
| 2724 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("No mark '%s' exists!", name); |
| 2725 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2726 | } |
| 2727 | |
| 2728 | /* OK if !should_exist and it does already exist, in that case |
| 2729 | * we just move it. |
| 2730 | */ |
| 2731 | |
| 2732 | iter = *where; |
| 2733 | |
| 2734 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 2735 | _gtk_text_iter_checkcxx . . $ _gtk_text_iter_check(c912771e51a39db9). (&iter); |
| 2736 | |
| 2737 | if (mark != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 2738 | { |
| 2739 | if (redraw_selections && |
| 2740 | (mark == tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.->segmentcxx . . $ _GtkTextMark#segment. || |
| 2741 | mark == tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.->segmentcxx . . $ _GtkTextMark#segment.)) |
| 2742 | { |
| 2743 | GtkTextItercxx . . $ GtkTextIter# old_pos; |
| 2744 | |
| 2745 | _gtk_text_btree_get_iter_at_markcxx . . $ _gtk_text_btree_get_iter_at_mark(ad958e517ae5d648). (tree, &old_pos, |
| 2746 | mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..objcxx . . $ _GtkTextMarkBody#obj.); |
| 2747 | redisplay_regioncxx . . $ redisplay_region(45085b43b37ed786). (tree, &old_pos, where, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 2748 | } |
| 2749 | |
| 2750 | /* |
| 2751 | * don't let visible marks be after the final newline of the |
| 2752 | * file. |
| 2753 | */ |
| 2754 | |
| 2755 | if (mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible.) |
| 2756 | { |
| 2757 | ensure_not_off_endcxx . . $ ensure_not_off_end(1d83426d65b262be). (tree, mark, &iter); |
| 2758 | } |
| 2759 | |
| 2760 | /* Redraw the mark's old location. */ |
| 2761 | redisplay_mark_if_visiblecxx . . $ redisplay_mark_if_visible(e00ee75c9b2241e9). (mark); |
| 2762 | |
| 2763 | /* Unlink mark from its current location. |
| 2764 | This could hose our iterator... */ |
| 2765 | gtk_text_btree_unlink_segmentcxx . . $ gtk_text_btree_unlink_segment(7c91a0bf59e632d8). (tree, mark, |
| 2766 | mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..linecxx . . $ _GtkTextMarkBody#line.); |
| 2767 | mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..linecxx . . $ _GtkTextMarkBody#line. = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (&iter); |
| 2768 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (mark->body.mark.line == _gtk_text_iter_get_text_line (&iter)); |
| 2769 | |
| 2770 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); /* make sure the iterator recomputes its |
| 2771 | segment */ |
| 2772 | } |
| 2773 | else |
| 2774 | { |
| 2775 | if (existing_mark) |
| 2776 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (existing_mark); |
| 2777 | else |
| 2778 | existing_mark = gtk_text_mark_newcxx . . $ gtk_text_mark_new(b059519090b60baa). (name, left_gravity); |
| 2779 | |
| 2780 | mark = existing_mark->segmentcxx . . $ _GtkTextMark#segment.; |
| 2781 | _gtk_mark_segment_set_treecxx . . $ _gtk_mark_segment_set_tree(ceb7ba263148d196). (mark, tree); |
| 2782 | |
| 2783 | mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..linecxx . . $ _GtkTextMarkBody#line. = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (&iter); |
| 2784 | |
| 2785 | if (mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name.) |
| 2786 | g_hash_table_insertcxx . . $ g_hash_table_insert(6a7c46015dd5ef26). (tree->mark_tablecxx . . $ _GtkTextBTree#mark_table., |
| 2787 | mark->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name., |
| 2788 | mark); |
| 2789 | } |
| 2790 | |
| 2791 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 2792 | _gtk_text_iter_checkcxx . . $ _gtk_text_iter_check(c912771e51a39db9). (&iter); |
| 2793 | |
| 2794 | /* Link mark into new location */ |
| 2795 | gtk_text_btree_link_segmentcxx . . $ gtk_text_btree_link_segment(fafcfc58c576ceba). (mark, &iter); |
| 2796 | |
| 2797 | /* Invalidate some iterators. */ |
| 2798 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 2799 | |
| 2800 | /* |
| 2801 | * update the screen at the mark's new location. |
| 2802 | */ |
| 2803 | |
| 2804 | redisplay_mark_if_visiblecxx . . $ redisplay_mark_if_visible(e00ee75c9b2241e9). (mark); |
| 2805 | |
| 2806 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 2807 | { |
| 2808 | _gtk_text_iter_checkcxx . . $ _gtk_text_iter_check(c912771e51a39db9). (&iter); |
| 2809 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 2810 | } |
| 2811 | |
| 2812 | return mark; |
| 2813 | } |
| 2814 | |
| 2815 | |
| 2816 | GtkTextMarkcxx . . $ GtkTextMark#* |
| 2817 | _gtk_text_btree_set_markcxx . . $ _gtk_text_btree_set_mark(b36acfd47245e118). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2818 | GtkTextMarkcxx . . $ GtkTextMark# *existing_mark, |
| 2819 | const char *name, |
| 2820 | gbooleancxx . . $ gboolean# left_gravity, |
| 2821 | const GtkTextItercxx . . $ GtkTextIter# *iter, |
| 2822 | gbooleancxx . . $ gboolean# should_exist) |
| 2823 | { |
| 2824 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2825 | |
| 2826 | seg = real_set_markcxx . . $ real_set_mark(24098c57f1e31a08). (tree, existing_mark, |
| 2827 | name, left_gravity, iter, should_exist, |
| 2828 | TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 2829 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg); |
| 2830 | |
| 2831 | return seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..objcxx . . $ _GtkTextMarkBody#obj.; |
| 2832 | } |
| 2833 | |
| 2834 | gbooleancxx . . $ gboolean# |
| 2835 | _gtk_text_btree_get_selection_boundscxx . . $ _gtk_text_btree_get_selection_bounds(1c6ccf34d906b7a7). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2836 | GtkTextItercxx . . $ GtkTextIter# *start, |
| 2837 | GtkTextItercxx . . $ GtkTextIter# *end) |
| 2838 | { |
| 2839 | GtkTextItercxx . . $ GtkTextIter# tmp_start, tmp_end; |
| 2840 | |
| 2841 | _gtk_text_btree_get_iter_at_markcxx . . $ _gtk_text_btree_get_iter_at_mark(ad958e517ae5d648). (tree, &tmp_start, |
| 2842 | tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.); |
| 2843 | _gtk_text_btree_get_iter_at_markcxx . . $ _gtk_text_btree_get_iter_at_mark(ad958e517ae5d648). (tree, &tmp_end, |
| 2844 | tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.); |
| 2845 | |
| 2846 | if (gtk_text_iter_equalcxx . . $ gtk_text_iter_equal(d4eab490b36c1539). (&tmp_start, &tmp_end)) |
| 2847 | { |
| 2848 | if (start) |
| 2849 | *start = tmp_start; |
| 2850 | |
| 2851 | if (end) |
| 2852 | *end = tmp_end; |
| 2853 | |
| 2854 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 2855 | } |
| 2856 | else |
| 2857 | { |
| 2858 | gtk_text_iter_ordercxx . . $ gtk_text_iter_order(46b6b30b5a2f58be). (&tmp_start, &tmp_end); |
| 2859 | |
| 2860 | if (start) |
| 2861 | *start = tmp_start; |
| 2862 | |
| 2863 | if (end) |
| 2864 | *end = tmp_end; |
| 2865 | |
| 2866 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 2867 | } |
| 2868 | } |
| 2869 | |
| 2870 | void |
| 2871 | _gtk_text_btree_place_cursorcxx . . $ _gtk_text_btree_place_cursor(7d57f20088b3c77e). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2872 | const GtkTextItercxx . . $ GtkTextIter# *iter) |
| 2873 | { |
| 2874 | _gtk_text_btree_select_rangecxx . . $ _gtk_text_btree_select_range(52b2982649fc761c). (tree, iter, iter); |
| 2875 | } |
| 2876 | |
| 2877 | void |
| 2878 | _gtk_text_btree_select_rangecxx . . $ _gtk_text_btree_select_range(52b2982649fc761c). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2879 | const GtkTextItercxx . . $ GtkTextIter# *ins, |
| 2880 | const GtkTextItercxx . . $ GtkTextIter# *bound) |
| 2881 | { |
| 2882 | GtkTextItercxx . . $ GtkTextIter# old_ins, old_bound; |
| 2883 | |
| 2884 | _gtk_text_btree_get_iter_at_markcxx . . $ _gtk_text_btree_get_iter_at_mark(ad958e517ae5d648). (tree, &old_ins, |
| 2885 | tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.); |
| 2886 | _gtk_text_btree_get_iter_at_markcxx . . $ _gtk_text_btree_get_iter_at_mark(ad958e517ae5d648). (tree, &old_bound, |
| 2887 | tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.); |
| 2888 | |
| 2889 | /* Check if it's no-op since gtk_text_buffer_place_cursor() |
| 2890 | * also calls this, and this will redraw the cursor line. */ |
| 2891 | if (!gtk_text_iter_equalcxx . . $ gtk_text_iter_equal(d4eab490b36c1539). (&old_ins, ins) || |
| 2892 | !gtk_text_iter_equalcxx . . $ gtk_text_iter_equal(d4eab490b36c1539). (&old_bound, bound)) |
| 2893 | { |
| 2894 | redisplay_regioncxx . . $ redisplay_region(45085b43b37ed786). (tree, &old_ins, &old_bound, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 2895 | |
| 2896 | /* Move insert AND selection_bound before we redisplay */ |
| 2897 | real_set_markcxx . . $ real_set_mark(24098c57f1e31a08). (tree, tree->insert_markcxx . . $ _GtkTextBTree#insert_mark., |
| 2898 | "insert", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, ins, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 2899 | real_set_markcxx . . $ real_set_mark(24098c57f1e31a08). (tree, tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark., |
| 2900 | "selection_bound", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, bound, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 2901 | |
| 2902 | redisplay_regioncxx . . $ redisplay_region(45085b43b37ed786). (tree, ins, bound, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 2903 | } |
| 2904 | } |
| 2905 | |
| 2906 | |
| 2907 | void |
| 2908 | _gtk_text_btree_remove_mark_by_namecxx . . $ _gtk_text_btree_remove_mark_by_name(58030e12a136f8c5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2909 | const char *name) |
| 2910 | { |
| 2911 | GtkTextMarkcxx . . $ GtkTextMark# *mark; |
| 2912 | |
| 2913 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2914 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2915 | |
| 2916 | mark = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (tree->mark_tablecxx . . $ _GtkTextBTree#mark_table., |
| 2917 | name); |
| 2918 | |
| 2919 | _gtk_text_btree_remove_markcxx . . $ _gtk_text_btree_remove_mark(de9a4238c384db9f). (tree, mark); |
| 2920 | } |
| 2921 | |
| 2922 | void |
| 2923 | _gtk_text_btree_release_mark_segmentcxx . . $ _gtk_text_btree_release_mark_segment(9c843d7c209b8602). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2924 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *segment) |
| 2925 | { |
| 2926 | |
| 2927 | if (segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name.) |
| 2928 | g_hash_table_removecxx . . $ g_hash_table_remove(453ebbf4abdbe50e). (tree->mark_tablecxx . . $ _GtkTextBTree#mark_table., segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name.); |
| 2929 | |
| 2930 | segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..treecxx . . $ _GtkTextMarkBody#tree. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2931 | segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..linecxx . . $ _GtkTextMarkBody#line. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 2932 | |
| 2933 | /* Remove the ref on the mark, which frees segment as a side effect |
| 2934 | * if this is the last reference. |
| 2935 | */ |
| 2936 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..objcxx . . $ _GtkTextMarkBody#obj.); |
| 2937 | } |
| 2938 | |
| 2939 | void |
| 2940 | _gtk_text_btree_remove_markcxx . . $ _gtk_text_btree_remove_mark(de9a4238c384db9f). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2941 | GtkTextMarkcxx . . $ GtkTextMark# *mark) |
| 2942 | { |
| 2943 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *segment; |
| 2944 | |
| 2945 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (mark != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2946 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2947 | |
| 2948 | segment = mark->segmentcxx . . $ _GtkTextMark#segment.; |
| 2949 | |
| 2950 | if (segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..not_deleteablecxx . . $ _GtkTextMarkBody#not_deleteable.) |
| 2951 | { |
| 2952 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("Can't delete special mark '%s'", segment->body.mark.name); |
| 2953 | return; |
| 2954 | } |
| 2955 | |
| 2956 | /* This calls cleanup_line and segments_changed */ |
| 2957 | gtk_text_btree_unlink_segmentcxx . . $ gtk_text_btree_unlink_segment(7c91a0bf59e632d8). (tree, segment, segment->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..linecxx . . $ _GtkTextMarkBody#line.); |
| 2958 | |
| 2959 | _gtk_text_btree_release_mark_segmentcxx . . $ _gtk_text_btree_release_mark_segment(9c843d7c209b8602). (tree, segment); |
| 2960 | } |
| 2961 | |
| 2962 | gbooleancxx . . $ gboolean# |
| 2963 | _gtk_text_btree_mark_is_insertcxx . . $ _gtk_text_btree_mark_is_insert(2b29c41d7db4fb73). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2964 | GtkTextMarkcxx . . $ GtkTextMark# *segment) |
| 2965 | { |
| 2966 | return segment == tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.; |
| 2967 | } |
| 2968 | |
| 2969 | gbooleancxx . . $ gboolean# |
| 2970 | _gtk_text_btree_mark_is_selection_boundcxx . . $ _gtk_text_btree_mark_is_selection_bound(2b29c41d7db4fb73). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2971 | GtkTextMarkcxx . . $ GtkTextMark# *segment) |
| 2972 | { |
| 2973 | return segment == tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.; |
| 2974 | } |
| 2975 | |
| 2976 | GtkTextMarkcxx . . $ GtkTextMark# * |
| 2977 | _gtk_text_btree_get_insertcxx . . $ _gtk_text_btree_get_insert(1ff201e3f45abca7). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 2978 | { |
| 2979 | return tree->insert_markcxx . . $ _GtkTextBTree#insert_mark.; |
| 2980 | } |
| 2981 | |
| 2982 | GtkTextMarkcxx . . $ GtkTextMark# * |
| 2983 | _gtk_text_btree_get_selection_boundcxx . . $ _gtk_text_btree_get_selection_bound(1ff201e3f45abca7). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 2984 | { |
| 2985 | return tree->selection_bound_markcxx . . $ _GtkTextBTree#selection_bound_mark.; |
| 2986 | } |
| 2987 | |
| 2988 | GtkTextMarkcxx . . $ GtkTextMark#* |
| 2989 | _gtk_text_btree_get_mark_by_namecxx . . $ _gtk_text_btree_get_mark_by_name(1cef8a6fdb3f21aa). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 2990 | const char *name) |
| 2991 | { |
| 2992 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 2993 | |
| 2994 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (tree != 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`!); |
| 2995 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (name != 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`!); |
| 2996 | |
| 2997 | seg = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (tree->mark_tablecxx . . $ _GtkTextBTree#mark_table., name); |
| 2998 | |
| 2999 | return seg ? seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..objcxx . . $ _GtkTextMarkBody#obj. : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3000 | } |
| 3001 | |
| 3002 | /** |
| 3003 | * gtk_text_mark_set_visible: |
| 3004 | * @mark: a GtkTextMark |
| 3005 | * @setting: visibility of mark |
| 3006 | * |
| 3007 | * Sets the visibility of @mark. |
| 3008 | * |
| 3009 | * The insertion point is normally visible, i.e. you can see it as |
| 3010 | * a vertical bar. Also, the text widget uses a visible mark to |
| 3011 | * indicate where a drop will occur when dragging-and-dropping text. |
| 3012 | * Most other marks are not visible. |
| 3013 | * |
| 3014 | * Marks are not visible by default. |
| 3015 | */ |
| 3016 | void |
| 3017 | gtk_text_mark_set_visiblecxx . . $ gtk_text_mark_set_visible(bf77249bb422e885). (GtkTextMarkcxx . . $ GtkTextMark# *mark, |
| 3018 | gbooleancxx . . $ gboolean# setting) |
| 3019 | { |
| 3020 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3021 | |
| 3022 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (mark != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3023 | |
| 3024 | seg = mark->segmentcxx . . $ _GtkTextMark#segment.; |
| 3025 | |
| 3026 | if (seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible. == setting) |
| 3027 | return; |
| 3028 | else |
| 3029 | { |
| 3030 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible. = setting; |
| 3031 | |
| 3032 | if (seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..treecxx . . $ _GtkTextMarkBody#tree.) |
| 3033 | redisplay_markcxx . . $ redisplay_mark(e00ee75c9b2241e9). (seg); |
| 3034 | } |
| 3035 | } |
| 3036 | |
| 3037 | GtkTextLinecxx . . $ GtkTextLine#* |
| 3038 | _gtk_text_btree_first_could_contain_tagcxx . . $ _gtk_text_btree_first_could_contain_tag(36db1e750c0a38a3). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 3039 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3040 | { |
| 3041 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 3042 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 3043 | |
| 3044 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (tree != 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`!); |
| 3045 | |
| 3046 | if (tag != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3047 | { |
| 3048 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 3049 | |
| 3050 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3051 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3052 | |
| 3053 | if (info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3054 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3055 | |
| 3056 | node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 3057 | |
| 3058 | /* We know the tag root has instances of the given |
| 3059 | tag below it */ |
| 3060 | |
| 3061 | continue_outer_loop: |
| 3062 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3063 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 3064 | { |
| 3065 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* Failure probably means bad tag summaries. */ |
| 3066 | node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 3067 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3068 | { |
| 3069 | if (gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (node, tag)) |
| 3070 | goto continue_outer_loop; |
| 3071 | |
| 3072 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 3073 | } |
| 3074 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3075 | } |
| 3076 | |
| 3077 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* The tag summaries said some node had |
| 3078 | tag toggles... */ |
| 3079 | |
| 3080 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level == 0); |
| 3081 | |
| 3082 | return node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 3083 | } |
| 3084 | else |
| 3085 | { |
| 3086 | /* Looking for any tag at all (tag == NULL). |
| 3087 | Unfortunately this can't be done in a simple and efficient way |
| 3088 | right now; so I'm just going to return the |
| 3089 | first line in the btree. FIXME */ |
| 3090 | return _gtk_text_btree_get_linecxx . . $ _gtk_text_btree_get_line(57cf43dcab45dd23). (tree, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3091 | } |
| 3092 | } |
| 3093 | |
| 3094 | GtkTextLinecxx . . $ GtkTextLine#* |
| 3095 | _gtk_text_btree_last_could_contain_tagcxx . . $ _gtk_text_btree_last_could_contain_tag(36db1e750c0a38a3). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 3096 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3097 | { |
| 3098 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 3099 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *last_node; |
| 3100 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 3101 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 3102 | |
| 3103 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (tree != 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`!); |
| 3104 | |
| 3105 | if (tag != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3106 | { |
| 3107 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 3108 | |
| 3109 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3110 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3111 | |
| 3112 | node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 3113 | /* We know the tag root has instances of the given |
| 3114 | tag below it */ |
| 3115 | |
| 3116 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 3117 | { |
| 3118 | last_node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3119 | node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 3120 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3121 | { |
| 3122 | if (gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (node, tag)) |
| 3123 | last_node = node; |
| 3124 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 3125 | } |
| 3126 | |
| 3127 | node = last_node; |
| 3128 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* Failure probably means bad tag summaries. */ |
| 3129 | } |
| 3130 | |
| 3131 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* The tag summaries said some node had |
| 3132 | tag toggles... */ |
| 3133 | |
| 3134 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level == 0); |
| 3135 | |
| 3136 | /* Find the last line in this node */ |
| 3137 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 3138 | while (line->nextcxx . . $ _GtkTextLine#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3139 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 3140 | |
| 3141 | return line; |
| 3142 | } |
| 3143 | else |
| 3144 | { |
| 3145 | /* This search can't be done efficiently at the moment, |
| 3146 | at least not without complexity. |
| 3147 | So, we just return the last line. |
| 3148 | */ |
| 3149 | return _gtk_text_btree_get_end_iter_linecxx . . $ _gtk_text_btree_get_end_iter_line(76b79c735937395b). (tree); |
| 3150 | } |
| 3151 | } |
| 3152 | |
| 3153 | |
| 3154 | /* |
| 3155 | * Lines |
| 3156 | */ |
| 3157 | |
| 3158 | int |
| 3159 | _gtk_text_line_get_numbercxx . . $ _gtk_text_line_get_number(d56862f6b53e2224). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3160 | { |
| 3161 | GtkTextLinecxx . . $ GtkTextLine# *line2; |
| 3162 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, *parent, *node2; |
| 3163 | int index; |
| 3164 | |
| 3165 | /* |
| 3166 | * First count how many lines precede this one in its level-0 |
| 3167 | * GtkTextBTreeNode. |
| 3168 | */ |
| 3169 | |
| 3170 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 3171 | index = 0; |
| 3172 | for (line2 = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; line2 != line; |
| 3173 | line2 = line2->nextcxx . . $ _GtkTextLine#next.) |
| 3174 | { |
| 3175 | if (line2 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3176 | { |
| 3177 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_line_number couldn't find line"); |
| 3178 | } |
| 3179 | index += 1; |
| 3180 | } |
| 3181 | |
| 3182 | /* |
| 3183 | * Now work up through the levels of the tree one at a time, |
| 3184 | * counting how many lines are in GtkTextBTreeNodes preceding the current |
| 3185 | * GtkTextBTreeNode. |
| 3186 | */ |
| 3187 | |
| 3188 | for (parent = node->parentcxx . . $ _GtkTextBTreeNode#parent. ; parent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3189 | node = parent, parent = parent->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 3190 | { |
| 3191 | for (node2 = parent->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; node2 != node; |
| 3192 | node2 = node2->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 3193 | { |
| 3194 | if (node2 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3195 | { |
| 3196 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_line_number couldn't find GtkTextBTreeNode"); |
| 3197 | } |
| 3198 | index += node2->num_linescxx . . $ _GtkTextBTreeNode#num_lines.; |
| 3199 | } |
| 3200 | } |
| 3201 | return index; |
| 3202 | } |
| 3203 | |
| 3204 | static GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 3205 | find_toggle_segment_before_charcxx . . $ find_toggle_segment_before_char(7fe56b7aaf6d27f7). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3206 | int char_in_line, |
| 3207 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3208 | { |
| 3209 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3210 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *toggle_seg; |
| 3211 | int index; |
| 3212 | |
| 3213 | toggle_seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3214 | index = 0; |
| 3215 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3216 | while ( (index + seg->char_countcxx . . $ _GtkTextLineSegment#char_count.) <= char_in_line ) |
| 3217 | { |
| 3218 | if (((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 3219 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 3220 | && (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag)) |
| 3221 | toggle_seg = seg; |
| 3222 | |
| 3223 | index += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 3224 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3225 | } |
| 3226 | |
| 3227 | return toggle_seg; |
| 3228 | } |
| 3229 | |
| 3230 | static GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 3231 | find_toggle_segment_before_bytecxx . . $ find_toggle_segment_before_byte(7fe56b7aaf6d27f7). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3232 | int byte_in_line, |
| 3233 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3234 | { |
| 3235 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3236 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *toggle_seg; |
| 3237 | int index; |
| 3238 | |
| 3239 | toggle_seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3240 | index = 0; |
| 3241 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3242 | while ( (index + seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) <= byte_in_line ) |
| 3243 | { |
| 3244 | if (((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 3245 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 3246 | && (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag)) |
| 3247 | toggle_seg = seg; |
| 3248 | |
| 3249 | index += seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 3250 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3251 | } |
| 3252 | |
| 3253 | return toggle_seg; |
| 3254 | } |
| 3255 | |
| 3256 | static gbooleancxx . . $ gboolean# |
| 3257 | find_toggle_outside_current_linecxx . . $ find_toggle_outside_current_line(832a679c7dc6414e). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3258 | GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 3259 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3260 | { |
| 3261 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 3262 | GtkTextLinecxx . . $ GtkTextLine# *sibling_line; |
| 3263 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3264 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *toggle_seg; |
| 3265 | int toggles; |
| 3266 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3267 | |
| 3268 | /* |
| 3269 | * No toggle in this line. Look for toggles for the tag in lines |
| 3270 | * that are predecessors of line but under the same |
| 3271 | * level-0 GtkTextBTreeNode. |
| 3272 | */ |
| 3273 | toggle_seg = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3274 | sibling_line = line->parentcxx . . $ _GtkTextLine#parent.->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 3275 | while (sibling_line != line) |
| 3276 | { |
| 3277 | seg = sibling_line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3278 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3279 | { |
| 3280 | if (((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 3281 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 3282 | && (seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag)) |
| 3283 | toggle_seg = seg; |
| 3284 | |
| 3285 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3286 | } |
| 3287 | |
| 3288 | sibling_line = sibling_line->nextcxx . . $ _GtkTextLine#next.; |
| 3289 | } |
| 3290 | |
| 3291 | if (toggle_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3292 | return (toggle_seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.); |
| 3293 | |
| 3294 | /* |
| 3295 | * No toggle in this GtkTextBTreeNode. Scan upwards through the ancestors of |
| 3296 | * this GtkTextBTreeNode, counting the number of toggles of the given tag in |
| 3297 | * siblings that precede that GtkTextBTreeNode. |
| 3298 | */ |
| 3299 | |
| 3300 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 3301 | |
| 3302 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3303 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3304 | |
| 3305 | toggles = 0; |
| 3306 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 3307 | while (node->parentcxx . . $ _GtkTextBTreeNode#parent. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3308 | { |
| 3309 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *sibling_node; |
| 3310 | |
| 3311 | sibling_node = node->parentcxx . . $ _GtkTextBTreeNode#parent.->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 3312 | while (sibling_node != node) |
| 3313 | { |
| 3314 | Summarycxx . . $ Summary# *summary; |
| 3315 | |
| 3316 | summary = sibling_node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 3317 | while (summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3318 | { |
| 3319 | if (summary->infocxx . . $ Summary#info. == info) |
| 3320 | toggles += summary->toggle_countcxx . . $ Summary#toggle_count.; |
| 3321 | |
| 3322 | summary = summary->nextcxx . . $ Summary#next.; |
| 3323 | } |
| 3324 | |
| 3325 | sibling_node = sibling_node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 3326 | } |
| 3327 | |
| 3328 | if (node == info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.) |
| 3329 | break; |
| 3330 | |
| 3331 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 3332 | } |
| 3333 | |
| 3334 | /* |
| 3335 | * An odd number of toggles means that the tag is present at the |
| 3336 | * given point. |
| 3337 | */ |
| 3338 | |
| 3339 | return (toggles & 1) != 0; |
| 3340 | } |
| 3341 | |
| 3342 | /* FIXME this function is far too slow, for no good reason. */ |
| 3343 | gbooleancxx . . $ gboolean# |
| 3344 | _gtk_text_line_char_has_tagcxx . . $ _gtk_text_line_char_has_tag(4054006462a98ace). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3345 | GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 3346 | int char_in_line, |
| 3347 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3348 | { |
| 3349 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *toggle_seg; |
| 3350 | |
| 3351 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3352 | |
| 3353 | /* |
| 3354 | * Check for toggles for the tag in the line but before |
| 3355 | * the char. If there is one, its type indicates whether or |
| 3356 | * not the character is tagged. |
| 3357 | */ |
| 3358 | |
| 3359 | toggle_seg = find_toggle_segment_before_charcxx . . $ find_toggle_segment_before_char(7fe56b7aaf6d27f7). (line, char_in_line, tag); |
| 3360 | |
| 3361 | if (toggle_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3362 | return (toggle_seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.); |
| 3363 | else |
| 3364 | return find_toggle_outside_current_linecxx . . $ find_toggle_outside_current_line(832a679c7dc6414e). (line, tree, tag); |
| 3365 | } |
| 3366 | |
| 3367 | gbooleancxx . . $ gboolean# |
| 3368 | _gtk_text_line_byte_has_tagcxx . . $ _gtk_text_line_byte_has_tag(4054006462a98ace). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3369 | GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 3370 | int byte_in_line, |
| 3371 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 3372 | { |
| 3373 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *toggle_seg; |
| 3374 | |
| 3375 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3376 | |
| 3377 | /* |
| 3378 | * Check for toggles for the tag in the line but before |
| 3379 | * the char. If there is one, its type indicates whether or |
| 3380 | * not the character is tagged. |
| 3381 | */ |
| 3382 | |
| 3383 | toggle_seg = find_toggle_segment_before_bytecxx . . $ find_toggle_segment_before_byte(7fe56b7aaf6d27f7). (line, byte_in_line, tag); |
| 3384 | |
| 3385 | if (toggle_seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3386 | return (toggle_seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.); |
| 3387 | else |
| 3388 | return find_toggle_outside_current_linecxx . . $ find_toggle_outside_current_line(832a679c7dc6414e). (line, tree, tag); |
| 3389 | } |
| 3390 | |
| 3391 | gbooleancxx . . $ gboolean# |
| 3392 | _gtk_text_line_is_lastcxx . . $ _gtk_text_line_is_last(84f588a6cda321b9). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3393 | GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 3394 | { |
| 3395 | return line == get_last_linecxx . . $ get_last_line(76b79c735937395b). (tree); |
| 3396 | } |
| 3397 | |
| 3398 | static void |
| 3399 | ensure_end_iter_linecxx . . $ ensure_end_iter_line(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 3400 | { |
| 3401 | if (tree->end_iter_line_stampcxx . . $ _GtkTextBTree#end_iter_line_stamp. != tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp.) |
| 3402 | { |
| 3403 | int real_line; |
| 3404 | |
| 3405 | /* n_lines is without the magic line at the end */ |
| 3406 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (_gtk_text_btree_line_count (tree) >= 1); |
| 3407 | |
| 3408 | tree->end_iter_linecxx . . $ _GtkTextBTree#end_iter_line. = _gtk_text_btree_get_line_no_lastcxx . . $ _gtk_text_btree_get_line_no_last(57cf43dcab45dd23). (tree, -1, &real_line); |
| 3409 | |
| 3410 | tree->end_iter_line_stampcxx . . $ _GtkTextBTree#end_iter_line_stamp. = tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp.; |
| 3411 | } |
| 3412 | } |
| 3413 | |
| 3414 | static void |
| 3415 | ensure_end_iter_segmentcxx . . $ ensure_end_iter_segment(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 3416 | { |
| 3417 | if (tree->end_iter_segment_stampcxx . . $ _GtkTextBTree#end_iter_segment_stamp. != tree->segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp.) |
| 3418 | { |
| 3419 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3420 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *last_with_chars; |
| 3421 | |
| 3422 | ensure_end_iter_linecxx . . $ ensure_end_iter_line(1eb40b89a5a0e9e5). (tree); |
| 3423 | |
| 3424 | last_with_chars = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3425 | |
| 3426 | seg = tree->end_iter_linecxx . . $ _GtkTextBTree#end_iter_line.->segmentscxx . . $ _GtkTextLine#segments.; |
| 3427 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3428 | { |
| 3429 | if (seg->char_countcxx . . $ _GtkTextLineSegment#char_count. > 0) |
| 3430 | last_with_chars = seg; |
| 3431 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3432 | } |
| 3433 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (last_with_chars); |
| 3434 | |
| 3435 | tree->end_iter_segmentcxx . . $ _GtkTextBTree#end_iter_segment. = last_with_chars; |
| 3436 | |
| 3437 | /* We know the last char in the last line is '\n' */ |
| 3438 | tree->end_iter_segment_byte_indexcxx . . $ _GtkTextBTree#end_iter_segment_byte_index. = last_with_chars->byte_countcxx . . $ _GtkTextLineSegment#byte_count. - 1; |
| 3439 | tree->end_iter_segment_char_offsetcxx . . $ _GtkTextBTree#end_iter_segment_char_offset. = last_with_chars->char_countcxx . . $ _GtkTextLineSegment#char_count. - 1; |
| 3440 | |
| 3441 | tree->end_iter_segment_stampcxx . . $ _GtkTextBTree#end_iter_segment_stamp. = tree->segments_changed_stampcxx . . $ _GtkTextBTree#segments_changed_stamp.; |
| 3442 | |
| 3443 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (tree->end_iter_segment->type == >k_text_char_type); |
| 3444 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (tree->end_iter_segment->body.chars[tree->end_iter_segment_byte_index] == '\n'); |
| 3445 | } |
| 3446 | } |
| 3447 | |
| 3448 | gbooleancxx . . $ gboolean# |
| 3449 | _gtk_text_line_contains_end_itercxx . . $ _gtk_text_line_contains_end_iter(84f588a6cda321b9). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3450 | GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 3451 | { |
| 3452 | ensure_end_iter_linecxx . . $ ensure_end_iter_line(1eb40b89a5a0e9e5). (tree); |
| 3453 | |
| 3454 | return line == tree->end_iter_linecxx . . $ _GtkTextBTree#end_iter_line.; |
| 3455 | } |
| 3456 | |
| 3457 | gbooleancxx . . $ gboolean# |
| 3458 | _gtk_text_btree_is_endcxx . . $ _gtk_text_btree_is_end(e4cc9b4ac2512208). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 3459 | GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3460 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, |
| 3461 | int byte_index, |
| 3462 | int char_offset) |
| 3463 | { |
| 3464 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (byte_index >= 0 || char_offset >= 0, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3465 | |
| 3466 | /* Do this first to avoid walking segments in most cases */ |
| 3467 | if (!_gtk_text_line_contains_end_itercxx . . $ _gtk_text_line_contains_end_iter(84f588a6cda321b9). (line, tree)) |
| 3468 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3469 | |
| 3470 | ensure_end_iter_segmentcxx . . $ ensure_end_iter_segment(1eb40b89a5a0e9e5). (tree); |
| 3471 | |
| 3472 | if (seg != tree->end_iter_segmentcxx . . $ _GtkTextBTree#end_iter_segment.) |
| 3473 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3474 | |
| 3475 | if (byte_index >= 0) |
| 3476 | return byte_index == tree->end_iter_segment_byte_indexcxx . . $ _GtkTextBTree#end_iter_segment_byte_index.; |
| 3477 | else |
| 3478 | return char_offset == tree->end_iter_segment_char_offsetcxx . . $ _GtkTextBTree#end_iter_segment_char_offset.; |
| 3479 | } |
| 3480 | |
| 3481 | GtkTextLinecxx . . $ GtkTextLine#* |
| 3482 | _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3483 | { |
| 3484 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 3485 | |
| 3486 | if (line->nextcxx . . $ _GtkTextLine#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3487 | return line->nextcxx . . $ _GtkTextLine#next.; |
| 3488 | else |
| 3489 | { |
| 3490 | /* |
| 3491 | * This was the last line associated with the particular parent |
| 3492 | * GtkTextBTreeNode. Search up the tree for the next GtkTextBTreeNode, |
| 3493 | * then search down from that GtkTextBTreeNode to find the first |
| 3494 | * line. |
| 3495 | */ |
| 3496 | |
| 3497 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 3498 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && node->nextcxx . . $ _GtkTextBTreeNode#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3499 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 3500 | |
| 3501 | if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3502 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3503 | |
| 3504 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 3505 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 3506 | { |
| 3507 | node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 3508 | } |
| 3509 | |
| 3510 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->children.line != line); |
| 3511 | |
| 3512 | return node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 3513 | } |
| 3514 | } |
| 3515 | |
| 3516 | GtkTextLinecxx . . $ GtkTextLine#* |
| 3517 | _gtk_text_line_next_excluding_lastcxx . . $ _gtk_text_line_next_excluding_last(cf600876af6c7fcb). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3518 | { |
| 3519 | GtkTextLinecxx . . $ GtkTextLine# *next; |
| 3520 | |
| 3521 | next = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (line); |
| 3522 | |
| 3523 | /* If we were on the end iter line, we can't go to |
| 3524 | * the last line |
| 3525 | */ |
| 3526 | if (next && next->nextcxx . . $ _GtkTextLine#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && /* these checks are optimization only */ |
| 3527 | _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (next) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3528 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3529 | |
| 3530 | return next; |
| 3531 | } |
| 3532 | |
| 3533 | GtkTextLinecxx . . $ GtkTextLine#* |
| 3534 | _gtk_text_line_previouscxx . . $ _gtk_text_line_previous(cf600876af6c7fcb). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3535 | { |
| 3536 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 3537 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node2; |
| 3538 | GtkTextLinecxx . . $ GtkTextLine# *prev; |
| 3539 | |
| 3540 | /* |
| 3541 | * Find the line under this GtkTextBTreeNode just before the starting line. |
| 3542 | */ |
| 3543 | prev = line->parentcxx . . $ _GtkTextLine#parent.->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; /* First line at leaf */ |
| 3544 | while (prev != line) |
| 3545 | { |
| 3546 | if (prev->nextcxx . . $ _GtkTextLine#next. == line) |
| 3547 | return prev; |
| 3548 | |
| 3549 | prev = prev->nextcxx . . $ _GtkTextLine#next.; |
| 3550 | |
| 3551 | if (prev == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3552 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_previous_line ran out of lines"); |
| 3553 | } |
| 3554 | |
| 3555 | /* |
| 3556 | * This was the first line associated with the particular parent |
| 3557 | * GtkTextBTreeNode. Search up the tree for the previous GtkTextBTreeNode, |
| 3558 | * then search down from that GtkTextBTreeNode to find its last line. |
| 3559 | */ |
| 3560 | for (node = line->parentcxx . . $ _GtkTextLine#parent.; ; node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 3561 | { |
| 3562 | if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || node->parentcxx . . $ _GtkTextBTreeNode#parent. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3563 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3564 | else if (node != node->parentcxx . . $ _GtkTextBTreeNode#parent.->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.) |
| 3565 | break; |
| 3566 | } |
| 3567 | |
| 3568 | for (node2 = node->parentcxx . . $ _GtkTextBTreeNode#parent.->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; ; |
| 3569 | node2 = node2->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.) |
| 3570 | { |
| 3571 | while (node2->nextcxx . . $ _GtkTextBTreeNode#next. != node) |
| 3572 | node2 = node2->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 3573 | |
| 3574 | if (node2->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 3575 | break; |
| 3576 | |
| 3577 | node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3578 | } |
| 3579 | |
| 3580 | for (prev = node2->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. ; ; prev = prev->nextcxx . . $ _GtkTextLine#next.) |
| 3581 | { |
| 3582 | if (prev->nextcxx . . $ _GtkTextLine#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3583 | return prev; |
| 3584 | } |
| 3585 | |
| 3586 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 3587 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3588 | } |
| 3589 | |
| 3590 | |
| 3591 | GtkTextLineDatacxx . . $ GtkTextLineData#* |
| 3592 | _gtk_text_line_data_newcxx . . $ _gtk_text_line_data_new(b4e5603bb86d08ec). (GtkTextLayoutcxx . . $ GtkTextLayout# *layout, |
| 3593 | GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3594 | { |
| 3595 | GtkTextLineDatacxx . . $ GtkTextLineData# *line_data; |
| 3596 | |
| 3597 | line_data = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (GtkTextLineData, 1); |
| 3598 | |
| 3599 | line_data->view_idcxx . . $ _GtkTextLineData#view_id. = layout; |
| 3600 | line_data->nextcxx . . $ _GtkTextLineData#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3601 | line_data->widthcxx . . $ _GtkTextLineData#width. = 0; |
| 3602 | line_data->heightcxx . . $ _GtkTextLineData#height. = 0; |
| 3603 | line_data->top_inkcxx . . $ _GtkTextLineData#top_ink. = 0; |
| 3604 | line_data->bottom_inkcxx . . $ _GtkTextLineData#bottom_ink. = 0; |
| 3605 | line_data->validcxx . . $ _GtkTextLineData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3606 | |
| 3607 | return line_data; |
| 3608 | } |
| 3609 | |
| 3610 | void |
| 3611 | _gtk_text_line_add_datacxx . . $ _gtk_text_line_add_data(b071f505967e561c). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3612 | GtkTextLineDatacxx . . $ GtkTextLineData# *data) |
| 3613 | { |
| 3614 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3615 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (data != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3616 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (data->view_id != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3617 | |
| 3618 | if (line->viewscxx . . $ _GtkTextLine#views.) |
| 3619 | { |
| 3620 | data->nextcxx . . $ _GtkTextLineData#next. = line->viewscxx . . $ _GtkTextLine#views.; |
| 3621 | line->viewscxx . . $ _GtkTextLine#views. = data; |
| 3622 | } |
| 3623 | else |
| 3624 | { |
| 3625 | line->viewscxx . . $ _GtkTextLine#views. = data; |
| 3626 | } |
| 3627 | } |
| 3628 | |
| 3629 | gpointercxx . . $ gpointer# |
| 3630 | _gtk_text_line_remove_datacxx . . $ _gtk_text_line_remove_data(fe7e31bd387752f3). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3631 | gpointercxx . . $ gpointer# view_id) |
| 3632 | { |
| 3633 | GtkTextLineDatacxx . . $ GtkTextLineData# *prev; |
| 3634 | GtkTextLineDatacxx . . $ GtkTextLineData# *iter; |
| 3635 | |
| 3636 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 3637 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (view_id != 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`!); |
| 3638 | |
| 3639 | prev = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3640 | iter = line->viewscxx . . $ _GtkTextLine#views.; |
| 3641 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3642 | { |
| 3643 | if (iter->view_idcxx . . $ _GtkTextLineData#view_id. == view_id) |
| 3644 | break; |
| 3645 | prev = iter; |
| 3646 | iter = iter->nextcxx . . $ _GtkTextLineData#next.; |
| 3647 | } |
| 3648 | |
| 3649 | if (iter) |
| 3650 | { |
| 3651 | if (prev) |
| 3652 | prev->nextcxx . . $ _GtkTextLineData#next. = iter->nextcxx . . $ _GtkTextLineData#next.; |
| 3653 | else |
| 3654 | line->viewscxx . . $ _GtkTextLine#views. = iter->nextcxx . . $ _GtkTextLineData#next.; |
| 3655 | |
| 3656 | return iter; |
| 3657 | } |
| 3658 | else |
| 3659 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3660 | } |
| 3661 | |
| 3662 | gpointercxx . . $ gpointer# |
| 3663 | _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3664 | gpointercxx . . $ gpointer# view_id) |
| 3665 | { |
| 3666 | GtkTextLineDatacxx . . $ GtkTextLineData# *iter; |
| 3667 | |
| 3668 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 3669 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (view_id != 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`!); |
| 3670 | |
| 3671 | iter = line->viewscxx . . $ _GtkTextLine#views.; |
| 3672 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3673 | { |
| 3674 | if (iter->view_idcxx . . $ _GtkTextLineData#view_id. == view_id) |
| 3675 | break; |
| 3676 | iter = iter->nextcxx . . $ _GtkTextLineData#next.; |
| 3677 | } |
| 3678 | |
| 3679 | return iter; |
| 3680 | } |
| 3681 | |
| 3682 | void |
| 3683 | _gtk_text_line_invalidate_wrapcxx . . $ _gtk_text_line_invalidate_wrap(b071f505967e561c). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3684 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld) |
| 3685 | { |
| 3686 | /* For now this is totally unoptimized. FIXME? |
| 3687 | |
| 3688 | We could probably optimize the case where the width removed |
| 3689 | is less than the max width for the parent node, |
| 3690 | and the case where the height is unchanged when we re-wrap. |
| 3691 | */ |
| 3692 | |
| 3693 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (ld != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3694 | |
| 3695 | ld->validcxx . . $ _GtkTextLineData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 3696 | gtk_text_btree_node_invalidate_upwardcxx . . $ gtk_text_btree_node_invalidate_upward(eec353699738d68c). (line->parentcxx . . $ _GtkTextLine#parent., ld->view_idcxx . . $ _GtkTextLineData#view_id.); |
| 3697 | } |
| 3698 | |
| 3699 | int |
| 3700 | _gtk_text_line_char_countcxx . . $ _gtk_text_line_char_count(d56862f6b53e2224). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3701 | { |
| 3702 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3703 | int size; |
| 3704 | |
| 3705 | size = 0; |
| 3706 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3707 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3708 | { |
| 3709 | size += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 3710 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3711 | } |
| 3712 | return size; |
| 3713 | } |
| 3714 | |
| 3715 | int |
| 3716 | _gtk_text_line_byte_countcxx . . $ _gtk_text_line_byte_count(d56862f6b53e2224). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 3717 | { |
| 3718 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3719 | int size; |
| 3720 | |
| 3721 | size = 0; |
| 3722 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3723 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 3724 | { |
| 3725 | size += seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 3726 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3727 | } |
| 3728 | |
| 3729 | return size; |
| 3730 | } |
| 3731 | |
| 3732 | int |
| 3733 | _gtk_text_line_char_indexcxx . . $ _gtk_text_line_char_index(d56862f6b53e2224). (GtkTextLinecxx . . $ GtkTextLine# *target_line) |
| 3734 | { |
| 3735 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node_stack[64]; |
| 3736 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *iter; |
| 3737 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 3738 | int num_chars; |
| 3739 | int tos = 0; |
| 3740 | |
| 3741 | /* Push all our parent nodes onto a stack */ |
| 3742 | iter = target_line->parentcxx . . $ _GtkTextLine#parent.; |
| 3743 | |
| 3744 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3745 | |
| 3746 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && tos < 64) |
| 3747 | { |
| 3748 | node_stack[tos++] = iter; |
| 3749 | iter = iter->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 3750 | } |
| 3751 | |
| 3752 | tos--; |
| 3753 | |
| 3754 | /* Check that we have the root node on top of the stack. */ |
| 3755 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node_stack[tos] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && |
| 3756 | node_stack[tos]->parent == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3757 | |
| 3758 | /* Add up chars in all nodes before the nodes in our stack. |
| 3759 | */ |
| 3760 | |
| 3761 | num_chars = 0; |
| 3762 | while (tos >= 0) |
| 3763 | { |
| 3764 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child_iter; |
| 3765 | |
| 3766 | iter = node_stack[tos]; |
| 3767 | |
| 3768 | if (iter->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 3769 | { |
| 3770 | /* stack should be empty when we're on the last node */ |
| 3771 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (tos == 0); |
| 3772 | break; /* Our children are now lines */ |
| 3773 | } |
| 3774 | |
| 3775 | tos--; |
| 3776 | |
| 3777 | /* Add up chars before us in the tree */ |
| 3778 | child_iter = iter->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 3779 | while (child_iter != node_stack[tos]) |
| 3780 | { |
| 3781 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (child_iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3782 | |
| 3783 | num_chars += child_iter->num_charscxx . . $ _GtkTextBTreeNode#num_chars.; |
| 3784 | child_iter = child_iter->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 3785 | } |
| 3786 | } |
| 3787 | |
| 3788 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3789 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (iter == target_line->parent); |
| 3790 | |
| 3791 | /* Since we don't store char counts in lines, only in segments, we |
| 3792 | have to iterate over the lines adding up segment char counts |
| 3793 | until we find our line. */ |
| 3794 | line = iter->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 3795 | while (line != target_line) |
| 3796 | { |
| 3797 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3798 | |
| 3799 | num_chars += _gtk_text_line_char_countcxx . . $ _gtk_text_line_char_count(d56862f6b53e2224). (line); |
| 3800 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 3801 | } |
| 3802 | |
| 3803 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (line == target_line); |
| 3804 | |
| 3805 | return num_chars; |
| 3806 | } |
| 3807 | |
| 3808 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 3809 | _gtk_text_line_byte_to_segmentcxx . . $ _gtk_text_line_byte_to_segment(fd1a3ecd747b4230). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3810 | int byte_offset, |
| 3811 | int *seg_offset) |
| 3812 | { |
| 3813 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3814 | int offset; |
| 3815 | |
| 3816 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 3817 | |
| 3818 | offset = byte_offset; |
| 3819 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3820 | |
| 3821 | while (offset >= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) |
| 3822 | { |
| 3823 | offset -= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 3824 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3825 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* means an invalid byte index */ |
| 3826 | } |
| 3827 | |
| 3828 | if (seg_offset) |
| 3829 | *seg_offset = offset; |
| 3830 | |
| 3831 | return seg; |
| 3832 | } |
| 3833 | |
| 3834 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 3835 | _gtk_text_line_char_to_segmentcxx . . $ _gtk_text_line_char_to_segment(fd1a3ecd747b4230). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3836 | int char_offset, |
| 3837 | int *seg_offset) |
| 3838 | { |
| 3839 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3840 | int offset; |
| 3841 | |
| 3842 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 3843 | |
| 3844 | offset = char_offset; |
| 3845 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3846 | |
| 3847 | while (offset >= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.) |
| 3848 | { |
| 3849 | offset -= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 3850 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3851 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* means an invalid char index */ |
| 3852 | } |
| 3853 | |
| 3854 | if (seg_offset) |
| 3855 | *seg_offset = offset; |
| 3856 | |
| 3857 | return seg; |
| 3858 | } |
| 3859 | |
| 3860 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 3861 | _gtk_text_line_byte_to_any_segmentcxx . . $ _gtk_text_line_byte_to_any_segment(fd1a3ecd747b4230). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3862 | int byte_offset, |
| 3863 | int *seg_offset) |
| 3864 | { |
| 3865 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3866 | int offset; |
| 3867 | |
| 3868 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 3869 | |
| 3870 | offset = byte_offset; |
| 3871 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3872 | |
| 3873 | while (offset > 0 && offset >= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) |
| 3874 | { |
| 3875 | offset -= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 3876 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3877 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* means an invalid byte index */ |
| 3878 | } |
| 3879 | |
| 3880 | if (seg_offset) |
| 3881 | *seg_offset = offset; |
| 3882 | |
| 3883 | return seg; |
| 3884 | } |
| 3885 | |
| 3886 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* |
| 3887 | _gtk_text_line_char_to_any_segmentcxx . . $ _gtk_text_line_char_to_any_segment(fd1a3ecd747b4230). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3888 | int char_offset, |
| 3889 | int *seg_offset) |
| 3890 | { |
| 3891 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3892 | int offset; |
| 3893 | |
| 3894 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 3895 | |
| 3896 | offset = char_offset; |
| 3897 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3898 | |
| 3899 | while (offset > 0 && offset >= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.) |
| 3900 | { |
| 3901 | offset -= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 3902 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3903 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* means an invalid byte index */ |
| 3904 | } |
| 3905 | |
| 3906 | if (seg_offset) |
| 3907 | *seg_offset = offset; |
| 3908 | |
| 3909 | return seg; |
| 3910 | } |
| 3911 | |
| 3912 | int |
| 3913 | _gtk_text_line_byte_to_charcxx . . $ _gtk_text_line_byte_to_char(3717dbae0d673bd3). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3914 | int byte_offset) |
| 3915 | { |
| 3916 | int char_offset; |
| 3917 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3918 | |
| 3919 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 3920 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (byte_offset >= 0, 0); |
| 3921 | |
| 3922 | char_offset = 0; |
| 3923 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3924 | while (byte_offset >= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) /* while (we need to go farther than |
| 3925 | the next segment) */ |
| 3926 | { |
| 3927 | byte_offset -= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 3928 | char_offset += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 3929 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 3930 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* our byte_index was bogus if this happens */ |
| 3931 | } |
| 3932 | |
| 3933 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 3934 | |
| 3935 | /* Now byte_offset is the offset into the current segment, |
| 3936 | and char_offset is the start of the current segment. |
| 3937 | Optimize the case where no chars use > 1 byte */ |
| 3938 | if (seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count. == seg->char_countcxx . . $ _GtkTextLineSegment#char_count.) |
| 3939 | return char_offset + byte_offset; |
| 3940 | else |
| 3941 | { |
| 3942 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 3943 | return char_offset + g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars., byte_offset); |
| 3944 | else |
| 3945 | { |
| 3946 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg->char_count == 1); |
| 3947 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (byte_offset == 0); |
| 3948 | |
| 3949 | return char_offset; |
| 3950 | } |
| 3951 | } |
| 3952 | } |
| 3953 | |
| 3954 | int |
| 3955 | _gtk_text_line_char_to_bytecxx . . $ _gtk_text_line_char_to_byte(3717dbae0d673bd3). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3956 | int char_offset) |
| 3957 | { |
| 3958 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("FIXME not implemented"); |
| 3959 | |
| 3960 | return 0; |
| 3961 | } |
| 3962 | |
| 3963 | /* FIXME sync with char_locate (or figure out a clean |
| 3964 | way to merge the two functions) */ |
| 3965 | gbooleancxx . . $ gboolean# |
| 3966 | _gtk_text_line_byte_locatecxx . . $ _gtk_text_line_byte_locate(66fb40fbd746a289). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 3967 | int byte_offset, |
| 3968 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# **segment, |
| 3969 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# **any_segment, |
| 3970 | int *seg_byte_offset, |
| 3971 | int *line_byte_offset) |
| 3972 | { |
| 3973 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 3974 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *after_last_indexable; |
| 3975 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *last_indexable; |
| 3976 | int offset; |
| 3977 | int bytes_in_line; |
| 3978 | |
| 3979 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3980 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (byte_offset >= 0, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 3981 | |
| 3982 | *segment = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3983 | *any_segment = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3984 | bytes_in_line = 0; |
| 3985 | |
| 3986 | offset = byte_offset; |
| 3987 | |
| 3988 | last_indexable = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 3989 | after_last_indexable = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3990 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 3991 | |
| 3992 | /* The loop ends when we're inside a segment; |
| 3993 | last_indexable refers to the last segment |
| 3994 | we passed entirely. */ |
| 3995 | while (seg && offset >= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) |
| 3996 | { |
| 3997 | if (seg->char_countcxx . . $ _GtkTextLineSegment#char_count. > 0) |
| 3998 | { |
| 3999 | offset -= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 4000 | bytes_in_line += seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 4001 | last_indexable = seg; |
| 4002 | after_last_indexable = last_indexable->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4003 | } |
| 4004 | |
| 4005 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4006 | } |
| 4007 | |
| 4008 | if (seg == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4009 | { |
| 4010 | /* We went off the end of the line */ |
| 4011 | if (offset != 0) |
| 4012 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("%s: byte index off the end of the line", G_STRLOCcxx . . $ `<external>/12741050725406041920/gmacros.h:928:9`!); |
| 4013 | |
| 4014 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4015 | } |
| 4016 | else |
| 4017 | { |
| 4018 | *segment = seg; |
| 4019 | if (after_last_indexable != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4020 | *any_segment = after_last_indexable; |
| 4021 | else |
| 4022 | *any_segment = *segment; |
| 4023 | } |
| 4024 | |
| 4025 | /* Override any_segment if we're in the middle of a segment. */ |
| 4026 | if (offset > 0) |
| 4027 | *any_segment = *segment; |
| 4028 | |
| 4029 | *seg_byte_offset = offset; |
| 4030 | |
| 4031 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*segment != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4032 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*any_segment != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4033 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*seg_byte_offset < (*segment)->byte_count); |
| 4034 | |
| 4035 | *line_byte_offset = bytes_in_line + *seg_byte_offset; |
| 4036 | |
| 4037 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4038 | } |
| 4039 | |
| 4040 | /* FIXME sync with byte_locate (or figure out a clean |
| 4041 | way to merge the two functions) */ |
| 4042 | gbooleancxx . . $ gboolean# |
| 4043 | _gtk_text_line_char_locatecxx . . $ _gtk_text_line_char_locate(66fb40fbd746a289). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 4044 | int char_offset, |
| 4045 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# **segment, |
| 4046 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# **any_segment, |
| 4047 | int *seg_char_offset, |
| 4048 | int *line_char_offset) |
| 4049 | { |
| 4050 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 4051 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *after_last_indexable; |
| 4052 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *last_indexable; |
| 4053 | int offset; |
| 4054 | int chars_in_line; |
| 4055 | |
| 4056 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 4057 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (char_offset >= 0, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 4058 | |
| 4059 | *segment = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4060 | *any_segment = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4061 | chars_in_line = 0; |
| 4062 | |
| 4063 | offset = char_offset; |
| 4064 | |
| 4065 | last_indexable = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4066 | after_last_indexable = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 4067 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 4068 | |
| 4069 | /* The loop ends when we're inside a segment; |
| 4070 | last_indexable refers to the last segment |
| 4071 | we passed entirely. */ |
| 4072 | while (seg && offset >= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.) |
| 4073 | { |
| 4074 | if (seg->char_countcxx . . $ _GtkTextLineSegment#char_count. > 0) |
| 4075 | { |
| 4076 | offset -= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 4077 | chars_in_line += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 4078 | last_indexable = seg; |
| 4079 | after_last_indexable = last_indexable->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4080 | } |
| 4081 | |
| 4082 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4083 | } |
| 4084 | |
| 4085 | if (seg == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4086 | { |
| 4087 | /* end of the line */ |
| 4088 | if (offset != 0) |
| 4089 | g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("%s: char offset off the end of the line", G_STRLOCcxx . . $ `<external>/12741050725406041920/gmacros.h:928:9`!); |
| 4090 | |
| 4091 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4092 | } |
| 4093 | else |
| 4094 | { |
| 4095 | *segment = seg; |
| 4096 | if (after_last_indexable != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4097 | *any_segment = after_last_indexable; |
| 4098 | else |
| 4099 | *any_segment = *segment; |
| 4100 | } |
| 4101 | |
| 4102 | /* Override any_segment if we're in the middle of a segment. */ |
| 4103 | if (offset > 0) |
| 4104 | *any_segment = *segment; |
| 4105 | |
| 4106 | *seg_char_offset = offset; |
| 4107 | |
| 4108 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*segment != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4109 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*any_segment != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4110 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*seg_char_offset < (*segment)->char_count); |
| 4111 | |
| 4112 | *line_char_offset = chars_in_line + *seg_char_offset; |
| 4113 | |
| 4114 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4115 | } |
| 4116 | |
| 4117 | void |
| 4118 | _gtk_text_line_byte_to_char_offsetscxx . . $ _gtk_text_line_byte_to_char_offsets(f6a42995cd795c15). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 4119 | int byte_offset, |
| 4120 | int *line_char_offset, |
| 4121 | int *seg_char_offset) |
| 4122 | { |
| 4123 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 4124 | int offset; |
| 4125 | |
| 4126 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4127 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (byte_offset >= 0); |
| 4128 | |
| 4129 | *line_char_offset = 0; |
| 4130 | |
| 4131 | offset = byte_offset; |
| 4132 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 4133 | |
| 4134 | while (offset >= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.) |
| 4135 | { |
| 4136 | offset -= seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 4137 | *line_char_offset += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 4138 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4139 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* means an invalid char offset */ |
| 4140 | } |
| 4141 | |
| 4142 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg->char_count > 0); /* indexable. */ |
| 4143 | |
| 4144 | /* offset is now the number of bytes into the current segment we |
| 4145 | * want to go. Count chars into the current segment. |
| 4146 | */ |
| 4147 | |
| 4148 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 4149 | { |
| 4150 | *seg_char_offset = g_utf8_strlencxx . . $ g_utf8_strlen(730d9b36f6411b7f). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars., offset); |
| 4151 | |
| 4152 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*seg_char_offset < seg->char_count); |
| 4153 | |
| 4154 | *line_char_offset += *seg_char_offset; |
| 4155 | } |
| 4156 | else |
| 4157 | { |
| 4158 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (offset == 0); |
| 4159 | *seg_char_offset = 0; |
| 4160 | } |
| 4161 | } |
| 4162 | |
| 4163 | void |
| 4164 | _gtk_text_line_char_to_byte_offsetscxx . . $ _gtk_text_line_char_to_byte_offsets(f6a42995cd795c15). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 4165 | int char_offset, |
| 4166 | int *line_byte_offset, |
| 4167 | int *seg_byte_offset) |
| 4168 | { |
| 4169 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 4170 | int offset; |
| 4171 | |
| 4172 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4173 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (char_offset >= 0); |
| 4174 | |
| 4175 | *line_byte_offset = 0; |
| 4176 | |
| 4177 | offset = char_offset; |
| 4178 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 4179 | |
| 4180 | while (offset >= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.) |
| 4181 | { |
| 4182 | offset -= seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 4183 | *line_byte_offset += seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.; |
| 4184 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4185 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* means an invalid char offset */ |
| 4186 | } |
| 4187 | |
| 4188 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (seg->char_count > 0); /* indexable. */ |
| 4189 | |
| 4190 | /* offset is now the number of chars into the current segment we |
| 4191 | want to go. Count bytes into the current segment. */ |
| 4192 | |
| 4193 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 4194 | { |
| 4195 | const char *p; |
| 4196 | |
| 4197 | /* if in the last fourth of the segment walk backwards */ |
| 4198 | if (seg->char_countcxx . . $ _GtkTextLineSegment#char_count. - offset < seg->char_countcxx . . $ _GtkTextLineSegment#char_count. / 4) |
| 4199 | p = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars. + seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count., |
| 4200 | offset - seg->char_countcxx . . $ _GtkTextLineSegment#char_count.); |
| 4201 | else |
| 4202 | p = g_utf8_offset_to_pointercxx . . $ g_utf8_offset_to_pointer(a8ddf37f112087c3). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars., offset); |
| 4203 | |
| 4204 | *seg_byte_offset = p - seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars.; |
| 4205 | |
| 4206 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (*seg_byte_offset < seg->byte_count); |
| 4207 | |
| 4208 | *line_byte_offset += *seg_byte_offset; |
| 4209 | } |
| 4210 | else |
| 4211 | { |
| 4212 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (offset == 0); |
| 4213 | *seg_byte_offset = 0; |
| 4214 | } |
| 4215 | } |
| 4216 | |
| 4217 | static int |
| 4218 | node_comparecxx . . $ node_compare(fe80fef246166706). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *lhs, |
| 4219 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *rhs) |
| 4220 | { |
| 4221 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *iter; |
| 4222 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 4223 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *common_parent; |
| 4224 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *parent_of_lower; |
| 4225 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *parent_of_higher; |
| 4226 | gbooleancxx . . $ gboolean# lhs_is_lower; |
| 4227 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *lower; |
| 4228 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *higher; |
| 4229 | |
| 4230 | /* This function assumes that lhs and rhs are not underneath each |
| 4231 | * other. |
| 4232 | */ |
| 4233 | |
| 4234 | if (lhs == rhs) |
| 4235 | return 0; |
| 4236 | |
| 4237 | if (lhs->levelcxx . . $ _GtkTextBTreeNode#level. < rhs->levelcxx . . $ _GtkTextBTreeNode#level.) |
| 4238 | { |
| 4239 | lhs_is_lower = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4240 | lower = lhs; |
| 4241 | higher = rhs; |
| 4242 | } |
| 4243 | else |
| 4244 | { |
| 4245 | lhs_is_lower = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4246 | lower = rhs; |
| 4247 | higher = lhs; |
| 4248 | } |
| 4249 | |
| 4250 | /* Algorithm: find common parent of lhs/rhs. Save the child nodes |
| 4251 | * of the common parent we used to reach the common parent; the |
| 4252 | * ordering of these child nodes in the child list is the ordering |
| 4253 | * of lhs and rhs. |
| 4254 | */ |
| 4255 | |
| 4256 | /* Get on the same level (may be on same level already) */ |
| 4257 | node = lower; |
| 4258 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. < higher->levelcxx . . $ _GtkTextBTreeNode#level.) |
| 4259 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4260 | |
| 4261 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level == higher->level); |
| 4262 | |
| 4263 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != higher); /* Happens if lower is underneath higher */ |
| 4264 | |
| 4265 | /* Go up until we have two children with a common parent. |
| 4266 | */ |
| 4267 | parent_of_lower = node; |
| 4268 | parent_of_higher = higher; |
| 4269 | |
| 4270 | while (parent_of_lower->parentcxx . . $ _GtkTextBTreeNode#parent. != parent_of_higher->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 4271 | { |
| 4272 | parent_of_lower = parent_of_lower->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4273 | parent_of_higher = parent_of_higher->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4274 | } |
| 4275 | |
| 4276 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (parent_of_lower->parent == parent_of_higher->parent); |
| 4277 | |
| 4278 | common_parent = parent_of_lower->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4279 | |
| 4280 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (common_parent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4281 | |
| 4282 | /* See which is first in the list of common_parent's children */ |
| 4283 | iter = common_parent->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 4284 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4285 | { |
| 4286 | if (iter == parent_of_higher) |
| 4287 | { |
| 4288 | /* higher is less than lower */ |
| 4289 | |
| 4290 | if (lhs_is_lower) |
| 4291 | return 1; /* lhs > rhs */ |
| 4292 | else |
| 4293 | return -1; |
| 4294 | } |
| 4295 | else if (iter == parent_of_lower) |
| 4296 | { |
| 4297 | /* lower is less than higher */ |
| 4298 | |
| 4299 | if (lhs_is_lower) |
| 4300 | return -1; /* lhs < rhs */ |
| 4301 | else |
| 4302 | return 1; |
| 4303 | } |
| 4304 | |
| 4305 | iter = iter->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 4306 | } |
| 4307 | |
| 4308 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 4309 | return 0; |
| 4310 | } |
| 4311 | |
| 4312 | /* remember that tag == NULL means "any tag" */ |
| 4313 | GtkTextLinecxx . . $ GtkTextLine#* |
| 4314 | _gtk_text_line_next_could_contain_tagcxx . . $ _gtk_text_line_next_could_contain_tag(3c085ca7f60e5d13). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 4315 | GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 4316 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 4317 | { |
| 4318 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 4319 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 4320 | gbooleancxx . . $ gboolean# below_tag_root; |
| 4321 | |
| 4322 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 4323 | |
| 4324 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 4325 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 4326 | |
| 4327 | if (tag == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4328 | { |
| 4329 | /* Right now we can only offer linear-search if the user wants |
| 4330 | * to know about any tag toggle at all. |
| 4331 | */ |
| 4332 | return _gtk_text_line_next_excluding_lastcxx . . $ _gtk_text_line_next_excluding_last(cf600876af6c7fcb). (line); |
| 4333 | } |
| 4334 | |
| 4335 | /* Our tag summaries only have node precision, not line |
| 4336 | * precision. This means that if any line under a node could contain a |
| 4337 | * tag, then any of the others could also contain a tag. |
| 4338 | * |
| 4339 | * In the future we could have some mechanism to keep track of how |
| 4340 | * many toggles we've found under a node so far, since we have a |
| 4341 | * count of toggles under the node. But for now I'm going with KISS. |
| 4342 | */ |
| 4343 | |
| 4344 | /* return same-node line, if any. */ |
| 4345 | if (line->nextcxx . . $ _GtkTextLine#next.) |
| 4346 | return line->nextcxx . . $ _GtkTextLine#next.; |
| 4347 | |
| 4348 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 4349 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4350 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4351 | |
| 4352 | if (info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4353 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4354 | |
| 4355 | if (info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == line->parentcxx . . $ _GtkTextLine#parent.) |
| 4356 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* we were at the last line under the tag root */ |
| 4357 | |
| 4358 | /* We need to go up out of this node, and on to the next one with |
| 4359 | toggles for the target tag. If we're below the tag root, we need to |
| 4360 | find the next node below the tag root that has tag summaries. If |
| 4361 | we're not below the tag root, we need to see if the tag root is |
| 4362 | after us in the tree, and if so, return the first line underneath |
| 4363 | the tag root. */ |
| 4364 | |
| 4365 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 4366 | below_tag_root = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4367 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4368 | { |
| 4369 | if (node == info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.) |
| 4370 | { |
| 4371 | below_tag_root = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4372 | break; |
| 4373 | } |
| 4374 | |
| 4375 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4376 | } |
| 4377 | |
| 4378 | if (below_tag_root) |
| 4379 | { |
| 4380 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 4381 | while (node != info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.) |
| 4382 | { |
| 4383 | if (node->nextcxx . . $ _GtkTextBTreeNode#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4384 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4385 | else |
| 4386 | { |
| 4387 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 4388 | |
| 4389 | if (gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (node, tag)) |
| 4390 | goto found; |
| 4391 | } |
| 4392 | } |
| 4393 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4394 | } |
| 4395 | else |
| 4396 | { |
| 4397 | int ordering; |
| 4398 | |
| 4399 | ordering = node_comparecxx . . $ node_compare(fe80fef246166706). (line->parentcxx . . $ _GtkTextLine#parent., info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.); |
| 4400 | |
| 4401 | if (ordering < 0) |
| 4402 | { |
| 4403 | /* Tag root is ahead of us, so search there. */ |
| 4404 | node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 4405 | goto found; |
| 4406 | } |
| 4407 | else |
| 4408 | { |
| 4409 | /* Tag root is after us, so no more lines that |
| 4410 | * could contain the tag. |
| 4411 | */ |
| 4412 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4413 | } |
| 4414 | |
| 4415 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 4416 | } |
| 4417 | |
| 4418 | found: |
| 4419 | |
| 4420 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4421 | |
| 4422 | /* We have to find the first sub-node of this node that contains |
| 4423 | * the target tag. |
| 4424 | */ |
| 4425 | |
| 4426 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 4427 | { |
| 4428 | node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 4429 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4430 | { |
| 4431 | if (gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (node, tag)) |
| 4432 | break; |
| 4433 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 4434 | } |
| 4435 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* If this fails, it likely means an |
| 4436 | incorrect tag summary led us on a |
| 4437 | wild goose chase down this branch of |
| 4438 | the tree. */ |
| 4439 | } |
| 4440 | |
| 4441 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4442 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level == 0); |
| 4443 | |
| 4444 | return node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 4445 | } |
| 4446 | |
| 4447 | static GtkTextLinecxx . . $ GtkTextLine#* |
| 4448 | prev_line_under_nodecxx . . $ prev_line_under_node(d41a0f0def86ad33). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 4449 | GtkTextLinecxx . . $ GtkTextLine# *line) |
| 4450 | { |
| 4451 | GtkTextLinecxx . . $ GtkTextLine# *prev; |
| 4452 | |
| 4453 | prev = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 4454 | |
| 4455 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (prev); |
| 4456 | |
| 4457 | if (prev != line) |
| 4458 | { |
| 4459 | while (prev->nextcxx . . $ _GtkTextLine#next. != line) |
| 4460 | prev = prev->nextcxx . . $ _GtkTextLine#next.; |
| 4461 | |
| 4462 | return prev; |
| 4463 | } |
| 4464 | |
| 4465 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4466 | } |
| 4467 | |
| 4468 | GtkTextLinecxx . . $ GtkTextLine#* |
| 4469 | _gtk_text_line_previous_could_contain_tagcxx . . $ _gtk_text_line_previous_could_contain_tag(3c085ca7f60e5d13). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 4470 | GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 4471 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 4472 | { |
| 4473 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 4474 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *found_node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4475 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 4476 | gbooleancxx . . $ gboolean# below_tag_root; |
| 4477 | GtkTextLinecxx . . $ GtkTextLine# *prev; |
| 4478 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *line_ancestor; |
| 4479 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *line_ancestor_parent; |
| 4480 | |
| 4481 | /* See next_could_contain_tag () for more extensive comments |
| 4482 | * on what's going on here. |
| 4483 | */ |
| 4484 | |
| 4485 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (line != 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`!); |
| 4486 | |
| 4487 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 4488 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 4489 | |
| 4490 | if (tag == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4491 | { |
| 4492 | /* Right now we can only offer linear-search if the user wants |
| 4493 | * to know about any tag toggle at all. |
| 4494 | */ |
| 4495 | return _gtk_text_line_previouscxx . . $ _gtk_text_line_previous(cf600876af6c7fcb). (line); |
| 4496 | } |
| 4497 | |
| 4498 | /* Return same-node line, if any. */ |
| 4499 | prev = prev_line_under_nodecxx . . $ prev_line_under_node(d41a0f0def86ad33). (line->parentcxx . . $ _GtkTextLine#parent., line); |
| 4500 | if (prev) |
| 4501 | return prev; |
| 4502 | |
| 4503 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 4504 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4505 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4506 | |
| 4507 | if (info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4508 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4509 | |
| 4510 | if (info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == line->parentcxx . . $ _GtkTextLine#parent.) |
| 4511 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* we were at the first line under the tag root */ |
| 4512 | |
| 4513 | /* Are we below the tag root */ |
| 4514 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 4515 | below_tag_root = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4516 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4517 | { |
| 4518 | if (node == info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.) |
| 4519 | { |
| 4520 | below_tag_root = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4521 | break; |
| 4522 | } |
| 4523 | |
| 4524 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4525 | } |
| 4526 | |
| 4527 | if (below_tag_root) |
| 4528 | { |
| 4529 | /* Look for a previous node under this tag root that has our |
| 4530 | * tag. |
| 4531 | */ |
| 4532 | |
| 4533 | /* this assertion holds because line->parent is not the |
| 4534 | * tag root, we are below the tag root, and the tag |
| 4535 | * root exists. |
| 4536 | */ |
| 4537 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (line->parent->parent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4538 | |
| 4539 | line_ancestor = line->parentcxx . . $ _GtkTextLine#parent.; |
| 4540 | line_ancestor_parent = line->parentcxx . . $ _GtkTextLine#parent.->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4541 | |
| 4542 | while (line_ancestor != info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.) |
| 4543 | { |
| 4544 | GSListcxx . . $ GSList# *child_nodes = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4545 | GSListcxx . . $ GSList# *tmp; |
| 4546 | |
| 4547 | /* Create reverse-order list of nodes before |
| 4548 | * line_ancestor |
| 4549 | */ |
| 4550 | if (line_ancestor_parent != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4551 | node = line_ancestor_parent->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 4552 | else |
| 4553 | node = line_ancestor; |
| 4554 | |
| 4555 | while (node != line_ancestor && node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4556 | { |
| 4557 | child_nodes = g_slist_prependcxx . . $ g_slist_prepend(6eb923d8c45a5456). (child_nodes, node); |
| 4558 | |
| 4559 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 4560 | } |
| 4561 | |
| 4562 | /* Try to find a node with our tag on it in the list */ |
| 4563 | tmp = child_nodes; |
| 4564 | while (tmp != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4565 | { |
| 4566 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *this_node = tmp->datacxx . . $ _GSList#data.; |
| 4567 | |
| 4568 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (this_node != line_ancestor); |
| 4569 | |
| 4570 | if (gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (this_node, tag)) |
| 4571 | { |
| 4572 | found_node = this_node; |
| 4573 | g_slist_freecxx . . $ g_slist_free(e7f64dba92841206). (child_nodes); |
| 4574 | goto found; |
| 4575 | } |
| 4576 | |
| 4577 | tmp = tmp->nextcxx . . $ _GSList#next.; |
| 4578 | } |
| 4579 | |
| 4580 | g_slist_freecxx . . $ g_slist_free(e7f64dba92841206). (child_nodes); |
| 4581 | |
| 4582 | /* Didn't find anything on this level; go up one level. */ |
| 4583 | line_ancestor = line_ancestor_parent; |
| 4584 | line_ancestor_parent = line_ancestor->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 4585 | } |
| 4586 | |
| 4587 | /* No dice. */ |
| 4588 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4589 | } |
| 4590 | else |
| 4591 | { |
| 4592 | int ordering; |
| 4593 | |
| 4594 | ordering = node_comparecxx . . $ node_compare(fe80fef246166706). (line->parentcxx . . $ _GtkTextLine#parent., info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.); |
| 4595 | |
| 4596 | if (ordering < 0) |
| 4597 | { |
| 4598 | /* Tag root is ahead of us, so no more lines |
| 4599 | * with this tag. |
| 4600 | */ |
| 4601 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4602 | } |
| 4603 | else |
| 4604 | { |
| 4605 | /* Tag root is after us, so grab last tagged |
| 4606 | * line underneath the tag root. |
| 4607 | */ |
| 4608 | found_node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 4609 | goto found; |
| 4610 | } |
| 4611 | |
| 4612 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 4613 | } |
| 4614 | |
| 4615 | found: |
| 4616 | |
| 4617 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (found_node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4618 | |
| 4619 | /* We have to find the last sub-node of this node that contains |
| 4620 | * the target tag. |
| 4621 | */ |
| 4622 | node = found_node; |
| 4623 | |
| 4624 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 4625 | { |
| 4626 | GSListcxx . . $ GSList# *child_nodes = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4627 | GSListcxx . . $ GSList# *iter; |
| 4628 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); /* If this fails, it likely means an |
| 4629 | incorrect tag summary led us on a |
| 4630 | wild goose chase down this branch of |
| 4631 | the tree. */ |
| 4632 | |
| 4633 | node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 4634 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4635 | { |
| 4636 | child_nodes = g_slist_prependcxx . . $ g_slist_prepend(6eb923d8c45a5456). (child_nodes, node); |
| 4637 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 4638 | } |
| 4639 | |
| 4640 | node = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* detect failure to find a child node. */ |
| 4641 | |
| 4642 | iter = child_nodes; |
| 4643 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4644 | { |
| 4645 | if (gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (iter->datacxx . . $ _GSList#data., tag)) |
| 4646 | { |
| 4647 | /* recurse into this node. */ |
| 4648 | node = iter->datacxx . . $ _GSList#data.; |
| 4649 | break; |
| 4650 | } |
| 4651 | |
| 4652 | iter = iter->nextcxx . . $ _GSList#next.; |
| 4653 | } |
| 4654 | |
| 4655 | g_slist_freecxx . . $ g_slist_free(e7f64dba92841206). (child_nodes); |
| 4656 | |
| 4657 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4658 | } |
| 4659 | |
| 4660 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4661 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level == 0); |
| 4662 | |
| 4663 | /* this assertion is correct, but slow. */ |
| 4664 | /* g_assert (node_compare (node, line->parent) < 0); */ |
| 4665 | |
| 4666 | /* Return last line in this node. */ |
| 4667 | |
| 4668 | prev = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 4669 | while (prev->nextcxx . . $ _GtkTextLine#next.) |
| 4670 | prev = prev->nextcxx . . $ _GtkTextLine#next.; |
| 4671 | |
| 4672 | return prev; |
| 4673 | } |
| 4674 | |
| 4675 | /* |
| 4676 | * Non-public function implementations |
| 4677 | */ |
| 4678 | |
| 4679 | static void |
| 4680 | summary_list_destroycxx . . $ summary_list_destroy(da23a492de438288). (Summarycxx . . $ Summary# *summary) |
| 4681 | { |
| 4682 | while (summary) |
| 4683 | { |
| 4684 | Summarycxx . . $ Summary# *next = summary->nextcxx . . $ Summary#next.; |
| 4685 | g_freecxx . . $ g_free(5d22bdacc48458e8). (summary); |
| 4686 | summary = next; |
| 4687 | } |
| 4688 | } |
| 4689 | |
| 4690 | static GtkTextLinecxx . . $ GtkTextLine#* |
| 4691 | get_last_linecxx . . $ get_last_line(76b79c735937395b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 4692 | { |
| 4693 | if (tree->last_line_stampcxx . . $ _GtkTextBTree#last_line_stamp. != tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp.) |
| 4694 | { |
| 4695 | int n_lines; |
| 4696 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 4697 | int real_line; |
| 4698 | |
| 4699 | n_lines = _gtk_text_btree_line_countcxx . . $ _gtk_text_btree_line_count(8affb14981d0feb). (tree); |
| 4700 | |
| 4701 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (n_lines >= 1); /* num_lines doesn't return bogus last line. */ |
| 4702 | |
| 4703 | line = _gtk_text_btree_get_linecxx . . $ _gtk_text_btree_get_line(57cf43dcab45dd23). (tree, n_lines, &real_line); |
| 4704 | |
| 4705 | tree->last_line_stampcxx . . $ _GtkTextBTree#last_line_stamp. = tree->chars_changed_stampcxx . . $ _GtkTextBTree#chars_changed_stamp.; |
| 4706 | tree->last_linecxx . . $ _GtkTextBTree#last_line. = line; |
| 4707 | } |
| 4708 | |
| 4709 | return tree->last_linecxx . . $ _GtkTextBTree#last_line.; |
| 4710 | } |
| 4711 | |
| 4712 | /* |
| 4713 | * Lines |
| 4714 | */ |
| 4715 | |
| 4716 | static GtkTextLinecxx . . $ GtkTextLine#* |
| 4717 | gtk_text_line_newcxx . . $ gtk_text_line_new(afb6c06b1061482). (void) |
| 4718 | { |
| 4719 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 4720 | |
| 4721 | line = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (GtkTextLine, 1); |
| 4722 | line->dir_strongcxx . . $ _GtkTextLine#dir_strong. = PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.; |
| 4723 | line->dir_propagated_forwardcxx . . $ _GtkTextLine#dir_propagated_forward. = PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.; |
| 4724 | line->dir_propagated_backcxx . . $ _GtkTextLine#dir_propagated_back. = PANGO_DIRECTION_NEUTRALcxx . . $ PANGO_DIRECTION_NEUTRAL.; |
| 4725 | |
| 4726 | return line; |
| 4727 | } |
| 4728 | |
| 4729 | static void |
| 4730 | gtk_text_line_destroycxx . . $ gtk_text_line_destroy(1061b1d198db82df). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, GtkTextLinecxx . . $ GtkTextLine# *line) |
| 4731 | { |
| 4732 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 4733 | GtkTextLineDatacxx . . $ GtkTextLineData# *next; |
| 4734 | |
| 4735 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4736 | |
| 4737 | ld = line->viewscxx . . $ _GtkTextLine#views.; |
| 4738 | while (ld != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4739 | { |
| 4740 | BTreeViewcxx . . $ BTreeView# *view; |
| 4741 | |
| 4742 | view = gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (tree, ld->view_idcxx . . $ _GtkTextLineData#view_id.); |
| 4743 | |
| 4744 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4745 | |
| 4746 | next = ld->nextcxx . . $ _GtkTextLineData#next.; |
| 4747 | gtk_text_layout_free_line_datacxx . . $ gtk_text_layout_free_line_data(1da96d427b92cf6b). (view->layoutcxx . . $ _BTreeView#layout., line, ld); |
| 4748 | |
| 4749 | ld = next; |
| 4750 | } |
| 4751 | |
| 4752 | g_freecxx . . $ g_free(5d22bdacc48458e8). (line); |
| 4753 | } |
| 4754 | |
| 4755 | static void |
| 4756 | gtk_text_line_set_parentcxx . . $ gtk_text_line_set_parent(7d665b62c00717d7). (GtkTextLinecxx . . $ GtkTextLine# *line, |
| 4757 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 4758 | { |
| 4759 | if (line->parentcxx . . $ _GtkTextLine#parent. == node) |
| 4760 | return; |
| 4761 | line->parentcxx . . $ _GtkTextLine#parent. = node; |
| 4762 | gtk_text_btree_node_invalidate_upwardcxx . . $ gtk_text_btree_node_invalidate_upward(eec353699738d68c). (node, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 4763 | } |
| 4764 | |
| 4765 | static void |
| 4766 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (GtkTextLinecxx . . $ GtkTextLine# *line) |
| 4767 | { |
| 4768 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, **prev_p; |
| 4769 | gbooleancxx . . $ gboolean# changed; |
| 4770 | |
| 4771 | /* |
| 4772 | * Make a pass over all of the segments in the line, giving each |
| 4773 | * a chance to clean itself up. This could potentially change |
| 4774 | * the structure of the line, e.g. by merging two segments |
| 4775 | * together or having two segments cancel themselves; if so, |
| 4776 | * then repeat the whole process again, since the first structure |
| 4777 | * change might make other structure changes possible. Repeat |
| 4778 | * until eventually there are no changes. |
| 4779 | */ |
| 4780 | |
| 4781 | changed = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4782 | while (changed) |
| 4783 | { |
| 4784 | changed = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4785 | prev_p = &line->segmentscxx . . $ _GtkTextLine#segments.; |
| 4786 | for (seg = *prev_p; seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; seg = *prev_p) |
| 4787 | { |
| 4788 | if (seg->typecxx . . $ _GtkTextLineSegment#type.->cleanupFunccxx . . $ _GtkTextLineSegmentClass#cleanupFunc. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4789 | { |
| 4790 | *prev_p = (*seg->typecxx . . $ _GtkTextLineSegment#type.->cleanupFunccxx . . $ _GtkTextLineSegmentClass#cleanupFunc.)(seg, line); |
| 4791 | if (seg != *prev_p) |
| 4792 | { |
| 4793 | changed = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4794 | continue; |
| 4795 | } |
| 4796 | } |
| 4797 | |
| 4798 | prev_p = &(*prev_p)->nextcxx . . $ _GtkTextLineSegment#next.; |
| 4799 | } |
| 4800 | } |
| 4801 | } |
| 4802 | |
| 4803 | /* |
| 4804 | * Nodes |
| 4805 | */ |
| 4806 | |
| 4807 | static inline NodeDatacxx . . $ NodeData#* |
| 4808 | node_data_newcxx . . $ node_data_new(177d7bce205904d2). (gpointercxx . . $ gpointer# view_id, |
| 4809 | NodeDatacxx . . $ NodeData# *next) |
| 4810 | { |
| 4811 | NodeDatacxx . . $ NodeData# *nd; |
| 4812 | |
| 4813 | nd = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (NodeData, 1); |
| 4814 | |
| 4815 | nd->view_idcxx . . $ _NodeData#view_id. = view_id; |
| 4816 | nd->nextcxx . . $ _NodeData#next. = next; |
| 4817 | nd->widthcxx . . $ _NodeData#width. = 0; |
| 4818 | nd->heightcxx . . $ _NodeData#height. = 0; |
| 4819 | nd->validcxx . . $ _NodeData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4820 | |
| 4821 | return nd; |
| 4822 | } |
| 4823 | |
| 4824 | static inline void |
| 4825 | node_data_destroycxx . . $ node_data_destroy(f42139f30917cfc3). (NodeDatacxx . . $ NodeData# *nd) |
| 4826 | { |
| 4827 | g_freecxx . . $ g_free(5d22bdacc48458e8). (nd); |
| 4828 | } |
| 4829 | |
| 4830 | static inline void |
| 4831 | node_data_list_destroycxx . . $ node_data_list_destroy(f42139f30917cfc3). (NodeDatacxx . . $ NodeData# *nd) |
| 4832 | { |
| 4833 | while (nd) |
| 4834 | { |
| 4835 | NodeDatacxx . . $ NodeData# *next = nd->nextcxx . . $ _NodeData#next.; |
| 4836 | g_freecxx . . $ g_free(5d22bdacc48458e8). (nd); |
| 4837 | nd = next; |
| 4838 | } |
| 4839 | } |
| 4840 | |
| 4841 | static inline NodeDatacxx . . $ NodeData#* |
| 4842 | node_data_findcxx . . $ node_data_find(7e00c8f1acfb2829). (NodeDatacxx . . $ NodeData# *nd, |
| 4843 | gpointercxx . . $ gpointer# view_id) |
| 4844 | { |
| 4845 | while (nd != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4846 | { |
| 4847 | if (nd->view_idcxx . . $ _NodeData#view_id. == view_id) |
| 4848 | break; |
| 4849 | nd = nd->nextcxx . . $ _NodeData#next.; |
| 4850 | } |
| 4851 | return nd; |
| 4852 | } |
| 4853 | |
| 4854 | static void |
| 4855 | summary_destroycxx . . $ summary_destroy(da23a492de438288). (Summarycxx . . $ Summary# *summary) |
| 4856 | { |
| 4857 | /* Fill with error-triggering garbage */ |
| 4858 | summary->infocxx . . $ Summary#info. = (void*)0x1; |
| 4859 | summary->toggle_countcxx . . $ Summary#toggle_count. = 567; |
| 4860 | summary->nextcxx . . $ Summary#next. = (void*)0x1; |
| 4861 | g_freecxx . . $ g_free(5d22bdacc48458e8). (summary); |
| 4862 | } |
| 4863 | |
| 4864 | static GtkTextBTreeNodecxx . . $ GtkTextBTreeNode#* |
| 4865 | gtk_text_btree_node_newcxx . . $ gtk_text_btree_node_new(a680a392ceeb9bf1). (void) |
| 4866 | { |
| 4867 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 4868 | |
| 4869 | node = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (GtkTextBTreeNode, 1); |
| 4870 | |
| 4871 | node->node_datacxx . . $ _GtkTextBTreeNode#node_data. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 4872 | |
| 4873 | return node; |
| 4874 | } |
| 4875 | |
| 4876 | static void |
| 4877 | gtk_text_btree_node_adjust_toggle_countcxx . . $ gtk_text_btree_node_adjust_toggle_count(80783df9392c55b3). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 4878 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info, |
| 4879 | int adjust) |
| 4880 | { |
| 4881 | Summarycxx . . $ Summary# *summary; |
| 4882 | |
| 4883 | summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 4884 | while (summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4885 | { |
| 4886 | if (summary->infocxx . . $ Summary#info. == info) |
| 4887 | { |
| 4888 | summary->toggle_countcxx . . $ Summary#toggle_count. += adjust; |
| 4889 | break; |
| 4890 | } |
| 4891 | |
| 4892 | summary = summary->nextcxx . . $ Summary#next.; |
| 4893 | } |
| 4894 | |
| 4895 | if (summary == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4896 | { |
| 4897 | /* didn't find a summary for our tag. */ |
| 4898 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (adjust > 0); |
| 4899 | summary = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (Summary, 1); |
| 4900 | summary->infocxx . . $ Summary#info. = info; |
| 4901 | summary->toggle_countcxx . . $ Summary#toggle_count. = adjust; |
| 4902 | summary->nextcxx . . $ Summary#next. = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 4903 | node->summarycxx . . $ _GtkTextBTreeNode#summary. = summary; |
| 4904 | } |
| 4905 | } |
| 4906 | |
| 4907 | /* Note that the tag root and above do not have summaries |
| 4908 | for the tag; only nodes below the tag root have |
| 4909 | the summaries. */ |
| 4910 | static gbooleancxx . . $ gboolean# |
| 4911 | gtk_text_btree_node_has_tagcxx . . $ gtk_text_btree_node_has_tag(4f3cd48f85de4a3b). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 4912 | { |
| 4913 | Summarycxx . . $ Summary# *summary; |
| 4914 | |
| 4915 | summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 4916 | while (summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4917 | { |
| 4918 | if (tag == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || |
| 4919 | summary->infocxx . . $ Summary#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag) |
| 4920 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 4921 | |
| 4922 | summary = summary->nextcxx . . $ Summary#next.; |
| 4923 | } |
| 4924 | |
| 4925 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4926 | } |
| 4927 | |
| 4928 | /* Add node and all children to the damage region. */ |
| 4929 | #if 0 |
| 4930 | static void |
| 4931 | gtk_text_btree_node_invalidate_downward (GtkTextBTreeNode *node) |
| 4932 | { |
| 4933 | NodeData *nd; |
| 4934 | |
| 4935 | nd = node->node_data; |
| 4936 | while (nd != NULL) |
| 4937 | { |
| 4938 | nd->valid = FALSE; |
| 4939 | nd = nd->next; |
| 4940 | } |
| 4941 | |
| 4942 | if (node->level == 0) |
| 4943 | { |
| 4944 | GtkTextLine *line; |
| 4945 | |
| 4946 | line = node->children.line; |
| 4947 | while (line != NULL) |
| 4948 | { |
| 4949 | GtkTextLineData *ld; |
| 4950 | |
| 4951 | ld = line->views; |
| 4952 | while (ld != NULL) |
| 4953 | { |
| 4954 | ld->valid = FALSE; |
| 4955 | ld = ld->next; |
| 4956 | } |
| 4957 | |
| 4958 | line = line->next; |
| 4959 | } |
| 4960 | } |
| 4961 | else |
| 4962 | { |
| 4963 | GtkTextBTreeNode *child; |
| 4964 | |
| 4965 | child = node->children.node; |
| 4966 | |
| 4967 | while (child != NULL) |
| 4968 | { |
| 4969 | gtk_text_btree_node_invalidate_downward (child); |
| 4970 | |
| 4971 | child = child->next; |
| 4972 | } |
| 4973 | } |
| 4974 | } |
| 4975 | #endif |
| 4976 | |
| 4977 | static void |
| 4978 | gtk_text_btree_node_invalidate_upwardcxx . . $ gtk_text_btree_node_invalidate_upward(eec353699738d68c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, gpointercxx . . $ gpointer# view_id) |
| 4979 | { |
| 4980 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *iter; |
| 4981 | |
| 4982 | iter = node; |
| 4983 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 4984 | { |
| 4985 | NodeDatacxx . . $ NodeData# *nd; |
| 4986 | |
| 4987 | if (view_id) |
| 4988 | { |
| 4989 | nd = node_data_findcxx . . $ node_data_find(7e00c8f1acfb2829). (iter->node_datacxx . . $ _GtkTextBTreeNode#node_data., view_id); |
| 4990 | |
| 4991 | if (nd == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || !nd->validcxx . . $ _NodeData#valid.) |
| 4992 | break; /* Once a node is invalid, we know its parents are as well. */ |
| 4993 | |
| 4994 | nd->validcxx . . $ _NodeData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4995 | } |
| 4996 | else |
| 4997 | { |
| 4998 | gbooleancxx . . $ gboolean# should_continue = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 4999 | |
| 5000 | nd = iter->node_datacxx . . $ _GtkTextBTreeNode#node_data.; |
| 5001 | while (nd != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5002 | { |
| 5003 | if (nd->validcxx . . $ _NodeData#valid.) |
| 5004 | { |
| 5005 | should_continue = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5006 | nd->validcxx . . $ _NodeData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5007 | } |
| 5008 | |
| 5009 | nd = nd->nextcxx . . $ _NodeData#next.; |
| 5010 | } |
| 5011 | |
| 5012 | if (!should_continue) |
| 5013 | break; /* This node was totally invalidated, so are its |
| 5014 | parents */ |
| 5015 | } |
| 5016 | |
| 5017 | iter = iter->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5018 | } |
| 5019 | } |
| 5020 | |
| 5021 | |
| 5022 | /** |
| 5023 | * _gtk_text_btree_is_valid: |
| 5024 | * @tree: a GtkTextBTree |
| 5025 | * @view_id: ID for the view |
| 5026 | * |
| 5027 | * Check to see if the entire GtkTextBTree is valid or not for |
| 5028 | * the given view. |
| 5029 | * |
| 5030 | * Returns: %TRUE if the entire GtkTextBTree is valid |
| 5031 | **/ |
| 5032 | gbooleancxx . . $ gboolean# |
| 5033 | _gtk_text_btree_is_validcxx . . $ _gtk_text_btree_is_valid(363a171abddf2c3c). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5034 | gpointercxx . . $ gpointer# view_id) |
| 5035 | { |
| 5036 | NodeDatacxx . . $ NodeData# *nd; |
| 5037 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5038 | |
| 5039 | nd = node_data_findcxx . . $ node_data_find(7e00c8f1acfb2829). (tree->root_nodecxx . . $ _GtkTextBTree#root_node.->node_datacxx . . $ _GtkTextBTreeNode#node_data., view_id); |
| 5040 | return (nd && nd->validcxx . . $ _NodeData#valid.); |
| 5041 | } |
| 5042 | |
| 5043 | typedef struct _ValidateStatecxx . . $ _ValidateState# ValidateStatecxx . . $ ValidateState#; |
| 5044 | |
| 5045 | struct _ValidateStatecxx . . $ _ValidateState# |
| 5046 | { |
| 5047 | int remaining_pixelscxx . . $ _ValidateState#remaining_pixels.; |
| 5048 | gbooleancxx . . $ gboolean# in_validationcxx . . $ _ValidateState#in_validation.; |
| 5049 | int ycxx . . $ _ValidateState#y.; |
| 5050 | int old_heightcxx . . $ _ValidateState#old_height.; |
| 5051 | int new_heightcxx . . $ _ValidateState#new_height.; |
| 5052 | }; |
| 5053 | |
| 5054 | static void |
| 5055 | gtk_text_btree_node_validatecxx . . $ gtk_text_btree_node_validate(cdda140f275ab4d7). (BTreeViewcxx . . $ BTreeView# *view, |
| 5056 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 5057 | gpointercxx . . $ gpointer# view_id, |
| 5058 | ValidateStatecxx . . $ ValidateState# *state) |
| 5059 | { |
| 5060 | int node_valid = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5061 | int node_width = 0; |
| 5062 | int node_height = 0; |
| 5063 | |
| 5064 | NodeDatacxx . . $ NodeData# *nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (node, view_id); |
| 5065 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (!nd->valid); |
| 5066 | |
| 5067 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5068 | { |
| 5069 | GtkTextLinecxx . . $ GtkTextLine# *line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 5070 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 5071 | |
| 5072 | /* Iterate over leading valid lines */ |
| 5073 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5074 | { |
| 5075 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view_id); |
| 5076 | |
| 5077 | if (!ld || !ld->validcxx . . $ _GtkTextLineData#valid.) |
| 5078 | break; |
| 5079 | else if (state->in_validationcxx . . $ _ValidateState#in_validation.) |
| 5080 | { |
| 5081 | state->in_validationcxx . . $ _ValidateState#in_validation. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5082 | return; |
| 5083 | } |
| 5084 | else |
| 5085 | { |
| 5086 | state->ycxx . . $ _ValidateState#y. += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5087 | node_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (ld->width, node_width); |
| 5088 | node_height += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5089 | } |
| 5090 | |
| 5091 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 5092 | } |
| 5093 | |
| 5094 | state->in_validationcxx . . $ _ValidateState#in_validation. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5095 | |
| 5096 | /* Iterate over invalid lines */ |
| 5097 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5098 | { |
| 5099 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view_id); |
| 5100 | |
| 5101 | if (ld && ld->validcxx . . $ _GtkTextLineData#valid.) |
| 5102 | break; |
| 5103 | else |
| 5104 | { |
| 5105 | if (ld) |
| 5106 | state->old_heightcxx . . $ _ValidateState#old_height. += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5107 | ld = gtk_text_layout_wrapcxx . . $ gtk_text_layout_wrap(4f51a0fe2dee14e). (view->layoutcxx . . $ _BTreeView#layout., line, ld); |
| 5108 | state->new_heightcxx . . $ _ValidateState#new_height. += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5109 | |
| 5110 | node_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (ld->width, node_width); |
| 5111 | node_height += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5112 | |
| 5113 | state->remaining_pixelscxx . . $ _ValidateState#remaining_pixels. -= ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5114 | if (state->remaining_pixelscxx . . $ _ValidateState#remaining_pixels. <= 0) |
| 5115 | { |
| 5116 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 5117 | break; |
| 5118 | } |
| 5119 | } |
| 5120 | |
| 5121 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 5122 | } |
| 5123 | |
| 5124 | /* Iterate over the remaining lines */ |
| 5125 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5126 | { |
| 5127 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view_id); |
| 5128 | state->in_validationcxx . . $ _ValidateState#in_validation. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5129 | |
| 5130 | if (!ld || !ld->validcxx . . $ _GtkTextLineData#valid.) |
| 5131 | node_valid = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5132 | |
| 5133 | if (ld) |
| 5134 | { |
| 5135 | node_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (ld->width, node_width); |
| 5136 | node_height += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5137 | } |
| 5138 | |
| 5139 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 5140 | } |
| 5141 | } |
| 5142 | else |
| 5143 | { |
| 5144 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child; |
| 5145 | NodeDatacxx . . $ NodeData# *child_nd; |
| 5146 | |
| 5147 | child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5148 | |
| 5149 | /* Iterate over leading valid nodes */ |
| 5150 | while (child) |
| 5151 | { |
| 5152 | child_nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (child, view_id); |
| 5153 | |
| 5154 | if (!child_nd->validcxx . . $ _NodeData#valid.) |
| 5155 | break; |
| 5156 | else if (state->in_validationcxx . . $ _ValidateState#in_validation.) |
| 5157 | { |
| 5158 | state->in_validationcxx . . $ _ValidateState#in_validation. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5159 | return; |
| 5160 | } |
| 5161 | else |
| 5162 | { |
| 5163 | state->ycxx . . $ _ValidateState#y. += child_nd->heightcxx . . $ _NodeData#height.; |
| 5164 | node_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (node_width, child_nd->width); |
| 5165 | node_height += child_nd->heightcxx . . $ _NodeData#height.; |
| 5166 | } |
| 5167 | |
| 5168 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5169 | } |
| 5170 | |
| 5171 | /* Iterate over invalid nodes */ |
| 5172 | while (child) |
| 5173 | { |
| 5174 | child_nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (child, view_id); |
| 5175 | |
| 5176 | if (child_nd->validcxx . . $ _NodeData#valid.) |
| 5177 | break; |
| 5178 | else |
| 5179 | { |
| 5180 | gtk_text_btree_node_validatecxx . . $ gtk_text_btree_node_validate(cdda140f275ab4d7). (view, child, view_id, state); |
| 5181 | |
| 5182 | if (!child_nd->validcxx . . $ _NodeData#valid.) |
| 5183 | node_valid = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5184 | node_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (node_width, child_nd->width); |
| 5185 | node_height += child_nd->heightcxx . . $ _NodeData#height.; |
| 5186 | |
| 5187 | if (!state->in_validationcxx . . $ _ValidateState#in_validation. || state->remaining_pixelscxx . . $ _ValidateState#remaining_pixels. <= 0) |
| 5188 | { |
| 5189 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5190 | break; |
| 5191 | } |
| 5192 | } |
| 5193 | |
| 5194 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5195 | } |
| 5196 | |
| 5197 | /* Iterate over the remaining lines */ |
| 5198 | while (child) |
| 5199 | { |
| 5200 | child_nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (child, view_id); |
| 5201 | state->in_validationcxx . . $ _ValidateState#in_validation. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5202 | |
| 5203 | if (!child_nd->validcxx . . $ _NodeData#valid.) |
| 5204 | node_valid = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5205 | |
| 5206 | node_width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (child_nd->width, node_width); |
| 5207 | node_height += child_nd->heightcxx . . $ _NodeData#height.; |
| 5208 | |
| 5209 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5210 | } |
| 5211 | } |
| 5212 | |
| 5213 | nd->widthcxx . . $ _NodeData#width. = node_width; |
| 5214 | nd->heightcxx . . $ _NodeData#height. = node_height; |
| 5215 | nd->validcxx . . $ _NodeData#valid. = node_valid; |
| 5216 | } |
| 5217 | |
| 5218 | /** |
| 5219 | * _gtk_text_btree_validate: |
| 5220 | * @tree: a GtkTextBTree |
| 5221 | * @view_id: view id |
| 5222 | * @max_pixels: the maximum number of pixels to validate. (No more |
| 5223 | * than one paragraph beyond this limit will be validated) |
| 5224 | * @y: location to store starting y coordinate of validated region |
| 5225 | * @old_height: location to store old height of validated region |
| 5226 | * @new_height: location to store new height of validated region |
| 5227 | * |
| 5228 | * Validate a single contiguous invalid region of a GtkTextBTree for |
| 5229 | * a given view. |
| 5230 | * |
| 5231 | * Returns: %TRUE if a region has been validated, %FALSE if the |
| 5232 | * entire tree was already valid. |
| 5233 | **/ |
| 5234 | gbooleancxx . . $ gboolean# |
| 5235 | _gtk_text_btree_validatecxx . . $ _gtk_text_btree_validate(39b904d6c7357378). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5236 | gpointercxx . . $ gpointer# view_id, |
| 5237 | int max_pixels, |
| 5238 | int *y, |
| 5239 | int *old_height, |
| 5240 | int *new_height) |
| 5241 | { |
| 5242 | BTreeViewcxx . . $ BTreeView# *view; |
| 5243 | |
| 5244 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5245 | |
| 5246 | view = gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (tree, view_id); |
| 5247 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5248 | |
| 5249 | if (!_gtk_text_btree_is_validcxx . . $ _gtk_text_btree_is_valid(363a171abddf2c3c). (tree, view_id)) |
| 5250 | { |
| 5251 | ValidateStatecxx . . $ ValidateState# state; |
| 5252 | |
| 5253 | state.remaining_pixelscxx . . $ _ValidateState#remaining_pixels. = max_pixels; |
| 5254 | state.in_validationcxx . . $ _ValidateState#in_validation. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5255 | state.ycxx . . $ _ValidateState#y. = 0; |
| 5256 | state.old_heightcxx . . $ _ValidateState#old_height. = 0; |
| 5257 | state.new_heightcxx . . $ _ValidateState#new_height. = 0; |
| 5258 | |
| 5259 | gtk_text_btree_node_validatecxx . . $ gtk_text_btree_node_validate(cdda140f275ab4d7). (view, |
| 5260 | tree->root_nodecxx . . $ _GtkTextBTree#root_node., |
| 5261 | view_id, &state); |
| 5262 | |
| 5263 | if (y) |
| 5264 | *y = state.ycxx . . $ _ValidateState#y.; |
| 5265 | if (old_height) |
| 5266 | *old_height = state.old_heightcxx . . $ _ValidateState#old_height.; |
| 5267 | if (new_height) |
| 5268 | *new_height = state.new_heightcxx . . $ _ValidateState#new_height.; |
| 5269 | |
| 5270 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 5271 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 5272 | |
| 5273 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5274 | } |
| 5275 | else |
| 5276 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5277 | } |
| 5278 | |
| 5279 | static void |
| 5280 | gtk_text_btree_node_compute_view_aggregatescxx . . $ gtk_text_btree_node_compute_view_aggregates(ca773f43e9058906). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 5281 | gpointercxx . . $ gpointer# view_id, |
| 5282 | int *width_out, |
| 5283 | int *height_out, |
| 5284 | gbooleancxx . . $ gboolean# *valid_out) |
| 5285 | { |
| 5286 | int width = 0; |
| 5287 | int height = 0; |
| 5288 | gbooleancxx . . $ gboolean# valid = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5289 | |
| 5290 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5291 | { |
| 5292 | GtkTextLinecxx . . $ GtkTextLine# *line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 5293 | |
| 5294 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5295 | { |
| 5296 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view_id); |
| 5297 | |
| 5298 | if (!ld || !ld->validcxx . . $ _GtkTextLineData#valid.) |
| 5299 | valid = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5300 | |
| 5301 | if (ld) |
| 5302 | { |
| 5303 | width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (ld->width, width); |
| 5304 | height += ld->heightcxx . . $ _GtkTextLineData#height.; |
| 5305 | } |
| 5306 | |
| 5307 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 5308 | } |
| 5309 | } |
| 5310 | else |
| 5311 | { |
| 5312 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5313 | |
| 5314 | while (child) |
| 5315 | { |
| 5316 | NodeDatacxx . . $ NodeData# *child_nd = node_data_findcxx . . $ node_data_find(7e00c8f1acfb2829). (child->node_datacxx . . $ _GtkTextBTreeNode#node_data., view_id); |
| 5317 | |
| 5318 | if (!child_nd || !child_nd->validcxx . . $ _NodeData#valid.) |
| 5319 | valid = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5320 | |
| 5321 | if (child_nd) |
| 5322 | { |
| 5323 | width = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (child_nd->width, width); |
| 5324 | height += child_nd->heightcxx . . $ _NodeData#height.; |
| 5325 | } |
| 5326 | |
| 5327 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5328 | } |
| 5329 | } |
| 5330 | |
| 5331 | *width_out = width; |
| 5332 | *height_out = height; |
| 5333 | *valid_out = valid; |
| 5334 | } |
| 5335 | |
| 5336 | |
| 5337 | /* Recompute the validity and size of the view data for a given |
| 5338 | * view at this node from the immediate children of the node |
| 5339 | */ |
| 5340 | static NodeDatacxx . . $ NodeData# * |
| 5341 | gtk_text_btree_node_check_validcxx . . $ gtk_text_btree_node_check_valid(862e614253708acc). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 5342 | gpointercxx . . $ gpointer# view_id) |
| 5343 | { |
| 5344 | NodeDatacxx . . $ NodeData# *nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (node, view_id); |
| 5345 | gbooleancxx . . $ gboolean# valid; |
| 5346 | int width; |
| 5347 | int height; |
| 5348 | |
| 5349 | gtk_text_btree_node_compute_view_aggregatescxx . . $ gtk_text_btree_node_compute_view_aggregates(ca773f43e9058906). (node, view_id, |
| 5350 | &width, &height, &valid); |
| 5351 | nd->widthcxx . . $ _NodeData#width. = width; |
| 5352 | nd->heightcxx . . $ _NodeData#height. = height; |
| 5353 | nd->validcxx . . $ _NodeData#valid. = valid; |
| 5354 | |
| 5355 | return nd; |
| 5356 | } |
| 5357 | |
| 5358 | static void |
| 5359 | gtk_text_btree_node_check_valid_upwardcxx . . $ gtk_text_btree_node_check_valid_upward(eec353699738d68c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 5360 | gpointercxx . . $ gpointer# view_id) |
| 5361 | { |
| 5362 | while (node) |
| 5363 | { |
| 5364 | gtk_text_btree_node_check_validcxx . . $ gtk_text_btree_node_check_valid(862e614253708acc). (node, view_id); |
| 5365 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5366 | } |
| 5367 | } |
| 5368 | |
| 5369 | static NodeDatacxx . . $ NodeData# * |
| 5370 | gtk_text_btree_node_check_valid_downwardcxx . . $ gtk_text_btree_node_check_valid_downward(862e614253708acc). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 5371 | gpointercxx . . $ gpointer# view_id) |
| 5372 | { |
| 5373 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5374 | { |
| 5375 | return gtk_text_btree_node_check_validcxx . . $ gtk_text_btree_node_check_valid(862e614253708acc). (node, view_id); |
| 5376 | } |
| 5377 | else |
| 5378 | { |
| 5379 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5380 | |
| 5381 | NodeDatacxx . . $ NodeData# *nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (node, view_id); |
| 5382 | |
| 5383 | nd->validcxx . . $ _NodeData#valid. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 5384 | nd->widthcxx . . $ _NodeData#width. = 0; |
| 5385 | nd->heightcxx . . $ _NodeData#height. = 0; |
| 5386 | |
| 5387 | while (child) |
| 5388 | { |
| 5389 | NodeDatacxx . . $ NodeData# *child_nd = gtk_text_btree_node_check_valid_downwardcxx . . $ gtk_text_btree_node_check_valid_downward(862e614253708acc). (child, view_id); |
| 5390 | |
| 5391 | if (!child_nd->validcxx . . $ _NodeData#valid.) |
| 5392 | nd->validcxx . . $ _NodeData#valid. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 5393 | nd->widthcxx . . $ _NodeData#width. = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (child_nd->width, nd->width); |
| 5394 | nd->heightcxx . . $ _NodeData#height. += child_nd->heightcxx . . $ _NodeData#height.; |
| 5395 | |
| 5396 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5397 | } |
| 5398 | return nd; |
| 5399 | } |
| 5400 | } |
| 5401 | |
| 5402 | |
| 5403 | |
| 5404 | /** |
| 5405 | * _gtk_text_btree_validate_line: |
| 5406 | * @tree: a GtkTextBTree |
| 5407 | * @line: line to validate |
| 5408 | * @view_id: view ID for the view to validate |
| 5409 | * |
| 5410 | * Revalidate a single line of the btree for the given view, propagate |
| 5411 | * results up through the entire tree. |
| 5412 | **/ |
| 5413 | void |
| 5414 | _gtk_text_btree_validate_linecxx . . $ _gtk_text_btree_validate_line(6390278a5f31dec6). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5415 | GtkTextLinecxx . . $ GtkTextLine# *line, |
| 5416 | gpointercxx . . $ gpointer# view_id) |
| 5417 | { |
| 5418 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 5419 | BTreeViewcxx . . $ BTreeView# *view; |
| 5420 | |
| 5421 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (tree != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5422 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5423 | |
| 5424 | view = gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (tree, view_id); |
| 5425 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5426 | |
| 5427 | ld = _gtk_text_line_get_datacxx . . $ _gtk_text_line_get_data(fe7e31bd387752f3). (line, view_id); |
| 5428 | if (!ld || !ld->validcxx . . $ _GtkTextLineData#valid.) |
| 5429 | { |
| 5430 | gtk_text_layout_wrapcxx . . $ gtk_text_layout_wrap(4f51a0fe2dee14e). (view->layoutcxx . . $ _BTreeView#layout., line, ld); |
| 5431 | gtk_text_btree_node_check_valid_upwardcxx . . $ gtk_text_btree_node_check_valid_upward(eec353699738d68c). (line->parentcxx . . $ _GtkTextLine#parent., view_id); |
| 5432 | } |
| 5433 | } |
| 5434 | |
| 5435 | static void |
| 5436 | gtk_text_btree_node_remove_viewcxx . . $ gtk_text_btree_node_remove_view(ff44ee98a63e7187). (BTreeViewcxx . . $ BTreeView# *view, GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, gpointercxx . . $ gpointer# view_id) |
| 5437 | { |
| 5438 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5439 | { |
| 5440 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 5441 | |
| 5442 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 5443 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5444 | { |
| 5445 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 5446 | |
| 5447 | ld = _gtk_text_line_remove_datacxx . . $ _gtk_text_line_remove_data(fe7e31bd387752f3). (line, view_id); |
| 5448 | |
| 5449 | if (ld) |
| 5450 | gtk_text_layout_free_line_datacxx . . $ gtk_text_layout_free_line_data(1da96d427b92cf6b). (view->layoutcxx . . $ _BTreeView#layout., line, ld); |
| 5451 | |
| 5452 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 5453 | } |
| 5454 | } |
| 5455 | else |
| 5456 | { |
| 5457 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child; |
| 5458 | |
| 5459 | child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5460 | |
| 5461 | while (child != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5462 | { |
| 5463 | /* recurse */ |
| 5464 | gtk_text_btree_node_remove_viewcxx . . $ gtk_text_btree_node_remove_view(ff44ee98a63e7187). (view, child, view_id); |
| 5465 | |
| 5466 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5467 | } |
| 5468 | } |
| 5469 | |
| 5470 | gtk_text_btree_node_remove_datacxx . . $ gtk_text_btree_node_remove_data(eec353699738d68c). (node, view_id); |
| 5471 | } |
| 5472 | |
| 5473 | static void |
| 5474 | gtk_text_btree_node_destroycxx . . $ gtk_text_btree_node_destroy(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 5475 | { |
| 5476 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5477 | { |
| 5478 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 5479 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 5480 | |
| 5481 | while (node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5482 | { |
| 5483 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 5484 | node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = line->nextcxx . . $ _GtkTextLine#next.; |
| 5485 | while (line->segmentscxx . . $ _GtkTextLine#segments. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5486 | { |
| 5487 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 5488 | line->segmentscxx . . $ _GtkTextLine#segments. = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 5489 | |
| 5490 | (*seg->typecxx . . $ _GtkTextLineSegment#type.->deleteFunccxx . . $ _GtkTextLineSegmentClass#deleteFunc.) (seg, line, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 5491 | } |
| 5492 | gtk_text_line_destroycxx . . $ gtk_text_line_destroy(1061b1d198db82df). (tree, line); |
| 5493 | } |
| 5494 | } |
| 5495 | else |
| 5496 | { |
| 5497 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *childPtr; |
| 5498 | |
| 5499 | while (node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5500 | { |
| 5501 | childPtr = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5502 | node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = childPtr->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5503 | gtk_text_btree_node_destroycxx . . $ gtk_text_btree_node_destroy(7e0fdd5226bb948b). (tree, childPtr); |
| 5504 | } |
| 5505 | } |
| 5506 | |
| 5507 | gtk_text_btree_node_free_emptycxx . . $ gtk_text_btree_node_free_empty(7e0fdd5226bb948b). (tree, node); |
| 5508 | } |
| 5509 | |
| 5510 | static void |
| 5511 | gtk_text_btree_node_free_emptycxx . . $ gtk_text_btree_node_free_empty(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5512 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 5513 | { |
| 5514 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! ((node->level > 0 && node->children.node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) || |
| 5515 | (node->level == 0 && node->children.line == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 5516 | |
| 5517 | summary_list_destroycxx . . $ summary_list_destroy(da23a492de438288). (node->summarycxx . . $ _GtkTextBTreeNode#summary.); |
| 5518 | node_data_list_destroycxx . . $ node_data_list_destroy(f42139f30917cfc3). (node->node_datacxx . . $ _GtkTextBTreeNode#node_data.); |
| 5519 | g_freecxx . . $ g_free(5d22bdacc48458e8). (node); |
| 5520 | } |
| 5521 | |
| 5522 | static NodeDatacxx . . $ NodeData#* |
| 5523 | gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, gpointercxx . . $ gpointer# view_id) |
| 5524 | { |
| 5525 | NodeDatacxx . . $ NodeData# *nd; |
| 5526 | |
| 5527 | nd = node_data_findcxx . . $ node_data_find(7e00c8f1acfb2829). (node->node_datacxx . . $ _GtkTextBTreeNode#node_data., view_id); |
| 5528 | |
| 5529 | if (nd == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5530 | nd = node->node_datacxx . . $ _GtkTextBTreeNode#node_data. = node_data_newcxx . . $ node_data_new(177d7bce205904d2). (view_id, node->node_datacxx . . $ _GtkTextBTreeNode#node_data.); |
| 5531 | |
| 5532 | return nd; |
| 5533 | } |
| 5534 | |
| 5535 | static void |
| 5536 | gtk_text_btree_node_remove_datacxx . . $ gtk_text_btree_node_remove_data(eec353699738d68c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, gpointercxx . . $ gpointer# view_id) |
| 5537 | { |
| 5538 | NodeDatacxx . . $ NodeData# *nd; |
| 5539 | NodeDatacxx . . $ NodeData# *prev; |
| 5540 | |
| 5541 | prev = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5542 | nd = node->node_datacxx . . $ _GtkTextBTreeNode#node_data.; |
| 5543 | while (nd != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5544 | { |
| 5545 | if (nd->view_idcxx . . $ _NodeData#view_id. == view_id) |
| 5546 | break; |
| 5547 | |
| 5548 | prev = nd; |
| 5549 | nd = nd->nextcxx . . $ _NodeData#next.; |
| 5550 | } |
| 5551 | |
| 5552 | if (nd == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5553 | return; |
| 5554 | |
| 5555 | if (prev != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5556 | prev->nextcxx . . $ _NodeData#next. = nd->nextcxx . . $ _NodeData#next.; |
| 5557 | |
| 5558 | if (node->node_datacxx . . $ _GtkTextBTreeNode#node_data. == nd) |
| 5559 | node->node_datacxx . . $ _GtkTextBTreeNode#node_data. = nd->nextcxx . . $ _NodeData#next.; |
| 5560 | |
| 5561 | nd->nextcxx . . $ _NodeData#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5562 | |
| 5563 | node_data_destroycxx . . $ node_data_destroy(f42139f30917cfc3). (nd); |
| 5564 | } |
| 5565 | |
| 5566 | static void |
| 5567 | gtk_text_btree_node_get_sizecxx . . $ gtk_text_btree_node_get_size(15e034dfd1dcbc08). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, gpointercxx . . $ gpointer# view_id, |
| 5568 | int *width, int *height) |
| 5569 | { |
| 5570 | NodeDatacxx . . $ NodeData# *nd; |
| 5571 | |
| 5572 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (width != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5573 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (height != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 5574 | |
| 5575 | nd = gtk_text_btree_node_ensure_datacxx . . $ gtk_text_btree_node_ensure_data(862e614253708acc). (node, view_id); |
| 5576 | |
| 5577 | if (width) |
| 5578 | *width = nd->widthcxx . . $ _NodeData#width.; |
| 5579 | if (height) |
| 5580 | *height = nd->heightcxx . . $ _NodeData#height.; |
| 5581 | } |
| 5582 | |
| 5583 | /* Find the closest common ancestor of the two nodes. FIXME: The interface |
| 5584 | * here isn’t quite right, since for a lot of operations we want to |
| 5585 | * know which children of the common parent correspond to the two nodes |
| 5586 | * (e.g., when computing the order of two iters) |
| 5587 | */ |
| 5588 | static GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# * |
| 5589 | gtk_text_btree_node_common_parentcxx . . $ gtk_text_btree_node_common_parent(d950424c3bfd6289). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node1, |
| 5590 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node2) |
| 5591 | { |
| 5592 | while (node1->levelcxx . . $ _GtkTextBTreeNode#level. < node2->levelcxx . . $ _GtkTextBTreeNode#level.) |
| 5593 | node1 = node1->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5594 | while (node2->levelcxx . . $ _GtkTextBTreeNode#level. < node1->levelcxx . . $ _GtkTextBTreeNode#level.) |
| 5595 | node2 = node2->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5596 | while (node1 != node2) |
| 5597 | { |
| 5598 | node1 = node1->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5599 | node2 = node2->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5600 | } |
| 5601 | |
| 5602 | return node1; |
| 5603 | } |
| 5604 | |
| 5605 | /* |
| 5606 | * BTree |
| 5607 | */ |
| 5608 | |
| 5609 | static BTreeViewcxx . . $ BTreeView#* |
| 5610 | gtk_text_btree_get_viewcxx . . $ gtk_text_btree_get_view(94efe8f1b751e7ed). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, gpointercxx . . $ gpointer# view_id) |
| 5611 | { |
| 5612 | BTreeViewcxx . . $ BTreeView# *view; |
| 5613 | |
| 5614 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 5615 | while (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5616 | { |
| 5617 | if (view->view_idcxx . . $ _BTreeView#view_id. == view_id) |
| 5618 | break; |
| 5619 | view = view->nextcxx . . $ _BTreeView#next.; |
| 5620 | } |
| 5621 | |
| 5622 | return view; |
| 5623 | } |
| 5624 | |
| 5625 | static void |
| 5626 | get_tree_boundscxx . . $ get_tree_bounds(9e3d90874c713417). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5627 | GtkTextItercxx . . $ GtkTextIter# *start, |
| 5628 | GtkTextItercxx . . $ GtkTextIter# *end) |
| 5629 | { |
| 5630 | _gtk_text_btree_get_iter_at_line_charcxx . . $ _gtk_text_btree_get_iter_at_line_char(6fbe15d16839bedf). (tree, start, 0, 0); |
| 5631 | _gtk_text_btree_get_end_itercxx . . $ _gtk_text_btree_get_end_iter(76a732bb83d3ecc1). (tree, end); |
| 5632 | } |
| 5633 | |
| 5634 | static void |
| 5635 | tag_changed_cbcxx . . $ tag_changed_cb(eec6fbdb772e3911). (GtkTextTagTablecxx . . $ GtkTextTagTable# *table, |
| 5636 | GtkTextTagcxx . . $ GtkTextTag# *tag, |
| 5637 | gbooleancxx . . $ gboolean# size_changed, |
| 5638 | GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 5639 | { |
| 5640 | if (size_changed) |
| 5641 | { |
| 5642 | /* We need to queue a relayout on all regions that are tagged with |
| 5643 | * this tag. |
| 5644 | */ |
| 5645 | |
| 5646 | GtkTextItercxx . . $ GtkTextIter# start; |
| 5647 | GtkTextItercxx . . $ GtkTextIter# end; |
| 5648 | |
| 5649 | if (_gtk_text_btree_get_iter_at_first_togglecxx . . $ _gtk_text_btree_get_iter_at_first_toggle(7c2cd614162f7f15). (tree, &start, tag)) |
| 5650 | { |
| 5651 | /* Must be a last toggle if there was a first one. */ |
| 5652 | _gtk_text_btree_get_iter_at_last_togglecxx . . $ _gtk_text_btree_get_iter_at_last_toggle(7c2cd614162f7f15). (tree, &end, tag); |
| 5653 | DVcxx . . $ `gtk/gtktextbtreeprivate.h:34:9`! (g_print ("invalidating due to tag change (%s)\n", G_STRLOC)); |
| 5654 | _gtk_text_btree_invalidate_regioncxx . . $ _gtk_text_btree_invalidate_region(45085b43b37ed786). (tree, &start, &end, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5655 | |
| 5656 | } |
| 5657 | } |
| 5658 | else |
| 5659 | { |
| 5660 | /* We only need to queue a redraw, not a relayout */ |
| 5661 | BTreeViewcxx . . $ BTreeView# *view; |
| 5662 | |
| 5663 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 5664 | |
| 5665 | while (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5666 | { |
| 5667 | int width = 0; |
| 5668 | int height = 0; |
| 5669 | |
| 5670 | _gtk_text_btree_get_view_sizecxx . . $ _gtk_text_btree_get_view_size(e97c191e081171b6). (tree, view->view_idcxx . . $ _BTreeView#view_id., &width, &height); |
| 5671 | gtk_text_layout_changedcxx . . $ gtk_text_layout_changed(76872bf4df3f228a). (view->layoutcxx . . $ _BTreeView#layout., 0, height, height); |
| 5672 | |
| 5673 | view = view->nextcxx . . $ _BTreeView#next.; |
| 5674 | } |
| 5675 | } |
| 5676 | } |
| 5677 | |
| 5678 | void |
| 5679 | _gtk_text_btree_notify_will_remove_tagcxx . . $ _gtk_text_btree_notify_will_remove_tag(7d59af89fb7d77fc). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5680 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 5681 | { |
| 5682 | /* Remove the tag from the tree */ |
| 5683 | |
| 5684 | GtkTextItercxx . . $ GtkTextIter# start; |
| 5685 | GtkTextItercxx . . $ GtkTextIter# end; |
| 5686 | |
| 5687 | get_tree_boundscxx . . $ get_tree_bounds(9e3d90874c713417). (tree, &start, &end); |
| 5688 | |
| 5689 | _gtk_text_btree_tagcxx . . $ _gtk_text_btree_tag(45db65c10a5d807a). (&start, &end, tag, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 5690 | gtk_text_btree_remove_tag_infocxx . . $ gtk_text_btree_remove_tag_info(7d59af89fb7d77fc). (tree, tag); |
| 5691 | } |
| 5692 | |
| 5693 | |
| 5694 | /* Rebalance the out-of-whack node "node" */ |
| 5695 | static void |
| 5696 | gtk_text_btree_rebalancecxx . . $ gtk_text_btree_rebalance(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5697 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 5698 | { |
| 5699 | /* |
| 5700 | * Loop over the entire ancestral chain of the GtkTextBTreeNode, working |
| 5701 | * up through the tree one GtkTextBTreeNode at a time until the root |
| 5702 | * GtkTextBTreeNode has been processed. |
| 5703 | */ |
| 5704 | |
| 5705 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5706 | { |
| 5707 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *new_node, *child; |
| 5708 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 5709 | int i; |
| 5710 | |
| 5711 | /* |
| 5712 | * Check to see if the GtkTextBTreeNode has too many children. If it does, |
| 5713 | * then split off all but the first MIN_CHILDREN into a separate |
| 5714 | * GtkTextBTreeNode following the original one. Then repeat until the |
| 5715 | * GtkTextBTreeNode has a decent size. |
| 5716 | */ |
| 5717 | |
| 5718 | if (node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. > MAX_CHILDRENcxx . . $ `gtk/gtktextbtree.c:235:9`!) |
| 5719 | { |
| 5720 | while (1) |
| 5721 | { |
| 5722 | /* |
| 5723 | * If the GtkTextBTreeNode being split is the root |
| 5724 | * GtkTextBTreeNode, then make a new root GtkTextBTreeNode above |
| 5725 | * it first. |
| 5726 | */ |
| 5727 | |
| 5728 | if (node->parentcxx . . $ _GtkTextBTreeNode#parent. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5729 | { |
| 5730 | new_node = gtk_text_btree_node_newcxx . . $ gtk_text_btree_node_new(a680a392ceeb9bf1). (); |
| 5731 | new_node->parentcxx . . $ _GtkTextBTreeNode#parent. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5732 | new_node->nextcxx . . $ _GtkTextBTreeNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5733 | new_node->summarycxx . . $ _GtkTextBTreeNode#summary. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5734 | new_node->levelcxx . . $ _GtkTextBTreeNode#level. = node->levelcxx . . $ _GtkTextBTreeNode#level. + 1; |
| 5735 | new_node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = node; |
| 5736 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (tree, new_node); |
| 5737 | tree->root_nodecxx . . $ _GtkTextBTree#root_node. = new_node; |
| 5738 | } |
| 5739 | new_node = gtk_text_btree_node_newcxx . . $ gtk_text_btree_node_new(a680a392ceeb9bf1). (); |
| 5740 | new_node->parentcxx . . $ _GtkTextBTreeNode#parent. = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5741 | new_node->nextcxx . . $ _GtkTextBTreeNode#next. = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5742 | node->nextcxx . . $ _GtkTextBTreeNode#next. = new_node; |
| 5743 | new_node->summarycxx . . $ _GtkTextBTreeNode#summary. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5744 | new_node->levelcxx . . $ _GtkTextBTreeNode#level. = node->levelcxx . . $ _GtkTextBTreeNode#level.; |
| 5745 | new_node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. = node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. - MIN_CHILDRENcxx . . $ `gtk/gtktextbtree.c:236:9`!; |
| 5746 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5747 | { |
| 5748 | for (i = MIN_CHILDRENcxx . . $ `gtk/gtktextbtree.c:236:9`!-1, |
| 5749 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 5750 | i > 0; i--, line = line->nextcxx . . $ _GtkTextLine#next.) |
| 5751 | { |
| 5752 | /* Empty loop body. */ |
| 5753 | } |
| 5754 | new_node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = line->nextcxx . . $ _GtkTextLine#next.; |
| 5755 | line->nextcxx . . $ _GtkTextLine#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5756 | } |
| 5757 | else |
| 5758 | { |
| 5759 | for (i = MIN_CHILDRENcxx . . $ `gtk/gtktextbtree.c:236:9`!-1, |
| 5760 | child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5761 | i > 0; i--, child = child->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 5762 | { |
| 5763 | /* Empty loop body. */ |
| 5764 | } |
| 5765 | new_node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5766 | child->nextcxx . . $ _GtkTextBTreeNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5767 | } |
| 5768 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (tree, node); |
| 5769 | node->parentcxx . . $ _GtkTextBTreeNode#parent.->num_childrencxx . . $ _GtkTextBTreeNode#num_children.++; |
| 5770 | node = new_node; |
| 5771 | if (node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. <= MAX_CHILDRENcxx . . $ `gtk/gtktextbtree.c:235:9`!) |
| 5772 | { |
| 5773 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (tree, node); |
| 5774 | break; |
| 5775 | } |
| 5776 | } |
| 5777 | } |
| 5778 | |
| 5779 | while (node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. < MIN_CHILDRENcxx . . $ `gtk/gtktextbtree.c:236:9`!) |
| 5780 | { |
| 5781 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *other; |
| 5782 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *halfwaynode = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* Initialization needed only */ |
| 5783 | GtkTextLinecxx . . $ GtkTextLine# *halfwayline = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; /* to prevent cc warnings. */ |
| 5784 | int total_children, first_children; |
| 5785 | |
| 5786 | /* |
| 5787 | * Too few children for this GtkTextBTreeNode. If this is the root then, |
| 5788 | * it's OK for it to have less than MIN_CHILDREN children |
| 5789 | * as long as it's got at least two. If it has only one |
| 5790 | * (and isn't at level 0), then chop the root GtkTextBTreeNode out of |
| 5791 | * the tree and use its child as the new root. |
| 5792 | */ |
| 5793 | |
| 5794 | if (node->parentcxx . . $ _GtkTextBTreeNode#parent. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5795 | { |
| 5796 | if ((node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. == 1) && (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0)) |
| 5797 | { |
| 5798 | tree->root_nodecxx . . $ _GtkTextBTree#root_node. = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5799 | tree->root_nodecxx . . $ _GtkTextBTree#root_node.->parentcxx . . $ _GtkTextBTreeNode#parent. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5800 | |
| 5801 | node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5802 | gtk_text_btree_node_free_emptycxx . . $ gtk_text_btree_node_free_empty(7e0fdd5226bb948b). (tree, node); |
| 5803 | } |
| 5804 | return; |
| 5805 | } |
| 5806 | |
| 5807 | /* |
| 5808 | * Not the root. Make sure that there are siblings to |
| 5809 | * balance with. |
| 5810 | */ |
| 5811 | |
| 5812 | if (node->parentcxx . . $ _GtkTextBTreeNode#parent.->num_childrencxx . . $ _GtkTextBTreeNode#num_children. < 2) |
| 5813 | { |
| 5814 | gtk_text_btree_rebalancecxx . . $ gtk_text_btree_rebalance(7e0fdd5226bb948b). (tree, node->parentcxx . . $ _GtkTextBTreeNode#parent.); |
| 5815 | continue; |
| 5816 | } |
| 5817 | |
| 5818 | /* |
| 5819 | * Find a sibling neighbor to borrow from, and arrange for |
| 5820 | * node to be the earlier of the pair. |
| 5821 | */ |
| 5822 | |
| 5823 | if (node->nextcxx . . $ _GtkTextBTreeNode#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5824 | { |
| 5825 | for (other = node->parentcxx . . $ _GtkTextBTreeNode#parent.->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5826 | other->nextcxx . . $ _GtkTextBTreeNode#next. != node; |
| 5827 | other = other->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 5828 | { |
| 5829 | /* Empty loop body. */ |
| 5830 | } |
| 5831 | node = other; |
| 5832 | } |
| 5833 | other = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5834 | |
| 5835 | /* |
| 5836 | * We're going to either merge the two siblings together |
| 5837 | * into one GtkTextBTreeNode or redivide the children among them to |
| 5838 | * balance their loads. As preparation, join their two |
| 5839 | * child lists into a single list and remember the half-way |
| 5840 | * point in the list. |
| 5841 | */ |
| 5842 | |
| 5843 | total_children = node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. + other->num_childrencxx . . $ _GtkTextBTreeNode#num_children.; |
| 5844 | first_children = total_children/2; |
| 5845 | if (node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5846 | { |
| 5847 | node->childrencxx . . $ _GtkTextBTreeNode#children. = other->childrencxx . . $ _GtkTextBTreeNode#children.; |
| 5848 | other->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5849 | other->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5850 | } |
| 5851 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5852 | { |
| 5853 | GtkTextLinecxx . . $ GtkTextLine# *line2; |
| 5854 | |
| 5855 | for (line2 = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line., i = 1; |
| 5856 | line2->nextcxx . . $ _GtkTextLine#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5857 | line2 = line2->nextcxx . . $ _GtkTextLine#next., i++) |
| 5858 | { |
| 5859 | if (i == first_children) |
| 5860 | { |
| 5861 | halfwayline = line2; |
| 5862 | } |
| 5863 | } |
| 5864 | line2->nextcxx . . $ _GtkTextLine#next. = other->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 5865 | while (i <= first_children) |
| 5866 | { |
| 5867 | halfwayline = line2; |
| 5868 | line2 = line2->nextcxx . . $ _GtkTextLine#next.; |
| 5869 | i++; |
| 5870 | } |
| 5871 | } |
| 5872 | else |
| 5873 | { |
| 5874 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child2; |
| 5875 | |
| 5876 | for (child2 = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node., i = 1; |
| 5877 | child2->nextcxx . . $ _GtkTextBTreeNode#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5878 | child2 = child2->nextcxx . . $ _GtkTextBTreeNode#next., i++) |
| 5879 | { |
| 5880 | if (i <= first_children) |
| 5881 | { |
| 5882 | if (i == first_children) |
| 5883 | { |
| 5884 | halfwaynode = child2; |
| 5885 | } |
| 5886 | } |
| 5887 | } |
| 5888 | child2->nextcxx . . $ _GtkTextBTreeNode#next. = other->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 5889 | while (i <= first_children) |
| 5890 | { |
| 5891 | halfwaynode = child2; |
| 5892 | child2 = child2->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5893 | i++; |
| 5894 | } |
| 5895 | } |
| 5896 | |
| 5897 | /* |
| 5898 | * If the two siblings can simply be merged together, do it. |
| 5899 | */ |
| 5900 | |
| 5901 | if (total_children <= MAX_CHILDRENcxx . . $ `gtk/gtktextbtree.c:235:9`!) |
| 5902 | { |
| 5903 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (tree, node); |
| 5904 | node->nextcxx . . $ _GtkTextBTreeNode#next. = other->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5905 | node->parentcxx . . $ _GtkTextBTreeNode#parent.->num_childrencxx . . $ _GtkTextBTreeNode#num_children.--; |
| 5906 | |
| 5907 | other->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5908 | other->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5909 | gtk_text_btree_node_free_emptycxx . . $ gtk_text_btree_node_free_empty(7e0fdd5226bb948b). (tree, other); |
| 5910 | continue; |
| 5911 | } |
| 5912 | |
| 5913 | /* |
| 5914 | * The siblings can't be merged, so just divide their |
| 5915 | * children evenly between them. |
| 5916 | */ |
| 5917 | |
| 5918 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 5919 | { |
| 5920 | other->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. = halfwayline->nextcxx . . $ _GtkTextLine#next.; |
| 5921 | halfwayline->nextcxx . . $ _GtkTextLine#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5922 | } |
| 5923 | else |
| 5924 | { |
| 5925 | other->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. = halfwaynode->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 5926 | halfwaynode->nextcxx . . $ _GtkTextBTreeNode#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5927 | } |
| 5928 | |
| 5929 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (tree, node); |
| 5930 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (tree, other); |
| 5931 | } |
| 5932 | |
| 5933 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 5934 | } |
| 5935 | } |
| 5936 | |
| 5937 | static void |
| 5938 | post_insert_fixupcxx . . $ post_insert_fixup(94e44c90f71c53cf). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5939 | GtkTextLinecxx . . $ GtkTextLine# *line, |
| 5940 | int line_count_delta, |
| 5941 | int char_count_delta) |
| 5942 | |
| 5943 | { |
| 5944 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 5945 | |
| 5946 | /* |
| 5947 | * Increment the line counts in all the parent GtkTextBTreeNodes of the insertion |
| 5948 | * point, then rebalance the tree if necessary. |
| 5949 | */ |
| 5950 | |
| 5951 | for (node = line->parentcxx . . $ _GtkTextLine#parent. ; node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5952 | node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 5953 | { |
| 5954 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. += line_count_delta; |
| 5955 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. += char_count_delta; |
| 5956 | } |
| 5957 | node = line->parentcxx . . $ _GtkTextLine#parent.; |
| 5958 | node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. += line_count_delta; |
| 5959 | |
| 5960 | if (node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. > MAX_CHILDRENcxx . . $ `gtk/gtktextbtree.c:235:9`!) |
| 5961 | { |
| 5962 | gtk_text_btree_rebalancecxx . . $ gtk_text_btree_rebalance(7e0fdd5226bb948b). (tree, node); |
| 5963 | } |
| 5964 | |
| 5965 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 5966 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 5967 | } |
| 5968 | |
| 5969 | static GtkTextTagInfocxx . . $ GtkTextTagInfo#* |
| 5970 | gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5971 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 5972 | { |
| 5973 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 5974 | GSListcxx . . $ GSList# *list; |
| 5975 | |
| 5976 | |
| 5977 | list = tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos.; |
| 5978 | while (list != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5979 | { |
| 5980 | info = list->datacxx . . $ _GSList#data.; |
| 5981 | if (info->tagcxx . . $ _GtkTextTagInfo#tag. == tag) |
| 5982 | return info; |
| 5983 | |
| 5984 | list = list->nextcxx . . $ _GSList#next.; |
| 5985 | } |
| 5986 | |
| 5987 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 5988 | } |
| 5989 | |
| 5990 | static GtkTextTagInfocxx . . $ GtkTextTagInfo#* |
| 5991 | gtk_text_btree_get_tag_infocxx . . $ gtk_text_btree_get_tag_info(dabcf248e7392eb5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 5992 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 5993 | { |
| 5994 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 5995 | |
| 5996 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 5997 | |
| 5998 | if (info == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 5999 | { |
| 6000 | /* didn't find it, create. */ |
| 6001 | |
| 6002 | info = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (GtkTextTagInfo, 1); |
| 6003 | |
| 6004 | info->tagcxx . . $ _GtkTextTagInfo#tag. = tag; |
| 6005 | g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (tag); |
| 6006 | info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6007 | info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. = 0; |
| 6008 | |
| 6009 | tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos. = g_slist_prependcxx . . $ g_slist_prepend(6eb923d8c45a5456). (tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos., info); |
| 6010 | } |
| 6011 | |
| 6012 | return info; |
| 6013 | } |
| 6014 | |
| 6015 | static void |
| 6016 | gtk_text_btree_remove_tag_infocxx . . $ gtk_text_btree_remove_tag_info(7d59af89fb7d77fc). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 6017 | GtkTextTagcxx . . $ GtkTextTag# *tag) |
| 6018 | { |
| 6019 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 6020 | GSListcxx . . $ GSList# *list; |
| 6021 | GSListcxx . . $ GSList# *prev; |
| 6022 | |
| 6023 | prev = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6024 | list = tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos.; |
| 6025 | while (list != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6026 | { |
| 6027 | info = list->datacxx . . $ _GSList#data.; |
| 6028 | if (info->tagcxx . . $ _GtkTextTagInfo#tag. == tag) |
| 6029 | { |
| 6030 | if (prev != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6031 | { |
| 6032 | prev->nextcxx . . $ _GSList#next. = list->nextcxx . . $ _GSList#next.; |
| 6033 | } |
| 6034 | else |
| 6035 | { |
| 6036 | tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos. = list->nextcxx . . $ _GSList#next.; |
| 6037 | } |
| 6038 | list->nextcxx . . $ _GSList#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6039 | g_slist_freecxx . . $ g_slist_free(e7f64dba92841206). (list); |
| 6040 | |
| 6041 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (info->tagcxx . . $ _GtkTextTagInfo#tag.); |
| 6042 | |
| 6043 | g_freecxx . . $ g_free(5d22bdacc48458e8). (info); |
| 6044 | return; |
| 6045 | } |
| 6046 | |
| 6047 | prev = list; |
| 6048 | list = list->nextcxx . . $ _GSList#next.; |
| 6049 | } |
| 6050 | } |
| 6051 | |
| 6052 | static void |
| 6053 | recompute_level_zero_countscxx . . $ recompute_level_zero_counts(9a69e45e8ddfe75c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 6054 | { |
| 6055 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 6056 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 6057 | |
| 6058 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level == 0); |
| 6059 | |
| 6060 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 6061 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6062 | { |
| 6063 | node->num_childrencxx . . $ _GtkTextBTreeNode#num_children.++; |
| 6064 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines.++; |
| 6065 | |
| 6066 | if (line->parentcxx . . $ _GtkTextLine#parent. != node) |
| 6067 | gtk_text_line_set_parentcxx . . $ gtk_text_line_set_parent(7d665b62c00717d7). (line, node); |
| 6068 | |
| 6069 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 6070 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6071 | { |
| 6072 | |
| 6073 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. += seg->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 6074 | |
| 6075 | if (((seg->typecxx . . $ _GtkTextLineSegment#type. != >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 6076 | && (seg->typecxx . . $ _GtkTextLineSegment#type. != >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 6077 | || !(seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..inNodeCountscxx . . $ _GtkTextToggleBody#inNodeCounts.)) |
| 6078 | { |
| 6079 | ; /* nothing */ |
| 6080 | } |
| 6081 | else |
| 6082 | { |
| 6083 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 6084 | |
| 6085 | info = seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.; |
| 6086 | |
| 6087 | gtk_text_btree_node_adjust_toggle_countcxx . . $ gtk_text_btree_node_adjust_toggle_count(80783df9392c55b3). (node, info, 1); |
| 6088 | } |
| 6089 | |
| 6090 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 6091 | } |
| 6092 | |
| 6093 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 6094 | } |
| 6095 | } |
| 6096 | |
| 6097 | static void |
| 6098 | recompute_level_nonzero_countscxx . . $ recompute_level_nonzero_counts(9a69e45e8ddfe75c). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 6099 | { |
| 6100 | Summarycxx . . $ Summary# *summary; |
| 6101 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *child; |
| 6102 | |
| 6103 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (node->level > 0); |
| 6104 | |
| 6105 | child = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 6106 | while (child != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6107 | { |
| 6108 | node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. += 1; |
| 6109 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. += child->num_linescxx . . $ _GtkTextBTreeNode#num_lines.; |
| 6110 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. += child->num_charscxx . . $ _GtkTextBTreeNode#num_chars.; |
| 6111 | |
| 6112 | if (child->parentcxx . . $ _GtkTextBTreeNode#parent. != node) |
| 6113 | { |
| 6114 | child->parentcxx . . $ _GtkTextBTreeNode#parent. = node; |
| 6115 | gtk_text_btree_node_invalidate_upwardcxx . . $ gtk_text_btree_node_invalidate_upward(eec353699738d68c). (node, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 6116 | } |
| 6117 | |
| 6118 | summary = child->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6119 | while (summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6120 | { |
| 6121 | gtk_text_btree_node_adjust_toggle_countcxx . . $ gtk_text_btree_node_adjust_toggle_count(80783df9392c55b3). (node, |
| 6122 | summary->infocxx . . $ Summary#info., |
| 6123 | summary->toggle_countcxx . . $ Summary#toggle_count.); |
| 6124 | |
| 6125 | summary = summary->nextcxx . . $ Summary#next.; |
| 6126 | } |
| 6127 | |
| 6128 | child = child->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 6129 | } |
| 6130 | } |
| 6131 | |
| 6132 | /* |
| 6133 | *---------------------------------------------------------------------- |
| 6134 | * |
| 6135 | * recompute_node_counts -- |
| 6136 | * |
| 6137 | * This procedure is called to recompute all the counts in a GtkTextBTreeNode |
| 6138 | * (tags, child information, etc.) by scanning the information in |
| 6139 | * its descendants. This procedure is called during rebalancing |
| 6140 | * when a GtkTextBTreeNode’s child structure has changed. |
| 6141 | * |
| 6142 | * Results: |
| 6143 | * None. |
| 6144 | * |
| 6145 | * Side effects: |
| 6146 | * The tag counts for node are modified to reflect its current |
| 6147 | * child structure, as are its num_children, num_lines, num_chars fields. |
| 6148 | * Also, all of the childrens’ parent fields are made to point |
| 6149 | * to node. |
| 6150 | * |
| 6151 | *---------------------------------------------------------------------- |
| 6152 | */ |
| 6153 | |
| 6154 | static void |
| 6155 | recompute_node_countscxx . . $ recompute_node_counts(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 6156 | { |
| 6157 | BTreeViewcxx . . $ BTreeView# *view; |
| 6158 | Summarycxx . . $ Summary# *summary, *summary2; |
| 6159 | |
| 6160 | /* |
| 6161 | * Zero out all the existing counts for the GtkTextBTreeNode, but don’t delete |
| 6162 | * the existing Summary records (most of them will probably be reused). |
| 6163 | */ |
| 6164 | |
| 6165 | summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6166 | while (summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6167 | { |
| 6168 | summary->toggle_countcxx . . $ Summary#toggle_count. = 0; |
| 6169 | summary = summary->nextcxx . . $ Summary#next.; |
| 6170 | } |
| 6171 | |
| 6172 | node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. = 0; |
| 6173 | node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. = 0; |
| 6174 | node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. = 0; |
| 6175 | |
| 6176 | /* |
| 6177 | * Scan through the children, adding the childrens’ tag counts into |
| 6178 | * the GtkTextBTreeNode’s tag counts and adding new Summary structures if |
| 6179 | * necessary. |
| 6180 | */ |
| 6181 | |
| 6182 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 6183 | recompute_level_zero_countscxx . . $ recompute_level_zero_counts(9a69e45e8ddfe75c). (node); |
| 6184 | else |
| 6185 | recompute_level_nonzero_countscxx . . $ recompute_level_nonzero_counts(9a69e45e8ddfe75c). (node); |
| 6186 | |
| 6187 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 6188 | while (view) |
| 6189 | { |
| 6190 | gtk_text_btree_node_check_validcxx . . $ gtk_text_btree_node_check_valid(862e614253708acc). (node, view->view_idcxx . . $ _BTreeView#view_id.); |
| 6191 | view = view->nextcxx . . $ _BTreeView#next.; |
| 6192 | } |
| 6193 | |
| 6194 | /* |
| 6195 | * Scan through the GtkTextBTreeNode’s tag records again and delete any Summary |
| 6196 | * records that still have a zero count, or that have all the toggles. |
| 6197 | * The GtkTextBTreeNode with the children that account for all the tags toggles |
| 6198 | * have no summary information, and they become the tag_root for the tag. |
| 6199 | */ |
| 6200 | |
| 6201 | summary2 = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6202 | for (summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; ) |
| 6203 | { |
| 6204 | if (summary->toggle_countcxx . . $ Summary#toggle_count. > 0 && |
| 6205 | summary->toggle_countcxx . . $ Summary#toggle_count. < summary->infocxx . . $ Summary#info.->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count.) |
| 6206 | { |
| 6207 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == summary->infocxx . . $ Summary#info.->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.->levelcxx . . $ _GtkTextBTreeNode#level.) |
| 6208 | { |
| 6209 | /* |
| 6210 | * The tag’s root GtkTextBTreeNode split and some toggles left. |
| 6211 | * The tag root must move up a level. |
| 6212 | */ |
| 6213 | summary->infocxx . . $ Summary#info.->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = node->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 6214 | } |
| 6215 | summary2 = summary; |
| 6216 | summary = summary->nextcxx . . $ Summary#next.; |
| 6217 | continue; |
| 6218 | } |
| 6219 | if (summary->toggle_countcxx . . $ Summary#toggle_count. == summary->infocxx . . $ Summary#info.->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count.) |
| 6220 | { |
| 6221 | /* |
| 6222 | * A GtkTextBTreeNode merge has collected all the toggles under |
| 6223 | * one GtkTextBTreeNode. Push the root down to this level. |
| 6224 | */ |
| 6225 | summary->infocxx . . $ Summary#info.->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = node; |
| 6226 | } |
| 6227 | if (summary2 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6228 | { |
| 6229 | summary2->nextcxx . . $ Summary#next. = summary->nextcxx . . $ Summary#next.; |
| 6230 | summary_destroycxx . . $ summary_destroy(da23a492de438288). (summary); |
| 6231 | summary = summary2->nextcxx . . $ Summary#next.; |
| 6232 | } |
| 6233 | else |
| 6234 | { |
| 6235 | node->summarycxx . . $ _GtkTextBTreeNode#summary. = summary->nextcxx . . $ Summary#next.; |
| 6236 | summary_destroycxx . . $ summary_destroy(da23a492de438288). (summary); |
| 6237 | summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6238 | } |
| 6239 | } |
| 6240 | } |
| 6241 | |
| 6242 | void |
| 6243 | _gtk_change_node_toggle_countcxx . . $ _gtk_change_node_toggle_count(80783df9392c55b3). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 6244 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info, |
| 6245 | int delta) /* may be negative */ |
| 6246 | { |
| 6247 | Summarycxx . . $ Summary# *summary, *prevPtr; |
| 6248 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node2Ptr; |
| 6249 | int rootLevel; /* Level of original tag root */ |
| 6250 | |
| 6251 | info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. += delta; |
| 6252 | |
| 6253 | if (info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *) NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6254 | { |
| 6255 | info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = node; |
| 6256 | return; |
| 6257 | } |
| 6258 | |
| 6259 | /* |
| 6260 | * Note the level of the existing root for the tag so we can detect |
| 6261 | * if it needs to be moved because of the toggle count change. |
| 6262 | */ |
| 6263 | |
| 6264 | rootLevel = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.->levelcxx . . $ _GtkTextBTreeNode#level.; |
| 6265 | |
| 6266 | /* |
| 6267 | * Iterate over the GtkTextBTreeNode and its ancestors up to the tag root, adjusting |
| 6268 | * summary counts at each GtkTextBTreeNode and moving the tag’s root upwards if |
| 6269 | * necessary. |
| 6270 | */ |
| 6271 | |
| 6272 | for ( ; node != info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; node = node->parentcxx . . $ _GtkTextBTreeNode#parent.) |
| 6273 | { |
| 6274 | /* |
| 6275 | * See if there’s already an entry for this tag for this GtkTextBTreeNode. If so, |
| 6276 | * perhaps all we have to do is adjust its count. |
| 6277 | */ |
| 6278 | |
| 6279 | for (prevPtr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6280 | summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6281 | prevPtr = summary, summary = summary->nextcxx . . $ Summary#next.) |
| 6282 | { |
| 6283 | if (summary->infocxx . . $ Summary#info. == info) |
| 6284 | { |
| 6285 | break; |
| 6286 | } |
| 6287 | } |
| 6288 | if (summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6289 | { |
| 6290 | summary->toggle_countcxx . . $ Summary#toggle_count. += delta; |
| 6291 | if (summary->toggle_countcxx . . $ Summary#toggle_count. > 0 && |
| 6292 | summary->toggle_countcxx . . $ Summary#toggle_count. < info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count.) |
| 6293 | { |
| 6294 | continue; |
| 6295 | } |
| 6296 | if (summary->toggle_countcxx . . $ Summary#toggle_count. != 0) |
| 6297 | { |
| 6298 | /* |
| 6299 | * Should never find a GtkTextBTreeNode with max toggle count at this |
| 6300 | * point (there shouldn’t have been a summary entry in the |
| 6301 | * first place). |
| 6302 | */ |
| 6303 | |
| 6304 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("%s: bad toggle count (%d) max (%d)", |
| 6305 | G_STRLOCcxx . . $ `<external>/12741050725406041920/gmacros.h:928:9`!, summary->toggle_count, info->toggle_count); |
| 6306 | } |
| 6307 | |
| 6308 | /* |
| 6309 | * Zero toggle count; must remove this tag from the list. |
| 6310 | */ |
| 6311 | |
| 6312 | if (prevPtr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6313 | { |
| 6314 | node->summarycxx . . $ _GtkTextBTreeNode#summary. = summary->nextcxx . . $ Summary#next.; |
| 6315 | } |
| 6316 | else |
| 6317 | { |
| 6318 | prevPtr->nextcxx . . $ Summary#next. = summary->nextcxx . . $ Summary#next.; |
| 6319 | } |
| 6320 | summary_destroycxx . . $ summary_destroy(da23a492de438288). (summary); |
| 6321 | } |
| 6322 | else |
| 6323 | { |
| 6324 | /* |
| 6325 | * This tag isn’t currently in the summary information list. |
| 6326 | */ |
| 6327 | |
| 6328 | if (rootLevel == node->levelcxx . . $ _GtkTextBTreeNode#level.) |
| 6329 | { |
| 6330 | |
| 6331 | /* |
| 6332 | * The old tag root is at the same level in the tree as this |
| 6333 | * GtkTextBTreeNode, but it isn’t at this GtkTextBTreeNode. Move the tag root up |
| 6334 | * a level, in the hopes that it will now cover this GtkTextBTreeNode |
| 6335 | * as well as the old root (if not, we’ll move it up again |
| 6336 | * the next time through the loop). To push it up one level |
| 6337 | * we copy the original toggle count into the summary |
| 6338 | * information at the old root and change the root to its |
| 6339 | * parent GtkTextBTreeNode. |
| 6340 | */ |
| 6341 | |
| 6342 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *rootnode = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 6343 | summary = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (Summary, 1); |
| 6344 | summary->infocxx . . $ Summary#info. = info; |
| 6345 | summary->toggle_countcxx . . $ Summary#toggle_count. = info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. - delta; |
| 6346 | summary->nextcxx . . $ Summary#next. = rootnode->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6347 | rootnode->summarycxx . . $ _GtkTextBTreeNode#summary. = summary; |
| 6348 | rootnode = rootnode->parentcxx . . $ _GtkTextBTreeNode#parent.; |
| 6349 | rootLevel = rootnode->levelcxx . . $ _GtkTextBTreeNode#level.; |
| 6350 | info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = rootnode; |
| 6351 | } |
| 6352 | summary = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (Summary, 1); |
| 6353 | summary->infocxx . . $ Summary#info. = info; |
| 6354 | summary->toggle_countcxx . . $ Summary#toggle_count. = delta; |
| 6355 | summary->nextcxx . . $ Summary#next. = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6356 | node->summarycxx . . $ _GtkTextBTreeNode#summary. = summary; |
| 6357 | } |
| 6358 | } |
| 6359 | |
| 6360 | /* |
| 6361 | * If we’ve decremented the toggle count, then it may be necessary |
| 6362 | * to push the tag root down one or more levels. |
| 6363 | */ |
| 6364 | |
| 6365 | if (delta >= 0) |
| 6366 | { |
| 6367 | return; |
| 6368 | } |
| 6369 | if (info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. == 0) |
| 6370 | { |
| 6371 | info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *) NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6372 | return; |
| 6373 | } |
| 6374 | node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 6375 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 6376 | { |
| 6377 | /* |
| 6378 | * See if a single child GtkTextBTreeNode accounts for all of the tag’s |
| 6379 | * toggles. If so, push the root down one level. |
| 6380 | */ |
| 6381 | |
| 6382 | for (node2Ptr = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 6383 | node2Ptr != (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *)NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! ; |
| 6384 | node2Ptr = node2Ptr->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 6385 | { |
| 6386 | for (prevPtr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, summary = node2Ptr->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6387 | summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6388 | prevPtr = summary, summary = summary->nextcxx . . $ Summary#next.) |
| 6389 | { |
| 6390 | if (summary->infocxx . . $ Summary#info. == info) |
| 6391 | { |
| 6392 | break; |
| 6393 | } |
| 6394 | } |
| 6395 | if (summary == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6396 | { |
| 6397 | continue; |
| 6398 | } |
| 6399 | if (summary->toggle_countcxx . . $ Summary#toggle_count. != info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count.) |
| 6400 | { |
| 6401 | /* |
| 6402 | * No GtkTextBTreeNode has all toggles, so the root is still valid. |
| 6403 | */ |
| 6404 | |
| 6405 | return; |
| 6406 | } |
| 6407 | |
| 6408 | /* |
| 6409 | * This GtkTextBTreeNode has all the toggles, so push down the root. |
| 6410 | */ |
| 6411 | |
| 6412 | if (prevPtr == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6413 | { |
| 6414 | node2Ptr->summarycxx . . $ _GtkTextBTreeNode#summary. = summary->nextcxx . . $ Summary#next.; |
| 6415 | } |
| 6416 | else |
| 6417 | { |
| 6418 | prevPtr->nextcxx . . $ Summary#next. = summary->nextcxx . . $ Summary#next.; |
| 6419 | } |
| 6420 | summary_destroycxx . . $ summary_destroy(da23a492de438288). (summary); |
| 6421 | info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. = node2Ptr; |
| 6422 | break; |
| 6423 | } |
| 6424 | node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 6425 | } |
| 6426 | } |
| 6427 | |
| 6428 | /* |
| 6429 | *---------------------------------------------------------------------- |
| 6430 | * |
| 6431 | * inc_count -- |
| 6432 | * |
| 6433 | * This is a utility procedure used by _gtk_text_btree_get_tags. It |
| 6434 | * increments the count for a particular tag, adding a new |
| 6435 | * entry for that tag if there wasn’t one previously. |
| 6436 | * |
| 6437 | * Results: |
| 6438 | * None. |
| 6439 | * |
| 6440 | * Side effects: |
| 6441 | * The information at *tagInfoPtr may be modified, and the arrays |
| 6442 | * may be reallocated to make them larger. |
| 6443 | * |
| 6444 | *---------------------------------------------------------------------- |
| 6445 | */ |
| 6446 | |
| 6447 | static void |
| 6448 | inc_countcxx . . $ inc_count(12efdf60738d4d4a). (GtkTextTagcxx . . $ GtkTextTag# *tag, int inc, TagInfocxx . . $ TagInfo# *tagInfoPtr) |
| 6449 | { |
| 6450 | for (int i = 0; i < tagInfoPtr->tagscxx . . $ TagInfo#tags.->lencxx . . $ _GPtrArray#len.; i++) |
| 6451 | { |
| 6452 | GtkTextTagcxx . . $ GtkTextTag# *t = g_ptr_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:149:12`! (tagInfoPtr->tags, i); |
| 6453 | if (t == tag) |
| 6454 | { |
| 6455 | g_array_indexcxx . . $ `<external>/13165152102340786875/garray.h:69:9`! (tagInfoPtr->counts, int, i) += inc; |
| 6456 | return; |
| 6457 | } |
| 6458 | } |
| 6459 | |
| 6460 | /* |
| 6461 | * There isn’t currently an entry for this tag, so we have to |
| 6462 | * make a new one. If the arrays are full, then enlarge the |
| 6463 | * arrays first. |
| 6464 | */ |
| 6465 | |
| 6466 | g_ptr_array_addcxx . . $ g_ptr_array_add(3cd73f70a4ada9). (tagInfoPtr->tagscxx . . $ TagInfo#tags., tag); |
| 6467 | g_array_append_valcxx . . $ `<external>/13165152102340786875/garray.h:66:9`! (tagInfoPtr->counts, inc); |
| 6468 | } |
| 6469 | |
| 6470 | static void |
| 6471 | gtk_text_btree_link_segmentcxx . . $ gtk_text_btree_link_segment(fafcfc58c576ceba). (GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, |
| 6472 | const GtkTextItercxx . . $ GtkTextIter# *iter) |
| 6473 | { |
| 6474 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *prev; |
| 6475 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 6476 | GtkTextBTreecxx . . $ GtkTextBTree# *tree; |
| 6477 | |
| 6478 | line = _gtk_text_iter_get_text_linecxx . . $ _gtk_text_iter_get_text_line(bbaf147764a24b05). (iter); |
| 6479 | tree = _gtk_text_iter_get_btreecxx . . $ _gtk_text_iter_get_btree(378fb117a87e78a6). (iter); |
| 6480 | |
| 6481 | prev = gtk_text_line_segment_splitcxx . . $ gtk_text_line_segment_split(844d619f98f748d3). (iter); |
| 6482 | if (prev == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6483 | { |
| 6484 | seg->nextcxx . . $ _GtkTextLineSegment#next. = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 6485 | line->segmentscxx . . $ _GtkTextLine#segments. = seg; |
| 6486 | } |
| 6487 | else |
| 6488 | { |
| 6489 | seg->nextcxx . . $ _GtkTextLineSegment#next. = prev->nextcxx . . $ _GtkTextLineSegment#next.; |
| 6490 | prev->nextcxx . . $ _GtkTextLineSegment#next. = seg; |
| 6491 | } |
| 6492 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (line); |
| 6493 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 6494 | |
| 6495 | if (GTK_DEBUG_CHECKcxx . . $ `gtk/gtkdebug.h:142:9`! (TEXT)) |
| 6496 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (tree); |
| 6497 | } |
| 6498 | |
| 6499 | static void |
| 6500 | gtk_text_btree_unlink_segmentcxx . . $ gtk_text_btree_unlink_segment(7c91a0bf59e632d8). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 6501 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg, |
| 6502 | GtkTextLinecxx . . $ GtkTextLine# *line) |
| 6503 | { |
| 6504 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *prev; |
| 6505 | |
| 6506 | if (line->segmentscxx . . $ _GtkTextLine#segments. == seg) |
| 6507 | { |
| 6508 | line->segmentscxx . . $ _GtkTextLine#segments. = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 6509 | } |
| 6510 | else |
| 6511 | { |
| 6512 | for (prev = line->segmentscxx . . $ _GtkTextLine#segments.; prev->nextcxx . . $ _GtkTextLineSegment#next. != seg; |
| 6513 | prev = prev->nextcxx . . $ _GtkTextLineSegment#next.) |
| 6514 | { |
| 6515 | /* Empty loop body. */ |
| 6516 | } |
| 6517 | prev->nextcxx . . $ _GtkTextLineSegment#next. = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 6518 | } |
| 6519 | cleanup_linecxx . . $ cleanup_line(99a1352005bf990e). (line); |
| 6520 | segments_changedcxx . . $ segments_changed(1eb40b89a5a0e9e5). (tree); |
| 6521 | } |
| 6522 | |
| 6523 | /* |
| 6524 | * This is here because it requires BTree internals, it logically |
| 6525 | * belongs in gtktextsegment.c |
| 6526 | */ |
| 6527 | |
| 6528 | |
| 6529 | /* |
| 6530 | *-------------------------------------------------------------- |
| 6531 | * |
| 6532 | * _gtk_toggle_segment_check_func -- |
| 6533 | * |
| 6534 | * This procedure is invoked to perform consistency checks |
| 6535 | * on toggle segments. |
| 6536 | * |
| 6537 | * Results: |
| 6538 | * None. |
| 6539 | * |
| 6540 | * Side effects: |
| 6541 | * If a consistency problem is found the procedure g_errors. |
| 6542 | * |
| 6543 | *-------------------------------------------------------------- |
| 6544 | */ |
| 6545 | |
| 6546 | void |
| 6547 | _gtk_toggle_segment_check_funccxx . . $ _gtk_toggle_segment_check_func(1e09dd013912e415). (GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *segPtr, |
| 6548 | GtkTextLinecxx . . $ GtkTextLine# *line) |
| 6549 | { |
| 6550 | Summarycxx . . $ Summary# *summary; |
| 6551 | int needSummary; |
| 6552 | |
| 6553 | if (segPtr->byte_countcxx . . $ _GtkTextLineSegment#byte_count. != 0) |
| 6554 | { |
| 6555 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("toggle_segment_check_func: segment had non-zero size"); |
| 6556 | } |
| 6557 | if (!segPtr->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..inNodeCountscxx . . $ _GtkTextToggleBody#inNodeCounts.) |
| 6558 | { |
| 6559 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("toggle_segment_check_func: toggle counts not updated in GtkTextBTreeNodes"); |
| 6560 | } |
| 6561 | needSummary = (segPtr->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. != line->parentcxx . . $ _GtkTextLine#parent.); |
| 6562 | for (summary = line->parentcxx . . $ _GtkTextLine#parent.->summarycxx . . $ _GtkTextBTreeNode#summary.; ; |
| 6563 | summary = summary->nextcxx . . $ Summary#next.) |
| 6564 | { |
| 6565 | if (summary == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6566 | { |
| 6567 | if (needSummary) |
| 6568 | { |
| 6569 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("toggle_segment_check_func: tag not present in GtkTextBTreeNode"); |
| 6570 | } |
| 6571 | else |
| 6572 | { |
| 6573 | break; |
| 6574 | } |
| 6575 | } |
| 6576 | if (summary->infocxx . . $ Summary#info. == segPtr->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.) |
| 6577 | { |
| 6578 | if (!needSummary) |
| 6579 | { |
| 6580 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("toggle_segment_check_func: tag present in root GtkTextBTreeNode summary"); |
| 6581 | } |
| 6582 | break; |
| 6583 | } |
| 6584 | } |
| 6585 | } |
| 6586 | |
| 6587 | /* |
| 6588 | * Debug |
| 6589 | */ |
| 6590 | static void |
| 6591 | gtk_text_btree_node_view_check_consistencycxx . . $ gtk_text_btree_node_view_check_consistency(708ca15addf6ca5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 6592 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, |
| 6593 | NodeDatacxx . . $ NodeData# *nd) |
| 6594 | { |
| 6595 | int width; |
| 6596 | int height; |
| 6597 | gbooleancxx . . $ gboolean# valid; |
| 6598 | BTreeViewcxx . . $ BTreeView# *view; |
| 6599 | |
| 6600 | view = tree->viewscxx . . $ _GtkTextBTree#views.; |
| 6601 | |
| 6602 | while (view != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6603 | { |
| 6604 | if (view->view_idcxx . . $ _BTreeView#view_id. == nd->view_idcxx . . $ _NodeData#view_id.) |
| 6605 | break; |
| 6606 | |
| 6607 | view = view->nextcxx . . $ _BTreeView#next.; |
| 6608 | } |
| 6609 | |
| 6610 | if (view == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6611 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("Node has data for a view %p no longer attached to the tree", |
| 6612 | nd->view_id); |
| 6613 | |
| 6614 | gtk_text_btree_node_compute_view_aggregatescxx . . $ gtk_text_btree_node_compute_view_aggregates(ca773f43e9058906). (node, nd->view_idcxx . . $ _NodeData#view_id., |
| 6615 | &width, &height, &valid); |
| 6616 | |
| 6617 | /* valid aggregate not checked the same as width/height, because on |
| 6618 | * btree rebalance we can have invalid nodes where all lines below |
| 6619 | * them are actually valid, due to moving lines around between |
| 6620 | * nodes. |
| 6621 | * |
| 6622 | * The guarantee is that if there are invalid lines the node is |
| 6623 | * invalid - we don’t guarantee that if the node is invalid there |
| 6624 | * are invalid lines. |
| 6625 | */ |
| 6626 | |
| 6627 | if (nd->widthcxx . . $ _NodeData#width. != width || |
| 6628 | nd->heightcxx . . $ _NodeData#height. != height || |
| 6629 | (nd->validcxx . . $ _NodeData#valid. && !valid)) |
| 6630 | { |
| 6631 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("Node aggregates for view %p are invalid:\n" |
| 6632 | "Are (%d,%d,%s), should be (%d,%d,%s)", |
| 6633 | nd->view_id, |
| 6634 | nd->width, nd->height, nd->valid ? "TRUE" : "FALSE", |
| 6635 | width, height, valid ? "TRUE" : "FALSE"); |
| 6636 | } |
| 6637 | } |
| 6638 | |
| 6639 | static void |
| 6640 | gtk_text_btree_node_check_consistencycxx . . $ gtk_text_btree_node_check_consistency(7e0fdd5226bb948b). (GtkTextBTreecxx . . $ GtkTextBTree# *tree, |
| 6641 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node) |
| 6642 | { |
| 6643 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *childnode; |
| 6644 | Summarycxx . . $ Summary# *summary, *summary2; |
| 6645 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 6646 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *segPtr; |
| 6647 | int num_children, num_lines, num_chars, toggle_count, min_children; |
| 6648 | GtkTextLineDatacxx . . $ GtkTextLineData# *ld; |
| 6649 | NodeDatacxx . . $ NodeData# *nd; |
| 6650 | |
| 6651 | if (node->parentcxx . . $ _GtkTextBTreeNode#parent. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6652 | { |
| 6653 | min_children = MIN_CHILDRENcxx . . $ `gtk/gtktextbtree.c:236:9`!; |
| 6654 | } |
| 6655 | else if (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 6656 | { |
| 6657 | min_children = 2; |
| 6658 | } |
| 6659 | else { |
| 6660 | min_children = 1; |
| 6661 | } |
| 6662 | if ((node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. < min_children) |
| 6663 | || (node->num_childrencxx . . $ _GtkTextBTreeNode#num_children. > MAX_CHILDRENcxx . . $ `gtk/gtktextbtree.c:235:9`!)) |
| 6664 | { |
| 6665 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: bad child count (%d)", |
| 6666 | node->num_children); |
| 6667 | } |
| 6668 | |
| 6669 | nd = node->node_datacxx . . $ _GtkTextBTreeNode#node_data.; |
| 6670 | while (nd != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6671 | { |
| 6672 | gtk_text_btree_node_view_check_consistencycxx . . $ gtk_text_btree_node_view_check_consistency(708ca15addf6ca5). (tree, node, nd); |
| 6673 | nd = nd->nextcxx . . $ _NodeData#next.; |
| 6674 | } |
| 6675 | |
| 6676 | num_children = 0; |
| 6677 | num_lines = 0; |
| 6678 | num_chars = 0; |
| 6679 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 6680 | { |
| 6681 | for (line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6682 | line = line->nextcxx . . $ _GtkTextLine#next.) |
| 6683 | { |
| 6684 | if (line->parentcxx . . $ _GtkTextLine#parent. != node) |
| 6685 | { |
| 6686 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: line doesn't point to parent"); |
| 6687 | } |
| 6688 | if (line->segmentscxx . . $ _GtkTextLine#segments. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6689 | { |
| 6690 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: line has no segments"); |
| 6691 | } |
| 6692 | |
| 6693 | ld = line->viewscxx . . $ _GtkTextLine#views.; |
| 6694 | while (ld != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6695 | { |
| 6696 | /* Just ensuring we don’t segv while doing this loop */ |
| 6697 | |
| 6698 | ld = ld->nextcxx . . $ _GtkTextLineData#next.; |
| 6699 | } |
| 6700 | |
| 6701 | for (segPtr = line->segmentscxx . . $ _GtkTextLine#segments.; segPtr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; segPtr = segPtr->nextcxx . . $ _GtkTextLineSegment#next.) |
| 6702 | { |
| 6703 | if (segPtr->typecxx . . $ _GtkTextLineSegment#type.->checkFunccxx . . $ _GtkTextLineSegmentClass#checkFunc. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6704 | { |
| 6705 | (*segPtr->typecxx . . $ _GtkTextLineSegment#type.->checkFunccxx . . $ _GtkTextLineSegmentClass#checkFunc.)(segPtr, line); |
| 6706 | } |
| 6707 | if ((segPtr->byte_countcxx . . $ _GtkTextLineSegment#byte_count. == 0) && (!segPtr->typecxx . . $ _GtkTextLineSegment#type.->leftGravitycxx . . $ _GtkTextLineSegmentClass#leftGravity.) |
| 6708 | && (segPtr->nextcxx . . $ _GtkTextLineSegment#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6709 | && (segPtr->nextcxx . . $ _GtkTextLineSegment#next.->byte_countcxx . . $ _GtkTextLineSegment#byte_count. == 0) |
| 6710 | && (segPtr->nextcxx . . $ _GtkTextLineSegment#next.->typecxx . . $ _GtkTextLineSegment#type.->leftGravitycxx . . $ _GtkTextLineSegmentClass#leftGravity.)) |
| 6711 | { |
| 6712 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: wrong segment order for gravity"); |
| 6713 | } |
| 6714 | if ((segPtr->nextcxx . . $ _GtkTextLineSegment#next. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6715 | && (segPtr->typecxx . . $ _GtkTextLineSegment#type. != >k_text_char_typecxx . . $ gtk_text_char_type.)) |
| 6716 | { |
| 6717 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: line ended with wrong type"); |
| 6718 | } |
| 6719 | |
| 6720 | num_chars += segPtr->char_countcxx . . $ _GtkTextLineSegment#char_count.; |
| 6721 | } |
| 6722 | |
| 6723 | num_children++; |
| 6724 | num_lines++; |
| 6725 | } |
| 6726 | } |
| 6727 | else |
| 6728 | { |
| 6729 | for (childnode = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; childnode != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6730 | childnode = childnode->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 6731 | { |
| 6732 | if (childnode->parentcxx . . $ _GtkTextBTreeNode#parent. != node) |
| 6733 | { |
| 6734 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: GtkTextBTreeNode doesn't point to parent"); |
| 6735 | } |
| 6736 | if (childnode->levelcxx . . $ _GtkTextBTreeNode#level. != (node->levelcxx . . $ _GtkTextBTreeNode#level.-1)) |
| 6737 | { |
| 6738 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: level mismatch (%d %d)", |
| 6739 | node->level, childnode->level); |
| 6740 | } |
| 6741 | gtk_text_btree_node_check_consistencycxx . . $ gtk_text_btree_node_check_consistency(7e0fdd5226bb948b). (tree, childnode); |
| 6742 | for (summary = childnode->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6743 | summary = summary->nextcxx . . $ Summary#next.) |
| 6744 | { |
| 6745 | for (summary2 = node->summarycxx . . $ _GtkTextBTreeNode#summary.; ; |
| 6746 | summary2 = summary2->nextcxx . . $ Summary#next.) |
| 6747 | { |
| 6748 | if (summary2 == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6749 | { |
| 6750 | if (summary->infocxx . . $ Summary#info.->tag_rootcxx . . $ _GtkTextTagInfo#tag_root. == node) |
| 6751 | { |
| 6752 | break; |
| 6753 | } |
| 6754 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: GtkTextBTreeNode tag \"%s\" not %s", |
| 6755 | summary->info->tag->priv->name, |
| 6756 | "present in parent summaries"); |
| 6757 | } |
| 6758 | if (summary->infocxx . . $ Summary#info. == summary2->infocxx . . $ Summary#info.) |
| 6759 | { |
| 6760 | break; |
| 6761 | } |
| 6762 | } |
| 6763 | } |
| 6764 | num_children++; |
| 6765 | num_lines += childnode->num_linescxx . . $ _GtkTextBTreeNode#num_lines.; |
| 6766 | num_chars += childnode->num_charscxx . . $ _GtkTextBTreeNode#num_chars.; |
| 6767 | } |
| 6768 | } |
| 6769 | if (num_children != node->num_childrencxx . . $ _GtkTextBTreeNode#num_children.) |
| 6770 | { |
| 6771 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: mismatch in num_children (%d %d)", |
| 6772 | num_children, node->num_children); |
| 6773 | } |
| 6774 | if (num_lines != node->num_linescxx . . $ _GtkTextBTreeNode#num_lines.) |
| 6775 | { |
| 6776 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: mismatch in num_lines (%d %d)", |
| 6777 | num_lines, node->num_lines); |
| 6778 | } |
| 6779 | if (num_chars != node->num_charscxx . . $ _GtkTextBTreeNode#num_chars.) |
| 6780 | { |
| 6781 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: mismatch in num_chars (%d %d)", |
| 6782 | num_chars, node->num_chars); |
| 6783 | } |
| 6784 | |
| 6785 | for (summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6786 | summary = summary->nextcxx . . $ Summary#next.) |
| 6787 | { |
| 6788 | if (summary->infocxx . . $ Summary#info.->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. == summary->toggle_countcxx . . $ Summary#toggle_count.) |
| 6789 | { |
| 6790 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: found unpruned root for \"%s\"", |
| 6791 | summary->info->tag->priv->name); |
| 6792 | } |
| 6793 | toggle_count = 0; |
| 6794 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. == 0) |
| 6795 | { |
| 6796 | for (line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6797 | line = line->nextcxx . . $ _GtkTextLine#next.) |
| 6798 | { |
| 6799 | for (segPtr = line->segmentscxx . . $ _GtkTextLine#segments.; segPtr != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6800 | segPtr = segPtr->nextcxx . . $ _GtkTextLineSegment#next.) |
| 6801 | { |
| 6802 | if ((segPtr->typecxx . . $ _GtkTextLineSegment#type. != >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type.) |
| 6803 | && (segPtr->typecxx . . $ _GtkTextLineSegment#type. != >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.)) |
| 6804 | { |
| 6805 | continue; |
| 6806 | } |
| 6807 | if (segPtr->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info. == summary->infocxx . . $ Summary#info.) |
| 6808 | { |
| 6809 | if (!segPtr->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..inNodeCountscxx . . $ _GtkTextToggleBody#inNodeCounts.) |
| 6810 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("Toggle segment not in the node counts"); |
| 6811 | |
| 6812 | toggle_count ++; |
| 6813 | } |
| 6814 | } |
| 6815 | } |
| 6816 | } |
| 6817 | else |
| 6818 | { |
| 6819 | for (childnode = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 6820 | childnode != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6821 | childnode = childnode->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 6822 | { |
| 6823 | for (summary2 = childnode->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 6824 | summary2 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6825 | summary2 = summary2->nextcxx . . $ Summary#next.) |
| 6826 | { |
| 6827 | if (summary2->infocxx . . $ Summary#info. == summary->infocxx . . $ Summary#info.) |
| 6828 | { |
| 6829 | toggle_count += summary2->toggle_countcxx . . $ Summary#toggle_count.; |
| 6830 | } |
| 6831 | } |
| 6832 | } |
| 6833 | } |
| 6834 | if (toggle_count != summary->toggle_countcxx . . $ Summary#toggle_count.) |
| 6835 | { |
| 6836 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: mismatch in toggle_count (%d %d)", |
| 6837 | toggle_count, summary->toggle_count); |
| 6838 | } |
| 6839 | for (summary2 = summary->nextcxx . . $ Summary#next.; summary2 != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6840 | summary2 = summary2->nextcxx . . $ Summary#next.) |
| 6841 | { |
| 6842 | if (summary2->infocxx . . $ Summary#info. == summary->infocxx . . $ Summary#info.) |
| 6843 | { |
| 6844 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("gtk_text_btree_node_check_consistency: duplicated GtkTextBTreeNode tag: %s", |
| 6845 | summary->info->tag->priv->name); |
| 6846 | } |
| 6847 | } |
| 6848 | } |
| 6849 | } |
| 6850 | |
| 6851 | static void |
| 6852 | listify_foreachcxx . . $ listify_foreach(a306102e898f4f6a). (GtkTextTagcxx . . $ GtkTextTag# *tag, gpointercxx . . $ gpointer# user_data) |
| 6853 | { |
| 6854 | GSListcxx . . $ GSList#** listp = user_data; |
| 6855 | |
| 6856 | *listp = g_slist_prependcxx . . $ g_slist_prepend(6eb923d8c45a5456). (*listp, tag); |
| 6857 | } |
| 6858 | |
| 6859 | static GSListcxx . . $ GSList#* |
| 6860 | list_of_tagscxx . . $ list_of_tags(7142d1014c8752ac). (GtkTextTagTablecxx . . $ GtkTextTagTable# *table) |
| 6861 | { |
| 6862 | GSListcxx . . $ GSList# *list = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6863 | |
| 6864 | gtk_text_tag_table_foreachcxx . . $ gtk_text_tag_table_foreach(38f76c36fc3a9114). (table, listify_foreachcxx . . $ listify_foreach(a306102e898f4f6a)., &list); |
| 6865 | |
| 6866 | return list; |
| 6867 | } |
| 6868 | |
| 6869 | void |
| 6870 | _gtk_text_btree_checkcxx . . $ _gtk_text_btree_check(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 6871 | { |
| 6872 | Summarycxx . . $ Summary# *summary; |
| 6873 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node; |
| 6874 | GtkTextLinecxx . . $ GtkTextLine# *line; |
| 6875 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 6876 | GtkTextTagcxx . . $ GtkTextTag# *tag; |
| 6877 | GSListcxx . . $ GSList# *all_tags, *taglist = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6878 | int count; |
| 6879 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 6880 | |
| 6881 | /* |
| 6882 | * Make sure that the tag toggle counts and the tag root pointers are OK. |
| 6883 | */ |
| 6884 | all_tags = list_of_tagscxx . . $ list_of_tags(7142d1014c8752ac). (tree->tablecxx . . $ _GtkTextBTree#table.); |
| 6885 | for (taglist = all_tags; taglist != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! ; taglist = taglist->nextcxx . . $ _GSList#next.) |
| 6886 | { |
| 6887 | tag = taglist->datacxx . . $ _GSList#data.; |
| 6888 | info = gtk_text_btree_get_existing_tag_infocxx . . $ gtk_text_btree_get_existing_tag_info(dabcf248e7392eb5). (tree, tag); |
| 6889 | if (info != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6890 | { |
| 6891 | node = info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root.; |
| 6892 | if (node == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6893 | { |
| 6894 | if (info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. != 0) |
| 6895 | { |
| 6896 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check found \"%s\" with toggles (%d) but no root", |
| 6897 | tag->priv->name, info->toggle_count); |
| 6898 | } |
| 6899 | continue; /* no ranges for the tag */ |
| 6900 | } |
| 6901 | else if (info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. == 0) |
| 6902 | { |
| 6903 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check found root for \"%s\" with no toggles", |
| 6904 | tag->priv->name); |
| 6905 | } |
| 6906 | else if (info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count. & 1) |
| 6907 | { |
| 6908 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check found odd toggle count for \"%s\" (%d)", |
| 6909 | tag->priv->name, info->toggle_count); |
| 6910 | } |
| 6911 | for (summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6912 | summary = summary->nextcxx . . $ Summary#next.) |
| 6913 | { |
| 6914 | if (summary->infocxx . . $ Summary#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag) |
| 6915 | { |
| 6916 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check found root GtkTextBTreeNode with summary info"); |
| 6917 | } |
| 6918 | } |
| 6919 | count = 0; |
| 6920 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 6921 | { |
| 6922 | for (node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node. ; node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! ; |
| 6923 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.) |
| 6924 | { |
| 6925 | for (summary = node->summarycxx . . $ _GtkTextBTreeNode#summary.; summary != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6926 | summary = summary->nextcxx . . $ Summary#next.) |
| 6927 | { |
| 6928 | if (summary->infocxx . . $ Summary#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag) |
| 6929 | { |
| 6930 | count += summary->toggle_countcxx . . $ Summary#toggle_count.; |
| 6931 | } |
| 6932 | } |
| 6933 | } |
| 6934 | } |
| 6935 | else |
| 6936 | { |
| 6937 | const GtkTextLineSegmentClasscxx . . $ GtkTextLineSegmentClass# *last = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6938 | |
| 6939 | for (line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line. ; line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! ; |
| 6940 | line = line->nextcxx . . $ _GtkTextLine#next.) |
| 6941 | { |
| 6942 | for (seg = line->segmentscxx . . $ _GtkTextLine#segments.; seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 6943 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.) |
| 6944 | { |
| 6945 | if ((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type. || |
| 6946 | seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.) && |
| 6947 | seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag. == tag) |
| 6948 | { |
| 6949 | if (last == seg->typecxx . . $ _GtkTextLineSegment#type.) |
| 6950 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("Two consecutive toggles on or off weren't merged"); |
| 6951 | if (!seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..inNodeCountscxx . . $ _GtkTextToggleBody#inNodeCounts.) |
| 6952 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("Toggle segment not in the node counts"); |
| 6953 | |
| 6954 | last = seg->typecxx . . $ _GtkTextLineSegment#type.; |
| 6955 | |
| 6956 | count++; |
| 6957 | } |
| 6958 | } |
| 6959 | } |
| 6960 | } |
| 6961 | if (count != info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count.) |
| 6962 | { |
| 6963 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check toggle_count (%d) wrong for \"%s\" should be (%d)", |
| 6964 | info->toggle_count, tag->priv->name, count); |
| 6965 | } |
| 6966 | } |
| 6967 | } |
| 6968 | |
| 6969 | g_slist_freecxx . . $ g_slist_free(e7f64dba92841206). (all_tags); |
| 6970 | |
| 6971 | /* |
| 6972 | * Call a recursive procedure to do the main body of checks. |
| 6973 | */ |
| 6974 | |
| 6975 | node = tree->root_nodecxx . . $ _GtkTextBTree#root_node.; |
| 6976 | gtk_text_btree_node_check_consistencycxx . . $ gtk_text_btree_node_check_consistency(7e0fdd5226bb948b). (tree, tree->root_nodecxx . . $ _GtkTextBTree#root_node.); |
| 6977 | |
| 6978 | /* |
| 6979 | * Make sure that there are at least two lines in the text and |
| 6980 | * that the last line has no characters except a newline. |
| 6981 | */ |
| 6982 | |
| 6983 | if (node->num_linescxx . . $ _GtkTextBTreeNode#num_lines. < 2) |
| 6984 | { |
| 6985 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check: less than 2 lines in tree"); |
| 6986 | } |
| 6987 | if (node->num_charscxx . . $ _GtkTextBTreeNode#num_chars. < 2) |
| 6988 | { |
| 6989 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check: less than 2 chars in tree"); |
| 6990 | } |
| 6991 | while (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 6992 | { |
| 6993 | node = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 6994 | while (node->nextcxx . . $ _GtkTextBTreeNode#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 6995 | { |
| 6996 | node = node->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 6997 | } |
| 6998 | } |
| 6999 | line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 7000 | while (line->nextcxx . . $ _GtkTextLine#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7001 | { |
| 7002 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 7003 | } |
| 7004 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 7005 | while ((seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.) |
| 7006 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_right_mark_typecxx . . $ gtk_text_right_mark_type.) |
| 7007 | || (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_left_mark_typecxx . . $ gtk_text_left_mark_type.)) |
| 7008 | { |
| 7009 | /* |
| 7010 | * It’s OK to toggle a tag off in the last line, but |
| 7011 | * not to start a new range. It’s also OK to have marks |
| 7012 | * in the last line. |
| 7013 | */ |
| 7014 | |
| 7015 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 7016 | } |
| 7017 | if (seg->typecxx . . $ _GtkTextLineSegment#type. != >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 7018 | { |
| 7019 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check: last line has bogus segment type"); |
| 7020 | } |
| 7021 | if (seg->nextcxx . . $ _GtkTextLineSegment#next. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7022 | { |
| 7023 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check: last line has too many segments"); |
| 7024 | } |
| 7025 | if (seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count. != 1) |
| 7026 | { |
| 7027 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check: last line has wrong # characters: %d", |
| 7028 | seg->byte_count); |
| 7029 | } |
| 7030 | if ((seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars.[0] != '\n') || (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars.[1] != 0)) |
| 7031 | { |
| 7032 | g_errorcxx . . $ `<external>/5169755362661750954/gmessages.h:328:9`! ("_gtk_text_btree_check: last line had bad value: %s", |
| 7033 | seg->body.chars); |
| 7034 | } |
| 7035 | } |
| 7036 | |
| 7037 | void _gtk_text_btree_spew_linecxx . . $ _gtk_text_btree_spew_line(1061b1d198db82df). (GtkTextBTreecxx . . $ GtkTextBTree#* tree, GtkTextLinecxx . . $ GtkTextLine#* line); |
| 7038 | void _gtk_text_btree_spew_segmentcxx . . $ _gtk_text_btree_spew_segment(9c843d7c209b8602). (GtkTextBTreecxx . . $ GtkTextBTree#* tree, GtkTextLineSegmentcxx . . $ GtkTextLineSegment#* seg); |
| 7039 | void _gtk_text_btree_spew_nodecxx . . $ _gtk_text_btree_spew_node(5ae53e38492729fa). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, int indent); |
| 7040 | void _gtk_text_btree_spew_line_shortcxx . . $ _gtk_text_btree_spew_line_short(c4c91213186b3c8a). (GtkTextLinecxx . . $ GtkTextLine# *line, int indent); |
| 7041 | |
| 7042 | void |
| 7043 | _gtk_text_btree_spewcxx . . $ _gtk_text_btree_spew(1eb40b89a5a0e9e5). (GtkTextBTreecxx . . $ GtkTextBTree# *tree) |
| 7044 | { |
| 7045 | GtkTextLinecxx . . $ GtkTextLine# * line; |
| 7046 | int real_line; |
| 7047 | |
| 7048 | printfcxx . . $ printf(581fddd72a8db8fc). ("%d lines in tree %p\n", |
| 7049 | _gtk_text_btree_line_countcxx . . $ _gtk_text_btree_line_count(8affb14981d0feb). (tree), tree); |
| 7050 | |
| 7051 | line = _gtk_text_btree_get_linecxx . . $ _gtk_text_btree_get_line(57cf43dcab45dd23). (tree, 0, &real_line); |
| 7052 | |
| 7053 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7054 | { |
| 7055 | _gtk_text_btree_spew_linecxx . . $ _gtk_text_btree_spew_line(1061b1d198db82df). (tree, line); |
| 7056 | line = _gtk_text_line_nextcxx . . $ _gtk_text_line_next(cf600876af6c7fcb). (line); |
| 7057 | } |
| 7058 | |
| 7059 | printfcxx . . $ printf(581fddd72a8db8fc). ("=================== Tag information\n"); |
| 7060 | |
| 7061 | { |
| 7062 | GSListcxx . . $ GSList# * list; |
| 7063 | |
| 7064 | list = tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos.; |
| 7065 | |
| 7066 | while (list != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7067 | { |
| 7068 | GtkTextTagInfocxx . . $ GtkTextTagInfo# *info; |
| 7069 | |
| 7070 | info = list->datacxx . . $ _GSList#data.; |
| 7071 | |
| 7072 | printfcxx . . $ printf(581fddd72a8db8fc). (" tag '%s': root at %p, toggle count %d\n", |
| 7073 | info->tagcxx . . $ _GtkTextTagInfo#tag.->privcxx . . $ _GtkTextTag#priv.->namecxx . . $ _GtkTextTagPrivate#name., info->tag_rootcxx . . $ _GtkTextTagInfo#tag_root., info->toggle_countcxx . . $ _GtkTextTagInfo#toggle_count.); |
| 7074 | |
| 7075 | list = list->nextcxx . . $ _GSList#next.; |
| 7076 | } |
| 7077 | |
| 7078 | if (tree->tag_infoscxx . . $ _GtkTextBTree#tag_infos. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7079 | { |
| 7080 | printfcxx . . $ printf(581fddd72a8db8fc). (" (no tags in the tree)\n"); |
| 7081 | } |
| 7082 | } |
| 7083 | |
| 7084 | printfcxx . . $ printf(581fddd72a8db8fc). ("=================== Tree nodes\n"); |
| 7085 | |
| 7086 | { |
| 7087 | _gtk_text_btree_spew_nodecxx . . $ _gtk_text_btree_spew_node(5ae53e38492729fa). (tree->root_nodecxx . . $ _GtkTextBTree#root_node., 0); |
| 7088 | } |
| 7089 | } |
| 7090 | |
| 7091 | void |
| 7092 | _gtk_text_btree_spew_line_shortcxx . . $ _gtk_text_btree_spew_line_short(c4c91213186b3c8a). (GtkTextLinecxx . . $ GtkTextLine# *line, int indent) |
| 7093 | { |
| 7094 | char * spaces; |
| 7095 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# *seg; |
| 7096 | |
| 7097 | spaces = g_strnfillcxx . . $ g_strnfill(5024df1adc957383). (indent, ' '); |
| 7098 | |
| 7099 | printfcxx . . $ printf(581fddd72a8db8fc). ("%sline %p chars %d bytes %d\n", |
| 7100 | spaces, line, |
| 7101 | _gtk_text_line_char_countcxx . . $ _gtk_text_line_char_count(d56862f6b53e2224). (line), |
| 7102 | _gtk_text_line_byte_countcxx . . $ _gtk_text_line_byte_count(d56862f6b53e2224). (line)); |
| 7103 | |
| 7104 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 7105 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7106 | { |
| 7107 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 7108 | { |
| 7109 | char * str = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars., MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (seg->byte_count, 10)); |
| 7110 | char * s; |
| 7111 | s = str; |
| 7112 | while (*s) |
| 7113 | { |
| 7114 | if (*s == '\n' || *s == '\r') |
| 7115 | *s = '\\'; |
| 7116 | ++s; |
| 7117 | } |
| 7118 | printfcxx . . $ printf(581fddd72a8db8fc). ("%s chars '%s'...\n", spaces, str); |
| 7119 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 7120 | } |
| 7121 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_child_typecxx . . $ gtk_text_child_type.) |
| 7122 | { |
| 7123 | char *str = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (gtk_text_child_anchor_get_replacementcxx . . $ gtk_text_child_anchor_get_replacement(e0251fe23e9ffed4). (seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..objcxx . . $ _GtkTextChildBody#obj.), seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.); |
| 7124 | printfcxx . . $ printf(581fddd72a8db8fc). ("%s child '%s'...\n", spaces, str); |
| 7125 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 7126 | } |
| 7127 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_right_mark_typecxx . . $ gtk_text_right_mark_type.) |
| 7128 | { |
| 7129 | printfcxx . . $ printf(581fddd72a8db8fc). ("%s right mark '%s' visible: %d\n", |
| 7130 | spaces, |
| 7131 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name., |
| 7132 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible.); |
| 7133 | } |
| 7134 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_left_mark_typecxx . . $ gtk_text_left_mark_type.) |
| 7135 | { |
| 7136 | printfcxx . . $ printf(581fddd72a8db8fc). ("%s left mark '%s' visible: %d\n", |
| 7137 | spaces, |
| 7138 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name., |
| 7139 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible.); |
| 7140 | } |
| 7141 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type. || |
| 7142 | seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.) |
| 7143 | { |
| 7144 | printfcxx . . $ printf(581fddd72a8db8fc). ("%s tag '%s' %s\n", |
| 7145 | spaces, seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag.->privcxx . . $ _GtkTextTag#priv.->namecxx . . $ _GtkTextTagPrivate#name., |
| 7146 | seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type. ? "off" : "on"); |
| 7147 | } |
| 7148 | |
| 7149 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 7150 | } |
| 7151 | |
| 7152 | g_freecxx . . $ g_free(5d22bdacc48458e8). (spaces); |
| 7153 | } |
| 7154 | |
| 7155 | void |
| 7156 | _gtk_text_btree_spew_nodecxx . . $ _gtk_text_btree_spew_node(5ae53e38492729fa). (GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *node, int indent) |
| 7157 | { |
| 7158 | char * spaces; |
| 7159 | GtkTextBTreeNodecxx . . $ GtkTextBTreeNode# *iter; |
| 7160 | Summarycxx . . $ Summary# *s; |
| 7161 | |
| 7162 | spaces = g_strnfillcxx . . $ g_strnfill(5024df1adc957383). (indent, ' '); |
| 7163 | |
| 7164 | printfcxx . . $ printf(581fddd72a8db8fc). ("%snode %p level %d children %d lines %d chars %d\n", |
| 7165 | spaces, node, node->levelcxx . . $ _GtkTextBTreeNode#level., |
| 7166 | node->num_childrencxx . . $ _GtkTextBTreeNode#num_children., node->num_linescxx . . $ _GtkTextBTreeNode#num_lines., node->num_charscxx . . $ _GtkTextBTreeNode#num_chars.); |
| 7167 | |
| 7168 | s = node->summarycxx . . $ _GtkTextBTreeNode#summary.; |
| 7169 | while (s) |
| 7170 | { |
| 7171 | printfcxx . . $ printf(581fddd72a8db8fc). ("%s %d toggles of '%s' below this node\n", |
| 7172 | spaces, s->toggle_countcxx . . $ Summary#toggle_count., s->infocxx . . $ Summary#info.->tagcxx . . $ _GtkTextTagInfo#tag.->privcxx . . $ _GtkTextTag#priv.->namecxx . . $ _GtkTextTagPrivate#name.); |
| 7173 | s = s->nextcxx . . $ Summary#next.; |
| 7174 | } |
| 7175 | |
| 7176 | g_freecxx . . $ g_free(5d22bdacc48458e8). (spaces); |
| 7177 | |
| 7178 | if (node->levelcxx . . $ _GtkTextBTreeNode#level. > 0) |
| 7179 | { |
| 7180 | iter = node->childrencxx . . $ _GtkTextBTreeNode#children..nodecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#node.; |
| 7181 | while (iter != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7182 | { |
| 7183 | _gtk_text_btree_spew_nodecxx . . $ _gtk_text_btree_spew_node(5ae53e38492729fa). (iter, indent + 2); |
| 7184 | |
| 7185 | iter = iter->nextcxx . . $ _GtkTextBTreeNode#next.; |
| 7186 | } |
| 7187 | } |
| 7188 | else |
| 7189 | { |
| 7190 | GtkTextLinecxx . . $ GtkTextLine# *line = node->childrencxx . . $ _GtkTextBTreeNode#children..linecxx . . $ _GtkTextBTreeNode#$anonymous_type_0#line.; |
| 7191 | while (line != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7192 | { |
| 7193 | _gtk_text_btree_spew_line_shortcxx . . $ _gtk_text_btree_spew_line_short(c4c91213186b3c8a). (line, indent + 2); |
| 7194 | |
| 7195 | line = line->nextcxx . . $ _GtkTextLine#next.; |
| 7196 | } |
| 7197 | } |
| 7198 | } |
| 7199 | |
| 7200 | void |
| 7201 | _gtk_text_btree_spew_linecxx . . $ _gtk_text_btree_spew_line(1061b1d198db82df). (GtkTextBTreecxx . . $ GtkTextBTree#* tree, GtkTextLinecxx . . $ GtkTextLine#* line) |
| 7202 | { |
| 7203 | GtkTextLineSegmentcxx . . $ GtkTextLineSegment# * seg; |
| 7204 | |
| 7205 | printfcxx . . $ printf(581fddd72a8db8fc). ("%4d| line: %p parent: %p next: %p\n", |
| 7206 | _gtk_text_line_get_numbercxx . . $ _gtk_text_line_get_number(d56862f6b53e2224). (line), line, line->parentcxx . . $ _GtkTextLine#parent., line->nextcxx . . $ _GtkTextLine#next.); |
| 7207 | |
| 7208 | seg = line->segmentscxx . . $ _GtkTextLine#segments.; |
| 7209 | |
| 7210 | while (seg != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 7211 | { |
| 7212 | _gtk_text_btree_spew_segmentcxx . . $ _gtk_text_btree_spew_segment(9c843d7c209b8602). (tree, seg); |
| 7213 | seg = seg->nextcxx . . $ _GtkTextLineSegment#next.; |
| 7214 | } |
| 7215 | } |
| 7216 | |
| 7217 | void |
| 7218 | _gtk_text_btree_spew_segmentcxx . . $ _gtk_text_btree_spew_segment(9c843d7c209b8602). (GtkTextBTreecxx . . $ GtkTextBTree#* tree, GtkTextLineSegmentcxx . . $ GtkTextLineSegment# * seg) |
| 7219 | { |
| 7220 | printfcxx . . $ printf(581fddd72a8db8fc). (" segment: %p type: %s bytes: %d chars: %d\n", |
| 7221 | seg, seg->typecxx . . $ _GtkTextLineSegment#type.->namecxx . . $ _GtkTextLineSegmentClass#name., seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count., seg->char_countcxx . . $ _GtkTextLineSegment#char_count.); |
| 7222 | |
| 7223 | if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_char_typecxx . . $ gtk_text_char_type.) |
| 7224 | { |
| 7225 | char * str = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (seg->bodycxx . . $ _GtkTextLineSegment#body..charscxx . . $ _GtkTextLineSegment#$anonymous_type_0#chars., seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.); |
| 7226 | printfcxx . . $ printf(581fddd72a8db8fc). (" '%s'\n", str); |
| 7227 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 7228 | } |
| 7229 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_child_typecxx . . $ gtk_text_child_type.) |
| 7230 | { |
| 7231 | char *str = g_strndupcxx . . $ g_strndup(eabdfdef77619b3d). (gtk_text_child_anchor_get_replacementcxx . . $ gtk_text_child_anchor_get_replacement(e0251fe23e9ffed4). (seg->bodycxx . . $ _GtkTextLineSegment#body..childcxx . . $ _GtkTextLineSegment#$anonymous_type_0#child..objcxx . . $ _GtkTextChildBody#obj.), seg->byte_countcxx . . $ _GtkTextLineSegment#byte_count.); |
| 7232 | printfcxx . . $ printf(581fddd72a8db8fc). (" '%s'\n", str); |
| 7233 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 7234 | } |
| 7235 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_right_mark_typecxx . . $ gtk_text_right_mark_type.) |
| 7236 | { |
| 7237 | printfcxx . . $ printf(581fddd72a8db8fc). (" right mark '%s' visible: %d not_deleteable: %d\n", |
| 7238 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name., |
| 7239 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible., |
| 7240 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..not_deleteablecxx . . $ _GtkTextMarkBody#not_deleteable.); |
| 7241 | } |
| 7242 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_left_mark_typecxx . . $ gtk_text_left_mark_type.) |
| 7243 | { |
| 7244 | printfcxx . . $ printf(581fddd72a8db8fc). (" left mark '%s' visible: %d not_deleteable: %d\n", |
| 7245 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..namecxx . . $ _GtkTextMarkBody#name., |
| 7246 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..visiblecxx . . $ _GtkTextMarkBody#visible., |
| 7247 | seg->bodycxx . . $ _GtkTextLineSegment#body..markcxx . . $ _GtkTextLineSegment#$anonymous_type_0#mark..not_deleteablecxx . . $ _GtkTextMarkBody#not_deleteable.); |
| 7248 | } |
| 7249 | else if (seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_on_typecxx . . $ gtk_text_toggle_on_type. || |
| 7250 | seg->typecxx . . $ _GtkTextLineSegment#type. == >k_text_toggle_off_typecxx . . $ gtk_text_toggle_off_type.) |
| 7251 | { |
| 7252 | printfcxx . . $ printf(581fddd72a8db8fc). (" tag '%s' priority %d\n", |
| 7253 | seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag.->privcxx . . $ _GtkTextTag#priv.->namecxx . . $ _GtkTextTagPrivate#name., |
| 7254 | seg->bodycxx . . $ _GtkTextLineSegment#body..togglecxx . . $ _GtkTextLineSegment#$anonymous_type_0#toggle..infocxx . . $ _GtkTextToggleBody#info.->tagcxx . . $ _GtkTextTagInfo#tag.->privcxx . . $ _GtkTextTag#priv.->prioritycxx . . $ _GtkTextTagPrivate#priority.); |
| 7255 | } |
| 7256 | } |