Rename wrappers for now
This commit is contained in:
parent
a596c86f50
commit
54d10731d3
131 changed files with 179 additions and 236 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import libnx/gfx
|
import libnx_wrapper/gfx
|
||||||
import libnx/console
|
import libnx_wrapper/console
|
||||||
import libnx/hid
|
import libnx_wrapper/hid
|
||||||
import libnx/applet
|
import libnx_wrapper/applet
|
||||||
|
|
||||||
proc printf(formatstr: cstring) {.importc: "printf", varargs,
|
proc printf(formatstr: cstring) {.importc: "printf", varargs,
|
||||||
header: "<stdio.h>".}
|
header: "<stdio.h>".}
|
||||||
|
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
let buildDir = "build"
|
|
||||||
let dkpPath = getEnv("DEVKITPRO")
|
|
||||||
let toolsPath = dkpPath & "/tools/bin"
|
|
||||||
let dkpCompilerPath = dkpPath & "/devkitA64/bin"
|
|
||||||
|
|
||||||
switch("path", toolsPath)
|
|
||||||
switch("path", dkpCompilerPath)
|
|
||||||
|
|
||||||
task build, "Build hello world":
|
|
||||||
|
|
||||||
let author = "Unspecified Author"
|
|
||||||
let version = "1.0.0"
|
|
||||||
|
|
||||||
if existsDir buildDir:
|
|
||||||
rmDir buildDir
|
|
||||||
|
|
||||||
echo "Building..."
|
|
||||||
|
|
||||||
mkDir buildDir
|
|
||||||
|
|
||||||
|
|
||||||
exec "nim c --os:nintendoswitch helloworld.nim"
|
|
||||||
|
|
||||||
echo "Making nso..."
|
|
||||||
exec "elf2nso helloworld.elf " & buildDir & "/helloworld.nso"
|
|
||||||
|
|
||||||
echo "Making pfs0..."
|
|
||||||
mkdir buildDir & "/exefs"
|
|
||||||
exec "cp " & buildDir & "/helloworld.nso " & buildDir & "/exefs/main"
|
|
||||||
exec "build_pfs0 " & buildDir & "/exefs " & buildDir & "/helloworld.pfs0"
|
|
||||||
|
|
||||||
echo "Making lst..."
|
|
||||||
exec "aarch64-none-elf-gcc-nm helloworld.elf > " & buildDir & "/helloworld.lst"
|
|
||||||
|
|
||||||
echo "Making nacp..."
|
|
||||||
# Some meta data for the homebrew launcher
|
|
||||||
exec "nacptool --create helloworld '" & author & "' '" & version & "' " & buildDir & "/helloworld.nacp"
|
|
||||||
|
|
||||||
echo "Making nro..."
|
|
||||||
# This is the important one. The above are just extras.
|
|
||||||
exec "elf2nro helloworld.elf helloworld.nro --icon=" & dkpPath & "/libnx/default_icon.jpg --nacp=" & buildDir & "/helloworld.nacp"
|
|
||||||
|
|
||||||
echo "Done! helloworld.nro is now in the current directory."
|
|
||||||
echo "Other build files are in the build folder."
|
|
||||||
|
|
||||||
task clean, "Cleanup files":
|
|
||||||
if existsDir buildDir:
|
|
||||||
rmDir buildDir
|
|
||||||
|
|
||||||
if existsDir "nimcache":
|
|
||||||
rmDir "nimcache"
|
|
||||||
|
|
||||||
if existsFile "helloworld.elf":
|
|
||||||
rmFile "helloworld.elf"
|
|
||||||
|
|
||||||
if existsFile "helloworld.nro":
|
|
||||||
rmFile "helloworld.nro"
|
|
||||||
44
libnxGen.cfg
44
libnxGen.cfg
|
|
@ -1,5 +1,5 @@
|
||||||
[n.global]
|
[n.global]
|
||||||
output="src/libnx"
|
output="src/libnx_wrapper"
|
||||||
c_compiler="aarch64-none-elf-gcc"
|
c_compiler="aarch64-none-elf-gcc"
|
||||||
cpp_compiler="aarch64-none-elf-g++"
|
cpp_compiler="aarch64-none-elf-g++"
|
||||||
filter=lock
|
filter=lock
|
||||||
|
|
@ -44,23 +44,23 @@ replace.u32 = "uint32"
|
||||||
search.u64 = "u64"
|
search.u64 = "u64"
|
||||||
replace.u64 = "uint64"
|
replace.u64 = "uint64"
|
||||||
|
|
||||||
search.lib = " src/libnx"
|
search.lib = " src/libnx_wrapper"
|
||||||
replace.lib = " libnx"
|
replace.lib = " libnx_wrapper"
|
||||||
|
|
||||||
search.timport = "../types"
|
search.timport = "../types"
|
||||||
replace.timport = "libnx/types"
|
replace.timport = "libnx_wrapper/types"
|
||||||
|
|
||||||
search.kimport = "../kernel/"
|
search.kimport = "../kernel/"
|
||||||
replace.kimport = "libnx/"
|
replace.kimport = "libnx_wrapper/"
|
||||||
|
|
||||||
search.servimport = "../services/"
|
search.servimport = "../services/"
|
||||||
replace.servimport = "libnx/"
|
replace.servimport = "libnx_wrapper/"
|
||||||
|
|
||||||
search.resimport = "../result"
|
search.resimport = "../result"
|
||||||
replace.resimport = "libnx/result"
|
replace.resimport = "libnx_wrapper/result"
|
||||||
|
|
||||||
search.armimport = "../arm/"
|
search.armimport = "../arm/"
|
||||||
replace.armimport = "libnx/"
|
replace.armimport = "libnx_wrapper/"
|
||||||
|
|
||||||
search.lock = "_LOCK"
|
search.lock = "_LOCK"
|
||||||
replace.lock = "LOCK"
|
replace.lock = "LOCK"
|
||||||
|
|
@ -68,7 +68,7 @@ replace.lock = "LOCK"
|
||||||
search.cdecl = "stdcall"
|
search.cdecl = "stdcall"
|
||||||
replace.cdecl = "cdecl"
|
replace.cdecl = "cdecl"
|
||||||
|
|
||||||
[src/libnx/nim.cfg]
|
[src/libnx_wrapper/nim.cfg]
|
||||||
create = """
|
create = """
|
||||||
--path:"../"
|
--path:"../"
|
||||||
"""
|
"""
|
||||||
|
|
@ -171,7 +171,7 @@ template BIT*(n): auto = (1.uint shl n)
|
||||||
|
|
||||||
search.import = "type\n"
|
search.import = "type\n"
|
||||||
prepend.import = """
|
prepend.import = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
search.permx = "Perm_X = BIT(2), ## /< Execute permission."
|
search.permx = "Perm_X = BIT(2), ## /< Execute permission."
|
||||||
|
|
@ -186,13 +186,13 @@ replace.permrx = "Perm_Rx = Perm_R.int or Perm_X.int, ## /< Read/execute permi
|
||||||
[shmem.nim]
|
[shmem.nim]
|
||||||
search.import = "type\n"
|
search.import = "type\n"
|
||||||
prepend.import = """
|
prepend.import = """
|
||||||
import libnx/svc
|
import libnx_wrapper/svc
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[nacp.nim]
|
[nacp.nim]
|
||||||
search.t = "type"
|
search.t = "type"
|
||||||
prepend.t = """
|
prepend.t = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[lock.nim]
|
[lock.nim]
|
||||||
|
|
@ -204,7 +204,7 @@ replace.nlock_t = "= DUlock_t"
|
||||||
|
|
||||||
search.import = "type"
|
search.import = "type"
|
||||||
prepend.import = """
|
prepend.import = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
search.proc_under = "proc __"
|
search.proc_under = "proc __"
|
||||||
|
|
@ -216,19 +216,19 @@ replace.o = "uint32.high"
|
||||||
|
|
||||||
search.import = "import\n"
|
search.import = "import\n"
|
||||||
append.import = """
|
append.import = """
|
||||||
libnx/types,
|
libnx_wrapper/types,
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[audin.nim]
|
[audin.nim]
|
||||||
search.o = "import "
|
search.o = "import "
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[audout.nim]
|
[audout.nim]
|
||||||
search.o = "import "
|
search.o = "import "
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[hid.nim]
|
[hid.nim]
|
||||||
|
|
@ -267,32 +267,32 @@ prepend.key_sl = """
|
||||||
[nifm.nim]
|
[nifm.nim]
|
||||||
search.o = "import libnx"
|
search.o = "import libnx"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[set.nim]
|
[set.nim]
|
||||||
search.o = "import libnx"
|
search.o = "import libnx"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[parcel.nim]
|
[parcel.nim]
|
||||||
search.o = "import libnx"
|
search.o = "import libnx"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[fs_dev.nim]
|
[fs_dev.nim]
|
||||||
search.o = "import libnx"
|
search.o = "import libnx"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[buffer_producer.nim]
|
[buffer_producer.nim]
|
||||||
search.o = "import libnx"
|
search.o = "import libnx"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/binder
|
import libnx_wrapper/binder
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[nxlink.nim]
|
[nxlink.nim]
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
import strutils
|
|
||||||
import ospaths
|
|
||||||
const headerswitch = currentSourcePath().splitPath().head & "/nx/include/switch.h"
|
|
||||||
import libnx/types
|
|
||||||
import libnx/result
|
|
||||||
import libnx/nro
|
|
||||||
import libnx/nacp
|
|
||||||
import libnx/tls
|
|
||||||
import libnx/cache
|
|
||||||
import libnx/svc
|
|
||||||
import libnx/tmem
|
|
||||||
import libnx/shmem
|
|
||||||
import libnx/mutex
|
|
||||||
import libnx/rwlock
|
|
||||||
import libnx/condvar
|
|
||||||
import libnx/thread
|
|
||||||
import libnx/virtmem
|
|
||||||
import libnx/detect
|
|
||||||
import libnx/random
|
|
||||||
import libnx/jit
|
|
||||||
import libnx/ipc
|
|
||||||
import libnx/sm
|
|
||||||
import libnx/smm
|
|
||||||
import libnx/fs
|
|
||||||
import libnx/fsldr
|
|
||||||
import libnx/fspr
|
|
||||||
import libnx/acc
|
|
||||||
import libnx/apm
|
|
||||||
import libnx/applet
|
|
||||||
import libnx/audin
|
|
||||||
import libnx/audout
|
|
||||||
import libnx/csrng
|
|
||||||
import libnx/fatal
|
|
||||||
import libnx/time
|
|
||||||
import libnx/usb
|
|
||||||
import libnx/hid
|
|
||||||
import libnx/irs
|
|
||||||
import libnx/pl
|
|
||||||
import libnx/vi
|
|
||||||
import libnx/nv
|
|
||||||
import libnx/nifm
|
|
||||||
import libnx/ns
|
|
||||||
import libnx/ldr
|
|
||||||
import libnx/pm
|
|
||||||
import libnx/set
|
|
||||||
import libnx/lr
|
|
||||||
import libnx/spl
|
|
||||||
import libnx/gfx
|
|
||||||
import libnx/binder
|
|
||||||
import libnx/parcel
|
|
||||||
import libnx/buffer_producer
|
|
||||||
import libnx/ioctl
|
|
||||||
import libnx/nvioctl
|
|
||||||
import libnx/nvgfx
|
|
||||||
import libnx/env
|
|
||||||
import libnx/nxlink
|
|
||||||
import libnx/utf
|
|
||||||
import libnx/console
|
|
||||||
import libnx/usb_comms
|
|
||||||
import libnx/fs_dev
|
|
||||||
import libnx/romfs_dev
|
|
||||||
import libnx/socket
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headeracc = currentSourcePath().splitPath().head & "/nx/include/switch/services/acc.h"
|
const headeracc = currentSourcePath().splitPath().head & "/nx/include/switch/services/acc.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
type
|
type
|
||||||
AccountProfile* {.importc: "AccountProfile", header: headeracc, bycopy.} = object
|
AccountProfile* {.importc: "AccountProfile", header: headeracc, bycopy.} = object
|
||||||
s* {.importc: "s".}: Service
|
s* {.importc: "s".}: Service
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerapm = currentSourcePath().splitPath().head & "/nx/include/switch/services/apm.h"
|
const headerapm = currentSourcePath().splitPath().head & "/nx/include/switch/services/apm.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
proc apmInitialize*(): Result {.cdecl, importc: "apmInitialize", header: headerapm.}
|
proc apmInitialize*(): Result {.cdecl, importc: "apmInitialize", header: headerapm.}
|
||||||
proc apmExit*() {.cdecl, importc: "apmExit", header: headerapm.}
|
proc apmExit*() {.cdecl, importc: "apmExit", header: headerapm.}
|
||||||
proc apmSetPerformanceConfiguration*(PerformanceMode: uint32;
|
proc apmSetPerformanceConfiguration*(PerformanceMode: uint32;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerapplet = currentSourcePath().splitPath().head & "/nx/include/switch/services/applet.h"
|
const headerapplet = currentSourcePath().splitPath().head & "/nx/include/switch/services/applet.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
AppletType* {.size: sizeof(cint).} = enum
|
AppletType* {.size: sizeof(cint).} = enum
|
||||||
AppletType_None = -2, AppletType_Default = -1, AppletType_Application = 0,
|
AppletType_None = -2, AppletType_Default = -1, AppletType_Application = 0,
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headeraudin = currentSourcePath().splitPath().head & "/nx/include/switch/services/audin.h"
|
const headeraudin = currentSourcePath().splitPath().head & "/nx/include/switch/services/audin.h"
|
||||||
import libnx/audio
|
import libnx_wrapper/audio
|
||||||
type
|
type
|
||||||
AudioInState* {.size: sizeof(cint).} = enum
|
AudioInState* {.size: sizeof(cint).} = enum
|
||||||
AudioInState_Started = 0, AudioInState_Stopped = 1
|
AudioInState_Started = 0, AudioInState_Stopped = 1
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headeraudio = currentSourcePath().splitPath().head & "/nx/include/switch/audio/audio.h"
|
const headeraudio = currentSourcePath().splitPath().head & "/nx/include/switch/audio/audio.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
PcmFormat* {.size: sizeof(cint).} = enum
|
PcmFormat* {.size: sizeof(cint).} = enum
|
||||||
PcmFormat_Invalid = 0, PcmFormat_Int8 = 1, PcmFormat_Int16 = 2, PcmFormat_Int24 = 3,
|
PcmFormat_Invalid = 0, PcmFormat_Int8 = 1, PcmFormat_Int16 = 2, PcmFormat_Int24 = 3,
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headeraudout = currentSourcePath().splitPath().head & "/nx/include/switch/services/audout.h"
|
const headeraudout = currentSourcePath().splitPath().head & "/nx/include/switch/services/audout.h"
|
||||||
import libnx/audio
|
import libnx_wrapper/audio
|
||||||
type
|
type
|
||||||
AudioOutState* {.size: sizeof(cint).} = enum
|
AudioOutState* {.size: sizeof(cint).} = enum
|
||||||
AudioOutState_Started = 0, AudioOutState_Stopped = 1
|
AudioOutState_Started = 0, AudioOutState_Stopped = 1
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerbinder = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/binder.h"
|
const headerbinder = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/binder.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
const
|
const
|
||||||
BINDER_FIRST_CALL_TRANSACTION* = 0x00000001
|
BINDER_FIRST_CALL_TRANSACTION* = 0x00000001
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerbuffer_producer = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/buffer_producer.h"
|
const headerbuffer_producer = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/buffer_producer.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/binder
|
import libnx_wrapper/binder
|
||||||
import libnx/nvioctl
|
import libnx_wrapper/nvioctl
|
||||||
type
|
type
|
||||||
INNER_C_STRUCT_3208597589* {.importc: "no_name", header: headerbuffer_producer,
|
INNER_C_STRUCT_3208597589* {.importc: "no_name", header: headerbuffer_producer,
|
||||||
bycopy.} = object
|
bycopy.} = object
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headercache = currentSourcePath().splitPath().head & "/nx/include/switch/arm/cache.h"
|
const headercache = currentSourcePath().splitPath().head & "/nx/include/switch/arm/cache.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
proc armDCacheFlush*(`addr`: pointer; size: csize) {.cdecl,
|
proc armDCacheFlush*(`addr`: pointer; size: csize) {.cdecl,
|
||||||
importc: "armDCacheFlush", header: headercache.}
|
importc: "armDCacheFlush", header: headercache.}
|
||||||
proc armDCacheClean*(`addr`: pointer; size: csize) {.cdecl,
|
proc armDCacheClean*(`addr`: pointer; size: csize) {.cdecl,
|
||||||
|
|
@ -9,7 +9,7 @@ const headercondvar = currentSourcePath().splitPath().head & "/nx/include/switch
|
||||||
##
|
##
|
||||||
|
|
||||||
import
|
import
|
||||||
libnx/types, libnx/mutex
|
libnx_wrapper/types, libnx_wrapper/mutex
|
||||||
|
|
||||||
## / Condition variable structure.
|
## / Condition variable structure.
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerconsole = currentSourcePath().splitPath().head & "/nx/include/switch/runtime/devices/console.h"
|
const headerconsole = currentSourcePath().splitPath().head & "/nx/include/switch/runtime/devices/console.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
ConsolePrint* = proc (con: pointer; c: cint): bool {.cdecl.}
|
ConsolePrint* = proc (con: pointer; c: cint): bool {.cdecl.}
|
||||||
ConsoleFont* {.importc: "ConsoleFont", header: headerconsole, bycopy.} = object
|
ConsoleFont* {.importc: "ConsoleFont", header: headerconsole, bycopy.} = object
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headercsrng = currentSourcePath().splitPath().head & "/nx/include/switch/services/csrng.h"
|
const headercsrng = currentSourcePath().splitPath().head & "/nx/include/switch/services/csrng.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
proc csrngInitialize*(): Result {.cdecl, importc: "csrngInitialize",
|
proc csrngInitialize*(): Result {.cdecl, importc: "csrngInitialize",
|
||||||
header: headercsrng.}
|
header: headercsrng.}
|
||||||
proc csrngExit*() {.cdecl, importc: "csrngExit", header: headercsrng.}
|
proc csrngExit*() {.cdecl, importc: "csrngExit", header: headercsrng.}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerdetect = currentSourcePath().splitPath().head & "/nx/include/switch/kernel/detect.h"
|
const headerdetect = currentSourcePath().splitPath().head & "/nx/include/switch/kernel/detect.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
proc kernelAbove200*(): bool {.cdecl, importc: "kernelAbove200",
|
proc kernelAbove200*(): bool {.cdecl, importc: "kernelAbove200",
|
||||||
header: headerdetect.}
|
header: headerdetect.}
|
||||||
proc kernelAbove300*(): bool {.cdecl, importc: "kernelAbove300",
|
proc kernelAbove300*(): bool {.cdecl, importc: "kernelAbove300",
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerenv = currentSourcePath().splitPath().head & "/nx/include/switch/runtime/env.h"
|
const headerenv = currentSourcePath().splitPath().head & "/nx/include/switch/runtime/env.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
ConfigEntry* {.importc: "ConfigEntry", header: headerenv, bycopy.} = object
|
ConfigEntry* {.importc: "ConfigEntry", header: headerenv, bycopy.} = object
|
||||||
Key* {.importc: "Key".}: uint32
|
Key* {.importc: "Key".}: uint32
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerfatal = currentSourcePath().splitPath().head & "/nx/include/switch/services/fatal.h"
|
const headerfatal = currentSourcePath().splitPath().head & "/nx/include/switch/services/fatal.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
proc fatalSimple*(err: Result) {.cdecl, importc: "fatalSimple", header: headerfatal.}
|
proc fatalSimple*(err: Result) {.cdecl, importc: "fatalSimple", header: headerfatal.}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerfs = currentSourcePath().splitPath().head & "/nx/include/switch/services/fs.h"
|
const headerfs = currentSourcePath().splitPath().head & "/nx/include/switch/services/fs.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
const
|
const
|
||||||
FS_MAX_PATH* = 0x00000301
|
FS_MAX_PATH* = 0x00000301
|
||||||
FS_SAVEDATA_CURRENT_TITLEID* = 0
|
FS_SAVEDATA_CURRENT_TITLEID* = 0
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerfs_dev = currentSourcePath().splitPath().head & "/nx/include/switch/runtime/devices/fs_dev.h"
|
const headerfs_dev = currentSourcePath().splitPath().head & "/nx/include/switch/runtime/devices/fs_dev.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/fs
|
import libnx_wrapper/fs
|
||||||
const
|
const
|
||||||
FSDEV_DIRITER_MAGIC* = 0x66736476
|
FSDEV_DIRITER_MAGIC* = 0x66736476
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerfsldr = currentSourcePath().splitPath().head & "/nx/include/switch/services/fsldr.h"
|
const headerfsldr = currentSourcePath().splitPath().head & "/nx/include/switch/services/fsldr.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
import libnx/fs
|
import libnx_wrapper/fs
|
||||||
proc fsldrInitialize*(): Result {.cdecl, importc: "fsldrInitialize",
|
proc fsldrInitialize*(): Result {.cdecl, importc: "fsldrInitialize",
|
||||||
header: headerfsldr.}
|
header: headerfsldr.}
|
||||||
proc fsldrExit*() {.cdecl, importc: "fsldrExit", header: headerfsldr.}
|
proc fsldrExit*() {.cdecl, importc: "fsldrExit", header: headerfsldr.}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerfspr = currentSourcePath().splitPath().head & "/nx/include/switch/services/fspr.h"
|
const headerfspr = currentSourcePath().splitPath().head & "/nx/include/switch/services/fspr.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
import libnx/fs
|
import libnx_wrapper/fs
|
||||||
proc fsprInitialize*(): Result {.cdecl, importc: "fsprInitialize",
|
proc fsprInitialize*(): Result {.cdecl, importc: "fsprInitialize",
|
||||||
header: headerfspr.}
|
header: headerfspr.}
|
||||||
proc fsprExit*() {.cdecl, importc: "fsprExit", header: headerfspr.}
|
proc fsprExit*() {.cdecl, importc: "fsprExit", header: headerfspr.}
|
||||||
|
|
@ -10,7 +10,7 @@ const headergfx = currentSourcePath().splitPath().head & "/nx/include/switch/gfx
|
||||||
##
|
##
|
||||||
|
|
||||||
import
|
import
|
||||||
libnx/types
|
libnx_wrapper/types
|
||||||
|
|
||||||
## / Converts red, green, blue, and alpha components to packed RGBA8.
|
## / Converts red, green, blue, and alpha components to packed RGBA8.
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ const headerhid = currentSourcePath().splitPath().head & "/nx/include/switch/ser
|
||||||
##
|
##
|
||||||
|
|
||||||
import
|
import
|
||||||
libnx/types, libnx/sm
|
libnx_wrapper/types, libnx_wrapper/sm
|
||||||
|
|
||||||
## Begin enums and output structs
|
## Begin enums and output structs
|
||||||
|
|
||||||
|
|
@ -9,8 +9,8 @@ const headeripc = currentSourcePath().splitPath().head & "/nx/include/switch/ker
|
||||||
##
|
##
|
||||||
|
|
||||||
import
|
import
|
||||||
libnx/types,
|
libnx_wrapper/types,
|
||||||
libnx/result, libnx/tls, libnx/svc
|
libnx_wrapper/result, libnx_wrapper/tls, libnx_wrapper/svc
|
||||||
|
|
||||||
## / IPC input header magic
|
## / IPC input header magic
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerirs = currentSourcePath().splitPath().head & "/nx/include/switch/services/irs.h"
|
const headerirs = currentSourcePath().splitPath().head & "/nx/include/switch/services/irs.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
import libnx/hid
|
import libnx_wrapper/hid
|
||||||
type
|
type
|
||||||
IrsPackedMomentProcessorConfig* {.importc: "IrsPackedMomentProcessorConfig",
|
IrsPackedMomentProcessorConfig* {.importc: "IrsPackedMomentProcessorConfig",
|
||||||
header: headerirs, bycopy.} = object
|
header: headerirs, bycopy.} = object
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerjit = currentSourcePath().splitPath().head & "/nx/include/switch/kernel/jit.h"
|
const headerjit = currentSourcePath().splitPath().head & "/nx/include/switch/kernel/jit.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
JitType* {.size: sizeof(cint).} = enum
|
JitType* {.size: sizeof(cint).} = enum
|
||||||
JitType_CodeMemory, JitType_JitMemory
|
JitType_CodeMemory, JitType_JitMemory
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerldr = currentSourcePath().splitPath().head & "/nx/include/switch/services/ldr.h"
|
const headerldr = currentSourcePath().splitPath().head & "/nx/include/switch/services/ldr.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
import libnx/fs
|
import libnx_wrapper/fs
|
||||||
type
|
type
|
||||||
LoaderProgramInfo* {.importc: "LoaderProgramInfo", header: headerldr, bycopy.} = object
|
LoaderProgramInfo* {.importc: "LoaderProgramInfo", header: headerldr, bycopy.} = object
|
||||||
main_thread_priority* {.importc: "main_thread_priority".}: uint8
|
main_thread_priority* {.importc: "main_thread_priority".}: uint8
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerlock = "/opt/devkitpro/devkitA64/aarch64-none-elf/include/sys/lock.h"
|
const headerlock = "/opt/devkitpro/devkitA64/aarch64-none-elf/include/sys/lock.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
LOCK_T* = int32_t
|
LOCK_T* = int32_t
|
||||||
DUlock_t* {.importc: "__lock_t", header: headerlock, bycopy.} = object
|
DUlock_t* {.importc: "__lock_t", header: headerlock, bycopy.} = object
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerlr = currentSourcePath().splitPath().head & "/nx/include/switch/services/lr.h"
|
const headerlr = currentSourcePath().splitPath().head & "/nx/include/switch/services/lr.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
import libnx/fs
|
import libnx_wrapper/fs
|
||||||
type
|
type
|
||||||
LrLocationResolver* {.importc: "LrLocationResolver", header: headerlr, bycopy.} = object
|
LrLocationResolver* {.importc: "LrLocationResolver", header: headerlr, bycopy.} = object
|
||||||
s* {.importc: "s".}: Service
|
s* {.importc: "s".}: Service
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headermutex = currentSourcePath().splitPath().head & "/nx/include/switch/kernel/mutex.h"
|
const headermutex = currentSourcePath().splitPath().head & "/nx/include/switch/kernel/mutex.h"
|
||||||
import libnx/lock
|
import libnx_wrapper/lock
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
Mutex* = LOCK_T
|
Mutex* = LOCK_T
|
||||||
RMutex* = LOCK_RECURSIVE_T
|
RMutex* = LOCK_RECURSIVE_T
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headernacp = currentSourcePath().splitPath().head & "/nx/include/switch/nacp.h"
|
const headernacp = currentSourcePath().splitPath().head & "/nx/include/switch/nacp.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
NacpLanguageEntry* {.importc: "NacpLanguageEntry", header: headernacp, bycopy.} = object
|
NacpLanguageEntry* {.importc: "NacpLanguageEntry", header: headernacp, bycopy.} = object
|
||||||
name* {.importc: "name".}: array[0x00000200, char]
|
name* {.importc: "name".}: array[0x00000200, char]
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headernifm = currentSourcePath().splitPath().head & "/nx/include/switch/services/nifm.h"
|
const headernifm = currentSourcePath().splitPath().head & "/nx/include/switch/services/nifm.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/ipc
|
import libnx_wrapper/ipc
|
||||||
import libnx/detect
|
import libnx_wrapper/detect
|
||||||
import libnx/sm
|
import libnx_wrapper/sm
|
||||||
proc nifmInitialize*(): Result {.cdecl, importc: "nifmInitialize",
|
proc nifmInitialize*(): Result {.cdecl, importc: "nifmInitialize",
|
||||||
header: headernifm.}
|
header: headernifm.}
|
||||||
proc nifmExit*() {.cdecl, importc: "nifmExit", header: headernifm.}
|
proc nifmExit*() {.cdecl, importc: "nifmExit", header: headernifm.}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headerns = currentSourcePath().splitPath().head & "/nx/include/switch/services/ns.h"
|
const headerns = currentSourcePath().splitPath().head & "/nx/include/switch/services/ns.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
import libnx/nacp
|
import libnx_wrapper/nacp
|
||||||
import libnx/fs
|
import libnx_wrapper/fs
|
||||||
type
|
type
|
||||||
NsApplicationControlData* {.importc: "NsApplicationControlData",
|
NsApplicationControlData* {.importc: "NsApplicationControlData",
|
||||||
header: headerns, bycopy.} = object
|
header: headerns, bycopy.} = object
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headernv = currentSourcePath().splitPath().head & "/nx/include/switch/services/nv.h"
|
const headernv = currentSourcePath().splitPath().head & "/nx/include/switch/services/nv.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
nvServiceType* {.size: sizeof(cint).} = enum
|
nvServiceType* {.size: sizeof(cint).} = enum
|
||||||
NVSERVTYPE_Default = -1, NVSERVTYPE_Application = 0, NVSERVTYPE_Applet = 1,
|
NVSERVTYPE_Default = -1, NVSERVTYPE_Application = 0, NVSERVTYPE_Applet = 1,
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headernvgfx = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/nvgfx.h"
|
const headernvgfx = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/nvgfx.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
proc nvgfxInitialize*(): Result {.cdecl, importc: "nvgfxInitialize",
|
proc nvgfxInitialize*(): Result {.cdecl, importc: "nvgfxInitialize",
|
||||||
header: headernvgfx.}
|
header: headernvgfx.}
|
||||||
proc nvgfxExit*() {.cdecl, importc: "nvgfxExit", header: headernvgfx.}
|
proc nvgfxExit*() {.cdecl, importc: "nvgfxExit", header: headernvgfx.}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import strutils
|
import strutils
|
||||||
import ospaths
|
import ospaths
|
||||||
const headernvioctl = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/nvioctl.h"
|
const headernvioctl = currentSourcePath().splitPath().head & "/nx/include/switch/gfx/nvioctl.h"
|
||||||
import libnx/types
|
import libnx_wrapper/types
|
||||||
type
|
type
|
||||||
gpu_characteristics* {.importc: "gpu_characteristics", header: headernvioctl,
|
gpu_characteristics* {.importc: "gpu_characteristics", header: headernvioctl,
|
||||||
bycopy.} = object
|
bycopy.} = object
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue