repos
/
qt.core
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
Split up in qt.core.
Annotate for file /src/string-list.lisp
2010-01-10 tobias
1
(in-package :cl-smoke.qt.core)
2009-04-05 tobias
2
2010-01-10 tobias
3
(defcfun cl-smoke-string-list-size :int
2009-04-05 tobias
4
(string-list :pointer))
17:56:16 '
5
2010-01-10 tobias
6
(defcfun cl-smoke-string-list-at :pointer
2009-04-05 tobias
7
(string-list :pointer)
17:56:16 '
8
(index :int))
'
9
2010-01-10 tobias
10
(defcfun cl-smoke-free-string-list :void
2009-04-05 tobias
11
(string-list :pointer))
17:56:16 '
12
2010-01-10 tobias
13
(defcfun cl-smoke-make-string-list :pointer)
2009-04-05 tobias
14
2010-01-10 tobias
15
(defcfun cl-smoke-string-list-append :void
2009-04-05 tobias
16
(string-list :pointer)
17:56:16 '
17
(string :pointer)
'
18
(length :int))
'
19
2009-08-02 tobias
20
(defun from-string-list (string-list)
2010-01-10 tobias
21
(let ((vector (make-array (cl-smoke-string-list-size string-list)
2009-08-02 tobias
22
:initial-element ""
11:15:21 '
23
:element-type 'string)))
2009-04-05 tobias
24
(dotimes (index (length vector) vector)
17:56:16 '
25
(setf (aref vector index)
'
26
(cxx:data (make-instance 'qt:byte-array
2010-01-10 tobias
27
:pointer (cl-smoke-string-list-at
2009-04-05 tobias
28
string-list index)))))))
2009-08-02 tobias
29
11:15:21 '
30
(define-to-lisp-translation ("QStringList" "const QStringList&")
2010-01-10 tobias
31
from-string-list cl-smoke-free-string-list)
2009-04-05 tobias
32
2009-08-02 tobias
33
(defun coerce-string-list (sequence)
2010-01-10 tobias
34
(let ((string-list (cl-smoke-make-string-list)))
2009-08-02 tobias
35
(map nil
11:15:21 '
36
#'(lambda (string)
'
37
(with-foreign-string ((data length) string :null-terminated-p nil)
2010-01-10 tobias
38
(cl-smoke-string-list-append string-list data length)))
2009-08-02 tobias
39
sequence)
11:15:21 '
40
(make-cleanup-pointer
2010-01-10 tobias
41
string-list #'cl-smoke-free-string-list)))
2009-05-11 tobias
42
2009-09-02 tobias
43
(defun string-list-p (sequence)
12:00:35 '
44
(every #'stringp sequence))
'
45
2009-05-11 tobias
46
(define-from-lisp-translation "const QStringList&"
2009-09-02 tobias
47
(and (vector string)
12:00:35 '
48
(satisfies string-list-p))
'
49
coerce-string-list)
2009-05-11 tobias
50