forked from dmitryvk/cl-gtk2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgdk.cursor.lisp
50 lines (35 loc) · 1.46 KB
/
gdk.cursor.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(in-package :gdk)
(defcstruct %gdk-cursor
(cursor-type cursor-type))
(defctype %gdk-cursor (:struct %gdk-cursor))
(defun cursor-cursor-type (cursor)
(foreign-slot-value (pointer cursor) '%gdk-cursor 'cursor-type))
(export 'cursor-cursor-type)
(defcfun (cursor-new "gdk_cursor_new") (g-boxed-foreign cursor :return)
(cursor-type cursor-type))
(export 'cursor-new)
(defcfun (cursor-new-from-pixmap "gdk_cursor_new_from_pixmap") (g-boxed-foreign cursor :return)
(source (g-object pixmap))
(make (g-object pixmap))
(fg-color (g-boxed-foreign color))
(bg-color (g-boxed-foreign color))
(x :int)
(y :int))
(export 'cursor-new-from-pixmap)
(defcfun (cursor-new-from-pixbuf "gdk_cursor_new_from_pixbuf") (g-boxed-foreign cursor :return)
(display (g-object display))
(pixbuf (g-object pixbuf))
(x :int)
(y :int))
(export 'cursor-new-from-pixbuf)
(defcfun (cursor-new-from-name "gdk_cursor_new_from_name") (g-boxed-foreign cursor :return)
(display (g-object display))
(name :string))
(export 'cursor-new-from-name)
(defcfun (cursor-new-for-display "gdk_cursor_new_for_display") (g-boxed-foreign cursor :return)
(display (g-object display))
(cursor-type cursor-type))
(export 'cursor-new-for-display)
(define-boxed-opaque-accessor cursor cursor-display :type (g-object display) :reader "gdk_cursor_get_display")
(define-boxed-opaque-accessor cursor cursor-image :type (g-object pixbuf) :reader "gdk_cursor_get_image")
(export '(cursor-display cursor-image))