]> gitweb.factorcode.org Git - factor.git/blob - basis/pango/cairo/cairo.factor
Working on X11 backend
[factor.git] / basis / pango / cairo / cairo.factor
1 ! Copyright (C) 2008 Matthew Willis.
2 ! Copyright (C) 2009 Slava Pestov.
3 ! See http://factorcode.org/license.txt for BSD license.
4 !
5 ! pangocairo bindings, from pango/pangocairo.h
6 USING: alien alien.syntax combinators system cairo.ffi ;
7 IN: pango.cairo
8
9 << {
10     { [ os winnt? ] [ "pangocairo" "libpangocairo-1.0-0.dll" "cdecl" add-library ] }
11     { [ os macosx? ] [ "pangocairo" "/opt/local/lib/libpangocairo-1.0.0.dylib" "cdecl" add-library ] }
12     { [ os unix? ] [ ] }
13 } cond >>
14
15 LIBRARY: pangocairo
16
17 FUNCTION: PangoFontMap*
18 pango_cairo_font_map_new ( ) ;
19
20 FUNCTION: PangoFontMap*
21 pango_cairo_font_map_new_for_font_type ( cairo_font_type_t fonttype ) ;
22
23 FUNCTION: PangoFontMap*
24 pango_cairo_font_map_get_default ( ) ;
25
26 FUNCTION: cairo_font_type_t
27 pango_cairo_font_map_get_font_type ( PangoCairoFontMap* fontmap ) ;
28
29 FUNCTION: void
30 pango_cairo_font_map_set_resolution ( PangoCairoFontMap* fontmap, double dpi ) ;
31
32 FUNCTION: double
33 pango_cairo_font_map_get_resolution ( PangoCairoFontMap* fontmap ) ;
34
35 FUNCTION: PangoContext*
36 pango_cairo_font_map_create_context ( PangoCairoFontMap* fontmap ) ;
37
38 FUNCTION: cairo_scaled_font_t*
39 pango_cairo_font_get_scaled_font ( PangoCairoFont* font ) ;
40
41 ! Update a Pango context for the current state of a cairo context
42 FUNCTION: void
43 pango_cairo_update_context ( cairo_t* cr, PangoContext* context ) ;
44
45 FUNCTION: void
46 pango_cairo_context_set_font_options ( PangoContext* context, cairo_font_options_t* options ) ;
47
48 FUNCTION: cairo_font_options_t*
49 pango_cairo_context_get_font_options ( PangoContext* context ) ;
50
51 FUNCTION: void
52 pango_cairo_context_set_resolution ( PangoContext* context, double dpi ) ;
53
54 FUNCTION: double
55 pango_cairo_context_get_resolution ( PangoContext* context ) ;
56
57 ! Convenience
58 FUNCTION: PangoLayout*
59 pango_cairo_create_layout ( cairo_t* cr ) ;
60
61 FUNCTION: void
62 pango_cairo_update_layout ( cairo_t* cr, PangoLayout* layout ) ;
63
64 ! Rendering
65 FUNCTION: void
66 pango_cairo_show_glyph_string ( cairo_t* cr, PangoFont* font, PangoGlyphString* glyphs ) ;
67
68 FUNCTION: void
69 pango_cairo_show_layout_line ( cairo_t* cr, PangoLayoutLine* line ) ;
70
71 FUNCTION: void
72 pango_cairo_show_layout ( cairo_t* cr, PangoLayout* layout ) ;
73
74 FUNCTION: void
75 pango_cairo_show_error_underline ( cairo_t* cr, double x, double y, double width, double height ) ;
76
77 ! Rendering to a path
78 FUNCTION: void
79 pango_cairo_glyph_string_path ( cairo_t* cr, PangoFont* font, PangoGlyphString* glyphs ) ;
80
81 FUNCTION: void
82 pango_cairo_layout_line_path  ( cairo_t* cr, PangoLayoutLine* line ) ;
83
84 FUNCTION: void
85 pango_cairo_layout_path ( cairo_t* cr, PangoLayout* layout ) ;
86
87 FUNCTION: void
88 pango_cairo_error_underline_path ( cairo_t* cr, double x, double y, double width, double height ) ;