FileDialog: should use #if (!macro && lime_cffi) around calls to NativeCFFI methods, similar to Application
This commit is contained in:
@@ -110,6 +110,7 @@ class FileDialog
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
var path = null;
|
var path = null;
|
||||||
|
#if (!macro && lime_cffi)
|
||||||
#if hl
|
#if hl
|
||||||
var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
||||||
if (bytes != null)
|
if (bytes != null)
|
||||||
@@ -119,6 +120,7 @@ class FileDialog
|
|||||||
#else
|
#else
|
||||||
path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
worker.sendComplete(path);
|
worker.sendComplete(path);
|
||||||
|
|
||||||
@@ -128,6 +130,7 @@ class FileDialog
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
var paths = null;
|
var paths = null;
|
||||||
|
#if (!macro && lime_cffi)
|
||||||
#if hl
|
#if hl
|
||||||
var bytes:NativeArray<HLBytes> = cast NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath);
|
var bytes:NativeArray<HLBytes> = cast NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath);
|
||||||
if (bytes != null)
|
if (bytes != null)
|
||||||
@@ -141,6 +144,7 @@ class FileDialog
|
|||||||
#else
|
#else
|
||||||
paths = NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath);
|
paths = NativeCFFI.lime_file_dialog_open_files(title, filter, defaultPath);
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
worker.sendComplete(paths);
|
worker.sendComplete(paths);
|
||||||
|
|
||||||
@@ -150,6 +154,7 @@ class FileDialog
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
var path = null;
|
var path = null;
|
||||||
|
#if (!macro && lime_cffi)
|
||||||
#if hl
|
#if hl
|
||||||
var bytes = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath);
|
var bytes = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath);
|
||||||
if (bytes != null)
|
if (bytes != null)
|
||||||
@@ -159,6 +164,7 @@ class FileDialog
|
|||||||
#else
|
#else
|
||||||
path = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath);
|
path = NativeCFFI.lime_file_dialog_open_directory(title, filter, defaultPath);
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
worker.sendComplete(path);
|
worker.sendComplete(path);
|
||||||
|
|
||||||
@@ -168,6 +174,7 @@ class FileDialog
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
var path = null;
|
var path = null;
|
||||||
|
#if (!macro && lime_cffi)
|
||||||
#if hl
|
#if hl
|
||||||
var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
||||||
if (bytes != null)
|
if (bytes != null)
|
||||||
@@ -177,6 +184,7 @@ class FileDialog
|
|||||||
#else
|
#else
|
||||||
path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
worker.sendComplete(path);
|
worker.sendComplete(path);
|
||||||
}
|
}
|
||||||
@@ -250,12 +258,14 @@ class FileDialog
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
var path = null;
|
var path = null;
|
||||||
|
#if (!macro && lime_cffi)
|
||||||
#if hl
|
#if hl
|
||||||
var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
var bytes = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
||||||
if (bytes != null) path = @:privateAccess String.fromUTF8(cast bytes);
|
if (bytes != null) path = @:privateAccess String.fromUTF8(cast bytes);
|
||||||
#else
|
#else
|
||||||
path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
path = NativeCFFI.lime_file_dialog_open_file(title, filter, defaultPath);
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
worker.sendComplete(path);
|
worker.sendComplete(path);
|
||||||
});
|
});
|
||||||
@@ -318,12 +328,14 @@ class FileDialog
|
|||||||
#end
|
#end
|
||||||
|
|
||||||
var path = null;
|
var path = null;
|
||||||
|
#if (!macro && lime_cffi)
|
||||||
#if hl
|
#if hl
|
||||||
var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
var bytes = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
||||||
path = @:privateAccess String.fromUTF8(cast bytes);
|
path = @:privateAccess String.fromUTF8(cast bytes);
|
||||||
#else
|
#else
|
||||||
path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
path = NativeCFFI.lime_file_dialog_save_file(title, filter, defaultPath);
|
||||||
#end
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
worker.sendComplete(path);
|
worker.sendComplete(path);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user