/[gtk-cffi]/gtk-cffi/gtk/text-view.lisp
ViewVC logotype

Contents of /gtk-cffi/gtk/text-view.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations)
Fri Aug 24 19:27:54 2012 UTC (19 months, 3 weeks ago) by rklochkov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
Fixed CFFI-OBJECTS:FREE-PTR generic usage (now specialized with EQL)
1 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; text-view.lisp --- GtkTextView, GtkTextChildAnchor
4 ;;;
5 ;;; Copyright (C) 2012, Roman Klochkov <kalimehtar@mail.ru>
6 ;;;
7
8 (in-package :gtk-cffi)
9
10 (defclass text-view (container scrollable)
11 ())
12
13 (defcfun gtk-text-view-new-with-buffer :pointer (buffer pobject))
14
15 (defcfun gtk-text-view-new :pointer)
16
17 (defmethod gconstructor ((text-view text-view)
18 &key buffer &allow-other-keys)
19 (initialize text-view 'buffer)
20 (if buffer
21 (gtk-text-view-new-with-buffer buffer)
22 (gtk-text-view-new)))
23
24 (defcenum text-window-type
25 :private :widget :text
26 :left :right :top :bottom)
27
28 (defslots text-view
29 buffer pobject
30 wrap-mode wrap-mode
31 editable :boolean
32 cursor-visible :boolean
33 overwrite :boolean
34 pixels-above-lines :int
35 pixels-below-lines :int
36 pixels-inside-wrap :int
37 justification justification
38 left-margin :int
39 right-margin :int
40 indent :int
41 tabs pango-cffi:tab-array
42 accepts-tab :boolean)
43
44
45 (deffuns text-view
46 (scroll-to-mark :void
47 (text-mark pobject) (within-margin :double)
48 (use-align :boolean) (xalign :double) (yalign :double))
49 (scroll-to-iter :void
50 (text-iter pobject) (within-margin :double)
51 (use-align :boolean) (xalign :double) (yalign :double))
52 (scroll-mark-onscreen :void (text-mark pobject))
53 (move-mark-onscreen :boolean (text-mark pobject))
54 (place-cursor-onscreen :boolean)
55 ((text-view-window . get-window) pobject (win text-window-type))
56 (:get window-type text-window-type &key (window pobject))
57 (:get border-window-size :int (type text-window-type))
58 (:set-last border-window-size :int (type text-window-type))
59 (forward-display-line :boolean (text-iter pobject))
60 (backward-display-line :boolean (text-iter pobject))
61 (forward-display-line-end :boolean (text-iter pobject))
62 (backward-display-line-start :boolean (text-iter pobject))
63 (starts-display-line :boolean (text-iter pobject))
64 (move-visually :boolean (text-iter pobject) (count :int))
65 (add-child-at-anchor :void (child pobject) (anchor pobject))
66 (add-child-in-window :void
67 (child pobject) (win text-window-type)
68 (xpos :int) (ypos :int))
69 (move-child :void (child pobject) (xpos :int) (ypos :int))
70 (:get default-attributes (struct text-attributes))
71 (im-context-filter-keypress :boolean (event pobject))
72 (reset-im-context :void))
73
74 (defclass text-child-anchor (g-object)
75 ())
76
77 (defcfun gtk-text-child-anchor-new :pointer)
78 (defmethod gconstructor ((text-child-anchor text-child-anchor) &key
79 &allow-other-keys)
80 (gtk-text-child-anchor-new))
81
82 (defgtkgetter widgets g-list-object text-child-anchor)
83
84
85
86 (init-slots text-view)
87
88
89
90

  ViewVC Help
Powered by ViewVC 1.1.5