Initial commit
[cl-gtk2.git] / gtk / gtk.functions.lisp
1 (in-package :gtk)
2
3 (defcfun gtk-widget-show-all :void
4   (widget (g-object widget)))
5
6 (defcfun gtk-widget-queue-draw :void
7   (widget (g-object widget)))
8
9 (defcfun gtk-widget-create-pango-layout (g-object gdk::pango-layout)
10   (widget (g-object widget))
11   (text :string))
12
13 (defcfun gtk-box-pack-start :void
14   (box (g-object box))
15   (child (g-object widget))
16   (expand :boolean)
17   (fill :boolean)
18   (padding :uint))
19
20 (defun box-pack-start (box child &key (expand t) (fill t) (padding 0))
21   (gtk-box-pack-start box child expand fill padding))
22
23 (defcfun (container-add "gtk_container_add") :void
24   (container (g-object container))
25   (widget (g-object widget)))
26
27 (defcfun (object-destroy "gtk_object_destroy") :void
28   (object (g-object gtk-object)))
29
30 (defcfun gtk-text-buffer-insert :void
31   (buffer (g-object text-buffer))
32   (iter :pointer)
33   (text :string)
34   (len :int))
35
36 (defun text-buffer-insert (buffer iter text)
37   (declare (ignore iter))
38   (gtk-text-buffer-insert buffer (null-pointer) text (length text)))
39
40 (define-g-flags "GtkAttachOptions" attach-options () :expand :shrink :fill)
41
42 (defcfun gtk-table-attach :void
43   (table (g-object table))
44   (child (g-object widget))
45   (left-attach :uint)
46   (right-attach :uint)
47   (top-attach :uint)
48   (bottom-attach :uint)
49   (x-options attach-options)
50   (y-options attach-options)
51   (x-padding :uint)
52   (y-padding :uint))
53
54 (defun table-attach (table widget left right top bottom &key (x-options '(:expand :fill)) (y-options '(:expand :fill)) (x-padding 0) (y-padding 0))
55   (gtk-table-attach table widget left right top bottom x-options y-options x-padding y-padding))