Skip to content

Instantly share code, notes, and snippets.

@GuillaumeGomez
Created October 25, 2014 18:06
Show Gist options
  • Save GuillaumeGomez/8f78b43c19394e2213a6 to your computer and use it in GitHub Desktop.
Save GuillaumeGomez/8f78b43c19394e2213a6 to your computer and use it in GitHub Desktop.
macro_rules! impl_GObjectFunctions(
($gtk_struct:ident, $ffi_type:ident) => (
pub fn get_pointer(&self) -> *mut ffi::$ffi_type {
self.pointer
}
pub fn wrap_pointer(pointer: *mut ffi::$ffi_type) -> $gtk_struct {
$gtk_struct {
pointer: pointer
}
}
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment