diff options
Diffstat (limited to 'src/gegl_ffi.rs')
-rw-r--r-- | src/gegl_ffi.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gegl_ffi.rs b/src/gegl_ffi.rs new file mode 100644 index 0000000..093fc3b --- /dev/null +++ b/src/gegl_ffi.rs @@ -0,0 +1,34 @@ +extern crate libc; + +#[repr(C)] +#[derive(Debug)] +pub struct GeglRectangle { + pub x: i32, + pub y: i32, + pub width: i32, + pub height: i32, +} + +pub enum CGeglNode {} +pub enum GeglBuffer {} + +#[link(name="gegl-0.3")] +extern { + pub fn gegl_init(argc: *mut i32, argv: *mut *mut libc::c_char); + pub fn gegl_node_new() -> *mut CGeglNode; + pub fn gegl_node_create_child(parent: *mut CGeglNode, + operation: *const libc::c_char) + -> *mut CGeglNode; + pub fn gegl_node_set_property(node: *mut CGeglNode, + property_name: *const libc::c_char, + value: *const libc::c_void); + pub fn gegl_node_link(source: *mut CGeglNode, + sink: *mut CGeglNode); + pub fn gegl_node_process(node: *mut CGeglNode); + pub fn g_object_unref(object: *mut libc::c_void); + pub fn gegl_exit(); + pub fn gegl_buffer_new(extent: *mut libc::c_void, format: *mut libc::c_void) + -> *mut GeglBuffer; + pub fn gegl_buffer_get_extent(buffer: *const libc::c_void) -> + *const GeglRectangle; +} |