2010-09-29 05:08:31 -04:00
|
|
|
! Copyright (C) 2010 Anton Gorenko.
|
2010-05-09 13:21:12 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2010-09-29 05:08:31 -04:00
|
|
|
USING: accessors combinators gobject-introspection.common
|
|
|
|
gobject-introspection.ffi gobject-introspection.loader
|
|
|
|
gobject-introspection.types kernel lexer locals namespaces parser
|
|
|
|
sequences xml ;
|
2010-07-17 07:17:03 -04:00
|
|
|
IN: gobject-introspection
|
2010-05-09 13:21:12 -04:00
|
|
|
|
2010-09-29 05:08:31 -04:00
|
|
|
<PRIVATE
|
2010-05-09 13:21:12 -04:00
|
|
|
|
2010-05-26 14:17:14 -04:00
|
|
|
:: define-gir-vocab ( file-name -- )
|
2010-05-09 13:21:12 -04:00
|
|
|
file-name file>xml xml>repository
|
|
|
|
{
|
2010-09-29 05:08:31 -04:00
|
|
|
[ namespace>> name>> current-namespace-name set-global ]
|
|
|
|
[ def-ffi-repository ]
|
2010-05-11 13:31:35 -04:00
|
|
|
} cleave
|
2010-09-29 05:08:31 -04:00
|
|
|
V{ } clone implement-structs set-global ;
|
|
|
|
|
|
|
|
PRIVATE>
|
2010-05-09 13:21:12 -04:00
|
|
|
|
2010-05-26 14:17:14 -04:00
|
|
|
SYNTAX: GIR: scan define-gir-vocab ;
|
2010-05-11 13:31:35 -04:00
|
|
|
|
|
|
|
SYNTAX: IMPLEMENT-STRUCTS:
|
2010-07-25 12:18:32 -04:00
|
|
|
";" parse-tokens
|
|
|
|
implement-structs [ swap append! ] change-global ;
|
|
|
|
|
2011-03-05 03:11:26 -05:00
|
|
|
SYNTAX: FOREIGN-ATOMIC-TYPE:
|
|
|
|
scan-token scan-object swap register-atomic-type ;
|
|
|
|
|
2010-09-29 05:08:31 -04:00
|
|
|
SYNTAX: FOREIGN-ENUM-TYPE:
|
|
|
|
scan-token scan-object swap register-enum-type ;
|
|
|
|
|
|
|
|
SYNTAX: FOREIGN-RECORD-TYPE:
|
|
|
|
scan-token scan-object swap register-record-type ;
|