diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ffeef548..36fd41aaf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,9 +5,6 @@ jobs: linux-ndll: runs-on: ubuntu-20.04 - strategy: - matrix: - haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5] steps: - uses: actions/checkout@v3 @@ -21,7 +18,7 @@ jobs: - uses: krdlab/setup-haxe@v1 with: - haxe-version: ${{ matrix.haxe-version }} + haxe-version: 4.2.5 - name: Set HAXEPATH run: | @@ -50,7 +47,6 @@ jobs: lime rebuild hl -clean -release -nocolor -verbose -nocffi - uses: actions/upload-artifact@v3 - if: ${{ matrix.haxe-version == '4.2.5' }} # upload for only one version of Haxe with: name: Linux-NDLL path: | @@ -59,7 +55,6 @@ jobs: if-no-files-found: error - uses: actions/upload-artifact@v3 - if: ${{ matrix.haxe-version == '4.2.5' }} # upload for only one version of Haxe with: name: Linux64-NDLL path: | @@ -68,7 +63,6 @@ jobs: if-no-files-found: error - uses: actions/upload-artifact@v3 - if: ${{ matrix.haxe-version == '4.2.5' }} # upload for only one version of Haxe with: name: Linux64-Hashlink path: | @@ -558,50 +552,21 @@ jobs: hashlink-samples: needs: package-haxelib - strategy: - matrix: - os: [ubuntu-20.04 - , macos-11, windows-latest] - runs-on: ${{ matrix.os }} + runs-on: ubuntu-20.04 steps: - uses: krdlab/setup-haxe@v1 with: haxe-version: 4.2.5 - - name: Set HAXEPATH (Windows) - if: ${{ startsWith(matrix.os, 'windows-') }} - run: | - echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV - - - name: Set HAXEPATH (macOS/Linux) - if: ${{ !startsWith(matrix.os, 'windows-') }} + - name: Set HAXEPATH run: | echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV - - name: Install system dependencies (Linux) - if: ${{ startsWith(matrix.os, 'ubuntu-') }} - run: | - sudo apt-get update - sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev - - name: Install Haxe dependencies run: | - haxelib install hxcpp 4.2.1 --quiet - haxelib install format --quiet - haxelib install hxp --quiet haxelib git lime-samples https://github.com/openfl/lime-samples --quiet - - name: Enable HXCPP compile cache (Windows) - if: ${{ startsWith(matrix.os, 'windows-') }} - run: | - echo "HXCPP_COMPILE_CACHE=C:\.hxcpp" >> $Env:GITHUB_ENV - - - name: Enable HXCPP compile cache (macOS/Linux) - if: ${{ !startsWith(matrix.os, 'windows-') }} - run: | - echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV - - uses: actions/download-artifact@v3 with: name: lime-haxelib @@ -815,49 +780,24 @@ jobs: neko-samples: needs: package-haxelib + runs-on: ubuntu-20.04 strategy: matrix: - os: [ubuntu-20.04, macos-11, windows-latest] - runs-on: ${{ matrix.os }} + haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5, 4.3.1] steps: - uses: krdlab/setup-haxe@v1 with: - haxe-version: 4.2.5 + haxe-version: ${{ matrix.haxe-version }} - - name: Set HAXEPATH (Windows) - if: ${{ startsWith(matrix.os, 'windows-') }} - run: | - echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV - - - name: Set HAXEPATH (macOS/Linux) - if: ${{ !startsWith(matrix.os, 'windows-') }} + - name: Set HAXEPATH run: | echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV - - name: Install system dependencies (Linux) - if: ${{ startsWith(matrix.os, 'ubuntu-') }} - run: | - sudo apt-get update - sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev - - name: Install Haxe dependencies run: | - haxelib install hxcpp 4.2.1 --quiet - haxelib install format --quiet - haxelib install hxp --quiet haxelib git lime-samples https://github.com/openfl/lime-samples --quiet - - name: Enable HXCPP compile cache (Windows) - if: ${{ startsWith(matrix.os, 'windows-') }} - run: | - echo "HXCPP_COMPILE_CACHE=C:\.hxcpp" >> $Env:GITHUB_ENV - - - name: Enable HXCPP compile cache (macOS/Linux) - if: ${{ !startsWith(matrix.os, 'windows-') }} - run: | - echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV - - uses: actions/download-artifact@v3 with: name: lime-haxelib diff --git a/externs/air/flash/data/SQLCollationType.hx b/externs/air/flash/data/SQLCollationType.hx index 42017df56..fbe18701d 100644 --- a/externs/air/flash/data/SQLCollationType.hx +++ b/externs/air/flash/data/SQLCollationType.hx @@ -1,7 +1,7 @@ package flash.data; @:native("flash.data.SQLCollationType") -@:enum extern abstract SQLCollationType(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SQLCollationType(String) { var BINARY; var NO_CASE; diff --git a/externs/air/flash/data/SQLColumnNameStyle.hx b/externs/air/flash/data/SQLColumnNameStyle.hx index e6e83eeeb..c27bc6661 100644 --- a/externs/air/flash/data/SQLColumnNameStyle.hx +++ b/externs/air/flash/data/SQLColumnNameStyle.hx @@ -1,7 +1,7 @@ package flash.data; @:native("flash.data.SQLColumnNameStyle") -@:enum extern abstract SQLColumnNameStyle(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SQLColumnNameStyle(String) { var DEFAULT; var LONG; diff --git a/externs/air/flash/data/SQLMode.hx b/externs/air/flash/data/SQLMode.hx index 55a9f7dfb..284a3d04d 100644 --- a/externs/air/flash/data/SQLMode.hx +++ b/externs/air/flash/data/SQLMode.hx @@ -1,7 +1,7 @@ package flash.data; @:native("flash.data.SQLMode") -@:enum extern abstract SQLMode(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SQLMode(String) { var CREATE; var READ; diff --git a/externs/air/flash/data/SQLTransactionLockType.hx b/externs/air/flash/data/SQLTransactionLockType.hx index 7637611ad..16912db4c 100644 --- a/externs/air/flash/data/SQLTransactionLockType.hx +++ b/externs/air/flash/data/SQLTransactionLockType.hx @@ -1,7 +1,7 @@ package flash.data; @:native("flash.data.SQLTransactionLockType") -@:enum extern abstract SQLTransactionLockType(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SQLTransactionLockType(String) { var DEFERRED; var EXCLUSIVE; diff --git a/externs/air/flash/desktop/InvokeEventReason.hx b/externs/air/flash/desktop/InvokeEventReason.hx index ba94a5729..216be7d91 100644 --- a/externs/air/flash/desktop/InvokeEventReason.hx +++ b/externs/air/flash/desktop/InvokeEventReason.hx @@ -1,7 +1,7 @@ package flash.desktop; @:native("flash.desktop.InvokeEventReason") -@:enum extern abstract InvokeEventReason(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract InvokeEventReason(String) { var LOGIN; var NOTIFICATION; diff --git a/externs/air/flash/desktop/NativeDragActions.hx b/externs/air/flash/desktop/NativeDragActions.hx index b6e43f1aa..d40e9168c 100644 --- a/externs/air/flash/desktop/NativeDragActions.hx +++ b/externs/air/flash/desktop/NativeDragActions.hx @@ -1,7 +1,7 @@ package flash.desktop; @:native("flash.desktop.NativeDragActions") -@:enum extern abstract NativeDragActions(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NativeDragActions(String) { var COPY; var LINK; diff --git a/externs/air/flash/desktop/NotificationType.hx b/externs/air/flash/desktop/NotificationType.hx index 7769d22ab..8066974bb 100644 --- a/externs/air/flash/desktop/NotificationType.hx +++ b/externs/air/flash/desktop/NotificationType.hx @@ -1,7 +1,7 @@ package flash.desktop; @:native("flash.desktop.NotificationType") -@:enum extern abstract NotificationType(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NotificationType(String) { var CRITICAL; var INFORMATIONAL; diff --git a/externs/air/flash/desktop/SystemIdleMode.hx b/externs/air/flash/desktop/SystemIdleMode.hx index 3e230584d..96d9d2b99 100644 --- a/externs/air/flash/desktop/SystemIdleMode.hx +++ b/externs/air/flash/desktop/SystemIdleMode.hx @@ -1,7 +1,7 @@ package flash.desktop; @:native("flash.desktop.SystemIdleMode") -@:enum extern abstract SystemIdleMode(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SystemIdleMode(String) { var KEEP_AWAKE; var NORMAL; diff --git a/externs/air/flash/display/NativeWindowDisplayState.hx b/externs/air/flash/display/NativeWindowDisplayState.hx index 0fc2b7996..f90cfc645 100644 --- a/externs/air/flash/display/NativeWindowDisplayState.hx +++ b/externs/air/flash/display/NativeWindowDisplayState.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.NativeWindowDisplayState") -@:enum extern abstract NativeWindowDisplayState(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NativeWindowDisplayState(String) { var MAXIMIZED; var MINIMIZED; diff --git a/externs/air/flash/display/NativeWindowRenderMode.hx b/externs/air/flash/display/NativeWindowRenderMode.hx index 9d453d776..7f4d8a48a 100644 --- a/externs/air/flash/display/NativeWindowRenderMode.hx +++ b/externs/air/flash/display/NativeWindowRenderMode.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.NativeWindowRenderMode") -@:enum extern abstract NativeWindowRenderMode(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NativeWindowRenderMode(String) { var AUTO; var CPU; diff --git a/externs/air/flash/display/NativeWindowResize.hx b/externs/air/flash/display/NativeWindowResize.hx index b60350516..3adf87ef6 100644 --- a/externs/air/flash/display/NativeWindowResize.hx +++ b/externs/air/flash/display/NativeWindowResize.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.NativeWindowResize") -@:enum extern abstract NativeWindowResize(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NativeWindowResize(String) { var BOTTOM; var BOTTOM_LEFT; diff --git a/externs/air/flash/display/NativeWindowSystemChrome.hx b/externs/air/flash/display/NativeWindowSystemChrome.hx index b005630d7..33a39cc12 100644 --- a/externs/air/flash/display/NativeWindowSystemChrome.hx +++ b/externs/air/flash/display/NativeWindowSystemChrome.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.NativeWindowSystemChrome") -@:enum extern abstract NativeWindowSystemChrome(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NativeWindowSystemChrome(String) { var ALTERNATE; var NONE; diff --git a/externs/air/flash/display/NativeWindowType.hx b/externs/air/flash/display/NativeWindowType.hx index b8eab2e03..5a278235b 100644 --- a/externs/air/flash/display/NativeWindowType.hx +++ b/externs/air/flash/display/NativeWindowType.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.NativeWindowType") -@:enum extern abstract NativeWindowType(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NativeWindowType(String) { var LIGHTWEIGHT; var NORMAL; diff --git a/externs/air/flash/display/StageAspectRatio.hx b/externs/air/flash/display/StageAspectRatio.hx index 1777baba2..e663ce877 100644 --- a/externs/air/flash/display/StageAspectRatio.hx +++ b/externs/air/flash/display/StageAspectRatio.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.StageAspectRatio") -@:enum extern abstract StageAspectRatio(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract StageAspectRatio(String) { var ANY; var LANDSCAPE; diff --git a/externs/air/flash/display/StageOrientation.hx b/externs/air/flash/display/StageOrientation.hx index 5fc5fb0e8..bb85291a4 100644 --- a/externs/air/flash/display/StageOrientation.hx +++ b/externs/air/flash/display/StageOrientation.hx @@ -1,7 +1,7 @@ package flash.display; @:native("flash.display.StageOrientation") -@:enum extern abstract StageOrientation(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract StageOrientation(String) { var DEFAULT; var ROTATED_LEFT; diff --git a/externs/air/flash/display3D/Context3DProfile.hx b/externs/air/flash/display3D/Context3DProfile.hx index 1a39d79b5..c7cec015d 100644 --- a/externs/air/flash/display3D/Context3DProfile.hx +++ b/externs/air/flash/display3D/Context3DProfile.hx @@ -1,7 +1,7 @@ package flash.display3D; @:native("flash.display3D.Context3DProfile") -@:enum extern abstract Context3DProfile(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract Context3DProfile(String) { var BASELINE; var BASELINE_CONSTRAINED; diff --git a/externs/air/flash/errors/SQLErrorOperation.hx b/externs/air/flash/errors/SQLErrorOperation.hx index 2d8494011..b0011cbad 100644 --- a/externs/air/flash/errors/SQLErrorOperation.hx +++ b/externs/air/flash/errors/SQLErrorOperation.hx @@ -1,7 +1,7 @@ package flash.errors; @:native("flash.errors.SQLErrorOperation") -@:enum extern abstract SQLErrorOperation(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SQLErrorOperation(String) { var ANALYZE; var ATTACH; diff --git a/externs/air/flash/events/TouchEventIntent.hx b/externs/air/flash/events/TouchEventIntent.hx index 53e6dd1a1..7df2d0a5a 100644 --- a/externs/air/flash/events/TouchEventIntent.hx +++ b/externs/air/flash/events/TouchEventIntent.hx @@ -1,7 +1,7 @@ package flash.events; @:native("flash.events.TouchEventIntent") -@:enum extern abstract TouchEventIntent(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract TouchEventIntent(String) { var ERASER; var PEN; diff --git a/externs/air/flash/filesystem/FileMode.hx b/externs/air/flash/filesystem/FileMode.hx index 39247e9c3..db258317e 100644 --- a/externs/air/flash/filesystem/FileMode.hx +++ b/externs/air/flash/filesystem/FileMode.hx @@ -1,7 +1,7 @@ package flash.filesystem; @:native("flash.filesystem.FileMode") -@:enum extern abstract FileMode(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract FileMode(String) { var APPEND; var READ; diff --git a/externs/air/flash/media/AudioPlaybackMode.hx b/externs/air/flash/media/AudioPlaybackMode.hx index 4fef3e6e8..600373424 100644 --- a/externs/air/flash/media/AudioPlaybackMode.hx +++ b/externs/air/flash/media/AudioPlaybackMode.hx @@ -1,7 +1,7 @@ package flash.media; @:native("flash.media.AudioPlaybackMode") -@:enum extern abstract AudioPlaybackMode(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract AudioPlaybackMode(String) { var AMBIENT; var MEDIA; diff --git a/externs/air/flash/media/CameraPosition.hx b/externs/air/flash/media/CameraPosition.hx index 54f61fe43..db892195e 100644 --- a/externs/air/flash/media/CameraPosition.hx +++ b/externs/air/flash/media/CameraPosition.hx @@ -1,7 +1,7 @@ package flash.media; @:native("flash.media.CameraPosition") -@:enum extern abstract CameraPosition(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract CameraPosition(String) { var BACK; var FRONT; diff --git a/externs/air/flash/media/MediaType.hx b/externs/air/flash/media/MediaType.hx index c4ff250b9..ca1b64cca 100644 --- a/externs/air/flash/media/MediaType.hx +++ b/externs/air/flash/media/MediaType.hx @@ -1,7 +1,7 @@ package flash.media; @:native("flash.media.MediaType") -@:enum extern abstract MediaType(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract MediaType(String) { var IMAGE; var VIDEO; diff --git a/externs/air/flash/net/IPVersion.hx b/externs/air/flash/net/IPVersion.hx index 758ac83eb..b6c6abe50 100644 --- a/externs/air/flash/net/IPVersion.hx +++ b/externs/air/flash/net/IPVersion.hx @@ -1,7 +1,7 @@ package flash.net; @:native("flash.net.IPVersion") -@:enum extern abstract IPVersion(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract IPVersion(String) { var IPV4; var IPV6; diff --git a/externs/air/flash/notifications/NotificationStyle.hx b/externs/air/flash/notifications/NotificationStyle.hx index 49e12dcf0..35a3272ec 100644 --- a/externs/air/flash/notifications/NotificationStyle.hx +++ b/externs/air/flash/notifications/NotificationStyle.hx @@ -1,7 +1,7 @@ package flash.notifications; @:native("flash.notifications.NotificationStyle") -@:enum extern abstract NotificationStyle(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract NotificationStyle(String) { var ALERT; var BADGE; diff --git a/externs/air/flash/printing/PaperSize.hx b/externs/air/flash/printing/PaperSize.hx index 9b415175d..2e50a25e3 100644 --- a/externs/air/flash/printing/PaperSize.hx +++ b/externs/air/flash/printing/PaperSize.hx @@ -1,7 +1,7 @@ package flash.printing; @:native("flash.printing.PaperSize") -@:enum extern abstract PaperSize(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract PaperSize(String) { var A4; var A5; diff --git a/externs/air/flash/printing/PrintMethod.hx b/externs/air/flash/printing/PrintMethod.hx index 6f2f4d2af..c8f57b03d 100644 --- a/externs/air/flash/printing/PrintMethod.hx +++ b/externs/air/flash/printing/PrintMethod.hx @@ -1,7 +1,7 @@ package flash.printing; @:native("flash.printing.PrintMethod") -@:enum extern abstract PrintMethod(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract PrintMethod(String) { var AUTO; var BITMAP; diff --git a/externs/air/flash/security/ReferencesValidationSetting.hx b/externs/air/flash/security/ReferencesValidationSetting.hx index affc25b9c..1c946d554 100644 --- a/externs/air/flash/security/ReferencesValidationSetting.hx +++ b/externs/air/flash/security/ReferencesValidationSetting.hx @@ -1,7 +1,7 @@ package flash.security; @:native("flash.security.ReferencesValidationSetting") -@:enum extern abstract ReferencesValidationSetting(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract ReferencesValidationSetting(String) { var NEVER; var VALID_IDENTITY; diff --git a/externs/air/flash/security/RevocationCheckSettings.hx b/externs/air/flash/security/RevocationCheckSettings.hx index cd6b2b522..6bfeb017f 100644 --- a/externs/air/flash/security/RevocationCheckSettings.hx +++ b/externs/air/flash/security/RevocationCheckSettings.hx @@ -1,7 +1,7 @@ package flash.security; @:native("flash.security.RevocationCheckSettings") -@:enum extern abstract RevocationCheckSettings(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract RevocationCheckSettings(String) { var ALWAYS_REQUIRED; var BEST_EFFORT; diff --git a/externs/air/flash/security/SignatureStatus.hx b/externs/air/flash/security/SignatureStatus.hx index edbc6eb32..a8df8686b 100644 --- a/externs/air/flash/security/SignatureStatus.hx +++ b/externs/air/flash/security/SignatureStatus.hx @@ -1,7 +1,7 @@ package flash.security; @:native("flash.security.SignatureStatus") -@:enum extern abstract SignatureStatus(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SignatureStatus(String) { var INVALID; var UNKNOWN; diff --git a/externs/air/flash/security/SignerTrustSettings.hx b/externs/air/flash/security/SignerTrustSettings.hx index 75beb3af8..9c3ab6c5f 100644 --- a/externs/air/flash/security/SignerTrustSettings.hx +++ b/externs/air/flash/security/SignerTrustSettings.hx @@ -1,7 +1,7 @@ package flash.security; @:native("flash.security.SignerTrustSettings") -@:enum extern abstract SignerTrustSettings(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SignerTrustSettings(String) { var CODE_SIGNING; var PLAYLIST_SIGNING; diff --git a/externs/air/flash/text/AutoCapitalize.hx b/externs/air/flash/text/AutoCapitalize.hx index bcdb29f85..9c47c449d 100644 --- a/externs/air/flash/text/AutoCapitalize.hx +++ b/externs/air/flash/text/AutoCapitalize.hx @@ -1,7 +1,7 @@ package flash.text; @:native("flash.text.AutoCapitalize") -@:enum extern abstract AutoCapitalize(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract AutoCapitalize(String) { var ALL; var NONE; diff --git a/externs/air/flash/text/ReturnKeyLabel.hx b/externs/air/flash/text/ReturnKeyLabel.hx index 6f138a34d..598b406e3 100644 --- a/externs/air/flash/text/ReturnKeyLabel.hx +++ b/externs/air/flash/text/ReturnKeyLabel.hx @@ -1,7 +1,7 @@ package flash.text; @:native("flash.text.ReturnKeyLabel") -@:enum extern abstract ReturnKeyLabel(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract ReturnKeyLabel(String) { var DEFAULT; var DONE; diff --git a/externs/air/flash/text/SoftKeyboardType.hx b/externs/air/flash/text/SoftKeyboardType.hx index 27da6308a..d2080237b 100644 --- a/externs/air/flash/text/SoftKeyboardType.hx +++ b/externs/air/flash/text/SoftKeyboardType.hx @@ -1,7 +1,7 @@ package flash.text; @:native("flash.text.SoftKeyboardType") -@:enum extern abstract SoftKeyboardType(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SoftKeyboardType(String) { var CONTACT; var DEFAULT; diff --git a/externs/air/flash/text/StageTextClearButtonMode.hx b/externs/air/flash/text/StageTextClearButtonMode.hx index fdb945a1e..c084af6b6 100644 --- a/externs/air/flash/text/StageTextClearButtonMode.hx +++ b/externs/air/flash/text/StageTextClearButtonMode.hx @@ -1,7 +1,7 @@ package flash.text; @:native("flash.text.StageTextClearButtonMode") -@:enum extern abstract StageTextClearButtonMode(String) +#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract StageTextClearButtonMode(String) { var ALWAYS; var NEVER; diff --git a/src/lime/_internal/backend/native/NativeApplication.hx b/src/lime/_internal/backend/native/NativeApplication.hx index f50639847..347e3101e 100644 --- a/src/lime/_internal/backend/native/NativeApplication.hx +++ b/src/lime/_internal/backend/native/NativeApplication.hx @@ -633,7 +633,7 @@ class NativeApplication } } -@:enum private abstract ApplicationEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract ApplicationEventType(Int) { var UPDATE = 0; var EXIT = 1; @@ -654,7 +654,7 @@ class NativeApplication } } -@:enum private abstract ClipboardEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract ClipboardEventType(Int) { var UPDATE = 0; } @@ -676,7 +676,7 @@ class NativeApplication } } -@:enum private abstract DropEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract DropEventType(Int) { var DROP_FILE = 0; } @@ -704,7 +704,7 @@ class NativeApplication } } -@:enum private abstract GamepadEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract GamepadEventType(Int) { var AXIS_MOVE = 0; var BUTTON_DOWN = 1; @@ -738,7 +738,7 @@ class NativeApplication } } -@:enum private abstract JoystickEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract JoystickEventType(Int) { var AXIS_MOVE = 0; var HAT_MOVE = 1; @@ -769,7 +769,7 @@ class NativeApplication } } -@:enum private abstract KeyEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract KeyEventType(Int) { var KEY_DOWN = 0; var KEY_UP = 1; @@ -804,7 +804,7 @@ class NativeApplication } } -@:enum private abstract MouseEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract MouseEventType(Int) { var MOUSE_DOWN = 0; var MOUSE_UP = 1; @@ -827,7 +827,7 @@ class NativeApplication } } -@:enum private abstract RenderEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract RenderEventType(Int) { var RENDER = 0; var RENDER_CONTEXT_LOST = 1; @@ -857,7 +857,7 @@ class NativeApplication } } -@:enum private abstract SensorEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract SensorEventType(Int) { var ACCELEROMETER = 0; } @@ -886,7 +886,7 @@ class NativeApplication } } -@:enum private abstract TextEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract TextEventType(Int) { var TEXT_INPUT = 0; var TEXT_EDIT = 1; @@ -921,7 +921,7 @@ class NativeApplication } } -@:enum private abstract TouchEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract TouchEventType(Int) { var TOUCH_START = 0; var TOUCH_END = 1; @@ -953,7 +953,7 @@ class NativeApplication } } -@:enum private abstract WindowEventType(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract WindowEventType(Int) { var WINDOW_ACTIVATE = 0; var WINDOW_CLOSE = 1; diff --git a/src/lime/_internal/backend/native/NativeWindow.hx b/src/lime/_internal/backend/native/NativeWindow.hx index 36790c5f4..b7f900184 100644 --- a/src/lime/_internal/backend/native/NativeWindow.hx +++ b/src/lime/_internal/backend/native/NativeWindow.hx @@ -719,7 +719,7 @@ class NativeWindow } } -@:enum private abstract MouseCursorType(Int) from Int to Int +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract MouseCursorType(Int) from Int to Int { var HIDDEN = 0; var ARROW = 1; @@ -736,7 +736,7 @@ class NativeWindow var WAIT_ARROW = 12; } -@:enum private abstract WindowFlags(Int) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract WindowFlags(Int) { var WINDOW_FLAG_FULLSCREEN = 0x00000001; var WINDOW_FLAG_BORDERLESS = 0x00000002; diff --git a/src/lime/_internal/graphics/ImageDataUtil.hx b/src/lime/_internal/graphics/ImageDataUtil.hx index c9885bec0..1d2b3c312 100644 --- a/src/lime/_internal/graphics/ImageDataUtil.hx +++ b/src/lime/_internal/graphics/ImageDataUtil.hx @@ -1748,7 +1748,8 @@ private class ImageDataView } } -@:noCompletion @:dox(hide) @:enum private abstract ThresholdOperation(Int) from Int to Int +@:noCompletion @:dox(hide) +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract ThresholdOperation(Int) from Int to Int { var NOT_EQUALS = 0; var EQUALS = 1; diff --git a/src/lime/graphics/PixelFormat.hx b/src/lime/graphics/PixelFormat.hx index 630c481c7..549256898 100644 --- a/src/lime/graphics/PixelFormat.hx +++ b/src/lime/graphics/PixelFormat.hx @@ -3,7 +3,7 @@ package lime.graphics; /** An enum containing different pixel encoding formats for image data **/ -@:enum abstract PixelFormat(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract PixelFormat(Int) from Int to Int from UInt to UInt { /** An image encoded in 32-bit RGBA color order diff --git a/src/lime/graphics/RenderContextType.hx b/src/lime/graphics/RenderContextType.hx index 119b39583..8dddd1aa4 100644 --- a/src/lime/graphics/RenderContextType.hx +++ b/src/lime/graphics/RenderContextType.hx @@ -3,7 +3,7 @@ package lime.graphics; /** An enum for possible render context types **/ -@:enum abstract RenderContextType(String) from String to String +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract RenderContextType(String) from String to String { /** Describes a Cairo render context diff --git a/src/lime/graphics/cairo/CairoAntialias.hx b/src/lime/graphics/cairo/CairoAntialias.hx index f266aca12..e3fc5f11f 100644 --- a/src/lime/graphics/cairo/CairoAntialias.hx +++ b/src/lime/graphics/cairo/CairoAntialias.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoAntialias(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoAntialias(Int) from Int to Int from UInt to UInt { public var DEFAULT = 0; public var NONE = 1; diff --git a/src/lime/graphics/cairo/CairoContent.hx b/src/lime/graphics/cairo/CairoContent.hx index 3fe849805..d57ac8e5e 100644 --- a/src/lime/graphics/cairo/CairoContent.hx +++ b/src/lime/graphics/cairo/CairoContent.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoContent(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoContent(Int) from Int to Int from UInt to UInt { public var COLOR = 0x1000; public var ALPHA = 0x2000; diff --git a/src/lime/graphics/cairo/CairoExtend.hx b/src/lime/graphics/cairo/CairoExtend.hx index 30b65a459..1ed95035f 100644 --- a/src/lime/graphics/cairo/CairoExtend.hx +++ b/src/lime/graphics/cairo/CairoExtend.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoExtend(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoExtend(Int) from Int to Int from UInt to UInt { public var NONE = 0; public var REPEAT = 1; diff --git a/src/lime/graphics/cairo/CairoFillRule.hx b/src/lime/graphics/cairo/CairoFillRule.hx index 80d1f66da..6fc658079 100644 --- a/src/lime/graphics/cairo/CairoFillRule.hx +++ b/src/lime/graphics/cairo/CairoFillRule.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoFillRule(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoFillRule(Int) from Int to Int from UInt to UInt { public var WINDING = 0; public var EVEN_ODD = 1; diff --git a/src/lime/graphics/cairo/CairoFilter.hx b/src/lime/graphics/cairo/CairoFilter.hx index 968ae849c..305f393f0 100644 --- a/src/lime/graphics/cairo/CairoFilter.hx +++ b/src/lime/graphics/cairo/CairoFilter.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoFilter(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoFilter(Int) from Int to Int from UInt to UInt { public var FAST = 0; public var GOOD = 1; diff --git a/src/lime/graphics/cairo/CairoFormat.hx b/src/lime/graphics/cairo/CairoFormat.hx index 1d9248daa..38b8d66f5 100644 --- a/src/lime/graphics/cairo/CairoFormat.hx +++ b/src/lime/graphics/cairo/CairoFormat.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoFormat(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoFormat(Int) from Int to Int from UInt to UInt { public var INVALID = -1; public var ARGB32 = 0; diff --git a/src/lime/graphics/cairo/CairoHintMetrics.hx b/src/lime/graphics/cairo/CairoHintMetrics.hx index b0e800c40..cd145d25c 100644 --- a/src/lime/graphics/cairo/CairoHintMetrics.hx +++ b/src/lime/graphics/cairo/CairoHintMetrics.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoHintMetrics(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoHintMetrics(Int) from Int to Int from UInt to UInt { public var DEFAULT = 0; public var OFF = 1; diff --git a/src/lime/graphics/cairo/CairoHintStyle.hx b/src/lime/graphics/cairo/CairoHintStyle.hx index a21e5a31b..e78cdb0af 100644 --- a/src/lime/graphics/cairo/CairoHintStyle.hx +++ b/src/lime/graphics/cairo/CairoHintStyle.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoHintStyle(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoHintStyle(Int) from Int to Int from UInt to UInt { public var DEFAULT = 0; public var NONE = 1; diff --git a/src/lime/graphics/cairo/CairoLineCap.hx b/src/lime/graphics/cairo/CairoLineCap.hx index ef0de8ce3..d7eaea90b 100644 --- a/src/lime/graphics/cairo/CairoLineCap.hx +++ b/src/lime/graphics/cairo/CairoLineCap.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoLineCap(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoLineCap(Int) from Int to Int from UInt to UInt { public var BUTT = 0; public var ROUND = 1; diff --git a/src/lime/graphics/cairo/CairoLineJoin.hx b/src/lime/graphics/cairo/CairoLineJoin.hx index 2bd994252..a3567b3f9 100644 --- a/src/lime/graphics/cairo/CairoLineJoin.hx +++ b/src/lime/graphics/cairo/CairoLineJoin.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoLineJoin(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoLineJoin(Int) from Int to Int from UInt to UInt { public var MITER = 0; public var ROUND = 1; diff --git a/src/lime/graphics/cairo/CairoOperator.hx b/src/lime/graphics/cairo/CairoOperator.hx index ed48fba3a..bf8919226 100644 --- a/src/lime/graphics/cairo/CairoOperator.hx +++ b/src/lime/graphics/cairo/CairoOperator.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoOperator(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoOperator(Int) from Int to Int from UInt to UInt { public var CLEAR = 0; public var SOURCE = 1; diff --git a/src/lime/graphics/cairo/CairoStatus.hx b/src/lime/graphics/cairo/CairoStatus.hx index aba825b3c..669a24329 100644 --- a/src/lime/graphics/cairo/CairoStatus.hx +++ b/src/lime/graphics/cairo/CairoStatus.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoStatus(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoStatus(Int) from Int to Int from UInt to UInt { public var SUCCESS = 0; public var NO_MEMORY = 1; diff --git a/src/lime/graphics/cairo/CairoSubpixelOrder.hx b/src/lime/graphics/cairo/CairoSubpixelOrder.hx index ce8ada409..7c8051c27 100644 --- a/src/lime/graphics/cairo/CairoSubpixelOrder.hx +++ b/src/lime/graphics/cairo/CairoSubpixelOrder.hx @@ -1,7 +1,7 @@ package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) -@:enum abstract CairoSubpixelOrder(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CairoSubpixelOrder(Int) from Int to Int from UInt to UInt { public var DEFAULT = 0; public var RGB = 1; diff --git a/src/lime/graphics/opengl/GL.hx b/src/lime/graphics/opengl/GL.hx index 6c8af0403..57df0cb01 100644 --- a/src/lime/graphics/opengl/GL.hx +++ b/src/lime/graphics/opengl/GL.hx @@ -2635,7 +2635,7 @@ class GL } } -@:dox(hide) @:noCompletion @:enum abstract GLObjectType(Int) to Int +@:dox(hide) @:noCompletion #if (haxe_ver >= 4.0) enum #else @:enum #end abstract GLObjectType(Int) to Int { var UNKNOWN = 0; var PROGRAM = 1; diff --git a/src/lime/media/AudioContextType.hx b/src/lime/media/AudioContextType.hx index 84af8c76c..f192890e5 100644 --- a/src/lime/media/AudioContextType.hx +++ b/src/lime/media/AudioContextType.hx @@ -1,6 +1,6 @@ package lime.media; -@:enum abstract AudioContextType(String) from String to String +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract AudioContextType(String) from String to String { var FLASH = "flash"; var HTML5 = "html5"; diff --git a/src/lime/net/HTTPRequestMethod.hx b/src/lime/net/HTTPRequestMethod.hx index b98c30e56..e5226cefa 100644 --- a/src/lime/net/HTTPRequestMethod.hx +++ b/src/lime/net/HTTPRequestMethod.hx @@ -1,6 +1,6 @@ package lime.net; -@:enum abstract HTTPRequestMethod(String) from String to String +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HTTPRequestMethod(String) from String to String { public var DELETE = "DELETE"; public var GET = "GET"; diff --git a/src/lime/net/curl/CURLCode.hx b/src/lime/net/curl/CURLCode.hx index 80e198696..7119de3b6 100644 --- a/src/lime/net/curl/CURLCode.hx +++ b/src/lime/net/curl/CURLCode.hx @@ -1,7 +1,7 @@ package lime.net.curl; #if (!lime_doc_gen || lime_curl) -@:enum abstract CURLCode(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CURLCode(Int) from Int to Int from UInt to UInt { var OK = 0; var UNSUPPORTED_PROTOCOL = 1; diff --git a/src/lime/net/curl/CURLInfo.hx b/src/lime/net/curl/CURLInfo.hx index fe2ecfbd7..d1fc6fe1a 100644 --- a/src/lime/net/curl/CURLInfo.hx +++ b/src/lime/net/curl/CURLInfo.hx @@ -1,7 +1,7 @@ package lime.net.curl; #if (!lime_doc_gen || lime_curl) -@:enum abstract CURLInfo(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CURLInfo(Int) from Int to Int from UInt to UInt { var NONE = 0; var EFFECTIVE_URL = 0x100000 + 1; diff --git a/src/lime/net/curl/CURLMultiCode.hx b/src/lime/net/curl/CURLMultiCode.hx index 9b26c8d8d..a787651c1 100644 --- a/src/lime/net/curl/CURLMultiCode.hx +++ b/src/lime/net/curl/CURLMultiCode.hx @@ -1,7 +1,7 @@ package lime.net.curl; #if (!lime_doc_gen || lime_curl) -@:enum abstract CURLMultiCode(Int) from Int to Int from UInt /*to UInt*/ +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CURLMultiCode(Int) from Int to Int from UInt /*to UInt*/ { /* please call curl_multi_perform() or curl_multi_socket*() soon */ var CALL_MULTI_PERFORM = -1; diff --git a/src/lime/net/curl/CURLMultiOption.hx b/src/lime/net/curl/CURLMultiOption.hx index 28b892814..128e61ad1 100644 --- a/src/lime/net/curl/CURLMultiOption.hx +++ b/src/lime/net/curl/CURLMultiOption.hx @@ -1,7 +1,7 @@ package lime.net.curl; #if (!lime_doc_gen || lime_curl) -@:enum abstract CURLMultiOption(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CURLMultiOption(Int) from Int to Int from UInt to UInt { /* This is the socket callback function pointer */ var SOCKETFUNCTION = 200001; diff --git a/src/lime/net/curl/CURLOption.hx b/src/lime/net/curl/CURLOption.hx index 7619f92ce..e7dac5748 100644 --- a/src/lime/net/curl/CURLOption.hx +++ b/src/lime/net/curl/CURLOption.hx @@ -1,7 +1,7 @@ package lime.net.curl; #if (!lime_doc_gen || lime_curl) -@:enum abstract CURLOption(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CURLOption(Int) from Int to Int from UInt to UInt { // var FILE = 10001; // var WRITEDATA = 10001; diff --git a/src/lime/net/curl/CURLVersion.hx b/src/lime/net/curl/CURLVersion.hx index e08e19048..34aa48063 100644 --- a/src/lime/net/curl/CURLVersion.hx +++ b/src/lime/net/curl/CURLVersion.hx @@ -1,7 +1,7 @@ package lime.net.curl; #if (!lime_doc_gen || lime_curl) -@:enum abstract CURLVersion(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract CURLVersion(Int) from Int to Int from UInt to UInt { var FIRST = 0; var SECOND = 1; diff --git a/src/lime/net/oauth/OAuthSignatureMethod.hx b/src/lime/net/oauth/OAuthSignatureMethod.hx index df29fa0b1..4a163ab18 100644 --- a/src/lime/net/oauth/OAuthSignatureMethod.hx +++ b/src/lime/net/oauth/OAuthSignatureMethod.hx @@ -1,6 +1,6 @@ package lime.net.oauth; -@:enum abstract OAuthSignatureMethod(String) +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract OAuthSignatureMethod(String) { // var PLAINTEXT = "PLAINTEXT"; var HMAC_SHA1 = "HMAC-SHA1"; diff --git a/src/lime/net/oauth/OAuthVersion.hx b/src/lime/net/oauth/OAuthVersion.hx index d3026fb46..02314f05e 100644 --- a/src/lime/net/oauth/OAuthVersion.hx +++ b/src/lime/net/oauth/OAuthVersion.hx @@ -1,6 +1,6 @@ package lime.net.oauth; -@:enum abstract OAuthVersion(String) +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract OAuthVersion(String) { var V1 = "1.0"; var V2 = "2.0"; diff --git a/src/lime/system/System.hx b/src/lime/system/System.hx index 6701340b1..005061521 100644 --- a/src/lime/system/System.hx +++ b/src/lime/system/System.hx @@ -818,7 +818,7 @@ class System } } -@:enum private abstract SystemDirectory(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) private enum #else @:enum private #end abstract SystemDirectory(Int) from Int to Int from UInt to UInt { var APPLICATION = 0; var APPLICATION_STORAGE = 1; diff --git a/src/lime/text/harfbuzz/HBBufferClusterLevel.hx b/src/lime/text/harfbuzz/HBBufferClusterLevel.hx index e8c44c402..4030093ba 100644 --- a/src/lime/text/harfbuzz/HBBufferClusterLevel.hx +++ b/src/lime/text/harfbuzz/HBBufferClusterLevel.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBBufferClusterLevel(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBBufferClusterLevel(Int) from Int to Int { public var MONOTONE_GRAPHEMES = 0; public var MONOTONE_CHARACTERS = 1; diff --git a/src/lime/text/harfbuzz/HBBufferContentType.hx b/src/lime/text/harfbuzz/HBBufferContentType.hx index 13de4fcc0..09d96650b 100644 --- a/src/lime/text/harfbuzz/HBBufferContentType.hx +++ b/src/lime/text/harfbuzz/HBBufferContentType.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBBufferContentType(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBBufferContentType(Int) from Int to Int { public var INVALID = 0; public var UNICODE = 1; diff --git a/src/lime/text/harfbuzz/HBBufferFlags.hx b/src/lime/text/harfbuzz/HBBufferFlags.hx index 696c130b1..9e560cb5c 100644 --- a/src/lime/text/harfbuzz/HBBufferFlags.hx +++ b/src/lime/text/harfbuzz/HBBufferFlags.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBBufferFlags(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBBufferFlags(Int) from Int to Int { public var DEFAULT = 0x00000000; public var BOT = 0x00000001; diff --git a/src/lime/text/harfbuzz/HBBufferSerializeFlags.hx b/src/lime/text/harfbuzz/HBBufferSerializeFlags.hx index 6d71b66f5..519879924 100644 --- a/src/lime/text/harfbuzz/HBBufferSerializeFlags.hx +++ b/src/lime/text/harfbuzz/HBBufferSerializeFlags.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBBufferSerializeFlags(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBBufferSerializeFlags(Int) from Int to Int { public var DEFAULT = 0x00000000; public var NO_CLUSTERS = 0x00000001; diff --git a/src/lime/text/harfbuzz/HBBufferSerializeFormat.hx b/src/lime/text/harfbuzz/HBBufferSerializeFormat.hx index 3082056b8..92f60090e 100644 --- a/src/lime/text/harfbuzz/HBBufferSerializeFormat.hx +++ b/src/lime/text/harfbuzz/HBBufferSerializeFormat.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBBufferSerializeFormat(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBBufferSerializeFormat(Int) from Int to Int { // public var HB_BUFFER_SERIALIZE_FORMAT_TEXT = HB_TAG('T', 'E', 'X', 'T'); // public var JSON = HB_TAG('J', 'S', 'O', 'N'); diff --git a/src/lime/text/harfbuzz/HBDirection.hx b/src/lime/text/harfbuzz/HBDirection.hx index 47b4f4ea3..dd081850b 100644 --- a/src/lime/text/harfbuzz/HBDirection.hx +++ b/src/lime/text/harfbuzz/HBDirection.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBDirection(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBDirection(Int) from Int to Int { public var INVALID = 0; public var LTR = 4; diff --git a/src/lime/text/harfbuzz/HBMemoryMode.hx b/src/lime/text/harfbuzz/HBMemoryMode.hx index 1b7ee85df..30a9cda91 100644 --- a/src/lime/text/harfbuzz/HBMemoryMode.hx +++ b/src/lime/text/harfbuzz/HBMemoryMode.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBMemoryMode(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBMemoryMode(Int) from Int to Int { public var DUPLICATE = 0; public var READONLY = 1; diff --git a/src/lime/text/harfbuzz/HBScript.hx b/src/lime/text/harfbuzz/HBScript.hx index f01c1eb72..bc3359dd5 100644 --- a/src/lime/text/harfbuzz/HBScript.hx +++ b/src/lime/text/harfbuzz/HBScript.hx @@ -1,7 +1,7 @@ package lime.text.harfbuzz; #if (!lime_doc_gen || lime_harfbuzz) -@:enum abstract HBScript(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract HBScript(Int) from Int to Int { public var COMMON = "Z".code << 24 | "y".code << 16 | "y".code << 8 | "y".code; public var INHERITED = "Z".code << 24 | "i".code << 16 | "n".code << 8 | "h".code; diff --git a/src/lime/tools/Platform.hx b/src/lime/tools/Platform.hx index 0eb76bfad..472c635a7 100644 --- a/src/lime/tools/Platform.hx +++ b/src/lime/tools/Platform.hx @@ -1,6 +1,6 @@ package lime.tools; -@:enum abstract Platform(String) +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract Platform(String) { var AIR = "air"; var ANDROID = "android"; diff --git a/src/lime/ui/FileDialog.hx b/src/lime/ui/FileDialog.hx index 2f11b0bea..0720afd78 100644 --- a/src/lime/ui/FileDialog.hx +++ b/src/lime/ui/FileDialog.hx @@ -146,6 +146,7 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); if (bytes != null) @@ -155,6 +156,7 @@ class FileDialog #else path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); @@ -164,6 +166,7 @@ class FileDialog #end var paths = null; + #if (!macro && lime_cffi) #if hl var bytes:NativeArray = cast NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath); if (bytes != null) @@ -177,6 +180,7 @@ class FileDialog #else paths = NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath); #end + #end worker.sendComplete(paths); @@ -186,6 +190,7 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath); if (bytes != null) @@ -195,6 +200,7 @@ class FileDialog #else path = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath); #end + #end worker.sendComplete(path); @@ -204,6 +210,7 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); if (bytes != null) @@ -213,6 +220,7 @@ class FileDialog #else path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); } @@ -264,12 +272,14 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); if (bytes != null) path = @:privateAccess String.fromUTF8(cast bytes); #else path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); }); @@ -330,12 +340,14 @@ class FileDialog #end var path = null; + #if (!macro && lime_cffi) #if hl var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); path = @:privateAccess String.fromUTF8(cast bytes); #else path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath); #end + #end worker.sendComplete(path); }); diff --git a/src/lime/ui/GamepadAxis.hx b/src/lime/ui/GamepadAxis.hx index 25dc60409..e328d1ceb 100644 --- a/src/lime/ui/GamepadAxis.hx +++ b/src/lime/ui/GamepadAxis.hx @@ -1,6 +1,6 @@ package lime.ui; -@:enum abstract GamepadAxis(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract GamepadAxis(Int) from Int to Int from UInt to UInt { var LEFT_X = 0; var LEFT_Y = 1; diff --git a/src/lime/ui/GamepadButton.hx b/src/lime/ui/GamepadButton.hx index 75d9b4734..33573fcd1 100644 --- a/src/lime/ui/GamepadButton.hx +++ b/src/lime/ui/GamepadButton.hx @@ -1,6 +1,6 @@ package lime.ui; -@:enum abstract GamepadButton(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract GamepadButton(Int) from Int to Int from UInt to UInt { var A = 0; var B = 1; diff --git a/src/lime/ui/KeyCode.hx b/src/lime/ui/KeyCode.hx index 9e0ccda13..1843e6d4f 100644 --- a/src/lime/ui/KeyCode.hx +++ b/src/lime/ui/KeyCode.hx @@ -3,7 +3,7 @@ package lime.ui; import lime._internal.backend.native.NativeCFFI; @:access(lime._internal.backend.native.NativeCFFI) -@:enum abstract KeyCode(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract KeyCode(Int) from Int to Int from UInt to UInt { var UNKNOWN = 0x00; var BACKSPACE = 0x08; diff --git a/src/lime/ui/MouseButton.hx b/src/lime/ui/MouseButton.hx index c7901fc13..831d8c7d2 100644 --- a/src/lime/ui/MouseButton.hx +++ b/src/lime/ui/MouseButton.hx @@ -1,6 +1,6 @@ package lime.ui; -@:enum abstract MouseButton(Int) from Int to Int +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract MouseButton(Int) from Int to Int { var LEFT = 0; var MIDDLE = 1; diff --git a/src/lime/ui/ScanCode.hx b/src/lime/ui/ScanCode.hx index f85097c85..52cca0a5d 100644 --- a/src/lime/ui/ScanCode.hx +++ b/src/lime/ui/ScanCode.hx @@ -4,7 +4,7 @@ import lime._internal.backend.native.NativeCFFI; @:access(lime._internal.backend.native.NativeCFFI) @:access(lime.ui.KeyCode) -@:enum abstract ScanCode(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract ScanCode(Int) from Int to Int from UInt to UInt { var UNKNOWN = 0; var BACKSPACE = 42; diff --git a/src/lime/utils/ArrayBufferView.hx b/src/lime/utils/ArrayBufferView.hx index 746f70e15..23ece48ed 100644 --- a/src/lime/utils/ArrayBufferView.hx +++ b/src/lime/utils/ArrayBufferView.hx @@ -400,7 +400,7 @@ class ArrayBufferView RangeError; } -@:noCompletion @:dox(hide) @:enum +@:noCompletion @:dox(hide) #if (haxe_ver >= 4.0) enum #else @:enum #end abstract TypedArrayType(Int) from Int to Int { var None = 0; @@ -420,7 +420,7 @@ abstract TypedArrayType(Int) from Int to Int { // 8 #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getInt8(buffer:ArrayBuffer, byteOffset:Int):Int @@ -434,7 +434,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setInt8(buffer:ArrayBuffer, byteOffset:Int, value:Int) @@ -450,7 +450,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getUint8(buffer:ArrayBuffer, byteOffset:Int):Null @@ -463,7 +463,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setUint8Clamped(buffer:ArrayBuffer, byteOffset:Int, value:UInt) @@ -472,7 +472,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setUint8(buffer:ArrayBuffer, byteOffset:Int, value:UInt) @@ -547,7 +547,7 @@ abstract TypedArrayType(Int) from Int to Int } // setInt16_BE #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getUint16(buffer:ArrayBuffer, byteOffset:Int):Null @@ -563,7 +563,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getUint16_BE(buffer:ArrayBuffer, byteOffset:Int):Null @@ -579,7 +579,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setUint16(buffer:ArrayBuffer, byteOffset:Int, value:UInt) @@ -592,7 +592,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setUint16_BE(buffer:ArrayBuffer, byteOffset:Int, value:UInt) @@ -607,7 +607,7 @@ abstract TypedArrayType(Int) from Int to Int // 32 #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getInt32(buffer:ArrayBuffer, byteOffset:Int):Int @@ -620,7 +620,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getInt32_BE(buffer:ArrayBuffer, byteOffset:Int):Int @@ -633,7 +633,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setInt32(buffer:ArrayBuffer, byteOffset:Int, value:Int) @@ -650,7 +650,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setInt32_BE(buffer:ArrayBuffer, byteOffset:Int, value:Int) @@ -667,7 +667,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getUint32(buffer:ArrayBuffer, byteOffset:Int):Null @@ -680,7 +680,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getUint32_BE(buffer:ArrayBuffer, byteOffset:Int):Null @@ -693,7 +693,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setUint32(buffer:ArrayBuffer, byteOffset:Int, value:UInt) @@ -706,7 +706,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setUint32_BE(buffer:ArrayBuffer, byteOffset:Int, value:UInt) @@ -720,7 +720,7 @@ abstract TypedArrayType(Int) from Int to Int // Float #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getFloat32(buffer:ArrayBuffer, byteOffset:Int):Float @@ -733,7 +733,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getFloat32_BE(buffer:ArrayBuffer, byteOffset:Int):Float @@ -746,7 +746,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setFloat32(buffer:ArrayBuffer, byteOffset:Int, value:Float) @@ -762,7 +762,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setFloat32_BE(buffer:ArrayBuffer, byteOffset:Int, value:Float) @@ -778,7 +778,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getFloat64(buffer:ArrayBuffer, byteOffset:Int):Float @@ -791,7 +791,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function getFloat64_BE(buffer:ArrayBuffer, byteOffset:Int):Float @@ -804,7 +804,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setFloat64(buffer:ArrayBuffer, byteOffset:Int, value:Float) @@ -820,7 +820,7 @@ abstract TypedArrayType(Int) from Int to Int } #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end public static function setFloat64_BE(buffer:ArrayBuffer, byteOffset:Int, value:Float) @@ -837,7 +837,7 @@ abstract TypedArrayType(Int) from Int to Int // Internal #if !no_typedarray_inline - @:extern + #if (haxe_ver >= 4.0) extern #else @:extern #end inline #end // clamp a Int to a 0-255 Uint8 (for Uint8Clamped array) diff --git a/src/lime/utils/AssetType.hx b/src/lime/utils/AssetType.hx index d3649debd..6c713709d 100644 --- a/src/lime/utils/AssetType.hx +++ b/src/lime/utils/AssetType.hx @@ -1,6 +1,6 @@ package lime.utils; -@:enum abstract AssetType(String) to String +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract AssetType(String) to String { var BINARY = "BINARY"; var FONT = "FONT"; diff --git a/src/lime/utils/Float32Array.hx b/src/lime/utils/Float32Array.hx index bf3fe3e25..4a29c4552 100644 --- a/src/lime/utils/Float32Array.hx +++ b/src/lime/utils/Float32Array.hx @@ -62,10 +62,10 @@ abstract Float32Array(JSFloat32Array) from JSFloat32Array to JSFloat32Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:Float):Float + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:Float):Float return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):Float + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):Float return this[idx]; // non spec haxe conversions @@ -150,18 +150,18 @@ abstract Float32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView inline function toString() return this != null ? 'Float32Array [byteLength:${this.byteLength}, length:${this.length}]' : null; - @:extern inline function get_length() + #if (haxe_ver >= 4.0) extern #else @:extern #end inline function get_length() return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int):Float { return ArrayBufferIO.getFloat32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT)); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:Float):Float { ArrayBufferIO.setFloat32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val); diff --git a/src/lime/utils/Float64Array.hx b/src/lime/utils/Float64Array.hx index 0db29a844..421206f21 100644 --- a/src/lime/utils/Float64Array.hx +++ b/src/lime/utils/Float64Array.hx @@ -61,10 +61,10 @@ abstract Float64Array(JSFloat64Array) from JSFloat64Array to JSFloat64Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:Float):Float + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:Float):Float return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):Float + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):Float return this[idx]; // non spec haxe conversions @@ -148,14 +148,14 @@ abstract Float64Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int):Float { return ArrayBufferIO.getFloat64(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT)); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:Float):Float { ArrayBufferIO.setFloat64(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val); diff --git a/src/lime/utils/Int16Array.hx b/src/lime/utils/Int16Array.hx index 3dc09461f..6d247067b 100644 --- a/src/lime/utils/Int16Array.hx +++ b/src/lime/utils/Int16Array.hx @@ -61,10 +61,10 @@ abstract Int16Array(JSInt16Array) from JSInt16Array to JSInt16Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:Int):Int + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:Int):Int return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):Int + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):Int return this[idx]; // non spec haxe conversions @@ -148,14 +148,14 @@ abstract Int16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getInt16(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT)); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:Int) { ArrayBufferIO.setInt16(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val); diff --git a/src/lime/utils/Int32Array.hx b/src/lime/utils/Int32Array.hx index 3d780cfc8..8f3de2c00 100644 --- a/src/lime/utils/Int32Array.hx +++ b/src/lime/utils/Int32Array.hx @@ -61,10 +61,10 @@ abstract Int32Array(JSInt32Array) from JSInt32Array to JSInt32Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:Int):Int + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:Int):Int return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):Int + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):Int return this[idx]; // non spec haxe conversions @@ -148,14 +148,14 @@ abstract Int32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getInt32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT)); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:Int) { ArrayBufferIO.setInt32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val); diff --git a/src/lime/utils/Int8Array.hx b/src/lime/utils/Int8Array.hx index 80d8c5d22..50c211cba 100644 --- a/src/lime/utils/Int8Array.hx +++ b/src/lime/utils/Int8Array.hx @@ -61,10 +61,10 @@ abstract Int8Array(JSInt8Array) from JSInt8Array to JSInt8Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:Int):Int + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:Int):Int return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):Int + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):Int return this[idx]; // non spec haxe conversions @@ -148,14 +148,14 @@ abstract Int8Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getInt8(this.buffer, this.byteOffset + idx); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:Int) { ArrayBufferIO.setInt8(this.buffer, this.byteOffset + idx, val); diff --git a/src/lime/utils/LogLevel.hx b/src/lime/utils/LogLevel.hx index 8ebbff7a3..e0c813ec8 100644 --- a/src/lime/utils/LogLevel.hx +++ b/src/lime/utils/LogLevel.hx @@ -1,6 +1,6 @@ package lime.utils; -@:enum abstract LogLevel(Int) from Int to Int from UInt to UInt +#if (haxe_ver >= 4.0) enum #else @:enum #end abstract LogLevel(Int) from Int to Int from UInt to UInt { var NONE = 0; var ERROR = 1; diff --git a/src/lime/utils/UInt16Array.hx b/src/lime/utils/UInt16Array.hx index a29817dc2..de4c9c966 100644 --- a/src/lime/utils/UInt16Array.hx +++ b/src/lime/utils/UInt16Array.hx @@ -61,10 +61,10 @@ abstract UInt16Array(JSUInt16Array) from JSUInt16Array to JSUInt16Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:UInt):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:UInt):UInt return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):UInt return this[idx]; // non spec haxe conversions @@ -148,14 +148,14 @@ abstract UInt16Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getUint16(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT)); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:UInt) { ArrayBufferIO.setUint16(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val); diff --git a/src/lime/utils/UInt32Array.hx b/src/lime/utils/UInt32Array.hx index 60585167b..976cb2e2c 100644 --- a/src/lime/utils/UInt32Array.hx +++ b/src/lime/utils/UInt32Array.hx @@ -61,10 +61,10 @@ abstract UInt32Array(JSUInt32Array) from JSUInt32Array to JSUInt32Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:UInt):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:UInt):UInt return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):UInt return this[idx]; // non spec haxe conversions @@ -148,14 +148,14 @@ abstract UInt32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getUint32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT)); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:UInt) { ArrayBufferIO.setUint32(this.buffer, this.byteOffset + (idx * BYTES_PER_ELEMENT), val); diff --git a/src/lime/utils/UInt8Array.hx b/src/lime/utils/UInt8Array.hx index 52d782f9d..b5d65b0f5 100644 --- a/src/lime/utils/UInt8Array.hx +++ b/src/lime/utils/UInt8Array.hx @@ -59,10 +59,10 @@ abstract UInt8Array(JSUInt8Array) from JSUInt8Array to JSUInt8Array } } - @:arrayAccess @:extern inline function __set(idx:Int, val:UInt):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:UInt):UInt return this[idx] = val; - @:arrayAccess @:extern inline function __get(idx:Int):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):UInt return this[idx]; // non spec haxe conversions @@ -149,14 +149,14 @@ abstract UInt8Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getUint8(this.buffer, this.byteOffset + idx); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:UInt) { ArrayBufferIO.setUint8(this.buffer, this.byteOffset + idx, val); diff --git a/src/lime/utils/UInt8ClampedArray.hx b/src/lime/utils/UInt8ClampedArray.hx index b261af058..a2c642d66 100644 --- a/src/lime/utils/UInt8ClampedArray.hx +++ b/src/lime/utils/UInt8ClampedArray.hx @@ -61,10 +61,10 @@ abstract UInt8ClampedArray(JSUInt8ClampedArray) from JSUInt8ClampedArray to JSUI } } - @:arrayAccess @:extern inline function __set(idx:Int, val:UInt):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __set(idx:Int, val:UInt):UInt return this[idx] = _clamp(val); - @:arrayAccess @:extern inline function __get(idx:Int):UInt + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end inline function __get(idx:Int):UInt return this[idx]; // non spec haxe conversions @@ -158,14 +158,14 @@ abstract UInt8ClampedArray(ArrayBufferView) from ArrayBufferView to ArrayBufferV return this.length; @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __get(idx:Int) { return ArrayBufferIO.getUint8(this.buffer, this.byteOffset + idx); } @:noCompletion - @:arrayAccess @:extern + @:arrayAccess #if (haxe_ver >= 4.0) extern #else @:extern #end public inline function __set(idx:Int, val:UInt) { ArrayBufferIO.setUint8Clamped(this.buffer, this.byteOffset + idx, val);