-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsokol_args.nelua
31 lines (31 loc) · 1.29 KB
/
sokol_args.nelua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
##[[
if not SOKOL_ARGS_NO_IMPL then
cdefine 'SOKOL_ARGS_API_DECL static'
cdefine 'SOKOL_ARGS_IMPL'
end
cinclude 'sokol_args.h'
]]
global sargs_allocator: type <cimport,nodecl> = @record{
alloc: function(csize, pointer): pointer,
free: function(pointer, pointer): void,
user_data: pointer
}
global sargs_desc: type <cimport,nodecl> = @record{
argc: cint,
argv: *cstring,
max_args: cint,
buf_size: cint,
allocator: sargs_allocator
}
global function sargs_setup(desc: *sargs_desc): void <cimport,nodecl> end
global function sargs_shutdown(): void <cimport,nodecl> end
global function sargs_isvalid(): boolean <cimport,nodecl> end
global function sargs_exists(key: cstring): boolean <cimport,nodecl> end
global function sargs_value(key: cstring): cstring <cimport,nodecl> end
global function sargs_value_def(key: cstring, def: cstring): cstring <cimport,nodecl> end
global function sargs_equals(key: cstring, val: cstring): boolean <cimport,nodecl> end
global function sargs_boolean(key: cstring): boolean <cimport,nodecl> end
global function sargs_find(key: cstring): cint <cimport,nodecl> end
global function sargs_num_args(): cint <cimport,nodecl> end
global function sargs_key_at(index: cint): cstring <cimport,nodecl> end
global function sargs_value_at(index: cint): cstring <cimport,nodecl> end