Last active
September 20, 2015 20:25
-
-
Save james4k/690b8eb725cc72bbb4e5 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
package lime.graphics.cairo; | |
@:cppFileCode(" | |
void lime_cairo_surface_destroy (double surface); | |
void lime_cairo_surface_flush (double surface); | |
") | |
abstract CairoSurface(Dynamic) from Float to Float { | |
public function destroy ():Void { | |
#if (lime_cairo && !macro) | |
lime_cairo_surface_destroy (this); | |
#end | |
} | |
public function flush ():Void { | |
#if (lime_cairo && !macro) | |
lime_cairo_surface_flush (this); | |
#end | |
} | |
// Native Methods | |
private inline static function lime_cairo_surface_destroy (surface:Float):Void { | |
untyped __cpp__ ("lime_cairo_surface_destroy ({0})", surface); | |
} | |
private inline static function lime_cairo_surface_flush (surface:Float):Void { | |
untyped __cpp__ ("lime_cairo_surface_flush ({0})", surface); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment