From 7473f7d1d096d56fa1baac11e66ee57b6af3e873 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Tue, 15 Sep 2015 14:55:01 -0700 Subject: [PATCH] Harden against macro import --- haxe/Timer.hx | 2 +- lime/_backend/native/NativeApplication.hx | 15 +- lime/_backend/native/NativeMouse.hx | 12 + lime/_backend/native/NativeRenderer.hx | 8 + lime/_backend/native/NativeWindow.hx | 26 ++ lime/app/Event.hx | 18 +- lime/audio/AudioBuffer.hx | 6 +- lime/audio/openal/AL.hx | 164 +++++------ lime/audio/openal/ALC.hx | 26 +- lime/graphics/Image.hx | 10 +- lime/graphics/cairo/Cairo.hx | 172 ++++++------ lime/graphics/cairo/CairoFTFontFace.hx | 4 +- lime/graphics/cairo/CairoFontFace.hx | 10 +- lime/graphics/cairo/CairoFontOptions.hx | 22 +- lime/graphics/cairo/CairoImageSurface.hx | 18 +- lime/graphics/cairo/CairoPattern.hx | 32 +-- lime/graphics/format/JPEG.hx | 8 +- lime/graphics/format/PNG.hx | 8 +- lime/graphics/opengl/GL.hx | 316 +++++++++++----------- lime/graphics/utils/ImageDataUtil.hx | 26 +- lime/net/curl/CURL.hx | 12 +- lime/net/curl/CURLEasy.hx | 28 +- lime/system/Clipboard.hx | 6 +- lime/system/System.hx | 26 +- lime/text/Font.hx | 40 +-- lime/text/TextLayout.hx | 12 +- lime/ui/Gamepad.hx | 8 +- 27 files changed, 554 insertions(+), 481 deletions(-) diff --git a/haxe/Timer.hx b/haxe/Timer.hx index b5b05bce6..fb9163a7b 100644 --- a/haxe/Timer.hx +++ b/haxe/Timer.hx @@ -1,5 +1,5 @@ package haxe; -#if (macro || (!neko && !cpp && !nodejs)) +#if (!neko && !cpp && !nodejs) // Original haxe.Timer class diff --git a/lime/_backend/native/NativeApplication.hx b/lime/_backend/native/NativeApplication.hx index 37331b6f2..9f8582f4b 100644 --- a/lime/_backend/native/NativeApplication.hx +++ b/lime/_backend/native/NativeApplication.hx @@ -61,13 +61,17 @@ class NativeApplication { public function create (config:Config):Void { - handle = lime_application_create ({}); + #if !macro + handle = lime_application_create ( { } ); + #end } public function exec ():Int { + #if !macro + lime_application_event_manager_register (handleApplicationEvent, applicationEventInfo); lime_gamepad_event_manager_register (handleGamepadEvent, gamepadEventInfo); lime_key_event_manager_register (handleKeyEvent, keyEventInfo); @@ -106,12 +110,11 @@ class NativeApplication { return result; - #else + #end + #end return 0; - #end - } @@ -453,7 +456,9 @@ class NativeApplication { public function setFrameRate (value:Float):Float { + #if !macro lime_application_set_frame_rate (handle, value); + #end return frameRate = value; } @@ -499,6 +504,7 @@ class NativeApplication { } + #if !macro @:cffi private static function lime_application_create (config:Dynamic):Float; @:cffi private static function lime_application_event_manager_register (callback:Dynamic, eventObject:Dynamic):Void; @:cffi private static function lime_application_exec (handle:Float):Int; @@ -513,6 +519,7 @@ class NativeApplication { @:cffi private static function lime_text_event_manager_register (callback:Dynamic, eventObject:Dynamic):Void; @:cffi private static function lime_touch_event_manager_register (callback:Dynamic, eventObject:Dynamic):Void; @:cffi private static function lime_window_event_manager_register (callback:Dynamic, eventObject:Dynamic):Void; + #end } diff --git a/lime/_backend/native/NativeMouse.hx b/lime/_backend/native/NativeMouse.hx index 6b985d436..a7e102b7e 100644 --- a/lime/_backend/native/NativeMouse.hx +++ b/lime/_backend/native/NativeMouse.hx @@ -25,7 +25,9 @@ class NativeMouse { __hidden = true; + #if !macro lime_mouse_hide (); + #end } @@ -38,7 +40,9 @@ class NativeMouse { __hidden = false; + #if !macro lime_mouse_show (); + #end } @@ -47,7 +51,9 @@ class NativeMouse { public static function warp (x:Int, y:Int, window:Window):Void { + #if !macro lime_mouse_warp (x, y, window == null ? 0 : window.backend.handle); + #end } @@ -90,7 +96,9 @@ class NativeMouse { } + #if !macro lime_mouse_set_cursor (type); + #end } @@ -114,7 +122,9 @@ class NativeMouse { if (__lock != value) { + #if !macro lime_mouse_set_lock (value); + #end __hidden = value; __lock = value; @@ -133,11 +143,13 @@ class NativeMouse { + #if !macro @:cffi private static function lime_mouse_hide ():Void; @:cffi private static function lime_mouse_set_cursor (cursor:Int):Void; @:cffi private static function lime_mouse_set_lock (lock:Bool):Void; @:cffi private static function lime_mouse_show ():Void; @:cffi private static function lime_mouse_warp (x:Int, y:Int, window:Float):Void; + #end } diff --git a/lime/_backend/native/NativeRenderer.hx b/lime/_backend/native/NativeRenderer.hx index 94ce5d1c1..acefbe092 100644 --- a/lime/_backend/native/NativeRenderer.hx +++ b/lime/_backend/native/NativeRenderer.hx @@ -41,6 +41,7 @@ class NativeRenderer { public function create ():Void { + #if !macro handle = lime_renderer_create (parent.window.backend.handle); #if lime_console @@ -73,6 +74,7 @@ class NativeRenderer { } #end + #end } @@ -86,6 +88,7 @@ class NativeRenderer { public function flip ():Void { + #if !macro if (!useHardware) { #if lime_cairo @@ -100,12 +103,14 @@ class NativeRenderer { } lime_renderer_flip (handle); + #end } public function render ():Void { + #if !macro lime_renderer_make_current (handle); if (!useHardware) { @@ -141,6 +146,7 @@ class NativeRenderer { #end } + #end } @@ -152,6 +158,7 @@ class NativeRenderer { + #if !macro @:cffi private static function lime_renderer_create (window:Float):Float; @:cffi private static function lime_renderer_flip (handle:Float):Void; @:cffi private static function lime_renderer_get_context (handle:Float):Float; @@ -159,6 +166,7 @@ class NativeRenderer { @:cffi private static function lime_renderer_lock (handle:Float):Dynamic; @:cffi private static function lime_renderer_make_current (handle:Float):Void; @:cffi private static function lime_renderer_unlock (handle:Float):Void; + #end } diff --git a/lime/_backend/native/NativeWindow.hx b/lime/_backend/native/NativeWindow.hx index 3b0737457..7e31d06eb 100644 --- a/lime/_backend/native/NativeWindow.hx +++ b/lime/_backend/native/NativeWindow.hx @@ -36,7 +36,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_alert (handle, message, title); + #end } @@ -47,7 +49,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_close (handle); + #end handle = null; } @@ -92,6 +96,7 @@ class NativeWindow { } + #if !macro handle = lime_window_create (application.backend.handle, parent.width, parent.height, flags, title); if (handle != null) { @@ -103,6 +108,7 @@ class NativeWindow { parent.id = lime_window_get_id (handle); } + #end } @@ -111,7 +117,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_focus (handle); + #end } @@ -145,7 +153,9 @@ class NativeWindow { if (handle != null) { + #if !macro return lime_window_get_enable_text_events (handle); + #end } @@ -158,7 +168,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_move (handle, x, y); + #end } @@ -169,7 +181,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_resize (handle, width, height); + #end } @@ -180,7 +194,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_set_enable_text_events (handle, value); + #end } @@ -193,7 +209,9 @@ class NativeWindow { if (handle != null) { + #if !macro value = lime_window_set_fullscreen (handle, value); + #end if (value) { @@ -212,7 +230,9 @@ class NativeWindow { if (handle != null) { + #if !macro lime_window_set_icon (handle, image.buffer); + #end } @@ -223,7 +243,9 @@ class NativeWindow { if (handle != null) { + #if !macro return lime_window_set_minimized (handle, value); + #end } @@ -236,7 +258,9 @@ class NativeWindow { if (handle != null) { + #if !macro return lime_window_set_title (handle, value); + #end } @@ -245,6 +269,7 @@ class NativeWindow { } + #if !macro @:cffi private static function lime_window_alert (handle:Float, message:String, title:String):Void; @:cffi private static function lime_window_close (handle:Float):Void; @:cffi private static function lime_window_create (application:Float, width:Int, height:Int, flags:Int, title:String):Float; @@ -262,6 +287,7 @@ class NativeWindow { @:cffi private static function lime_window_set_icon (handle:Float, buffer:Dynamic):Void; @:cffi private static function lime_window_set_minimized (handle:Float, minimized:Bool):Bool; @:cffi private static function lime_window_set_title (handle:Float, title:String):Dynamic; + #end } diff --git a/lime/app/Event.hx b/lime/app/Event.hx index 403c810ad..29bcea144 100644 --- a/lime/app/Event.hx +++ b/lime/app/Event.hx @@ -96,6 +96,8 @@ class Event { typeString += typeResult.toString (); typeString = StringTools.replace (typeString, "->", "_"); typeString = StringTools.replace (typeString, ".", "_"); + typeString = StringTools.replace (typeString, "<", "_"); + typeString = StringTools.replace (typeString, ">", "_"); var name = "Event_" + typeString; @@ -152,12 +154,20 @@ class Event { } - for (field in fields) { + var i = 0; + var field; + + while (i < fields.length) { - if (field.name == "listeners") { + field = fields[i]; + + if (field.name == "listeners" || field.name == "dispatch") { fields.remove (field); - break; + + } else { + + i++; } @@ -184,6 +194,8 @@ class Event { #end + public var dispatch:Dynamic; + //macro public function dispatch (ethis:Expr, args:Array):Void { // //return macro { diff --git a/lime/audio/AudioBuffer.hx b/lime/audio/AudioBuffer.hx index a44bafd01..d05554303 100644 --- a/lime/audio/AudioBuffer.hx +++ b/lime/audio/AudioBuffer.hx @@ -79,7 +79,7 @@ class AudioBuffer { } */ - #elseif (cpp || neko || nodejs) + #elseif ((cpp || neko || nodejs) && !macro) var data:Dynamic = lime_audio_load (bytes); @@ -119,7 +119,7 @@ class AudioBuffer { } - #elseif (cpp || neko || nodejs) + #elseif ((cpp || neko || nodejs) && !macro) var data:Dynamic = lime_audio_load (path); @@ -181,7 +181,7 @@ class AudioBuffer { } - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_audio_load (data:Dynamic):Dynamic; #end diff --git a/lime/audio/openal/AL.hx b/lime/audio/openal/AL.hx index 9a06bc840..48846a1d0 100644 --- a/lime/audio/openal/AL.hx +++ b/lime/audio/openal/AL.hx @@ -83,11 +83,11 @@ class AL { public static function bufferData (buffer:Int, format:Int, data:ArrayBufferView, size:Int, freq:Int):Void { - #if ((cpp || neko) && lime_openal) + #if ((cpp || neko) && lime_openal && !macro) lime_al_buffer_data (buffer, format, data.buffer, size, freq); - #elseif (nodejs && lime_openal) + #elseif (nodejs && lime_openal && !macro) lime_al_buffer_data (buffer, format, data, size, freq); - #elseif (nodejs && lime_openal) + #elseif (nodejs && lime_openal && !macro) lime_al_buffer_data (buffer, format, data, size, freq); #end @@ -96,7 +96,7 @@ class AL { public static function buffer3f (buffer:Int, param:Int, value1:Float, value2:Float, value3:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_buffer3f (buffer, param, value1, value2, value3); #end @@ -105,7 +105,7 @@ class AL { public static function buffer3i (buffer:Int, param:Int, value1:Int, value2:Int, value3:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_buffer3i (buffer, param, value1, value2, value3); #end @@ -114,7 +114,7 @@ class AL { public static function bufferf (buffer:Int, param:Int, value:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_bufferf (buffer, param, value); #end @@ -123,7 +123,7 @@ class AL { public static function bufferfv (buffer:Int, param:Int, values:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_bufferfv (buffer, param, values); #end @@ -132,7 +132,7 @@ class AL { public static function bufferi (buffer:Int, param:Int, value:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_bufferi (buffer, param, value); #end @@ -141,7 +141,7 @@ class AL { public static function bufferiv (buffer:Int, param:Int, values:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_bufferiv (buffer, param, values); #end @@ -150,7 +150,7 @@ class AL { public static function deleteBuffer (buffer:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_delete_buffer (buffer); #end @@ -159,7 +159,7 @@ class AL { public static function deleteBuffers (buffers:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_delete_buffers (buffers.length, buffers); #end @@ -168,7 +168,7 @@ class AL { public static function deleteSource (source:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_delete_source (source); #end @@ -177,7 +177,7 @@ class AL { public static function deleteSources (sources:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_delete_sources (sources.length, sources); #end @@ -186,7 +186,7 @@ class AL { public static function disable (capability:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_disable (capability); #end @@ -195,7 +195,7 @@ class AL { public static function distanceModel (distanceModel:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_distance_model (distanceModel); #end @@ -204,7 +204,7 @@ class AL { public static function dopplerFactor (value:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_doppler_factor (value); #end @@ -213,7 +213,7 @@ class AL { public static function dopplerVelocity (value:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_doppler_velocity (value); #end @@ -222,7 +222,7 @@ class AL { public static function enable (capability:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_enable (capability); #end @@ -231,7 +231,7 @@ class AL { public static function genSource ():Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_gen_source (); #else return 0; @@ -242,7 +242,7 @@ class AL { public static function genSources (n:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_gen_sources (n); #else return null; @@ -253,7 +253,7 @@ class AL { public static function genBuffer ():Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_gen_buffer (); #else return 0; @@ -264,7 +264,7 @@ class AL { public static function genBuffers (n:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_gen_buffers (n); #else return null; @@ -275,7 +275,7 @@ class AL { public static function getBoolean (param:Int):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_boolean (param); #else return false; @@ -286,7 +286,7 @@ class AL { public static function getBooleanv (param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_booleanv (param, 1); #else return null; @@ -297,7 +297,7 @@ class AL { public static function getBuffer3f (buffer:Int, param:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_buffer3f (buffer, param); #else return null; @@ -308,7 +308,7 @@ class AL { public static function getBuffer3i (buffer:Int, param:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_buffer3i (buffer, param); #else return null; @@ -319,7 +319,7 @@ class AL { public static function getBufferf (buffer:Int, param:Int):Float { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_bufferf (buffer, param); #else return 0; @@ -330,7 +330,7 @@ class AL { public static function getBufferfv (buffer:Int, param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_bufferfv (buffer, param, count); #else return null; @@ -341,7 +341,7 @@ class AL { public static function getBufferi (buffer:Int, param:Int):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_bufferi (buffer, param); #else return 0; @@ -352,7 +352,7 @@ class AL { public static function getBufferiv (buffer:Int, param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_bufferiv (buffer, param, count); #else return null; @@ -363,7 +363,7 @@ class AL { public static function getDouble (param:Int):Float { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_double (param); #else return 0; @@ -374,7 +374,7 @@ class AL { public static function getDoublev (param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_doublev (param, count); #else return null; @@ -385,7 +385,7 @@ class AL { public static function getEnumValue (ename:String):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_enum_value (ename); #else return 0; @@ -396,7 +396,7 @@ class AL { public static function getError ():Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_error (); #else return 0; @@ -423,7 +423,7 @@ class AL { public static function getFloat (param:Int):Float { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_float (param); #else return 0; @@ -434,7 +434,7 @@ class AL { public static function getFloatv (param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_floatv (param, count); #else return null; @@ -445,7 +445,7 @@ class AL { public static function getInteger (param:Int):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_integer (param); #else return 0; @@ -456,7 +456,7 @@ class AL { public static function getIntegerv (param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_integerv (param, count); #else return null; @@ -467,7 +467,7 @@ class AL { public static function getListener3f (param:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_listener3f (param); #else return null; @@ -478,7 +478,7 @@ class AL { public static function getListener3i (param:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_listener3i (param); #else return null; @@ -489,7 +489,7 @@ class AL { public static function getListenerf (param:Int):Float { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_listenerf (param); #else return 0; @@ -500,7 +500,7 @@ class AL { public static function getListenerfv (param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_listenerfv (param, count); #else return null; @@ -511,7 +511,7 @@ class AL { public static function getListeneri (param:Int):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_listeneri (param); #else return 0; @@ -522,7 +522,7 @@ class AL { public static function getListeneriv (param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_listeneriv (param, count); #else return null; @@ -533,7 +533,7 @@ class AL { public static function getProcAddress (fname:String):Dynamic { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_proc_address (fname); #else return null; @@ -544,7 +544,7 @@ class AL { public static function getSource3f (source:Int, param:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_source3f (source, param); #else return null; @@ -555,7 +555,7 @@ class AL { public static function getSourcef (source:Int, param:Int):Float { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_sourcef (source, param); #else return 0; @@ -566,7 +566,7 @@ class AL { public static function getSource3i (source:Int, param:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_source3i (source, param); #else return null; @@ -577,7 +577,7 @@ class AL { public static function getSourcefv (source:Int, param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_sourcefv (source, param, count); #else return null; @@ -588,7 +588,7 @@ class AL { public static function getSourcei (source:Int, param:Int):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_sourcei (source, param); #else return 0; @@ -599,7 +599,7 @@ class AL { public static function getSourceiv (source:Int, param:Int, count:Int = 1):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_sourceiv (source, param, count); #else return null; @@ -610,7 +610,7 @@ class AL { public static function getString (param:Int):String { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_get_string (param); #else return null; @@ -621,7 +621,7 @@ class AL { public static function isBuffer (buffer:Int):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_is_buffer (buffer); #else return false; @@ -632,7 +632,7 @@ class AL { public static function isEnabled (capability:Int):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_is_enabled (capability); #else return false; @@ -643,7 +643,7 @@ class AL { public static function isExtensionPresent (extname:String):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_is_extension_present (extname); #else return false; @@ -654,7 +654,7 @@ class AL { public static function isSource (source:Int):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_is_source (source); #else return false; @@ -665,7 +665,7 @@ class AL { public static function listener3f (param:Int, value1:Float, value2:Float, value3:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_listener3f (param, value1, value2, value3); #end @@ -674,7 +674,7 @@ class AL { public static function listener3i (param:Int, value1:Int, value2:Int, value3:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_listener3i (param, value1, value2, value3); #end @@ -683,7 +683,7 @@ class AL { public static function listenerf (param:Int, value:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_listenerf (param, value); #end @@ -692,7 +692,7 @@ class AL { public static function listenerfv (param:Int, values:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_listenerfv (param, values); #end @@ -701,7 +701,7 @@ class AL { public static function listeneri (param:Int, value:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_listeneri (param, value); #end @@ -710,7 +710,7 @@ class AL { public static function listeneriv (param:Int, values:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_listeneriv (param, values); #end @@ -719,7 +719,7 @@ class AL { public static function source3f (source:Int, param:Int, value1:Float, value2:Float, value3:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source3f (source, param, value1, value2, value3); #end @@ -728,7 +728,7 @@ class AL { public static function source3i (source:Int, param:Int, value1:Int, value2:Int, value3:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source3i (source, param, value1, value2, value3); #end @@ -737,7 +737,7 @@ class AL { public static function sourcef (source:Int, param:Int, value:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_sourcef (source, param, value); #end @@ -746,7 +746,7 @@ class AL { public static function sourcefv (source:Int, param:Int, values:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_sourcefv (source, param, values); #end @@ -755,7 +755,7 @@ class AL { public static function sourcei (source:Int, param:Int, value:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_sourcei (source, param, value); #end @@ -764,7 +764,7 @@ class AL { public static function sourceiv (source:Int, param:Int, values:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_sourceiv (source, param, values); #end @@ -773,7 +773,7 @@ class AL { public static function sourcePlay (source:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_play (source); #end @@ -782,7 +782,7 @@ class AL { public static function sourcePlayv (sources:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_playv (sources.length, sources); #end @@ -791,7 +791,7 @@ class AL { public static function sourceStop (source:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_stop (source); #end @@ -800,7 +800,7 @@ class AL { public static function sourceStopv (sources:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_stopv (sources.length, sources); #end @@ -809,7 +809,7 @@ class AL { public static function sourceRewind (source:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_rewind (source); #end @@ -818,7 +818,7 @@ class AL { public static function sourceRewindv (sources:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_rewindv (sources.length, sources); #end @@ -827,7 +827,7 @@ class AL { public static function sourcePause (source:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_pause (source); #end @@ -836,7 +836,7 @@ class AL { public static function sourcePausev (sources:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_pausev (sources.length, sources); #end @@ -845,7 +845,7 @@ class AL { public static function sourceQueueBuffer (source:Int, buffer:Int):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_queue_buffers (source, 1, [ buffer ]); #end @@ -854,7 +854,7 @@ class AL { public static function sourceQueueBuffers (source:Int, nb:Int, buffers:Array):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_source_queue_buffers (source, nb, buffers); #end @@ -863,7 +863,7 @@ class AL { public static function sourceUnqueueBuffer (source:Int):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) var res = lime_al_source_unqueue_buffers (source, 1); return res[0]; #else @@ -875,7 +875,7 @@ class AL { public static function sourceUnqueueBuffers (source:Int, nb:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_al_source_unqueue_buffers (source, nb); #else return null; @@ -886,14 +886,14 @@ class AL { public static function speedOfSound (value:Float):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_al_speed_of_sound (value); #end } - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) @:cffi private static function lime_al_buffer_data (buffer:Int, format:Int, data:Dynamic, size:Int, freq:Int):Void; @:cffi private static function lime_al_buffer3f (buffer:Int, param:Int, value1:Float32, value2:Float32, value3:Float32):Void; @:cffi private static function lime_al_buffer3i (buffer:Int, param:Int, value1:Int, value2:Int, value3:Int):Void; diff --git a/lime/audio/openal/ALC.hx b/lime/audio/openal/ALC.hx index cfeffaa03..ec2f83b56 100644 --- a/lime/audio/openal/ALC.hx +++ b/lime/audio/openal/ALC.hx @@ -34,7 +34,7 @@ class ALC { public static function closeDevice (device:ALDevice):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_alc_close_device (device); #else return false; @@ -45,7 +45,7 @@ class ALC { public static function createContext (device:ALDevice, attrlist:Array = null):ALContext { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) var handle:Float = lime_alc_create_context (device, attrlist); if (handle != 0) { @@ -62,7 +62,7 @@ class ALC { public static function destroyContext (context:ALContext):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_alc_destroy_context (context); #end @@ -71,7 +71,7 @@ class ALC { public static function getContextsDevice (context:ALContext):ALDevice { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) var handle:Float = lime_alc_get_contexts_device (context); if (handle != 0) { @@ -88,7 +88,7 @@ class ALC { public static function getCurrentContext ():ALContext { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) var handle:Float = lime_alc_get_current_context (); if (handle != 0) { @@ -105,7 +105,7 @@ class ALC { public static function getError (device:ALDevice):Int { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_alc_get_error (device); #else return 0; @@ -132,7 +132,7 @@ class ALC { public static function getIntegerv (device:ALDevice, param:Int, size:Int):Array { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_alc_get_integerv (device, param, size); #else return null; @@ -143,7 +143,7 @@ class ALC { public static function getString (device:ALDevice, param:Int):String { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_alc_get_string (device, param); #else return null; @@ -154,7 +154,7 @@ class ALC { public static function makeContextCurrent (context:ALContext):Bool { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) return lime_alc_make_context_current (context); #else return false; @@ -165,7 +165,7 @@ class ALC { public static function openDevice (deviceName:String = null):ALDevice { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) var handle:Float = lime_alc_open_device (deviceName); if (handle != 0) { @@ -182,7 +182,7 @@ class ALC { public static function processContext (context:ALContext):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_alc_process_context (context); #end @@ -191,14 +191,14 @@ class ALC { public static function suspendContext (context:ALContext):Void { - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) lime_alc_suspend_context (context); #end } - #if ((cpp || neko || nodejs) && lime_openal) + #if ((cpp || neko || nodejs) && lime_openal && !macro) @:cffi private static function lime_alc_close_device (device:Float):Bool; @:cffi private static function lime_alc_create_context (device:Float, attrlist:Dynamic):Float; @:cffi private static function lime_alc_destroy_context (context:Float):Void; diff --git a/lime/graphics/Image.hx b/lime/graphics/Image.hx index 8defb6310..5c0cc4bbf 100644 --- a/lime/graphics/Image.hx +++ b/lime/graphics/Image.hx @@ -1073,7 +1073,7 @@ class Image { throw "Image.fromBytes not implemented for console target"; - #elseif (cpp || neko || nodejs) + #elseif ((cpp || neko || nodejs) && !macro) var data:Dynamic = lime_image_load (bytes); @@ -1189,7 +1189,10 @@ class Image { #else - if (#if (sys && (!disable_cffi || !format) && !java) true #else false #end && CFFI.enabled) { + #if (!sys || disable_cffi || java || macro) + if (false) {} + #else + if (CFFI.enabled) { var data:Dynamic = lime_image_load (path); @@ -1201,6 +1204,7 @@ class Image { } } + #end #if format @@ -1545,7 +1549,7 @@ class Image { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_image_encode (buffer:Dynamic, Type:Int, quality:Int):Dynamic; @:cffi private static function lime_image_load (data:Dynamic):Dynamic; #end diff --git a/lime/graphics/cairo/Cairo.hx b/lime/graphics/cairo/Cairo.hx index c6b8ff849..32ad48e04 100644 --- a/lime/graphics/cairo/Cairo.hx +++ b/lime/graphics/cairo/Cairo.hx @@ -44,7 +44,7 @@ class Cairo { if (surface != null) { - #if lime_cairo + #if (lime_cairo && !macro) handle = lime_cairo_create (surface); #end @@ -54,7 +54,7 @@ class Cairo { public function recreate (surface:CairoSurface) : Void { - #if lime_cairo + #if (lime_cairo && !macro) destroy (); handle = lime_cairo_create (surface); #end @@ -63,7 +63,7 @@ class Cairo { public function arc (xc:Float, yc:Float, radius:Float, angle1:Float, angle2:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_arc (handle, xc, yc, radius, angle1, angle2); #end @@ -72,7 +72,7 @@ class Cairo { public function arcNegative (xc:Float, yc:Float, radius:Float, angle1:Float, angle2:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_arc_negative (handle, xc, yc, radius, angle1, angle2); #end @@ -81,7 +81,7 @@ class Cairo { public function clip ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_clip (handle); #end @@ -90,7 +90,7 @@ class Cairo { public function clipExtents (x1:Float, y1:Float, x2:Float, y2:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_clip_extents (handle, x1, y1, x2, y2); #end @@ -99,7 +99,7 @@ class Cairo { public function clipPreserve ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_clip_preserve (handle); #end @@ -108,7 +108,7 @@ class Cairo { public function closePath ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_close_path (handle); #end @@ -117,7 +117,7 @@ class Cairo { public function copyPage ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_copy_page (handle); #end @@ -126,7 +126,7 @@ class Cairo { public function curveTo (x1:Float, y1:Float, x2:Float, y2:Float, x3:Float, y3:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_curve_to (handle, x1, y1, x2, y2, x3, y3); #end @@ -135,7 +135,7 @@ class Cairo { public function destroy ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_destroy (handle); #end @@ -144,7 +144,7 @@ class Cairo { public function fill ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_fill (handle); #end @@ -153,7 +153,7 @@ class Cairo { public function fillExtents (x1:Float, y1:Float, x2:Float, y2:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_fill_extents (handle, x1, y1, x2, y2); #end @@ -162,7 +162,7 @@ class Cairo { public function fillPreserve ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_fill_preserve (handle); #end @@ -171,7 +171,7 @@ class Cairo { public function identityMatrix ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_identity_matrix (handle); #end @@ -180,7 +180,7 @@ class Cairo { public function inClip (x:Float, y:Float):Bool { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_in_clip (handle, x, y); #else return false; @@ -191,7 +191,7 @@ class Cairo { public function inFill (x:Float, y:Float):Bool { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_in_fill (handle, x, y); #else return false; @@ -202,7 +202,7 @@ class Cairo { public function inStroke (x:Float, y:Float):Bool { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_in_stroke (handle, x, y); #else return false; @@ -213,7 +213,7 @@ class Cairo { public function lineTo (x:Float, y:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_line_to (handle, x, y); #end @@ -222,7 +222,7 @@ class Cairo { public function moveTo (x:Float, y:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_move_to (handle, x, y); #end @@ -231,7 +231,7 @@ class Cairo { public function mask (pattern:CairoPattern):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_mask (handle, pattern); #end @@ -240,7 +240,7 @@ class Cairo { public function maskSurface (surface:CairoSurface, x:Float, y:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_mask_surface (handle, surface, x, y); #end @@ -249,7 +249,7 @@ class Cairo { public function newPath ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_new_path (handle); #end @@ -258,7 +258,7 @@ class Cairo { public function paint ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_paint (handle); #end @@ -267,7 +267,7 @@ class Cairo { public function paintWithAlpha (alpha:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_paint_with_alpha (handle, alpha); #end @@ -276,7 +276,7 @@ class Cairo { public function popGroup ():CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pop_group (handle); #else return null; @@ -287,7 +287,7 @@ class Cairo { public function popGroupToSource ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pop_group_to_source (handle); #end @@ -296,7 +296,7 @@ class Cairo { public function pushGroup ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_push_group (handle); #end @@ -305,7 +305,7 @@ class Cairo { public function pushGroupWithContent (content:CairoContent):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_push_group_with_content (handle, content); #end @@ -314,7 +314,7 @@ class Cairo { public function rectangle (x:Float, y:Float, width:Float, height:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_rectangle (handle, x, y, width, height); #end @@ -323,7 +323,7 @@ class Cairo { public function reference ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_reference (handle); #end @@ -332,7 +332,7 @@ class Cairo { public function relCurveTo (dx1:Float, dy1:Float, dx2:Float, dy2:Float, dx3:Float, dy3:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_rel_curve_to (handle, dx1, dy1, dx2, dy2, dx3, dy3); #end @@ -341,7 +341,7 @@ class Cairo { public function relLineTo (dx:Float, dy:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_rel_line_to (handle, dx, dy); #end @@ -350,7 +350,7 @@ class Cairo { public function relMoveTo (dx:Float, dy:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_rel_move_to (handle, dx, dy); #end @@ -359,7 +359,7 @@ class Cairo { public function resetClip ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_reset_clip (handle); #end @@ -368,7 +368,7 @@ class Cairo { public function restore ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_restore (handle); #end @@ -377,7 +377,7 @@ class Cairo { public function save ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_save (handle); #end @@ -386,7 +386,7 @@ class Cairo { public function setFontSize (size:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_font_size (handle, size); #end @@ -395,7 +395,7 @@ class Cairo { public function setSourceRGB (r:Float, g:Float, b:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_source_rgb (handle, r, g, b); #end @@ -404,7 +404,7 @@ class Cairo { public function setSourceRGBA (r:Float, g:Float, b:Float, a:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_source_rgba (handle, r, g, b, a); #end @@ -413,7 +413,7 @@ class Cairo { public function setSourceSurface (surface:CairoSurface, x:Float, y:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_source_surface (handle, surface, x, y); #end @@ -422,7 +422,7 @@ class Cairo { public function showPage ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_show_page (handle); #end @@ -431,7 +431,7 @@ class Cairo { public function showText (utf8:String):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_show_text (handle, utf8); #end @@ -440,7 +440,7 @@ class Cairo { public function status ():CairoStatus { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_status (handle); #else return cast 0; @@ -451,7 +451,7 @@ class Cairo { public function stroke ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_stroke (handle); #end @@ -460,7 +460,7 @@ class Cairo { public function strokeExtents (x1:Float, y1:Float, x2:Float, y2:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_stroke_extents (handle, x1, y1, x2, y2); #end @@ -469,7 +469,7 @@ class Cairo { public function strokePreserve ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_stroke_preserve (handle); #end @@ -478,7 +478,7 @@ class Cairo { public function transform (matrix:Matrix3):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_transform (handle, matrix); #end @@ -486,7 +486,7 @@ class Cairo { public function rotate (amount:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_rotate (handle, amount); #end @@ -494,7 +494,7 @@ class Cairo { public function scale (x:Float, y:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_scale (handle, x, y); #end @@ -503,7 +503,7 @@ class Cairo { public function translate (x:Float, y:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_translate (handle, x, y); #end @@ -521,7 +521,7 @@ class Cairo { @:noCompletion private function get_antialias ():CairoAntialias { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_antialias (handle); #end @@ -532,7 +532,7 @@ class Cairo { @:noCompletion private function set_antialias (value:CairoAntialias):CairoAntialias { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_antialias (handle, value); #end @@ -543,7 +543,7 @@ class Cairo { @:noCompletion private function get_currentPoint ():Vector2 { - #if lime_cairo + #if (lime_cairo && !macro) var vec:Dynamic = lime_cairo_get_current_point (handle); return new Vector2 (vec.x, vec.y); #end @@ -555,7 +555,7 @@ class Cairo { @:noCompletion private function get_dash ():Array { - #if lime_cairo + #if (lime_cairo && !macro) var result:Dynamic = lime_cairo_get_dash (handle); return result; #end @@ -567,7 +567,7 @@ class Cairo { @:noCompletion private function set_dash (value:Array):Array { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_dash (handle, value); #end @@ -578,7 +578,7 @@ class Cairo { @:noCompletion private function get_dashCount ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_dash_count (handle); #end @@ -589,7 +589,7 @@ class Cairo { @:noCompletion private function get_fillRule ():CairoFillRule { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_fill_rule (handle); #end @@ -600,7 +600,7 @@ class Cairo { @:noCompletion private function set_fillRule (value:CairoFillRule):CairoFillRule { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_fill_rule (handle, value); #end @@ -611,7 +611,7 @@ class Cairo { @:noCompletion private function get_fontFace ():CairoFontFace { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_font_face (handle); #end @@ -622,7 +622,7 @@ class Cairo { @:noCompletion private function set_fontFace (value:CairoFontFace):CairoFontFace { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_font_face (handle, value); #end @@ -633,7 +633,7 @@ class Cairo { @:noCompletion private function get_fontOptions ():CairoFontOptions { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_font_options (handle); #else return null; @@ -644,7 +644,7 @@ class Cairo { @:noCompletion private function set_fontOptions (value:CairoFontOptions):CairoFontOptions { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_font_options (handle, value); #end @@ -655,7 +655,7 @@ class Cairo { @:noCompletion private function get_groupTarget ():CairoSurface { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_group_target (handle); #else return cast 0; @@ -666,7 +666,7 @@ class Cairo { @:noCompletion private function get_hasCurrentPoint ():Bool { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_has_current_point (handle); #end @@ -677,7 +677,7 @@ class Cairo { @:noCompletion private function get_lineCap ():CairoLineCap { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_line_cap (handle); #end @@ -688,7 +688,7 @@ class Cairo { @:noCompletion private function set_lineCap (value:CairoLineCap):CairoLineCap { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_line_cap (handle, value); #end @@ -699,7 +699,7 @@ class Cairo { @:noCompletion private function get_lineJoin ():CairoLineJoin { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_line_join (handle); #end @@ -710,7 +710,7 @@ class Cairo { @:noCompletion private function set_lineJoin (value:CairoLineJoin):CairoLineJoin { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_line_join (handle, value); #end @@ -721,7 +721,7 @@ class Cairo { @:noCompletion private function get_lineWidth ():Float { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_line_width (handle); #end @@ -732,7 +732,7 @@ class Cairo { @:noCompletion private function set_lineWidth (value:Float):Float { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_line_width (handle, value); #end @@ -743,7 +743,7 @@ class Cairo { @:noCompletion private function get_matrix ():Matrix3 { - #if lime_cairo + #if (lime_cairo && !macro) var m:Dynamic = lime_cairo_get_matrix (handle); return new Matrix3 (m.a, m.b, m.c, m.d, m.tx, m.ty); #end @@ -755,7 +755,7 @@ class Cairo { @:noCompletion private function set_matrix (value:Matrix3):Matrix3 { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_matrix (handle, value); #end @@ -766,7 +766,7 @@ class Cairo { @:noCompletion private function get_miterLimit ():Float { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_miter_limit (handle); #end @@ -777,7 +777,7 @@ class Cairo { @:noCompletion private function set_miterLimit (value:Float):Float { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_miter_limit (handle, value); #end @@ -788,7 +788,7 @@ class Cairo { @:noCompletion private function get_operator ():CairoOperator { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_operator (handle); #end @@ -799,7 +799,7 @@ class Cairo { @:noCompletion private function set_operator (value:CairoOperator):CairoOperator { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_operator (handle, value); #end @@ -810,7 +810,7 @@ class Cairo { @:noCompletion private function get_referenceCount ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_reference_count (handle); #else return 0; @@ -821,7 +821,7 @@ class Cairo { @:noCompletion private function get_source ():CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_source (handle); #end @@ -832,7 +832,7 @@ class Cairo { @:noCompletion private function set_source (value:CairoPattern):CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_source (handle, value); #end @@ -843,7 +843,7 @@ class Cairo { @:noCompletion private function get_target ():CairoSurface { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_target (handle); #else return cast 0; @@ -854,7 +854,7 @@ class Cairo { @:noCompletion private function get_tolerance ():Float { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_get_tolerance (handle); #else return 0; @@ -865,7 +865,7 @@ class Cairo { @:noCompletion private function set_tolerance (value:Float):Float { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_set_tolerance (handle, value); #end @@ -876,7 +876,7 @@ class Cairo { private static function get_version ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_version (); #else return 0; @@ -887,7 +887,7 @@ class Cairo { private static function get_versionString ():String { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_version_string (); #else return ""; @@ -903,7 +903,7 @@ class Cairo { - #if lime_cairo + #if (lime_cairo && !macro) @:cffi private static function lime_cairo_arc (handle:Float, xc:Float, yc:Float, radius:Float, angle1:Float, angle2:Float):Void; @:cffi private static function lime_cairo_arc_negative (handle:Float, xc:Float, yc:Float, radius:Float, angle1:Float, angle2:Float):Void; @:cffi private static function lime_cairo_clip (handle:Float):Void; diff --git a/lime/graphics/cairo/CairoFTFontFace.hx b/lime/graphics/cairo/CairoFTFontFace.hx index 6ee9df1f3..5a03b0f80 100644 --- a/lime/graphics/cairo/CairoFTFontFace.hx +++ b/lime/graphics/cairo/CairoFTFontFace.hx @@ -23,7 +23,7 @@ abstract CairoFTFontFace(CairoFontFace) from CairoFontFace to CairoFontFace { public static function create (face:Font, loadFlags:Int):CairoFTFontFace { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_ft_font_face_create (face.src, loadFlags); #else return cast 0; @@ -39,7 +39,7 @@ abstract CairoFTFontFace(CairoFontFace) from CairoFontFace to CairoFontFace { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_cairo_ft_font_face_create (face:Float, flags:Int):Float; #end diff --git a/lime/graphics/cairo/CairoFontFace.hx b/lime/graphics/cairo/CairoFontFace.hx index 038bf68b4..fb9229c30 100644 --- a/lime/graphics/cairo/CairoFontFace.hx +++ b/lime/graphics/cairo/CairoFontFace.hx @@ -21,7 +21,7 @@ abstract CairoFontFace(Dynamic) from Float to Float { public function destroy ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_face_destroy (this); #end @@ -30,7 +30,7 @@ abstract CairoFontFace(Dynamic) from Float to Float { public function reference ():CairoFontFace { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_face_reference (this); #end @@ -41,7 +41,7 @@ abstract CairoFontFace(Dynamic) from Float to Float { public function status ():CairoStatus { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_font_face_status (this); #else return 0; @@ -59,7 +59,7 @@ abstract CairoFontFace(Dynamic) from Float to Float { @:noCompletion private function get_referenceCount ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_font_face_get_reference_count (this); #else return 0; @@ -75,7 +75,7 @@ abstract CairoFontFace(Dynamic) from Float to Float { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_cairo_font_face_destroy (handle:Float):Void; @:cffi private static function lime_cairo_font_face_get_reference_count (handle:Float):Int; @:cffi private static function lime_cairo_font_face_reference (handle:Float):Void; diff --git a/lime/graphics/cairo/CairoFontOptions.hx b/lime/graphics/cairo/CairoFontOptions.hx index 0ee780b2a..66a70df08 100644 --- a/lime/graphics/cairo/CairoFontOptions.hx +++ b/lime/graphics/cairo/CairoFontOptions.hx @@ -19,7 +19,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { public function new () { - #if lime_cairo + #if (lime_cairo && !macro) this = lime_cairo_font_options_create (); #else this = cast 0; @@ -30,7 +30,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { public function destroy ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_options_destroy (this); #end @@ -46,7 +46,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function get_antialias ():CairoAntialias { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_font_options_get_antialias (this); #end @@ -57,7 +57,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function set_antialias (value:CairoAntialias):CairoAntialias { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_options_set_antialias (this, value); #end @@ -68,7 +68,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function get_hintMetrics ():CairoHintMetrics { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_font_options_get_hint_metrics (this); #end @@ -79,7 +79,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function set_hintMetrics (value:CairoHintMetrics):CairoHintMetrics { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_options_set_hint_metrics (this, value); #end @@ -91,7 +91,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function get_hintStyle ():CairoHintStyle { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_font_options_get_hint_style (this); #end @@ -102,7 +102,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function set_hintStyle (value:CairoHintStyle):CairoHintStyle { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_options_set_hint_style (this, value); #end @@ -113,7 +113,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function get_subpixelOrder ():CairoSubpixelOrder { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_font_options_get_subpixel_order (this); #end @@ -124,7 +124,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { @:noCompletion private function set_subpixelOrder (value:CairoSubpixelOrder):CairoSubpixelOrder { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_font_options_set_subpixel_order (this, value); #end @@ -140,7 +140,7 @@ abstract CairoFontOptions(Dynamic) from Float to Float { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_cairo_font_options_create ():Float; @:cffi private static function lime_cairo_font_options_destroy (handle:Float):Void; @:cffi private static function lime_cairo_font_options_get_antialias (handle:Float):Int; diff --git a/lime/graphics/cairo/CairoImageSurface.hx b/lime/graphics/cairo/CairoImageSurface.hx index 36a66fbff..c6bbbe452 100644 --- a/lime/graphics/cairo/CairoImageSurface.hx +++ b/lime/graphics/cairo/CairoImageSurface.hx @@ -18,7 +18,7 @@ package lime.graphics.cairo; public function new (format:CairoFormat, width:Int, height:Int):CairoSurface { - #if lime_cairo + #if (lime_cairo && !macro) this = lime_cairo_image_surface_create (format, width, height); #else this = cast 0; @@ -29,7 +29,7 @@ package lime.graphics.cairo; public static function create (data:Dynamic, format:CairoFormat, width:Int, height:Int, stride:Int):CairoSurface { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_image_surface_create_for_data (data, format, width, height, stride); #else return cast 0; @@ -40,7 +40,7 @@ package lime.graphics.cairo; public static function fromImage (image:Image):CairoSurface { - #if lime_cairo + #if (lime_cairo && !macro) return create (lime_bytes_get_data_pointer (#if nodejs image.data #else image.data.buffer #end), CairoFormat.ARGB32, image.width, image.height, image.buffer.stride); #else return null; @@ -58,7 +58,7 @@ package lime.graphics.cairo; @:noCompletion private function get_data ():Dynamic { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_image_surface_get_data (this); #else return null; @@ -69,7 +69,7 @@ package lime.graphics.cairo; @:noCompletion private function get_format ():CairoFormat { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_image_surface_get_format (this); #else return 0; @@ -80,7 +80,7 @@ package lime.graphics.cairo; @:noCompletion private function get_height ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_image_surface_get_height (this); #else return 0; @@ -91,7 +91,7 @@ package lime.graphics.cairo; @:noCompletion private function get_stride ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_image_surface_get_stride (this); #else return 0; @@ -102,7 +102,7 @@ package lime.graphics.cairo; @:noCompletion private function get_width ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_image_surface_get_width (this); #else return 0; @@ -118,7 +118,7 @@ package lime.graphics.cairo; - #if lime_cairo + #if (lime_cairo && !macro) @:cffi private static function lime_bytes_get_data_pointer (handle:Dynamic):Float; @:cffi private static function lime_cairo_image_surface_create (format:Int, width:Int, height:Int):Float; @:cffi private static function lime_cairo_image_surface_create_for_data (data:Float, format:Int, width:Int, height:Int, stride:Int):Float; diff --git a/lime/graphics/cairo/CairoPattern.hx b/lime/graphics/cairo/CairoPattern.hx index bc28432e3..8b7a44105 100644 --- a/lime/graphics/cairo/CairoPattern.hx +++ b/lime/graphics/cairo/CairoPattern.hx @@ -26,7 +26,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public function addColorStopRGB (offset:Float, r:Float, g:Float, b:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pattern_add_color_stop_rgb (this, offset, r, g, b); #end @@ -35,7 +35,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public function addColorStopRGBA (offset:Float, r:Float, g:Float, b:Float, a:Float):Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pattern_add_color_stop_rgba (this, offset, r, g, b, a); #end @@ -44,7 +44,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public static function createForSurface (surface:CairoSurface):CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_create_for_surface (surface); #else return cast 0; @@ -55,7 +55,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public static function createLinear (x0:Float, y0:Float, x1:Float, y1:Float):CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_create_linear (x0, y0, x1, y1); #else return cast 0; @@ -66,7 +66,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public static function createRadial (cx0:Float, cy0:Float, radius0:Float, cx1:Float, cy1:Float, radius1:Float):CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1); #else return cast 0; @@ -77,7 +77,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public static function createRGB (r:Float, g:Float, b:Float):CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_create_rgb (r, g, b); #else return cast 0; @@ -88,7 +88,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public static function createRGBA (r:Float, g:Float, b:Float, a:Float):CairoPattern { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_create_rgba (r, g, b, a); #else return cast 0; @@ -99,7 +99,7 @@ abstract CairoPattern(Dynamic) from Float to Float { public function destroy ():Void { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pattern_destroy (this); #end @@ -115,7 +115,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function get_colorStopCount ():Int { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_get_color_stop_count (this); #else return 0; @@ -126,7 +126,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function get_extend ():CairoExtend { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_get_extend (this); #else return 0; @@ -137,7 +137,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function set_extend (value:CairoExtend):CairoExtend { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pattern_set_extend (this, value); #end @@ -148,7 +148,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function get_filter ():CairoFilter { - #if lime_cairo + #if (lime_cairo && !macro) return lime_cairo_pattern_get_filter (this); #else return 0; @@ -159,7 +159,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function set_filter (value:CairoFilter):CairoFilter { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pattern_set_filter (this, value); #end @@ -170,7 +170,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function get_matrix ():Matrix3 { - #if lime_cairo + #if (lime_cairo && !macro) var m:Dynamic = lime_cairo_pattern_get_matrix (this); return new Matrix3 (m.a, m.b, m.c, m.d, m.tx, m.ty); #else @@ -182,7 +182,7 @@ abstract CairoPattern(Dynamic) from Float to Float { @:noCompletion private function set_matrix (value:Matrix3):Matrix3 { - #if lime_cairo + #if (lime_cairo && !macro) lime_cairo_pattern_set_matrix (this, value); #end @@ -198,7 +198,7 @@ abstract CairoPattern(Dynamic) from Float to Float { - #if lime_cairo + #if (lime_cairo && !macro) @:cffi private static function lime_cairo_pattern_add_color_stop_rgb (handle:Float, offset:Float, red:Float, green:Float, blue:Float):Void; @:cffi private static function lime_cairo_pattern_add_color_stop_rgba (handle:Float, offset:Float, red:Float, green:Float, blue:Float, alpha:Float):Void; @:cffi private static function lime_cairo_pattern_create_for_surface (surface:Float):Float; diff --git a/lime/graphics/format/JPEG.hx b/lime/graphics/format/JPEG.hx index 0a592a629..fe2012444 100644 --- a/lime/graphics/format/JPEG.hx +++ b/lime/graphics/format/JPEG.hx @@ -17,7 +17,7 @@ class JPEG { public static function decodeBytes (bytes:ByteArray, decodeData:Bool = true):Image { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var bufferData:Dynamic = lime_jpeg_decode_bytes (bytes, decodeData); @@ -38,7 +38,7 @@ class JPEG { public static function decodeFile (path:String, decodeData:Bool = true):Image { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var bufferData:Dynamic = lime_jpeg_decode_file (path, decodeData); @@ -71,7 +71,7 @@ class JPEG { #if java - #elseif (sys && (!disable_cffi || !format)) + #elseif (sys && (!disable_cffi || !format) && !macro) var data:Dynamic = lime_image_encode (image.buffer, 1, quality); var bytes = @:privateAccess new Bytes (data.length, data.b); @@ -91,7 +91,7 @@ class JPEG { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_jpeg_decode_bytes (data:Dynamic, decodeData:Bool):Dynamic; @:cffi private static function lime_jpeg_decode_file (path:String, decodeData:Bool):Dynamic; @:cffi private static function lime_image_encode (data:Dynamic, type:Int, quality:Int):Dynamic; diff --git a/lime/graphics/format/PNG.hx b/lime/graphics/format/PNG.hx index 288a0d6f1..91c27a716 100644 --- a/lime/graphics/format/PNG.hx +++ b/lime/graphics/format/PNG.hx @@ -24,7 +24,7 @@ class PNG { public static function decodeBytes (bytes:ByteArray, decodeData:Bool = true):Image { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var bufferData:Dynamic = lime_png_decode_bytes (bytes, decodeData); @@ -45,7 +45,7 @@ class PNG { public static function decodeFile (path:String, decodeData:Bool = true):Image { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var bufferData:Dynamic = lime_png_decode_file (path, decodeData); @@ -78,7 +78,7 @@ class PNG { #if java - #elseif (sys && (!disable_cffi || !format)) + #elseif (sys && (!disable_cffi || !format) && !macro) if (CFFI.enabled) { @@ -148,7 +148,7 @@ class PNG { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_png_decode_bytes (data:Dynamic, decodeData:Bool):Dynamic; @:cffi private static function lime_png_decode_file (path:String, decodeData:Bool):Dynamic; @:cffi private static function lime_image_encode (data:Dynamic, type:Int, quality:Int):Dynamic; diff --git a/lime/graphics/opengl/GL.hx b/lime/graphics/opengl/GL.hx index f581bafc3..6efc27c62 100644 --- a/lime/graphics/opengl/GL.hx +++ b/lime/graphics/opengl/GL.hx @@ -396,7 +396,7 @@ class GL { #if (js && html5 && !display) context.activeTexture (texture); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_active_texture (texture); #elseif java GL13.glActiveTexture (texture); @@ -409,7 +409,7 @@ class GL { #if (js && html5 && !display) context.attachShader (program, shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) program.attach (shader); lime_gl_attach_shader (program.id, shader.id); #elseif java @@ -424,7 +424,7 @@ class GL { #if (js && html5 && !display) context.bindAttribLocation (program, index, name); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_bind_attrib_location (program.id, index, name); #elseif java GL20.glBindAttribLocation (program.id, index, name); @@ -437,7 +437,7 @@ class GL { #if (js && html5 && !display) context.bindBuffer (target, buffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_bind_buffer (target, buffer == null ? 0 : buffer.id); #elseif java GL15.glBindBuffer (target, buffer == null ? 0 : buffer.id); @@ -450,7 +450,7 @@ class GL { #if (js && html5 && !display) context.bindFramebuffer (target, framebuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_bind_framebuffer (target, framebuffer == null ? 0 : framebuffer.id); #elseif java GL30.glBindFramebuffer (target, framebuffer == null ? 0 : framebuffer.id); @@ -463,7 +463,7 @@ class GL { #if (js && html5 && !display) context.bindRenderbuffer (target, renderbuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_bind_renderbuffer (target, renderbuffer == null ? 0 : renderbuffer.id); #elseif java GL30.glBindRenderbuffer (target, renderbuffer == null ? 0 : renderbuffer.id); @@ -476,7 +476,7 @@ class GL { #if (js && html5 && !display) context.bindTexture (target, texture); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_bind_texture (target, texture == null ? 0 : texture.id); #elseif java GL11.glBindTexture (target, texture == null ? 0 : texture.id); @@ -489,7 +489,7 @@ class GL { #if (js && html5 && !display) context.blendColor (red, green, blue, alpha); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_blend_color (red, green, blue, alpha); #elseif java EXTBlendColor.glBlendColorEXT (red, green, blue, alpha); @@ -502,7 +502,7 @@ class GL { #if (js && html5 && !display) context.blendEquation (mode); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_blend_equation (mode); #elseif java GL14.glBlendEquation (mode); @@ -515,7 +515,7 @@ class GL { #if (js && html5 && !display) context.blendEquationSeparate (modeRGB, modeAlpha); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_blend_equation_separate (modeRGB, modeAlpha); #elseif java GL20.glBlendEquationSeparate (modeRGB, modeAlpha); @@ -528,7 +528,7 @@ class GL { #if (js && html5 && !display) context.blendFunc (sfactor, dfactor); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_blend_func (sfactor, dfactor); #elseif java GL11.glBlendFunc (sfactor, dfactor); @@ -541,7 +541,7 @@ class GL { #if (js && html5 && !display) context.blendFuncSeparate (srcRGB, dstRGB, srcAlpha, dstAlpha); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_blend_func_separate (srcRGB, dstRGB, srcAlpha, dstAlpha); #elseif java GL14.glBlendFuncSeparate (srcRGB, dstRGB, srcAlpha, dstAlpha); @@ -554,9 +554,9 @@ class GL { #if (js && html5 && !display) context.bufferData (target, data, usage); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_buffer_data (target, data.buffer, data.byteOffset, data.byteLength, usage); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_buffer_data (target, data, data.byteOffset, data.byteLength, usage); #elseif java //GL15.glBufferData (target, data.buffer, data.byteOffset, data.byteLength, usage); @@ -569,9 +569,9 @@ class GL { #if (js && html5 && !display) context.bufferSubData (target, offset, data); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_buffer_sub_data (target, offset, data.buffer, data.byteOffset, data.byteLength); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_buffer_sub_data (target, offset, data, data.byteOffset, data.byteLength); #elseif java //GL15.glBufferSubData (target, offset, data.buffer, data.byteOffset, data.byteLength); @@ -584,7 +584,7 @@ class GL { #if (js && html5 && !display) return context.checkFramebufferStatus (target); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_check_framebuffer_status (target); #elseif java return GL30.glCheckFramebufferStatus (target); @@ -599,7 +599,7 @@ class GL { #if (js && html5 && !display) context.clear (mask); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_clear (mask); #elseif java GL11.glClear (mask); @@ -612,7 +612,7 @@ class GL { #if (js && html5 && !display) context.clearColor (red, green, blue, alpha); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_clear_color (red, green, blue, alpha); #elseif java GL11.glClearColor (red, green, blue, alpha); @@ -625,7 +625,7 @@ class GL { #if (js && html5 && !display) context.clearDepth (depth); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_clear_depth (depth); #elseif java GL11.glClearDepth (depth); @@ -638,7 +638,7 @@ class GL { #if (js && html5 && !display) context.clearStencil (s); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_clear_stencil (s); #elseif java GL11.glClearStencil (s); @@ -651,7 +651,7 @@ class GL { #if (js && html5 && !display) context.colorMask (red, green, blue, alpha); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_color_mask (red, green, blue, alpha); #elseif java GL11.glColorMask (red, green, blue, alpha); @@ -664,7 +664,7 @@ class GL { #if (js && html5 && !display) context.compileShader (shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_compile_shader (shader.id); #elseif java GL20.glCompileShader (shader.id); @@ -677,10 +677,10 @@ class GL { #if (js && html5 && !display) context.compressedTexImage2D (target, level, internalformat, width, height, border, data); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) var buffer = data == null ? null : data.buffer; lime_gl_compressed_tex_image_2d (target, level, internalformat, width, height, border, buffer, data == null ? 0 : data.byteOffset); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_compressed_tex_image_2d (target, level, internalformat, width, height, border, data == null ? null : data , data == null ? null : data.byteOffset); #elseif java //GL13.glCompressedTexImage2D (target, level, internalformat, width, height, border, data == null ? null : data.buffer, data == null ? null : data.byteOffset); @@ -693,10 +693,10 @@ class GL { #if (js && html5 && !display) context.compressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, data); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) var buffer = data == null ? null : data.buffer; lime_gl_compressed_tex_sub_image_2d (target, level, xoffset, yoffset, width, height, format, buffer, data == null ? 0 : data.byteOffset); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_compressed_tex_sub_image_2d (target, level, xoffset, yoffset, width, height, format, data == null ? null : data, data == null ? null : data.byteOffset); #elseif java //GL13.glCompressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, data == null ? null : data.buffer, data == null ? null : data.byteOffset); @@ -709,7 +709,7 @@ class GL { #if (js && html5 && !display) context.copyTexImage2D (target, level, internalformat, x, y, width, height, border); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_copy_tex_image_2d (target, level, internalformat, x, y, width, height, border); #elseif java GL11.glCopyTexImage2D (target, level, internalformat, x, y, width, height, border); @@ -722,7 +722,7 @@ class GL { #if (js && html5 && !display) context.copyTexSubImage2D (target, level, xoffset, yoffset, x, y, width, height); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_copy_tex_sub_image_2d (target, level, xoffset, yoffset, x, y, width, height); #elseif java GL11.glCopyTexSubImage2D (target, level, xoffset, yoffset, x, y, width, height); @@ -735,7 +735,7 @@ class GL { #if (js && html5 && !display) return context.createBuffer (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return new GLBuffer (version, lime_gl_create_buffer ()); #elseif java //return new GLBuffer (version, GL15.glGenBuffers (1)); @@ -751,7 +751,7 @@ class GL { #if (js && html5 && !display) return context.createFramebuffer (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return new GLFramebuffer (version, lime_gl_create_framebuffer ()); #elseif java //return new GLFramebuffer (version, GL30.glGenFramebuffers (1)); @@ -767,7 +767,7 @@ class GL { #if (js && html5 && !display) return context.createProgram (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return new GLProgram (version, lime_gl_create_program ()); #elseif java return new GLProgram (version, GL20.glCreateProgram ()); @@ -782,7 +782,7 @@ class GL { #if (js && html5 && !display) return context.createRenderbuffer (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return new GLRenderbuffer (version, lime_gl_create_render_buffer ()); #elseif java //return new GLRenderbuffer (version, GL30.glGenRenderbuffers (1)); @@ -798,7 +798,7 @@ class GL { #if (js && html5 && !display) return context.createShader (type); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return new GLShader (version, lime_gl_create_shader (type)); #elseif java return new GLShader (version, GL20.glCreateShader (type)); @@ -813,7 +813,7 @@ class GL { #if (js && html5 && !display) return context.createTexture (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return new GLTexture (version, lime_gl_create_texture ()); #elseif java //return new GLTexture (version, GL11.glGenTextures (1)); @@ -829,7 +829,7 @@ class GL { #if (js && html5 && !display) context.cullFace (mode); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_cull_face (mode); #elseif java GL11.glCullFace (mode); @@ -842,7 +842,7 @@ class GL { #if (js && html5 && !display) context.deleteBuffer (buffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_delete_buffer (buffer.id); buffer.invalidate (); #elseif java @@ -857,7 +857,7 @@ class GL { #if (js && html5 && !display) context.deleteFramebuffer (framebuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_delete_framebuffer (framebuffer.id); framebuffer.invalidate (); #elseif @@ -872,7 +872,7 @@ class GL { #if (js && html5 && !display) context.deleteProgram (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_delete_program (program.id); program.invalidate (); #elseif java @@ -887,7 +887,7 @@ class GL { #if (js && html5 && !display) context.deleteRenderbuffer (renderbuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_delete_render_buffer (renderbuffer.id); renderbuffer.invalidate (); #elseif java @@ -902,7 +902,7 @@ class GL { #if (js && html5 && !display) context.deleteShader (shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_delete_shader (shader.id); shader.invalidate (); #elseif java @@ -917,7 +917,7 @@ class GL { #if (js && html5 && !display) context.deleteTexture (texture); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_delete_texture (texture.id); texture.invalidate (); #elseif java @@ -932,7 +932,7 @@ class GL { #if (js && html5 && !display) context.depthFunc (func); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_depth_func (func); #elseif java GL11.glDepthFunc (func); @@ -945,7 +945,7 @@ class GL { #if (js && html5 && !display) context.depthMask (flag); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_depth_mask (flag); #elseif java GL11.glDepthMask (flag); @@ -958,7 +958,7 @@ class GL { #if (js && html5 && !display) context.depthRange (zNear, zFar); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_depth_range (zNear, zFar); #elseif java GL11.glDepthRange (zNear, zFar); @@ -971,7 +971,7 @@ class GL { #if (js && html5 && !display) context.detachShader (program, shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_detach_shader (program.id, shader.id); #elseif java GL20.glDetachShader (program.id, shader.id); @@ -984,7 +984,7 @@ class GL { #if (js && html5 && !display) context.disable (cap); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_disable (cap); #elseif java GL11.glDisable (cap); @@ -997,7 +997,7 @@ class GL { #if (js && html5 && !display) context.disableVertexAttribArray (index); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_disable_vertex_attrib_array (index); #elseif java GL20.glDisableVertexAttribArray (index); @@ -1010,7 +1010,7 @@ class GL { #if (js && html5 && !display) context.drawArrays (mode, first, count); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_draw_arrays (mode, first, count); #elseif java GL11.glDrawArrays (mode, first, count); @@ -1023,7 +1023,7 @@ class GL { #if (js && html5 && !display) context.drawElements (mode, count, type, offset); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_draw_elements (mode, count, type, offset); #elseif java //GL11.glDrawElements (mode, count, type, offset); @@ -1036,7 +1036,7 @@ class GL { #if (js && html5 && !display) context.enable (cap); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_enable (cap); #elseif java GL11.glEnable (cap); @@ -1049,7 +1049,7 @@ class GL { #if (js && html5 && !display) context.enableVertexAttribArray (index); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_enable_vertex_attrib_array (index); #elseif java GL20.glEnableVertexAttribArray (index); @@ -1062,7 +1062,7 @@ class GL { #if (js && html5 && !display) context.finish (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_finish (); #elseif java GL11.glFinish (); @@ -1075,7 +1075,7 @@ class GL { #if (js && html5 && !display) context.flush (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_flush (); #elseif java GL11.glFlush (); @@ -1088,7 +1088,7 @@ class GL { #if (js && html5 && !display) context.framebufferRenderbuffer (target, attachment, renderbuffertarget, renderbuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_framebuffer_renderbuffer (target, attachment, renderbuffertarget, renderbuffer.id); #elseif java GL30.glFramebufferRenderbuffer (target, attachment, renderbuffertarget, renderbuffer.id); @@ -1101,7 +1101,7 @@ class GL { #if (js && html5 && !display) context.framebufferTexture2D (target, attachment, textarget, texture, level); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_framebuffer_texture2D (target, attachment, textarget, texture.id, level); #elseif java GL30.glFramebufferTexture2D (target, attachment, textarget, texture.id, level); @@ -1114,7 +1114,7 @@ class GL { #if (js && html5 && !display) context.frontFace (mode); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_front_face (mode); #elseif java GL11.glFrontFace (mode); @@ -1127,7 +1127,7 @@ class GL { #if (js && html5 && !display) context.generateMipmap (target); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_generate_mipmap (target); #elseif java GL30.glGenerateMipmap (target); @@ -1140,7 +1140,7 @@ class GL { #if (js && html5 && !display) return context.getActiveAttrib (program, index); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) var result:Dynamic = lime_gl_get_active_attrib (program.id, index); return result; #elseif java @@ -1157,7 +1157,7 @@ class GL { #if (js && html5 && !display) return context.getActiveUniform (program, index); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) var result:Dynamic = lime_gl_get_active_uniform (program.id, index); return result; #elseif java @@ -1174,7 +1174,7 @@ class GL { #if (js && html5 && !display) return context.getAttachedShaders (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return program.getShaders (); #elseif java return program.getShaders (); @@ -1189,7 +1189,7 @@ class GL { #if (js && html5 && !display) return context.getAttribLocation (program, name); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_attrib_location (program.id, name); #elseif java return GL20.glGetAttribLocation (program.id, name); @@ -1204,7 +1204,7 @@ class GL { #if (js && html5 && !display) return context.getBufferParameter (target, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_buffer_parameter (target, pname); #elseif java //return GL15.glGetBufferParameter (target, pname); @@ -1220,7 +1220,7 @@ class GL { #if (js && html5 && !display) return context.getContextAttributes (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) var base:Dynamic = lime_gl_get_context_attributes (); base.premultipliedAlpha = false; base.preserveDrawingBuffer = false; @@ -1242,7 +1242,7 @@ class GL { #if (js && html5 && !display) return context.getError (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_error (); #elseif java return GL11.glGetError (); @@ -1257,7 +1257,7 @@ class GL { #if (js && html5 && !display) return context.getExtension (name); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_extension (name); #else return null; @@ -1270,7 +1270,7 @@ class GL { #if (js && html5 && !display) return context.getFramebufferAttachmentParameter (target, attachment, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_framebuffer_attachment_parameter (target, attachment, pname); #elseif java //return GL30.glGetFramebufferAttachmentParameter (target, attachment, pname); @@ -1286,7 +1286,7 @@ class GL { #if (js && html5 && !display) return context.getParameter (pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_parameter (pname); #elseif java return null; @@ -1301,7 +1301,7 @@ class GL { #if (js && html5 && !display) return context.getProgramInfoLog (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_program_info_log (program.id); #elseif java return GL20.glGetProgramInfoLog (program.id); @@ -1316,7 +1316,7 @@ class GL { #if (js && html5 && !display) return context.getProgramParameter (program, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_program_parameter (program.id, pname); #elseif java //return GL20.glGetProgramParameter (program.id, pname); @@ -1332,7 +1332,7 @@ class GL { #if (js && html5 && !display) return context.getRenderbufferParameter (target, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_render_buffer_parameter (target, pname); #elseif java //return GL30.glGetRenderbufferParameter (target, pname); @@ -1348,7 +1348,7 @@ class GL { #if (js && html5 && !display) return context.getShaderInfoLog (shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_shader_info_log (shader.id); #elseif java return GL20.glGetShaderInfoLog (shader.id); @@ -1363,7 +1363,7 @@ class GL { #if (js && html5 && !display) return context.getShaderParameter (shader, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_shader_parameter (shader.id, pname); #elseif java //return GL20.glGetShaderParameter (shader.id, pname); @@ -1379,7 +1379,7 @@ class GL { #if (js && html5 && !display) return context.getShaderPrecisionFormat (shadertype, precisiontype); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) var result:Dynamic = lime_gl_get_shader_precision_format (shadertype, precisiontype); return result; #elseif java @@ -1396,7 +1396,7 @@ class GL { #if (js && html5 && !display) return context.getShaderSource (shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_shader_source (shader.id); #elseif java return GL20.glGetShaderSource (shader.id); @@ -1411,7 +1411,7 @@ class GL { #if (js && html5 && !display) return context.getSupportedExtensions (); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) var result = new Array (); lime_gl_get_supported_extensions (result); return result; @@ -1428,7 +1428,7 @@ class GL { #if (js && html5 && !display) return context.getTexParameter (target, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_tex_parameter (target, pname); #elseif java //return GL11.nglGetTexParameteriv (target, pname); @@ -1444,7 +1444,7 @@ class GL { #if (js && html5 && !display) return context.getUniform (program, location); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_uniform (program.id, location); #elseif java //return GL20.glGetUniform (program.id, location); @@ -1460,7 +1460,7 @@ class GL { #if (js && html5 && !display) return context.getUniformLocation (program, name); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_uniform_location (program.id, name); #elseif java return GL20.glGetUniformLocation (program.id, name); @@ -1475,7 +1475,7 @@ class GL { #if (js && html5 && !display) return context.getVertexAttrib (index, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_vertex_attrib (index, pname); #elseif java return 0; @@ -1490,7 +1490,7 @@ class GL { #if (js && html5 && !display) return context.getVertexAttribOffset (index, pname); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_get_vertex_attrib_offset (index, pname); #elseif java return 0; @@ -1505,7 +1505,7 @@ class GL { #if (js && html5 && !display) context.hint (target, mode); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_hint (target, mode); #end @@ -1516,7 +1516,7 @@ class GL { #if (js && html5 && !display) return context.isBuffer (buffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return buffer != null && buffer.id > 0 && lime_gl_is_buffer (buffer.id); #else return false; @@ -1540,7 +1540,7 @@ class GL { #if (js && html5 && !display) return context.isEnabled (cap); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return lime_gl_is_enabled (cap); #else return false; @@ -1553,7 +1553,7 @@ class GL { #if (js && html5 && !display) return context.isFramebuffer (framebuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return framebuffer != null && framebuffer.id > 0 && lime_gl_is_framebuffer (framebuffer.id); #else return false; @@ -1566,7 +1566,7 @@ class GL { #if (js && html5 && !display) return context.isProgram (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return program != null && program.id > 0 && lime_gl_is_program (program.id); #else return false; @@ -1579,7 +1579,7 @@ class GL { #if (js && html5 && !display) return context.isRenderbuffer (renderbuffer); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return renderbuffer != null && renderbuffer.id > 0 && lime_gl_is_renderbuffer (renderbuffer.id); #else return false; @@ -1592,7 +1592,7 @@ class GL { #if (js && html5 && !display) return context.isShader (shader); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return shader != null && shader.id > 0 && lime_gl_is_shader (shader.id); #else return false; @@ -1605,7 +1605,7 @@ class GL { #if (js && html5 && !display) return context.isTexture (texture); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) return texture != null && texture.id > 0 && lime_gl_is_texture (texture.id); #else return false; @@ -1618,7 +1618,7 @@ class GL { #if (js && html5 && !display) context.lineWidth (width); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_line_width (width); #end @@ -1629,7 +1629,7 @@ class GL { #if (js && html5 && !display) context.linkProgram (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_link_program (program.id); #end @@ -1640,7 +1640,7 @@ class GL { #if (js && html5 && !display) context.pixelStorei (pname, param); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_pixel_storei (pname, param); #end @@ -1651,7 +1651,7 @@ class GL { #if (js && html5 && !display) context.polygonOffset (factor, units); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_polygon_offset (factor, units); #end @@ -1662,10 +1662,10 @@ class GL { #if (js && html5 && !display) context.readPixels (x, y, width, height, format, type, pixels); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) var buffer = pixels == null ? null : pixels.buffer; lime_gl_read_pixels (x, y, width, height, format, type, buffer, pixels == null ? 0 : pixels.byteOffset); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_read_pixels (x, y, width, height, format, type, pixels == null ? null : pixels, pixels == null ? null : pixels.byteOffset); #end @@ -1676,7 +1676,7 @@ class GL { #if (js && html5 && !display) context.renderbufferStorage (target, internalformat, width, height); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_renderbuffer_storage (target, internalformat, width, height); #end @@ -1687,7 +1687,7 @@ class GL { #if (js && html5 && !display) context.sampleCoverage (value, invert); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_sample_coverage (value, invert); #end @@ -1698,7 +1698,7 @@ class GL { #if (js && html5 && !display) context.scissor (x, y, width, height); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_scissor (x, y, width, height); #end @@ -1709,7 +1709,7 @@ class GL { #if (js && html5 && !display) context.shaderSource (shader, source); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_shader_source (shader.id, source); #end @@ -1720,7 +1720,7 @@ class GL { #if (js && html5 && !display) context.stencilFunc (func, ref, mask); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_stencil_func (func, ref, mask); #end @@ -1731,7 +1731,7 @@ class GL { #if (js && html5 && !display) context.stencilFuncSeparate (face, func, ref, mask); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_stencil_func_separate (face, func, ref, mask); #end @@ -1742,7 +1742,7 @@ class GL { #if (js && html5 && !display) context.stencilMask (mask); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_stencil_mask (mask); #end @@ -1753,7 +1753,7 @@ class GL { #if (js && html5 && !display) context.stencilMaskSeparate (face, mask); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_stencil_mask_separate (face, mask); #end @@ -1764,7 +1764,7 @@ class GL { #if (js && html5 && !display) context.stencilOp (fail, zfail, zpass); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_stencil_op (fail, zfail, zpass); #end @@ -1775,7 +1775,7 @@ class GL { #if (js && html5 && !display) context.stencilOpSeparate (face, fail, zfail, zpass); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_stencil_op_separate (face, fail, zfail, zpass); #end @@ -1786,10 +1786,10 @@ class GL { #if (js && html5 && !display) context.texImage2D (target, level, internalformat, width, height, border, format, type, pixels); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) var buffer = pixels == null ? null : pixels.buffer; lime_gl_tex_image_2d (target, level, internalformat, width, height, border, format, type, buffer, pixels == null ? 0 : pixels.byteOffset); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_tex_image_2d (target, level, internalformat, width, height, border, format, type, pixels == null ? null : pixels, pixels == null ? null : pixels.byteOffset); #end @@ -1800,7 +1800,7 @@ class GL { #if (js && html5 && !display) context.texParameterf (target, pname, param); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_tex_parameterf (target, pname, param); #end @@ -1811,7 +1811,7 @@ class GL { #if (js && html5 && !display) context.texParameteri (target, pname, param); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_tex_parameteri (target, pname, param); #end @@ -1822,10 +1822,10 @@ class GL { #if (js && html5 && !display) context.texSubImage2D (target, level, xoffset, yoffset, width, height, format, type, pixels); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) var buffer = pixels == null ? null : pixels.buffer; lime_gl_tex_sub_image_2d (target, level, xoffset, yoffset, width, height, format, type, buffer, pixels == null ? 0 : pixels.byteOffset); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_tex_sub_image_2d (target, level, xoffset, yoffset, width, height, format, type, pixels == null ? null : pixels, pixels == null ? null : pixels.byteOffset); #end @@ -1836,7 +1836,7 @@ class GL { #if (js && html5 && !display) context.uniform1f (location, x); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform1f (location, x); #end @@ -1847,9 +1847,9 @@ class GL { #if (js && html5 && !display) context.uniform1fv (location, x); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform1fv (location, x.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform1fv (location, x); #end @@ -1860,7 +1860,7 @@ class GL { #if (js && html5 && !display) context.uniform1i (location, x); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform1i (location, x); #end @@ -1871,9 +1871,9 @@ class GL { #if (js && html5 && !display) context.uniform1iv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform1iv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform1iv (location, v); #end @@ -1884,7 +1884,7 @@ class GL { #if (js && html5 && !display) context.uniform2f (location, x, y); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform2f (location, x, y); #end @@ -1895,9 +1895,9 @@ class GL { #if (js && html5 && !display) context.uniform2fv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform2fv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform2fv (location, v); #end @@ -1908,7 +1908,7 @@ class GL { #if (js && html5 && !display) context.uniform2i (location, x, y); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform2i (location, x, y); #end @@ -1919,9 +1919,9 @@ class GL { #if (js && html5 && !display) context.uniform2iv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform2iv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform2iv (location, v); #end @@ -1932,7 +1932,7 @@ class GL { #if (js && html5 && !display) context.uniform3f (location, x, y, z); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform3f (location, x, y, z); #end @@ -1943,9 +1943,9 @@ class GL { #if (js && html5 && !display) context.uniform3fv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform3fv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform3fv (location, v); #end @@ -1956,7 +1956,7 @@ class GL { #if (js && html5 && !display) context.uniform3i (location, x, y, z); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform3i (location, x, y, z); #end @@ -1967,9 +1967,9 @@ class GL { #if (js && html5 && !display) context.uniform3iv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform3iv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform3iv (location, v); #end @@ -1980,7 +1980,7 @@ class GL { #if (js && html5 && !display) context.uniform4f (location, x, y, z, w); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform4f (location, x, y, z, w); #end @@ -1991,9 +1991,9 @@ class GL { #if (js && html5 && !display) context.uniform4fv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform4fv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform4fv (location, v); #end @@ -2004,7 +2004,7 @@ class GL { #if (js && html5 && !display) context.uniform4i (location, x, y, z, w); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_uniform4i (location, x, y, z, w); #end @@ -2015,9 +2015,9 @@ class GL { #if (js && html5 && !display) context.uniform4iv (location, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform4iv (location, v.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform4iv (location, v); #end @@ -2028,9 +2028,9 @@ class GL { #if (js && html5 && !display) context.uniformMatrix2fv (location, transpose, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform_matrix (location, transpose, v.buffer, 2); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform_matrix (location, transpose, v, 2); #end @@ -2041,9 +2041,9 @@ class GL { #if (js && html5 && !display) context.uniformMatrix3fv (location, transpose, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform_matrix (location, transpose, v.buffer, 3); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform_matrix (location, transpose, v, 3); #end @@ -2054,9 +2054,9 @@ class GL { #if (js && html5 && !display) context.uniformMatrix4fv (location, transpose, v); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_uniform_matrix (location, transpose, v.buffer, 4); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_uniform_matrix (location, transpose, v, 4); #end @@ -2074,7 +2074,7 @@ class GL { #if (js && html5 && !display) context.useProgram (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_use_program (program == null ? 0 : program.id); #end @@ -2085,7 +2085,7 @@ class GL { #if (js && html5 && !display) context.validateProgram (program); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_validate_program (program.id); #end @@ -2096,7 +2096,7 @@ class GL { #if (js && html5 && !display) context.vertexAttrib1f (indx, x); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_vertex_attrib1f (indx, x); #end @@ -2107,9 +2107,9 @@ class GL { #if (js && html5 && !display) context.vertexAttrib1fv (indx, values); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_vertex_attrib1fv (indx, values.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_vertex_attrib1fv (indx, values); #end @@ -2120,7 +2120,7 @@ class GL { #if (js && html5 && !display) context.vertexAttrib2f (indx, x, y); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_vertex_attrib2f (indx, x, y); #end @@ -2131,9 +2131,9 @@ class GL { #if (js && html5 && !display) context.vertexAttrib2fv (indx, values); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_vertex_attrib2fv (indx, values.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_vertex_attrib2fv (indx, values); #end @@ -2144,7 +2144,7 @@ class GL { #if (js && html5 && !display) context.vertexAttrib3f (indx, x, y, z); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_vertex_attrib3f (indx, x, y, z); #end @@ -2155,9 +2155,9 @@ class GL { #if (js && html5 && !display) context.vertexAttrib3fv (indx, values); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_vertex_attrib3fv (indx, values.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_vertex_attrib3fv (indx, values); #end @@ -2168,7 +2168,7 @@ class GL { #if (js && html5 && !display) context.vertexAttrib4f (indx, x, y, z, w); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_vertex_attrib4f (indx, x, y, z, w); #end @@ -2179,9 +2179,9 @@ class GL { #if (js && html5 && !display) context.vertexAttrib4fv (indx, values); - #elseif ((cpp || neko) && lime_opengl) + #elseif ((cpp || neko) && lime_opengl && !macro) lime_gl_vertex_attrib4fv (indx, values.buffer); - #elseif (nodejs && lime_opengl) + #elseif (nodejs && lime_opengl && !macro) lime_gl_vertex_attrib4fv (indx, values); #end @@ -2192,7 +2192,7 @@ class GL { #if (js && html5 && !display) context.vertexAttribPointer (indx, size, type, normalized, stride, offset); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_vertex_attrib_pointer (indx, size, type, normalized, stride, offset); #end @@ -2203,7 +2203,7 @@ class GL { #if (js && html5 && !display) context.viewport (x, y, width, height); - #elseif ((cpp || neko || nodejs) && lime_opengl) + #elseif ((cpp || neko || nodejs) && lime_opengl && !macro) lime_gl_viewport (x, y, width, height); #end @@ -2213,7 +2213,7 @@ class GL { private static function get_version ():Int { return 2; } - #if ((cpp || neko || nodejs) && lime_opengl) + #if ((cpp || neko || nodejs) && lime_opengl && !macro) @:cffi private static function lime_gl_active_texture (texture:Int):Void; @:cffi private static function lime_gl_attach_shader (program:Int, shader:Int):Void; @:cffi private static function lime_gl_bind_attrib_location (program:Int, index:Int, name:String):Void; diff --git a/lime/graphics/utils/ImageDataUtil.hx b/lime/graphics/utils/ImageDataUtil.hx index a9b899b9b..f555f6029 100644 --- a/lime/graphics/utils/ImageDataUtil.hx +++ b/lime/graphics/utils/ImageDataUtil.hx @@ -32,7 +32,7 @@ class ImageDataUtil { var data = image.buffer.data; if (data == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_color_transform (image, rect, colorMatrix); else #end { @@ -97,7 +97,7 @@ class ImageDataUtil { if (srcData == null || destData == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_copy_channel (image, sourceImage, sourceRect, destPoint, srcIdx, destIdx); else #end { @@ -158,7 +158,7 @@ class ImageDataUtil { public static function copyPixels (image:Image, sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, alphaImage:Image = null, alphaPoint:Vector2 = null, mergeAlpha:Bool = false):Void { - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_copy_pixels (image, sourceImage, sourceRect, destPoint, alphaImage, alphaPoint, mergeAlpha); else #end { @@ -323,7 +323,7 @@ class ImageDataUtil { var data = image.buffer.data; if (data == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_fill_rect (image, rect, (fillColor >> 16) & 0xFFFF, (fillColor) & 0xFFFF); else // TODO: Better Int32 solution #end { @@ -360,7 +360,7 @@ class ImageDataUtil { if (format == ARGB32) color = ((color & 0xFFFFFF) << 8) | ((color >> 24) & 0xFF); - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_flood_fill (image, x, y, (color >> 16) & 0xFFFF, (color) & 0xFFFF); else // TODO: Better Int32 solution #end { @@ -650,7 +650,7 @@ class ImageDataUtil { byteArray.position = 0; #end - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_get_pixels (image, rect, format, byteArray); else #end { @@ -712,7 +712,7 @@ class ImageDataUtil { if (image.buffer.data == null || sourceImage.buffer.data == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_merge (image, sourceImage, sourceRect, destPoint, redMultiplier, greenMultiplier, blueMultiplier, alphaMultiplier); else #end { @@ -765,7 +765,7 @@ class ImageDataUtil { var data = image.buffer.data; if (data == null || !image.buffer.transparent) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_multiply_alpha (image); else #end { @@ -795,7 +795,7 @@ class ImageDataUtil { if (buffer.width == newWidth && buffer.height == newHeight) return; var newBuffer = new ImageBuffer (new UInt8Array (newWidth * newHeight * 4), newWidth, newHeight); - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_resize (image, newBuffer, newWidth, newHeight); else #end { @@ -897,7 +897,7 @@ class ImageDataUtil { var data = image.buffer.data; if (data == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_set_format (image, format); else #end { @@ -1030,7 +1030,7 @@ class ImageDataUtil { if (image.buffer.data == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_set_pixels (image, rect, byteArray, format); else #end { @@ -1077,7 +1077,7 @@ class ImageDataUtil { var data = image.buffer.data; if (data == null) return; - #if ((cpp || neko) && !disable_cffi) + #if ((cpp || neko) && !disable_cffi && !macro) if (CFFI.enabled) lime_image_data_util_unmultiply_alpha (image); else #end { @@ -1108,7 +1108,7 @@ class ImageDataUtil { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_image_data_util_color_transform (image:Dynamic, rect:Dynamic, colorMatrix:Dynamic):Void; @:cffi private static function lime_image_data_util_copy_channel (image:Dynamic, sourceImage:Dynamic, sourceRect:Dynamic, destPoint:Dynamic, srcChannel:Int, destChannel:Int):Void; @:cffi private static function lime_image_data_util_copy_pixels (image:Dynamic, sourceImage:Dynamic, sourceRect:Dynamic, destPoint:Dynamic, alphaImage:Dynamic, alphaPoint:Dynamic, mergeAlpha:Bool):Void; diff --git a/lime/net/curl/CURL.hx b/lime/net/curl/CURL.hx index 991c715b0..a4e99cb48 100644 --- a/lime/net/curl/CURL.hx +++ b/lime/net/curl/CURL.hx @@ -19,7 +19,7 @@ abstract CURL(Float) from Float to Float { public static function getDate (date:String, now:Int):Int { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_getdate (date, cast now); #else return 0; @@ -30,7 +30,7 @@ abstract CURL(Float) from Float to Float { public static function globalCleanup ():Void { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) lime_curl_global_cleanup (); #end @@ -39,7 +39,7 @@ abstract CURL(Float) from Float to Float { public static function globalInit (flags:Int):CURLCode { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_global_init (flags); #else return cast 0; @@ -50,7 +50,7 @@ abstract CURL(Float) from Float to Float { public static function version ():String { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_version (); #else return null; @@ -61,7 +61,7 @@ abstract CURL(Float) from Float to Float { public static function versionInfo (type:CURLVersion):Dynamic { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_version_info (cast (type, Int)); #else return null; @@ -77,7 +77,7 @@ abstract CURL(Float) from Float to Float { } - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) @:cffi private static function lime_curl_getdate (date:String, now:Float):Float; @:cffi private static function lime_curl_global_cleanup ():Void; @:cffi private static function lime_curl_global_init (flags:Int):Int; diff --git a/lime/net/curl/CURLEasy.hx b/lime/net/curl/CURLEasy.hx index e8125750e..9fd77012f 100644 --- a/lime/net/curl/CURLEasy.hx +++ b/lime/net/curl/CURLEasy.hx @@ -13,7 +13,7 @@ class CURLEasy { public static function cleanup (handle:CURL):Void { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) lime_curl_easy_cleanup (handle); #end @@ -22,7 +22,7 @@ class CURLEasy { public static function duphandle (handle:CURL):CURL { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_easy_duphandle (handle); #else return 0; @@ -33,7 +33,7 @@ class CURLEasy { public static function escape (handle:CURL, url:String, length:Int):String { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_easy_escape (handle, url, length); #else return null; @@ -44,7 +44,7 @@ class CURLEasy { public static function getinfo (handle:CURL, info:CURLInfo):Dynamic { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_easy_getinfo (handle, cast (info, Int)); #else return null; @@ -55,7 +55,7 @@ class CURLEasy { public static function init ():CURL { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_easy_init (); #else return 0; @@ -66,7 +66,7 @@ class CURLEasy { public static function pause (handle:CURL, bitMask:Int):CURLCode { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_easy_pause (handle, bitMask); #else return cast 0; @@ -77,7 +77,7 @@ class CURLEasy { public static function perform (handle:CURL):CURLCode { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_easy_perform (handle); #else return cast 0; @@ -88,7 +88,7 @@ class CURLEasy { /*public static function recv (handle:Dynamic):CURLCode { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_easy_perform (handle); #else return cast 0; @@ -99,7 +99,7 @@ class CURLEasy { public static function reset (handle:CURL):Void { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) lime_curl_easy_reset (handle); #end @@ -108,7 +108,7 @@ class CURLEasy { /*public static function send (handle:Dynamic):CURLCode { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_easy_perform (handle); #else return cast 0; @@ -119,7 +119,7 @@ class CURLEasy { public static function setopt (handle:CURL, option:CURLOption, parameter:Dynamic):CURLCode { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return cast lime_curl_easy_setopt (handle, cast (option, Int), parameter); #else return cast 0; @@ -130,7 +130,7 @@ class CURLEasy { public static function strerror (code:CURLCode):String { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_easy_strerror (cast (code, Int)); #else return null; @@ -141,7 +141,7 @@ class CURLEasy { public static function unescape (handle:CURL, url:String, inLength:Int, outLength:Int):String { - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) return lime_curl_easy_unescape (handle, url, inLength, outLength); #else return null; @@ -150,7 +150,7 @@ class CURLEasy { } - #if ((cpp || neko || nodejs) && lime_curl) + #if ((cpp || neko || nodejs) && lime_curl && !macro) @:cffi private static function lime_curl_easy_cleanup (handle:Float):Void; @:cffi private static function lime_curl_easy_duphandle (handle:Float):Float; @:cffi private static function lime_curl_easy_escape (curl:Float, url:String, length:Int):Dynamic; diff --git a/lime/system/Clipboard.hx b/lime/system/Clipboard.hx index 2b619c82e..152cad4ef 100644 --- a/lime/system/Clipboard.hx +++ b/lime/system/Clipboard.hx @@ -25,7 +25,7 @@ class Clipboard { private static function get_text ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_clipboard_get_text (); #elseif flash if (FlashClipboard.generalClipboard.hasFormat (TEXT_FORMAT)) { @@ -42,7 +42,7 @@ class Clipboard { private static function set_text (value:String):String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) lime_clipboard_set_text (value); return value; #elseif flash @@ -62,7 +62,7 @@ class Clipboard { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_clipboard_get_text ():Dynamic; @:cffi private static function lime_clipboard_set_text (text:String):Void; #end diff --git a/lime/system/System.hx b/lime/system/System.hx index a5f979558..a29d8db81 100644 --- a/lime/system/System.hx +++ b/lime/system/System.hx @@ -122,7 +122,7 @@ class System { #end - #if sys + #if (sys && !macro) if (Application.current != null) { @@ -141,7 +141,7 @@ class System { public static function getDisplay (id:Int):Display { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var displayInfo:Dynamic = lime_system_get_display (id); if (displayInfo != null) { @@ -196,7 +196,7 @@ class System { return flash.Lib.getTimer (); #elseif js return cast Date.now ().getTime (); - #elseif !disable_cffi + #elseif (!disable_cffi && !macro) return cast lime_system_get_timer (); #elseif cpp return Std.int (untyped __global__.__time_stamp () * 1000); @@ -211,7 +211,11 @@ class System { public static inline function load (library:String, method:String, args:Int = 0, lazy:Bool = false):Dynamic { + #if !macro return CFFI.load (library, method, args, lazy); + #else + return null; + #end } @@ -225,7 +229,7 @@ class System { private static function get_applicationDirectory ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_directory (SystemDirectory.APPLICATION, null, null); #elseif flash if (Capabilities.playerType == "Desktop") { @@ -265,7 +269,7 @@ class System { } - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_directory (SystemDirectory.APPLICATION_STORAGE, company, file); #elseif flash if (Capabilities.playerType == "Desktop") { @@ -286,7 +290,7 @@ class System { private static function get_desktopDirectory ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_directory (SystemDirectory.DESKTOP, null, null); #elseif flash if (Capabilities.playerType == "Desktop") { @@ -307,7 +311,7 @@ class System { private static function get_documentsDirectory ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_directory (SystemDirectory.DOCUMENTS, null, null); #elseif flash if (Capabilities.playerType == "Desktop") { @@ -328,7 +332,7 @@ class System { private static function get_fontsDirectory ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_directory (SystemDirectory.FONTS, null, null); #else return null; @@ -339,7 +343,7 @@ class System { private static function get_numDisplays ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_num_displays (); #else return 1; @@ -350,7 +354,7 @@ class System { private static function get_userDirectory ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_system_get_directory (SystemDirectory.USER, null, null); #elseif flash if (Capabilities.playerType == "Desktop") { @@ -389,7 +393,7 @@ class System { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_system_get_directory (type:Int, company:String, title:String):Dynamic; @:cffi private static function lime_system_get_display (index:Int):Dynamic; @:cffi private static function lime_system_get_num_displays ():Int; diff --git a/lime/text/Font.hx b/lime/text/Font.hx index 2b8985bbb..4a25a8e32 100644 --- a/lime/text/Font.hx +++ b/lime/text/Font.hx @@ -13,7 +13,7 @@ import js.html.CanvasElement; import js.html.CanvasRenderingContext2D; #end -#if (cpp || neko || nodejs) +#if ((cpp || neko || nodejs) && !macro) import haxe.io.Path; #end @@ -21,7 +21,7 @@ import haxe.io.Path; @:build(lime.system.CFFI.build()) #end -#if (!display && !nodejs) +#if (!display && !nodejs && !macro) @:autoBuild(lime.Assets.embedFont()) #end @@ -65,7 +65,7 @@ class Font { public function decompose ():NativeFontData { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) if (src == null) throw "Uninitialized font handle."; var data:Dynamic = lime_font_outline_decompose (src, 1024 * 20); @@ -85,7 +85,7 @@ class Font { var font = new Font (); font.__fromBytes (bytes); - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return (font.src != null) ? font : null; #else return font; @@ -99,7 +99,7 @@ class Font { var font = new Font (); font.__fromFile (path); - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return (font.src != null) ? font : null; #else return font; @@ -110,7 +110,7 @@ class Font { public function getGlyph (character:String):Glyph { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_glyph_index (src, character); #else return -1; @@ -121,7 +121,7 @@ class Font { public function getGlyphs (characters:String = #if (display && haxe_ver < "3.2") "" #else "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^`'\"/\\&*()[]{}<>|:;_-+=?,. " #end):Array { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var glyphs:Dynamic = lime_font_get_glyph_indices (src, characters); return glyphs; #else @@ -133,7 +133,7 @@ class Font { public function getGlyphMetrics (glyph:Glyph):GlyphMetrics { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var value:Dynamic = lime_font_get_glyph_metrics (src, glyph); var metrics = new GlyphMetrics (); @@ -152,7 +152,7 @@ class Font { public function renderGlyph (glyph:Glyph, fontSize:Int):Image { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) lime_font_set_size (src, fontSize); @@ -194,7 +194,7 @@ class Font { public function renderGlyphs (glyphs:Array, fontSize:Int):Map { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) var uniqueGlyphs = new Map (); @@ -360,7 +360,7 @@ class Font { __fontPath = null; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) __fontPathWithoutDirectory = null; @@ -381,7 +381,7 @@ class Font { __fontPath = path; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) __fontPathWithoutDirectory = Path.withoutDirectory (__fontPath); @@ -407,7 +407,7 @@ class Font { private function get_ascender ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_ascender (src); #else return 0; @@ -418,7 +418,7 @@ class Font { private function get_descender ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_descender (src); #else return 0; @@ -429,7 +429,7 @@ class Font { private function get_height ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_height (src); #else return 0; @@ -440,7 +440,7 @@ class Font { private function get_numGlyphs ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_num_glyphs (src); #else return 0; @@ -451,7 +451,7 @@ class Font { private function get_underlinePosition ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_underline_position (src); #else return 0; @@ -462,7 +462,7 @@ class Font { private function get_underlineThickness ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_underline_thickness (src); #else return 0; @@ -473,7 +473,7 @@ class Font { private function get_unitsPerEM ():Int { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_font_get_units_per_em (src); #else return 0; @@ -489,7 +489,7 @@ class Font { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_font_get_ascender (handle:Float):Int; @:cffi private static function lime_font_get_descender (handle:Float):Int; @:cffi private static function lime_font_get_family_name (handle:Float):Dynamic; diff --git a/lime/text/TextLayout.hx b/lime/text/TextLayout.hx index 78a57fde4..09699c478 100644 --- a/lime/text/TextLayout.hx +++ b/lime/text/TextLayout.hx @@ -45,7 +45,7 @@ class TextLayout { positions = []; __dirty = true; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) __handle = lime_text_layout_create (__direction, __script, __language); #end } @@ -55,7 +55,7 @@ class TextLayout { positions = []; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) if (__handle != null && text != null && text != "" && font != null && font.src != null) { @@ -129,7 +129,7 @@ class TextLayout { __direction = value; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) lime_text_layout_set_direction (__handle, value); #end @@ -179,7 +179,7 @@ class TextLayout { __language = value; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) lime_text_layout_set_language (__handle, value); #end @@ -203,7 +203,7 @@ class TextLayout { __script = value; - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) lime_text_layout_set_script (__handle, value); #end @@ -243,7 +243,7 @@ class TextLayout { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_text_layout_create (direction:Int, script:String, language:String):Dynamic; @:cffi private static function lime_text_layout_position (textHandle:Float, fontHandle:Float, size:Int, textString:String, data:Dynamic):Dynamic; @:cffi private static function lime_text_layout_set_direction (textHandle:Float, direction:Int):Void; diff --git a/lime/ui/Gamepad.hx b/lime/ui/Gamepad.hx index 51089725f..4decdac6f 100644 --- a/lime/ui/Gamepad.hx +++ b/lime/ui/Gamepad.hx @@ -34,7 +34,7 @@ class Gamepad { public static function addMappings (mappings:Array):Void { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) lime_gamepad_add_mappings (mappings); #end @@ -50,7 +50,7 @@ class Gamepad { @:noCompletion private inline function get_guid ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_gamepad_get_device_guid (this.id); #else return null; @@ -61,7 +61,7 @@ class Gamepad { @:noCompletion private inline function get_name ():String { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) return lime_gamepad_get_device_name (this.id); #else return null; @@ -77,7 +77,7 @@ class Gamepad { - #if (cpp || neko || nodejs) + #if ((cpp || neko || nodejs) && !macro) @:cffi private static function lime_gamepad_add_mappings (mappings:Dynamic):Void; @:cffi private static function lime_gamepad_get_device_guid (id:Int):Dynamic; @:cffi private static function lime_gamepad_get_device_name (id:Int):Dynamic;