]> gitweb.factorcode.org Git - factor.git/blob - basis/gdk/ffi/ffi.factor
Remove Windows CE from core/ basis/ and build-support/
[factor.git] / basis / gdk / ffi / ffi.factor
1 ! Copyright (C) 2010 Anton Gorenko.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien alien.c-types alien.destructors alien.libraries
4 alien.syntax cairo.ffi classes.struct combinators
5 gobject-introspection gobject-introspection.standard-types
6 kernel system vocabs.loader ;
7 IN: gdk.ffi
8
9 <<
10 "pango.ffi" require
11 "gdk.pixbuf.ffi" require
12 >>
13
14 LIBRARY: gdk
15
16 <<
17 "gdk" {
18     { [ os windows? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] }
19     { [ os unix? ] [ drop ] }
20 } cond
21 >>
22
23 ! <workaround these types are from cairo 1.10
24 STRUCT: cairo_rectangle_int_t
25     { x int } { y int } { width int } { height int } ;
26
27 C-TYPE: cairo_region_t
28 ! workaround>
29
30 FOREIGN-RECORD-TYPE: cairo.RectangleInt cairo_rectangle_int_t
31 FOREIGN-RECORD-TYPE: cairo.Region cairo_region_t
32 FOREIGN-RECORD-TYPE: cairo.FontOptions cairo_font_options_t
33 FOREIGN-RECORD-TYPE: cairo.Surface cairo_surface_t
34 FOREIGN-RECORD-TYPE: cairo.Pattern cairo_pattern_t
35 FOREIGN-RECORD-TYPE: cairo.Context cairo_t
36 FOREIGN-ENUM-TYPE: cairo.Content cairo_content_t
37
38 GIR: vocab:gdk/Gdk-3.0.gir
39
40 DESTRUCTOR: gdk_cursor_unref
41
42 STRUCT: GdkEventButton
43     { type GdkEventType }
44     { window GdkWindow* }
45     { send_event gint8 }
46     { time guint32 }
47     { x gdouble }
48     { y gdouble }
49     { axes gdouble* }
50     { state guint }
51     { button guint }
52     { device GdkDevice* }
53     { x_root gdouble }
54     { y_root gdouble } ;
55
56 STRUCT: GdkEventConfigure
57     { type GdkEventType }
58     { window GdkWindow* }
59     { send_event gint8 }
60     { x gint }
61     { y gint }
62     { width gint }
63     { height gint } ;
64
65 STRUCT: GdkEventKey
66     { type GdkEventType }
67     { window GdkWindow* }
68     { send_event gint8 }
69     { time guint32 }
70     { state guint }
71     { keyval guint }
72     { length gint }
73     { string gchar* }
74     { hardware_keycode guint16 }
75     { group guint8 }
76     { is_modifier uint bits: 1 } ;
77
78 STRUCT: GdkEventMotion
79     { type GdkEventType }
80     { window GdkWindow* }
81     { send_event gint8 }
82     { time guint32 }
83     { x gdouble }
84     { y gdouble }
85     { axes gdouble* }
86     { state guint }
87     { is_hint gint16 }
88     { device GdkDevice* }
89     { x_root gdouble }
90     { y_root gdouble } ;
91
92 STRUCT: GdkEventScroll
93     { type GdkEventType }
94     { window GdkWindow* }
95     { send_event gint8 }
96     { time guint32 }
97     { x gdouble }
98     { y gdouble }
99     { state guint }
100     { direction GdkScrollDirection }
101     { device GdkDevice* }
102     { x_root gdouble }
103     { y_root gdouble } ;