forked from inkyblackness/imgui-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.go
30 lines (25 loc) · 852 Bytes
/
Settings.go
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
package imgui
// #include "wrapper/Settings.h"
import "C"
// LoadIniSettingsFromDisk loads ini settings from disk.
func LoadIniSettingsFromDisk(fileName string) {
fileNameArg, fileNameFin := wrapString(fileName)
defer fileNameFin()
C.iggLoadIniSettingsFromDisk(fileNameArg)
}
// LoadIniSettingsFromMemory loads ini settings from memory.
func LoadIniSettingsFromMemory(data string) {
dataArg, dataFin := wrapString(data)
defer dataFin()
C.iggLoadIniSettingsFromMemory(dataArg)
}
// SaveIniSettingsToDisk saves ini settings to disk.
func SaveIniSettingsToDisk(fileName string) {
fileNameArg, fileNameFin := wrapString(fileName)
defer fileNameFin()
C.iggSaveIniSettingsToDisk(fileNameArg)
}
// SaveIniSettingsToMemory saves ini settings to memory.
func SaveIniSettingsToMemory() string {
return C.GoString(C.iggSaveIniSettingsToMemory())
}