]> gitweb.factorcode.org Git - factor.git/blob - basis/gdk/ffi/ffi.factor
Merge branch 'master' of git://factorcode.org/git/factor
[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 kernel system vocabs.loader ;
6 IN: gdk.ffi
7
8 <<
9 "pango.ffi" require
10 "gdk.pixbuf.ffi" require
11 >>
12
13 LIBRARY: gdk
14
15 <<
16 "gdk" {
17     { [ os winnt? ] [ "libgdk-win32-2.0-0.dll" cdecl add-library ] }
18     { [ os macosx? ] [ drop ] }
19     { [ os unix? ] [ "libgdk-x11-2.0.so" cdecl add-library ] }
20 } cond
21 >>
22
23 IMPLEMENT-STRUCTS: GdkEventAny GdkEventKey GdkEventButton
24 GdkEventScroll GdkEventMotion GdkEventExpose GdkEventVisibility
25 GdkEventCrossing GdkEventFocus GdkEventConfigure GdkEventProperty
26 GdkEventSelection GdkEventDND GdkEventProximity GdkEventClient
27 GdkEventNoExpose GdkEventWindowState GdkEventSetting
28 GdkEventOwnerChange GdkEventGrabBroken GdkRectangle ;
29
30 ! <workaround these types are from cairo 1.10
31 STRUCT: cairo_rectangle_int_t
32     { x int } { y int } { width int } { height int } ;
33
34 C-TYPE: cairo_region_t
35 ! workaround>
36
37 FOREIGN-RECORD-TYPE: cairo.RectangleInt cairo_rectangle_int_t
38 FOREIGN-RECORD-TYPE: cairo.Region cairo_region_t
39 FOREIGN-RECORD-TYPE: cairo.FontOptions cairo_font_options_t
40 FOREIGN-RECORD-TYPE: cairo.Surface cairo_surface_t
41 FOREIGN-RECORD-TYPE: cairo.Pattern cairo_pattern_t
42 FOREIGN-RECORD-TYPE: cairo.Context cairo_t
43 FOREIGN-ENUM-TYPE: cairo.Content cairo_content_t
44
45 GIR: vocab:gdk/Gdk-3.0.gir
46
47 DESTRUCTOR: gdk_cursor_unref