chiark / gitweb /
Initial checkin
[clg] / gtk / gtktext.lisp
CommitLineData
ced65152 1;; Common Lisp bindings for GTK+ v2.0
2;; Copyright (C) 1999-2004 Espen S. Johnsen <espen@users.sourceforge.net>
3;;
4;; This library is free software; you can redistribute it and/or
5;; modify it under the terms of the GNU Lesser General Public
6;; License as published by the Free Software Foundation; either
7;; version 2 of the License, or (at your option) any later version.
8;;
9;; This library is distributed in the hope that it will be useful,
10;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12;; Lesser General Public License for more details.
13;;
14;; You should have received a copy of the GNU Lesser General Public
15;; License along with this library; if not, write to the Free Software
16;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18;; $Id: gtktext.lisp,v 1.1 2004-12-04 18:19:59 espen Exp $
19
20
21(in-package "GTK")
22
23;;; Text View
24
25(defbinding text-view-scroll-to-mark () nil
26 (text-view text-view)
27 (mark text-mark)
28 (within-margin boolean)
29 (use-align boolean)
30 (xalign double-float)
31 (yalign double-float))
32
33(defbinding text-view-scroll-to-iter () nil
34 (text-view text-view)
35 (iter text-iter)
36 (within-margin boolean)
37 (use-align boolean)
38 (xalign double-float)
39 (yalign double-float))
40
41(defbinding text-view-scroll-mark-onscreen () nil
42 (text-view text-view)
43 (mark text-mark))
44
45(defbinding text-view-move-mark-onscreen () nil
46 (text-view text-view)
47 (mark text-mark))
48
49(defbinding text-view-place-cursor-onscreen () nil
50 (text-view text-view))
51
52(defbinding text-view-get-visible-rect
53 (text-view &optional (rect (make-instance 'gdk:rectangle))) nil
54 (text-view text-view)
55 (rect gdk:rectangle :return))
56
57(defbinding text-view-get-iter-location
58 (text-view iter &optional (location (make-instance 'gdk:rectangle))) nil
59 (text-view text-view)
60 (iter text-iter)
61 (location gdk:rectangle :return))
62
63(defbinding text-view-get-line-at-y
64 (text-view y &optional (iter (make-instance 'text-iter))) nil
65 (text-view text-view)
66 (iter text-iter :return)
67 (y int)
68 (line-top int :out))
69
70(defbinding text-view-get-line-yrange () nil
71 (text-view text-view)
72 (iter text-iter)
73 (y int :out)
74 (height int :out))
75
76(defbinding text-view-get-iter-at-location
77 (text-view x y &optional (iter (make-instance 'text-iter))) nil
78 (text-view text-view)
79 (iter text-iter :return)
80 (x int)
81 (y int))
82
83(defbinding text-view-buffer-to-window-coords () nil
84 (text-view text-view)
85 (win text-window-type)
86 (buffer-x int)
87 (buffer-y int)
88 (window-x int :out)
89 (window-y int :out))
90
91(defbinding text-view-window-to-buffer-coords () nil
92 (text-view text-view)
93 (win text-window-type)
94 (window-x int)
95 (window-y int)
96 (buffer-x int :out)
97 (buffer-y int :out))
98
99(defbinding text-view-get-window () gdk:window
100 (text-view text-view)
101 (win text-window-type))
102
103(defbinding text-view-get-window-type () text-window-type
104 (text-view text-view)
105 (window gdk:window))
106
107(defbinding %text-view-set-border-window-size () nil
108 (text-view text-view)
109 (win text-window-type)
110 (size int))
111
112(defun (setf text-view-border-window-size) (size text-view win)
113 (%text-view-set-border-window-size text-view win size)
114 size)
115
116(defbinding (text-view-border-window-size
117 "gtk_text_view_get_border_window_size") () int
118 (text-view text-view)
119 (win text-window-type))
120
121(defbinding text-view-forward-display-line () boolean
122 (text-view text-view)
123 (iter text-iter))
124
125(defbinding text-view-backward-display-line () boolean
126 (text-view text-view)
127 (iter text-iter))
128
129(defbinding text-view-forward-display-line-end () boolean
130 (text-view text-view)
131 (iter text-iter))
132
133(defbinding text-view-backward-display-line-start () boolean
134 (text-view text-view)
135 (iter text-iter))
136
137(defbinding (text-view-starts-display-line-p
138 "gtk_text_view_starts_display_line") () boolean
139 (text-view text-view)
140 (iter text-iter))
141
142(defbinding text-view-move-visually () boolean
143 (text-view text-view)
144 (iter text-iter)
145 (count int))
146
147(defbinding text-view-add-child-at-anchor () nil
148 (text-view text-view)
149 (child widget)
150 (anchor text-child-anchor))
151
152(defbinding text-view-add-child-in-window () nil
153 (text-view text-view)
154 (child widget)
155 (win text-window-type)
156 (x int)
157 (y int))
158
159(defbinding text-view-move-child () nil
160 (text-view text-view)
161 (child widget)
162 (x int)
163 (y int))
164
165
166;; Text Child Anchor
167
168(defbinding (text-view-child-anchor-deleted-p
169 "gtk_text_child_anchor_get_deleted") () boolean
170 (anchor text-child-anchor))