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 ;
10 "gdk.pixbuf.ffi" require
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 ] }
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 ;
30 ! <workaround these types are from cairo 1.10
31 STRUCT: cairo_rectangle_int_t
32 { x int } { y int } { width int } { height int } ;
34 C-TYPE: cairo_region_t
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
45 GIR: vocab:gdk/Gdk-3.0.gir
47 DESTRUCTOR: gdk_cursor_unref