Skip to content

Commit e67c696

Browse files
reverse to 1.6 ccall convention and mark ^1.6 as the compatibility option for julia version
1 parent cdb0201 commit e67c696

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name = "NativeFileDialog"
22
uuid = "e1fe445b-aa65-4df4-81c1-2041507f0fd4"
33
authors = ["José Joaquín Zubieta Rico <[email protected]> and contributors"]
4-
version = "0.2.0"
4+
version = "0.2.1"
55

66
[deps]
77
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
88
NativeFileDialog_jll = "94d9ae2c-efc7-56f8-9a02-54c47b797961"
99

1010
[compat]
1111
FilePathsBase = "0.9"
12-
julia = "1.3"
12+
julia = "^1.6"
1313

1414
[extras]
1515
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/wrapper.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
function OpenDialog(filterlist::Cstring, defaultpath::Cstring)
22
outpath = Ref(Ptr{UInt8}())
3-
status = ccall((:NFD_OpenDialog, libnfd), NFDResult, (Cstring, Cstring, Ref{Ptr{UInt8}}), filterlist, defaultpath, outpath)
3+
status = @ccall libnfd.NFD_OpenDialog(filterlist::Cstring, defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult
44
return status, outpath[]
55
end
66

77
function OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring)
88
outpathset = Ref(NFDPathSet(C_NULL, C_NULL, 0))
9-
status = ccall((:NFD_OpenDialogMultiple, libnfd), NFDResult, (Cstring, Cstring, Ref{NFDPathSet}), filterlist, defaultpath, outpathset)
9+
status = @ccall libnfd.NFD_OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring, outpathset::Ref{NFDPathSet})::NFDResult
1010
return status, outpathset[]
1111
end
1212

1313
function SaveDialog(filterlist::Cstring, defaultpath::Cstring)
1414
outpath = Ref(Ptr{UInt8}())
15-
status = ccall((:NFD_SaveDialog, libnfd), NFDResult, (Cstring, Cstring, Ref{Ptr{UInt8}}), filterlist, defaultpath, outpath)
15+
status = @ccall libnfd.NFD_SaveDialog(filterlist::Cstring, defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult
1616
return status, outpath[]
1717
end
1818

1919
function PickFolder(defaultpath::Cstring)
2020
outpath = Ref(Ptr{UInt8}())
21-
status = ccall((:NFD_PickFolder, libnfd), NFDResult, (Cstring, Ref{Ptr{UInt8}}), defaultpath, outpath)
21+
status = @ccall libnfd.NFD_PickFolder(defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult
2222
return status, outpath[]
2323
end
2424

2525
function GetError()
26-
ccall((:NFD_GetError, libnfd), Cstring, ())
26+
@ccall libnfd.NFD_GetError()::Cstring
2727
end
2828

2929
function PathSetFree(pathset::NFDPathSet)
3030
refpathset = Ref(pathset)
31-
ccall((:NFD_PathSet_Free, libnfd), Cvoid, (Ref{NFDPathSet},), refpathset)
31+
@ccall libnfd.NFD_PathSet_Free(refpathset::Ref{NFDPathSet})::Cvoid
3232
end
3333

3434
function Free(ptr)
35-
ccall((:NFD_Free, libnfd), Cvoid, (Ptr{Cvoid},), ptr)
35+
@ccall libnfd.NFD_Free(ptr::Ptr{Cvoid})::Cvoid
3636
end

0 commit comments

Comments
 (0)