|
1 | 1 | function OpenDialog(filterlist::Cstring, defaultpath::Cstring) |
2 | 2 | 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 |
4 | 4 | return status, outpath[] |
5 | 5 | end |
6 | 6 |
|
7 | 7 | function OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring) |
8 | 8 | 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 |
10 | 10 | return status, outpathset[] |
11 | 11 | end |
12 | 12 |
|
13 | 13 | function SaveDialog(filterlist::Cstring, defaultpath::Cstring) |
14 | 14 | 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 |
16 | 16 | return status, outpath[] |
17 | 17 | end |
18 | 18 |
|
19 | 19 | function PickFolder(defaultpath::Cstring) |
20 | 20 | 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 |
22 | 22 | return status, outpath[] |
23 | 23 | end |
24 | 24 |
|
25 | 25 | function GetError() |
26 | | - ccall((:NFD_GetError, libnfd), Cstring, ()) |
| 26 | + @ccall libnfd.NFD_GetError()::Cstring |
27 | 27 | end |
28 | 28 |
|
29 | 29 | function PathSetFree(pathset::NFDPathSet) |
30 | 30 | refpathset = Ref(pathset) |
31 | | - ccall((:NFD_PathSet_Free, libnfd), Cvoid, (Ref{NFDPathSet},), refpathset) |
| 31 | + @ccall libnfd.NFD_PathSet_Free(refpathset::Ref{NFDPathSet})::Cvoid |
32 | 32 | end |
33 | 33 |
|
34 | 34 | function Free(ptr) |
35 | | - ccall((:NFD_Free, libnfd), Cvoid, (Ptr{Cvoid},), ptr) |
| 35 | + @ccall libnfd.NFD_Free(ptr::Ptr{Cvoid})::Cvoid |
36 | 36 | end |
0 commit comments