chiark / gitweb /
Infra: Rudimentary setup system.
[clg] / gtk / gtktext.lisp
CommitLineData
112ac1d3 1;; Common Lisp bindings for GTK+ v2.x
2;; Copyright 2004-2005 Espen S. Johnsen <espen@users.sf.net>
ced65152 3;;
112ac1d3 4;; Permission is hereby granted, free of charge, to any person obtaining
5;; a copy of this software and associated documentation files (the
6;; "Software"), to deal in the Software without restriction, including
7;; without limitation the rights to use, copy, modify, merge, publish,
8;; distribute, sublicense, and/or sell copies of the Software, and to
9;; permit persons to whom the Software is furnished to do so, subject to
10;; the following conditions:
ced65152 11;;
112ac1d3 12;; The above copyright notice and this permission notice shall be
13;; included in all copies or substantial portions of the Software.
ced65152 14;;
112ac1d3 15;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18;; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19;; CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ced65152 22
2d7da5f0 23;; $Id: gtktext.lisp,v 1.10 2007-10-22 09:21:50 espen Exp $
ced65152 24
25
26(in-package "GTK")
27
18e45ba6 28;;; Text Buffer
29
30(defbinding %text-buffer-insert () nil
31 (buffer text-buffer)
32 (iter text-iter)
33 (text string)
34 (-1 int))
35
36(defun text-buffer-insert (buffer iter text &rest tags)
37 (if tags
38 (let ((start-offset (text-iter-offset iter)))
39 (%text-buffer-insert buffer iter text)
40 (let ((start (text-buffer-get-iter-at-offset buffer start-offset)))
41 (loop
42 for tag in tags
43 do (text-buffer-apply-tag buffer tag start iter))))
44 (%text-buffer-insert buffer iter text)))
45
46(defbinding %text-buffer-insert-at-cursor () nil
47 (buffer text-buffer)
48 (text string)
49 (-1 int))
50
51(defun text-buffer-insert-at-cursor (buffer text &rest tags)
52 (if tags
53 (apply #'text-buffer-insert buffer
54 (text-buffer-get-iter-at-insert buffer) text tags)
55 (%text-buffer-insert-at-cursor buffer text)))
56
57(defbinding text-buffer-insert-interactive () boolean
58 (buffer text-buffer)
59 (iter text-iter)
60 (text string)
61 (-1 int)
62 (default-editable boolean))
63
64(defbinding text-buffer-insert-interactive-at-cursor () boolean
65 (buffer text-buffer)
66 (text string)
67 (-1 int)
68 (default-editable boolean))
69
70(defbinding text-buffer-insert-range () nil
71 (buffer text-buffer)
72 (iter text-iter)
73 (start text-iter)
74 (end text-iter))
75
76(defbinding text-buffer-insert-range-interactive () nil
77 (buffer text-buffer)
78 (iter text-iter)
79 (start text-iter)
80 (end text-iter)
81 (default-editable boolean))
82
83(defbinding text-buffer-delete () nil
84 (buffer text-buffer)
85 (start text-iter)
86 (end text-iter))
87
88(defbinding text-buffer-delete-interactive () boolean
89 (buffer text-buffer)
90 (start text-iter)
91 (end text-iter)
92 (default-editable boolean))
93
8ab0db90 94#?(pkg-exists-p "gtk+-2.0" :atleast-version "2.6.0")
18e45ba6 95(defbinding text-buffer-backspace () boolean
96 (buffer text-buffer)
97 (iter text-iter)
98 (interactive boolean)
99 (default-editable boolean))
100
101(defbinding text-buffer-set-text () nil
102 (buffer text-buffer)
103 (text string)
104 (-1 int))
105
106(defbinding text-buffer-get-text () string
107 (buffer text-buffer)
108 (start text-iter)
109 (end text-iter)
110 (include-hidden-char boolean))
111
112(defbinding text-buffer-get-slice () string
113 (buffer text-buffer)
114 (start text-iter)
115 (end text-iter)
116 (include-hidden-char boolean))
117
118(defbinding text-buffer-insert-pixbuf () nil
119 (buffer text-buffer)
120 (iter text-iter)
121 (pixbuf gdk:pixbuf))
122
123(defbinding text-buffer-insert-child-anchor () nil
124 (buffer text-buffer)
125 (iter text-iter)
126 (anchor text-child-anchor))
127
128(defbinding text-buffer-create-child-anchor () text-child-anchor
129 (buffer text-buffer)
130 (iter text-iter))
131
132(defbinding text-buffer-create-mark () text-mark
133 (buffer text-buffer)
134 (mark-name (or null string))
135 (where text-iter)
136 (left-gravity boolean))
137
138(defbinding %text-buffer-move-mark () nil
139 (buffer text-buffer)
140 (mark text-mark)
141 (where text-iter))
142
143(defbinding %text-buffer-move-mark-by-name () nil
144 (buffer text-buffer)
145 (mark-name string)
146 (where text-iter))
147
148(defgeneric text-buffer-move-mark (buffer mark where))
149
150(defmethod text-buffer-move-mark ((buffer text-buffer) (mark text-mark) where)
151 (%text-buffer-move-mark buffer mark where))
152
153(defmethod text-buffer-move-mark ((buffer text-buffer) (name string) where)
154 (%text-buffer-move-mark-by-name buffer name where))
155
156(defbinding %text-buffer-delete-mark () nil
157 (buffer text-buffer)
158 (mark text-mark))
159
160(defbinding %text-buffer-delete-mark-by-name () nil
161 (buffer text-buffer)
162 (mark-name string))
163
164(defgeneric text-buffer-delete-mark (buffer mark))
165
166(defmethod text-buffer-delete-mark ((buffer text-buffer) (mark text-mark))
167 (%text-buffer-delete-mark buffer mark))
168
169(defmethod text-buffer-delete-mark ((buffer text-buffer) (mark-name string))
170 (%text-buffer-delete-mark-by-name buffer mark-name))
171
172(defbinding text-buffer-get-mark () text-mark
173 (buffer text-buffer)
174 (mark-name string))
175
176(defbinding text-buffer-get-insert () text-mark
177 (buffer text-buffer))
178
179(defbinding text-buffer-get-selection-bound () text-mark
180 (buffer text-buffer))
181
182(defbinding text-buffer-place-cursor () nil
183 (buffer text-buffer)
184 (where text-iter))
185
186(defbinding text-buffer-select-range () nil
187 (buffer text-buffer)
188 (insert text-iter)
189 (bound text-iter))
190
191(defbinding %text-buffer-apply-tag () nil
192 (buffer text-buffer)
193 (tag text-tag)
194 (start text-iter)
195 (end text-iter))
196
197(defbinding %text-buffer-remove-tag () nil
198 (buffer text-buffer)
199 (tag text-tag)
200 (start text-iter)
201 (end text-iter))
202
203(defbinding %text-buffer-apply-tag-by-name () nil
204 (buffer text-buffer)
205 (tag-name string)
206 (start text-iter)
207 (end text-iter))
208
209(defbinding %text-buffer-remove-tag-by-name () nil
210 (buffer text-buffer)
211 (tag-name string)
212 (start text-iter)
213 (end text-iter))
214
215(defgeneric text-buffer-apply-tag (buffer tag start end))
216
217(defmethod text-buffer-apply-tag ((buffer text-buffer) (tag text-tag) start end)
218 (%text-buffer-apply-tag buffer tag start end))
219
220(defmethod text-buffer-apply-tag ((buffer text-buffer) (name string) start end)
221 (%text-buffer-apply-tag-by-name buffer name start end))
222
223(defgeneric text-buffer-remove-tag (buffer tag start end))
224
225(defmethod text-buffer-remove-tag ((buffer text-buffer) (tag text-tag) start end)
226 (%text-buffer-remove-tag buffer tag start end))
227
228(defmethod text-buffer-remove-tag ((buffer text-buffer) (name string) start end)
229 (%text-buffer-remove-tag-by-name buffer name start end))
230
231(defbinding text-buffer-remove-all-tags () nil
232 (buffer text-buffer)
233 (start text-iter)
234 (end text-iter))
235
236(defun text-buffer-create-tag (buffer name &rest initargs)
237 (text-tag-table-add
238 (text-buffer-tag-table buffer)
239 (if name
240 (apply #'make-instance 'text-tag :name name initargs)
241 (apply #'make-instance 'text-tag initargs))))
242
243(defbinding text-buffer-get-iter-at-line-offset
244 (buffer line offset &optional (iter (make-instance 'text-iter))) nil
245 (buffer text-buffer)
8ab0db90 246 (iter text-iter :in/return)
18e45ba6 247 (line int)
248 (offset int))
249
250(defbinding text-buffer-get-iter-at-offset
251 (buffer offset &optional (iter (make-instance 'text-iter))) nil
252 (buffer text-buffer)
8ab0db90 253 (iter text-iter :in/return)
18e45ba6 254 ((case offset
255 (:start 0)
256 (:end -1)
257 (t offset)) int))
258
259(defbinding text-buffer-get-iter-at-line
260 (buffer line &optional (iter (make-instance 'text-iter))) nil
261 (buffer text-buffer)
8ab0db90 262 (iter text-iter :in/return)
18e45ba6 263 (line int))
264
265(defbinding text-buffer-get-iter-at-line-index
266 (buffer line index &optional (iter (make-instance 'text-iter))) nil
267 (buffer text-buffer)
8ab0db90 268 (iter text-iter :in/return)
18e45ba6 269 (line int)
270 (index int))
271
272(defbinding text-buffer-get-iter-at-mark
273 (buffer mark &optional (iter (make-instance 'text-iter))) nil
274 (buffer text-buffer)
8ab0db90 275 (iter text-iter :in/return)
18e45ba6 276 (mark text-mark))
277
278(defun text-buffer-get-iter-at-insert (buffer &optional (iter (make-instance 'text-iter)))
279 (text-buffer-get-iter-at-mark buffer (text-buffer-get-insert buffer) iter))
280
281(defbinding text-buffer-get-iter-at-child-anchor
282 (buffer anchor &optional (iter (make-instance 'text-iter))) nil
283 (buffer text-buffer)
8ab0db90 284 (iter text-iter :in/return)
18e45ba6 285 (anchor text-child-anchor))
286
287(defbinding text-buffer-get-bounds
288 (buffer &optional (start (make-instance 'text-iter))
289 (end (make-instance 'text-iter))) nil
290 (buffer text-buffer)
8ab0db90 291 (start text-iter :in/return)
292 (end text-iter :in/return))
18e45ba6 293
294(defbinding text-buffer-delete-selection () boolean
295 (buffer text-buffer)
296 (interactive boolean)
297 (default-editable boolean))
298
299(defbinding text-buffer-paste-clipboard () nil
300 (buffer text-buffer)
301 (clipboard clipboard)
302 (override-location (or null text-iter))
303 (default-editable boolean))
304
305(defbinding text-buffer-copy-clipboard () nil
306 (buffer text-buffer)
307 (clipboard clipboard))
308
309(defbinding text-buffer-cut-clipboard () nil
310 (buffer text-buffer)
311 (clipboard clipboard)
312 (default-editable boolean))
313
314(defbinding text-buffer-get-selection-bounds
315 (buffer &optional (start (make-instance 'text-iter))
ebb56f36 316 (end (make-instance 'text-iter))) boolean
18e45ba6 317 (buffer text-buffer)
8ab0db90 318 (start text-iter :in/return)
319 (end text-iter :in/return))
18e45ba6 320
321(defbinding text-buffer-begin-user-action () nil
322 (buffer text-buffer))
323
324(defbinding text-buffer-end-user-action () nil
325 (buffer text-buffer))
326
327(defmacro text-buffer-with-user-action ((buffer) &body body)
328 (let ((bufvar (make-symbol "BUFFER")))
329 `(let ((,bufvar ,buffer))
330 (text-buffer-begin-user-action ,bufvar)
331 (unwind-protect
332 (progn ,@body)
333 (text-buffer-end-user-action ,bufvar)))))
334
335(defbinding text-buffer-add-selection-clipboard () nil
336 (buffer text-buffer)
337 (clipboard clipboard))
338
339(defbinding text-buffer-remove-selection-clipboard () nil
340 (buffer text-buffer)
341 (clipboard clipboard))
342
343
344;;; Text Iter
345
2d7da5f0 346#?(pkg-exists-p "gtk+-2.0" :atleast-version "2.10.0")
7dd23329 347(defmethod allocate-foreign ((text-iter text-iter) &rest initargs)
348 (declare (ignore initargs))
349 (let ((size (foreign-size (class-of text-iter))))
350 (slice-alloc size)))
351
18e45ba6 352(defbinding text-iter-get-char () int
353 (iter text-iter))
354
355(defbinding text-iter-get-slice () string
356 (start text-iter)
357 (end text-iter))
358
359(defbinding text-iter-get-text () string
360 (start text-iter)
361 (end text-iter))
362
363(defbinding text-iter-get-visible-slice () string
364 (start text-iter)
365 (end text-iter))
366
367(defbinding text-iter-get-visible-text () string
368 (start text-iter)
369 (end text-iter))
370
371(defbinding text-iter-get-pixbuf () string
372 (iter text-iter))
373
374(defbinding text-iter-get-marks () (gslist text-mark)
375 (iter text-iter))
376
377(defbinding text-iter-get-toggled-tags () (gslist text-tag)
378 (iter text-iter)
379 (toggoled-on boolean))
380
381(defbinding text-iter-get-child-anchor () text-child-anchor
382 (iter text-iter))
383
384(defun %ensure-tag (tag iter)
385 (etypecase tag
386 (text-tag tag)
387 (string
388 (text-tag-table-lookup
389 (text-buffer-tag-table (text-iter-buffer iter)) tag))))
390
391(defbinding text-iter-begins-tag-p (iter tag) boolean
392 (iter text-iter)
393 ((%ensure-tag tag iter) text-tag))
394
395(defbinding text-iter-ends-tag-p (iter tag) boolean
396 (iter text-iter)
397 ((%ensure-tag tag iter) text-tag))
398
399(defbinding text-iter-toggles-tag-p (iter tag) boolean
400 (iter text-iter)
401 ((%ensure-tag tag iter) text-tag))
402
403(defbinding text-iter-has-tag-p (iter tag) boolean
404 (iter text-iter)
405 ((%ensure-tag tag iter) text-tag))
406
407(defbinding text-iter-get-tags () (gslist text-tag)
408 (iter text-iter))
409
410(defbinding text-iter-editable-p () boolean
411 (iter text-iter)
412 (default-setting boolean))
413
414(defbinding text-iter-can-insert-p () boolean
415 (iter text-iter)
416 (default-editability boolean))
417
418(defbinding text-iter-starts-word-p () boolean
419 (iter text-iter))
420
421(defbinding text-iter-ends-word-p () boolean
422 (iter text-iter))
423
424(defbinding text-iter-inside-word-p () boolean
425 (iter text-iter))
426
427(defbinding text-iter-starts-line-p () boolean
428 (iter text-iter))
429
430(defbinding text-iter-ends-line-p () boolean
431 (iter text-iter))
432
433(defbinding text-iter-starts-sentence-p () boolean
434 (iter text-iter))
435
436(defbinding text-iter-ends-sentence-p () boolean
437 (iter text-iter))
438
439(defbinding text-iter-inside-sentence-p () boolean
440 (iter text-iter))
441
442(defbinding text-iter-is-cursor-position-p () boolean
443 (iter text-iter))
444
445(defbinding text-iter-get-chars-in-line () int
446 (iter text-iter))
447
448(defbinding text-iter-get-bytes-in-line () int
449 (iter text-iter))
450
451(defbinding text-iter-get-attributes
452 (iter &optional (values (make-instance 'text-attributes))) boolean
453 (iter text-iter)
8ab0db90 454 (values text-attributes :in/return))
18e45ba6 455
456(defbinding text-iter-get-language () pango:language
457 (iter text-iter))
458
459(defbinding text-iter-is-end-p () boolean
460 (iter text-iter))
461
462(defbinding text-iter-is-start-p () boolean
463 (iter text-iter))
464
465(defbinding text-iter-forward-char () boolean
466 (iter text-iter))
467
468(defbinding text-iter-backward-char () boolean
469 (iter text-iter))
470
471(defbinding text-iter-forward-chars () boolean
472 (iter text-iter)
473 (count int))
474
475(defbinding text-iter-backward-chars () boolean
476 (iter text-iter)
477 (count int))
478
479(defbinding text-iter-forward-line () boolean
480 (iter text-iter))
481
482(defbinding text-iter-backward-line () boolean
483 (iter text-iter))
484
485(defbinding text-iter-forward-lines () boolean
486 (iter text-iter)
487 (count int))
488
489(defbinding text-iter-backward-lines () boolean
490 (iter text-iter)
491 (count int))
492
493(defbinding text-iter-forward-word-ends () boolean
494 (iter text-iter)
495 (count int))
496
497(defbinding text-iter-backward-word-starts () boolean
498 (iter text-iter)
499 (count int))
500
501(defbinding text-iter-forward-word-end () boolean
502 (iter text-iter))
503
504(defbinding text-iter-backward-word-start () boolean
505 (iter text-iter))
506
507(defbinding text-iter-forward-cursor-position () boolean
508 (iter text-iter))
509
510(defbinding text-iter-backward-cursor-position () boolean
511 (iter text-iter))
512
513(defbinding text-iter-forward-cursor-positions () boolean
514 (iter text-iter)
515 (count int))
516
517(defbinding text-iter-backward-cursor-positions () boolean
518 (iter text-iter)
519 (count int))
520
521(defbinding text-iter-backward-sentence-start () boolean
522 (iter text-iter))
523
524(defbinding text-iter-backward-sentence-starts () boolean
525 (iter text-iter)
526 (count int))
527
528(defbinding text-iter-forward-sentence-end () boolean
529 (iter text-iter))
530
531(defbinding text-iter-forward-sentence-ends () boolean
532 (iter text-iter)
533 (count int))
534
535(defbinding text-iter-forward-visible-word-ends () boolean
536 (iter text-iter)
537 (count int))
538
539(defbinding text-iter-backward-visible-word-starts () boolean
540 (iter text-iter)
541 (count int))
542
543(defbinding text-iter-forward-visible-word-end () boolean
544 (iter text-iter))
545
546(defbinding text-iter-backward-visible-word-start () boolean
547 (iter text-iter))
548
549(defbinding text-iter-forward-visible-cursor-position () boolean
550 (iter text-iter))
551
552(defbinding text-iter-backward-visible-cursor-position () boolean
553 (iter text-iter))
554
555(defbinding text-iter-forward-visible-cursor-positions () boolean
556 (iter text-iter)
557 (count int))
558
559(defbinding text-iter-backward-visible-cursor-positions () boolean
560 (iter text-iter)
561 (count int))
562
563(defbinding text-iter-forward-to-end () nil
564 (iter text-iter))
565
566(defbinding text-iter-forward-to-line-end () boolean
567 (iter text-iter))
568
569(defbinding text-iter-forward-to-tag-toggle (iter tag) boolean
570 (iter text-iter)
571 ((%ensure-tag tag iter) text-tag))
572
573(defbinding text-iter-backward-to-tag-toggle (iter tag) boolean
574 (iter text-iter)
575 ((%ensure-tag tag iter) text-tag))
576
56ccd5b7 577(define-callback-marshal %text-char-predicate-callback boolean (int))
18e45ba6 578
579(defbinding text-iter-forward-find-char (iter predicate &optional limit) boolean
580 (iter text-iter)
56ccd5b7 581 (%text-char-predicate-callback callback)
18e45ba6 582 ((register-callback-function predicate) unsigned-int)
583 (limit (or null text-iter)))
584
585(defbinding text-iter-backward-find-char (iter predicate &optional limit) boolean
586 (iter text-iter)
56ccd5b7 587 (%text-char-predicate-callback callback)
18e45ba6 588 ((register-callback-function predicate) unsigned-int)
589 (limit (or null text-iter)))
590
591(defbinding text-iter-forward-search
592 (iter text &optional flags limit (match-start (make-instance 'text-iter))
593 (match-end (make-instance 'text-iter))) boolean
594 (iter text-iter)
595 (text string)
596 (flags text-search-flags)
8ab0db90 597 (match-start text-iter :in/return)
598 (match-end text-iter :in/return)
18e45ba6 599 (limit (or null text-iter)))
600
601(defbinding text-iter-backward-search
602 (iter text &optional flags limit (match-start (make-instance 'text-iter))
603 (match-end (make-instance 'text-iter))) boolean
604 (iter text-iter)
605 (text string)
606 (flags text-search-flags)
8ab0db90 607 (match-start text-iter :in/return)
608 (match-end text-iter :in/return)
18e45ba6 609 (limit (or null text-iter)))
610
611(defbinding text-iter-equal-p () boolean
612 (lhs text-iter)
613 (rhs text-iter))
614
615(defbinding text-iter-compare () int
616 (lhs text-iter)
617 (rhs text-iter))
618
619(defbinding text-iter-in-range-p () boolean
620 (iter text-iter)
621 (start text-iter)
622 (end text-iter))
623
624(defbinding text-iter-order () nil
625 (first text-iter)
626 (second text-iter))
627
628
0763f21d 629
630;;; Text Tag
631
632(defbinding text-tag-event () boolean
633 (tag text-tag)
634 (event-object gobject)
635 (event gdk:event)
636 (iter text-iter))
637
638
639
18e45ba6 640;;; Text Tag Table
641
642(defbinding text-tag-table-add () nil
643 (table text-tag-table)
644 (tag text-tag))
645
646(defbinding text-tag-table-remove () nil
647 (table text-tag-table)
648 (tag text-tag))
649
650(defbinding text-tag-table-lookup () text-tag
651 (table text-tag-table)
652 (name string))
653
56ccd5b7 654(define-callback-marshal %text-tag-table-foreach-callback nil (text-tag))
18e45ba6 655
656(defbinding text-tag-table-foreach (table function) nil
657 (table text-tag-table)
56ccd5b7 658 (%text-tag-table-foreach-callback callback)
18e45ba6 659 ((register-callback-function function) unsigned-int))
660
18e45ba6 661
ced65152 662;;; Text View
663
664(defbinding text-view-scroll-to-mark () nil
665 (text-view text-view)
666 (mark text-mark)
667 (within-margin boolean)
668 (use-align boolean)
669 (xalign double-float)
670 (yalign double-float))
671
672(defbinding text-view-scroll-to-iter () nil
673 (text-view text-view)
674 (iter text-iter)
675 (within-margin boolean)
676 (use-align boolean)
677 (xalign double-float)
678 (yalign double-float))
679
680(defbinding text-view-scroll-mark-onscreen () nil
681 (text-view text-view)
682 (mark text-mark))
683
684(defbinding text-view-move-mark-onscreen () nil
685 (text-view text-view)
686 (mark text-mark))
687
688(defbinding text-view-place-cursor-onscreen () nil
689 (text-view text-view))
690
691(defbinding text-view-get-visible-rect
692 (text-view &optional (rect (make-instance 'gdk:rectangle))) nil
693 (text-view text-view)
8ab0db90 694 (rect gdk:rectangle :in/return))
ced65152 695
696(defbinding text-view-get-iter-location
697 (text-view iter &optional (location (make-instance 'gdk:rectangle))) nil
698 (text-view text-view)
699 (iter text-iter)
8ab0db90 700 (location gdk:rectangle :in/return))
ced65152 701
702(defbinding text-view-get-line-at-y
703 (text-view y &optional (iter (make-instance 'text-iter))) nil
704 (text-view text-view)
8ab0db90 705 (iter text-iter :in/return)
ced65152 706 (y int)
707 (line-top int :out))
708
709(defbinding text-view-get-line-yrange () nil
710 (text-view text-view)
711 (iter text-iter)
712 (y int :out)
713 (height int :out))
714
715(defbinding text-view-get-iter-at-location
716 (text-view x y &optional (iter (make-instance 'text-iter))) nil
717 (text-view text-view)
8ab0db90 718 (iter text-iter :in/return)
ced65152 719 (x int)
720 (y int))
721
722(defbinding text-view-buffer-to-window-coords () nil
723 (text-view text-view)
724 (win text-window-type)
725 (buffer-x int)
726 (buffer-y int)
727 (window-x int :out)
728 (window-y int :out))
729
730(defbinding text-view-window-to-buffer-coords () nil
731 (text-view text-view)
732 (win text-window-type)
733 (window-x int)
734 (window-y int)
735 (buffer-x int :out)
736 (buffer-y int :out))
737
738(defbinding text-view-get-window () gdk:window
739 (text-view text-view)
740 (win text-window-type))
741
742(defbinding text-view-get-window-type () text-window-type
743 (text-view text-view)
744 (window gdk:window))
745
746(defbinding %text-view-set-border-window-size () nil
747 (text-view text-view)
748 (win text-window-type)
749 (size int))
750
751(defun (setf text-view-border-window-size) (size text-view win)
752 (%text-view-set-border-window-size text-view win size)
753 size)
754
755(defbinding (text-view-border-window-size
756 "gtk_text_view_get_border_window_size") () int
757 (text-view text-view)
758 (win text-window-type))
759
760(defbinding text-view-forward-display-line () boolean
761 (text-view text-view)
762 (iter text-iter))
763
764(defbinding text-view-backward-display-line () boolean
765 (text-view text-view)
766 (iter text-iter))
767
768(defbinding text-view-forward-display-line-end () boolean
769 (text-view text-view)
770 (iter text-iter))
771
772(defbinding text-view-backward-display-line-start () boolean
773 (text-view text-view)
774 (iter text-iter))
775
776(defbinding (text-view-starts-display-line-p
777 "gtk_text_view_starts_display_line") () boolean
778 (text-view text-view)
779 (iter text-iter))
780
781(defbinding text-view-move-visually () boolean
782 (text-view text-view)
783 (iter text-iter)
784 (count int))
785
786(defbinding text-view-add-child-at-anchor () nil
787 (text-view text-view)
788 (child widget)
789 (anchor text-child-anchor))
790
791(defbinding text-view-add-child-in-window () nil
792 (text-view text-view)
793 (child widget)
794 (win text-window-type)
795 (x int)
796 (y int))
797
798(defbinding text-view-move-child () nil
799 (text-view text-view)
800 (child widget)
801 (x int)
802 (y int))
803
804
805;; Text Child Anchor
806
807(defbinding (text-view-child-anchor-deleted-p
808 "gtk_text_child_anchor_get_deleted") () boolean
809 (anchor text-child-anchor))