-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reverse to 1.6 ccall convention and mark
^1.6
as the compatibility …
…option for julia version
- Loading branch information
1 parent
cdb0201
commit e67c696
Showing
2 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
function OpenDialog(filterlist::Cstring, defaultpath::Cstring) | ||
outpath = Ref(Ptr{UInt8}()) | ||
status = ccall((:NFD_OpenDialog, libnfd), NFDResult, (Cstring, Cstring, Ref{Ptr{UInt8}}), filterlist, defaultpath, outpath) | ||
status = @ccall libnfd.NFD_OpenDialog(filterlist::Cstring, defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult | ||
return status, outpath[] | ||
end | ||
|
||
function OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring) | ||
outpathset = Ref(NFDPathSet(C_NULL, C_NULL, 0)) | ||
status = ccall((:NFD_OpenDialogMultiple, libnfd), NFDResult, (Cstring, Cstring, Ref{NFDPathSet}), filterlist, defaultpath, outpathset) | ||
status = @ccall libnfd.NFD_OpenDialogMultiple(filterlist::Cstring, defaultpath::Cstring, outpathset::Ref{NFDPathSet})::NFDResult | ||
return status, outpathset[] | ||
end | ||
|
||
function SaveDialog(filterlist::Cstring, defaultpath::Cstring) | ||
outpath = Ref(Ptr{UInt8}()) | ||
status = ccall((:NFD_SaveDialog, libnfd), NFDResult, (Cstring, Cstring, Ref{Ptr{UInt8}}), filterlist, defaultpath, outpath) | ||
status = @ccall libnfd.NFD_SaveDialog(filterlist::Cstring, defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult | ||
return status, outpath[] | ||
end | ||
|
||
function PickFolder(defaultpath::Cstring) | ||
outpath = Ref(Ptr{UInt8}()) | ||
status = ccall((:NFD_PickFolder, libnfd), NFDResult, (Cstring, Ref{Ptr{UInt8}}), defaultpath, outpath) | ||
status = @ccall libnfd.NFD_PickFolder(defaultpath::Cstring, outpath::Ref{Ptr{UInt8}})::NFDResult | ||
return status, outpath[] | ||
end | ||
|
||
function GetError() | ||
ccall((:NFD_GetError, libnfd), Cstring, ()) | ||
@ccall libnfd.NFD_GetError()::Cstring | ||
end | ||
|
||
function PathSetFree(pathset::NFDPathSet) | ||
refpathset = Ref(pathset) | ||
ccall((:NFD_PathSet_Free, libnfd), Cvoid, (Ref{NFDPathSet},), refpathset) | ||
@ccall libnfd.NFD_PathSet_Free(refpathset::Ref{NFDPathSet})::Cvoid | ||
end | ||
|
||
function Free(ptr) | ||
ccall((:NFD_Free, libnfd), Cvoid, (Ptr{Cvoid},), ptr) | ||
@ccall libnfd.NFD_Free(ptr::Ptr{Cvoid})::Cvoid | ||
end |
e67c696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register()
e67c696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/49813
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: