/src/wrappers/gtk/library/gtk_text_iter.e
Specman e | 1614 lines | 835 code | 253 blank | 526 comment | 19 complexity | d00fda745daa79704a9689ba9edf16be MD5 | raw file
Large files files are truncated, but you can click here to view the full file
1indexing 2 description: "GtkTextIter -- Text buffer iterator." 3 copyright: "[ 4 Copyright (C) 2006 eiffel-libraries team, GTK+ team 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 gtk_documentation: "[ 22 You may wish to begin by reading the text widget conceptual 23 overview which gives an overview of all the objects and data 24 types related to the text widget and how they work together. 25 ]" 26 27class GTK_TEXT_ITER 28 29inherit 30 C_STRUCT 31 -- Note: This class isn't really shared, but we need to make it 32 -- conform to SHARED_C_STRUCT to be able to create G_SLISTs with 33 -- it. It should be expanded, if Smarteiffel implements 34 -- disposing expanded objects. 35 redefine 36 allocate, copy, is_equal 37 end 38 COMPARABLE 39 redefine 40 copy, is_equal, -- infix "<", 41 infix "<=", infix ">", infix ">=", in_range, compare, three_way_comparison 42 end 43 44insert 45 GTK 46 GTK_TEXT_SEARCH_FLAGS 47 48creation make, from_external_pointer, copy, from_external_copy 49 50feature {} -- Creation 51 make is 52 require gtk_initialized: gtk.is_initialized 53 do 54 allocate 55 end 56 57feature {} -- Allocating 58 allocate is 59 require 60 handle.is_null 61 do 62 -- The semantic of an GTK_TEXT_ITER is akin to an expanded 63 -- object as they are usually allocated on the stack as 64 -- locally declared variables. So they usually rely on the 65 -- automatic memory handling of the stack. 66 67 -- In our case there is no need to allocate a dummy object and then copy it. 68 handle := calloc (1, struct_size) 69 70 -- Different versions of GTK wrap either g_free or g_slice_free in gtk_text_iter_free. 71 -- Also, there is no malloc-like function in GTK to allocate iterators. 72 -- Therefore, we allocate iterators using gtk_text_iter_copy() 73 -- handle := gtk_text_iter_copy (dummy_iter) 74 75 if handle.is_null then 76 raise_exception (No_more_memory) 77 end 78 end 79 80feature {} -- Disposing 81 82 dispose is 83 -- Free an iterator allocated on the heap. This function is 84 -- intended for use in language bindings, and is not 85 -- especially useful for applications, because iterators can 86 -- simply be allocated on the stack. 87 do 88 -- There's an invariant that provides handle.is_not_null, but C_STRUCT 89 -- calls dispose from within the constructor from_external_copy, which 90 -- is certain to reach this code with a Void handle. Nothing breaks 91 -- if you call gtk_text_iter_free here, but noisy Gtk warnings would 92 -- ensue. 93 if handle.is_not_null then free (handle) end 94 handle := default_pointer 95 end 96 97feature 98 99 buffer: GTK_TEXT_BUFFER is 100 -- the GtkTextBuffer this iterator is associated with. 101 local factory: G_OBJECT_EXPANDED_FACTORY[GTK_TEXT_BUFFER]; buffer_ptr: POINTER 102 do 103 Result := factory.wrapper (gtk_text_iter_get_buffer (handle)) 104 end 105 106 copy (another: like Current) is 107 -- Copy `another' into Current. A new dynamically-allocated 108 -- copy of the underlying iterator is made. 109 require else 110 another /= Void 111 do 112 -- Using `gtk_text_iter_copy', a function used by language 113 -- bindings. It is not useful in applications, because 114 -- iterators can be copied with a simple assignment 115 -- (GtkTextIter i=j;). 116 117 if handle.is_not_null then dispose end -- Frees any previously used resource 118 handle := gtk_text_iter_copy (another.handle) 119 if handle.is_null then 120 raise_exception (No_more_memory) 121 end 122 end 123 124 offset: INTEGER is 125 -- the character offset of an iterator. Each character in a 126 -- GtkTextBuffer has an offset, starting with 0 for the first 127 -- character in the buffer. Use `iter_at_offset' to convert 128 -- an offset back into an iterator. 129 do 130 Result := gtk_text_iter_get_offset (handle) 131 end 132 133 line: INTEGER is 134 -- the line number containing the iterator. Lines in a 135 -- GtkTextBuffer are numbered beginning with 0 for the first 136 -- line in the buffer. 137 do 138 Result := gtk_text_iter_get_line (handle) 139 end 140 141 line_offset: INTEGER is 142 -- the character offset of the iterator, counting from the 143 -- start of a newline-terminated line. The first character on 144 -- the line has offset 0. 145 do 146 Result := gtk_text_iter_get_line_offset (handle) 147 end 148 149 line_index: INTEGER is 150 -- The byte index of the iterator, counting from the start of 151 -- a newline-terminated line. Remember that GtkTextBuffer 152 -- encodes text in UTF-8, and that characters can require a 153 -- variable number of bytes to represent. 154 do 155 Result := gtk_text_iter_get_line_index (handle) 156 end 157 158 visible_line_index: INTEGER is 159 -- the number of bytes from the start of the line to the 160 -- given iter, not counting bytes that are invisible due to 161 -- tags with the "invisible" flag toggled on. 162 do 163 Result := gtk_text_iter_get_visible_line_index (handle) 164 end 165 166 visible_line_offset: INTEGER is 167 -- the offset in characters from the start of the line to the 168 -- given iter, not counting characters that are invisible due 169 -- to tags with the "invisible" flag toggled on. 170 do 171 Result:=gtk_text_iter_get_visible_line_offset(handle) 172 end 173 174 char: INTEGER is 175 -- the Unicode character at this iterator. If the element at 176 -- this iterator is a non-character element, such as an image 177 -- embedded in the buffer, the Unicode "unknown" character 178 -- 0xFFFC is returned. If invoked on the end iterator, zero 179 -- is returned; zero is not a valid Unicode character. So you 180 -- can write a loop which ends when `char' is 0. 181 do 182 Result := gtk_text_iter_get_char (handle) 183 end 184 185 slice (an_end: GTK_TREE_ITER): STRING is 186 -- the text from current to `an_end'. A "slice" is an array 187 -- of characters encoded in UTF-8 format, including the 188 -- Unicode "unknown" character 0xFFFC for iterable 189 -- non-character elements in the buffer, such as 190 -- images. Because images are encoded in the slice, byte and 191 -- character offsets in the returned array will correspond to 192 -- byte offsets in the text buffer. Note that 0xFFFC can 193 -- occur in normal text as well, so it is not a reliable 194 -- indicator that a pixbuf or widget is in the buffer. 195 obsolete "this is wrong! should be UNICODE_STRING!" 196 require valid_end: an_end /= Void 197 do 198 create Result.from_external_copy (gtk_text_iter_get_slice (handle, 199 an_end.handle)) 200 end 201 202 text (an_end: GTK_TREE_ITER): STRING is 203 -- text from Current to `an_end'. If the range contains 204 -- non-text elements such as images, the character and byte 205 -- offsets in the returned string will not correspond to 206 -- character and byte offsets in the buffer. If you want 207 -- offsets to correspond, see `slice'. 208 obsolete "this is wrong! should be UNICODE_STRING!" 209 require valid_end: an_end /= Void 210 do 211 create Result.from_external_copy(gtk_text_iter_get_text(handle, 212 an_end.handle)) 213 end 214 215 visible_slice (an_end: GTK_TEXT_ITER): STRING is 216 -- Like `slice', but invisible text is not 217 -- included. Invisible text is usually invisible because a 218 -- GtkTextTag with the "invisible" attribute turned on has 219 -- been applied to it. 220 require valid_end: an_end /= Void 221 do 222 create Result.from_external_copy (gtk_text_iter_get_visible_slice (handle, 223 an_end.handle)) 224 end 225 226 visible_text (an_end: GTK_TEXT_ITER): STRING is 227 -- Like `text', but invisible text is not included. Invisible 228 -- text is usually invisible because a GtkTextTag with the 229 -- "invisible" attribute turned on has been applied to it. 230 require valid_end: an_end /= Void 231 do 232 create Result.from_external_copy (gtk_text_iter_get_visible_text (handle, an_end.handle)) 233 end 234 235 pixbuf: GDK_PIXBUF is 236 -- The pixbuf at Current iter position, if any. Otherwise Void 237 local retriever: G_OBJECT_EXPANDED_FACTORY [GDK_PIXBUF] 238 do 239 Result := retriever.wrapper (gtk_text_iter_get_pixbuf (handle)) 240 end 241 242 marks: G_SLIST [GTK_TEXT_MARK] is 243 -- All the GTK_TEXT_MARK at Current location. Because marks 244 -- are not iterable (they don't take up any "space" in the 245 -- buffer, they are just marks in between iterable 246 -- locations), multiple marks can exist in the same 247 -- place. The list is not in any meaningful order. 248 do 249 create {G_OBJECT_SLIST [GTK_TEXT_MARK]} Result.from_external_pointer (gtk_text_iter_get_marks(handle)) 250 ensure result_not_void: Result /= Void 251 end 252 253 toggled_tags (toggled_on: BOOLEAN): G_SLIST [GTK_TEXT_TAG] is 254 -- The GTK_TEXT_TAGs that are toggled on or off at this 255 -- point. (If toggled_on is TRUE, the list contains tags that 256 -- are toggled on.) If a tag is toggled on at iter, then some 257 -- non-empty range of characters following iter has that tag 258 -- applied to it. If a tag is toggled off, then some 259 -- non-empty range following iter does not have the tag 260 -- applied to it. 261 do 262 create {G_OBJECT_SLIST [GTK_TEXT_TAG]} Result.from_external_pointer 263 (gtk_text_iter_get_toggled_tags (handle, toggled_on.to_integer)) 264 end 265 266 child_anchor: GTK_TEXT_CHILD_ANCHOR is 267 -- The anchor (with no new reference count added) at 268 -- Current's location, if it exists . Void otherwise. 269 local ptr: POINTER 270 do 271 ptr := gtk_text_iter_get_child_anchor (handle) 272 if ptr.is_not_null then create Result.from_external_pointer (ptr) end 273 end 274 275 tag_begins (a_tag: GTK_TEXT_TAG): BOOLEAN is 276 -- Is `a_tag' is toggled on at exactly this point? If `a_tag' 277 -- is Void, returns TRUE if any tag is toggled on at this 278 -- point. Note that this feature is True if iter is the start 279 -- of the tagged range; `has_tag' tells you whether an 280 -- iterator is within a tagged range. 281 do 282 Result := gtk_text_iter_begins_tag (handle, a_tag.handle).to_boolean 283 end 284 285 tag_ends (a_tag: GTK_TEXT_TAG): BOOLEAN is 286 -- Is `a_tag' toggled off at exactly this point? Note that 287 -- the `tag_ends' returns True if iter is the end of the 288 -- tagged range; `has_tag' tells you whether an iterator is 289 -- within a tagged range. 290 require tag_not_void: a_tag /= Void 291 do 292 Result := (gtk_text_iter_ends_tag(handle, a_tag.handle).to_boolean) 293 end 294 295 is_any_tag_toggled: BOOLEAN is 296 -- Is if any tag toggled off at this point? 297 do 298 Result := (gtk_text_iter_ends_tag(handle, default_pointer).to_boolean) 299 end 300 301 toggles_tag (a_tag: GTK_TEXT_TAG): BOOLEAN is 302 -- Is `a_tag' toggled on or off at Current iterator? This is 303 -- equivalent to (tag_begins or tag_ends), i.e. it tells you 304 -- whether a range with tag applied to it begins or ends at 305 -- iter. 306 307 -- TODO: the C implementation allow a NULL tag. Check if it 308 -- means "toggles_any_tag"? 309 local tp: POINTER 310 do 311 if a_tag/=Void then tp:=a_tag.handle end 312 Result:=(gtk_text_iter_toggles_tag(handle, a_tag.handle).to_boolean) 313 end 314 315 has_tag (a_tag: GTK_TEXT_TAG): BOOLEAN is 316 -- Is Current iterator within a range tagged with `a_tag'? 317 require tag_not_void: a_tag /= Void 318 do 319 Result := gtk_text_iter_has_tag(handle,a_tag.handle).to_boolean 320 end 321 322 tags: G_SLIST [GTK_TEXT_TAG] is 323 -- a list of tags that apply to iter, in ascending order of 324 -- priority (highest-priority tags are last). 325 326 -- TODO: Gtk docs says" The GtkTextTag in the list don't have 327 -- a reference added, but you have to free the list 328 -- itself". Check if this should be translated into a 329 -- particular Eiffel implementation 330 do 331 create {G_OBJECT_SLIST [GTK_TEXT_TAG]} Result.from_external_pointer (gtk_text_iter_get_tags (handle)) 332 end 333 334 is_editable (a_default_setting: BOOLEAN): BOOLEAN is 335 -- Is the character at iter within an editable region of 336 -- text? Non-editable text is "locked" and can't be changed 337 -- by the user via GtkTextView. This feature is simply a 338 -- convenience wrapper around `attributes' 339 -- gtk_text_iter_get_attributes(). If no tags applied to this 340 -- text affect editability, default_setting will be returned. 341 342 -- You don't want to use this function to decide whether text 343 -- can be inserted at iter, because for insertion you don't 344 -- want to know whether the char at iter is inside an 345 -- editable range, you want to know whether a new character 346 -- inserted at iter would be inside an editable range. Use 347 -- `can_insert'to handle this case. 348 349 -- Set `a_default_setting' to True if text is editable by 350 -- default. 351 352 -- TODO: original C documentation pretty unclear. 353 do 354 Result:= gtk_text_iter_editable (handle, a_default_setting.to_integer).to_boolean 355 end 356 357 can_insert (a_default_editability: BOOLEAN): BOOLEAN is 358 -- Would the text inserted at Current iter be editable? 359 -- Considering the default editability of the buffer, and 360 -- tags that affect editability, determines whether text 361 -- inserted at iter would be editable. If text inserted at 362 -- iter would be editable then the user should be allowed to 363 -- insert text at iter. GTK_TEXT_BUFFER's 364 -- `insert_interactive' uses this function to decide whether 365 -- insertions are allowed at a given position. 366 367 -- Set `a_default_editability' to True if text is editable by 368 -- default. 369 do 370 Result:=gtk_text_iter_can_insert(handle, a_default_editability.to_integer).to_boolean 371 end 372 373 starts_word: BOOLEAN is 374 -- Is Current iter at the start of a (natural-language) word? 375 -- Word breaks are determined by Pango and should be correct 376 -- for nearly any language (if not, the correct fix would be 377 -- to the Pango word break algorithms). 378 do 379 Result:=gtk_text_iter_starts_word(handle).to_boolean 380 end 381 382 ends_word: BOOLEAN is 383 -- Is Current iter is at the end of a (natural-language) 384 -- word? Word breaks are determined by Pango and should be 385 -- correct for nearly any language (if not, the correct fix 386 -- would be to the Pango word break algorithms). 387 do 388 Result:=gtk_text_iter_ends_word(handle).to_boolean 389 end 390 391 inside_word: BOOLEAN is 392 -- Is Current iter inside a (natural-language) word? This is 393 -- the opposite of "inside some whitespace". Word breaks are 394 -- determined by Pango and should be correct for nearly any 395 -- language (if not, the correct fix would be to the Pango 396 -- word break algorithms). 397 do 398 Result:=gtk_text_iter_inside_word(handle).to_boolean 399 end 400 401 starts_line: BOOLEAN is 402 -- Does Current iter begin a paragraph? If True `line_offset' 403 -- would be 0. However this function is potentially more 404 -- efficient than `line_offset' because it doesn't have to 405 -- compute the offset, it just has to see whether it's 0. 406 do 407 Result:=gtk_text_iter_starts_line(handle).to_boolean 408 end 409 410 ends_line: BOOLEAN is 411 -- Does iter point to the start of the paragraph delimiter 412 -- characters for a line? Delimiters will be either a 413 -- newline, a carriage return, a carriage return followed by 414 -- a newline, or a Unicode paragraph separator 415 -- character. Note that an iterator pointing to the \n ("%N") 416 -- of a \r\n ("%R%N") pair will not be counted as the end of 417 -- a line, the line ends before the \r ("%N"). The end 418 -- iterator is considered to be at the end of a line, even 419 -- though there are no paragraph delimiter chars there. 420 do 421 Result:=gtk_text_iter_ends_line(handle).to_boolean 422 end 423 424 starts_sentence: BOOLEAN is 425 -- Does Current iter begin a sentence? Sentence boundaries 426 -- are determined by Pango and should be correct for nearly 427 -- any language (if not, the correct fix would be to the 428 -- Pango text boundary algorithms). 429 do 430 Result:= gtk_text_iter_starts_sentence (handle).to_boolean 431 end 432 433 ends_sentence: BOOLEAN is 434 -- Does Curret iter end a sentence? Sentence boundaries are 435 -- determined by Pango and should be correct for nearly any 436 -- language (if not, the correct fix would be to the Pango 437 -- text boundary algorithms). 438 do 439 Result:=gtk_text_iter_ends_sentence (handle).to_boolean 440 end 441 442 is_inside_sentence: BOOLEAN is 443 -- Is Current iter inside a sentence? This is the opposite of 444 -- in between two sentences, e.g. after a period and before 445 -- the first letter of the next sentence. Sentence boundaries 446 -- are determined by Pango and should be correct for nearly 447 -- any language (if not, the correct fix would be to the 448 -- Pango text boundary algorithms). 449 do 450 Result := gtk_text_iter_inside_sentence (handle).to_boolean 451 end 452 453 is_cursor_position: BOOLEAN is 454 -- Can the cursor be placed at Current iter? See 455 -- `forward_cursor_position' or PangoLogAttr or pango_break() 456 -- for details on what a cursor position is. 457 do 458 Result:=gtk_text_iter_is_cursor_position(handle).to_boolean 459 end 460 461 chars_in_line: INTEGER is 462 -- the number of characters in the line containing iter, 463 -- including the paragraph delimiters. 464 do 465 Result:=gtk_text_iter_get_chars_in_line (handle) 466 end 467 468 bytes_inline: INTEGER is 469 -- the number of bytes in the line containing iter, including 470 -- the paragraph delimiters. 471 do 472 Result:=gtk_text_iter_get_bytes_in_line (handle) 473 end 474 475 attributes: GTK_TEXT_ATTRIBUTES is 476 -- the effect of any tags applied to this spot in the 477 -- text. This is computed modifying a copy of `default_attributes'. 478 479 -- Void if no changes occours. 480 481 -- Note: the behaviour of this feature is quite different 482 -- from the C function that it wraps 483 -- (gtk_text_iter_get_attributes). If you need to apply the 484 -- effets of tags from a different starting point please 485 -- notify Paolo. 2006-12-31. 486 local values_modified: BOOLEAN 487 do 488 -- Result := default_attributes 489 -- values_modified := gtk_text_iter_get_attributes (handle, 490 -- Result.handle).to_boolean 491 492 -- gtk_text_iter_get_attributes() will modify values, 493 -- applying the effects of any tags present at iter. If any 494 -- tags affected values, the function returns TRUE. 495 496 -- if not values_modified then Result := Void end 497 ensure implemented: False 498 end 499 500 language: PANGO_LANGUAGE is 501 -- The language in effect at iter. 502 do 503 -- Note: This is convenience wrapper around 504 -- `gtk_text_iter_get_attributes', which returns - if no 505 -- tags affecting language apply to iter - the return value 506 -- is identical to that of gtk_get_default_language() 507 -- (TODO). 508 509 create Result.from_external_pointer(gtk_text_iter_get_language(handle)) 510 end 511 512feature -- Iterator-like 513 is_off: BOOLEAN is 514 -- Is iter the end iterator? End iterator is one past the 515 -- last dereferenceable iterator in the buffer. This feature 516 -- is the most efficient way to check whether an iterator is 517 -- the end iterator. 518 519 -- Note: this features wraps gtk_text_iter_is_end. I have 520 -- changed name to conform to the iterator pattern. Paolo 521 -- 2006-12-31 522 do 523 Result:= gtk_text_iter_is_end(handle).to_boolean 524 end 525 526 is_valid: BOOLEAN 527 -- Have the iter being moved and dereferenceable? 528 529 is_start: BOOLEAN is 530 -- Is Current iter the first iterator in the buffer, that is 531 -- if iter has a character offset of 0?. 532 do 533 Result := gtk_text_iter_is_start(handle).to_boolean 534 end 535 536 next, forward_char is 537 -- Moves iter forward by one character offset. Note that 538 -- images embedded in the buffer occupy 1 character slot, so 539 -- `forward_char' may actually move onto an image instead of 540 -- a character, if you have images in your buffer. If iter is 541 -- the end iterator or one character before it, iter will now 542 -- point at the end iterator, and 543 -- gtk_text_iter_forward_char() returns FALSE for convenience 544 -- when writing loops. 545 do 546 is_valid:=gtk_text_iter_forward_char(handle).to_boolean 547 end 548 549 backward_char is 550 -- Moves backward by one character offset. `is_valid' will be 551 -- True if movement was possible; if iter was the first in 552 -- the buffer (character offset 0), `is_valid' will be False 553 -- for convenience when writing loops. 554 do 555 is_valid:=gtk_text_iter_backward_char(handle).to_boolean 556 end 557 558 forward_chars (a_count: INTEGER) is 559 -- Moves `a_count' characters if possible (if `a_count' would 560 -- move past the start or end of the buffer, moves to the 561 -- start or end of the buffer). `is_valid' indicates whether 562 -- the new position of iter is different from its original 563 -- position, and dereferenceable (the last iterator in the 564 -- buffer is not dereferenceable). If `a_count' is 0, the 565 -- function does nothing and `is_valid' is False. `a_count' 566 -- is number of characters to move, may be negative. 567 do 568 is_valid:=gtk_text_iter_forward_chars(handle, a_count).to_boolean 569 ensure a_count = 0 implies is_valid = False 570 end 571 572 backward_chars (a_count: INTEGER) is 573 -- Moves `a_count' characters backward, if possible (if 574 -- `a_count' would move past the start or end of the buffer, 575 -- moves to the start or end of the buffer). `is_valid' 576 -- indicates whether the iterator moved onto a 577 -- dereferenceable position; if the iterator didn't move, or 578 -- moved onto the end iterator, then False is returned. If 579 -- `a_count' is 0, nothing is done and `is_valid' is False. 580 do 581 is_valid:=gtk_text_iter_backward_chars(handle,a_count).to_boolean 582 end 583 584 forward_line is 585 -- Moves iter to the start of the next line. `is_valid' is 586 -- True if there was a next line to move to, and False if 587 -- iter was simply moved to the end of the buffer and is now 588 -- not dereferenceable, or if iter was already at the end of 589 -- the buffer. 590 do 591 is_valid:=gtk_text_iter_forward_line(handle).to_boolean 592 end 593 594 backward_line is 595 -- Moves iter to the start of the previous line. `is_valid' 596 -- is True if iter could be moved; i.e. if iter was at 597 -- character offset 0, `is_valid' is False. Therefore if iter 598 -- was already on line 0, but not at the start of the line, 599 -- iter is snapped to the start of the line and `is_valid' is 600 -- True. (Note that this implies that in a loop calling this 601 -- function, the line number may not change on every 602 -- iteration, if your first iteration is on line 0.) 603 do 604 is_valid:=gtk_text_iter_backward_line(handle).to_boolean 605 end 606 607 forward_lines (a_count: INTEGER) is 608 -- Moves `a_count' lines forward, if possible (if `a_count' 609 -- would move past the start or end of the buffer, moves to 610 -- the start or end of the buffer). `is_valid' indicates 611 -- whether the iterator moved onto a dereferenceable 612 -- position; if the iterator didn't move, or moved onto the 613 -- end iterator, then `is_valid' will be False. If `a_count' 614 -- is 0, the function does nothing and `is_valid' is 615 -- False. If `a_count' is negative, moves backward by 616 -- `0-a_count' lines. 617 do 618 is_valid:=gtk_text_iter_forward_lines(handle, a_count).to_boolean 619 end 620 621 backward_lines (a_count: INTEGER) is 622 -- Moves `a_count' lines backward, if possible (if `a_count' 623 -- would move past the start or end of the buffer, moves to 624 -- the start or end of the buffer). `is_valid' indicates 625 -- whether the iterator moved onto a dereferenceable 626 -- position; if the iterator didn't move, or moved onto the 627 -- end iterator, then `is_valid' is False. If `a_count' is 0, 628 -- the function does nothing and `is_valid' is False. If 629 -- `a_count' is negative, moves forward by 0 - count lines. 630 do 631 is_valid:=gtk_text_iter_backward_lines(handle, a_count).to_boolean 632 end 633 634 forward_word_ends (a_count: INTEGER) is 635 -- Calls `forward_word_end' up to `a_count' times. Then 636 -- `is_valid' is True if iter moved and is not the end 637 -- iterator. 638 do 639 is_valid:=gtk_text_iter_forward_word_ends(handle, a_count).to_boolean 640 end 641 642 backward_word_starts (a_count: INTEGER) is 643 -- Calls `backward_word_start' up to `a_count' 644 -- times. `is_valid' will be True if iter moved and is not 645 -- the end iterator. 646 do 647 is_valid:=gtk_text_iter_backward_word_starts(handle,a_count).to_boolean 648 end 649 650 forward_word_end is 651 -- Moves forward to the next word end. (If iter is currently 652 -- on a word end, moves forward to the next one after that.) 653 -- Word breaks are determined by Pango and should be correct 654 -- for nearly any language (if not, the correct fix would be 655 -- to the Pango word break algorithms). 656 657 -- `is_valid' will be True if iter moved and is not the end 658 -- iterator. 659 do 660 is_valid:=gtk_text_iter_forward_word_end(handle).to_boolean 661 end 662 663 backward_word_start is 664 -- Moves backward to the previous word start. (If iter is 665 -- currently on a word start, moves backward to the next one 666 -- after that). Word breaks are determined by Pango and 667 -- should be correct for nearly any language (if not, the 668 -- correct fix would be to the Pango word break algorithms). 669 -- `is_valid' will be True if iter moved and is not the end 670 -- iterator. 671 do 672 is_valid:=gtk_text_iter_backward_word_start(handle).to_boolean 673 end 674 675 forward_cursor_position is 676 -- Moves iter forward by a single cursor position. Cursor 677 -- positions are (unsurprisingly) positions where the cursor 678 -- can appear. Perhaps surprisingly, there may not be a 679 -- cursor position between all characters. The most common 680 -- example for European languages would be a carriage 681 -- return/newline sequence. For some Unicode characters, the 682 -- equivalent of say the letter "a" with an accent mark will 683 -- be represented as two characters, first the letter then a 684 -- "combining mark" that causes the accent to be rendered; so 685 -- the cursor can't go between those two characters. See also 686 -- the PangoLogAttr structure and pango_break() function. 687 688 -- `is_valid' will be True if we moved and the new position 689 -- is dereferenceable 690 do 691 is_valid:=gtk_text_iter_forward_cursor_position(handle).to_boolean 692 end 693 694 backward_cursor_position is 695 -- Like `forward_cursor_position', but moves backward. 696 697 -- `is_valid' will be True if we moved 698 do 699 is_valid:=gtk_text_iter_backward_cursor_position(handle).to_boolean 700 end 701 702 forward_cursor_positions (a_count: INTEGER) is 703 -- Moves up to `a_count' cursor positions. See 704 -- `forward_cursor_position' for details. 705 706 -- `is_valid' will be True if we moved and the new position 707 -- is dereferenceable. 708 do 709 is_valid:=gtk_text_iter_forward_cursor_positions(handle, a_count).to_boolean 710 end 711 712 backward_cursor_positions (a_count: INTEGER) is 713 -- Moves up to `a_count' cursor positions. See 714 -- `forward_cursor_position' for details. 715 716 -- `is_valid' will be True if we moved and the new position 717 -- is dereferenceable. 718 do 719 is_valid:=gtk_text_iter_backward_cursor_positions(handle, a_count).to_boolean 720 end 721 722 backward_sentence_start is 723 -- Moves backward to the previous sentence start; if iter is 724 -- already at the start of a sentence, moves backward to the 725 -- next one. Sentence boundaries are determined by Pango and 726 -- should be correct for nearly any language (if not, the 727 -- correct fix would be to the Pango text boundary 728 -- algorithms). 729 730 -- `is_valid' will be True if iter moved and is not the end 731 -- iterator. 732 do 733 is_valid:=gtk_text_iter_backward_sentence_start(handle).to_boolean 734 end 735 736 backward_sentence_starts (a_count: INTEGER) is 737 -- Calls `backward_sentence_start' up to count times, or 738 -- until `is_valid' will be False. If `a_count' is negative, 739 -- moves forward instead of backward. 740 741 -- `is_valid' will be True if iter moved and is not the end 742 -- iterator. 743 do 744 is_valid:=gtk_text_iter_backward_sentence_starts(handle,a_count).to_boolean 745 end 746 747 forward_sentence_end is 748 -- Moves forward to the next sentence end. (If iter is at the 749 -- end of a sentence, moves to the next end of sentence.) 750 -- Sentence boundaries are determined by Pango and should be 751 -- correct for nearly any language (if not, the correct fix 752 -- would be to the Pango text boundary algorithms). 753 754 -- `is_valid' will be True if iter moved and is not the end 755 -- iterator. 756 do 757 is_valid:=gtk_text_iter_forward_sentence_end(handle).to_boolean 758 end 759 760 forward_sentence_ends (a_count: INTEGER) is 761 -- Calls `forward_sentence_end' `a_count' times (or until 762 -- `forward_sentence_end' sets `is_valid' to False). If 763 -- `a_count' is negative, moves backward instead of forward. 764 765 -- `is_valid' will be set to True if iter moved and is not 766 -- the end iterator. 767 do 768 is_valid:=gtk_text_iter_forward_sentence_ends(handle,a_count).to_boolean 769 end 770 771 forward_visible_word_ends (a_count: INTEGER) is 772 -- Calls `forward_visible_word_end' up to `a_count' times. 773 774 -- `is_valid' will be set to True if iter moved and is not 775 -- the end iterator. 776 do 777 is_valid:=gtk_text_iter_forward_visible_word_ends(handle, a_count).to_boolean 778 end 779 780 backward_visible_word_starts (a_count: INTEGER) is 781 -- Calls `backward_visible_word_start' up to `a_count' times. 782 783 -- `is_valid' will be True if iter moved and is not the end 784 -- iterator. 785 do 786 is_valid:=gtk_text_iter_backward_visible_word_starts(handle, a_count).to_boolean 787 end 788 789 forward_visible_word_end is 790 -- Moves forward to the next visible word end. (If iter is 791 -- currently on a word end, moves forward to the next one 792 -- after that.) Word breaks are determined by Pango and 793 -- should be correct for nearly any language (if not, the 794 -- correct fix would be to the Pango word break algorithms). 795 796 -- `is_valid' will be set to True if iter moved and is not 797 -- the end iterator. 798 do 799 is_valid:=gtk_text_iter_forward_visible_word_end(handle).to_boolean 800 end 801 802 backward_visible_word_start is 803 -- Moves backward to the previous visible word start. (If 804 -- iter is currently on a word start, moves backward to the 805 -- next one after that.) Word breaks are determined by Pango 806 -- and should be correct for nearly any language (if not, the 807 -- correct fix would be to the Pango word break algorithms). 808 809 -- `is_valid' will be set to True if iter moved and is not 810 -- the end iterator. 811 do 812 is_valid:=gtk_text_iter_backward_visible_word_start(handle).to_boolean 813 end 814 815 forward_visible_cursor_position is 816 -- Moves iter forward to the next visible cursor 817 -- position. See `forward_cursor_position' for details. 818 819 -- `is_valid' will be set to True if we moved and the new 820 -- position is dereferenceable. 821 do 822 is_valid:=gtk_text_iter_forward_visible_cursor_position(handle).to_boolean 823 end 824 825 826 backward_visible_cursor_position is 827 -- Moves iter forward to the previous visible cursor 828 -- position. See `backward_cursor_position' for details. 829 830 -- `is_valid' will be set to True if we moved and the new 831 -- position is dereferenceable 832 do 833 is_valid:=gtk_text_iter_backward_visible_cursor_position(handle).to_boolean 834 end 835 836 forward_visible_cursor_positions (a_count: INTEGER) is 837 -- Moves up to `a_count' visible cursor positions. See 838 -- `forward_cursor_position' for details. 839 840 -- `is_valid' will be set to True if we moved and the new 841 -- position is dereferenceable. 842 do 843 is_valid:=gtk_text_iter_forward_visible_cursor_positions(handle, a_count).to_boolean 844 end 845 846 backward_visible_cursor_positions (a_count: INTEGER) is 847 -- Moves up to `a_count' visible cursor positions. See 848 -- `forward_cursor_position' for details. 849 850 -- `is_valid' will be set to True if we moved and the new 851 -- position is dereferenceable. 852 do 853 is_valid:=gtk_text_iter_backward_visible_cursor_positions(handle,a_count).to_boolean 854 end 855 856 forward_visible_line is 857 -- Moves iter to the start of the next visible line. 858 -- `is_valid' is set to True if there was a next line to move 859 -- to, and False if iter was simply moved to the end of the 860 -- buffer and is now not dereferenceable, or if iter was 861 -- already at the end of the buffer. 862 do 863 is_valid:=gtk_text_iter_forward_visible_line(handle).to_boolean 864 end 865 866 iter_backward_visible_line is 867 -- Moves iter to the start of the previous visible line. 868 -- `is_valid' is seto to True if iter could be moved; i.e. if 869 -- iter was at character offset 0, this function returns 870 -- FALSE. Therefore if iter was already on line 0, but not at 871 -- the start of the line, iter is snapped to the start of the 872 -- line and the function returns TRUE. (Note that this 873 -- implies that in a loop calling this function, the line 874 -- number may not change on every iteration, if your first 875 -- iteration is on line 0.) 876 do 877 is_valid:=gtk_text_iter_backward_visible_line(handle).to_boolean 878 end 879 880 forward_visible_lines (a_count: INTEGER) is 881 -- Moves `a_count' visible lines forward, if possible (if 882 -- count would move past the start or end of the buffer, 883 -- moves to the start or end of the buffer). `is_valid' 884 -- indicates whether the iterator moved onto a 885 -- dereferenceable position; if the iterator didn't move, or 886 -- moved onto the end iterator, then `is_valid' is False. If 887 -- `a_count' is 0, the function does nothing and `is_valid' 888 -- is set to False. If `a_count' is negative, moves backward 889 -- by 0 - count lines. 890 do 891 is_valid:=gtk_text_iter_forward_visible_lines(handle, a_count).to_boolean 892 end 893 894 backward_visible_lines (a_count: INTEGER) is 895 -- Moves `a_count' visible lines backward, if possible (if 896 -- `a_count' would move past the start or end of the buffer, 897 -- moves to the start or end of the buffer). `is_valid' 898 -- indicates whether the iterator moved onto a 899 -- dereferenceable position; if the iterator didn't move, or 900 -- moved onto the end iterator, then `is_valid' is False. If 901 -- `a_count' is 0, nothing is done and `is_valid' is 902 -- False. If `a_count' is negative, moves forward by 0 - 903 -- count lines. 904 905 do 906 is_valid:=gtk_text_iter_backward_visible_lines(handle,a_count).to_boolean 907 end 908 909 set_offset (a_char_offset: INTEGER) is 910 -- Sets iter to point to `a_char_offset'. `a_char_offset' 911 -- counts from the start of the entire text buffer, starting 912 -- with 0. 913 do 914 gtk_text_iter_set_offset(handle,a_char_offset) 915 end 916 917 set_line (a_line_number: INTEGER) is 918 -- Moves iterator iter to the start of the line 919 -- `a_line_number' (counted from 0). If `a_line_number' is 920 -- negative or larger than the number of lines in the buffer, 921 -- moves iter to the start of the last line in the buffer. 922 do 923 gtk_text_iter_set_line(handle, a_line_number) 924 end 925 926 set_line_offset (a_char_on_line: INTEGER) is 927 -- Moves iter within a line, to a new character (not byte) 928 -- offset. The given character offset must be less than or 929 -- equal to the number of characters in the line; if equal, 930 -- iter moves to the start of the next line. See 931 -- `set_line_index' if you have a byte index rather than a 932 -- character offset. 933 do 934 gtk_text_iter_set_line_offset (handle,a_char_on_line) 935 end 936 937 set_line_index (a_byte_on_line: INTEGER) is 938 -- Same as `set_line_offset', but works with a byte 939 -- index. The given byte index must be at the start of a 940 -- character, it can't be in the middle of a UTF-8 encoded 941 -- character (TODO: turn it into a precondition). 942 -- `a_byte_on_line' is the byte index relative to the start 943 -- of iter's current line. 944 do 945 gtk_text_iter_set_line_index (handle, a_byte_on_line) 946 end 947 948 set_visible_line_index (a_byte_on_line: INTEGER) is 949 -- Like `set_line_index', but the index is in visible bytes, 950 -- i.e. text with a tag making it invisible is not counted in 951 -- the index. 952 do 953 gtk_text_iter_set_visible_line_index(handle, a_byte_on_line) 954 end 955 956 set_visible_line_offset (a_char_on_line: INTEGER) is 957 -- Like `set_line_offset', but the offset is in visible 958 -- characters, i.e. text with a tag making it invisible is 959 -- not counted in the offset. 960 do 961 gtk_text_iter_set_visible_line_offset(handle,a_char_on_line) 962 end 963 964 forward_to_end is 965 -- Moves iter forward to the "end iterator," which points one 966 -- past the last valid character in the 967 -- buffer. 968 do 969 gtk_text_iter_forward_to_end(handle) 970 is_valid:=False 971 ensure 972 not_valid: not is_valid 973 -- TODO: `char' called on the end iterator is 0, which is 974 -- convenient for writing loops (when writing C code). 975 end 976 977 forward_to_line_end is 978 -- Moves the iterator to point to the paragraph delimiter 979 -- characters, which will be either a newline, a carriage 980 -- return, a carriage return/newline in sequence, or the 981 -- Unicode paragraph separator character. If the iterator is 982 -- already at the paragraph delimiter characters, moves to 983 -- the paragraph delimiter characters for the next line. If 984 -- iter is on the last line in the buffer, which does not end 985 -- in paragraph delimiters, moves to the end iterator (end of 986 -- the last line), and `is_valid' is set to False. 987 -- `is_valid' is set to True if we moved and the new location 988 -- is not the end iterator. 989 do 990 is_valid:=gtk_text_iter_forward_to_line_end(handle).to_boolean 991 end 992 993 forward_to_tag_toggle (a_tag: GTK_TEXT_TAG) is 994 -- Moves forward to the next toggle (on or off) of `a_tag,' 995 -- or to the next toggle of any tag if `a_tag' is Void. If no 996 -- matching tag toggles are found `is_valid' is set to False, 997 -- otherwise to True. Does not return toggles located at 998 -- iter, only toggles after iter. Sets iter to the location 999 -- of the toggle, or to the end of the buffer if no toggle is 1000 -- found. 1001 do 1002 if a_tag=Void then 1003 is_valid:=gtk_text_iter_forward_to_tag_toggle(handle,default_pointer).to_boolean 1004 else 1005 is_valid:=gtk_text_iter_forward_to_tag_toggle(handle,a_tag.handle).to_boolean 1006 end 1007 end 1008 1009 backward_to_tag_toggle (a_tag: GTK_TEXT_TAG) is 1010 -- Moves backward to the next toggle (on or off) of `a_tag,' 1011 -- or to the next toggle of any tag if `a_tag' is Void. If no 1012 -- matching tag toggles are found, `is_valid' is set to 1013 -- False, otherwise to True. Toggles located at iter are not 1014 -- counted, only toggles before iter. Sets iter to the 1015 -- location of the toggle, or the start of the buffer if no 1016 -- toggle is found. 1017 do 1018 if a_tag = Void then 1019 is_valid := gtk_text_iter_backward_to_tag_toggle(handle,default_pointer).to_boolean 1020 else 1021 is_valid := gtk_text_iter_backward_to_tag_toggle(handle,a_tag.handle).to_boolean 1022 end 1023 end 1024 1025 is_found: BOOLEAN 1026 -- Have the last search/scan been successful? 1027 1028 forward_find_char (a_predicate: PREDICATE[TUPLE[INTEGER_32]]; a_limit: GTK_TEXT_ITER) is 1029 -- Advances iter, calling `a_predicate' on each character. If 1030 -- `a_predicate' is True, scanning is stopped and `is_found' 1031 -- TRUE and stops scanning. If `a_predicate' is never True, 1032 -- iter is set to `a_limit' if limit is non-Void, otherwise 1033 -- to the end iterator. 1034 local ca: POINTER 1035 do 1036 ca := callback_array($callback) 1037 if a_limit = Void then 1038 is_found := gtk_text_iter_forward_find_char (handle, $hidden_callback, 1039 ca, -- i.e.: user_data, 1040 default_pointer -- i.e. no limit 1041 ).to_boolean 1042 else 1043 is_found := gtk_text_iter_forward_find_char (handle, $hidden_callback, 1044 ca, -- i.e.: user_data, 1045 a_limit.handle -- i.e. no limit 1046 ).to_boolean 1047 end 1048 end 1049 1050 backward_find_char (a_predicate: PREDICATE[TUPLE[INTEGER_32]]; a_limit: GTK_TEXT_ITER) is 1051 -- Same as `forward_find_char', but goes backward from iter. 1052 local ca: POINTER 1053 do 1054 ca:=callback_array($callback) 1055 if a_limit=Void 1056 then is_found:=gtk_text_iter_backward_find_char 1057 (handle, $hidden_callback, 1058 ca, -- i.e.: user_data, 1059 default_pointer -- i.e. no limit 1060 ).to_boolean 1061 else is_found:=gtk_text_iter_backward_find_char 1062 (handle, $hidden_callback, 1063 ca, -- i.e.: user_data, 1064 a_limit.handle -- i.e. no limit 1065 ).to_boolean 1066 end 1067 end 1068 1069 forward_search (a_string: STRING; some_flags: INTEGER; 1070 a_start_match, an_end_match, a_limit: GTK_TEXT_ITER) is 1071 -- Searches forward for `a_string'. Any match is returned by 1072 -- setting `a_match_start' to the first character of the 1073 -- match and `a_match_end' to the first character after the 1074 -- match. The search will not continue past `a_limit'. Note 1075 -- that a search is a linear or O(n) operation, so you may 1076 -- wish to use limit to avoid locking up your UI on large 1077 -- buffers. 1078 1079 -- If the `gtk_text_search_visible_only' flag is present, the 1080 -- match may have invisible text interspersed in 1081 -- `a_string'. i.e. it will be a possibly-noncontiguous 1082 -- subsequence of the matched range. similarly, if you 1083 -- specify `gtk_text_search_text_only,' the match may have 1084 -- pixbufs or child widgets mixed inside the matched 1085 -- range. If these flags are not given, the match must be 1086 -- exact; the special 0xFFFC character in `a_string' will match 1087 -- embedded pixbufs or child widgets. 1088 1089 -- `a_string': a search string 1090 1091 -- `some_flags': flags affecting how the search is done 1092 1093 -- `a_match_start' is set to the location for start of match, 1094 -- if not Void NULL 1095 1096 -- `a_match_end' is set to the location for end of match, if 1097 -- it is not Void. 1098 1099 -- `a_limit' is the bound for the search; Void to indicate 1100 -- the end of the buffer. 1101 1102 -- `is_found' is set whether a match was found. 1103 1104 -- TODO: match start and end iterators passed as arguments 1105 -- does not strictly follow the no-side-effects requirement 1106 -- usually expected in Eiffel design. Check for a best way to 1107 -- wrap this feature. 1108 require 1109 string_not_void: a_string /= Void 1110 valid_flags: are_valid_search_flags(some_flags) 1111 local smp, emp, lp: POINTER 1112 do 1113 if a_start_match/=Void then smp:=a_start_match.handle end 1114 if an_end_match/=Void then emp:=an_end_match.handle end 1115 if a_limit/=Void then lp:=a_limit.handle end 1116 is_found:=gtk_text_iter_forward_search(handle,a_string.to_external, 1117 some_flags, 1118 smp, emp, lp).to_boolean 1119 end 1120 1121 backward_search (a_string: STRING; some_flags: INTEGER; 1122 a_start_match, an_end_match, a_limit: GTK_TEXT_ITER) is 1123 -- Same as `forward_search', but moves backward. 1124 require 1125 string_not_void: a_string /= Void 1126 valid_flags: are_valid_search_flags(some_flags) 1127 local smp, emp, lp: POINTER 1128 do 1129 if a_start_match/=Void then smp:=a_start_match.handle end 1130 if an_end_match/=Void then emp:=an_end_match.handle end 1131 if a_limit/=Void then lp:=a_limit.handle end 1132 is_found:=gtk_text_iter_backward_search(handle,a_string.to_external, 1133 some_flags, 1134 smp, emp, lp).to_boolean 1135 end 1136 1137 order (another: GTK_TEXT_ITER) is 1138 -- Swaps the value of Current and `another' if `another' 1139 -- comes before Current in the buffer. That is, ensures that 1140 -- Current and `another' are in sequence. Most text buffer 1141 -- functions that take a range call this automatically on 1142 -- your behalf, so there's no real reason to call it yourself 1143 -- in those cases. There are some exceptions, such as 1144 -- `in_range', that expect a pre-sorted range. 1145 require another_not_void: another /= Void 1146 do 1147 gtk_text_iter_order (handle, another.handle) 1148 ensure ordered: Current <= another 1149 end 1150 1151feature -- Comparability 1152 is_equal (another: like Current): BOOLEAN is 1153 -- Tests whether two iterators (Current and `another') are 1154 -- equal, using the fastest possible mechanism. This function 1155 -- is very fast; you can expect it to perform better than 1156 -- e.g. getting the character offset for each iterator and 1157 -- comparing the offsets yourself. Also, it's a bit faster 1158 -- than `compare'. 1159 do 1160 Result := (gtk_text_iter_equal (handle, another.handle)).to_boolean 1161 end 1162 1163 infix "<" (other: like Current): BOOLEAN is 1164 do 1165 Result:= compare(other)<0 1166 end 1167 1168 infix "<=" (other: like Current): BOOLEAN is 1169 do 1170 Result:= compare(other)<=0 1171 end 1172 1173 infix ">" (other: like Current): BOOLEAN is 1174 do 1175 Result:= compare(other)>0 1176 end 1177 1178 infix ">=" (other: like Current): BOOLEAN is 1179 do 1180 Result:= compare(other)>=0 1181 end 1182 1183 in_range (lower, upper: like Current): BOOLEAN is 1184 -- Does Current fall in the range [lower, upper). 1185 require 1186 ascending_order: lower <= upper 1187 do 1188 Result:=gtk_text_iter_in_range(handle, lower.handle, upper.handle).to_boolean 1189 end 1190 1191 three_way_comparison (other: like Current): INTEGER is 1192 obsolete "Please use compare" 1193 do 1194 Result:=compare(other) 1195 end 1196 1197 compare (another: like Current): INTEGER is 1198 -- A qsort()-style function that returns negative if Current 1199 -- is less than `another,' positive if Current is greater 1200 -- than `another,' and 0 if they're equal. Ordering is in 1201 -- character offset order, i.e. the first character in the 1202 -- buffer is less than the second character in the buffer. 1203 do 1204 Result:=gtk_text_iter_compare(handle, another.handle) 1205 end 1206 1207feature -- size 1208 1209 struct_size: INTEGER is 1210 external "C inline use <gtk/gtk.h>" 1211 alias "sizeof(GtkTextIter)" 1212 end 1213 1214feature {} -- External call 1215 1216 gtk_text_iter_get_buffer (an_iter: POINTER): POINTER is -- GtkTextBuffer* 1217 external "C use <gtk/gtk.h>" 1218 end 1219 1220 gtk_text_iter_copy (an_iter: POINTER): POINTER is -- GtkTextIter* 1221 external "C use <gtk/gtk.h>" 1222 end 1223 1224 gtk_text_iter_free (an_iter: POINTER) is 1225 external "C use <gtk/gtk.h>" 1226 end 1227 1228 gtk_text_iter_get_offset (an_iter: POINTER): INTEGER is -- gint 1229 external "C use <gtk/gtk.h>" 1230 end 1231 1232 gtk_text_iter_get_line (an_iter: POINTER): INTEGER is -- gint 1233 external "C use <gtk/gtk.h>" 1234 end 1235 1236 gtk_text_iter_get_line_offset (an_iter: POINTER): INTEGER is -- gint 1237 external "C use <gtk/gtk.h>" 1238 end 1239 1240 gtk_text_iter_get_line_index (an_iter: POINTER): INTEGER is -- gint 1241 external "C use <gtk/gtk.h>" 1242 end 1243 1244 gtk_text_iter_get_visible_line_index (an_iter: POINTER): INTEGER is -- gint 1245 external "C use <gtk/gtk.h>" 1246 end 1247 1248 gtk_text_iter_get_visible_line_offset (an_iter: POINTER): INTEGER is -- gint 1249 external "C use <gtk/gtk.h>" 1250 end 1251 1252 gtk_text_iter_get_char (an_iter: POINTER): INTEGER is -- gunichar 1253 external "C use <gtk/gtk.h>" 1254 end 1255 1256 gtk_text_iter_get_slice (an_start: POINTER; an_end: POINTER): POINTER is -- gchar* 1257 external "C use <gtk/gtk.h>" 1258 end 1259 1260 gtk_text_iter_get_text (an_start: POINTER; an_end: POINTER): POINTER is -- gchar* 1261 external "C use <gtk/gtk.h>" 1262 end 1263 1264 gtk_text_iter_get_visible_slice (an_start: POINTER; an_end: POINTER): POINTER is -- gchar* 1265 external "C use <gtk/gtk.h>" 1266 end 1267 1268 gtk_text_iter_get_visible_text (an_start: POINTER; an_end: POINTER): POINTER is -- gchar* 1269 external "C use <gtk/gtk.h>" 1270 end 1271 1272 gtk_text_iter_get_pixbuf (an_iter: POINTER): POINTER is -- GdkPixbuf* 1273 external "C use <gtk/gtk.h>" 1274 end 1275 1276 gtk_text_iter_get_marks (an_iter: POINTER): POINTER is -- GSList* 1277 external "C use <gtk/gtk.h>" 1278 end 1279 1280 gtk_text_iter_get_toggled_tags (an_iter: POINTER; toggled_on: INTEGER): POINTER is -- GSList* 1281 external "C use <gtk/gtk.h>" 1282 end 1283 1284 gtk_text_iter_get_child_anchor (an_iter: POINTER): POINTER is -- GtkTextChildAnchor* 1285 external "C use <gtk/gtk.h>" 1286 end 1287 1288 gtk_text_iter_begins_tag (an_iter: POINTER; a_tag: POINTER): INTEGER is -- gboolean 1289 external "C use <gtk/gtk.h>" 1290 end 1291 1292 gtk_text_iter_ends_tag (an_iter: POINTER; a_tag: POINTER): INTEGER is -- gboolean 1293 external "C use <gtk/gtk.h>" 1294 end 1295 1296 gtk_text_iter_toggles_tag (an_iter: POINTER; a_tag: POINTER): INTEGER is -- gboolean 1297 external "C use <gtk/gtk.h>" 1298 end 1299 1300 gtk_text_iter_has_tag (an_iter: POINTER; a_tag: POINTER): INTEGER is -- gboolean 1301 external "C use <gtk/gtk.h>" 1302 end 1303 1304 gtk_text_iter_get_tags (an_iter: POINTER): POINTER is -- GSList* 1305 external "C use <gtk/gtk.h>" 1306 end 1307 1308 gtk_text_iter_editable (an_iter: POINTER; default_setting: INTEGER): INTEGER is -- gboolean 1309 external "C use <gtk/gtk.h>" 1310 end 1311 1312 gtk_text_iter_can_insert (an_iter: POINTER; default_editability: INTEGER): INTEGER is -- gboolean 1313 external "C use <gtk/gtk.h>" 1314 end 1315 1316 gtk_text_iter_starts_word (an_iter: POINTER): INTEGER is -- gboolean 1317 external "C use <gtk/gtk.h>" 1318 end 1319 1320 gtk_text_iter_ends_word (an_iter: POINTER): INTEGER is -- gboolean 1321 external "C use <gtk/gtk.h>" 1322 end 1323 1324 gtk_text_iter_inside_word (an_iter: POINTER): INTEGER is -- gboolean 1325 external "C use <gtk/gtk.h>" 1326 end 1327 1328 gtk_text_iter_starts_line (an_iter: POINTER): INTEGER is -- gboolean 1329 external "C use <gtk/gtk.h>" 1330 end 1331 1332 gtk_text_iter_ends_line (an_iter: POINTER): INTEGER is -- gboolean 1333 external "C use <gtk/gtk.h>" 1334 end 1335 1336 gtk_text_iter_starts_sentence (an_iter: POINTER): INTEGER is -- gboolean 1337 external "C use <gtk/gtk.h>" 1338 end 1339 1340 gtk_text_iter_ends_sentence (an_iter: POINTER): INTEGER is -- gboolean 1341 external "C use <gtk/gtk.h>" 1342 end 1343 1344 gtk_text_iter_inside_sentence (an_iter: POINTER): INTEGER is -- gboolean 1345 external "C use <gtk/gtk.h>" 1346 end 1347 1348 gtk_text_iter_is_cursor_position (an_iter: POINTER): INTEGER is -- gboolean 1349 external "C use <gtk/gtk.h>" 1350 end 1351 1352 gtk_text_iter_get_chars_in_line (an_iter: POINTER): INTEGER is -- gint 1353 external "C use <gtk/gtk.h>" 1354 end 1355 1356 gtk_text_iter_get_bytes_in_line (an_iter: POINTER): INTEGER is -- gint 1357 external "C use <gtk/gtk.h>" 1358 end 1359 1360 gtk_text_iter_get_attributes (an_iter: POINTER; gtktextattributes: POINTER): INTEGER is -- gboolean 1361 external "C use <gtk/gtk.h>" 1362 end 1363 1364 gtk_text_iter_get_language (an_iter: POINTER): POINTER is -- PangoLanguage* 1365 external "C use <gtk/gtk.h>" 1366 end 1367 1368 gtk_text_iter_is_end (an_iter: POINTER): INTEGER is -- gboolean 1369 external "C use <gtk/gtk.h>" 1370 end 1371 1372 gtk_text_iter_is_start (an_iter: POINTER): INTEGER is -- gboolean 1373 external "C use <gtk/gtk.h>" 1374 end 1375 1376 gtk_text_iter_forward_char (an_iter: POINTER): INTEGER is -- gboolean 1377 external "C use <gtk/gtk.h>" 1378 end 1379 1380 gtk_text_iter_backward_char (an_iter: POINTER): INTEGER is -- gboolean 1381 externa…
Large files files are truncated, but you can click here to view the full file