Created
February 21, 2014 19:20
-
-
Save auroranockert/9141385 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[repr(u32)] | |
pub enum Status { | |
Success = 0, | |
NoMemory = 1, | |
InvalidMatrix = 5, | |
TypeMismatch = 13 | |
} | |
pub mod surface { | |
use std; | |
pub struct Surface { | |
opaque: *std::libc::c_void | |
} | |
impl Surface { | |
pub fn to_png(&self, filename: &str) -> Status { | |
unsafe { | |
use std::c_str::ToCStr; | |
let foreign_result = cairo_surface_write_to_png(self, filename.to_c_str()); | |
return foreign_result; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get the compiler message