Skip to content

Commit

Permalink
Update @:extern to extern
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsando committed Mar 20, 2024
1 parent bd8678f commit fa27d00
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 35 deletions.
2 changes: 1 addition & 1 deletion acadnme/src/Acadnme.hx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Acadnme extends Sprite implements IScriptHandler
}

@:native("hx::EnableJit")
@:extern static function enableJit(enable:Bool) : Void #if (haxe_ver>=4) ; #else { } #end
extern static function enableJit(enable:Bool) : Void;


public static function getNmeAppsDir() : String
Expand Down
10 changes: 1 addition & 9 deletions src/nme/net/SharedObjectFlushStatus.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@ package nme.net;

#if (!flash)

#if haxe4
@:enum(String) abstract SharedObjectFlushStatus(String)
enum abstract SharedObjectFlushStatus(String)
{
var FLUSHED = "FLUSHED";
var PENDING = "PENDING";
}
#else
@:fakeEnum(String) enum SharedObjectFlushStatus
{
FLUSHED;
PENDING;
}
#end

#else
typedef SharedObjectFlushStatus = flash.net.SharedObjectFlushStatus;
Expand Down
14 changes: 2 additions & 12 deletions src/nme/text/FontStyle.hx
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
package nme.text;

#if (!flash)

#if haxe4
@:enum(String) abstract FontStyle(String)
enum abstract FontStyle(String)
{
var BOLD = "BOLD";
var BOLD_ITALIC = "BOLD_ITALIC";
var ITALIC = "ITALIC";
var REGULAR = "REGULAR";
}

#else
@:fakeEnum(String) enum FontStyle
{
BOLD;
BOLD_ITALIC;
ITALIC;
REGULAR;
}
#end

#else
typedef FontStyle = flash.text.FontStyle;
#end
12 changes: 1 addition & 11 deletions src/nme/text/FontType.hx
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
package nme.text;
#if (!flash)

#if haxe4
@:enum abstract FontType(String)
enum abstract FontType(String)
{
var DEVICE = "DEVICE";
var EMBEDDED = "EMBEDDED";
var EMBEDDED_CFF = "EMBEDDED_CFF";
}

#else
@:fakeEnum(String) enum FontType
{
DEVICE;
EMBEDDED;
EMBEDDED_CFF;
}
#end

#else
typedef FontType = flash.text.FontType;
#end
4 changes: 2 additions & 2 deletions src/nme/text/TextFormatAlign.hx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package nme.text;

#if (!flash)

@:enum
abstract TextFormatAlign(String) from String to String
enum abstract TextFormatAlign(String) from String to String
{
var LEFT = "left";
var RIGHT = "right";
Expand Down

0 comments on commit fa27d00

Please sign in to comment.