1 ! Copyright (C) 2008 Matthew Willis.
2 ! Copyright (C) 2009 Slava Pestov.
3 ! See http://factorcode.org/license.txt for BSD license
4 USING: arrays system alien.destructors alien.c-types alien.syntax alien
5 combinators math.rectangles kernel ;
8 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9 ! Helpful functions from other parts of pango
10 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
13 { [ os winnt? ] [ "libpango-1.0-0.dll" ] }
14 { [ os macosx? ] [ "/opt/local/lib/libpango-1.0.0.dylib" ] }
15 { [ os unix? ] [ "libpango-1.0.so" ] }
16 } cond "cdecl" add-library >>
20 CONSTANT: PANGO_SCALE 1024
22 FUNCTION: PangoContext*
23 pango_context_new ( ) ;
25 C-STRUCT: PangoRectangle
31 : PangoRectangle>rect ( PangoRectangle -- rect )
32 [ [ PangoRectangle-x ] [ PangoRectangle-y ] bi 2array ]
33 [ [ PangoRectangle-width ] [ PangoRectangle-height ] bi 2array ] bi
36 : dummy-pango-context ( -- context )
37 \ dummy-pango-context [ pango_context_new ] initialize-alien ;