diff --git a/.gitignore b/.gitignore index db358ad432..4cff67a262 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,7 @@ /dist -/build /dist-* /obj-* /syn-* -/vrclient_x64/vrclient_x64/Makefile - /.vagrant/ /vagrant_share/ diff --git a/FAudio b/FAudio index 8f3fe2f5a9..804f6f99e6 160000 --- a/FAudio +++ b/FAudio @@ -1 +1 @@ -Subproject commit 8f3fe2f5a9c2dcd9fae4c63d9c7768db4ccddfe1 +Subproject commit 804f6f99e64586d452d862fcd0f85287f013b2ef diff --git a/README.md b/README.md index eb794510ff..06f85bfe74 100644 --- a/README.md +++ b/README.md @@ -274,9 +274,12 @@ the Wine prefix. Removing the option will revert to the previous behavior. | nod3d10 | PROTON_NO_D3D10 | Disable d3d10.dll and dxgi.dll, for d3d10 games which can fall back to and run better with d3d9. | | noesync | PROTON_NO_ESYNC | Do not use eventfd-based in-process synchronization primitives. | | nofsync | PROTON_NO_FSYNC | Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no `FUTEX_WAIT_MULTIPLE` support.) | -| forcelgadd | PROTON_FORCE_LARGE_ADDRESS_AWARE | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. | +| forcelgadd | PROTON_FORCE_LARGE_ADDRESS_AWARE | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. | +| noforcelgadd | | Disable forcelgadd. If both this and `forcelgadd` are set, enabled wins. | | oldglstr | PROTON_OLD_GL_STRING | Set some driver overrides to limit the length of the GL extension string, for old games that crash on very long extension strings. | | | WINE_FULLSCREEN_INTEGER_SCALING | Enable integer scaling mode, to give sharp pixels when upscaling. | +| cmdlineappend:| | Append the string after the colon as an argument to the game command. May be specified more than once. Escape commas and backslashes with a backslash. | | d9vk | PROTON_USE_D9VK | **Note: Obsoleted in Proton 5.0.** In older versions, use Vulkan-based DXVK instead of OpenGL-based wined3d for d3d9. | +| seccomp | PROTON_USE_SECCOMP | Enable seccomp-bpf filter to emulate native syscalls, required for some DRM protections to work. | diff --git a/Vagrantfile b/Vagrantfile index 73ae082e9c..7a646a94b6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -44,7 +44,7 @@ Vagrant.configure(2) do |config| config.vagrant.plugins = "vagrant-sshfs" config.vm.provider "virtualbox" do |v| - v.cpus = cpus + v.cpus = [cpus, 32].min # virtualbox limit is 32 cpus v.memory = memory end diff --git a/Vulkan-Headers b/Vulkan-Headers index 6be1d00866..881bbb347a 160000 --- a/Vulkan-Headers +++ b/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 6be1d00866a6d3bf8a1839b902d1de9e7065a4b8 +Subproject commit 881bbb347a08d1b5aa77f61a52a30b506de9f2bf diff --git a/build/makefile_base.mak b/build/makefile_base.mak index 1b021355ea..79ac5b29f0 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -507,11 +507,11 @@ redist: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS)) module32: SHELL = $(CONTAINER_SHELL32) module32: - cd $(WINE_OBJ32)/dlls/$(module) && make + +$(MAKE) -C $(WINE_OBJ32)/dlls/$(module) module64: SHELL = $(CONTAINER_SHELL64) module64: - cd $(WINE_OBJ64)/dlls/$(module) && make + +$(MAKE) -C $(WINE_OBJ64)/dlls/$(module) module: module32 module64 @@ -750,7 +750,6 @@ GST_GOOD_MESON_ARGS := \ -Dcairo=disabled \ -Dcutter=disabled \ -Ddebugutils=disabled \ - -Ddeinterlace=disabled \ -Ddtmf=disabled \ -Deffectv=disabled \ -Dequalizer=disabled \ @@ -1047,6 +1046,7 @@ $(LSTEAMCLIENT_CONFIGURE_FILES64): $(LSTEAMCLIENT64) $(MAKEFILE_DEP) | $(LSTEAMC -I"../$(TOOLS_DIR64)"/include/ \ -I"../$(TOOLS_DIR64)"/include/wine/ \ -I"../$(TOOLS_DIR64)"/include/wine/windows/ \ + -I"../$(WINE)"/include/ \ -L"../$(TOOLS_DIR64)"/lib64/ \ -L"../$(TOOLS_DIR64)"/lib64/wine/ \ --dll ../$(LSTEAMCLIENT64) && \ @@ -1065,6 +1065,7 @@ $(LSTEAMCLIENT_CONFIGURE_FILES32): $(LSTEAMCLIENT32) $(MAKEFILE_DEP) | $(LSTEAMC -I"../$(TOOLS_DIR32)"/include/ \ -I"../$(TOOLS_DIR32)"/include/wine/ \ -I"../$(TOOLS_DIR32)"/include/wine/windows/ \ + -I"../$(WINE)"/include/ \ -L"../$(TOOLS_DIR32)"/lib/ \ -L"../$(TOOLS_DIR32)"/lib/wine/ \ --dll ../$(LSTEAMCLIENT32) && \ @@ -1125,12 +1126,11 @@ $(STEAMEXE_CONFIGURE_FILES): $(STEAMEXE_SYN) $(MAKEFILE_DEP) | $(STEAMEXE_OBJ) $ -I"../$(TOOLS_DIR32)"/include/ \ -I"../$(TOOLS_DIR32)"/include/wine/ \ -I"../$(TOOLS_DIR32)"/include/wine/windows/ \ - -I"../$(TOOLS_DIR32)"/include/wine/msvcrt/ \ -I"../$(SRCDIR)"/lsteamclient/steamworks_sdk_142/ \ -L"../$(TOOLS_DIR32)"/lib/ \ -L"../$(TOOLS_DIR32)"/lib/wine/ \ -L"../$(SRCDIR)"/steam_helper/ \ - --guiexe ../$(STEAMEXE_SYN) && \ + --guiexe --nomsvcrt ../$(STEAMEXE_SYN) && \ cp ../$(STEAMEXE_SYN)/Makefile . && \ echo >> ./Makefile 'SRCDIR := ../$(STEAMEXE_SYN)' && \ echo >> ./Makefile 'vpath % $$(SRCDIR)' && \ @@ -1148,7 +1148,7 @@ steam_configure: $(STEAMEXE_CONFIGURE_FILES) steam: SHELL = $(CONTAINER_SHELL32) steam: $(STEAMEXE_CONFIGURE_FILES) | $(WINE_BUILDTOOLS32) $(filter $(MAKECMDGOALS),wine64 wine32 wine) - +env PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" LDFLAGS="-m32" CXXFLAGS="-m32 -Wno-attributes $(COMMON_FLAGS) -g" CFLAGS="-m32 $(COMMON_FLAGS) -g" \ + +env PATH="$(abspath $(TOOLS_DIR32))/bin:$(PATH)" LDFLAGS="-m32" CXXFLAGS="-std=gnu++11 -m32 -Wno-attributes $(COMMON_FLAGS) -g" CFLAGS="-m32 $(COMMON_FLAGS) -g" \ $(MAKE) -C $(STEAMEXE_OBJ) [ x"$(STRIP)" = x ] || $(STRIP) $(STEAMEXE_OBJ)/steam.exe.so mkdir -pv $(DST_DIR)/lib/wine/ @@ -1280,7 +1280,7 @@ $(VRCLIENT32): $(VRCLIENT) $(MAKEFILE_DEP) rm -rf ./$(VRCLIENT32) mkdir -p $(VRCLIENT32)/vrclient cd $(VRCLIENT32)/vrclient && \ - ln -sfv ../../$(VRCLIENT)/vrclient_x64/*.{c,cpp,dat,h,spec} . + ln -sfv ../../$(VRCLIENT)/vrclient_x64/* . mv $(VRCLIENT32)/vrclient/vrclient_x64.spec $(VRCLIENT32)/vrclient/vrclient.spec # 64bit-configure diff --git a/dxvk b/dxvk index fbca62df8e..dbe619ce2d 160000 --- a/dxvk +++ b/dxvk @@ -1 +1 @@ -Subproject commit fbca62df8e09ef6962f300a78e01056e020a3081 +Subproject commit dbe619ce2d26054f73242fc37a484f0103f4281f diff --git a/lsteamclient/steamclient_main.c b/lsteamclient/steamclient_main.c index 94dc6a0931..1322eaa03a 100644 --- a/lsteamclient/steamclient_main.c +++ b/lsteamclient/steamclient_main.c @@ -10,6 +10,7 @@ #include "winnls.h" #include "wine/debug.h" #include "wine/library.h" +#include "wine/list.h" #include "steam_defs.h" #ifdef __linux__ @@ -18,12 +19,16 @@ #include "steamclient_private.h" +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + WINE_DEFAULT_DEBUG_CHANNEL(steamclient); char g_tmppath[PATH_MAX]; static char *controller_glyphs[512]; /* at least k_EControllerActionOrigin_Count */ +static CRITICAL_SECTION steamclient_cs = { NULL, -1, 0, 0, 0, 0 }; + BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) { TRACE("(%p, %u, %p)\n", instance, reason, reserved); @@ -38,6 +43,33 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) return TRUE; } +void sync_environment(void) +{ + static const char *steamapi_envs[] = + { + "SteamAppId", + "IgnoreChildProcesses", + }; + + char value[32767]; + + for (unsigned int i = 0; i < ARRAY_SIZE(steamapi_envs); i++) + { + if (!GetEnvironmentVariableA(steamapi_envs[i], value, ARRAY_SIZE(value))) + { + if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) + { + TRACE("unsetenv(\"%s\")\n", steamapi_envs[i]); + unsetenv(steamapi_envs[i]); + } + continue; + } + + TRACE("setenv(\"%s\", \"%s\", 1)\n", steamapi_envs[i], value); + setenv(steamapi_envs[i], value, 1); + } +} + /* returns the number of bytes written to dst, not including the NUL terminator */ unsigned int steamclient_unix_path_to_dos_path(bool api_result, const char *src, char *dst, uint32 dst_bytes, int is_url) { @@ -355,23 +387,58 @@ static const struct { #include "win_constructors_table.dat" }; +struct steamclient_interface +{ + struct list entry; + const char *name; + void *linux_side; + void *interface; +}; + +static struct list steamclient_interfaces = LIST_INIT(steamclient_interfaces); + void *create_win_interface(const char *name, void *linux_side) { + struct steamclient_interface *e; + void *ret = NULL; int i; TRACE("trying to create %s\n", name); - if(!linux_side) + if (!linux_side) return NULL; - for(i = 0; i < sizeof(constructors) / sizeof(*constructors); ++i){ - if(!strcmp(name, constructors[i].iface_version)) - return constructors[i].ctor(linux_side); + EnterCriticalSection(&steamclient_cs); + + LIST_FOR_EACH_ENTRY(e, &steamclient_interfaces, struct steamclient_interface, entry) + { + if (e->linux_side == linux_side && !strcmp(e->name, name)) + { + ret = e->interface; + TRACE("-> %p\n", ret); + goto done; + } } - ERR("Don't recognize interface name: %s\n", name); + for (i = 0; i < sizeof(constructors) / sizeof(*constructors); ++i) + { + if (!strcmp(name, constructors[i].iface_version)) + { + e = HeapAlloc(GetProcessHeap(), 0, sizeof(*e)); + e->name = constructors[i].iface_version; + e->linux_side = linux_side; + e->interface = constructors[i].ctor(linux_side); + list_add_tail(&steamclient_interfaces, &e->entry); + + ret = e->interface; + break; + } + } - return NULL; +done: + LeaveCriticalSection(&steamclient_cs); + if (!ret) ERR("Don't recognize interface name: %s\n", name); + return ret; } static void *steamclient_lib; @@ -388,6 +455,8 @@ static int load_steamclient(void) if(steamclient_lib) return 1; + sync_environment(); + #ifdef __APPLE__ if(getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH")){ snprintf(path, PATH_MAX, "%s/steamclient.dylib", getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH")); diff --git a/proton b/proton index 3a9422a5a4..d1b0e6a236 100755 --- a/proton +++ b/proton @@ -365,6 +365,14 @@ class CompatData: self.prefix_dir + "drive_c/windows/syswow64/" + f + ".dll") g_session.dlloverrides[f] = "n" +def comma_escaped(s): + escaped = False + idx = -1 + while s[idx] == '\\': + escaped = not escaped + idx = idx - 1 + return escaped + class Session: def __init__(self): self.log_file = None @@ -373,10 +381,27 @@ class Session: "steam.exe": "b", #always use our special built-in steam.exe "mfplay": "n" #disable built-in mfplay } + + self.compat_config = set() + self.cmdlineappend = [] + if "STEAM_COMPAT_CONFIG" in os.environ: - self.compat_config = set(os.environ["STEAM_COMPAT_CONFIG"].split(",")) - else: - self.compat_config = set() + config = os.environ["STEAM_COMPAT_CONFIG"] + + while config: + (cur, sep, config) = config.partition(',') + if cur.startswith("cmdlineappend:"): + while comma_escaped(cur): + (a, b, c) = config.partition(',') + cur = cur[:-1] + ',' + a + config = c + self.cmdlineappend.append(cur[14:].replace('\\\\','\\')) + else: + self.compat_config.add(cur) + + #turn forcelgadd on by default unless it is disabled in compat config + if not "noforcelgadd" in self.compat_config: + self.compat_config.add("forcelgadd") def init_wine(self): if "HOST_LC_ALL" in self.env and len(self.env["HOST_LC_ALL"]) > 0: @@ -389,6 +414,10 @@ class Session: self.env.pop("WINEARCH", "") + if 'ORIG_'+ld_path_var not in os.environ: + # Allow wine to restore this when calling an external app. + self.env['ORIG_'+ld_path_var] = os.environ.get(ld_path_var, '') + if ld_path_var in os.environ: self.env[ld_path_var] = g_proton.lib64_dir + ":" + g_proton.lib_dir + ":" + os.environ[ld_path_var] else: @@ -453,6 +482,7 @@ class Session: self.check_environment("PROTON_NO_FSYNC", "nofsync") self.check_environment("PROTON_FORCE_LARGE_ADDRESS_AWARE", "forcelgadd") self.check_environment("PROTON_OLD_GL_STRING", "oldglstr") + self.check_environment("PROTON_USE_SECCOMP", "seccomp") if not "noesync" in self.compat_config: self.env["WINEESYNC"] = "1" @@ -460,6 +490,9 @@ class Session: if not "nofsync" in self.compat_config: self.env["WINEFSYNC"] = "1" + if "seccomp" in self.compat_config: + self.env["WINESECCOMP"] = "1" + if "oldglstr" in self.compat_config: #mesa override self.env["MESA_EXTENSION_MAX_YEAR"] = "2003" @@ -467,9 +500,6 @@ class Session: self.env["__GL_ExtensionStringVersion"] = "17700" if "forcelgadd" in self.compat_config: - #forcelgadd should be used just for testing whether a game is helped by - #setting LARGE_ADDRESS_AWARE. If it does, then add an AppDefault in the - #registry, so that it doesn't impact every executable in the prefix. self.env["WINE_LARGE_ADDRESS_AWARE"] = "1" if "SteamGameId" in self.env: @@ -482,7 +512,7 @@ class Session: with open(g_proton.version_file, "r") as f: self.log_file.write("Proton: " + f.readline().strip() + "\n") self.log_file.write("SteamGameId: " + self.env["SteamGameId"] + "\n") - self.log_file.write("Command: " + str(sys.argv[2:]) + "\n") + self.log_file.write("Command: " + str(sys.argv[2:] + self.cmdlineappend) + "\n") self.log_file.write("Options: " + str(self.compat_config) + "\n") self.log_file.write("======================\n") self.log_file.flush() @@ -513,79 +543,6 @@ class Session: else: self.env["WINEDLLOVERRIDES"] = s - def setup_vr(self): - #parse linux openvr config and present it in win32 format to the app. - #logic from openvr's CVRPathRegistry_Public::GetPaths - - #check environment for overrides - vr_runtime = None - if "VR_OVERRIDE" in self.env: - vr_runtime = self.env["VR_OVERRIDE"] - self.env.pop("VR_OVERRIDE") - - vr_config = None - if "VR_CONFIG_PATH" in self.env: - vr_config = self.env["VR_CONFIG_PATH"] - self.env.pop("VR_CONFIG_PATH") - - vr_log = None - if "VR_LOG_PATH" in self.env: - vr_log = self.env["VR_LOG_PATH"] - self.env.pop("VR_LOG_PATH") - - #load from json if needed - if vr_runtime is None or \ - vr_config is None or \ - vr_log is None: - try: - path = os.environ.get("XDG_CONFIG_HOME", os.environ["HOME"] + "/.config") - path = path + "/openvr/openvrpaths.vrpath" - - with open(path, "r") as jfile: - j = json.load(jfile) - - if vr_runtime is None: - vr_runtime = j["runtime"][0] - - if vr_config is None: - vr_config = j["config"][0] - - if vr_log is None: - vr_log = j["log"][0] - except (TypeError, ValueError, OSError): - #log("Missing or invalid openvrpaths.vrpath file! " + str(sys.exc_info()[1])) - pass - - makedirs(g_compatdata.prefix_dir + "/drive_c/users/steamuser/Local Settings/Application Data/openvr") - - #remove existing file - vrpaths_name = g_compatdata.prefix_dir + "/drive_c/users/steamuser/Local Settings/Application Data/openvr/openvrpaths.vrpath" - if os.path.exists(vrpaths_name): - os.remove(vrpaths_name) - - #dump new file - if not vr_runtime is None: - try: - self.env["PROTON_VR_RUNTIME"] = vr_runtime - - j = { "runtime": [ "C:\\vrclient\\", "C:\\vrclient" ] } - - if not vr_config is None: - win_vr_config = subprocess.check_output([g_proton.wine_bin, "winepath", "-w", vr_config], env=self.env, stderr=self.log_file).decode("utf-8") - j["config"] = [ win_vr_config.strip() ] - - if not vr_log is None: - win_vr_log = subprocess.check_output([g_proton.wine_bin, "winepath", "-w", vr_log], env=self.env, stderr=self.log_file).decode("utf-8") - j["log"] = [ win_vr_log.strip() ] - - j["version"] = 1 - j["jsonid"] = "vrpathreg" - - with open(vrpaths_name, "w") as vfile: - json.dump(j, vfile, indent=2) - except (ValueError, OSError): - log("Unable to write VR config! " + str(sys.exc_info()[1])) - def dump_dbg_env(self, f): f.write("PATH=\"" + self.env["PATH"] + "\" \\\n") f.write("\tTERM=\"xterm\" \\\n") #XXX @@ -595,12 +552,12 @@ class Session: f.write("\tWINEPREFIX=\"" + self.env["WINEPREFIX"] + "\" \\\n") if "WINEESYNC" in self.env: f.write("\tWINEESYNC=\"" + self.env["WINEESYNC"] + "\" \\\n") + if "WINEFSYNC" in self.env: + f.write("\tWINEFSYNC=\"" + self.env["WINEFSYNC"] + "\" \\\n") if "SteamGameId" in self.env: f.write("\tSteamGameId=\"" + self.env["SteamGameId"] + "\" \\\n") if "SteamAppId" in self.env: f.write("\tSteamAppId=\"" + self.env["SteamAppId"] + "\" \\\n") - if "PROTON_VR_RUNTIME" in self.env: - f.write("\tPROTON_VR_RUNTIME=\"" + self.env["PROTON_VR_RUNTIME"] + "\" \\\n") if "WINEDLLOVERRIDES" in self.env: f.write("\tWINEDLLOVERRIDES=\"" + self.env["WINEDLLOVERRIDES"] + "\" \\\n") if "STEAM_COMPAT_CLIENT_INSTALL_PATH" in self.env: @@ -694,13 +651,12 @@ class Session: subprocess.call(args, env=local_env, stderr=self.log_file, stdout=self.log_file) def run(self): - self.setup_vr() if "PROTON_DUMP_DEBUG_COMMANDS" in self.env and nonzero(self.env["PROTON_DUMP_DEBUG_COMMANDS"]): try: self.dump_dbg_scripts() except OSError: log("Unable to write debug scripts! " + str(sys.exc_info()[1])) - self.run_proc([g_proton.wine_bin, "steam"] + sys.argv[2:]) + self.run_proc([g_proton.wine_bin, "steam"] + sys.argv[2:] + self.cmdlineappend) if __name__ == "__main__": diff --git a/steam_helper/json/json-forwards.h b/steam_helper/json/json-forwards.h new file mode 100644 index 0000000000..910c7de976 --- /dev/null +++ b/steam_helper/json/json-forwards.h @@ -0,0 +1,284 @@ +/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/). +/// It is intended to be used with #include "json/json-forwards.h" +/// This header provides forward declaration for all JsonCpp types. + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +*/ + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + + + + + +#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED +# define JSON_FORWARD_AMALGATED_H_INCLUDED +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +#define JSON_IS_AMALGAMATION + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_CONFIG_H_INCLUDED +#define JSON_CONFIG_H_INCLUDED + +/// If defined, indicates that json library is embedded in CppTL library. +//# define JSON_IN_CPPTL 1 + +/// If defined, indicates that json may leverage CppTL library +//# define JSON_USE_CPPTL 1 +/// If defined, indicates that cpptl vector based map should be used instead of +/// std::map +/// as Value container. +//# define JSON_USE_CPPTL_SMALLMAP 1 + +// If non-zero, the library uses exceptions to report bad input instead of C +// assertion macros. The default is to use exceptions. +#ifndef JSON_USE_EXCEPTION +#define JSON_USE_EXCEPTION 1 +#endif + +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +/// Remarks: it is automatically defined in the generated amalgated header. +// #define JSON_IS_AMALGAMATION + +#ifdef JSON_IN_CPPTL +#include +#ifndef JSON_USE_CPPTL +#define JSON_USE_CPPTL 1 +#endif +#endif + +#ifdef JSON_IN_CPPTL +#define JSON_API CPPTL_API +#elif defined(JSON_DLL_BUILD) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllexport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#elif defined(JSON_DLL) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllimport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#endif // ifdef JSON_IN_CPPTL +#if !defined(JSON_API) +#define JSON_API +#endif + +// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for +// integer +// Storages, and 64 bits integer support is disabled. +// #define JSON_NO_INT64 1 + +#if defined(_MSC_VER) // MSVC +# if _MSC_VER <= 1200 // MSVC 6 + // Microsoft Visual Studio 6 only support conversion from __int64 to double + // (no conversion from unsigned __int64). +# define JSON_USE_INT64_DOUBLE_CONVERSION 1 + // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' + // characters in the debug information) + // All projects I've ever seen with VS6 were using this globally (not bothering + // with pragma push/pop). +# pragma warning(disable : 4786) +# endif // MSVC 6 + +# if _MSC_VER >= 1500 // MSVC 2008 + /// Indicates that the following function is deprecated. +# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) +# endif + +#endif // defined(_MSC_VER) + + +#ifndef JSON_HAS_RVALUE_REFERENCES + +#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // MSVC >= 2010 + +#ifdef __clang__ +#if __has_feature(cxx_rvalue_references) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // has_feature + +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // GXX_EXPERIMENTAL + +#endif // __clang__ || __GNUC__ + +#endif // not defined JSON_HAS_RVALUE_REFERENCES + +#ifndef JSON_HAS_RVALUE_REFERENCES +#define JSON_HAS_RVALUE_REFERENCES 0 +#endif + +#ifdef __clang__ +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) +# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) +# endif // GNUC version +#endif // __clang__ || __GNUC__ + +#if !defined(JSONCPP_DEPRECATED) +#define JSONCPP_DEPRECATED(message) +#endif // if !defined(JSONCPP_DEPRECATED) + +namespace Json { +typedef int Int; +typedef unsigned int UInt; +#if defined(JSON_NO_INT64) +typedef int LargestInt; +typedef unsigned int LargestUInt; +#undef JSON_HAS_INT64 +#else // if defined(JSON_NO_INT64) +// For Microsoft Visual use specific types as long long is not supported +#if defined(_MSC_VER) // Microsoft Visual Studio +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#else // if defined(_MSC_VER) // Other platforms, use long long +typedef long long int Int64; +typedef unsigned long long int UInt64; +#endif // if defined(_MSC_VER) +typedef Int64 LargestInt; +typedef UInt64 LargestUInt; +#define JSON_HAS_INT64 +#endif // if defined(JSON_NO_INT64) +} // end namespace Json + +#endif // JSON_CONFIG_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_FORWARDS_H_INCLUDED +#define JSON_FORWARDS_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "config.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +// writer.h +class FastWriter; +class StyledWriter; + +// reader.h +class Reader; + +// features.h +class Features; + +// value.h +typedef unsigned int ArrayIndex; +class StaticString; +class Path; +class PathArgument; +class Value; +class ValueIteratorBase; +class ValueIterator; +class ValueConstIterator; + +} // namespace Json + +#endif // JSON_FORWARDS_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + + + + + +#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED diff --git a/steam_helper/json/json.h b/steam_helper/json/json.h new file mode 100644 index 0000000000..d27f65d9df --- /dev/null +++ b/steam_helper/json/json.h @@ -0,0 +1,2077 @@ +/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/). +/// It is intended to be used with #include "json/json.h" + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +*/ + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + + + + + +#ifndef JSON_AMALGATED_H_INCLUDED +# define JSON_AMALGATED_H_INCLUDED +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +#define JSON_IS_AMALGAMATION + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/version.h +// ////////////////////////////////////////////////////////////////////// + +// DO NOT EDIT. This file (and "version") is generated by CMake. +// Run CMake configure step to update it. +#ifndef JSON_VERSION_H_INCLUDED +# define JSON_VERSION_H_INCLUDED + +# define JSONCPP_VERSION_STRING "1.6.5" +# define JSONCPP_VERSION_MAJOR 1 +# define JSONCPP_VERSION_MINOR 6 +# define JSONCPP_VERSION_PATCH 5 +# define JSONCPP_VERSION_QUALIFIER +# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) + +#endif // JSON_VERSION_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/version.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_CONFIG_H_INCLUDED +#define JSON_CONFIG_H_INCLUDED + +/// If defined, indicates that json library is embedded in CppTL library. +//# define JSON_IN_CPPTL 1 + +/// If defined, indicates that json may leverage CppTL library +//# define JSON_USE_CPPTL 1 +/// If defined, indicates that cpptl vector based map should be used instead of +/// std::map +/// as Value container. +//# define JSON_USE_CPPTL_SMALLMAP 1 + +// If non-zero, the library uses exceptions to report bad input instead of C +// assertion macros. The default is to use exceptions. +#ifndef JSON_USE_EXCEPTION +#define JSON_USE_EXCEPTION 1 +#endif + +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +/// Remarks: it is automatically defined in the generated amalgated header. +// #define JSON_IS_AMALGAMATION + +#ifdef JSON_IN_CPPTL +#include +#ifndef JSON_USE_CPPTL +#define JSON_USE_CPPTL 1 +#endif +#endif + +#ifdef JSON_IN_CPPTL +#define JSON_API CPPTL_API +#elif defined(JSON_DLL_BUILD) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllexport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#elif defined(JSON_DLL) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllimport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#endif // ifdef JSON_IN_CPPTL +#if !defined(JSON_API) +#define JSON_API +#endif + +// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for +// integer +// Storages, and 64 bits integer support is disabled. +// #define JSON_NO_INT64 1 + +#if defined(_MSC_VER) // MSVC +# if _MSC_VER <= 1200 // MSVC 6 + // Microsoft Visual Studio 6 only support conversion from __int64 to double + // (no conversion from unsigned __int64). +# define JSON_USE_INT64_DOUBLE_CONVERSION 1 + // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' + // characters in the debug information) + // All projects I've ever seen with VS6 were using this globally (not bothering + // with pragma push/pop). +# pragma warning(disable : 4786) +# endif // MSVC 6 + +# if _MSC_VER >= 1500 // MSVC 2008 + /// Indicates that the following function is deprecated. +# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) +# endif + +#endif // defined(_MSC_VER) + + +#ifndef JSON_HAS_RVALUE_REFERENCES + +#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // MSVC >= 2010 + +#ifdef __clang__ +#if __has_feature(cxx_rvalue_references) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // has_feature + +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // GXX_EXPERIMENTAL + +#endif // __clang__ || __GNUC__ + +#endif // not defined JSON_HAS_RVALUE_REFERENCES + +#ifndef JSON_HAS_RVALUE_REFERENCES +#define JSON_HAS_RVALUE_REFERENCES 0 +#endif + +#ifdef __clang__ +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) +# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) +# endif // GNUC version +#endif // __clang__ || __GNUC__ + +#if !defined(JSONCPP_DEPRECATED) +#define JSONCPP_DEPRECATED(message) +#endif // if !defined(JSONCPP_DEPRECATED) + +namespace Json { +typedef int Int; +typedef unsigned int UInt; +#if defined(JSON_NO_INT64) +typedef int LargestInt; +typedef unsigned int LargestUInt; +#undef JSON_HAS_INT64 +#else // if defined(JSON_NO_INT64) +// For Microsoft Visual use specific types as long long is not supported +#if defined(_MSC_VER) // Microsoft Visual Studio +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#else // if defined(_MSC_VER) // Other platforms, use long long +typedef long long int Int64; +typedef unsigned long long int UInt64; +#endif // if defined(_MSC_VER) +typedef Int64 LargestInt; +typedef UInt64 LargestUInt; +#define JSON_HAS_INT64 +#endif // if defined(JSON_NO_INT64) +} // end namespace Json + +#endif // JSON_CONFIG_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_FORWARDS_H_INCLUDED +#define JSON_FORWARDS_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "config.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +// writer.h +class FastWriter; +class StyledWriter; + +// reader.h +class Reader; + +// features.h +class Features; + +// value.h +typedef unsigned int ArrayIndex; +class StaticString; +class Path; +class PathArgument; +class Value; +class ValueIteratorBase; +class ValueIterator; +class ValueConstIterator; + +} // namespace Json + +#endif // JSON_FORWARDS_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/features.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_FEATURES_H_INCLUDED +#define CPPTL_JSON_FEATURES_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "forwards.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +/** \brief Configuration passed to reader and writer. + * This configuration object can be used to force the Reader or Writer + * to behave in a standard conforming way. + */ +class JSON_API Features { +public: + /** \brief A configuration that allows all features and assumes all strings + * are UTF-8. + * - C & C++ comments are allowed + * - Root object can be any JSON value + * - Assumes Value strings are encoded in UTF-8 + */ + static Features all(); + + /** \brief A configuration that is strictly compatible with the JSON + * specification. + * - Comments are forbidden. + * - Root object must be either an array or an object value. + * - Assumes Value strings are encoded in UTF-8 + */ + static Features strictMode(); + + /** \brief Initialize the configuration like JsonConfig::allFeatures; + */ + Features(); + + /// \c true if comments are allowed. Default: \c true. + bool allowComments_; + + /// \c true if root must be either an array or an object value. Default: \c + /// false. + bool strictRoot_; + + /// \c true if dropped null placeholders are allowed. Default: \c false. + bool allowDroppedNullPlaceholders_; + + /// \c true if numeric object key are allowed. Default: \c false. + bool allowNumericKeys_; +}; + +} // namespace Json + +#endif // CPPTL_JSON_FEATURES_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/features.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/value.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_H_INCLUDED +#define CPPTL_JSON_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "forwards.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include + +#ifndef JSON_USE_CPPTL_SMALLMAP +#include +#else +#include +#endif +#ifdef JSON_USE_CPPTL +#include +#endif + +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +/** \brief JSON (JavaScript Object Notation). + */ +namespace Json { + +/** Base class for all exceptions we throw. + * + * We use nothing but these internally. Of course, STL can throw others. + */ +class JSON_API Exception : public std::exception { +public: + Exception(std::string const& msg); + ~Exception() throw(); + char const* what() const throw(); +protected: + std::string msg_; +}; + +/** Exceptions which the user cannot easily avoid. + * + * E.g. out-of-memory (when we use malloc), stack-overflow, malicious input + * + * \remark derived from Json::Exception + */ +class JSON_API RuntimeError : public Exception { +public: + RuntimeError(std::string const& msg); +}; + +/** Exceptions thrown by JSON_ASSERT/JSON_FAIL macros. + * + * These are precondition-violations (user bugs) and internal errors (our bugs). + * + * \remark derived from Json::Exception + */ +class JSON_API LogicError : public Exception { +public: + LogicError(std::string const& msg); +}; + +/// used internally +void throwRuntimeError(std::string const& msg); +/// used internally +void throwLogicError(std::string const& msg); + +/** \brief Type of the value held by a Value object. + */ +enum ValueType { + nullValue = 0, ///< 'null' value + intValue, ///< signed integer value + uintValue, ///< unsigned integer value + realValue, ///< double value + stringValue, ///< UTF-8 string value + booleanValue, ///< bool value + arrayValue, ///< array value (ordered list) + objectValue ///< object value (collection of name/value pairs). +}; + +enum CommentPlacement { + commentBefore = 0, ///< a comment placed on the line before a value + commentAfterOnSameLine, ///< a comment just after a value on the same line + commentAfter, ///< a comment on the line after a value (only make sense for + /// root value) + numberOfCommentPlacement +}; + +//# ifdef JSON_USE_CPPTL +// typedef CppTL::AnyEnumerator EnumMemberNames; +// typedef CppTL::AnyEnumerator EnumValues; +//# endif + +/** \brief Lightweight wrapper to tag static string. + * + * Value constructor and objectValue member assignement takes advantage of the + * StaticString and avoid the cost of string duplication when storing the + * string or the member name. + * + * Example of usage: + * \code + * Json::Value aValue( StaticString("some text") ); + * Json::Value object; + * static const StaticString code("code"); + * object[code] = 1234; + * \endcode + */ +class JSON_API StaticString { +public: + explicit StaticString(const char* czstring) : c_str_(czstring) {} + + operator const char*() const { return c_str_; } + + const char* c_str() const { return c_str_; } + +private: + const char* c_str_; +}; + +/** \brief Represents a JSON value. + * + * This class is a discriminated union wrapper that can represents a: + * - signed integer [range: Value::minInt - Value::maxInt] + * - unsigned integer (range: 0 - Value::maxUInt) + * - double + * - UTF-8 string + * - boolean + * - 'null' + * - an ordered list of Value + * - collection of name/value pairs (javascript object) + * + * The type of the held value is represented by a #ValueType and + * can be obtained using type(). + * + * Values of an #objectValue or #arrayValue can be accessed using operator[]() + * methods. + * Non-const methods will automatically create the a #nullValue element + * if it does not exist. + * The sequence of an #arrayValue will be automatically resized and initialized + * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue. + * + * The get() methods can be used to obtain default value in the case the + * required element does not exist. + * + * It is possible to iterate over the list of a #objectValue values using + * the getMemberNames() method. + * + * \note #Value string-length fit in size_t, but keys must be < 2^30. + * (The reason is an implementation detail.) A #CharReader will raise an + * exception if a bound is exceeded to avoid security holes in your app, + * but the Value API does *not* check bounds. That is the responsibility + * of the caller. + */ +class JSON_API Value { + friend class ValueIteratorBase; +public: + typedef std::vector Members; + typedef ValueIterator iterator; + typedef ValueConstIterator const_iterator; + typedef Json::UInt UInt; + typedef Json::Int Int; +#if defined(JSON_HAS_INT64) + typedef Json::UInt64 UInt64; + typedef Json::Int64 Int64; +#endif // defined(JSON_HAS_INT64) + typedef Json::LargestInt LargestInt; + typedef Json::LargestUInt LargestUInt; + typedef Json::ArrayIndex ArrayIndex; + + static const Value& null; ///< We regret this reference to a global instance; prefer the simpler Value(). + static const Value& nullRef; ///< just a kludge for binary-compatibility; same as null + /// Minimum signed integer value that can be stored in a Json::Value. + static const LargestInt minLargestInt; + /// Maximum signed integer value that can be stored in a Json::Value. + static const LargestInt maxLargestInt; + /// Maximum unsigned integer value that can be stored in a Json::Value. + static const LargestUInt maxLargestUInt; + + /// Minimum signed int value that can be stored in a Json::Value. + static const Int minInt; + /// Maximum signed int value that can be stored in a Json::Value. + static const Int maxInt; + /// Maximum unsigned int value that can be stored in a Json::Value. + static const UInt maxUInt; + +#if defined(JSON_HAS_INT64) + /// Minimum signed 64 bits int value that can be stored in a Json::Value. + static const Int64 minInt64; + /// Maximum signed 64 bits int value that can be stored in a Json::Value. + static const Int64 maxInt64; + /// Maximum unsigned 64 bits int value that can be stored in a Json::Value. + static const UInt64 maxUInt64; +#endif // defined(JSON_HAS_INT64) + +private: +#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION + class CZString { + public: + enum DuplicationPolicy { + noDuplication = 0, + duplicate, + duplicateOnCopy + }; + CZString(ArrayIndex index); + CZString(char const* str, unsigned length, DuplicationPolicy allocate); + CZString(CZString const& other); +#if JSON_HAS_RVALUE_REFERENCES + CZString(CZString&& other); +#endif + ~CZString(); + CZString& operator=(CZString other); + bool operator<(CZString const& other) const; + bool operator==(CZString const& other) const; + ArrayIndex index() const; + //const char* c_str() const; ///< \deprecated + char const* data() const; + unsigned length() const; + bool isStaticString() const; + + private: + void swap(CZString& other); + + struct StringStorage { + unsigned policy_: 2; + unsigned length_: 30; // 1GB max + }; + + char const* cstr_; // actually, a prefixed string, unless policy is noDup + union { + ArrayIndex index_; + StringStorage storage_; + }; + }; + +public: +#ifndef JSON_USE_CPPTL_SMALLMAP + typedef std::map ObjectValues; +#else + typedef CppTL::SmallMap ObjectValues; +#endif // ifndef JSON_USE_CPPTL_SMALLMAP +#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION + +public: + /** \brief Create a default Value of the given type. + + This is a very useful constructor. + To create an empty array, pass arrayValue. + To create an empty object, pass objectValue. + Another Value can then be set to this one by assignment. +This is useful since clear() and resize() will not alter types. + + Examples: +\code +Json::Value null_value; // null +Json::Value arr_value(Json::arrayValue); // [] +Json::Value obj_value(Json::objectValue); // {} +\endcode + */ + Value(ValueType type = nullValue); + Value(Int value); + Value(UInt value); +#if defined(JSON_HAS_INT64) + Value(Int64 value); + Value(UInt64 value); +#endif // if defined(JSON_HAS_INT64) + Value(double value); + Value(const char* value); ///< Copy til first 0. (NULL causes to seg-fault.) + Value(const char* begin, const char* end); ///< Copy all, incl zeroes. + /** \brief Constructs a value from a static string. + + * Like other value string constructor but do not duplicate the string for + * internal storage. The given string must remain alive after the call to this + * constructor. + * \note This works only for null-terminated strings. (We cannot change the + * size of this class, so we have nowhere to store the length, + * which might be computed later for various operations.) + * + * Example of usage: + * \code + * static StaticString foo("some text"); + * Json::Value aValue(foo); + * \endcode + */ + Value(const StaticString& value); + Value(const std::string& value); ///< Copy data() til size(). Embedded zeroes too. +#ifdef JSON_USE_CPPTL + Value(const CppTL::ConstString& value); +#endif + Value(bool value); + /// Deep copy. + Value(const Value& other); +#if JSON_HAS_RVALUE_REFERENCES + /// Move constructor + Value(Value&& other); +#endif + ~Value(); + + /// Deep copy, then swap(other). + /// \note Over-write existing comments. To preserve comments, use #swapPayload(). + Value& operator=(Value other); + /// Swap everything. + void swap(Value& other); + /// Swap values but leave comments and source offsets in place. + void swapPayload(Value& other); + + ValueType type() const; + + /// Compare payload only, not comments etc. + bool operator<(const Value& other) const; + bool operator<=(const Value& other) const; + bool operator>=(const Value& other) const; + bool operator>(const Value& other) const; + bool operator==(const Value& other) const; + bool operator!=(const Value& other) const; + int compare(const Value& other) const; + + const char* asCString() const; ///< Embedded zeroes could cause you trouble! + std::string asString() const; ///< Embedded zeroes are possible. + /** Get raw char* of string-value. + * \return false if !string. (Seg-fault if str or end are NULL.) + */ + bool getString( + char const** begin, char const** end) const; +#ifdef JSON_USE_CPPTL + CppTL::ConstString asConstString() const; +#endif + Int asInt() const; + UInt asUInt() const; +#if defined(JSON_HAS_INT64) + Int64 asInt64() const; + UInt64 asUInt64() const; +#endif // if defined(JSON_HAS_INT64) + LargestInt asLargestInt() const; + LargestUInt asLargestUInt() const; + float asFloat() const; + double asDouble() const; + bool asBool() const; + + bool isNull() const; + bool isBool() const; + bool isInt() const; + bool isInt64() const; + bool isUInt() const; + bool isUInt64() const; + bool isIntegral() const; + bool isDouble() const; + bool isNumeric() const; + bool isString() const; + bool isArray() const; + bool isObject() const; + + bool isConvertibleTo(ValueType other) const; + + /// Number of values in array or object + ArrayIndex size() const; + + /// \brief Return true if empty array, empty object, or null; + /// otherwise, false. + bool empty() const; + + /// Return isNull() + bool operator!() const; + + /// Remove all object members and array elements. + /// \pre type() is arrayValue, objectValue, or nullValue + /// \post type() is unchanged + void clear(); + + /// Resize the array to size elements. + /// New elements are initialized to null. + /// May only be called on nullValue or arrayValue. + /// \pre type() is arrayValue or nullValue + /// \post type() is arrayValue + void resize(ArrayIndex size); + + /// Access an array element (zero based index ). + /// If the array contains less than index element, then null value are + /// inserted + /// in the array so that its size is index+1. + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + Value& operator[](ArrayIndex index); + + /// Access an array element (zero based index ). + /// If the array contains less than index element, then null value are + /// inserted + /// in the array so that its size is index+1. + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + Value& operator[](int index); + + /// Access an array element (zero based index ) + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + const Value& operator[](ArrayIndex index) const; + + /// Access an array element (zero based index ) + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + const Value& operator[](int index) const; + + /// If the array contains at least index+1 elements, returns the element + /// value, + /// otherwise returns defaultValue. + Value get(ArrayIndex index, const Value& defaultValue) const; + /// Return true if index < size(). + bool isValidIndex(ArrayIndex index) const; + /// \brief Append value to array at the end. + /// + /// Equivalent to jsonvalue[jsonvalue.size()] = value; + Value& append(const Value& value); + + /// Access an object value by name, create a null member if it does not exist. + /// \note Because of our implementation, keys are limited to 2^30 -1 chars. + /// Exceeding that will cause an exception. + Value& operator[](const char* key); + /// Access an object value by name, returns null if there is no member with + /// that name. + const Value& operator[](const char* key) const; + /// Access an object value by name, create a null member if it does not exist. + /// \param key may contain embedded nulls. + Value& operator[](const std::string& key); + /// Access an object value by name, returns null if there is no member with + /// that name. + /// \param key may contain embedded nulls. + const Value& operator[](const std::string& key) const; + /** \brief Access an object value by name, create a null member if it does not + exist. + + * If the object has no entry for that name, then the member name used to store + * the new entry is not duplicated. + * Example of use: + * \code + * Json::Value object; + * static const StaticString code("code"); + * object[code] = 1234; + * \endcode + */ + Value& operator[](const StaticString& key); +#ifdef JSON_USE_CPPTL + /// Access an object value by name, create a null member if it does not exist. + Value& operator[](const CppTL::ConstString& key); + /// Access an object value by name, returns null if there is no member with + /// that name. + const Value& operator[](const CppTL::ConstString& key) const; +#endif + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + Value get(const char* key, const Value& defaultValue) const; + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + /// \note key may contain embedded nulls. + Value get(const char* begin, const char* end, const Value& defaultValue) const; + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + /// \param key may contain embedded nulls. + Value get(const std::string& key, const Value& defaultValue) const; +#ifdef JSON_USE_CPPTL + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + Value get(const CppTL::ConstString& key, const Value& defaultValue) const; +#endif + /// Most general and efficient version of isMember()const, get()const, + /// and operator[]const + /// \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30 + Value const* find(char const* begin, char const* end) const; + /// Most general and efficient version of object-mutators. + /// \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30 + /// \return non-zero, but JSON_ASSERT if this is neither object nor nullValue. + Value const* demand(char const* begin, char const* end); + /// \brief Remove and return the named member. + /// + /// Do nothing if it did not exist. + /// \return the removed Value, or null. + /// \pre type() is objectValue or nullValue + /// \post type() is unchanged + /// \deprecated + Value removeMember(const char* key); + /// Same as removeMember(const char*) + /// \param key may contain embedded nulls. + /// \deprecated + Value removeMember(const std::string& key); + /// Same as removeMember(const char* begin, const char* end, Value* removed), + /// but 'key' is null-terminated. + bool removeMember(const char* key, Value* removed); + /** \brief Remove the named map member. + + Update 'removed' iff removed. + \param key may contain embedded nulls. + \return true iff removed (no exceptions) + */ + bool removeMember(std::string const& key, Value* removed); + /// Same as removeMember(std::string const& key, Value* removed) + bool removeMember(const char* begin, const char* end, Value* removed); + /** \brief Remove the indexed array element. + + O(n) expensive operations. + Update 'removed' iff removed. + \return true iff removed (no exceptions) + */ + bool removeIndex(ArrayIndex i, Value* removed); + + /// Return true if the object has a member named key. + /// \note 'key' must be null-terminated. + bool isMember(const char* key) const; + /// Return true if the object has a member named key. + /// \param key may contain embedded nulls. + bool isMember(const std::string& key) const; + /// Same as isMember(std::string const& key)const + bool isMember(const char* begin, const char* end) const; +#ifdef JSON_USE_CPPTL + /// Return true if the object has a member named key. + bool isMember(const CppTL::ConstString& key) const; +#endif + + /// \brief Return a list of the member names. + /// + /// If null, return an empty list. + /// \pre type() is objectValue or nullValue + /// \post if type() was nullValue, it remains nullValue + Members getMemberNames() const; + + //# ifdef JSON_USE_CPPTL + // EnumMemberNames enumMemberNames() const; + // EnumValues enumValues() const; + //# endif + + /// \deprecated Always pass len. + JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.") + void setComment(const char* comment, CommentPlacement placement); + /// Comments must be //... or /* ... */ + void setComment(const char* comment, size_t len, CommentPlacement placement); + /// Comments must be //... or /* ... */ + void setComment(const std::string& comment, CommentPlacement placement); + bool hasComment(CommentPlacement placement) const; + /// Include delimiters and embedded newlines. + std::string getComment(CommentPlacement placement) const; + + std::string toStyledString() const; + + const_iterator begin() const; + const_iterator end() const; + + iterator begin(); + iterator end(); + + // Accessors for the [start, limit) range of bytes within the JSON text from + // which this value was parsed, if any. + void setOffsetStart(size_t start); + void setOffsetLimit(size_t limit); + size_t getOffsetStart() const; + size_t getOffsetLimit() const; + +private: + void initBasic(ValueType type, bool allocated = false); + + Value& resolveReference(const char* key); + Value& resolveReference(const char* key, const char* end); + + struct CommentInfo { + CommentInfo(); + ~CommentInfo(); + + void setComment(const char* text, size_t len); + + char* comment_; + }; + + // struct MemberNamesTransform + //{ + // typedef const char *result_type; + // const char *operator()( const CZString &name ) const + // { + // return name.c_str(); + // } + //}; + + union ValueHolder { + LargestInt int_; + LargestUInt uint_; + double real_; + bool bool_; + char* string_; // actually ptr to unsigned, followed by str, unless !allocated_ + ObjectValues* map_; + } value_; + ValueType type_ : 8; + unsigned int allocated_ : 1; // Notes: if declared as bool, bitfield is useless. + // If not allocated_, string_ must be null-terminated. + CommentInfo* comments_; + Value *default_value_; // if via .get( "key", default ), this was the default + + // [start, limit) byte offsets in the source JSON text from which this Value + // was extracted. + size_t start_; + size_t limit_; +}; + +/** \brief Experimental and untested: represents an element of the "path" to + * access a node. + */ +class JSON_API PathArgument { +public: + friend class Path; + + PathArgument(); + PathArgument(ArrayIndex index); + PathArgument(const char* key); + PathArgument(const std::string& key); + +private: + enum Kind { + kindNone = 0, + kindIndex, + kindKey + }; + std::string key_; + ArrayIndex index_; + Kind kind_; +}; + +/** \brief Experimental and untested: represents a "path" to access a node. + * + * Syntax: + * - "." => root node + * - ".[n]" => elements at index 'n' of root node (an array value) + * - ".name" => member named 'name' of root node (an object value) + * - ".name1.name2.name3" + * - ".[0][1][2].name1[3]" + * - ".%" => member name is provided as parameter + * - ".[%]" => index is provied as parameter + */ +class JSON_API Path { +public: + Path(const std::string& path, + const PathArgument& a1 = PathArgument(), + const PathArgument& a2 = PathArgument(), + const PathArgument& a3 = PathArgument(), + const PathArgument& a4 = PathArgument(), + const PathArgument& a5 = PathArgument()); + + const Value& resolve(const Value& root) const; + Value resolve(const Value& root, const Value& defaultValue) const; + /// Creates the "path" to access the specified node and returns a reference on + /// the node. + Value& make(Value& root) const; + +private: + typedef std::vector InArgs; + typedef std::vector Args; + + void makePath(const std::string& path, const InArgs& in); + void addPathInArg(const std::string& path, + const InArgs& in, + InArgs::const_iterator& itInArg, + PathArgument::Kind kind); + void invalidPath(const std::string& path, int location); + + Args args_; +}; + +/** \brief base class for Value iterators. + * + */ +class JSON_API ValueIteratorBase { +public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef unsigned int size_t; + typedef int difference_type; + typedef ValueIteratorBase SelfType; + + bool operator==(const SelfType& other) const { return isEqual(other); } + + bool operator!=(const SelfType& other) const { return !isEqual(other); } + + difference_type operator-(const SelfType& other) const { + return other.computeDistance(*this); + } + + /// Return either the index or the member name of the referenced value as a + /// Value. + Value key() const; + + /// Return the index of the referenced Value, or -1 if it is not an arrayValue. + UInt index() const; + + /// Return the member name of the referenced Value, or "" if it is not an + /// objectValue. + /// \note Avoid `c_str()` on result, as embedded zeroes are possible. + std::string name() const; + + /// Return the member name of the referenced Value. "" if it is not an + /// objectValue. + /// \deprecated This cannot be used for UTF-8 strings, since there can be embedded nulls. + JSONCPP_DEPRECATED("Use `key = name();` instead.") + char const* memberName() const; + /// Return the member name of the referenced Value, or NULL if it is not an + /// objectValue. + /// \note Better version than memberName(). Allows embedded nulls. + char const* memberName(char const** end) const; + +protected: + Value& deref() const; + + void increment(); + + void decrement(); + + difference_type computeDistance(const SelfType& other) const; + + bool isEqual(const SelfType& other) const; + + void copy(const SelfType& other); + +private: + Value::ObjectValues::iterator current_; + // Indicates that iterator is for a null value. + bool isNull_; + +public: + // For some reason, BORLAND needs these at the end, rather + // than earlier. No idea why. + ValueIteratorBase(); + explicit ValueIteratorBase(const Value::ObjectValues::iterator& current); +}; + +/** \brief const iterator for object and array value. + * + */ +class JSON_API ValueConstIterator : public ValueIteratorBase { + friend class Value; + +public: + typedef const Value value_type; + //typedef unsigned int size_t; + //typedef int difference_type; + typedef const Value& reference; + typedef const Value* pointer; + typedef ValueConstIterator SelfType; + + ValueConstIterator(); + ValueConstIterator(ValueIterator const& other); + +private: +/*! \internal Use by Value to create an iterator. + */ + explicit ValueConstIterator(const Value::ObjectValues::iterator& current); +public: + SelfType& operator=(const ValueIteratorBase& other); + + SelfType operator++(int) { + SelfType temp(*this); + ++*this; + return temp; + } + + SelfType operator--(int) { + SelfType temp(*this); + --*this; + return temp; + } + + SelfType& operator--() { + decrement(); + return *this; + } + + SelfType& operator++() { + increment(); + return *this; + } + + reference operator*() const { return deref(); } + + pointer operator->() const { return &deref(); } +}; + +/** \brief Iterator for object and array value. + */ +class JSON_API ValueIterator : public ValueIteratorBase { + friend class Value; + +public: + typedef Value value_type; + typedef unsigned int size_t; + typedef int difference_type; + typedef Value& reference; + typedef Value* pointer; + typedef ValueIterator SelfType; + + ValueIterator(); + explicit ValueIterator(const ValueConstIterator& other); + ValueIterator(const ValueIterator& other); + +private: +/*! \internal Use by Value to create an iterator. + */ + explicit ValueIterator(const Value::ObjectValues::iterator& current); +public: + SelfType& operator=(const SelfType& other); + + SelfType operator++(int) { + SelfType temp(*this); + ++*this; + return temp; + } + + SelfType operator--(int) { + SelfType temp(*this); + --*this; + return temp; + } + + SelfType& operator--() { + decrement(); + return *this; + } + + SelfType& operator++() { + increment(); + return *this; + } + + reference operator*() const { return deref(); } + + pointer operator->() const { return &deref(); } +}; + +} // namespace Json + + +namespace std { +/// Specialize std::swap() for Json::Value. +template<> +inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); } +} + + +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(pop) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +#endif // CPPTL_JSON_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/value.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/reader.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_READER_H_INCLUDED +#define CPPTL_JSON_READER_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "features.h" +#include "value.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include + +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +namespace Json { + +/** \brief Unserialize a JSON document into a + *Value. + * + * \deprecated Use CharReader and CharReaderBuilder. + */ +class JSON_API Reader { +public: + typedef char Char; + typedef const Char* Location; + + /** \brief An error tagged with where in the JSON text it was encountered. + * + * The offsets give the [start, limit) range of bytes within the text. Note + * that this is bytes, not codepoints. + * + */ + struct StructuredError { + size_t offset_start; + size_t offset_limit; + std::string message; + }; + + /** \brief Constructs a Reader allowing all features + * for parsing. + */ + Reader(); + + /** \brief Constructs a Reader allowing the specified feature set + * for parsing. + */ + Reader(const Features& features); + + /** \brief Read a Value from a JSON + * document. + * \param document UTF-8 encoded string containing the document to read. + * \param root [out] Contains the root value of the document if it was + * successfully parsed. + * \param collectComments \c true to collect comment and allow writing them + * back during + * serialization, \c false to discard comments. + * This parameter is ignored if + * Features::allowComments_ + * is \c false. + * \return \c true if the document was successfully parsed, \c false if an + * error occurred. + */ + bool + parse(const std::string& document, Value& root, bool collectComments = true); + + /** \brief Read a Value from a JSON + document. + * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the + document to read. + * \param endDoc Pointer on the end of the UTF-8 encoded string of the + document to read. + * Must be >= beginDoc. + * \param root [out] Contains the root value of the document if it was + * successfully parsed. + * \param collectComments \c true to collect comment and allow writing them + back during + * serialization, \c false to discard comments. + * This parameter is ignored if + Features::allowComments_ + * is \c false. + * \return \c true if the document was successfully parsed, \c false if an + error occurred. + */ + bool parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments = true); + + /// \brief Parse from input stream. + /// \see Json::operator>>(std::istream&, Json::Value&). + bool parse(std::istream& is, Value& root, bool collectComments = true); + + /** \brief Returns a user friendly string that list errors in the parsed + * document. + * \return Formatted error message with the list of errors with their location + * in + * the parsed document. An empty string is returned if no error + * occurred + * during parsing. + * \deprecated Use getFormattedErrorMessages() instead (typo fix). + */ + JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.") + std::string getFormatedErrorMessages() const; + + /** \brief Returns a user friendly string that list errors in the parsed + * document. + * \return Formatted error message with the list of errors with their location + * in + * the parsed document. An empty string is returned if no error + * occurred + * during parsing. + */ + std::string getFormattedErrorMessages() const; + + /** \brief Returns a vector of structured erros encounted while parsing. + * \return A (possibly empty) vector of StructuredError objects. Currently + * only one error can be returned, but the caller should tolerate + * multiple + * errors. This can occur if the parser recovers from a non-fatal + * parse error and then encounters additional errors. + */ + std::vector getStructuredErrors() const; + + /** \brief Add a semantic error message. + * \param value JSON Value location associated with the error + * \param message The error message. + * \return \c true if the error was successfully added, \c false if the + * Value offset exceeds the document size. + */ + bool pushError(const Value& value, const std::string& message); + + /** \brief Add a semantic error message with extra context. + * \param value JSON Value location associated with the error + * \param message The error message. + * \param extra Additional JSON Value location to contextualize the error + * \return \c true if the error was successfully added, \c false if either + * Value offset exceeds the document size. + */ + bool pushError(const Value& value, const std::string& message, const Value& extra); + + /** \brief Return whether there are any errors. + * \return \c true if there are no errors to report \c false if + * errors have occurred. + */ + bool good() const; + +private: + enum TokenType { + tokenEndOfStream = 0, + tokenObjectBegin, + tokenObjectEnd, + tokenArrayBegin, + tokenArrayEnd, + tokenString, + tokenNumber, + tokenTrue, + tokenFalse, + tokenNull, + tokenArraySeparator, + tokenMemberSeparator, + tokenComment, + tokenError + }; + + class Token { + public: + TokenType type_; + Location start_; + Location end_; + }; + + class ErrorInfo { + public: + Token token_; + std::string message_; + Location extra_; + }; + + typedef std::deque Errors; + + bool readToken(Token& token); + void skipSpaces(); + bool match(Location pattern, int patternLength); + bool readComment(); + bool readCStyleComment(); + bool readCppStyleComment(); + bool readString(); + void readNumber(); + bool readValue(); + bool readObject(Token& token); + bool readArray(Token& token); + bool decodeNumber(Token& token); + bool decodeNumber(Token& token, Value& decoded); + bool decodeString(Token& token); + bool decodeString(Token& token, std::string& decoded); + bool decodeDouble(Token& token); + bool decodeDouble(Token& token, Value& decoded); + bool decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool addError(const std::string& message, Token& token, Location extra = 0); + bool recoverFromError(TokenType skipUntilToken); + bool addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken); + void skipUntilSpace(); + Value& currentValue(); + Char getNextChar(); + void + getLocationLineAndColumn(Location location, int& line, int& column) const; + std::string getLocationLineAndColumn(Location location) const; + std::string getLocationSnippet(Location location) const; + void addComment(Location begin, Location end, CommentPlacement placement); + void skipCommentTokens(Token& token); + + typedef std::stack Nodes; + Nodes nodes_; + Errors errors_; + std::string document_; + Location begin_; + Location end_; + Location current_; + Location lastValueEnd_; + Value* lastValue_; + std::string commentsBefore_; + Features features_; + bool collectComments_; +}; // Reader + +/** Interface for reading JSON from a char array. + */ +class JSON_API CharReader { +public: + virtual ~CharReader() {} + /** \brief Read a Value from a JSON + document. + * The document must be a UTF-8 encoded string containing the document to read. + * + * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the + document to read. + * \param endDoc Pointer on the end of the UTF-8 encoded string of the + document to read. + * Must be >= beginDoc. + * \param root [out] Contains the root value of the document if it was + * successfully parsed. + * \param errs [out] Formatted error messages (if not NULL) + * a user friendly string that lists errors in the parsed + * document. + * \return \c true if the document was successfully parsed, \c false if an + error occurred. + */ + virtual bool parse( + char const* beginDoc, char const* endDoc, + Value* root, std::string* errs) = 0; + + class JSON_API Factory { + public: + virtual ~Factory() {} + /** \brief Allocate a CharReader via operator new(). + * \throw std::exception if something goes wrong (e.g. invalid settings) + */ + virtual CharReader* newCharReader() const = 0; + }; // Factory +}; // CharReader + +/** \brief Build a CharReader implementation. + +Usage: +\code + using namespace Json; + CharReaderBuilder builder; + builder["collectComments"] = false; + Value value; + std::string errs; + bool ok = parseFromStream(builder, std::cin, &value, &errs); +\endcode +*/ +class JSON_API CharReaderBuilder : public CharReader::Factory { +public: + // Note: We use a Json::Value so that we can add data-members to this class + // without a major version bump. + /** Configuration of this builder. + These are case-sensitive. + Available settings (case-sensitive): + - `"collectComments": false or true` + - true to collect comment and allow writing them + back during serialization, false to discard comments. + This parameter is ignored if allowComments is false. + - `"allowComments": false or true` + - true if comments are allowed. + - `"strictRoot": false or true` + - true if root must be either an array or an object value + - `"allowDroppedNullPlaceholders": false or true` + - true if dropped null placeholders are allowed. (See StreamWriterBuilder.) + - `"allowNumericKeys": false or true` + - true if numeric object keys are allowed. + - `"allowSingleQuotes": false or true` + - true if '' are allowed for strings (both keys and values) + - `"stackLimit": integer` + - Exceeding stackLimit (recursive depth of `readValue()`) will + cause an exception. + - This is a security issue (seg-faults caused by deeply nested JSON), + so the default is low. + - `"failIfExtra": false or true` + - If true, `parse()` returns false when extra non-whitespace trails + the JSON value in the input string. + - `"rejectDupKeys": false or true` + - If true, `parse()` returns false when a key is duplicated within an object. + - `"allowSpecialFloats": false or true` + - If true, special float values (NaNs and infinities) are allowed + and their values are lossfree restorable. + + You can examine 'settings_` yourself + to see the defaults. You can also write and read them just like any + JSON Value. + \sa setDefaults() + */ + Json::Value settings_; + + CharReaderBuilder(); + ~CharReaderBuilder(); + + CharReader* newCharReader() const; + + /** \return true if 'settings' are legal and consistent; + * otherwise, indicate bad settings via 'invalid'. + */ + bool validate(Json::Value* invalid) const; + + /** A simple way to update a specific setting. + */ + Value& operator[](std::string key); + + /** Called by ctor, but you can use this to reset settings_. + * \pre 'settings' != NULL (but Json::null is fine) + * \remark Defaults: + * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults + */ + static void setDefaults(Json::Value* settings); + /** Same as old Features::strictMode(). + * \pre 'settings' != NULL (but Json::null is fine) + * \remark Defaults: + * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode + */ + static void strictMode(Json::Value* settings); +}; + +/** Consume entire stream and use its begin/end. + * Someday we might have a real StreamReader, but for now this + * is convenient. + */ +bool JSON_API parseFromStream( + CharReader::Factory const&, + std::istream&, + Value* root, std::string* errs); + +/** \brief Read from 'sin' into 'root'. + + Always keep comments from the input JSON. + + This can be used to read a file into a particular sub-object. + For example: + \code + Json::Value root; + cin >> root["dir"]["file"]; + cout << root; + \endcode + Result: + \verbatim + { + "dir": { + "file": { + // The input stream JSON would be nested here. + } + } + } + \endverbatim + \throw std::exception on parse error. + \see Json::operator<<() +*/ +JSON_API std::istream& operator>>(std::istream&, Value&); + +} // namespace Json + +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(pop) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +#endif // CPPTL_JSON_READER_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/reader.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/writer.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_WRITER_H_INCLUDED +#define JSON_WRITER_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "value.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include + +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +namespace Json { + +class Value; + +/** + +Usage: +\code + using namespace Json; + void writeToStdout(StreamWriter::Factory const& factory, Value const& value) { + std::unique_ptr const writer( + factory.newStreamWriter()); + writer->write(value, &std::cout); + std::cout << std::endl; // add lf and flush + } +\endcode +*/ +class JSON_API StreamWriter { +protected: + std::ostream* sout_; // not owned; will not delete +public: + StreamWriter(); + virtual ~StreamWriter(); + /** Write Value into document as configured in sub-class. + Do not take ownership of sout, but maintain a reference during function. + \pre sout != NULL + \return zero on success (For now, we always return zero, so check the stream instead.) + \throw std::exception possibly, depending on configuration + */ + virtual int write(Value const& root, std::ostream* sout) = 0; + + /** \brief A simple abstract factory. + */ + class JSON_API Factory { + public: + virtual ~Factory(); + /** \brief Allocate a CharReader via operator new(). + * \throw std::exception if something goes wrong (e.g. invalid settings) + */ + virtual StreamWriter* newStreamWriter() const = 0; + }; // Factory +}; // StreamWriter + +/** \brief Write into stringstream, then return string, for convenience. + * A StreamWriter will be created from the factory, used, and then deleted. + */ +std::string JSON_API writeString(StreamWriter::Factory const& factory, Value const& root); + + +/** \brief Build a StreamWriter implementation. + +Usage: +\code + using namespace Json; + Value value = ...; + StreamWriterBuilder builder; + builder["commentStyle"] = "None"; + builder["indentation"] = " "; // or whatever you like + std::unique_ptr writer( + builder.newStreamWriter()); + writer->write(value, &std::cout); + std::cout << std::endl; // add lf and flush +\endcode +*/ +class JSON_API StreamWriterBuilder : public StreamWriter::Factory { +public: + // Note: We use a Json::Value so that we can add data-members to this class + // without a major version bump. + /** Configuration of this builder. + Available settings (case-sensitive): + - "commentStyle": "None" or "All" + - "indentation": "" + - "enableYAMLCompatibility": false or true + - slightly change the whitespace around colons + - "dropNullPlaceholders": false or true + - Drop the "null" string from the writer's output for nullValues. + Strictly speaking, this is not valid JSON. But when the output is being + fed to a browser's Javascript, it makes for smaller output and the + browser can handle the output just fine. + - "useSpecialFloats": false or true + - If true, outputs non-finite floating point values in the following way: + NaN values as "NaN", positive infinity as "Infinity", and negative infinity + as "-Infinity". + + You can examine 'settings_` yourself + to see the defaults. You can also write and read them just like any + JSON Value. + \sa setDefaults() + */ + Json::Value settings_; + + StreamWriterBuilder(); + ~StreamWriterBuilder(); + + /** + * \throw std::exception if something goes wrong (e.g. invalid settings) + */ + StreamWriter* newStreamWriter() const; + + /** \return true if 'settings' are legal and consistent; + * otherwise, indicate bad settings via 'invalid'. + */ + bool validate(Json::Value* invalid) const; + /** A simple way to update a specific setting. + */ + Value& operator[](std::string key); + + /** Called by ctor, but you can use this to reset settings_. + * \pre 'settings' != NULL (but Json::null is fine) + * \remark Defaults: + * \snippet src/lib_json/json_writer.cpp StreamWriterBuilderDefaults + */ + static void setDefaults(Json::Value* settings); +}; + +/** \brief Abstract class for writers. + * \deprecated Use StreamWriter. (And really, this is an implementation detail.) + */ +class JSON_API Writer { +public: + virtual ~Writer(); + + virtual std::string write(const Value& root) = 0; +}; + +/** \brief Outputs a Value in JSON format + *without formatting (not human friendly). + * + * The JSON document is written in a single line. It is not intended for 'human' + *consumption, + * but may be usefull to support feature such as RPC where bandwith is limited. + * \sa Reader, Value + * \deprecated Use StreamWriterBuilder. + */ +class JSON_API FastWriter : public Writer { + +public: + FastWriter(); + ~FastWriter() {} + + void enableYAMLCompatibility(); + + /** \brief Drop the "null" string from the writer's output for nullValues. + * Strictly speaking, this is not valid JSON. But when the output is being + * fed to a browser's Javascript, it makes for smaller output and the + * browser can handle the output just fine. + */ + void dropNullPlaceholders(); + + void omitEndingLineFeed(); + +public: // overridden from Writer + std::string write(const Value& root); + +private: + void writeValue(const Value& value); + + std::string document_; + bool yamlCompatiblityEnabled_; + bool dropNullPlaceholders_; + bool omitEndingLineFeed_; +}; + +/** \brief Writes a Value in JSON format in a + *human friendly way. + * + * The rules for line break and indent are as follow: + * - Object value: + * - if empty then print {} without indent and line break + * - if not empty the print '{', line break & indent, print one value per + *line + * and then unindent and line break and print '}'. + * - Array value: + * - if empty then print [] without indent and line break + * - if the array contains no object value, empty array or some other value + *types, + * and all the values fit on one lines, then print the array on a single + *line. + * - otherwise, it the values do not fit on one line, or the array contains + * object or non empty array, then print one value per line. + * + * If the Value have comments then they are outputed according to their + *#CommentPlacement. + * + * \sa Reader, Value, Value::setComment() + * \deprecated Use StreamWriterBuilder. + */ +class JSON_API StyledWriter : public Writer { +public: + StyledWriter(); + ~StyledWriter() {} + +public: // overridden from Writer + /** \brief Serialize a Value in JSON format. + * \param root Value to serialize. + * \return String containing the JSON document that represents the root value. + */ + std::string write(const Value& root); + +private: + void writeValue(const Value& value); + void writeArrayValue(const Value& value); + bool isMultineArray(const Value& value); + void pushValue(const std::string& value); + void writeIndent(); + void writeWithIndent(const std::string& value); + void indent(); + void unindent(); + void writeCommentBeforeValue(const Value& root); + void writeCommentAfterValueOnSameLine(const Value& root); + bool hasCommentForValue(const Value& value); + static std::string normalizeEOL(const std::string& text); + + typedef std::vector ChildValues; + + ChildValues childValues_; + std::string document_; + std::string indentString_; + int rightMargin_; + int indentSize_; + bool addChildValues_; +}; + +/** \brief Writes a Value in JSON format in a + human friendly way, + to a stream rather than to a string. + * + * The rules for line break and indent are as follow: + * - Object value: + * - if empty then print {} without indent and line break + * - if not empty the print '{', line break & indent, print one value per + line + * and then unindent and line break and print '}'. + * - Array value: + * - if empty then print [] without indent and line break + * - if the array contains no object value, empty array or some other value + types, + * and all the values fit on one lines, then print the array on a single + line. + * - otherwise, it the values do not fit on one line, or the array contains + * object or non empty array, then print one value per line. + * + * If the Value have comments then they are outputed according to their + #CommentPlacement. + * + * \param indentation Each level will be indented by this amount extra. + * \sa Reader, Value, Value::setComment() + * \deprecated Use StreamWriterBuilder. + */ +class JSON_API StyledStreamWriter { +public: + StyledStreamWriter(std::string indentation = "\t"); + ~StyledStreamWriter() {} + +public: + /** \brief Serialize a Value in JSON format. + * \param out Stream to write to. (Can be ostringstream, e.g.) + * \param root Value to serialize. + * \note There is no point in deriving from Writer, since write() should not + * return a value. + */ + void write(std::ostream& out, const Value& root); + +private: + void writeValue(const Value& value); + void writeArrayValue(const Value& value); + bool isMultineArray(const Value& value); + void pushValue(const std::string& value); + void writeIndent(); + void writeWithIndent(const std::string& value); + void indent(); + void unindent(); + void writeCommentBeforeValue(const Value& root); + void writeCommentAfterValueOnSameLine(const Value& root); + bool hasCommentForValue(const Value& value); + static std::string normalizeEOL(const std::string& text); + + typedef std::vector ChildValues; + + ChildValues childValues_; + std::ostream* document_; + std::string indentString_; + int rightMargin_; + std::string indentation_; + bool addChildValues_ : 1; + bool indented_ : 1; +}; + +#if defined(JSON_HAS_INT64) +std::string JSON_API valueToString(Int value); +std::string JSON_API valueToString(UInt value); +#endif // if defined(JSON_HAS_INT64) +std::string JSON_API valueToString(LargestInt value); +std::string JSON_API valueToString(LargestUInt value); +std::string JSON_API valueToString(double value); +std::string JSON_API valueToString(bool value); +std::string JSON_API valueToQuotedString(const char* value); + +/// \brief Output using the StyledStreamWriter. +/// \see Json::operator>>() +JSON_API std::ostream& operator<<(std::ostream&, const Value& root); + +} // namespace Json + +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(pop) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +#endif // JSON_WRITER_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/writer.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/assertions.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED +#define CPPTL_JSON_ASSERTIONS_H_INCLUDED + +#include +#include + +#if !defined(JSON_IS_AMALGAMATION) +#include "config.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +/** It should not be possible for a maliciously designed file to + * cause an abort() or seg-fault, so these macros are used only + * for pre-condition violations and internal logic errors. + */ +#if JSON_USE_EXCEPTION + +// @todo <= add detail about condition in exception +# define JSON_ASSERT(condition) \ + {if (!(condition)) {Json::throwLogicError( "assert json failed" );}} + +# define JSON_FAIL_MESSAGE(message) \ + { \ + std::ostringstream oss; oss << message; \ + Json::throwLogicError(oss.str()); \ + abort(); \ + } + +#else // JSON_USE_EXCEPTION + +# define JSON_ASSERT(condition) assert(condition) + +// The call to assert() will show the failure message in debug builds. In +// release builds we abort, for a core-dump or debugger. +# define JSON_FAIL_MESSAGE(message) \ + { \ + std::ostringstream oss; oss << message; \ + assert(false && oss.str().c_str()); \ + abort(); \ + } + + +#endif + +#define JSON_ASSERT_MESSAGE(condition, message) \ + if (!(condition)) { \ + JSON_FAIL_MESSAGE(message); \ + } + +#endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/assertions.h +// ////////////////////////////////////////////////////////////////////// + + + + + +#endif //ifndef JSON_AMALGATED_H_INCLUDED diff --git a/steam_helper/jsoncpp.cpp b/steam_helper/jsoncpp.cpp new file mode 100644 index 0000000000..e67d353383 --- /dev/null +++ b/steam_helper/jsoncpp.cpp @@ -0,0 +1,5266 @@ +/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/). +/// It is intended to be used with #include "json/json.h" + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +*/ + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + + + + + + +#include "json/json.h" + +#ifndef JSON_IS_AMALGAMATION +#error "Compile with -I PATH_TO_JSON_DIRECTORY" +#endif + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_tool.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED +#define LIB_JSONCPP_JSON_TOOL_H_INCLUDED + +/* This header provides common string manipulation support, such as UTF-8, + * portable conversion from/to string... + * + * It is an internal header that must not be exposed. + */ + +namespace Json { + +/// Converts a unicode code-point to UTF-8. +static inline std::string codePointToUTF8(unsigned int cp) { + std::string result; + + // based on description from http://en.wikipedia.org/wiki/UTF-8 + + if (cp <= 0x7f) { + result.resize(1); + result[0] = static_cast(cp); + } else if (cp <= 0x7FF) { + result.resize(2); + result[1] = static_cast(0x80 | (0x3f & cp)); + result[0] = static_cast(0xC0 | (0x1f & (cp >> 6))); + } else if (cp <= 0xFFFF) { + result.resize(3); + result[2] = static_cast(0x80 | (0x3f & cp)); + result[1] = static_cast(0x80 | (0x3f & (cp >> 6))); + result[0] = static_cast(0xE0 | (0xf & (cp >> 12))); + } else if (cp <= 0x10FFFF) { + result.resize(4); + result[3] = static_cast(0x80 | (0x3f & cp)); + result[2] = static_cast(0x80 | (0x3f & (cp >> 6))); + result[1] = static_cast(0x80 | (0x3f & (cp >> 12))); + result[0] = static_cast(0xF0 | (0x7 & (cp >> 18))); + } + + return result; +} + +/// Returns true if ch is a control character (in range [1,31]). +static inline bool isControlCharacter(char ch) { return ch > 0 && ch <= 0x1F; } + +enum { + /// Constant that specify the size of the buffer that must be passed to + /// uintToString. + uintToStringBufferSize = 3 * sizeof(LargestUInt) + 1 +}; + +// Defines a char buffer for use with uintToString(). +typedef char UIntToStringBuffer[uintToStringBufferSize]; + +/** Converts an unsigned integer to string. + * @param value Unsigned interger to convert to string + * @param current Input/Output string buffer. + * Must have at least uintToStringBufferSize chars free. + */ +static inline void uintToString(LargestUInt value, char*& current) { + *--current = 0; + do { + *--current = static_cast(value % 10U + static_cast('0')); + value /= 10; + } while (value != 0); +} + +/** Change ',' to '.' everywhere in buffer. + * + * We had a sophisticated way, but it did not work in WinCE. + * @see https://github.com/open-source-parsers/jsoncpp/pull/9 + */ +static inline void fixNumericLocale(char* begin, char* end) { + while (begin < end) { + if (*begin == ',') { + *begin = '.'; + } + ++begin; + } +} + +} // namespace Json { + +#endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_tool.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_reader.cpp +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2011 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include "json_tool.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above +#define snprintf sprintf_s +#elif _MSC_VER >= 1900 // VC++ 14.0 and above +#define snprintf std::snprintf +#else +#define snprintf _snprintf +#endif +#elif defined(__ANDROID__) || defined(__QNXNTO__) +#define snprintf snprintf +#elif __cplusplus >= 201103L +#define snprintf std::snprintf +#endif + +#if defined(__QNXNTO__) +#define sscanf std::sscanf +#endif + +#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 +// Disable warning about strdup being deprecated. +#pragma warning(disable : 4996) +#endif + +static int const stackLimit_g = 1000; +static int stackDepth_g = 0; // see readValue() + +namespace Json { + +#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) +typedef std::unique_ptr CharReaderPtr; +#else +typedef std::auto_ptr CharReaderPtr; +#endif + +// Implementation of class Features +// //////////////////////////////// + +Features::Features() + : allowComments_(true), strictRoot_(false), + allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) {} + +Features Features::all() { return Features(); } + +Features Features::strictMode() { + Features features; + features.allowComments_ = false; + features.strictRoot_ = true; + features.allowDroppedNullPlaceholders_ = false; + features.allowNumericKeys_ = false; + return features; +} + +// Implementation of class Reader +// //////////////////////////////// + +static bool containsNewLine(Reader::Location begin, Reader::Location end) { + for (; begin < end; ++begin) + if (*begin == '\n' || *begin == '\r') + return true; + return false; +} + +// Class Reader +// ////////////////////////////////////////////////////////////////// + +Reader::Reader() + : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), + lastValue_(), commentsBefore_(), features_(Features::all()), + collectComments_() {} + +Reader::Reader(const Features& features) + : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), + lastValue_(), commentsBefore_(), features_(features), collectComments_() { +} + +bool +Reader::parse(const std::string& document, Value& root, bool collectComments) { + document_ = document; + const char* begin = document_.c_str(); + const char* end = begin + document_.length(); + return parse(begin, end, root, collectComments); +} + +bool Reader::parse(std::istream& sin, Value& root, bool collectComments) { + // std::istream_iterator begin(sin); + // std::istream_iterator end; + // Those would allow streamed input from a file, if parse() were a + // template function. + + // Since std::string is reference-counted, this at least does not + // create an extra copy. + std::string doc; + std::getline(sin, doc, (char)EOF); + return parse(doc, root, collectComments); +} + +bool Reader::parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments) { + if (!features_.allowComments_) { + collectComments = false; + } + + begin_ = beginDoc; + end_ = endDoc; + collectComments_ = collectComments; + current_ = begin_; + lastValueEnd_ = 0; + lastValue_ = 0; + commentsBefore_ = ""; + errors_.clear(); + while (!nodes_.empty()) + nodes_.pop(); + nodes_.push(&root); + + stackDepth_g = 0; // Yes, this is bad coding, but options are limited. + bool successful = readValue(); + Token token; + skipCommentTokens(token); + if (collectComments_ && !commentsBefore_.empty()) + root.setComment(commentsBefore_, commentAfter); + if (features_.strictRoot_) { + if (!root.isArray() && !root.isObject()) { + // Set error location to start of doc, ideally should be first token found + // in doc + token.type_ = tokenError; + token.start_ = beginDoc; + token.end_ = endDoc; + addError( + "A valid JSON document must be either an array or an object value.", + token); + return false; + } + } + return successful; +} + +bool Reader::readValue() { + // This is a non-reentrant way to support a stackLimit. Terrible! + // But this deprecated class has a security problem: Bad input can + // cause a seg-fault. This seems like a fair, binary-compatible way + // to prevent the problem. + if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue()."); + ++stackDepth_g; + + Token token; + skipCommentTokens(token); + bool successful = true; + + if (collectComments_ && !commentsBefore_.empty()) { + currentValue().setComment(commentsBefore_, commentBefore); + commentsBefore_ = ""; + } + + switch (token.type_) { + case tokenObjectBegin: + successful = readObject(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenArrayBegin: + successful = readArray(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenNumber: + successful = decodeNumber(token); + break; + case tokenString: + successful = decodeString(token); + break; + case tokenTrue: + { + Value v(true); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenFalse: + { + Value v(false); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNull: + { + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenArraySeparator: + case tokenObjectEnd: + case tokenArrayEnd: + if (features_.allowDroppedNullPlaceholders_) { + // "Un-read" the current token and mark the current value as a null + // token. + current_--; + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(current_ - begin_ - 1); + currentValue().setOffsetLimit(current_ - begin_); + break; + } // Else, fall through... + default: + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return addError("Syntax error: value, object or array expected.", token); + } + + if (collectComments_) { + lastValueEnd_ = current_; + lastValue_ = ¤tValue(); + } + + --stackDepth_g; + return successful; +} + +void Reader::skipCommentTokens(Token& token) { + if (features_.allowComments_) { + do { + readToken(token); + } while (token.type_ == tokenComment); + } else { + readToken(token); + } +} + +bool Reader::readToken(Token& token) { + skipSpaces(); + token.start_ = current_; + Char c = getNextChar(); + bool ok = true; + switch (c) { + case '{': + token.type_ = tokenObjectBegin; + break; + case '}': + token.type_ = tokenObjectEnd; + break; + case '[': + token.type_ = tokenArrayBegin; + break; + case ']': + token.type_ = tokenArrayEnd; + break; + case '"': + token.type_ = tokenString; + ok = readString(); + break; + case '/': + token.type_ = tokenComment; + ok = readComment(); + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + token.type_ = tokenNumber; + readNumber(); + break; + case 't': + token.type_ = tokenTrue; + ok = match("rue", 3); + break; + case 'f': + token.type_ = tokenFalse; + ok = match("alse", 4); + break; + case 'n': + token.type_ = tokenNull; + ok = match("ull", 3); + break; + case ',': + token.type_ = tokenArraySeparator; + break; + case ':': + token.type_ = tokenMemberSeparator; + break; + case 0: + token.type_ = tokenEndOfStream; + break; + default: + ok = false; + break; + } + if (!ok) + token.type_ = tokenError; + token.end_ = current_; + return true; +} + +void Reader::skipSpaces() { + while (current_ != end_) { + Char c = *current_; + if (c == ' ' || c == '\t' || c == '\r' || c == '\n') + ++current_; + else + break; + } +} + +bool Reader::match(Location pattern, int patternLength) { + if (end_ - current_ < patternLength) + return false; + int index = patternLength; + while (index--) + if (current_[index] != pattern[index]) + return false; + current_ += patternLength; + return true; +} + +bool Reader::readComment() { + Location commentBegin = current_ - 1; + Char c = getNextChar(); + bool successful = false; + if (c == '*') + successful = readCStyleComment(); + else if (c == '/') + successful = readCppStyleComment(); + if (!successful) + return false; + + if (collectComments_) { + CommentPlacement placement = commentBefore; + if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) { + if (c != '*' || !containsNewLine(commentBegin, current_)) + placement = commentAfterOnSameLine; + } + + addComment(commentBegin, current_, placement); + } + return true; +} + +static std::string normalizeEOL(Reader::Location begin, Reader::Location end) { + std::string normalized; + normalized.reserve(end - begin); + Reader::Location current = begin; + while (current != end) { + char c = *current++; + if (c == '\r') { + if (current != end && *current == '\n') + // convert dos EOL + ++current; + // convert Mac EOL + normalized += '\n'; + } else { + normalized += c; + } + } + return normalized; +} + +void +Reader::addComment(Location begin, Location end, CommentPlacement placement) { + assert(collectComments_); + const std::string& normalized = normalizeEOL(begin, end); + if (placement == commentAfterOnSameLine) { + assert(lastValue_ != 0); + lastValue_->setComment(normalized, placement); + } else { + commentsBefore_ += normalized; + } +} + +bool Reader::readCStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '*' && *current_ == '/') + break; + } + return getNextChar() == '/'; +} + +bool Reader::readCppStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '\n') + break; + if (c == '\r') { + // Consume DOS EOL. It will be normalized in addComment. + if (current_ != end_ && *current_ == '\n') + getNextChar(); + // Break on Moc OS 9 EOL. + break; + } + } + return true; +} + +void Reader::readNumber() { + const char *p = current_; + char c = '0'; // stopgap for already consumed character + // integral part + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + // fractional part + if (c == '.') { + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } + // exponential part + if (c == 'e' || c == 'E') { + c = (current_ = p) < end_ ? *p++ : 0; + if (c == '+' || c == '-') + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } +} + +bool Reader::readString() { + Char c = 0; + while (current_ != end_) { + c = getNextChar(); + if (c == '\\') + getNextChar(); + else if (c == '"') + break; + } + return c == '"'; +} + +bool Reader::readObject(Token& tokenStart) { + Token tokenName; + std::string name; + Value init(objectValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + while (readToken(tokenName)) { + bool initialTokenOk = true; + while (tokenName.type_ == tokenComment && initialTokenOk) + initialTokenOk = readToken(tokenName); + if (!initialTokenOk) + break; + if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object + return true; + name = ""; + if (tokenName.type_ == tokenString) { + if (!decodeString(tokenName, name)) + return recoverFromError(tokenObjectEnd); + } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) { + Value numberName; + if (!decodeNumber(tokenName, numberName)) + return recoverFromError(tokenObjectEnd); + name = numberName.asString(); + } else { + break; + } + + Token colon; + if (!readToken(colon) || colon.type_ != tokenMemberSeparator) { + return addErrorAndRecover( + "Missing ':' after object member name", colon, tokenObjectEnd); + } + Value& value = currentValue()[name]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenObjectEnd); + + Token comma; + if (!readToken(comma) || + (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator && + comma.type_ != tokenComment)) { + return addErrorAndRecover( + "Missing ',' or '}' in object declaration", comma, tokenObjectEnd); + } + bool finalizeTokenOk = true; + while (comma.type_ == tokenComment && finalizeTokenOk) + finalizeTokenOk = readToken(comma); + if (comma.type_ == tokenObjectEnd) + return true; + } + return addErrorAndRecover( + "Missing '}' or object member name", tokenName, tokenObjectEnd); +} + +bool Reader::readArray(Token& tokenStart) { + Value init(arrayValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + skipSpaces(); + if (*current_ == ']') // empty array + { + Token endArray; + readToken(endArray); + return true; + } + int index = 0; + for (;;) { + Value& value = currentValue()[index++]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenArrayEnd); + + Token token; + // Accept Comment after last item in the array. + ok = readToken(token); + while (token.type_ == tokenComment && ok) { + ok = readToken(token); + } + bool badTokenType = + (token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd); + if (!ok || badTokenType) { + return addErrorAndRecover( + "Missing ',' or ']' in array declaration", token, tokenArrayEnd); + } + if (token.type_ == tokenArrayEnd) + break; + } + return true; +} + +bool Reader::decodeNumber(Token& token) { + Value decoded; + if (!decodeNumber(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool Reader::decodeNumber(Token& token, Value& decoded) { + // Attempts to parse the number as an integer. If the number is + // larger than the maximum supported value of an integer then + // we decode the number as a double. + Location current = token.start_; + bool isNegative = *current == '-'; + if (isNegative) + ++current; + // TODO: Help the compiler do the div and mod at compile time or get rid of them. + Value::LargestUInt maxIntegerValue = + isNegative ? Value::LargestUInt(Value::maxLargestInt) + 1 + : Value::maxLargestUInt; + Value::LargestUInt threshold = maxIntegerValue / 10; + Value::LargestUInt value = 0; + while (current < token.end_) { + Char c = *current++; + if (c < '0' || c > '9') + return decodeDouble(token, decoded); + Value::UInt digit(c - '0'); + if (value >= threshold) { + // We've hit or exceeded the max value divided by 10 (rounded down). If + // a) we've only just touched the limit, b) this is the last digit, and + // c) it's small enough to fit in that rounding delta, we're okay. + // Otherwise treat this number as a double to avoid overflow. + if (value > threshold || current != token.end_ || + digit > maxIntegerValue % 10) { + return decodeDouble(token, decoded); + } + } + value = value * 10 + digit; + } + if (isNegative && value == maxIntegerValue) + decoded = Value::minLargestInt; + else if (isNegative) + decoded = -Value::LargestInt(value); + else if (value <= Value::LargestUInt(Value::maxInt)) + decoded = Value::LargestInt(value); + else + decoded = value; + return true; +} + +bool Reader::decodeDouble(Token& token) { + Value decoded; + if (!decodeDouble(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool Reader::decodeDouble(Token& token, Value& decoded) { + double value = 0; + std::string buffer(token.start_, token.end_); + std::istringstream is(buffer); + if (!(is >> value)) + return addError("'" + std::string(token.start_, token.end_) + + "' is not a number.", + token); + decoded = value; + return true; +} + +bool Reader::decodeString(Token& token) { + std::string decoded_string; + if (!decodeString(token, decoded_string)) + return false; + Value decoded(decoded_string); + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool Reader::decodeString(Token& token, std::string& decoded) { + decoded.reserve(token.end_ - token.start_ - 2); + Location current = token.start_ + 1; // skip '"' + Location end = token.end_ - 1; // do not include '"' + while (current != end) { + Char c = *current++; + if (c == '"') + break; + else if (c == '\\') { + if (current == end) + return addError("Empty escape sequence in string", token, current); + Char escape = *current++; + switch (escape) { + case '"': + decoded += '"'; + break; + case '/': + decoded += '/'; + break; + case '\\': + decoded += '\\'; + break; + case 'b': + decoded += '\b'; + break; + case 'f': + decoded += '\f'; + break; + case 'n': + decoded += '\n'; + break; + case 'r': + decoded += '\r'; + break; + case 't': + decoded += '\t'; + break; + case 'u': { + unsigned int unicode; + if (!decodeUnicodeCodePoint(token, current, end, unicode)) + return false; + decoded += codePointToUTF8(unicode); + } break; + default: + return addError("Bad escape sequence in string", token, current); + } + } else { + decoded += c; + } + } + return true; +} + +bool Reader::decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + + if (!decodeUnicodeEscapeSequence(token, current, end, unicode)) + return false; + if (unicode >= 0xD800 && unicode <= 0xDBFF) { + // surrogate pairs + if (end - current < 6) + return addError( + "additional six characters expected to parse unicode surrogate pair.", + token, + current); + unsigned int surrogatePair; + if (*(current++) == '\\' && *(current++) == 'u') { + if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) { + unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF); + } else + return false; + } else + return addError("expecting another \\u token to begin the second half of " + "a unicode surrogate pair", + token, + current); + } + return true; +} + +bool Reader::decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + if (end - current < 4) + return addError( + "Bad unicode escape sequence in string: four digits expected.", + token, + current); + unicode = 0; + for (int index = 0; index < 4; ++index) { + Char c = *current++; + unicode *= 16; + if (c >= '0' && c <= '9') + unicode += c - '0'; + else if (c >= 'a' && c <= 'f') + unicode += c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + unicode += c - 'A' + 10; + else + return addError( + "Bad unicode escape sequence in string: hexadecimal digit expected.", + token, + current); + } + return true; +} + +bool +Reader::addError(const std::string& message, Token& token, Location extra) { + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = extra; + errors_.push_back(info); + return false; +} + +bool Reader::recoverFromError(TokenType skipUntilToken) { + int errorCount = int(errors_.size()); + Token skip; + for (;;) { + if (!readToken(skip)) + errors_.resize(errorCount); // discard errors caused by recovery + if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream) + break; + } + errors_.resize(errorCount); + return false; +} + +bool Reader::addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken) { + addError(message, token); + return recoverFromError(skipUntilToken); +} + +Value& Reader::currentValue() { return *(nodes_.top()); } + +Reader::Char Reader::getNextChar() { + if (current_ == end_) + return 0; + return *current_++; +} + +void Reader::getLocationLineAndColumn(Location location, + int& line, + int& column) const { + Location current = begin_; + Location lastLineStart = current; + line = 0; + while (current < location && current != end_) { + Char c = *current++; + if (c == '\r') { + if (*current == '\n') + ++current; + lastLineStart = current; + ++line; + } else if (c == '\n') { + lastLineStart = current; + ++line; + } + } + // column & line start at 1 + column = int(location - lastLineStart) + 1; + ++line; +} + +std::string Reader::getLocationLineAndColumn(Location location) const { + int line, column; + getLocationLineAndColumn(location, line, column); + char buffer[18 + 16 + 16 + 1]; + snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); + return buffer; +} + +std::string Reader::getLocationSnippet(Location location) const { + std::string snippet = ""; + std::istringstream docStream(document_); + int lin, col; + getLocationLineAndColumn(location, lin, col); + std::string line; + for (int i=1; i Reader::getStructuredErrors() const { + std::vector allErrors; + for (Errors::const_iterator itError = errors_.begin(); + itError != errors_.end(); + ++itError) { + const ErrorInfo& error = *itError; + Reader::StructuredError structured; + structured.offset_start = error.token_.start_ - begin_; + structured.offset_limit = error.token_.end_ - begin_; + structured.message = error.message_; + allErrors.push_back(structured); + } + return allErrors; +} + +bool Reader::pushError(const Value& value, const std::string& message) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = end_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = 0; + errors_.push_back(info); + return true; +} + +bool Reader::pushError(const Value& value, const std::string& message, const Value& extra) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length + || extra.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = begin_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = begin_ + extra.getOffsetStart(); + errors_.push_back(info); + return true; +} + +bool Reader::good() const { + return !errors_.size(); +} + +// exact copy of Features +class OurFeatures { +public: + static OurFeatures all(); + bool allowComments_; + bool strictRoot_; + bool allowDroppedNullPlaceholders_; + bool allowNumericKeys_; + bool allowSingleQuotes_; + bool failIfExtra_; + bool rejectDupKeys_; + bool allowSpecialFloats_; + int stackLimit_; +}; // OurFeatures + +// exact copy of Implementation of class Features +// //////////////////////////////// + +OurFeatures OurFeatures::all() { return OurFeatures(); } + +// Implementation of class Reader +// //////////////////////////////// + +// exact copy of Reader, renamed to OurReader +class OurReader { +public: + typedef char Char; + typedef const Char* Location; + struct StructuredError { + size_t offset_start; + size_t offset_limit; + std::string message; + }; + + OurReader(OurFeatures const& features); + bool parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments = true); + std::string getFormattedErrorMessages() const; + std::vector getStructuredErrors() const; + bool pushError(const Value& value, const std::string& message); + bool pushError(const Value& value, const std::string& message, const Value& extra); + bool good() const; + +private: + OurReader(OurReader const&); // no impl + void operator=(OurReader const&); // no impl + + enum TokenType { + tokenEndOfStream = 0, + tokenObjectBegin, + tokenObjectEnd, + tokenArrayBegin, + tokenArrayEnd, + tokenString, + tokenNumber, + tokenTrue, + tokenFalse, + tokenNull, + tokenNaN, + tokenPosInf, + tokenNegInf, + tokenArraySeparator, + tokenMemberSeparator, + tokenComment, + tokenError + }; + + class Token { + public: + TokenType type_; + Location start_; + Location end_; + }; + + class ErrorInfo { + public: + Token token_; + std::string message_; + Location extra_; + }; + + typedef std::deque Errors; + + bool readToken(Token& token); + void skipSpaces(); + bool match(Location pattern, int patternLength); + bool readComment(); + bool readCStyleComment(); + bool readCppStyleComment(); + bool readString(); + bool readStringSingleQuote(); + bool readNumber(bool checkInf); + bool readValue(); + bool readObject(Token& token); + bool readArray(Token& token); + bool decodeNumber(Token& token); + bool decodeNumber(Token& token, Value& decoded); + bool decodeString(Token& token); + bool decodeString(Token& token, std::string& decoded); + bool decodeDouble(Token& token); + bool decodeDouble(Token& token, Value& decoded); + bool decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool addError(const std::string& message, Token& token, Location extra = 0); + bool recoverFromError(TokenType skipUntilToken); + bool addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken); + void skipUntilSpace(); + Value& currentValue(); + Char getNextChar(); + void + getLocationLineAndColumn(Location location, int& line, int& column) const; + std::string getLocationLineAndColumn(Location location) const; + void addComment(Location begin, Location end, CommentPlacement placement); + void skipCommentTokens(Token& token); + + typedef std::stack Nodes; + Nodes nodes_; + Errors errors_; + std::string document_; + Location begin_; + Location end_; + Location current_; + Location lastValueEnd_; + Value* lastValue_; + std::string commentsBefore_; + int stackDepth_; + + OurFeatures const features_; + bool collectComments_; +}; // OurReader + +// complete copy of Read impl, for OurReader + +OurReader::OurReader(OurFeatures const& features) + : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), + lastValue_(), commentsBefore_(), + stackDepth_(0), + features_(features), collectComments_() { +} + +bool OurReader::parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments) { + if (!features_.allowComments_) { + collectComments = false; + } + + begin_ = beginDoc; + end_ = endDoc; + collectComments_ = collectComments; + current_ = begin_; + lastValueEnd_ = 0; + lastValue_ = 0; + commentsBefore_ = ""; + errors_.clear(); + while (!nodes_.empty()) + nodes_.pop(); + nodes_.push(&root); + + stackDepth_ = 0; + bool successful = readValue(); + Token token; + skipCommentTokens(token); + if (features_.failIfExtra_) { + if (token.type_ != tokenError && token.type_ != tokenEndOfStream) { + addError("Extra non-whitespace after JSON value.", token); + return false; + } + } + if (collectComments_ && !commentsBefore_.empty()) + root.setComment(commentsBefore_, commentAfter); + if (features_.strictRoot_) { + if (!root.isArray() && !root.isObject()) { + // Set error location to start of doc, ideally should be first token found + // in doc + token.type_ = tokenError; + token.start_ = beginDoc; + token.end_ = endDoc; + addError( + "A valid JSON document must be either an array or an object value.", + token); + return false; + } + } + return successful; +} + +bool OurReader::readValue() { + if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue()."); + ++stackDepth_; + Token token; + skipCommentTokens(token); + bool successful = true; + + if (collectComments_ && !commentsBefore_.empty()) { + currentValue().setComment(commentsBefore_, commentBefore); + commentsBefore_ = ""; + } + + switch (token.type_) { + case tokenObjectBegin: + successful = readObject(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenArrayBegin: + successful = readArray(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenNumber: + successful = decodeNumber(token); + break; + case tokenString: + successful = decodeString(token); + break; + case tokenTrue: + { + Value v(true); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenFalse: + { + Value v(false); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNull: + { + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNaN: + { + Value v(std::numeric_limits::quiet_NaN()); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenPosInf: + { + Value v(std::numeric_limits::infinity()); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNegInf: + { + Value v(-std::numeric_limits::infinity()); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenArraySeparator: + case tokenObjectEnd: + case tokenArrayEnd: + if (features_.allowDroppedNullPlaceholders_) { + // "Un-read" the current token and mark the current value as a null + // token. + current_--; + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(current_ - begin_ - 1); + currentValue().setOffsetLimit(current_ - begin_); + break; + } // else, fall through ... + default: + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return addError("Syntax error: value, object or array expected.", token); + } + + if (collectComments_) { + lastValueEnd_ = current_; + lastValue_ = ¤tValue(); + } + + --stackDepth_; + return successful; +} + +void OurReader::skipCommentTokens(Token& token) { + if (features_.allowComments_) { + do { + readToken(token); + } while (token.type_ == tokenComment); + } else { + readToken(token); + } +} + +bool OurReader::readToken(Token& token) { + skipSpaces(); + token.start_ = current_; + Char c = getNextChar(); + bool ok = true; + switch (c) { + case '{': + token.type_ = tokenObjectBegin; + break; + case '}': + token.type_ = tokenObjectEnd; + break; + case '[': + token.type_ = tokenArrayBegin; + break; + case ']': + token.type_ = tokenArrayEnd; + break; + case '"': + token.type_ = tokenString; + ok = readString(); + break; + case '\'': + if (features_.allowSingleQuotes_) { + token.type_ = tokenString; + ok = readStringSingleQuote(); + break; + } // else continue + case '/': + token.type_ = tokenComment; + ok = readComment(); + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + token.type_ = tokenNumber; + readNumber(false); + break; + case '-': + if (readNumber(true)) { + token.type_ = tokenNumber; + } else { + token.type_ = tokenNegInf; + ok = features_.allowSpecialFloats_ && match("nfinity", 7); + } + break; + case 't': + token.type_ = tokenTrue; + ok = match("rue", 3); + break; + case 'f': + token.type_ = tokenFalse; + ok = match("alse", 4); + break; + case 'n': + token.type_ = tokenNull; + ok = match("ull", 3); + break; + case 'N': + if (features_.allowSpecialFloats_) { + token.type_ = tokenNaN; + ok = match("aN", 2); + } else { + ok = false; + } + break; + case 'I': + if (features_.allowSpecialFloats_) { + token.type_ = tokenPosInf; + ok = match("nfinity", 7); + } else { + ok = false; + } + break; + case ',': + token.type_ = tokenArraySeparator; + break; + case ':': + token.type_ = tokenMemberSeparator; + break; + case 0: + token.type_ = tokenEndOfStream; + break; + default: + ok = false; + break; + } + if (!ok) + token.type_ = tokenError; + token.end_ = current_; + return true; +} + +void OurReader::skipSpaces() { + while (current_ != end_) { + Char c = *current_; + if (c == ' ' || c == '\t' || c == '\r' || c == '\n') + ++current_; + else + break; + } +} + +bool OurReader::match(Location pattern, int patternLength) { + if (end_ - current_ < patternLength) + return false; + int index = patternLength; + while (index--) + if (current_[index] != pattern[index]) + return false; + current_ += patternLength; + return true; +} + +bool OurReader::readComment() { + Location commentBegin = current_ - 1; + Char c = getNextChar(); + bool successful = false; + if (c == '*') + successful = readCStyleComment(); + else if (c == '/') + successful = readCppStyleComment(); + if (!successful) + return false; + + if (collectComments_) { + CommentPlacement placement = commentBefore; + if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) { + if (c != '*' || !containsNewLine(commentBegin, current_)) + placement = commentAfterOnSameLine; + } + + addComment(commentBegin, current_, placement); + } + return true; +} + +void +OurReader::addComment(Location begin, Location end, CommentPlacement placement) { + assert(collectComments_); + const std::string& normalized = normalizeEOL(begin, end); + if (placement == commentAfterOnSameLine) { + assert(lastValue_ != 0); + lastValue_->setComment(normalized, placement); + } else { + commentsBefore_ += normalized; + } +} + +bool OurReader::readCStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '*' && *current_ == '/') + break; + } + return getNextChar() == '/'; +} + +bool OurReader::readCppStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '\n') + break; + if (c == '\r') { + // Consume DOS EOL. It will be normalized in addComment. + if (current_ != end_ && *current_ == '\n') + getNextChar(); + // Break on Moc OS 9 EOL. + break; + } + } + return true; +} + +bool OurReader::readNumber(bool checkInf) { + const char *p = current_; + if (checkInf && p != end_ && *p == 'I') { + current_ = ++p; + return false; + } + char c = '0'; // stopgap for already consumed character + // integral part + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + // fractional part + if (c == '.') { + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } + // exponential part + if (c == 'e' || c == 'E') { + c = (current_ = p) < end_ ? *p++ : 0; + if (c == '+' || c == '-') + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } + return true; +} +bool OurReader::readString() { + Char c = 0; + while (current_ != end_) { + c = getNextChar(); + if (c == '\\') + getNextChar(); + else if (c == '"') + break; + } + return c == '"'; +} + + +bool OurReader::readStringSingleQuote() { + Char c = 0; + while (current_ != end_) { + c = getNextChar(); + if (c == '\\') + getNextChar(); + else if (c == '\'') + break; + } + return c == '\''; +} + +bool OurReader::readObject(Token& tokenStart) { + Token tokenName; + std::string name; + Value init(objectValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + while (readToken(tokenName)) { + bool initialTokenOk = true; + while (tokenName.type_ == tokenComment && initialTokenOk) + initialTokenOk = readToken(tokenName); + if (!initialTokenOk) + break; + if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object + return true; + name = ""; + if (tokenName.type_ == tokenString) { + if (!decodeString(tokenName, name)) + return recoverFromError(tokenObjectEnd); + } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) { + Value numberName; + if (!decodeNumber(tokenName, numberName)) + return recoverFromError(tokenObjectEnd); + name = numberName.asString(); + } else { + break; + } + + Token colon; + if (!readToken(colon) || colon.type_ != tokenMemberSeparator) { + return addErrorAndRecover( + "Missing ':' after object member name", colon, tokenObjectEnd); + } + if (name.length() >= (1U<<30)) throwRuntimeError("keylength >= 2^30"); + if (features_.rejectDupKeys_ && currentValue().isMember(name)) { + std::string msg = "Duplicate key: '" + name + "'"; + return addErrorAndRecover( + msg, tokenName, tokenObjectEnd); + } + Value& value = currentValue()[name]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenObjectEnd); + + Token comma; + if (!readToken(comma) || + (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator && + comma.type_ != tokenComment)) { + return addErrorAndRecover( + "Missing ',' or '}' in object declaration", comma, tokenObjectEnd); + } + bool finalizeTokenOk = true; + while (comma.type_ == tokenComment && finalizeTokenOk) + finalizeTokenOk = readToken(comma); + if (comma.type_ == tokenObjectEnd) + return true; + } + return addErrorAndRecover( + "Missing '}' or object member name", tokenName, tokenObjectEnd); +} + +bool OurReader::readArray(Token& tokenStart) { + Value init(arrayValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + skipSpaces(); + if (*current_ == ']') // empty array + { + Token endArray; + readToken(endArray); + return true; + } + int index = 0; + for (;;) { + Value& value = currentValue()[index++]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenArrayEnd); + + Token token; + // Accept Comment after last item in the array. + ok = readToken(token); + while (token.type_ == tokenComment && ok) { + ok = readToken(token); + } + bool badTokenType = + (token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd); + if (!ok || badTokenType) { + return addErrorAndRecover( + "Missing ',' or ']' in array declaration", token, tokenArrayEnd); + } + if (token.type_ == tokenArrayEnd) + break; + } + return true; +} + +bool OurReader::decodeNumber(Token& token) { + Value decoded; + if (!decodeNumber(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool OurReader::decodeNumber(Token& token, Value& decoded) { + // Attempts to parse the number as an integer. If the number is + // larger than the maximum supported value of an integer then + // we decode the number as a double. + Location current = token.start_; + bool isNegative = *current == '-'; + if (isNegative) + ++current; + // TODO: Help the compiler do the div and mod at compile time or get rid of them. + Value::LargestUInt maxIntegerValue = + isNegative ? Value::LargestUInt(-Value::minLargestInt) + : Value::maxLargestUInt; + Value::LargestUInt threshold = maxIntegerValue / 10; + Value::LargestUInt value = 0; + while (current < token.end_) { + Char c = *current++; + if (c < '0' || c > '9') + return decodeDouble(token, decoded); + Value::UInt digit(c - '0'); + if (value >= threshold) { + // We've hit or exceeded the max value divided by 10 (rounded down). If + // a) we've only just touched the limit, b) this is the last digit, and + // c) it's small enough to fit in that rounding delta, we're okay. + // Otherwise treat this number as a double to avoid overflow. + if (value > threshold || current != token.end_ || + digit > maxIntegerValue % 10) { + return decodeDouble(token, decoded); + } + } + value = value * 10 + digit; + } + if (isNegative) + decoded = -Value::LargestInt(value); + else if (value <= Value::LargestUInt(Value::maxInt)) + decoded = Value::LargestInt(value); + else + decoded = value; + return true; +} + +bool OurReader::decodeDouble(Token& token) { + Value decoded; + if (!decodeDouble(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool OurReader::decodeDouble(Token& token, Value& decoded) { + double value = 0; + const int bufferSize = 32; + int count; + int length = int(token.end_ - token.start_); + + // Sanity check to avoid buffer overflow exploits. + if (length < 0) { + return addError("Unable to parse token length", token); + } + + // Avoid using a string constant for the format control string given to + // sscanf, as this can cause hard to debug crashes on OS X. See here for more + // info: + // + // http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0.1/gcc/Incompatibilities.html + char format[] = "%lf"; + + if (length <= bufferSize) { + Char buffer[bufferSize + 1]; + memcpy(buffer, token.start_, length); + buffer[length] = 0; + count = sscanf(buffer, format, &value); + } else { + std::string buffer(token.start_, token.end_); + count = sscanf(buffer.c_str(), format, &value); + } + + if (count != 1) + return addError("'" + std::string(token.start_, token.end_) + + "' is not a number.", + token); + decoded = value; + return true; +} + +bool OurReader::decodeString(Token& token) { + std::string decoded_string; + if (!decodeString(token, decoded_string)) + return false; + Value decoded(decoded_string); + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool OurReader::decodeString(Token& token, std::string& decoded) { + decoded.reserve(token.end_ - token.start_ - 2); + Location current = token.start_ + 1; // skip '"' + Location end = token.end_ - 1; // do not include '"' + while (current != end) { + Char c = *current++; + if (c == '"') + break; + else if (c == '\\') { + if (current == end) + return addError("Empty escape sequence in string", token, current); + Char escape = *current++; + switch (escape) { + case '"': + decoded += '"'; + break; + case '/': + decoded += '/'; + break; + case '\\': + decoded += '\\'; + break; + case 'b': + decoded += '\b'; + break; + case 'f': + decoded += '\f'; + break; + case 'n': + decoded += '\n'; + break; + case 'r': + decoded += '\r'; + break; + case 't': + decoded += '\t'; + break; + case 'u': { + unsigned int unicode; + if (!decodeUnicodeCodePoint(token, current, end, unicode)) + return false; + decoded += codePointToUTF8(unicode); + } break; + default: + return addError("Bad escape sequence in string", token, current); + } + } else { + decoded += c; + } + } + return true; +} + +bool OurReader::decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + + if (!decodeUnicodeEscapeSequence(token, current, end, unicode)) + return false; + if (unicode >= 0xD800 && unicode <= 0xDBFF) { + // surrogate pairs + if (end - current < 6) + return addError( + "additional six characters expected to parse unicode surrogate pair.", + token, + current); + unsigned int surrogatePair; + if (*(current++) == '\\' && *(current++) == 'u') { + if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) { + unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF); + } else + return false; + } else + return addError("expecting another \\u token to begin the second half of " + "a unicode surrogate pair", + token, + current); + } + return true; +} + +bool OurReader::decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + if (end - current < 4) + return addError( + "Bad unicode escape sequence in string: four digits expected.", + token, + current); + unicode = 0; + for (int index = 0; index < 4; ++index) { + Char c = *current++; + unicode *= 16; + if (c >= '0' && c <= '9') + unicode += c - '0'; + else if (c >= 'a' && c <= 'f') + unicode += c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + unicode += c - 'A' + 10; + else + return addError( + "Bad unicode escape sequence in string: hexadecimal digit expected.", + token, + current); + } + return true; +} + +bool +OurReader::addError(const std::string& message, Token& token, Location extra) { + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = extra; + errors_.push_back(info); + return false; +} + +bool OurReader::recoverFromError(TokenType skipUntilToken) { + int errorCount = int(errors_.size()); + Token skip; + for (;;) { + if (!readToken(skip)) + errors_.resize(errorCount); // discard errors caused by recovery + if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream) + break; + } + errors_.resize(errorCount); + return false; +} + +bool OurReader::addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken) { + addError(message, token); + return recoverFromError(skipUntilToken); +} + +Value& OurReader::currentValue() { return *(nodes_.top()); } + +OurReader::Char OurReader::getNextChar() { + if (current_ == end_) + return 0; + return *current_++; +} + +void OurReader::getLocationLineAndColumn(Location location, + int& line, + int& column) const { + Location current = begin_; + Location lastLineStart = current; + line = 0; + while (current < location && current != end_) { + Char c = *current++; + if (c == '\r') { + if (*current == '\n') + ++current; + lastLineStart = current; + ++line; + } else if (c == '\n') { + lastLineStart = current; + ++line; + } + } + // column & line start at 1 + column = int(location - lastLineStart) + 1; + ++line; +} + +std::string OurReader::getLocationLineAndColumn(Location location) const { + int line, column; + getLocationLineAndColumn(location, line, column); + char buffer[18 + 16 + 16 + 1]; + snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); + return buffer; +} + +std::string OurReader::getFormattedErrorMessages() const { + std::string formattedMessage; + for (Errors::const_iterator itError = errors_.begin(); + itError != errors_.end(); + ++itError) { + const ErrorInfo& error = *itError; + formattedMessage += + "* " + getLocationLineAndColumn(error.token_.start_) + "\n"; + formattedMessage += " " + error.message_ + "\n"; + if (error.extra_) + formattedMessage += + "See " + getLocationLineAndColumn(error.extra_) + " for detail.\n"; + } + return formattedMessage; +} + +std::vector OurReader::getStructuredErrors() const { + std::vector allErrors; + for (Errors::const_iterator itError = errors_.begin(); + itError != errors_.end(); + ++itError) { + const ErrorInfo& error = *itError; + OurReader::StructuredError structured; + structured.offset_start = error.token_.start_ - begin_; + structured.offset_limit = error.token_.end_ - begin_; + structured.message = error.message_; + allErrors.push_back(structured); + } + return allErrors; +} + +bool OurReader::pushError(const Value& value, const std::string& message) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = end_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = 0; + errors_.push_back(info); + return true; +} + +bool OurReader::pushError(const Value& value, const std::string& message, const Value& extra) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length + || extra.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = begin_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = begin_ + extra.getOffsetStart(); + errors_.push_back(info); + return true; +} + +bool OurReader::good() const { + return !errors_.size(); +} + + +class OurCharReader : public CharReader { + bool const collectComments_; + OurReader reader_; +public: + OurCharReader( + bool collectComments, + OurFeatures const& features) + : collectComments_(collectComments) + , reader_(features) + {} + bool parse( + char const* beginDoc, char const* endDoc, + Value* root, std::string* errs) { + bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_); + if (errs) { + *errs = reader_.getFormattedErrorMessages(); + } + return ok; + } +}; + +CharReaderBuilder::CharReaderBuilder() +{ + setDefaults(&settings_); +} +CharReaderBuilder::~CharReaderBuilder() +{} +CharReader* CharReaderBuilder::newCharReader() const +{ + bool collectComments = settings_["collectComments"].asBool(); + OurFeatures features = OurFeatures::all(); + features.allowComments_ = settings_["allowComments"].asBool(); + features.strictRoot_ = settings_["strictRoot"].asBool(); + features.allowDroppedNullPlaceholders_ = settings_["allowDroppedNullPlaceholders"].asBool(); + features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool(); + features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool(); + features.stackLimit_ = settings_["stackLimit"].asInt(); + features.failIfExtra_ = settings_["failIfExtra"].asBool(); + features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool(); + features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); + return new OurCharReader(collectComments, features); +} +static void getValidReaderKeys(std::set* valid_keys) +{ + valid_keys->clear(); + valid_keys->insert("collectComments"); + valid_keys->insert("allowComments"); + valid_keys->insert("strictRoot"); + valid_keys->insert("allowDroppedNullPlaceholders"); + valid_keys->insert("allowNumericKeys"); + valid_keys->insert("allowSingleQuotes"); + valid_keys->insert("stackLimit"); + valid_keys->insert("failIfExtra"); + valid_keys->insert("rejectDupKeys"); + valid_keys->insert("allowSpecialFloats"); +} +bool CharReaderBuilder::validate(Json::Value* invalid) const +{ + Json::Value my_invalid; + if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL + Json::Value& inv = *invalid; + std::set valid_keys; + getValidReaderKeys(&valid_keys); + Value::Members keys = settings_.getMemberNames(); + size_t n = keys.size(); + for (size_t i = 0; i < n; ++i) { + std::string const& key = keys[i]; + if (valid_keys.find(key) == valid_keys.end()) { + inv[key] = settings_[key]; + } + } + return 0u == inv.size(); +} +Value& CharReaderBuilder::operator[](std::string key) +{ + return settings_[key]; +} +// static +void CharReaderBuilder::strictMode(Json::Value* settings) +{ +//! [CharReaderBuilderStrictMode] + (*settings)["allowComments"] = false; + (*settings)["strictRoot"] = true; + (*settings)["allowDroppedNullPlaceholders"] = false; + (*settings)["allowNumericKeys"] = false; + (*settings)["allowSingleQuotes"] = false; + (*settings)["stackLimit"] = 1000; + (*settings)["failIfExtra"] = true; + (*settings)["rejectDupKeys"] = true; + (*settings)["allowSpecialFloats"] = false; +//! [CharReaderBuilderStrictMode] +} +// static +void CharReaderBuilder::setDefaults(Json::Value* settings) +{ +//! [CharReaderBuilderDefaults] + (*settings)["collectComments"] = true; + (*settings)["allowComments"] = true; + (*settings)["strictRoot"] = false; + (*settings)["allowDroppedNullPlaceholders"] = false; + (*settings)["allowNumericKeys"] = false; + (*settings)["allowSingleQuotes"] = false; + (*settings)["stackLimit"] = 1000; + (*settings)["failIfExtra"] = false; + (*settings)["rejectDupKeys"] = false; + (*settings)["allowSpecialFloats"] = false; +//! [CharReaderBuilderDefaults] +} + +////////////////////////////////// +// global functions + +bool parseFromStream( + CharReader::Factory const& fact, std::istream& sin, + Value* root, std::string* errs) +{ + std::ostringstream ssin; + ssin << sin.rdbuf(); + std::string doc = ssin.str(); + char const* begin = doc.data(); + char const* end = begin + doc.size(); + // Note that we do not actually need a null-terminator. + CharReaderPtr const reader(fact.newCharReader()); + return reader->parse(begin, end, root, errs); +} + +std::istream& operator>>(std::istream& sin, Value& root) { + CharReaderBuilder b; + std::string errs; + bool ok = parseFromStream(b, sin, &root, &errs); + if (!ok) { + fprintf(stderr, + "Error from reader: %s", + errs.c_str()); + + throwRuntimeError(errs); + } + return sin; +} + +} // namespace Json + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_reader.cpp +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_valueiterator.inl +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +// included by json_value.cpp + +namespace Json { + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class ValueIteratorBase +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +ValueIteratorBase::ValueIteratorBase() + : current_(), isNull_(true) { +} + +ValueIteratorBase::ValueIteratorBase( + const Value::ObjectValues::iterator& current) + : current_(current), isNull_(false) {} + +Value& ValueIteratorBase::deref() const { + return current_->second; +} + +void ValueIteratorBase::increment() { + ++current_; +} + +void ValueIteratorBase::decrement() { + --current_; +} + +ValueIteratorBase::difference_type +ValueIteratorBase::computeDistance(const SelfType& other) const { +#ifdef JSON_USE_CPPTL_SMALLMAP + return other.current_ - current_; +#else + // Iterator for null value are initialized using the default + // constructor, which initialize current_ to the default + // std::map::iterator. As begin() and end() are two instance + // of the default std::map::iterator, they can not be compared. + // To allow this, we handle this comparison specifically. + if (isNull_ && other.isNull_) { + return 0; + } + + // Usage of std::distance is not portable (does not compile with Sun Studio 12 + // RogueWave STL, + // which is the one used by default). + // Using a portable hand-made version for non random iterator instead: + // return difference_type( std::distance( current_, other.current_ ) ); + difference_type myDistance = 0; + for (Value::ObjectValues::iterator it = current_; it != other.current_; + ++it) { + ++myDistance; + } + return myDistance; +#endif +} + +bool ValueIteratorBase::isEqual(const SelfType& other) const { + if (isNull_) { + return other.isNull_; + } + return current_ == other.current_; +} + +void ValueIteratorBase::copy(const SelfType& other) { + current_ = other.current_; + isNull_ = other.isNull_; +} + +Value ValueIteratorBase::key() const { + const Value::CZString czstring = (*current_).first; + if (czstring.data()) { + if (czstring.isStaticString()) + return Value(StaticString(czstring.data())); + return Value(czstring.data(), czstring.data() + czstring.length()); + } + return Value(czstring.index()); +} + +UInt ValueIteratorBase::index() const { + const Value::CZString czstring = (*current_).first; + if (!czstring.data()) + return czstring.index(); + return Value::UInt(-1); +} + +std::string ValueIteratorBase::name() const { + char const* keey; + char const* end; + keey = memberName(&end); + if (!keey) return std::string(); + return std::string(keey, end); +} + +char const* ValueIteratorBase::memberName() const { + const char* cname = (*current_).first.data(); + return cname ? cname : ""; +} + +char const* ValueIteratorBase::memberName(char const** end) const { + const char* cname = (*current_).first.data(); + if (!cname) { + *end = NULL; + return NULL; + } + *end = cname + (*current_).first.length(); + return cname; +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class ValueConstIterator +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +ValueConstIterator::ValueConstIterator() {} + +ValueConstIterator::ValueConstIterator( + const Value::ObjectValues::iterator& current) + : ValueIteratorBase(current) {} + +ValueConstIterator::ValueConstIterator(ValueIterator const& other) + : ValueIteratorBase(other) {} + +ValueConstIterator& ValueConstIterator:: +operator=(const ValueIteratorBase& other) { + copy(other); + return *this; +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class ValueIterator +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +ValueIterator::ValueIterator() {} + +ValueIterator::ValueIterator(const Value::ObjectValues::iterator& current) + : ValueIteratorBase(current) {} + +ValueIterator::ValueIterator(const ValueConstIterator& other) + : ValueIteratorBase(other) { + throwRuntimeError("ConstIterator to Iterator should never be allowed."); +} + +ValueIterator::ValueIterator(const ValueIterator& other) + : ValueIteratorBase(other) {} + +ValueIterator& ValueIterator::operator=(const SelfType& other) { + copy(other); + return *this; +} + +} // namespace Json + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_valueiterator.inl +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_value.cpp +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2011 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include +#ifdef JSON_USE_CPPTL +#include +#endif +#include // size_t +#include // min() + +#define JSON_ASSERT_UNREACHABLE assert(false) + +/* +-- Valve 1/7/16 +4702 unreachable code +*/ +#pragma warning (push) +#pragma warning (disable: 4702) + +namespace Json { + +// This is a walkaround to avoid the static initialization of Value::null. +// kNull must be word-aligned to avoid crashing on ARM. We use an alignment of +// 8 (instead of 4) as a bit of future-proofing. +#if defined(__ARMEL__) +#define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) +#else +#define ALIGNAS(byte_alignment) +#endif +static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = { 0 }; +const unsigned char& kNullRef = kNull[0]; +const Value& Value::null = reinterpret_cast(kNullRef); +const Value& Value::nullRef = null; + +const Int Value::minInt = Int(~(UInt(-1) / 2)); +const Int Value::maxInt = Int(UInt(-1) / 2); +const UInt Value::maxUInt = UInt(-1); +#if defined(JSON_HAS_INT64) +const Int64 Value::minInt64 = Int64(~(UInt64(-1) / 2)); +const Int64 Value::maxInt64 = Int64(UInt64(-1) / 2); +const UInt64 Value::maxUInt64 = UInt64(-1); +// The constant is hard-coded because some compiler have trouble +// converting Value::maxUInt64 to a double correctly (AIX/xlC). +// Assumes that UInt64 is a 64 bits integer. +static const double maxUInt64AsDouble = 18446744073709551615.0; +#endif // defined(JSON_HAS_INT64) +const LargestInt Value::minLargestInt = LargestInt(~(LargestUInt(-1) / 2)); +const LargestInt Value::maxLargestInt = LargestInt(LargestUInt(-1) / 2); +const LargestUInt Value::maxLargestUInt = LargestUInt(-1); + +#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) +template +static inline bool InRange(double d, T min, U max) { + return d >= min && d <= max; +} +#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) +static inline double integerToDouble(Json::UInt64 value) { + return static_cast(Int64(value / 2)) * 2.0 + Int64(value & 1); +} + +template static inline double integerToDouble(T value) { + return static_cast(value); +} + +template +static inline bool InRange(double d, T min, U max) { + return d >= integerToDouble(min) && d <= integerToDouble(max); +} +#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + +/** Duplicates the specified string value. + * @param value Pointer to the string to duplicate. Must be zero-terminated if + * length is "unknown". + * @param length Length of the value. if equals to unknown, then it will be + * computed using strlen(value). + * @return Pointer on the duplicate instance of string. + */ +static inline char* duplicateStringValue(const char* value, + size_t length) { + // Avoid an integer overflow in the call to malloc below by limiting length + // to a sane value. + if (length >= (size_t)Value::maxInt) + length = Value::maxInt - 1; + + char* newString = static_cast(malloc(length + 1)); + if (newString == NULL) { + throwRuntimeError( + "in Json::Value::duplicateStringValue(): " + "Failed to allocate string value buffer"); + } + memcpy(newString, value, length); + newString[length] = 0; + return newString; +} + +/* Record the length as a prefix. + */ +static inline char* duplicateAndPrefixStringValue( + const char* value, + unsigned int length) +{ + // Avoid an integer overflow in the call to malloc below by limiting length + // to a sane value. + JSON_ASSERT_MESSAGE(length <= (unsigned)Value::maxInt - sizeof(unsigned) - 1U, + "in Json::Value::duplicateAndPrefixStringValue(): " + "length too big for prefixing"); + unsigned actualLength = length + static_cast(sizeof(unsigned)) + 1U; + char* newString = static_cast(malloc(actualLength)); + if (newString == 0) { + throwRuntimeError( + "in Json::Value::duplicateAndPrefixStringValue(): " + "Failed to allocate string value buffer"); + } + *reinterpret_cast(newString) = length; + memcpy(newString + sizeof(unsigned), value, length); + newString[actualLength - 1U] = 0; // to avoid buffer over-run accidents by users later + return newString; +} +inline static void decodePrefixedString( + bool isPrefixed, char const* prefixed, + unsigned* length, char const** value) +{ + if (!isPrefixed) { + *length = static_cast(strlen(prefixed)); + *value = prefixed; + } else { + *length = *reinterpret_cast(prefixed); + *value = prefixed + sizeof(unsigned); + } +} +/** Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue(). + */ +static inline void releaseStringValue(char* value) { free(value); } + +} // namespace Json + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ValueInternals... +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +#if !defined(JSON_IS_AMALGAMATION) + +#include "json_valueiterator.inl" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +Exception::Exception(std::string const& msg) + : msg_(msg) +{} +Exception::~Exception() throw() +{} +char const* Exception::what() const throw() +{ + return msg_.c_str(); +} +RuntimeError::RuntimeError(std::string const& msg) + : Exception(msg) +{} +LogicError::LogicError(std::string const& msg) + : Exception(msg) +{} +void throwRuntimeError(std::string const& msg) +{ + throw RuntimeError(msg); +} +void throwLogicError(std::string const& msg) +{ + throw LogicError(msg); +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class Value::CommentInfo +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +Value::CommentInfo::CommentInfo() : comment_(0) {} + +Value::CommentInfo::~CommentInfo() { + if (comment_) + releaseStringValue(comment_); +} + +void Value::CommentInfo::setComment(const char* text, size_t len) { + if (comment_) { + releaseStringValue(comment_); + comment_ = 0; + } + JSON_ASSERT(text != 0); + JSON_ASSERT_MESSAGE( + text[0] == '\0' || text[0] == '/', + "in Json::Value::setComment(): Comments must start with /"); + // It seems that /**/ style comments are acceptable as well. + comment_ = duplicateStringValue(text, len); +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class Value::CZString +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +// Notes: policy_ indicates if the string was allocated when +// a string is stored. + +Value::CZString::CZString(ArrayIndex aindex) : cstr_(0), index_(aindex) {} + +Value::CZString::CZString(char const* str, unsigned ulength, DuplicationPolicy allocate) + : cstr_(str) { + // allocate != duplicate + storage_.policy_ = allocate & 0x3; + storage_.length_ = ulength & 0x3FFFFFFF; +} + +Value::CZString::CZString(const CZString& other) + : cstr_(other.storage_.policy_ != noDuplication && other.cstr_ != 0 + ? duplicateStringValue(other.cstr_, other.storage_.length_) + : other.cstr_) { + storage_.policy_ = (other.cstr_ + ? (static_cast(other.storage_.policy_) == noDuplication + ? noDuplication : duplicate) + : static_cast(other.storage_.policy_)); + storage_.length_ = other.storage_.length_; +} + +#if JSON_HAS_RVALUE_REFERENCES +Value::CZString::CZString(CZString&& other) + : cstr_(other.cstr_), index_(other.index_) { + other.cstr_ = nullptr; +} +#endif + +Value::CZString::~CZString() { + if (cstr_ && storage_.policy_ == duplicate) + releaseStringValue(const_cast(cstr_)); +} + +void Value::CZString::swap(CZString& other) { + std::swap(cstr_, other.cstr_); + std::swap(index_, other.index_); +} + +Value::CZString& Value::CZString::operator=(CZString other) { + swap(other); + return *this; +} + +bool Value::CZString::operator<(const CZString& other) const { + if (!cstr_) return index_ < other.index_; + //return strcmp(cstr_, other.cstr_) < 0; + // Assume both are strings. + unsigned this_len = this->storage_.length_; + unsigned other_len = other.storage_.length_; + unsigned min_len = std::min(this_len, other_len); + int comp = memcmp(this->cstr_, other.cstr_, min_len); + if (comp < 0) return true; + if (comp > 0) return false; + return (this_len < other_len); +} + +bool Value::CZString::operator==(const CZString& other) const { + if (!cstr_) return index_ == other.index_; + //return strcmp(cstr_, other.cstr_) == 0; + // Assume both are strings. + unsigned this_len = this->storage_.length_; + unsigned other_len = other.storage_.length_; + if (this_len != other_len) return false; + int comp = memcmp(this->cstr_, other.cstr_, this_len); + return comp == 0; +} + +ArrayIndex Value::CZString::index() const { return index_; } + +//const char* Value::CZString::c_str() const { return cstr_; } +const char* Value::CZString::data() const { return cstr_; } +unsigned Value::CZString::length() const { return storage_.length_; } +bool Value::CZString::isStaticString() const { return storage_.policy_ == noDuplication; } + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class Value::Value +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +/*! \internal Default constructor initialization must be equivalent to: + * memset( this, 0, sizeof(Value) ) + * This optimization is used in ValueInternalMap fast allocator. + */ +Value::Value(ValueType vtype) { + initBasic(vtype); + switch (vtype) { + case nullValue: + break; + case intValue: + case uintValue: + value_.int_ = 0; + break; + case realValue: + value_.real_ = 0.0; + break; + case stringValue: + value_.string_ = 0; + break; + case arrayValue: + case objectValue: + value_.map_ = new ObjectValues(); + break; + case booleanValue: + value_.bool_ = false; + break; + default: + JSON_ASSERT_UNREACHABLE; + } +} + +Value::Value(Int value) { + initBasic(intValue); + value_.int_ = value; +} + +Value::Value(UInt value) { + initBasic(uintValue); + value_.uint_ = value; +} +#if defined(JSON_HAS_INT64) +Value::Value(Int64 value) { + initBasic(intValue); + value_.int_ = value; +} +Value::Value(UInt64 value) { + initBasic(uintValue); + value_.uint_ = value; +} +#endif // defined(JSON_HAS_INT64) + +Value::Value(double value) { + initBasic(realValue); + value_.real_ = value; +} + +Value::Value(const char* value) { + initBasic(stringValue, true); + value_.string_ = duplicateAndPrefixStringValue(value, static_cast(strlen(value))); +} + +Value::Value(const char* beginValue, const char* endValue) { + initBasic(stringValue, true); + value_.string_ = + duplicateAndPrefixStringValue(beginValue, static_cast(endValue - beginValue)); +} + +Value::Value(const std::string& value) { + initBasic(stringValue, true); + value_.string_ = + duplicateAndPrefixStringValue(value.data(), static_cast(value.length())); +} + +Value::Value(const StaticString& value) { + initBasic(stringValue); + value_.string_ = const_cast(value.c_str()); +} + +#ifdef JSON_USE_CPPTL +Value::Value(const CppTL::ConstString& value) { + initBasic(stringValue, true); + value_.string_ = duplicateAndPrefixStringValue(value, static_cast(value.length())); +} +#endif + +Value::Value(bool value) { + initBasic(booleanValue); + value_.bool_ = value; +} + +Value::Value(Value const& other) + : type_(other.type_), allocated_(false) + , + comments_(nullptr), default_value_(nullptr), start_(other.start_), limit_(other.limit_) +{ + switch (type_) { + case nullValue: + case intValue: + case uintValue: + case realValue: + case booleanValue: + value_ = other.value_; + break; + case stringValue: + if (other.value_.string_ && other.allocated_) { + unsigned len; + char const* str; + decodePrefixedString(other.allocated_, other.value_.string_, + &len, &str); + value_.string_ = duplicateAndPrefixStringValue(str, len); + allocated_ = true; + } else { + value_.string_ = other.value_.string_; + allocated_ = false; + } + break; + case arrayValue: + case objectValue: + value_.map_ = new ObjectValues(*other.value_.map_); + break; + default: + JSON_ASSERT_UNREACHABLE; + } + if (other.comments_) { + comments_ = new CommentInfo[numberOfCommentPlacement]; + for (int comment = 0; comment < numberOfCommentPlacement; ++comment) { + const CommentInfo& otherComment = other.comments_[comment]; + if (otherComment.comment_) + comments_[comment].setComment( + otherComment.comment_, strlen(otherComment.comment_)); + } + } + + if ( other.default_value_ ) + { + default_value_ = new Value( *other.default_value_ ); + } + +} + +#if JSON_HAS_RVALUE_REFERENCES +// Move constructor +Value::Value(Value&& other) { + initBasic(nullValue); + swap(other); +} +#endif + +Value::~Value() { + switch (type_) { + case nullValue: + case intValue: + case uintValue: + case realValue: + case booleanValue: + break; + case stringValue: + if (allocated_) + releaseStringValue(value_.string_); + break; + case arrayValue: + case objectValue: + delete value_.map_; + break; + default: + JSON_ASSERT_UNREACHABLE; + } + + if (comments_) + delete[] comments_; + + if ( default_value_) + delete default_value_; +} + +Value& Value::operator=(Value other) { + swap(other); + return *this; +} + +void Value::swapPayload(Value& other) { + ValueType temp = type_; + type_ = other.type_; + other.type_ = temp; + std::swap(value_, other.value_); + int temp2 = allocated_; + allocated_ = other.allocated_; + other.allocated_ = temp2 & 0x1; +} + +void Value::swap(Value& other) { + swapPayload(other); + std::swap(comments_, other.comments_); + std::swap(default_value_, other.default_value_); + std::swap(start_, other.start_); + std::swap(limit_, other.limit_); +} + +ValueType Value::type() const { return type_; } + +int Value::compare(const Value& other) const { + if (*this < other) + return -1; + if (*this > other) + return 1; + return 0; +} + +bool Value::operator<(const Value& other) const { + int typeDelta = type_ - other.type_; + if (typeDelta) + return typeDelta < 0 ? true : false; + switch (type_) { + case nullValue: + return false; + case intValue: + return value_.int_ < other.value_.int_; + case uintValue: + return value_.uint_ < other.value_.uint_; + case realValue: + return value_.real_ < other.value_.real_; + case booleanValue: + return value_.bool_ < other.value_.bool_; + case stringValue: + { + if ((value_.string_ == 0) || (other.value_.string_ == 0)) { + if (other.value_.string_) return true; + else return false; + } + unsigned this_len; + unsigned other_len; + char const* this_str; + char const* other_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str); + unsigned min_len = std::min(this_len, other_len); + int comp = memcmp(this_str, other_str, min_len); + if (comp < 0) return true; + if (comp > 0) return false; + return (this_len < other_len); + } + case arrayValue: + case objectValue: { + int delta = int(value_.map_->size() - other.value_.map_->size()); + if (delta) + return delta < 0; + return (*value_.map_) < (*other.value_.map_); + } + default: + JSON_ASSERT_UNREACHABLE; + } + return false; // unreachable +} + +bool Value::operator<=(const Value& other) const { return !(other < *this); } + +bool Value::operator>=(const Value& other) const { return !(*this < other); } + +bool Value::operator>(const Value& other) const { return other < *this; } + +bool Value::operator==(const Value& other) const { + // if ( type_ != other.type_ ) + // GCC 2.95.3 says: + // attempt to take address of bit-field structure member `Json::Value::type_' + // Beats me, but a temp solves the problem. + int temp = other.type_; + if (type_ != temp) + return false; + switch (type_) { + case nullValue: + return true; + case intValue: + return value_.int_ == other.value_.int_; + case uintValue: + return value_.uint_ == other.value_.uint_; + case realValue: + return value_.real_ == other.value_.real_; + case booleanValue: + return value_.bool_ == other.value_.bool_; + case stringValue: + { + if ((value_.string_ == 0) || (other.value_.string_ == 0)) { + return (value_.string_ == other.value_.string_); + } + unsigned this_len; + unsigned other_len; + char const* this_str; + char const* other_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str); + if (this_len != other_len) return false; + int comp = memcmp(this_str, other_str, this_len); + return comp == 0; + } + case arrayValue: + case objectValue: + return value_.map_->size() == other.value_.map_->size() && + (*value_.map_) == (*other.value_.map_); + default: + JSON_ASSERT_UNREACHABLE; + } + return false; // unreachable +} + +bool Value::operator!=(const Value& other) const { return !(*this == other); } + +const char* Value::asCString() const { + JSON_ASSERT_MESSAGE(type_ == stringValue, + "in Json::Value::asCString(): requires stringValue"); + if (value_.string_ == 0) return 0; + unsigned this_len; + char const* this_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + return this_str; +} + +bool Value::getString(char const** str, char const** cend) const { + if (type_ != stringValue) return false; + if (value_.string_ == 0) return false; + unsigned length; + decodePrefixedString(this->allocated_, this->value_.string_, &length, str); + *cend = *str + length; + return true; +} + +std::string Value::asString() const { + switch (type_) { + case nullValue: + return ""; + case stringValue: + { + if (value_.string_ == 0) return ""; + unsigned this_len; + char const* this_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + return std::string(this_str, this_len); + } + case booleanValue: + return value_.bool_ ? "true" : "false"; + case intValue: + return valueToString(value_.int_); + case uintValue: + return valueToString(value_.uint_); + case realValue: + return valueToString(value_.real_); + default: + if ( default_value_ ) + return default_value_->asString(); + else + return ""; + } +} + +#ifdef JSON_USE_CPPTL +CppTL::ConstString Value::asConstString() const { + unsigned len; + char const* str; + decodePrefixedString(allocated_, value_.string_, + &len, &str); + return CppTL::ConstString(str, len); +} +#endif + +Value::Int Value::asInt() const { + switch (type_) { + case intValue: + JSON_ASSERT_MESSAGE(isInt(), "LargestInt out of Int range"); + return Int(value_.int_); + case uintValue: + JSON_ASSERT_MESSAGE(isInt(), "LargestUInt out of Int range"); + return Int(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt, maxInt), + "double out of Int range"); + return Int(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asInt(); + else + return 0; + } +} + +Value::UInt Value::asUInt() const { + switch (type_) { + case intValue: + JSON_ASSERT_MESSAGE(isUInt(), "LargestInt out of UInt range"); + return UInt(value_.int_); + case uintValue: + JSON_ASSERT_MESSAGE(isUInt(), "LargestUInt out of UInt range"); + return UInt(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt), + "double out of UInt range"); + return UInt(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asUInt(); + else + return 0u; + } +} + +#if defined(JSON_HAS_INT64) + +Value::Int64 Value::asInt64() const { + switch (type_) { + case intValue: + return Int64(value_.int_); + case uintValue: + JSON_ASSERT_MESSAGE(isInt64(), "LargestUInt out of Int64 range"); + return Int64(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64), + "double out of Int64 range"); + return Int64(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asInt64(); + else + return 0l; + } +} + +Value::UInt64 Value::asUInt64() const { + switch (type_) { + case intValue: + JSON_ASSERT_MESSAGE(isUInt64(), "LargestInt out of UInt64 range"); + return UInt64(value_.int_); + case uintValue: + return UInt64(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64), + "double out of UInt64 range"); + return UInt64(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asUInt64(); + else + return 0ul; + } +} +#endif // if defined(JSON_HAS_INT64) + +LargestInt Value::asLargestInt() const { +#if defined(JSON_NO_INT64) + return asInt(); +#else + return asInt64(); +#endif +} + +LargestUInt Value::asLargestUInt() const { +#if defined(JSON_NO_INT64) + return asUInt(); +#else + return asUInt64(); +#endif +} + +double Value::asDouble() const { + switch (type_) { + case intValue: + return static_cast(value_.int_); + case uintValue: +#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return static_cast(value_.uint_); +#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return integerToDouble(value_.uint_); +#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + case realValue: + return value_.real_; + case nullValue: + return 0.0; + case booleanValue: + return value_.bool_ ? 1.0 : 0.0; + default: + if ( default_value_ ) + return default_value_->asDouble(); + else + return 0.0; + } +} + +float Value::asFloat() const { + switch (type_) { + case intValue: + return static_cast(value_.int_); + case uintValue: +#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return static_cast(value_.uint_); +#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return integerToDouble(value_.uint_); +#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + case realValue: + return static_cast(value_.real_); + case nullValue: + return 0.0; + case booleanValue: + return value_.bool_ ? 1.0f : 0.0f; + default: + if ( default_value_ ) + return default_value_->asFloat(); + else + return 0.0f; + } +} + +bool Value::asBool() const { + switch (type_) { + case booleanValue: + return value_.bool_; + case nullValue: + return false; + case intValue: + return value_.int_ ? true : false; + case uintValue: + return value_.uint_ ? true : false; + case realValue: + // This is kind of strange. Not recommended. + return (value_.real_ != 0.0) ? true : false; + default: + if ( default_value_ ) + return default_value_->asBool(); + else + return false; + } +} + +bool Value::isConvertibleTo(ValueType other) const { + switch (other) { + case nullValue: + return (isNumeric() && asDouble() == 0.0) || + (type_ == booleanValue && value_.bool_ == false) || + (type_ == stringValue && asString() == "") || + (type_ == arrayValue && value_.map_->size() == 0) || + (type_ == objectValue && value_.map_->size() == 0) || + type_ == nullValue; + case intValue: + return isInt() || + (type_ == realValue && InRange(value_.real_, minInt, maxInt)) || + type_ == booleanValue || type_ == nullValue; + case uintValue: + return isUInt() || + (type_ == realValue && InRange(value_.real_, 0, maxUInt)) || + type_ == booleanValue || type_ == nullValue; + case realValue: + return isNumeric() || type_ == booleanValue || type_ == nullValue; + case booleanValue: + return isNumeric() || type_ == booleanValue || type_ == nullValue; + case stringValue: + return isNumeric() || type_ == booleanValue || type_ == stringValue || + type_ == nullValue; + case arrayValue: + return type_ == arrayValue || type_ == nullValue; + case objectValue: + return type_ == objectValue || type_ == nullValue; + } + JSON_ASSERT_UNREACHABLE; + return false; +} + +/// Number of values in array or object +ArrayIndex Value::size() const { + switch (type_) { + case nullValue: + case intValue: + case uintValue: + case realValue: + case booleanValue: + case stringValue: + return 0; + case arrayValue: // size of the array is highest index + 1 + if (!value_.map_->empty()) { + ObjectValues::const_iterator itLast = value_.map_->end(); + --itLast; + return (*itLast).first.index() + 1; + } + return 0; + case objectValue: + return ArrayIndex(value_.map_->size()); + } + JSON_ASSERT_UNREACHABLE; + return 0; // unreachable; +} + +bool Value::empty() const { + if (isNull() || isArray() || isObject()) + return size() == 0u; + else + return false; +} + +bool Value::operator!() const { return isNull(); } + +void Value::clear() { + JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue || + type_ == objectValue, + "in Json::Value::clear(): requires complex value"); + start_ = 0; + limit_ = 0; + delete default_value_; + default_value_ = nullptr; + switch (type_) { + case arrayValue: + case objectValue: + value_.map_->clear(); + break; + default: + break; + } +} + +void Value::resize(ArrayIndex newSize) { + JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue, + "in Json::Value::resize(): requires arrayValue"); + if (type_ == nullValue) + *this = Value(arrayValue); + ArrayIndex oldSize = size(); + if (newSize == 0) + clear(); + else if (newSize > oldSize) + (*this)[newSize - 1]; + else { + for (ArrayIndex index = newSize; index < oldSize; ++index) { + value_.map_->erase(index); + } + assert(size() == newSize); + } +} + +Value& Value::operator[](ArrayIndex index) { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == arrayValue, + "in Json::Value::operator[](ArrayIndex): requires arrayValue"); + if (type_ == nullValue) + *this = Value(arrayValue); + CZString key(index); + ObjectValues::iterator it = value_.map_->lower_bound(key); + if (it != value_.map_->end() && (*it).first == key) + return (*it).second; + + ObjectValues::value_type defaultValue(key, nullRef); + it = value_.map_->insert(it, defaultValue); + return (*it).second; +} + +Value& Value::operator[](int index) { + JSON_ASSERT_MESSAGE( + index >= 0, + "in Json::Value::operator[](int index): index cannot be negative"); + return (*this)[ArrayIndex(index)]; +} + +const Value& Value::operator[](ArrayIndex index) const { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == arrayValue, + "in Json::Value::operator[](ArrayIndex)const: requires arrayValue"); + if (type_ == nullValue) + return nullRef; + CZString key(index); + ObjectValues::const_iterator it = value_.map_->find(key); + if (it == value_.map_->end()) + return nullRef; + return (*it).second; +} + +const Value& Value::operator[](int index) const { + JSON_ASSERT_MESSAGE( + index >= 0, + "in Json::Value::operator[](int index) const: index cannot be negative"); + return (*this)[ArrayIndex(index)]; +} + +void Value::initBasic(ValueType vtype, bool allocated) { + type_ = vtype; + allocated_ = allocated; + comments_ = 0; + start_ = 0; + limit_ = 0; + default_value_ = nullptr; +} + +// Access an object value by name, create a null member if it does not exist. +// @pre Type of '*this' is object or null. +// @param key is null-terminated. +Value& Value::resolveReference(const char* key) { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::resolveReference(): requires objectValue"); + if (type_ == nullValue) + *this = Value(objectValue); + CZString actualKey( + key, static_cast(strlen(key)), CZString::noDuplication); // NOTE! + ObjectValues::iterator it = value_.map_->lower_bound(actualKey); + if (it != value_.map_->end() && (*it).first == actualKey) + return (*it).second; + + ObjectValues::value_type defaultValue(actualKey, nullRef); + it = value_.map_->insert(it, defaultValue); + Value& value = (*it).second; + return value; +} + +// @param key is not null-terminated. +Value& Value::resolveReference(char const* key, char const* cend) +{ + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::resolveReference(key, end): requires objectValue"); + if (type_ == nullValue) + *this = Value(objectValue); + CZString actualKey( + key, static_cast(cend-key), CZString::duplicateOnCopy); + ObjectValues::iterator it = value_.map_->lower_bound(actualKey); + if (it != value_.map_->end() && (*it).first == actualKey) + return (*it).second; + + ObjectValues::value_type defaultValue(actualKey, nullRef); + it = value_.map_->insert(it, defaultValue); + Value& value = (*it).second; + return value; +} + +Value Value::get(ArrayIndex index, const Value& defaultValue) const { + const Value* value = &((*this)[index]); + if ( value == &nullRef ) + { + return defaultValue; + } + else + { + Value result = *value; + result.default_value_ = new Value( defaultValue ); + return result; + } +} + +bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } + +Value const* Value::find(char const* key, char const* cend) const +{ + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::find(key, end, found): requires objectValue or nullValue"); + if (type_ == nullValue) return NULL; + CZString actualKey(key, static_cast(cend-key), CZString::noDuplication); + ObjectValues::const_iterator it = value_.map_->find(actualKey); + if (it == value_.map_->end()) return NULL; + return &(*it).second; +} +const Value& Value::operator[](const char* key) const +{ + Value const* found = find(key, key + strlen(key)); + if (!found) return nullRef; + return *found; +} +Value const& Value::operator[](std::string const& key) const +{ + Value const* found = find(key.data(), key.data() + key.length()); + if (!found) return nullRef; + return *found; +} + +Value& Value::operator[](const char* key) { + return resolveReference(key, key + strlen(key)); +} + +Value& Value::operator[](const std::string& key) { + return resolveReference(key.data(), key.data() + key.length()); +} + +Value& Value::operator[](const StaticString& key) { + return resolveReference(key.c_str()); +} + +#ifdef JSON_USE_CPPTL +Value& Value::operator[](const CppTL::ConstString& key) { + return resolveReference(key.c_str(), key.end_c_str()); +} +Value const& Value::operator[](CppTL::ConstString const& key) const +{ + Value const* found = find(key.c_str(), key.end_c_str()); + if (!found) return nullRef; + return *found; +} +#endif + +Value& Value::append(const Value& value) { return (*this)[size()] = value; } + +Value Value::get(char const* key, char const* cend, Value const& defaultValue) const +{ + Value const* found = find(key, cend); + if ( !found ) + { + return defaultValue; + } + else + { + Value result = *found; + result.default_value_ = new Value( defaultValue ); + return result; + } +} +Value Value::get(char const* key, Value const& defaultValue) const +{ + return get(key, key + strlen(key), defaultValue); +} +Value Value::get(std::string const& key, Value const& defaultValue) const +{ + return get(key.data(), key.data() + key.length(), defaultValue); +} + + +bool Value::removeMember(const char* key, const char* cend, Value* removed) +{ + if (type_ != objectValue) { + return false; + } + CZString actualKey(key, static_cast(cend-key), CZString::noDuplication); + ObjectValues::iterator it = value_.map_->find(actualKey); + if (it == value_.map_->end()) + return false; + *removed = it->second; + value_.map_->erase(it); + return true; +} +bool Value::removeMember(const char* key, Value* removed) +{ + return removeMember(key, key + strlen(key), removed); +} +bool Value::removeMember(std::string const& key, Value* removed) +{ + return removeMember(key.data(), key.data() + key.length(), removed); +} +Value Value::removeMember(const char* key) +{ + JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue, + "in Json::Value::removeMember(): requires objectValue"); + if (type_ == nullValue) + return nullRef; + + Value removed; // null + removeMember(key, key + strlen(key), &removed); + return removed; // still null if removeMember() did nothing +} +Value Value::removeMember(const std::string& key) +{ + return removeMember(key.c_str()); +} + +bool Value::removeIndex(ArrayIndex index, Value* removed) { + if (type_ != arrayValue) { + return false; + } + CZString key(index); + ObjectValues::iterator it = value_.map_->find(key); + if (it == value_.map_->end()) { + return false; + } + *removed = it->second; + ArrayIndex oldSize = size(); + // shift left all items left, into the place of the "removed" + for (ArrayIndex i = index; i < (oldSize - 1); ++i){ + CZString keey(i); + (*value_.map_)[keey] = (*this)[i + 1]; + } + // erase the last one ("leftover") + CZString keyLast(oldSize - 1); + ObjectValues::iterator itLast = value_.map_->find(keyLast); + value_.map_->erase(itLast); + return true; +} + +#ifdef JSON_USE_CPPTL +Value Value::get(const CppTL::ConstString& key, + const Value& defaultValue) const { + return get(key.c_str(), key.end_c_str(), defaultValue); +} +#endif + +bool Value::isMember(char const* key, char const* cend) const +{ + Value const* value = find(key, cend); + return NULL != value; +} +bool Value::isMember(char const* key) const +{ + return isMember(key, key + strlen(key)); +} +bool Value::isMember(std::string const& key) const +{ + return isMember(key.data(), key.data() + key.length()); +} + +#ifdef JSON_USE_CPPTL +bool Value::isMember(const CppTL::ConstString& key) const { + return isMember(key.c_str(), key.end_c_str()); +} +#endif + +Value::Members Value::getMemberNames() const { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::getMemberNames(), value must be objectValue"); + if (type_ == nullValue) + return Value::Members(); + Members members; + members.reserve(value_.map_->size()); + ObjectValues::const_iterator it = value_.map_->begin(); + ObjectValues::const_iterator itEnd = value_.map_->end(); + for (; it != itEnd; ++it) { + members.push_back(std::string((*it).first.data(), + (*it).first.length())); + } + return members; +} +// +//# ifdef JSON_USE_CPPTL +// EnumMemberNames +// Value::enumMemberNames() const +//{ +// if ( type_ == objectValue ) +// { +// return CppTL::Enum::any( CppTL::Enum::transform( +// CppTL::Enum::keys( *(value_.map_), CppTL::Type() ), +// MemberNamesTransform() ) ); +// } +// return EnumMemberNames(); +//} +// +// +// EnumValues +// Value::enumValues() const +//{ +// if ( type_ == objectValue || type_ == arrayValue ) +// return CppTL::Enum::anyValues( *(value_.map_), +// CppTL::Type() ); +// return EnumValues(); +//} +// +//# endif + +static bool IsIntegral(double d) { + double integral_part; + return modf(d, &integral_part) == 0.0; +} + +bool Value::isNull() const { return type_ == nullValue; } + +bool Value::isBool() const { return type_ == booleanValue; } + +bool Value::isInt() const { + switch (type_) { + case intValue: + return value_.int_ >= minInt && value_.int_ <= maxInt; + case uintValue: + return value_.uint_ <= UInt(maxInt); + case realValue: + return value_.real_ >= minInt && value_.real_ <= maxInt && + IsIntegral(value_.real_); + default: + break; + } + return false; +} + +bool Value::isUInt() const { + switch (type_) { + case intValue: + return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt); + case uintValue: + return value_.uint_ <= maxUInt; + case realValue: + return value_.real_ >= 0 && value_.real_ <= maxUInt && + IsIntegral(value_.real_); + default: + break; + } + return false; +} + +bool Value::isInt64() const { +#if defined(JSON_HAS_INT64) + switch (type_) { + case intValue: + return true; + case uintValue: + return value_.uint_ <= UInt64(maxInt64); + case realValue: + // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a + // double, so double(maxInt64) will be rounded up to 2^63. Therefore we + // require the value to be strictly less than the limit. + return value_.real_ >= double(minInt64) && + value_.real_ < double(maxInt64) && IsIntegral(value_.real_); + default: + break; + } +#endif // JSON_HAS_INT64 + return false; +} + +bool Value::isUInt64() const { +#if defined(JSON_HAS_INT64) + switch (type_) { + case intValue: + return value_.int_ >= 0; + case uintValue: + return true; + case realValue: + // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a + // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we + // require the value to be strictly less than the limit. + return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble && + IsIntegral(value_.real_); + default: + break; + } +#endif // JSON_HAS_INT64 + return false; +} + +bool Value::isIntegral() const { +#if defined(JSON_HAS_INT64) + return isInt64() || isUInt64(); +#else + return isInt() || isUInt(); +#endif +} + +bool Value::isDouble() const { return type_ == realValue || isIntegral(); } + +bool Value::isNumeric() const { return isIntegral() || isDouble(); } + +bool Value::isString() const { return type_ == stringValue; } + +bool Value::isArray() const { return type_ == arrayValue; } + +bool Value::isObject() const { return type_ == objectValue; } + +void Value::setComment(const char* comment, size_t len, CommentPlacement placement) { + if (!comments_) + comments_ = new CommentInfo[numberOfCommentPlacement]; + if ((len > 0) && (comment[len-1] == '\n')) { + // Always discard trailing newline, to aid indentation. + len -= 1; + } + comments_[placement].setComment(comment, len); +} + +void Value::setComment(const char* comment, CommentPlacement placement) { + setComment(comment, strlen(comment), placement); +} + +void Value::setComment(const std::string& comment, CommentPlacement placement) { + setComment(comment.c_str(), comment.length(), placement); +} + +bool Value::hasComment(CommentPlacement placement) const { + return comments_ != 0 && comments_[placement].comment_ != 0; +} + +std::string Value::getComment(CommentPlacement placement) const { + if (hasComment(placement)) + return comments_[placement].comment_; + return ""; +} + +void Value::setOffsetStart(size_t start) { start_ = start; } + +void Value::setOffsetLimit(size_t limit) { limit_ = limit; } + +size_t Value::getOffsetStart() const { return start_; } + +size_t Value::getOffsetLimit() const { return limit_; } + +std::string Value::toStyledString() const { + StyledWriter writer; + return writer.write(*this); +} + +Value::const_iterator Value::begin() const { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return const_iterator(value_.map_->begin()); + break; + default: + break; + } + return const_iterator(); +} + +Value::const_iterator Value::end() const { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return const_iterator(value_.map_->end()); + break; + default: + break; + } + return const_iterator(); +} + +Value::iterator Value::begin() { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return iterator(value_.map_->begin()); + break; + default: + break; + } + return iterator(); +} + +Value::iterator Value::end() { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return iterator(value_.map_->end()); + break; + default: + break; + } + return iterator(); +} + +// class PathArgument +// ////////////////////////////////////////////////////////////////// + +PathArgument::PathArgument() : key_(), index_(), kind_(kindNone) {} + +PathArgument::PathArgument(ArrayIndex index) + : key_(), index_(index), kind_(kindIndex) {} + +PathArgument::PathArgument(const char* key) + : key_(key), index_(), kind_(kindKey) {} + +PathArgument::PathArgument(const std::string& key) + : key_(key.c_str()), index_(), kind_(kindKey) {} + +// class Path +// ////////////////////////////////////////////////////////////////// + +Path::Path(const std::string& path, + const PathArgument& a1, + const PathArgument& a2, + const PathArgument& a3, + const PathArgument& a4, + const PathArgument& a5) { + InArgs in; + in.push_back(&a1); + in.push_back(&a2); + in.push_back(&a3); + in.push_back(&a4); + in.push_back(&a5); + makePath(path, in); +} + +void Path::makePath(const std::string& path, const InArgs& in) { + const char* current = path.c_str(); + const char* end = current + path.length(); + InArgs::const_iterator itInArg = in.begin(); + while (current != end) { + if (*current == '[') { + ++current; + if (*current == '%') + addPathInArg(path, in, itInArg, PathArgument::kindIndex); + else { + ArrayIndex index = 0; + for (; current != end && *current >= '0' && *current <= '9'; ++current) + index = index * 10 + ArrayIndex(*current - '0'); + args_.push_back(index); + } + if (current == end || *current++ != ']') + invalidPath(path, int(current - path.c_str())); + } else if (*current == '%') { + addPathInArg(path, in, itInArg, PathArgument::kindKey); + ++current; + } else if (*current == '.') { + ++current; + } else { + const char* beginName = current; + while (current != end && !strchr("[.", *current)) + ++current; + args_.push_back(std::string(beginName, current)); + } + } +} + +void Path::addPathInArg(const std::string& /*path*/, + const InArgs& in, + InArgs::const_iterator& itInArg, + PathArgument::Kind kind) { + if (itInArg == in.end()) { + // Error: missing argument %d + } else if ((*itInArg)->kind_ != kind) { + // Error: bad argument type + } else { + args_.push_back(**itInArg); + } +} + +void Path::invalidPath(const std::string& /*path*/, int /*location*/) { + // Error: invalid path. +} + +const Value& Path::resolve(const Value& root) const { + const Value* node = &root; + for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) { + const PathArgument& arg = *it; + if (arg.kind_ == PathArgument::kindIndex) { + if (!node->isArray() || !node->isValidIndex(arg.index_)) { + // Error: unable to resolve path (array value expected at position... + } + node = &((*node)[arg.index_]); + } else if (arg.kind_ == PathArgument::kindKey) { + if (!node->isObject()) { + // Error: unable to resolve path (object value expected at position...) + } + node = &((*node)[arg.key_]); + if (node == &Value::nullRef) { + // Error: unable to resolve path (object has no member named '' at + // position...) + } + } + } + return *node; +} + +Value Path::resolve(const Value& root, const Value& defaultValue) const { + const Value* node = &root; + for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) { + const PathArgument& arg = *it; + if (arg.kind_ == PathArgument::kindIndex) { + if (!node->isArray() || !node->isValidIndex(arg.index_)) + return defaultValue; + node = &((*node)[arg.index_]); + } else if (arg.kind_ == PathArgument::kindKey) { + if (!node->isObject()) + return defaultValue; + node = &((*node)[arg.key_]); + if (node == &Value::nullRef) + return defaultValue; + } + } + return *node; +} + +Value& Path::make(Value& root) const { + Value* node = &root; + for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) { + const PathArgument& arg = *it; + if (arg.kind_ == PathArgument::kindIndex) { + if (!node->isArray()) { + // Error: node is not an array at position ... + } + node = &((*node)[arg.index_]); + } else if (arg.kind_ == PathArgument::kindKey) { + if (!node->isObject()) { + // Error: node is not an object at position... + } + node = &((*node)[arg.key_]); + } + } + return *node; +} + +} // namespace Json + +#pragma warning (pop) + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_value.cpp +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_writer.cpp +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2011 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#if !defined(JSON_IS_AMALGAMATION) +#include +#include "json_tool.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1800 // Between VC++ 6.0 and VC++ 11.0 +#include +#define isfinite _finite +#elif defined(__sun) && defined(__SVR4) //Solaris +#if !defined(isfinite) +#include +#define isfinite finite +#endif +#elif defined(_AIX) +#if !defined(isfinite) +#include +#define isfinite finite +#endif +#elif defined(__hpux) +#if !defined(isfinite) +#if defined(__ia64) && !defined(finite) +#define isfinite(x) ((sizeof(x) == sizeof(float) ? \ + _Isfinitef(x) : _IsFinite(x))) +#else +#include +#define isfinite finite +#endif +#endif +#else +#include +#if !(defined(__QNXNTO__)) // QNX already defines isfinite +#define isfinite std::isfinite +#endif +#endif + +#if defined(_MSC_VER) +#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above +#define snprintf sprintf_s +#elif _MSC_VER >= 1900 // VC++ 14.0 and above +#define snprintf std::snprintf +#else +#define snprintf _snprintf +#endif +#elif defined(__ANDROID__) || defined(__QNXNTO__) +#define snprintf snprintf +#elif __cplusplus >= 201103L +#define snprintf std::snprintf +#endif + +#if defined(__BORLANDC__) +#include +#define isfinite _finite +#define snprintf _snprintf +#endif + +#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 +// Disable warning about strdup being deprecated. +#pragma warning(disable : 4996) +#endif + +namespace Json { + +#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) +typedef std::unique_ptr StreamWriterPtr; +#else +typedef std::auto_ptr StreamWriterPtr; +#endif + +static bool containsControlCharacter(const char* str) { + while (*str) { + if (isControlCharacter(*(str++))) + return true; + } + return false; +} + +static bool containsControlCharacter0(const char* str, unsigned len) { + char const* end = str + len; + while (end != str) { + if (isControlCharacter(*str) || 0==*str) + return true; + ++str; + } + return false; +} + +std::string valueToString(LargestInt value) { + UIntToStringBuffer buffer; + char* current = buffer + sizeof(buffer); + if (value == Value::minLargestInt) { + uintToString(LargestUInt(Value::maxLargestInt) + 1, current); + *--current = '-'; + } else if (value < 0) { + uintToString(LargestUInt(-value), current); + *--current = '-'; + } else { + uintToString(LargestUInt(value), current); + } + assert(current >= buffer); + return current; +} + +std::string valueToString(LargestUInt value) { + UIntToStringBuffer buffer; + char* current = buffer + sizeof(buffer); + uintToString(value, current); + assert(current >= buffer); + return current; +} + +#if defined(JSON_HAS_INT64) + +std::string valueToString(Int value) { + return valueToString(LargestInt(value)); +} + +std::string valueToString(UInt value) { + return valueToString(LargestUInt(value)); +} + +#endif // # if defined(JSON_HAS_INT64) + +std::string valueToString(double value, bool useSpecialFloats, unsigned int precision) { + // Allocate a buffer that is more than large enough to store the 16 digits of + // precision requested below. + char buffer[32]; + int len = -1; + + char formatString[6]; + sprintf(formatString, "%%.%dg", precision); + + // Print into the buffer. We need not request the alternative representation + // that always has a decimal point because JSON doesn't distingish the + // concepts of reals and integers. + if (isfinite(value)) { + len = snprintf(buffer, sizeof(buffer), formatString, value); + } else { + // IEEE standard states that NaN values will not compare to themselves + if (value != value) { + len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "NaN" : "null"); + } else if (value < 0) { + len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "-Infinity" : "-1e+9999"); + } else { + len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "Infinity" : "1e+9999"); + } + // For those, we do not need to call fixNumLoc, but it is fast. + } + assert(len >= 0); + fixNumericLocale(buffer, buffer + len); + return buffer; +} + +std::string valueToString(double value) { return valueToString(value, false, 17); } + +std::string valueToString(bool value) { return value ? "true" : "false"; } + +std::string valueToQuotedString(const char* value) { + if (value == NULL) + return ""; + // Not sure how to handle unicode... + if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && + !containsControlCharacter(value)) + return std::string("\"") + value + "\""; + // We have to walk value and escape any special characters. + // Appending to std::string is not efficient, but this should be rare. + // (Note: forward slashes are *not* rare, but I am not escaping them.) + std::string::size_type maxsize = + strlen(value) * 2 + 3; // allescaped+quotes+NULL + std::string result; + result.reserve(maxsize); // to avoid lots of mallocs + result += "\""; + for (const char* c = value; *c != 0; ++c) { + switch (*c) { + case '\"': + result += "\\\""; + break; + case '\\': + result += "\\\\"; + break; + case '\b': + result += "\\b"; + break; + case '\f': + result += "\\f"; + break; + case '\n': + result += "\\n"; + break; + case '\r': + result += "\\r"; + break; + case '\t': + result += "\\t"; + break; + // case '/': + // Even though \/ is considered a legal escape in JSON, a bare + // slash is also legal, so I see no reason to escape it. + // (I hope I am not misunderstanding something. + // blep notes: actually escaping \/ may be useful in javascript to avoid (*c); + result += oss.str(); + } else { + result += *c; + } + break; + } + } + result += "\""; + return result; +} + +// https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp +static char const* strnpbrk(char const* s, char const* accept, size_t n) { + assert((s || !n) && accept); + + char const* const end = s + n; + for (char const* cur = s; cur < end; ++cur) { + int const c = *cur; + for (char const* a = accept; *a; ++a) { + if (*a == c) { + return cur; + } + } + } + return NULL; +} +static std::string valueToQuotedStringN(const char* value, unsigned length) { + if (value == NULL) + return ""; + // Not sure how to handle unicode... + if (strnpbrk(value, "\"\\\b\f\n\r\t", length) == NULL && + !containsControlCharacter0(value, length)) + return std::string("\"") + value + "\""; + // We have to walk value and escape any special characters. + // Appending to std::string is not efficient, but this should be rare. + // (Note: forward slashes are *not* rare, but I am not escaping them.) + std::string::size_type maxsize = + length * 2 + 3; // allescaped+quotes+NULL + std::string result; + result.reserve(maxsize); // to avoid lots of mallocs + result += "\""; + char const* end = value + length; + for (const char* c = value; c != end; ++c) { + switch (*c) { + case '\"': + result += "\\\""; + break; + case '\\': + result += "\\\\"; + break; + case '\b': + result += "\\b"; + break; + case '\f': + result += "\\f"; + break; + case '\n': + result += "\\n"; + break; + case '\r': + result += "\\r"; + break; + case '\t': + result += "\\t"; + break; + // case '/': + // Even though \/ is considered a legal escape in JSON, a bare + // slash is also legal, so I see no reason to escape it. + // (I hope I am not misunderstanding something.) + // blep notes: actually escaping \/ may be useful in javascript to avoid (*c); + result += oss.str(); + } else { + result += *c; + } + break; + } + } + result += "\""; + return result; +} + +// Class Writer +// ////////////////////////////////////////////////////////////////// +Writer::~Writer() {} + +// Class FastWriter +// ////////////////////////////////////////////////////////////////// + +FastWriter::FastWriter() + : yamlCompatiblityEnabled_(false), dropNullPlaceholders_(false), + omitEndingLineFeed_(false) {} + +void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; } + +void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; } + +void FastWriter::omitEndingLineFeed() { omitEndingLineFeed_ = true; } + +std::string FastWriter::write(const Value& root) { + document_ = ""; + writeValue(root); + if (!omitEndingLineFeed_) + document_ += "\n"; + return document_; +} + +void FastWriter::writeValue(const Value& value) { + switch (value.type()) { + case nullValue: + if (!dropNullPlaceholders_) + document_ += "null"; + break; + case intValue: + document_ += valueToString(value.asLargestInt()); + break; + case uintValue: + document_ += valueToString(value.asLargestUInt()); + break; + case realValue: + document_ += valueToString(value.asDouble()); + break; + case stringValue: + { + // Is NULL possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) document_ += valueToQuotedStringN(str, static_cast(end-str)); + break; + } + case booleanValue: + document_ += valueToString(value.asBool()); + break; + case arrayValue: { + document_ += '['; + int size = value.size(); + for (int index = 0; index < size; ++index) { + if (index > 0) + document_ += ','; + writeValue(value[index]); + } + document_ += ']'; + } break; + case objectValue: { + Value::Members members(value.getMemberNames()); + document_ += '{'; + for (Value::Members::iterator it = members.begin(); it != members.end(); + ++it) { + const std::string& name = *it; + if (it != members.begin()) + document_ += ','; + document_ += valueToQuotedStringN(name.data(), static_cast(name.length())); + document_ += yamlCompatiblityEnabled_ ? ": " : ":"; + writeValue(value[name]); + } + document_ += '}'; + } break; + } +} + +// Class StyledWriter +// ////////////////////////////////////////////////////////////////// + +StyledWriter::StyledWriter() + : rightMargin_(74), indentSize_(3), addChildValues_() {} + +std::string StyledWriter::write(const Value& root) { + document_ = ""; + addChildValues_ = false; + indentString_ = ""; + writeCommentBeforeValue(root); + writeValue(root); + writeCommentAfterValueOnSameLine(root); + document_ += "\n"; + return document_; +} + +void StyledWriter::writeValue(const Value& value) { + switch (value.type()) { + case nullValue: + pushValue("null"); + break; + case intValue: + pushValue(valueToString(value.asLargestInt())); + break; + case uintValue: + pushValue(valueToString(value.asLargestUInt())); + break; + case realValue: + pushValue(valueToString(value.asDouble())); + break; + case stringValue: + { + // Is NULL possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str))); + else pushValue(""); + break; + } + case booleanValue: + pushValue(valueToString(value.asBool())); + break; + case arrayValue: + writeArrayValue(value); + break; + case objectValue: { + Value::Members members(value.getMemberNames()); + if (members.empty()) + pushValue("{}"); + else { + writeWithIndent("{"); + indent(); + Value::Members::iterator it = members.begin(); + for (;;) { + const std::string& name = *it; + const Value& childValue = value[name]; + writeCommentBeforeValue(childValue); + writeWithIndent(valueToQuotedString(name.c_str())); + document_ += " : "; + writeValue(childValue); + if (++it == members.end()) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + document_ += ','; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("}"); + } + } break; + } +} + +void StyledWriter::writeArrayValue(const Value& value) { + unsigned size = value.size(); + if (size == 0) + pushValue("[]"); + else { + bool isArrayMultiLine = isMultineArray(value); + if (isArrayMultiLine) { + writeWithIndent("["); + indent(); + bool hasChildValue = !childValues_.empty(); + unsigned index = 0; + for (;;) { + const Value& childValue = value[index]; + writeCommentBeforeValue(childValue); + if (hasChildValue) + writeWithIndent(childValues_[index]); + else { + writeIndent(); + writeValue(childValue); + } + if (++index == size) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + document_ += ','; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("]"); + } else // output on a single line + { + assert(childValues_.size() == size); + document_ += "[ "; + for (unsigned index = 0; index < size; ++index) { + if (index > 0) + document_ += ", "; + document_ += childValues_[index]; + } + document_ += " ]"; + } + } +} + +bool StyledWriter::isMultineArray(const Value& value) { + int size = value.size(); + bool isMultiLine = size * 3 >= rightMargin_; + childValues_.clear(); + for (int index = 0; index < size && !isMultiLine; ++index) { + const Value& childValue = value[index]; + isMultiLine = ((childValue.isArray() || childValue.isObject()) && + childValue.size() > 0); + } + if (!isMultiLine) // check if line length > max line length + { + childValues_.reserve(size); + addChildValues_ = true; + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { + if (hasCommentForValue(value[index])) { + isMultiLine = true; + } + writeValue(value[index]); + lineLength += int(childValues_[index].length()); + } + addChildValues_ = false; + isMultiLine = isMultiLine || lineLength >= rightMargin_; + } + return isMultiLine; +} + +void StyledWriter::pushValue(const std::string& value) { + if (addChildValues_) + childValues_.push_back(value); + else + document_ += value; +} + +void StyledWriter::writeIndent() { + if (!document_.empty()) { + char last = document_[document_.length() - 1]; + if (last == ' ') // already indented + return; + if (last != '\n') // Comments may add new-line + document_ += '\n'; + } + document_ += indentString_; +} + +void StyledWriter::writeWithIndent(const std::string& value) { + writeIndent(); + document_ += value; +} + +void StyledWriter::indent() { indentString_ += std::string(indentSize_, ' '); } + +void StyledWriter::unindent() { + assert(int(indentString_.size()) >= indentSize_); + indentString_.resize(indentString_.size() - indentSize_); +} + +void StyledWriter::writeCommentBeforeValue(const Value& root) { + if (!root.hasComment(commentBefore)) + return; + + document_ += "\n"; + writeIndent(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); + while (iter != comment.end()) { + document_ += *iter; + if (*iter == '\n' && + (iter != comment.end() && *(iter + 1) == '/')) + writeIndent(); + ++iter; + } + + // Comments are stripped of trailing newlines, so add one here + document_ += "\n"; +} + +void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) { + if (root.hasComment(commentAfterOnSameLine)) + document_ += " " + root.getComment(commentAfterOnSameLine); + + if (root.hasComment(commentAfter)) { + document_ += "\n"; + document_ += root.getComment(commentAfter); + document_ += "\n"; + } +} + +bool StyledWriter::hasCommentForValue(const Value& value) { + return value.hasComment(commentBefore) || + value.hasComment(commentAfterOnSameLine) || + value.hasComment(commentAfter); +} + +// Class StyledStreamWriter +// ////////////////////////////////////////////////////////////////// + +StyledStreamWriter::StyledStreamWriter(std::string indentation) + : document_(NULL), rightMargin_(74), indentation_(indentation), + addChildValues_() {} + +void StyledStreamWriter::write(std::ostream& out, const Value& root) { + document_ = &out; + addChildValues_ = false; + indentString_ = ""; + indented_ = true; + writeCommentBeforeValue(root); + if (!indented_) writeIndent(); + indented_ = true; + writeValue(root); + writeCommentAfterValueOnSameLine(root); + *document_ << "\n"; + document_ = NULL; // Forget the stream, for safety. +} + +void StyledStreamWriter::writeValue(const Value& value) { + switch (value.type()) { + case nullValue: + pushValue("null"); + break; + case intValue: + pushValue(valueToString(value.asLargestInt())); + break; + case uintValue: + pushValue(valueToString(value.asLargestUInt())); + break; + case realValue: + pushValue(valueToString(value.asDouble())); + break; + case stringValue: + { + // Is NULL possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str))); + else pushValue(""); + break; + } + case booleanValue: + pushValue(valueToString(value.asBool())); + break; + case arrayValue: + writeArrayValue(value); + break; + case objectValue: { + Value::Members members(value.getMemberNames()); + if (members.empty()) + pushValue("{}"); + else { + writeWithIndent("{"); + indent(); + Value::Members::iterator it = members.begin(); + for (;;) { + const std::string& name = *it; + const Value& childValue = value[name]; + writeCommentBeforeValue(childValue); + writeWithIndent(valueToQuotedString(name.c_str())); + *document_ << " : "; + writeValue(childValue); + if (++it == members.end()) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *document_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("}"); + } + } break; + } +} + +void StyledStreamWriter::writeArrayValue(const Value& value) { + unsigned size = value.size(); + if (size == 0) + pushValue("[]"); + else { + bool isArrayMultiLine = isMultineArray(value); + if (isArrayMultiLine) { + writeWithIndent("["); + indent(); + bool hasChildValue = !childValues_.empty(); + unsigned index = 0; + for (;;) { + const Value& childValue = value[index]; + writeCommentBeforeValue(childValue); + if (hasChildValue) + writeWithIndent(childValues_[index]); + else { + if (!indented_) writeIndent(); + indented_ = true; + writeValue(childValue); + indented_ = false; + } + if (++index == size) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *document_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("]"); + } else // output on a single line + { + assert(childValues_.size() == size); + *document_ << "[ "; + for (unsigned index = 0; index < size; ++index) { + if (index > 0) + *document_ << ", "; + *document_ << childValues_[index]; + } + *document_ << " ]"; + } + } +} + +bool StyledStreamWriter::isMultineArray(const Value& value) { + int size = value.size(); + bool isMultiLine = size * 3 >= rightMargin_; + childValues_.clear(); + for (int index = 0; index < size && !isMultiLine; ++index) { + const Value& childValue = value[index]; + isMultiLine = ((childValue.isArray() || childValue.isObject()) && + childValue.size() > 0); + } + if (!isMultiLine) // check if line length > max line length + { + childValues_.reserve(size); + addChildValues_ = true; + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { + if (hasCommentForValue(value[index])) { + isMultiLine = true; + } + writeValue(value[index]); + lineLength += int(childValues_[index].length()); + } + addChildValues_ = false; + isMultiLine = isMultiLine || lineLength >= rightMargin_; + } + return isMultiLine; +} + +void StyledStreamWriter::pushValue(const std::string& value) { + if (addChildValues_) + childValues_.push_back(value); + else + *document_ << value; +} + +void StyledStreamWriter::writeIndent() { + // blep intended this to look at the so-far-written string + // to determine whether we are already indented, but + // with a stream we cannot do that. So we rely on some saved state. + // The caller checks indented_. + *document_ << '\n' << indentString_; +} + +void StyledStreamWriter::writeWithIndent(const std::string& value) { + if (!indented_) writeIndent(); + *document_ << value; + indented_ = false; +} + +void StyledStreamWriter::indent() { indentString_ += indentation_; } + +void StyledStreamWriter::unindent() { + assert(indentString_.size() >= indentation_.size()); + indentString_.resize(indentString_.size() - indentation_.size()); +} + +void StyledStreamWriter::writeCommentBeforeValue(const Value& root) { + if (!root.hasComment(commentBefore)) + return; + + if (!indented_) writeIndent(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); + while (iter != comment.end()) { + *document_ << *iter; + if (*iter == '\n' && + (iter != comment.end() && *(iter + 1) == '/')) + // writeIndent(); // would include newline + *document_ << indentString_; + ++iter; + } + indented_ = false; +} + +void StyledStreamWriter::writeCommentAfterValueOnSameLine(const Value& root) { + if (root.hasComment(commentAfterOnSameLine)) + *document_ << ' ' << root.getComment(commentAfterOnSameLine); + + if (root.hasComment(commentAfter)) { + writeIndent(); + *document_ << root.getComment(commentAfter); + } + indented_ = false; +} + +bool StyledStreamWriter::hasCommentForValue(const Value& value) { + return value.hasComment(commentBefore) || + value.hasComment(commentAfterOnSameLine) || + value.hasComment(commentAfter); +} + +////////////////////////// +// BuiltStyledStreamWriter + +/// Scoped enums are not available until C++11. +struct CommentStyle { + /// Decide whether to write comments. + enum Enum { + None, ///< Drop all comments. + Most, ///< Recover odd behavior of previous versions (not implemented yet). + All ///< Keep all comments. + }; +}; + +struct BuiltStyledStreamWriter : public StreamWriter +{ + BuiltStyledStreamWriter( + std::string const& indentation, + CommentStyle::Enum cs, + std::string const& colonSymbol, + std::string const& nullSymbol, + std::string const& endingLineFeedSymbol, + bool useSpecialFloats, + unsigned int precision); + int write(Value const& root, std::ostream* sout); +private: + void writeValue(Value const& value); + void writeArrayValue(Value const& value); + bool isMultineArray(Value const& value); + void pushValue(std::string const& value); + void writeIndent(); + void writeWithIndent(std::string const& value); + void indent(); + void unindent(); + void writeCommentBeforeValue(Value const& root); + void writeCommentAfterValueOnSameLine(Value const& root); + static bool hasCommentForValue(const Value& value); + + typedef std::vector ChildValues; + + ChildValues childValues_; + std::string indentString_; + int rightMargin_; + std::string indentation_; + CommentStyle::Enum cs_; + std::string colonSymbol_; + std::string nullSymbol_; + std::string endingLineFeedSymbol_; + bool addChildValues_ : 1; + bool indented_ : 1; + bool useSpecialFloats_ : 1; + unsigned int precision_; +}; +BuiltStyledStreamWriter::BuiltStyledStreamWriter( + std::string const& indentation, + CommentStyle::Enum cs, + std::string const& colonSymbol, + std::string const& nullSymbol, + std::string const& endingLineFeedSymbol, + bool useSpecialFloats, + unsigned int precision) + : rightMargin_(74) + , indentation_(indentation) + , cs_(cs) + , colonSymbol_(colonSymbol) + , nullSymbol_(nullSymbol) + , endingLineFeedSymbol_(endingLineFeedSymbol) + , addChildValues_(false) + , indented_(false) + , useSpecialFloats_(useSpecialFloats) + , precision_(precision) +{ +} +int BuiltStyledStreamWriter::write(Value const& root, std::ostream* sout) +{ + sout_ = sout; + addChildValues_ = false; + indented_ = true; + indentString_ = ""; + writeCommentBeforeValue(root); + if (!indented_) writeIndent(); + indented_ = true; + writeValue(root); + writeCommentAfterValueOnSameLine(root); + *sout_ << endingLineFeedSymbol_; + sout_ = NULL; + return 0; +} +void BuiltStyledStreamWriter::writeValue(Value const& value) { + switch (value.type()) { + case nullValue: + pushValue(nullSymbol_); + break; + case intValue: + pushValue(valueToString(value.asLargestInt())); + break; + case uintValue: + pushValue(valueToString(value.asLargestUInt())); + break; + case realValue: + pushValue(valueToString(value.asDouble(), useSpecialFloats_, precision_)); + break; + case stringValue: + { + // Is NULL is possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str))); + else pushValue(""); + break; + } + case booleanValue: + pushValue(valueToString(value.asBool())); + break; + case arrayValue: + writeArrayValue(value); + break; + case objectValue: { + Value::Members members(value.getMemberNames()); + if (members.empty()) + pushValue("{}"); + else { + writeWithIndent("{"); + indent(); + Value::Members::iterator it = members.begin(); + for (;;) { + std::string const& name = *it; + Value const& childValue = value[name]; + writeCommentBeforeValue(childValue); + writeWithIndent(valueToQuotedStringN(name.data(), static_cast(name.length()))); + *sout_ << colonSymbol_; + writeValue(childValue); + if (++it == members.end()) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *sout_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("}"); + } + } break; + } +} + +void BuiltStyledStreamWriter::writeArrayValue(Value const& value) { + unsigned size = value.size(); + if (size == 0) + pushValue("[]"); + else { + bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value); + if (isMultiLine) { + writeWithIndent("["); + indent(); + bool hasChildValue = !childValues_.empty(); + unsigned index = 0; + for (;;) { + Value const& childValue = value[index]; + writeCommentBeforeValue(childValue); + if (hasChildValue) + writeWithIndent(childValues_[index]); + else { + if (!indented_) writeIndent(); + indented_ = true; + writeValue(childValue); + indented_ = false; + } + if (++index == size) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *sout_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("]"); + } else // output on a single line + { + assert(childValues_.size() == size); + *sout_ << "["; + if (!indentation_.empty()) *sout_ << " "; + for (unsigned index = 0; index < size; ++index) { + if (index > 0) + *sout_ << ", "; + *sout_ << childValues_[index]; + } + if (!indentation_.empty()) *sout_ << " "; + *sout_ << "]"; + } + } +} + +bool BuiltStyledStreamWriter::isMultineArray(Value const& value) { + int size = value.size(); + bool isMultiLine = size * 3 >= rightMargin_; + childValues_.clear(); + for (int index = 0; index < size && !isMultiLine; ++index) { + Value const& childValue = value[index]; + isMultiLine = ((childValue.isArray() || childValue.isObject()) && + childValue.size() > 0); + } + if (!isMultiLine) // check if line length > max line length + { + childValues_.reserve(size); + addChildValues_ = true; + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { + if (hasCommentForValue(value[index])) { + isMultiLine = true; + } + writeValue(value[index]); + lineLength += int(childValues_[index].length()); + } + addChildValues_ = false; + isMultiLine = isMultiLine || lineLength >= rightMargin_; + } + return isMultiLine; +} + +void BuiltStyledStreamWriter::pushValue(std::string const& value) { + if (addChildValues_) + childValues_.push_back(value); + else + *sout_ << value; +} + +void BuiltStyledStreamWriter::writeIndent() { + // blep intended this to look at the so-far-written string + // to determine whether we are already indented, but + // with a stream we cannot do that. So we rely on some saved state. + // The caller checks indented_. + + if (!indentation_.empty()) { + // In this case, drop newlines too. + *sout_ << '\n' << indentString_; + } +} + +void BuiltStyledStreamWriter::writeWithIndent(std::string const& value) { + if (!indented_) writeIndent(); + *sout_ << value; + indented_ = false; +} + +void BuiltStyledStreamWriter::indent() { indentString_ += indentation_; } + +void BuiltStyledStreamWriter::unindent() { + assert(indentString_.size() >= indentation_.size()); + indentString_.resize(indentString_.size() - indentation_.size()); +} + +void BuiltStyledStreamWriter::writeCommentBeforeValue(Value const& root) { + if (cs_ == CommentStyle::None) return; + if (!root.hasComment(commentBefore)) + return; + + if (!indented_) writeIndent(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); + while (iter != comment.end()) { + *sout_ << *iter; + if (*iter == '\n' && + (iter != comment.end() && *(iter + 1) == '/')) + // writeIndent(); // would write extra newline + *sout_ << indentString_; + ++iter; + } + indented_ = false; +} + +void BuiltStyledStreamWriter::writeCommentAfterValueOnSameLine(Value const& root) { + if (cs_ == CommentStyle::None) return; + if (root.hasComment(commentAfterOnSameLine)) + *sout_ << " " + root.getComment(commentAfterOnSameLine); + + if (root.hasComment(commentAfter)) { + writeIndent(); + *sout_ << root.getComment(commentAfter); + } +} + +// static +bool BuiltStyledStreamWriter::hasCommentForValue(const Value& value) { + return value.hasComment(commentBefore) || + value.hasComment(commentAfterOnSameLine) || + value.hasComment(commentAfter); +} + +/////////////// +// StreamWriter + +StreamWriter::StreamWriter() + : sout_(NULL) +{ +} +StreamWriter::~StreamWriter() +{ +} +StreamWriter::Factory::~Factory() +{} +StreamWriterBuilder::StreamWriterBuilder() +{ + setDefaults(&settings_); +} +StreamWriterBuilder::~StreamWriterBuilder() +{} +StreamWriter* StreamWriterBuilder::newStreamWriter() const +{ + std::string indentation = settings_["indentation"].asString(); + std::string cs_str = settings_["commentStyle"].asString(); + bool eyc = settings_["enableYAMLCompatibility"].asBool(); + bool dnp = settings_["dropNullPlaceholders"].asBool(); + bool usf = settings_["useSpecialFloats"].asBool(); + unsigned int pre = settings_["precision"].asUInt(); + CommentStyle::Enum cs = CommentStyle::All; + if (cs_str == "All") { + cs = CommentStyle::All; + } else if (cs_str == "None") { + cs = CommentStyle::None; + } else { + throwRuntimeError("commentStyle must be 'All' or 'None'"); + } + std::string colonSymbol = " : "; + if (eyc) { + colonSymbol = ": "; + } else if (indentation.empty()) { + colonSymbol = ":"; + } + std::string nullSymbol = "null"; + if (dnp) { + nullSymbol = ""; + } + if (pre > 17) pre = 17; + std::string endingLineFeedSymbol = ""; + return new BuiltStyledStreamWriter( + indentation, cs, + colonSymbol, nullSymbol, endingLineFeedSymbol, usf, pre); +} +static void getValidWriterKeys(std::set* valid_keys) +{ + valid_keys->clear(); + valid_keys->insert("indentation"); + valid_keys->insert("commentStyle"); + valid_keys->insert("enableYAMLCompatibility"); + valid_keys->insert("dropNullPlaceholders"); + valid_keys->insert("useSpecialFloats"); + valid_keys->insert("precision"); +} +bool StreamWriterBuilder::validate(Json::Value* invalid) const +{ + Json::Value my_invalid; + if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL + Json::Value& inv = *invalid; + std::set valid_keys; + getValidWriterKeys(&valid_keys); + Value::Members keys = settings_.getMemberNames(); + size_t n = keys.size(); + for (size_t i = 0; i < n; ++i) { + std::string const& key = keys[i]; + if (valid_keys.find(key) == valid_keys.end()) { + inv[key] = settings_[key]; + } + } + return 0u == inv.size(); +} +Value& StreamWriterBuilder::operator[](std::string key) +{ + return settings_[key]; +} +// static +void StreamWriterBuilder::setDefaults(Json::Value* settings) +{ + //! [StreamWriterBuilderDefaults] + (*settings)["commentStyle"] = "All"; + (*settings)["indentation"] = "\t"; + (*settings)["enableYAMLCompatibility"] = false; + (*settings)["dropNullPlaceholders"] = false; + (*settings)["useSpecialFloats"] = false; + (*settings)["precision"] = 17; + //! [StreamWriterBuilderDefaults] +} + +std::string writeString(StreamWriter::Factory const& builder, Value const& root) { + std::ostringstream sout; + StreamWriterPtr const writer(builder.newStreamWriter()); + writer->write(root, &sout); + return sout.str(); +} + +std::ostream& operator<<(std::ostream& sout, Value const& root) { + StreamWriterBuilder builder; + StreamWriterPtr const writer(builder.newStreamWriter()); + writer->write(root, &sout); + return sout; +} + +} // namespace Json + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_writer.cpp +// ////////////////////////////////////////////////////////////////////// + + + + + diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 7fd29a36c6..bc0d8afb4c 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, Valve Corporation + * Copyright (c) 2015, 2019, 2020 Valve Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -33,6 +33,7 @@ * Windows version of Steam running. */ #include +#include #include #include @@ -46,6 +47,8 @@ #include "wine/debug.h" +#include "json/json.h" + WINE_DEFAULT_DEBUG_CHANNEL(steam); EXTERN_C HANDLE CDECL __wine_make_process_system(void); @@ -117,9 +120,321 @@ static void setup_steam_registry(void) SteamAPI_Shutdown(); } +static std::string get_linux_vr_path(void) +{ + const char *e; + + static const char *openvr_path = "/openvr/openvrpaths.vrpath"; + + e = getenv("VR_PATHREG_OVERRIDE"); + if(e && *e) + return e; + + e = getenv("XDG_CONFIG_HOME"); + if(e && *e) + return std::string(e) + openvr_path; + + e = getenv("HOME"); + if(e && *e) + return std::string(e) + "/.config" + openvr_path; + + return ""; +} + +static bool get_windows_vr_path(WCHAR *out_path, bool create) +{ + if(FAILED(SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, + NULL, 0, out_path))) + return false; + + lstrcatW(out_path, L"\\openvr"); + + if(create) + CreateDirectoryW(out_path, NULL); + + lstrcatW(out_path, L"\\openvrpaths.vrpath"); + + return true; +} + +static WCHAR *str_to_wchar(const std::string &str) +{ + DWORD sz = MultiByteToWideChar(CP_UNIXCP, 0, str.c_str(), -1, NULL, 0); + if(!sz) + return NULL; + + WCHAR *ret = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * sz); + if(!ret) + return NULL; + + sz = MultiByteToWideChar(CP_UNIXCP, 0, str.c_str(), -1, ret, sz); + if(!sz) + { + HeapFree(GetProcessHeap(), 0, ret); + return NULL; + } + + return ret; +} + +static std::string read_text_file(const WCHAR *filename) +{ + HANDLE ifile = CreateFileW(filename, GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if(ifile == INVALID_HANDLE_VALUE) + return ""; + + LARGE_INTEGER size; + + if(!GetFileSizeEx(ifile, &size)) + { + CloseHandle(ifile); + return ""; + } + + char *buf = (char *)HeapAlloc(GetProcessHeap(), 0, size.u.LowPart); + if(!buf) + { + CloseHandle(ifile); + return ""; + } + + DWORD readed; + + if(!ReadFile(ifile, buf, size.u.LowPart, &readed, NULL)) + { + HeapFree(GetProcessHeap(), 0, buf); + CloseHandle(ifile); + return ""; + } + + CloseHandle(ifile); + + DWORD outsize = 1; + for(DWORD i = 1; i < readed; ++i) + { + if(buf[i] == '\n' && buf[i - 1] == '\r') // CRLF + buf[outsize - 1] = '\n'; + else + buf[outsize++] = buf[i]; + } + + std::string ret(buf, outsize); + + HeapFree(GetProcessHeap(), 0, buf); + + return ret; +} + +static bool write_string_to_file(const WCHAR *filename, const std::string &contents) +{ + HANDLE ofile = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL); + if(ofile == INVALID_HANDLE_VALUE) + return false; + + DWORD written; + + if(!WriteFile(ofile, contents.data(), (DWORD)contents.length(), &written, NULL)) + { + CloseHandle(ofile); + return false; + } + + CloseHandle(ofile); + + return true; +} + +static bool convert_path_to_win(std::string &s) +{ + WCHAR *path = wine_get_dos_file_name(s.c_str()); + if(!path) + return false; + + DWORD sz = WideCharToMultiByte(CP_UTF8, 0, path, -1, NULL, 0, NULL, NULL); + if(!sz) + { + HeapFree(GetProcessHeap(), 0, path); + return false; + } + + char *pathUTF8 = (char *)HeapAlloc(GetProcessHeap(), 0, sz); + if(!pathUTF8) + { + HeapFree(GetProcessHeap(), 0, path); + return false; + } + + sz = WideCharToMultiByte(CP_UTF8, 0, path, -1, pathUTF8, sz, NULL, NULL); + if(!sz) + { + HeapFree(GetProcessHeap(), 0, pathUTF8); + HeapFree(GetProcessHeap(), 0, path); + return false; + } + + s = pathUTF8; + + HeapFree(GetProcessHeap(), 0, pathUTF8); + HeapFree(GetProcessHeap(), 0, path); + + return true; +} + +static void convert_json_array_paths(Json::Value &arr) +{ + for(uint32_t i = 0; i < arr.size(); ++i) + { + std::string path(arr[i].asString()); + if(convert_path_to_win(path)) + arr[i] = path; + } +} + +static void convert_environment_path(const char *nameA, const WCHAR *nameW) +{ + /* get linux-side variable */ + const char *e = getenv(nameA); + if(!e || !*e) + return; + + /* convert to win and set */ + WCHAR *path = wine_get_dos_file_name(e); + if(!path) + return; + + SetEnvironmentVariableW(nameW, path); + + HeapFree(GetProcessHeap(), 0, path); +} + +static void set_env_from_unix(const WCHAR *name, const std::string &val) +{ + WCHAR valW[MAX_PATH]; + DWORD sz; + + sz = MultiByteToWideChar(CP_UTF8, 0, val.c_str(), -1, valW, MAX_PATH); + if(!sz) + { + WINE_WARN("Invalid utf8 seq in vr runtime key\n"); + return; + } + + SetEnvironmentVariableW(name, valW); +} + +static bool convert_linux_vrpaths(void) +{ + /* read in linux vrpaths */ + std::string linux_vrpaths = get_linux_vr_path(); + if(linux_vrpaths.empty()) + { + WINE_TRACE("Couldn't get openvr vrpaths path\n"); + return false; + } + + WCHAR *linux_vrpathsW = str_to_wchar(linux_vrpaths); + if(!linux_vrpathsW) + return false; + + std::string contents = read_text_file(linux_vrpathsW); + HeapFree(GetProcessHeap(), 0, linux_vrpathsW); + if(contents.empty()) + { + WINE_TRACE("openvr vrpaths is empty\n"); + return false; + } + + Json::Value root; + Json::Reader reader; + + if(!reader.parse(contents, root)) + { + WINE_WARN("Invalid openvr vrpaths JSON\n"); + return false; + } + + /* pass original runtime path into Wine */ + if(root.isMember("runtime") && root["runtime"].isArray() && root["runtime"].size() > 0) + { + set_env_from_unix(L"PROTON_VR_RUNTIME", root["runtime"][0].asString()); + } + + /* set hard-coded paths */ + root["runtime"] = Json::Value(Json::ValueType::arrayValue); + root["runtime"][0] = "C:\\vrclient\\"; + root["runtime"][1] = "C:\\vrclient"; + + /* map linux paths into windows filesystem */ + if(root.isMember("config") && root["config"].isArray()) + convert_json_array_paths(root["config"]); + + if(root.isMember("log") && root["log"].isArray()) + convert_json_array_paths(root["log"]); + + /* external_drivers is currently unsupported in Proton */ + root["external_drivers"] = Json::Value(Json::ValueType::nullValue); + + /* write out windows vrpaths */ + SetEnvironmentVariableW(L"VR_PATHREG_OVERRIDE", NULL); + SetEnvironmentVariableW(L"VR_OVERRIDE", NULL); + convert_environment_path("VR_CONFIG_PATH", L"VR_CONFIG_PATH"); + convert_environment_path("VR_LOG_PATH", L"VR_LOG_PATH"); + Json::StyledWriter writer; + + WCHAR windows_vrpaths[MAX_PATH]; + if(!get_windows_vr_path(windows_vrpaths, true)) + return false; + + contents = writer.write(root); + + write_string_to_file(windows_vrpaths, contents); + + return true; +} + +static void setup_vrpaths(void) +{ + if(!convert_linux_vrpaths()) + { + /* delete the windows file only if the linux conversion fails */ + WCHAR windows_vrpaths[MAX_PATH]; + if(get_windows_vr_path(windows_vrpaths, false)) + { + DeleteFileW(windows_vrpaths); + } + } +} + +static WCHAR *strchrW(WCHAR *h, WCHAR n) +{ + do + { + if(*h == n) + return h; + } while (*h++); + + return NULL; +} + +int strncmpW(const WCHAR *l, const WCHAR *r, int n) +{ + if(n <= 0) + return 0; + + while(--n > 0 && *l && *l == *r){ + l++; + r++; + } + + return *l - *r; +} + static WCHAR *find_quote(WCHAR *str) { - WCHAR *end = wcschr(str, '"'), *ch; + WCHAR *end = strchrW(str, '"'), *ch; int odd; while (end) { @@ -132,7 +447,7 @@ static WCHAR *find_quote(WCHAR *str) } if (!odd) return end; - end = wcschr(end + 1, '"'); + end = strchrW(end + 1, '"'); } return NULL; } @@ -142,12 +457,46 @@ static BOOL WINAPI console_ctrl_handler(DWORD dwCtrlType) return TRUE; } -static HANDLE run_process(void) +static BOOL should_use_shell_execute(const WCHAR *cmdline) +{ + BOOL use_shell_execute = TRUE; + BOOL quoted = FALSE; + const WCHAR *executable_name_end = cmdline; + + /* find the end of the first arg...*/ + while (*executable_name_end != '\0' && + (*executable_name_end != ' ' || quoted) && + (*executable_name_end != '"' || !quoted)) + { + quoted ^= *executable_name_end == '"'; + + executable_name_end++; + } + + /* backtrack to before the end of the arg + * and check if we end in .exe or not + * and determine whether to use ShellExecute + * based on that */ + executable_name_end -= strlen(".exe"); + + if (executable_name_end >= cmdline) + { + static const WCHAR exeW[] = {'.','e','x','e',0}; + + if (!strncmpW(executable_name_end, exeW, wcslen(exeW))) + use_shell_execute = FALSE; + } + + return use_shell_execute; +} + +static HANDLE run_process(BOOL *should_await) { WCHAR *cmdline = GetCommandLineW(); STARTUPINFOW si = { sizeof(si) }; PROCESS_INFORMATION pi; - DWORD flags = 0; + DWORD flags = CREATE_UNICODE_ENVIRONMENT; + BOOL use_shell_execute = TRUE; /* skip argv[0] */ if (*cmdline == '"') @@ -157,7 +506,7 @@ static HANDLE run_process(void) } else { - cmdline = wcschr(cmdline, ' '); + cmdline = strchrW(cmdline, ' '); } if (!cmdline) { @@ -196,9 +545,9 @@ static HANDLE run_process(void) else { start = cmdline; - end = wcschr(start, ' '); + end = strchrW(start, ' '); if (!end) - end = wcschr(start, '\0'); + end = strchrW(start, '\0'); remainder = end; } @@ -231,8 +580,11 @@ static HANDLE run_process(void) CoInitialize(NULL); console = SHGetFileInfoW(dos, 0, &sfi, sizeof(sfi), SHGFI_EXETYPE); - if (console && !HIWORD(console)) - flags |= CREATE_NEW_CONSOLE; + if (console) + { + if (!HIWORD(console)) + flags |= CREATE_NEW_CONSOLE; + } new_cmdline = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, (lstrlenW(dos) + 3 + lstrlenW(remainder) + 1) * sizeof(WCHAR)); @@ -248,25 +600,51 @@ static HANDLE run_process(void) WINE_TRACE("Running command %s\n", wine_dbgstr_w(cmdline)); SetConsoleCtrlHandler( console_ctrl_handler, TRUE ); - if (!CreateProcessW(NULL, cmdline, NULL, NULL, FALSE, flags, NULL, NULL, &si, &pi)) + + use_shell_execute = should_use_shell_execute(cmdline); + + /* only await the process finishing if we launch a process directly... + * Steam simply calls ShellExecuteA with the same parameters. + * this avoids the edge case where we could ShellExecute and + * then that process ends up ShellExecuting something as a throw away */ + *should_await = !use_shell_execute; + + WINE_TRACE("Executing via %s\n", + wine_dbgstr_a(use_shell_execute ? "ShellExecuteW" : "CreateProcessW")); + + if (use_shell_execute) { - WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError()); + static const WCHAR verb[] = { 'o', 'p', 'e', 'n', 0 }; + ShellExecuteW(NULL, verb, cmdline, NULL, NULL, SW_SHOWNORMAL); + return INVALID_HANDLE_VALUE; } + else + { + if (!CreateProcessW(NULL, cmdline, NULL, NULL, FALSE, flags, NULL, NULL, &si, &pi)) + { + WINE_ERR("Failed to create process %s: %u\n", wine_dbgstr_w(cmdline), GetLastError()); + return INVALID_HANDLE_VALUE; + } - CloseHandle(pi.hThread); - return pi.hProcess; + CloseHandle(pi.hThread); + + return pi.hProcess; + } } int main(int argc, char *argv[]) { HANDLE wait_handle = INVALID_HANDLE_VALUE; + HANDLE event = INVALID_HANDLE_VALUE; WINE_TRACE("\n"); if (getenv("SteamGameId")) { /* do setup only for game process */ + event = CreateEventA(NULL, FALSE, FALSE, "Steam3Master_SharedMemLock"); + CreateThread(NULL, 0, create_steam_window, NULL, 0, NULL); set_active_process_pid(); @@ -278,19 +656,31 @@ int main(int argc, char *argv[]) if (argc > 1) { HANDLE child; + BOOL should_await; - child = run_process(); + setup_vrpaths(); - if (child == INVALID_HANDLE_VALUE) - return 1; + child = run_process(&should_await); - if (wait_handle == INVALID_HANDLE_VALUE) - wait_handle = child; - else - CloseHandle(child); + if (should_await) + { + if (child == INVALID_HANDLE_VALUE) + return 1; + + if (wait_handle == INVALID_HANDLE_VALUE) + wait_handle = child; + else + CloseHandle(child); + } + } + + if(wait_handle != INVALID_HANDLE_VALUE) + { + WaitForSingleObject(wait_handle, INFINITE); } - WaitForSingleObject(wait_handle, INFINITE); + if (event != INVALID_HANDLE_VALUE) + CloseHandle(event); return 0; } diff --git a/vkd3d b/vkd3d index f548d817e5..4e3ea62e79 160000 --- a/vkd3d +++ b/vkd3d @@ -1 +1 @@ -Subproject commit f548d817e5cbeebf0c93f1e2cb2e033c58a9b110 +Subproject commit 4e3ea62e79bd4e70e7bf8fadce325dc7f1681ee5 diff --git a/vrclient_x64/gen_wrapper.py b/vrclient_x64/gen_wrapper.py index 6ed6fc062f..27b08a6fd1 100755 --- a/vrclient_x64/gen_wrapper.py +++ b/vrclient_x64/gen_wrapper.py @@ -14,6 +14,8 @@ import re sdk_versions = [ + "v1.10.30", + "v1.9.16", "v1.8.19", "v1.7.15", "v1.6.10", @@ -71,11 +73,13 @@ "IVRChaperone", "IVRChaperoneSetup", "IVRCompositor", + "IVRControlPanel", "IVRDriverManager", "IVRExtendedDisplay", "IVRNotifications", "IVRInput", "IVRIOBuffer", + "IVRMailbox", "IVROverlay", "IVRRenderModels", "IVRResources", @@ -83,6 +87,8 @@ "IVRSettings", "IVRSystem", "IVRTrackedCamera", + "IVRHeadsetView", + "IVROverlayView", ], [ #vrclient-allocated structs "RenderModel_t", "RenderModel_TextureMap_t", @@ -185,6 +191,31 @@ "w2l_arrays": [], "return_is_size": True }, + { + "parent_name": "undoc23", + "l2w_names":[], + "l2w_lens":[], + "w2l_names": ["a"], + "w2l_arrays": [False], + "return_is_size": False + }, + { + "parent_name": "undoc27", + "l2w_names":[], + "l2w_lens":[], + "w2l_names": ["a"], + "w2l_arrays": [False], + "return_is_size": False + }, + { + "parent_name": "SetStageOverride_Async", + "l2w_names":[], + "l2w_lens":[], + "w2l_names": ["pchRenderModelPath"], + "w2l_arrays": [False], + "return_is_size": False + }, + # {#maybe? # "parent_name": "GetRenderModelOriginalPath", # "l2w_names":[pchOriginalPath], @@ -291,7 +322,7 @@ def ivrcompositor_post_present_handoff(cppname, method): return "ivrcompositor_post_present_handoff" def ivrcompositor_wait_get_poses(cppname, method): - for version in ["016", "017", "018", "019", "020", "021", "022"]: + for version in ["016", "017", "018", "019", "020", "021", "022", "024", "026"]: if version in cppname: return "ivrcompositor_wait_get_poses" return None @@ -311,6 +342,10 @@ def ivrrendermodels_load_into_texture_d3d11_async(cppname, method): assert "005" in cppname or "006" in cppname return "ivrrendermodels_load_into_texture_d3d11_async" +def ivrmailbox_undoc3(cppname, method): + assert "001" in cppname + return "ivrmailbox_undoc3" + method_overrides = [ ("IVRClientCore", "Init", ivrclientcore_init), ("IVRClientCore", "GetGenericInterface", ivrclientcore_get_generic_interface), @@ -324,6 +359,7 @@ def ivrrendermodels_load_into_texture_d3d11_async(cppname, method): ("IVRRenderModels", "LoadTextureD3D11_Async", ivrrendermodels_load_texture_d3d11_async), ("IVRRenderModels", "FreeTextureD3D11", ivrrendermodels_free_texture_d3d11), ("IVRRenderModels", "LoadIntoTextureD3D11_Async", ivrrendermodels_load_into_texture_d3d11_async), + ("IVRMailbox", "undoc3", ivrmailbox_undoc3), ] method_overrides_data = [ @@ -459,11 +495,13 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e cpp.write(" %s lin;\n" % do_lin_to_win[0]) else: cpp.write(" %s lin;\n" % do_win_to_lin[0]) - cpp.write(" %s _ret;\n" % method.result_type.spelling) + if not method.result_type.kind == clang.cindex.TypeKind.VOID: + cpp.write(" %s _ret;\n" % method.result_type.spelling) if do_wrap: cpp.write(" %s *lin;\n" % do_wrap[0]) - cpp.write(" %s _ret;\n" % method.result_type.spelling) + if not method.result_type.kind == clang.cindex.TypeKind.VOID: + cpp.write(" %s _ret;\n" % method.result_type.spelling) cfile.write(" TRACE(\"%p\\n\", _this);\n") @@ -581,11 +619,12 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e cpp.write(" if(%s)\n" % do_lin_to_win[1]) cpp.write(" struct_%s_%s_lin_to_win(&lin, %s%s);\n" % (strip_ns(do_lin_to_win[0]), display_sdkver(sdkver), do_lin_to_win[1], convert_size_param)) if do_lin_to_win or do_win_to_lin: - cpp.write(" return _ret;\n") - if do_wrap: - cpp.write(" if(_ret == 0)\n") - cpp.write(" *%s = struct_%s_%s_wrap(lin);\n" % (do_wrap[1], strip_ns(do_wrap[0]), display_sdkver(sdkver))) - cpp.write(" return _ret;\n") + if not method.result_type.kind == clang.cindex.TypeKind.VOID: + cpp.write(" return _ret;\n") + if do_wrap and not method.result_type.kind == clang.cindex.TypeKind.VOID: + cpp.write(" if(_ret == 0)\n") + cpp.write(" *%s = struct_%s_%s_wrap(lin);\n" % (do_wrap[1], strip_ns(do_wrap[0]), display_sdkver(sdkver))) + cpp.write(" return _ret;\n") cfile.write("}\n\n") cpp.write("}\n\n") diff --git a/vrclient_x64/openvr_0.9.0/openvr.h b/vrclient_x64/openvr_0.9.0/openvr.h index 1be199f9ba..f131d17076 100644 --- a/vrclient_x64/openvr_0.9.0/openvr.h +++ b/vrclient_x64/openvr_0.9.0/openvr.h @@ -951,6 +951,7 @@ static const char * const IVRCompositor_Version = "IVRCompositor_005"; namespace vr { +#if 0 class IVRControlPanel { public: @@ -1028,6 +1029,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_0.9.1/openvr.h b/vrclient_x64/openvr_0.9.1/openvr.h index 1be199f9ba..31b569b133 100644 --- a/vrclient_x64/openvr_0.9.1/openvr.h +++ b/vrclient_x64/openvr_0.9.1/openvr.h @@ -951,6 +951,7 @@ static const char * const IVRCompositor_Version = "IVRCompositor_005"; namespace vr { +#if 0 class IVRControlPanel { public: @@ -1029,6 +1030,7 @@ class IVRControlPanel static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End #endif // _OPENVR_API diff --git a/vrclient_x64/openvr_0.9.2/openvr.h b/vrclient_x64/openvr_0.9.2/openvr.h index ea5065b1f3..c4ad30f550 100644 --- a/vrclient_x64/openvr_0.9.2/openvr.h +++ b/vrclient_x64/openvr_0.9.2/openvr.h @@ -1251,6 +1251,7 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { +#if 0 class IVRControlPanel { public: @@ -1328,6 +1329,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_0.9.3/openvr.h b/vrclient_x64/openvr_0.9.3/openvr.h index 93722076e6..90aefb1103 100644 --- a/vrclient_x64/openvr_0.9.3/openvr.h +++ b/vrclient_x64/openvr_0.9.3/openvr.h @@ -1295,6 +1295,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1381,6 +1383,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.10/openvr.h b/vrclient_x64/openvr_v0.9.10/openvr.h index ce3d2afb1a..a29aed869b 100644 --- a/vrclient_x64/openvr_v0.9.10/openvr.h +++ b/vrclient_x64/openvr_v0.9.10/openvr.h @@ -1938,6 +1938,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -2032,6 +2034,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.11/openvr.h b/vrclient_x64/openvr_v0.9.11/openvr.h index 11cc9a6a30..eacbb8216c 100644 --- a/vrclient_x64/openvr_v0.9.11/openvr.h +++ b/vrclient_x64/openvr_v0.9.11/openvr.h @@ -2142,6 +2142,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -2236,6 +2238,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif } // ivrtrackedcamera.h diff --git a/vrclient_x64/openvr_v0.9.12/openvr.h b/vrclient_x64/openvr_v0.9.12/openvr.h index d3cfeb544a..531e1d1608 100644 --- a/vrclient_x64/openvr_v0.9.12/openvr.h +++ b/vrclient_x64/openvr_v0.9.12/openvr.h @@ -2280,6 +2280,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_002"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -2383,6 +2385,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif } // ivrtrackedcamera.h diff --git a/vrclient_x64/openvr_v0.9.4/openvr.h b/vrclient_x64/openvr_v0.9.4/openvr.h index 93722076e6..90aefb1103 100644 --- a/vrclient_x64/openvr_v0.9.4/openvr.h +++ b/vrclient_x64/openvr_v0.9.4/openvr.h @@ -1295,6 +1295,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1381,6 +1383,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.5/openvr.h b/vrclient_x64/openvr_v0.9.5/openvr.h index de99683172..21d78f5db0 100644 --- a/vrclient_x64/openvr_v0.9.5/openvr.h +++ b/vrclient_x64/openvr_v0.9.5/openvr.h @@ -1407,6 +1407,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1493,6 +1495,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.6/openvr.h b/vrclient_x64/openvr_v0.9.6/openvr.h index b69d202073..fe8bb4bfdb 100644 --- a/vrclient_x64/openvr_v0.9.6/openvr.h +++ b/vrclient_x64/openvr_v0.9.6/openvr.h @@ -1407,6 +1407,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1493,6 +1495,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.7/openvr.h b/vrclient_x64/openvr_v0.9.7/openvr.h index bf5d1334ae..0af8e8ea9b 100644 --- a/vrclient_x64/openvr_v0.9.7/openvr.h +++ b/vrclient_x64/openvr_v0.9.7/openvr.h @@ -1437,6 +1437,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1531,6 +1533,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.8/openvr.h b/vrclient_x64/openvr_v0.9.8/openvr.h index 3b239b9653..dbde4eab07 100644 --- a/vrclient_x64/openvr_v0.9.8/openvr.h +++ b/vrclient_x64/openvr_v0.9.8/openvr.h @@ -1581,6 +1581,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1675,6 +1677,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v0.9.9/openvr.h b/vrclient_x64/openvr_v0.9.9/openvr.h index 3c79c797ce..aa194271bb 100644 --- a/vrclient_x64/openvr_v0.9.9/openvr.h +++ b/vrclient_x64/openvr_v0.9.9/openvr.h @@ -1804,6 +1804,8 @@ static const char * const IVRRenderModels_Version = "IVRRenderModels_001"; namespace vr { + class IVRControlPanel; +#if 0 class IVRControlPanel { public: @@ -1898,6 +1900,7 @@ class IVRControlPanel }; static const char * const IVRControlPanel_Version = "IVRControlPanel_001"; +#endif }// End diff --git a/vrclient_x64/openvr_v1.10.30/ivrclientcore.h b/vrclient_x64/openvr_v1.10.30/ivrclientcore.h new file mode 100644 index 0000000000..61d557fb32 --- /dev/null +++ b/vrclient_x64/openvr_v1.10.30/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType, const char *pStartupInfo ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_003"; + + +} diff --git a/vrclient_x64/openvr_v1.10.30/openvr.h b/vrclient_x64/openvr_v1.10.30/openvr.h new file mode 100644 index 0000000000..dc13eee2eb --- /dev/null +++ b/vrclient_x64/openvr_v1.10.30/openvr.h @@ -0,0 +1,5543 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// version.h +namespace vr +{ + static const uint32_t k_nSteamVRVersionMajor = 1; + static const uint32_t k_nSteamVRVersionMinor = 10; + static const uint32_t k_nSteamVRVersionBuild = 30; +} // namespace vr + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +/** A handle for a spatial anchor. This handle is only valid during the session it was created in. +* Anchors that live beyond one session should be saved by their string descriptors. */ +typedef uint32_t SpatialAnchorHandle_t; + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is forward +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix33_t +{ + float m[3][3]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuaternionf_t +{ + float w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_Invalid = -1, // Handle has been invalidated + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure + TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets. + // this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it + TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which + // are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right + // eye texture (vr::EVREye::Eye_Right) +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, + + TrackingResult_Fallback_RotationOnly = 300, +}; + +typedef uint32_t DriverId_t; +static const uint32_t k_nDriverNone = 0xFFFFFFFF; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 64; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices + + TrackedDeviceClass_Max +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand + TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection + TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill or other locomotion device + TrackedControllerRole_Stylus = 5, // Tracked device is a stylus + TrackedControllerRole_Max = 5 +}; + + +/** Returns true if the tracked controller role is allowed to be a hand */ +inline bool IsRoleAllowedAsHand( ETrackedControllerRole eRole ) +{ + switch ( eRole ) + { + case TrackedControllerRole_Invalid: + case TrackedControllerRole_LeftHand: + case TrackedControllerRole_RightHand: + return true; + default: + return false; + } +} + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +enum EAdditionalRadioFeatures +{ + AdditionalRadioFeatures_None = 0x00000000, + AdditionalRadioFeatures_HTCLinkBox = 0x00000001, + AdditionalRadioFeatures_InternalDongle = 0x00000002, + AdditionalRadioFeatures_ExternalDongle = 0x00000004, +}; + +typedef uint64_t WebConsoleHandle_t; +#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +typedef PropertyContainerHandle_t DriverHandle_t; +static const PropertyContainerHandle_t k_ulInvalidDriverHandle = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; +static const PropertyTypeTag_t k_unErrorPropertyTag = 6; +static const PropertyTypeTag_t k_unDoublePropertyTag = 7; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; +static const PropertyTypeTag_t k_unHmdVector2PropertyTag = 24; +static const PropertyTypeTag_t k_unHmdQuadPropertyTag = 25; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; +static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; +static const PropertyTypeTag_t k_unActionPropertyTag = 32; +static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; +static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; +static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35; +static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; + +static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; +static const PropertyTypeTag_t k_unJsonPropertyTag = 41; +static const PropertyTypeTag_t k_unActiveActionSetPropertyTag = 42; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfilePath_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided + Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design + Prop_NumCameras_Int32 = 1039, + Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value + Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value + Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings + Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) + Prop_BootloaderVersion_Uint64 = 1044, + Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device + Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports + Prop_Firmware_RemindUpdate_Bool = 1047, + Prop_PeripheralApplicationVersion_Uint64 = 1048, + Prop_ManufacturerSerialNumber_String = 1049, + Prop_ComputedSerialNumber_String = 1050, + Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + Prop_DisplayMCImageNumChannels_Int32 = 2040, + Prop_DisplayMCImageData_Binary = 2041, + Prop_SecondsFromPhotonsToVblank_Float = 2042, + Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043, + Prop_DisplayDebugMode_Bool = 2044, + Prop_GraphicsAdapterLuid_Uint64 = 2045, + Prop_DriverProvidedChaperonePath_String = 2048, + Prop_ExpectedTrackingReferenceCount_Int32 = 2049, // expected number of sensors or basestations to reserve UI space for + Prop_ExpectedControllerCount_Int32 = 2050, // expected number of tracked controllers to reserve UI space for + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded + Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0 + Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion + Prop_DriverIsDrawingControllers_Bool = 2057, + Prop_DriverRequestsApplicationPause_Bool = 2058, + Prop_DriverRequestsReducedRendering_Bool = 2059, + Prop_MinimumIpdStepMeters_Float = 2060, + Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + Prop_ImuToHeadTransform_Matrix34 = 2063, + Prop_ImuFactoryGyroBias_Vector3 = 2064, + Prop_ImuFactoryGyroScale_Vector3 = 2065, + Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + // reserved 2068 + Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_AdditionalRadioFeatures_Uint64 = 2070, + Prop_CameraWhiteBalance_Vector4_Array = 2071, // Prop_NumCameras_Int32-sized array of float[4] RGBG white balance calibration data (max size is vr::k_unMaxCameras) + Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras) + Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras) + Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + Prop_HmdColumnCorrectionSettingPrefix_String = 2077, + Prop_CameraSupportsCompatibilityModes_Bool = 2078, + + Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver + Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user + Prop_DisplayColorMultLeft_Vector3 = 2082, + Prop_DisplayColorMultRight_Vector3 = 2083, + Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084, + Prop_DisplaySupportsAnalogGain_Bool = 2085, + Prop_DisplayMinAnalogGain_Float = 2086, + Prop_DisplayMaxAnalogGain_Float = 2087, + + // Prop_DashboardLayoutPathName_String = 2090, // DELETED + Prop_DashboardScale_Float = 2091, + Prop_IpdUIRangeMinMeters_Float = 2100, + Prop_IpdUIRangeMaxMeters_Float = 2101, + + // Driver requested mura correction properties + Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery + Prop_Nonce_Int32 = 4008, + + // Properties that are used for user interface like icons names + Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties. + Prop_NamedIconPathDeviceOff_String = 5001, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceSearching_String = 5002, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceReady_String = 5004, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceReadyAlert_String = 5005, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceStandbyAlert_String = 5009, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + + // Properties that are used by helpers, but are opaque to applications + Prop_DisplayHiddenArea_Binary_Start = 5100, + Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, + Prop_OverrideContainer_Uint64 = 5152, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + Prop_HasSpatialAnchorsSupport_Bool = 6007, + + // Properties that are set internally based on other information provided by drivers + Prop_ControllerType_String = 7000, + //Prop_LegacyInputProfile_String = 7001, // This is no longer used. See "legacy_binding" in the input profile instead. + Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, + + Prop_TrackedDeviceProperty_Max = 1000000, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, + TrackedProp_IPCReadFailure = 13, + TrackedProp_OutOfMemory = 14, + TrackedProp_InvalidContainer = 15, +}; + +/** Used to drive certain text in the UI when talking about the tracking system for the HMD */ +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, // base stations and lasers + HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style + HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world +}; + +typedef uint64_t VRActionHandle_t; +typedef uint64_t VRActionSetHandle_t; +typedef uint64_t VRInputValueHandle_t; + +static const VRActionHandle_t k_ulInvalidActionHandle = 0; +static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; +static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** Allows specifying pose used to render provided scene texture (if different from value returned by WaitGetPoses). */ +struct VRTextureWithPose_t : public Texture_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; // Actual pose used to render scene textures. +}; + +struct VRTextureDepthInfo_t +{ + void* handle; // See ETextureType definition above + HmdMatrix44_t mProjection; + HmdVector2_t vRange; // 0..1 +}; + +struct VRTextureWithDepth_t : public Texture_t +{ + VRTextureDepthInfo_t depth; +}; + +struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t +{ + VRTextureDepthInfo_t depth; +}; + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, + + // Set to indicate that pTexture is a pointer to a VRTextureWithPose_t. + // This flag can be combined with Submit_TextureWithDepth to pass a VRTextureWithPoseAndDepth_t. + Submit_TextureWithPose = 0x08, + + // Set to indicate that pTexture is a pointer to a VRTextureWithDepth_t. + // This flag can be combined with Submit_TextureWithPose to pass a VRTextureWithPoseAndDepth_t. + Submit_TextureWithDepth = 0x10, + + // Set to indicate a discontinuity between this and the last frame. + // This will prevent motion smoothing from attempting to extrapolate using the pair. + Submit_FrameDiscontinuty = 0x20, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. +* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + VREvent_PropertyChanged = 111, + VREvent_WirelessDisconnect = 112, + VREvent_WirelessReconnect = 113, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + // VREvent_DualAnalog_Press = 250, // No longer sent + // VREvent_DualAnalog_Unpress = 251, // No longer sent + // VREvent_DualAnalog_Touch = 252, // No longer sent + // VREvent_DualAnalog_Untouch = 253, // No longer sent + // VREvent_DualAnalog_Move = 254, // No longer sent + // VREvent_DualAnalog_ModeSwitch1 = 255, // No longer sent + // VREvent_DualAnalog_ModeSwitch2 = 256, // No longer sent + VREvent_Modal_Cancel = 257, // Sent to overlays with the + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_ScrollDiscrete = 305, // data is scroll + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + VREvent_ReloadOverlays = 308, + VREvent_ScrollSmooth = 309, // data is scroll + VREvent_LockMousePosition = 310, + VREvent_UnlockMousePosition = 311, + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + // VREvent_SceneFocusLost = 402, // data is process + // VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + // VREvent_SceneApplicationSecondaryRenderingStarted = 407, + VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process + VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_SceneApplicationStateChanged = 412, // No data; but query VRApplications()->GetSceneApplicationState(); + + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + //VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + //VREvent_DashboardGuideButtonDown = 514, // These are no longer sent + //VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + VREvent_SwitchGamepadFocus = 519, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled + VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled + VREvent_ShowUI = 528, // data is showUi + VREvent_ShowDevTools = 529, // data is showDevTools + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + //VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR + + VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, // this will never happen with the new chaperone system + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() + VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting + VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, + VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, + VREvent_DismissedWarningsSectionSettingChanged = 868, + VREvent_GpuSpeedSectionSettingChanged = 869, + + VREvent_StatusUpdate = 900, + + VREvent_WebInterface_InstallDriverCompleted = 950, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + //VREvent_ApplicationTransitionStarted = 1300, + //VREvent_ApplicationTransitionAborted = 1301, + //VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + // VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + //VREvent_Compositor_MirrorWindowShown = 1400, // DEPRECATED + //VREvent_Compositor_MirrorWindowHidden = 1401, // DEPRECATED + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + VREvent_Compositor_DisplayDisconnected = 1412, + VREvent_Compositor_DisplayReconnected = 1413, + VREvent_Compositor_HDCPError = 1414, // data is hdcpError + VREvent_Compositor_ApplicationNotResponding = 1415, + VREvent_Compositor_ApplicationResumed = 1416, + VREvent_Compositor_OutOfVideoMemory = 1417, + VREvent_Compositor_DisplayModeNotSupported = 1418, // k_pch_SteamVR_PreferredRefreshRate + VREvent_Compositor_StageOverrideReady = 1419, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + VREvent_MessageOverlayCloseRequested = 1651, + + VREvent_Input_HapticVibration = 1700, // data is hapticVibration + VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding + VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding + VREvent_Input_ActionManifestReloaded = 1703, // no data + VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest + VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate + VREvent_Input_TrackerActivated = 1706, + VREvent_Input_BindingsUpdated = 1707, + VREvent_Input_BindingSubscriptionChanged = 1708, + + VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver + VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver + + VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast + + VREvent_Monitor_ShowHeadsetView = 2000, // data is process + VREvent_Monitor_HideHeadsetView = 2001, // data is process + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) + k_EDeviceActivityLevel_Idle_Timeout = 4, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_IndexController_A = k_EButton_Grip, + k_EButton_IndexController_B = k_EButton_ApplicationMenu, + k_EButton_IndexController_JoyStick = k_EButton_Axis3, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; + uint32_t unused; + float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1] +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it). These events are sent to overlays with the VROverlayFlags_SendVRTouchpadEvents + flag set. +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; + // If the associated event was triggered by a connection loss + bool bConnectionLost; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; + uint64_t devicePath; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +struct VREvent_HapticVibration_t +{ + uint64_t containerHandle; // property container handle of the device with the haptic component + uint64_t componentHandle; // Which haptic component needs to vibrate + float fDurationSeconds; + float fFrequency; + float fAmplitude; +}; + +struct VREvent_WebConsole_t +{ + WebConsoleHandle_t webConsoleHandle; +}; + +struct VREvent_InputBindingLoad_t +{ + vr::PropertyContainerHandle_t ulAppContainer; + uint64_t pathMessage; + uint64_t pathUrl; + uint64_t pathControllerType; +}; + +struct VREvent_InputActionManifestLoad_t +{ + uint64_t pathAppKey; + uint64_t pathMessage; + uint64_t pathMessageParam; + uint64_t pathManifestPath; +}; + +struct VREvent_SpatialAnchor_t +{ + SpatialAnchorHandle_t unHandle; +}; + +struct VREvent_ProgressUpdate_t +{ + uint64_t ulApplicationPropertyContainer; + uint64_t pathDevice; + uint64_t pathInputSource; + uint64_t pathProgressAction; + uint64_t pathIcon; + float fProgress; +}; + +enum EShowUIType +{ + ShowUI_ControllerBinding = 0, + ShowUI_ManageTrackers = 1, + // ShowUI_QuickStart = 2, // Deprecated + ShowUI_Pairing = 3, + ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, + ShowUI_ManageDrivers = 7, +}; + +struct VREvent_ShowUI_t +{ + EShowUIType eType; +}; + +struct VREvent_ShowDevTools_t +{ + int32_t nBrowserIdentifier; +}; + +enum EHDCPError +{ + HDCPError_None = 0, + HDCPError_LinkLost = 1, + HDCPError_Tampered = 2, + HDCPError_DeviceRevoked = 3, + HDCPError_Unknown = 4 +}; + +struct VREvent_HDCPError_t +{ + EHDCPError eCode; +}; + +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; + VREvent_HapticVibration_t hapticVibration; + VREvent_WebConsole_t webConsole; + VREvent_InputBindingLoad_t inputBinding; + VREvent_InputActionManifestLoad_t actionManifest; + VREvent_SpatialAnchor_t spatialAnchor; + VREvent_ProgressUpdate_t progressUpdate; + VREvent_ShowUI_t showUi; + VREvent_ShowDevTools_t showDevTools; + VREvent_HDCPError_t hdcpError; + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), + VRComponentProperty_IsHighlighted = (1 << 5), +}; + + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + + +enum EVRInputError +{ + VRInputError_None = 0, + VRInputError_NameNotFound = 1, + VRInputError_WrongType = 2, + VRInputError_InvalidHandle = 3, + VRInputError_InvalidParam = 4, + VRInputError_NoSteam = 5, + VRInputError_MaxCapacityReached = 6, + VRInputError_IPCError = 7, + VRInputError_NoActiveActionSet = 8, + VRInputError_InvalidDevice = 9, + VRInputError_InvalidSkeleton = 10, + VRInputError_InvalidBoneCount = 11, + VRInputError_InvalidCompressedData = 12, + VRInputError_NoData = 13, + VRInputError_BufferTooSmall = 14, + VRInputError_MismatchedActionManifest = 15, + VRInputError_MissingSkeletonData = 16, + VRInputError_InvalidBoneIndex = 17, + VRInputError_InvalidPriority = 18, + VRInputError_PermissionDenied = 19, + VRInputError_InvalidRenderModel = 20, +}; + +enum EVRSpatialAnchorError +{ + VRSpatialAnchorError_Success = 0, + VRSpatialAnchorError_Internal = 1, + VRSpatialAnchorError_UnknownHandle = 2, + VRSpatialAnchorError_ArrayTooSmall = 3, + VRSpatialAnchorError_InvalidDescriptorChar = 4, + VRSpatialAnchorError_NotYetAvailable = 5, + VRSpatialAnchorError_NotAvailableInThisUniverse = 6, + VRSpatialAnchorError_PermanentlyUnavailable = 7, + VRSpatialAnchorError_WrongDriver = 8, + VRSpatialAnchorError_DescriptorTooLong = 9, + VRSpatialAnchorError_Unknown = 10, + VRSpatialAnchorError_NoRoomCalibration = 11, + VRSpatialAnchorError_InvalidArgument = 12, + VRSpatialAnchorError_UnknownDriver = 13, +}; + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, + VROverlayError_TextureAlreadyLocked = 31, + VROverlayError_TextureLockCapacityReached = 32, + VROverlayError_TextureNotLocked = 33, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // reserved for vrstartup + VRApplication_WebHelper = 8, // reserved for vrwebhelper + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +enum EVRSkeletalMotionRange +{ + // The range of motion of the skeleton takes into account any physical limits imposed by + // the controller itself. This will tend to be the most accurate pose compared to the user's + // actual hand pose, but might not allow a closed fist for example + VRSkeletalMotionRange_WithController = 0, + + // Retarget the range of motion provided by the input device to make the hand appear to move + // as if it was not holding a controller. eg: map "hand grasping controller" to "closed fist" + VRSkeletalMotionRange_WithoutController = 1, +}; + +enum EVRSkeletalTrackingLevel +{ + // body part location can't be directly determined by the device. Any skeletal pose provided by + // the device is estimated by assuming the position required to active buttons, triggers, joysticks, + // or other input sensors. + // E.g. Vive Controller, Gamepad + VRSkeletalTracking_Estimated = 0, + + // body part location can be measured directly but with fewer degrees of freedom than the actual body + // part. Certain body part positions may be unmeasured by the device and estimated from other input data. + // E.g. Index Controllers, gloves that only measure finger curl + VRSkeletalTracking_Partial = 1, + + // Body part location can be measured directly throughout the entire range of motion of the body part. + // E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment + VRSkeletalTracking_Full = 2, + + VRSkeletalTrackingLevel_Count, + VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1 +}; + + + +/** Holds the transform for a single bone */ +struct VRBoneTransform_t +{ + HmdVector4_t position; + HmdQuaternionf_t orientation; +}; + +/** Type used for referring to bones by their index */ +typedef int32_t BoneIndex_t; +const BoneIndex_t k_unInvalidBoneIndex = -1; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + VRInitError_Init_VRHomeNotFound = 135, + VRInitError_Init_VRHomeStartupFailed = 136, + VRInitError_Init_RebootingBusy = 137, + VRInitError_Init_FirmwareUpdateBusy = 138, + VRInitError_Init_FirmwareRecoveryBusy = 139, + VRInitError_Init_USBServiceBusy = 140, + VRInitError_Init_VRWebHelperStartupFailed = 141, + VRInitError_Init_TrackerManagerInitFailed = 142, + VRInitError_Init_AlreadyRunning = 143, + VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, + VRInitError_Init_WebServerFailed = 146, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, + // Never make error 259 because we return it from main and it would conflict with STILL_ACTIVE + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_SharedStateIsNull = 406, + VRInitError_Compositor_NotificationManagerIsNull = 407, + VRInitError_Compositor_ResourceManagerClientIsNull = 408, + VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, + VRInitError_Compositor_PropertiesInterfaceIsNull = 410, + VRInitError_Compositor_CreateFullscreenWindowFailed = 411, + VRInitError_Compositor_SettingsInterfaceIsNull = 412, + VRInitError_Compositor_FailedToShowWindow = 413, + VRInitError_Compositor_DistortInterfaceIsNull = 414, + VRInitError_Compositor_DisplayFrequencyFailure = 415, + VRInitError_Compositor_RendererInitializationFailed = 416, + VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, + VRInitError_Compositor_DXGIFactoryCreateFailed = 418, + VRInitError_Compositor_DXGIFactoryQueryFailed = 419, + VRInitError_Compositor_InvalidAdapterDesktop = 420, + VRInitError_Compositor_InvalidHmdAttachment = 421, + VRInitError_Compositor_InvalidOutputDesktop = 422, + VRInitError_Compositor_InvalidDeviceProvided = 423, + VRInitError_Compositor_D3D11RendererInitializationFailed = 424, + VRInitError_Compositor_FailedToFindDisplayMode = 425, + VRInitError_Compositor_FailedToCreateSwapChain = 426, + VRInitError_Compositor_FailedToGetBackBuffer = 427, + VRInitError_Compositor_FailedToCreateRenderTarget = 428, + VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, + VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, + VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, + VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, + VRInitError_Compositor_SelectDisplayMode = 433, + VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, + VRInitError_Compositor_NvAPISetDisplayMode = 435, + VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, + VRInitError_Compositor_InvalidHmdPropertyContainer = 437, + VRInitError_Compositor_UpdateDisplayFrequency = 438, + VRInitError_Compositor_CreateRasterizerState = 439, + VRInitError_Compositor_CreateWireframeRasterizerState = 440, + VRInitError_Compositor_CreateSamplerState = 441, + VRInitError_Compositor_CreateClampToBorderSamplerState = 442, + VRInitError_Compositor_CreateAnisoSamplerState = 443, + VRInitError_Compositor_CreateOverlaySamplerState = 444, + VRInitError_Compositor_CreatePanoramaSamplerState = 445, + VRInitError_Compositor_CreateFontSamplerState = 446, + VRInitError_Compositor_CreateNoBlendState = 447, + VRInitError_Compositor_CreateBlendState = 448, + VRInitError_Compositor_CreateAlphaBlendState = 449, + VRInitError_Compositor_CreateBlendStateMaskR = 450, + VRInitError_Compositor_CreateBlendStateMaskG = 451, + VRInitError_Compositor_CreateBlendStateMaskB = 452, + VRInitError_Compositor_CreateDepthStencilState = 453, + VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, + VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, + VRInitError_Compositor_CreateFlushTexture = 456, + VRInitError_Compositor_CreateDistortionSurfaces = 457, + VRInitError_Compositor_CreateConstantBuffer = 458, + VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, + VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, + VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, + VRInitError_Compositor_CreateOverlayConstantBuffer = 462, + VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, + VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, + VRInitError_Compositor_CreateGeomConstantBuffer = 469, + VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, + VRInitError_Compositor_CreatePixelSimUBO = 471, + VRInitError_Compositor_CreateMSAARenderTextures = 472, + VRInitError_Compositor_CreateResolveRenderTextures = 473, + VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, + VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, + VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, + VRInitError_Compositor_CreateFallbackSyncTexture = 477, + VRInitError_Compositor_ShareFallbackSyncTexture = 478, + VRInitError_Compositor_CreateOverlayIndexBuffer = 479, + VRInitError_Compositor_CreateOverlayVertexBuffer = 480, + VRInitError_Compositor_CreateTextVertexBuffer = 481, + VRInitError_Compositor_CreateTextIndexBuffer = 482, + VRInitError_Compositor_CreateMirrorTextures = 483, + VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + VRInitError_Compositor_DisplayModeNotSupported = 487, + VRInitError_Compositor_CreateOverlayInvalidCall = 488, + VRInitError_Compositor_CreateOverlayAlreadyInitialized = 489, + VRInitError_Compositor_FailedToCreateMailbox = 490, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + + // Strictly a placeholder + VRInitError_LastError +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameLayout +{ + EVRTrackedCameraFrameLayout_Mono = 0x0001, + EVRTrackedCameraFrameLayout_Stereo = 0x0002, + EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right) + EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +enum EVRDistortionFunctionType +{ + VRDistortionFunctionType_None, + VRDistortionFunctionType_FTheta, + VRDistortionFunctionType_Extended_FTheta, + MAX_DISTORTION_FUNCTION_TYPES, +}; + +static const uint32_t k_unMaxDistortionFunctionParameters = 8; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t trackedDevicePose; + + uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +/** Compositor frame timing reprojection flags. */ +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; +}; + +/** Provides compositor benchmark results to the app */ +struct Compositor_BenchmarkResults +{ + float m_flMegaPixelsPerSecond; // Measurement of GPU MP/s performed by compositor benchmark + float m_flHmdRecommendedMegaPixelsPerSecond; // Recommended default MP/s given the HMD resolution, refresh, and panel mask. +}; + +/** Frame timing data provided by direct mode drivers. */ +struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( DriverDirectMode_FrameTiming ) + uint32_t m_nNumFramePresents; // number of times frame was presented + uint32_t m_nNumMisPresented; // number of times frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out (i.e. compositor missed vsync) + uint32_t m_nReprojectionFlags; +}; + +/** These flags will be set on DriverDirectMode_FrameTiming::m_nReprojectionFlags when IVRDriverDirectModeComponent::GetFrameTiming is called for drivers to optionally respond to. */ +const uint32_t VRCompositor_ReprojectionMotion_Enabled = 0x100; // Motion Smoothing is enabled in the UI for the currently running application +const uint32_t VRCompositor_ReprojectionMotion_ForcedOn = 0x200; // Motion Smoothing is forced on in the UI for the currently running application +const uint32_t VRCompositor_ReprojectionMotion_AppThrottled = 0x400; // Application is requesting throttling via ForceInterleavedReprojectionOn + + +enum EVSync +{ + VSync_None, + VSync_WaitRender, // block following render work until vsync + VSync_NoWaitRender, // do not block following render work (allow to get started early) +}; + +enum EVRMuraCorrectionMode +{ + EVRMuraCorrectionMode_Default = 0, + EVRMuraCorrectionMode_NoCorrection +}; + +/** raw IMU data provided by IVRIOBuffer from paths to tracked devices with IMUs */ +enum Imu_OffScaleFlags +{ + OffScale_AccelX = 0x01, + OffScale_AccelY = 0x02, + OffScale_AccelZ = 0x04, + OffScale_GyroX = 0x08, + OffScale_GyroY = 0x10, + OffScale_GyroZ = 0x20, +}; + +struct ImuSample_t +{ + double fSampleTime; + HmdVector3d_t vAccel; + HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + + #if !defined(OPENVR_BUILD_STATIC) + #ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __declspec( dllexport ) + #else + #define VR_INTERFACE extern "C" __declspec( dllimport ) + #endif + #else + #define VR_INTERFACE extern "C" + #endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else + #define VR_INTERFACE extern "C" +#endif + +#else + #error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) + #define VR_CALLTYPE __cdecl +#else + #define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * and swap chain in DX10 and DX11. If an error occurs the index will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + /** + * Returns platform- and texture-type specific adapter identification so that applications and the + * compositor are creating textures and swap chains on the same GPU. If an error occurs the device + * will be set to 0. + * pInstance is an optional parameter that is required only when textureType is TextureType_Vulkan. + * [D3D10/11/12 Only (D3D9 Not Supported)] + * Returns the adapter LUID that identifies the GPU attached to the HMD. The user should + * enumerate all adapters using IDXGIFactory::EnumAdapters and IDXGIAdapter::GetDesc to find + * the adapter with the matching LUID, or use IDXGIFactory4::EnumAdapterByLuid. + * The discovered IDXGIAdapter should be used to create the device and swap chain. + * [Vulkan Only] + * Returns the VkPhysicalDevice that should be used by the application. + * pInstance must be the instance the application will use to query for the VkPhysicalDevice. The application + * must create the VkInstance with extensions returned by IVRCompositor::GetVulkanInstanceExtensionsRequired enabled. + * [macOS Only] + * For TextureType_IOSurface returns the id that should be used by the application. + * On 10.13+ for TextureType_OpenGL returns the 'registryId' of the renderer which should be used + * by the application. See Apple Technical Q&A QA1168 for information on enumerating GL Renderers, and the + * new kCGLRPRegistryIDLow and kCGLRPRegistryIDHigh CGLRendererProperty values in the 10.13 SDK. + * Pre 10.13 for TextureType_OpenGL returns 0, as there is no dependable way to correlate the HMDs MTLDevice + * with a GL Renderer. + */ + virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType, VkInstance_T *pInstance = nullptr ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. This function is deprecated in favor of the new IVRInput system. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. This function is deprecated in favor of the new IVRInput system. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an array of one type of property. If the device index is not valid or the property is not a single value or an array of the specified type, + * this function will return 0. Otherwise it returns the number of bytes necessary to hold the array of properties. If unBufferSize is + * greater than the returned size and pBuffer is non-NULL, pBuffer is filled with the contents of array of properties. */ + virtual uint32_t GetArrayTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, PropertyTypeTag_t propType, void *pBuffer, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. This function is deprecated in favor of the new IVRInput system. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. This function is deprecated in favor of the new IVRInput system. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. This function is deprecated in favor of the new IVRInput system. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value. This function is deprecated in favor of the new IVRInput system. */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value. This function is deprecated in favor of the new IVRInput system. */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Returns true if this application is receiving input from the system. This would return false if + * system-related functionality is consuming the input stream. */ + virtual bool IsInputAvailable() = 0; + + /** Returns true SteamVR is drawing controllers on top of the application. Applications should consider + * not drawing anything attached to the user's hands in this case. */ + virtual bool IsSteamVRDrawingControllers() = 0; + + /** Returns true if the user has put SteamVR into a mode that is distracting them from the application. + * For applications where this is appropriate, the application should pause ongoing activity. */ + virtual bool ShouldApplicationPause() = 0; + + /** Returns true if SteamVR is doing significant rendering work and the game should do what it can to reduce + * its own workload. One common way to do this is to reduce the size of the render target provided for each eye. */ + virtual bool ShouldApplicationReduceRenderingWork() = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + // ------------------------------------- + // App container sandbox methods + // ------------------------------------- + + /** Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application + * must have read access to when running inside of an app container. Returns the number of bytes + * needed to hold the list. */ + virtual uint32_t GetAppContainerFilePaths( VR_OUT_STRING() char *pchBuffer, uint32_t unBufferSize ) = 0; + + // ------------------------------------- + // System methods + // ------------------------------------- + + /** Returns the current version of the SteamVR runtime. The returned string will remain valid until VR_Shutdown is called. + * + * NOTE: Is it not appropriate to use this version to test for the presence of any SteamVR feature. Only use this version + * number for logging or showing to a user, and not to try to detect anything at runtime. When appropriate, feature-specific + * presence information is provided by other APIs. */ + virtual const char *GetRuntimeVersion() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_021"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + VRApplicationError_SteamVRIsExiting = 115, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + VRApplicationProperty_ActionManifestURL_String = 54, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + VRApplicationProperty_IsHidden_Bool = 65, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + enum EVRSceneApplicationState + { + EVRSceneApplicationState_None = 0, // Scene Application is not running + EVRSceneApplicationState_Starting = 1, // Scene Application is starting + EVRSceneApplicationState_Quitting = 2, // Scene Application is quitting + EVRSceneApplicationState_Running = 3, // Scene Application is running, and submitting frames, a custom skybox, or a visible overlay + EVRSceneApplicationState_Waiting = 4, // Scene Application is running, but not drawing anything + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, VR_OUT_STRING() char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, VR_OUT_STRING() char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, VR_OUT_STRING() char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRSceneApplicationState GetSceneApplicationState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetSceneApplicationStateNameFromEnum( EVRSceneApplicationState state ) = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_007"; + +} // namespace vr + +// ivrsettings.h +#include + +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_003"; + + class CVRSettingHelper + { + IVRSettings *m_pSettings; + public: + CVRSettingHelper( IVRSettings *pSettings ) + { + m_pSettings = pSettings; + } + + const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) + { + return m_pSettings->GetSettingsErrorNameFromEnum( eError ); + } + + void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError ); + } + + void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetInt32( pchSection, pchSettingsKey, nValue, peError ); + } + void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetFloat( pchSection, pchSettingsKey, flValue, peError ); + } + void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); + } + void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); + } + + bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetBool( pchSection, pchSettingsKey, peError ); + } + int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetInt32( pchSection, pchSettingsKey, peError ); + } + float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetFloat( pchSection, pchSettingsKey, peError ); + } + void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) + { + m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); + } + std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) + { + char buf[4096]; + vr::EVRSettingsError eError; + m_pSettings->GetString( sSection.c_str(), sSettingsKey.c_str(), buf, sizeof( buf ), &eError ); + if ( peError ) + *peError = eError; + if ( eError == vr::VRSettingsError_None ) + return buf; + else + return ""; + } + + void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveSection( pchSection, peError ); + } + void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveKeyInSection( pchSection, pchSettingsKey, peError ); + } + }; + + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; + static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; + static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; + static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; + static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; + static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; + static const char * const k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; + static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; + static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; + static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; + static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; + static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; + static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; + static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; + static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + static const char * const k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; + static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; + static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; + static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; + static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; + static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; + static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; + static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; + static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; + static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; + static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; + static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; + static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; + static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; + static const char * const k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority"; + static const char * const k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2"; + + //----------------------------------------------------------------------------- + // direct mode keys + static const char * const k_pch_DirectMode_Section = "direct_mode"; + static const char * const k_pch_DirectMode_Enable_Bool = "enable"; + static const char * const k_pch_DirectMode_Count_Int32 = "count"; + static const char * const k_pch_DirectMode_EdidVid_Int32 = "edidVid"; + static const char * const k_pch_DirectMode_EdidPid_Int32 = "edidPid"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; + static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + static const char * const k_pch_Perf_TestData_Float = "perfTestData"; + static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + static const char * const k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + static const char * const k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; + static const char * const k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; + static const char * const k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; + static const char * const k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; + static const char * const k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; + static const char * const k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; + static const char * const k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; + static const char * const k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; + static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; + static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; + static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings"; + static const char * const k_pch_Dashboard_Position = "position"; + static const char * const k_pch_Dashboard_DesktopScale = "desktopScale"; + static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; + + //----------------------------------------------------------------------------- + // web interface keys + static const char* const k_pch_WebInterface_Section = "WebInterface"; + + //----------------------------------------------------------------------------- + // vrwebhelper keys + static const char* const k_pch_VRWebHelper_Section = "VRWebHelper"; + static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; + static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; + + //----------------------------------------------------------------------------- + // tracking overrides - keys are device paths, values are the device paths their + // tracking/pose information overrides + static const char* const k_pch_TrackingOverride_Section = "TrackingOverrides"; + + //----------------------------------------------------------------------------- + // per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type + static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + static const char* const k_pch_App_BindingLegacyAPISuffix_String = "_legacy"; + static const char* const k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput"; + static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL"; + static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + static const char* const k_pch_App_DominantHand_Int32 = "DominantHand"; + + //----------------------------------------------------------------------------- + // configuration for trackers + static const char * const k_pch_Trackers_Section = "trackers"; + + //----------------------------------------------------------------------------- + // configuration for desktop UI windows + static const char * const k_pch_DesktopUI_Section = "DesktopUI"; + + //----------------------------------------------------------------------------- + // Last known keys for righting recovery + static const char * const k_pch_LastKnown_Section = "LastKnown"; + static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; + static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + + //----------------------------------------------------------------------------- + // Dismissed warnings + static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + + //----------------------------------------------------------------------------- + // Input Settings + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; + static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; + + //----------------------------------------------------------------------------- + // Log of GPU performance + static const char * const k_pch_GpuSpeed_Section = "GpuSpeed"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingPerimeter( VR_ARRAY_COUNT( unPointCount ) HmdVector2_t *pPointBuffer, uint32_t unPointCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; + + /** Shows the chaperone data in the working set to preview in the compositor.*/ + virtual void ShowWorkingSetPreview() = 0; + + /** Hides the chaperone data in the working set to preview in the compositor (if it was visible).*/ + virtual void HideWorkingSetPreview() = 0; + + /** Fire an event that the tracking system can use to know room setup is about to begin. This lets the tracking + * system make any last minute adjustments that should be incorporated into the new setup. If the user is adjusting + * live in HMD using a tweak tool, keep in mind that calling this might cause the user to see the room jump. */ + virtual void RoomSetupStarting() = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, + VRCompositorError_InvalidBounds = 109, + VRCompositorError_AlreadySet = 110, +}; + +/** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */ +enum EVRCompositorTimingMode +{ + VRCompositorTimingMode_Implicit = 0, + VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1, + VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +struct Compositor_StageRenderSettings +{ + /** Primary color is applied as a tint to (i.e. multiplied with) the model's texture */ + HmdColor_t m_PrimaryColor; + HmdColor_t m_SecondaryColor; + + /** Vignette radius is in meters and is used to fade to the specified secondary solid color over + * that 3D distance from the origin of the playspace. */ + float m_flVignetteInnerRadius; + float m_flVignetteOuterRadius; + + /** Fades to the secondary color based on view incidence. This variable controls the linearity + * of the effect. It is mutually exclusive with vignette. Additionally, it treats the mesh as faceted. */ + float m_flFresnelStrength; + + /** Controls backface culling. */ + bool m_bBackfaceCulling; + + /** Converts the render model's texture to luma and applies to rgb equally. This is useful to + * combat compression artifacts that can occur on desaturated source material. */ + bool m_bGreyscale; + + /** Renders mesh as a wireframe. */ + bool m_bWireframe; +}; + +static inline Compositor_StageRenderSettings DefaultStageRenderSettings() +{ + Compositor_StageRenderSettings settings; + settings.m_PrimaryColor.r = 1.0f; + settings.m_PrimaryColor.g = 1.0f; + settings.m_PrimaryColor.b = 1.0f; + settings.m_PrimaryColor.a = 1.0f; + settings.m_SecondaryColor.r = 1.0f; + settings.m_SecondaryColor.g = 1.0f; + settings.m_SecondaryColor.b = 1.0f; + settings.m_SecondaryColor.a = 1.0f; + settings.m_flVignetteInnerRadius = 0.0f; + settings.m_flVignetteOuterRadius = 0.0f; + settings.m_flFresnelStrength = 0.0f; + settings.m_bBackfaceCulling = false; + settings.m_bGreyscale = false; + settings.m_bWireframe = false; + return settings; +} + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( VR_ARRAY_COUNT( nFrames ) Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** DEPRECATED: Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user + * sees in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** DEPRECATED: Closes the headset view, either as a window or docked widget. */ + virtual void HideMirrorWindow() = 0; + + /** DEPRECATED: Returns true if the headset view (either as a window or docked widget) is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [ Vulkan/D3D12 Only ] + * There are two purposes for SetExplicitTimingMode: + * 1. To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications. + * 2. (Optional) To avoid having WaitGetPoses access the Vulkan queue so that the queue can be accessed from + * another thread while WaitGetPoses is executing. + * + * More accurate GPU timestamp for the start of the frame is achieved by the application calling + * SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue. + * This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11, + * WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the + * application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for + * Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame. + * + * Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, + * the application should set the timing mode to Explicit_ApplicationPerformsPostPresentHandoff and *MUST* call PostPresentHandoff + * itself. If these conditions are met, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff + * and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another + * thread. */ + virtual void SetExplicitTimingMode( EVRCompositorTimingMode eTimingMode ) = 0; + + /** [ Vulkan/D3D12 Only ] + * Submit explicit timing data. When SetExplicitTimingMode is true, this must be called immediately before + * the application's first vkQueueSubmit (Vulkan) or ID3D12CommandQueue::ExecuteCommandLists (D3D12) of each frame. + * This function will insert a GPU timestamp write just before the application starts its rendering. This function + * will perform a vkQueueSubmit on Vulkan so must not be done simultaneously with VkQueue operations on another thread. + * Returns VRCompositorError_RequestFailed if SetExplicitTimingMode is not enabled. */ + virtual EVRCompositorError SubmitExplicitTimingData() = 0; + + /** Indicates whether or not motion smoothing is enabled by the user settings. + * If you want to know if motion smoothing actually triggered due to a late frame, check Compositor_FrameTiming + * m_nReprojectionFlags & VRCompositor_ReprojectionMotion instead. */ + virtual bool IsMotionSmoothingEnabled() = 0; + + /** Indicates whether or not motion smoothing is supported by the current hardware. */ + virtual bool IsMotionSmoothingSupported() = 0; + + /** Indicates whether or not the current scene focus app is currently loading. This is inferred from its use of FadeGrid to + * explicitly fade to the compositor to cover up the fact that it cannot render at a sustained full framerate during this time. */ + virtual bool IsCurrentSceneFocusAppLoading() = 0; + + /** Override the stage model used in the compositor to replace the grid. RenderModelPath is a full path the an OBJ file to load. + * This file will be loaded asynchronously from disk and uploaded to the gpu by the runtime. Once ready for rendering, the + * VREvent StageOverrideReady will be sent. Use FadeToGrid to reveal. Call ClearStageOverride to free the associated resources when finished. */ + virtual EVRCompositorError SetStageOverride_Async( const char *pchRenderModelPath, const HmdMatrix34_t *pTransform = 0, + const Compositor_StageRenderSettings *pRenderSettings = 0, uint32_t nSizeOfRenderSettings = 0 ) = 0; + + /** Resets the stage to its default user specified setting. */ + virtual void ClearStageOverride() = 0; + + /** Returns true if pBenchmarkResults is filled it. Sets pBenchmarkResults with the result of the compositor benchmark. + * nSizeOfBenchmarkResults should be set to sizeof(Compositor_BenchmarkResults) */ + virtual bool GetCompositorBenchmarkResults( Compositor_BenchmarkResults *pBenchmarkResults, uint32_t nSizeOfBenchmarkResults ) = 0; + + /** Returns the frame id associated with the poses last returned by WaitGetPoses. Deltas between IDs correspond to number of headset vsync intervals. */ + virtual EVRCompositorError GetLastPosePredictionIDs( uint32_t *pRenderPosePredictionID, uint32_t *pGamePosePredictionID ) = 0; + + /** Get the most up-to-date predicted (or recorded - up to 100ms old) set of poses for a given frame id. */ + virtual EVRCompositorError GetPosesForFrame( uint32_t unPosePredictionID, VR_ARRAY_COUNT( unPoseArrayCount ) TrackedDevicePose_t* pPoseArray, uint32_t unPoseArrayCount ) = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_026"; + +} // namespace vr + + + +// ivrheadsetview.h +namespace vr +{ + enum HeadsetViewMode_t + { + HeadsetViewMode_Left = 0, + HeadsetViewMode_Right, + HeadsetViewMode_Both + }; + + class IVRHeadsetView + { + public: + /** Sets the resolution in pixels to render the headset view. These values are clamped to k_unHeadsetViewMaxWidth + * and k_unHeadsetViewMaxHeight respectively. For cropped views, the rendered output will be fit to aspect ratio + * defined by the the specified dimensions. For uncropped views, the caller should use GetHeadsetViewAspectRation + * to adjust the requested render size to avoid squashing or stretching, and then apply letterboxing to compensate + * when displaying the results. */ + virtual void SetHeadsetViewSize( uint32_t nWidth, uint32_t nHeight ) = 0; + + /** Gets the current resolution used to render the headset view. */ + virtual void GetHeadsetViewSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Set the mode used to render the headset view. */ + virtual void SetHeadsetViewMode( HeadsetViewMode_t eHeadsetViewMode ) = 0; + + /** Get the current mode used to render the headset view. */ + virtual HeadsetViewMode_t GetHeadsetViewMode() = 0; + + /** Set whether or not the headset view should be rendered cropped to hide the hidden area mesh or not. */ + virtual void SetHeadsetViewCropped( bool bCropped ) = 0; + + /** Get the current cropping status of the headset view. */ + virtual bool GetHeadsetViewCropped() = 0; + + /** Get the aspect ratio (width:height) of the uncropped headset view (accounting for the current set mode). */ + virtual float GetHeadsetViewAspectRatio() = 0; + + /** Set the range [0..1] that the headset view blends across the stereo overlapped area in cropped both mode. */ + virtual void SetHeadsetViewBlendRange( float flStartPct, float flEndPct ) = 0; + + /** Get the current range [0..1] that the headset view blends across the stereo overlapped area in cropped both mode. */ + virtual void GetHeadsetViewBlendRange( float *pStartPct, float *pEndPct ) = 0; + }; + + static const uint32_t k_unHeadsetViewMaxWidth = 3840; + static const uint32_t k_unHeadsetViewMaxHeight = 2160; + static const char * const k_pchHeadsetViewOverlayKey = "system.HeadsetView"; + + static const char * const IVRHeadsetView_Version = "IVRHeadsetView_001"; + + /** Returns the current IVRHeadsetView pointer or NULL the interface could not be found. */ + VR_INTERFACE vr::IVRHeadsetView *VR_CALLTYPE VRHeadsetView(); + +} // namespace vr + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + } + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 128; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + // VROverlayInputMethod_DualAnalog = 2, // No longer supported + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Invalid = -1, + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + VROverlayTransform_Cursor = 4, + VROverlayTransform_DashboardTab = 5, + VROverlayTransform_DashboardThumb = 6, + VROverlayTransform_Mountable = 7, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 1 << 3, + + // When this is set the overlay will receive VREvent_ScrollDiscrete events like a mouse wheel. + // Requires mouse input mode. + VROverlayFlags_SendVRDiscreteScrollEvents = 1 << 6, + + // Indicates that the overlay would like to receive + VROverlayFlags_SendVRTouchpadEvents = 1 << 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 1 << 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 1 << 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 1 << 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 1 << 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 1 << 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 1 << 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 1 << 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 1 << 15, + + // If this is set and the overlay's input method is not none, the system-wide laser mouse + // mode will be activated whenever this overlay is visible. + VROverlayFlags_MakeOverlaysInteractiveIfVisible = 1 << 16, + + // If this is set the overlay will receive smooth VREvent_ScrollSmooth that emulate trackpad scrolling. + // Requires mouse input mode. + VROverlayFlags_SendVRSmoothScrollEvents = 1 << 17, + + // If this is set, the overlay texture will be protected content, preventing unauthorized reads. + VROverlayFlags_ProtectedContent = 1 << 18, + + // If this is set, the laser mouse splat will not be drawn over this overlay. The overlay will + // be responsible for drawing its own "cursor". + VROverlayFlags_HideLaserIntersection = 1 << 19, + + // If this is set, clicking away from the overlay will cause it to receive a VREvent_Modal_Cancel event. + // This is ignored for dashboard overlays. + VROverlayFlags_WantsModalBehavior = 1 << 20, + + // If this is set, alpha composition assumes the texture is pre-multiplied + VROverlayFlags_IsPremultiplied = 1 << 21, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + enum EKeyboardFlags + { + KeyboardFlag_Minimal = 1 << 0, // makes the keyboard send key events immediately instead of accumulating a buffer + KeyboardFlag_Modal = 2 << 0, // makes the keyboard take all focus and dismiss when clicking off the panel + }; + + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Gets all the flags for a given overlay */ + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Use to draw overlay as a curved surface. Curvature is a percentage from (0..1] where 1 is a fully closed cylinder. + * For a specific radius, curvature can be computed as: overlay.width / (2 PI r). */ + virtual EVROverlayError SetOverlayCurvature( VROverlayHandle_t ulOverlayHandle, float fCurvature ) = 0; + + /** Returns the curvature of the overlay as a percentage from (0..1] where 1 is a fully closed cylinder. */ + virtual EVROverlayError GetOverlayCurvature( VROverlayHandle_t ulOverlayHandle, float *pfCurvature ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, VR_OUT_STRING() char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the hotspot for the specified overlay when that overlay is used as a cursor. These are in texture space with 0,0 in the upper left corner of + * the texture and 1,1 in the lower right corner of the texture. */ + virtual EVROverlayError SetOverlayTransformCursor( VROverlayHandle_t ulCursorOverlayHandle, const HmdVector2_t *pvHotspot ) = 0; + + /** Gets cursor hotspot/transform for the specified overlay */ + virtual vr::EVROverlayError GetOverlayTransformCursor( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvHotspot ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + /** Triggers a haptic event on the laser mouse controller for the specified overlay */ + virtual EVROverlayError TriggerLaserMouseHapticVibration( VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude ) = 0; + + /** Sets the cursor to use for the specified overlay. This will be drawn instead of the generic blob when the laser mouse is pointed at the specified overlay */ + virtual EVROverlayError SetOverlayCursor( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle ) = 0; + + /** Sets the override cursor position to use for this overlay in overlay mouse coordinates. This position will be used to draw the cursor + * instead of whatever the laser mouse cursor position is. */ + virtual EVROverlayError SetOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvCursor ) = 0; + + /** Clears the override cursor position for this overlay */ + virtual EVROverlayError ClearOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input. In most cases, you should pass KeyboardFlag_Modal to enable modal overlay + * behavior on the keyboard itself. See EKeyboardFlags for more. */ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, + const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, uint64_t uUserValue ) = 0; + + /** Show the virtual keyboard to accept input for an overlay. In most cases, you should pass KeyboardFlag_Modal to enable modal + * overlay behavior on the keyboard itself. See EKeyboardFlags for more. */ + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, + EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char *pchDescription, uint32_t unCharMax, + const char *pchExistingText, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + + /** If the calling process owns the overlay and it's open, this will close it. **/ + virtual void CloseMessageOverlay() = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_024"; + +} // namespace vr + +// ivroverlayview.h +namespace vr +{ + struct VROverlayView_t + { + VROverlayHandle_t overlayHandle; + Texture_t texture; + VRTextureBounds_t textureBounds; + }; + + enum EDeviceType + { + DeviceType_Invalid = -1, // Invalid handle + DeviceType_DirectX11 = 0, // Handle is an ID3D11Device + DeviceType_Vulkan = 1, // Handle is a pointer to a VRVulkanDevice_t structure + }; + + struct VRVulkanDevice_t + { + VkInstance_T *m_pInstance; + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkQueue_T *m_pQueue; + uint32_t m_uQueueFamilyIndex; + }; + + struct VRNativeDevice_t + { + void *handle; // See EDeviceType definition above + EDeviceType eType; + }; + + class IVROverlayView + { + public: + /** Acquire an OverlayView_t from an overlay handle + * + * The overlay view can be used to sample the contents directly by a native API. The + * contents of the OverlayView_t will remain unchanged through the lifetime of the + * OverlayView_t. + * + * The caller acquires read privileges over the OverlayView_t, but should not + * write to it. + * + * AcquireOverlayView() may be called on the same ulOverlayHandle multiple times to + * refresh the image contents. In this case the caller is strongly encouraged to re-use + * the same pOverlayView for all re-acquisition calls. + * + * If the producer has not yet queued an image, AcquireOverlayView will return success, + * and the Texture_t will have the expected ETextureType. However, the Texture_t->handle + * will be nullptr. Once the producer generates the first overlay frame, Texture_t->handle + * will become a valid handle. + */ + virtual EVROverlayError AcquireOverlayView(VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t *pNativeDevice, VROverlayView_t *pOverlayView, uint32_t unOverlayViewSize ) = 0; + + /** Release an acquired OverlayView_t + * + * Denotes that pOverlayView will no longer require access to the resources it acquired in + * all previous calls to AcquireOverlayView(). + * + * All OverlayView_t*'s provided to AcquireOverlayView() as pOverlayViews must be + * passed into ReleaseOverlayView() in order for the underlying GPU resources to be freed. + */ + virtual EVROverlayError ReleaseOverlayView(VROverlayView_t *pOverlayView) = 0; + + /** Posts an overlay event */ + virtual void PostOverlayEvent(VROverlayHandle_t ulOverlayHandle, const VREvent_t *pvrEvent) = 0; + + /** Determines whether this process is permitted to view an overlay's content. */ + virtual bool IsViewingPermitted( VROverlayHandle_t ulOverlayHandle ) = 0; + + }; + + static const char * const IVROverlayView_Version = "IVROverlayView_003"; + +} + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentStateForDevicePath( const char *pchRenderModelName, const char *pchComponentName, vr::VRInputValueHandle_t devicePath, const vr::RenderModel_ControllerMode_State_t *pState, vr::RenderModel_ComponentState_t *pComponentState ) = 0; + + /** This version of GetComponentState takes a controller state block instead of an action origin. This function is deprecated. You should use the new input system and GetComponentStateForDevicePath instead. */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_006"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; + virtual void SetCameraTrackingSpace( vr::ETrackingUniverseOrigin eUniverse ) = 0; + virtual vr::ETrackingUniverseOrigin GetCameraTrackingSpace( ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_006"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // namespace vr + + + +// ivrresources.h +namespace vr +{ + +class IVRResources +{ +public: + + // ------------------------------------ + // Shared Resource Methods + // ------------------------------------ + + /** Loads the specified resource into the provided buffer if large enough. + * Returns the size in bytes of the buffer required to hold the specified resource. */ + virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Provides the full path to the specified resource. Resource names can include named directories for + * drivers and other things, and this resolves all of those and returns the actual physical path. + * pchResourceTypeDirectory is the subdirectory of resources to look in. */ + virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferLen ) = 0; +}; + +static const char * const IVRResources_Version = "IVRResources_001"; + + +} +// ivrdrivermanager.h +namespace vr +{ + +class IVRDriverManager +{ +public: + virtual uint32_t GetDriverCount() const = 0; + + /** Returns the length of the number of bytes necessary to hold this string including the trailing null. */ + virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; +}; + +static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; + +} // namespace vr + + + +// ivrinput.h +namespace vr +{ + // Maximum number of characters in an action name, including the trailing null + static const uint32_t k_unMaxActionNameLength = 64; + + // Maximum number of characters in an action set name, including the trailing null + static const uint32_t k_unMaxActionSetNameLength = 64; + + // Maximum number of origins for an action + static const uint32_t k_unMaxActionOriginCount = 16; + + // Maximum number of characters in a bone name, including the trailing null + static const uint32_t k_unMaxBoneNameLength = 32; + + enum EVRSkeletalTransformSpace + { + VRSkeletalTransformSpace_Model = 0, + VRSkeletalTransformSpace_Parent = 1 + }; + + enum EVRSkeletalReferencePose + { + VRSkeletalReferencePose_BindPose = 0, + VRSkeletalReferencePose_OpenHand, + VRSkeletalReferencePose_Fist, + VRSkeletalReferencePose_GripLimit + }; + + enum EVRFinger + { + VRFinger_Thumb = 0, + VRFinger_Index, + VRFinger_Middle, + VRFinger_Ring, + VRFinger_Pinky, + VRFinger_Count + }; + + enum EVRFingerSplay + { + VRFingerSplay_Thumb_Index = 0, + VRFingerSplay_Index_Middle, + VRFingerSplay_Middle_Ring, + VRFingerSplay_Ring_Pinky, + VRFingerSplay_Count + }; + + enum EVRSummaryType + { + // The skeletal summary data will match the animated bone transforms for the action. + VRSummaryType_FromAnimation = 0, + + // The skeletal summary data will include unprocessed data directly from the device when available. + // This data is generally less latent than the data that is computed from the animations. + VRSummaryType_FromDevice = 1, + }; + + enum EVRInputFilterCancelType + { + VRInputFilterCancel_Timers = 0, + VRInputFilterCancel_Momentum = 1, + }; + + enum EVRInputStringBits + { + VRInputString_Hand = 0x01, + VRInputString_ControllerType = 0x02, + VRInputString_InputSource = 0x04, + + VRInputString_All = 0xFFFFFFFF + }; + + struct InputAnalogActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action; will be delta updates for mouse actions */ + float x, y, z; + + /** Deltas since the previous call to UpdateActionState() */ + float deltaX, deltaY, deltaZ; + + /** Time relative to now when this event happened. Will be negative to indicate a past time. */ + float fUpdateTime; + }; + + struct InputDigitalActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action; will be true if currently pressed */ + bool bState; + + /** This is true if the state has changed since the last frame */ + bool bChanged; + + /** Time relative to now when this event happened. Will be negative to indicate a past time. */ + float fUpdateTime; + }; + + struct InputPoseActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action */ + TrackedDevicePose_t pose; + }; + + struct InputSkeletalActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + }; + + struct InputOriginInfo_t + { + VRInputValueHandle_t devicePath; + TrackedDeviceIndex_t trackedDeviceIndex; + char rchRenderModelComponentName[128]; + }; + + struct InputBindingInfo_t + { + char rchDevicePathName[128]; + char rchInputPathName[128]; + char rchModeName[128]; + char rchSlotName[128]; + char rchInputSourceType[ 32 ]; + }; + + // * Experimental global action set priority * + // These constants are part of the experimental support in SteamVR for overlay + // apps selectively overriding input in the base scene application. This may be + // useful for overlay applications that need to use part or all of a controller + // without taking away all input to the game. This system must be enabled by the + // "Experimental overlay input overrides" setting in the developer section of + // SteamVR settings. + // + // To use this system, set the nPriority field of an action set to any number in + // this range. + static const int32_t k_nActionSetOverlayGlobalPriorityMin = 0x01000000; + static const int32_t k_nActionSetOverlayGlobalPriorityMax = 0x01FFFFFF; + + static const int32_t k_nActionSetPriorityReservedMin = 0x02000000; + + struct VRActiveActionSet_t + { + /** This is the handle of the action set to activate for this frame. */ + VRActionSetHandle_t ulActionSet; + + /** This is the handle of a device path that this action set should be active for. To + * activate for all devices, set this to k_ulInvalidInputValueHandle. */ + VRInputValueHandle_t ulRestrictedToDevice; + + /** The action set to activate for all devices other than ulRestrictedDevice. If + * ulRestrictedToDevice is set to k_ulInvalidInputValueHandle, this parameter is + * ignored. */ + VRActionSetHandle_t ulSecondaryActionSet; + + // This field is ignored + uint32_t unPadding; + + /** The priority of this action set relative to other action sets. Any inputs + * bound to a source (e.g. trackpad, joystick, trigger) will disable bindings in + * other active action sets with a smaller priority. + * + * Overlay applications (i.e. ApplicationType_Overlay) may set their action set priority + * to a value between k_nActionSetOverlayGlobalPriorityMin and k_nActionSetOverlayGlobalPriorityMax + * to cause any inputs bound to a source used by that action set to be disabled in scene applications. + * + * No action set priority may value may be larger than k_nActionSetPriorityReservedMin + */ + int32_t nPriority; + }; + + /** Contains summary information about the current skeletal pose */ + struct VRSkeletalSummaryData_t + { + /** The amount that each finger is 'curled' inwards towards the palm. In the case of the thumb, + * this represents how much the thumb is wrapped around the fist. + * 0 means straight, 1 means fully curled */ + float flFingerCurl[ VRFinger_Count ]; + + /** The amount that each pair of adjacent fingers are separated. + * 0 means the digits are touching, 1 means they are fully separated. + */ + float flFingerSplay[ VRFingerSplay_Count ]; + }; + + + class IVRInput + { + public: + + // --------------- Handle management --------------- // + + /** Sets the path to the action manifest JSON file that is used by this application. If this information + * was set on the Steam partner site, calls to this function are ignored. If the Steam partner site + * setting and the path provided by this call are different, VRInputError_MismatchedActionManifest is returned. + * This call must be made before the first call to UpdateActionState or IVRSystem::PollNextEvent. */ + virtual EVRInputError SetActionManifestPath( const char *pchActionManifestPath ) = 0; + + /** Returns a handle for an action set. This handle is used for all performance-sensitive calls. */ + virtual EVRInputError GetActionSetHandle( const char *pchActionSetName, VRActionSetHandle_t *pHandle ) = 0; + + /** Returns a handle for an action. This handle is used for all performance-sensitive calls. */ + virtual EVRInputError GetActionHandle( const char *pchActionName, VRActionHandle_t *pHandle ) = 0; + + /** Returns a handle for any path in the input system. E.g. /user/hand/right */ + virtual EVRInputError GetInputSourceHandle( const char *pchInputSourcePath, VRInputValueHandle_t *pHandle ) = 0; + + + + // --------------- Reading action state ------------------- // + + /** Reads the current state into all actions. After this call, the results of Get*Action calls + * will be the same until the next call to UpdateActionState. */ + virtual EVRInputError UpdateActionState( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount ) = 0; + + /** Reads the state of a digital action given its handle. This will return VRInputError_WrongType if the type of + * action is something other than digital */ + virtual EVRInputError GetDigitalActionData( VRActionHandle_t action, InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of an analog action given its handle. This will return VRInputError_WrongType if the type of + * action is something other than analog */ + virtual EVRInputError GetAnalogActionData( VRActionHandle_t action, InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a pose action given its handle for the number of seconds relative to now. This + * will generally be called with negative times from the fUpdateTime fields in other actions. */ + virtual EVRInputError GetPoseActionDataRelativeToNow( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a pose action given its handle. The returned values will match the values returned + * by the last call to IVRCompositor::WaitGetPoses(). */ + virtual EVRInputError GetPoseActionDataForNextFrame( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a skeletal action given its handle. */ + virtual EVRInputError GetSkeletalActionData( VRActionHandle_t action, InputSkeletalActionData_t *pActionData, uint32_t unActionDataSize ) = 0; + + /** Returns the current dominant hand for the user for this application. This function will only return success for applications + * which include "supports_dominant_hand_setting": true in their action manifests. The dominant hand will only change after + * a call to UpdateActionState, and the action data returned after that point will use the new dominant hand. */ + virtual EVRInputError GetDominantHand( ETrackedControllerRole *peDominantHand ) = 0; + + /** Sets the dominant hand for the user for this application. */ + virtual EVRInputError SetDominantHand( ETrackedControllerRole eDominantHand ) = 0; + + // --------------- Static Skeletal Data ------------------- // + + /** Reads the number of bones in skeleton associated with the given action */ + virtual EVRInputError GetBoneCount( VRActionHandle_t action, uint32_t* pBoneCount ) = 0; + + /** Fills the given array with the index of each bone's parent in the skeleton associated with the given action */ + virtual EVRInputError GetBoneHierarchy( VRActionHandle_t action, VR_ARRAY_COUNT( unIndexArayCount ) BoneIndex_t* pParentIndices, uint32_t unIndexArayCount ) = 0; + + /** Fills the given buffer with the name of the bone at the given index in the skeleton associated with the given action */ + virtual EVRInputError GetBoneName( VRActionHandle_t action, BoneIndex_t nBoneIndex, VR_OUT_STRING() char* pchBoneName, uint32_t unNameBufferSize ) = 0; + + /** Fills the given buffer with the transforms for a specific static skeletal reference pose */ + virtual EVRInputError GetSkeletalReferenceTransforms( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + /** Reads the level of accuracy to which the controller is able to track the user to recreate a skeletal pose */ + virtual EVRInputError GetSkeletalTrackingLevel( VRActionHandle_t action, EVRSkeletalTrackingLevel* pSkeletalTrackingLevel ) = 0; + + // --------------- Dynamic Skeletal Data ------------------- // + + /** Reads the state of the skeletal bone data associated with this action and copies it into the given buffer. */ + virtual EVRInputError GetSkeletalBoneData( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + /** Reads summary information about the current pose of the skeleton associated with the given action. */ + virtual EVRInputError GetSkeletalSummaryData( VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData ) = 0; + + /** Reads the state of the skeletal bone data in a compressed form that is suitable for + * sending over the network. The required buffer size will never exceed ( sizeof(VR_BoneTransform_t)*boneCount + 2). + * Usually the size will be much smaller. */ + virtual EVRInputError GetSkeletalBoneDataCompressed( VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, VR_OUT_BUFFER_COUNT( unCompressedSize ) void *pvCompressedData, uint32_t unCompressedSize, uint32_t *punRequiredCompressedSize ) = 0; + + /** Turns a compressed buffer from GetSkeletalBoneDataCompressed and turns it back into a bone transform array. */ + virtual EVRInputError DecompressSkeletalBoneData( const void *pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + // --------------- Haptics ------------------- // + + /** Triggers a haptic event as described by the specified action */ + virtual EVRInputError TriggerHapticVibrationAction( VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + // --------------- Action Origins ---------------- // + + /** Retrieve origin handles for an action */ + virtual EVRInputError GetActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VR_ARRAY_COUNT( originOutCount ) VRInputValueHandle_t *originsOut, uint32_t originOutCount ) = 0; + + /** Retrieves the name of the origin in the current language. unStringSectionsToInclude is a bitfield of values in EVRInputStringBits that allows the + application to specify which parts of the origin's information it wants a string for. */ + virtual EVRInputError GetOriginLocalizedName( VRInputValueHandle_t origin, VR_OUT_STRING() char *pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude ) = 0; + + /** Retrieves useful information for the origin of this action */ + virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0; + + /** Retrieves useful information about the bindings for an action */ + virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t *punReturnedBindingInfoCount ) = 0; + + /** Shows the current binding for the action in-headset */ + virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0; + + /** Shows the current binding all the actions in the specified action sets */ + virtual EVRInputError ShowBindingsForActionSet( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight ) = 0; + + /** Use this to query what action on the component returned by GetOriginTrackedDeviceInfo would trigger this binding. */ + virtual EVRInputError GetComponentStateForBinding( const char *pchRenderModelName, const char *pchComponentName, + const InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, + vr::RenderModel_ComponentState_t *pComponentState ) = 0; + + + // --------------- Legacy Input ------------------- // + virtual bool IsUsingLegacyInput() = 0; + + + // --------------- Utilities ------------------- // + + /** Opens the binding user interface. If no app key is provided it will use the key from the calling process. + * If no set is provided it will open to the root of the app binding page. */ + virtual EVRInputError OpenBindingUI( const char* pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop ) = 0; + + /** Returns the variant set in the current bindings. If the binding doesn't include a variant setting, this function + * will return an empty string */ + virtual EVRInputError GetBindingVariant( vr::VRInputValueHandle_t ulDevicePath, + VR_OUT_STRING() char *pchVariantArray, uint32_t unVariantArraySize ) = 0; + + }; + + static const char * const IVRInput_Version = "IVRInput_010"; + +} // namespace vr + +// ivriobuffer.h +namespace vr +{ + +typedef uint64_t IOBufferHandle_t; +static const uint64_t k_ulInvalidIOBufferHandle = 0; + + enum EIOBufferError + { + IOBuffer_Success = 0, + IOBuffer_OperationFailed = 100, + IOBuffer_InvalidHandle = 101, + IOBuffer_InvalidArgument = 102, + IOBuffer_PathExists = 103, + IOBuffer_PathDoesNotExist = 104, + IOBuffer_Permission = 105, + }; + + enum EIOBufferMode + { + IOBufferMode_Read = 0x0001, + IOBufferMode_Write = 0x0002, + IOBufferMode_Create = 0x0200, + }; + + // ---------------------------------------------------------------------------------------------- + // Purpose: + // ---------------------------------------------------------------------------------------------- + class IVRIOBuffer + { + public: + /** opens an existing or creates a new IOBuffer of unSize bytes */ + virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0; + + /** closes a previously opened or created buffer */ + virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */ + virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0; + + /** writes unBytes of data from *pSrc into a buffer. */ + virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0; + + /** retrieves the property container of an buffer. */ + virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** inexpensively checks for readers to allow writers to fast-fail potentially expensive copies and writes. */ + virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; + }; + + static const char *IVRIOBuffer_Version = "IVRIOBuffer_002"; +} + +// ivrspatialanchors.h +namespace vr +{ + static const SpatialAnchorHandle_t k_ulInvalidSpatialAnchorHandle = 0; + + struct SpatialAnchorPose_t + { + HmdMatrix34_t mAnchorToAbsoluteTracking; + }; + + class IVRSpatialAnchors + { + public: + + /** Returns a handle for an spatial anchor described by "descriptor". On success, pHandle + * will contain a handle valid for this session. Caller can wait for an event or occasionally + * poll GetSpatialAnchorPose() to find the virtual coordinate associated with this anchor. */ + virtual EVRSpatialAnchorError CreateSpatialAnchorFromDescriptor( const char *pchDescriptor, SpatialAnchorHandle_t *pHandleOut ) = 0; + + /** Returns a handle for an new spatial anchor at pPose. On success, pHandle + * will contain a handle valid for this session. Caller can wait for an event or occasionally + * poll GetSpatialAnchorDescriptor() to find the permanent descriptor for this pose. + * The result of GetSpatialAnchorPose() may evolve from this initial position if the driver chooses + * to update it. + * The anchor will be associated with the driver that provides unDeviceIndex, and the driver may use that specific + * device as a hint for how to best create the anchor. + * The eOrigin must match whatever tracking origin you are working in (seated/standing/raw). + * This should be called when the user is close to (and ideally looking at/interacting with) the target physical + * location. At that moment, the driver will have the most information about how to recover that physical point + * in the future, and the quality of the anchor (when the descriptor is re-used) will be highest. + * The caller may decide to apply offsets from this initial pose, but is advised to stay relatively close to the + * original pose location for highest fidelity. */ + virtual EVRSpatialAnchorError CreateSpatialAnchorFromPose( TrackedDeviceIndex_t unDeviceIndex, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPose, SpatialAnchorHandle_t *pHandleOut ) = 0; + + /** Get the pose for a given handle. This is intended to be cheap enough to call every frame (or fairly often) + * so that the driver can refine this position when it has more information available. */ + virtual EVRSpatialAnchorError GetSpatialAnchorPose( SpatialAnchorHandle_t unHandle, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPoseOut ) = 0; + + /** Get the descriptor for a given handle. This will be empty for handles where the driver has not + * yet built a descriptor. It will be the application-supplied descriptor for previously saved anchors + * that the application is requesting poses for. If the driver has called UpdateSpatialAnchorDescriptor() + * already in this session, it will be the descriptor provided by the driver. + * Returns true if the descriptor fits into the buffer, else false. Buffer size should be at least + * k_unMaxSpatialAnchorDescriptorSize. */ + virtual EVRSpatialAnchorError GetSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, VR_OUT_STRING() char *pchDescriptorOut, uint32_t *punDescriptorBufferLenInOut ) = 0; + + }; + + static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; + +} // namespace vr + +// ivrdebug.h +namespace vr +{ + enum EVRDebugError + { + VRDebugError_Success = 0, + VRDebugError_BadParameter + }; + + /** Handle for vr profiler events */ + typedef uint64_t VrProfilerEventHandle_t; + + class IVRDebug + { + public: + + /** Create a vr profiler discrete event (point) + * The event will be associated with the message provided in pchMessage, and the current + * time will be used as the event timestamp. */ + virtual EVRDebugError EmitVrProfilerEvent( const char *pchMessage ) = 0; + + /** Create an vr profiler duration event (line) + * The current time will be used as the timestamp for the start of the line. + * On success, pHandleOut will contain a handle valid for terminating this event. */ + virtual EVRDebugError BeginVrProfilerEvent( VrProfilerEventHandle_t *pHandleOut ) = 0; + + /** Terminate a vr profiler event + * The event associated with hHandle will be considered completed when this method is called. + * The current time will be used assocaited to the termination time of the event, and + * pchMessage will be used as the event title. */ + virtual EVRDebugError FinishVrProfilerEvent( VrProfilerEventHandle_t hHandle, const char *pchMessage ) = 0; + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + }; + + static const char * const IVRDebug_Version = "IVRDebug_001"; + +} // namespace vr +// End + +namespace vr +{ +class IVRControlPanel +{ +public: + virtual uint32_t undoc1() = 0; + virtual uint32_t undoc2( uint32_t a, char *b, uint32_t c ) = 0; + virtual EVRInitError undoc3( const char *a ) = 0; + virtual uint32_t undoc4( const char *a ) = 0; + virtual uint32_t undoc5( const char *a , uint32_t b, char *c, uint32_t d ) = 0; + virtual uint32_t undoc6( const char *a, const char *b, char *c, uint32_t d ) = 0; + virtual uint32_t undoc7( const char *a, const char *b, char *c, uint32_t d ) = 0; + virtual bool undoc8( uint32_t a ) = 0; + virtual void undoc9() = 0; + virtual void undoc10() = 0; + virtual bool undoc11( uint32_t a ) = 0; + virtual void undoc12() = 0; + virtual void undoc13( TrackedDeviceIndex_t a ) = 0; + virtual void undoc14( vr::EVRState a ) = 0; + virtual vr::EVRState undoc15() = 0; + virtual void undoc16( bool a ) = 0; + virtual bool undoc17() = 0; + virtual EVRApplicationError undoc18() = 0; + virtual void undoc19( bool a ) = 0; + virtual bool undoc20() = 0; + virtual EVRInitError undoc21() = 0; + virtual void undoc22( vr::WebConsoleHandle_t a, const char *b, uint32_t c, uint32_t d, const char *e) = 0; + virtual bool undoc23( const char *a ) = 0; + virtual bool undoc24() = 0; + virtual bool undoc25( bool a ) = 0; + virtual uint64_t undoc26() = 0; + virtual EVRCompositorError undoc27( const char *a ) = 0; + virtual void undoc28( VROverlayHandle_t a ) = 0; +}; +static const char * const IVRControlPanel_Version = "IVRControlPanel_006"; +} + +namespace vr +{ + typedef uint64_t vrmb_typea; + + enum vrmb_typeb + { + valuea = 0, + }; + + class IVRMailbox + { + public: + virtual vrmb_typeb undoc1( const char *a, vrmb_typea *b ) = 0; + virtual vrmb_typeb undoc2( vrmb_typea a ) = 0; + virtual vrmb_typeb undoc3( vrmb_typea a, const char *b, const char *c ) = 0; + virtual vrmb_typeb undoc4( vrmb_typea a, char *b, uint32_t c, uint32_t *d ) = 0; + }; + + static const char *IVRMailbox_Version = "IVRMailbox_001"; +} + +#endif // _OPENVR_API + + +namespace vr +{ +#if !defined( OPENVR_INTERFACE_INTERNAL ) + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + * + * pStartupInfo is reserved for future use. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo = nullptr ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_GetRuntimePath( VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferSize, uint32_t *punRequiredBufferSize ); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVROverlayView *VROverlayView() + { + CheckClear(); + if ( m_pVROverlayView == nullptr ) + { + EVRInitError eError; + m_pVROverlayView = ( IVROverlayView * ) VR_GetGenericInterface( IVROverlayView_Version, &eError ); + } + return m_pVROverlayView; + } + + IVRHeadsetView *VRHeadsetView() + { + CheckClear(); + if ( m_pVRHeadsetView == nullptr ) + { + EVRInitError eError; + m_pVRHeadsetView = ( IVRHeadsetView * ) VR_GetGenericInterface( IVRHeadsetView_Version, &eError ); + } + return m_pVRHeadsetView; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + IVRDriverManager *VRDriverManager() + { + CheckClear(); + if ( !m_pVRDriverManager ) + { + EVRInitError eError; + m_pVRDriverManager = ( IVRDriverManager * )VR_GetGenericInterface( IVRDriverManager_Version, &eError ); + } + return m_pVRDriverManager; + } + + IVRInput *VRInput() + { + CheckClear(); + if ( !m_pVRInput ) + { + EVRInitError eError; + m_pVRInput = (IVRInput *)VR_GetGenericInterface( IVRInput_Version, &eError ); + } + return m_pVRInput; + } + + IVRIOBuffer *VRIOBuffer() + { + if ( !m_pVRIOBuffer ) + { + EVRInitError eError; + m_pVRIOBuffer = ( IVRIOBuffer * )VR_GetGenericInterface( IVRIOBuffer_Version, &eError ); + } + return m_pVRIOBuffer; + } + + IVRSpatialAnchors *VRSpatialAnchors() + { + CheckClear(); + if ( !m_pVRSpatialAnchors ) + { + EVRInitError eError; + m_pVRSpatialAnchors = (IVRSpatialAnchors *)VR_GetGenericInterface( IVRSpatialAnchors_Version, &eError ); + } + return m_pVRSpatialAnchors; + } + + IVRDebug *VRDebug() + { + CheckClear(); + if ( !m_pVRDebug ) + { + EVRInitError eError; + m_pVRDebug = (IVRDebug *)VR_GetGenericInterface( IVRDebug_Version, &eError ); + } + return m_pVRDebug; + } + + IVRNotifications *VRNotifications() + { + CheckClear(); + if ( !m_pVRNotifications ) + { + EVRInitError eError; + m_pVRNotifications = ( IVRNotifications * )VR_GetGenericInterface( IVRNotifications_Version, &eError ); + } + return m_pVRNotifications; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVRHeadsetView *m_pVRHeadsetView; + IVROverlay *m_pVROverlay; + IVROverlayView *m_pVROverlayView; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + IVRDriverManager *m_pVRDriverManager; + IVRInput *m_pVRInput; + IVRIOBuffer *m_pVRIOBuffer; + IVRSpatialAnchors *m_pVRSpatialAnchors; + IVRDebug *m_pVRDebug; + IVRNotifications *m_pVRNotifications; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVROverlayView *VR_CALLTYPE VROverlayView() { return OpenVRInternal_ModuleContext().VROverlayView(); } + inline IVRHeadsetView *VR_CALLTYPE VRHeadsetView() { return OpenVRInternal_ModuleContext().VRHeadsetView(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleContext().VRResources(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); } + inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleContext().VRDriverManager(); } + inline IVRInput *VR_CALLTYPE VRInput() { return OpenVRInternal_ModuleContext().VRInput(); } + inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); } + inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); } + inline IVRNotifications *VR_CALLTYPE VRNotifications() { return OpenVRInternal_ModuleContext().VRNotifications(); } + inline IVRDebug *VR_CALLTYPE VRDebug() { return OpenVRInternal_ModuleContext().VRDebug(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVROverlayView = nullptr; + m_pVRHeadsetView = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + m_pVRDriverManager = nullptr; + m_pVRInput = nullptr; + m_pVRIOBuffer = nullptr; + m_pVRSpatialAnchors = nullptr; + m_pVRNotifications = nullptr; + m_pVRDebug = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal2( &eError, eApplicationType, pStartupInfo ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } + +#endif // OPENVR_INTERFACE_INTERNAL +} diff --git a/vrclient_x64/openvr_v1.9.16/ivrclientcore.h b/vrclient_x64/openvr_v1.9.16/ivrclientcore.h new file mode 100644 index 0000000000..61d557fb32 --- /dev/null +++ b/vrclient_x64/openvr_v1.9.16/ivrclientcore.h @@ -0,0 +1,36 @@ +//========= Copyright Valve Corporation ============// + +#include "openvr.h" + +namespace vr +{ + +class IVRClientCore +{ +public: + /** Initializes the system */ + virtual EVRInitError Init( vr::EVRApplicationType eApplicationType, const char *pStartupInfo ) = 0; + + /** cleans up everything in vrclient.dll and prepares the DLL to be unloaded */ + virtual void Cleanup() = 0; + + /** checks to see if the specified interface/version is supported in this vrclient.dll */ + virtual EVRInitError IsInterfaceVersionValid( const char *pchInterfaceVersion ) = 0; + + /** Retrieves any interface from vrclient.dll */ + virtual void *GetGenericInterface( const char *pchNameAndVersion, EVRInitError *peError ) = 0; + + /** Returns true if any driver has an HMD attached. Can be called outside of Init/Cleanup */ + virtual bool BIsHmdPresent() = 0; + + /** Returns an English error string from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetEnglishStringForHmdError( vr::EVRInitError eError ) = 0; + + /** Returns an error symbol from inside vrclient.dll which might be newer than the API DLL */ + virtual const char *GetIDForVRInitError( vr::EVRInitError eError ) = 0; +}; + +static const char * const IVRClientCore_Version = "IVRClientCore_003"; + + +} diff --git a/vrclient_x64/openvr_v1.9.16/openvr.h b/vrclient_x64/openvr_v1.9.16/openvr.h new file mode 100644 index 0000000000..dd97e0d985 --- /dev/null +++ b/vrclient_x64/openvr_v1.9.16/openvr.h @@ -0,0 +1,5226 @@ + +// openvr.h +//========= Copyright Valve Corporation ============// +// Dynamically generated file. Do not modify this file directly. + +#ifndef _OPENVR_API +#define _OPENVR_API + +#include + + + +// version.h +namespace vr +{ + static const uint32_t k_nSteamVRVersionMajor = 1; + static const uint32_t k_nSteamVRVersionMinor = 9; + static const uint32_t k_nSteamVRVersionBuild = 16; +} // namespace vr + +// vrtypes.h +#ifndef _INCLUDE_VRTYPES_H +#define _INCLUDE_VRTYPES_H + +// Forward declarations to avoid requiring vulkan.h +struct VkDevice_T; +struct VkPhysicalDevice_T; +struct VkInstance_T; +struct VkQueue_T; + +// Forward declarations to avoid requiring d3d12.h +struct ID3D12Resource; +struct ID3D12CommandQueue; + +namespace vr +{ +#pragma pack( push, 8 ) + +/** A handle for a spatial anchor. This handle is only valid during the session it was created in. +* Anchors that live beyond one session should be saved by their string descriptors. */ +typedef uint32_t SpatialAnchorHandle_t; + +typedef void* glSharedTextureHandle_t; +typedef int32_t glInt_t; +typedef uint32_t glUInt_t; + +// right-handed system +// +y is up +// +x is to the right +// -z is forward +// Distance unit is meters +struct HmdMatrix34_t +{ + float m[3][4]; +}; + +struct HmdMatrix33_t +{ + float m[3][3]; +}; + +struct HmdMatrix44_t +{ + float m[4][4]; +}; + +struct HmdVector3_t +{ + float v[3]; +}; + +struct HmdVector4_t +{ + float v[4]; +}; + +struct HmdVector3d_t +{ + double v[3]; +}; + +struct HmdVector2_t +{ + float v[2]; +}; + +struct HmdQuaternion_t +{ + double w, x, y, z; +}; + +struct HmdQuaternionf_t +{ + float w, x, y, z; +}; + +struct HmdColor_t +{ + float r, g, b, a; +}; + +struct HmdQuad_t +{ + HmdVector3_t vCorners[ 4 ]; +}; + +struct HmdRect2_t +{ + HmdVector2_t vTopLeft; + HmdVector2_t vBottomRight; +}; + +/** Used to return the post-distortion UVs for each color channel. +* UVs range from 0 to 1 with 0,0 in the upper left corner of the +* source render target. The 0,0 to 1,1 range covers a single eye. */ +struct DistortionCoordinates_t +{ + float rfRed[2]; + float rfGreen[2]; + float rfBlue[2]; +}; + +enum EVREye +{ + Eye_Left = 0, + Eye_Right = 1 +}; + +enum ETextureType +{ + TextureType_Invalid = -1, // Handle has been invalidated + TextureType_DirectX = 0, // Handle is an ID3D11Texture + TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags + TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure + TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef, deprecated in favor of TextureType_Metal on supported platforms + TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure + TextureType_DXGISharedHandle = 5, // Handle is a HANDLE DXGI share handle, only supported for Overlay render targets. + // this texture is used directly by our renderer, so only perform atomic (copyresource or resolve) on it + TextureType_Metal = 6, // Handle is a MTLTexture conforming to the MTLSharedTexture protocol. Textures submitted to IVRCompositor::Submit which + // are of type MTLTextureType2DArray assume layer 0 is the left eye texture (vr::EVREye::Eye_left), layer 1 is the right + // eye texture (vr::EVREye::Eye_Right) +}; + +enum EColorSpace +{ + ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants. + ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format). + ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm. +}; + +struct Texture_t +{ + void* handle; // See ETextureType definition above + ETextureType eType; + EColorSpace eColorSpace; +}; + +// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource). +typedef uint64_t SharedTextureHandle_t; +#define INVALID_SHARED_TEXTURE_HANDLE ((vr::SharedTextureHandle_t)0) + +enum ETrackingResult +{ + TrackingResult_Uninitialized = 1, + + TrackingResult_Calibrating_InProgress = 100, + TrackingResult_Calibrating_OutOfRange = 101, + + TrackingResult_Running_OK = 200, + TrackingResult_Running_OutOfRange = 201, + + TrackingResult_Fallback_RotationOnly = 300, +}; + +typedef uint32_t DriverId_t; +static const uint32_t k_nDriverNone = 0xFFFFFFFF; + +static const uint32_t k_unMaxDriverDebugResponseSize = 32768; + +/** Used to pass device IDs to API calls */ +typedef uint32_t TrackedDeviceIndex_t; +static const uint32_t k_unTrackedDeviceIndex_Hmd = 0; +static const uint32_t k_unMaxTrackedDeviceCount = 64; +static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE; +static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF; + +/** Describes what kind of object is being tracked at a given ID */ +enum ETrackedDeviceClass +{ + TrackedDeviceClass_Invalid = 0, // the ID was not valid. + TrackedDeviceClass_HMD = 1, // Head-Mounted Displays + TrackedDeviceClass_Controller = 2, // Tracked controllers + TrackedDeviceClass_GenericTracker = 3, // Generic trackers, similar to controllers + TrackedDeviceClass_TrackingReference = 4, // Camera and base stations that serve as tracking reference points + TrackedDeviceClass_DisplayRedirect = 5, // Accessories that aren't necessarily tracked themselves, but may redirect video output from other tracked devices + + TrackedDeviceClass_Max +}; + + +/** Describes what specific role associated with a tracked device */ +enum ETrackedControllerRole +{ + TrackedControllerRole_Invalid = 0, // Invalid value for controller type + TrackedControllerRole_LeftHand = 1, // Tracked device associated with the left hand + TrackedControllerRole_RightHand = 2, // Tracked device associated with the right hand + TrackedControllerRole_OptOut = 3, // Tracked device is opting out of left/right hand selection + TrackedControllerRole_Treadmill = 4, // Tracked device is a treadmill + TrackedControllerRole_Stylus = 5, // Tracked device is a stylus + TrackedControllerRole_Max = 5 +}; + + +/** Returns true if the tracked controller role is allowed to be a hand */ +inline bool IsRoleAllowedAsHand( ETrackedControllerRole eRole ) +{ + switch ( eRole ) + { + case TrackedControllerRole_Invalid: + case TrackedControllerRole_LeftHand: + case TrackedControllerRole_RightHand: + return true; + default: + return false; + } +} + + +/** describes a single pose for a tracked object */ +struct TrackedDevicePose_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; + HmdVector3_t vVelocity; // velocity in tracker space in m/s + HmdVector3_t vAngularVelocity; // angular velocity in radians/s (?) + ETrackingResult eTrackingResult; + bool bPoseIsValid; + + // This indicates that there is a device connected for this spot in the pose array. + // It could go from true to false if the user unplugs the device. + bool bDeviceIsConnected; +}; + +/** Identifies which style of tracking origin the application wants to use +* for the poses it is requesting */ +enum ETrackingUniverseOrigin +{ + TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose + TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user + TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one. +}; + +enum EAdditionalRadioFeatures +{ + AdditionalRadioFeatures_None = 0x00000000, + AdditionalRadioFeatures_HTCLinkBox = 0x00000001, + AdditionalRadioFeatures_InternalDongle = 0x00000002, + AdditionalRadioFeatures_ExternalDongle = 0x00000004, +}; + +typedef uint64_t WebConsoleHandle_t; +#define INVALID_WEB_CONSOLE_HANDLE ((vr::WebConsoleHandle_t)0) + +// Refers to a single container of properties +typedef uint64_t PropertyContainerHandle_t; +typedef uint32_t PropertyTypeTag_t; + +static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0; +static const PropertyTypeTag_t k_unInvalidPropertyTag = 0; + +typedef PropertyContainerHandle_t DriverHandle_t; +static const PropertyContainerHandle_t k_ulInvalidDriverHandle = 0; + +// Use these tags to set/get common types as struct properties +static const PropertyTypeTag_t k_unFloatPropertyTag = 1; +static const PropertyTypeTag_t k_unInt32PropertyTag = 2; +static const PropertyTypeTag_t k_unUint64PropertyTag = 3; +static const PropertyTypeTag_t k_unBoolPropertyTag = 4; +static const PropertyTypeTag_t k_unStringPropertyTag = 5; +static const PropertyTypeTag_t k_unErrorPropertyTag = 6; + +static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20; +static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21; +static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22; +static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23; +static const PropertyTypeTag_t k_unHmdVector2PropertyTag = 24; +static const PropertyTypeTag_t k_unHmdQuadPropertyTag = 25; + +static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30; +static const PropertyTypeTag_t k_unPathHandleInfoTag = 31; +static const PropertyTypeTag_t k_unActionPropertyTag = 32; +static const PropertyTypeTag_t k_unInputValuePropertyTag = 33; +static const PropertyTypeTag_t k_unWildcardPropertyTag = 34; +static const PropertyTypeTag_t k_unHapticVibrationPropertyTag = 35; +static const PropertyTypeTag_t k_unSkeletonPropertyTag = 36; + +static const PropertyTypeTag_t k_unSpatialAnchorPosePropertyTag = 40; +static const PropertyTypeTag_t k_unJsonPropertyTag = 41; +static const PropertyTypeTag_t k_unActiveActionSetPropertyTag = 42; + +static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000; +static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000; + + +/** Each entry in this enum represents a property that can be retrieved about a +* tracked device. Many fields are only valid for one ETrackedDeviceClass. */ +enum ETrackedDeviceProperty +{ + Prop_Invalid = 0, + + // general properties that apply to all device classes + Prop_TrackingSystemName_String = 1000, + Prop_ModelNumber_String = 1001, + Prop_SerialNumber_String = 1002, + Prop_RenderModelName_String = 1003, + Prop_WillDriftInYaw_Bool = 1004, + Prop_ManufacturerName_String = 1005, + Prop_TrackingFirmwareVersion_String = 1006, + Prop_HardwareRevision_String = 1007, + Prop_AllWirelessDongleDescriptions_String = 1008, + Prop_ConnectedWirelessDongle_String = 1009, + Prop_DeviceIsWireless_Bool = 1010, + Prop_DeviceIsCharging_Bool = 1011, + Prop_DeviceBatteryPercentage_Float = 1012, // 0 is empty, 1 is full + Prop_StatusDisplayTransform_Matrix34 = 1013, + Prop_Firmware_UpdateAvailable_Bool = 1014, + Prop_Firmware_ManualUpdate_Bool = 1015, + Prop_Firmware_ManualUpdateURL_String = 1016, + Prop_HardwareRevision_Uint64 = 1017, + Prop_FirmwareVersion_Uint64 = 1018, + Prop_FPGAVersion_Uint64 = 1019, + Prop_VRCVersion_Uint64 = 1020, + Prop_RadioVersion_Uint64 = 1021, + Prop_DongleVersion_Uint64 = 1022, + Prop_BlockServerShutdown_Bool = 1023, + Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024, + Prop_ContainsProximitySensor_Bool = 1025, + Prop_DeviceProvidesBatteryStatus_Bool = 1026, + Prop_DeviceCanPowerOff_Bool = 1027, + Prop_Firmware_ProgrammingTarget_String = 1028, + Prop_DeviceClass_Int32 = 1029, + Prop_HasCamera_Bool = 1030, + Prop_DriverVersion_String = 1031, + Prop_Firmware_ForceUpdateRequired_Bool = 1032, + Prop_ViveSystemButtonFixRequired_Bool = 1033, + Prop_ParentDriver_Uint64 = 1034, + Prop_ResourceRoot_String = 1035, + Prop_RegisteredDeviceType_String = 1036, + Prop_InputProfilePath_String = 1037, // input profile to use for this device in the input system. Will default to tracking system name if this isn't provided + Prop_NeverTracked_Bool = 1038, // Used for devices that will never have a valid pose by design + Prop_NumCameras_Int32 = 1039, + Prop_CameraFrameLayout_Int32 = 1040, // EVRTrackedCameraFrameLayout value + Prop_CameraStreamFormat_Int32 = 1041, // ECameraVideoStreamFormat value + Prop_AdditionalDeviceSettingsPath_String = 1042, // driver-relative path to additional device and global configuration settings + Prop_Identifiable_Bool = 1043, // Whether device supports being identified from vrmonitor (e.g. blink LED, vibrate haptics, etc) + Prop_BootloaderVersion_Uint64 = 1044, + Prop_AdditionalSystemReportData_String = 1045, // additional string to include in system reports about a tracked device + Prop_CompositeFirmwareVersion_String = 1046, // additional FW components from a device that gets propagated into reports + Prop_Firmware_RemindUpdate_Bool = 1047, + Prop_PeripheralApplicationVersion_Uint64 = 1048, + Prop_ManufacturerSerialNumber_String = 1049, + Prop_ComputedSerialNumber_String = 1050, + Prop_EstimatedDeviceFirstUseTime_Int32 = 1051, + + // Properties that are unique to TrackedDeviceClass_HMD + Prop_ReportsTimeSinceVSync_Bool = 2000, + Prop_SecondsFromVsyncToPhotons_Float = 2001, + Prop_DisplayFrequency_Float = 2002, + Prop_UserIpdMeters_Float = 2003, + Prop_CurrentUniverseId_Uint64 = 2004, + Prop_PreviousUniverseId_Uint64 = 2005, + Prop_DisplayFirmwareVersion_Uint64 = 2006, + Prop_IsOnDesktop_Bool = 2007, + Prop_DisplayMCType_Int32 = 2008, + Prop_DisplayMCOffset_Float = 2009, + Prop_DisplayMCScale_Float = 2010, + Prop_EdidVendorID_Int32 = 2011, + Prop_DisplayMCImageLeft_String = 2012, + Prop_DisplayMCImageRight_String = 2013, + Prop_DisplayGCBlackClamp_Float = 2014, + Prop_EdidProductID_Int32 = 2015, + Prop_CameraToHeadTransform_Matrix34 = 2016, + Prop_DisplayGCType_Int32 = 2017, + Prop_DisplayGCOffset_Float = 2018, + Prop_DisplayGCScale_Float = 2019, + Prop_DisplayGCPrescale_Float = 2020, + Prop_DisplayGCImage_String = 2021, + Prop_LensCenterLeftU_Float = 2022, + Prop_LensCenterLeftV_Float = 2023, + Prop_LensCenterRightU_Float = 2024, + Prop_LensCenterRightV_Float = 2025, + Prop_UserHeadToEyeDepthMeters_Float = 2026, + Prop_CameraFirmwareVersion_Uint64 = 2027, + Prop_CameraFirmwareDescription_String = 2028, + Prop_DisplayFPGAVersion_Uint64 = 2029, + Prop_DisplayBootloaderVersion_Uint64 = 2030, + Prop_DisplayHardwareVersion_Uint64 = 2031, + Prop_AudioFirmwareVersion_Uint64 = 2032, + Prop_CameraCompatibilityMode_Int32 = 2033, + Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034, + Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035, + Prop_DisplaySuppressed_Bool = 2036, + Prop_DisplayAllowNightMode_Bool = 2037, + Prop_DisplayMCImageWidth_Int32 = 2038, + Prop_DisplayMCImageHeight_Int32 = 2039, + Prop_DisplayMCImageNumChannels_Int32 = 2040, + Prop_DisplayMCImageData_Binary = 2041, + Prop_SecondsFromPhotonsToVblank_Float = 2042, + Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043, + Prop_DisplayDebugMode_Bool = 2044, + Prop_GraphicsAdapterLuid_Uint64 = 2045, + Prop_DriverProvidedChaperonePath_String = 2048, + Prop_ExpectedTrackingReferenceCount_Int32 = 2049, // expected number of sensors or basestations to reserve UI space for + Prop_ExpectedControllerCount_Int32 = 2050, // expected number of tracked controllers to reserve UI space for + Prop_NamedIconPathControllerLeftDeviceOff_String = 2051, // placeholder icon for "left" controller if not yet detected/loaded + Prop_NamedIconPathControllerRightDeviceOff_String = 2052, // placeholder icon for "right" controller if not yet detected/loaded + Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053, // placeholder icon for sensor/base if not yet detected/loaded + Prop_DoNotApplyPrediction_Bool = 2054, // currently no effect. was used to disable HMD pose prediction on MR, which is now done by MR driver setting velocity=0 + Prop_CameraToHeadTransforms_Matrix34_Array = 2055, + Prop_DistortionMeshResolution_Int32 = 2056, // custom resolution of compositor calls to IVRSystem::ComputeDistortion + Prop_DriverIsDrawingControllers_Bool = 2057, + Prop_DriverRequestsApplicationPause_Bool = 2058, + Prop_DriverRequestsReducedRendering_Bool = 2059, + Prop_MinimumIpdStepMeters_Float = 2060, + Prop_AudioBridgeFirmwareVersion_Uint64 = 2061, + Prop_ImageBridgeFirmwareVersion_Uint64 = 2062, + Prop_ImuToHeadTransform_Matrix34 = 2063, + Prop_ImuFactoryGyroBias_Vector3 = 2064, + Prop_ImuFactoryGyroScale_Vector3 = 2065, + Prop_ImuFactoryAccelerometerBias_Vector3 = 2066, + Prop_ImuFactoryAccelerometerScale_Vector3 = 2067, + // reserved 2068 + Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069, + Prop_AdditionalRadioFeatures_Uint64 = 2070, + Prop_CameraWhiteBalance_Vector4_Array = 2071, // Prop_NumCameras_Int32-sized array of float[4] RGBG white balance calibration data (max size is vr::k_unMaxCameras) + Prop_CameraDistortionFunction_Int32_Array = 2072, // Prop_NumCameras_Int32-sized array of vr::EVRDistortionFunctionType values (max size is vr::k_unMaxCameras) + Prop_CameraDistortionCoefficients_Float_Array = 2073, // Prop_NumCameras_Int32-sized array of double[vr::k_unMaxDistortionFunctionParameters] (max size is vr::k_unMaxCameras) + Prop_ExpectedControllerType_String = 2074, + Prop_HmdTrackingStyle_Int32 = 2075, // one of EHmdTrackingStyle + Prop_DriverProvidedChaperoneVisibility_Bool = 2076, + Prop_HmdColumnCorrectionSettingPrefix_String = 2077, + Prop_CameraSupportsCompatibilityModes_Bool = 2078, + + Prop_DisplayAvailableFrameRates_Float_Array = 2080, // populated by compositor from actual EDID list when available from GPU driver + Prop_DisplaySupportsMultipleFramerates_Bool = 2081, // if this is true but Prop_DisplayAvailableFrameRates_Float_Array is empty, explain to user + Prop_DisplayColorMultLeft_Vector3 = 2082, + Prop_DisplayColorMultRight_Vector3 = 2083, + Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084, + Prop_DisplaySupportsAnalogGain_Bool = 2085, + Prop_DisplayMinAnalogGain_Float = 2086, + Prop_DisplayMaxAnalogGain_Float = 2087, + + Prop_DashboardLayoutPathName_String = 2090, + Prop_DashboardScale_Float = 2091, + Prop_IpdUIRangeMinMeters_Float = 2100, + Prop_IpdUIRangeMaxMeters_Float = 2101, + + // Driver requested mura correction properties + Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200, + Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201, + Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202, + Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203, + Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204, + Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205, + Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206, + Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207, + Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208, + + Prop_Audio_DefaultPlaybackDeviceId_String = 2300, + Prop_Audio_DefaultRecordingDeviceId_String = 2301, + Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302, + + // Properties that are unique to TrackedDeviceClass_Controller + Prop_AttachedDeviceId_String = 3000, + Prop_SupportedButtons_Uint64 = 3001, + Prop_Axis0Type_Int32 = 3002, // Return value is of type EVRControllerAxisType + Prop_Axis1Type_Int32 = 3003, // Return value is of type EVRControllerAxisType + Prop_Axis2Type_Int32 = 3004, // Return value is of type EVRControllerAxisType + Prop_Axis3Type_Int32 = 3005, // Return value is of type EVRControllerAxisType + Prop_Axis4Type_Int32 = 3006, // Return value is of type EVRControllerAxisType + Prop_ControllerRoleHint_Int32 = 3007, // Return value is of type ETrackedControllerRole + + // Properties that are unique to TrackedDeviceClass_TrackingReference + Prop_FieldOfViewLeftDegrees_Float = 4000, + Prop_FieldOfViewRightDegrees_Float = 4001, + Prop_FieldOfViewTopDegrees_Float = 4002, + Prop_FieldOfViewBottomDegrees_Float = 4003, + Prop_TrackingRangeMinimumMeters_Float = 4004, + Prop_TrackingRangeMaximumMeters_Float = 4005, + Prop_ModeLabel_String = 4006, + Prop_CanWirelessIdentify_Bool = 4007, // volatile, based on radio presence and fw discovery + Prop_Nonce_Int32 = 4008, + + // Properties that are used for user interface like icons names + Prop_IconPathName_String = 5000, // DEPRECATED. Value not referenced. Now expected to be part of icon path properties. + Prop_NamedIconPathDeviceOff_String = 5001, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceSearching_String = 5002, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceSearchingAlert_String = 5003, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceReady_String = 5004, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceReadyAlert_String = 5005, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceNotReady_String = 5006, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceStandby_String = 5007, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceAlertLow_String = 5008, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + Prop_NamedIconPathDeviceStandbyAlert_String = 5009, // {driver}/icons/icon_filename - PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others + + // Properties that are used by helpers, but are opaque to applications + Prop_DisplayHiddenArea_Binary_Start = 5100, + Prop_DisplayHiddenArea_Binary_End = 5150, + Prop_ParentContainer = 5151, + Prop_OverrideContainer_Uint64 = 5152, + + // Properties that are unique to drivers + Prop_UserConfigPath_String = 6000, + Prop_InstallPath_String = 6001, + Prop_HasDisplayComponent_Bool = 6002, + Prop_HasControllerComponent_Bool = 6003, + Prop_HasCameraComponent_Bool = 6004, + Prop_HasDriverDirectModeComponent_Bool = 6005, + Prop_HasVirtualDisplayComponent_Bool = 6006, + Prop_HasSpatialAnchorsSupport_Bool = 6007, + + // Properties that are set internally based on other information provided by drivers + Prop_ControllerType_String = 7000, + //Prop_LegacyInputProfile_String = 7001, // This is no longer used. See "legacy_binding" in the input profile instead. + Prop_ControllerHandSelectionPriority_Int32 = 7002, // Allows hand assignments to prefer some controllers over others. High numbers are selected over low numbers + + // Vendors are free to expose private debug data in this reserved region + Prop_VendorSpecific_Reserved_Start = 10000, + Prop_VendorSpecific_Reserved_End = 10999, + + Prop_TrackedDeviceProperty_Max = 1000000, +}; + +/** No string property will ever be longer than this length */ +static const uint32_t k_unMaxPropertyStringSize = 32 * 1024; + +/** Used to return errors that occur when reading properties. */ +enum ETrackedPropertyError +{ + TrackedProp_Success = 0, + TrackedProp_WrongDataType = 1, + TrackedProp_WrongDeviceClass = 2, + TrackedProp_BufferTooSmall = 3, + TrackedProp_UnknownProperty = 4, // Driver has not set the property (and may not ever). + TrackedProp_InvalidDevice = 5, + TrackedProp_CouldNotContactServer = 6, + TrackedProp_ValueNotProvidedByDevice = 7, + TrackedProp_StringExceedsMaximumLength = 8, + TrackedProp_NotYetAvailable = 9, // The property value isn't known yet, but is expected soon. Call again later. + TrackedProp_PermissionDenied = 10, + TrackedProp_InvalidOperation = 11, + TrackedProp_CannotWriteToWildcards = 12, + TrackedProp_IPCReadFailure = 13, + TrackedProp_OutOfMemory = 14, + TrackedProp_InvalidContainer = 15, +}; + +/** Used to drive certain text in the UI when talking about the tracking system for the HMD */ +enum EHmdTrackingStyle +{ + HmdTrackingStyle_Unknown = 0, + + HmdTrackingStyle_Lighthouse = 1, // base stations and lasers + HmdTrackingStyle_OutsideInCameras = 2, // Cameras and LED, Rift 1 style + HmdTrackingStyle_InsideOutCameras = 3, // Cameras on HMD looking at the world +}; + +typedef uint64_t VRActionHandle_t; +typedef uint64_t VRActionSetHandle_t; +typedef uint64_t VRInputValueHandle_t; + +static const VRActionHandle_t k_ulInvalidActionHandle = 0; +static const VRActionSetHandle_t k_ulInvalidActionSetHandle = 0; +static const VRInputValueHandle_t k_ulInvalidInputValueHandle = 0; + + +/** Allows the application to control what part of the provided texture will be used in the +* frame buffer. */ +struct VRTextureBounds_t +{ + float uMin, vMin; + float uMax, vMax; +}; + +/** Allows specifying pose used to render provided scene texture (if different from value returned by WaitGetPoses). */ +struct VRTextureWithPose_t : public Texture_t +{ + HmdMatrix34_t mDeviceToAbsoluteTracking; // Actual pose used to render scene textures. +}; + +struct VRTextureDepthInfo_t +{ + void* handle; // See ETextureType definition above + HmdMatrix44_t mProjection; + HmdVector2_t vRange; // 0..1 +}; + +struct VRTextureWithDepth_t : public Texture_t +{ + VRTextureDepthInfo_t depth; +}; + +struct VRTextureWithPoseAndDepth_t : public VRTextureWithPose_t +{ + VRTextureDepthInfo_t depth; +}; + +/** Allows the application to control how scene textures are used by the compositor when calling Submit. */ +enum EVRSubmitFlags +{ + // Simple render path. App submits rendered left and right eye images with no lens distortion correction applied. + Submit_Default = 0x00, + + // App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear + // barrel distorted with chromatic aberration correction applied). The app would have used the data returned by + // vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit(). + Submit_LensDistortionAlreadyApplied = 0x01, + + // If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag. + Submit_GlRenderBuffer = 0x02, + + // Do not use + Submit_Reserved = 0x04, + + // Set to indicate that pTexture is a pointer to a VRTextureWithPose_t. + // This flag can be combined with Submit_TextureWithDepth to pass a VRTextureWithPoseAndDepth_t. + Submit_TextureWithPose = 0x08, + + // Set to indicate that pTexture is a pointer to a VRTextureWithDepth_t. + // This flag can be combined with Submit_TextureWithPose to pass a VRTextureWithPoseAndDepth_t. + Submit_TextureWithDepth = 0x10, +}; + +/** Data required for passing Vulkan textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. +* Please see https://github.com/ValveSoftware/openvr/wiki/Vulkan for Vulkan-specific documentation */ +struct VRVulkanTextureData_t +{ + uint64_t m_nImage; // VkImage + VkDevice_T *m_pDevice; + VkPhysicalDevice_T *m_pPhysicalDevice; + VkInstance_T *m_pInstance; + VkQueue_T *m_pQueue; + uint32_t m_nQueueFamilyIndex; + uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount; +}; + +/** Data required for passing D3D12 textures to IVRCompositor::Submit. +* Be sure to call OpenVR_Shutdown before destroying these resources. */ +struct D3D12TextureData_t +{ + ID3D12Resource *m_pResource; + ID3D12CommandQueue *m_pCommandQueue; + uint32_t m_nNodeMask; +}; + +/** Status of the overall system or tracked objects */ +enum EVRState +{ + VRState_Undefined = -1, + VRState_Off = 0, + VRState_Searching = 1, + VRState_Searching_Alert = 2, + VRState_Ready = 3, + VRState_Ready_Alert = 4, + VRState_NotReady = 5, + VRState_Standby = 6, + VRState_Ready_Alert_Low = 7, +}; + +/** The types of events that could be posted (and what the parameters mean for each event type) */ +enum EVREventType +{ + VREvent_None = 0, + + VREvent_TrackedDeviceActivated = 100, + VREvent_TrackedDeviceDeactivated = 101, + VREvent_TrackedDeviceUpdated = 102, + VREvent_TrackedDeviceUserInteractionStarted = 103, + VREvent_TrackedDeviceUserInteractionEnded = 104, + VREvent_IpdChanged = 105, + VREvent_EnterStandbyMode = 106, + VREvent_LeaveStandbyMode = 107, + VREvent_TrackedDeviceRoleChanged = 108, + VREvent_WatchdogWakeUpRequested = 109, + VREvent_LensDistortionChanged = 110, + VREvent_PropertyChanged = 111, + VREvent_WirelessDisconnect = 112, + VREvent_WirelessReconnect = 113, + + VREvent_ButtonPress = 200, // data is controller + VREvent_ButtonUnpress = 201, // data is controller + VREvent_ButtonTouch = 202, // data is controller + VREvent_ButtonUntouch = 203, // data is controller + + VREvent_DualAnalog_Press = 250, // data is dualAnalog + VREvent_DualAnalog_Unpress = 251, // data is dualAnalog + VREvent_DualAnalog_Touch = 252, // data is dualAnalog + VREvent_DualAnalog_Untouch = 253, // data is dualAnalog + VREvent_DualAnalog_Move = 254, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch1 = 255, // data is dualAnalog + VREvent_DualAnalog_ModeSwitch2 = 256, // data is dualAnalog + VREvent_DualAnalog_Cancel = 257, // data is dualAnalog + + VREvent_MouseMove = 300, // data is mouse + VREvent_MouseButtonDown = 301, // data is mouse + VREvent_MouseButtonUp = 302, // data is mouse + VREvent_FocusEnter = 303, // data is overlay + VREvent_FocusLeave = 304, // data is overlay + VREvent_ScrollDiscrete = 305, // data is scroll + VREvent_TouchPadMove = 306, // data is mouse + VREvent_OverlayFocusChanged = 307, // data is overlay, global event + VREvent_ReloadOverlays = 308, + VREvent_ScrollSmooth = 309, // data is scroll + + VREvent_InputFocusCaptured = 400, // data is process DEPRECATED + VREvent_InputFocusReleased = 401, // data is process DEPRECATED + // VREvent_SceneFocusLost = 402, // data is process + // VREvent_SceneFocusGained = 403, // data is process + VREvent_SceneApplicationChanged = 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor) + VREvent_SceneFocusChanged = 405, // data is process - New app got access to draw the scene + VREvent_InputFocusChanged = 406, // data is process + // VREvent_SceneApplicationSecondaryRenderingStarted = 407, + VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408, // data is process + VREvent_ActionBindingReloaded = 409, // data is process - The App that action binds reloaded for + + VREvent_HideRenderModels = 410, // Sent to the scene application to request hiding render models temporarily + VREvent_ShowRenderModels = 411, // Sent to the scene application to request restoring render model visibility + + VREvent_SceneApplicationStateChanged = 412, // No data; but query VRApplications()->GetSceneApplicationState(); + + VREvent_ConsoleOpened = 420, + VREvent_ConsoleClosed = 421, + + VREvent_OverlayShown = 500, + VREvent_OverlayHidden = 501, + VREvent_DashboardActivated = 502, + VREvent_DashboardDeactivated = 503, + //VREvent_DashboardThumbSelected = 504, // Sent to the overlay manager - data is overlay - No longer sent + VREvent_DashboardRequested = 505, // Sent to the overlay manager - data is overlay + VREvent_ResetDashboard = 506, // Send to the overlay manager + VREvent_RenderToast = 507, // Send to the dashboard to render a toast - data is the notification ID + VREvent_ImageLoaded = 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading + VREvent_ShowKeyboard = 509, // Sent to keyboard renderer in the dashboard to invoke it + VREvent_HideKeyboard = 510, // Sent to keyboard renderer in the dashboard to hide it + VREvent_OverlayGamepadFocusGained = 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it + VREvent_OverlayGamepadFocusLost = 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else + VREvent_OverlaySharedTextureChanged = 513, + //VREvent_DashboardGuideButtonDown = 514, // These are no longer sent + //VREvent_DashboardGuideButtonUp = 515, + VREvent_ScreenshotTriggered = 516, // Screenshot button combo was pressed, Dashboard should request a screenshot + VREvent_ImageFailed = 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load + VREvent_DashboardOverlayCreated = 518, + VREvent_SwitchGamepadFocus = 519, + + // Screenshot API + VREvent_RequestScreenshot = 520, // Sent by vrclient application to compositor to take a screenshot + VREvent_ScreenshotTaken = 521, // Sent by compositor to the application that the screenshot has been taken + VREvent_ScreenshotFailed = 522, // Sent by compositor to the application that the screenshot failed to be taken + VREvent_SubmitScreenshotToDashboard = 523, // Sent by compositor to the dashboard that a completed screenshot was submitted + VREvent_ScreenshotProgressToDashboard = 524, // Sent by compositor to the dashboard that a completed screenshot was submitted + + VREvent_PrimaryDashboardDeviceChanged = 525, + VREvent_RoomViewShown = 526, // Sent by compositor whenever room-view is enabled + VREvent_RoomViewHidden = 527, // Sent by compositor whenever room-view is disabled + VREvent_ShowUI = 528, // data is showUi + VREvent_ShowDevTools = 529, // data is showDevTools + + VREvent_Notification_Shown = 600, + VREvent_Notification_Hidden = 601, + VREvent_Notification_BeginInteraction = 602, + VREvent_Notification_Destroyed = 603, + + VREvent_Quit = 700, // data is process + VREvent_ProcessQuit = 701, // data is process + //VREvent_QuitAborted_UserPrompt = 702, // data is process + VREvent_QuitAcknowledged = 703, // data is process + VREvent_DriverRequestedQuit = 704, // The driver has requested that SteamVR shut down + VREvent_RestartRequested = 705, // A driver or other component wants the user to restart SteamVR + + VREvent_ChaperoneDataHasChanged = 800, // this will never happen with the new chaperone system + VREvent_ChaperoneUniverseHasChanged = 801, + VREvent_ChaperoneTempDataHasChanged = 802, // this will never happen with the new chaperone system + VREvent_ChaperoneSettingsHaveChanged = 803, + VREvent_SeatedZeroPoseReset = 804, + VREvent_ChaperoneFlushCache = 805, // Sent when the process needs to reload any cached data it retrieved from VRChaperone() + VREvent_ChaperoneRoomSetupStarting = 806, // Triggered by CVRChaperoneClient::RoomSetupStarting + VREvent_ChaperoneRoomSetupFinished = 807, // Triggered by CVRChaperoneClient::CommitWorkingCopy + + VREvent_AudioSettingsHaveChanged = 820, + + VREvent_BackgroundSettingHasChanged = 850, + VREvent_CameraSettingsHaveChanged = 851, + VREvent_ReprojectionSettingHasChanged = 852, + VREvent_ModelSkinSettingsHaveChanged = 853, + VREvent_EnvironmentSettingsHaveChanged = 854, + VREvent_PowerSettingsHaveChanged = 855, + VREvent_EnableHomeAppSettingsHaveChanged = 856, + VREvent_SteamVRSectionSettingChanged = 857, + VREvent_LighthouseSectionSettingChanged = 858, + VREvent_NullSectionSettingChanged = 859, + VREvent_UserInterfaceSectionSettingChanged = 860, + VREvent_NotificationsSectionSettingChanged = 861, + VREvent_KeyboardSectionSettingChanged = 862, + VREvent_PerfSectionSettingChanged = 863, + VREvent_DashboardSectionSettingChanged = 864, + VREvent_WebInterfaceSectionSettingChanged = 865, + VREvent_TrackersSectionSettingChanged = 866, + VREvent_LastKnownSectionSettingChanged = 867, + VREvent_DismissedWarningsSectionSettingChanged = 868, + VREvent_GpuSpeedSectionSettingChanged = 869, + + VREvent_StatusUpdate = 900, + + VREvent_WebInterface_InstallDriverCompleted = 950, + + VREvent_MCImageUpdated = 1000, + + VREvent_FirmwareUpdateStarted = 1100, + VREvent_FirmwareUpdateFinished = 1101, + + VREvent_KeyboardClosed = 1200, + VREvent_KeyboardCharInput = 1201, + VREvent_KeyboardDone = 1202, // Sent when DONE button clicked on keyboard + + //VREvent_ApplicationTransitionStarted = 1300, + //VREvent_ApplicationTransitionAborted = 1301, + //VREvent_ApplicationTransitionNewAppStarted = 1302, + VREvent_ApplicationListUpdated = 1303, + VREvent_ApplicationMimeTypeLoad = 1304, + // VREvent_ApplicationTransitionNewAppLaunchComplete = 1305, + VREvent_ProcessConnected = 1306, + VREvent_ProcessDisconnected = 1307, + + //VREvent_Compositor_MirrorWindowShown = 1400, // DEPRECATED + //VREvent_Compositor_MirrorWindowHidden = 1401, // DEPRECATED + VREvent_Compositor_ChaperoneBoundsShown = 1410, + VREvent_Compositor_ChaperoneBoundsHidden = 1411, + VREvent_Compositor_DisplayDisconnected = 1412, + VREvent_Compositor_DisplayReconnected = 1413, + VREvent_Compositor_HDCPError = 1414, // data is hdcpError + VREvent_Compositor_ApplicationNotResponding = 1415, + VREvent_Compositor_ApplicationResumed = 1416, + VREvent_Compositor_OutOfVideoMemory = 1417, + VREvent_Compositor_DisplayModeNotSupported = 1418, // k_pch_SteamVR_PreferredRefreshRate + VREvent_Compositor_StageOverrideReady = 1419, + + VREvent_TrackedCamera_StartVideoStream = 1500, + VREvent_TrackedCamera_StopVideoStream = 1501, + VREvent_TrackedCamera_PauseVideoStream = 1502, + VREvent_TrackedCamera_ResumeVideoStream = 1503, + VREvent_TrackedCamera_EditingSurface = 1550, + + VREvent_PerformanceTest_EnableCapture = 1600, + VREvent_PerformanceTest_DisableCapture = 1601, + VREvent_PerformanceTest_FidelityLevel = 1602, + + VREvent_MessageOverlay_Closed = 1650, + VREvent_MessageOverlayCloseRequested = 1651, + + VREvent_Input_HapticVibration = 1700, // data is hapticVibration + VREvent_Input_BindingLoadFailed = 1701, // data is inputBinding + VREvent_Input_BindingLoadSuccessful = 1702, // data is inputBinding + VREvent_Input_ActionManifestReloaded = 1703, // no data + VREvent_Input_ActionManifestLoadFailed = 1704, // data is actionManifest + VREvent_Input_ProgressUpdate = 1705, // data is progressUpdate + VREvent_Input_TrackerActivated = 1706, + VREvent_Input_BindingsUpdated = 1707, + VREvent_Input_BindingSubscriptionChanged = 1708, + + VREvent_SpatialAnchors_PoseUpdated = 1800, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_DescriptorUpdated = 1801, // data is spatialAnchor. broadcast + VREvent_SpatialAnchors_RequestPoseUpdate = 1802, // data is spatialAnchor. sent to specific driver + VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803, // data is spatialAnchor. sent to specific driver + + VREvent_SystemReport_Started = 1900, // user or system initiated generation of a system report. broadcast + + VREvent_Monitor_ShowHeadsetView = 2000, // data is process + VREvent_Monitor_HideHeadsetView = 2001, // data is process + + // Vendors are free to expose private events in this reserved region + VREvent_VendorSpecific_Reserved_Start = 10000, + VREvent_VendorSpecific_Reserved_End = 19999, +}; + + +/** Level of Hmd activity */ +// UserInteraction_Timeout means the device is in the process of timing out. +// InUse = ( k_EDeviceActivityLevel_UserInteraction || k_EDeviceActivityLevel_UserInteraction_Timeout ) +// VREvent_TrackedDeviceUserInteractionStarted fires when the devices transitions from Standby -> UserInteraction or Idle -> UserInteraction. +// VREvent_TrackedDeviceUserInteractionEnded fires when the devices transitions from UserInteraction_Timeout -> Idle +enum EDeviceActivityLevel +{ + k_EDeviceActivityLevel_Unknown = -1, + k_EDeviceActivityLevel_Idle = 0, // No activity for the last 10 seconds + k_EDeviceActivityLevel_UserInteraction = 1, // Activity (movement or prox sensor) is happening now + k_EDeviceActivityLevel_UserInteraction_Timeout = 2, // No activity for the last 0.5 seconds + k_EDeviceActivityLevel_Standby = 3, // Idle for at least 5 seconds (configurable in Settings -> Power Management) + k_EDeviceActivityLevel_Idle_Timeout = 4, +}; + + +/** VR controller button and axis IDs */ +enum EVRButtonId +{ + k_EButton_System = 0, + k_EButton_ApplicationMenu = 1, + k_EButton_Grip = 2, + k_EButton_DPad_Left = 3, + k_EButton_DPad_Up = 4, + k_EButton_DPad_Right = 5, + k_EButton_DPad_Down = 6, + k_EButton_A = 7, + + k_EButton_ProximitySensor = 31, + + k_EButton_Axis0 = 32, + k_EButton_Axis1 = 33, + k_EButton_Axis2 = 34, + k_EButton_Axis3 = 35, + k_EButton_Axis4 = 36, + + // aliases for well known controllers + k_EButton_SteamVR_Touchpad = k_EButton_Axis0, + k_EButton_SteamVR_Trigger = k_EButton_Axis1, + + k_EButton_Dashboard_Back = k_EButton_Grip, + + k_EButton_IndexController_A = k_EButton_Grip, + k_EButton_IndexController_B = k_EButton_ApplicationMenu, + k_EButton_IndexController_JoyStick = k_EButton_Axis3, + + k_EButton_Max = 64 +}; + +inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; } + +/** used for controller button events */ +struct VREvent_Controller_t +{ + uint32_t button; // EVRButtonId enum +}; + + +/** used for simulated mouse events in overlay space */ +enum EVRMouseButton +{ + VRMouseButton_Left = 0x0001, + VRMouseButton_Right = 0x0002, + VRMouseButton_Middle = 0x0004, +}; + + +/** used for simulated mouse events in overlay space */ +struct VREvent_Mouse_t +{ + float x, y; // co-ords are in GL space, bottom left of the texture is 0,0 + uint32_t button; // EVRMouseButton enum +}; + +/** used for simulated mouse wheel scroll */ +struct VREvent_Scroll_t +{ + float xdelta, ydelta; + uint32_t unused; + float viewportscale; // For scrolling on an overlay with laser mouse, this is the overlay's vertical size relative to the overlay height. Range: [0,1] +}; + +/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger + is on the touchpad (or just released from it). These events are sent to overlays with the VROverlayFlags_SendVRTouchpadEvents + flag set. +**/ +struct VREvent_TouchPadMove_t +{ + // true if the users finger is detected on the touch pad + bool bFingerDown; + + // How long the finger has been down in seconds + float flSecondsFingerDown; + + // These values indicate the starting finger position (so you can do some basic swipe stuff) + float fValueXFirst; + float fValueYFirst; + + // This is the raw sampled coordinate without deadzoning + float fValueXRaw; + float fValueYRaw; +}; + +/** notification related events. Details will still change at this point */ +struct VREvent_Notification_t +{ + uint64_t ulUserValue; + uint32_t notificationId; +}; + +/** Used for events about processes */ +struct VREvent_Process_t +{ + uint32_t pid; + uint32_t oldPid; + bool bForced; + // If the associated event was triggered by a connection loss + bool bConnectionLost; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Overlay_t +{ + uint64_t overlayHandle; + uint64_t devicePath; +}; + + +/** Used for a few events about overlays */ +struct VREvent_Status_t +{ + uint32_t statusState; // EVRState enum +}; + +/** Used for keyboard events **/ +struct VREvent_Keyboard_t +{ + char cNewInput[8]; // Up to 11 bytes of new input + uint64_t uUserValue; // Possible flags about the new input +}; + +struct VREvent_Ipd_t +{ + float ipdMeters; +}; + +struct VREvent_Chaperone_t +{ + uint64_t m_nPreviousUniverse; + uint64_t m_nCurrentUniverse; +}; + +/** Not actually used for any events */ +struct VREvent_Reserved_t +{ + uint64_t reserved0; + uint64_t reserved1; + uint64_t reserved2; + uint64_t reserved3; + uint64_t reserved4; + uint64_t reserved5; +}; + +struct VREvent_PerformanceTest_t +{ + uint32_t m_nFidelityLevel; +}; + +struct VREvent_SeatedZeroPoseReset_t +{ + bool bResetBySystemMenu; +}; + +struct VREvent_Screenshot_t +{ + uint32_t handle; + uint32_t type; +}; + +struct VREvent_ScreenshotProgress_t +{ + float progress; +}; + +struct VREvent_ApplicationLaunch_t +{ + uint32_t pid; + uint32_t unArgsHandle; +}; + +struct VREvent_EditingCameraSurface_t +{ + uint64_t overlayHandle; + uint32_t nVisualMode; +}; + +struct VREvent_MessageOverlay_t +{ + uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum +}; + +struct VREvent_Property_t +{ + PropertyContainerHandle_t container; + ETrackedDeviceProperty prop; +}; + +enum EDualAnalogWhich +{ + k_EDualAnalog_Left = 0, + k_EDualAnalog_Right = 1, +}; + +struct VREvent_DualAnalog_t +{ + float x, y; // coordinates are -1..1 analog values + float transformedX, transformedY; // transformed by the center and radius numbers provided by the overlay + EDualAnalogWhich which; +}; + +struct VREvent_HapticVibration_t +{ + uint64_t containerHandle; // property container handle of the device with the haptic component + uint64_t componentHandle; // Which haptic component needs to vibrate + float fDurationSeconds; + float fFrequency; + float fAmplitude; +}; + +struct VREvent_WebConsole_t +{ + WebConsoleHandle_t webConsoleHandle; +}; + +struct VREvent_InputBindingLoad_t +{ + vr::PropertyContainerHandle_t ulAppContainer; + uint64_t pathMessage; + uint64_t pathUrl; + uint64_t pathControllerType; +}; + +struct VREvent_InputActionManifestLoad_t +{ + uint64_t pathAppKey; + uint64_t pathMessage; + uint64_t pathMessageParam; + uint64_t pathManifestPath; +}; + +struct VREvent_SpatialAnchor_t +{ + SpatialAnchorHandle_t unHandle; +}; + +struct VREvent_ProgressUpdate_t +{ + uint64_t ulApplicationPropertyContainer; + uint64_t pathDevice; + uint64_t pathInputSource; + uint64_t pathProgressAction; + uint64_t pathIcon; + float fProgress; +}; + +enum EShowUIType +{ + ShowUI_ControllerBinding = 0, + ShowUI_ManageTrackers = 1, + // ShowUI_QuickStart = 2, // Deprecated + ShowUI_Pairing = 3, + ShowUI_Settings = 4, + ShowUI_DebugCommands = 5, + ShowUI_FullControllerBinding = 6, +}; + +struct VREvent_ShowUI_t +{ + EShowUIType eType; +}; + +struct VREvent_ShowDevTools_t +{ + int32_t nBrowserIdentifier; +}; + +enum EHDCPError +{ + HDCPError_None = 0, + HDCPError_LinkLost = 1, + HDCPError_Tampered = 2, + HDCPError_DeviceRevoked = 3, + HDCPError_Unknown = 4 +}; + +struct VREvent_HDCPError_t +{ + EHDCPError eCode; +}; + +typedef union +{ + VREvent_Reserved_t reserved; + VREvent_Controller_t controller; + VREvent_Mouse_t mouse; + VREvent_Scroll_t scroll; + VREvent_Process_t process; + VREvent_Notification_t notification; + VREvent_Overlay_t overlay; + VREvent_Status_t status; + VREvent_Keyboard_t keyboard; + VREvent_Ipd_t ipd; + VREvent_Chaperone_t chaperone; + VREvent_PerformanceTest_t performanceTest; + VREvent_TouchPadMove_t touchPadMove; + VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + VREvent_Screenshot_t screenshot; + VREvent_ScreenshotProgress_t screenshotProgress; + VREvent_ApplicationLaunch_t applicationLaunch; + VREvent_EditingCameraSurface_t cameraSurface; + VREvent_MessageOverlay_t messageOverlay; + VREvent_Property_t property; + VREvent_DualAnalog_t dualAnalog; + VREvent_HapticVibration_t hapticVibration; + VREvent_WebConsole_t webConsole; + VREvent_InputBindingLoad_t inputBinding; + VREvent_InputActionManifestLoad_t actionManifest; + VREvent_SpatialAnchor_t spatialAnchor; + VREvent_ProgressUpdate_t progressUpdate; + VREvent_ShowUI_t showUi; + VREvent_ShowDevTools_t showDevTools; + VREvent_HDCPError_t hdcpError; + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */ +} VREvent_Data_t; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** An event posted by the server to all running applications */ +struct VREvent_t +{ + uint32_t eventType; // EVREventType enum + TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + // event data must be the end of the struct as its size is variable + VREvent_Data_t data; +}; + +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +enum EVRInputError +{ + VRInputError_None = 0, + VRInputError_NameNotFound = 1, + VRInputError_WrongType = 2, + VRInputError_InvalidHandle = 3, + VRInputError_InvalidParam = 4, + VRInputError_NoSteam = 5, + VRInputError_MaxCapacityReached = 6, + VRInputError_IPCError = 7, + VRInputError_NoActiveActionSet = 8, + VRInputError_InvalidDevice = 9, + VRInputError_InvalidSkeleton = 10, + VRInputError_InvalidBoneCount = 11, + VRInputError_InvalidCompressedData = 12, + VRInputError_NoData = 13, + VRInputError_BufferTooSmall = 14, + VRInputError_MismatchedActionManifest = 15, + VRInputError_MissingSkeletonData = 16, + VRInputError_InvalidBoneIndex = 17, +}; + +enum EVRSpatialAnchorError +{ + VRSpatialAnchorError_Success = 0, + VRSpatialAnchorError_Internal = 1, + VRSpatialAnchorError_UnknownHandle = 2, + VRSpatialAnchorError_ArrayTooSmall = 3, + VRSpatialAnchorError_InvalidDescriptorChar = 4, + VRSpatialAnchorError_NotYetAvailable = 5, + VRSpatialAnchorError_NotAvailableInThisUniverse = 6, + VRSpatialAnchorError_PermanentlyUnavailable = 7, + VRSpatialAnchorError_WrongDriver = 8, + VRSpatialAnchorError_DescriptorTooLong = 9, + VRSpatialAnchorError_Unknown = 10, + VRSpatialAnchorError_NoRoomCalibration = 11, + VRSpatialAnchorError_InvalidArgument = 12, + VRSpatialAnchorError_UnknownDriver = 13, +}; + +/** The mesh to draw into the stencil (or depth) buffer to perform +* early stencil (or depth) kills of pixels that will never appear on the HMD. +* This mesh draws on all the pixels that will be hidden after distortion. +* +* If the HMD does not provide a visible area mesh pVertexData will be +* NULL and unTriangleCount will be 0. */ +struct HiddenAreaMesh_t +{ + const HmdVector2_t *pVertexData; + uint32_t unTriangleCount; +}; + + +enum EHiddenAreaMeshType +{ + k_eHiddenAreaMesh_Standard = 0, + k_eHiddenAreaMesh_Inverse = 1, + k_eHiddenAreaMesh_LineLoop = 2, + + k_eHiddenAreaMesh_Max = 3, +}; + + +/** Identifies what kind of axis is on the controller at index n. Read this type +* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n ); +*/ +enum EVRControllerAxisType +{ + k_eControllerAxis_None = 0, + k_eControllerAxis_TrackPad = 1, + k_eControllerAxis_Joystick = 2, + k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis +}; + + +/** contains information about one axis on the controller */ +struct VRControllerAxis_t +{ + float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released. + float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers. +}; + + +/** the number of axes in the controller state */ +static const uint32_t k_unControllerStateAxisCount = 5; + + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +/** Holds all the state of a controller at one moment in time. */ +struct VRControllerState001_t +{ + // If packet num matches that on your prior call, then the controller state hasn't been changed since + // your last call and there is no need to process it + uint32_t unPacketNum; + + // bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + + // Axis data for the controller's analog inputs + VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ]; +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +typedef VRControllerState001_t VRControllerState_t; + + +/** determines how to provide output to the application of various event processing functions. */ +enum EVRControllerEventOutputType +{ + ControllerEventOutput_OSEvents = 0, + ControllerEventOutput_VREvents = 1, +}; + + + +/** Collision Bounds Style */ +enum ECollisionBoundsStyle +{ + COLLISION_BOUNDS_STYLE_BEGINNER = 0, + COLLISION_BOUNDS_STYLE_INTERMEDIATE, + COLLISION_BOUNDS_STYLE_SQUARES, + COLLISION_BOUNDS_STYLE_ADVANCED, + COLLISION_BOUNDS_STYLE_NONE, + + COLLISION_BOUNDS_STYLE_COUNT +}; + +/** Allows the application to customize how the overlay appears in the compositor */ +struct Compositor_OverlaySettings +{ + uint32_t size; // sizeof(Compositor_OverlaySettings) + bool curved, antialias; + float scale, distance, alpha; + float uOffset, vOffset, uScale, vScale; + float gridDivs, gridWidth, gridScale; + HmdMatrix44_t transform; +}; + +/** used to refer to a single VR overlay */ +typedef uint64_t VROverlayHandle_t; + +static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0; + +/** Errors that can occur around VR overlays */ +enum EVROverlayError +{ + VROverlayError_None = 0, + + VROverlayError_UnknownOverlay = 10, + VROverlayError_InvalidHandle = 11, + VROverlayError_PermissionDenied = 12, + VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist + VROverlayError_WrongVisibilityType = 14, + VROverlayError_KeyTooLong = 15, + VROverlayError_NameTooLong = 16, + VROverlayError_KeyInUse = 17, + VROverlayError_WrongTransformType = 18, + VROverlayError_InvalidTrackedDevice = 19, + VROverlayError_InvalidParameter = 20, + VROverlayError_ThumbnailCantBeDestroyed = 21, + VROverlayError_ArrayTooSmall = 22, + VROverlayError_RequestFailed = 23, + VROverlayError_InvalidTexture = 24, + VROverlayError_UnableToLoadFile = 25, + VROverlayError_KeyboardAlreadyInUse = 26, + VROverlayError_NoNeighbor = 27, + VROverlayError_TooManyMaskPrimitives = 29, + VROverlayError_BadMaskPrimitive = 30, + VROverlayError_TextureAlreadyLocked = 31, + VROverlayError_TextureLockCapacityReached = 32, + VROverlayError_TextureNotLocked = 33, +}; + +/** enum values to pass in to VR_Init to identify whether the application will +* draw a 3D scene. */ +enum EVRApplicationType +{ + VRApplication_Other = 0, // Some other kind of application that isn't covered by the other entries + VRApplication_Scene = 1, // Application will submit 3D frames + VRApplication_Overlay = 2, // Application only interacts with overlays + VRApplication_Background = 3, // Application should not start SteamVR if it's not already running, and should not + // keep it running if everything else quits. + VRApplication_Utility = 4, // Init should not try to load any drivers. The application needs access to utility + // interfaces (like IVRSettings and IVRApplications) but not hardware. + VRApplication_VRMonitor = 5, // Reserved for vrmonitor + VRApplication_SteamWatchdog = 6,// Reserved for Steam + VRApplication_Bootstrapper = 7, // reserved for vrstartup + VRApplication_WebHelper = 8, // reserved for vrwebhelper + + VRApplication_Max +}; + + +/** error codes for firmware */ +enum EVRFirmwareError +{ + VRFirmwareError_None = 0, + VRFirmwareError_Success = 1, + VRFirmwareError_Fail = 2, +}; + + +/** error codes for notifications */ +enum EVRNotificationError +{ + VRNotificationError_OK = 0, + VRNotificationError_InvalidNotificationId = 100, + VRNotificationError_NotificationQueueFull = 101, + VRNotificationError_InvalidOverlayHandle = 102, + VRNotificationError_SystemWithUserValueAlreadyExists = 103, +}; + + +enum EVRSkeletalMotionRange +{ + // The range of motion of the skeleton takes into account any physical limits imposed by + // the controller itself. This will tend to be the most accurate pose compared to the user's + // actual hand pose, but might not allow a closed fist for example + VRSkeletalMotionRange_WithController = 0, + + // Retarget the range of motion provided by the input device to make the hand appear to move + // as if it was not holding a controller. eg: map "hand grasping controller" to "closed fist" + VRSkeletalMotionRange_WithoutController = 1, +}; + +enum EVRSkeletalTrackingLevel +{ + // body part location can't be directly determined by the device. Any skeletal pose provided by + // the device is estimated by assuming the position required to active buttons, triggers, joysticks, + // or other input sensors. + // E.g. Vive Controller, Gamepad + VRSkeletalTracking_Estimated = 0, + + // body part location can be measured directly but with fewer degrees of freedom than the actual body + // part. Certain body part positions may be unmeasured by the device and estimated from other input data. + // E.g. Index Controllers, gloves that only measure finger curl + VRSkeletalTracking_Partial, + + // Body part location can be measured directly throughout the entire range of motion of the body part. + // E.g. Mocap suit for the full body, gloves that measure rotation of each finger segment + VRSkeletalTracking_Full, + + VRSkeletalTrackingLevel_Count, + VRSkeletalTrackingLevel_Max = VRSkeletalTrackingLevel_Count - 1 +}; + + + +/** Holds the transform for a single bone */ +struct VRBoneTransform_t +{ + HmdVector4_t position; + HmdQuaternionf_t orientation; +}; + +/** Type used for referring to bones by their index */ +typedef int32_t BoneIndex_t; +const BoneIndex_t k_unInvalidBoneIndex = -1; + + +/** error codes returned by Vr_Init */ + +// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp +enum EVRInitError +{ + VRInitError_None = 0, + VRInitError_Unknown = 1, + + VRInitError_Init_InstallationNotFound = 100, + VRInitError_Init_InstallationCorrupt = 101, + VRInitError_Init_VRClientDLLNotFound = 102, + VRInitError_Init_FileNotFound = 103, + VRInitError_Init_FactoryNotFound = 104, + VRInitError_Init_InterfaceNotFound = 105, + VRInitError_Init_InvalidInterface = 106, + VRInitError_Init_UserConfigDirectoryInvalid = 107, + VRInitError_Init_HmdNotFound = 108, + VRInitError_Init_NotInitialized = 109, + VRInitError_Init_PathRegistryNotFound = 110, + VRInitError_Init_NoConfigPath = 111, + VRInitError_Init_NoLogPath = 112, + VRInitError_Init_PathRegistryNotWritable = 113, + VRInitError_Init_AppInfoInitFailed = 114, + VRInitError_Init_Retry = 115, // Used internally to cause retries to vrserver + VRInitError_Init_InitCanceledByUser = 116, // The calling application should silently exit. The user canceled app startup + VRInitError_Init_AnotherAppLaunching = 117, + VRInitError_Init_SettingsInitFailed = 118, + VRInitError_Init_ShuttingDown = 119, + VRInitError_Init_TooManyObjects = 120, + VRInitError_Init_NoServerForBackgroundApp = 121, + VRInitError_Init_NotSupportedWithCompositor = 122, + VRInitError_Init_NotAvailableToUtilityApps = 123, + VRInitError_Init_Internal = 124, + VRInitError_Init_HmdDriverIdIsNone = 125, + VRInitError_Init_HmdNotFoundPresenceFailed = 126, + VRInitError_Init_VRMonitorNotFound = 127, + VRInitError_Init_VRMonitorStartupFailed = 128, + VRInitError_Init_LowPowerWatchdogNotSupported = 129, + VRInitError_Init_InvalidApplicationType = 130, + VRInitError_Init_NotAvailableToWatchdogApps = 131, + VRInitError_Init_WatchdogDisabledInSettings = 132, + VRInitError_Init_VRDashboardNotFound = 133, + VRInitError_Init_VRDashboardStartupFailed = 134, + VRInitError_Init_VRHomeNotFound = 135, + VRInitError_Init_VRHomeStartupFailed = 136, + VRInitError_Init_RebootingBusy = 137, + VRInitError_Init_FirmwareUpdateBusy = 138, + VRInitError_Init_FirmwareRecoveryBusy = 139, + VRInitError_Init_USBServiceBusy = 140, + VRInitError_Init_VRWebHelperStartupFailed = 141, + VRInitError_Init_TrackerManagerInitFailed = 142, + VRInitError_Init_AlreadyRunning = 143, + VRInitError_Init_FailedForVrMonitor = 144, + VRInitError_Init_PropertyManagerInitFailed = 145, + VRInitError_Init_WebServerFailed = 146, + + VRInitError_Driver_Failed = 200, + VRInitError_Driver_Unknown = 201, + VRInitError_Driver_HmdUnknown = 202, + VRInitError_Driver_NotLoaded = 203, + VRInitError_Driver_RuntimeOutOfDate = 204, + VRInitError_Driver_HmdInUse = 205, + VRInitError_Driver_NotCalibrated = 206, + VRInitError_Driver_CalibrationInvalid = 207, + VRInitError_Driver_HmdDisplayNotFound = 208, + VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209, + // VRInitError_Driver_HmdDisplayNotFoundAfterFix = 210, // not needed: here for historic reasons + VRInitError_Driver_HmdDriverIdOutOfBounds = 211, + VRInitError_Driver_HmdDisplayMirrored = 212, + VRInitError_Driver_HmdDisplayNotFoundLaptop = 213, + // Never make error 259 because we return it from main and it would conflict with STILL_ACTIVE + + VRInitError_IPC_ServerInitFailed = 300, + VRInitError_IPC_ConnectFailed = 301, + VRInitError_IPC_SharedStateInitFailed = 302, + VRInitError_IPC_CompositorInitFailed = 303, + VRInitError_IPC_MutexInitFailed = 304, + VRInitError_IPC_Failed = 305, + VRInitError_IPC_CompositorConnectFailed = 306, + VRInitError_IPC_CompositorInvalidConnectResponse = 307, + VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308, + VRInitError_IPC_ConnectFailedAfterTargetExited = 309, + VRInitError_IPC_NamespaceUnavailable = 310, + + VRInitError_Compositor_Failed = 400, + VRInitError_Compositor_D3D11HardwareRequired = 401, + VRInitError_Compositor_FirmwareRequiresUpdate = 402, + VRInitError_Compositor_OverlayInitFailed = 403, + VRInitError_Compositor_ScreenshotsInitFailed = 404, + VRInitError_Compositor_UnableToCreateDevice = 405, + VRInitError_Compositor_SharedStateIsNull = 406, + VRInitError_Compositor_NotificationManagerIsNull = 407, + VRInitError_Compositor_ResourceManagerClientIsNull = 408, + VRInitError_Compositor_MessageOverlaySharedStateInitFailure = 409, + VRInitError_Compositor_PropertiesInterfaceIsNull = 410, + VRInitError_Compositor_CreateFullscreenWindowFailed = 411, + VRInitError_Compositor_SettingsInterfaceIsNull = 412, + VRInitError_Compositor_FailedToShowWindow = 413, + VRInitError_Compositor_DistortInterfaceIsNull = 414, + VRInitError_Compositor_DisplayFrequencyFailure = 415, + VRInitError_Compositor_RendererInitializationFailed = 416, + VRInitError_Compositor_DXGIFactoryInterfaceIsNull = 417, + VRInitError_Compositor_DXGIFactoryCreateFailed = 418, + VRInitError_Compositor_DXGIFactoryQueryFailed = 419, + VRInitError_Compositor_InvalidAdapterDesktop = 420, + VRInitError_Compositor_InvalidHmdAttachment = 421, + VRInitError_Compositor_InvalidOutputDesktop = 422, + VRInitError_Compositor_InvalidDeviceProvided = 423, + VRInitError_Compositor_D3D11RendererInitializationFailed = 424, + VRInitError_Compositor_FailedToFindDisplayMode = 425, + VRInitError_Compositor_FailedToCreateSwapChain = 426, + VRInitError_Compositor_FailedToGetBackBuffer = 427, + VRInitError_Compositor_FailedToCreateRenderTarget = 428, + VRInitError_Compositor_FailedToCreateDXGI2SwapChain = 429, + VRInitError_Compositor_FailedtoGetDXGI2BackBuffer = 430, + VRInitError_Compositor_FailedToCreateDXGI2RenderTarget = 431, + VRInitError_Compositor_FailedToGetDXGIDeviceInterface = 432, + VRInitError_Compositor_SelectDisplayMode = 433, + VRInitError_Compositor_FailedToCreateNvAPIRenderTargets = 434, + VRInitError_Compositor_NvAPISetDisplayMode = 435, + VRInitError_Compositor_FailedToCreateDirectModeDisplay = 436, + VRInitError_Compositor_InvalidHmdPropertyContainer = 437, + VRInitError_Compositor_UpdateDisplayFrequency = 438, + VRInitError_Compositor_CreateRasterizerState = 439, + VRInitError_Compositor_CreateWireframeRasterizerState = 440, + VRInitError_Compositor_CreateSamplerState = 441, + VRInitError_Compositor_CreateClampToBorderSamplerState = 442, + VRInitError_Compositor_CreateAnisoSamplerState = 443, + VRInitError_Compositor_CreateOverlaySamplerState = 444, + VRInitError_Compositor_CreatePanoramaSamplerState = 445, + VRInitError_Compositor_CreateFontSamplerState = 446, + VRInitError_Compositor_CreateNoBlendState = 447, + VRInitError_Compositor_CreateBlendState = 448, + VRInitError_Compositor_CreateAlphaBlendState = 449, + VRInitError_Compositor_CreateBlendStateMaskR = 450, + VRInitError_Compositor_CreateBlendStateMaskG = 451, + VRInitError_Compositor_CreateBlendStateMaskB = 452, + VRInitError_Compositor_CreateDepthStencilState = 453, + VRInitError_Compositor_CreateDepthStencilStateNoWrite = 454, + VRInitError_Compositor_CreateDepthStencilStateNoDepth = 455, + VRInitError_Compositor_CreateFlushTexture = 456, + VRInitError_Compositor_CreateDistortionSurfaces = 457, + VRInitError_Compositor_CreateConstantBuffer = 458, + VRInitError_Compositor_CreateHmdPoseConstantBuffer = 459, + VRInitError_Compositor_CreateHmdPoseStagingConstantBuffer = 460, + VRInitError_Compositor_CreateSharedFrameInfoConstantBuffer = 461, + VRInitError_Compositor_CreateOverlayConstantBuffer = 462, + VRInitError_Compositor_CreateSceneTextureIndexConstantBuffer = 463, + VRInitError_Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464, + VRInitError_Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465, + VRInitError_Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466, + VRInitError_Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467, + VRInitError_Compositor_CreateComputeHmdPoseConstantBuffer = 468, + VRInitError_Compositor_CreateGeomConstantBuffer = 469, + VRInitError_Compositor_CreatePanelMaskConstantBuffer = 470, + VRInitError_Compositor_CreatePixelSimUBO = 471, + VRInitError_Compositor_CreateMSAARenderTextures = 472, + VRInitError_Compositor_CreateResolveRenderTextures = 473, + VRInitError_Compositor_CreateComputeResolveRenderTextures = 474, + VRInitError_Compositor_CreateDriverDirectModeResolveTextures = 475, + VRInitError_Compositor_OpenDriverDirectModeResolveTextures = 476, + VRInitError_Compositor_CreateFallbackSyncTexture = 477, + VRInitError_Compositor_ShareFallbackSyncTexture = 478, + VRInitError_Compositor_CreateOverlayIndexBuffer = 479, + VRInitError_Compositor_CreateOverlayVertextBuffer = 480, + VRInitError_Compositor_CreateTextVertexBuffer = 481, + VRInitError_Compositor_CreateTextIndexBuffer = 482, + VRInitError_Compositor_CreateMirrorTextures = 483, + VRInitError_Compositor_CreateLastFrameRenderTexture = 484, + VRInitError_Compositor_CreateMirrorOverlay = 485, + VRInitError_Compositor_FailedToCreateVirtualDisplayBackbuffer = 486, + VRInitError_Compositor_DisplayModeNotSupported = 487, + + VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000, + VRInitError_VendorSpecific_WindowsNotInDevMode = 1001, + + VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101, + VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102, + VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103, + VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104, + VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105, + VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106, + VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107, + VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109, + VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110, + VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111, + VRInitError_VendorSpecific_HmdFound_UserDataError = 1112, + VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113, + VRInitError_VendorSpecific_OculusRuntimeBadInstall = 1114, + + VRInitError_Steam_SteamInstallationNotFound = 2000, + + // Strictly a placeholder + VRInitError_LastError +}; + +enum EVRScreenshotType +{ + VRScreenshotType_None = 0, + VRScreenshotType_Mono = 1, // left eye only + VRScreenshotType_Stereo = 2, + VRScreenshotType_Cubemap = 3, + VRScreenshotType_MonoPanorama = 4, + VRScreenshotType_StereoPanorama = 5 +}; + +enum EVRScreenshotPropertyFilenames +{ + VRScreenshotPropertyFilenames_Preview = 0, + VRScreenshotPropertyFilenames_VR = 1, +}; + +enum EVRTrackedCameraError +{ + VRTrackedCameraError_None = 0, + VRTrackedCameraError_OperationFailed = 100, + VRTrackedCameraError_InvalidHandle = 101, + VRTrackedCameraError_InvalidFrameHeaderVersion = 102, + VRTrackedCameraError_OutOfHandles = 103, + VRTrackedCameraError_IPCFailure = 104, + VRTrackedCameraError_NotSupportedForThisDevice = 105, + VRTrackedCameraError_SharedMemoryFailure = 106, + VRTrackedCameraError_FrameBufferingFailure = 107, + VRTrackedCameraError_StreamSetupFailure = 108, + VRTrackedCameraError_InvalidGLTextureId = 109, + VRTrackedCameraError_InvalidSharedTextureHandle = 110, + VRTrackedCameraError_FailedToGetGLTextureId = 111, + VRTrackedCameraError_SharedTextureFailure = 112, + VRTrackedCameraError_NoFrameAvailable = 113, + VRTrackedCameraError_InvalidArgument = 114, + VRTrackedCameraError_InvalidFrameBufferSize = 115, +}; + +enum EVRTrackedCameraFrameLayout +{ + EVRTrackedCameraFrameLayout_Mono = 0x0001, + EVRTrackedCameraFrameLayout_Stereo = 0x0002, + EVRTrackedCameraFrameLayout_VerticalLayout = 0x0010, // Stereo frames are Top/Bottom (left/right) + EVRTrackedCameraFrameLayout_HorizontalLayout = 0x0020, // Stereo frames are Left/Right +}; + +enum EVRTrackedCameraFrameType +{ + VRTrackedCameraFrameType_Distorted = 0, // This is the camera video frame size in pixels, still distorted. + VRTrackedCameraFrameType_Undistorted, // In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly. + VRTrackedCameraFrameType_MaximumUndistorted, // In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions. + MAX_CAMERA_FRAME_TYPES +}; + +enum EVRDistortionFunctionType +{ + VRDistortionFunctionType_None, + VRDistortionFunctionType_FTheta, + VRDistortionFunctionType_Extended_FTheta, + MAX_DISTORTION_FUNCTION_TYPES, +}; + +static const uint32_t k_unMaxDistortionFunctionParameters = 8; + +typedef uint64_t TrackedCameraHandle_t; +#define INVALID_TRACKED_CAMERA_HANDLE ((vr::TrackedCameraHandle_t)0) + +struct CameraVideoStreamFrameHeader_t +{ + EVRTrackedCameraFrameType eFrameType; + + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + + uint32_t nFrameSequence; + + TrackedDevicePose_t trackedDevicePose; + + uint64_t ulFrameExposureTime; // mid-point of the exposure of the image in host system ticks +}; + +// Screenshot types +typedef uint32_t ScreenshotHandle_t; + +static const uint32_t k_unScreenshotHandleInvalid = 0; + +/** Compositor frame timing reprojection flags. */ +const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01; +const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02; +const uint32_t VRCompositor_ReprojectionAsync = 0x04; // This flag indicates the async reprojection mode is active, + // but does not indicate if reprojection actually happened or not. + // Use the ReprojectionReason flags above to check if reprojection + // was actually applied (i.e. scene texture was reused). + // NumFramePresents > 1 also indicates the scene texture was reused, + // and also the number of times that it was presented in total. + +const uint32_t VRCompositor_ReprojectionMotion = 0x08; // This flag indicates whether or not motion smoothing was triggered for this frame + +const uint32_t VRCompositor_PredictionMask = 0x30; // The runtime may predict more than one frame (up to four) ahead if + // it detects the application is taking too long to render. These two + // bits will contain the count of additional frames (normally zero). + // Use the VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES macro to read from + // the latest frame timing entry. + +const uint32_t VRCompositor_ThrottleMask = 0xC0; // Number of frames the compositor is throttling the application. + // Use the VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES macro to read from + // the latest frame timing entry. + +#define VR_COMPOSITOR_ADDITIONAL_PREDICTED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_PredictionMask ) >> 4 ) +#define VR_COMPOSITOR_NUMBER_OF_THROTTLED_FRAMES( timing ) ( ( ( timing ).m_nReprojectionFlags & vr::VRCompositor_ThrottleMask ) >> 6 ) + +/** Provides a single frame's timing information to the app */ +struct Compositor_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming ) + uint32_t m_nFrameIndex; + uint32_t m_nNumFramePresents; // number of times this frame was presented + uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out + uint32_t m_nReprojectionFlags; + + /** Absolute time reference for comparing frames. This aligns with the vsync that running start is relative to. */ + double m_flSystemTimeInSeconds; + + /** These times may include work from other processes due to OS scheduling. + * The fewer packets of work these are broken up into, the less likely this will happen. + * GPU work can be broken up by calling Flush. This can sometimes be useful to get the GPU started + * processing that work earlier in the frame. */ + float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit) + float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window) + float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work + float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc. + float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame + float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time) + + /** Miscellaneous measured intervals. */ + float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses + float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long) + float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure) + float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue) + + /** The following are all relative to this frame's SystemTimeInSeconds */ + float m_flWaitGetPosesCalledMs; + float m_flNewPosesReadyMs; + float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit + float m_flCompositorUpdateStartMs; + float m_flCompositorUpdateEndMs; + float m_flCompositorRenderStartMs; + + vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame + + uint32_t m_nNumVSyncsReadyForUse; + uint32_t m_nNumVSyncsToFirstView; +}; + +/** Frame timing data provided by direct mode drivers. */ +struct DriverDirectMode_FrameTiming +{ + uint32_t m_nSize; // Set to sizeof( DriverDirectMode_FrameTiming ) + uint32_t m_nNumFramePresents; // number of times frame was presented + uint32_t m_nNumMisPresented; // number of times frame was presented on a vsync other than it was originally predicted to + uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out (i.e. compositor missed vsync) + uint32_t m_nReprojectionFlags; +}; + +enum EVSync +{ + VSync_None, + VSync_WaitRender, // block following render work until vsync + VSync_NoWaitRender, // do not block following render work (allow to get started early) +}; + +enum EVRMuraCorrectionMode +{ + EVRMuraCorrectionMode_Default = 0, + EVRMuraCorrectionMode_NoCorrection +}; + +/** raw IMU data provided by IVRIOBuffer from paths to tracked devices with IMUs */ +enum Imu_OffScaleFlags +{ + OffScale_AccelX = 0x01, + OffScale_AccelY = 0x02, + OffScale_AccelZ = 0x04, + OffScale_GyroX = 0x08, + OffScale_GyroY = 0x10, + OffScale_GyroZ = 0x20, +}; + +struct ImuSample_t +{ + double fSampleTime; + HmdVector3d_t vAccel; + HmdVector3d_t vGyro; + uint32_t unOffScaleFlags; +}; + +#pragma pack( pop ) + +// figure out how to import from the VR API dll +#if defined(_WIN32) + + #if !defined(OPENVR_BUILD_STATIC) + #ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __declspec( dllexport ) + #else + #define VR_INTERFACE extern "C" __declspec( dllimport ) + #endif + #else + #define VR_INTERFACE extern "C" + #endif + +#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__) + +#ifdef VR_API_EXPORT + #define VR_INTERFACE extern "C" __attribute__((visibility("default"))) +#else + #define VR_INTERFACE extern "C" +#endif + +#else + #error "Unsupported Platform." +#endif + + +#if defined( _WIN32 ) + #define VR_CALLTYPE __cdecl +#else + #define VR_CALLTYPE +#endif + +} // namespace vr + +#endif // _INCLUDE_VRTYPES_H + + +// vrannotation.h +#ifdef API_GEN +# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR ))) +#else +# define VR_CLANG_ATTR(ATTR) +#endif + +#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" ) +#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" ) +#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" ) +#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" ) +#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" ) +#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" ) +#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC ) +#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" ) +#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" ) +#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" ) + +// ivrsystem.h +namespace vr +{ + +class IVRSystem +{ +public: + + + // ------------------------------------ + // Display Methods + // ------------------------------------ + + /** Suggested size for the intermediate render target that the distortion pulls from. */ + virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** The projection matrix for the specified eye */ + virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0; + + /** The components necessary to build your own projection matrix in case your + * application is doing something fancy like infinite Z */ + virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0; + + /** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in + * the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. + * Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */ + virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0; + + /** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head + * space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. + * Normally View and Eye^-1 will be multiplied together and treated as View in your application. + */ + virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0; + + /** Returns the number of elapsed seconds since the last recorded vsync event. This + * will come from a vsync timer event in the timer if possible or from the application-reported + * time if that is not available. If no vsync times are available the function will + * return zero for vsync time and frame counter and return false from the method. */ + virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0; + + /** [D3D9 Only] + * Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such + * a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error. + */ + virtual int32_t GetD3D9AdapterIndex() = 0; + + /** [D3D10/11 Only] + * Returns the adapter index that the user should pass into EnumAdapters to create the device + * and swap chain in DX10 and DX11. If an error occurs the index will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0; + + /** + * Returns platform- and texture-type specific adapter identification so that applications and the + * compositor are creating textures and swap chains on the same GPU. If an error occurs the device + * will be set to 0. + * pInstance is an optional parameter that is required only when textureType is TextureType_Vulkan. + * [D3D10/11/12 Only (D3D9 Not Supported)] + * Returns the adapter LUID that identifies the GPU attached to the HMD. The user should + * enumerate all adapters using IDXGIFactory::EnumAdapters and IDXGIAdapter::GetDesc to find + * the adapter with the matching LUID, or use IDXGIFactory4::EnumAdapterByLuid. + * The discovered IDXGIAdapter should be used to create the device and swap chain. + * [Vulkan Only] + * Returns the VkPhysicalDevice that should be used by the application. + * pInstance must be the instance the application will use to query for the VkPhysicalDevice. The application + * must create the VkInstance with extensions returned by IVRCompositor::GetVulkanInstanceExtensionsRequired enabled. + * [macOS Only] + * For TextureType_IOSurface returns the id that should be used by the application. + * On 10.13+ for TextureType_OpenGL returns the 'registryId' of the renderer which should be used + * by the application. See Apple Technical Q&A QA1168 for information on enumerating GL Renderers, and the + * new kCGLRPRegistryIDLow and kCGLRPRegistryIDHigh CGLRendererProperty values in the 10.13 SDK. + * Pre 10.13 for TextureType_OpenGL returns 0, as there is no dependable way to correlate the HMDs MTLDevice + * with a GL Renderer. + */ + virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType, VkInstance_T *pInstance = nullptr ) = 0; + + // ------------------------------------ + // Display Mode methods + // ------------------------------------ + + /** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */ + virtual bool IsDisplayOnDesktop() = 0; + + /** Set the display visibility (true = extended, false = direct mode). Return value of true indicates that the change was successful. */ + virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0; + + // ------------------------------------ + // Tracking Methods + // ------------------------------------ + + /** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the + * future. Pass 0 to get the state at the instant the method is called. Most of the time the application should + * calculate the time until the photons will be emitted from the display and pass that time into the method. + * + * This is roughly analogous to the inverse of the view matrix in most applications, though + * many games will need to do some additional rotation or translation on top of the rotation + * and translation provided by the head pose. + * + * For devices where bPoseIsValid is true the application can use the pose to position the device + * in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. + * + * Seated experiences should call this method with TrackingUniverseSeated and receive poses relative + * to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding + * and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should + * probably not be used unless the application is the Chaperone calibration tool itself, but will provide + * poses relative to the hardware-specific coordinate system in the driver. + */ + virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0; + + /** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After + * ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin + * will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis + * is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to + * ResetSeatedZeroPose may not be exactly an identity matrix. + * + * NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. + * Users are also able to set their seated zero pose via the OpenVR Dashboard. + **/ + virtual void ResetSeatedZeroPose() = 0; + + /** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows + * applications to represent the seated origin to used or transform object positions from one coordinate + * system to the other. + * + * The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position + * depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */ + virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Returns the transform from the tracking origin to the standing absolute tracking system. This allows + * applications to convert from raw tracking space to the calibrated standing coordinate system. */ + virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0; + + /** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers). Devices are sorted right to left + * relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space). Returns the number of devices + * in the list, or the size of the array needed if not large enough. */ + virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0; + + /** Returns the level of activity on the device. */ + virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0; + + /** Convenience utility to apply the specified transform to the specified pose. + * This properly transforms all pose components, including velocity and angular velocity + */ + virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0; + + /** Returns the device index associated with a specific role, for example the left hand or the right hand. This function is deprecated in favor of the new IVRInput system. */ + virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0; + + /** Returns the controller type associated with a device index. This function is deprecated in favor of the new IVRInput system. */ + virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Property methods + // ------------------------------------ + + /** Returns the device class of a tracked device. If there has not been a device connected in this slot + * since the application started this function will return TrackedDevice_Invalid. For previous detected + * devices the function will return the previously observed device class. + * + * To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check + * the device class. Every device with something other than TrackedDevice_Invalid is associated with an + * actual tracked device. */ + virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns true if there is a device connected in this slot. */ + virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + /** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */ + virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */ + virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */ + virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */ + virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */ + virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns an array of one type of property. If the device index is not valid or the property is not a single value or an array of the specified type, + * this function will return 0. Otherwise it returns the number of bytes necessary to hold the array of properties. If unBufferSize is + * greater than the returned size and pBuffer is non-NULL, pBuffer is filled with the contents of array of properties. */ + virtual uint32_t GetArrayTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, PropertyTypeTag_t propType, void *pBuffer, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** Returns a string property. If the device index is not valid or the property is not a string type this function will + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */ + virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0; + + /** returns a string that corresponds with the specified property error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0; + + // ------------------------------------ + // Event methods + // ------------------------------------ + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns true and fills the event with the next event on the queue if there is one. If there are no events + * this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. + * This pose will always be older than the call to this function and should not be used to render the device. + uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** returns the name of an EVREvent enum value */ + virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0; + + // ------------------------------------ + // Rendering helper methods + // ------------------------------------ + + /** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is + * applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively. + * This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. + * This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader. + * NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye. + * Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover. + * Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices. + */ + virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0; + + // ------------------------------------ + // Controller methods + // ------------------------------------ + + /** Fills the supplied struct with the current state of the controller. Returns false if the controller index + * is invalid. This function is deprecated in favor of the new IVRInput system. */ + virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0; + + /** fills the supplied struct with the current state of the controller and the provided pose with the pose of + * the controller when the controller state was updated most recently. Use this form if you need a precise controller + * pose as input to your application when the user presses or releases a button. This function is deprecated in favor of the new IVRInput system. */ + virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0; + + /** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller + * and axis combination for 5ms. This function is deprecated in favor of the new IVRInput system. */ + virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0; + + /** returns the name of an EVRButtonId enum value. This function is deprecated in favor of the new IVRInput system. */ + virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0; + + /** returns the name of an EVRControllerAxisType enum value. This function is deprecated in favor of the new IVRInput system. */ + virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0; + + /** Returns true if this application is receiving input from the system. This would return false if + * system-related functionality is consuming the input stream. */ + virtual bool IsInputAvailable() = 0; + + /** Returns true SteamVR is drawing controllers on top of the application. Applications should consider + * not drawing anything attached to the user's hands in this case. */ + virtual bool IsSteamVRDrawingControllers() = 0; + + /** Returns true if the user has put SteamVR into a mode that is distracting them from the application. + * For applications where this is appropriate, the application should pause ongoing activity. */ + virtual bool ShouldApplicationPause() = 0; + + /** Returns true if SteamVR is doing significant rendering work and the game should do what it can to reduce + * its own workload. One common way to do this is to reduce the size of the render target provided for each eye. */ + virtual bool ShouldApplicationReduceRenderingWork() = 0; + + // ------------------------------------ + // Firmware methods + // ------------------------------------ + + /** Performs the actual firmware update if applicable. + * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished + * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String + * to figure our whether a firmware update is available, and to figure out whether its a manual update + * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */ + virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0; + + // ------------------------------------ + // Application life cycle methods + // ------------------------------------ + + /** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting. + * This extends the timeout until the process is killed. */ + virtual void AcknowledgeQuit_Exiting() = 0; + + // ------------------------------------- + // App container sandbox methods + // ------------------------------------- + + /** Retrieves a null-terminated, semicolon-delimited list of UTF8 file paths that an application + * must have read access to when running inside of an app container. Returns the number of bytes + * needed to hold the list. */ + virtual uint32_t GetAppContainerFilePaths( VR_OUT_STRING() char *pchBuffer, uint32_t unBufferSize ) = 0; + + // ------------------------------------- + // System methods + // ------------------------------------- + + /** Returns the current version of the SteamVR runtime. The returned string will remain valid until VR_Shutdown is called. + * + * NOTE: Is it not appropriate to use this version to test for the presence of any SteamVR feature. Only use this version + * number for logging or showing to a user, and not to try to detect anything at runtime. When appropriate, feature-specific + * presence information is provided by other APIs. */ + virtual const char *GetRuntimeVersion() = 0; + +}; + +static const char * const IVRSystem_Version = "IVRSystem_021"; + +} + + +// ivrapplications.h +namespace vr +{ + + /** Used for all errors reported by the IVRApplications interface */ + enum EVRApplicationError + { + VRApplicationError_None = 0, + + VRApplicationError_AppKeyAlreadyExists = 100, // Only one application can use any given key + VRApplicationError_NoManifest = 101, // the running application does not have a manifest + VRApplicationError_NoApplication = 102, // No application is running + VRApplicationError_InvalidIndex = 103, + VRApplicationError_UnknownApplication = 104, // the application could not be found + VRApplicationError_IPCFailed = 105, // An IPC failure caused the request to fail + VRApplicationError_ApplicationAlreadyRunning = 106, + VRApplicationError_InvalidManifest = 107, + VRApplicationError_InvalidApplication = 108, + VRApplicationError_LaunchFailed = 109, // the process didn't start + VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application + VRApplicationError_LaunchInProgress = 111, // The system was already starting a different application + VRApplicationError_OldApplicationQuitting = 112, + VRApplicationError_TransitionAborted = 113, + VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication) + VRApplicationError_SteamVRIsExiting = 115, + + VRApplicationError_BufferTooSmall = 200, // The provided buffer was too small to fit the requested data + VRApplicationError_PropertyNotSet = 201, // The requested property was not set + VRApplicationError_UnknownProperty = 202, + VRApplicationError_InvalidParameter = 203, + }; + + /** The maximum length of an application key */ + static const uint32_t k_unMaxApplicationKeyLength = 128; + + /** these are the properties available on applications. */ + enum EVRApplicationProperty + { + VRApplicationProperty_Name_String = 0, + + VRApplicationProperty_LaunchType_String = 11, + VRApplicationProperty_WorkingDirectory_String = 12, + VRApplicationProperty_BinaryPath_String = 13, + VRApplicationProperty_Arguments_String = 14, + VRApplicationProperty_URL_String = 15, + + VRApplicationProperty_Description_String = 50, + VRApplicationProperty_NewsURL_String = 51, + VRApplicationProperty_ImagePath_String = 52, + VRApplicationProperty_Source_String = 53, + VRApplicationProperty_ActionManifestURL_String = 54, + + VRApplicationProperty_IsDashboardOverlay_Bool = 60, + VRApplicationProperty_IsTemplate_Bool = 61, + VRApplicationProperty_IsInstanced_Bool = 62, + VRApplicationProperty_IsInternal_Bool = 63, + VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64, + VRApplicationProperty_IsHidden_Bool = 65, + + VRApplicationProperty_LastLaunchTime_Uint64 = 70, + }; + + enum EVRSceneApplicationState + { + EVRSceneApplicationState_None = 0, // Scene Application is not running + EVRSceneApplicationState_Starting = 1, // Scene Application is starting + EVRSceneApplicationState_Quitting = 2, // Scene Application is quitting + EVRSceneApplicationState_Running = 3, // Scene Application is running, and submitting frames, a custom skybox, or a visible overlay + EVRSceneApplicationState_Waiting = 4, // Scene Application is running, but not drawing anything + }; + + struct AppOverrideKeys_t + { + const char *pchKey; + const char *pchValue; + }; + + /** Currently recognized mime types */ + static const char * const k_pch_MimeType_HomeApp = "vr/home"; + static const char * const k_pch_MimeType_GameTheater = "vr/game_theater"; + + class IVRApplications + { + public: + + // --------------- Application management --------------- // + + /** Adds an application manifest to the list to load when building the list of installed applications. + * Temporary manifests are not automatically loaded */ + virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0; + + /** Removes an application manifest from the list to load when building the list of installed applications. */ + virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0; + + /** Returns true if an application is installed */ + virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0; + + /** Returns the number of applications available in the list */ + virtual uint32_t GetApplicationCount() = 0; + + /** Returns the key of the specified application. The index is at least 0 and is less than the return + * value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to + * fit the key. */ + virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the key of the application for the specified Process Id. The buffer should be at least + * k_unMaxApplicationKeyLength in order to fit the key. */ + virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Launches the application. The existing scene application will exit and then the new application will start. + * This call is not valid for dashboard overlay applications. */ + virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0; + + /** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections + * from the manifest file via AppOverrideKeys_t + */ + virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0; + + /** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */ + virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0; + + /** Launches the dashboard overlay application if it is not already running. This call is only valid for + * dashboard overlay applications. */ + virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0; + + /** Cancel a pending launch for an application */ + virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0; + + /** Identifies a running application. OpenVR can't always tell which process started in response + * to a URL. This function allows a URL handler (or the process itself) to identify the app key + * for the now running application. Passing a process ID of 0 identifies the calling process. + * The application must be one that's known to the system via a call to AddApplicationManifest. */ + virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0; + + /** Returns the process ID for an application. Return 0 if the application was not found or is not running. */ + virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0; + + /** Returns a string for an applications error */ + virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0; + + // --------------- Application properties --------------- // + + /** Returns a value for an application property. The required buffer size to fit this value will be returned. */ + virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a bool value for an application property. Returns false in all error cases. */ + virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Returns a uint64 value for an application property. Returns 0 in all error cases. */ + virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0; + + /** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0; + + /** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */ + virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0; + + /** Adds this mime-type to the list of supported mime types for this application*/ + virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0; + + /** return the app key that will open this mime type */ + virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Get the list of supported mime types for this application, comma-delimited */ + virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, VR_OUT_STRING() char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0; + + /** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */ + virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, VR_OUT_STRING() char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0; + + /** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */ + virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, VR_OUT_STRING() char *pchArgs, uint32_t unArgs ) = 0; + + // --------------- Transition methods --------------- // + + /** Returns the app key for the application that is starting up */ + virtual EVRApplicationError GetStartingApplication( VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0; + + /** Returns the application transition state */ + virtual EVRSceneApplicationState GetSceneApplicationState() = 0; + + /** Returns errors that would prevent the specified application from launching immediately. Calling this function will + * cause the current scene application to quit, so only call it when you are actually about to launch something else. + * What the caller should do about these failures depends on the failure: + * VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit + * and try again. + * VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure. + * VRApplicationError_LaunchInProgress - A different application is already starting. This is a permanent failure. + * VRApplicationError_None - Go ahead and launch. Everything is clear. + */ + virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0; + + /** Returns a string for an application transition state */ + virtual const char *GetSceneApplicationStateNameFromEnum( EVRSceneApplicationState state ) = 0; + + /** Starts a subprocess within the calling application. This + * suppresses all application transition UI and automatically identifies the new executable + * as part of the same application. On success the calling process should exit immediately. + * If working directory is NULL or "" the directory portion of the binary path will be + * the working directory. */ + virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0; + + /** Returns the current scene process ID according to the application system. A scene process will get scene + * focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application + * type. */ + virtual uint32_t GetCurrentSceneProcessId() = 0; + }; + + static const char * const IVRApplications_Version = "IVRApplications_007"; + +} // namespace vr + +// ivrsettings.h +#include + +namespace vr +{ + enum EVRSettingsError + { + VRSettingsError_None = 0, + VRSettingsError_IPCFailed = 1, + VRSettingsError_WriteFailed = 2, + VRSettingsError_ReadFailed = 3, + VRSettingsError_JsonParseFailed = 4, + VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set + }; + + // The maximum length of a settings key + static const uint32_t k_unMaxSettingsKeyLength = 128; + + class IVRSettings + { + public: + virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0; + + virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0; + virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0; + + // Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory + // of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or "" + virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0; + + virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0; + virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0; + }; + + //----------------------------------------------------------------------------- + static const char * const IVRSettings_Version = "IVRSettings_003"; + + class CVRSettingHelper + { + IVRSettings *m_pSettings; + public: + CVRSettingHelper( IVRSettings *pSettings ) + { + m_pSettings = pSettings; + } + + const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) + { + return m_pSettings->GetSettingsErrorNameFromEnum( eError ); + } + + void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetBool( pchSection, pchSettingsKey, bValue, peError ); + } + + void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetInt32( pchSection, pchSettingsKey, nValue, peError ); + } + void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetFloat( pchSection, pchSettingsKey, flValue, peError ); + } + void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( pchSection, pchSettingsKey, pchValue, peError ); + } + void SetString( const std::string & sSection, const std::string & sSettingsKey, const std::string & sValue, EVRSettingsError *peError = nullptr ) + { + m_pSettings->SetString( sSection.c_str(), sSettingsKey.c_str(), sValue.c_str(), peError ); + } + + bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetBool( pchSection, pchSettingsKey, peError ); + } + int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetInt32( pchSection, pchSettingsKey, peError ); + } + float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + return m_pSettings->GetFloat( pchSection, pchSettingsKey, peError ); + } + void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) + { + m_pSettings->GetString( pchSection, pchSettingsKey, pchValue, unValueLen, peError ); + } + std::string GetString( const std::string & sSection, const std::string & sSettingsKey, EVRSettingsError *peError = nullptr ) + { + char buf[4096]; + vr::EVRSettingsError eError; + m_pSettings->GetString( sSection.c_str(), sSettingsKey.c_str(), buf, sizeof( buf ), &eError ); + if ( peError ) + *peError = eError; + if ( eError == vr::VRSettingsError_None ) + return buf; + else + return ""; + } + + void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveSection( pchSection, peError ); + } + void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) + { + m_pSettings->RemoveKeyInSection( pchSection, pchSettingsKey, peError ); + } + }; + + + //----------------------------------------------------------------------------- + // steamvr keys + static const char * const k_pch_SteamVR_Section = "steamvr"; + static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd"; + static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps"; + static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + static const char * const k_pch_SteamVR_IPD_Float = "ipd"; + static const char * const k_pch_SteamVR_Background_String = "background"; + static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + static const char * const k_pch_SteamVR_GridColor_String = "gridColor"; + static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + static const char * const k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor"; + static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage"; + static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; + static const char * const k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement"; + static const char * const k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip"; + static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; + static const char * const k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; + static const char * const k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution"; + static const char * const k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing"; + static const char * const k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride"; + static const char * const k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync"; + static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView"; + static const char * const k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView"; + static const char * const k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode"; + static const char * const k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye"; + static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + static const char * const k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized"; + static const char * const k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph"; + static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; + static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; + static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; + static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; + static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; + static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; + static const char * const k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + static const char * const k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; + static const char * const k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + static const char * const k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; + static const char * const k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; + static const char * const k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; + static const char * const k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + static const char * const k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid"; + static const char * const k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; + static const char * const k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling"; + static const char * const k_pch_SteamVR_EnableSafeMode = "enableSafeMode"; + static const char * const k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate"; + static const char * const k_pch_SteamVR_LastVersionNotice = "lastVersionNotice"; + static const char * const k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG"; + static const char * const k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB"; + static const char * const k_pch_SteamVR_CustomIconStyle_String = "customIconStyle"; + static const char * const k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle"; + static const char * const k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate"; + + //----------------------------------------------------------------------------- + // direct mode keys + static const char * const k_pch_DirectMode_Section = "direct_mode"; + static const char * const k_pch_DirectMode_Enable_Bool = "enable"; + static const char * const k_pch_DirectMode_Count_Int32 = "count"; + static const char * const k_pch_DirectMode_EdidVid_Int32 = "edidVid"; + static const char * const k_pch_DirectMode_EdidPid_Int32 = "edidPid"; + + //----------------------------------------------------------------------------- + // lighthouse keys + static const char * const k_pch_Lighthouse_Section = "driver_lighthouse"; + static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + static const char * const k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; + static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + static const char * const k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; + static const char * const k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2"; + static const char * const k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations"; + static const char * const k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback"; + + //----------------------------------------------------------------------------- + // null keys + static const char * const k_pch_Null_Section = "driver_null"; + static const char * const k_pch_Null_SerialNumber_String = "serialNumber"; + static const char * const k_pch_Null_ModelNumber_String = "modelNumber"; + static const char * const k_pch_Null_WindowX_Int32 = "windowX"; + static const char * const k_pch_Null_WindowY_Int32 = "windowY"; + static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth"; + static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight"; + static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth"; + static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight"; + static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + + //----------------------------------------------------------------------------- + // user interface keys + static const char * const k_pch_UserInterface_Section = "userinterface"; + static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + static const char * const k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized"; + static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots"; + static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + + //----------------------------------------------------------------------------- + // notification keys + static const char * const k_pch_Notifications_Section = "notifications"; + static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + + //----------------------------------------------------------------------------- + // keyboard keys + static const char * const k_pch_Keyboard_Section = "keyboard"; + static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + static const char * const k_pch_Keyboard_ScaleX = "ScaleX"; + static const char * const k_pch_Keyboard_ScaleY = "ScaleY"; + static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + static const char * const k_pch_Keyboard_OffsetY = "OffsetY"; + static const char * const k_pch_Keyboard_Smoothing = "Smoothing"; + + //----------------------------------------------------------------------------- + // perf keys + static const char * const k_pch_Perf_Section = "perfcheck"; + static const char * const k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD"; + static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + static const char * const k_pch_Perf_TestData_Float = "perfTestData"; + static const char * const k_pch_Perf_GPUProfiling_Bool = "GPUProfiling"; + + //----------------------------------------------------------------------------- + // collision bounds keys + static const char * const k_pch_CollisionBounds_Section = "collisionBounds"; + static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + static const char * const k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport"; + + //----------------------------------------------------------------------------- + // camera keys + static const char * const k_pch_Camera_Section = "camera"; + static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera"; + static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + static const char * const k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; + + //----------------------------------------------------------------------------- + // audio keys + static const char * const k_pch_audio_Section = "audio"; + static const char * const k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice"; + static const char * const k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride"; + static const char * const k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName"; + static const char * const k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice"; + static const char * const k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride"; + static const char * const k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName"; + static const char * const k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror"; + static const char * const k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice"; + static const char * const k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName"; + static const char * const k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + static const char * const k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId"; + static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + + //----------------------------------------------------------------------------- + // power management keys + static const char * const k_pch_Power_Section = "power"; + static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; + static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; + static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; + static const char * const k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + + //----------------------------------------------------------------------------- + // dashboard keys + static const char * const k_pch_Dashboard_Section = "dashboard"; + static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + static const char * const k_pch_Dashboard_UseWebKeyboard = "useWebKeyboard"; + static const char * const k_pch_Dashboard_UseWebSettings = "useWebSettings"; + static const char * const k_pch_Dashboard_Position = "position"; + static const char * const k_pch_Dashboard_DesktopScale = "desktopScale"; + static const char * const k_pch_Dashboard_DashboardScale = "dashboardScale"; + + //----------------------------------------------------------------------------- + // model skin keys + static const char * const k_pch_modelskin_Section = "modelskins"; + + //----------------------------------------------------------------------------- + // driver keys - These could be checked in any driver_ section + static const char * const k_pch_Driver_Enable_Bool = "enable"; + static const char * const k_pch_Driver_LoadPriority_Int32 = "loadPriority"; + + //----------------------------------------------------------------------------- + // web interface keys + static const char* const k_pch_WebInterface_Section = "WebInterface"; + + //----------------------------------------------------------------------------- + // vrwebhelper keys + static const char* const k_pch_VRWebHelper_Section = "VRWebHelper"; + static const char* const k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled"; + static const char* const k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort"; + + //----------------------------------------------------------------------------- + // tracking overrides - keys are device paths, values are the device paths their + // tracking/pose information overrides + static const char* const k_pch_TrackingOverride_Section = "TrackingOverrides"; + + //----------------------------------------------------------------------------- + // per-app keys - the section name for these is the app key itself. Some of these are prefixed by the controller type + static const char* const k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + static const char* const k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + static const char* const k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL"; + static const char* const k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + + //----------------------------------------------------------------------------- + // configuration for trackers + static const char * const k_pch_Trackers_Section = "trackers"; + + //----------------------------------------------------------------------------- + // configuration for desktop UI windows + static const char * const k_pch_DesktopUI_Section = "DesktopUI"; + + //----------------------------------------------------------------------------- + // Last known keys for righting recovery + static const char * const k_pch_LastKnown_Section = "LastKnown"; + static const char* const k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer"; + static const char* const k_pch_LastKnown_HMDModel_String = "HMDModel"; + + //----------------------------------------------------------------------------- + // Dismissed warnings + static const char * const k_pch_DismissedWarnings_Section = "DismissedWarnings"; + + //----------------------------------------------------------------------------- + // Input Settings + static const char * const k_pch_Input_Section = "input"; + static const char* const k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation"; + static const char* const k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation"; + static const char* const k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone"; + + //----------------------------------------------------------------------------- + // Log of GPU performance + static const char * const k_pch_GpuSpeed_Section = "GpuSpeed"; + +} // namespace vr + +// ivrchaperone.h +namespace vr +{ + +#pragma pack( push, 8 ) + +enum ChaperoneCalibrationState +{ + // OK! + ChaperoneCalibrationState_OK = 1, // Chaperone is fully calibrated and working correctly + + // Warnings + ChaperoneCalibrationState_Warning = 100, + ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101, // A base station thinks that it might have moved + ChaperoneCalibrationState_Warning_BaseStationRemoved = 102, // There are less base stations than when calibrated + ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103, // Seated bounds haven't been calibrated for the current tracking center + + // Errors + ChaperoneCalibrationState_Error = 200, // The UniverseID is invalid + ChaperoneCalibrationState_Error_BaseStationUninitialized = 201, // Tracking center hasn't be calibrated for at least one of the base stations + ChaperoneCalibrationState_Error_BaseStationConflict = 202, // Tracking center is calibrated, but base stations disagree on the tracking space + ChaperoneCalibrationState_Error_PlayAreaInvalid = 203, // Play Area hasn't been calibrated for the current tracking center + ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204, // Collision Bounds haven't been calibrated for the current tracking center +}; + + +/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS: +* 0,0,0 is the preferred standing area center. +* 0Y is the floor height. +* -Z is the preferred forward facing direction. */ +class IVRChaperone +{ +public: + + /** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/ + virtual ChaperoneCalibrationState GetCalibrationState() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. + * Tracking space center (0,0,0) is the center of the Play Area. **/ + virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds). + * Corners are in counter-clockwise order. + * Standing center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Reload Chaperone data from the .vrchap file on disk. */ + virtual void ReloadInfo( void ) = 0; + + /** Optionally give the chaperone system a hit about the color and brightness in the scene **/ + virtual void SetSceneColor( HmdColor_t color ) = 0; + + /** Get the current chaperone bounds draw color and brightness **/ + virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0; + + /** Determine whether the bounds are showing right now **/ + virtual bool AreBoundsVisible() = 0; + + /** Force the bounds to show, mostly for utilities **/ + virtual void ForceBoundsVisible( bool bForce ) = 0; +}; + +static const char * const IVRChaperone_Version = "IVRChaperone_003"; + +#pragma pack( pop ) + +} + +// ivrchaperonesetup.h +namespace vr +{ + +enum EChaperoneConfigFile +{ + EChaperoneConfigFile_Live = 1, // The live chaperone config, used by most applications and games + EChaperoneConfigFile_Temp = 2, // The temporary chaperone config, used to live-preview collision bounds in room setup +}; + +enum EChaperoneImportFlags +{ + EChaperoneImport_BoundsOnly = 0x0001, +}; + +/** Manages the working copy of the chaperone info. By default this will be the same as the +* live copy. Any changes made with this interface will stay in the working copy until +* CommitWorkingCopy() is called, at which point the working copy and the live copy will be +* the same again. */ +class IVRChaperoneSetup +{ +public: + + /** Saves the current working copy to disk */ + virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0; + + /** Reverts the working copy to match the live chaperone calibration. + * To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus. + * Only after this should you do gets and sets on the existing data. */ + virtual void RevertWorkingCopy() = 0; + + /** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy. + * Tracking space center (0,0,0) is the center of the Play Area. */ + virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0; + + /** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy. + * Corners are in clockwise order. + * Tracking space center (0,0,0) is the center of the Play Area. + * It's a rectangle. + * 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis. + * Height of every corner is 0Y (on the floor). **/ + virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified from the working copy. */ + virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads + * into the buffer up to the max specified. */ + virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0; + + /** Returns the preferred seated position from the working copy. */ + virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Returns the standing origin from the working copy. */ + virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Sets the Play Area in the working copy. */ + virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0; + + /** Sets the Collision Bounds in the working copy. */ + virtual void SetWorkingPerimeter( VR_ARRAY_COUNT( unPointCount ) HmdVector2_t *pPointBuffer, uint32_t unPointCount ) = 0; + + /** Sets the preferred seated position in the working copy. */ + virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0; + + /** Sets the preferred standing position in the working copy. */ + virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0; + + /** Tear everything down and reload it from the file on disk */ + virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0; + + /** Returns the preferred seated position. */ + virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0; + + virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0; + virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0; + + /** Shows the chaperone data in the working set to preview in the compositor.*/ + virtual void ShowWorkingSetPreview() = 0; + + /** Hides the chaperone data in the working set to preview in the compositor (if it was visible).*/ + virtual void HideWorkingSetPreview() = 0; + + /** Fire an event that the tracking system can use to know room setup is about to begin. This lets the tracking + * system make any last minute adjustments that should be incorporated into the new setup. If the user is adjusting + * live in HMD using a tweak tool, keep in mind that calling this might cause the user to see the room jump. */ + virtual void RoomSetupStarting() = 0; +}; + +static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_006"; + + +} + +// ivrcompositor.h +namespace vr +{ + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRCompositorError +{ + VRCompositorError_None = 0, + VRCompositorError_RequestFailed = 1, + VRCompositorError_IncompatibleVersion = 100, + VRCompositorError_DoNotHaveFocus = 101, + VRCompositorError_InvalidTexture = 102, + VRCompositorError_IsNotSceneApplication = 103, + VRCompositorError_TextureIsOnWrongDevice = 104, + VRCompositorError_TextureUsesUnsupportedFormat = 105, + VRCompositorError_SharedTexturesNotSupported = 106, + VRCompositorError_IndexOutOfRange = 107, + VRCompositorError_AlreadySubmitted = 108, + VRCompositorError_InvalidBounds = 109, + VRCompositorError_AlreadySet = 110, +}; + +/** Timing mode passed to SetExplicitTimingMode(); see that function for documentation */ +enum EVRCompositorTimingMode +{ + VRCompositorTimingMode_Implicit = 0, + VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1, + VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2, +}; + +/** Cumulative stats for current application. These are not cleared until a new app connects, +* but they do stop accumulating once the associated app disconnects. */ +struct Compositor_CumulativeStats +{ + uint32_t m_nPid; // Process id associated with these stats (may no longer be running). + uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames) + uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection) + uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection) + + /** Values recorded at startup before application has fully faded in the first time. */ + uint32_t m_nNumFramePresentsOnStartup; + uint32_t m_nNumDroppedFramesOnStartup; + uint32_t m_nNumReprojectedFramesOnStartup; + + /** Applications may explicitly fade to the compositor. This is usually to handle level transitions, and loading often causes + * system wide hitches. The following stats are collected during this period. Does not include values recorded during startup. */ + uint32_t m_nNumLoading; + uint32_t m_nNumFramePresentsLoading; + uint32_t m_nNumDroppedFramesLoading; + uint32_t m_nNumReprojectedFramesLoading; + + /** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start + * fading back to the compositor. The following stats are a result of this, and are a subset of those recorded above. + * Does not include values recorded during start up or loading. */ + uint32_t m_nNumTimedOut; + uint32_t m_nNumFramePresentsTimedOut; + uint32_t m_nNumDroppedFramesTimedOut; + uint32_t m_nNumReprojectedFramesTimedOut; +}; + +struct Compositor_StageRenderSettings +{ + /** Primary color is applied as a tint to (i.e. multiplied with) the model's texture */ + HmdColor_t m_PrimaryColor = { 1, 1, 1, 1 }; + HmdColor_t m_SecondaryColor = { 1, 1, 1, 1 }; + + /** Vignette radius is in meters and is used to fade to the specified secondary solid color over + * that 3D distance from the origin of the playspace. */ + float m_flVignetteInnerRadius = 0.0f; + float m_flVignetteOuterRadius = 0.0f; + + /** Fades to the secondary color based on view incidence. This variable controls the linearity + * of the effect. It is mutually exclusive with vignette. Additionally, it treats the mesh as faceted. */ + float m_flFresnelStrength = 0.0f; + + /** Controls backface culling. */ + bool m_bBackfaceCulling = false; + + /** Converts the render model's texture to luma and applies to rgb equally. This is useful to + * combat compression artifacts that can occur on desaturated source material. */ + bool m_bGreyscale = false; + + /** Renders mesh as a wireframe. */ + bool m_bWireframe = false; +}; + +#pragma pack( pop ) + +/** Allows the application to interact with the compositor */ +class IVRCompositor +{ +public: + /** Sets tracking space returned by WaitGetPoses */ + virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0; + + /** Gets current tracking space returned by WaitGetPoses */ + virtual ETrackingUniverseOrigin GetTrackingSpace() = 0; + + /** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay). + * This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to + * start rendering. + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app) + */ + virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Get the last set of poses returned by WaitGetPoses. */ + virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount, + VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0; + + /** Interface for accessing last set of poses returned by WaitGetPoses one at a time. + * Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None. + * It is okay to pass NULL for either pose if you only want one of the values. */ + virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0; + + /** Updated scene texture to display. If pBounds is NULL the entire texture will be used. If called from an OpenGL app, consider adding a glFlush after + * Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames. + * + * OpenGL dirty state: + * glBindTexture + * + * Return codes: + * - IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene) + * - DoNotHaveFocus (some other app has taken focus) + * - TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo) + * - SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device) + * - TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.) + * - InvalidTexture (usually means bad arguments passed in) + * - AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again) + */ + virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0; + + /** Clears the frame that was sent with the last call to Submit. This will cause the + * compositor to show the grid until Submit is called again. */ + virtual void ClearLastSubmittedFrame() = 0; + + /** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor. + * This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present. + * For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would + * introduce a deadlock of some sort. This function tells the compositor that you have finished all rendering after having Submitted buffers for both + * eyes, and it is free to start its rendering work. This should only be called from the same thread you are rendering on. */ + virtual void PostPresentHandoff() = 0; + + /** Returns true if timing data is filled it. Sets oldest timing info if nFramesAgo is larger than the stored history. + * Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */ + virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0; + + /** Interface for copying a range of timing data. Frames are returned in ascending order (oldest to newest) with the last being the most recent frame. + * Only the first entry's m_nSize needs to be set, as the rest will be inferred from that. Returns total number of entries filled out. */ + virtual uint32_t GetFrameTimings( VR_ARRAY_COUNT( nFrames ) Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0; + + /** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame. + * Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */ + virtual float GetFrameTimeRemaining() = 0; + + /** Fills out stats accumulated for the last connected application. Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */ + virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0; + + /** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between + * 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly + * would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ). Values are in un-premultiplied alpha space. */ + virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0; + + /** Get current fade color value. */ + virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0; + + /** Fading the Grid in or out in fSeconds */ + virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0; + + /** Get current alpha value of grid. */ + virtual float GetCurrentGridAlpha() = 0; + + /** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough) + * Order is Front, Back, Left, Right, Top, Bottom. If only a single texture is passed, it is assumed in lat-long format. + * If two are passed, it is assumed a lat-long stereo pair. */ + virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0; + + /** Resets compositor skybox back to defaults. */ + virtual void ClearSkyboxOverride() = 0; + + /** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD + * and is obscuring the compositor window. */ + virtual void CompositorBringToFront() = 0; + + /** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */ + virtual void CompositorGoToBack() = 0; + + /** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal + * circumstances the compositor will manage its own life cycle based on what applications are running. */ + virtual void CompositorQuit() = 0; + + /** Return whether the compositor is fullscreen */ + virtual bool IsFullscreen() = 0; + + /** Returns the process ID of the process that is currently rendering the scene */ + virtual uint32_t GetCurrentSceneFocusProcess() = 0; + + /** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.) + * Returns 0 when fading out from an app and the app's process Id when fading into an app. */ + virtual uint32_t GetLastFrameRenderer() = 0; + + /** Returns true if the current process has the scene focus */ + virtual bool CanRenderScene() = 0; + + /** DEPRECATED: Opens the headset view (as either a window or docked widget depending on user's preferences) that displays what the user + * sees in the headset. */ + virtual void ShowMirrorWindow() = 0; + + /** DEPRECATED: Closes the headset view, either as a window or docked widget. */ + virtual void HideMirrorWindow() = 0; + + /** DEPRECATED: Returns true if the headset view (either as a window or docked widget) is shown. */ + virtual bool IsMirrorWindowVisible() = 0; + + /** Writes back buffer and stereo left/right pair from the application to a 'screenshots' folder in the SteamVR runtime root. */ + virtual void CompositorDumpImages() = 0; + + /** Let an app know it should be rendering with low resources. */ + virtual bool ShouldAppRenderWithLowResources() = 0; + + /** Override interleaved reprojection logic to force on. */ + virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0; + + /** Force reconnecting to the compositor process. */ + virtual void ForceReconnectProcess() = 0; + + /** Temporarily suspends rendering (useful for finer control over scene transitions). */ + virtual void SuspendRendering( bool bSuspend ) = 0; + + /** Opens a shared D3D11 texture with the undistorted composited image for each eye. Use ReleaseMirrorTextureD3D11 when finished + * instead of calling Release on the resource itself. */ + virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0; + virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0; + + /** Access to mirror textures from OpenGL. */ + virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0; + virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0; + + /** [Vulkan Only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */ + virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [Vulkan only] + * return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing + * null. The string will be a space separated list of required device extensions to enable in VkCreateDevice */ + virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + /** [ Vulkan/D3D12 Only ] + * There are two purposes for SetExplicitTimingMode: + * 1. To get a more accurate GPU timestamp for when the frame begins in Vulkan/D3D12 applications. + * 2. (Optional) To avoid having WaitGetPoses access the Vulkan queue so that the queue can be accessed from + * another thread while WaitGetPoses is executing. + * + * More accurate GPU timestamp for the start of the frame is achieved by the application calling + * SubmitExplicitTimingData immediately before its first submission to the Vulkan/D3D12 queue. + * This is more accurate because normally this GPU timestamp is recorded during WaitGetPoses. In D3D11, + * WaitGetPoses queues a GPU timestamp write, but it does not actually get submitted to the GPU until the + * application flushes. By using SubmitExplicitTimingData, the timestamp is recorded at the same place for + * Vulkan/D3D12 as it is for D3D11, resulting in a more accurate GPU time measurement for the frame. + * + * Avoiding WaitGetPoses accessing the Vulkan queue can be achieved using SetExplicitTimingMode as well. If this is desired, + * the application should set the timing mode to Explicit_ApplicationPerformsPostPresentHandoff and *MUST* call PostPresentHandoff + * itself. If these conditions are met, then WaitGetPoses is guaranteed not to access the queue. Note that PostPresentHandoff + * and SubmitExplicitTimingData will access the queue, so only WaitGetPoses becomes safe for accessing the queue from another + * thread. */ + virtual void SetExplicitTimingMode( EVRCompositorTimingMode eTimingMode ) = 0; + + /** [ Vulkan/D3D12 Only ] + * Submit explicit timing data. When SetExplicitTimingMode is true, this must be called immediately before + * the application's first vkQueueSubmit (Vulkan) or ID3D12CommandQueue::ExecuteCommandLists (D3D12) of each frame. + * This function will insert a GPU timestamp write just before the application starts its rendering. This function + * will perform a vkQueueSubmit on Vulkan so must not be done simultaneously with VkQueue operations on another thread. + * Returns VRCompositorError_RequestFailed if SetExplicitTimingMode is not enabled. */ + virtual EVRCompositorError SubmitExplicitTimingData() = 0; + + /** Indicates whether or not motion smoothing is enabled by the user settings. + * If you want to know if motion smoothing actually triggered due to a late frame, check Compositor_FrameTiming + * m_nReprojectionFlags & VRCompositor_ReprojectionMotion instead. */ + virtual bool IsMotionSmoothingEnabled() = 0; + + /** Indicates whether or not motion smoothing is supported by the current hardware. */ + virtual bool IsMotionSmoothingSupported() = 0; + + /** Indicates whether or not the current scene focus app is currently loading. This is inferred from its use of FadeGrid to + * explicitly fade to the compositor to cover up the fact that it cannot render at a sustained full framerate during this time. */ + virtual bool IsCurrentSceneFocusAppLoading() = 0; + + /** Override the stage model used in the compositor to replace the grid. RenderModelPath is a full path the an OBJ file to load. + * This file will be loaded asynchronously from disk and uploaded to the gpu by the runtime. Once ready for rendering, the + * VREvent StageOverrideReady will be sent. Use FadeToGrid to reveal. Call ClearStageOverride to free the associated resources when finished. */ + virtual EVRCompositorError SetStageOverride_Async( const char *pchRenderModelPath, const HmdMatrix34_t *pTransform = 0, + const Compositor_StageRenderSettings *pRenderSettings = 0, uint32_t nSizeOfRenderSettings = 0 ) = 0; + + /** Resets the stage to its default user specified setting. */ + virtual void ClearStageOverride() = 0; +}; + +static const char * const IVRCompositor_Version = "IVRCompositor_024"; + +} // namespace vr + + + +// ivrnotifications.h +namespace vr +{ + +#pragma pack( push, 8 ) + +// Used for passing graphic data +struct NotificationBitmap_t +{ + NotificationBitmap_t() + : m_pImageData( nullptr ) + , m_nWidth( 0 ) + , m_nHeight( 0 ) + , m_nBytesPerPixel( 0 ) + { + } + + void *m_pImageData; + int32_t m_nWidth; + int32_t m_nHeight; + int32_t m_nBytesPerPixel; +}; + + +/** Be aware that the notification type is used as 'priority' to pick the next notification */ +enum EVRNotificationType +{ + /** Transient notifications are automatically hidden after a period of time set by the user. + * They are used for things like information and chat messages that do not require user interaction. */ + EVRNotificationType_Transient = 0, + + /** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification(). + * They are used for things like phone calls and alarms that require user interaction. */ + EVRNotificationType_Persistent = 1, + + /** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID. + * If there is already a system notification in the queue with that ID it is not accepted into the queue + * to prevent spamming with system notification */ + EVRNotificationType_Transient_SystemWithUserValue = 2, +}; + +enum EVRNotificationStyle +{ + /** Creates a notification with minimal external styling. */ + EVRNotificationStyle_None = 0, + + /** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */ + EVRNotificationStyle_Application = 100, + + /** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */ + EVRNotificationStyle_Contact_Disabled = 200, + + /** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */ + EVRNotificationStyle_Contact_Enabled = 201, + + /** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */ + EVRNotificationStyle_Contact_Active = 202, +}; + +static const uint32_t k_unNotificationTextMaxSize = 256; + +typedef uint32_t VRNotificationId; + + + +#pragma pack( pop ) + +/** Allows notification sources to interact with the VR system + This current interface is not yet implemented. Do not use yet. */ +class IVRNotifications +{ +public: + /** Create a notification and enqueue it to be shown to the user. + * An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it. + * To create a two-line notification, use a line break ('\n') to split the text into two lines. + * The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */ + virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0; + + /** Destroy a notification, hiding it first if it currently shown to the user. */ + virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0; + +}; + +static const char * const IVRNotifications_Version = "IVRNotifications_002"; + +} // namespace vr + + + +// ivroverlay.h +namespace vr +{ + + /** The maximum length of an overlay key in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxKeyLength = 128; + + /** The maximum length of an overlay name in bytes, counting the terminating null character. */ + static const uint32_t k_unVROverlayMaxNameLength = 128; + + /** The maximum number of overlays that can exist in the system at one time. */ + static const uint32_t k_unMaxOverlayCount = 128; + + /** The maximum number of overlay intersection mask primitives per overlay */ + static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + + /** Types of input supported by VR Overlays */ + enum VROverlayInputMethod + { + VROverlayInputMethod_None = 0, // No input events will be generated automatically for this overlay + VROverlayInputMethod_Mouse = 1, // Tracked controllers will get mouse events automatically + VROverlayInputMethod_DualAnalog = 2, // Analog inputs from tracked controllers are turned into DualAnalog events + }; + + /** Allows the caller to figure out which overlay transform getter to call. */ + enum VROverlayTransformType + { + VROverlayTransform_Invalid = -1, + VROverlayTransform_Absolute = 0, + VROverlayTransform_TrackedDeviceRelative = 1, + VROverlayTransform_SystemOverlay = 2, + VROverlayTransform_TrackedComponent = 3, + VROverlayTransform_Cursor = 4, + VROverlayTransform_DashboardTab = 5, + VROverlayTransform_DashboardThumb = 6, + }; + + /** Overlay control settings */ + enum VROverlayFlags + { + // Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay + VROverlayFlags_NoDashboardTab = 1 << 3, + + // When this is set the overlay will receive VREvent_ScrollDiscrete events like a mouse wheel. + // Requires mouse input mode. + VROverlayFlags_SendVRDiscreteScrollEvents = 1 << 6, + + // Indicates that the overlay would like to receive + VROverlayFlags_SendVRTouchpadEvents = 1 << 7, + + // If set this will render a vertical scroll wheel on the primary controller, + // only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel + VROverlayFlags_ShowTouchPadScrollWheel = 1 << 8, + + // If this is set ownership and render access to the overlay are transferred + // to the new scene process on a call to IVRApplications::LaunchInternalProcess + VROverlayFlags_TransferOwnershipToInternalProcess = 1 << 9, + + // If set, renders 50% of the texture in each eye, side by side + VROverlayFlags_SideBySide_Parallel = 1 << 10, // Texture is left/right + VROverlayFlags_SideBySide_Crossed = 1 << 11, // Texture is crossed and right/left + + VROverlayFlags_Panorama = 1 << 12, // Texture is a panorama + VROverlayFlags_StereoPanorama = 1 << 13, // Texture is a stereo panorama + + // If this is set on an overlay owned by the scene application that overlay + // will be sorted with the "Other" overlays on top of all other scene overlays + VROverlayFlags_SortWithNonSceneOverlays = 1 << 14, + + // If set, the overlay will be shown in the dashboard, otherwise it will be hidden. + VROverlayFlags_VisibleInDashboard = 1 << 15, + + // If this is set and the overlay's input method is not none, the system-wide laser mouse + // mode will be activated whenever this overlay is visible. + VROverlayFlags_MakeOverlaysInteractiveIfVisible = 1 << 16, + + // If this is set the overlay will receive smooth VREvent_ScrollSmooth that emulate trackpad scrolling. + // Requires mouse input mode. + VROverlayFlags_SendVRSmoothScrollEvents = 1 << 17, + + // If this is set, the overlay texture will be protected content, preventing unauthorized reads. + VROverlayFlags_ProtectedContent = 1 << 18, + + // If this is set, the laser mouse splat will not be drawn over this overlay. The overlay will + // be responsible for drawing its own "cursor". + VROverlayFlags_HideLaserIntersection = 1 << 19, + }; + + enum VRMessageOverlayResponse + { + VRMessageOverlayResponse_ButtonPress_0 = 0, + VRMessageOverlayResponse_ButtonPress_1 = 1, + VRMessageOverlayResponse_ButtonPress_2 = 2, + VRMessageOverlayResponse_ButtonPress_3 = 3, + VRMessageOverlayResponse_CouldntFindSystemOverlay = 4, + VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5, + VRMessageOverlayResponse_ApplicationQuit = 6 + }; + + struct VROverlayIntersectionParams_t + { + HmdVector3_t vSource; + HmdVector3_t vDirection; + ETrackingUniverseOrigin eOrigin; + }; + + struct VROverlayIntersectionResults_t + { + HmdVector3_t vPoint; + HmdVector3_t vNormal; + HmdVector2_t vUVs; + float fDistance; + }; + + // Input modes for the Big Picture gamepad text entry + enum EGamepadTextInputMode + { + k_EGamepadTextInputModeNormal = 0, + k_EGamepadTextInputModePassword = 1, + k_EGamepadTextInputModeSubmit = 2, + }; + + // Controls number of allowed lines for the Big Picture gamepad text entry + enum EGamepadTextInputLineMode + { + k_EGamepadTextInputLineModeSingleLine = 0, + k_EGamepadTextInputLineModeMultipleLines = 1 + }; + + enum EVROverlayIntersectionMaskPrimitiveType + { + OverlayIntersectionPrimitiveType_Rectangle, + OverlayIntersectionPrimitiveType_Circle, + }; + + struct IntersectionMaskRectangle_t + { + float m_flTopLeftX; + float m_flTopLeftY; + float m_flWidth; + float m_flHeight; + }; + + struct IntersectionMaskCircle_t + { + float m_flCenterX; + float m_flCenterY; + float m_flRadius; + }; + + /** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */ + typedef union + { + IntersectionMaskRectangle_t m_Rectangle; + IntersectionMaskCircle_t m_Circle; + } VROverlayIntersectionMaskPrimitive_Data_t; + + struct VROverlayIntersectionMaskPrimitive_t + { + EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType; + VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + }; + + class IVROverlay + { + public: + + // --------------------------------------------- + // Overlay management methods + // --------------------------------------------- + + /** Finds an existing overlay with the specified key. */ + virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Creates a new named overlay. All overlays start hidden and with default settings. */ + virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayName, VROverlayHandle_t * pOverlayHandle ) = 0; + + /** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are + * automatically destroyed. */ + virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including + * the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */ + virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0; + + /** set the name to use for this overlay */ + virtual EVROverlayError SetOverlayName( VROverlayHandle_t ulOverlayHandle, const char *pchName ) = 0; + + /** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height + * will be set and VROverlayError_ArrayTooSmall is returned. */ + virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0; + + /** returns a string that corresponds with the specified overlay error. The string will be the name + * of the error enum value for all valid error codes */ + virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0; + + // --------------------------------------------- + // Overlay rendering methods + // --------------------------------------------- + + /** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render), + * by default this is the pid of the process that made the overlay */ + virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0; + + /** Gets the pid that is allowed to render to this overlay */ + virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Specify flag setting for a given overlay */ + virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0; + + /** Sets flag setting for a given overlay */ + virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0; + + /** Gets all the flags for a given overlay */ + virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0; + + /** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */ + virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0; + + /** Gets the color tint of the overlay quad. */ + virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0; + + /** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */ + virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0; + + /** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */ + virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0; + + /** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels + * are twice as wide as they are tall. Defaults to 1.0. */ + virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0; + + /** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */ + virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0; + + /** Sets the rendering sort order for the overlay. Overlays are rendered this order: + * Overlays owned by the scene application + * Overlays owned by some other application + * + * Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same + * sort order are rendered back to front base on distance from the HMD. + * + * Sort order defaults to 0. */ + virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0; + + /** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */ + virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0; + + /** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0; + + /** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */ + virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0; + + /** Use to draw overlay as a curved surface. Curvature is a percentage from (0..1] where 1 is a fully closed cylinder. + * For a specific radius, curvature can be computed as: overlay.width / (2 PI r). */ + virtual EVROverlayError SetOverlayCurvature( VROverlayHandle_t ulOverlayHandle, float fCurvature ) = 0; + + /** Returns the curvature of the overlay as a percentage from (0..1] where 1 is a fully closed cylinder. */ + virtual EVROverlayError GetOverlayCurvature( VROverlayHandle_t ulOverlayHandle, float *pfCurvature ) = 0; + + /** Sets the colorspace the overlay texture's data is in. Defaults to 'auto'. + * If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */ + virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0; + + /** Gets the overlay's current colorspace setting. */ + virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0; + + /** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */ + virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0; + + /** Gets render model to draw behind this overlay */ + virtual uint32_t GetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, HmdColor_t *pColor, vr::EVROverlayError *pError ) = 0; + + /** Sets render model to draw behind this overlay and the vertex color to use, pass null for pColor to match the overlays vertex color. + The model is scaled by the same amount as the overlay, with a default of 1m. */ + virtual vr::EVROverlayError SetOverlayRenderModel( vr::VROverlayHandle_t ulOverlayHandle, const char *pchRenderModel, const HmdColor_t *pColor ) = 0; + + /** Returns the transform type of this overlay. */ + virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0; + + /** Sets the transform to absolute tracking origin. */ + virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Gets the transform if it is absolute. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified tracked device. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0; + + /** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is + * drawing the device. Overlays with this transform type cannot receive mouse events. */ + virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0; + + /** Gets the transform information when the overlay is rendering on a component. */ + virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, VR_OUT_STRING() char *pchComponentName, uint32_t unComponentNameSize ) = 0; + + /** Gets the transform if it is relative to another overlay. Returns an error if the transform is some other type. */ + virtual vr::EVROverlayError GetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t *ulOverlayHandleParent, HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the transform to relative to the transform of the specified overlay. This overlays visibility will also track the parents visibility */ + virtual vr::EVROverlayError SetOverlayTransformOverlayRelative( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, const HmdMatrix34_t *pmatParentOverlayToOverlayTransform ) = 0; + + /** Sets the hotspot for the specified overlay when that overlay is used as a cursor. These are in texture space with 0,0 in the upper left corner of + * the texture and 1,1 in the lower right corner of the texture. */ + virtual EVROverlayError SetOverlayTransformCursor( VROverlayHandle_t ulCursorOverlayHandle, const HmdVector2_t *pvHotspot ) = 0; + + /** Gets cursor hotspot/transform for the specified overlay */ + virtual vr::EVROverlayError GetOverlayTransformCursor( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvHotspot ) = 0; + + /** Shows the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Hides the VR overlay. For dashboard overlays, only the Dashboard Manager is allowed to call this. */ + virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Returns true if the overlay is visible. */ + virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */ + virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0; + + // --------------------------------------------- + // Overlay input methods + // --------------------------------------------- + + /** Returns true and fills the event with the next event on the overlay's event queue, if there is one. + * If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */ + virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0; + + /** Returns the current input settings for the specified overlay. */ + virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0; + + /** Sets the input settings for the specified overlay. */ + virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0; + + /** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels. */ + virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0; + + /** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0; + + /** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the + * specified settings. Returns false if there is no intersection. */ + virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0; + + /** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" + * by the virtual mouse pointer */ + virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the analog input to Dual Analog coordinate scale for the specified overlay. */ + virtual EVROverlayError SetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, const HmdVector2_t *pvCenter, float fRadius ) = 0; + + /** Gets the analog input to Dual Analog coordinate scale for the specified overlay. */ + virtual EVROverlayError GetOverlayDualAnalogTransform( VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t *pvCenter, float *pfRadius ) = 0; + + /** Sets a list of primitives to be used for controller ray intersection + * typically the size of the underlying UI in pixels (not in world space). */ + virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0; + + /** Triggers a haptic event on the laser mouse controller for the specified overlay */ + virtual EVROverlayError TriggerLaserMouseHapticVibration( VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude ) = 0; + + /** Sets the cursor to use for the specified overlay. This will be drawn instead of the generic blob when the laser mouse is pointed at the specified overlay */ + virtual EVROverlayError SetOverlayCursor( VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle ) = 0; + + /** Sets the override cursor position to use for this overlay in overlay mouse coordinates. This position will be used to draw the cursor + * instead of whatever the laser mouse cursor position is. */ + virtual EVROverlayError SetOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvCursor ) = 0; + + /** Clears the override cursor position for this overlay */ + virtual EVROverlayError ClearOverlayCursorPositionOverride( VROverlayHandle_t ulOverlayHandle ) = 0; + + // --------------------------------------------- + // Overlay texture methods + // --------------------------------------------- + + /** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) . + * + * OpenGL dirty state: + * glBindTexture + */ + virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0; + + /** Use this to tell the overlay system to release the texture set for this overlay. */ + virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data + * that can be sent. This function can only be called by the overlay's renderer process. */ + virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel ) = 0; + + /** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080. + * This function can only be called by the overlay's renderer process */ + virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0; + + /** Get the native texture handle/device for an overlay you have created. + * On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound. + * + * The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above. + * + * You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture. + * + * pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *. + * pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle. + */ + virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0; + + /** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object, + * so only do it once you stop rendering this texture. + */ + virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0; + + /** Get the size of the overlay texture */ + virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0; + + // ---------------------------------------------- + // Dashboard Overlay Methods + // ---------------------------------------------- + + /** Creates a dashboard overlay and returns its handle */ + virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0; + + /** Returns true if the dashboard is visible */ + virtual bool IsDashboardVisible() = 0; + + /** returns true if the dashboard is visible and the specified overlay is the active system Overlay */ + virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0; + + /** Sets the dashboard overlay to only appear when the specified process ID has scene focus */ + virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0; + + /** Gets the process ID that this dashboard overlay requires to have scene focus */ + virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0; + + /** Shows the dashboard. */ + virtual void ShowDashboard( const char *pchOverlayToShow ) = 0; + + /** Returns the tracked device that has the laser pointer in the dashboard */ + virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0; + + // --------------------------------------------- + // Keyboard methods + // --------------------------------------------- + + /** Show the virtual keyboard to accept input **/ + virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0; + + /** Get the text that was entered into the text input **/ + virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0; + + /** Hide the virtual keyboard **/ + virtual void HideKeyboard() = 0; + + /** Set the position of the keyboard in world space **/ + virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0; + + /** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/ + virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0; + + // --------------------------------------------- + // Message box methods + // --------------------------------------------- + + /** Show the message overlay. This will block and return you a result. **/ + virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0; + + /** If the calling process owns the overlay and it's open, this will close it. **/ + virtual void CloseMessageOverlay() = 0; + }; + + static const char * const IVROverlay_Version = "IVROverlay_022"; + +} // namespace vr + +// ivrrendermodels.h +namespace vr +{ + +static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015"; // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility +static const char * const k_pch_Controller_Component_Base = "base"; // For controllers with an unambiguous 'base'. +static const char * const k_pch_Controller_Component_Tip = "tip"; // For controllers with an unambiguous 'tip' (used for 'laser-pointing') +static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb +static const char * const k_pch_Controller_Component_Status = "status"; // 1:1 aspect ratio status area, with canonical [0,1] uv mapping + +#pragma pack( push, 8 ) + +/** Errors that can occur with the VR compositor */ +enum EVRRenderModelError +{ + VRRenderModelError_None = 0, + VRRenderModelError_Loading = 100, + VRRenderModelError_NotSupported = 200, + VRRenderModelError_InvalidArg = 300, + VRRenderModelError_InvalidModel = 301, + VRRenderModelError_NoShapes = 302, + VRRenderModelError_MultipleShapes = 303, + VRRenderModelError_TooManyVertices = 304, + VRRenderModelError_MultipleTextures = 305, + VRRenderModelError_BufferTooSmall = 306, + VRRenderModelError_NotEnoughNormals = 307, + VRRenderModelError_NotEnoughTexCoords = 308, + + VRRenderModelError_InvalidTexture = 400, +}; + +typedef uint32_t VRComponentProperties; + +enum EVRComponentProperty +{ + VRComponentProperty_IsStatic = (1 << 0), + VRComponentProperty_IsVisible = (1 << 1), + VRComponentProperty_IsTouched = (1 << 2), + VRComponentProperty_IsPressed = (1 << 3), + VRComponentProperty_IsScrolled = (1 << 4), +}; + +/** Describes state information about a render-model component, including transforms and other dynamic properties */ +struct RenderModel_ComponentState_t +{ + HmdMatrix34_t mTrackingToComponentRenderModel; // Transform required when drawing the component render model + HmdMatrix34_t mTrackingToComponentLocal; // Transform available for attaching to a local component coordinate system (-Z out from surface ) + VRComponentProperties uProperties; +}; + +/** A single vertex in a render model */ +struct RenderModel_Vertex_t +{ + HmdVector3_t vPosition; // position in meters in device space + HmdVector3_t vNormal; + float rfTextureCoord[2]; +}; + +/** A texture map for use on a render model */ +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_TextureMap_t +{ + uint16_t unWidth, unHeight; // width and height of the texture map in pixels + const uint8_t *rubTextureMapData; // Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + +/** Session unique texture identifier. Rendermodels which share the same texture will have the same id. +IDs <0 denote the texture is not present */ + +typedef int32_t TextureID_t; + +const TextureID_t INVALID_TEXTURE_ID = -1; + +#if defined(__linux__) || defined(__APPLE__) +// This structure was originally defined mis-packed on Linux, preserved for +// compatibility. +#pragma pack( push, 4 ) +#endif + +struct RenderModel_t +{ + const RenderModel_Vertex_t *rVertexData; // Vertex data for the mesh + uint32_t unVertexCount; // Number of vertices in the vertex data + const uint16_t *rIndexData; // Indices into the vertex data for each triangle + uint32_t unTriangleCount; // Number of triangles in the mesh. Index count is 3 * TriangleCount + TextureID_t diffuseTextureId; // Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present +}; +#if defined(__linux__) || defined(__APPLE__) +#pragma pack( pop ) +#endif + + +struct RenderModel_ControllerMode_State_t +{ + bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode +}; + +#pragma pack( pop ) + +class IVRRenderModels +{ +public: + + /** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name + * from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. + * + * The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the + * application is finished with the render model it should call FreeRenderModel() to free the memory associated + * with the model. + * + * The method returns VRRenderModelError_Loading while the render model is still being loaded. + * The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */ + virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0; + + /** Frees a previously returned render model + * It is safe to call this on a null ptr. */ + virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0; + + /** Loads and returns a texture for use in the application. */ + virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0; + + /** Frees a previously returned texture + * It is safe to call this on a null ptr. */ + virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0; + + /** Creates a D3D11 texture and loads data into it. */ + virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0; + + /** Helper function to copy the bits into an existing texture. */ + virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0; + + /** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */ + virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0; + + /** Use this to get the names of available render models. Index does not correlate to a tracked device index, but + * is only used for iterating over all available render models. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0; + + /** Returns the number of available render models. */ + virtual uint32_t GetRenderModelCount() = 0; + + + /** Returns the number of components of the specified render model. + * Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects. + * Examples controller components: + * renderable things such as triggers, buttons + * non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose + * If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model + * Returns 0 if components not supported, >0 otherwise */ + virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0; + + /** Use this to get the names of available components. Index does not correlate to a tracked device index, but + * is only used for iterating over all available components. If the index is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0; + + /** Get the button mask for all buttons associated with this component + * If no buttons (or axes) are associated with this component, return 0 + * Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller. + * Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */ + virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel. + * If the component name is out of range, this function will return 0. + * Otherwise, it will return the size of the buffer required for the name. */ + virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0; + + /** Use this to query information about the component, as a function of the controller state. + * + * For dynamic controller components (ex: trigger) values will reflect component motions + * For static components this will return a consistent value independent of the VRControllerState_t + * + * If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity). + * Otherwise, return true + * Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */ + virtual bool GetComponentStateForDevicePath( const char *pchRenderModelName, const char *pchComponentName, vr::VRInputValueHandle_t devicePath, const vr::RenderModel_ControllerMode_State_t *pState, vr::RenderModel_ComponentState_t *pComponentState ) = 0; + + /** This version of GetComponentState takes a controller state block instead of an action origin. This function is deprecated. You should use the new input system and GetComponentStateForDevicePath instead. */ + virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0; + + /** Returns true if the render model has a component with the specified name */ + virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0; + + /** Returns the URL of the thumbnail image for this rendermodel */ + virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0; + + /** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model + * hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the + * model. */ + virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0; + + /** Returns a string for a render model error */ + virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0; +}; + +static const char * const IVRRenderModels_Version = "IVRRenderModels_006"; + +} + + +// ivrextendeddisplay.h +namespace vr +{ + + /** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use + * direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */ + class IVRExtendedDisplay + { + public: + + /** Size and position that the window needs to be on the VR display. */ + virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Gets the viewport in the frame buffer to draw the output of the distortion into */ + virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** [D3D10/11 Only] + * Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs + * to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1. + */ + virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0; + + }; + + static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + +} + + +// ivrtrackedcamera.h +namespace vr +{ + +class IVRTrackedCamera +{ +public: + /** Returns a string for an error */ + virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0; + + /** For convenience, same as tracked property request Prop_HasCamera_Bool */ + virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0; + + virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, uint32_t nCameraIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0; + + /** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client. + * If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays. + * The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller. + * The camera may go inactive due to lack of active consumers or headset idleness. */ + virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0; + + /** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel. + * A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows + * the caller to determine if the frame as advanced per the frame header sequence. + * If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable. + * Ideally a caller should be polling at ~16ms intervals */ + virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Gets size of the image frame. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; + + /** Access a shared D3D11 texture for the specified tracked camera stream. + * The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted. + * Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with + * VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded + * by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted + * guarantees a rectangle where all pixels are valid. */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + + /** Access a shared GL texture for the specified tracked camera stream */ + virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0; + virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0; + virtual void SetCameraTrackingSpace( vr::ETrackingUniverseOrigin eUniverse ) = 0; + virtual vr::ETrackingUniverseOrigin GetCameraTrackingSpace( ) = 0; +}; + +static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_006"; + +} // namespace vr + + +// ivrscreenshots.h +namespace vr +{ + +/** Errors that can occur with the VR compositor */ +enum EVRScreenshotError +{ + VRScreenshotError_None = 0, + VRScreenshotError_RequestFailed = 1, + VRScreenshotError_IncompatibleVersion = 100, + VRScreenshotError_NotFound = 101, + VRScreenshotError_BufferTooSmall = 102, + VRScreenshotError_ScreenshotAlreadyInProgress = 108, +}; + +/** Allows the application to generate screenshots */ +class IVRScreenshots +{ +public: + /** Request a screenshot of the requested type. + * A request of the VRScreenshotType_Stereo type will always + * work. Other types will depend on the underlying application + * support. + * The first file name is for the preview image and should be a + * regular screenshot (ideally from the left eye). The second + * is the VR screenshot in the correct format. They should be + * in the same aspect ratio. Formats per type: + * VRScreenshotType_Mono: the VR filename is ignored (can be + * nullptr), this is a normal flat single shot. + * VRScreenshotType_Stereo: The VR image should be a + * side-by-side with the left eye image on the left. + * VRScreenshotType_Cubemap: The VR image should be six square + * images composited horizontally. + * VRScreenshotType_StereoPanorama: above/below with left eye + * panorama being the above image. Image is typically square + * with the panorama being 2x horizontal. + * + * Note that the VR dashboard will call this function when + * the user presses the screenshot binding (currently System + * Button + Trigger). If Steam is running, the destination + * file names will be in %TEMP% and will be copied into + * Steam's screenshot library for the running application + * once SubmitScreenshot() is called. + * If Steam is not running, the paths will be in the user's + * documents folder under Documents\SteamVR\Screenshots. + * Other VR applications can call this to initiate a + * screenshot outside of user control. + * The destination file names do not need an extension, + * will be replaced with the correct one for the format + * which is currently .png. */ + virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Called by the running VR application to indicate that it + * wishes to be in charge of screenshots. If the + * application does not call this, the Compositor will only + * support VRScreenshotType_Stereo screenshots that will be + * captured without notification to the running app. + * Once hooked your application will receive a + * VREvent_RequestScreenshot event when the user presses the + * buttons to take a screenshot. */ + virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0; + + /** When your application receives a + * VREvent_RequestScreenshot event, call these functions to get + * the details of the screenshot request. */ + virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0; + + /** Get the filename for the preview or vr image (see + * vr::EScreenshotPropertyFilenames). The return value is + * the size of the string. */ + virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0; + + /** Call this if the application is taking the screen shot + * will take more than a few ms processing. This will result + * in an overlay being presented that shows a completion + * bar. */ + virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0; + + /** Tells the compositor to take an internal screenshot of + * type VRScreenshotType_Stereo. It will take the current + * submitted scene textures of the running application and + * write them into the preview image and a side-by-side file + * for the VR image. + * This is similar to request screenshot, but doesn't ever + * talk to the application, just takes the shot and submits. */ + virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0; + + /** Submit the completed screenshot. If Steam is running + * this will call into the Steam client and upload the + * screenshot to the screenshots section of the library for + * the running application. If Steam is not running, this + * function will display a notification to the user that the + * screenshot was taken. The paths should be full paths with + * extensions. + * File paths should be absolute including extensions. + * screenshotHandle can be k_unScreenshotHandleInvalid if this + * was a new shot taking by the app to be saved and not + * initiated by a user (achievement earned or something) */ + virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0; +}; + +static const char * const IVRScreenshots_Version = "IVRScreenshots_001"; + +} // namespace vr + + + +// ivrresources.h +namespace vr +{ + +class IVRResources +{ +public: + + // ------------------------------------ + // Shared Resource Methods + // ------------------------------------ + + /** Loads the specified resource into the provided buffer if large enough. + * Returns the size in bytes of the buffer required to hold the specified resource. */ + virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0; + + /** Provides the full path to the specified resource. Resource names can include named directories for + * drivers and other things, and this resolves all of those and returns the actual physical path. + * pchResourceTypeDirectory is the subdirectory of resources to look in. */ + virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferLen ) = 0; +}; + +static const char * const IVRResources_Version = "IVRResources_001"; + + +} +// ivrdrivermanager.h +namespace vr +{ + +class IVRDriverManager +{ +public: + virtual uint32_t GetDriverCount() const = 0; + + /** Returns the length of the number of bytes necessary to hold this string including the trailing null. */ + virtual uint32_t GetDriverName( vr::DriverId_t nDriver, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0; + + virtual DriverHandle_t GetDriverHandle( const char *pchDriverName ) = 0; + + virtual bool IsEnabled( vr::DriverId_t nDriver ) const = 0; +}; + +static const char * const IVRDriverManager_Version = "IVRDriverManager_001"; + +} // namespace vr + + + +// ivrinput.h +namespace vr +{ + static const uint32_t k_unMaxActionNameLength = 64; + static const uint32_t k_unMaxActionSetNameLength = 64; + static const uint32_t k_unMaxActionOriginCount = 16; + static const uint32_t k_unMaxBoneNameLength = 32; + + enum EVRSkeletalTransformSpace + { + VRSkeletalTransformSpace_Model = 0, + VRSkeletalTransformSpace_Parent = 1 + }; + + enum EVRSkeletalReferencePose + { + VRSkeletalReferencePose_BindPose = 0, + VRSkeletalReferencePose_OpenHand, + VRSkeletalReferencePose_Fist, + VRSkeletalReferencePose_GripLimit + }; + + enum EVRFinger + { + VRFinger_Thumb = 0, + VRFinger_Index, + VRFinger_Middle, + VRFinger_Ring, + VRFinger_Pinky, + VRFinger_Count + }; + + enum EVRFingerSplay + { + VRFingerSplay_Thumb_Index = 0, + VRFingerSplay_Index_Middle, + VRFingerSplay_Middle_Ring, + VRFingerSplay_Ring_Pinky, + VRFingerSplay_Count + }; + + enum EVRSummaryType + { + // The skeletal summary data will match the animated bone transforms for the action. + VRSummaryType_FromAnimation = 0, + + // The skeletal summary data will include unprocessed data directly from the device when available. + // This data is generally less latent than the data that is computed from the animations. + VRSummaryType_FromDevice = 1, + }; + + enum EVRInputFilterCancelType + { + VRInputFilterCancel_Timers = 0, + VRInputFilterCancel_Momentum = 1, + }; + + enum EVRInputStringBits + { + VRInputString_Hand = 0x01, + VRInputString_ControllerType = 0x02, + VRInputString_InputSource = 0x04, + + VRInputString_All = 0xFFFFFFFF + }; + + struct InputAnalogActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action; will be delta updates for mouse actions */ + float x, y, z; + + /** Deltas since the previous call to UpdateActionState() */ + float deltaX, deltaY, deltaZ; + + /** Time relative to now when this event happened. Will be negative to indicate a past time. */ + float fUpdateTime; + }; + + struct InputDigitalActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action; will be true if currently pressed */ + bool bState; + + /** This is true if the state has changed since the last frame */ + bool bChanged; + + /** Time relative to now when this event happened. Will be negative to indicate a past time. */ + float fUpdateTime; + }; + + struct InputPoseActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + + /** The current state of this action */ + TrackedDevicePose_t pose; + }; + + struct InputSkeletalActionData_t + { + /** Whether or not this action is currently available to be bound in the active action set */ + bool bActive; + + /** The origin that caused this action's current state */ + VRInputValueHandle_t activeOrigin; + }; + + struct InputOriginInfo_t + { + VRInputValueHandle_t devicePath; + TrackedDeviceIndex_t trackedDeviceIndex; + char rchRenderModelComponentName[128]; + }; + + struct InputBindingInfo_t + { + char rchDevicePathName[128]; + char rchInputPathName[128]; + char rchModeName[128]; + char rchSlotName[128]; + }; + + struct VRActiveActionSet_t + { + /** This is the handle of the action set to activate for this frame. */ + VRActionSetHandle_t ulActionSet; + + /** This is the handle of a device path that this action set should be active for. To + * activate for all devices, set this to k_ulInvalidInputValueHandle. */ + VRInputValueHandle_t ulRestrictedToDevice; + + /** The action set to activate for all devices other than ulRestrictedDevice. If + * ulRestrictedToDevice is set to k_ulInvalidInputValueHandle, this parameter is + * ignored. */ + VRActionSetHandle_t ulSecondaryActionSet; + + // This field is ignored + uint32_t unPadding; + + /** The priority of this action set relative to other action sets. Any inputs + * bound to a source (e.g. trackpad, joystick, trigger) will disable bindings in + * other active action sets with a smaller priority. */ + int32_t nPriority; + }; + + /** Contains summary information about the current skeletal pose */ + struct VRSkeletalSummaryData_t + { + /** The amount that each finger is 'curled' inwards towards the palm. In the case of the thumb, + * this represents how much the thumb is wrapped around the fist. + * 0 means straight, 1 means fully curled */ + float flFingerCurl[ VRFinger_Count ]; + + /** The amount that each pair of adjacent fingers are separated. + * 0 means the digits are touching, 1 means they are fully separated. + */ + float flFingerSplay[ VRFingerSplay_Count ]; + }; + + + class IVRInput + { + public: + + // --------------- Handle management --------------- // + + /** Sets the path to the action manifest JSON file that is used by this application. If this information + * was set on the Steam partner site, calls to this function are ignored. If the Steam partner site + * setting and the path provided by this call are different, VRInputError_MismatchedActionManifest is returned. + * This call must be made before the first call to UpdateActionState or IVRSystem::PollNextEvent. */ + virtual EVRInputError SetActionManifestPath( const char *pchActionManifestPath ) = 0; + + /** Returns a handle for an action set. This handle is used for all performance-sensitive calls. */ + virtual EVRInputError GetActionSetHandle( const char *pchActionSetName, VRActionSetHandle_t *pHandle ) = 0; + + /** Returns a handle for an action. This handle is used for all performance-sensitive calls. */ + virtual EVRInputError GetActionHandle( const char *pchActionName, VRActionHandle_t *pHandle ) = 0; + + /** Returns a handle for any path in the input system. E.g. /user/hand/right */ + virtual EVRInputError GetInputSourceHandle( const char *pchInputSourcePath, VRInputValueHandle_t *pHandle ) = 0; + + + + // --------------- Reading action state ------------------- // + + /** Reads the current state into all actions. After this call, the results of Get*Action calls + * will be the same until the next call to UpdateActionState. */ + virtual EVRInputError UpdateActionState( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount ) = 0; + + /** Reads the state of a digital action given its handle. This will return VRInputError_WrongType if the type of + * action is something other than digital */ + virtual EVRInputError GetDigitalActionData( VRActionHandle_t action, InputDigitalActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of an analog action given its handle. This will return VRInputError_WrongType if the type of + * action is something other than analog */ + virtual EVRInputError GetAnalogActionData( VRActionHandle_t action, InputAnalogActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a pose action given its handle for the number of seconds relative to now. This + * will generally be called with negative times from the fUpdateTime fields in other actions. */ + virtual EVRInputError GetPoseActionDataRelativeToNow( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a pose action given its handle. The returned values will match the values returned + * by the last call to IVRCompositor::WaitGetPoses(). */ + virtual EVRInputError GetPoseActionDataForNextFrame( VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t *pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + /** Reads the state of a skeletal action given its handle. */ + virtual EVRInputError GetSkeletalActionData( VRActionHandle_t action, InputSkeletalActionData_t *pActionData, uint32_t unActionDataSize ) = 0; + + // --------------- Static Skeletal Data ------------------- // + + /** Reads the number of bones in skeleton associated with the given action */ + virtual EVRInputError GetBoneCount( VRActionHandle_t action, uint32_t* pBoneCount ) = 0; + + /** Fills the given array with the index of each bone's parent in the skeleton associated with the given action */ + virtual EVRInputError GetBoneHierarchy( VRActionHandle_t action, VR_ARRAY_COUNT( unIndexArayCount ) BoneIndex_t* pParentIndices, uint32_t unIndexArayCount ) = 0; + + /** Fills the given buffer with the name of the bone at the given index in the skeleton associated with the given action */ + virtual EVRInputError GetBoneName( VRActionHandle_t action, BoneIndex_t nBoneIndex, VR_OUT_STRING() char* pchBoneName, uint32_t unNameBufferSize ) = 0; + + /** Fills the given buffer with the transforms for a specific static skeletal reference pose */ + virtual EVRInputError GetSkeletalReferenceTransforms( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + /** Reads the level of accuracy to which the controller is able to track the user to recreate a skeletal pose */ + virtual EVRInputError GetSkeletalTrackingLevel( VRActionHandle_t action, EVRSkeletalTrackingLevel* pSkeletalTrackingLevel ) = 0; + + // --------------- Dynamic Skeletal Data ------------------- // + + /** Reads the state of the skeletal bone data associated with this action and copies it into the given buffer. */ + virtual EVRInputError GetSkeletalBoneData( VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + /** Reads summary information about the current pose of the skeleton associated with the given action. */ + virtual EVRInputError GetSkeletalSummaryData( VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData ) = 0; + + /** Reads the state of the skeletal bone data in a compressed form that is suitable for + * sending over the network. The required buffer size will never exceed ( sizeof(VR_BoneTransform_t)*boneCount + 2). + * Usually the size will be much smaller. */ + virtual EVRInputError GetSkeletalBoneDataCompressed( VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, VR_OUT_BUFFER_COUNT( unCompressedSize ) void *pvCompressedData, uint32_t unCompressedSize, uint32_t *punRequiredCompressedSize ) = 0; + + /** Turns a compressed buffer from GetSkeletalBoneDataCompressed and turns it back into a bone transform array. */ + virtual EVRInputError DecompressSkeletalBoneData( const void *pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VR_ARRAY_COUNT( unTransformArrayCount ) VRBoneTransform_t *pTransformArray, uint32_t unTransformArrayCount ) = 0; + + // --------------- Haptics ------------------- // + + /** Triggers a haptic event as described by the specified action */ + virtual EVRInputError TriggerHapticVibrationAction( VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice ) = 0; + + // --------------- Action Origins ---------------- // + + /** Retrieve origin handles for an action */ + virtual EVRInputError GetActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VR_ARRAY_COUNT( originOutCount ) VRInputValueHandle_t *originsOut, uint32_t originOutCount ) = 0; + + /** Retrieves the name of the origin in the current language. unStringSectionsToInclude is a bitfield of values in EVRInputStringBits that allows the + application to specify which parts of the origin's information it wants a string for. */ + virtual EVRInputError GetOriginLocalizedName( VRInputValueHandle_t origin, VR_OUT_STRING() char *pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude ) = 0; + + /** Retrieves useful information for the origin of this action */ + virtual EVRInputError GetOriginTrackedDeviceInfo( VRInputValueHandle_t origin, InputOriginInfo_t *pOriginInfo, uint32_t unOriginInfoSize ) = 0; + + /** Retrieves useful information about the bindings for an action */ + virtual EVRInputError GetActionBindingInfo( VRActionHandle_t action, InputBindingInfo_t *pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t *punReturnedBindingInfoCount ) = 0; + + /** Shows the current binding for the action in-headset */ + virtual EVRInputError ShowActionOrigins( VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle ) = 0; + + /** Shows the current binding all the actions in the specified action sets */ + virtual EVRInputError ShowBindingsForActionSet( VR_ARRAY_COUNT( unSetCount ) VRActiveActionSet_t *pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight ) = 0; + + // --------------- Legacy Input ------------------- // + virtual bool IsUsingLegacyInput() = 0; + + + // --------------- Utilities ------------------- // + + /** Opens the binding user interface. If no app key is provided it will use the key from the calling process. + * If no set is provided it will open to the root of the app binding page. */ + virtual EVRInputError OpenBindingUI( const char* pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop ) = 0; + }; + + static const char * const IVRInput_Version = "IVRInput_007"; + +} // namespace vr + +// ivriobuffer.h +namespace vr +{ + +typedef uint64_t IOBufferHandle_t; +static const uint64_t k_ulInvalidIOBufferHandle = 0; + + enum EIOBufferError + { + IOBuffer_Success = 0, + IOBuffer_OperationFailed = 100, + IOBuffer_InvalidHandle = 101, + IOBuffer_InvalidArgument = 102, + IOBuffer_PathExists = 103, + IOBuffer_PathDoesNotExist = 104, + IOBuffer_Permission = 105, + }; + + enum EIOBufferMode + { + IOBufferMode_Read = 0x0001, + IOBufferMode_Write = 0x0002, + IOBufferMode_Create = 0x0200, + }; + + // ---------------------------------------------------------------------------------------------- + // Purpose: + // ---------------------------------------------------------------------------------------------- + class IVRIOBuffer + { + public: + /** opens an existing or creates a new IOBuffer of unSize bytes */ + virtual vr::EIOBufferError Open( const char *pchPath, vr::EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, vr::IOBufferHandle_t *pulBuffer ) = 0; + + /** closes a previously opened or created buffer */ + virtual vr::EIOBufferError Close( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** reads up to unBytes from buffer into *pDst, returning number of bytes read in *punRead */ + virtual vr::EIOBufferError Read( vr::IOBufferHandle_t ulBuffer, void *pDst, uint32_t unBytes, uint32_t *punRead ) = 0; + + /** writes unBytes of data from *pSrc into a buffer. */ + virtual vr::EIOBufferError Write( vr::IOBufferHandle_t ulBuffer, void *pSrc, uint32_t unBytes ) = 0; + + /** retrieves the property container of an buffer. */ + virtual vr::PropertyContainerHandle_t PropertyContainer( vr::IOBufferHandle_t ulBuffer ) = 0; + + /** inexpensively checks for readers to allow writers to fast-fail potentially expensive copies and writes. */ + virtual bool HasReaders( vr::IOBufferHandle_t ulBuffer ) = 0; + }; + + static const char *IVRIOBuffer_Version = "IVRIOBuffer_002"; +} + +// ivrspatialanchors.h +namespace vr +{ + static const SpatialAnchorHandle_t k_ulInvalidSpatialAnchorHandle = 0; + + struct SpatialAnchorPose_t + { + HmdMatrix34_t mAnchorToAbsoluteTracking; + }; + + class IVRSpatialAnchors + { + public: + + /** Returns a handle for an spatial anchor described by "descriptor". On success, pHandle + * will contain a handle valid for this session. Caller can wait for an event or occasionally + * poll GetSpatialAnchorPose() to find the virtual coordinate associated with this anchor. */ + virtual EVRSpatialAnchorError CreateSpatialAnchorFromDescriptor( const char *pchDescriptor, SpatialAnchorHandle_t *pHandleOut ) = 0; + + /** Returns a handle for an new spatial anchor at pPose. On success, pHandle + * will contain a handle valid for this session. Caller can wait for an event or occasionally + * poll GetSpatialAnchorDescriptor() to find the permanent descriptor for this pose. + * The result of GetSpatialAnchorPose() may evolve from this initial position if the driver chooses + * to update it. + * The anchor will be associated with the driver that provides unDeviceIndex, and the driver may use that specific + * device as a hint for how to best create the anchor. + * The eOrigin must match whatever tracking origin you are working in (seated/standing/raw). + * This should be called when the user is close to (and ideally looking at/interacting with) the target physical + * location. At that moment, the driver will have the most information about how to recover that physical point + * in the future, and the quality of the anchor (when the descriptor is re-used) will be highest. + * The caller may decide to apply offsets from this initial pose, but is advised to stay relatively close to the + * original pose location for highest fidelity. */ + virtual EVRSpatialAnchorError CreateSpatialAnchorFromPose( TrackedDeviceIndex_t unDeviceIndex, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPose, SpatialAnchorHandle_t *pHandleOut ) = 0; + + /** Get the pose for a given handle. This is intended to be cheap enough to call every frame (or fairly often) + * so that the driver can refine this position when it has more information available. */ + virtual EVRSpatialAnchorError GetSpatialAnchorPose( SpatialAnchorHandle_t unHandle, ETrackingUniverseOrigin eOrigin, SpatialAnchorPose_t *pPoseOut ) = 0; + + /** Get the descriptor for a given handle. This will be empty for handles where the driver has not + * yet built a descriptor. It will be the application-supplied descriptor for previously saved anchors + * that the application is requesting poses for. If the driver has called UpdateSpatialAnchorDescriptor() + * already in this session, it will be the descriptor provided by the driver. + * Returns true if the descriptor fits into the buffer, else false. Buffer size should be at least + * k_unMaxSpatialAnchorDescriptorSize. */ + virtual EVRSpatialAnchorError GetSpatialAnchorDescriptor( SpatialAnchorHandle_t unHandle, VR_OUT_STRING() char *pchDescriptorOut, uint32_t *punDescriptorBufferLenInOut ) = 0; + + }; + + static const char * const IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; + +} // namespace vr + +// ivrdebug.h +namespace vr +{ + enum EVRDebugError + { + VRDebugError_Success = 0, + VRDebugError_BadParameter + }; + + /** Handle for vr profiler events */ + typedef uint64_t VrProfilerEventHandle_t; + + class IVRDebug + { + public: + + /** Create a vr profiler discrete event (point) + * The event will be associated with the message provided in pchMessage, and the current + * time will be used as the event timestamp. */ + virtual EVRDebugError EmitVrProfilerEvent( const char *pchMessage ) = 0; + + /** Create an vr profiler duration event (line) + * The current time will be used as the timestamp for the start of the line. + * On success, pHandleOut will contain a handle valid for terminating this event. */ + virtual EVRDebugError BeginVrProfilerEvent( VrProfilerEventHandle_t *pHandleOut ) = 0; + + /** Terminate a vr profiler event + * The event associated with hHandle will be considered completed when this method is called. + * The current time will be used assocaited to the termination time of the event, and + * pchMessage will be used as the event title. */ + virtual EVRDebugError FinishVrProfilerEvent( VrProfilerEventHandle_t hHandle, const char *pchMessage ) = 0; + + /** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k, + * but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. + * The size of the response including its terminating null is returned. */ + virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, VR_OUT_STRING() char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0; + + }; + + static const char * const IVRDebug_Version = "IVRDebug_001"; + +} // namespace vr +// End + +#endif // _OPENVR_API + + + +namespace vr +{ +#if !defined( OPENVR_INTERFACE_INTERNAL ) + + /** Finds the active installation of the VR API and initializes it. The provided path must be absolute + * or relative to the current working directory. These are the local install versions of the equivalent + * functions in steamvr.h and will work without a local Steam install. + * + * This path is to the "root" of the VR API install. That's the directory with + * the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself. + * + * pStartupInfo is reserved for future use. + */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo = nullptr ); + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown(); + + /** Returns true if there is an HMD attached. This check is as lightweight as possible and + * can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants + * to know if initializing VR is a possibility but isn't ready to take that step yet. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent(); + + /** Returns true if the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled(); + + /** Returns where the OpenVR runtime is installed. */ + VR_INTERFACE bool VR_GetRuntimePath( VR_OUT_STRING() char *pchPathBuffer, uint32_t unBufferSize, uint32_t *punRequiredBufferSize ); + + /** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error ); + + /** Returns an English string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and + * use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */ + VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error ); + + /** Returns the interface of the specified version. This method must be called after VR_Init. The + * pointer returned is valid until VR_Shutdown is called. + */ + VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError ); + + /** Returns whether the interface of the specified version exists. + */ + VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion ); + + /** Returns a token that represents whether the VR interface handles need to be reloaded */ + VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken(); + + // These typedefs allow old enum names from SDK 0.9.11 to be used in applications. + // They will go away in the future. + typedef EVRInitError HmdError; + typedef EVREye Hmd_Eye; + typedef EColorSpace ColorSpace; + typedef ETrackingResult HmdTrackingResult; + typedef ETrackedDeviceClass TrackedDeviceClass; + typedef ETrackingUniverseOrigin TrackingUniverseOrigin; + typedef ETrackedDeviceProperty TrackedDeviceProperty; + typedef ETrackedPropertyError TrackedPropertyError; + typedef EVRSubmitFlags VRSubmitFlags_t; + typedef EVRState VRState_t; + typedef ECollisionBoundsStyle CollisionBoundsStyle_t; + typedef EVROverlayError VROverlayError; + typedef EVRFirmwareError VRFirmwareError; + typedef EVRCompositorError VRCompositorError; + typedef EVRScreenshotError VRScreenshotsError; + + inline uint32_t &VRToken() + { + static uint32_t token; + return token; + } + + class COpenVRContext + { + public: + COpenVRContext() { Clear(); } + void Clear(); + + inline void CheckClear() + { + if ( VRToken() != VR_GetInitToken() ) + { + Clear(); + VRToken() = VR_GetInitToken(); + } + } + + IVRSystem *VRSystem() + { + CheckClear(); + if ( m_pVRSystem == nullptr ) + { + EVRInitError eError; + m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError ); + } + return m_pVRSystem; + } + IVRChaperone *VRChaperone() + { + CheckClear(); + if ( m_pVRChaperone == nullptr ) + { + EVRInitError eError; + m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError ); + } + return m_pVRChaperone; + } + + IVRChaperoneSetup *VRChaperoneSetup() + { + CheckClear(); + if ( m_pVRChaperoneSetup == nullptr ) + { + EVRInitError eError; + m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError ); + } + return m_pVRChaperoneSetup; + } + + IVRCompositor *VRCompositor() + { + CheckClear(); + if ( m_pVRCompositor == nullptr ) + { + EVRInitError eError; + m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError ); + } + return m_pVRCompositor; + } + + IVROverlay *VROverlay() + { + CheckClear(); + if ( m_pVROverlay == nullptr ) + { + EVRInitError eError; + m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError ); + } + return m_pVROverlay; + } + + IVRResources *VRResources() + { + CheckClear(); + if ( m_pVRResources == nullptr ) + { + EVRInitError eError; + m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError ); + } + return m_pVRResources; + } + + IVRScreenshots *VRScreenshots() + { + CheckClear(); + if ( m_pVRScreenshots == nullptr ) + { + EVRInitError eError; + m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError ); + } + return m_pVRScreenshots; + } + + IVRRenderModels *VRRenderModels() + { + CheckClear(); + if ( m_pVRRenderModels == nullptr ) + { + EVRInitError eError; + m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError ); + } + return m_pVRRenderModels; + } + + IVRExtendedDisplay *VRExtendedDisplay() + { + CheckClear(); + if ( m_pVRExtendedDisplay == nullptr ) + { + EVRInitError eError; + m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError ); + } + return m_pVRExtendedDisplay; + } + + IVRSettings *VRSettings() + { + CheckClear(); + if ( m_pVRSettings == nullptr ) + { + EVRInitError eError; + m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError ); + } + return m_pVRSettings; + } + + IVRApplications *VRApplications() + { + CheckClear(); + if ( m_pVRApplications == nullptr ) + { + EVRInitError eError; + m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError ); + } + return m_pVRApplications; + } + + IVRTrackedCamera *VRTrackedCamera() + { + CheckClear(); + if ( m_pVRTrackedCamera == nullptr ) + { + EVRInitError eError; + m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError ); + } + return m_pVRTrackedCamera; + } + + IVRDriverManager *VRDriverManager() + { + CheckClear(); + if ( !m_pVRDriverManager ) + { + EVRInitError eError; + m_pVRDriverManager = ( IVRDriverManager * )VR_GetGenericInterface( IVRDriverManager_Version, &eError ); + } + return m_pVRDriverManager; + } + + IVRInput *VRInput() + { + CheckClear(); + if ( !m_pVRInput ) + { + EVRInitError eError; + m_pVRInput = (IVRInput *)VR_GetGenericInterface( IVRInput_Version, &eError ); + } + return m_pVRInput; + } + + IVRIOBuffer *VRIOBuffer() + { + if ( !m_pVRIOBuffer ) + { + EVRInitError eError; + m_pVRIOBuffer = ( IVRIOBuffer * )VR_GetGenericInterface( IVRIOBuffer_Version, &eError ); + } + return m_pVRIOBuffer; + } + + IVRSpatialAnchors *VRSpatialAnchors() + { + CheckClear(); + if ( !m_pVRSpatialAnchors ) + { + EVRInitError eError; + m_pVRSpatialAnchors = (IVRSpatialAnchors *)VR_GetGenericInterface( IVRSpatialAnchors_Version, &eError ); + } + return m_pVRSpatialAnchors; + } + + IVRDebug *VRDebug() + { + CheckClear(); + if ( !m_pVRDebug ) + { + EVRInitError eError; + m_pVRDebug = (IVRDebug *)VR_GetGenericInterface( IVRDebug_Version, &eError ); + } + return m_pVRDebug; + } + + IVRNotifications *VRNotifications() + { + CheckClear(); + if ( !m_pVRNotifications ) + { + EVRInitError eError; + m_pVRNotifications = ( IVRNotifications * )VR_GetGenericInterface( IVRNotifications_Version, &eError ); + } + return m_pVRNotifications; + } + + private: + IVRSystem *m_pVRSystem; + IVRChaperone *m_pVRChaperone; + IVRChaperoneSetup *m_pVRChaperoneSetup; + IVRCompositor *m_pVRCompositor; + IVROverlay *m_pVROverlay; + IVRResources *m_pVRResources; + IVRRenderModels *m_pVRRenderModels; + IVRExtendedDisplay *m_pVRExtendedDisplay; + IVRSettings *m_pVRSettings; + IVRApplications *m_pVRApplications; + IVRTrackedCamera *m_pVRTrackedCamera; + IVRScreenshots *m_pVRScreenshots; + IVRDriverManager *m_pVRDriverManager; + IVRInput *m_pVRInput; + IVRIOBuffer *m_pVRIOBuffer; + IVRSpatialAnchors *m_pVRSpatialAnchors; + IVRDebug *m_pVRDebug; + IVRNotifications *m_pVRNotifications; + }; + + inline COpenVRContext &OpenVRInternal_ModuleContext() + { + static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ]; + return *( COpenVRContext * )ctx; // bypass zero-init constructor + } + + inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); } + inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); } + inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); } + inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); } + inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); } + inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); } + inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); } + inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); } + inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); } + inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleContext().VRResources(); } + inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); } + inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); } + inline IVRDriverManager *VR_CALLTYPE VRDriverManager() { return OpenVRInternal_ModuleContext().VRDriverManager(); } + inline IVRInput *VR_CALLTYPE VRInput() { return OpenVRInternal_ModuleContext().VRInput(); } + inline IVRIOBuffer *VR_CALLTYPE VRIOBuffer() { return OpenVRInternal_ModuleContext().VRIOBuffer(); } + inline IVRSpatialAnchors *VR_CALLTYPE VRSpatialAnchors() { return OpenVRInternal_ModuleContext().VRSpatialAnchors(); } + inline IVRNotifications *VR_CALLTYPE VRNotifications() { return OpenVRInternal_ModuleContext().VRNotifications(); } + inline IVRDebug *VR_CALLTYPE VRDebug() { return OpenVRInternal_ModuleContext().VRDebug(); } + + inline void COpenVRContext::Clear() + { + m_pVRSystem = nullptr; + m_pVRChaperone = nullptr; + m_pVRChaperoneSetup = nullptr; + m_pVRCompositor = nullptr; + m_pVROverlay = nullptr; + m_pVRRenderModels = nullptr; + m_pVRExtendedDisplay = nullptr; + m_pVRSettings = nullptr; + m_pVRApplications = nullptr; + m_pVRTrackedCamera = nullptr; + m_pVRResources = nullptr; + m_pVRScreenshots = nullptr; + m_pVRDriverManager = nullptr; + m_pVRInput = nullptr; + m_pVRIOBuffer = nullptr; + m_pVRSpatialAnchors = nullptr; + m_pVRNotifications = nullptr; + m_pVRDebug = nullptr; + } + + VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal2( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ); + VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal(); + + /** Finds the active installation of vrclient.dll and initializes it */ + inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType, const char *pStartupInfo ) + { + IVRSystem *pVRSystem = nullptr; + + EVRInitError eError; + VRToken() = VR_InitInternal2( &eError, eApplicationType, pStartupInfo ); + COpenVRContext &ctx = OpenVRInternal_ModuleContext(); + ctx.Clear(); + + if ( eError == VRInitError_None ) + { + if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) ) + { + pVRSystem = VRSystem(); + } + else + { + VR_ShutdownInternal(); + eError = VRInitError_Init_InterfaceNotFound; + } + } + + if ( peError ) + *peError = eError; + return pVRSystem; + } + + /** unloads vrclient.dll. Any interface pointers from the interface are + * invalid after this point */ + inline void VR_Shutdown() + { + VR_ShutdownInternal(); + } + +#endif // OPENVR_INTERFACE_INTERNAL +} diff --git a/vrclient_x64/tests/capi_thunks_autogen.c b/vrclient_x64/tests/capi_thunks_autogen.c index 61de9bfa81..21654ede95 100644 --- a/vrclient_x64/tests/capi_thunks_autogen.c +++ b/vrclient_x64/tests/capi_thunks_autogen.c @@ -608,22 +608,14 @@ uint32_t __thiscall IVRApplications_007_GetCurrentSceneProcessId(void *_this) return 0; } -const char * __thiscall IVRSettings_002_GetSettingsErrorNameFromEnum(void *_this, EVRSettingsError eError) +const char * __thiscall IVRSettings_003_GetSettingsErrorNameFromEnum(void *_this, EVRSettingsError eError) { push_ptr_parameter(_this); push_uint32_parameter(eError); return 0; } -bool __thiscall IVRSettings_002_Sync(void *_this, bool bForce, EVRSettingsError * peError) -{ - push_ptr_parameter(_this); - push_bool_parameter(bForce); - push_ptr_parameter(peError); - return 0; -} - -void __thiscall IVRSettings_002_SetBool(void *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +void __thiscall IVRSettings_003_SetBool(void *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -632,7 +624,7 @@ void __thiscall IVRSettings_002_SetBool(void *_this, const char * pchSection, co push_ptr_parameter(peError); } -void __thiscall IVRSettings_002_SetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +void __thiscall IVRSettings_003_SetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -641,7 +633,7 @@ void __thiscall IVRSettings_002_SetInt32(void *_this, const char * pchSection, c push_ptr_parameter(peError); } -void __thiscall IVRSettings_002_SetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +void __thiscall IVRSettings_003_SetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -650,7 +642,7 @@ void __thiscall IVRSettings_002_SetFloat(void *_this, const char * pchSection, c push_ptr_parameter(peError); } -void __thiscall IVRSettings_002_SetString(void *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +void __thiscall IVRSettings_003_SetString(void *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -659,7 +651,7 @@ void __thiscall IVRSettings_002_SetString(void *_this, const char * pchSection, push_ptr_parameter(peError); } -bool __thiscall IVRSettings_002_GetBool(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +bool __thiscall IVRSettings_003_GetBool(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -668,7 +660,7 @@ bool __thiscall IVRSettings_002_GetBool(void *_this, const char * pchSection, co return 0; } -int32_t __thiscall IVRSettings_002_GetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +int32_t __thiscall IVRSettings_003_GetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -677,7 +669,7 @@ int32_t __thiscall IVRSettings_002_GetInt32(void *_this, const char * pchSection return 0; } -float __thiscall IVRSettings_002_GetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +float __thiscall IVRSettings_003_GetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -686,7 +678,7 @@ float __thiscall IVRSettings_002_GetFloat(void *_this, const char * pchSection, return 0; } -void __thiscall IVRSettings_002_GetString(void *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) +void __thiscall IVRSettings_003_GetString(void *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -696,14 +688,14 @@ void __thiscall IVRSettings_002_GetString(void *_this, const char * pchSection, push_ptr_parameter(peError); } -void __thiscall IVRSettings_002_RemoveSection(void *_this, const char * pchSection, EVRSettingsError * peError) +void __thiscall IVRSettings_003_RemoveSection(void *_this, const char * pchSection, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); push_ptr_parameter(peError); } -void __thiscall IVRSettings_002_RemoveKeyInSection(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +void __thiscall IVRSettings_003_RemoveKeyInSection(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) { push_ptr_parameter(_this); push_ptr_parameter(pchSection); @@ -898,19 +890,19 @@ void __thiscall IVRChaperoneSetup_006_RoomSetupStarting(void *_this) push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin) +void __thiscall IVRCompositor_026_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin) { push_ptr_parameter(_this); push_uint32_parameter(eOrigin); } -ETrackingUniverseOrigin __thiscall IVRCompositor_022_GetTrackingSpace(void *_this) +ETrackingUniverseOrigin __thiscall IVRCompositor_026_GetTrackingSpace(void *_this) { push_ptr_parameter(_this); return 0; } -EVRCompositorError __thiscall IVRCompositor_022_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +EVRCompositorError __thiscall IVRCompositor_026_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) { push_ptr_parameter(_this); push_ptr_parameter(pRenderPoseArray); @@ -920,7 +912,7 @@ EVRCompositorError __thiscall IVRCompositor_022_WaitGetPoses(void *_this, Tracke return 0; } -EVRCompositorError __thiscall IVRCompositor_022_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +EVRCompositorError __thiscall IVRCompositor_026_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) { push_ptr_parameter(_this); push_ptr_parameter(pRenderPoseArray); @@ -930,7 +922,7 @@ EVRCompositorError __thiscall IVRCompositor_022_GetLastPoses(void *_this, Tracke return 0; } -EVRCompositorError __thiscall IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +EVRCompositorError __thiscall IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) { push_ptr_parameter(_this); push_uint32_parameter(unDeviceIndex); @@ -939,7 +931,7 @@ EVRCompositorError __thiscall IVRCompositor_022_GetLastPoseForTrackedDeviceIndex return 0; } -EVRCompositorError __thiscall IVRCompositor_022_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +EVRCompositorError __thiscall IVRCompositor_026_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) { push_ptr_parameter(_this); push_uint32_parameter(eEye); @@ -949,17 +941,17 @@ EVRCompositorError __thiscall IVRCompositor_022_Submit(void *_this, EVREye eEye, return 0; } -void __thiscall IVRCompositor_022_ClearLastSubmittedFrame(void *_this) +void __thiscall IVRCompositor_026_ClearLastSubmittedFrame(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_PostPresentHandoff(void *_this) +void __thiscall IVRCompositor_026_PostPresentHandoff(void *_this) { push_ptr_parameter(_this); } -bool __thiscall IVRCompositor_022_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +bool __thiscall IVRCompositor_026_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) { push_ptr_parameter(_this); push_ptr_parameter(pTiming); @@ -967,7 +959,7 @@ bool __thiscall IVRCompositor_022_GetFrameTiming(void *_this, Compositor_FrameTi return 0; } -uint32_t __thiscall IVRCompositor_022_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +uint32_t __thiscall IVRCompositor_026_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) { push_ptr_parameter(_this); push_ptr_parameter(pTiming); @@ -975,20 +967,20 @@ uint32_t __thiscall IVRCompositor_022_GetFrameTimings(void *_this, Compositor_Fr return 0; } -float __thiscall IVRCompositor_022_GetFrameTimeRemaining(void *_this) +float __thiscall IVRCompositor_026_GetFrameTimeRemaining(void *_this) { push_ptr_parameter(_this); return 0; } -void __thiscall IVRCompositor_022_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +void __thiscall IVRCompositor_026_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) { push_ptr_parameter(_this); push_ptr_parameter(pStats); push_uint32_parameter(nStatsSizeInBytes); } -void __thiscall IVRCompositor_022_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +void __thiscall IVRCompositor_026_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) { push_ptr_parameter(_this); push_float_parameter(fSeconds); @@ -999,7 +991,7 @@ void __thiscall IVRCompositor_022_FadeToColor(void *_this, float fSeconds, float push_bool_parameter(bBackground); } -HmdColor_t *__thiscall IVRCompositor_022_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground) +HmdColor_t *__thiscall IVRCompositor_026_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground) { push_ptr_parameter(_this); push_ptr_parameter(_r); @@ -1007,20 +999,20 @@ HmdColor_t *__thiscall IVRCompositor_022_GetCurrentFadeColor(void *_this, HmdCol return 0; } -void __thiscall IVRCompositor_022_FadeGrid(void *_this, float fSeconds, bool bFadeIn) +void __thiscall IVRCompositor_026_FadeGrid(void *_this, float fSeconds, bool bFadeIn) { push_ptr_parameter(_this); push_float_parameter(fSeconds); push_bool_parameter(bFadeIn); } -float __thiscall IVRCompositor_022_GetCurrentGridAlpha(void *_this) +float __thiscall IVRCompositor_026_GetCurrentGridAlpha(void *_this) { push_ptr_parameter(_this); return 0; } -EVRCompositorError __thiscall IVRCompositor_022_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount) +EVRCompositorError __thiscall IVRCompositor_026_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount) { push_ptr_parameter(_this); push_ptr_parameter(pTextures); @@ -1028,95 +1020,95 @@ EVRCompositorError __thiscall IVRCompositor_022_SetSkyboxOverride(void *_this, T return 0; } -void __thiscall IVRCompositor_022_ClearSkyboxOverride(void *_this) +void __thiscall IVRCompositor_026_ClearSkyboxOverride(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_CompositorBringToFront(void *_this) +void __thiscall IVRCompositor_026_CompositorBringToFront(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_CompositorGoToBack(void *_this) +void __thiscall IVRCompositor_026_CompositorGoToBack(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_CompositorQuit(void *_this) +void __thiscall IVRCompositor_026_CompositorQuit(void *_this) { push_ptr_parameter(_this); } -bool __thiscall IVRCompositor_022_IsFullscreen(void *_this) +bool __thiscall IVRCompositor_026_IsFullscreen(void *_this) { push_ptr_parameter(_this); return 0; } -uint32_t __thiscall IVRCompositor_022_GetCurrentSceneFocusProcess(void *_this) +uint32_t __thiscall IVRCompositor_026_GetCurrentSceneFocusProcess(void *_this) { push_ptr_parameter(_this); return 0; } -uint32_t __thiscall IVRCompositor_022_GetLastFrameRenderer(void *_this) +uint32_t __thiscall IVRCompositor_026_GetLastFrameRenderer(void *_this) { push_ptr_parameter(_this); return 0; } -bool __thiscall IVRCompositor_022_CanRenderScene(void *_this) +bool __thiscall IVRCompositor_026_CanRenderScene(void *_this) { push_ptr_parameter(_this); return 0; } -void __thiscall IVRCompositor_022_ShowMirrorWindow(void *_this) +void __thiscall IVRCompositor_026_ShowMirrorWindow(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_HideMirrorWindow(void *_this) +void __thiscall IVRCompositor_026_HideMirrorWindow(void *_this) { push_ptr_parameter(_this); } -bool __thiscall IVRCompositor_022_IsMirrorWindowVisible(void *_this) +bool __thiscall IVRCompositor_026_IsMirrorWindowVisible(void *_this) { push_ptr_parameter(_this); return 0; } -void __thiscall IVRCompositor_022_CompositorDumpImages(void *_this) +void __thiscall IVRCompositor_026_CompositorDumpImages(void *_this) { push_ptr_parameter(_this); } -bool __thiscall IVRCompositor_022_ShouldAppRenderWithLowResources(void *_this) +bool __thiscall IVRCompositor_026_ShouldAppRenderWithLowResources(void *_this) { push_ptr_parameter(_this); return 0; } -void __thiscall IVRCompositor_022_ForceInterleavedReprojectionOn(void *_this, bool bOverride) +void __thiscall IVRCompositor_026_ForceInterleavedReprojectionOn(void *_this, bool bOverride) { push_ptr_parameter(_this); push_bool_parameter(bOverride); } -void __thiscall IVRCompositor_022_ForceReconnectProcess(void *_this) +void __thiscall IVRCompositor_026_ForceReconnectProcess(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVRCompositor_022_SuspendRendering(void *_this, bool bSuspend) +void __thiscall IVRCompositor_026_SuspendRendering(void *_this, bool bSuspend) { push_ptr_parameter(_this); push_bool_parameter(bSuspend); } -EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +EVRCompositorError __thiscall IVRCompositor_026_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) { push_ptr_parameter(_this); push_uint32_parameter(eEye); @@ -1125,13 +1117,13 @@ EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureD3D11(void *_thi return 0; } -void __thiscall IVRCompositor_022_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView) +void __thiscall IVRCompositor_026_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView) { push_ptr_parameter(_this); push_ptr_parameter(pD3D11ShaderResourceView); } -EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +EVRCompositorError __thiscall IVRCompositor_026_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) { push_ptr_parameter(_this); push_uint32_parameter(eEye); @@ -1140,7 +1132,7 @@ EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureGL(void *_this, return 0; } -bool __thiscall IVRCompositor_022_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +bool __thiscall IVRCompositor_026_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) { push_ptr_parameter(_this); push_uint32_parameter(glTextureId); @@ -1148,19 +1140,19 @@ bool __thiscall IVRCompositor_022_ReleaseSharedGLTexture(void *_this, glUInt_t g return 0; } -void __thiscall IVRCompositor_022_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) +void __thiscall IVRCompositor_026_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) { push_ptr_parameter(_this); push_ptr_parameter(glSharedTextureHandle); } -void __thiscall IVRCompositor_022_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) +void __thiscall IVRCompositor_026_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) { push_ptr_parameter(_this); push_ptr_parameter(glSharedTextureHandle); } -uint32_t __thiscall IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize) +uint32_t __thiscall IVRCompositor_026_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize) { push_ptr_parameter(_this); push_ptr_parameter(pchValue); @@ -1168,7 +1160,7 @@ uint32_t __thiscall IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void * return 0; } -uint32_t __thiscall IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +uint32_t __thiscall IVRCompositor_026_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) { push_ptr_parameter(_this); push_ptr_parameter(pPhysicalDevice); @@ -1177,36 +1169,134 @@ uint32_t __thiscall IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *_t return 0; } -void __thiscall IVRCompositor_022_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode) +void __thiscall IVRCompositor_026_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode) { push_ptr_parameter(_this); push_uint32_parameter(eTimingMode); } -EVRCompositorError __thiscall IVRCompositor_022_SubmitExplicitTimingData(void *_this) +EVRCompositorError __thiscall IVRCompositor_026_SubmitExplicitTimingData(void *_this) { push_ptr_parameter(_this); return 0; } -bool __thiscall IVRCompositor_022_IsMotionSmoothingEnabled(void *_this) +bool __thiscall IVRCompositor_026_IsMotionSmoothingEnabled(void *_this) { push_ptr_parameter(_this); return 0; } -bool __thiscall IVRCompositor_022_IsMotionSmoothingSupported(void *_this) +bool __thiscall IVRCompositor_026_IsMotionSmoothingSupported(void *_this) { push_ptr_parameter(_this); return 0; } -bool __thiscall IVRCompositor_022_IsCurrentSceneFocusAppLoading(void *_this) +bool __thiscall IVRCompositor_026_IsCurrentSceneFocusAppLoading(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_026_SetStageOverride_Async(void *_this, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchRenderModelPath); + push_ptr_parameter(pTransform); + push_ptr_parameter(pRenderSettings); + push_uint32_parameter(nSizeOfRenderSettings); + return 0; +} + +void __thiscall IVRCompositor_026_ClearStageOverride(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_026_GetCompositorBenchmarkResults(void *_this, Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pBenchmarkResults); + push_uint32_parameter(nSizeOfBenchmarkResults); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_026_GetLastPosePredictionIDs(void *_this, uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pRenderPosePredictionID); + push_ptr_parameter(pGamePosePredictionID); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_026_GetPosesForFrame(void *_this, uint32_t unPosePredictionID, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount) +{ + push_ptr_parameter(_this); + push_uint32_parameter(unPosePredictionID); + push_ptr_parameter(pPoseArray); + push_uint32_parameter(unPoseArrayCount); + return 0; +} + +void __thiscall IVRHeadsetView_001_SetHeadsetViewSize(void *_this, uint32_t nWidth, uint32_t nHeight) +{ + push_ptr_parameter(_this); + push_uint32_parameter(nWidth); + push_uint32_parameter(nHeight); +} + +void __thiscall IVRHeadsetView_001_GetHeadsetViewSize(void *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pnWidth); + push_ptr_parameter(pnHeight); +} + +void __thiscall IVRHeadsetView_001_SetHeadsetViewMode(void *_this, HeadsetViewMode_t eHeadsetViewMode) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eHeadsetViewMode); +} + +HeadsetViewMode_t __thiscall IVRHeadsetView_001_GetHeadsetViewMode(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRHeadsetView_001_SetHeadsetViewCropped(void *_this, bool bCropped) +{ + push_ptr_parameter(_this); + push_bool_parameter(bCropped); +} + +bool __thiscall IVRHeadsetView_001_GetHeadsetViewCropped(void *_this) { push_ptr_parameter(_this); return 0; } +float __thiscall IVRHeadsetView_001_GetHeadsetViewAspectRatio(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRHeadsetView_001_SetHeadsetViewBlendRange(void *_this, float flStartPct, float flEndPct) +{ + push_ptr_parameter(_this); + push_float_parameter(flStartPct); + push_float_parameter(flEndPct); +} + +void __thiscall IVRHeadsetView_001_GetHeadsetViewBlendRange(void *_this, float * pStartPct, float * pEndPct) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pStartPct); + push_ptr_parameter(pEndPct); +} + EVRNotificationError __thiscall IVRNotifications_002_CreateNotification(void *_this, VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char * pchText, EVRNotificationStyle style, NotificationBitmap_t * pImage, VRNotificationId * pNotificationId) { push_ptr_parameter(_this); @@ -1227,7 +1317,7 @@ EVRNotificationError __thiscall IVRNotifications_002_RemoveNotification(void *_t return 0; } -EVROverlayError __thiscall IVROverlay_021_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) { push_ptr_parameter(_this); push_ptr_parameter(pchOverlayKey); @@ -1235,7 +1325,7 @@ EVROverlayError __thiscall IVROverlay_021_FindOverlay(void *_this, const char * return 0; } -EVROverlayError __thiscall IVROverlay_021_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) { push_ptr_parameter(_this); push_ptr_parameter(pchOverlayKey); @@ -1244,14 +1334,14 @@ EVROverlayError __thiscall IVROverlay_021_CreateOverlay(void *_this, const char return 0; } -EVROverlayError __thiscall IVROverlay_021_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); return 0; } -uint32_t __thiscall IVROverlay_021_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +uint32_t __thiscall IVROverlay_024_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1261,7 +1351,7 @@ uint32_t __thiscall IVROverlay_021_GetOverlayKey(void *_this, VROverlayHandle_t return 0; } -uint32_t __thiscall IVROverlay_021_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +uint32_t __thiscall IVROverlay_024_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1271,7 +1361,7 @@ uint32_t __thiscall IVROverlay_021_GetOverlayName(void *_this, VROverlayHandle_t return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +EVROverlayError __thiscall IVROverlay_024_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1279,7 +1369,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayName(void *_this, VROverlayH return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +EVROverlayError __thiscall IVROverlay_024_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1290,14 +1380,14 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayImageData(void *_this, VROve return 0; } -const char * __thiscall IVROverlay_021_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error) +const char * __thiscall IVROverlay_024_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error) { push_ptr_parameter(_this); push_uint32_parameter(error); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +EVROverlayError __thiscall IVROverlay_024_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1305,14 +1395,14 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderingPid(void *_this, VR return 0; } -uint32_t __thiscall IVROverlay_021_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle) +uint32_t __thiscall IVROverlay_024_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +EVROverlayError __thiscall IVROverlay_024_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1321,7 +1411,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayFlag(void *_this, VROverlayH return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +EVROverlayError __thiscall IVROverlay_024_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1330,7 +1420,15 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayFlag(void *_this, VROverlayH return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +EVROverlayError __thiscall IVROverlay_024_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pFlags); + return 0; +} + +EVROverlayError __thiscall IVROverlay_024_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1340,7 +1438,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayColor(void *_this, VROverlay return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +EVROverlayError __thiscall IVROverlay_024_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1350,7 +1448,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayColor(void *_this, VROverlay return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +EVROverlayError __thiscall IVROverlay_024_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1358,7 +1456,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayAlpha(void *_this, VROverlay return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +EVROverlayError __thiscall IVROverlay_024_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1366,7 +1464,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayAlpha(void *_this, VROverlay return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1374,7 +1472,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTexelAspect(void *_this, VRO return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1382,7 +1480,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTexelAspect(void *_this, VRO return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +EVROverlayError __thiscall IVROverlay_024_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1390,7 +1488,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlaySortOrder(void *_this, VROve return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +EVROverlayError __thiscall IVROverlay_024_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1398,7 +1496,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlaySortOrder(void *_this, VROve return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +EVROverlayError __thiscall IVROverlay_024_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1406,7 +1504,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayWidthInMeters(void *_this, V return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +EVROverlayError __thiscall IVROverlay_024_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1414,7 +1512,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayWidthInMeters(void *_this, V return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature) +EVROverlayError __thiscall IVROverlay_024_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1422,7 +1520,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayCurvature(void *_this, VROve return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +EVROverlayError __thiscall IVROverlay_024_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1430,7 +1528,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayCurvature(void *_this, VROve return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1438,7 +1536,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureColorSpace(void *_thi return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1446,7 +1544,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureColorSpace(void *_thi return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1454,7 +1552,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureBounds(void *_this, V return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1462,27 +1560,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureBounds(void *_this, V return 0; } -uint32_t __thiscall IVROverlay_021_GetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) -{ - push_ptr_parameter(_this); - push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pchValue); - push_uint32_parameter(unBufferSize); - push_ptr_parameter(pColor); - push_ptr_parameter(pError); - return 0; -} - -EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) -{ - push_ptr_parameter(_this); - push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pchRenderModel); - push_ptr_parameter(pColor); - return 0; -} - -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1490,7 +1568,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformType(void *_this, V return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1499,7 +1577,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformAbsolute(void *_thi return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1508,7 +1586,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformAbsolute(void *_thi return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1517,7 +1595,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceRelati return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1526,7 +1604,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceRelati return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1535,7 +1613,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceCompon return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1545,7 +1623,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceCompon return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1554,7 +1632,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformOverlayRelative(voi return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1563,28 +1641,44 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformOverlayRelative(voi return 0; } -EVROverlayError __thiscall IVROverlay_021_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformCursor(void *_this, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulCursorOverlayHandle); + push_ptr_parameter(pvHotspot); + return 0; +} + +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformCursor(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvHotspot); return 0; } -EVROverlayError __thiscall IVROverlay_021_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); return 0; } -bool __thiscall IVROverlay_021_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); return 0; } -EVROverlayError __thiscall IVROverlay_021_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +bool __thiscall IVROverlay_024_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_024_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1594,7 +1688,7 @@ EVROverlayError __thiscall IVROverlay_021_GetTransformForOverlayCoordinates(void return 0; } -bool __thiscall IVROverlay_021_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) +bool __thiscall IVROverlay_024_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1603,7 +1697,7 @@ bool __thiscall IVROverlay_021_PollNextOverlayEvent(void *_this, VROverlayHandle return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +EVROverlayError __thiscall IVROverlay_024_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1611,7 +1705,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayInputMethod(void *_this, VRO return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +EVROverlayError __thiscall IVROverlay_024_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1619,7 +1713,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayInputMethod(void *_this, VRO return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +EVROverlayError __thiscall IVROverlay_024_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1627,7 +1721,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayMouseScale(void *_this, VROv return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +EVROverlayError __thiscall IVROverlay_024_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1635,7 +1729,7 @@ EVROverlayError __thiscall IVROverlay_021_SetOverlayMouseScale(void *_this, VROv return 0; } -bool __thiscall IVROverlay_021_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +bool __thiscall IVROverlay_024_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1644,83 +1738,106 @@ bool __thiscall IVROverlay_021_ComputeOverlayIntersection(void *_this, VROverlay return 0; } -bool __thiscall IVROverlay_021_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +bool __thiscall IVROverlay_024_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) +EVROverlayError __thiscall IVROverlay_024_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) { push_ptr_parameter(_this); - push_uint64_parameter(ulOverlay); - push_uint32_parameter(eWhich); - push_ptr_parameter(pvCenter); - push_float_parameter(fRadius); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pMaskPrimitives); + push_uint32_parameter(unNumMaskPrimitives); + push_uint32_parameter(unPrimitiveSize); return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +EVROverlayError __thiscall IVROverlay_024_TriggerLaserMouseHapticVibration(void *_this, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) { push_ptr_parameter(_this); - push_uint64_parameter(ulOverlay); - push_uint32_parameter(eWhich); - push_ptr_parameter(pvCenter); - push_ptr_parameter(pfRadius); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fDurationSeconds); + push_float_parameter(fFrequency); + push_float_parameter(fAmplitude); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +EVROverlayError __thiscall IVROverlay_024_SetOverlayCursor(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pTexture); + push_uint64_parameter(ulCursorHandle); return 0; } -EVROverlayError __thiscall IVROverlay_021_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle) +EVROverlayError __thiscall IVROverlay_024_SetOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvCursor); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +EVROverlayError __thiscall IVROverlay_024_ClearOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pvBuffer); - push_uint32_parameter(unWidth); - push_uint32_parameter(unHeight); - push_uint32_parameter(unDepth); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +EVROverlayError __thiscall IVROverlay_024_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pchFilePath); + push_ptr_parameter(pTexture); return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +EVROverlayError __thiscall IVROverlay_024_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pNativeTextureHandle); - push_ptr_parameter(pNativeTextureRef); - push_ptr_parameter(pWidth); - push_ptr_parameter(pHeight); - push_ptr_parameter(pNativeFormat); - push_ptr_parameter(pAPIType); - push_ptr_parameter(pColorSpace); + return 0; +} + +EVROverlayError __thiscall IVROverlay_024_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvBuffer); + push_uint32_parameter(unWidth); + push_uint32_parameter(unHeight); + push_uint32_parameter(unBytesPerPixel); + return 0; +} + +EVROverlayError __thiscall IVROverlay_024_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchFilePath); + return 0; +} + +EVROverlayError __thiscall IVROverlay_024_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pNativeTextureHandle); + push_ptr_parameter(pNativeTextureRef); + push_ptr_parameter(pWidth); + push_ptr_parameter(pHeight); + push_ptr_parameter(pNativeFormat); + push_ptr_parameter(pAPIType); + push_ptr_parameter(pColorSpace); push_ptr_parameter(pTextureBounds); return 0; } -EVROverlayError __thiscall IVROverlay_021_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +EVROverlayError __thiscall IVROverlay_024_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1728,7 +1845,7 @@ EVROverlayError __thiscall IVROverlay_021_ReleaseNativeOverlayHandle(void *_this return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +EVROverlayError __thiscall IVROverlay_024_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1737,7 +1854,7 @@ EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureSize(void *_this, VRO return 0; } -EVROverlayError __thiscall IVROverlay_021_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +EVROverlayError __thiscall IVROverlay_024_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) { push_ptr_parameter(_this); push_ptr_parameter(pchOverlayKey); @@ -1747,20 +1864,20 @@ EVROverlayError __thiscall IVROverlay_021_CreateDashboardOverlay(void *_this, co return 0; } -bool __thiscall IVROverlay_021_IsDashboardVisible(void *_this) +bool __thiscall IVROverlay_024_IsDashboardVisible(void *_this) { push_ptr_parameter(_this); return 0; } -bool __thiscall IVROverlay_021_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +bool __thiscall IVROverlay_024_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); return 0; } -EVROverlayError __thiscall IVROverlay_021_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +EVROverlayError __thiscall IVROverlay_024_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1768,7 +1885,7 @@ EVROverlayError __thiscall IVROverlay_021_SetDashboardOverlaySceneProcess(void * return 0; } -EVROverlayError __thiscall IVROverlay_021_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +EVROverlayError __thiscall IVROverlay_024_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); @@ -1776,46 +1893,46 @@ EVROverlayError __thiscall IVROverlay_021_GetDashboardOverlaySceneProcess(void * return 0; } -void __thiscall IVROverlay_021_ShowDashboard(void *_this, const char * pchOverlayToShow) +void __thiscall IVROverlay_024_ShowDashboard(void *_this, const char * pchOverlayToShow) { push_ptr_parameter(_this); push_ptr_parameter(pchOverlayToShow); } -TrackedDeviceIndex_t __thiscall IVROverlay_021_GetPrimaryDashboardDevice(void *_this) +TrackedDeviceIndex_t __thiscall IVROverlay_024_GetPrimaryDashboardDevice(void *_this) { push_ptr_parameter(_this); return 0; } -EVROverlayError __thiscall IVROverlay_021_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +EVROverlayError __thiscall IVROverlay_024_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) { push_ptr_parameter(_this); push_uint32_parameter(eInputMode); push_uint32_parameter(eLineInputMode); + push_uint32_parameter(unFlags); push_ptr_parameter(pchDescription); push_uint32_parameter(unCharMax); push_ptr_parameter(pchExistingText); - push_bool_parameter(bUseMinimalMode); push_uint64_parameter(uUserValue); return 0; } -EVROverlayError __thiscall IVROverlay_021_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +EVROverlayError __thiscall IVROverlay_024_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); push_uint32_parameter(eInputMode); push_uint32_parameter(eLineInputMode); + push_uint32_parameter(unFlags); push_ptr_parameter(pchDescription); push_uint32_parameter(unCharMax); push_ptr_parameter(pchExistingText); - push_bool_parameter(bUseMinimalMode); push_uint64_parameter(uUserValue); return 0; } -uint32_t __thiscall IVROverlay_021_GetKeyboardText(void *_this, char * pchText, uint32_t cchText) +uint32_t __thiscall IVROverlay_024_GetKeyboardText(void *_this, char * pchText, uint32_t cchText) { push_ptr_parameter(_this); push_ptr_parameter(pchText); @@ -1823,58 +1940,71 @@ uint32_t __thiscall IVROverlay_021_GetKeyboardText(void *_this, char * pchText, return 0; } -void __thiscall IVROverlay_021_HideKeyboard(void *_this) +void __thiscall IVROverlay_024_HideKeyboard(void *_this) { push_ptr_parameter(_this); } -void __thiscall IVROverlay_021_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +void __thiscall IVROverlay_024_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) { push_ptr_parameter(_this); push_uint32_parameter(eTrackingOrigin); push_ptr_parameter(pmatTrackingOriginToKeyboardTransform); } -void __thiscall IVROverlay_021_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +void __thiscall IVROverlay_024_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); push_HmdRect2_parameter(avoidRect); } -EVROverlayError __thiscall IVROverlay_021_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +VRMessageOverlayResponse __thiscall IVROverlay_024_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) { push_ptr_parameter(_this); - push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pMaskPrimitives); - push_uint32_parameter(unNumMaskPrimitives); - push_uint32_parameter(unPrimitiveSize); + push_ptr_parameter(pchText); + push_ptr_parameter(pchCaption); + push_ptr_parameter(pchButton0Text); + push_ptr_parameter(pchButton1Text); + push_ptr_parameter(pchButton2Text); + push_ptr_parameter(pchButton3Text); return 0; } -EVROverlayError __thiscall IVROverlay_021_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +void __thiscall IVROverlay_024_CloseMessageOverlay(void *_this) +{ + push_ptr_parameter(_this); +} + +EVROverlayError __thiscall IVROverlayView_003_AcquireOverlayView(void *_this, VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t * pNativeDevice, VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize) { push_ptr_parameter(_this); push_uint64_parameter(ulOverlayHandle); - push_ptr_parameter(pFlags); + push_ptr_parameter(pNativeDevice); + push_ptr_parameter(pOverlayView); + push_uint32_parameter(unOverlayViewSize); return 0; } -VRMessageOverlayResponse __thiscall IVROverlay_021_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +EVROverlayError __thiscall IVROverlayView_003_ReleaseOverlayView(void *_this, VROverlayView_t * pOverlayView) { push_ptr_parameter(_this); - push_ptr_parameter(pchText); - push_ptr_parameter(pchCaption); - push_ptr_parameter(pchButton0Text); - push_ptr_parameter(pchButton1Text); - push_ptr_parameter(pchButton2Text); - push_ptr_parameter(pchButton3Text); + push_ptr_parameter(pOverlayView); return 0; } -void __thiscall IVROverlay_021_CloseMessageOverlay(void *_this) +void __thiscall IVROverlayView_003_PostOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pvrEvent) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvrEvent); +} + +bool __thiscall IVROverlayView_003_IsViewingPermitted(void *_this, VROverlayHandle_t ulOverlayHandle) { push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; } EVRRenderModelError __thiscall IVRRenderModels_006_LoadRenderModel_Async(void *_this, const char * pchRenderModelName, RenderModel_t ** ppRenderModel) @@ -2303,14 +2433,14 @@ bool __thiscall IVRDriverManager_001_IsEnabled(void *_this, DriverId_t nDriver) return 0; } -EVRInputError __thiscall IVRInput_007_SetActionManifestPath(void *_this, const char * pchActionManifestPath) +EVRInputError __thiscall IVRInput_010_SetActionManifestPath(void *_this, const char * pchActionManifestPath) { push_ptr_parameter(_this); push_ptr_parameter(pchActionManifestPath); return 0; } -EVRInputError __thiscall IVRInput_007_GetActionSetHandle(void *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle) +EVRInputError __thiscall IVRInput_010_GetActionSetHandle(void *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle) { push_ptr_parameter(_this); push_ptr_parameter(pchActionSetName); @@ -2318,7 +2448,7 @@ EVRInputError __thiscall IVRInput_007_GetActionSetHandle(void *_this, const char return 0; } -EVRInputError __thiscall IVRInput_007_GetActionHandle(void *_this, const char * pchActionName, VRActionHandle_t * pHandle) +EVRInputError __thiscall IVRInput_010_GetActionHandle(void *_this, const char * pchActionName, VRActionHandle_t * pHandle) { push_ptr_parameter(_this); push_ptr_parameter(pchActionName); @@ -2326,7 +2456,7 @@ EVRInputError __thiscall IVRInput_007_GetActionHandle(void *_this, const char * return 0; } -EVRInputError __thiscall IVRInput_007_GetInputSourceHandle(void *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) +EVRInputError __thiscall IVRInput_010_GetInputSourceHandle(void *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) { push_ptr_parameter(_this); push_ptr_parameter(pchInputSourcePath); @@ -2334,7 +2464,7 @@ EVRInputError __thiscall IVRInput_007_GetInputSourceHandle(void *_this, const ch return 0; } -EVRInputError __thiscall IVRInput_007_UpdateActionState(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) +EVRInputError __thiscall IVRInput_010_UpdateActionState(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) { push_ptr_parameter(_this); push_ptr_parameter(pSets); @@ -2343,7 +2473,7 @@ EVRInputError __thiscall IVRInput_007_UpdateActionState(void *_this, VRActiveAct return 0; } -EVRInputError __thiscall IVRInput_007_GetDigitalActionData(void *_this, VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall IVRInput_010_GetDigitalActionData(void *_this, VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2353,7 +2483,7 @@ EVRInputError __thiscall IVRInput_007_GetDigitalActionData(void *_this, VRAction return 0; } -EVRInputError __thiscall IVRInput_007_GetAnalogActionData(void *_this, VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall IVRInput_010_GetAnalogActionData(void *_this, VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2363,7 +2493,7 @@ EVRInputError __thiscall IVRInput_007_GetAnalogActionData(void *_this, VRActionH return 0; } -EVRInputError __thiscall IVRInput_007_GetPoseActionDataRelativeToNow(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall IVRInput_010_GetPoseActionDataRelativeToNow(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2375,7 +2505,7 @@ EVRInputError __thiscall IVRInput_007_GetPoseActionDataRelativeToNow(void *_this return 0; } -EVRInputError __thiscall IVRInput_007_GetPoseActionDataForNextFrame(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall IVRInput_010_GetPoseActionDataForNextFrame(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2386,7 +2516,7 @@ EVRInputError __thiscall IVRInput_007_GetPoseActionDataForNextFrame(void *_this, return 0; } -EVRInputError __thiscall IVRInput_007_GetSkeletalActionData(void *_this, VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize) +EVRInputError __thiscall IVRInput_010_GetSkeletalActionData(void *_this, VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2395,7 +2525,21 @@ EVRInputError __thiscall IVRInput_007_GetSkeletalActionData(void *_this, VRActio return 0; } -EVRInputError __thiscall IVRInput_007_GetBoneCount(void *_this, VRActionHandle_t action, uint32_t * pBoneCount) +EVRInputError __thiscall IVRInput_010_GetDominantHand(void *_this, ETrackedControllerRole * peDominantHand) +{ + push_ptr_parameter(_this); + push_ptr_parameter(peDominantHand); + return 0; +} + +EVRInputError __thiscall IVRInput_010_SetDominantHand(void *_this, ETrackedControllerRole eDominantHand) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eDominantHand); + return 0; +} + +EVRInputError __thiscall IVRInput_010_GetBoneCount(void *_this, VRActionHandle_t action, uint32_t * pBoneCount) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2403,7 +2547,7 @@ EVRInputError __thiscall IVRInput_007_GetBoneCount(void *_this, VRActionHandle_t return 0; } -EVRInputError __thiscall IVRInput_007_GetBoneHierarchy(void *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) +EVRInputError __thiscall IVRInput_010_GetBoneHierarchy(void *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2412,7 +2556,7 @@ EVRInputError __thiscall IVRInput_007_GetBoneHierarchy(void *_this, VRActionHand return 0; } -EVRInputError __thiscall IVRInput_007_GetBoneName(void *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) +EVRInputError __thiscall IVRInput_010_GetBoneName(void *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2422,7 +2566,7 @@ EVRInputError __thiscall IVRInput_007_GetBoneName(void *_this, VRActionHandle_t return 0; } -EVRInputError __thiscall IVRInput_007_GetSkeletalReferenceTransforms(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +EVRInputError __thiscall IVRInput_010_GetSkeletalReferenceTransforms(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2433,7 +2577,7 @@ EVRInputError __thiscall IVRInput_007_GetSkeletalReferenceTransforms(void *_this return 0; } -EVRInputError __thiscall IVRInput_007_GetSkeletalTrackingLevel(void *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) +EVRInputError __thiscall IVRInput_010_GetSkeletalTrackingLevel(void *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2441,7 +2585,7 @@ EVRInputError __thiscall IVRInput_007_GetSkeletalTrackingLevel(void *_this, VRAc return 0; } -EVRInputError __thiscall IVRInput_007_GetSkeletalBoneData(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +EVRInputError __thiscall IVRInput_010_GetSkeletalBoneData(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2452,7 +2596,7 @@ EVRInputError __thiscall IVRInput_007_GetSkeletalBoneData(void *_this, VRActionH return 0; } -EVRInputError __thiscall IVRInput_007_GetSkeletalSummaryData(void *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) +EVRInputError __thiscall IVRInput_010_GetSkeletalSummaryData(void *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2461,7 +2605,7 @@ EVRInputError __thiscall IVRInput_007_GetSkeletalSummaryData(void *_this, VRActi return 0; } -EVRInputError __thiscall IVRInput_007_GetSkeletalBoneDataCompressed(void *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) +EVRInputError __thiscall IVRInput_010_GetSkeletalBoneDataCompressed(void *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2472,7 +2616,7 @@ EVRInputError __thiscall IVRInput_007_GetSkeletalBoneDataCompressed(void *_this, return 0; } -EVRInputError __thiscall IVRInput_007_DecompressSkeletalBoneData(void *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +EVRInputError __thiscall IVRInput_010_DecompressSkeletalBoneData(void *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) { push_ptr_parameter(_this); push_ptr_parameter(pvCompressedBuffer); @@ -2483,7 +2627,7 @@ EVRInputError __thiscall IVRInput_007_DecompressSkeletalBoneData(void *_this, co return 0; } -EVRInputError __thiscall IVRInput_007_TriggerHapticVibrationAction(void *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall IVRInput_010_TriggerHapticVibrationAction(void *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2495,7 +2639,7 @@ EVRInputError __thiscall IVRInput_007_TriggerHapticVibrationAction(void *_this, return 0; } -EVRInputError __thiscall IVRInput_007_GetActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) +EVRInputError __thiscall IVRInput_010_GetActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) { push_ptr_parameter(_this); push_uint64_parameter(actionSetHandle); @@ -2505,7 +2649,7 @@ EVRInputError __thiscall IVRInput_007_GetActionOrigins(void *_this, VRActionSetH return 0; } -EVRInputError __thiscall IVRInput_007_GetOriginLocalizedName(void *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) +EVRInputError __thiscall IVRInput_010_GetOriginLocalizedName(void *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) { push_ptr_parameter(_this); push_uint64_parameter(origin); @@ -2515,7 +2659,7 @@ EVRInputError __thiscall IVRInput_007_GetOriginLocalizedName(void *_this, VRInpu return 0; } -EVRInputError __thiscall IVRInput_007_GetOriginTrackedDeviceInfo(void *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) +EVRInputError __thiscall IVRInput_010_GetOriginTrackedDeviceInfo(void *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) { push_ptr_parameter(_this); push_uint64_parameter(origin); @@ -2524,7 +2668,7 @@ EVRInputError __thiscall IVRInput_007_GetOriginTrackedDeviceInfo(void *_this, VR return 0; } -EVRInputError __thiscall IVRInput_007_GetActionBindingInfo(void *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) +EVRInputError __thiscall IVRInput_010_GetActionBindingInfo(void *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) { push_ptr_parameter(_this); push_uint64_parameter(action); @@ -2535,7 +2679,7 @@ EVRInputError __thiscall IVRInput_007_GetActionBindingInfo(void *_this, VRAction return 0; } -EVRInputError __thiscall IVRInput_007_ShowActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) +EVRInputError __thiscall IVRInput_010_ShowActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) { push_ptr_parameter(_this); push_uint64_parameter(actionSetHandle); @@ -2543,7 +2687,7 @@ EVRInputError __thiscall IVRInput_007_ShowActionOrigins(void *_this, VRActionSet return 0; } -EVRInputError __thiscall IVRInput_007_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) +EVRInputError __thiscall IVRInput_010_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) { push_ptr_parameter(_this); push_ptr_parameter(pSets); @@ -2553,13 +2697,25 @@ EVRInputError __thiscall IVRInput_007_ShowBindingsForActionSet(void *_this, VRAc return 0; } -bool __thiscall IVRInput_007_IsUsingLegacyInput(void *_this) +EVRInputError __thiscall IVRInput_010_GetComponentStateForBinding(void *_this, const char * pchRenderModelName, const char * pchComponentName, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchRenderModelName); + push_ptr_parameter(pchComponentName); + push_ptr_parameter(pOriginInfo); + push_uint32_parameter(unBindingInfoSize); + push_uint32_parameter(unBindingInfoCount); + push_ptr_parameter(pComponentState); + return 0; +} + +bool __thiscall IVRInput_010_IsUsingLegacyInput(void *_this) { push_ptr_parameter(_this); return 0; } -EVRInputError __thiscall IVRInput_007_OpenBindingUI(void *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) +EVRInputError __thiscall IVRInput_010_OpenBindingUI(void *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) { push_ptr_parameter(_this); push_ptr_parameter(pchAppKey); @@ -2569,6 +2725,15 @@ EVRInputError __thiscall IVRInput_007_OpenBindingUI(void *_this, const char * pc return 0; } +EVRInputError __thiscall IVRInput_010_GetBindingVariant(void *_this, VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulDevicePath); + push_ptr_parameter(pchVariantArray); + push_uint32_parameter(unVariantArraySize); + return 0; +} + EIOBufferError __thiscall IVRIOBuffer_002_Open(void *_this, const char * pchPath, EIOBufferMode mode, uint32_t unElementSize, uint32_t unElements, IOBufferHandle_t * pulBuffer) { push_ptr_parameter(_this); @@ -2620,54 +2785,2630 @@ bool __thiscall IVRIOBuffer_002_HasReaders(void *_this, IOBufferHandle_t ulBuffe return 0; } -EVRInitError __thiscall IVRClientCore_003_Init(void *_this, EVRApplicationType eApplicationType, const char * pStartupInfo) +uint32_t __thiscall IVRControlPanel_006_undoc1(void *_this) { push_ptr_parameter(_this); - push_uint32_parameter(eApplicationType); - push_ptr_parameter(pStartupInfo); return 0; } -void __thiscall IVRClientCore_003_Cleanup(void *_this) +uint32_t __thiscall IVRControlPanel_006_undoc2(void *_this, uint32_t a, char * b, uint32_t c) { push_ptr_parameter(_this); + push_uint32_parameter(a); + push_ptr_parameter(b); + push_uint32_parameter(c); + return 0; } -EVRInitError __thiscall IVRClientCore_003_IsInterfaceVersionValid(void *_this, const char * pchInterfaceVersion) +EVRInitError __thiscall IVRControlPanel_006_undoc3(void *_this, const char * a) { push_ptr_parameter(_this); - push_ptr_parameter(pchInterfaceVersion); + push_ptr_parameter(a); return 0; } -void * __thiscall IVRClientCore_003_GetGenericInterface(void *_this, const char * pchNameAndVersion, EVRInitError * peError) +uint32_t __thiscall IVRControlPanel_006_undoc4(void *_this, const char * a) { push_ptr_parameter(_this); - push_ptr_parameter(pchNameAndVersion); - push_ptr_parameter(peError); + push_ptr_parameter(a); return 0; } -bool __thiscall IVRClientCore_003_BIsHmdPresent(void *_this) +uint32_t __thiscall IVRControlPanel_006_undoc5(void *_this, const char * a, uint32_t b, char * c, uint32_t d) { push_ptr_parameter(_this); + push_ptr_parameter(a); + push_uint32_parameter(b); + push_ptr_parameter(c); + push_uint32_parameter(d); return 0; } -const char * __thiscall IVRClientCore_003_GetEnglishStringForHmdError(void *_this, EVRInitError eError) +uint32_t __thiscall IVRControlPanel_006_undoc6(void *_this, const char * a, const char * b, char * c, uint32_t d) { push_ptr_parameter(_this); - push_uint32_parameter(eError); + push_ptr_parameter(a); + push_ptr_parameter(b); + push_ptr_parameter(c); + push_uint32_parameter(d); return 0; } -const char * __thiscall IVRClientCore_003_GetIDForVRInitError(void *_this, EVRInitError eError) +uint32_t __thiscall IVRControlPanel_006_undoc7(void *_this, const char * a, const char * b, char * c, uint32_t d) +{ + push_ptr_parameter(_this); + push_ptr_parameter(a); + push_ptr_parameter(b); + push_ptr_parameter(c); + push_uint32_parameter(d); + return 0; +} + +bool __thiscall IVRControlPanel_006_undoc8(void *_this, uint32_t a) +{ + push_ptr_parameter(_this); + push_uint32_parameter(a); + return 0; +} + +void __thiscall IVRControlPanel_006_undoc9(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRControlPanel_006_undoc10(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRControlPanel_006_undoc11(void *_this, uint32_t a) +{ + push_ptr_parameter(_this); + push_uint32_parameter(a); + return 0; +} + +void __thiscall IVRControlPanel_006_undoc12(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRControlPanel_006_undoc13(void *_this, TrackedDeviceIndex_t a) +{ + push_ptr_parameter(_this); + push_uint32_parameter(a); +} + +void __thiscall IVRControlPanel_006_undoc14(void *_this, EVRState a) +{ + push_ptr_parameter(_this); + push_uint32_parameter(a); +} + +EVRState __thiscall IVRControlPanel_006_undoc15(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRControlPanel_006_undoc16(void *_this, bool a) +{ + push_ptr_parameter(_this); + push_bool_parameter(a); +} + +bool __thiscall IVRControlPanel_006_undoc17(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRApplicationError __thiscall IVRControlPanel_006_undoc18(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRControlPanel_006_undoc19(void *_this, bool a) +{ + push_ptr_parameter(_this); + push_bool_parameter(a); +} + +bool __thiscall IVRControlPanel_006_undoc20(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRInitError __thiscall IVRControlPanel_006_undoc21(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRControlPanel_006_undoc22(void *_this, WebConsoleHandle_t a, const char * b, uint32_t c, uint32_t d, const char * e) +{ + push_ptr_parameter(_this); + push_uint64_parameter(a); + push_ptr_parameter(b); + push_uint32_parameter(c); + push_uint32_parameter(d); + push_ptr_parameter(e); +} + +bool __thiscall IVRControlPanel_006_undoc23(void *_this, const char * a) +{ + push_ptr_parameter(_this); + push_ptr_parameter(a); + return 0; +} + +bool __thiscall IVRControlPanel_006_undoc24(void *_this) { push_ptr_parameter(_this); - push_uint32_parameter(eError); return 0; } +bool __thiscall IVRControlPanel_006_undoc25(void *_this, bool a) +{ + push_ptr_parameter(_this); + push_bool_parameter(a); + return 0; +} + +uint64_t __thiscall IVRControlPanel_006_undoc26(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRControlPanel_006_undoc27(void *_this, const char * a) +{ + push_ptr_parameter(_this); + push_ptr_parameter(a); + return 0; +} + +void __thiscall IVRControlPanel_006_undoc28(void *_this, VROverlayHandle_t a) +{ + push_ptr_parameter(_this); + push_uint64_parameter(a); +} + +vrmb_typeb __thiscall IVRMailbox_001_undoc1(void *_this, const char * a, vrmb_typea * b) +{ + push_ptr_parameter(_this); + push_ptr_parameter(a); + push_ptr_parameter(b); + return 0; +} + +vrmb_typeb __thiscall IVRMailbox_001_undoc2(void *_this, vrmb_typea a) +{ + push_ptr_parameter(_this); + push_uint64_parameter(a); + return 0; +} + +vrmb_typeb __thiscall IVRMailbox_001_undoc3(void *_this, vrmb_typea a, const char * b, const char * c) +{ + push_ptr_parameter(_this); + push_uint64_parameter(a); + push_ptr_parameter(b); + push_ptr_parameter(c); + return 0; +} + +vrmb_typeb __thiscall IVRMailbox_001_undoc4(void *_this, vrmb_typea a, char * b, uint32_t c, uint32_t * d) +{ + push_ptr_parameter(_this); + push_uint64_parameter(a); + push_ptr_parameter(b); + push_uint32_parameter(c); + push_ptr_parameter(d); + return 0; +} + +EVRInitError __thiscall IVRClientCore_003_Init(void *_this, EVRApplicationType eApplicationType, const char * pStartupInfo) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eApplicationType); + push_ptr_parameter(pStartupInfo); + return 0; +} + +void __thiscall IVRClientCore_003_Cleanup(void *_this) +{ + push_ptr_parameter(_this); +} + +EVRInitError __thiscall IVRClientCore_003_IsInterfaceVersionValid(void *_this, const char * pchInterfaceVersion) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchInterfaceVersion); + return 0; +} + +void * __thiscall IVRClientCore_003_GetGenericInterface(void *_this, const char * pchNameAndVersion, EVRInitError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchNameAndVersion); + push_ptr_parameter(peError); + return 0; +} + +bool __thiscall IVRClientCore_003_BIsHmdPresent(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +const char * __thiscall IVRClientCore_003_GetEnglishStringForHmdError(void *_this, EVRInitError eError) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eError); + return 0; +} + +const char * __thiscall IVRClientCore_003_GetIDForVRInitError(void *_this, EVRInitError eError) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eError); + return 0; +} + +void __thiscall IVRCompositor_024_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eOrigin); +} + +ETrackingUniverseOrigin __thiscall IVRCompositor_024_GetTrackingSpace(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_024_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pRenderPoseArray); + push_uint32_parameter(unRenderPoseArrayCount); + push_ptr_parameter(pGamePoseArray); + push_uint32_parameter(unGamePoseArrayCount); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_024_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pRenderPoseArray); + push_uint32_parameter(unRenderPoseArrayCount); + push_ptr_parameter(pGamePoseArray); + push_uint32_parameter(unGamePoseArrayCount); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + push_ptr_parameter(_this); + push_uint32_parameter(unDeviceIndex); + push_ptr_parameter(pOutputPose); + push_ptr_parameter(pOutputGamePose); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_024_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eEye); + push_ptr_parameter(pTexture); + push_ptr_parameter(pBounds); + push_uint32_parameter(nSubmitFlags); + return 0; +} + +void __thiscall IVRCompositor_024_ClearLastSubmittedFrame(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_024_PostPresentHandoff(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_024_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pTiming); + push_uint32_parameter(unFramesAgo); + return 0; +} + +uint32_t __thiscall IVRCompositor_024_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pTiming); + push_uint32_parameter(nFrames); + return 0; +} + +float __thiscall IVRCompositor_024_GetFrameTimeRemaining(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_024_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pStats); + push_uint32_parameter(nStatsSizeInBytes); +} + +void __thiscall IVRCompositor_024_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + push_ptr_parameter(_this); + push_float_parameter(fSeconds); + push_float_parameter(fRed); + push_float_parameter(fGreen); + push_float_parameter(fBlue); + push_float_parameter(fAlpha); + push_bool_parameter(bBackground); +} + +HmdColor_t *__thiscall IVRCompositor_024_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground) +{ + push_ptr_parameter(_this); + push_ptr_parameter(_r); + push_bool_parameter(bBackground); + return 0; +} + +void __thiscall IVRCompositor_024_FadeGrid(void *_this, float fSeconds, bool bFadeIn) +{ + push_ptr_parameter(_this); + push_float_parameter(fSeconds); + push_bool_parameter(bFadeIn); +} + +float __thiscall IVRCompositor_024_GetCurrentGridAlpha(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_024_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pTextures); + push_uint32_parameter(unTextureCount); + return 0; +} + +void __thiscall IVRCompositor_024_ClearSkyboxOverride(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_024_CompositorBringToFront(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_024_CompositorGoToBack(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_024_CompositorQuit(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_024_IsFullscreen(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +uint32_t __thiscall IVRCompositor_024_GetCurrentSceneFocusProcess(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +uint32_t __thiscall IVRCompositor_024_GetLastFrameRenderer(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_024_CanRenderScene(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_024_ShowMirrorWindow(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_024_HideMirrorWindow(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_024_IsMirrorWindowVisible(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_024_CompositorDumpImages(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_024_ShouldAppRenderWithLowResources(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_024_ForceInterleavedReprojectionOn(void *_this, bool bOverride) +{ + push_ptr_parameter(_this); + push_bool_parameter(bOverride); +} + +void __thiscall IVRCompositor_024_ForceReconnectProcess(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_024_SuspendRendering(void *_this, bool bSuspend) +{ + push_ptr_parameter(_this); + push_bool_parameter(bSuspend); +} + +EVRCompositorError __thiscall IVRCompositor_024_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eEye); + push_ptr_parameter(pD3D11DeviceOrResource); + push_ptr_parameter(ppD3D11ShaderResourceView); + return 0; +} + +void __thiscall IVRCompositor_024_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pD3D11ShaderResourceView); +} + +EVRCompositorError __thiscall IVRCompositor_024_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eEye); + push_ptr_parameter(pglTextureId); + push_ptr_parameter(pglSharedTextureHandle); + return 0; +} + +bool __thiscall IVRCompositor_024_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_uint32_parameter(glTextureId); + push_ptr_parameter(glSharedTextureHandle); + return 0; +} + +void __thiscall IVRCompositor_024_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(glSharedTextureHandle); +} + +void __thiscall IVRCompositor_024_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(glSharedTextureHandle); +} + +uint32_t __thiscall IVRCompositor_024_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + return 0; +} + +uint32_t __thiscall IVRCompositor_024_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pPhysicalDevice); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + return 0; +} + +void __thiscall IVRCompositor_024_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eTimingMode); +} + +EVRCompositorError __thiscall IVRCompositor_024_SubmitExplicitTimingData(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_024_IsMotionSmoothingEnabled(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_024_IsMotionSmoothingSupported(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_024_IsCurrentSceneFocusAppLoading(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_024_SetStageOverride_Async(void *_this, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchRenderModelPath); + push_ptr_parameter(pTransform); + push_ptr_parameter(pRenderSettings); + push_uint32_parameter(nSizeOfRenderSettings); + return 0; +} + +void __thiscall IVRCompositor_024_ClearStageOverride(void *_this) +{ + push_ptr_parameter(_this); +} + +EVROverlayError __thiscall IVROverlay_022_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayKey); + push_ptr_parameter(pOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayKey); + push_ptr_parameter(pchOverlayName); + push_ptr_parameter(pOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +uint32_t __thiscall IVROverlay_022_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(pError); + return 0; +} + +uint32_t __thiscall IVROverlay_022_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(pError); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchName); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvBuffer); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(punWidth); + push_ptr_parameter(punHeight); + return 0; +} + +const char * __thiscall IVROverlay_022_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error) +{ + push_ptr_parameter(_this); + push_uint32_parameter(error); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unPID); + return 0; +} + +uint32_t __thiscall IVROverlay_022_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eOverlayFlag); + push_bool_parameter(bEnabled); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eOverlayFlag); + push_ptr_parameter(pbEnabled); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pFlags); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fRed); + push_float_parameter(fGreen); + push_float_parameter(fBlue); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfRed); + push_ptr_parameter(pfGreen); + push_ptr_parameter(pfBlue); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fAlpha); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfAlpha); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fTexelAspect); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfTexelAspect); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unSortOrder); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punSortOrder); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fWidthInMeters); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfWidthInMeters); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fCurvature); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfCurvature); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eTextureColorSpace); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peTextureColorSpace); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pOverlayTextureBounds); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pOverlayTextureBounds); + return 0; +} + +uint32_t __thiscall IVROverlay_022_GetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(pColor); + push_ptr_parameter(pError); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchRenderModel); + push_ptr_parameter(pColor); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peTransformType); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eTrackingOrigin); + push_ptr_parameter(pmatTrackingOriginToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peTrackingOrigin); + push_ptr_parameter(pmatTrackingOriginToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unTrackedDevice); + push_ptr_parameter(pmatTrackedDeviceToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punTrackedDevice); + push_ptr_parameter(pmatTrackedDeviceToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unDeviceIndex); + push_ptr_parameter(pchComponentName); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punDeviceIndex); + push_ptr_parameter(pchComponentName); + push_uint32_parameter(unComponentNameSize); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(ulOverlayHandleParent); + push_ptr_parameter(pmatParentOverlayToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint64_parameter(ulOverlayHandleParent); + push_ptr_parameter(pmatParentOverlayToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformCursor(void *_this, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulCursorOverlayHandle); + push_ptr_parameter(pvHotspot); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformCursor(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvHotspot); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +bool __thiscall IVROverlay_022_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eTrackingOrigin); + push_HmdVector2_parameter(coordinatesInOverlay); + push_ptr_parameter(pmatTransform); + return 0; +} + +bool __thiscall IVROverlay_022_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pEvent); + push_uint32_parameter(uncbVREvent); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peInputMethod); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eInputMethod); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvecMouseScale); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvecMouseScale); + return 0; +} + +bool __thiscall IVROverlay_022_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pParams); + push_ptr_parameter(pResults); + return 0; +} + +bool __thiscall IVROverlay_022_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlay); + push_uint32_parameter(eWhich); + push_ptr_parameter(pvCenter); + push_float_parameter(fRadius); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlay); + push_uint32_parameter(eWhich); + push_ptr_parameter(pvCenter); + push_ptr_parameter(pfRadius); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pMaskPrimitives); + push_uint32_parameter(unNumMaskPrimitives); + push_uint32_parameter(unPrimitiveSize); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_TriggerLaserMouseHapticVibration(void *_this, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fDurationSeconds); + push_float_parameter(fFrequency); + push_float_parameter(fAmplitude); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayCursor(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint64_parameter(ulCursorHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvCursor); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_ClearOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pTexture); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvBuffer); + push_uint32_parameter(unWidth); + push_uint32_parameter(unHeight); + push_uint32_parameter(unBytesPerPixel); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchFilePath); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pNativeTextureHandle); + push_ptr_parameter(pNativeTextureRef); + push_ptr_parameter(pWidth); + push_ptr_parameter(pHeight); + push_ptr_parameter(pNativeFormat); + push_ptr_parameter(pAPIType); + push_ptr_parameter(pColorSpace); + push_ptr_parameter(pTextureBounds); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pNativeTextureHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pWidth); + push_ptr_parameter(pHeight); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayKey); + push_ptr_parameter(pchOverlayFriendlyName); + push_ptr_parameter(pMainHandle); + push_ptr_parameter(pThumbnailHandle); + return 0; +} + +bool __thiscall IVROverlay_022_IsDashboardVisible(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVROverlay_022_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unProcessId); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punProcessId); + return 0; +} + +void __thiscall IVROverlay_022_ShowDashboard(void *_this, const char * pchOverlayToShow) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayToShow); +} + +TrackedDeviceIndex_t __thiscall IVROverlay_022_GetPrimaryDashboardDevice(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eInputMode); + push_uint32_parameter(eLineInputMode); + push_ptr_parameter(pchDescription); + push_uint32_parameter(unCharMax); + push_ptr_parameter(pchExistingText); + push_bool_parameter(bUseMinimalMode); + push_uint64_parameter(uUserValue); + return 0; +} + +EVROverlayError __thiscall IVROverlay_022_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eInputMode); + push_uint32_parameter(eLineInputMode); + push_ptr_parameter(pchDescription); + push_uint32_parameter(unCharMax); + push_ptr_parameter(pchExistingText); + push_bool_parameter(bUseMinimalMode); + push_uint64_parameter(uUserValue); + return 0; +} + +uint32_t __thiscall IVROverlay_022_GetKeyboardText(void *_this, char * pchText, uint32_t cchText) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchText); + push_uint32_parameter(cchText); + return 0; +} + +void __thiscall IVROverlay_022_HideKeyboard(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVROverlay_022_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eTrackingOrigin); + push_ptr_parameter(pmatTrackingOriginToKeyboardTransform); +} + +void __thiscall IVROverlay_022_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_HmdRect2_parameter(avoidRect); +} + +VRMessageOverlayResponse __thiscall IVROverlay_022_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchText); + push_ptr_parameter(pchCaption); + push_ptr_parameter(pchButton0Text); + push_ptr_parameter(pchButton1Text); + push_ptr_parameter(pchButton2Text); + push_ptr_parameter(pchButton3Text); + return 0; +} + +void __thiscall IVROverlay_022_CloseMessageOverlay(void *_this) +{ + push_ptr_parameter(_this); +} + +EVRInputError __thiscall IVRInput_007_SetActionManifestPath(void *_this, const char * pchActionManifestPath) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchActionManifestPath); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetActionSetHandle(void *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchActionSetName); + push_ptr_parameter(pHandle); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetActionHandle(void *_this, const char * pchActionName, VRActionHandle_t * pHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchActionName); + push_ptr_parameter(pHandle); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetInputSourceHandle(void *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchInputSourcePath); + push_ptr_parameter(pHandle); + return 0; +} + +EVRInputError __thiscall IVRInput_007_UpdateActionState(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pSets); + push_uint32_parameter(unSizeOfVRSelectedActionSet_t); + push_uint32_parameter(unSetCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetDigitalActionData(void *_this, VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pActionData); + push_uint32_parameter(unActionDataSize); + push_uint64_parameter(ulRestrictToDevice); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetAnalogActionData(void *_this, VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pActionData); + push_uint32_parameter(unActionDataSize); + push_uint64_parameter(ulRestrictToDevice); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetPoseActionDataRelativeToNow(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(eOrigin); + push_float_parameter(fPredictedSecondsFromNow); + push_ptr_parameter(pActionData); + push_uint32_parameter(unActionDataSize); + push_uint64_parameter(ulRestrictToDevice); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetPoseActionDataForNextFrame(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(eOrigin); + push_ptr_parameter(pActionData); + push_uint32_parameter(unActionDataSize); + push_uint64_parameter(ulRestrictToDevice); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetSkeletalActionData(void *_this, VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pActionData); + push_uint32_parameter(unActionDataSize); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetBoneCount(void *_this, VRActionHandle_t action, uint32_t * pBoneCount) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pBoneCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetBoneHierarchy(void *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pParentIndices); + push_uint32_parameter(unIndexArayCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetBoneName(void *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(nBoneIndex); + push_ptr_parameter(pchBoneName); + push_uint32_parameter(unNameBufferSize); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetSkeletalReferenceTransforms(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(eTransformSpace); + push_uint32_parameter(eReferencePose); + push_ptr_parameter(pTransformArray); + push_uint32_parameter(unTransformArrayCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetSkeletalTrackingLevel(void *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pSkeletalTrackingLevel); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetSkeletalBoneData(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(eTransformSpace); + push_uint32_parameter(eMotionRange); + push_ptr_parameter(pTransformArray); + push_uint32_parameter(unTransformArrayCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetSkeletalSummaryData(void *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(eSummaryType); + push_ptr_parameter(pSkeletalSummaryData); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetSkeletalBoneDataCompressed(void *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_uint32_parameter(eMotionRange); + push_ptr_parameter(pvCompressedData); + push_uint32_parameter(unCompressedSize); + push_ptr_parameter(punRequiredCompressedSize); + return 0; +} + +EVRInputError __thiscall IVRInput_007_DecompressSkeletalBoneData(void *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pvCompressedBuffer); + push_uint32_parameter(unCompressedBufferSize); + push_uint32_parameter(eTransformSpace); + push_ptr_parameter(pTransformArray); + push_uint32_parameter(unTransformArrayCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_TriggerHapticVibrationAction(void *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_float_parameter(fStartSecondsFromNow); + push_float_parameter(fDurationSeconds); + push_float_parameter(fFrequency); + push_float_parameter(fAmplitude); + push_uint64_parameter(ulRestrictToDevice); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) +{ + push_ptr_parameter(_this); + push_uint64_parameter(actionSetHandle); + push_uint64_parameter(digitalActionHandle); + push_ptr_parameter(originsOut); + push_uint32_parameter(originOutCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetOriginLocalizedName(void *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) +{ + push_ptr_parameter(_this); + push_uint64_parameter(origin); + push_ptr_parameter(pchNameArray); + push_uint32_parameter(unNameArraySize); + push_uint32_parameter(unStringSectionsToInclude); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetOriginTrackedDeviceInfo(void *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(origin); + push_ptr_parameter(pOriginInfo); + push_uint32_parameter(unOriginInfoSize); + return 0; +} + +EVRInputError __thiscall IVRInput_007_GetActionBindingInfo(void *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) +{ + push_ptr_parameter(_this); + push_uint64_parameter(action); + push_ptr_parameter(pOriginInfo); + push_uint32_parameter(unBindingInfoSize); + push_uint32_parameter(unBindingInfoCount); + push_ptr_parameter(punReturnedBindingInfoCount); + return 0; +} + +EVRInputError __thiscall IVRInput_007_ShowActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(actionSetHandle); + push_uint64_parameter(ulActionHandle); + return 0; +} + +EVRInputError __thiscall IVRInput_007_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pSets); + push_uint32_parameter(unSizeOfVRSelectedActionSet_t); + push_uint32_parameter(unSetCount); + push_uint64_parameter(originToHighlight); + return 0; +} + +bool __thiscall IVRInput_007_IsUsingLegacyInput(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRInputError __thiscall IVRInput_007_OpenBindingUI(void *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchAppKey); + push_uint64_parameter(ulActionSetHandle); + push_uint64_parameter(ulDeviceHandle); + push_bool_parameter(bShowOnDesktop); + return 0; +} + +const char * __thiscall IVRSettings_002_GetSettingsErrorNameFromEnum(void *_this, EVRSettingsError eError) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eError); + return 0; +} + +bool __thiscall IVRSettings_002_Sync(void *_this, bool bForce, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_bool_parameter(bForce); + push_ptr_parameter(peError); + return 0; +} + +void __thiscall IVRSettings_002_SetBool(void *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_bool_parameter(bValue); + push_ptr_parameter(peError); +} + +void __thiscall IVRSettings_002_SetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_uint32_parameter(nValue); + push_ptr_parameter(peError); +} + +void __thiscall IVRSettings_002_SetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_float_parameter(flValue); + push_ptr_parameter(peError); +} + +void __thiscall IVRSettings_002_SetString(void *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_ptr_parameter(pchValue); + push_ptr_parameter(peError); +} + +bool __thiscall IVRSettings_002_GetBool(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_ptr_parameter(peError); + return 0; +} + +int32_t __thiscall IVRSettings_002_GetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_ptr_parameter(peError); + return 0; +} + +float __thiscall IVRSettings_002_GetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_ptr_parameter(peError); + return 0; +} + +void __thiscall IVRSettings_002_GetString(void *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_ptr_parameter(pchValue); + push_uint32_parameter(unValueLen); + push_ptr_parameter(peError); +} + +void __thiscall IVRSettings_002_RemoveSection(void *_this, const char * pchSection, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(peError); +} + +void __thiscall IVRSettings_002_RemoveKeyInSection(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchSection); + push_ptr_parameter(pchSettingsKey); + push_ptr_parameter(peError); +} + +void __thiscall IVRCompositor_022_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eOrigin); +} + +ETrackingUniverseOrigin __thiscall IVRCompositor_022_GetTrackingSpace(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_022_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pRenderPoseArray); + push_uint32_parameter(unRenderPoseArrayCount); + push_ptr_parameter(pGamePoseArray); + push_uint32_parameter(unGamePoseArrayCount); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_022_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pRenderPoseArray); + push_uint32_parameter(unRenderPoseArrayCount); + push_ptr_parameter(pGamePoseArray); + push_uint32_parameter(unGamePoseArrayCount); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + push_ptr_parameter(_this); + push_uint32_parameter(unDeviceIndex); + push_ptr_parameter(pOutputPose); + push_ptr_parameter(pOutputGamePose); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_022_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eEye); + push_ptr_parameter(pTexture); + push_ptr_parameter(pBounds); + push_uint32_parameter(nSubmitFlags); + return 0; +} + +void __thiscall IVRCompositor_022_ClearLastSubmittedFrame(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_022_PostPresentHandoff(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_022_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pTiming); + push_uint32_parameter(unFramesAgo); + return 0; +} + +uint32_t __thiscall IVRCompositor_022_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pTiming); + push_uint32_parameter(nFrames); + return 0; +} + +float __thiscall IVRCompositor_022_GetFrameTimeRemaining(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_022_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pStats); + push_uint32_parameter(nStatsSizeInBytes); +} + +void __thiscall IVRCompositor_022_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + push_ptr_parameter(_this); + push_float_parameter(fSeconds); + push_float_parameter(fRed); + push_float_parameter(fGreen); + push_float_parameter(fBlue); + push_float_parameter(fAlpha); + push_bool_parameter(bBackground); +} + +HmdColor_t *__thiscall IVRCompositor_022_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground) +{ + push_ptr_parameter(_this); + push_ptr_parameter(_r); + push_bool_parameter(bBackground); + return 0; +} + +void __thiscall IVRCompositor_022_FadeGrid(void *_this, float fSeconds, bool bFadeIn) +{ + push_ptr_parameter(_this); + push_float_parameter(fSeconds); + push_bool_parameter(bFadeIn); +} + +float __thiscall IVRCompositor_022_GetCurrentGridAlpha(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVRCompositorError __thiscall IVRCompositor_022_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pTextures); + push_uint32_parameter(unTextureCount); + return 0; +} + +void __thiscall IVRCompositor_022_ClearSkyboxOverride(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_022_CompositorBringToFront(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_022_CompositorGoToBack(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_022_CompositorQuit(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_022_IsFullscreen(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +uint32_t __thiscall IVRCompositor_022_GetCurrentSceneFocusProcess(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +uint32_t __thiscall IVRCompositor_022_GetLastFrameRenderer(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_022_CanRenderScene(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_022_ShowMirrorWindow(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_022_HideMirrorWindow(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_022_IsMirrorWindowVisible(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_022_CompositorDumpImages(void *_this) +{ + push_ptr_parameter(_this); +} + +bool __thiscall IVRCompositor_022_ShouldAppRenderWithLowResources(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +void __thiscall IVRCompositor_022_ForceInterleavedReprojectionOn(void *_this, bool bOverride) +{ + push_ptr_parameter(_this); + push_bool_parameter(bOverride); +} + +void __thiscall IVRCompositor_022_ForceReconnectProcess(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVRCompositor_022_SuspendRendering(void *_this, bool bSuspend) +{ + push_ptr_parameter(_this); + push_bool_parameter(bSuspend); +} + +EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eEye); + push_ptr_parameter(pD3D11DeviceOrResource); + push_ptr_parameter(ppD3D11ShaderResourceView); + return 0; +} + +void __thiscall IVRCompositor_022_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pD3D11ShaderResourceView); +} + +EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eEye); + push_ptr_parameter(pglTextureId); + push_ptr_parameter(pglSharedTextureHandle); + return 0; +} + +bool __thiscall IVRCompositor_022_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_uint32_parameter(glTextureId); + push_ptr_parameter(glSharedTextureHandle); + return 0; +} + +void __thiscall IVRCompositor_022_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(glSharedTextureHandle); +} + +void __thiscall IVRCompositor_022_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(glSharedTextureHandle); +} + +uint32_t __thiscall IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + return 0; +} + +uint32_t __thiscall IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pPhysicalDevice); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + return 0; +} + +void __thiscall IVRCompositor_022_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eTimingMode); +} + +EVRCompositorError __thiscall IVRCompositor_022_SubmitExplicitTimingData(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_022_IsMotionSmoothingEnabled(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_022_IsMotionSmoothingSupported(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVRCompositor_022_IsCurrentSceneFocusAppLoading(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayKey); + push_ptr_parameter(pOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayKey); + push_ptr_parameter(pchOverlayName); + push_ptr_parameter(pOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +uint32_t __thiscall IVROverlay_021_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(pError); + return 0; +} + +uint32_t __thiscall IVROverlay_021_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(pError); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchName); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvBuffer); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(punWidth); + push_ptr_parameter(punHeight); + return 0; +} + +const char * __thiscall IVROverlay_021_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error) +{ + push_ptr_parameter(_this); + push_uint32_parameter(error); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unPID); + return 0; +} + +uint32_t __thiscall IVROverlay_021_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eOverlayFlag); + push_bool_parameter(bEnabled); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eOverlayFlag); + push_ptr_parameter(pbEnabled); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fRed); + push_float_parameter(fGreen); + push_float_parameter(fBlue); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfRed); + push_ptr_parameter(pfGreen); + push_ptr_parameter(pfBlue); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fAlpha); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfAlpha); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fTexelAspect); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfTexelAspect); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unSortOrder); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punSortOrder); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fWidthInMeters); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfWidthInMeters); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_float_parameter(fCurvature); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pfCurvature); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eTextureColorSpace); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peTextureColorSpace); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pOverlayTextureBounds); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pOverlayTextureBounds); + return 0; +} + +uint32_t __thiscall IVROverlay_021_GetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchValue); + push_uint32_parameter(unBufferSize); + push_ptr_parameter(pColor); + push_ptr_parameter(pError); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchRenderModel); + push_ptr_parameter(pColor); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peTransformType); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eTrackingOrigin); + push_ptr_parameter(pmatTrackingOriginToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peTrackingOrigin); + push_ptr_parameter(pmatTrackingOriginToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unTrackedDevice); + push_ptr_parameter(pmatTrackedDeviceToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punTrackedDevice); + push_ptr_parameter(pmatTrackedDeviceToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unDeviceIndex); + push_ptr_parameter(pchComponentName); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punDeviceIndex); + push_ptr_parameter(pchComponentName); + push_uint32_parameter(unComponentNameSize); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(ulOverlayHandleParent); + push_ptr_parameter(pmatParentOverlayToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint64_parameter(ulOverlayHandleParent); + push_ptr_parameter(pmatParentOverlayToOverlayTransform); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +bool __thiscall IVROverlay_021_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eTrackingOrigin); + push_HmdVector2_parameter(coordinatesInOverlay); + push_ptr_parameter(pmatTransform); + return 0; +} + +bool __thiscall IVROverlay_021_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pEvent); + push_uint32_parameter(uncbVREvent); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(peInputMethod); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eInputMethod); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvecMouseScale); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvecMouseScale); + return 0; +} + +bool __thiscall IVROverlay_021_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pParams); + push_ptr_parameter(pResults); + return 0; +} + +bool __thiscall IVROverlay_021_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlay); + push_uint32_parameter(eWhich); + push_ptr_parameter(pvCenter); + push_float_parameter(fRadius); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlay); + push_uint32_parameter(eWhich); + push_ptr_parameter(pvCenter); + push_ptr_parameter(pfRadius); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pTexture); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pvBuffer); + push_uint32_parameter(unWidth); + push_uint32_parameter(unHeight); + push_uint32_parameter(unDepth); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pchFilePath); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pNativeTextureHandle); + push_ptr_parameter(pNativeTextureRef); + push_ptr_parameter(pWidth); + push_ptr_parameter(pHeight); + push_ptr_parameter(pNativeFormat); + push_ptr_parameter(pAPIType); + push_ptr_parameter(pColorSpace); + push_ptr_parameter(pTextureBounds); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pNativeTextureHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pWidth); + push_ptr_parameter(pHeight); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayKey); + push_ptr_parameter(pchOverlayFriendlyName); + push_ptr_parameter(pMainHandle); + push_ptr_parameter(pThumbnailHandle); + return 0; +} + +bool __thiscall IVROverlay_021_IsDashboardVisible(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +bool __thiscall IVROverlay_021_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(unProcessId); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(punProcessId); + return 0; +} + +void __thiscall IVROverlay_021_ShowDashboard(void *_this, const char * pchOverlayToShow) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchOverlayToShow); +} + +TrackedDeviceIndex_t __thiscall IVROverlay_021_GetPrimaryDashboardDevice(void *_this) +{ + push_ptr_parameter(_this); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eInputMode); + push_uint32_parameter(eLineInputMode); + push_ptr_parameter(pchDescription); + push_uint32_parameter(unCharMax); + push_ptr_parameter(pchExistingText); + push_bool_parameter(bUseMinimalMode); + push_uint64_parameter(uUserValue); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_uint32_parameter(eInputMode); + push_uint32_parameter(eLineInputMode); + push_ptr_parameter(pchDescription); + push_uint32_parameter(unCharMax); + push_ptr_parameter(pchExistingText); + push_bool_parameter(bUseMinimalMode); + push_uint64_parameter(uUserValue); + return 0; +} + +uint32_t __thiscall IVROverlay_021_GetKeyboardText(void *_this, char * pchText, uint32_t cchText) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchText); + push_uint32_parameter(cchText); + return 0; +} + +void __thiscall IVROverlay_021_HideKeyboard(void *_this) +{ + push_ptr_parameter(_this); +} + +void __thiscall IVROverlay_021_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + push_ptr_parameter(_this); + push_uint32_parameter(eTrackingOrigin); + push_ptr_parameter(pmatTrackingOriginToKeyboardTransform); +} + +void __thiscall IVROverlay_021_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_HmdRect2_parameter(avoidRect); +} + +EVROverlayError __thiscall IVROverlay_021_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pMaskPrimitives); + push_uint32_parameter(unNumMaskPrimitives); + push_uint32_parameter(unPrimitiveSize); + return 0; +} + +EVROverlayError __thiscall IVROverlay_021_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + push_ptr_parameter(_this); + push_uint64_parameter(ulOverlayHandle); + push_ptr_parameter(pFlags); + return 0; +} + +VRMessageOverlayResponse __thiscall IVROverlay_021_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + push_ptr_parameter(_this); + push_ptr_parameter(pchText); + push_ptr_parameter(pchCaption); + push_ptr_parameter(pchButton0Text); + push_ptr_parameter(pchButton1Text); + push_ptr_parameter(pchButton2Text); + push_ptr_parameter(pchButton3Text); + return 0; +} + +void __thiscall IVROverlay_021_CloseMessageOverlay(void *_this) +{ + push_ptr_parameter(_this); +} + void __thiscall IVRSystem_020_GetRecommendedRenderTargetSize(void *_this, uint32_t * pnWidth, uint32_t * pnHeight) { push_ptr_parameter(_this); diff --git a/vrclient_x64/tests/capi_thunks_autogen.h b/vrclient_x64/tests/capi_thunks_autogen.h index ce50541829..3bc0ed6402 100644 --- a/vrclient_x64/tests/capi_thunks_autogen.h +++ b/vrclient_x64/tests/capi_thunks_autogen.h @@ -169,31 +169,29 @@ EVRApplicationError __thiscall IVRApplications_007_LaunchInternalProcess(void *_ uint32_t __thiscall IVRApplications_007_GetCurrentSceneProcessId(void *_this); -void test_capi_thunks_IVRSettings_002(void); - -const char * __thiscall IVRSettings_002_GetSettingsErrorNameFromEnum(void *_this, EVRSettingsError eError); +void test_capi_thunks_IVRSettings_003(void); -bool __thiscall IVRSettings_002_Sync(void *_this, bool bForce, EVRSettingsError * peError); +const char * __thiscall IVRSettings_003_GetSettingsErrorNameFromEnum(void *_this, EVRSettingsError eError); -void __thiscall IVRSettings_002_SetBool(void *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError); +void __thiscall IVRSettings_003_SetBool(void *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError); -void __thiscall IVRSettings_002_SetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError); +void __thiscall IVRSettings_003_SetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError); -void __thiscall IVRSettings_002_SetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError); +void __thiscall IVRSettings_003_SetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError); -void __thiscall IVRSettings_002_SetString(void *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError); +void __thiscall IVRSettings_003_SetString(void *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError); -bool __thiscall IVRSettings_002_GetBool(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); +bool __thiscall IVRSettings_003_GetBool(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); -int32_t __thiscall IVRSettings_002_GetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); +int32_t __thiscall IVRSettings_003_GetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); -float __thiscall IVRSettings_002_GetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); +float __thiscall IVRSettings_003_GetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); -void __thiscall IVRSettings_002_GetString(void *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError); +void __thiscall IVRSettings_003_GetString(void *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError); -void __thiscall IVRSettings_002_RemoveSection(void *_this, const char * pchSection, EVRSettingsError * peError); +void __thiscall IVRSettings_003_RemoveSection(void *_this, const char * pchSection, EVRSettingsError * peError); -void __thiscall IVRSettings_002_RemoveKeyInSection(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); +void __thiscall IVRSettings_003_RemoveKeyInSection(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); void test_capi_thunks_IVRChaperone_003(void); @@ -255,99 +253,129 @@ void __thiscall IVRChaperoneSetup_006_HideWorkingSetPreview(void *_this); void __thiscall IVRChaperoneSetup_006_RoomSetupStarting(void *_this); -void test_capi_thunks_IVRCompositor_022(void); +void test_capi_thunks_IVRCompositor_026(void); -void __thiscall IVRCompositor_022_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin); +void __thiscall IVRCompositor_026_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin); -ETrackingUniverseOrigin __thiscall IVRCompositor_022_GetTrackingSpace(void *_this); +ETrackingUniverseOrigin __thiscall IVRCompositor_026_GetTrackingSpace(void *_this); -EVRCompositorError __thiscall IVRCompositor_022_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); +EVRCompositorError __thiscall IVRCompositor_026_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); -EVRCompositorError __thiscall IVRCompositor_022_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); +EVRCompositorError __thiscall IVRCompositor_026_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); -EVRCompositorError __thiscall IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose); +EVRCompositorError __thiscall IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose); -EVRCompositorError __thiscall IVRCompositor_022_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); +EVRCompositorError __thiscall IVRCompositor_026_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); -void __thiscall IVRCompositor_022_ClearLastSubmittedFrame(void *_this); +void __thiscall IVRCompositor_026_ClearLastSubmittedFrame(void *_this); -void __thiscall IVRCompositor_022_PostPresentHandoff(void *_this); +void __thiscall IVRCompositor_026_PostPresentHandoff(void *_this); -bool __thiscall IVRCompositor_022_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); +bool __thiscall IVRCompositor_026_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); -uint32_t __thiscall IVRCompositor_022_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames); +uint32_t __thiscall IVRCompositor_026_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames); -float __thiscall IVRCompositor_022_GetFrameTimeRemaining(void *_this); +float __thiscall IVRCompositor_026_GetFrameTimeRemaining(void *_this); -void __thiscall IVRCompositor_022_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes); +void __thiscall IVRCompositor_026_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes); -void __thiscall IVRCompositor_022_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); +void __thiscall IVRCompositor_026_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); -HmdColor_t *__thiscall IVRCompositor_022_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground); +HmdColor_t *__thiscall IVRCompositor_026_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground); -void __thiscall IVRCompositor_022_FadeGrid(void *_this, float fSeconds, bool bFadeIn); +void __thiscall IVRCompositor_026_FadeGrid(void *_this, float fSeconds, bool bFadeIn); -float __thiscall IVRCompositor_022_GetCurrentGridAlpha(void *_this); +float __thiscall IVRCompositor_026_GetCurrentGridAlpha(void *_this); -EVRCompositorError __thiscall IVRCompositor_022_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount); +EVRCompositorError __thiscall IVRCompositor_026_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount); -void __thiscall IVRCompositor_022_ClearSkyboxOverride(void *_this); +void __thiscall IVRCompositor_026_ClearSkyboxOverride(void *_this); -void __thiscall IVRCompositor_022_CompositorBringToFront(void *_this); +void __thiscall IVRCompositor_026_CompositorBringToFront(void *_this); -void __thiscall IVRCompositor_022_CompositorGoToBack(void *_this); +void __thiscall IVRCompositor_026_CompositorGoToBack(void *_this); -void __thiscall IVRCompositor_022_CompositorQuit(void *_this); +void __thiscall IVRCompositor_026_CompositorQuit(void *_this); -bool __thiscall IVRCompositor_022_IsFullscreen(void *_this); +bool __thiscall IVRCompositor_026_IsFullscreen(void *_this); -uint32_t __thiscall IVRCompositor_022_GetCurrentSceneFocusProcess(void *_this); +uint32_t __thiscall IVRCompositor_026_GetCurrentSceneFocusProcess(void *_this); -uint32_t __thiscall IVRCompositor_022_GetLastFrameRenderer(void *_this); +uint32_t __thiscall IVRCompositor_026_GetLastFrameRenderer(void *_this); -bool __thiscall IVRCompositor_022_CanRenderScene(void *_this); +bool __thiscall IVRCompositor_026_CanRenderScene(void *_this); -void __thiscall IVRCompositor_022_ShowMirrorWindow(void *_this); +void __thiscall IVRCompositor_026_ShowMirrorWindow(void *_this); -void __thiscall IVRCompositor_022_HideMirrorWindow(void *_this); +void __thiscall IVRCompositor_026_HideMirrorWindow(void *_this); -bool __thiscall IVRCompositor_022_IsMirrorWindowVisible(void *_this); +bool __thiscall IVRCompositor_026_IsMirrorWindowVisible(void *_this); -void __thiscall IVRCompositor_022_CompositorDumpImages(void *_this); +void __thiscall IVRCompositor_026_CompositorDumpImages(void *_this); -bool __thiscall IVRCompositor_022_ShouldAppRenderWithLowResources(void *_this); +bool __thiscall IVRCompositor_026_ShouldAppRenderWithLowResources(void *_this); -void __thiscall IVRCompositor_022_ForceInterleavedReprojectionOn(void *_this, bool bOverride); +void __thiscall IVRCompositor_026_ForceInterleavedReprojectionOn(void *_this, bool bOverride); -void __thiscall IVRCompositor_022_ForceReconnectProcess(void *_this); +void __thiscall IVRCompositor_026_ForceReconnectProcess(void *_this); -void __thiscall IVRCompositor_022_SuspendRendering(void *_this, bool bSuspend); +void __thiscall IVRCompositor_026_SuspendRendering(void *_this, bool bSuspend); -EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView); +EVRCompositorError __thiscall IVRCompositor_026_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView); -void __thiscall IVRCompositor_022_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView); +void __thiscall IVRCompositor_026_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView); -EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle); +EVRCompositorError __thiscall IVRCompositor_026_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle); -bool __thiscall IVRCompositor_022_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle); +bool __thiscall IVRCompositor_026_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle); -void __thiscall IVRCompositor_022_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); +void __thiscall IVRCompositor_026_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); -void __thiscall IVRCompositor_022_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); +void __thiscall IVRCompositor_026_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); -uint32_t __thiscall IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize); +uint32_t __thiscall IVRCompositor_026_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize); -uint32_t __thiscall IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); +uint32_t __thiscall IVRCompositor_026_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); -void __thiscall IVRCompositor_022_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode); +void __thiscall IVRCompositor_026_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode); -EVRCompositorError __thiscall IVRCompositor_022_SubmitExplicitTimingData(void *_this); +EVRCompositorError __thiscall IVRCompositor_026_SubmitExplicitTimingData(void *_this); -bool __thiscall IVRCompositor_022_IsMotionSmoothingEnabled(void *_this); +bool __thiscall IVRCompositor_026_IsMotionSmoothingEnabled(void *_this); -bool __thiscall IVRCompositor_022_IsMotionSmoothingSupported(void *_this); +bool __thiscall IVRCompositor_026_IsMotionSmoothingSupported(void *_this); -bool __thiscall IVRCompositor_022_IsCurrentSceneFocusAppLoading(void *_this); +bool __thiscall IVRCompositor_026_IsCurrentSceneFocusAppLoading(void *_this); + +EVRCompositorError __thiscall IVRCompositor_026_SetStageOverride_Async(void *_this, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings); + +void __thiscall IVRCompositor_026_ClearStageOverride(void *_this); + +bool __thiscall IVRCompositor_026_GetCompositorBenchmarkResults(void *_this, Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults); + +EVRCompositorError __thiscall IVRCompositor_026_GetLastPosePredictionIDs(void *_this, uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID); + +EVRCompositorError __thiscall IVRCompositor_026_GetPosesForFrame(void *_this, uint32_t unPosePredictionID, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount); + +void test_capi_thunks_IVRHeadsetView_001(void); + +void __thiscall IVRHeadsetView_001_SetHeadsetViewSize(void *_this, uint32_t nWidth, uint32_t nHeight); + +void __thiscall IVRHeadsetView_001_GetHeadsetViewSize(void *_this, uint32_t * pnWidth, uint32_t * pnHeight); + +void __thiscall IVRHeadsetView_001_SetHeadsetViewMode(void *_this, HeadsetViewMode_t eHeadsetViewMode); + +HeadsetViewMode_t __thiscall IVRHeadsetView_001_GetHeadsetViewMode(void *_this); + +void __thiscall IVRHeadsetView_001_SetHeadsetViewCropped(void *_this, bool bCropped); + +bool __thiscall IVRHeadsetView_001_GetHeadsetViewCropped(void *_this); + +float __thiscall IVRHeadsetView_001_GetHeadsetViewAspectRatio(void *_this); + +void __thiscall IVRHeadsetView_001_SetHeadsetViewBlendRange(void *_this, float flStartPct, float flEndPct); + +void __thiscall IVRHeadsetView_001_GetHeadsetViewBlendRange(void *_this, float * pStartPct, float * pEndPct); void test_capi_thunks_IVRNotifications_002(void); @@ -355,159 +383,173 @@ EVRNotificationError __thiscall IVRNotifications_002_CreateNotification(void *_t EVRNotificationError __thiscall IVRNotifications_002_RemoveNotification(void *_this, VRNotificationId notificationId); -void test_capi_thunks_IVROverlay_021(void); +void test_capi_thunks_IVROverlay_024(void); -EVROverlayError __thiscall IVROverlay_021_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); -uint32_t __thiscall IVROverlay_021_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); +uint32_t __thiscall IVROverlay_024_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); -uint32_t __thiscall IVROverlay_021_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); +uint32_t __thiscall IVROverlay_024_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); -EVROverlayError __thiscall IVROverlay_021_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName); +EVROverlayError __thiscall IVROverlay_024_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName); -EVROverlayError __thiscall IVROverlay_021_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight); +EVROverlayError __thiscall IVROverlay_024_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight); -const char * __thiscall IVROverlay_021_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error); +const char * __thiscall IVROverlay_024_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error); -EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID); +EVROverlayError __thiscall IVROverlay_024_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID); -uint32_t __thiscall IVROverlay_021_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle); +uint32_t __thiscall IVROverlay_024_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); +EVROverlayError __thiscall IVROverlay_024_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); -EVROverlayError __thiscall IVROverlay_021_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled); +EVROverlayError __thiscall IVROverlay_024_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled); -EVROverlayError __thiscall IVROverlay_021_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue); +EVROverlayError __thiscall IVROverlay_024_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); -EVROverlayError __thiscall IVROverlay_021_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue); +EVROverlayError __thiscall IVROverlay_024_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue); -EVROverlayError __thiscall IVROverlay_021_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha); +EVROverlayError __thiscall IVROverlay_024_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue); -EVROverlayError __thiscall IVROverlay_021_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha); +EVROverlayError __thiscall IVROverlay_024_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect); +EVROverlayError __thiscall IVROverlay_024_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect); -EVROverlayError __thiscall IVROverlay_021_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect); -EVROverlayError __thiscall IVROverlay_021_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder); +EVROverlayError __thiscall IVROverlay_024_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder); -EVROverlayError __thiscall IVROverlay_021_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters); +EVROverlayError __thiscall IVROverlay_024_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder); -EVROverlayError __thiscall IVROverlay_021_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters); +EVROverlayError __thiscall IVROverlay_024_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters); -EVROverlayError __thiscall IVROverlay_021_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature); +EVROverlayError __thiscall IVROverlay_024_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters); -EVROverlayError __thiscall IVROverlay_021_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature); +EVROverlayError __thiscall IVROverlay_024_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace); +EVROverlayError __thiscall IVROverlay_024_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); -uint32_t __thiscall IVROverlay_021_GetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); -EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTransformCursor(void *_this, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot); -EVROverlayError __thiscall IVROverlay_021_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTransformCursor(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot); -EVROverlayError __thiscall IVROverlay_021_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); -bool __thiscall IVROverlay_021_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform); +bool __thiscall IVROverlay_024_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle); -bool __thiscall IVROverlay_021_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent); +EVROverlayError __thiscall IVROverlay_024_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform); -EVROverlayError __thiscall IVROverlay_021_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod); +bool __thiscall IVROverlay_024_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent); -EVROverlayError __thiscall IVROverlay_021_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod); +EVROverlayError __thiscall IVROverlay_024_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod); -EVROverlayError __thiscall IVROverlay_021_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); +EVROverlayError __thiscall IVROverlay_024_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod); -EVROverlayError __thiscall IVROverlay_021_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); +EVROverlayError __thiscall IVROverlay_024_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); -bool __thiscall IVROverlay_021_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults); +EVROverlayError __thiscall IVROverlay_024_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); -bool __thiscall IVROverlay_021_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); +bool __thiscall IVROverlay_024_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults); -EVROverlayError __thiscall IVROverlay_021_SetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius); +bool __thiscall IVROverlay_024_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_GetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius); +EVROverlayError __thiscall IVROverlay_024_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize); -EVROverlayError __thiscall IVROverlay_021_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture); +EVROverlayError __thiscall IVROverlay_024_TriggerLaserMouseHapticVibration(void *_this, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude); -EVROverlayError __thiscall IVROverlay_021_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_SetOverlayCursor(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle); -EVROverlayError __thiscall IVROverlay_021_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth); +EVROverlayError __thiscall IVROverlay_024_SetOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor); -EVROverlayError __thiscall IVROverlay_021_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath); +EVROverlayError __thiscall IVROverlay_024_ClearOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds); +EVROverlayError __thiscall IVROverlay_024_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture); -EVROverlayError __thiscall IVROverlay_021_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle); +EVROverlayError __thiscall IVROverlay_024_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight); +EVROverlayError __thiscall IVROverlay_024_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel); -EVROverlayError __thiscall IVROverlay_021_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle); +EVROverlayError __thiscall IVROverlay_024_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath); -bool __thiscall IVROverlay_021_IsDashboardVisible(void *_this); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds); -bool __thiscall IVROverlay_021_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); +EVROverlayError __thiscall IVROverlay_024_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle); -EVROverlayError __thiscall IVROverlay_021_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId); +EVROverlayError __thiscall IVROverlay_024_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight); -EVROverlayError __thiscall IVROverlay_021_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId); +EVROverlayError __thiscall IVROverlay_024_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle); -void __thiscall IVROverlay_021_ShowDashboard(void *_this, const char * pchOverlayToShow); +bool __thiscall IVROverlay_024_IsDashboardVisible(void *_this); -TrackedDeviceIndex_t __thiscall IVROverlay_021_GetPrimaryDashboardDevice(void *_this); +bool __thiscall IVROverlay_024_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); -EVROverlayError __thiscall IVROverlay_021_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); +EVROverlayError __thiscall IVROverlay_024_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId); -EVROverlayError __thiscall IVROverlay_021_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); +EVROverlayError __thiscall IVROverlay_024_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId); -uint32_t __thiscall IVROverlay_021_GetKeyboardText(void *_this, char * pchText, uint32_t cchText); +void __thiscall IVROverlay_024_ShowDashboard(void *_this, const char * pchOverlayToShow); -void __thiscall IVROverlay_021_HideKeyboard(void *_this); +TrackedDeviceIndex_t __thiscall IVROverlay_024_GetPrimaryDashboardDevice(void *_this); -void __thiscall IVROverlay_021_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform); +EVROverlayError __thiscall IVROverlay_024_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue); -void __thiscall IVROverlay_021_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect); +EVROverlayError __thiscall IVROverlay_024_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue); -EVROverlayError __thiscall IVROverlay_021_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize); +uint32_t __thiscall IVROverlay_024_GetKeyboardText(void *_this, char * pchText, uint32_t cchText); -EVROverlayError __thiscall IVROverlay_021_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); +void __thiscall IVROverlay_024_HideKeyboard(void *_this); -VRMessageOverlayResponse __thiscall IVROverlay_021_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text); +void __thiscall IVROverlay_024_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform); -void __thiscall IVROverlay_021_CloseMessageOverlay(void *_this); +void __thiscall IVROverlay_024_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect); + +VRMessageOverlayResponse __thiscall IVROverlay_024_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text); + +void __thiscall IVROverlay_024_CloseMessageOverlay(void *_this); + +void test_capi_thunks_IVROverlayView_003(void); + +EVROverlayError __thiscall IVROverlayView_003_AcquireOverlayView(void *_this, VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t * pNativeDevice, VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize); + +EVROverlayError __thiscall IVROverlayView_003_ReleaseOverlayView(void *_this, VROverlayView_t * pOverlayView); + +void __thiscall IVROverlayView_003_PostOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pvrEvent); + +bool __thiscall IVROverlayView_003_IsViewingPermitted(void *_this, VROverlayHandle_t ulOverlayHandle); void test_capi_thunks_IVRRenderModels_006(void); @@ -619,63 +661,71 @@ DriverHandle_t __thiscall IVRDriverManager_001_GetDriverHandle(void *_this, cons bool __thiscall IVRDriverManager_001_IsEnabled(void *_this, DriverId_t nDriver); -void test_capi_thunks_IVRInput_007(void); +void test_capi_thunks_IVRInput_010(void); -EVRInputError __thiscall IVRInput_007_SetActionManifestPath(void *_this, const char * pchActionManifestPath); +EVRInputError __thiscall IVRInput_010_SetActionManifestPath(void *_this, const char * pchActionManifestPath); -EVRInputError __thiscall IVRInput_007_GetActionSetHandle(void *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle); +EVRInputError __thiscall IVRInput_010_GetActionSetHandle(void *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle); -EVRInputError __thiscall IVRInput_007_GetActionHandle(void *_this, const char * pchActionName, VRActionHandle_t * pHandle); +EVRInputError __thiscall IVRInput_010_GetActionHandle(void *_this, const char * pchActionName, VRActionHandle_t * pHandle); -EVRInputError __thiscall IVRInput_007_GetInputSourceHandle(void *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle); +EVRInputError __thiscall IVRInput_010_GetInputSourceHandle(void *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle); -EVRInputError __thiscall IVRInput_007_UpdateActionState(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount); +EVRInputError __thiscall IVRInput_010_UpdateActionState(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount); -EVRInputError __thiscall IVRInput_007_GetDigitalActionData(void *_this, VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); +EVRInputError __thiscall IVRInput_010_GetDigitalActionData(void *_this, VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); -EVRInputError __thiscall IVRInput_007_GetAnalogActionData(void *_this, VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); +EVRInputError __thiscall IVRInput_010_GetAnalogActionData(void *_this, VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); -EVRInputError __thiscall IVRInput_007_GetPoseActionDataRelativeToNow(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); +EVRInputError __thiscall IVRInput_010_GetPoseActionDataRelativeToNow(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); -EVRInputError __thiscall IVRInput_007_GetPoseActionDataForNextFrame(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); +EVRInputError __thiscall IVRInput_010_GetPoseActionDataForNextFrame(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); -EVRInputError __thiscall IVRInput_007_GetSkeletalActionData(void *_this, VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); +EVRInputError __thiscall IVRInput_010_GetSkeletalActionData(void *_this, VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); -EVRInputError __thiscall IVRInput_007_GetBoneCount(void *_this, VRActionHandle_t action, uint32_t * pBoneCount); +EVRInputError __thiscall IVRInput_010_GetDominantHand(void *_this, ETrackedControllerRole * peDominantHand); -EVRInputError __thiscall IVRInput_007_GetBoneHierarchy(void *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); +EVRInputError __thiscall IVRInput_010_SetDominantHand(void *_this, ETrackedControllerRole eDominantHand); -EVRInputError __thiscall IVRInput_007_GetBoneName(void *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize); +EVRInputError __thiscall IVRInput_010_GetBoneCount(void *_this, VRActionHandle_t action, uint32_t * pBoneCount); -EVRInputError __thiscall IVRInput_007_GetSkeletalReferenceTransforms(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); +EVRInputError __thiscall IVRInput_010_GetBoneHierarchy(void *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); -EVRInputError __thiscall IVRInput_007_GetSkeletalTrackingLevel(void *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel); +EVRInputError __thiscall IVRInput_010_GetBoneName(void *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize); -EVRInputError __thiscall IVRInput_007_GetSkeletalBoneData(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); +EVRInputError __thiscall IVRInput_010_GetSkeletalReferenceTransforms(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); -EVRInputError __thiscall IVRInput_007_GetSkeletalSummaryData(void *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData); +EVRInputError __thiscall IVRInput_010_GetSkeletalTrackingLevel(void *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel); -EVRInputError __thiscall IVRInput_007_GetSkeletalBoneDataCompressed(void *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize); +EVRInputError __thiscall IVRInput_010_GetSkeletalBoneData(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); -EVRInputError __thiscall IVRInput_007_DecompressSkeletalBoneData(void *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); +EVRInputError __thiscall IVRInput_010_GetSkeletalSummaryData(void *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData); -EVRInputError __thiscall IVRInput_007_TriggerHapticVibrationAction(void *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice); +EVRInputError __thiscall IVRInput_010_GetSkeletalBoneDataCompressed(void *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize); -EVRInputError __thiscall IVRInput_007_GetActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); +EVRInputError __thiscall IVRInput_010_DecompressSkeletalBoneData(void *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); -EVRInputError __thiscall IVRInput_007_GetOriginLocalizedName(void *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); +EVRInputError __thiscall IVRInput_010_TriggerHapticVibrationAction(void *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice); -EVRInputError __thiscall IVRInput_007_GetOriginTrackedDeviceInfo(void *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); +EVRInputError __thiscall IVRInput_010_GetActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); -EVRInputError __thiscall IVRInput_007_GetActionBindingInfo(void *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount); +EVRInputError __thiscall IVRInput_010_GetOriginLocalizedName(void *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); -EVRInputError __thiscall IVRInput_007_ShowActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); +EVRInputError __thiscall IVRInput_010_GetOriginTrackedDeviceInfo(void *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); -EVRInputError __thiscall IVRInput_007_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); +EVRInputError __thiscall IVRInput_010_GetActionBindingInfo(void *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount); -bool __thiscall IVRInput_007_IsUsingLegacyInput(void *_this); +EVRInputError __thiscall IVRInput_010_ShowActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); -EVRInputError __thiscall IVRInput_007_OpenBindingUI(void *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop); +EVRInputError __thiscall IVRInput_010_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); + +EVRInputError __thiscall IVRInput_010_GetComponentStateForBinding(void *_this, const char * pchRenderModelName, const char * pchComponentName, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState); + +bool __thiscall IVRInput_010_IsUsingLegacyInput(void *_this); + +EVRInputError __thiscall IVRInput_010_OpenBindingUI(void *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop); + +EVRInputError __thiscall IVRInput_010_GetBindingVariant(void *_this, VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize); void test_capi_thunks_IVRIOBuffer_002(void); @@ -691,6 +741,74 @@ PropertyContainerHandle_t __thiscall IVRIOBuffer_002_PropertyContainer(void *_th bool __thiscall IVRIOBuffer_002_HasReaders(void *_this, IOBufferHandle_t ulBuffer); +void test_capi_thunks_IVRControlPanel_006(void); + +uint32_t __thiscall IVRControlPanel_006_undoc1(void *_this); + +uint32_t __thiscall IVRControlPanel_006_undoc2(void *_this, uint32_t a, char * b, uint32_t c); + +EVRInitError __thiscall IVRControlPanel_006_undoc3(void *_this, const char * a); + +uint32_t __thiscall IVRControlPanel_006_undoc4(void *_this, const char * a); + +uint32_t __thiscall IVRControlPanel_006_undoc5(void *_this, const char * a, uint32_t b, char * c, uint32_t d); + +uint32_t __thiscall IVRControlPanel_006_undoc6(void *_this, const char * a, const char * b, char * c, uint32_t d); + +uint32_t __thiscall IVRControlPanel_006_undoc7(void *_this, const char * a, const char * b, char * c, uint32_t d); + +bool __thiscall IVRControlPanel_006_undoc8(void *_this, uint32_t a); + +void __thiscall IVRControlPanel_006_undoc9(void *_this); + +void __thiscall IVRControlPanel_006_undoc10(void *_this); + +bool __thiscall IVRControlPanel_006_undoc11(void *_this, uint32_t a); + +void __thiscall IVRControlPanel_006_undoc12(void *_this); + +void __thiscall IVRControlPanel_006_undoc13(void *_this, TrackedDeviceIndex_t a); + +void __thiscall IVRControlPanel_006_undoc14(void *_this, EVRState a); + +EVRState __thiscall IVRControlPanel_006_undoc15(void *_this); + +void __thiscall IVRControlPanel_006_undoc16(void *_this, bool a); + +bool __thiscall IVRControlPanel_006_undoc17(void *_this); + +EVRApplicationError __thiscall IVRControlPanel_006_undoc18(void *_this); + +void __thiscall IVRControlPanel_006_undoc19(void *_this, bool a); + +bool __thiscall IVRControlPanel_006_undoc20(void *_this); + +EVRInitError __thiscall IVRControlPanel_006_undoc21(void *_this); + +void __thiscall IVRControlPanel_006_undoc22(void *_this, WebConsoleHandle_t a, const char * b, uint32_t c, uint32_t d, const char * e); + +bool __thiscall IVRControlPanel_006_undoc23(void *_this, const char * a); + +bool __thiscall IVRControlPanel_006_undoc24(void *_this); + +bool __thiscall IVRControlPanel_006_undoc25(void *_this, bool a); + +uint64_t __thiscall IVRControlPanel_006_undoc26(void *_this); + +EVRCompositorError __thiscall IVRControlPanel_006_undoc27(void *_this, const char * a); + +void __thiscall IVRControlPanel_006_undoc28(void *_this, VROverlayHandle_t a); + +void test_capi_thunks_IVRMailbox_001(void); + +vrmb_typeb __thiscall IVRMailbox_001_undoc1(void *_this, const char * a, vrmb_typea * b); + +vrmb_typeb __thiscall IVRMailbox_001_undoc2(void *_this, vrmb_typea a); + +vrmb_typeb __thiscall IVRMailbox_001_undoc3(void *_this, vrmb_typea a, const char * b, const char * c); + +vrmb_typeb __thiscall IVRMailbox_001_undoc4(void *_this, vrmb_typea a, char * b, uint32_t c, uint32_t * d); + void test_capi_thunks_IVRClientCore_003(void); EVRInitError __thiscall IVRClientCore_003_Init(void *_this, EVRApplicationType eApplicationType, const char * pStartupInfo); @@ -707,6 +825,602 @@ const char * __thiscall IVRClientCore_003_GetEnglishStringForHmdError(void *_thi const char * __thiscall IVRClientCore_003_GetIDForVRInitError(void *_this, EVRInitError eError); +void test_capi_thunks_IVRCompositor_024(void); + +void __thiscall IVRCompositor_024_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin); + +ETrackingUniverseOrigin __thiscall IVRCompositor_024_GetTrackingSpace(void *_this); + +EVRCompositorError __thiscall IVRCompositor_024_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); + +EVRCompositorError __thiscall IVRCompositor_024_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); + +EVRCompositorError __thiscall IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose); + +EVRCompositorError __thiscall IVRCompositor_024_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); + +void __thiscall IVRCompositor_024_ClearLastSubmittedFrame(void *_this); + +void __thiscall IVRCompositor_024_PostPresentHandoff(void *_this); + +bool __thiscall IVRCompositor_024_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); + +uint32_t __thiscall IVRCompositor_024_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames); + +float __thiscall IVRCompositor_024_GetFrameTimeRemaining(void *_this); + +void __thiscall IVRCompositor_024_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes); + +void __thiscall IVRCompositor_024_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); + +HmdColor_t *__thiscall IVRCompositor_024_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground); + +void __thiscall IVRCompositor_024_FadeGrid(void *_this, float fSeconds, bool bFadeIn); + +float __thiscall IVRCompositor_024_GetCurrentGridAlpha(void *_this); + +EVRCompositorError __thiscall IVRCompositor_024_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount); + +void __thiscall IVRCompositor_024_ClearSkyboxOverride(void *_this); + +void __thiscall IVRCompositor_024_CompositorBringToFront(void *_this); + +void __thiscall IVRCompositor_024_CompositorGoToBack(void *_this); + +void __thiscall IVRCompositor_024_CompositorQuit(void *_this); + +bool __thiscall IVRCompositor_024_IsFullscreen(void *_this); + +uint32_t __thiscall IVRCompositor_024_GetCurrentSceneFocusProcess(void *_this); + +uint32_t __thiscall IVRCompositor_024_GetLastFrameRenderer(void *_this); + +bool __thiscall IVRCompositor_024_CanRenderScene(void *_this); + +void __thiscall IVRCompositor_024_ShowMirrorWindow(void *_this); + +void __thiscall IVRCompositor_024_HideMirrorWindow(void *_this); + +bool __thiscall IVRCompositor_024_IsMirrorWindowVisible(void *_this); + +void __thiscall IVRCompositor_024_CompositorDumpImages(void *_this); + +bool __thiscall IVRCompositor_024_ShouldAppRenderWithLowResources(void *_this); + +void __thiscall IVRCompositor_024_ForceInterleavedReprojectionOn(void *_this, bool bOverride); + +void __thiscall IVRCompositor_024_ForceReconnectProcess(void *_this); + +void __thiscall IVRCompositor_024_SuspendRendering(void *_this, bool bSuspend); + +EVRCompositorError __thiscall IVRCompositor_024_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView); + +void __thiscall IVRCompositor_024_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView); + +EVRCompositorError __thiscall IVRCompositor_024_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle); + +bool __thiscall IVRCompositor_024_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle); + +void __thiscall IVRCompositor_024_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); + +void __thiscall IVRCompositor_024_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); + +uint32_t __thiscall IVRCompositor_024_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize); + +uint32_t __thiscall IVRCompositor_024_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); + +void __thiscall IVRCompositor_024_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode); + +EVRCompositorError __thiscall IVRCompositor_024_SubmitExplicitTimingData(void *_this); + +bool __thiscall IVRCompositor_024_IsMotionSmoothingEnabled(void *_this); + +bool __thiscall IVRCompositor_024_IsMotionSmoothingSupported(void *_this); + +bool __thiscall IVRCompositor_024_IsCurrentSceneFocusAppLoading(void *_this); + +EVRCompositorError __thiscall IVRCompositor_024_SetStageOverride_Async(void *_this, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings); + +void __thiscall IVRCompositor_024_ClearStageOverride(void *_this); + +void test_capi_thunks_IVROverlay_022(void); + +EVROverlayError __thiscall IVROverlay_022_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +uint32_t __thiscall IVROverlay_022_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); + +uint32_t __thiscall IVROverlay_022_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight); + +const char * __thiscall IVROverlay_022_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID); + +uint32_t __thiscall IVROverlay_022_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect); + +EVROverlayError __thiscall IVROverlay_022_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder); + +EVROverlayError __thiscall IVROverlay_022_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); + +uint32_t __thiscall IVROverlay_022_GetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTransformCursor(void *_this, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTransformCursor(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot); + +EVROverlayError __thiscall IVROverlay_022_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +bool __thiscall IVROverlay_022_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform); + +bool __thiscall IVROverlay_022_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); + +bool __thiscall IVROverlay_022_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults); + +bool __thiscall IVROverlay_022_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize); + +EVROverlayError __thiscall IVROverlay_022_TriggerLaserMouseHapticVibration(void *_this, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayCursor(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor); + +EVROverlayError __thiscall IVROverlay_022_ClearOverlayCursorPositionOverride(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture); + +EVROverlayError __thiscall IVROverlay_022_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel); + +EVROverlayError __thiscall IVROverlay_022_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds); + +EVROverlayError __thiscall IVROverlay_022_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle); + +EVROverlayError __thiscall IVROverlay_022_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight); + +EVROverlayError __thiscall IVROverlay_022_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle); + +bool __thiscall IVROverlay_022_IsDashboardVisible(void *_this); + +bool __thiscall IVROverlay_022_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_022_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId); + +EVROverlayError __thiscall IVROverlay_022_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId); + +void __thiscall IVROverlay_022_ShowDashboard(void *_this, const char * pchOverlayToShow); + +TrackedDeviceIndex_t __thiscall IVROverlay_022_GetPrimaryDashboardDevice(void *_this); + +EVROverlayError __thiscall IVROverlay_022_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); + +EVROverlayError __thiscall IVROverlay_022_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); + +uint32_t __thiscall IVROverlay_022_GetKeyboardText(void *_this, char * pchText, uint32_t cchText); + +void __thiscall IVROverlay_022_HideKeyboard(void *_this); + +void __thiscall IVROverlay_022_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform); + +void __thiscall IVROverlay_022_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect); + +VRMessageOverlayResponse __thiscall IVROverlay_022_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text); + +void __thiscall IVROverlay_022_CloseMessageOverlay(void *_this); + +void test_capi_thunks_IVRInput_007(void); + +EVRInputError __thiscall IVRInput_007_SetActionManifestPath(void *_this, const char * pchActionManifestPath); + +EVRInputError __thiscall IVRInput_007_GetActionSetHandle(void *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle); + +EVRInputError __thiscall IVRInput_007_GetActionHandle(void *_this, const char * pchActionName, VRActionHandle_t * pHandle); + +EVRInputError __thiscall IVRInput_007_GetInputSourceHandle(void *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle); + +EVRInputError __thiscall IVRInput_007_UpdateActionState(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount); + +EVRInputError __thiscall IVRInput_007_GetDigitalActionData(void *_this, VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + +EVRInputError __thiscall IVRInput_007_GetAnalogActionData(void *_this, VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + +EVRInputError __thiscall IVRInput_007_GetPoseActionDataRelativeToNow(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + +EVRInputError __thiscall IVRInput_007_GetPoseActionDataForNextFrame(void *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice); + +EVRInputError __thiscall IVRInput_007_GetSkeletalActionData(void *_this, VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize); + +EVRInputError __thiscall IVRInput_007_GetBoneCount(void *_this, VRActionHandle_t action, uint32_t * pBoneCount); + +EVRInputError __thiscall IVRInput_007_GetBoneHierarchy(void *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount); + +EVRInputError __thiscall IVRInput_007_GetBoneName(void *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize); + +EVRInputError __thiscall IVRInput_007_GetSkeletalReferenceTransforms(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); + +EVRInputError __thiscall IVRInput_007_GetSkeletalTrackingLevel(void *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel); + +EVRInputError __thiscall IVRInput_007_GetSkeletalBoneData(void *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); + +EVRInputError __thiscall IVRInput_007_GetSkeletalSummaryData(void *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData); + +EVRInputError __thiscall IVRInput_007_GetSkeletalBoneDataCompressed(void *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize); + +EVRInputError __thiscall IVRInput_007_DecompressSkeletalBoneData(void *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount); + +EVRInputError __thiscall IVRInput_007_TriggerHapticVibrationAction(void *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice); + +EVRInputError __thiscall IVRInput_007_GetActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount); + +EVRInputError __thiscall IVRInput_007_GetOriginLocalizedName(void *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude); + +EVRInputError __thiscall IVRInput_007_GetOriginTrackedDeviceInfo(void *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize); + +EVRInputError __thiscall IVRInput_007_GetActionBindingInfo(void *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount); + +EVRInputError __thiscall IVRInput_007_ShowActionOrigins(void *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle); + +EVRInputError __thiscall IVRInput_007_ShowBindingsForActionSet(void *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight); + +bool __thiscall IVRInput_007_IsUsingLegacyInput(void *_this); + +EVRInputError __thiscall IVRInput_007_OpenBindingUI(void *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop); + +void test_capi_thunks_IVRSettings_002(void); + +const char * __thiscall IVRSettings_002_GetSettingsErrorNameFromEnum(void *_this, EVRSettingsError eError); + +bool __thiscall IVRSettings_002_Sync(void *_this, bool bForce, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_SetBool(void *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_SetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_SetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_SetString(void *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError); + +bool __thiscall IVRSettings_002_GetBool(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); + +int32_t __thiscall IVRSettings_002_GetInt32(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); + +float __thiscall IVRSettings_002_GetFloat(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_GetString(void *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_RemoveSection(void *_this, const char * pchSection, EVRSettingsError * peError); + +void __thiscall IVRSettings_002_RemoveKeyInSection(void *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError); + +void test_capi_thunks_IVRCompositor_022(void); + +void __thiscall IVRCompositor_022_SetTrackingSpace(void *_this, ETrackingUniverseOrigin eOrigin); + +ETrackingUniverseOrigin __thiscall IVRCompositor_022_GetTrackingSpace(void *_this); + +EVRCompositorError __thiscall IVRCompositor_022_WaitGetPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); + +EVRCompositorError __thiscall IVRCompositor_022_GetLastPoses(void *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount); + +EVRCompositorError __thiscall IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(void *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose); + +EVRCompositorError __thiscall IVRCompositor_022_Submit(void *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags); + +void __thiscall IVRCompositor_022_ClearLastSubmittedFrame(void *_this); + +void __thiscall IVRCompositor_022_PostPresentHandoff(void *_this); + +bool __thiscall IVRCompositor_022_GetFrameTiming(void *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo); + +uint32_t __thiscall IVRCompositor_022_GetFrameTimings(void *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames); + +float __thiscall IVRCompositor_022_GetFrameTimeRemaining(void *_this); + +void __thiscall IVRCompositor_022_GetCumulativeStats(void *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes); + +void __thiscall IVRCompositor_022_FadeToColor(void *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground); + +HmdColor_t *__thiscall IVRCompositor_022_GetCurrentFadeColor(void *_this, HmdColor_t *_r, bool bBackground); + +void __thiscall IVRCompositor_022_FadeGrid(void *_this, float fSeconds, bool bFadeIn); + +float __thiscall IVRCompositor_022_GetCurrentGridAlpha(void *_this); + +EVRCompositorError __thiscall IVRCompositor_022_SetSkyboxOverride(void *_this, Texture_t * pTextures, uint32_t unTextureCount); + +void __thiscall IVRCompositor_022_ClearSkyboxOverride(void *_this); + +void __thiscall IVRCompositor_022_CompositorBringToFront(void *_this); + +void __thiscall IVRCompositor_022_CompositorGoToBack(void *_this); + +void __thiscall IVRCompositor_022_CompositorQuit(void *_this); + +bool __thiscall IVRCompositor_022_IsFullscreen(void *_this); + +uint32_t __thiscall IVRCompositor_022_GetCurrentSceneFocusProcess(void *_this); + +uint32_t __thiscall IVRCompositor_022_GetLastFrameRenderer(void *_this); + +bool __thiscall IVRCompositor_022_CanRenderScene(void *_this); + +void __thiscall IVRCompositor_022_ShowMirrorWindow(void *_this); + +void __thiscall IVRCompositor_022_HideMirrorWindow(void *_this); + +bool __thiscall IVRCompositor_022_IsMirrorWindowVisible(void *_this); + +void __thiscall IVRCompositor_022_CompositorDumpImages(void *_this); + +bool __thiscall IVRCompositor_022_ShouldAppRenderWithLowResources(void *_this); + +void __thiscall IVRCompositor_022_ForceInterleavedReprojectionOn(void *_this, bool bOverride); + +void __thiscall IVRCompositor_022_ForceReconnectProcess(void *_this); + +void __thiscall IVRCompositor_022_SuspendRendering(void *_this, bool bSuspend); + +EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureD3D11(void *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView); + +void __thiscall IVRCompositor_022_ReleaseMirrorTextureD3D11(void *_this, void * pD3D11ShaderResourceView); + +EVRCompositorError __thiscall IVRCompositor_022_GetMirrorTextureGL(void *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle); + +bool __thiscall IVRCompositor_022_ReleaseSharedGLTexture(void *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle); + +void __thiscall IVRCompositor_022_LockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); + +void __thiscall IVRCompositor_022_UnlockGLSharedTextureForAccess(void *_this, glSharedTextureHandle_t glSharedTextureHandle); + +uint32_t __thiscall IVRCompositor_022_GetVulkanInstanceExtensionsRequired(void *_this, char * pchValue, uint32_t unBufferSize); + +uint32_t __thiscall IVRCompositor_022_GetVulkanDeviceExtensionsRequired(void *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize); + +void __thiscall IVRCompositor_022_SetExplicitTimingMode(void *_this, EVRCompositorTimingMode eTimingMode); + +EVRCompositorError __thiscall IVRCompositor_022_SubmitExplicitTimingData(void *_this); + +bool __thiscall IVRCompositor_022_IsMotionSmoothingEnabled(void *_this); + +bool __thiscall IVRCompositor_022_IsMotionSmoothingSupported(void *_this); + +bool __thiscall IVRCompositor_022_IsCurrentSceneFocusAppLoading(void *_this); + +void test_capi_thunks_IVROverlay_021(void); + +EVROverlayError __thiscall IVROverlay_021_FindOverlay(void *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_CreateOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_DestroyOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +uint32_t __thiscall IVROverlay_021_GetOverlayKey(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); + +uint32_t __thiscall IVROverlay_021_GetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayName(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayImageData(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight); + +const char * __thiscall IVROverlay_021_GetOverlayErrorNameFromEnum(void *_this, EVROverlayError error); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID); + +uint32_t __thiscall IVROverlay_021_GetOverlayRenderingPid(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayFlag(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayColor(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayAlpha(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTexelAspect(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect); + +EVROverlayError __thiscall IVROverlay_021_SetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder); + +EVROverlayError __thiscall IVROverlay_021_GetOverlaySortOrder(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayWidthInMeters(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayCurvature(void *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureColorSpace(void *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureBounds(void *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds); + +uint32_t __thiscall IVROverlay_021_GetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayRenderModel(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformType(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformAbsolute(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceRelative(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformTrackedDeviceComponent(void *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTransformOverlayRelative(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform); + +EVROverlayError __thiscall IVROverlay_021_ShowOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_HideOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +bool __thiscall IVROverlay_021_IsOverlayVisible(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_GetTransformForOverlayCoordinates(void *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform); + +bool __thiscall IVROverlay_021_PollNextOverlayEvent(void *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayInputMethod(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayMouseScale(void *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale); + +bool __thiscall IVROverlay_021_ComputeOverlayIntersection(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults); + +bool __thiscall IVROverlay_021_IsHoverTargetOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayDualAnalogTransform(void *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture); + +EVROverlayError __thiscall IVROverlay_021_ClearOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayRaw(void *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayFromFile(void *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTexture(void *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds); + +EVROverlayError __thiscall IVROverlay_021_ReleaseNativeOverlayHandle(void *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayTextureSize(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight); + +EVROverlayError __thiscall IVROverlay_021_CreateDashboardOverlay(void *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle); + +bool __thiscall IVROverlay_021_IsDashboardVisible(void *_this); + +bool __thiscall IVROverlay_021_IsActiveDashboardOverlay(void *_this, VROverlayHandle_t ulOverlayHandle); + +EVROverlayError __thiscall IVROverlay_021_SetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId); + +EVROverlayError __thiscall IVROverlay_021_GetDashboardOverlaySceneProcess(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId); + +void __thiscall IVROverlay_021_ShowDashboard(void *_this, const char * pchOverlayToShow); + +TrackedDeviceIndex_t __thiscall IVROverlay_021_GetPrimaryDashboardDevice(void *_this); + +EVROverlayError __thiscall IVROverlay_021_ShowKeyboard(void *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); + +EVROverlayError __thiscall IVROverlay_021_ShowKeyboardForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue); + +uint32_t __thiscall IVROverlay_021_GetKeyboardText(void *_this, char * pchText, uint32_t cchText); + +void __thiscall IVROverlay_021_HideKeyboard(void *_this); + +void __thiscall IVROverlay_021_SetKeyboardTransformAbsolute(void *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform); + +void __thiscall IVROverlay_021_SetKeyboardPositionForOverlay(void *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect); + +EVROverlayError __thiscall IVROverlay_021_SetOverlayIntersectionMask(void *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize); + +EVROverlayError __thiscall IVROverlay_021_GetOverlayFlags(void *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags); + +VRMessageOverlayResponse __thiscall IVROverlay_021_ShowMessageOverlay(void *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text); + +void __thiscall IVROverlay_021_CloseMessageOverlay(void *_this); + void test_capi_thunks_IVRSystem_020(void); void __thiscall IVRSystem_020_GetRecommendedRenderTargetSize(void *_this, uint32_t * pnWidth, uint32_t * pnHeight); diff --git a/vrclient_x64/tests/capi_thunks_tests_autogen.c b/vrclient_x64/tests/capi_thunks_tests_autogen.c index 440452ab81..08bf83acff 100644 --- a/vrclient_x64/tests/capi_thunks_tests_autogen.c +++ b/vrclient_x64/tests/capi_thunks_tests_autogen.c @@ -706,131 +706,122 @@ void test_capi_thunks_IVRApplications_007(void) VirtualFree(t, 0, MEM_RELEASE); } -void test_capi_thunks_IVRSettings_002(void) +void test_capi_thunks_IVRSettings_003(void) { struct thunk *t = alloc_thunks(1); - init_thunk(t, this_ptr_value, IVRSettings_002_GetSettingsErrorNameFromEnum, 1, FALSE, FALSE); - const char * (__stdcall *capi_IVRSettings_002_GetSettingsErrorNameFromEnum)(EVRSettingsError eError) = (void *)t; - - clear_parameters(); - capi_IVRSettings_002_GetSettingsErrorNameFromEnum(1); - check_ptr_parameter("IVRSettings_002_GetSettingsErrorNameFromEnum", this_ptr_value); - check_uint32_parameter("IVRSettings_002_GetSettingsErrorNameFromEnum", 1); - - init_thunk(t, this_ptr_value, IVRSettings_002_Sync, 2, FALSE, FALSE); - bool (__stdcall *capi_IVRSettings_002_Sync)(bool bForce, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_GetSettingsErrorNameFromEnum, 1, FALSE, FALSE); + const char * (__stdcall *capi_IVRSettings_003_GetSettingsErrorNameFromEnum)(EVRSettingsError eError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_Sync(1, (void *)2); - check_ptr_parameter("IVRSettings_002_Sync", this_ptr_value); - check_bool_parameter("IVRSettings_002_Sync", 1); - check_ptr_parameter("IVRSettings_002_Sync", (void *)2); + capi_IVRSettings_003_GetSettingsErrorNameFromEnum(1); + check_ptr_parameter("IVRSettings_003_GetSettingsErrorNameFromEnum", this_ptr_value); + check_uint32_parameter("IVRSettings_003_GetSettingsErrorNameFromEnum", 1); - init_thunk(t, this_ptr_value, IVRSettings_002_SetBool, 4, FALSE, FALSE); - void (__stdcall *capi_IVRSettings_002_SetBool)(const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_SetBool, 4, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_003_SetBool)(const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_SetBool((void *)1, (void *)2, 1, (void *)4); - check_ptr_parameter("IVRSettings_002_SetBool", this_ptr_value); - check_ptr_parameter("IVRSettings_002_SetBool", (void *)1); - check_ptr_parameter("IVRSettings_002_SetBool", (void *)2); - check_bool_parameter("IVRSettings_002_SetBool", 1); - check_ptr_parameter("IVRSettings_002_SetBool", (void *)4); + capi_IVRSettings_003_SetBool((void *)1, (void *)2, 1, (void *)4); + check_ptr_parameter("IVRSettings_003_SetBool", this_ptr_value); + check_ptr_parameter("IVRSettings_003_SetBool", (void *)1); + check_ptr_parameter("IVRSettings_003_SetBool", (void *)2); + check_bool_parameter("IVRSettings_003_SetBool", 1); + check_ptr_parameter("IVRSettings_003_SetBool", (void *)4); - init_thunk(t, this_ptr_value, IVRSettings_002_SetInt32, 4, FALSE, FALSE); - void (__stdcall *capi_IVRSettings_002_SetInt32)(const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_SetInt32, 4, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_003_SetInt32)(const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_SetInt32((void *)1, (void *)2, 3, (void *)4); - check_ptr_parameter("IVRSettings_002_SetInt32", this_ptr_value); - check_ptr_parameter("IVRSettings_002_SetInt32", (void *)1); - check_ptr_parameter("IVRSettings_002_SetInt32", (void *)2); - check_uint32_parameter("IVRSettings_002_SetInt32", 3); - check_ptr_parameter("IVRSettings_002_SetInt32", (void *)4); + capi_IVRSettings_003_SetInt32((void *)1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVRSettings_003_SetInt32", this_ptr_value); + check_ptr_parameter("IVRSettings_003_SetInt32", (void *)1); + check_ptr_parameter("IVRSettings_003_SetInt32", (void *)2); + check_uint32_parameter("IVRSettings_003_SetInt32", 3); + check_ptr_parameter("IVRSettings_003_SetInt32", (void *)4); - init_thunk(t, this_ptr_value, IVRSettings_002_SetFloat, 4, TRUE, FALSE); - void (__stdcall *capi_IVRSettings_002_SetFloat)(const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_SetFloat, 4, TRUE, FALSE); + void (__stdcall *capi_IVRSettings_003_SetFloat)(const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_SetFloat((void *)1, (void *)2, 3.0f, (void *)4); - check_ptr_parameter("IVRSettings_002_SetFloat", this_ptr_value); - check_ptr_parameter("IVRSettings_002_SetFloat", (void *)1); - check_ptr_parameter("IVRSettings_002_SetFloat", (void *)2); - check_float_parameter("IVRSettings_002_SetFloat", 3.0f); - check_ptr_parameter("IVRSettings_002_SetFloat", (void *)4); + capi_IVRSettings_003_SetFloat((void *)1, (void *)2, 3.0f, (void *)4); + check_ptr_parameter("IVRSettings_003_SetFloat", this_ptr_value); + check_ptr_parameter("IVRSettings_003_SetFloat", (void *)1); + check_ptr_parameter("IVRSettings_003_SetFloat", (void *)2); + check_float_parameter("IVRSettings_003_SetFloat", 3.0f); + check_ptr_parameter("IVRSettings_003_SetFloat", (void *)4); - init_thunk(t, this_ptr_value, IVRSettings_002_SetString, 4, FALSE, FALSE); - void (__stdcall *capi_IVRSettings_002_SetString)(const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_SetString, 4, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_003_SetString)(const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_SetString((void *)1, (void *)2, (void *)3, (void *)4); - check_ptr_parameter("IVRSettings_002_SetString", this_ptr_value); - check_ptr_parameter("IVRSettings_002_SetString", (void *)1); - check_ptr_parameter("IVRSettings_002_SetString", (void *)2); - check_ptr_parameter("IVRSettings_002_SetString", (void *)3); - check_ptr_parameter("IVRSettings_002_SetString", (void *)4); + capi_IVRSettings_003_SetString((void *)1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVRSettings_003_SetString", this_ptr_value); + check_ptr_parameter("IVRSettings_003_SetString", (void *)1); + check_ptr_parameter("IVRSettings_003_SetString", (void *)2); + check_ptr_parameter("IVRSettings_003_SetString", (void *)3); + check_ptr_parameter("IVRSettings_003_SetString", (void *)4); - init_thunk(t, this_ptr_value, IVRSettings_002_GetBool, 3, FALSE, FALSE); - bool (__stdcall *capi_IVRSettings_002_GetBool)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_GetBool, 3, FALSE, FALSE); + bool (__stdcall *capi_IVRSettings_003_GetBool)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_GetBool((void *)1, (void *)2, (void *)3); - check_ptr_parameter("IVRSettings_002_GetBool", this_ptr_value); - check_ptr_parameter("IVRSettings_002_GetBool", (void *)1); - check_ptr_parameter("IVRSettings_002_GetBool", (void *)2); - check_ptr_parameter("IVRSettings_002_GetBool", (void *)3); + capi_IVRSettings_003_GetBool((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_003_GetBool", this_ptr_value); + check_ptr_parameter("IVRSettings_003_GetBool", (void *)1); + check_ptr_parameter("IVRSettings_003_GetBool", (void *)2); + check_ptr_parameter("IVRSettings_003_GetBool", (void *)3); - init_thunk(t, this_ptr_value, IVRSettings_002_GetInt32, 3, FALSE, FALSE); - int32_t (__stdcall *capi_IVRSettings_002_GetInt32)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_GetInt32, 3, FALSE, FALSE); + int32_t (__stdcall *capi_IVRSettings_003_GetInt32)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_GetInt32((void *)1, (void *)2, (void *)3); - check_ptr_parameter("IVRSettings_002_GetInt32", this_ptr_value); - check_ptr_parameter("IVRSettings_002_GetInt32", (void *)1); - check_ptr_parameter("IVRSettings_002_GetInt32", (void *)2); - check_ptr_parameter("IVRSettings_002_GetInt32", (void *)3); + capi_IVRSettings_003_GetInt32((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_003_GetInt32", this_ptr_value); + check_ptr_parameter("IVRSettings_003_GetInt32", (void *)1); + check_ptr_parameter("IVRSettings_003_GetInt32", (void *)2); + check_ptr_parameter("IVRSettings_003_GetInt32", (void *)3); - init_thunk(t, this_ptr_value, IVRSettings_002_GetFloat, 3, FALSE, FALSE); - float (__stdcall *capi_IVRSettings_002_GetFloat)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_GetFloat, 3, FALSE, FALSE); + float (__stdcall *capi_IVRSettings_003_GetFloat)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_GetFloat((void *)1, (void *)2, (void *)3); - check_ptr_parameter("IVRSettings_002_GetFloat", this_ptr_value); - check_ptr_parameter("IVRSettings_002_GetFloat", (void *)1); - check_ptr_parameter("IVRSettings_002_GetFloat", (void *)2); - check_ptr_parameter("IVRSettings_002_GetFloat", (void *)3); + capi_IVRSettings_003_GetFloat((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_003_GetFloat", this_ptr_value); + check_ptr_parameter("IVRSettings_003_GetFloat", (void *)1); + check_ptr_parameter("IVRSettings_003_GetFloat", (void *)2); + check_ptr_parameter("IVRSettings_003_GetFloat", (void *)3); - init_thunk(t, this_ptr_value, IVRSettings_002_GetString, 5, FALSE, FALSE); - void (__stdcall *capi_IVRSettings_002_GetString)(const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_GetString, 5, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_003_GetString)(const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_GetString((void *)1, (void *)2, (void *)3, 4, (void *)5); - check_ptr_parameter("IVRSettings_002_GetString", this_ptr_value); - check_ptr_parameter("IVRSettings_002_GetString", (void *)1); - check_ptr_parameter("IVRSettings_002_GetString", (void *)2); - check_ptr_parameter("IVRSettings_002_GetString", (void *)3); - check_uint32_parameter("IVRSettings_002_GetString", 4); - check_ptr_parameter("IVRSettings_002_GetString", (void *)5); + capi_IVRSettings_003_GetString((void *)1, (void *)2, (void *)3, 4, (void *)5); + check_ptr_parameter("IVRSettings_003_GetString", this_ptr_value); + check_ptr_parameter("IVRSettings_003_GetString", (void *)1); + check_ptr_parameter("IVRSettings_003_GetString", (void *)2); + check_ptr_parameter("IVRSettings_003_GetString", (void *)3); + check_uint32_parameter("IVRSettings_003_GetString", 4); + check_ptr_parameter("IVRSettings_003_GetString", (void *)5); - init_thunk(t, this_ptr_value, IVRSettings_002_RemoveSection, 2, FALSE, FALSE); - void (__stdcall *capi_IVRSettings_002_RemoveSection)(const char * pchSection, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_RemoveSection, 2, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_003_RemoveSection)(const char * pchSection, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_RemoveSection((void *)1, (void *)2); - check_ptr_parameter("IVRSettings_002_RemoveSection", this_ptr_value); - check_ptr_parameter("IVRSettings_002_RemoveSection", (void *)1); - check_ptr_parameter("IVRSettings_002_RemoveSection", (void *)2); + capi_IVRSettings_003_RemoveSection((void *)1, (void *)2); + check_ptr_parameter("IVRSettings_003_RemoveSection", this_ptr_value); + check_ptr_parameter("IVRSettings_003_RemoveSection", (void *)1); + check_ptr_parameter("IVRSettings_003_RemoveSection", (void *)2); - init_thunk(t, this_ptr_value, IVRSettings_002_RemoveKeyInSection, 3, FALSE, FALSE); - void (__stdcall *capi_IVRSettings_002_RemoveKeyInSection)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + init_thunk(t, this_ptr_value, IVRSettings_003_RemoveKeyInSection, 3, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_003_RemoveKeyInSection)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; clear_parameters(); - capi_IVRSettings_002_RemoveKeyInSection((void *)1, (void *)2, (void *)3); - check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", this_ptr_value); - check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", (void *)1); - check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", (void *)2); - check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", (void *)3); + capi_IVRSettings_003_RemoveKeyInSection((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_003_RemoveKeyInSection", this_ptr_value); + check_ptr_parameter("IVRSettings_003_RemoveKeyInSection", (void *)1); + check_ptr_parameter("IVRSettings_003_RemoveKeyInSection", (void *)2); + check_ptr_parameter("IVRSettings_003_RemoveKeyInSection", (void *)3); VirtualFree(t, 0, MEM_RELEASE); } @@ -1075,384 +1066,509 @@ void test_capi_thunks_IVRChaperoneSetup_006(void) VirtualFree(t, 0, MEM_RELEASE); } -void test_capi_thunks_IVRCompositor_022(void) +void test_capi_thunks_IVRCompositor_026(void) { struct thunk *t = alloc_thunks(1); - init_thunk(t, this_ptr_value, IVRCompositor_022_SetTrackingSpace, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_SetTrackingSpace)(ETrackingUniverseOrigin eOrigin) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_SetTrackingSpace, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_SetTrackingSpace)(ETrackingUniverseOrigin eOrigin) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_SetTrackingSpace(1); - check_ptr_parameter("IVRCompositor_022_SetTrackingSpace", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_SetTrackingSpace", 1); + capi_IVRCompositor_026_SetTrackingSpace(1); + check_ptr_parameter("IVRCompositor_026_SetTrackingSpace", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_SetTrackingSpace", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetTrackingSpace, 0, FALSE, FALSE); - ETrackingUniverseOrigin (__stdcall *capi_IVRCompositor_022_GetTrackingSpace)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetTrackingSpace, 0, FALSE, FALSE); + ETrackingUniverseOrigin (__stdcall *capi_IVRCompositor_026_GetTrackingSpace)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetTrackingSpace(); - check_ptr_parameter("IVRCompositor_022_GetTrackingSpace", this_ptr_value); + capi_IVRCompositor_026_GetTrackingSpace(); + check_ptr_parameter("IVRCompositor_026_GetTrackingSpace", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_WaitGetPoses, 4, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_WaitGetPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_WaitGetPoses, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_WaitGetPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_WaitGetPoses((void *)1, 2, (void *)3, 4); - check_ptr_parameter("IVRCompositor_022_WaitGetPoses", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_WaitGetPoses", (void *)1); - check_uint32_parameter("IVRCompositor_022_WaitGetPoses", 2); - check_ptr_parameter("IVRCompositor_022_WaitGetPoses", (void *)3); - check_uint32_parameter("IVRCompositor_022_WaitGetPoses", 4); + capi_IVRCompositor_026_WaitGetPoses((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_026_WaitGetPoses", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_WaitGetPoses", (void *)1); + check_uint32_parameter("IVRCompositor_026_WaitGetPoses", 2); + check_ptr_parameter("IVRCompositor_026_WaitGetPoses", (void *)3); + check_uint32_parameter("IVRCompositor_026_WaitGetPoses", 4); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetLastPoses, 4, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetLastPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetLastPoses, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_GetLastPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetLastPoses((void *)1, 2, (void *)3, 4); - check_ptr_parameter("IVRCompositor_022_GetLastPoses", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetLastPoses", (void *)1); - check_uint32_parameter("IVRCompositor_022_GetLastPoses", 2); - check_ptr_parameter("IVRCompositor_022_GetLastPoses", (void *)3); - check_uint32_parameter("IVRCompositor_022_GetLastPoses", 4); + capi_IVRCompositor_026_GetLastPoses((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_026_GetLastPoses", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetLastPoses", (void *)1); + check_uint32_parameter("IVRCompositor_026_GetLastPoses", 2); + check_ptr_parameter("IVRCompositor_026_GetLastPoses", (void *)3); + check_uint32_parameter("IVRCompositor_026_GetLastPoses", 4); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetLastPoseForTrackedDeviceIndex, 3, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetLastPoseForTrackedDeviceIndex, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(1, (void *)2, (void *)3); - check_ptr_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", 1); - check_ptr_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", (void *)2); - check_ptr_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", (void *)3); + capi_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_026_GetLastPoseForTrackedDeviceIndex", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_GetLastPoseForTrackedDeviceIndex", 1); + check_ptr_parameter("IVRCompositor_026_GetLastPoseForTrackedDeviceIndex", (void *)2); + check_ptr_parameter("IVRCompositor_026_GetLastPoseForTrackedDeviceIndex", (void *)3); - init_thunk(t, this_ptr_value, IVRCompositor_022_Submit, 4, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_Submit)(EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_Submit, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_Submit)(EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_Submit(1, (void *)2, (void *)3, 4); - check_ptr_parameter("IVRCompositor_022_Submit", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_Submit", 1); - check_ptr_parameter("IVRCompositor_022_Submit", (void *)2); - check_ptr_parameter("IVRCompositor_022_Submit", (void *)3); - check_uint32_parameter("IVRCompositor_022_Submit", 4); + capi_IVRCompositor_026_Submit(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_026_Submit", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_Submit", 1); + check_ptr_parameter("IVRCompositor_026_Submit", (void *)2); + check_ptr_parameter("IVRCompositor_026_Submit", (void *)3); + check_uint32_parameter("IVRCompositor_026_Submit", 4); - init_thunk(t, this_ptr_value, IVRCompositor_022_ClearLastSubmittedFrame, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_ClearLastSubmittedFrame)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ClearLastSubmittedFrame, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ClearLastSubmittedFrame)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ClearLastSubmittedFrame(); - check_ptr_parameter("IVRCompositor_022_ClearLastSubmittedFrame", this_ptr_value); + capi_IVRCompositor_026_ClearLastSubmittedFrame(); + check_ptr_parameter("IVRCompositor_026_ClearLastSubmittedFrame", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_PostPresentHandoff, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_PostPresentHandoff)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_PostPresentHandoff, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_PostPresentHandoff)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_PostPresentHandoff(); - check_ptr_parameter("IVRCompositor_022_PostPresentHandoff", this_ptr_value); + capi_IVRCompositor_026_PostPresentHandoff(); + check_ptr_parameter("IVRCompositor_026_PostPresentHandoff", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetFrameTiming, 2, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_GetFrameTiming)(Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetFrameTiming, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_GetFrameTiming)(Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetFrameTiming((void *)1, 2); - check_ptr_parameter("IVRCompositor_022_GetFrameTiming", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetFrameTiming", (void *)1); - check_uint32_parameter("IVRCompositor_022_GetFrameTiming", 2); + capi_IVRCompositor_026_GetFrameTiming((void *)1, 2); + check_ptr_parameter("IVRCompositor_026_GetFrameTiming", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetFrameTiming", (void *)1); + check_uint32_parameter("IVRCompositor_026_GetFrameTiming", 2); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetFrameTimings, 2, FALSE, FALSE); - uint32_t (__stdcall *capi_IVRCompositor_022_GetFrameTimings)(Compositor_FrameTiming * pTiming, uint32_t nFrames) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetFrameTimings, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_026_GetFrameTimings)(Compositor_FrameTiming * pTiming, uint32_t nFrames) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetFrameTimings((void *)1, 2); - check_ptr_parameter("IVRCompositor_022_GetFrameTimings", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetFrameTimings", (void *)1); - check_uint32_parameter("IVRCompositor_022_GetFrameTimings", 2); + capi_IVRCompositor_026_GetFrameTimings((void *)1, 2); + check_ptr_parameter("IVRCompositor_026_GetFrameTimings", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetFrameTimings", (void *)1); + check_uint32_parameter("IVRCompositor_026_GetFrameTimings", 2); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetFrameTimeRemaining, 0, FALSE, FALSE); - float (__stdcall *capi_IVRCompositor_022_GetFrameTimeRemaining)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetFrameTimeRemaining, 0, FALSE, FALSE); + float (__stdcall *capi_IVRCompositor_026_GetFrameTimeRemaining)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetFrameTimeRemaining(); - check_ptr_parameter("IVRCompositor_022_GetFrameTimeRemaining", this_ptr_value); + capi_IVRCompositor_026_GetFrameTimeRemaining(); + check_ptr_parameter("IVRCompositor_026_GetFrameTimeRemaining", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetCumulativeStats, 2, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_GetCumulativeStats)(Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetCumulativeStats, 2, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_GetCumulativeStats)(Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetCumulativeStats((void *)1, 2); - check_ptr_parameter("IVRCompositor_022_GetCumulativeStats", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetCumulativeStats", (void *)1); - check_uint32_parameter("IVRCompositor_022_GetCumulativeStats", 2); + capi_IVRCompositor_026_GetCumulativeStats((void *)1, 2); + check_ptr_parameter("IVRCompositor_026_GetCumulativeStats", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetCumulativeStats", (void *)1); + check_uint32_parameter("IVRCompositor_026_GetCumulativeStats", 2); - init_thunk(t, this_ptr_value, IVRCompositor_022_FadeToColor, 6, TRUE, TRUE); - void (__stdcall *capi_IVRCompositor_022_FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_FadeToColor, 6, TRUE, TRUE); + void (__stdcall *capi_IVRCompositor_026_FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_FadeToColor(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 1); - check_ptr_parameter("IVRCompositor_022_FadeToColor", this_ptr_value); - check_float_parameter("IVRCompositor_022_FadeToColor", 1.0f); - check_float_parameter("IVRCompositor_022_FadeToColor", 2.0f); - check_float_parameter("IVRCompositor_022_FadeToColor", 3.0f); - check_float_parameter("IVRCompositor_022_FadeToColor", 4.0f); - check_float_parameter("IVRCompositor_022_FadeToColor", 5.0f); - check_bool_parameter("IVRCompositor_022_FadeToColor", 1); + capi_IVRCompositor_026_FadeToColor(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 1); + check_ptr_parameter("IVRCompositor_026_FadeToColor", this_ptr_value); + check_float_parameter("IVRCompositor_026_FadeToColor", 1.0f); + check_float_parameter("IVRCompositor_026_FadeToColor", 2.0f); + check_float_parameter("IVRCompositor_026_FadeToColor", 3.0f); + check_float_parameter("IVRCompositor_026_FadeToColor", 4.0f); + check_float_parameter("IVRCompositor_026_FadeToColor", 5.0f); + check_bool_parameter("IVRCompositor_026_FadeToColor", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetCurrentFadeColor, 2, FALSE, FALSE); - HmdColor_t *(__stdcall *capi_IVRCompositor_022_GetCurrentFadeColor)(HmdColor_t *_r, bool bBackground) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetCurrentFadeColor, 2, FALSE, FALSE); + HmdColor_t *(__stdcall *capi_IVRCompositor_026_GetCurrentFadeColor)(HmdColor_t *_r, bool bBackground) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetCurrentFadeColor(data_ptr_value, 1); - check_ptr_parameter("IVRCompositor_022_GetCurrentFadeColor", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetCurrentFadeColor", data_ptr_value); - check_bool_parameter("IVRCompositor_022_GetCurrentFadeColor", 1); + capi_IVRCompositor_026_GetCurrentFadeColor(data_ptr_value, 1); + check_ptr_parameter("IVRCompositor_026_GetCurrentFadeColor", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetCurrentFadeColor", data_ptr_value); + check_bool_parameter("IVRCompositor_026_GetCurrentFadeColor", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_FadeGrid, 2, TRUE, FALSE); - void (__stdcall *capi_IVRCompositor_022_FadeGrid)(float fSeconds, bool bFadeIn) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_FadeGrid, 2, TRUE, FALSE); + void (__stdcall *capi_IVRCompositor_026_FadeGrid)(float fSeconds, bool bFadeIn) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_FadeGrid(1.0f, 1); - check_ptr_parameter("IVRCompositor_022_FadeGrid", this_ptr_value); - check_float_parameter("IVRCompositor_022_FadeGrid", 1.0f); - check_bool_parameter("IVRCompositor_022_FadeGrid", 1); + capi_IVRCompositor_026_FadeGrid(1.0f, 1); + check_ptr_parameter("IVRCompositor_026_FadeGrid", this_ptr_value); + check_float_parameter("IVRCompositor_026_FadeGrid", 1.0f); + check_bool_parameter("IVRCompositor_026_FadeGrid", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetCurrentGridAlpha, 0, FALSE, FALSE); - float (__stdcall *capi_IVRCompositor_022_GetCurrentGridAlpha)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetCurrentGridAlpha, 0, FALSE, FALSE); + float (__stdcall *capi_IVRCompositor_026_GetCurrentGridAlpha)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetCurrentGridAlpha(); - check_ptr_parameter("IVRCompositor_022_GetCurrentGridAlpha", this_ptr_value); + capi_IVRCompositor_026_GetCurrentGridAlpha(); + check_ptr_parameter("IVRCompositor_026_GetCurrentGridAlpha", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_SetSkyboxOverride, 2, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_SetSkyboxOverride)(Texture_t * pTextures, uint32_t unTextureCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_SetSkyboxOverride, 2, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_SetSkyboxOverride)(Texture_t * pTextures, uint32_t unTextureCount) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_SetSkyboxOverride((void *)1, 2); - check_ptr_parameter("IVRCompositor_022_SetSkyboxOverride", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_SetSkyboxOverride", (void *)1); - check_uint32_parameter("IVRCompositor_022_SetSkyboxOverride", 2); + capi_IVRCompositor_026_SetSkyboxOverride((void *)1, 2); + check_ptr_parameter("IVRCompositor_026_SetSkyboxOverride", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_SetSkyboxOverride", (void *)1); + check_uint32_parameter("IVRCompositor_026_SetSkyboxOverride", 2); - init_thunk(t, this_ptr_value, IVRCompositor_022_ClearSkyboxOverride, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_ClearSkyboxOverride)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ClearSkyboxOverride, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ClearSkyboxOverride)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ClearSkyboxOverride(); - check_ptr_parameter("IVRCompositor_022_ClearSkyboxOverride", this_ptr_value); + capi_IVRCompositor_026_ClearSkyboxOverride(); + check_ptr_parameter("IVRCompositor_026_ClearSkyboxOverride", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorBringToFront, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_CompositorBringToFront)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_CompositorBringToFront, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_CompositorBringToFront)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_CompositorBringToFront(); - check_ptr_parameter("IVRCompositor_022_CompositorBringToFront", this_ptr_value); + capi_IVRCompositor_026_CompositorBringToFront(); + check_ptr_parameter("IVRCompositor_026_CompositorBringToFront", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorGoToBack, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_CompositorGoToBack)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_CompositorGoToBack, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_CompositorGoToBack)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_CompositorGoToBack(); - check_ptr_parameter("IVRCompositor_022_CompositorGoToBack", this_ptr_value); + capi_IVRCompositor_026_CompositorGoToBack(); + check_ptr_parameter("IVRCompositor_026_CompositorGoToBack", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorQuit, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_CompositorQuit)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_CompositorQuit, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_CompositorQuit)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_CompositorQuit(); - check_ptr_parameter("IVRCompositor_022_CompositorQuit", this_ptr_value); + capi_IVRCompositor_026_CompositorQuit(); + check_ptr_parameter("IVRCompositor_026_CompositorQuit", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_IsFullscreen, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_IsFullscreen)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_IsFullscreen, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_IsFullscreen)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_IsFullscreen(); - check_ptr_parameter("IVRCompositor_022_IsFullscreen", this_ptr_value); + capi_IVRCompositor_026_IsFullscreen(); + check_ptr_parameter("IVRCompositor_026_IsFullscreen", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetCurrentSceneFocusProcess, 0, FALSE, FALSE); - uint32_t (__stdcall *capi_IVRCompositor_022_GetCurrentSceneFocusProcess)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetCurrentSceneFocusProcess, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_026_GetCurrentSceneFocusProcess)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetCurrentSceneFocusProcess(); - check_ptr_parameter("IVRCompositor_022_GetCurrentSceneFocusProcess", this_ptr_value); + capi_IVRCompositor_026_GetCurrentSceneFocusProcess(); + check_ptr_parameter("IVRCompositor_026_GetCurrentSceneFocusProcess", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetLastFrameRenderer, 0, FALSE, FALSE); - uint32_t (__stdcall *capi_IVRCompositor_022_GetLastFrameRenderer)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetLastFrameRenderer, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_026_GetLastFrameRenderer)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetLastFrameRenderer(); - check_ptr_parameter("IVRCompositor_022_GetLastFrameRenderer", this_ptr_value); + capi_IVRCompositor_026_GetLastFrameRenderer(); + check_ptr_parameter("IVRCompositor_026_GetLastFrameRenderer", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_CanRenderScene, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_CanRenderScene)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_CanRenderScene, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_CanRenderScene)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_CanRenderScene(); - check_ptr_parameter("IVRCompositor_022_CanRenderScene", this_ptr_value); + capi_IVRCompositor_026_CanRenderScene(); + check_ptr_parameter("IVRCompositor_026_CanRenderScene", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_ShowMirrorWindow, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_ShowMirrorWindow)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ShowMirrorWindow, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ShowMirrorWindow)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ShowMirrorWindow(); - check_ptr_parameter("IVRCompositor_022_ShowMirrorWindow", this_ptr_value); + capi_IVRCompositor_026_ShowMirrorWindow(); + check_ptr_parameter("IVRCompositor_026_ShowMirrorWindow", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_HideMirrorWindow, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_HideMirrorWindow)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_HideMirrorWindow, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_HideMirrorWindow)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_HideMirrorWindow(); - check_ptr_parameter("IVRCompositor_022_HideMirrorWindow", this_ptr_value); + capi_IVRCompositor_026_HideMirrorWindow(); + check_ptr_parameter("IVRCompositor_026_HideMirrorWindow", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_IsMirrorWindowVisible, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_IsMirrorWindowVisible)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_IsMirrorWindowVisible, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_IsMirrorWindowVisible)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_IsMirrorWindowVisible(); - check_ptr_parameter("IVRCompositor_022_IsMirrorWindowVisible", this_ptr_value); + capi_IVRCompositor_026_IsMirrorWindowVisible(); + check_ptr_parameter("IVRCompositor_026_IsMirrorWindowVisible", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorDumpImages, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_CompositorDumpImages)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_CompositorDumpImages, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_CompositorDumpImages)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_CompositorDumpImages(); - check_ptr_parameter("IVRCompositor_022_CompositorDumpImages", this_ptr_value); + capi_IVRCompositor_026_CompositorDumpImages(); + check_ptr_parameter("IVRCompositor_026_CompositorDumpImages", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_ShouldAppRenderWithLowResources, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_ShouldAppRenderWithLowResources)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ShouldAppRenderWithLowResources, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_ShouldAppRenderWithLowResources)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ShouldAppRenderWithLowResources(); - check_ptr_parameter("IVRCompositor_022_ShouldAppRenderWithLowResources", this_ptr_value); + capi_IVRCompositor_026_ShouldAppRenderWithLowResources(); + check_ptr_parameter("IVRCompositor_026_ShouldAppRenderWithLowResources", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_ForceInterleavedReprojectionOn, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_ForceInterleavedReprojectionOn)(bool bOverride) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ForceInterleavedReprojectionOn, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ForceInterleavedReprojectionOn)(bool bOverride) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ForceInterleavedReprojectionOn(1); - check_ptr_parameter("IVRCompositor_022_ForceInterleavedReprojectionOn", this_ptr_value); - check_bool_parameter("IVRCompositor_022_ForceInterleavedReprojectionOn", 1); + capi_IVRCompositor_026_ForceInterleavedReprojectionOn(1); + check_ptr_parameter("IVRCompositor_026_ForceInterleavedReprojectionOn", this_ptr_value); + check_bool_parameter("IVRCompositor_026_ForceInterleavedReprojectionOn", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_ForceReconnectProcess, 0, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_ForceReconnectProcess)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ForceReconnectProcess, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ForceReconnectProcess)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ForceReconnectProcess(); - check_ptr_parameter("IVRCompositor_022_ForceReconnectProcess", this_ptr_value); + capi_IVRCompositor_026_ForceReconnectProcess(); + check_ptr_parameter("IVRCompositor_026_ForceReconnectProcess", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_SuspendRendering, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_SuspendRendering)(bool bSuspend) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_SuspendRendering, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_SuspendRendering)(bool bSuspend) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_SuspendRendering(1); - check_ptr_parameter("IVRCompositor_022_SuspendRendering", this_ptr_value); - check_bool_parameter("IVRCompositor_022_SuspendRendering", 1); + capi_IVRCompositor_026_SuspendRendering(1); + check_ptr_parameter("IVRCompositor_026_SuspendRendering", this_ptr_value); + check_bool_parameter("IVRCompositor_026_SuspendRendering", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetMirrorTextureD3D11, 3, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetMirrorTextureD3D11, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetMirrorTextureD3D11(1, (void *)2, (void *)3); - check_ptr_parameter("IVRCompositor_022_GetMirrorTextureD3D11", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_GetMirrorTextureD3D11", 1); - check_ptr_parameter("IVRCompositor_022_GetMirrorTextureD3D11", (void *)2); - check_ptr_parameter("IVRCompositor_022_GetMirrorTextureD3D11", (void *)3); + capi_IVRCompositor_026_GetMirrorTextureD3D11(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_026_GetMirrorTextureD3D11", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_GetMirrorTextureD3D11", 1); + check_ptr_parameter("IVRCompositor_026_GetMirrorTextureD3D11", (void *)2); + check_ptr_parameter("IVRCompositor_026_GetMirrorTextureD3D11", (void *)3); - init_thunk(t, this_ptr_value, IVRCompositor_022_ReleaseMirrorTextureD3D11, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_ReleaseMirrorTextureD3D11)(void * pD3D11ShaderResourceView) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ReleaseMirrorTextureD3D11, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ReleaseMirrorTextureD3D11)(void * pD3D11ShaderResourceView) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ReleaseMirrorTextureD3D11((void *)1); - check_ptr_parameter("IVRCompositor_022_ReleaseMirrorTextureD3D11", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_ReleaseMirrorTextureD3D11", (void *)1); + capi_IVRCompositor_026_ReleaseMirrorTextureD3D11((void *)1); + check_ptr_parameter("IVRCompositor_026_ReleaseMirrorTextureD3D11", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_ReleaseMirrorTextureD3D11", (void *)1); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetMirrorTextureGL, 3, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetMirrorTextureGL, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetMirrorTextureGL(1, (void *)2, (void *)3); - check_ptr_parameter("IVRCompositor_022_GetMirrorTextureGL", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_GetMirrorTextureGL", 1); - check_ptr_parameter("IVRCompositor_022_GetMirrorTextureGL", (void *)2); - check_ptr_parameter("IVRCompositor_022_GetMirrorTextureGL", (void *)3); + capi_IVRCompositor_026_GetMirrorTextureGL(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_026_GetMirrorTextureGL", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_GetMirrorTextureGL", 1); + check_ptr_parameter("IVRCompositor_026_GetMirrorTextureGL", (void *)2); + check_ptr_parameter("IVRCompositor_026_GetMirrorTextureGL", (void *)3); - init_thunk(t, this_ptr_value, IVRCompositor_022_ReleaseSharedGLTexture, 2, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_ReleaseSharedGLTexture, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_ReleaseSharedGLTexture(1, (void *)2); - check_ptr_parameter("IVRCompositor_022_ReleaseSharedGLTexture", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_ReleaseSharedGLTexture", 1); - check_ptr_parameter("IVRCompositor_022_ReleaseSharedGLTexture", (void *)2); + capi_IVRCompositor_026_ReleaseSharedGLTexture(1, (void *)2); + check_ptr_parameter("IVRCompositor_026_ReleaseSharedGLTexture", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_ReleaseSharedGLTexture", 1); + check_ptr_parameter("IVRCompositor_026_ReleaseSharedGLTexture", (void *)2); - init_thunk(t, this_ptr_value, IVRCompositor_022_LockGLSharedTextureForAccess, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_LockGLSharedTextureForAccess, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_LockGLSharedTextureForAccess((void *)1); - check_ptr_parameter("IVRCompositor_022_LockGLSharedTextureForAccess", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_LockGLSharedTextureForAccess", (void *)1); + capi_IVRCompositor_026_LockGLSharedTextureForAccess((void *)1); + check_ptr_parameter("IVRCompositor_026_LockGLSharedTextureForAccess", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_LockGLSharedTextureForAccess", (void *)1); - init_thunk(t, this_ptr_value, IVRCompositor_022_UnlockGLSharedTextureForAccess, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_UnlockGLSharedTextureForAccess, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_UnlockGLSharedTextureForAccess((void *)1); - check_ptr_parameter("IVRCompositor_022_UnlockGLSharedTextureForAccess", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_UnlockGLSharedTextureForAccess", (void *)1); + capi_IVRCompositor_026_UnlockGLSharedTextureForAccess((void *)1); + check_ptr_parameter("IVRCompositor_026_UnlockGLSharedTextureForAccess", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_UnlockGLSharedTextureForAccess", (void *)1); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetVulkanInstanceExtensionsRequired, 2, FALSE, FALSE); - uint32_t (__stdcall *capi_IVRCompositor_022_GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetVulkanInstanceExtensionsRequired, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_026_GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetVulkanInstanceExtensionsRequired((void *)1, 2); - check_ptr_parameter("IVRCompositor_022_GetVulkanInstanceExtensionsRequired", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetVulkanInstanceExtensionsRequired", (void *)1); - check_uint32_parameter("IVRCompositor_022_GetVulkanInstanceExtensionsRequired", 2); + capi_IVRCompositor_026_GetVulkanInstanceExtensionsRequired((void *)1, 2); + check_ptr_parameter("IVRCompositor_026_GetVulkanInstanceExtensionsRequired", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetVulkanInstanceExtensionsRequired", (void *)1); + check_uint32_parameter("IVRCompositor_026_GetVulkanInstanceExtensionsRequired", 2); - init_thunk(t, this_ptr_value, IVRCompositor_022_GetVulkanDeviceExtensionsRequired, 3, FALSE, FALSE); - uint32_t (__stdcall *capi_IVRCompositor_022_GetVulkanDeviceExtensionsRequired)(VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_GetVulkanDeviceExtensionsRequired, 3, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_026_GetVulkanDeviceExtensionsRequired)(VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_GetVulkanDeviceExtensionsRequired((void *)1, (void *)2, 3); - check_ptr_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", this_ptr_value); - check_ptr_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", (void *)1); - check_ptr_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", (void *)2); - check_uint32_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", 3); + capi_IVRCompositor_026_GetVulkanDeviceExtensionsRequired((void *)1, (void *)2, 3); + check_ptr_parameter("IVRCompositor_026_GetVulkanDeviceExtensionsRequired", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetVulkanDeviceExtensionsRequired", (void *)1); + check_ptr_parameter("IVRCompositor_026_GetVulkanDeviceExtensionsRequired", (void *)2); + check_uint32_parameter("IVRCompositor_026_GetVulkanDeviceExtensionsRequired", 3); - init_thunk(t, this_ptr_value, IVRCompositor_022_SetExplicitTimingMode, 1, FALSE, FALSE); - void (__stdcall *capi_IVRCompositor_022_SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode) = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_SetExplicitTimingMode, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode) = (void *)t; clear_parameters(); - capi_IVRCompositor_022_SetExplicitTimingMode(1); - check_ptr_parameter("IVRCompositor_022_SetExplicitTimingMode", this_ptr_value); - check_uint32_parameter("IVRCompositor_022_SetExplicitTimingMode", 1); + capi_IVRCompositor_026_SetExplicitTimingMode(1); + check_ptr_parameter("IVRCompositor_026_SetExplicitTimingMode", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_SetExplicitTimingMode", 1); - init_thunk(t, this_ptr_value, IVRCompositor_022_SubmitExplicitTimingData, 0, FALSE, FALSE); - EVRCompositorError (__stdcall *capi_IVRCompositor_022_SubmitExplicitTimingData)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_SubmitExplicitTimingData, 0, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_SubmitExplicitTimingData)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_SubmitExplicitTimingData(); - check_ptr_parameter("IVRCompositor_022_SubmitExplicitTimingData", this_ptr_value); + capi_IVRCompositor_026_SubmitExplicitTimingData(); + check_ptr_parameter("IVRCompositor_026_SubmitExplicitTimingData", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_IsMotionSmoothingEnabled, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_IsMotionSmoothingEnabled)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_IsMotionSmoothingEnabled, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_IsMotionSmoothingEnabled)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_IsMotionSmoothingEnabled(); - check_ptr_parameter("IVRCompositor_022_IsMotionSmoothingEnabled", this_ptr_value); + capi_IVRCompositor_026_IsMotionSmoothingEnabled(); + check_ptr_parameter("IVRCompositor_026_IsMotionSmoothingEnabled", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_IsMotionSmoothingSupported, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_IsMotionSmoothingSupported)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_IsMotionSmoothingSupported, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_IsMotionSmoothingSupported)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_IsMotionSmoothingSupported(); - check_ptr_parameter("IVRCompositor_022_IsMotionSmoothingSupported", this_ptr_value); + capi_IVRCompositor_026_IsMotionSmoothingSupported(); + check_ptr_parameter("IVRCompositor_026_IsMotionSmoothingSupported", this_ptr_value); - init_thunk(t, this_ptr_value, IVRCompositor_022_IsCurrentSceneFocusAppLoading, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRCompositor_022_IsCurrentSceneFocusAppLoading)() = (void *)t; + init_thunk(t, this_ptr_value, IVRCompositor_026_IsCurrentSceneFocusAppLoading, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_IsCurrentSceneFocusAppLoading)() = (void *)t; clear_parameters(); - capi_IVRCompositor_022_IsCurrentSceneFocusAppLoading(); - check_ptr_parameter("IVRCompositor_022_IsCurrentSceneFocusAppLoading", this_ptr_value); + capi_IVRCompositor_026_IsCurrentSceneFocusAppLoading(); + check_ptr_parameter("IVRCompositor_026_IsCurrentSceneFocusAppLoading", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_026_SetStageOverride_Async, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_SetStageOverride_Async)(const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_026_SetStageOverride_Async((void *)1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_026_SetStageOverride_Async", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_SetStageOverride_Async", (void *)1); + check_ptr_parameter("IVRCompositor_026_SetStageOverride_Async", (void *)2); + check_ptr_parameter("IVRCompositor_026_SetStageOverride_Async", (void *)3); + check_uint32_parameter("IVRCompositor_026_SetStageOverride_Async", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_026_ClearStageOverride, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_026_ClearStageOverride)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_026_ClearStageOverride(); + check_ptr_parameter("IVRCompositor_026_ClearStageOverride", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_026_GetCompositorBenchmarkResults, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_026_GetCompositorBenchmarkResults)(Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_026_GetCompositorBenchmarkResults((void *)1, 2); + check_ptr_parameter("IVRCompositor_026_GetCompositorBenchmarkResults", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetCompositorBenchmarkResults", (void *)1); + check_uint32_parameter("IVRCompositor_026_GetCompositorBenchmarkResults", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_026_GetLastPosePredictionIDs, 2, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_GetLastPosePredictionIDs)(uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_026_GetLastPosePredictionIDs((void *)1, (void *)2); + check_ptr_parameter("IVRCompositor_026_GetLastPosePredictionIDs", this_ptr_value); + check_ptr_parameter("IVRCompositor_026_GetLastPosePredictionIDs", (void *)1); + check_ptr_parameter("IVRCompositor_026_GetLastPosePredictionIDs", (void *)2); + + init_thunk(t, this_ptr_value, IVRCompositor_026_GetPosesForFrame, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_026_GetPosesForFrame)(uint32_t unPosePredictionID, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_026_GetPosesForFrame(1, (void *)2, 3); + check_ptr_parameter("IVRCompositor_026_GetPosesForFrame", this_ptr_value); + check_uint32_parameter("IVRCompositor_026_GetPosesForFrame", 1); + check_ptr_parameter("IVRCompositor_026_GetPosesForFrame", (void *)2); + check_uint32_parameter("IVRCompositor_026_GetPosesForFrame", 3); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVRHeadsetView_001(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_SetHeadsetViewSize, 2, FALSE, FALSE); + void (__stdcall *capi_IVRHeadsetView_001_SetHeadsetViewSize)(uint32_t nWidth, uint32_t nHeight) = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_SetHeadsetViewSize(1, 2); + check_ptr_parameter("IVRHeadsetView_001_SetHeadsetViewSize", this_ptr_value); + check_uint32_parameter("IVRHeadsetView_001_SetHeadsetViewSize", 1); + check_uint32_parameter("IVRHeadsetView_001_SetHeadsetViewSize", 2); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_GetHeadsetViewSize, 2, FALSE, FALSE); + void (__stdcall *capi_IVRHeadsetView_001_GetHeadsetViewSize)(uint32_t * pnWidth, uint32_t * pnHeight) = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_GetHeadsetViewSize((void *)1, (void *)2); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewSize", this_ptr_value); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewSize", (void *)1); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewSize", (void *)2); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_SetHeadsetViewMode, 1, FALSE, FALSE); + void (__stdcall *capi_IVRHeadsetView_001_SetHeadsetViewMode)(HeadsetViewMode_t eHeadsetViewMode) = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_SetHeadsetViewMode(1); + check_ptr_parameter("IVRHeadsetView_001_SetHeadsetViewMode", this_ptr_value); + check_uint32_parameter("IVRHeadsetView_001_SetHeadsetViewMode", 1); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_GetHeadsetViewMode, 0, FALSE, FALSE); + HeadsetViewMode_t (__stdcall *capi_IVRHeadsetView_001_GetHeadsetViewMode)() = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_GetHeadsetViewMode(); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewMode", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_SetHeadsetViewCropped, 1, FALSE, FALSE); + void (__stdcall *capi_IVRHeadsetView_001_SetHeadsetViewCropped)(bool bCropped) = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_SetHeadsetViewCropped(1); + check_ptr_parameter("IVRHeadsetView_001_SetHeadsetViewCropped", this_ptr_value); + check_bool_parameter("IVRHeadsetView_001_SetHeadsetViewCropped", 1); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_GetHeadsetViewCropped, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRHeadsetView_001_GetHeadsetViewCropped)() = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_GetHeadsetViewCropped(); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewCropped", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_GetHeadsetViewAspectRatio, 0, FALSE, FALSE); + float (__stdcall *capi_IVRHeadsetView_001_GetHeadsetViewAspectRatio)() = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_GetHeadsetViewAspectRatio(); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewAspectRatio", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_SetHeadsetViewBlendRange, 2, TRUE, FALSE); + void (__stdcall *capi_IVRHeadsetView_001_SetHeadsetViewBlendRange)(float flStartPct, float flEndPct) = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_SetHeadsetViewBlendRange(1.0f, 2.0f); + check_ptr_parameter("IVRHeadsetView_001_SetHeadsetViewBlendRange", this_ptr_value); + check_float_parameter("IVRHeadsetView_001_SetHeadsetViewBlendRange", 1.0f); + check_float_parameter("IVRHeadsetView_001_SetHeadsetViewBlendRange", 2.0f); + + init_thunk(t, this_ptr_value, IVRHeadsetView_001_GetHeadsetViewBlendRange, 2, FALSE, FALSE); + void (__stdcall *capi_IVRHeadsetView_001_GetHeadsetViewBlendRange)(float * pStartPct, float * pEndPct) = (void *)t; + + clear_parameters(); + capi_IVRHeadsetView_001_GetHeadsetViewBlendRange((void *)1, (void *)2); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewBlendRange", this_ptr_value); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewBlendRange", (void *)1); + check_ptr_parameter("IVRHeadsetView_001_GetHeadsetViewBlendRange", (void *)2); VirtualFree(t, 0, MEM_RELEASE); } @@ -1484,740 +1600,793 @@ void test_capi_thunks_IVRNotifications_002(void) VirtualFree(t, 0, MEM_RELEASE); } -void test_capi_thunks_IVROverlay_021(void) +void test_capi_thunks_IVROverlay_024(void) { struct thunk *t = alloc_thunks(1); - init_thunk(t, this_ptr_value, IVROverlay_021_FindOverlay, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_FindOverlay)(const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_FindOverlay, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_FindOverlay)(const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_FindOverlay((void *)1, (void *)2); - check_ptr_parameter("IVROverlay_021_FindOverlay", this_ptr_value); - check_ptr_parameter("IVROverlay_021_FindOverlay", (void *)1); - check_ptr_parameter("IVROverlay_021_FindOverlay", (void *)2); + capi_IVROverlay_024_FindOverlay((void *)1, (void *)2); + check_ptr_parameter("IVROverlay_024_FindOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_024_FindOverlay", (void *)1); + check_ptr_parameter("IVROverlay_024_FindOverlay", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_CreateOverlay, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_CreateOverlay)(const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_CreateOverlay, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_CreateOverlay)(const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_CreateOverlay((void *)1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_CreateOverlay", this_ptr_value); - check_ptr_parameter("IVROverlay_021_CreateOverlay", (void *)1); - check_ptr_parameter("IVROverlay_021_CreateOverlay", (void *)2); - check_ptr_parameter("IVROverlay_021_CreateOverlay", (void *)3); + capi_IVROverlay_024_CreateOverlay((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_024_CreateOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_024_CreateOverlay", (void *)1); + check_ptr_parameter("IVROverlay_024_CreateOverlay", (void *)2); + check_ptr_parameter("IVROverlay_024_CreateOverlay", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_DestroyOverlay, 1, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_DestroyOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_DestroyOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_DestroyOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_DestroyOverlay(1); - check_ptr_parameter("IVROverlay_021_DestroyOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_DestroyOverlay", 1); + capi_IVROverlay_024_DestroyOverlay(1); + check_ptr_parameter("IVROverlay_024_DestroyOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_DestroyOverlay", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayKey, 4, FALSE, FALSE); - uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayKey, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_024_GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayKey(1, (void *)2, 3, (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayKey", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayKey", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayKey", (void *)2); - check_uint32_parameter("IVROverlay_021_GetOverlayKey", 3); - check_ptr_parameter("IVROverlay_021_GetOverlayKey", (void *)4); + capi_IVROverlay_024_GetOverlayKey(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVROverlay_024_GetOverlayKey", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayKey", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayKey", (void *)2); + check_uint32_parameter("IVROverlay_024_GetOverlayKey", 3); + check_ptr_parameter("IVROverlay_024_GetOverlayKey", (void *)4); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayName, 4, FALSE, FALSE); - uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayName, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_024_GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayName(1, (void *)2, 3, (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayName", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayName", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayName", (void *)2); - check_uint32_parameter("IVROverlay_021_GetOverlayName", 3); - check_ptr_parameter("IVROverlay_021_GetOverlayName", (void *)4); + capi_IVROverlay_024_GetOverlayName(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVROverlay_024_GetOverlayName", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayName", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayName", (void *)2); + check_uint32_parameter("IVROverlay_024_GetOverlayName", 3); + check_ptr_parameter("IVROverlay_024_GetOverlayName", (void *)4); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayName, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayName)(VROverlayHandle_t ulOverlayHandle, const char * pchName) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayName, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayName)(VROverlayHandle_t ulOverlayHandle, const char * pchName) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayName(1, (void *)2); - check_ptr_parameter("IVROverlay_021_SetOverlayName", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayName", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayName", (void *)2); + capi_IVROverlay_024_SetOverlayName(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayName", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayName", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayName", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayImageData, 5, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayImageData, 5, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayImageData(1, (void *)2, 3, (void *)4, (void *)5); - check_ptr_parameter("IVROverlay_021_GetOverlayImageData", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayImageData", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayImageData", (void *)2); - check_uint32_parameter("IVROverlay_021_GetOverlayImageData", 3); - check_ptr_parameter("IVROverlay_021_GetOverlayImageData", (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayImageData", (void *)5); + capi_IVROverlay_024_GetOverlayImageData(1, (void *)2, 3, (void *)4, (void *)5); + check_ptr_parameter("IVROverlay_024_GetOverlayImageData", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayImageData", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayImageData", (void *)2); + check_uint32_parameter("IVROverlay_024_GetOverlayImageData", 3); + check_ptr_parameter("IVROverlay_024_GetOverlayImageData", (void *)4); + check_ptr_parameter("IVROverlay_024_GetOverlayImageData", (void *)5); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayErrorNameFromEnum, 1, FALSE, FALSE); - const char * (__stdcall *capi_IVROverlay_021_GetOverlayErrorNameFromEnum)(EVROverlayError error) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayErrorNameFromEnum, 1, FALSE, FALSE); + const char * (__stdcall *capi_IVROverlay_024_GetOverlayErrorNameFromEnum)(EVROverlayError error) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayErrorNameFromEnum(1); - check_ptr_parameter("IVROverlay_021_GetOverlayErrorNameFromEnum", this_ptr_value); - check_uint32_parameter("IVROverlay_021_GetOverlayErrorNameFromEnum", 1); + capi_IVROverlay_024_GetOverlayErrorNameFromEnum(1); + check_ptr_parameter("IVROverlay_024_GetOverlayErrorNameFromEnum", this_ptr_value); + check_uint32_parameter("IVROverlay_024_GetOverlayErrorNameFromEnum", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayRenderingPid, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayRenderingPid, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayRenderingPid(1, 2); - check_ptr_parameter("IVROverlay_021_SetOverlayRenderingPid", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayRenderingPid", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayRenderingPid", 2); + capi_IVROverlay_024_SetOverlayRenderingPid(1, 2); + check_ptr_parameter("IVROverlay_024_SetOverlayRenderingPid", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayRenderingPid", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayRenderingPid", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayRenderingPid, 1, FALSE, FALSE); - uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayRenderingPid, 1, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_024_GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayRenderingPid(1); - check_ptr_parameter("IVROverlay_021_GetOverlayRenderingPid", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayRenderingPid", 1); + capi_IVROverlay_024_GetOverlayRenderingPid(1); + check_ptr_parameter("IVROverlay_024_GetOverlayRenderingPid", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayRenderingPid", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayFlag, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayFlag, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayFlag(1, 2, 1); - check_ptr_parameter("IVROverlay_021_SetOverlayFlag", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayFlag", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayFlag", 2); - check_bool_parameter("IVROverlay_021_SetOverlayFlag", 1); + capi_IVROverlay_024_SetOverlayFlag(1, 2, 1); + check_ptr_parameter("IVROverlay_024_SetOverlayFlag", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayFlag", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayFlag", 2); + check_bool_parameter("IVROverlay_024_SetOverlayFlag", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayFlag, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayFlag, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayFlag(1, 2, (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayFlag", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayFlag", 1); - check_uint32_parameter("IVROverlay_021_GetOverlayFlag", 2); - check_ptr_parameter("IVROverlay_021_GetOverlayFlag", (void *)3); + capi_IVROverlay_024_GetOverlayFlag(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayFlag", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayFlag", 1); + check_uint32_parameter("IVROverlay_024_GetOverlayFlag", 2); + check_ptr_parameter("IVROverlay_024_GetOverlayFlag", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayColor, 4, TRUE, TRUE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayFlags, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayColor(1, 2.0f, 3.0f, 4.0f); - check_ptr_parameter("IVROverlay_021_SetOverlayColor", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayColor", 1); - check_float_parameter("IVROverlay_021_SetOverlayColor", 2.0f); - check_float_parameter("IVROverlay_021_SetOverlayColor", 3.0f); - check_float_parameter("IVROverlay_021_SetOverlayColor", 4.0f); + capi_IVROverlay_024_GetOverlayFlags(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayFlags", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayFlags", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayFlags", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayColor, 4, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayColor, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayColor(1, (void *)2, (void *)3, (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayColor", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayColor", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayColor", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayColor", (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayColor", (void *)4); + capi_IVROverlay_024_SetOverlayColor(1, 2.0f, 3.0f, 4.0f); + check_ptr_parameter("IVROverlay_024_SetOverlayColor", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayColor", 1); + check_float_parameter("IVROverlay_024_SetOverlayColor", 2.0f); + check_float_parameter("IVROverlay_024_SetOverlayColor", 3.0f); + check_float_parameter("IVROverlay_024_SetOverlayColor", 4.0f); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayAlpha, 2, TRUE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayColor, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayAlpha(1, 2.0f); - check_ptr_parameter("IVROverlay_021_SetOverlayAlpha", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayAlpha", 1); - check_float_parameter("IVROverlay_021_SetOverlayAlpha", 2.0f); + capi_IVROverlay_024_GetOverlayColor(1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_024_GetOverlayColor", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayColor", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayColor", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayColor", (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayColor", (void *)4); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayAlpha, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayAlpha, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayAlpha(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayAlpha", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayAlpha", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayAlpha", (void *)2); + capi_IVROverlay_024_SetOverlayAlpha(1, 2.0f); + check_ptr_parameter("IVROverlay_024_SetOverlayAlpha", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayAlpha", 1); + check_float_parameter("IVROverlay_024_SetOverlayAlpha", 2.0f); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTexelAspect, 2, TRUE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayAlpha, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTexelAspect(1, 2.0f); - check_ptr_parameter("IVROverlay_021_SetOverlayTexelAspect", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTexelAspect", 1); - check_float_parameter("IVROverlay_021_SetOverlayTexelAspect", 2.0f); + capi_IVROverlay_024_GetOverlayAlpha(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayAlpha", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayAlpha", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayAlpha", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTexelAspect, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTexelAspect, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTexelAspect(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTexelAspect", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTexelAspect", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTexelAspect", (void *)2); + capi_IVROverlay_024_SetOverlayTexelAspect(1, 2.0f); + check_ptr_parameter("IVROverlay_024_SetOverlayTexelAspect", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTexelAspect", 1); + check_float_parameter("IVROverlay_024_SetOverlayTexelAspect", 2.0f); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlaySortOrder, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTexelAspect, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlaySortOrder(1, 2); - check_ptr_parameter("IVROverlay_021_SetOverlaySortOrder", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlaySortOrder", 1); - check_uint32_parameter("IVROverlay_021_SetOverlaySortOrder", 2); + capi_IVROverlay_024_GetOverlayTexelAspect(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTexelAspect", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTexelAspect", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTexelAspect", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlaySortOrder, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlaySortOrder, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlaySortOrder(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlaySortOrder", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlaySortOrder", 1); - check_ptr_parameter("IVROverlay_021_GetOverlaySortOrder", (void *)2); + capi_IVROverlay_024_SetOverlaySortOrder(1, 2); + check_ptr_parameter("IVROverlay_024_SetOverlaySortOrder", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlaySortOrder", 1); + check_uint32_parameter("IVROverlay_024_SetOverlaySortOrder", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayWidthInMeters, 2, TRUE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlaySortOrder, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayWidthInMeters(1, 2.0f); - check_ptr_parameter("IVROverlay_021_SetOverlayWidthInMeters", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayWidthInMeters", 1); - check_float_parameter("IVROverlay_021_SetOverlayWidthInMeters", 2.0f); + capi_IVROverlay_024_GetOverlaySortOrder(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlaySortOrder", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlaySortOrder", 1); + check_ptr_parameter("IVROverlay_024_GetOverlaySortOrder", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayWidthInMeters, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayWidthInMeters, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayWidthInMeters(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayWidthInMeters", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayWidthInMeters", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayWidthInMeters", (void *)2); + capi_IVROverlay_024_SetOverlayWidthInMeters(1, 2.0f); + check_ptr_parameter("IVROverlay_024_SetOverlayWidthInMeters", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayWidthInMeters", 1); + check_float_parameter("IVROverlay_024_SetOverlayWidthInMeters", 2.0f); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayCurvature, 2, TRUE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float fCurvature) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayWidthInMeters, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayCurvature(1, 2.0f); - check_ptr_parameter("IVROverlay_021_SetOverlayCurvature", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayCurvature", 1); - check_float_parameter("IVROverlay_021_SetOverlayCurvature", 2.0f); + capi_IVROverlay_024_GetOverlayWidthInMeters(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayWidthInMeters", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayWidthInMeters", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayWidthInMeters", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayCurvature, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float * pfCurvature) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayCurvature, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float fCurvature) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayCurvature(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayCurvature", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayCurvature", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayCurvature", (void *)2); + capi_IVROverlay_024_SetOverlayCurvature(1, 2.0f); + check_ptr_parameter("IVROverlay_024_SetOverlayCurvature", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayCurvature", 1); + check_float_parameter("IVROverlay_024_SetOverlayCurvature", 2.0f); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTextureColorSpace, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayCurvature, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float * pfCurvature) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTextureColorSpace(1, 2); - check_ptr_parameter("IVROverlay_021_SetOverlayTextureColorSpace", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTextureColorSpace", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayTextureColorSpace", 2); + capi_IVROverlay_024_GetOverlayCurvature(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayCurvature", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayCurvature", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayCurvature", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTextureColorSpace, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTextureColorSpace, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTextureColorSpace(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureColorSpace", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTextureColorSpace", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureColorSpace", (void *)2); + capi_IVROverlay_024_SetOverlayTextureColorSpace(1, 2); + check_ptr_parameter("IVROverlay_024_SetOverlayTextureColorSpace", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTextureColorSpace", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayTextureColorSpace", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTextureBounds, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTextureColorSpace, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTextureBounds(1, (void *)2); - check_ptr_parameter("IVROverlay_021_SetOverlayTextureBounds", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTextureBounds", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayTextureBounds", (void *)2); + capi_IVROverlay_024_GetOverlayTextureColorSpace(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureColorSpace", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTextureColorSpace", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureColorSpace", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTextureBounds, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTextureBounds, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTextureBounds(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureBounds", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTextureBounds", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureBounds", (void *)2); + capi_IVROverlay_024_SetOverlayTextureBounds(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayTextureBounds", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTextureBounds", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayTextureBounds", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayRenderModel, 5, FALSE, FALSE); - uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTextureBounds, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayRenderModel(1, (void *)2, 3, (void *)4, (void *)5); - check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayRenderModel", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", (void *)2); - check_uint32_parameter("IVROverlay_021_GetOverlayRenderModel", 3); - check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", (void *)5); + capi_IVROverlay_024_GetOverlayTextureBounds(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureBounds", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTextureBounds", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureBounds", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayRenderModel, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTransformType, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayRenderModel(1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_SetOverlayRenderModel", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayRenderModel", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayRenderModel", (void *)2); - check_ptr_parameter("IVROverlay_021_SetOverlayRenderModel", (void *)3); + capi_IVROverlay_024_GetOverlayTransformType(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformType", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTransformType", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformType", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformType, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTransformAbsolute, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTransformType(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformType", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTransformType", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformType", (void *)2); + capi_IVROverlay_024_SetOverlayTransformAbsolute(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformAbsolute", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTransformAbsolute", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayTransformAbsolute", 2); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformAbsolute", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformAbsolute, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTransformAbsolute, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTransformAbsolute(1, 2, (void *)3); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformAbsolute", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTransformAbsolute", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayTransformAbsolute", 2); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformAbsolute", (void *)3); + capi_IVROverlay_024_GetOverlayTransformAbsolute(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformAbsolute", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTransformAbsolute", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformAbsolute", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformAbsolute", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformAbsolute, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTransformAbsolute(1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformAbsolute", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTransformAbsolute", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformAbsolute", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformAbsolute", (void *)3); + capi_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceRelative", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceRelative", 2); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceRelative", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTransformTrackedDeviceRelative(1, 2, (void *)3); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", 2); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", (void *)3); + capi_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceRelative", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceRelative", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceRelative", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTransformTrackedDeviceComponent, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTransformTrackedDeviceRelative(1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", (void *)3); + capi_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceComponent", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceComponent", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceComponent", 2); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformTrackedDeviceComponent", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformTrackedDeviceComponent, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTransformTrackedDeviceComponent, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTransformTrackedDeviceComponent(1, 2, (void *)3); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", 2); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", (void *)3); + capi_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceComponent", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceComponent", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceComponent", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceComponent", (void *)3); + check_uint32_parameter("IVROverlay_024_GetOverlayTransformTrackedDeviceComponent", 4); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformTrackedDeviceComponent, 4, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTransformTrackedDeviceComponent(1, (void *)2, (void *)3, 4); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", (void *)3); - check_uint32_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", 4); + capi_IVROverlay_024_GetOverlayTransformOverlayRelative(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformOverlayRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTransformOverlayRelative", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformOverlayRelative", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformOverlayRelative", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformOverlayRelative, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTransformOverlayRelative(1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", (void *)3); + capi_IVROverlay_024_SetOverlayTransformOverlayRelative(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformOverlayRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTransformOverlayRelative", 1); + check_uint64_parameter("IVROverlay_024_SetOverlayTransformOverlayRelative", 2); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformOverlayRelative", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformOverlayRelative, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTransformCursor, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTransformOverlayRelative(1, 2, (void *)3); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", 1); - check_uint64_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", 2); - check_ptr_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", (void *)3); + capi_IVROverlay_024_SetOverlayTransformCursor(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformCursor", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTransformCursor", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayTransformCursor", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_ShowOverlay, 1, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_ShowOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTransformCursor, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ShowOverlay(1); - check_ptr_parameter("IVROverlay_021_ShowOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_ShowOverlay", 1); + capi_IVROverlay_024_GetOverlayTransformCursor(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformCursor", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTransformCursor", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTransformCursor", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_HideOverlay, 1, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_HideOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ShowOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_ShowOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_HideOverlay(1); - check_ptr_parameter("IVROverlay_021_HideOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_HideOverlay", 1); + capi_IVROverlay_024_ShowOverlay(1); + check_ptr_parameter("IVROverlay_024_ShowOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_ShowOverlay", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_IsOverlayVisible, 1, FALSE, FALSE); - bool (__stdcall *capi_IVROverlay_021_IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_HideOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_HideOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_IsOverlayVisible(1); - check_ptr_parameter("IVROverlay_021_IsOverlayVisible", this_ptr_value); - check_uint64_parameter("IVROverlay_021_IsOverlayVisible", 1); + capi_IVROverlay_024_HideOverlay(1); + check_ptr_parameter("IVROverlay_024_HideOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_HideOverlay", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_GetTransformForOverlayCoordinates, 4, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_IsOverlayVisible, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_024_IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetTransformForOverlayCoordinates(1, 2, DEFAULT_VECTOR2, (void *)4); - check_ptr_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", 1); - check_uint32_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", 2); - check_HmdVector2_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", DEFAULT_VECTOR2); - check_ptr_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", (void *)4); + capi_IVROverlay_024_IsOverlayVisible(1); + check_ptr_parameter("IVROverlay_024_IsOverlayVisible", this_ptr_value); + check_uint64_parameter("IVROverlay_024_IsOverlayVisible", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_PollNextOverlayEvent, 3, FALSE, FALSE); - bool (__stdcall *capi_IVROverlay_021_PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetTransformForOverlayCoordinates, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_PollNextOverlayEvent(1, (void *)2, 3); - check_ptr_parameter("IVROverlay_021_PollNextOverlayEvent", this_ptr_value); - check_uint64_parameter("IVROverlay_021_PollNextOverlayEvent", 1); - check_ptr_parameter("IVROverlay_021_PollNextOverlayEvent", (void *)2); - check_uint32_parameter("IVROverlay_021_PollNextOverlayEvent", 3); + capi_IVROverlay_024_GetTransformForOverlayCoordinates(1, 2, DEFAULT_VECTOR2, (void *)4); + check_ptr_parameter("IVROverlay_024_GetTransformForOverlayCoordinates", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetTransformForOverlayCoordinates", 1); + check_uint32_parameter("IVROverlay_024_GetTransformForOverlayCoordinates", 2); + check_HmdVector2_parameter("IVROverlay_024_GetTransformForOverlayCoordinates", DEFAULT_VECTOR2); + check_ptr_parameter("IVROverlay_024_GetTransformForOverlayCoordinates", (void *)4); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayInputMethod, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_PollNextOverlayEvent, 3, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_024_PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayInputMethod(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayInputMethod", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayInputMethod", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayInputMethod", (void *)2); + capi_IVROverlay_024_PollNextOverlayEvent(1, (void *)2, 3); + check_ptr_parameter("IVROverlay_024_PollNextOverlayEvent", this_ptr_value); + check_uint64_parameter("IVROverlay_024_PollNextOverlayEvent", 1); + check_ptr_parameter("IVROverlay_024_PollNextOverlayEvent", (void *)2); + check_uint32_parameter("IVROverlay_024_PollNextOverlayEvent", 3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayInputMethod, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayInputMethod, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayInputMethod(1, 2); - check_ptr_parameter("IVROverlay_021_SetOverlayInputMethod", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayInputMethod", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayInputMethod", 2); + capi_IVROverlay_024_GetOverlayInputMethod(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayInputMethod", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayInputMethod", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayInputMethod", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayMouseScale, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayInputMethod, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayMouseScale(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayMouseScale", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayMouseScale", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayMouseScale", (void *)2); + capi_IVROverlay_024_SetOverlayInputMethod(1, 2); + check_ptr_parameter("IVROverlay_024_SetOverlayInputMethod", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayInputMethod", 1); + check_uint32_parameter("IVROverlay_024_SetOverlayInputMethod", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayMouseScale, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayMouseScale, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayMouseScale(1, (void *)2); - check_ptr_parameter("IVROverlay_021_SetOverlayMouseScale", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayMouseScale", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayMouseScale", (void *)2); + capi_IVROverlay_024_GetOverlayMouseScale(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayMouseScale", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayMouseScale", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayMouseScale", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_ComputeOverlayIntersection, 3, FALSE, FALSE); - bool (__stdcall *capi_IVROverlay_021_ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayMouseScale, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ComputeOverlayIntersection(1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_ComputeOverlayIntersection", this_ptr_value); - check_uint64_parameter("IVROverlay_021_ComputeOverlayIntersection", 1); - check_ptr_parameter("IVROverlay_021_ComputeOverlayIntersection", (void *)2); - check_ptr_parameter("IVROverlay_021_ComputeOverlayIntersection", (void *)3); + capi_IVROverlay_024_SetOverlayMouseScale(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayMouseScale", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayMouseScale", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayMouseScale", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_IsHoverTargetOverlay, 1, FALSE, FALSE); - bool (__stdcall *capi_IVROverlay_021_IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ComputeOverlayIntersection, 3, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_024_ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) = (void *)t; clear_parameters(); - capi_IVROverlay_021_IsHoverTargetOverlay(1); - check_ptr_parameter("IVROverlay_021_IsHoverTargetOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_IsHoverTargetOverlay", 1); + capi_IVROverlay_024_ComputeOverlayIntersection(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_024_ComputeOverlayIntersection", this_ptr_value); + check_uint64_parameter("IVROverlay_024_ComputeOverlayIntersection", 1); + check_ptr_parameter("IVROverlay_024_ComputeOverlayIntersection", (void *)2); + check_ptr_parameter("IVROverlay_024_ComputeOverlayIntersection", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayDualAnalogTransform, 4, TRUE, TRUE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_IsHoverTargetOverlay, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_024_IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayDualAnalogTransform(1, 2, (void *)3, 4.0f); - check_ptr_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", 1); - check_uint32_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", 2); - check_ptr_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", (void *)3); - check_float_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", 4.0f); + capi_IVROverlay_024_IsHoverTargetOverlay(1); + check_ptr_parameter("IVROverlay_024_IsHoverTargetOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_IsHoverTargetOverlay", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayDualAnalogTransform, 4, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayIntersectionMask, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayDualAnalogTransform(1, 2, (void *)3, (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", 1); - check_uint32_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", 2); - check_ptr_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", (void *)4); + capi_IVROverlay_024_SetOverlayIntersectionMask(1, (void *)2, 3, 4); + check_ptr_parameter("IVROverlay_024_SetOverlayIntersectionMask", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayIntersectionMask", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayIntersectionMask", (void *)2); + check_uint32_parameter("IVROverlay_024_SetOverlayIntersectionMask", 3); + check_uint32_parameter("IVROverlay_024_SetOverlayIntersectionMask", 4); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTexture, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_TriggerLaserMouseHapticVibration, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_024_TriggerLaserMouseHapticVibration)(VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayTexture(1, (void *)2); - check_ptr_parameter("IVROverlay_021_SetOverlayTexture", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayTexture", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayTexture", (void *)2); + capi_IVROverlay_024_TriggerLaserMouseHapticVibration(1, 2.0f, 3.0f, 4.0f); + check_ptr_parameter("IVROverlay_024_TriggerLaserMouseHapticVibration", this_ptr_value); + check_uint64_parameter("IVROverlay_024_TriggerLaserMouseHapticVibration", 1); + check_float_parameter("IVROverlay_024_TriggerLaserMouseHapticVibration", 2.0f); + check_float_parameter("IVROverlay_024_TriggerLaserMouseHapticVibration", 3.0f); + check_float_parameter("IVROverlay_024_TriggerLaserMouseHapticVibration", 4.0f); - init_thunk(t, this_ptr_value, IVROverlay_021_ClearOverlayTexture, 1, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayCursor, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayCursor)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ClearOverlayTexture(1); - check_ptr_parameter("IVROverlay_021_ClearOverlayTexture", this_ptr_value); - check_uint64_parameter("IVROverlay_021_ClearOverlayTexture", 1); + capi_IVROverlay_024_SetOverlayCursor(1, 2); + check_ptr_parameter("IVROverlay_024_SetOverlayCursor", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayCursor", 1); + check_uint64_parameter("IVROverlay_024_SetOverlayCursor", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayRaw, 5, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayCursorPositionOverride, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayRaw(1, (void *)2, 3, 4, 5); - check_ptr_parameter("IVROverlay_021_SetOverlayRaw", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayRaw", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayRaw", (void *)2); - check_uint32_parameter("IVROverlay_021_SetOverlayRaw", 3); - check_uint32_parameter("IVROverlay_021_SetOverlayRaw", 4); - check_uint32_parameter("IVROverlay_021_SetOverlayRaw", 5); + capi_IVROverlay_024_SetOverlayCursorPositionOverride(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayCursorPositionOverride", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayCursorPositionOverride", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayCursorPositionOverride", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayFromFile, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ClearOverlayCursorPositionOverride, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_ClearOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayFromFile(1, (void *)2); - check_ptr_parameter("IVROverlay_021_SetOverlayFromFile", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayFromFile", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayFromFile", (void *)2); + capi_IVROverlay_024_ClearOverlayCursorPositionOverride(1); + check_ptr_parameter("IVROverlay_024_ClearOverlayCursorPositionOverride", this_ptr_value); + check_uint64_parameter("IVROverlay_024_ClearOverlayCursorPositionOverride", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTexture, 9, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayTexture, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTexture(1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6, (void *)7, (void *)8, (void *)9); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTexture", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)4); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)5); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)6); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)7); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)8); - check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)9); + capi_IVROverlay_024_SetOverlayTexture(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayTexture", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayTexture", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_ReleaseNativeOverlayHandle, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ClearOverlayTexture, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ReleaseNativeOverlayHandle(1, (void *)2); - check_ptr_parameter("IVROverlay_021_ReleaseNativeOverlayHandle", this_ptr_value); - check_uint64_parameter("IVROverlay_021_ReleaseNativeOverlayHandle", 1); - check_ptr_parameter("IVROverlay_021_ReleaseNativeOverlayHandle", (void *)2); + capi_IVROverlay_024_ClearOverlayTexture(1); + check_ptr_parameter("IVROverlay_024_ClearOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_024_ClearOverlayTexture", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTextureSize, 3, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayRaw, 5, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayTextureSize(1, (void *)2, (void *)3); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureSize", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayTextureSize", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureSize", (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayTextureSize", (void *)3); + capi_IVROverlay_024_SetOverlayRaw(1, (void *)2, 3, 4, 5); + check_ptr_parameter("IVROverlay_024_SetOverlayRaw", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayRaw", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayRaw", (void *)2); + check_uint32_parameter("IVROverlay_024_SetOverlayRaw", 3); + check_uint32_parameter("IVROverlay_024_SetOverlayRaw", 4); + check_uint32_parameter("IVROverlay_024_SetOverlayRaw", 5); - init_thunk(t, this_ptr_value, IVROverlay_021_CreateDashboardOverlay, 4, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_CreateDashboardOverlay)(const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetOverlayFromFile, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) = (void *)t; clear_parameters(); - capi_IVROverlay_021_CreateDashboardOverlay((void *)1, (void *)2, (void *)3, (void *)4); - check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", this_ptr_value); - check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)1); - check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)2); - check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)3); - check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)4); + capi_IVROverlay_024_SetOverlayFromFile(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetOverlayFromFile", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetOverlayFromFile", 1); + check_ptr_parameter("IVROverlay_024_SetOverlayFromFile", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_IsDashboardVisible, 0, FALSE, FALSE); - bool (__stdcall *capi_IVROverlay_021_IsDashboardVisible)() = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTexture, 9, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) = (void *)t; clear_parameters(); - capi_IVROverlay_021_IsDashboardVisible(); - check_ptr_parameter("IVROverlay_021_IsDashboardVisible", this_ptr_value); + capi_IVROverlay_024_GetOverlayTexture(1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6, (void *)7, (void *)8, (void *)9); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTexture", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)4); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)5); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)6); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)7); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)8); + check_ptr_parameter("IVROverlay_024_GetOverlayTexture", (void *)9); - init_thunk(t, this_ptr_value, IVROverlay_021_IsActiveDashboardOverlay, 1, FALSE, FALSE); - bool (__stdcall *capi_IVROverlay_021_IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ReleaseNativeOverlayHandle, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_IsActiveDashboardOverlay(1); - check_ptr_parameter("IVROverlay_021_IsActiveDashboardOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_IsActiveDashboardOverlay", 1); + capi_IVROverlay_024_ReleaseNativeOverlayHandle(1, (void *)2); + check_ptr_parameter("IVROverlay_024_ReleaseNativeOverlayHandle", this_ptr_value); + check_uint64_parameter("IVROverlay_024_ReleaseNativeOverlayHandle", 1); + check_ptr_parameter("IVROverlay_024_ReleaseNativeOverlayHandle", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_SetDashboardOverlaySceneProcess, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetOverlayTextureSize, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetDashboardOverlaySceneProcess(1, 2); - check_ptr_parameter("IVROverlay_021_SetDashboardOverlaySceneProcess", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetDashboardOverlaySceneProcess", 1); - check_uint32_parameter("IVROverlay_021_SetDashboardOverlaySceneProcess", 2); + capi_IVROverlay_024_GetOverlayTextureSize(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureSize", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetOverlayTextureSize", 1); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureSize", (void *)2); + check_ptr_parameter("IVROverlay_024_GetOverlayTextureSize", (void *)3); - init_thunk(t, this_ptr_value, IVROverlay_021_GetDashboardOverlaySceneProcess, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_CreateDashboardOverlay, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_CreateDashboardOverlay)(const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetDashboardOverlaySceneProcess(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetDashboardOverlaySceneProcess", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetDashboardOverlaySceneProcess", 1); - check_ptr_parameter("IVROverlay_021_GetDashboardOverlaySceneProcess", (void *)2); + capi_IVROverlay_024_CreateDashboardOverlay((void *)1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_024_CreateDashboardOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_024_CreateDashboardOverlay", (void *)1); + check_ptr_parameter("IVROverlay_024_CreateDashboardOverlay", (void *)2); + check_ptr_parameter("IVROverlay_024_CreateDashboardOverlay", (void *)3); + check_ptr_parameter("IVROverlay_024_CreateDashboardOverlay", (void *)4); - init_thunk(t, this_ptr_value, IVROverlay_021_ShowDashboard, 1, FALSE, FALSE); - void (__stdcall *capi_IVROverlay_021_ShowDashboard)(const char * pchOverlayToShow) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_IsDashboardVisible, 0, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_024_IsDashboardVisible)() = (void *)t; clear_parameters(); - capi_IVROverlay_021_ShowDashboard((void *)1); - check_ptr_parameter("IVROverlay_021_ShowDashboard", this_ptr_value); - check_ptr_parameter("IVROverlay_021_ShowDashboard", (void *)1); + capi_IVROverlay_024_IsDashboardVisible(); + check_ptr_parameter("IVROverlay_024_IsDashboardVisible", this_ptr_value); - init_thunk(t, this_ptr_value, IVROverlay_021_GetPrimaryDashboardDevice, 0, FALSE, FALSE); - TrackedDeviceIndex_t (__stdcall *capi_IVROverlay_021_GetPrimaryDashboardDevice)() = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_IsActiveDashboardOverlay, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_024_IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetPrimaryDashboardDevice(); - check_ptr_parameter("IVROverlay_021_GetPrimaryDashboardDevice", this_ptr_value); + capi_IVROverlay_024_IsActiveDashboardOverlay(1); + check_ptr_parameter("IVROverlay_024_IsActiveDashboardOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_IsActiveDashboardOverlay", 1); - init_thunk(t, this_ptr_value, IVROverlay_021_ShowKeyboard, 7, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ShowKeyboard(1, 2, (void *)3, 4, (void *)5, 1, 7); - check_ptr_parameter("IVROverlay_021_ShowKeyboard", this_ptr_value); - check_uint32_parameter("IVROverlay_021_ShowKeyboard", 1); - check_uint32_parameter("IVROverlay_021_ShowKeyboard", 2); - check_ptr_parameter("IVROverlay_021_ShowKeyboard", (void *)3); - check_uint32_parameter("IVROverlay_021_ShowKeyboard", 4); - check_ptr_parameter("IVROverlay_021_ShowKeyboard", (void *)5); - check_bool_parameter("IVROverlay_021_ShowKeyboard", 1); - check_uint64_parameter("IVROverlay_021_ShowKeyboard", 7); + capi_IVROverlay_024_SetDashboardOverlaySceneProcess(1, 2); + check_ptr_parameter("IVROverlay_024_SetDashboardOverlaySceneProcess", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetDashboardOverlaySceneProcess", 1); + check_uint32_parameter("IVROverlay_024_SetDashboardOverlaySceneProcess", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_ShowKeyboardForOverlay, 8, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ShowKeyboardForOverlay(1, 2, 3, (void *)4, 5, (void *)6, 1, 8); - check_ptr_parameter("IVROverlay_021_ShowKeyboardForOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_ShowKeyboardForOverlay", 1); - check_uint32_parameter("IVROverlay_021_ShowKeyboardForOverlay", 2); - check_uint32_parameter("IVROverlay_021_ShowKeyboardForOverlay", 3); - check_ptr_parameter("IVROverlay_021_ShowKeyboardForOverlay", (void *)4); - check_uint32_parameter("IVROverlay_021_ShowKeyboardForOverlay", 5); - check_ptr_parameter("IVROverlay_021_ShowKeyboardForOverlay", (void *)6); - check_bool_parameter("IVROverlay_021_ShowKeyboardForOverlay", 1); - check_uint64_parameter("IVROverlay_021_ShowKeyboardForOverlay", 8); + capi_IVROverlay_024_GetDashboardOverlaySceneProcess(1, (void *)2); + check_ptr_parameter("IVROverlay_024_GetDashboardOverlaySceneProcess", this_ptr_value); + check_uint64_parameter("IVROverlay_024_GetDashboardOverlaySceneProcess", 1); + check_ptr_parameter("IVROverlay_024_GetDashboardOverlaySceneProcess", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetKeyboardText, 2, FALSE, FALSE); - uint32_t (__stdcall *capi_IVROverlay_021_GetKeyboardText)(char * pchText, uint32_t cchText) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ShowDashboard, 1, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_024_ShowDashboard)(const char * pchOverlayToShow) = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetKeyboardText((void *)1, 2); - check_ptr_parameter("IVROverlay_021_GetKeyboardText", this_ptr_value); - check_ptr_parameter("IVROverlay_021_GetKeyboardText", (void *)1); - check_uint32_parameter("IVROverlay_021_GetKeyboardText", 2); + capi_IVROverlay_024_ShowDashboard((void *)1); + check_ptr_parameter("IVROverlay_024_ShowDashboard", this_ptr_value); + check_ptr_parameter("IVROverlay_024_ShowDashboard", (void *)1); - init_thunk(t, this_ptr_value, IVROverlay_021_HideKeyboard, 0, FALSE, FALSE); - void (__stdcall *capi_IVROverlay_021_HideKeyboard)() = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetPrimaryDashboardDevice, 0, FALSE, FALSE); + TrackedDeviceIndex_t (__stdcall *capi_IVROverlay_024_GetPrimaryDashboardDevice)() = (void *)t; clear_parameters(); - capi_IVROverlay_021_HideKeyboard(); - check_ptr_parameter("IVROverlay_021_HideKeyboard", this_ptr_value); + capi_IVROverlay_024_GetPrimaryDashboardDevice(); + check_ptr_parameter("IVROverlay_024_GetPrimaryDashboardDevice", this_ptr_value); - init_thunk(t, this_ptr_value, IVROverlay_021_SetKeyboardTransformAbsolute, 2, FALSE, FALSE); - void (__stdcall *capi_IVROverlay_021_SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ShowKeyboard, 7, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetKeyboardTransformAbsolute(1, (void *)2); - check_ptr_parameter("IVROverlay_021_SetKeyboardTransformAbsolute", this_ptr_value); - check_uint32_parameter("IVROverlay_021_SetKeyboardTransformAbsolute", 1); - check_ptr_parameter("IVROverlay_021_SetKeyboardTransformAbsolute", (void *)2); + capi_IVROverlay_024_ShowKeyboard(1, 2, 3, (void *)4, 5, (void *)6, 7); + check_ptr_parameter("IVROverlay_024_ShowKeyboard", this_ptr_value); + check_uint32_parameter("IVROverlay_024_ShowKeyboard", 1); + check_uint32_parameter("IVROverlay_024_ShowKeyboard", 2); + check_uint32_parameter("IVROverlay_024_ShowKeyboard", 3); + check_ptr_parameter("IVROverlay_024_ShowKeyboard", (void *)4); + check_uint32_parameter("IVROverlay_024_ShowKeyboard", 5); + check_ptr_parameter("IVROverlay_024_ShowKeyboard", (void *)6); + check_uint64_parameter("IVROverlay_024_ShowKeyboard", 7); - init_thunk(t, this_ptr_value, IVROverlay_021_SetKeyboardPositionForOverlay, 2, FALSE, FALSE); - void (__stdcall *capi_IVROverlay_021_SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_ShowKeyboardForOverlay, 8, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_024_ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetKeyboardPositionForOverlay(1, DEFAULT_RECT); - check_ptr_parameter("IVROverlay_021_SetKeyboardPositionForOverlay", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetKeyboardPositionForOverlay", 1); - check_HmdRect2_parameter("IVROverlay_021_SetKeyboardPositionForOverlay", DEFAULT_RECT); + capi_IVROverlay_024_ShowKeyboardForOverlay(1, 2, 3, 4, (void *)5, 6, (void *)7, 8); + check_ptr_parameter("IVROverlay_024_ShowKeyboardForOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_ShowKeyboardForOverlay", 1); + check_uint32_parameter("IVROverlay_024_ShowKeyboardForOverlay", 2); + check_uint32_parameter("IVROverlay_024_ShowKeyboardForOverlay", 3); + check_uint32_parameter("IVROverlay_024_ShowKeyboardForOverlay", 4); + check_ptr_parameter("IVROverlay_024_ShowKeyboardForOverlay", (void *)5); + check_uint32_parameter("IVROverlay_024_ShowKeyboardForOverlay", 6); + check_ptr_parameter("IVROverlay_024_ShowKeyboardForOverlay", (void *)7); + check_uint64_parameter("IVROverlay_024_ShowKeyboardForOverlay", 8); - init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayIntersectionMask, 4, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_GetKeyboardText, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_024_GetKeyboardText)(char * pchText, uint32_t cchText) = (void *)t; clear_parameters(); - capi_IVROverlay_021_SetOverlayIntersectionMask(1, (void *)2, 3, 4); - check_ptr_parameter("IVROverlay_021_SetOverlayIntersectionMask", this_ptr_value); - check_uint64_parameter("IVROverlay_021_SetOverlayIntersectionMask", 1); - check_ptr_parameter("IVROverlay_021_SetOverlayIntersectionMask", (void *)2); - check_uint32_parameter("IVROverlay_021_SetOverlayIntersectionMask", 3); - check_uint32_parameter("IVROverlay_021_SetOverlayIntersectionMask", 4); + capi_IVROverlay_024_GetKeyboardText((void *)1, 2); + check_ptr_parameter("IVROverlay_024_GetKeyboardText", this_ptr_value); + check_ptr_parameter("IVROverlay_024_GetKeyboardText", (void *)1); + check_uint32_parameter("IVROverlay_024_GetKeyboardText", 2); - init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayFlags, 2, FALSE, FALSE); - EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_HideKeyboard, 0, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_024_HideKeyboard)() = (void *)t; clear_parameters(); - capi_IVROverlay_021_GetOverlayFlags(1, (void *)2); - check_ptr_parameter("IVROverlay_021_GetOverlayFlags", this_ptr_value); - check_uint64_parameter("IVROverlay_021_GetOverlayFlags", 1); - check_ptr_parameter("IVROverlay_021_GetOverlayFlags", (void *)2); + capi_IVROverlay_024_HideKeyboard(); + check_ptr_parameter("IVROverlay_024_HideKeyboard", this_ptr_value); - init_thunk(t, this_ptr_value, IVROverlay_021_ShowMessageOverlay, 6, FALSE, FALSE); - VRMessageOverlayResponse (__stdcall *capi_IVROverlay_021_ShowMessageOverlay)(const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetKeyboardTransformAbsolute, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_024_SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) = (void *)t; clear_parameters(); - capi_IVROverlay_021_ShowMessageOverlay((void *)1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", this_ptr_value); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)1); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)2); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)3); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)4); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)5); - check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)6); + capi_IVROverlay_024_SetKeyboardTransformAbsolute(1, (void *)2); + check_ptr_parameter("IVROverlay_024_SetKeyboardTransformAbsolute", this_ptr_value); + check_uint32_parameter("IVROverlay_024_SetKeyboardTransformAbsolute", 1); + check_ptr_parameter("IVROverlay_024_SetKeyboardTransformAbsolute", (void *)2); - init_thunk(t, this_ptr_value, IVROverlay_021_CloseMessageOverlay, 0, FALSE, FALSE); - void (__stdcall *capi_IVROverlay_021_CloseMessageOverlay)() = (void *)t; + init_thunk(t, this_ptr_value, IVROverlay_024_SetKeyboardPositionForOverlay, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_024_SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) = (void *)t; clear_parameters(); - capi_IVROverlay_021_CloseMessageOverlay(); - check_ptr_parameter("IVROverlay_021_CloseMessageOverlay", this_ptr_value); + capi_IVROverlay_024_SetKeyboardPositionForOverlay(1, DEFAULT_RECT); + check_ptr_parameter("IVROverlay_024_SetKeyboardPositionForOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_024_SetKeyboardPositionForOverlay", 1); + check_HmdRect2_parameter("IVROverlay_024_SetKeyboardPositionForOverlay", DEFAULT_RECT); + + init_thunk(t, this_ptr_value, IVROverlay_024_ShowMessageOverlay, 6, FALSE, FALSE); + VRMessageOverlayResponse (__stdcall *capi_IVROverlay_024_ShowMessageOverlay)(const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) = (void *)t; + + clear_parameters(); + capi_IVROverlay_024_ShowMessageOverlay((void *)1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", (void *)1); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", (void *)2); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", (void *)3); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", (void *)4); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", (void *)5); + check_ptr_parameter("IVROverlay_024_ShowMessageOverlay", (void *)6); + + init_thunk(t, this_ptr_value, IVROverlay_024_CloseMessageOverlay, 0, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_024_CloseMessageOverlay)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_024_CloseMessageOverlay(); + check_ptr_parameter("IVROverlay_024_CloseMessageOverlay", this_ptr_value); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVROverlayView_003(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVROverlayView_003_AcquireOverlayView, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlayView_003_AcquireOverlayView)(VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t * pNativeDevice, VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize) = (void *)t; + + clear_parameters(); + capi_IVROverlayView_003_AcquireOverlayView(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVROverlayView_003_AcquireOverlayView", this_ptr_value); + check_uint64_parameter("IVROverlayView_003_AcquireOverlayView", 1); + check_ptr_parameter("IVROverlayView_003_AcquireOverlayView", (void *)2); + check_ptr_parameter("IVROverlayView_003_AcquireOverlayView", (void *)3); + check_uint32_parameter("IVROverlayView_003_AcquireOverlayView", 4); + + init_thunk(t, this_ptr_value, IVROverlayView_003_ReleaseOverlayView, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlayView_003_ReleaseOverlayView)(VROverlayView_t * pOverlayView) = (void *)t; + + clear_parameters(); + capi_IVROverlayView_003_ReleaseOverlayView((void *)1); + check_ptr_parameter("IVROverlayView_003_ReleaseOverlayView", this_ptr_value); + check_ptr_parameter("IVROverlayView_003_ReleaseOverlayView", (void *)1); + + init_thunk(t, this_ptr_value, IVROverlayView_003_PostOverlayEvent, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlayView_003_PostOverlayEvent)(VROverlayHandle_t ulOverlayHandle, VREvent_t * pvrEvent) = (void *)t; + + clear_parameters(); + capi_IVROverlayView_003_PostOverlayEvent(1, (void *)2); + check_ptr_parameter("IVROverlayView_003_PostOverlayEvent", this_ptr_value); + check_uint64_parameter("IVROverlayView_003_PostOverlayEvent", 1); + check_ptr_parameter("IVROverlayView_003_PostOverlayEvent", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlayView_003_IsViewingPermitted, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlayView_003_IsViewingPermitted)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlayView_003_IsViewingPermitted(1); + check_ptr_parameter("IVROverlayView_003_IsViewingPermitted", this_ptr_value); + check_uint64_parameter("IVROverlayView_003_IsViewingPermitted", 1); VirtualFree(t, 0, MEM_RELEASE); } @@ -2739,303 +2908,342 @@ void test_capi_thunks_IVRDriverManager_001(void) VirtualFree(t, 0, MEM_RELEASE); } -void test_capi_thunks_IVRInput_007(void) +void test_capi_thunks_IVRInput_010(void) { struct thunk *t = alloc_thunks(1); - init_thunk(t, this_ptr_value, IVRInput_007_SetActionManifestPath, 1, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_SetActionManifestPath)(const char * pchActionManifestPath) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_SetActionManifestPath, 1, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_SetActionManifestPath)(const char * pchActionManifestPath) = (void *)t; clear_parameters(); - capi_IVRInput_007_SetActionManifestPath((void *)1); - check_ptr_parameter("IVRInput_007_SetActionManifestPath", this_ptr_value); - check_ptr_parameter("IVRInput_007_SetActionManifestPath", (void *)1); + capi_IVRInput_010_SetActionManifestPath((void *)1); + check_ptr_parameter("IVRInput_010_SetActionManifestPath", this_ptr_value); + check_ptr_parameter("IVRInput_010_SetActionManifestPath", (void *)1); - init_thunk(t, this_ptr_value, IVRInput_007_GetActionSetHandle, 2, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetActionSetHandle)(const char * pchActionSetName, VRActionSetHandle_t * pHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetActionSetHandle, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetActionSetHandle)(const char * pchActionSetName, VRActionSetHandle_t * pHandle) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetActionSetHandle((void *)1, (void *)2); - check_ptr_parameter("IVRInput_007_GetActionSetHandle", this_ptr_value); - check_ptr_parameter("IVRInput_007_GetActionSetHandle", (void *)1); - check_ptr_parameter("IVRInput_007_GetActionSetHandle", (void *)2); + capi_IVRInput_010_GetActionSetHandle((void *)1, (void *)2); + check_ptr_parameter("IVRInput_010_GetActionSetHandle", this_ptr_value); + check_ptr_parameter("IVRInput_010_GetActionSetHandle", (void *)1); + check_ptr_parameter("IVRInput_010_GetActionSetHandle", (void *)2); - init_thunk(t, this_ptr_value, IVRInput_007_GetActionHandle, 2, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetActionHandle)(const char * pchActionName, VRActionHandle_t * pHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetActionHandle, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetActionHandle)(const char * pchActionName, VRActionHandle_t * pHandle) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetActionHandle((void *)1, (void *)2); - check_ptr_parameter("IVRInput_007_GetActionHandle", this_ptr_value); - check_ptr_parameter("IVRInput_007_GetActionHandle", (void *)1); - check_ptr_parameter("IVRInput_007_GetActionHandle", (void *)2); + capi_IVRInput_010_GetActionHandle((void *)1, (void *)2); + check_ptr_parameter("IVRInput_010_GetActionHandle", this_ptr_value); + check_ptr_parameter("IVRInput_010_GetActionHandle", (void *)1); + check_ptr_parameter("IVRInput_010_GetActionHandle", (void *)2); - init_thunk(t, this_ptr_value, IVRInput_007_GetInputSourceHandle, 2, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetInputSourceHandle)(const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetInputSourceHandle, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetInputSourceHandle)(const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetInputSourceHandle((void *)1, (void *)2); - check_ptr_parameter("IVRInput_007_GetInputSourceHandle", this_ptr_value); - check_ptr_parameter("IVRInput_007_GetInputSourceHandle", (void *)1); - check_ptr_parameter("IVRInput_007_GetInputSourceHandle", (void *)2); + capi_IVRInput_010_GetInputSourceHandle((void *)1, (void *)2); + check_ptr_parameter("IVRInput_010_GetInputSourceHandle", this_ptr_value); + check_ptr_parameter("IVRInput_010_GetInputSourceHandle", (void *)1); + check_ptr_parameter("IVRInput_010_GetInputSourceHandle", (void *)2); - init_thunk(t, this_ptr_value, IVRInput_007_UpdateActionState, 3, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_UpdateActionState)(VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_UpdateActionState, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_UpdateActionState)(VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_UpdateActionState((void *)1, 2, 3); - check_ptr_parameter("IVRInput_007_UpdateActionState", this_ptr_value); - check_ptr_parameter("IVRInput_007_UpdateActionState", (void *)1); - check_uint32_parameter("IVRInput_007_UpdateActionState", 2); - check_uint32_parameter("IVRInput_007_UpdateActionState", 3); + capi_IVRInput_010_UpdateActionState((void *)1, 2, 3); + check_ptr_parameter("IVRInput_010_UpdateActionState", this_ptr_value); + check_ptr_parameter("IVRInput_010_UpdateActionState", (void *)1); + check_uint32_parameter("IVRInput_010_UpdateActionState", 2); + check_uint32_parameter("IVRInput_010_UpdateActionState", 3); - init_thunk(t, this_ptr_value, IVRInput_007_GetDigitalActionData, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetDigitalActionData)(VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetDigitalActionData, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetDigitalActionData)(VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetDigitalActionData(1, (void *)2, 3, 4); - check_ptr_parameter("IVRInput_007_GetDigitalActionData", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetDigitalActionData", 1); - check_ptr_parameter("IVRInput_007_GetDigitalActionData", (void *)2); - check_uint32_parameter("IVRInput_007_GetDigitalActionData", 3); - check_uint64_parameter("IVRInput_007_GetDigitalActionData", 4); + capi_IVRInput_010_GetDigitalActionData(1, (void *)2, 3, 4); + check_ptr_parameter("IVRInput_010_GetDigitalActionData", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetDigitalActionData", 1); + check_ptr_parameter("IVRInput_010_GetDigitalActionData", (void *)2); + check_uint32_parameter("IVRInput_010_GetDigitalActionData", 3); + check_uint64_parameter("IVRInput_010_GetDigitalActionData", 4); - init_thunk(t, this_ptr_value, IVRInput_007_GetAnalogActionData, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetAnalogActionData)(VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetAnalogActionData, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetAnalogActionData)(VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetAnalogActionData(1, (void *)2, 3, 4); - check_ptr_parameter("IVRInput_007_GetAnalogActionData", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetAnalogActionData", 1); - check_ptr_parameter("IVRInput_007_GetAnalogActionData", (void *)2); - check_uint32_parameter("IVRInput_007_GetAnalogActionData", 3); - check_uint64_parameter("IVRInput_007_GetAnalogActionData", 4); + capi_IVRInput_010_GetAnalogActionData(1, (void *)2, 3, 4); + check_ptr_parameter("IVRInput_010_GetAnalogActionData", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetAnalogActionData", 1); + check_ptr_parameter("IVRInput_010_GetAnalogActionData", (void *)2); + check_uint32_parameter("IVRInput_010_GetAnalogActionData", 3); + check_uint64_parameter("IVRInput_010_GetAnalogActionData", 4); - init_thunk(t, this_ptr_value, IVRInput_007_GetPoseActionDataRelativeToNow, 6, TRUE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetPoseActionDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetPoseActionDataRelativeToNow, 6, TRUE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetPoseActionDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetPoseActionDataRelativeToNow(1, 2, 3.0f, (void *)4, 5, 6); - check_ptr_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 1); - check_uint32_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 2); - check_float_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 3.0f); - check_ptr_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", (void *)4); - check_uint32_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 5); - check_uint64_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 6); + capi_IVRInput_010_GetPoseActionDataRelativeToNow(1, 2, 3.0f, (void *)4, 5, 6); + check_ptr_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", 1); + check_uint32_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", 2); + check_float_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", 3.0f); + check_ptr_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", (void *)4); + check_uint32_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", 5); + check_uint64_parameter("IVRInput_010_GetPoseActionDataRelativeToNow", 6); - init_thunk(t, this_ptr_value, IVRInput_007_GetPoseActionDataForNextFrame, 5, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetPoseActionDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetPoseActionDataForNextFrame, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetPoseActionDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetPoseActionDataForNextFrame(1, 2, (void *)3, 4, 5); - check_ptr_parameter("IVRInput_007_GetPoseActionDataForNextFrame", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 1); - check_uint32_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 2); - check_ptr_parameter("IVRInput_007_GetPoseActionDataForNextFrame", (void *)3); - check_uint32_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 4); - check_uint64_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 5); + capi_IVRInput_010_GetPoseActionDataForNextFrame(1, 2, (void *)3, 4, 5); + check_ptr_parameter("IVRInput_010_GetPoseActionDataForNextFrame", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetPoseActionDataForNextFrame", 1); + check_uint32_parameter("IVRInput_010_GetPoseActionDataForNextFrame", 2); + check_ptr_parameter("IVRInput_010_GetPoseActionDataForNextFrame", (void *)3); + check_uint32_parameter("IVRInput_010_GetPoseActionDataForNextFrame", 4); + check_uint64_parameter("IVRInput_010_GetPoseActionDataForNextFrame", 5); - init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalActionData, 3, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalActionData)(VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetSkeletalActionData, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetSkeletalActionData)(VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetSkeletalActionData(1, (void *)2, 3); - check_ptr_parameter("IVRInput_007_GetSkeletalActionData", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetSkeletalActionData", 1); - check_ptr_parameter("IVRInput_007_GetSkeletalActionData", (void *)2); - check_uint32_parameter("IVRInput_007_GetSkeletalActionData", 3); + capi_IVRInput_010_GetSkeletalActionData(1, (void *)2, 3); + check_ptr_parameter("IVRInput_010_GetSkeletalActionData", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetSkeletalActionData", 1); + check_ptr_parameter("IVRInput_010_GetSkeletalActionData", (void *)2); + check_uint32_parameter("IVRInput_010_GetSkeletalActionData", 3); - init_thunk(t, this_ptr_value, IVRInput_007_GetBoneCount, 2, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetDominantHand, 1, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetDominantHand)(ETrackedControllerRole * peDominantHand) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetBoneCount(1, (void *)2); - check_ptr_parameter("IVRInput_007_GetBoneCount", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetBoneCount", 1); - check_ptr_parameter("IVRInput_007_GetBoneCount", (void *)2); + capi_IVRInput_010_GetDominantHand((void *)1); + check_ptr_parameter("IVRInput_010_GetDominantHand", this_ptr_value); + check_ptr_parameter("IVRInput_010_GetDominantHand", (void *)1); - init_thunk(t, this_ptr_value, IVRInput_007_GetBoneHierarchy, 3, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_SetDominantHand, 1, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_SetDominantHand)(ETrackedControllerRole eDominantHand) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetBoneHierarchy(1, (void *)2, 3); - check_ptr_parameter("IVRInput_007_GetBoneHierarchy", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetBoneHierarchy", 1); - check_ptr_parameter("IVRInput_007_GetBoneHierarchy", (void *)2); - check_uint32_parameter("IVRInput_007_GetBoneHierarchy", 3); + capi_IVRInput_010_SetDominantHand(1); + check_ptr_parameter("IVRInput_010_SetDominantHand", this_ptr_value); + check_uint32_parameter("IVRInput_010_SetDominantHand", 1); - init_thunk(t, this_ptr_value, IVRInput_007_GetBoneName, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetBoneCount, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetBoneName(1, 2, (void *)3, 4); - check_ptr_parameter("IVRInput_007_GetBoneName", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetBoneName", 1); - check_uint32_parameter("IVRInput_007_GetBoneName", 2); - check_ptr_parameter("IVRInput_007_GetBoneName", (void *)3); - check_uint32_parameter("IVRInput_007_GetBoneName", 4); + capi_IVRInput_010_GetBoneCount(1, (void *)2); + check_ptr_parameter("IVRInput_010_GetBoneCount", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetBoneCount", 1); + check_ptr_parameter("IVRInput_010_GetBoneCount", (void *)2); - init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalReferenceTransforms, 5, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalReferenceTransforms)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetBoneHierarchy, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetSkeletalReferenceTransforms(1, 2, 3, (void *)4, 5); - check_ptr_parameter("IVRInput_007_GetSkeletalReferenceTransforms", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 1); - check_uint32_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 2); - check_uint32_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 3); - check_ptr_parameter("IVRInput_007_GetSkeletalReferenceTransforms", (void *)4); - check_uint32_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 5); + capi_IVRInput_010_GetBoneHierarchy(1, (void *)2, 3); + check_ptr_parameter("IVRInput_010_GetBoneHierarchy", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetBoneHierarchy", 1); + check_ptr_parameter("IVRInput_010_GetBoneHierarchy", (void *)2); + check_uint32_parameter("IVRInput_010_GetBoneHierarchy", 3); - init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalTrackingLevel, 2, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalTrackingLevel)(VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetBoneName, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetSkeletalTrackingLevel(1, (void *)2); - check_ptr_parameter("IVRInput_007_GetSkeletalTrackingLevel", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetSkeletalTrackingLevel", 1); - check_ptr_parameter("IVRInput_007_GetSkeletalTrackingLevel", (void *)2); + capi_IVRInput_010_GetBoneName(1, 2, (void *)3, 4); + check_ptr_parameter("IVRInput_010_GetBoneName", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetBoneName", 1); + check_uint32_parameter("IVRInput_010_GetBoneName", 2); + check_ptr_parameter("IVRInput_010_GetBoneName", (void *)3); + check_uint32_parameter("IVRInput_010_GetBoneName", 4); - init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalBoneData, 5, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalBoneData)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetSkeletalReferenceTransforms, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetSkeletalReferenceTransforms)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetSkeletalBoneData(1, 2, 3, (void *)4, 5); - check_ptr_parameter("IVRInput_007_GetSkeletalBoneData", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetSkeletalBoneData", 1); - check_uint32_parameter("IVRInput_007_GetSkeletalBoneData", 2); - check_uint32_parameter("IVRInput_007_GetSkeletalBoneData", 3); - check_ptr_parameter("IVRInput_007_GetSkeletalBoneData", (void *)4); - check_uint32_parameter("IVRInput_007_GetSkeletalBoneData", 5); + capi_IVRInput_010_GetSkeletalReferenceTransforms(1, 2, 3, (void *)4, 5); + check_ptr_parameter("IVRInput_010_GetSkeletalReferenceTransforms", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetSkeletalReferenceTransforms", 1); + check_uint32_parameter("IVRInput_010_GetSkeletalReferenceTransforms", 2); + check_uint32_parameter("IVRInput_010_GetSkeletalReferenceTransforms", 3); + check_ptr_parameter("IVRInput_010_GetSkeletalReferenceTransforms", (void *)4); + check_uint32_parameter("IVRInput_010_GetSkeletalReferenceTransforms", 5); - init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalSummaryData, 3, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalSummaryData)(VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetSkeletalTrackingLevel, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetSkeletalTrackingLevel)(VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetSkeletalSummaryData(1, 2, (void *)3); - check_ptr_parameter("IVRInput_007_GetSkeletalSummaryData", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetSkeletalSummaryData", 1); - check_uint32_parameter("IVRInput_007_GetSkeletalSummaryData", 2); - check_ptr_parameter("IVRInput_007_GetSkeletalSummaryData", (void *)3); + capi_IVRInput_010_GetSkeletalTrackingLevel(1, (void *)2); + check_ptr_parameter("IVRInput_010_GetSkeletalTrackingLevel", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetSkeletalTrackingLevel", 1); + check_ptr_parameter("IVRInput_010_GetSkeletalTrackingLevel", (void *)2); - init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalBoneDataCompressed, 5, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalBoneDataCompressed)(VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetSkeletalBoneData, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetSkeletalBoneData)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetSkeletalBoneDataCompressed(1, 2, (void *)3, 4, (void *)5); - check_ptr_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", 1); - check_uint32_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", 2); - check_ptr_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", (void *)3); - check_uint32_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", 4); - check_ptr_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", (void *)5); + capi_IVRInput_010_GetSkeletalBoneData(1, 2, 3, (void *)4, 5); + check_ptr_parameter("IVRInput_010_GetSkeletalBoneData", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetSkeletalBoneData", 1); + check_uint32_parameter("IVRInput_010_GetSkeletalBoneData", 2); + check_uint32_parameter("IVRInput_010_GetSkeletalBoneData", 3); + check_ptr_parameter("IVRInput_010_GetSkeletalBoneData", (void *)4); + check_uint32_parameter("IVRInput_010_GetSkeletalBoneData", 5); - init_thunk(t, this_ptr_value, IVRInput_007_DecompressSkeletalBoneData, 5, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_DecompressSkeletalBoneData)(const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetSkeletalSummaryData, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetSkeletalSummaryData)(VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) = (void *)t; clear_parameters(); - capi_IVRInput_007_DecompressSkeletalBoneData((void *)1, 2, 3, (void *)4, 5); - check_ptr_parameter("IVRInput_007_DecompressSkeletalBoneData", this_ptr_value); - check_ptr_parameter("IVRInput_007_DecompressSkeletalBoneData", (void *)1); - check_uint32_parameter("IVRInput_007_DecompressSkeletalBoneData", 2); - check_uint32_parameter("IVRInput_007_DecompressSkeletalBoneData", 3); - check_ptr_parameter("IVRInput_007_DecompressSkeletalBoneData", (void *)4); - check_uint32_parameter("IVRInput_007_DecompressSkeletalBoneData", 5); + capi_IVRInput_010_GetSkeletalSummaryData(1, 2, (void *)3); + check_ptr_parameter("IVRInput_010_GetSkeletalSummaryData", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetSkeletalSummaryData", 1); + check_uint32_parameter("IVRInput_010_GetSkeletalSummaryData", 2); + check_ptr_parameter("IVRInput_010_GetSkeletalSummaryData", (void *)3); - init_thunk(t, this_ptr_value, IVRInput_007_TriggerHapticVibrationAction, 6, TRUE, TRUE); - EVRInputError (__stdcall *capi_IVRInput_007_TriggerHapticVibrationAction)(VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetSkeletalBoneDataCompressed, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetSkeletalBoneDataCompressed)(VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) = (void *)t; clear_parameters(); - capi_IVRInput_007_TriggerHapticVibrationAction(1, 2.0f, 3.0f, 4.0f, 5.0f, 6); - check_ptr_parameter("IVRInput_007_TriggerHapticVibrationAction", this_ptr_value); - check_uint64_parameter("IVRInput_007_TriggerHapticVibrationAction", 1); - check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 2.0f); - check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 3.0f); - check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 4.0f); - check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 5.0f); - check_uint64_parameter("IVRInput_007_TriggerHapticVibrationAction", 6); + capi_IVRInput_010_GetSkeletalBoneDataCompressed(1, 2, (void *)3, 4, (void *)5); + check_ptr_parameter("IVRInput_010_GetSkeletalBoneDataCompressed", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetSkeletalBoneDataCompressed", 1); + check_uint32_parameter("IVRInput_010_GetSkeletalBoneDataCompressed", 2); + check_ptr_parameter("IVRInput_010_GetSkeletalBoneDataCompressed", (void *)3); + check_uint32_parameter("IVRInput_010_GetSkeletalBoneDataCompressed", 4); + check_ptr_parameter("IVRInput_010_GetSkeletalBoneDataCompressed", (void *)5); - init_thunk(t, this_ptr_value, IVRInput_007_GetActionOrigins, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_DecompressSkeletalBoneData, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_DecompressSkeletalBoneData)(const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetActionOrigins(1, 2, (void *)3, 4); - check_ptr_parameter("IVRInput_007_GetActionOrigins", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetActionOrigins", 1); - check_uint64_parameter("IVRInput_007_GetActionOrigins", 2); - check_ptr_parameter("IVRInput_007_GetActionOrigins", (void *)3); - check_uint32_parameter("IVRInput_007_GetActionOrigins", 4); + capi_IVRInput_010_DecompressSkeletalBoneData((void *)1, 2, 3, (void *)4, 5); + check_ptr_parameter("IVRInput_010_DecompressSkeletalBoneData", this_ptr_value); + check_ptr_parameter("IVRInput_010_DecompressSkeletalBoneData", (void *)1); + check_uint32_parameter("IVRInput_010_DecompressSkeletalBoneData", 2); + check_uint32_parameter("IVRInput_010_DecompressSkeletalBoneData", 3); + check_ptr_parameter("IVRInput_010_DecompressSkeletalBoneData", (void *)4); + check_uint32_parameter("IVRInput_010_DecompressSkeletalBoneData", 5); - init_thunk(t, this_ptr_value, IVRInput_007_GetOriginLocalizedName, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_TriggerHapticVibrationAction, 6, TRUE, TRUE); + EVRInputError (__stdcall *capi_IVRInput_010_TriggerHapticVibrationAction)(VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetOriginLocalizedName(1, (void *)2, 3, 4); - check_ptr_parameter("IVRInput_007_GetOriginLocalizedName", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetOriginLocalizedName", 1); - check_ptr_parameter("IVRInput_007_GetOriginLocalizedName", (void *)2); - check_uint32_parameter("IVRInput_007_GetOriginLocalizedName", 3); - check_uint32_parameter("IVRInput_007_GetOriginLocalizedName", 4); + capi_IVRInput_010_TriggerHapticVibrationAction(1, 2.0f, 3.0f, 4.0f, 5.0f, 6); + check_ptr_parameter("IVRInput_010_TriggerHapticVibrationAction", this_ptr_value); + check_uint64_parameter("IVRInput_010_TriggerHapticVibrationAction", 1); + check_float_parameter("IVRInput_010_TriggerHapticVibrationAction", 2.0f); + check_float_parameter("IVRInput_010_TriggerHapticVibrationAction", 3.0f); + check_float_parameter("IVRInput_010_TriggerHapticVibrationAction", 4.0f); + check_float_parameter("IVRInput_010_TriggerHapticVibrationAction", 5.0f); + check_uint64_parameter("IVRInput_010_TriggerHapticVibrationAction", 6); - init_thunk(t, this_ptr_value, IVRInput_007_GetOriginTrackedDeviceInfo, 3, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetActionOrigins, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetOriginTrackedDeviceInfo(1, (void *)2, 3); - check_ptr_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", 1); - check_ptr_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", (void *)2); - check_uint32_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", 3); + capi_IVRInput_010_GetActionOrigins(1, 2, (void *)3, 4); + check_ptr_parameter("IVRInput_010_GetActionOrigins", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetActionOrigins", 1); + check_uint64_parameter("IVRInput_010_GetActionOrigins", 2); + check_ptr_parameter("IVRInput_010_GetActionOrigins", (void *)3); + check_uint32_parameter("IVRInput_010_GetActionOrigins", 4); - init_thunk(t, this_ptr_value, IVRInput_007_GetActionBindingInfo, 5, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_GetActionBindingInfo)(VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetOriginLocalizedName, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) = (void *)t; clear_parameters(); - capi_IVRInput_007_GetActionBindingInfo(1, (void *)2, 3, 4, (void *)5); - check_ptr_parameter("IVRInput_007_GetActionBindingInfo", this_ptr_value); - check_uint64_parameter("IVRInput_007_GetActionBindingInfo", 1); - check_ptr_parameter("IVRInput_007_GetActionBindingInfo", (void *)2); - check_uint32_parameter("IVRInput_007_GetActionBindingInfo", 3); - check_uint32_parameter("IVRInput_007_GetActionBindingInfo", 4); - check_ptr_parameter("IVRInput_007_GetActionBindingInfo", (void *)5); + capi_IVRInput_010_GetOriginLocalizedName(1, (void *)2, 3, 4); + check_ptr_parameter("IVRInput_010_GetOriginLocalizedName", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetOriginLocalizedName", 1); + check_ptr_parameter("IVRInput_010_GetOriginLocalizedName", (void *)2); + check_uint32_parameter("IVRInput_010_GetOriginLocalizedName", 3); + check_uint32_parameter("IVRInput_010_GetOriginLocalizedName", 4); - init_thunk(t, this_ptr_value, IVRInput_007_ShowActionOrigins, 2, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetOriginTrackedDeviceInfo, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) = (void *)t; clear_parameters(); - capi_IVRInput_007_ShowActionOrigins(1, 2); - check_ptr_parameter("IVRInput_007_ShowActionOrigins", this_ptr_value); - check_uint64_parameter("IVRInput_007_ShowActionOrigins", 1); - check_uint64_parameter("IVRInput_007_ShowActionOrigins", 2); + capi_IVRInput_010_GetOriginTrackedDeviceInfo(1, (void *)2, 3); + check_ptr_parameter("IVRInput_010_GetOriginTrackedDeviceInfo", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetOriginTrackedDeviceInfo", 1); + check_ptr_parameter("IVRInput_010_GetOriginTrackedDeviceInfo", (void *)2); + check_uint32_parameter("IVRInput_010_GetOriginTrackedDeviceInfo", 3); - init_thunk(t, this_ptr_value, IVRInput_007_ShowBindingsForActionSet, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_ShowBindingsForActionSet)(VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_GetActionBindingInfo, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetActionBindingInfo)(VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) = (void *)t; clear_parameters(); - capi_IVRInput_007_ShowBindingsForActionSet((void *)1, 2, 3, 4); - check_ptr_parameter("IVRInput_007_ShowBindingsForActionSet", this_ptr_value); - check_ptr_parameter("IVRInput_007_ShowBindingsForActionSet", (void *)1); - check_uint32_parameter("IVRInput_007_ShowBindingsForActionSet", 2); - check_uint32_parameter("IVRInput_007_ShowBindingsForActionSet", 3); - check_uint64_parameter("IVRInput_007_ShowBindingsForActionSet", 4); + capi_IVRInput_010_GetActionBindingInfo(1, (void *)2, 3, 4, (void *)5); + check_ptr_parameter("IVRInput_010_GetActionBindingInfo", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetActionBindingInfo", 1); + check_ptr_parameter("IVRInput_010_GetActionBindingInfo", (void *)2); + check_uint32_parameter("IVRInput_010_GetActionBindingInfo", 3); + check_uint32_parameter("IVRInput_010_GetActionBindingInfo", 4); + check_ptr_parameter("IVRInput_010_GetActionBindingInfo", (void *)5); - init_thunk(t, this_ptr_value, IVRInput_007_IsUsingLegacyInput, 0, FALSE, FALSE); - bool (__stdcall *capi_IVRInput_007_IsUsingLegacyInput)() = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_ShowActionOrigins, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) = (void *)t; clear_parameters(); - capi_IVRInput_007_IsUsingLegacyInput(); - check_ptr_parameter("IVRInput_007_IsUsingLegacyInput", this_ptr_value); + capi_IVRInput_010_ShowActionOrigins(1, 2); + check_ptr_parameter("IVRInput_010_ShowActionOrigins", this_ptr_value); + check_uint64_parameter("IVRInput_010_ShowActionOrigins", 1); + check_uint64_parameter("IVRInput_010_ShowActionOrigins", 2); - init_thunk(t, this_ptr_value, IVRInput_007_OpenBindingUI, 4, FALSE, FALSE); - EVRInputError (__stdcall *capi_IVRInput_007_OpenBindingUI)(const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) = (void *)t; + init_thunk(t, this_ptr_value, IVRInput_010_ShowBindingsForActionSet, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_ShowBindingsForActionSet)(VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) = (void *)t; clear_parameters(); - capi_IVRInput_007_OpenBindingUI((void *)1, 2, 3, 1); - check_ptr_parameter("IVRInput_007_OpenBindingUI", this_ptr_value); - check_ptr_parameter("IVRInput_007_OpenBindingUI", (void *)1); - check_uint64_parameter("IVRInput_007_OpenBindingUI", 2); - check_uint64_parameter("IVRInput_007_OpenBindingUI", 3); - check_bool_parameter("IVRInput_007_OpenBindingUI", 1); + capi_IVRInput_010_ShowBindingsForActionSet((void *)1, 2, 3, 4); + check_ptr_parameter("IVRInput_010_ShowBindingsForActionSet", this_ptr_value); + check_ptr_parameter("IVRInput_010_ShowBindingsForActionSet", (void *)1); + check_uint32_parameter("IVRInput_010_ShowBindingsForActionSet", 2); + check_uint32_parameter("IVRInput_010_ShowBindingsForActionSet", 3); + check_uint64_parameter("IVRInput_010_ShowBindingsForActionSet", 4); + + init_thunk(t, this_ptr_value, IVRInput_010_GetComponentStateForBinding, 6, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetComponentStateForBinding)(const char * pchRenderModelName, const char * pchComponentName, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState) = (void *)t; + + clear_parameters(); + capi_IVRInput_010_GetComponentStateForBinding((void *)1, (void *)2, (void *)3, 4, 5, (void *)6); + check_ptr_parameter("IVRInput_010_GetComponentStateForBinding", this_ptr_value); + check_ptr_parameter("IVRInput_010_GetComponentStateForBinding", (void *)1); + check_ptr_parameter("IVRInput_010_GetComponentStateForBinding", (void *)2); + check_ptr_parameter("IVRInput_010_GetComponentStateForBinding", (void *)3); + check_uint32_parameter("IVRInput_010_GetComponentStateForBinding", 4); + check_uint32_parameter("IVRInput_010_GetComponentStateForBinding", 5); + check_ptr_parameter("IVRInput_010_GetComponentStateForBinding", (void *)6); + + init_thunk(t, this_ptr_value, IVRInput_010_IsUsingLegacyInput, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRInput_010_IsUsingLegacyInput)() = (void *)t; + + clear_parameters(); + capi_IVRInput_010_IsUsingLegacyInput(); + check_ptr_parameter("IVRInput_010_IsUsingLegacyInput", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRInput_010_OpenBindingUI, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_OpenBindingUI)(const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) = (void *)t; + + clear_parameters(); + capi_IVRInput_010_OpenBindingUI((void *)1, 2, 3, 1); + check_ptr_parameter("IVRInput_010_OpenBindingUI", this_ptr_value); + check_ptr_parameter("IVRInput_010_OpenBindingUI", (void *)1); + check_uint64_parameter("IVRInput_010_OpenBindingUI", 2); + check_uint64_parameter("IVRInput_010_OpenBindingUI", 3); + check_bool_parameter("IVRInput_010_OpenBindingUI", 1); + + init_thunk(t, this_ptr_value, IVRInput_010_GetBindingVariant, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_010_GetBindingVariant)(VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize) = (void *)t; + + clear_parameters(); + capi_IVRInput_010_GetBindingVariant(1, (void *)2, 3); + check_ptr_parameter("IVRInput_010_GetBindingVariant", this_ptr_value); + check_uint64_parameter("IVRInput_010_GetBindingVariant", 1); + check_ptr_parameter("IVRInput_010_GetBindingVariant", (void *)2); + check_uint32_parameter("IVRInput_010_GetBindingVariant", 3); VirtualFree(t, 0, MEM_RELEASE); } @@ -3102,6 +3310,284 @@ void test_capi_thunks_IVRIOBuffer_002(void) VirtualFree(t, 0, MEM_RELEASE); } +void test_capi_thunks_IVRControlPanel_006(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc1, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRControlPanel_006_undoc1)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc1(); + check_ptr_parameter("IVRControlPanel_006_undoc1", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc2, 3, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRControlPanel_006_undoc2)(uint32_t a, char * b, uint32_t c) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc2(1, (void *)2, 3); + check_ptr_parameter("IVRControlPanel_006_undoc2", this_ptr_value); + check_uint32_parameter("IVRControlPanel_006_undoc2", 1); + check_ptr_parameter("IVRControlPanel_006_undoc2", (void *)2); + check_uint32_parameter("IVRControlPanel_006_undoc2", 3); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc3, 1, FALSE, FALSE); + EVRInitError (__stdcall *capi_IVRControlPanel_006_undoc3)(const char * a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc3((void *)1); + check_ptr_parameter("IVRControlPanel_006_undoc3", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc3", (void *)1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc4, 1, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRControlPanel_006_undoc4)(const char * a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc4((void *)1); + check_ptr_parameter("IVRControlPanel_006_undoc4", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc4", (void *)1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc5, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRControlPanel_006_undoc5)(const char * a, uint32_t b, char * c, uint32_t d) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc5((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRControlPanel_006_undoc5", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc5", (void *)1); + check_uint32_parameter("IVRControlPanel_006_undoc5", 2); + check_ptr_parameter("IVRControlPanel_006_undoc5", (void *)3); + check_uint32_parameter("IVRControlPanel_006_undoc5", 4); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc6, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRControlPanel_006_undoc6)(const char * a, const char * b, char * c, uint32_t d) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc6((void *)1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRControlPanel_006_undoc6", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc6", (void *)1); + check_ptr_parameter("IVRControlPanel_006_undoc6", (void *)2); + check_ptr_parameter("IVRControlPanel_006_undoc6", (void *)3); + check_uint32_parameter("IVRControlPanel_006_undoc6", 4); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc7, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRControlPanel_006_undoc7)(const char * a, const char * b, char * c, uint32_t d) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc7((void *)1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRControlPanel_006_undoc7", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc7", (void *)1); + check_ptr_parameter("IVRControlPanel_006_undoc7", (void *)2); + check_ptr_parameter("IVRControlPanel_006_undoc7", (void *)3); + check_uint32_parameter("IVRControlPanel_006_undoc7", 4); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc8, 1, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc8)(uint32_t a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc8(1); + check_ptr_parameter("IVRControlPanel_006_undoc8", this_ptr_value); + check_uint32_parameter("IVRControlPanel_006_undoc8", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc9, 0, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc9)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc9(); + check_ptr_parameter("IVRControlPanel_006_undoc9", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc10, 0, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc10)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc10(); + check_ptr_parameter("IVRControlPanel_006_undoc10", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc11, 1, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc11)(uint32_t a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc11(1); + check_ptr_parameter("IVRControlPanel_006_undoc11", this_ptr_value); + check_uint32_parameter("IVRControlPanel_006_undoc11", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc12, 0, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc12)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc12(); + check_ptr_parameter("IVRControlPanel_006_undoc12", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc13, 1, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc13)(TrackedDeviceIndex_t a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc13(1); + check_ptr_parameter("IVRControlPanel_006_undoc13", this_ptr_value); + check_uint32_parameter("IVRControlPanel_006_undoc13", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc14, 1, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc14)(EVRState a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc14(1); + check_ptr_parameter("IVRControlPanel_006_undoc14", this_ptr_value); + check_uint32_parameter("IVRControlPanel_006_undoc14", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc15, 0, FALSE, FALSE); + EVRState (__stdcall *capi_IVRControlPanel_006_undoc15)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc15(); + check_ptr_parameter("IVRControlPanel_006_undoc15", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc16, 1, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc16)(bool a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc16(1); + check_ptr_parameter("IVRControlPanel_006_undoc16", this_ptr_value); + check_bool_parameter("IVRControlPanel_006_undoc16", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc17, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc17)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc17(); + check_ptr_parameter("IVRControlPanel_006_undoc17", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc18, 0, FALSE, FALSE); + EVRApplicationError (__stdcall *capi_IVRControlPanel_006_undoc18)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc18(); + check_ptr_parameter("IVRControlPanel_006_undoc18", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc19, 1, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc19)(bool a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc19(1); + check_ptr_parameter("IVRControlPanel_006_undoc19", this_ptr_value); + check_bool_parameter("IVRControlPanel_006_undoc19", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc20, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc20)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc20(); + check_ptr_parameter("IVRControlPanel_006_undoc20", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc21, 0, FALSE, FALSE); + EVRInitError (__stdcall *capi_IVRControlPanel_006_undoc21)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc21(); + check_ptr_parameter("IVRControlPanel_006_undoc21", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc22, 5, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc22)(WebConsoleHandle_t a, const char * b, uint32_t c, uint32_t d, const char * e) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc22(1, (void *)2, 3, 4, (void *)5); + check_ptr_parameter("IVRControlPanel_006_undoc22", this_ptr_value); + check_uint64_parameter("IVRControlPanel_006_undoc22", 1); + check_ptr_parameter("IVRControlPanel_006_undoc22", (void *)2); + check_uint32_parameter("IVRControlPanel_006_undoc22", 3); + check_uint32_parameter("IVRControlPanel_006_undoc22", 4); + check_ptr_parameter("IVRControlPanel_006_undoc22", (void *)5); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc23, 1, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc23)(const char * a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc23((void *)1); + check_ptr_parameter("IVRControlPanel_006_undoc23", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc23", (void *)1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc24, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc24)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc24(); + check_ptr_parameter("IVRControlPanel_006_undoc24", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc25, 1, FALSE, FALSE); + bool (__stdcall *capi_IVRControlPanel_006_undoc25)(bool a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc25(1); + check_ptr_parameter("IVRControlPanel_006_undoc25", this_ptr_value); + check_bool_parameter("IVRControlPanel_006_undoc25", 1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc26, 0, FALSE, FALSE); + uint64_t (__stdcall *capi_IVRControlPanel_006_undoc26)() = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc26(); + check_ptr_parameter("IVRControlPanel_006_undoc26", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc27, 1, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRControlPanel_006_undoc27)(const char * a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc27((void *)1); + check_ptr_parameter("IVRControlPanel_006_undoc27", this_ptr_value); + check_ptr_parameter("IVRControlPanel_006_undoc27", (void *)1); + + init_thunk(t, this_ptr_value, IVRControlPanel_006_undoc28, 1, FALSE, FALSE); + void (__stdcall *capi_IVRControlPanel_006_undoc28)(VROverlayHandle_t a) = (void *)t; + + clear_parameters(); + capi_IVRControlPanel_006_undoc28(1); + check_ptr_parameter("IVRControlPanel_006_undoc28", this_ptr_value); + check_uint64_parameter("IVRControlPanel_006_undoc28", 1); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVRMailbox_001(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRMailbox_001_undoc1, 2, FALSE, FALSE); + vrmb_typeb (__stdcall *capi_IVRMailbox_001_undoc1)(const char * a, vrmb_typea * b) = (void *)t; + + clear_parameters(); + capi_IVRMailbox_001_undoc1((void *)1, (void *)2); + check_ptr_parameter("IVRMailbox_001_undoc1", this_ptr_value); + check_ptr_parameter("IVRMailbox_001_undoc1", (void *)1); + check_ptr_parameter("IVRMailbox_001_undoc1", (void *)2); + + init_thunk(t, this_ptr_value, IVRMailbox_001_undoc2, 1, FALSE, FALSE); + vrmb_typeb (__stdcall *capi_IVRMailbox_001_undoc2)(vrmb_typea a) = (void *)t; + + clear_parameters(); + capi_IVRMailbox_001_undoc2(1); + check_ptr_parameter("IVRMailbox_001_undoc2", this_ptr_value); + check_uint64_parameter("IVRMailbox_001_undoc2", 1); + + init_thunk(t, this_ptr_value, IVRMailbox_001_undoc3, 3, FALSE, FALSE); + vrmb_typeb (__stdcall *capi_IVRMailbox_001_undoc3)(vrmb_typea a, const char * b, const char * c) = (void *)t; + + clear_parameters(); + capi_IVRMailbox_001_undoc3(1, (void *)2, (void *)3); + check_ptr_parameter("IVRMailbox_001_undoc3", this_ptr_value); + check_uint64_parameter("IVRMailbox_001_undoc3", 1); + check_ptr_parameter("IVRMailbox_001_undoc3", (void *)2); + check_ptr_parameter("IVRMailbox_001_undoc3", (void *)3); + + init_thunk(t, this_ptr_value, IVRMailbox_001_undoc4, 4, FALSE, FALSE); + vrmb_typeb (__stdcall *capi_IVRMailbox_001_undoc4)(vrmb_typea a, char * b, uint32_t c, uint32_t * d) = (void *)t; + + clear_parameters(); + capi_IVRMailbox_001_undoc4(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVRMailbox_001_undoc4", this_ptr_value); + check_uint64_parameter("IVRMailbox_001_undoc4", 1); + check_ptr_parameter("IVRMailbox_001_undoc4", (void *)2); + check_uint32_parameter("IVRMailbox_001_undoc4", 3); + check_ptr_parameter("IVRMailbox_001_undoc4", (void *)4); + VirtualFree(t, 0, MEM_RELEASE); +} + void test_capi_thunks_IVRClientCore_003(void) { struct thunk *t = alloc_thunks(1); @@ -3164,6 +3650,2743 @@ void test_capi_thunks_IVRClientCore_003(void) VirtualFree(t, 0, MEM_RELEASE); } +void test_capi_thunks_IVRCompositor_024(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_SetTrackingSpace, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_SetTrackingSpace)(ETrackingUniverseOrigin eOrigin) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_SetTrackingSpace(1); + check_ptr_parameter("IVRCompositor_024_SetTrackingSpace", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_SetTrackingSpace", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetTrackingSpace, 0, FALSE, FALSE); + ETrackingUniverseOrigin (__stdcall *capi_IVRCompositor_024_GetTrackingSpace)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetTrackingSpace(); + check_ptr_parameter("IVRCompositor_024_GetTrackingSpace", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_WaitGetPoses, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_WaitGetPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_WaitGetPoses((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_024_WaitGetPoses", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_WaitGetPoses", (void *)1); + check_uint32_parameter("IVRCompositor_024_WaitGetPoses", 2); + check_ptr_parameter("IVRCompositor_024_WaitGetPoses", (void *)3); + check_uint32_parameter("IVRCompositor_024_WaitGetPoses", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetLastPoses, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_GetLastPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetLastPoses((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_024_GetLastPoses", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetLastPoses", (void *)1); + check_uint32_parameter("IVRCompositor_024_GetLastPoses", 2); + check_ptr_parameter("IVRCompositor_024_GetLastPoses", (void *)3); + check_uint32_parameter("IVRCompositor_024_GetLastPoses", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetLastPoseForTrackedDeviceIndex, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_024_GetLastPoseForTrackedDeviceIndex", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_GetLastPoseForTrackedDeviceIndex", 1); + check_ptr_parameter("IVRCompositor_024_GetLastPoseForTrackedDeviceIndex", (void *)2); + check_ptr_parameter("IVRCompositor_024_GetLastPoseForTrackedDeviceIndex", (void *)3); + + init_thunk(t, this_ptr_value, IVRCompositor_024_Submit, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_Submit)(EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_Submit(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_024_Submit", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_Submit", 1); + check_ptr_parameter("IVRCompositor_024_Submit", (void *)2); + check_ptr_parameter("IVRCompositor_024_Submit", (void *)3); + check_uint32_parameter("IVRCompositor_024_Submit", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ClearLastSubmittedFrame, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ClearLastSubmittedFrame)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ClearLastSubmittedFrame(); + check_ptr_parameter("IVRCompositor_024_ClearLastSubmittedFrame", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_PostPresentHandoff, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_PostPresentHandoff)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_PostPresentHandoff(); + check_ptr_parameter("IVRCompositor_024_PostPresentHandoff", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetFrameTiming, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_GetFrameTiming)(Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetFrameTiming((void *)1, 2); + check_ptr_parameter("IVRCompositor_024_GetFrameTiming", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetFrameTiming", (void *)1); + check_uint32_parameter("IVRCompositor_024_GetFrameTiming", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetFrameTimings, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_024_GetFrameTimings)(Compositor_FrameTiming * pTiming, uint32_t nFrames) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetFrameTimings((void *)1, 2); + check_ptr_parameter("IVRCompositor_024_GetFrameTimings", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetFrameTimings", (void *)1); + check_uint32_parameter("IVRCompositor_024_GetFrameTimings", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetFrameTimeRemaining, 0, FALSE, FALSE); + float (__stdcall *capi_IVRCompositor_024_GetFrameTimeRemaining)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetFrameTimeRemaining(); + check_ptr_parameter("IVRCompositor_024_GetFrameTimeRemaining", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetCumulativeStats, 2, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_GetCumulativeStats)(Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetCumulativeStats((void *)1, 2); + check_ptr_parameter("IVRCompositor_024_GetCumulativeStats", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetCumulativeStats", (void *)1); + check_uint32_parameter("IVRCompositor_024_GetCumulativeStats", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_024_FadeToColor, 6, TRUE, TRUE); + void (__stdcall *capi_IVRCompositor_024_FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_FadeToColor(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 1); + check_ptr_parameter("IVRCompositor_024_FadeToColor", this_ptr_value); + check_float_parameter("IVRCompositor_024_FadeToColor", 1.0f); + check_float_parameter("IVRCompositor_024_FadeToColor", 2.0f); + check_float_parameter("IVRCompositor_024_FadeToColor", 3.0f); + check_float_parameter("IVRCompositor_024_FadeToColor", 4.0f); + check_float_parameter("IVRCompositor_024_FadeToColor", 5.0f); + check_bool_parameter("IVRCompositor_024_FadeToColor", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetCurrentFadeColor, 2, FALSE, FALSE); + HmdColor_t *(__stdcall *capi_IVRCompositor_024_GetCurrentFadeColor)(HmdColor_t *_r, bool bBackground) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetCurrentFadeColor(data_ptr_value, 1); + check_ptr_parameter("IVRCompositor_024_GetCurrentFadeColor", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetCurrentFadeColor", data_ptr_value); + check_bool_parameter("IVRCompositor_024_GetCurrentFadeColor", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_FadeGrid, 2, TRUE, FALSE); + void (__stdcall *capi_IVRCompositor_024_FadeGrid)(float fSeconds, bool bFadeIn) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_FadeGrid(1.0f, 1); + check_ptr_parameter("IVRCompositor_024_FadeGrid", this_ptr_value); + check_float_parameter("IVRCompositor_024_FadeGrid", 1.0f); + check_bool_parameter("IVRCompositor_024_FadeGrid", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetCurrentGridAlpha, 0, FALSE, FALSE); + float (__stdcall *capi_IVRCompositor_024_GetCurrentGridAlpha)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetCurrentGridAlpha(); + check_ptr_parameter("IVRCompositor_024_GetCurrentGridAlpha", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_SetSkyboxOverride, 2, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_SetSkyboxOverride)(Texture_t * pTextures, uint32_t unTextureCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_SetSkyboxOverride((void *)1, 2); + check_ptr_parameter("IVRCompositor_024_SetSkyboxOverride", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_SetSkyboxOverride", (void *)1); + check_uint32_parameter("IVRCompositor_024_SetSkyboxOverride", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ClearSkyboxOverride, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ClearSkyboxOverride)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ClearSkyboxOverride(); + check_ptr_parameter("IVRCompositor_024_ClearSkyboxOverride", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_CompositorBringToFront, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_CompositorBringToFront)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_CompositorBringToFront(); + check_ptr_parameter("IVRCompositor_024_CompositorBringToFront", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_CompositorGoToBack, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_CompositorGoToBack)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_CompositorGoToBack(); + check_ptr_parameter("IVRCompositor_024_CompositorGoToBack", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_CompositorQuit, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_CompositorQuit)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_CompositorQuit(); + check_ptr_parameter("IVRCompositor_024_CompositorQuit", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_IsFullscreen, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_IsFullscreen)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_IsFullscreen(); + check_ptr_parameter("IVRCompositor_024_IsFullscreen", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetCurrentSceneFocusProcess, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_024_GetCurrentSceneFocusProcess)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetCurrentSceneFocusProcess(); + check_ptr_parameter("IVRCompositor_024_GetCurrentSceneFocusProcess", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetLastFrameRenderer, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_024_GetLastFrameRenderer)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetLastFrameRenderer(); + check_ptr_parameter("IVRCompositor_024_GetLastFrameRenderer", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_CanRenderScene, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_CanRenderScene)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_CanRenderScene(); + check_ptr_parameter("IVRCompositor_024_CanRenderScene", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ShowMirrorWindow, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ShowMirrorWindow)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ShowMirrorWindow(); + check_ptr_parameter("IVRCompositor_024_ShowMirrorWindow", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_HideMirrorWindow, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_HideMirrorWindow)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_HideMirrorWindow(); + check_ptr_parameter("IVRCompositor_024_HideMirrorWindow", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_IsMirrorWindowVisible, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_IsMirrorWindowVisible)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_IsMirrorWindowVisible(); + check_ptr_parameter("IVRCompositor_024_IsMirrorWindowVisible", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_CompositorDumpImages, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_CompositorDumpImages)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_CompositorDumpImages(); + check_ptr_parameter("IVRCompositor_024_CompositorDumpImages", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ShouldAppRenderWithLowResources, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_ShouldAppRenderWithLowResources)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ShouldAppRenderWithLowResources(); + check_ptr_parameter("IVRCompositor_024_ShouldAppRenderWithLowResources", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ForceInterleavedReprojectionOn, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ForceInterleavedReprojectionOn)(bool bOverride) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ForceInterleavedReprojectionOn(1); + check_ptr_parameter("IVRCompositor_024_ForceInterleavedReprojectionOn", this_ptr_value); + check_bool_parameter("IVRCompositor_024_ForceInterleavedReprojectionOn", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ForceReconnectProcess, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ForceReconnectProcess)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ForceReconnectProcess(); + check_ptr_parameter("IVRCompositor_024_ForceReconnectProcess", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_SuspendRendering, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_SuspendRendering)(bool bSuspend) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_SuspendRendering(1); + check_ptr_parameter("IVRCompositor_024_SuspendRendering", this_ptr_value); + check_bool_parameter("IVRCompositor_024_SuspendRendering", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetMirrorTextureD3D11, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetMirrorTextureD3D11(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_024_GetMirrorTextureD3D11", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_GetMirrorTextureD3D11", 1); + check_ptr_parameter("IVRCompositor_024_GetMirrorTextureD3D11", (void *)2); + check_ptr_parameter("IVRCompositor_024_GetMirrorTextureD3D11", (void *)3); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ReleaseMirrorTextureD3D11, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ReleaseMirrorTextureD3D11)(void * pD3D11ShaderResourceView) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ReleaseMirrorTextureD3D11((void *)1); + check_ptr_parameter("IVRCompositor_024_ReleaseMirrorTextureD3D11", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_ReleaseMirrorTextureD3D11", (void *)1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetMirrorTextureGL, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetMirrorTextureGL(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_024_GetMirrorTextureGL", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_GetMirrorTextureGL", 1); + check_ptr_parameter("IVRCompositor_024_GetMirrorTextureGL", (void *)2); + check_ptr_parameter("IVRCompositor_024_GetMirrorTextureGL", (void *)3); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ReleaseSharedGLTexture, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ReleaseSharedGLTexture(1, (void *)2); + check_ptr_parameter("IVRCompositor_024_ReleaseSharedGLTexture", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_ReleaseSharedGLTexture", 1); + check_ptr_parameter("IVRCompositor_024_ReleaseSharedGLTexture", (void *)2); + + init_thunk(t, this_ptr_value, IVRCompositor_024_LockGLSharedTextureForAccess, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_LockGLSharedTextureForAccess((void *)1); + check_ptr_parameter("IVRCompositor_024_LockGLSharedTextureForAccess", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_LockGLSharedTextureForAccess", (void *)1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_UnlockGLSharedTextureForAccess, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_UnlockGLSharedTextureForAccess((void *)1); + check_ptr_parameter("IVRCompositor_024_UnlockGLSharedTextureForAccess", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_UnlockGLSharedTextureForAccess", (void *)1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetVulkanInstanceExtensionsRequired, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_024_GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetVulkanInstanceExtensionsRequired((void *)1, 2); + check_ptr_parameter("IVRCompositor_024_GetVulkanInstanceExtensionsRequired", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetVulkanInstanceExtensionsRequired", (void *)1); + check_uint32_parameter("IVRCompositor_024_GetVulkanInstanceExtensionsRequired", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_024_GetVulkanDeviceExtensionsRequired, 3, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_024_GetVulkanDeviceExtensionsRequired)(VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_GetVulkanDeviceExtensionsRequired((void *)1, (void *)2, 3); + check_ptr_parameter("IVRCompositor_024_GetVulkanDeviceExtensionsRequired", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_GetVulkanDeviceExtensionsRequired", (void *)1); + check_ptr_parameter("IVRCompositor_024_GetVulkanDeviceExtensionsRequired", (void *)2); + check_uint32_parameter("IVRCompositor_024_GetVulkanDeviceExtensionsRequired", 3); + + init_thunk(t, this_ptr_value, IVRCompositor_024_SetExplicitTimingMode, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_SetExplicitTimingMode(1); + check_ptr_parameter("IVRCompositor_024_SetExplicitTimingMode", this_ptr_value); + check_uint32_parameter("IVRCompositor_024_SetExplicitTimingMode", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_024_SubmitExplicitTimingData, 0, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_SubmitExplicitTimingData)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_SubmitExplicitTimingData(); + check_ptr_parameter("IVRCompositor_024_SubmitExplicitTimingData", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_IsMotionSmoothingEnabled, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_IsMotionSmoothingEnabled)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_IsMotionSmoothingEnabled(); + check_ptr_parameter("IVRCompositor_024_IsMotionSmoothingEnabled", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_IsMotionSmoothingSupported, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_IsMotionSmoothingSupported)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_IsMotionSmoothingSupported(); + check_ptr_parameter("IVRCompositor_024_IsMotionSmoothingSupported", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_IsCurrentSceneFocusAppLoading, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_024_IsCurrentSceneFocusAppLoading)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_IsCurrentSceneFocusAppLoading(); + check_ptr_parameter("IVRCompositor_024_IsCurrentSceneFocusAppLoading", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_024_SetStageOverride_Async, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_024_SetStageOverride_Async)(const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_SetStageOverride_Async((void *)1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_024_SetStageOverride_Async", this_ptr_value); + check_ptr_parameter("IVRCompositor_024_SetStageOverride_Async", (void *)1); + check_ptr_parameter("IVRCompositor_024_SetStageOverride_Async", (void *)2); + check_ptr_parameter("IVRCompositor_024_SetStageOverride_Async", (void *)3); + check_uint32_parameter("IVRCompositor_024_SetStageOverride_Async", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_024_ClearStageOverride, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_024_ClearStageOverride)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_024_ClearStageOverride(); + check_ptr_parameter("IVRCompositor_024_ClearStageOverride", this_ptr_value); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVROverlay_022(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVROverlay_022_FindOverlay, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_FindOverlay)(const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_FindOverlay((void *)1, (void *)2); + check_ptr_parameter("IVROverlay_022_FindOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_022_FindOverlay", (void *)1); + check_ptr_parameter("IVROverlay_022_FindOverlay", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_CreateOverlay, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_CreateOverlay)(const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_CreateOverlay((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_CreateOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_022_CreateOverlay", (void *)1); + check_ptr_parameter("IVROverlay_022_CreateOverlay", (void *)2); + check_ptr_parameter("IVROverlay_022_CreateOverlay", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_DestroyOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_DestroyOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_DestroyOverlay(1); + check_ptr_parameter("IVROverlay_022_DestroyOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_DestroyOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayKey, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_022_GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayKey(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayKey", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayKey", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayKey", (void *)2); + check_uint32_parameter("IVROverlay_022_GetOverlayKey", 3); + check_ptr_parameter("IVROverlay_022_GetOverlayKey", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayName, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_022_GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayName(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayName", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayName", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayName", (void *)2); + check_uint32_parameter("IVROverlay_022_GetOverlayName", 3); + check_ptr_parameter("IVROverlay_022_GetOverlayName", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayName, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayName)(VROverlayHandle_t ulOverlayHandle, const char * pchName) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayName(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayName", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayName", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayName", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayImageData, 5, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayImageData(1, (void *)2, 3, (void *)4, (void *)5); + check_ptr_parameter("IVROverlay_022_GetOverlayImageData", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayImageData", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayImageData", (void *)2); + check_uint32_parameter("IVROverlay_022_GetOverlayImageData", 3); + check_ptr_parameter("IVROverlay_022_GetOverlayImageData", (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayImageData", (void *)5); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayErrorNameFromEnum, 1, FALSE, FALSE); + const char * (__stdcall *capi_IVROverlay_022_GetOverlayErrorNameFromEnum)(EVROverlayError error) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayErrorNameFromEnum(1); + check_ptr_parameter("IVROverlay_022_GetOverlayErrorNameFromEnum", this_ptr_value); + check_uint32_parameter("IVROverlay_022_GetOverlayErrorNameFromEnum", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayRenderingPid, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayRenderingPid(1, 2); + check_ptr_parameter("IVROverlay_022_SetOverlayRenderingPid", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayRenderingPid", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayRenderingPid", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayRenderingPid, 1, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_022_GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayRenderingPid(1); + check_ptr_parameter("IVROverlay_022_GetOverlayRenderingPid", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayRenderingPid", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayFlag, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayFlag(1, 2, 1); + check_ptr_parameter("IVROverlay_022_SetOverlayFlag", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayFlag", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayFlag", 2); + check_bool_parameter("IVROverlay_022_SetOverlayFlag", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayFlag, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayFlag(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayFlag", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayFlag", 1); + check_uint32_parameter("IVROverlay_022_GetOverlayFlag", 2); + check_ptr_parameter("IVROverlay_022_GetOverlayFlag", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayFlags, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayFlags(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayFlags", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayFlags", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayFlags", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayColor, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayColor(1, 2.0f, 3.0f, 4.0f); + check_ptr_parameter("IVROverlay_022_SetOverlayColor", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayColor", 1); + check_float_parameter("IVROverlay_022_SetOverlayColor", 2.0f); + check_float_parameter("IVROverlay_022_SetOverlayColor", 3.0f); + check_float_parameter("IVROverlay_022_SetOverlayColor", 4.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayColor, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayColor(1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayColor", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayColor", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayColor", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayColor", (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayColor", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayAlpha, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayAlpha(1, 2.0f); + check_ptr_parameter("IVROverlay_022_SetOverlayAlpha", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayAlpha", 1); + check_float_parameter("IVROverlay_022_SetOverlayAlpha", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayAlpha, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayAlpha(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayAlpha", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayAlpha", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayAlpha", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTexelAspect, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTexelAspect(1, 2.0f); + check_ptr_parameter("IVROverlay_022_SetOverlayTexelAspect", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTexelAspect", 1); + check_float_parameter("IVROverlay_022_SetOverlayTexelAspect", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTexelAspect, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTexelAspect(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTexelAspect", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTexelAspect", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTexelAspect", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlaySortOrder, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlaySortOrder(1, 2); + check_ptr_parameter("IVROverlay_022_SetOverlaySortOrder", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlaySortOrder", 1); + check_uint32_parameter("IVROverlay_022_SetOverlaySortOrder", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlaySortOrder, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlaySortOrder(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlaySortOrder", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlaySortOrder", 1); + check_ptr_parameter("IVROverlay_022_GetOverlaySortOrder", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayWidthInMeters, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayWidthInMeters(1, 2.0f); + check_ptr_parameter("IVROverlay_022_SetOverlayWidthInMeters", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayWidthInMeters", 1); + check_float_parameter("IVROverlay_022_SetOverlayWidthInMeters", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayWidthInMeters, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayWidthInMeters(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayWidthInMeters", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayWidthInMeters", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayWidthInMeters", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayCurvature, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float fCurvature) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayCurvature(1, 2.0f); + check_ptr_parameter("IVROverlay_022_SetOverlayCurvature", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayCurvature", 1); + check_float_parameter("IVROverlay_022_SetOverlayCurvature", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayCurvature, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float * pfCurvature) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayCurvature(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayCurvature", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayCurvature", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayCurvature", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTextureColorSpace, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTextureColorSpace(1, 2); + check_ptr_parameter("IVROverlay_022_SetOverlayTextureColorSpace", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTextureColorSpace", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayTextureColorSpace", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTextureColorSpace, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTextureColorSpace(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureColorSpace", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTextureColorSpace", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureColorSpace", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTextureBounds, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTextureBounds(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayTextureBounds", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTextureBounds", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayTextureBounds", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTextureBounds, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTextureBounds(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureBounds", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTextureBounds", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureBounds", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayRenderModel, 5, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_022_GetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayRenderModel(1, (void *)2, 3, (void *)4, (void *)5); + check_ptr_parameter("IVROverlay_022_GetOverlayRenderModel", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayRenderModel", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayRenderModel", (void *)2); + check_uint32_parameter("IVROverlay_022_GetOverlayRenderModel", 3); + check_ptr_parameter("IVROverlay_022_GetOverlayRenderModel", (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayRenderModel", (void *)5); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayRenderModel, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayRenderModel(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_SetOverlayRenderModel", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayRenderModel", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayRenderModel", (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayRenderModel", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTransformType, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTransformType(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformType", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTransformType", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformType", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTransformAbsolute, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTransformAbsolute(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformAbsolute", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTransformAbsolute", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayTransformAbsolute", 2); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformAbsolute", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTransformAbsolute, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTransformAbsolute(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformAbsolute", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTransformAbsolute", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformAbsolute", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformAbsolute", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceRelative", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceRelative", 2); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceRelative", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceRelative", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTransformTrackedDeviceComponent, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceComponent", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceComponent", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceComponent", 2); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformTrackedDeviceComponent", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTransformTrackedDeviceComponent, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceComponent", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceComponent", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceComponent", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceComponent", (void *)3); + check_uint32_parameter("IVROverlay_022_GetOverlayTransformTrackedDeviceComponent", 4); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTransformOverlayRelative(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformOverlayRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTransformOverlayRelative", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformOverlayRelative", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformOverlayRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTransformOverlayRelative(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformOverlayRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTransformOverlayRelative", 1); + check_uint64_parameter("IVROverlay_022_SetOverlayTransformOverlayRelative", 2); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformOverlayRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTransformCursor, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTransformCursor)(VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTransformCursor(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformCursor", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTransformCursor", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayTransformCursor", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTransformCursor, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTransformCursor)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTransformCursor(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformCursor", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTransformCursor", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTransformCursor", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_ShowOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_ShowOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ShowOverlay(1); + check_ptr_parameter("IVROverlay_022_ShowOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_ShowOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_HideOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_HideOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_HideOverlay(1); + check_ptr_parameter("IVROverlay_022_HideOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_HideOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_IsOverlayVisible, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_022_IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_IsOverlayVisible(1); + check_ptr_parameter("IVROverlay_022_IsOverlayVisible", this_ptr_value); + check_uint64_parameter("IVROverlay_022_IsOverlayVisible", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetTransformForOverlayCoordinates, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetTransformForOverlayCoordinates(1, 2, DEFAULT_VECTOR2, (void *)4); + check_ptr_parameter("IVROverlay_022_GetTransformForOverlayCoordinates", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetTransformForOverlayCoordinates", 1); + check_uint32_parameter("IVROverlay_022_GetTransformForOverlayCoordinates", 2); + check_HmdVector2_parameter("IVROverlay_022_GetTransformForOverlayCoordinates", DEFAULT_VECTOR2); + check_ptr_parameter("IVROverlay_022_GetTransformForOverlayCoordinates", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_022_PollNextOverlayEvent, 3, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_022_PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_PollNextOverlayEvent(1, (void *)2, 3); + check_ptr_parameter("IVROverlay_022_PollNextOverlayEvent", this_ptr_value); + check_uint64_parameter("IVROverlay_022_PollNextOverlayEvent", 1); + check_ptr_parameter("IVROverlay_022_PollNextOverlayEvent", (void *)2); + check_uint32_parameter("IVROverlay_022_PollNextOverlayEvent", 3); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayInputMethod, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayInputMethod(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayInputMethod", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayInputMethod", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayInputMethod", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayInputMethod, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayInputMethod(1, 2); + check_ptr_parameter("IVROverlay_022_SetOverlayInputMethod", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayInputMethod", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayInputMethod", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayMouseScale, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayMouseScale(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayMouseScale", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayMouseScale", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayMouseScale", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayMouseScale, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayMouseScale(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayMouseScale", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayMouseScale", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayMouseScale", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_ComputeOverlayIntersection, 3, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_022_ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ComputeOverlayIntersection(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_ComputeOverlayIntersection", this_ptr_value); + check_uint64_parameter("IVROverlay_022_ComputeOverlayIntersection", 1); + check_ptr_parameter("IVROverlay_022_ComputeOverlayIntersection", (void *)2); + check_ptr_parameter("IVROverlay_022_ComputeOverlayIntersection", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_IsHoverTargetOverlay, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_022_IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_IsHoverTargetOverlay(1); + check_ptr_parameter("IVROverlay_022_IsHoverTargetOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_IsHoverTargetOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayDualAnalogTransform, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayDualAnalogTransform(1, 2, (void *)3, 4.0f); + check_ptr_parameter("IVROverlay_022_SetOverlayDualAnalogTransform", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayDualAnalogTransform", 1); + check_uint32_parameter("IVROverlay_022_SetOverlayDualAnalogTransform", 2); + check_ptr_parameter("IVROverlay_022_SetOverlayDualAnalogTransform", (void *)3); + check_float_parameter("IVROverlay_022_SetOverlayDualAnalogTransform", 4.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayDualAnalogTransform, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayDualAnalogTransform(1, 2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayDualAnalogTransform", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayDualAnalogTransform", 1); + check_uint32_parameter("IVROverlay_022_GetOverlayDualAnalogTransform", 2); + check_ptr_parameter("IVROverlay_022_GetOverlayDualAnalogTransform", (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayDualAnalogTransform", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayIntersectionMask, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayIntersectionMask(1, (void *)2, 3, 4); + check_ptr_parameter("IVROverlay_022_SetOverlayIntersectionMask", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayIntersectionMask", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayIntersectionMask", (void *)2); + check_uint32_parameter("IVROverlay_022_SetOverlayIntersectionMask", 3); + check_uint32_parameter("IVROverlay_022_SetOverlayIntersectionMask", 4); + + init_thunk(t, this_ptr_value, IVROverlay_022_TriggerLaserMouseHapticVibration, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_022_TriggerLaserMouseHapticVibration)(VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_TriggerLaserMouseHapticVibration(1, 2.0f, 3.0f, 4.0f); + check_ptr_parameter("IVROverlay_022_TriggerLaserMouseHapticVibration", this_ptr_value); + check_uint64_parameter("IVROverlay_022_TriggerLaserMouseHapticVibration", 1); + check_float_parameter("IVROverlay_022_TriggerLaserMouseHapticVibration", 2.0f); + check_float_parameter("IVROverlay_022_TriggerLaserMouseHapticVibration", 3.0f); + check_float_parameter("IVROverlay_022_TriggerLaserMouseHapticVibration", 4.0f); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayCursor, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayCursor)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayCursor(1, 2); + check_ptr_parameter("IVROverlay_022_SetOverlayCursor", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayCursor", 1); + check_uint64_parameter("IVROverlay_022_SetOverlayCursor", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayCursorPositionOverride, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayCursorPositionOverride(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayCursorPositionOverride", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayCursorPositionOverride", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayCursorPositionOverride", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_ClearOverlayCursorPositionOverride, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_ClearOverlayCursorPositionOverride)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ClearOverlayCursorPositionOverride(1); + check_ptr_parameter("IVROverlay_022_ClearOverlayCursorPositionOverride", this_ptr_value); + check_uint64_parameter("IVROverlay_022_ClearOverlayCursorPositionOverride", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayTexture, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayTexture(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayTexture", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayTexture", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_ClearOverlayTexture, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ClearOverlayTexture(1); + check_ptr_parameter("IVROverlay_022_ClearOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_022_ClearOverlayTexture", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayRaw, 5, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayRaw(1, (void *)2, 3, 4, 5); + check_ptr_parameter("IVROverlay_022_SetOverlayRaw", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayRaw", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayRaw", (void *)2); + check_uint32_parameter("IVROverlay_022_SetOverlayRaw", 3); + check_uint32_parameter("IVROverlay_022_SetOverlayRaw", 4); + check_uint32_parameter("IVROverlay_022_SetOverlayRaw", 5); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetOverlayFromFile, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetOverlayFromFile(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetOverlayFromFile", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetOverlayFromFile", 1); + check_ptr_parameter("IVROverlay_022_SetOverlayFromFile", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTexture, 9, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTexture(1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6, (void *)7, (void *)8, (void *)9); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTexture", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)4); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)5); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)6); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)7); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)8); + check_ptr_parameter("IVROverlay_022_GetOverlayTexture", (void *)9); + + init_thunk(t, this_ptr_value, IVROverlay_022_ReleaseNativeOverlayHandle, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ReleaseNativeOverlayHandle(1, (void *)2); + check_ptr_parameter("IVROverlay_022_ReleaseNativeOverlayHandle", this_ptr_value); + check_uint64_parameter("IVROverlay_022_ReleaseNativeOverlayHandle", 1); + check_ptr_parameter("IVROverlay_022_ReleaseNativeOverlayHandle", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetOverlayTextureSize, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetOverlayTextureSize(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureSize", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetOverlayTextureSize", 1); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureSize", (void *)2); + check_ptr_parameter("IVROverlay_022_GetOverlayTextureSize", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_022_CreateDashboardOverlay, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_CreateDashboardOverlay)(const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_CreateDashboardOverlay((void *)1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_022_CreateDashboardOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_022_CreateDashboardOverlay", (void *)1); + check_ptr_parameter("IVROverlay_022_CreateDashboardOverlay", (void *)2); + check_ptr_parameter("IVROverlay_022_CreateDashboardOverlay", (void *)3); + check_ptr_parameter("IVROverlay_022_CreateDashboardOverlay", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_022_IsDashboardVisible, 0, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_022_IsDashboardVisible)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_IsDashboardVisible(); + check_ptr_parameter("IVROverlay_022_IsDashboardVisible", this_ptr_value); + + init_thunk(t, this_ptr_value, IVROverlay_022_IsActiveDashboardOverlay, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_022_IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_IsActiveDashboardOverlay(1); + check_ptr_parameter("IVROverlay_022_IsActiveDashboardOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_IsActiveDashboardOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetDashboardOverlaySceneProcess(1, 2); + check_ptr_parameter("IVROverlay_022_SetDashboardOverlaySceneProcess", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetDashboardOverlaySceneProcess", 1); + check_uint32_parameter("IVROverlay_022_SetDashboardOverlaySceneProcess", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetDashboardOverlaySceneProcess(1, (void *)2); + check_ptr_parameter("IVROverlay_022_GetDashboardOverlaySceneProcess", this_ptr_value); + check_uint64_parameter("IVROverlay_022_GetDashboardOverlaySceneProcess", 1); + check_ptr_parameter("IVROverlay_022_GetDashboardOverlaySceneProcess", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_ShowDashboard, 1, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_022_ShowDashboard)(const char * pchOverlayToShow) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ShowDashboard((void *)1); + check_ptr_parameter("IVROverlay_022_ShowDashboard", this_ptr_value); + check_ptr_parameter("IVROverlay_022_ShowDashboard", (void *)1); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetPrimaryDashboardDevice, 0, FALSE, FALSE); + TrackedDeviceIndex_t (__stdcall *capi_IVROverlay_022_GetPrimaryDashboardDevice)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetPrimaryDashboardDevice(); + check_ptr_parameter("IVROverlay_022_GetPrimaryDashboardDevice", this_ptr_value); + + init_thunk(t, this_ptr_value, IVROverlay_022_ShowKeyboard, 7, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ShowKeyboard(1, 2, (void *)3, 4, (void *)5, 1, 7); + check_ptr_parameter("IVROverlay_022_ShowKeyboard", this_ptr_value); + check_uint32_parameter("IVROverlay_022_ShowKeyboard", 1); + check_uint32_parameter("IVROverlay_022_ShowKeyboard", 2); + check_ptr_parameter("IVROverlay_022_ShowKeyboard", (void *)3); + check_uint32_parameter("IVROverlay_022_ShowKeyboard", 4); + check_ptr_parameter("IVROverlay_022_ShowKeyboard", (void *)5); + check_bool_parameter("IVROverlay_022_ShowKeyboard", 1); + check_uint64_parameter("IVROverlay_022_ShowKeyboard", 7); + + init_thunk(t, this_ptr_value, IVROverlay_022_ShowKeyboardForOverlay, 8, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_022_ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ShowKeyboardForOverlay(1, 2, 3, (void *)4, 5, (void *)6, 1, 8); + check_ptr_parameter("IVROverlay_022_ShowKeyboardForOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_ShowKeyboardForOverlay", 1); + check_uint32_parameter("IVROverlay_022_ShowKeyboardForOverlay", 2); + check_uint32_parameter("IVROverlay_022_ShowKeyboardForOverlay", 3); + check_ptr_parameter("IVROverlay_022_ShowKeyboardForOverlay", (void *)4); + check_uint32_parameter("IVROverlay_022_ShowKeyboardForOverlay", 5); + check_ptr_parameter("IVROverlay_022_ShowKeyboardForOverlay", (void *)6); + check_bool_parameter("IVROverlay_022_ShowKeyboardForOverlay", 1); + check_uint64_parameter("IVROverlay_022_ShowKeyboardForOverlay", 8); + + init_thunk(t, this_ptr_value, IVROverlay_022_GetKeyboardText, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_022_GetKeyboardText)(char * pchText, uint32_t cchText) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_GetKeyboardText((void *)1, 2); + check_ptr_parameter("IVROverlay_022_GetKeyboardText", this_ptr_value); + check_ptr_parameter("IVROverlay_022_GetKeyboardText", (void *)1); + check_uint32_parameter("IVROverlay_022_GetKeyboardText", 2); + + init_thunk(t, this_ptr_value, IVROverlay_022_HideKeyboard, 0, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_022_HideKeyboard)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_HideKeyboard(); + check_ptr_parameter("IVROverlay_022_HideKeyboard", this_ptr_value); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetKeyboardTransformAbsolute, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_022_SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetKeyboardTransformAbsolute(1, (void *)2); + check_ptr_parameter("IVROverlay_022_SetKeyboardTransformAbsolute", this_ptr_value); + check_uint32_parameter("IVROverlay_022_SetKeyboardTransformAbsolute", 1); + check_ptr_parameter("IVROverlay_022_SetKeyboardTransformAbsolute", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_022_SetKeyboardPositionForOverlay, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_022_SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_SetKeyboardPositionForOverlay(1, DEFAULT_RECT); + check_ptr_parameter("IVROverlay_022_SetKeyboardPositionForOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_022_SetKeyboardPositionForOverlay", 1); + check_HmdRect2_parameter("IVROverlay_022_SetKeyboardPositionForOverlay", DEFAULT_RECT); + + init_thunk(t, this_ptr_value, IVROverlay_022_ShowMessageOverlay, 6, FALSE, FALSE); + VRMessageOverlayResponse (__stdcall *capi_IVROverlay_022_ShowMessageOverlay)(const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_ShowMessageOverlay((void *)1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", (void *)1); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", (void *)2); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", (void *)3); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", (void *)4); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", (void *)5); + check_ptr_parameter("IVROverlay_022_ShowMessageOverlay", (void *)6); + + init_thunk(t, this_ptr_value, IVROverlay_022_CloseMessageOverlay, 0, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_022_CloseMessageOverlay)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_022_CloseMessageOverlay(); + check_ptr_parameter("IVROverlay_022_CloseMessageOverlay", this_ptr_value); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVRInput_007(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRInput_007_SetActionManifestPath, 1, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_SetActionManifestPath)(const char * pchActionManifestPath) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_SetActionManifestPath((void *)1); + check_ptr_parameter("IVRInput_007_SetActionManifestPath", this_ptr_value); + check_ptr_parameter("IVRInput_007_SetActionManifestPath", (void *)1); + + init_thunk(t, this_ptr_value, IVRInput_007_GetActionSetHandle, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetActionSetHandle)(const char * pchActionSetName, VRActionSetHandle_t * pHandle) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetActionSetHandle((void *)1, (void *)2); + check_ptr_parameter("IVRInput_007_GetActionSetHandle", this_ptr_value); + check_ptr_parameter("IVRInput_007_GetActionSetHandle", (void *)1); + check_ptr_parameter("IVRInput_007_GetActionSetHandle", (void *)2); + + init_thunk(t, this_ptr_value, IVRInput_007_GetActionHandle, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetActionHandle)(const char * pchActionName, VRActionHandle_t * pHandle) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetActionHandle((void *)1, (void *)2); + check_ptr_parameter("IVRInput_007_GetActionHandle", this_ptr_value); + check_ptr_parameter("IVRInput_007_GetActionHandle", (void *)1); + check_ptr_parameter("IVRInput_007_GetActionHandle", (void *)2); + + init_thunk(t, this_ptr_value, IVRInput_007_GetInputSourceHandle, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetInputSourceHandle)(const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetInputSourceHandle((void *)1, (void *)2); + check_ptr_parameter("IVRInput_007_GetInputSourceHandle", this_ptr_value); + check_ptr_parameter("IVRInput_007_GetInputSourceHandle", (void *)1); + check_ptr_parameter("IVRInput_007_GetInputSourceHandle", (void *)2); + + init_thunk(t, this_ptr_value, IVRInput_007_UpdateActionState, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_UpdateActionState)(VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_UpdateActionState((void *)1, 2, 3); + check_ptr_parameter("IVRInput_007_UpdateActionState", this_ptr_value); + check_ptr_parameter("IVRInput_007_UpdateActionState", (void *)1); + check_uint32_parameter("IVRInput_007_UpdateActionState", 2); + check_uint32_parameter("IVRInput_007_UpdateActionState", 3); + + init_thunk(t, this_ptr_value, IVRInput_007_GetDigitalActionData, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetDigitalActionData)(VRActionHandle_t action, InputDigitalActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetDigitalActionData(1, (void *)2, 3, 4); + check_ptr_parameter("IVRInput_007_GetDigitalActionData", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetDigitalActionData", 1); + check_ptr_parameter("IVRInput_007_GetDigitalActionData", (void *)2); + check_uint32_parameter("IVRInput_007_GetDigitalActionData", 3); + check_uint64_parameter("IVRInput_007_GetDigitalActionData", 4); + + init_thunk(t, this_ptr_value, IVRInput_007_GetAnalogActionData, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetAnalogActionData)(VRActionHandle_t action, InputAnalogActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetAnalogActionData(1, (void *)2, 3, 4); + check_ptr_parameter("IVRInput_007_GetAnalogActionData", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetAnalogActionData", 1); + check_ptr_parameter("IVRInput_007_GetAnalogActionData", (void *)2); + check_uint32_parameter("IVRInput_007_GetAnalogActionData", 3); + check_uint64_parameter("IVRInput_007_GetAnalogActionData", 4); + + init_thunk(t, this_ptr_value, IVRInput_007_GetPoseActionDataRelativeToNow, 6, TRUE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetPoseActionDataRelativeToNow)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetPoseActionDataRelativeToNow(1, 2, 3.0f, (void *)4, 5, 6); + check_ptr_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 1); + check_uint32_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 2); + check_float_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 3.0f); + check_ptr_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", (void *)4); + check_uint32_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 5); + check_uint64_parameter("IVRInput_007_GetPoseActionDataRelativeToNow", 6); + + init_thunk(t, this_ptr_value, IVRInput_007_GetPoseActionDataForNextFrame, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetPoseActionDataForNextFrame)(VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, InputPoseActionData_t * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetPoseActionDataForNextFrame(1, 2, (void *)3, 4, 5); + check_ptr_parameter("IVRInput_007_GetPoseActionDataForNextFrame", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 1); + check_uint32_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 2); + check_ptr_parameter("IVRInput_007_GetPoseActionDataForNextFrame", (void *)3); + check_uint32_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 4); + check_uint64_parameter("IVRInput_007_GetPoseActionDataForNextFrame", 5); + + init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalActionData, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalActionData)(VRActionHandle_t action, InputSkeletalActionData_t * pActionData, uint32_t unActionDataSize) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetSkeletalActionData(1, (void *)2, 3); + check_ptr_parameter("IVRInput_007_GetSkeletalActionData", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetSkeletalActionData", 1); + check_ptr_parameter("IVRInput_007_GetSkeletalActionData", (void *)2); + check_uint32_parameter("IVRInput_007_GetSkeletalActionData", 3); + + init_thunk(t, this_ptr_value, IVRInput_007_GetBoneCount, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetBoneCount)(VRActionHandle_t action, uint32_t * pBoneCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetBoneCount(1, (void *)2); + check_ptr_parameter("IVRInput_007_GetBoneCount", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetBoneCount", 1); + check_ptr_parameter("IVRInput_007_GetBoneCount", (void *)2); + + init_thunk(t, this_ptr_value, IVRInput_007_GetBoneHierarchy, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetBoneHierarchy)(VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetBoneHierarchy(1, (void *)2, 3); + check_ptr_parameter("IVRInput_007_GetBoneHierarchy", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetBoneHierarchy", 1); + check_ptr_parameter("IVRInput_007_GetBoneHierarchy", (void *)2); + check_uint32_parameter("IVRInput_007_GetBoneHierarchy", 3); + + init_thunk(t, this_ptr_value, IVRInput_007_GetBoneName, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetBoneName)(VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetBoneName(1, 2, (void *)3, 4); + check_ptr_parameter("IVRInput_007_GetBoneName", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetBoneName", 1); + check_uint32_parameter("IVRInput_007_GetBoneName", 2); + check_ptr_parameter("IVRInput_007_GetBoneName", (void *)3); + check_uint32_parameter("IVRInput_007_GetBoneName", 4); + + init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalReferenceTransforms, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalReferenceTransforms)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetSkeletalReferenceTransforms(1, 2, 3, (void *)4, 5); + check_ptr_parameter("IVRInput_007_GetSkeletalReferenceTransforms", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 1); + check_uint32_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 2); + check_uint32_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 3); + check_ptr_parameter("IVRInput_007_GetSkeletalReferenceTransforms", (void *)4); + check_uint32_parameter("IVRInput_007_GetSkeletalReferenceTransforms", 5); + + init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalTrackingLevel, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalTrackingLevel)(VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetSkeletalTrackingLevel(1, (void *)2); + check_ptr_parameter("IVRInput_007_GetSkeletalTrackingLevel", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetSkeletalTrackingLevel", 1); + check_ptr_parameter("IVRInput_007_GetSkeletalTrackingLevel", (void *)2); + + init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalBoneData, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalBoneData)(VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetSkeletalBoneData(1, 2, 3, (void *)4, 5); + check_ptr_parameter("IVRInput_007_GetSkeletalBoneData", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetSkeletalBoneData", 1); + check_uint32_parameter("IVRInput_007_GetSkeletalBoneData", 2); + check_uint32_parameter("IVRInput_007_GetSkeletalBoneData", 3); + check_ptr_parameter("IVRInput_007_GetSkeletalBoneData", (void *)4); + check_uint32_parameter("IVRInput_007_GetSkeletalBoneData", 5); + + init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalSummaryData, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalSummaryData)(VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetSkeletalSummaryData(1, 2, (void *)3); + check_ptr_parameter("IVRInput_007_GetSkeletalSummaryData", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetSkeletalSummaryData", 1); + check_uint32_parameter("IVRInput_007_GetSkeletalSummaryData", 2); + check_ptr_parameter("IVRInput_007_GetSkeletalSummaryData", (void *)3); + + init_thunk(t, this_ptr_value, IVRInput_007_GetSkeletalBoneDataCompressed, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetSkeletalBoneDataCompressed)(VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetSkeletalBoneDataCompressed(1, 2, (void *)3, 4, (void *)5); + check_ptr_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", 1); + check_uint32_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", 2); + check_ptr_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", (void *)3); + check_uint32_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", 4); + check_ptr_parameter("IVRInput_007_GetSkeletalBoneDataCompressed", (void *)5); + + init_thunk(t, this_ptr_value, IVRInput_007_DecompressSkeletalBoneData, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_DecompressSkeletalBoneData)(const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_DecompressSkeletalBoneData((void *)1, 2, 3, (void *)4, 5); + check_ptr_parameter("IVRInput_007_DecompressSkeletalBoneData", this_ptr_value); + check_ptr_parameter("IVRInput_007_DecompressSkeletalBoneData", (void *)1); + check_uint32_parameter("IVRInput_007_DecompressSkeletalBoneData", 2); + check_uint32_parameter("IVRInput_007_DecompressSkeletalBoneData", 3); + check_ptr_parameter("IVRInput_007_DecompressSkeletalBoneData", (void *)4); + check_uint32_parameter("IVRInput_007_DecompressSkeletalBoneData", 5); + + init_thunk(t, this_ptr_value, IVRInput_007_TriggerHapticVibrationAction, 6, TRUE, TRUE); + EVRInputError (__stdcall *capi_IVRInput_007_TriggerHapticVibrationAction)(VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_TriggerHapticVibrationAction(1, 2.0f, 3.0f, 4.0f, 5.0f, 6); + check_ptr_parameter("IVRInput_007_TriggerHapticVibrationAction", this_ptr_value); + check_uint64_parameter("IVRInput_007_TriggerHapticVibrationAction", 1); + check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 2.0f); + check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 3.0f); + check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 4.0f); + check_float_parameter("IVRInput_007_TriggerHapticVibrationAction", 5.0f); + check_uint64_parameter("IVRInput_007_TriggerHapticVibrationAction", 6); + + init_thunk(t, this_ptr_value, IVRInput_007_GetActionOrigins, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetActionOrigins(1, 2, (void *)3, 4); + check_ptr_parameter("IVRInput_007_GetActionOrigins", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetActionOrigins", 1); + check_uint64_parameter("IVRInput_007_GetActionOrigins", 2); + check_ptr_parameter("IVRInput_007_GetActionOrigins", (void *)3); + check_uint32_parameter("IVRInput_007_GetActionOrigins", 4); + + init_thunk(t, this_ptr_value, IVRInput_007_GetOriginLocalizedName, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetOriginLocalizedName)(VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetOriginLocalizedName(1, (void *)2, 3, 4); + check_ptr_parameter("IVRInput_007_GetOriginLocalizedName", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetOriginLocalizedName", 1); + check_ptr_parameter("IVRInput_007_GetOriginLocalizedName", (void *)2); + check_uint32_parameter("IVRInput_007_GetOriginLocalizedName", 3); + check_uint32_parameter("IVRInput_007_GetOriginLocalizedName", 4); + + init_thunk(t, this_ptr_value, IVRInput_007_GetOriginTrackedDeviceInfo, 3, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetOriginTrackedDeviceInfo)(VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetOriginTrackedDeviceInfo(1, (void *)2, 3); + check_ptr_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", 1); + check_ptr_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", (void *)2); + check_uint32_parameter("IVRInput_007_GetOriginTrackedDeviceInfo", 3); + + init_thunk(t, this_ptr_value, IVRInput_007_GetActionBindingInfo, 5, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_GetActionBindingInfo)(VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_GetActionBindingInfo(1, (void *)2, 3, 4, (void *)5); + check_ptr_parameter("IVRInput_007_GetActionBindingInfo", this_ptr_value); + check_uint64_parameter("IVRInput_007_GetActionBindingInfo", 1); + check_ptr_parameter("IVRInput_007_GetActionBindingInfo", (void *)2); + check_uint32_parameter("IVRInput_007_GetActionBindingInfo", 3); + check_uint32_parameter("IVRInput_007_GetActionBindingInfo", 4); + check_ptr_parameter("IVRInput_007_GetActionBindingInfo", (void *)5); + + init_thunk(t, this_ptr_value, IVRInput_007_ShowActionOrigins, 2, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_ShowActionOrigins)(VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_ShowActionOrigins(1, 2); + check_ptr_parameter("IVRInput_007_ShowActionOrigins", this_ptr_value); + check_uint64_parameter("IVRInput_007_ShowActionOrigins", 1); + check_uint64_parameter("IVRInput_007_ShowActionOrigins", 2); + + init_thunk(t, this_ptr_value, IVRInput_007_ShowBindingsForActionSet, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_ShowBindingsForActionSet)(VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_ShowBindingsForActionSet((void *)1, 2, 3, 4); + check_ptr_parameter("IVRInput_007_ShowBindingsForActionSet", this_ptr_value); + check_ptr_parameter("IVRInput_007_ShowBindingsForActionSet", (void *)1); + check_uint32_parameter("IVRInput_007_ShowBindingsForActionSet", 2); + check_uint32_parameter("IVRInput_007_ShowBindingsForActionSet", 3); + check_uint64_parameter("IVRInput_007_ShowBindingsForActionSet", 4); + + init_thunk(t, this_ptr_value, IVRInput_007_IsUsingLegacyInput, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRInput_007_IsUsingLegacyInput)() = (void *)t; + + clear_parameters(); + capi_IVRInput_007_IsUsingLegacyInput(); + check_ptr_parameter("IVRInput_007_IsUsingLegacyInput", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRInput_007_OpenBindingUI, 4, FALSE, FALSE); + EVRInputError (__stdcall *capi_IVRInput_007_OpenBindingUI)(const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) = (void *)t; + + clear_parameters(); + capi_IVRInput_007_OpenBindingUI((void *)1, 2, 3, 1); + check_ptr_parameter("IVRInput_007_OpenBindingUI", this_ptr_value); + check_ptr_parameter("IVRInput_007_OpenBindingUI", (void *)1); + check_uint64_parameter("IVRInput_007_OpenBindingUI", 2); + check_uint64_parameter("IVRInput_007_OpenBindingUI", 3); + check_bool_parameter("IVRInput_007_OpenBindingUI", 1); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVRSettings_002(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRSettings_002_GetSettingsErrorNameFromEnum, 1, FALSE, FALSE); + const char * (__stdcall *capi_IVRSettings_002_GetSettingsErrorNameFromEnum)(EVRSettingsError eError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_GetSettingsErrorNameFromEnum(1); + check_ptr_parameter("IVRSettings_002_GetSettingsErrorNameFromEnum", this_ptr_value); + check_uint32_parameter("IVRSettings_002_GetSettingsErrorNameFromEnum", 1); + + init_thunk(t, this_ptr_value, IVRSettings_002_Sync, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRSettings_002_Sync)(bool bForce, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_Sync(1, (void *)2); + check_ptr_parameter("IVRSettings_002_Sync", this_ptr_value); + check_bool_parameter("IVRSettings_002_Sync", 1); + check_ptr_parameter("IVRSettings_002_Sync", (void *)2); + + init_thunk(t, this_ptr_value, IVRSettings_002_SetBool, 4, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_002_SetBool)(const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_SetBool((void *)1, (void *)2, 1, (void *)4); + check_ptr_parameter("IVRSettings_002_SetBool", this_ptr_value); + check_ptr_parameter("IVRSettings_002_SetBool", (void *)1); + check_ptr_parameter("IVRSettings_002_SetBool", (void *)2); + check_bool_parameter("IVRSettings_002_SetBool", 1); + check_ptr_parameter("IVRSettings_002_SetBool", (void *)4); + + init_thunk(t, this_ptr_value, IVRSettings_002_SetInt32, 4, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_002_SetInt32)(const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_SetInt32((void *)1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVRSettings_002_SetInt32", this_ptr_value); + check_ptr_parameter("IVRSettings_002_SetInt32", (void *)1); + check_ptr_parameter("IVRSettings_002_SetInt32", (void *)2); + check_uint32_parameter("IVRSettings_002_SetInt32", 3); + check_ptr_parameter("IVRSettings_002_SetInt32", (void *)4); + + init_thunk(t, this_ptr_value, IVRSettings_002_SetFloat, 4, TRUE, FALSE); + void (__stdcall *capi_IVRSettings_002_SetFloat)(const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_SetFloat((void *)1, (void *)2, 3.0f, (void *)4); + check_ptr_parameter("IVRSettings_002_SetFloat", this_ptr_value); + check_ptr_parameter("IVRSettings_002_SetFloat", (void *)1); + check_ptr_parameter("IVRSettings_002_SetFloat", (void *)2); + check_float_parameter("IVRSettings_002_SetFloat", 3.0f); + check_ptr_parameter("IVRSettings_002_SetFloat", (void *)4); + + init_thunk(t, this_ptr_value, IVRSettings_002_SetString, 4, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_002_SetString)(const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_SetString((void *)1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVRSettings_002_SetString", this_ptr_value); + check_ptr_parameter("IVRSettings_002_SetString", (void *)1); + check_ptr_parameter("IVRSettings_002_SetString", (void *)2); + check_ptr_parameter("IVRSettings_002_SetString", (void *)3); + check_ptr_parameter("IVRSettings_002_SetString", (void *)4); + + init_thunk(t, this_ptr_value, IVRSettings_002_GetBool, 3, FALSE, FALSE); + bool (__stdcall *capi_IVRSettings_002_GetBool)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_GetBool((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_002_GetBool", this_ptr_value); + check_ptr_parameter("IVRSettings_002_GetBool", (void *)1); + check_ptr_parameter("IVRSettings_002_GetBool", (void *)2); + check_ptr_parameter("IVRSettings_002_GetBool", (void *)3); + + init_thunk(t, this_ptr_value, IVRSettings_002_GetInt32, 3, FALSE, FALSE); + int32_t (__stdcall *capi_IVRSettings_002_GetInt32)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_GetInt32((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_002_GetInt32", this_ptr_value); + check_ptr_parameter("IVRSettings_002_GetInt32", (void *)1); + check_ptr_parameter("IVRSettings_002_GetInt32", (void *)2); + check_ptr_parameter("IVRSettings_002_GetInt32", (void *)3); + + init_thunk(t, this_ptr_value, IVRSettings_002_GetFloat, 3, FALSE, FALSE); + float (__stdcall *capi_IVRSettings_002_GetFloat)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_GetFloat((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_002_GetFloat", this_ptr_value); + check_ptr_parameter("IVRSettings_002_GetFloat", (void *)1); + check_ptr_parameter("IVRSettings_002_GetFloat", (void *)2); + check_ptr_parameter("IVRSettings_002_GetFloat", (void *)3); + + init_thunk(t, this_ptr_value, IVRSettings_002_GetString, 5, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_002_GetString)(const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_GetString((void *)1, (void *)2, (void *)3, 4, (void *)5); + check_ptr_parameter("IVRSettings_002_GetString", this_ptr_value); + check_ptr_parameter("IVRSettings_002_GetString", (void *)1); + check_ptr_parameter("IVRSettings_002_GetString", (void *)2); + check_ptr_parameter("IVRSettings_002_GetString", (void *)3); + check_uint32_parameter("IVRSettings_002_GetString", 4); + check_ptr_parameter("IVRSettings_002_GetString", (void *)5); + + init_thunk(t, this_ptr_value, IVRSettings_002_RemoveSection, 2, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_002_RemoveSection)(const char * pchSection, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_RemoveSection((void *)1, (void *)2); + check_ptr_parameter("IVRSettings_002_RemoveSection", this_ptr_value); + check_ptr_parameter("IVRSettings_002_RemoveSection", (void *)1); + check_ptr_parameter("IVRSettings_002_RemoveSection", (void *)2); + + init_thunk(t, this_ptr_value, IVRSettings_002_RemoveKeyInSection, 3, FALSE, FALSE); + void (__stdcall *capi_IVRSettings_002_RemoveKeyInSection)(const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) = (void *)t; + + clear_parameters(); + capi_IVRSettings_002_RemoveKeyInSection((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", this_ptr_value); + check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", (void *)1); + check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", (void *)2); + check_ptr_parameter("IVRSettings_002_RemoveKeyInSection", (void *)3); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVRCompositor_022(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_SetTrackingSpace, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_SetTrackingSpace)(ETrackingUniverseOrigin eOrigin) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_SetTrackingSpace(1); + check_ptr_parameter("IVRCompositor_022_SetTrackingSpace", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_SetTrackingSpace", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetTrackingSpace, 0, FALSE, FALSE); + ETrackingUniverseOrigin (__stdcall *capi_IVRCompositor_022_GetTrackingSpace)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetTrackingSpace(); + check_ptr_parameter("IVRCompositor_022_GetTrackingSpace", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_WaitGetPoses, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_WaitGetPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_WaitGetPoses((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_022_WaitGetPoses", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_WaitGetPoses", (void *)1); + check_uint32_parameter("IVRCompositor_022_WaitGetPoses", 2); + check_ptr_parameter("IVRCompositor_022_WaitGetPoses", (void *)3); + check_uint32_parameter("IVRCompositor_022_WaitGetPoses", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetLastPoses, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetLastPoses)(TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetLastPoses((void *)1, 2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_022_GetLastPoses", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetLastPoses", (void *)1); + check_uint32_parameter("IVRCompositor_022_GetLastPoses", 2); + check_ptr_parameter("IVRCompositor_022_GetLastPoses", (void *)3); + check_uint32_parameter("IVRCompositor_022_GetLastPoses", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetLastPoseForTrackedDeviceIndex, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetLastPoseForTrackedDeviceIndex(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", 1); + check_ptr_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", (void *)2); + check_ptr_parameter("IVRCompositor_022_GetLastPoseForTrackedDeviceIndex", (void *)3); + + init_thunk(t, this_ptr_value, IVRCompositor_022_Submit, 4, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_Submit)(EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_Submit(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVRCompositor_022_Submit", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_Submit", 1); + check_ptr_parameter("IVRCompositor_022_Submit", (void *)2); + check_ptr_parameter("IVRCompositor_022_Submit", (void *)3); + check_uint32_parameter("IVRCompositor_022_Submit", 4); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ClearLastSubmittedFrame, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_ClearLastSubmittedFrame)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ClearLastSubmittedFrame(); + check_ptr_parameter("IVRCompositor_022_ClearLastSubmittedFrame", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_PostPresentHandoff, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_PostPresentHandoff)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_PostPresentHandoff(); + check_ptr_parameter("IVRCompositor_022_PostPresentHandoff", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetFrameTiming, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_GetFrameTiming)(Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetFrameTiming((void *)1, 2); + check_ptr_parameter("IVRCompositor_022_GetFrameTiming", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetFrameTiming", (void *)1); + check_uint32_parameter("IVRCompositor_022_GetFrameTiming", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetFrameTimings, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_022_GetFrameTimings)(Compositor_FrameTiming * pTiming, uint32_t nFrames) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetFrameTimings((void *)1, 2); + check_ptr_parameter("IVRCompositor_022_GetFrameTimings", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetFrameTimings", (void *)1); + check_uint32_parameter("IVRCompositor_022_GetFrameTimings", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetFrameTimeRemaining, 0, FALSE, FALSE); + float (__stdcall *capi_IVRCompositor_022_GetFrameTimeRemaining)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetFrameTimeRemaining(); + check_ptr_parameter("IVRCompositor_022_GetFrameTimeRemaining", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetCumulativeStats, 2, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_GetCumulativeStats)(Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetCumulativeStats((void *)1, 2); + check_ptr_parameter("IVRCompositor_022_GetCumulativeStats", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetCumulativeStats", (void *)1); + check_uint32_parameter("IVRCompositor_022_GetCumulativeStats", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_022_FadeToColor, 6, TRUE, TRUE); + void (__stdcall *capi_IVRCompositor_022_FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_FadeToColor(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 1); + check_ptr_parameter("IVRCompositor_022_FadeToColor", this_ptr_value); + check_float_parameter("IVRCompositor_022_FadeToColor", 1.0f); + check_float_parameter("IVRCompositor_022_FadeToColor", 2.0f); + check_float_parameter("IVRCompositor_022_FadeToColor", 3.0f); + check_float_parameter("IVRCompositor_022_FadeToColor", 4.0f); + check_float_parameter("IVRCompositor_022_FadeToColor", 5.0f); + check_bool_parameter("IVRCompositor_022_FadeToColor", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetCurrentFadeColor, 2, FALSE, FALSE); + HmdColor_t *(__stdcall *capi_IVRCompositor_022_GetCurrentFadeColor)(HmdColor_t *_r, bool bBackground) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetCurrentFadeColor(data_ptr_value, 1); + check_ptr_parameter("IVRCompositor_022_GetCurrentFadeColor", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetCurrentFadeColor", data_ptr_value); + check_bool_parameter("IVRCompositor_022_GetCurrentFadeColor", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_FadeGrid, 2, TRUE, FALSE); + void (__stdcall *capi_IVRCompositor_022_FadeGrid)(float fSeconds, bool bFadeIn) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_FadeGrid(1.0f, 1); + check_ptr_parameter("IVRCompositor_022_FadeGrid", this_ptr_value); + check_float_parameter("IVRCompositor_022_FadeGrid", 1.0f); + check_bool_parameter("IVRCompositor_022_FadeGrid", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetCurrentGridAlpha, 0, FALSE, FALSE); + float (__stdcall *capi_IVRCompositor_022_GetCurrentGridAlpha)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetCurrentGridAlpha(); + check_ptr_parameter("IVRCompositor_022_GetCurrentGridAlpha", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_SetSkyboxOverride, 2, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_SetSkyboxOverride)(Texture_t * pTextures, uint32_t unTextureCount) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_SetSkyboxOverride((void *)1, 2); + check_ptr_parameter("IVRCompositor_022_SetSkyboxOverride", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_SetSkyboxOverride", (void *)1); + check_uint32_parameter("IVRCompositor_022_SetSkyboxOverride", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ClearSkyboxOverride, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_ClearSkyboxOverride)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ClearSkyboxOverride(); + check_ptr_parameter("IVRCompositor_022_ClearSkyboxOverride", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorBringToFront, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_CompositorBringToFront)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_CompositorBringToFront(); + check_ptr_parameter("IVRCompositor_022_CompositorBringToFront", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorGoToBack, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_CompositorGoToBack)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_CompositorGoToBack(); + check_ptr_parameter("IVRCompositor_022_CompositorGoToBack", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorQuit, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_CompositorQuit)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_CompositorQuit(); + check_ptr_parameter("IVRCompositor_022_CompositorQuit", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_IsFullscreen, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_IsFullscreen)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_IsFullscreen(); + check_ptr_parameter("IVRCompositor_022_IsFullscreen", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetCurrentSceneFocusProcess, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_022_GetCurrentSceneFocusProcess)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetCurrentSceneFocusProcess(); + check_ptr_parameter("IVRCompositor_022_GetCurrentSceneFocusProcess", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetLastFrameRenderer, 0, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_022_GetLastFrameRenderer)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetLastFrameRenderer(); + check_ptr_parameter("IVRCompositor_022_GetLastFrameRenderer", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_CanRenderScene, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_CanRenderScene)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_CanRenderScene(); + check_ptr_parameter("IVRCompositor_022_CanRenderScene", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ShowMirrorWindow, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_ShowMirrorWindow)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ShowMirrorWindow(); + check_ptr_parameter("IVRCompositor_022_ShowMirrorWindow", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_HideMirrorWindow, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_HideMirrorWindow)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_HideMirrorWindow(); + check_ptr_parameter("IVRCompositor_022_HideMirrorWindow", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_IsMirrorWindowVisible, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_IsMirrorWindowVisible)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_IsMirrorWindowVisible(); + check_ptr_parameter("IVRCompositor_022_IsMirrorWindowVisible", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_CompositorDumpImages, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_CompositorDumpImages)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_CompositorDumpImages(); + check_ptr_parameter("IVRCompositor_022_CompositorDumpImages", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ShouldAppRenderWithLowResources, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_ShouldAppRenderWithLowResources)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ShouldAppRenderWithLowResources(); + check_ptr_parameter("IVRCompositor_022_ShouldAppRenderWithLowResources", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ForceInterleavedReprojectionOn, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_ForceInterleavedReprojectionOn)(bool bOverride) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ForceInterleavedReprojectionOn(1); + check_ptr_parameter("IVRCompositor_022_ForceInterleavedReprojectionOn", this_ptr_value); + check_bool_parameter("IVRCompositor_022_ForceInterleavedReprojectionOn", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ForceReconnectProcess, 0, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_ForceReconnectProcess)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ForceReconnectProcess(); + check_ptr_parameter("IVRCompositor_022_ForceReconnectProcess", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_SuspendRendering, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_SuspendRendering)(bool bSuspend) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_SuspendRendering(1); + check_ptr_parameter("IVRCompositor_022_SuspendRendering", this_ptr_value); + check_bool_parameter("IVRCompositor_022_SuspendRendering", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetMirrorTextureD3D11, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetMirrorTextureD3D11(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_022_GetMirrorTextureD3D11", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_GetMirrorTextureD3D11", 1); + check_ptr_parameter("IVRCompositor_022_GetMirrorTextureD3D11", (void *)2); + check_ptr_parameter("IVRCompositor_022_GetMirrorTextureD3D11", (void *)3); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ReleaseMirrorTextureD3D11, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_ReleaseMirrorTextureD3D11)(void * pD3D11ShaderResourceView) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ReleaseMirrorTextureD3D11((void *)1); + check_ptr_parameter("IVRCompositor_022_ReleaseMirrorTextureD3D11", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_ReleaseMirrorTextureD3D11", (void *)1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetMirrorTextureGL, 3, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetMirrorTextureGL(1, (void *)2, (void *)3); + check_ptr_parameter("IVRCompositor_022_GetMirrorTextureGL", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_GetMirrorTextureGL", 1); + check_ptr_parameter("IVRCompositor_022_GetMirrorTextureGL", (void *)2); + check_ptr_parameter("IVRCompositor_022_GetMirrorTextureGL", (void *)3); + + init_thunk(t, this_ptr_value, IVRCompositor_022_ReleaseSharedGLTexture, 2, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_ReleaseSharedGLTexture(1, (void *)2); + check_ptr_parameter("IVRCompositor_022_ReleaseSharedGLTexture", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_ReleaseSharedGLTexture", 1); + check_ptr_parameter("IVRCompositor_022_ReleaseSharedGLTexture", (void *)2); + + init_thunk(t, this_ptr_value, IVRCompositor_022_LockGLSharedTextureForAccess, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_LockGLSharedTextureForAccess((void *)1); + check_ptr_parameter("IVRCompositor_022_LockGLSharedTextureForAccess", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_LockGLSharedTextureForAccess", (void *)1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_UnlockGLSharedTextureForAccess, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_UnlockGLSharedTextureForAccess((void *)1); + check_ptr_parameter("IVRCompositor_022_UnlockGLSharedTextureForAccess", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_UnlockGLSharedTextureForAccess", (void *)1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetVulkanInstanceExtensionsRequired, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_022_GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetVulkanInstanceExtensionsRequired((void *)1, 2); + check_ptr_parameter("IVRCompositor_022_GetVulkanInstanceExtensionsRequired", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetVulkanInstanceExtensionsRequired", (void *)1); + check_uint32_parameter("IVRCompositor_022_GetVulkanInstanceExtensionsRequired", 2); + + init_thunk(t, this_ptr_value, IVRCompositor_022_GetVulkanDeviceExtensionsRequired, 3, FALSE, FALSE); + uint32_t (__stdcall *capi_IVRCompositor_022_GetVulkanDeviceExtensionsRequired)(VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_GetVulkanDeviceExtensionsRequired((void *)1, (void *)2, 3); + check_ptr_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", this_ptr_value); + check_ptr_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", (void *)1); + check_ptr_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", (void *)2); + check_uint32_parameter("IVRCompositor_022_GetVulkanDeviceExtensionsRequired", 3); + + init_thunk(t, this_ptr_value, IVRCompositor_022_SetExplicitTimingMode, 1, FALSE, FALSE); + void (__stdcall *capi_IVRCompositor_022_SetExplicitTimingMode)(EVRCompositorTimingMode eTimingMode) = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_SetExplicitTimingMode(1); + check_ptr_parameter("IVRCompositor_022_SetExplicitTimingMode", this_ptr_value); + check_uint32_parameter("IVRCompositor_022_SetExplicitTimingMode", 1); + + init_thunk(t, this_ptr_value, IVRCompositor_022_SubmitExplicitTimingData, 0, FALSE, FALSE); + EVRCompositorError (__stdcall *capi_IVRCompositor_022_SubmitExplicitTimingData)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_SubmitExplicitTimingData(); + check_ptr_parameter("IVRCompositor_022_SubmitExplicitTimingData", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_IsMotionSmoothingEnabled, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_IsMotionSmoothingEnabled)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_IsMotionSmoothingEnabled(); + check_ptr_parameter("IVRCompositor_022_IsMotionSmoothingEnabled", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_IsMotionSmoothingSupported, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_IsMotionSmoothingSupported)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_IsMotionSmoothingSupported(); + check_ptr_parameter("IVRCompositor_022_IsMotionSmoothingSupported", this_ptr_value); + + init_thunk(t, this_ptr_value, IVRCompositor_022_IsCurrentSceneFocusAppLoading, 0, FALSE, FALSE); + bool (__stdcall *capi_IVRCompositor_022_IsCurrentSceneFocusAppLoading)() = (void *)t; + + clear_parameters(); + capi_IVRCompositor_022_IsCurrentSceneFocusAppLoading(); + check_ptr_parameter("IVRCompositor_022_IsCurrentSceneFocusAppLoading", this_ptr_value); + VirtualFree(t, 0, MEM_RELEASE); +} + +void test_capi_thunks_IVROverlay_021(void) +{ + struct thunk *t = alloc_thunks(1); + + init_thunk(t, this_ptr_value, IVROverlay_021_FindOverlay, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_FindOverlay)(const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_FindOverlay((void *)1, (void *)2); + check_ptr_parameter("IVROverlay_021_FindOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_021_FindOverlay", (void *)1); + check_ptr_parameter("IVROverlay_021_FindOverlay", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_CreateOverlay, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_CreateOverlay)(const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_CreateOverlay((void *)1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_CreateOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_021_CreateOverlay", (void *)1); + check_ptr_parameter("IVROverlay_021_CreateOverlay", (void *)2); + check_ptr_parameter("IVROverlay_021_CreateOverlay", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_DestroyOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_DestroyOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_DestroyOverlay(1); + check_ptr_parameter("IVROverlay_021_DestroyOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_DestroyOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayKey, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayKey(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayKey", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayKey", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayKey", (void *)2); + check_uint32_parameter("IVROverlay_021_GetOverlayKey", 3); + check_ptr_parameter("IVROverlay_021_GetOverlayKey", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayName, 4, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayName(1, (void *)2, 3, (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayName", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayName", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayName", (void *)2); + check_uint32_parameter("IVROverlay_021_GetOverlayName", 3); + check_ptr_parameter("IVROverlay_021_GetOverlayName", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayName, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayName)(VROverlayHandle_t ulOverlayHandle, const char * pchName) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayName(1, (void *)2); + check_ptr_parameter("IVROverlay_021_SetOverlayName", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayName", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayName", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayImageData, 5, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayImageData(1, (void *)2, 3, (void *)4, (void *)5); + check_ptr_parameter("IVROverlay_021_GetOverlayImageData", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayImageData", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayImageData", (void *)2); + check_uint32_parameter("IVROverlay_021_GetOverlayImageData", 3); + check_ptr_parameter("IVROverlay_021_GetOverlayImageData", (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayImageData", (void *)5); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayErrorNameFromEnum, 1, FALSE, FALSE); + const char * (__stdcall *capi_IVROverlay_021_GetOverlayErrorNameFromEnum)(EVROverlayError error) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayErrorNameFromEnum(1); + check_ptr_parameter("IVROverlay_021_GetOverlayErrorNameFromEnum", this_ptr_value); + check_uint32_parameter("IVROverlay_021_GetOverlayErrorNameFromEnum", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayRenderingPid, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayRenderingPid(1, 2); + check_ptr_parameter("IVROverlay_021_SetOverlayRenderingPid", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayRenderingPid", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayRenderingPid", 2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayRenderingPid, 1, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayRenderingPid(1); + check_ptr_parameter("IVROverlay_021_GetOverlayRenderingPid", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayRenderingPid", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayFlag, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayFlag(1, 2, 1); + check_ptr_parameter("IVROverlay_021_SetOverlayFlag", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayFlag", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayFlag", 2); + check_bool_parameter("IVROverlay_021_SetOverlayFlag", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayFlag, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayFlag(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayFlag", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayFlag", 1); + check_uint32_parameter("IVROverlay_021_GetOverlayFlag", 2); + check_ptr_parameter("IVROverlay_021_GetOverlayFlag", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayColor, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayColor(1, 2.0f, 3.0f, 4.0f); + check_ptr_parameter("IVROverlay_021_SetOverlayColor", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayColor", 1); + check_float_parameter("IVROverlay_021_SetOverlayColor", 2.0f); + check_float_parameter("IVROverlay_021_SetOverlayColor", 3.0f); + check_float_parameter("IVROverlay_021_SetOverlayColor", 4.0f); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayColor, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayColor(1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayColor", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayColor", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayColor", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayColor", (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayColor", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayAlpha, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayAlpha(1, 2.0f); + check_ptr_parameter("IVROverlay_021_SetOverlayAlpha", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayAlpha", 1); + check_float_parameter("IVROverlay_021_SetOverlayAlpha", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayAlpha, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayAlpha(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayAlpha", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayAlpha", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayAlpha", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTexelAspect, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTexelAspect(1, 2.0f); + check_ptr_parameter("IVROverlay_021_SetOverlayTexelAspect", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTexelAspect", 1); + check_float_parameter("IVROverlay_021_SetOverlayTexelAspect", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTexelAspect, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTexelAspect(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTexelAspect", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTexelAspect", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTexelAspect", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlaySortOrder, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlaySortOrder(1, 2); + check_ptr_parameter("IVROverlay_021_SetOverlaySortOrder", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlaySortOrder", 1); + check_uint32_parameter("IVROverlay_021_SetOverlaySortOrder", 2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlaySortOrder, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlaySortOrder(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlaySortOrder", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlaySortOrder", 1); + check_ptr_parameter("IVROverlay_021_GetOverlaySortOrder", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayWidthInMeters, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayWidthInMeters(1, 2.0f); + check_ptr_parameter("IVROverlay_021_SetOverlayWidthInMeters", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayWidthInMeters", 1); + check_float_parameter("IVROverlay_021_SetOverlayWidthInMeters", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayWidthInMeters, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayWidthInMeters(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayWidthInMeters", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayWidthInMeters", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayWidthInMeters", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayCurvature, 2, TRUE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float fCurvature) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayCurvature(1, 2.0f); + check_ptr_parameter("IVROverlay_021_SetOverlayCurvature", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayCurvature", 1); + check_float_parameter("IVROverlay_021_SetOverlayCurvature", 2.0f); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayCurvature, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayCurvature)(VROverlayHandle_t ulOverlayHandle, float * pfCurvature) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayCurvature(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayCurvature", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayCurvature", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayCurvature", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTextureColorSpace, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTextureColorSpace(1, 2); + check_ptr_parameter("IVROverlay_021_SetOverlayTextureColorSpace", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTextureColorSpace", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayTextureColorSpace", 2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTextureColorSpace, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTextureColorSpace(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureColorSpace", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTextureColorSpace", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureColorSpace", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTextureBounds, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTextureBounds(1, (void *)2); + check_ptr_parameter("IVROverlay_021_SetOverlayTextureBounds", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTextureBounds", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayTextureBounds", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTextureBounds, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTextureBounds(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureBounds", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTextureBounds", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureBounds", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayRenderModel, 5, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_021_GetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayRenderModel(1, (void *)2, 3, (void *)4, (void *)5); + check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayRenderModel", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", (void *)2); + check_uint32_parameter("IVROverlay_021_GetOverlayRenderModel", 3); + check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayRenderModel", (void *)5); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayRenderModel, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayRenderModel)(VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayRenderModel(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_SetOverlayRenderModel", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayRenderModel", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayRenderModel", (void *)2); + check_ptr_parameter("IVROverlay_021_SetOverlayRenderModel", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformType, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTransformType(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformType", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTransformType", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformType", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformAbsolute, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTransformAbsolute(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformAbsolute", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTransformAbsolute", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayTransformAbsolute", 2); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformAbsolute", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformAbsolute, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTransformAbsolute(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformAbsolute", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTransformAbsolute", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformAbsolute", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformAbsolute", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTransformTrackedDeviceRelative(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", 2); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTransformTrackedDeviceRelative(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformTrackedDeviceComponent, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTransformTrackedDeviceComponent(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", 2); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformTrackedDeviceComponent", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformTrackedDeviceComponent, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTransformTrackedDeviceComponent(1, (void *)2, (void *)3, 4); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", (void *)3); + check_uint32_parameter("IVROverlay_021_GetOverlayTransformTrackedDeviceComponent", 4); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTransformOverlayRelative(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTransformOverlayRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTransformOverlayRelative)(VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTransformOverlayRelative(1, 2, (void *)3); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", 1); + check_uint64_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", 2); + check_ptr_parameter("IVROverlay_021_SetOverlayTransformOverlayRelative", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_ShowOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_ShowOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ShowOverlay(1); + check_ptr_parameter("IVROverlay_021_ShowOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_ShowOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_HideOverlay, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_HideOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_HideOverlay(1); + check_ptr_parameter("IVROverlay_021_HideOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_HideOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_IsOverlayVisible, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_021_IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_IsOverlayVisible(1); + check_ptr_parameter("IVROverlay_021_IsOverlayVisible", this_ptr_value); + check_uint64_parameter("IVROverlay_021_IsOverlayVisible", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetTransformForOverlayCoordinates, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetTransformForOverlayCoordinates(1, 2, DEFAULT_VECTOR2, (void *)4); + check_ptr_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", 1); + check_uint32_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", 2); + check_HmdVector2_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", DEFAULT_VECTOR2); + check_ptr_parameter("IVROverlay_021_GetTransformForOverlayCoordinates", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_021_PollNextOverlayEvent, 3, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_021_PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, VREvent_t * pEvent, uint32_t uncbVREvent) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_PollNextOverlayEvent(1, (void *)2, 3); + check_ptr_parameter("IVROverlay_021_PollNextOverlayEvent", this_ptr_value); + check_uint64_parameter("IVROverlay_021_PollNextOverlayEvent", 1); + check_ptr_parameter("IVROverlay_021_PollNextOverlayEvent", (void *)2); + check_uint32_parameter("IVROverlay_021_PollNextOverlayEvent", 3); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayInputMethod, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayInputMethod(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayInputMethod", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayInputMethod", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayInputMethod", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayInputMethod, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayInputMethod(1, 2); + check_ptr_parameter("IVROverlay_021_SetOverlayInputMethod", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayInputMethod", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayInputMethod", 2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayMouseScale, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayMouseScale(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayMouseScale", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayMouseScale", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayMouseScale", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayMouseScale, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayMouseScale(1, (void *)2); + check_ptr_parameter("IVROverlay_021_SetOverlayMouseScale", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayMouseScale", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayMouseScale", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_ComputeOverlayIntersection, 3, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_021_ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ComputeOverlayIntersection(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_ComputeOverlayIntersection", this_ptr_value); + check_uint64_parameter("IVROverlay_021_ComputeOverlayIntersection", 1); + check_ptr_parameter("IVROverlay_021_ComputeOverlayIntersection", (void *)2); + check_ptr_parameter("IVROverlay_021_ComputeOverlayIntersection", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_IsHoverTargetOverlay, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_021_IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_IsHoverTargetOverlay(1); + check_ptr_parameter("IVROverlay_021_IsHoverTargetOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_IsHoverTargetOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayDualAnalogTransform, 4, TRUE, TRUE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayDualAnalogTransform(1, 2, (void *)3, 4.0f); + check_ptr_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", 1); + check_uint32_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", 2); + check_ptr_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", (void *)3); + check_float_parameter("IVROverlay_021_SetOverlayDualAnalogTransform", 4.0f); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayDualAnalogTransform, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayDualAnalogTransform)(VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayDualAnalogTransform(1, 2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", 1); + check_uint32_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", 2); + check_ptr_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayDualAnalogTransform", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayTexture, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayTexture(1, (void *)2); + check_ptr_parameter("IVROverlay_021_SetOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayTexture", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayTexture", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_ClearOverlayTexture, 1, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ClearOverlayTexture(1); + check_ptr_parameter("IVROverlay_021_ClearOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_021_ClearOverlayTexture", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayRaw, 5, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayRaw(1, (void *)2, 3, 4, 5); + check_ptr_parameter("IVROverlay_021_SetOverlayRaw", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayRaw", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayRaw", (void *)2); + check_uint32_parameter("IVROverlay_021_SetOverlayRaw", 3); + check_uint32_parameter("IVROverlay_021_SetOverlayRaw", 4); + check_uint32_parameter("IVROverlay_021_SetOverlayRaw", 5); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayFromFile, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayFromFile(1, (void *)2); + check_ptr_parameter("IVROverlay_021_SetOverlayFromFile", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayFromFile", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayFromFile", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTexture, 9, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTexture(1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6, (void *)7, (void *)8, (void *)9); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTexture", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)4); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)5); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)6); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)7); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)8); + check_ptr_parameter("IVROverlay_021_GetOverlayTexture", (void *)9); + + init_thunk(t, this_ptr_value, IVROverlay_021_ReleaseNativeOverlayHandle, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ReleaseNativeOverlayHandle(1, (void *)2); + check_ptr_parameter("IVROverlay_021_ReleaseNativeOverlayHandle", this_ptr_value); + check_uint64_parameter("IVROverlay_021_ReleaseNativeOverlayHandle", 1); + check_ptr_parameter("IVROverlay_021_ReleaseNativeOverlayHandle", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayTextureSize, 3, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayTextureSize(1, (void *)2, (void *)3); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureSize", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayTextureSize", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureSize", (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayTextureSize", (void *)3); + + init_thunk(t, this_ptr_value, IVROverlay_021_CreateDashboardOverlay, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_CreateDashboardOverlay)(const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_CreateDashboardOverlay((void *)1, (void *)2, (void *)3, (void *)4); + check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)1); + check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)2); + check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)3); + check_ptr_parameter("IVROverlay_021_CreateDashboardOverlay", (void *)4); + + init_thunk(t, this_ptr_value, IVROverlay_021_IsDashboardVisible, 0, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_021_IsDashboardVisible)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_IsDashboardVisible(); + check_ptr_parameter("IVROverlay_021_IsDashboardVisible", this_ptr_value); + + init_thunk(t, this_ptr_value, IVROverlay_021_IsActiveDashboardOverlay, 1, FALSE, FALSE); + bool (__stdcall *capi_IVROverlay_021_IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_IsActiveDashboardOverlay(1); + check_ptr_parameter("IVROverlay_021_IsActiveDashboardOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_IsActiveDashboardOverlay", 1); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetDashboardOverlaySceneProcess(1, 2); + check_ptr_parameter("IVROverlay_021_SetDashboardOverlaySceneProcess", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetDashboardOverlaySceneProcess", 1); + check_uint32_parameter("IVROverlay_021_SetDashboardOverlaySceneProcess", 2); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetDashboardOverlaySceneProcess(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetDashboardOverlaySceneProcess", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetDashboardOverlaySceneProcess", 1); + check_ptr_parameter("IVROverlay_021_GetDashboardOverlaySceneProcess", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_ShowDashboard, 1, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_021_ShowDashboard)(const char * pchOverlayToShow) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ShowDashboard((void *)1); + check_ptr_parameter("IVROverlay_021_ShowDashboard", this_ptr_value); + check_ptr_parameter("IVROverlay_021_ShowDashboard", (void *)1); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetPrimaryDashboardDevice, 0, FALSE, FALSE); + TrackedDeviceIndex_t (__stdcall *capi_IVROverlay_021_GetPrimaryDashboardDevice)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetPrimaryDashboardDevice(); + check_ptr_parameter("IVROverlay_021_GetPrimaryDashboardDevice", this_ptr_value); + + init_thunk(t, this_ptr_value, IVROverlay_021_ShowKeyboard, 7, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ShowKeyboard(1, 2, (void *)3, 4, (void *)5, 1, 7); + check_ptr_parameter("IVROverlay_021_ShowKeyboard", this_ptr_value); + check_uint32_parameter("IVROverlay_021_ShowKeyboard", 1); + check_uint32_parameter("IVROverlay_021_ShowKeyboard", 2); + check_ptr_parameter("IVROverlay_021_ShowKeyboard", (void *)3); + check_uint32_parameter("IVROverlay_021_ShowKeyboard", 4); + check_ptr_parameter("IVROverlay_021_ShowKeyboard", (void *)5); + check_bool_parameter("IVROverlay_021_ShowKeyboard", 1); + check_uint64_parameter("IVROverlay_021_ShowKeyboard", 7); + + init_thunk(t, this_ptr_value, IVROverlay_021_ShowKeyboardForOverlay, 8, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ShowKeyboardForOverlay(1, 2, 3, (void *)4, 5, (void *)6, 1, 8); + check_ptr_parameter("IVROverlay_021_ShowKeyboardForOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_ShowKeyboardForOverlay", 1); + check_uint32_parameter("IVROverlay_021_ShowKeyboardForOverlay", 2); + check_uint32_parameter("IVROverlay_021_ShowKeyboardForOverlay", 3); + check_ptr_parameter("IVROverlay_021_ShowKeyboardForOverlay", (void *)4); + check_uint32_parameter("IVROverlay_021_ShowKeyboardForOverlay", 5); + check_ptr_parameter("IVROverlay_021_ShowKeyboardForOverlay", (void *)6); + check_bool_parameter("IVROverlay_021_ShowKeyboardForOverlay", 1); + check_uint64_parameter("IVROverlay_021_ShowKeyboardForOverlay", 8); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetKeyboardText, 2, FALSE, FALSE); + uint32_t (__stdcall *capi_IVROverlay_021_GetKeyboardText)(char * pchText, uint32_t cchText) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetKeyboardText((void *)1, 2); + check_ptr_parameter("IVROverlay_021_GetKeyboardText", this_ptr_value); + check_ptr_parameter("IVROverlay_021_GetKeyboardText", (void *)1); + check_uint32_parameter("IVROverlay_021_GetKeyboardText", 2); + + init_thunk(t, this_ptr_value, IVROverlay_021_HideKeyboard, 0, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_021_HideKeyboard)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_HideKeyboard(); + check_ptr_parameter("IVROverlay_021_HideKeyboard", this_ptr_value); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetKeyboardTransformAbsolute, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_021_SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetKeyboardTransformAbsolute(1, (void *)2); + check_ptr_parameter("IVROverlay_021_SetKeyboardTransformAbsolute", this_ptr_value); + check_uint32_parameter("IVROverlay_021_SetKeyboardTransformAbsolute", 1); + check_ptr_parameter("IVROverlay_021_SetKeyboardTransformAbsolute", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetKeyboardPositionForOverlay, 2, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_021_SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetKeyboardPositionForOverlay(1, DEFAULT_RECT); + check_ptr_parameter("IVROverlay_021_SetKeyboardPositionForOverlay", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetKeyboardPositionForOverlay", 1); + check_HmdRect2_parameter("IVROverlay_021_SetKeyboardPositionForOverlay", DEFAULT_RECT); + + init_thunk(t, this_ptr_value, IVROverlay_021_SetOverlayIntersectionMask, 4, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_SetOverlayIntersectionMask(1, (void *)2, 3, 4); + check_ptr_parameter("IVROverlay_021_SetOverlayIntersectionMask", this_ptr_value); + check_uint64_parameter("IVROverlay_021_SetOverlayIntersectionMask", 1); + check_ptr_parameter("IVROverlay_021_SetOverlayIntersectionMask", (void *)2); + check_uint32_parameter("IVROverlay_021_SetOverlayIntersectionMask", 3); + check_uint32_parameter("IVROverlay_021_SetOverlayIntersectionMask", 4); + + init_thunk(t, this_ptr_value, IVROverlay_021_GetOverlayFlags, 2, FALSE, FALSE); + EVROverlayError (__stdcall *capi_IVROverlay_021_GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_GetOverlayFlags(1, (void *)2); + check_ptr_parameter("IVROverlay_021_GetOverlayFlags", this_ptr_value); + check_uint64_parameter("IVROverlay_021_GetOverlayFlags", 1); + check_ptr_parameter("IVROverlay_021_GetOverlayFlags", (void *)2); + + init_thunk(t, this_ptr_value, IVROverlay_021_ShowMessageOverlay, 6, FALSE, FALSE); + VRMessageOverlayResponse (__stdcall *capi_IVROverlay_021_ShowMessageOverlay)(const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_ShowMessageOverlay((void *)1, (void *)2, (void *)3, (void *)4, (void *)5, (void *)6); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", this_ptr_value); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)1); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)2); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)3); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)4); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)5); + check_ptr_parameter("IVROverlay_021_ShowMessageOverlay", (void *)6); + + init_thunk(t, this_ptr_value, IVROverlay_021_CloseMessageOverlay, 0, FALSE, FALSE); + void (__stdcall *capi_IVROverlay_021_CloseMessageOverlay)() = (void *)t; + + clear_parameters(); + capi_IVROverlay_021_CloseMessageOverlay(); + check_ptr_parameter("IVROverlay_021_CloseMessageOverlay", this_ptr_value); + VirtualFree(t, 0, MEM_RELEASE); +} + void test_capi_thunks_IVRSystem_020(void) { struct thunk *t = alloc_thunks(1); diff --git a/vrclient_x64/tests/main_autogen.c b/vrclient_x64/tests/main_autogen.c index e528c3ea11..28a9e93642 100644 --- a/vrclient_x64/tests/main_autogen.c +++ b/vrclient_x64/tests/main_autogen.c @@ -7,21 +7,31 @@ int main(void) { test_capi_thunks_IVRSystem_021(); test_capi_thunks_IVRApplications_007(); - test_capi_thunks_IVRSettings_002(); + test_capi_thunks_IVRSettings_003(); test_capi_thunks_IVRChaperone_003(); test_capi_thunks_IVRChaperoneSetup_006(); - test_capi_thunks_IVRCompositor_022(); + test_capi_thunks_IVRCompositor_026(); + test_capi_thunks_IVRHeadsetView_001(); test_capi_thunks_IVRNotifications_002(); - test_capi_thunks_IVROverlay_021(); + test_capi_thunks_IVROverlay_024(); + test_capi_thunks_IVROverlayView_003(); test_capi_thunks_IVRRenderModels_006(); test_capi_thunks_IVRExtendedDisplay_001(); test_capi_thunks_IVRTrackedCamera_006(); test_capi_thunks_IVRScreenshots_001(); test_capi_thunks_IVRResources_001(); test_capi_thunks_IVRDriverManager_001(); - test_capi_thunks_IVRInput_007(); + test_capi_thunks_IVRInput_010(); test_capi_thunks_IVRIOBuffer_002(); + test_capi_thunks_IVRControlPanel_006(); + test_capi_thunks_IVRMailbox_001(); test_capi_thunks_IVRClientCore_003(); + test_capi_thunks_IVRCompositor_024(); + test_capi_thunks_IVROverlay_022(); + test_capi_thunks_IVRInput_007(); + test_capi_thunks_IVRSettings_002(); + test_capi_thunks_IVRCompositor_022(); + test_capi_thunks_IVROverlay_021(); test_capi_thunks_IVRSystem_020(); test_capi_thunks_IVRApplications_006(); test_capi_thunks_IVROverlay_020(); diff --git a/vrclient_x64/vrclient_x64/cppIVRApplications_IVRApplications_007.cpp b/vrclient_x64/vrclient_x64/cppIVRApplications_IVRApplications_007.cpp index f2d93b3b20..2dc6b77133 100644 --- a/vrclient_x64/vrclient_x64/cppIVRApplications_IVRApplications_007.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRApplications_IVRApplications_007.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_006.cpp b/vrclient_x64/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_006.cpp index bd211454a0..afff2c89ca 100644 --- a/vrclient_x64/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_006.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_006.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp b/vrclient_x64/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp index e682d76836..80e8760be7 100644 --- a/vrclient_x64/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp b/vrclient_x64/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp index 2da439c029..8f7ac26547 100644 --- a/vrclient_x64/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_024.cpp b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_024.cpp new file mode 100644 index 0000000000..9155ee08a7 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_024.cpp @@ -0,0 +1,254 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.9.16/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_024.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_024_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_024_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_024_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_024_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_024_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_024_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_024_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_024_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_024_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_024_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_024_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_024_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_024_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_024_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_024_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_024_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_024_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_024_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_024_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_024_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_024_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +void cppIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11(void *linux_side, void * pD3D11ShaderResourceView) +{ + ((IVRCompositor*)linux_side)->ReleaseMirrorTextureD3D11((void *)pD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +uint32_t cppIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired(void *linux_side, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanInstanceExtensionsRequired((char *)pchValue, (uint32_t)unBufferSize); +} + +uint32_t cppIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired(void *linux_side, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanDeviceExtensionsRequired((VkPhysicalDevice_T *)pPhysicalDevice, (char *)pchValue, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_024_SetExplicitTimingMode(void *linux_side, EVRCompositorTimingMode eTimingMode) +{ + ((IVRCompositor*)linux_side)->SetExplicitTimingMode((vr::EVRCompositorTimingMode)eTimingMode); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->SubmitExplicitTimingData(); +} + +bool cppIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMotionSmoothingEnabled(); +} + +bool cppIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMotionSmoothingSupported(); +} + +bool cppIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsCurrentSceneFocusAppLoading(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_024_SetStageOverride_Async(void *linux_side, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) +{ + return ((IVRCompositor*)linux_side)->SetStageOverride_Async((const char *)pchRenderModelPath, (const vr::HmdMatrix34_t *)pTransform, (const vr::Compositor_StageRenderSettings *)pRenderSettings, (uint32_t)nSizeOfRenderSettings); +} + +void cppIVRCompositor_IVRCompositor_024_ClearStageOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearStageOverride(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_024.h b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_024.h new file mode 100644 index 0000000000..1fe1e4a710 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_024.h @@ -0,0 +1,54 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_024_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_024_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_024_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_024_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_024_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_024_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_024_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_024_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_024_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_024_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_024_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_024_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_024_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_024_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_024_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_024_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_024_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_024_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_024_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_024_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_024_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern void cppIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11(void *, void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern uint32_t cppIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired(void *, char *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired(void *, VkPhysicalDevice_T *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_024_SetExplicitTimingMode(void *, EVRCompositorTimingMode); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData(void *); +extern bool cppIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled(void *); +extern bool cppIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported(void *); +extern bool cppIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_024_SetStageOverride_Async(void *, const char *, HmdMatrix34_t *, Compositor_StageRenderSettings *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_024_ClearStageOverride(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_026.cpp b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_026.cpp new file mode 100644 index 0000000000..e1e47ddb61 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_026.cpp @@ -0,0 +1,269 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRCompositor_IVRCompositor_026.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRCompositor_IVRCompositor_026_SetTrackingSpace(void *linux_side, ETrackingUniverseOrigin eOrigin) +{ + ((IVRCompositor*)linux_side)->SetTrackingSpace((vr::ETrackingUniverseOrigin)eOrigin); +} + +vr::ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_026_GetTrackingSpace(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetTrackingSpace(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_WaitGetPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->WaitGetPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetLastPoses(void *linux_side, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetLastPoses((vr::TrackedDevicePose_t *)pRenderPoseArray, (uint32_t)unRenderPoseArrayCount, (vr::TrackedDevicePose_t *)pGamePoseArray, (uint32_t)unGamePoseArrayCount); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(void *linux_side, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + return ((IVRCompositor*)linux_side)->GetLastPoseForTrackedDeviceIndex((vr::TrackedDeviceIndex_t)unDeviceIndex, (vr::TrackedDevicePose_t *)pOutputPose, (vr::TrackedDevicePose_t *)pOutputGamePose); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_Submit(void *linux_side, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + return ((IVRCompositor*)linux_side)->Submit((vr::EVREye)eEye, (const vr::Texture_t *)pTexture, (const vr::VRTextureBounds_t *)pBounds, (vr::EVRSubmitFlags)nSubmitFlags); +} + +void cppIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearLastSubmittedFrame(); +} + +void cppIVRCompositor_IVRCompositor_026_PostPresentHandoff(void *linux_side) +{ + ((IVRCompositor*)linux_side)->PostPresentHandoff(); +} + +bool cppIVRCompositor_IVRCompositor_026_GetFrameTiming(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + return ((IVRCompositor*)linux_side)->GetFrameTiming((vr::Compositor_FrameTiming *)pTiming, (uint32_t)unFramesAgo); +} + +uint32_t cppIVRCompositor_IVRCompositor_026_GetFrameTimings(void *linux_side, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimings((vr::Compositor_FrameTiming *)pTiming, (uint32_t)nFrames); +} + +float cppIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetFrameTimeRemaining(); +} + +void cppIVRCompositor_IVRCompositor_026_GetCumulativeStats(void *linux_side, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + ((IVRCompositor*)linux_side)->GetCumulativeStats((vr::Compositor_CumulativeStats *)pStats, (uint32_t)nStatsSizeInBytes); +} + +void cppIVRCompositor_IVRCompositor_026_FadeToColor(void *linux_side, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + ((IVRCompositor*)linux_side)->FadeToColor((float)fSeconds, (float)fRed, (float)fGreen, (float)fBlue, (float)fAlpha, (bool)bBackground); +} + +vr::HmdColor_t cppIVRCompositor_IVRCompositor_026_GetCurrentFadeColor(void *linux_side, bool bBackground) +{ + return ((IVRCompositor*)linux_side)->GetCurrentFadeColor((bool)bBackground); +} + +void cppIVRCompositor_IVRCompositor_026_FadeGrid(void *linux_side, float fSeconds, bool bFadeIn) +{ + ((IVRCompositor*)linux_side)->FadeGrid((float)fSeconds, (bool)bFadeIn); +} + +float cppIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentGridAlpha(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_SetSkyboxOverride(void *linux_side, Texture_t * pTextures, uint32_t unTextureCount) +{ + return ((IVRCompositor*)linux_side)->SetSkyboxOverride((const vr::Texture_t *)pTextures, (uint32_t)unTextureCount); +} + +void cppIVRCompositor_IVRCompositor_026_ClearSkyboxOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearSkyboxOverride(); +} + +void cppIVRCompositor_IVRCompositor_026_CompositorBringToFront(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorBringToFront(); +} + +void cppIVRCompositor_IVRCompositor_026_CompositorGoToBack(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorGoToBack(); +} + +void cppIVRCompositor_IVRCompositor_026_CompositorQuit(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorQuit(); +} + +bool cppIVRCompositor_IVRCompositor_026_IsFullscreen(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsFullscreen(); +} + +uint32_t cppIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetCurrentSceneFocusProcess(); +} + +uint32_t cppIVRCompositor_IVRCompositor_026_GetLastFrameRenderer(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->GetLastFrameRenderer(); +} + +bool cppIVRCompositor_IVRCompositor_026_CanRenderScene(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->CanRenderScene(); +} + +void cppIVRCompositor_IVRCompositor_026_ShowMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ShowMirrorWindow(); +} + +void cppIVRCompositor_IVRCompositor_026_HideMirrorWindow(void *linux_side) +{ + ((IVRCompositor*)linux_side)->HideMirrorWindow(); +} + +bool cppIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMirrorWindowVisible(); +} + +void cppIVRCompositor_IVRCompositor_026_CompositorDumpImages(void *linux_side) +{ + ((IVRCompositor*)linux_side)->CompositorDumpImages(); +} + +bool cppIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->ShouldAppRenderWithLowResources(); +} + +void cppIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn(void *linux_side, bool bOverride) +{ + ((IVRCompositor*)linux_side)->ForceInterleavedReprojectionOn((bool)bOverride); +} + +void cppIVRCompositor_IVRCompositor_026_ForceReconnectProcess(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ForceReconnectProcess(); +} + +void cppIVRCompositor_IVRCompositor_026_SuspendRendering(void *linux_side, bool bSuspend) +{ + ((IVRCompositor*)linux_side)->SuspendRendering((bool)bSuspend); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11(void *linux_side, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureD3D11((vr::EVREye)eEye, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView); +} + +void cppIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11(void *linux_side, void * pD3D11ShaderResourceView) +{ + ((IVRCompositor*)linux_side)->ReleaseMirrorTextureD3D11((void *)pD3D11ShaderResourceView); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetMirrorTextureGL(void *linux_side, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->GetMirrorTextureGL((vr::EVREye)eEye, (vr::glUInt_t *)pglTextureId, (vr::glSharedTextureHandle_t *)pglSharedTextureHandle); +} + +bool cppIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture(void *linux_side, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + return ((IVRCompositor*)linux_side)->ReleaseSharedGLTexture((vr::glUInt_t)glTextureId, (vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->LockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +void cppIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess(void *linux_side, glSharedTextureHandle_t glSharedTextureHandle) +{ + ((IVRCompositor*)linux_side)->UnlockGLSharedTextureForAccess((vr::glSharedTextureHandle_t)glSharedTextureHandle); +} + +uint32_t cppIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired(void *linux_side, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanInstanceExtensionsRequired((char *)pchValue, (uint32_t)unBufferSize); +} + +uint32_t cppIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired(void *linux_side, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + return ((IVRCompositor*)linux_side)->GetVulkanDeviceExtensionsRequired((VkPhysicalDevice_T *)pPhysicalDevice, (char *)pchValue, (uint32_t)unBufferSize); +} + +void cppIVRCompositor_IVRCompositor_026_SetExplicitTimingMode(void *linux_side, EVRCompositorTimingMode eTimingMode) +{ + ((IVRCompositor*)linux_side)->SetExplicitTimingMode((vr::EVRCompositorTimingMode)eTimingMode); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->SubmitExplicitTimingData(); +} + +bool cppIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMotionSmoothingEnabled(); +} + +bool cppIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsMotionSmoothingSupported(); +} + +bool cppIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading(void *linux_side) +{ + return ((IVRCompositor*)linux_side)->IsCurrentSceneFocusAppLoading(); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_SetStageOverride_Async(void *linux_side, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) +{ + return ((IVRCompositor*)linux_side)->SetStageOverride_Async((const char *)pchRenderModelPath, (const vr::HmdMatrix34_t *)pTransform, (const vr::Compositor_StageRenderSettings *)pRenderSettings, (uint32_t)nSizeOfRenderSettings); +} + +void cppIVRCompositor_IVRCompositor_026_ClearStageOverride(void *linux_side) +{ + ((IVRCompositor*)linux_side)->ClearStageOverride(); +} + +bool cppIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults(void *linux_side, Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults) +{ + return ((IVRCompositor*)linux_side)->GetCompositorBenchmarkResults((vr::Compositor_BenchmarkResults *)pBenchmarkResults, (uint32_t)nSizeOfBenchmarkResults); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs(void *linux_side, uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID) +{ + return ((IVRCompositor*)linux_side)->GetLastPosePredictionIDs((uint32_t *)pRenderPosePredictionID, (uint32_t *)pGamePosePredictionID); +} + +vr::EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetPosesForFrame(void *linux_side, uint32_t unPosePredictionID, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount) +{ + return ((IVRCompositor*)linux_side)->GetPosesForFrame((uint32_t)unPosePredictionID, (vr::TrackedDevicePose_t *)pPoseArray, (uint32_t)unPoseArrayCount); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_026.h b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_026.h new file mode 100644 index 0000000000..a92ed26454 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRCompositor_IVRCompositor_026.h @@ -0,0 +1,57 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRCompositor_IVRCompositor_026_SetTrackingSpace(void *, ETrackingUniverseOrigin); +extern ETrackingUniverseOrigin cppIVRCompositor_IVRCompositor_026_GetTrackingSpace(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_WaitGetPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetLastPoses(void *, TrackedDevicePose_t *, uint32_t, TrackedDevicePose_t *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(void *, TrackedDeviceIndex_t, TrackedDevicePose_t *, TrackedDevicePose_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_Submit(void *, EVREye, Texture_t *, VRTextureBounds_t *, EVRSubmitFlags); +extern void cppIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame(void *); +extern void cppIVRCompositor_IVRCompositor_026_PostPresentHandoff(void *); +extern bool cppIVRCompositor_IVRCompositor_026_GetFrameTiming(void *, Compositor_FrameTiming *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_026_GetFrameTimings(void *, Compositor_FrameTiming *, uint32_t); +extern float cppIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining(void *); +extern void cppIVRCompositor_IVRCompositor_026_GetCumulativeStats(void *, Compositor_CumulativeStats *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_026_FadeToColor(void *, float, float, float, float, float, bool); +extern HmdColor_t cppIVRCompositor_IVRCompositor_026_GetCurrentFadeColor(void *, bool); +extern void cppIVRCompositor_IVRCompositor_026_FadeGrid(void *, float, bool); +extern float cppIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_SetSkyboxOverride(void *, Texture_t *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_026_ClearSkyboxOverride(void *); +extern void cppIVRCompositor_IVRCompositor_026_CompositorBringToFront(void *); +extern void cppIVRCompositor_IVRCompositor_026_CompositorGoToBack(void *); +extern void cppIVRCompositor_IVRCompositor_026_CompositorQuit(void *); +extern bool cppIVRCompositor_IVRCompositor_026_IsFullscreen(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess(void *); +extern uint32_t cppIVRCompositor_IVRCompositor_026_GetLastFrameRenderer(void *); +extern bool cppIVRCompositor_IVRCompositor_026_CanRenderScene(void *); +extern void cppIVRCompositor_IVRCompositor_026_ShowMirrorWindow(void *); +extern void cppIVRCompositor_IVRCompositor_026_HideMirrorWindow(void *); +extern bool cppIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible(void *); +extern void cppIVRCompositor_IVRCompositor_026_CompositorDumpImages(void *); +extern bool cppIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources(void *); +extern void cppIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn(void *, bool); +extern void cppIVRCompositor_IVRCompositor_026_ForceReconnectProcess(void *); +extern void cppIVRCompositor_IVRCompositor_026_SuspendRendering(void *, bool); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11(void *, EVREye, void *, void **); +extern void cppIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11(void *, void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetMirrorTextureGL(void *, EVREye, glUInt_t *, glSharedTextureHandle_t *); +extern bool cppIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture(void *, glUInt_t, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern void cppIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess(void *, glSharedTextureHandle_t); +extern uint32_t cppIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired(void *, char *, uint32_t); +extern uint32_t cppIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired(void *, VkPhysicalDevice_T *, char *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_026_SetExplicitTimingMode(void *, EVRCompositorTimingMode); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData(void *); +extern bool cppIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled(void *); +extern bool cppIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported(void *); +extern bool cppIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading(void *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_SetStageOverride_Async(void *, const char *, HmdMatrix34_t *, Compositor_StageRenderSettings *, uint32_t); +extern void cppIVRCompositor_IVRCompositor_026_ClearStageOverride(void *); +extern bool cppIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults(void *, Compositor_BenchmarkResults *, uint32_t); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs(void *, uint32_t *, uint32_t *); +extern EVRCompositorError cppIVRCompositor_IVRCompositor_026_GetPosesForFrame(void *, uint32_t, TrackedDevicePose_t *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.cpp b/vrclient_x64/vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.cpp new file mode 100644 index 0000000000..de9a1be7d5 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.cpp @@ -0,0 +1,154 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRControlPanel_IVRControlPanel_006.h" +#ifdef __cplusplus +extern "C" { +#endif +uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc1(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc1(); +} + +uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc2(void *linux_side, uint32_t a, char * b, uint32_t c) +{ + return ((IVRControlPanel*)linux_side)->undoc2((uint32_t)a, (char *)b, (uint32_t)c); +} + +vr::EVRInitError cppIVRControlPanel_IVRControlPanel_006_undoc3(void *linux_side, const char * a) +{ + return ((IVRControlPanel*)linux_side)->undoc3((const char *)a); +} + +uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc4(void *linux_side, const char * a) +{ + return ((IVRControlPanel*)linux_side)->undoc4((const char *)a); +} + +uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc5(void *linux_side, const char * a, uint32_t b, char * c, uint32_t d) +{ + return ((IVRControlPanel*)linux_side)->undoc5((const char *)a, (uint32_t)b, (char *)c, (uint32_t)d); +} + +uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc6(void *linux_side, const char * a, const char * b, char * c, uint32_t d) +{ + return ((IVRControlPanel*)linux_side)->undoc6((const char *)a, (const char *)b, (char *)c, (uint32_t)d); +} + +uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc7(void *linux_side, const char * a, const char * b, char * c, uint32_t d) +{ + return ((IVRControlPanel*)linux_side)->undoc7((const char *)a, (const char *)b, (char *)c, (uint32_t)d); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc8(void *linux_side, uint32_t a) +{ + return ((IVRControlPanel*)linux_side)->undoc8((uint32_t)a); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc9(void *linux_side) +{ + ((IVRControlPanel*)linux_side)->undoc9(); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc10(void *linux_side) +{ + ((IVRControlPanel*)linux_side)->undoc10(); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc11(void *linux_side, uint32_t a) +{ + return ((IVRControlPanel*)linux_side)->undoc11((uint32_t)a); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc12(void *linux_side) +{ + ((IVRControlPanel*)linux_side)->undoc12(); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc13(void *linux_side, TrackedDeviceIndex_t a) +{ + ((IVRControlPanel*)linux_side)->undoc13((vr::TrackedDeviceIndex_t)a); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc14(void *linux_side, EVRState a) +{ + ((IVRControlPanel*)linux_side)->undoc14((vr::EVRState)a); +} + +vr::EVRState cppIVRControlPanel_IVRControlPanel_006_undoc15(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc15(); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc16(void *linux_side, bool a) +{ + ((IVRControlPanel*)linux_side)->undoc16((bool)a); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc17(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc17(); +} + +vr::EVRApplicationError cppIVRControlPanel_IVRControlPanel_006_undoc18(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc18(); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc19(void *linux_side, bool a) +{ + ((IVRControlPanel*)linux_side)->undoc19((bool)a); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc20(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc20(); +} + +vr::EVRInitError cppIVRControlPanel_IVRControlPanel_006_undoc21(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc21(); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc22(void *linux_side, WebConsoleHandle_t a, const char * b, uint32_t c, uint32_t d, const char * e) +{ + ((IVRControlPanel*)linux_side)->undoc22((vr::WebConsoleHandle_t)a, (const char *)b, (uint32_t)c, (uint32_t)d, (const char *)e); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc23(void *linux_side, const char * a) +{ + return ((IVRControlPanel*)linux_side)->undoc23((const char *)a); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc24(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc24(); +} + +bool cppIVRControlPanel_IVRControlPanel_006_undoc25(void *linux_side, bool a) +{ + return ((IVRControlPanel*)linux_side)->undoc25((bool)a); +} + +uint64_t cppIVRControlPanel_IVRControlPanel_006_undoc26(void *linux_side) +{ + return ((IVRControlPanel*)linux_side)->undoc26(); +} + +vr::EVRCompositorError cppIVRControlPanel_IVRControlPanel_006_undoc27(void *linux_side, const char * a) +{ + return ((IVRControlPanel*)linux_side)->undoc27((const char *)a); +} + +void cppIVRControlPanel_IVRControlPanel_006_undoc28(void *linux_side, VROverlayHandle_t a) +{ + ((IVRControlPanel*)linux_side)->undoc28((vr::VROverlayHandle_t)a); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.h b/vrclient_x64/vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.h new file mode 100644 index 0000000000..f35c8b7e22 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.h @@ -0,0 +1,34 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc1(void *); +extern uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc2(void *, uint32_t, char *, uint32_t); +extern EVRInitError cppIVRControlPanel_IVRControlPanel_006_undoc3(void *, const char *); +extern uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc4(void *, const char *); +extern uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc5(void *, const char *, uint32_t, char *, uint32_t); +extern uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc6(void *, const char *, const char *, char *, uint32_t); +extern uint32_t cppIVRControlPanel_IVRControlPanel_006_undoc7(void *, const char *, const char *, char *, uint32_t); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc8(void *, uint32_t); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc9(void *); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc10(void *); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc11(void *, uint32_t); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc12(void *); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc13(void *, TrackedDeviceIndex_t); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc14(void *, EVRState); +extern EVRState cppIVRControlPanel_IVRControlPanel_006_undoc15(void *); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc16(void *, bool); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc17(void *); +extern EVRApplicationError cppIVRControlPanel_IVRControlPanel_006_undoc18(void *); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc19(void *, bool); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc20(void *); +extern EVRInitError cppIVRControlPanel_IVRControlPanel_006_undoc21(void *); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc22(void *, WebConsoleHandle_t, const char *, uint32_t, uint32_t, const char *); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc23(void *, const char *); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc24(void *); +extern bool cppIVRControlPanel_IVRControlPanel_006_undoc25(void *, bool); +extern uint64_t cppIVRControlPanel_IVRControlPanel_006_undoc26(void *); +extern EVRCompositorError cppIVRControlPanel_IVRControlPanel_006_undoc27(void *, const char *); +extern void cppIVRControlPanel_IVRControlPanel_006_undoc28(void *, VROverlayHandle_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp b/vrclient_x64/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp index 69568e5cf3..1b7cc85b53 100644 --- a/vrclient_x64/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp b/vrclient_x64/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp index c8115c00c0..3b7b9c210f 100644 --- a/vrclient_x64/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.cpp b/vrclient_x64/vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.cpp new file mode 100644 index 0000000000..9fe049f718 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.cpp @@ -0,0 +1,59 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRHeadsetView_IVRHeadsetView_001.h" +#ifdef __cplusplus +extern "C" { +#endif +void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize(void *linux_side, uint32_t nWidth, uint32_t nHeight) +{ + ((IVRHeadsetView*)linux_side)->SetHeadsetViewSize((uint32_t)nWidth, (uint32_t)nHeight); +} + +void cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize(void *linux_side, uint32_t * pnWidth, uint32_t * pnHeight) +{ + ((IVRHeadsetView*)linux_side)->GetHeadsetViewSize((uint32_t *)pnWidth, (uint32_t *)pnHeight); +} + +void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode(void *linux_side, HeadsetViewMode_t eHeadsetViewMode) +{ + ((IVRHeadsetView*)linux_side)->SetHeadsetViewMode((vr::HeadsetViewMode_t)eHeadsetViewMode); +} + +vr::HeadsetViewMode_t cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode(void *linux_side) +{ + return ((IVRHeadsetView*)linux_side)->GetHeadsetViewMode(); +} + +void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped(void *linux_side, bool bCropped) +{ + ((IVRHeadsetView*)linux_side)->SetHeadsetViewCropped((bool)bCropped); +} + +bool cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped(void *linux_side) +{ + return ((IVRHeadsetView*)linux_side)->GetHeadsetViewCropped(); +} + +float cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio(void *linux_side) +{ + return ((IVRHeadsetView*)linux_side)->GetHeadsetViewAspectRatio(); +} + +void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange(void *linux_side, float flStartPct, float flEndPct) +{ + ((IVRHeadsetView*)linux_side)->SetHeadsetViewBlendRange((float)flStartPct, (float)flEndPct); +} + +void cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange(void *linux_side, float * pStartPct, float * pEndPct) +{ + ((IVRHeadsetView*)linux_side)->GetHeadsetViewBlendRange((float *)pStartPct, (float *)pEndPct); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.h b/vrclient_x64/vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.h new file mode 100644 index 0000000000..09aac9ca81 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.h @@ -0,0 +1,15 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize(void *, uint32_t, uint32_t); +extern void cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize(void *, uint32_t *, uint32_t *); +extern void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode(void *, HeadsetViewMode_t); +extern HeadsetViewMode_t cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode(void *); +extern void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped(void *, bool); +extern bool cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped(void *); +extern float cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio(void *); +extern void cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange(void *, float, float); +extern void cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange(void *, float *, float *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRIOBuffer_IVRIOBuffer_002.cpp b/vrclient_x64/vrclient_x64/cppIVRIOBuffer_IVRIOBuffer_002.cpp index fd221b4088..6a2208ce17 100644 --- a/vrclient_x64/vrclient_x64/cppIVRIOBuffer_IVRIOBuffer_002.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRIOBuffer_IVRIOBuffer_002.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.cpp b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.cpp index 0511954a30..6c0a5ecd2c 100644 --- a/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.9.16/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" @@ -34,63 +34,63 @@ vr::EVRInputError cppIVRInput_IVRInput_007_UpdateActionState(void *linux_side, V return ((IVRInput*)linux_side)->UpdateActionState((vr::VRActiveActionSet_t *)pSets, (uint32_t)unSizeOfVRSelectedActionSet_t, (uint32_t)unSetCount); } -vr::EVRInputError cppIVRInput_IVRInput_007_GetDigitalActionData(void *linux_side, VRActionHandle_t action, winInputDigitalActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +vr::EVRInputError cppIVRInput_IVRInput_007_GetDigitalActionData(void *linux_side, VRActionHandle_t action, winInputDigitalActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { InputDigitalActionData_t lin; vr::EVRInputError _ret; if(pActionData) - struct_InputDigitalActionData_t_1819_win_to_lin(pActionData, &lin); + struct_InputDigitalActionData_t_1916_win_to_lin(pActionData, &lin); _ret = ((IVRInput*)linux_side)->GetDigitalActionData((vr::VRActionHandle_t)action, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); if(pActionData) - struct_InputDigitalActionData_t_1819_lin_to_win(&lin, pActionData, unActionDataSize); + struct_InputDigitalActionData_t_1916_lin_to_win(&lin, pActionData, unActionDataSize); return _ret; } -vr::EVRInputError cppIVRInput_IVRInput_007_GetAnalogActionData(void *linux_side, VRActionHandle_t action, winInputAnalogActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +vr::EVRInputError cppIVRInput_IVRInput_007_GetAnalogActionData(void *linux_side, VRActionHandle_t action, winInputAnalogActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { InputAnalogActionData_t lin; vr::EVRInputError _ret; if(pActionData) - struct_InputAnalogActionData_t_1819_win_to_lin(pActionData, &lin); + struct_InputAnalogActionData_t_1916_win_to_lin(pActionData, &lin); _ret = ((IVRInput*)linux_side)->GetAnalogActionData((vr::VRActionHandle_t)action, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); if(pActionData) - struct_InputAnalogActionData_t_1819_lin_to_win(&lin, pActionData, unActionDataSize); + struct_InputAnalogActionData_t_1916_lin_to_win(&lin, pActionData, unActionDataSize); return _ret; } -vr::EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(void *linux_side, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, winInputPoseActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +vr::EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(void *linux_side, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, winInputPoseActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { InputPoseActionData_t lin; vr::EVRInputError _ret; if(pActionData) - struct_InputPoseActionData_t_1819_win_to_lin(pActionData, &lin); + struct_InputPoseActionData_t_1916_win_to_lin(pActionData, &lin); _ret = ((IVRInput*)linux_side)->GetPoseActionDataRelativeToNow((vr::VRActionHandle_t)action, (vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsFromNow, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); if(pActionData) - struct_InputPoseActionData_t_1819_lin_to_win(&lin, pActionData, unActionDataSize); + struct_InputPoseActionData_t_1916_lin_to_win(&lin, pActionData, unActionDataSize); return _ret; } -vr::EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(void *linux_side, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, winInputPoseActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +vr::EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(void *linux_side, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, winInputPoseActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { InputPoseActionData_t lin; vr::EVRInputError _ret; if(pActionData) - struct_InputPoseActionData_t_1819_win_to_lin(pActionData, &lin); + struct_InputPoseActionData_t_1916_win_to_lin(pActionData, &lin); _ret = ((IVRInput*)linux_side)->GetPoseActionDataForNextFrame((vr::VRActionHandle_t)action, (vr::ETrackingUniverseOrigin)eOrigin, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); if(pActionData) - struct_InputPoseActionData_t_1819_lin_to_win(&lin, pActionData, unActionDataSize); + struct_InputPoseActionData_t_1916_lin_to_win(&lin, pActionData, unActionDataSize); return _ret; } -vr::EVRInputError cppIVRInput_IVRInput_007_GetSkeletalActionData(void *linux_side, VRActionHandle_t action, winInputSkeletalActionData_t_1819 * pActionData, uint32_t unActionDataSize) +vr::EVRInputError cppIVRInput_IVRInput_007_GetSkeletalActionData(void *linux_side, VRActionHandle_t action, winInputSkeletalActionData_t_1916 * pActionData, uint32_t unActionDataSize) { InputSkeletalActionData_t lin; vr::EVRInputError _ret; if(pActionData) - struct_InputSkeletalActionData_t_1819_win_to_lin(pActionData, &lin); + struct_InputSkeletalActionData_t_1916_win_to_lin(pActionData, &lin); _ret = ((IVRInput*)linux_side)->GetSkeletalActionData((vr::VRActionHandle_t)action, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0); if(pActionData) - struct_InputSkeletalActionData_t_1819_lin_to_win(&lin, pActionData, unActionDataSize); + struct_InputSkeletalActionData_t_1916_lin_to_win(&lin, pActionData, unActionDataSize); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.h b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.h index eff2001785..79ba985dcb 100644 --- a/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.h +++ b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_007.h @@ -6,11 +6,11 @@ extern EVRInputError cppIVRInput_IVRInput_007_GetActionSetHandle(void *, const c extern EVRInputError cppIVRInput_IVRInput_007_GetActionHandle(void *, const char *, VRActionHandle_t *); extern EVRInputError cppIVRInput_IVRInput_007_GetInputSourceHandle(void *, const char *, VRInputValueHandle_t *); extern EVRInputError cppIVRInput_IVRInput_007_UpdateActionState(void *, VRActiveActionSet_t *, uint32_t, uint32_t); -extern EVRInputError cppIVRInput_IVRInput_007_GetDigitalActionData(void *, VRActionHandle_t, winInputDigitalActionData_t_1819 *, uint32_t, VRInputValueHandle_t); -extern EVRInputError cppIVRInput_IVRInput_007_GetAnalogActionData(void *, VRActionHandle_t, winInputAnalogActionData_t_1819 *, uint32_t, VRInputValueHandle_t); -extern EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(void *, VRActionHandle_t, ETrackingUniverseOrigin, float, winInputPoseActionData_t_1819 *, uint32_t, VRInputValueHandle_t); -extern EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(void *, VRActionHandle_t, ETrackingUniverseOrigin, winInputPoseActionData_t_1819 *, uint32_t, VRInputValueHandle_t); -extern EVRInputError cppIVRInput_IVRInput_007_GetSkeletalActionData(void *, VRActionHandle_t, winInputSkeletalActionData_t_1819 *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_007_GetDigitalActionData(void *, VRActionHandle_t, winInputDigitalActionData_t_1916 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_007_GetAnalogActionData(void *, VRActionHandle_t, winInputAnalogActionData_t_1916 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(void *, VRActionHandle_t, ETrackingUniverseOrigin, float, winInputPoseActionData_t_1916 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(void *, VRActionHandle_t, ETrackingUniverseOrigin, winInputPoseActionData_t_1916 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_007_GetSkeletalActionData(void *, VRActionHandle_t, winInputSkeletalActionData_t_1916 *, uint32_t); extern EVRInputError cppIVRInput_IVRInput_007_GetBoneCount(void *, VRActionHandle_t, uint32_t *); extern EVRInputError cppIVRInput_IVRInput_007_GetBoneHierarchy(void *, VRActionHandle_t, BoneIndex_t *, uint32_t); extern EVRInputError cppIVRInput_IVRInput_007_GetBoneName(void *, VRActionHandle_t, BoneIndex_t, char *, uint32_t); diff --git a/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_010.cpp b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_010.cpp new file mode 100644 index 0000000000..804c430ebe --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_010.cpp @@ -0,0 +1,209 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRInput_IVRInput_010.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVRInputError cppIVRInput_IVRInput_010_SetActionManifestPath(void *linux_side, const char * pchActionManifestPath) +{ + return ((IVRInput*)linux_side)->SetActionManifestPath((const char *)pchActionManifestPath); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetActionSetHandle(void *linux_side, const char * pchActionSetName, VRActionSetHandle_t * pHandle) +{ + return ((IVRInput*)linux_side)->GetActionSetHandle((const char *)pchActionSetName, (vr::VRActionSetHandle_t *)pHandle); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetActionHandle(void *linux_side, const char * pchActionName, VRActionHandle_t * pHandle) +{ + return ((IVRInput*)linux_side)->GetActionHandle((const char *)pchActionName, (vr::VRActionHandle_t *)pHandle); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetInputSourceHandle(void *linux_side, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) +{ + return ((IVRInput*)linux_side)->GetInputSourceHandle((const char *)pchInputSourcePath, (vr::VRInputValueHandle_t *)pHandle); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_UpdateActionState(void *linux_side, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) +{ + return ((IVRInput*)linux_side)->UpdateActionState((vr::VRActiveActionSet_t *)pSets, (uint32_t)unSizeOfVRSelectedActionSet_t, (uint32_t)unSetCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetDigitalActionData(void *linux_side, VRActionHandle_t action, winInputDigitalActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + InputDigitalActionData_t lin; + vr::EVRInputError _ret; + if(pActionData) + struct_InputDigitalActionData_t_11030_win_to_lin(pActionData, &lin); + _ret = ((IVRInput*)linux_side)->GetDigitalActionData((vr::VRActionHandle_t)action, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); + if(pActionData) + struct_InputDigitalActionData_t_11030_lin_to_win(&lin, pActionData, unActionDataSize); + return _ret; +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetAnalogActionData(void *linux_side, VRActionHandle_t action, winInputAnalogActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + InputAnalogActionData_t lin; + vr::EVRInputError _ret; + if(pActionData) + struct_InputAnalogActionData_t_11030_win_to_lin(pActionData, &lin); + _ret = ((IVRInput*)linux_side)->GetAnalogActionData((vr::VRActionHandle_t)action, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); + if(pActionData) + struct_InputAnalogActionData_t_11030_lin_to_win(&lin, pActionData, unActionDataSize); + return _ret; +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow(void *linux_side, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, winInputPoseActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + InputPoseActionData_t lin; + vr::EVRInputError _ret; + if(pActionData) + struct_InputPoseActionData_t_11030_win_to_lin(pActionData, &lin); + _ret = ((IVRInput*)linux_side)->GetPoseActionDataRelativeToNow((vr::VRActionHandle_t)action, (vr::ETrackingUniverseOrigin)eOrigin, (float)fPredictedSecondsFromNow, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); + if(pActionData) + struct_InputPoseActionData_t_11030_lin_to_win(&lin, pActionData, unActionDataSize); + return _ret; +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetPoseActionDataForNextFrame(void *linux_side, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, winInputPoseActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + InputPoseActionData_t lin; + vr::EVRInputError _ret; + if(pActionData) + struct_InputPoseActionData_t_11030_win_to_lin(pActionData, &lin); + _ret = ((IVRInput*)linux_side)->GetPoseActionDataForNextFrame((vr::VRActionHandle_t)action, (vr::ETrackingUniverseOrigin)eOrigin, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0, (vr::VRInputValueHandle_t)ulRestrictToDevice); + if(pActionData) + struct_InputPoseActionData_t_11030_lin_to_win(&lin, pActionData, unActionDataSize); + return _ret; +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetSkeletalActionData(void *linux_side, VRActionHandle_t action, winInputSkeletalActionData_t_11030 * pActionData, uint32_t unActionDataSize) +{ + InputSkeletalActionData_t lin; + vr::EVRInputError _ret; + if(pActionData) + struct_InputSkeletalActionData_t_11030_win_to_lin(pActionData, &lin); + _ret = ((IVRInput*)linux_side)->GetSkeletalActionData((vr::VRActionHandle_t)action, pActionData ? &lin : nullptr, unActionDataSize ? sizeof(lin) : 0); + if(pActionData) + struct_InputSkeletalActionData_t_11030_lin_to_win(&lin, pActionData, unActionDataSize); + return _ret; +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetDominantHand(void *linux_side, ETrackedControllerRole * peDominantHand) +{ + return ((IVRInput*)linux_side)->GetDominantHand((vr::ETrackedControllerRole *)peDominantHand); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_SetDominantHand(void *linux_side, ETrackedControllerRole eDominantHand) +{ + return ((IVRInput*)linux_side)->SetDominantHand((vr::ETrackedControllerRole)eDominantHand); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetBoneCount(void *linux_side, VRActionHandle_t action, uint32_t * pBoneCount) +{ + return ((IVRInput*)linux_side)->GetBoneCount((vr::VRActionHandle_t)action, (uint32_t *)pBoneCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetBoneHierarchy(void *linux_side, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) +{ + return ((IVRInput*)linux_side)->GetBoneHierarchy((vr::VRActionHandle_t)action, (vr::BoneIndex_t *)pParentIndices, (uint32_t)unIndexArayCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetBoneName(void *linux_side, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) +{ + return ((IVRInput*)linux_side)->GetBoneName((vr::VRActionHandle_t)action, (vr::BoneIndex_t)nBoneIndex, (char *)pchBoneName, (uint32_t)unNameBufferSize); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetSkeletalReferenceTransforms(void *linux_side, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + return ((IVRInput*)linux_side)->GetSkeletalReferenceTransforms((vr::VRActionHandle_t)action, (vr::EVRSkeletalTransformSpace)eTransformSpace, (vr::EVRSkeletalReferencePose)eReferencePose, (vr::VRBoneTransform_t *)pTransformArray, (uint32_t)unTransformArrayCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetSkeletalTrackingLevel(void *linux_side, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) +{ + return ((IVRInput*)linux_side)->GetSkeletalTrackingLevel((vr::VRActionHandle_t)action, (vr::EVRSkeletalTrackingLevel *)pSkeletalTrackingLevel); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetSkeletalBoneData(void *linux_side, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + return ((IVRInput*)linux_side)->GetSkeletalBoneData((vr::VRActionHandle_t)action, (vr::EVRSkeletalTransformSpace)eTransformSpace, (vr::EVRSkeletalMotionRange)eMotionRange, (vr::VRBoneTransform_t *)pTransformArray, (uint32_t)unTransformArrayCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetSkeletalSummaryData(void *linux_side, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) +{ + return ((IVRInput*)linux_side)->GetSkeletalSummaryData((vr::VRActionHandle_t)action, (vr::EVRSummaryType)eSummaryType, (vr::VRSkeletalSummaryData_t *)pSkeletalSummaryData); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed(void *linux_side, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) +{ + return ((IVRInput*)linux_side)->GetSkeletalBoneDataCompressed((vr::VRActionHandle_t)action, (vr::EVRSkeletalMotionRange)eMotionRange, (void *)pvCompressedData, (uint32_t)unCompressedSize, (uint32_t *)punRequiredCompressedSize); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_DecompressSkeletalBoneData(void *linux_side, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + return ((IVRInput*)linux_side)->DecompressSkeletalBoneData((const void *)pvCompressedBuffer, (uint32_t)unCompressedBufferSize, (vr::EVRSkeletalTransformSpace)eTransformSpace, (vr::VRBoneTransform_t *)pTransformArray, (uint32_t)unTransformArrayCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_TriggerHapticVibrationAction(void *linux_side, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) +{ + return ((IVRInput*)linux_side)->TriggerHapticVibrationAction((vr::VRActionHandle_t)action, (float)fStartSecondsFromNow, (float)fDurationSeconds, (float)fFrequency, (float)fAmplitude, (vr::VRInputValueHandle_t)ulRestrictToDevice); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetActionOrigins(void *linux_side, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) +{ + return ((IVRInput*)linux_side)->GetActionOrigins((vr::VRActionSetHandle_t)actionSetHandle, (vr::VRActionHandle_t)digitalActionHandle, (vr::VRInputValueHandle_t *)originsOut, (uint32_t)originOutCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetOriginLocalizedName(void *linux_side, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) +{ + return ((IVRInput*)linux_side)->GetOriginLocalizedName((vr::VRInputValueHandle_t)origin, (char *)pchNameArray, (uint32_t)unNameArraySize, (int32_t)unStringSectionsToInclude); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo(void *linux_side, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) +{ + return ((IVRInput*)linux_side)->GetOriginTrackedDeviceInfo((vr::VRInputValueHandle_t)origin, (vr::InputOriginInfo_t *)pOriginInfo, (uint32_t)unOriginInfoSize); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetActionBindingInfo(void *linux_side, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) +{ + return ((IVRInput*)linux_side)->GetActionBindingInfo((vr::VRActionHandle_t)action, (vr::InputBindingInfo_t *)pOriginInfo, (uint32_t)unBindingInfoSize, (uint32_t)unBindingInfoCount, (uint32_t *)punReturnedBindingInfoCount); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_ShowActionOrigins(void *linux_side, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) +{ + return ((IVRInput*)linux_side)->ShowActionOrigins((vr::VRActionSetHandle_t)actionSetHandle, (vr::VRActionHandle_t)ulActionHandle); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_ShowBindingsForActionSet(void *linux_side, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) +{ + return ((IVRInput*)linux_side)->ShowBindingsForActionSet((vr::VRActiveActionSet_t *)pSets, (uint32_t)unSizeOfVRSelectedActionSet_t, (uint32_t)unSetCount, (vr::VRInputValueHandle_t)originToHighlight); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetComponentStateForBinding(void *linux_side, const char * pchRenderModelName, const char * pchComponentName, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState) +{ + return ((IVRInput*)linux_side)->GetComponentStateForBinding((const char *)pchRenderModelName, (const char *)pchComponentName, (const vr::InputBindingInfo_t *)pOriginInfo, (uint32_t)unBindingInfoSize, (uint32_t)unBindingInfoCount, (vr::RenderModel_ComponentState_t *)pComponentState); +} + +bool cppIVRInput_IVRInput_010_IsUsingLegacyInput(void *linux_side) +{ + return ((IVRInput*)linux_side)->IsUsingLegacyInput(); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_OpenBindingUI(void *linux_side, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) +{ + return ((IVRInput*)linux_side)->OpenBindingUI((const char *)pchAppKey, (vr::VRActionSetHandle_t)ulActionSetHandle, (vr::VRInputValueHandle_t)ulDeviceHandle, (bool)bShowOnDesktop); +} + +vr::EVRInputError cppIVRInput_IVRInput_010_GetBindingVariant(void *linux_side, VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize) +{ + return ((IVRInput*)linux_side)->GetBindingVariant((vr::VRInputValueHandle_t)ulDevicePath, (char *)pchVariantArray, (uint32_t)unVariantArraySize); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_010.h b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_010.h new file mode 100644 index 0000000000..81b109358a --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRInput_IVRInput_010.h @@ -0,0 +1,38 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVRInputError cppIVRInput_IVRInput_010_SetActionManifestPath(void *, const char *); +extern EVRInputError cppIVRInput_IVRInput_010_GetActionSetHandle(void *, const char *, VRActionSetHandle_t *); +extern EVRInputError cppIVRInput_IVRInput_010_GetActionHandle(void *, const char *, VRActionHandle_t *); +extern EVRInputError cppIVRInput_IVRInput_010_GetInputSourceHandle(void *, const char *, VRInputValueHandle_t *); +extern EVRInputError cppIVRInput_IVRInput_010_UpdateActionState(void *, VRActiveActionSet_t *, uint32_t, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetDigitalActionData(void *, VRActionHandle_t, winInputDigitalActionData_t_11030 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetAnalogActionData(void *, VRActionHandle_t, winInputAnalogActionData_t_11030 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow(void *, VRActionHandle_t, ETrackingUniverseOrigin, float, winInputPoseActionData_t_11030 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetPoseActionDataForNextFrame(void *, VRActionHandle_t, ETrackingUniverseOrigin, winInputPoseActionData_t_11030 *, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetSkeletalActionData(void *, VRActionHandle_t, winInputSkeletalActionData_t_11030 *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetDominantHand(void *, ETrackedControllerRole *); +extern EVRInputError cppIVRInput_IVRInput_010_SetDominantHand(void *, ETrackedControllerRole); +extern EVRInputError cppIVRInput_IVRInput_010_GetBoneCount(void *, VRActionHandle_t, uint32_t *); +extern EVRInputError cppIVRInput_IVRInput_010_GetBoneHierarchy(void *, VRActionHandle_t, BoneIndex_t *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetBoneName(void *, VRActionHandle_t, BoneIndex_t, char *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetSkeletalReferenceTransforms(void *, VRActionHandle_t, EVRSkeletalTransformSpace, EVRSkeletalReferencePose, VRBoneTransform_t *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetSkeletalTrackingLevel(void *, VRActionHandle_t, EVRSkeletalTrackingLevel *); +extern EVRInputError cppIVRInput_IVRInput_010_GetSkeletalBoneData(void *, VRActionHandle_t, EVRSkeletalTransformSpace, EVRSkeletalMotionRange, VRBoneTransform_t *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetSkeletalSummaryData(void *, VRActionHandle_t, EVRSummaryType, VRSkeletalSummaryData_t *); +extern EVRInputError cppIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed(void *, VRActionHandle_t, EVRSkeletalMotionRange, void *, uint32_t, uint32_t *); +extern EVRInputError cppIVRInput_IVRInput_010_DecompressSkeletalBoneData(void *, const void *, uint32_t, EVRSkeletalTransformSpace, VRBoneTransform_t *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_TriggerHapticVibrationAction(void *, VRActionHandle_t, float, float, float, float, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetActionOrigins(void *, VRActionSetHandle_t, VRActionHandle_t, VRInputValueHandle_t *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetOriginLocalizedName(void *, VRInputValueHandle_t, char *, uint32_t, int32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo(void *, VRInputValueHandle_t, InputOriginInfo_t *, uint32_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetActionBindingInfo(void *, VRActionHandle_t, InputBindingInfo_t *, uint32_t, uint32_t, uint32_t *); +extern EVRInputError cppIVRInput_IVRInput_010_ShowActionOrigins(void *, VRActionSetHandle_t, VRActionHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_ShowBindingsForActionSet(void *, VRActiveActionSet_t *, uint32_t, uint32_t, VRInputValueHandle_t); +extern EVRInputError cppIVRInput_IVRInput_010_GetComponentStateForBinding(void *, const char *, const char *, InputBindingInfo_t *, uint32_t, uint32_t, RenderModel_ComponentState_t *); +extern bool cppIVRInput_IVRInput_010_IsUsingLegacyInput(void *); +extern EVRInputError cppIVRInput_IVRInput_010_OpenBindingUI(void *, const char *, VRActionSetHandle_t, VRInputValueHandle_t, bool); +extern EVRInputError cppIVRInput_IVRInput_010_GetBindingVariant(void *, VRInputValueHandle_t, char *, uint32_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRMailbox_IVRMailbox_001.cpp b/vrclient_x64/vrclient_x64/cppIVRMailbox_IVRMailbox_001.cpp new file mode 100644 index 0000000000..93e2312419 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRMailbox_IVRMailbox_001.cpp @@ -0,0 +1,34 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRMailbox_IVRMailbox_001.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc1(void *linux_side, const char * a, vrmb_typea * b) +{ + return ((IVRMailbox*)linux_side)->undoc1((const char *)a, (vr::vrmb_typea *)b); +} + +vr::vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc2(void *linux_side, vrmb_typea a) +{ + return ((IVRMailbox*)linux_side)->undoc2((vr::vrmb_typea)a); +} + +vr::vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc3(void *linux_side, vrmb_typea a, const char * b, const char * c) +{ + return ((IVRMailbox*)linux_side)->undoc3((vr::vrmb_typea)a, (const char *)b, (const char *)c); +} + +vr::vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc4(void *linux_side, vrmb_typea a, char * b, uint32_t c, uint32_t * d) +{ + return ((IVRMailbox*)linux_side)->undoc4((vr::vrmb_typea)a, (char *)b, (uint32_t)c, (uint32_t *)d); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRMailbox_IVRMailbox_001.h b/vrclient_x64/vrclient_x64/cppIVRMailbox_IVRMailbox_001.h new file mode 100644 index 0000000000..fbed8240e1 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRMailbox_IVRMailbox_001.h @@ -0,0 +1,10 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc1(void *, const char *, vrmb_typea *); +extern vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc2(void *, vrmb_typea); +extern vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc3(void *, vrmb_typea, const char *, const char *); +extern vrmb_typeb cppIVRMailbox_IVRMailbox_001_undoc4(void *, vrmb_typea, char *, uint32_t, uint32_t *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp b/vrclient_x64/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp index 919cafd1b3..ba526ec889 100644 --- a/vrclient_x64/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVROverlayView_IVROverlayView_003.cpp b/vrclient_x64/vrclient_x64/cppIVROverlayView_IVROverlayView_003.cpp new file mode 100644 index 0000000000..69e46e9a71 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVROverlayView_IVROverlayView_003.cpp @@ -0,0 +1,37 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlayView_IVROverlayView_003.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlayView_IVROverlayView_003_AcquireOverlayView(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t * pNativeDevice, VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize) +{ + return ((IVROverlayView*)linux_side)->AcquireOverlayView((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRNativeDevice_t *)pNativeDevice, (vr::VROverlayView_t *)pOverlayView, (uint32_t)unOverlayViewSize); +} + +vr::EVROverlayError cppIVROverlayView_IVROverlayView_003_ReleaseOverlayView(void *linux_side, VROverlayView_t * pOverlayView) +{ + return ((IVROverlayView*)linux_side)->ReleaseOverlayView((vr::VROverlayView_t *)pOverlayView); +} + +void cppIVROverlayView_IVROverlayView_003_PostOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, VREvent_t * pvrEvent) +{ + VREvent_t lin; + if(pvrEvent) + struct_VREvent_t_11030_win_to_lin(pvrEvent, &lin); + ((IVROverlayView*)linux_side)->PostOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pvrEvent ? &lin : nullptr); +} + +bool cppIVROverlayView_IVROverlayView_003_IsViewingPermitted(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlayView*)linux_side)->IsViewingPermitted((vr::VROverlayHandle_t)ulOverlayHandle); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVROverlayView_IVROverlayView_003.h b/vrclient_x64/vrclient_x64/cppIVROverlayView_IVROverlayView_003.h new file mode 100644 index 0000000000..e76f2e08b2 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVROverlayView_IVROverlayView_003.h @@ -0,0 +1,10 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlayView_IVROverlayView_003_AcquireOverlayView(void *, VROverlayHandle_t, VRNativeDevice_t *, VROverlayView_t *, uint32_t); +extern EVROverlayError cppIVROverlayView_IVROverlayView_003_ReleaseOverlayView(void *, VROverlayView_t *); +extern void cppIVROverlayView_IVROverlayView_003_PostOverlayEvent(void *, VROverlayHandle_t, VREvent_t *); +extern bool cppIVROverlayView_IVROverlayView_003_IsViewingPermitted(void *, VROverlayHandle_t); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_022.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_022.cpp new file mode 100644 index 0000000000..9db3a19928 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_022.cpp @@ -0,0 +1,431 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.9.16/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_022.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_022_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +uint32_t cppIVROverlay_IVROverlay_022_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_022_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + return ((IVROverlay*)linux_side)->SetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_022_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayFlags(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlags((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pFlags); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float)fTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + return ((IVROverlay*)linux_side)->SetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + return ((IVROverlay*)linux_side)->GetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayCurvature(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fCurvature) +{ + return ((IVROverlay*)linux_side)->SetOverlayCurvature((vr::VROverlayHandle_t)ulOverlayHandle, (float)fCurvature); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayCurvature(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +{ + return ((IVROverlay*)linux_side)->GetOverlayCurvature((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfCurvature); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +uint32_t cppIVROverlay_IVROverlay_022_GetOverlayRenderModel(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderModel((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::HmdColor_t *)pColor, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayRenderModel(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderModel((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchRenderModel, (const vr::HmdColor_t *)pColor); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t *)ulOverlayHandleParent, (vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t)ulOverlayHandleParent, (const vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformCursor(void *linux_side, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformCursor((vr::VROverlayHandle_t)ulCursorOverlayHandle, (const vr::HmdVector2_t *)pvHotspot); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformCursor(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformCursor((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvHotspot); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_022_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_022_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1916 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + if(pEvent) + struct_VREvent_t_1916_win_to_lin(pEvent, &lin); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_1916_lin_to_win(&lin, pEvent, uncbVREvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_022_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_022_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform(void *linux_side, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) +{ + return ((IVROverlay*)linux_side)->SetOverlayDualAnalogTransform((vr::VROverlayHandle_t)ulOverlay, (vr::EDualAnalogWhich)eWhich, (const vr::HmdVector2_t *)pvCenter, (float)fRadius); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform(void *linux_side, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +{ + return ((IVROverlay*)linux_side)->GetOverlayDualAnalogTransform((vr::VROverlayHandle_t)ulOverlay, (vr::EDualAnalogWhich)eWhich, (vr::HmdVector2_t *)pvCenter, (float *)pfRadius); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayIntersectionMask(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + return ((IVROverlay*)linux_side)->SetOverlayIntersectionMask((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayIntersectionMaskPrimitive_t *)pMaskPrimitives, (uint32_t)unNumMaskPrimitives, (uint32_t)unPrimitiveSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) +{ + return ((IVROverlay*)linux_side)->TriggerLaserMouseHapticVibration((vr::VROverlayHandle_t)ulOverlayHandle, (float)fDurationSeconds, (float)fFrequency, (float)fAmplitude); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayCursor(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) +{ + return ((IVROverlay*)linux_side)->SetOverlayCursor((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t)ulCursorHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) +{ + return ((IVROverlay*)linux_side)->SetOverlayCursorPositionOverride((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvCursor); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayCursorPositionOverride((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unBytesPerPixel); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::ETextureType *)pAPIType, (vr::EColorSpace *)pColorSpace, (vr::VRTextureBounds_t *)pTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_022_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_022_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_022_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_022_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (bool)bUseMinimalMode, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_022_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_022_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +vr::VRMessageOverlayResponse cppIVROverlay_IVROverlay_022_ShowMessageOverlay(void *linux_side, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + return ((IVROverlay*)linux_side)->ShowMessageOverlay((const char *)pchText, (const char *)pchCaption, (const char *)pchButton0Text, (const char *)pchButton1Text, (const char *)pchButton2Text, (const char *)pchButton3Text); +} + +void cppIVROverlay_IVROverlay_022_CloseMessageOverlay(void *linux_side) +{ + ((IVROverlay*)linux_side)->CloseMessageOverlay(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_022.h b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_022.h new file mode 100644 index 0000000000..f820895894 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_022.h @@ -0,0 +1,88 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_022_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_DestroyOverlay(void *, VROverlayHandle_t); +extern uint32_t cppIVROverlay_IVROverlay_022_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_022_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayName(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_022_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayFlags(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTexelAspect(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTexelAspect(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayCurvature(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayCurvature(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern uint32_t cppIVROverlay_IVROverlay_022_GetOverlayRenderModel(void *, VROverlayHandle_t, char *, uint32_t, HmdColor_t *, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayRenderModel(void *, VROverlayHandle_t, const char *, HmdColor_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTransformCursor(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTransformCursor(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_022_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_022_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_1916 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_022_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_022_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform(void *, VROverlayHandle_t, EDualAnalogWhich, HmdVector2_t *, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform(void *, VROverlayHandle_t, EDualAnalogWhich, HmdVector2_t *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayIntersectionMask(void *, VROverlayHandle_t, VROverlayIntersectionMaskPrimitive_t *, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayCursor(void *, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, ETextureType *, EColorSpace *, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_022_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_022_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_022_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_022_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_022_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, const char *, uint32_t, const char *, bool, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_022_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_022_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +extern VRMessageOverlayResponse cppIVROverlay_IVROverlay_022_ShowMessageOverlay(void *, const char *, const char *, const char *, const char *, const char *, const char *); +extern void cppIVROverlay_IVROverlay_022_CloseMessageOverlay(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_024.cpp b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_024.cpp new file mode 100644 index 0000000000..df1f2e3048 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_024.cpp @@ -0,0 +1,411 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVROverlay_IVROverlay_024.h" +#ifdef __cplusplus +extern "C" { +#endif +vr::EVROverlayError cppIVROverlay_IVROverlay_024_FindOverlay(void *linux_side, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->FindOverlay((const char *)pchOverlayKey, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_CreateOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + return ((IVROverlay*)linux_side)->CreateOverlay((const char *)pchOverlayKey, (const char *)pchOverlayName, (vr::VROverlayHandle_t *)pOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_DestroyOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->DestroyOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +uint32_t cppIVROverlay_IVROverlay_024_GetOverlayKey(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayKey((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +uint32_t cppIVROverlay_IVROverlay_024_GetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + return ((IVROverlay*)linux_side)->GetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (char *)pchValue, (uint32_t)unBufferSize, (vr::EVROverlayError *)pError); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayName(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + return ((IVROverlay*)linux_side)->SetOverlayName((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayImageData(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayImageData((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unBufferSize, (uint32_t *)punWidth, (uint32_t *)punHeight); +} + +const char * cppIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum(void *linux_side, EVROverlayError error) +{ + return ((IVROverlay*)linux_side)->GetOverlayErrorNameFromEnum((vr::EVROverlayError)error); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + return ((IVROverlay*)linux_side)->SetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unPID); +} + +uint32_t cppIVROverlay_IVROverlay_024_GetOverlayRenderingPid(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->GetOverlayRenderingPid((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + return ((IVROverlay*)linux_side)->SetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool)bEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayFlag(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlag((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayFlags)eOverlayFlag, (bool *)pbEnabled); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayFlags(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + return ((IVROverlay*)linux_side)->GetOverlayFlags((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pFlags); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + return ((IVROverlay*)linux_side)->SetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float)fRed, (float)fGreen, (float)fBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayColor(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + return ((IVROverlay*)linux_side)->GetOverlayColor((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfRed, (float *)pfGreen, (float *)pfBlue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + return ((IVROverlay*)linux_side)->SetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float)fAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayAlpha(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + return ((IVROverlay*)linux_side)->GetOverlayAlpha((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfAlpha); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float)fTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTexelAspect(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexelAspect((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfTexelAspect); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + return ((IVROverlay*)linux_side)->SetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlaySortOrder(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + return ((IVROverlay*)linux_side)->GetOverlaySortOrder((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punSortOrder); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + return ((IVROverlay*)linux_side)->SetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float)fWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayWidthInMeters(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + return ((IVROverlay*)linux_side)->GetOverlayWidthInMeters((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfWidthInMeters); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayCurvature(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fCurvature) +{ + return ((IVROverlay*)linux_side)->SetOverlayCurvature((vr::VROverlayHandle_t)ulOverlayHandle, (float)fCurvature); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayCurvature(void *linux_side, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +{ + return ((IVROverlay*)linux_side)->GetOverlayCurvature((vr::VROverlayHandle_t)ulOverlayHandle, (float *)pfCurvature); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace)eTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace(void *linux_side, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureColorSpace((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EColorSpace *)peTextureColorSpace); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->SetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTextureBounds(void *linux_side, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureBounds((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VRTextureBounds_t *)pOverlayTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformType(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformType((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayTransformType *)peTransformType); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformAbsolute((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin *)peTrackingOrigin, (vr::HmdMatrix34_t *)pmatTrackingOriginToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unTrackedDevice, (const vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punTrackedDevice, (vr::HmdMatrix34_t *)pmatTrackedDeviceToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t)unDeviceIndex, (const char *)pchComponentName); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(void *linux_side, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformTrackedDeviceComponent((vr::VROverlayHandle_t)ulOverlayHandle, (vr::TrackedDeviceIndex_t *)punDeviceIndex, (char *)pchComponentName, (uint32_t)unComponentNameSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t *)ulOverlayHandleParent, (vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformOverlayRelative((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t)ulOverlayHandleParent, (const vr::HmdMatrix34_t *)pmatParentOverlayToOverlayTransform); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformCursor(void *linux_side, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) +{ + return ((IVROverlay*)linux_side)->SetOverlayTransformCursor((vr::VROverlayHandle_t)ulCursorOverlayHandle, (const vr::HmdVector2_t *)pvHotspot); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformCursor(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) +{ + return ((IVROverlay*)linux_side)->GetOverlayTransformCursor((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvHotspot); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_ShowOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ShowOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_HideOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->HideOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +bool cppIVROverlay_IVROverlay_024_IsOverlayVisible(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsOverlayVisible((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates(void *linux_side, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + return ((IVROverlay*)linux_side)->GetTransformForOverlayCoordinates((vr::VROverlayHandle_t)ulOverlayHandle, (vr::ETrackingUniverseOrigin)eTrackingOrigin, (vr::HmdVector2_t)coordinatesInOverlay, (vr::HmdMatrix34_t *)pmatTransform); +} + +bool cppIVROverlay_IVROverlay_024_PollNextOverlayEvent(void *linux_side, VROverlayHandle_t ulOverlayHandle, winVREvent_t_11030 * pEvent, uint32_t uncbVREvent) +{ + VREvent_t lin; + bool _ret; + if(pEvent) + struct_VREvent_t_11030_win_to_lin(pEvent, &lin); + _ret = ((IVROverlay*)linux_side)->PollNextOverlayEvent((vr::VROverlayHandle_t)ulOverlayHandle, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); + if(pEvent) + struct_VREvent_t_11030_lin_to_win(&lin, pEvent, uncbVREvent); + return _ret; +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + return ((IVROverlay*)linux_side)->GetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod *)peInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayInputMethod(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + return ((IVROverlay*)linux_side)->SetOverlayInputMethod((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayInputMethod)eInputMethod); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->GetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdVector2_t *)pvecMouseScale); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayMouseScale(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + return ((IVROverlay*)linux_side)->SetOverlayMouseScale((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvecMouseScale); +} + +bool cppIVROverlay_IVROverlay_024_ComputeOverlayIntersection(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + return ((IVROverlay*)linux_side)->ComputeOverlayIntersection((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::VROverlayIntersectionParams_t *)pParams, (vr::VROverlayIntersectionResults_t *)pResults); +} + +bool cppIVROverlay_IVROverlay_024_IsHoverTargetOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsHoverTargetOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayIntersectionMask(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + return ((IVROverlay*)linux_side)->SetOverlayIntersectionMask((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayIntersectionMaskPrimitive_t *)pMaskPrimitives, (uint32_t)unNumMaskPrimitives, (uint32_t)unPrimitiveSize); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration(void *linux_side, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) +{ + return ((IVROverlay*)linux_side)->TriggerLaserMouseHapticVibration((vr::VROverlayHandle_t)ulOverlayHandle, (float)fDurationSeconds, (float)fFrequency, (float)fAmplitude); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayCursor(void *linux_side, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) +{ + return ((IVROverlay*)linux_side)->SetOverlayCursor((vr::VROverlayHandle_t)ulOverlayHandle, (vr::VROverlayHandle_t)ulCursorHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) +{ + return ((IVROverlay*)linux_side)->SetOverlayCursorPositionOverride((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::HmdVector2_t *)pvCursor); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayCursorPositionOverride((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + return ((IVROverlay*)linux_side)->SetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (const vr::Texture_t *)pTexture); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_ClearOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->ClearOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayRaw(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) +{ + return ((IVROverlay*)linux_side)->SetOverlayRaw((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pvBuffer, (uint32_t)unWidth, (uint32_t)unHeight, (uint32_t)unBytesPerPixel); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayFromFile(void *linux_side, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + return ((IVROverlay*)linux_side)->SetOverlayFromFile((vr::VROverlayHandle_t)ulOverlayHandle, (const char *)pchFilePath); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTexture(void *linux_side, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + return ((IVROverlay*)linux_side)->GetOverlayTexture((vr::VROverlayHandle_t)ulOverlayHandle, (void **)pNativeTextureHandle, (void *)pNativeTextureRef, (uint32_t *)pWidth, (uint32_t *)pHeight, (uint32_t *)pNativeFormat, (vr::ETextureType *)pAPIType, (vr::EColorSpace *)pColorSpace, (vr::VRTextureBounds_t *)pTextureBounds); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle(void *linux_side, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + return ((IVROverlay*)linux_side)->ReleaseNativeOverlayHandle((vr::VROverlayHandle_t)ulOverlayHandle, (void *)pNativeTextureHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTextureSize(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + return ((IVROverlay*)linux_side)->GetOverlayTextureSize((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)pWidth, (uint32_t *)pHeight); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_CreateDashboardOverlay(void *linux_side, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + return ((IVROverlay*)linux_side)->CreateDashboardOverlay((const char *)pchOverlayKey, (const char *)pchOverlayFriendlyName, (vr::VROverlayHandle_t *)pMainHandle, (vr::VROverlayHandle_t *)pThumbnailHandle); +} + +bool cppIVROverlay_IVROverlay_024_IsDashboardVisible(void *linux_side) +{ + return ((IVROverlay*)linux_side)->IsDashboardVisible(); +} + +bool cppIVROverlay_IVROverlay_024_IsActiveDashboardOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle) +{ + return ((IVROverlay*)linux_side)->IsActiveDashboardOverlay((vr::VROverlayHandle_t)ulOverlayHandle); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + return ((IVROverlay*)linux_side)->SetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t)unProcessId); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess(void *linux_side, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + return ((IVROverlay*)linux_side)->GetDashboardOverlaySceneProcess((vr::VROverlayHandle_t)ulOverlayHandle, (uint32_t *)punProcessId); +} + +void cppIVROverlay_IVROverlay_024_ShowDashboard(void *linux_side, const char * pchOverlayToShow) +{ + ((IVROverlay*)linux_side)->ShowDashboard((const char *)pchOverlayToShow); +} + +vr::TrackedDeviceIndex_t cppIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice(void *linux_side) +{ + return ((IVROverlay*)linux_side)->GetPrimaryDashboardDevice(); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_ShowKeyboard(void *linux_side, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboard((vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (uint32_t)unFlags, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (uint64_t)uUserValue); +} + +vr::EVROverlayError cppIVROverlay_IVROverlay_024_ShowKeyboardForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) +{ + return ((IVROverlay*)linux_side)->ShowKeyboardForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::EGamepadTextInputMode)eInputMode, (vr::EGamepadTextInputLineMode)eLineInputMode, (uint32_t)unFlags, (const char *)pchDescription, (uint32_t)unCharMax, (const char *)pchExistingText, (uint64_t)uUserValue); +} + +uint32_t cppIVROverlay_IVROverlay_024_GetKeyboardText(void *linux_side, char * pchText, uint32_t cchText) +{ + return ((IVROverlay*)linux_side)->GetKeyboardText((char *)pchText, (uint32_t)cchText); +} + +void cppIVROverlay_IVROverlay_024_HideKeyboard(void *linux_side) +{ + ((IVROverlay*)linux_side)->HideKeyboard(); +} + +void cppIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute(void *linux_side, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + ((IVROverlay*)linux_side)->SetKeyboardTransformAbsolute((vr::ETrackingUniverseOrigin)eTrackingOrigin, (const vr::HmdMatrix34_t *)pmatTrackingOriginToKeyboardTransform); +} + +void cppIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay(void *linux_side, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + ((IVROverlay*)linux_side)->SetKeyboardPositionForOverlay((vr::VROverlayHandle_t)ulOverlayHandle, (vr::HmdRect2_t)avoidRect); +} + +vr::VRMessageOverlayResponse cppIVROverlay_IVROverlay_024_ShowMessageOverlay(void *linux_side, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + return ((IVROverlay*)linux_side)->ShowMessageOverlay((const char *)pchText, (const char *)pchCaption, (const char *)pchButton0Text, (const char *)pchButton1Text, (const char *)pchButton2Text, (const char *)pchButton3Text); +} + +void cppIVROverlay_IVROverlay_024_CloseMessageOverlay(void *linux_side) +{ + ((IVROverlay*)linux_side)->CloseMessageOverlay(); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_024.h b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_024.h new file mode 100644 index 0000000000..01a92c0324 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVROverlay_IVROverlay_024.h @@ -0,0 +1,84 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern EVROverlayError cppIVROverlay_IVROverlay_024_FindOverlay(void *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_CreateOverlay(void *, const char *, const char *, VROverlayHandle_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_DestroyOverlay(void *, VROverlayHandle_t); +extern uint32_t cppIVROverlay_IVROverlay_024_GetOverlayKey(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern uint32_t cppIVROverlay_IVROverlay_024_GetOverlayName(void *, VROverlayHandle_t, char *, uint32_t, EVROverlayError *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayName(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayImageData(void *, VROverlayHandle_t, void *, uint32_t, uint32_t *, uint32_t *); +extern const char * cppIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum(void *, EVROverlayError); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayRenderingPid(void *, VROverlayHandle_t, uint32_t); +extern uint32_t cppIVROverlay_IVROverlay_024_GetOverlayRenderingPid(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayFlag(void *, VROverlayHandle_t, VROverlayFlags, bool *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayFlags(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayColor(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayColor(void *, VROverlayHandle_t, float *, float *, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayAlpha(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayAlpha(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTexelAspect(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTexelAspect(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlaySortOrder(void *, VROverlayHandle_t, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayWidthInMeters(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayWidthInMeters(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayCurvature(void *, VROverlayHandle_t, float); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayCurvature(void *, VROverlayHandle_t, float *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace(void *, VROverlayHandle_t, EColorSpace *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTextureBounds(void *, VROverlayHandle_t, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformType(void *, VROverlayHandle_t, VROverlayTransformType *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute(void *, VROverlayHandle_t, ETrackingUniverseOrigin *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(void *, VROverlayHandle_t, TrackedDeviceIndex_t *, char *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t *, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative(void *, VROverlayHandle_t, VROverlayHandle_t, HmdMatrix34_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTransformCursor(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTransformCursor(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_ShowOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_HideOverlay(void *, VROverlayHandle_t); +extern bool cppIVROverlay_IVROverlay_024_IsOverlayVisible(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates(void *, VROverlayHandle_t, ETrackingUniverseOrigin, HmdVector2_t, HmdMatrix34_t *); +extern bool cppIVROverlay_IVROverlay_024_PollNextOverlayEvent(void *, VROverlayHandle_t, winVREvent_t_11030 *, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayInputMethod(void *, VROverlayHandle_t, VROverlayInputMethod); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayMouseScale(void *, VROverlayHandle_t, HmdVector2_t *); +extern bool cppIVROverlay_IVROverlay_024_ComputeOverlayIntersection(void *, VROverlayHandle_t, VROverlayIntersectionParams_t *, VROverlayIntersectionResults_t *); +extern bool cppIVROverlay_IVROverlay_024_IsHoverTargetOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayIntersectionMask(void *, VROverlayHandle_t, VROverlayIntersectionMaskPrimitive_t *, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration(void *, VROverlayHandle_t, float, float, float); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayCursor(void *, VROverlayHandle_t, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride(void *, VROverlayHandle_t, HmdVector2_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayTexture(void *, VROverlayHandle_t, Texture_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_ClearOverlayTexture(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayRaw(void *, VROverlayHandle_t, void *, uint32_t, uint32_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetOverlayFromFile(void *, VROverlayHandle_t, const char *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTexture(void *, VROverlayHandle_t, void **, void *, uint32_t *, uint32_t *, uint32_t *, ETextureType *, EColorSpace *, VRTextureBounds_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle(void *, VROverlayHandle_t, void *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetOverlayTextureSize(void *, VROverlayHandle_t, uint32_t *, uint32_t *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_CreateDashboardOverlay(void *, const char *, const char *, VROverlayHandle_t *, VROverlayHandle_t *); +extern bool cppIVROverlay_IVROverlay_024_IsDashboardVisible(void *); +extern bool cppIVROverlay_IVROverlay_024_IsActiveDashboardOverlay(void *, VROverlayHandle_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess(void *, VROverlayHandle_t, uint32_t *); +extern void cppIVROverlay_IVROverlay_024_ShowDashboard(void *, const char *); +extern TrackedDeviceIndex_t cppIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice(void *); +extern EVROverlayError cppIVROverlay_IVROverlay_024_ShowKeyboard(void *, EGamepadTextInputMode, EGamepadTextInputLineMode, uint32_t, const char *, uint32_t, const char *, uint64_t); +extern EVROverlayError cppIVROverlay_IVROverlay_024_ShowKeyboardForOverlay(void *, VROverlayHandle_t, EGamepadTextInputMode, EGamepadTextInputLineMode, uint32_t, const char *, uint32_t, const char *, uint64_t); +extern uint32_t cppIVROverlay_IVROverlay_024_GetKeyboardText(void *, char *, uint32_t); +extern void cppIVROverlay_IVROverlay_024_HideKeyboard(void *); +extern void cppIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute(void *, ETrackingUniverseOrigin, HmdMatrix34_t *); +extern void cppIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay(void *, VROverlayHandle_t, HmdRect2_t); +extern VRMessageOverlayResponse cppIVROverlay_IVROverlay_024_ShowMessageOverlay(void *, const char *, const char *, const char *, const char *, const char *, const char *); +extern void cppIVROverlay_IVROverlay_024_CloseMessageOverlay(void *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp index fe3007d3a4..a531055fce 100644 --- a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" @@ -9,34 +9,34 @@ extern "C" { #ifdef __cplusplus extern "C" { #endif -vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *linux_side, const char * pchRenderModelName, winRenderModel_t_1819 ** ppRenderModel) +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *linux_side, const char * pchRenderModelName, winRenderModel_t_11030 ** ppRenderModel) { RenderModel_t *lin; vr::EVRRenderModelError _ret; _ret = ((IVRRenderModels*)linux_side)->LoadRenderModel_Async((const char *)pchRenderModelName, ppRenderModel ? &lin : nullptr); if(_ret == 0) - *ppRenderModel = struct_RenderModel_t_1819_wrap(lin); + *ppRenderModel = struct_RenderModel_t_11030_wrap(lin); return _ret; } -void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *linux_side, winRenderModel_t_1819 * pRenderModel) +void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *linux_side, winRenderModel_t_11030 * pRenderModel) { - ((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_1819_unwrap(pRenderModel)); + ((IVRRenderModels*)linux_side)->FreeRenderModel(struct_RenderModel_t_11030_unwrap(pRenderModel)); } -vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_1819 ** ppTexture) +vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *linux_side, TextureID_t textureId, winRenderModel_TextureMap_t_11030 ** ppTexture) { RenderModel_TextureMap_t *lin; vr::EVRRenderModelError _ret; _ret = ((IVRRenderModels*)linux_side)->LoadTexture_Async((vr::TextureID_t)textureId, ppTexture ? &lin : nullptr); if(_ret == 0) - *ppTexture = struct_RenderModel_TextureMap_t_1819_wrap(lin); + *ppTexture = struct_RenderModel_TextureMap_t_11030_wrap(lin); return _ret; } -void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_1819 * pTexture) +void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *linux_side, winRenderModel_TextureMap_t_11030 * pTexture) { - ((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_1819_unwrap(pTexture)); + ((IVRRenderModels*)linux_side)->FreeTexture(struct_RenderModel_TextureMap_t_11030_unwrap(pTexture)); } vr::EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTextureD3D11_Async(void *linux_side, TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D) @@ -94,7 +94,7 @@ bool cppIVRRenderModels_IVRRenderModels_006_GetComponentState(void *linux_side, VRControllerState001_t lin; bool _ret; if(pControllerState) - struct_VRControllerState001_t_1819_win_to_lin(pControllerState, &lin); + struct_VRControllerState001_t_11030_win_to_lin(pControllerState, &lin); _ret = ((IVRRenderModels*)linux_side)->GetComponentState((const char *)pchRenderModelName, (const char *)pchComponentName, pControllerState ? &lin : nullptr, (const vr::RenderModel_ControllerMode_State_t *)pState, (vr::RenderModel_ComponentState_t *)pComponentState); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.h b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.h index 2bb0c7fbf8..4319c7311b 100644 --- a/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.h +++ b/vrclient_x64/vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.h @@ -1,10 +1,10 @@ #ifdef __cplusplus extern "C" { #endif -extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *, const char *, winRenderModel_t_1819 **); -extern void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *, winRenderModel_t_1819 *); -extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *, TextureID_t, winRenderModel_TextureMap_t_1819 **); -extern void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *, winRenderModel_TextureMap_t_1819 *); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(void *, const char *, winRenderModel_t_11030 **); +extern void cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(void *, winRenderModel_t_11030 *); +extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(void *, TextureID_t, winRenderModel_TextureMap_t_11030 **); +extern void cppIVRRenderModels_IVRRenderModels_006_FreeTexture(void *, winRenderModel_TextureMap_t_11030 *); extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadTextureD3D11_Async(void *, TextureID_t, void *, void **); extern EVRRenderModelError cppIVRRenderModels_IVRRenderModels_006_LoadIntoTextureD3D11_Async(void *, TextureID_t, void *); extern void cppIVRRenderModels_IVRRenderModels_006_FreeTextureD3D11(void *, void *); diff --git a/vrclient_x64/vrclient_x64/cppIVRResources_IVRResources_001.cpp b/vrclient_x64/vrclient_x64/cppIVRResources_IVRResources_001.cpp index 576ea06e15..9fca6f8671 100644 --- a/vrclient_x64/vrclient_x64/cppIVRResources_IVRResources_001.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRResources_IVRResources_001.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp b/vrclient_x64/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp index 0332fa0cac..0876b3b862 100644 --- a/vrclient_x64/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" diff --git a/vrclient_x64/vrclient_x64/cppIVRSettings_IVRSettings_003.cpp b/vrclient_x64/vrclient_x64/cppIVRSettings_IVRSettings_003.cpp new file mode 100644 index 0000000000..84c85cebf9 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRSettings_IVRSettings_003.cpp @@ -0,0 +1,69 @@ +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/ivrclientcore.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +} +#include "cppIVRSettings_IVRSettings_003.h" +#ifdef __cplusplus +extern "C" { +#endif +const char * cppIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum(void *linux_side, EVRSettingsError eError) +{ + return ((IVRSettings*)linux_side)->GetSettingsErrorNameFromEnum((vr::EVRSettingsError)eError); +} + +void cppIVRSettings_IVRSettings_003_SetBool(void *linux_side, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetBool((const char *)pchSection, (const char *)pchSettingsKey, (bool)bValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_003_SetInt32(void *linux_side, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetInt32((const char *)pchSection, (const char *)pchSettingsKey, (int32_t)nValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_003_SetFloat(void *linux_side, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetFloat((const char *)pchSection, (const char *)pchSettingsKey, (float)flValue, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_003_SetString(void *linux_side, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->SetString((const char *)pchSection, (const char *)pchSettingsKey, (const char *)pchValue, (vr::EVRSettingsError *)peError); +} + +bool cppIVRSettings_IVRSettings_003_GetBool(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetBool((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +int32_t cppIVRSettings_IVRSettings_003_GetInt32(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetInt32((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +float cppIVRSettings_IVRSettings_003_GetFloat(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + return ((IVRSettings*)linux_side)->GetFloat((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_003_GetString(void *linux_side, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->GetString((const char *)pchSection, (const char *)pchSettingsKey, (char *)pchValue, (uint32_t)unValueLen, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_003_RemoveSection(void *linux_side, const char * pchSection, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->RemoveSection((const char *)pchSection, (vr::EVRSettingsError *)peError); +} + +void cppIVRSettings_IVRSettings_003_RemoveKeyInSection(void *linux_side, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + ((IVRSettings*)linux_side)->RemoveKeyInSection((const char *)pchSection, (const char *)pchSettingsKey, (vr::EVRSettingsError *)peError); +} + +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRSettings_IVRSettings_003.h b/vrclient_x64/vrclient_x64/cppIVRSettings_IVRSettings_003.h new file mode 100644 index 0000000000..3abf998a29 --- /dev/null +++ b/vrclient_x64/vrclient_x64/cppIVRSettings_IVRSettings_003.h @@ -0,0 +1,17 @@ +#ifdef __cplusplus +extern "C" { +#endif +extern const char * cppIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum(void *, EVRSettingsError); +extern void cppIVRSettings_IVRSettings_003_SetBool(void *, const char *, const char *, bool, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_003_SetInt32(void *, const char *, const char *, int32_t, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_003_SetFloat(void *, const char *, const char *, float, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_003_SetString(void *, const char *, const char *, const char *, EVRSettingsError *); +extern bool cppIVRSettings_IVRSettings_003_GetBool(void *, const char *, const char *, EVRSettingsError *); +extern int32_t cppIVRSettings_IVRSettings_003_GetInt32(void *, const char *, const char *, EVRSettingsError *); +extern float cppIVRSettings_IVRSettings_003_GetFloat(void *, const char *, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_003_GetString(void *, const char *, const char *, char *, uint32_t, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_003_RemoveSection(void *, const char *, EVRSettingsError *); +extern void cppIVRSettings_IVRSettings_003_RemoveKeyInSection(void *, const char *, const char *, EVRSettingsError *); +#ifdef __cplusplus +} +#endif diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.cpp b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.cpp index c9e7c5817f..5a5c75f435 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" @@ -159,27 +159,27 @@ const char * cppIVRSystem_IVRSystem_021_GetPropErrorNameFromEnum(void *linux_sid return ((IVRSystem*)linux_side)->GetPropErrorNameFromEnum((vr::ETrackedPropertyError)error); } -bool cppIVRSystem_IVRSystem_021_PollNextEvent(void *linux_side, winVREvent_t_1819 * pEvent, uint32_t uncbVREvent) +bool cppIVRSystem_IVRSystem_021_PollNextEvent(void *linux_side, winVREvent_t_11030 * pEvent, uint32_t uncbVREvent) { VREvent_t lin; bool _ret; if(pEvent) - struct_VREvent_t_1819_win_to_lin(pEvent, &lin); + struct_VREvent_t_11030_win_to_lin(pEvent, &lin); _ret = ((IVRSystem*)linux_side)->PollNextEvent(pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0); if(pEvent) - struct_VREvent_t_1819_lin_to_win(&lin, pEvent, uncbVREvent); + struct_VREvent_t_11030_lin_to_win(&lin, pEvent, uncbVREvent); return _ret; } -bool cppIVRSystem_IVRSystem_021_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_1819 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +bool cppIVRSystem_IVRSystem_021_PollNextEventWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, winVREvent_t_11030 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) { VREvent_t lin; bool _ret; if(pEvent) - struct_VREvent_t_1819_win_to_lin(pEvent, &lin); + struct_VREvent_t_11030_win_to_lin(pEvent, &lin); _ret = ((IVRSystem*)linux_side)->PollNextEventWithPose((vr::ETrackingUniverseOrigin)eOrigin, pEvent ? &lin : nullptr, uncbVREvent ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); if(pEvent) - struct_VREvent_t_1819_lin_to_win(&lin, pEvent, uncbVREvent); + struct_VREvent_t_11030_lin_to_win(&lin, pEvent, uncbVREvent); return _ret; } @@ -193,27 +193,27 @@ vr::HiddenAreaMesh_t cppIVRSystem_IVRSystem_021_GetHiddenAreaMesh(void *linux_si return ((IVRSystem*)linux_side)->GetHiddenAreaMesh((vr::EVREye)eEye, (vr::EHiddenAreaMeshType)type); } -bool cppIVRSystem_IVRSystem_021_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1819 * pControllerState, uint32_t unControllerStateSize) +bool cppIVRSystem_IVRSystem_021_GetControllerState(void *linux_side, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_11030 * pControllerState, uint32_t unControllerStateSize) { VRControllerState001_t lin; bool _ret; if(pControllerState) - struct_VRControllerState001_t_1819_win_to_lin(pControllerState, &lin); + struct_VRControllerState001_t_11030_win_to_lin(pControllerState, &lin); _ret = ((IVRSystem*)linux_side)->GetControllerState((vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0); if(pControllerState) - struct_VRControllerState001_t_1819_lin_to_win(&lin, pControllerState, unControllerStateSize); + struct_VRControllerState001_t_11030_lin_to_win(&lin, pControllerState, unControllerStateSize); return _ret; } -bool cppIVRSystem_IVRSystem_021_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1819 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +bool cppIVRSystem_IVRSystem_021_GetControllerStateWithPose(void *linux_side, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_11030 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) { VRControllerState001_t lin; bool _ret; if(pControllerState) - struct_VRControllerState001_t_1819_win_to_lin(pControllerState, &lin); + struct_VRControllerState001_t_11030_win_to_lin(pControllerState, &lin); _ret = ((IVRSystem*)linux_side)->GetControllerStateWithPose((vr::ETrackingUniverseOrigin)eOrigin, (vr::TrackedDeviceIndex_t)unControllerDeviceIndex, pControllerState ? &lin : nullptr, unControllerStateSize ? sizeof(lin) : 0, (vr::TrackedDevicePose_t *)pTrackedDevicePose); if(pControllerState) - struct_VRControllerState001_t_1819_lin_to_win(&lin, pControllerState, unControllerStateSize); + struct_VRControllerState001_t_11030_lin_to_win(&lin, pControllerState, unControllerStateSize); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.h b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.h index 4fdff35e88..85c0d69006 100644 --- a/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.h +++ b/vrclient_x64/vrclient_x64/cppIVRSystem_IVRSystem_021.h @@ -31,12 +31,12 @@ extern HmdMatrix34_t cppIVRSystem_IVRSystem_021_GetMatrix34TrackedDeviceProperty extern uint32_t cppIVRSystem_IVRSystem_021_GetArrayTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, PropertyTypeTag_t, void *, uint32_t, ETrackedPropertyError *); extern uint32_t cppIVRSystem_IVRSystem_021_GetStringTrackedDeviceProperty(void *, TrackedDeviceIndex_t, ETrackedDeviceProperty, char *, uint32_t, ETrackedPropertyError *); extern const char * cppIVRSystem_IVRSystem_021_GetPropErrorNameFromEnum(void *, ETrackedPropertyError); -extern bool cppIVRSystem_IVRSystem_021_PollNextEvent(void *, winVREvent_t_1819 *, uint32_t); -extern bool cppIVRSystem_IVRSystem_021_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_1819 *, uint32_t, TrackedDevicePose_t *); +extern bool cppIVRSystem_IVRSystem_021_PollNextEvent(void *, winVREvent_t_11030 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_021_PollNextEventWithPose(void *, ETrackingUniverseOrigin, winVREvent_t_11030 *, uint32_t, TrackedDevicePose_t *); extern const char * cppIVRSystem_IVRSystem_021_GetEventTypeNameFromEnum(void *, EVREventType); extern HiddenAreaMesh_t cppIVRSystem_IVRSystem_021_GetHiddenAreaMesh(void *, EVREye, EHiddenAreaMeshType); -extern bool cppIVRSystem_IVRSystem_021_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_1819 *, uint32_t); -extern bool cppIVRSystem_IVRSystem_021_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_1819 *, uint32_t, TrackedDevicePose_t *); +extern bool cppIVRSystem_IVRSystem_021_GetControllerState(void *, TrackedDeviceIndex_t, winVRControllerState001_t_11030 *, uint32_t); +extern bool cppIVRSystem_IVRSystem_021_GetControllerStateWithPose(void *, ETrackingUniverseOrigin, TrackedDeviceIndex_t, winVRControllerState001_t_11030 *, uint32_t, TrackedDevicePose_t *); extern void cppIVRSystem_IVRSystem_021_TriggerHapticPulse(void *, TrackedDeviceIndex_t, uint32_t, unsigned short); extern const char * cppIVRSystem_IVRSystem_021_GetButtonIdNameFromEnum(void *, EVRButtonId); extern const char * cppIVRSystem_IVRSystem_021_GetControllerAxisTypeNameFromEnum(void *, EVRControllerAxisType); diff --git a/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.cpp b/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.cpp index 33be3c119a..cd9ced9554 100644 --- a/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.cpp +++ b/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.cpp @@ -1,6 +1,6 @@ #include "vrclient_private.h" #include "vrclient_defs.h" -#include "openvr_v1.8.19/ivrclientcore.h" +#include "openvr_v1.10.30/ivrclientcore.h" using namespace vr; extern "C" { #include "struct_converters.h" @@ -44,15 +44,15 @@ vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_ReleaseVideoS return ((IVRTrackedCamera*)linux_side)->ReleaseVideoStreamingService((vr::TrackedCameraHandle_t)hTrackedCamera); } -vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, winCameraVideoStreamFrameHeader_t_1819 * pFrameHeader, uint32_t nFrameHeaderSize) +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, winCameraVideoStreamFrameHeader_t_11030 * pFrameHeader, uint32_t nFrameHeaderSize) { CameraVideoStreamFrameHeader_t lin; vr::EVRTrackedCameraError _ret; if(pFrameHeader) - struct_CameraVideoStreamFrameHeader_t_1819_win_to_lin(pFrameHeader, &lin); + struct_CameraVideoStreamFrameHeader_t_11030_win_to_lin(pFrameHeader, &lin); _ret = ((IVRTrackedCamera*)linux_side)->GetVideoStreamFrameBuffer((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (void *)pFrameBuffer, (uint32_t)nFrameBufferSize, pFrameHeader ? &lin : nullptr, nFrameHeaderSize ? sizeof(lin) : 0); if(pFrameHeader) - struct_CameraVideoStreamFrameHeader_t_1819_lin_to_win(&lin, pFrameHeader, nFrameHeaderSize); + struct_CameraVideoStreamFrameHeader_t_11030_lin_to_win(&lin, pFrameHeader, nFrameHeaderSize); return _ret; } @@ -61,27 +61,27 @@ vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStrea return ((IVRTrackedCamera*)linux_side)->GetVideoStreamTextureSize((vr::TrackedDeviceIndex_t)nDeviceIndex, (vr::EVRTrackedCameraFrameType)eFrameType, (vr::VRTextureBounds_t *)pTextureBounds, (uint32_t *)pnWidth, (uint32_t *)pnHeight); } -vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, winCameraVideoStreamFrameHeader_t_1819 * pFrameHeader, uint32_t nFrameHeaderSize) +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, winCameraVideoStreamFrameHeader_t_11030 * pFrameHeader, uint32_t nFrameHeaderSize) { CameraVideoStreamFrameHeader_t lin; vr::EVRTrackedCameraError _ret; if(pFrameHeader) - struct_CameraVideoStreamFrameHeader_t_1819_win_to_lin(pFrameHeader, &lin); + struct_CameraVideoStreamFrameHeader_t_11030_win_to_lin(pFrameHeader, &lin); _ret = ((IVRTrackedCamera*)linux_side)->GetVideoStreamTextureD3D11((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (void *)pD3D11DeviceOrResource, (void **)ppD3D11ShaderResourceView, pFrameHeader ? &lin : nullptr, nFrameHeaderSize ? sizeof(lin) : 0); if(pFrameHeader) - struct_CameraVideoStreamFrameHeader_t_1819_lin_to_win(&lin, pFrameHeader, nFrameHeaderSize); + struct_CameraVideoStreamFrameHeader_t_11030_lin_to_win(&lin, pFrameHeader, nFrameHeaderSize); return _ret; } -vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, winCameraVideoStreamFrameHeader_t_1819 * pFrameHeader, uint32_t nFrameHeaderSize) +vr::EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(void *linux_side, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, winCameraVideoStreamFrameHeader_t_11030 * pFrameHeader, uint32_t nFrameHeaderSize) { CameraVideoStreamFrameHeader_t lin; vr::EVRTrackedCameraError _ret; if(pFrameHeader) - struct_CameraVideoStreamFrameHeader_t_1819_win_to_lin(pFrameHeader, &lin); + struct_CameraVideoStreamFrameHeader_t_11030_win_to_lin(pFrameHeader, &lin); _ret = ((IVRTrackedCamera*)linux_side)->GetVideoStreamTextureGL((vr::TrackedCameraHandle_t)hTrackedCamera, (vr::EVRTrackedCameraFrameType)eFrameType, (vr::glUInt_t *)pglTextureId, pFrameHeader ? &lin : nullptr, nFrameHeaderSize ? sizeof(lin) : 0); if(pFrameHeader) - struct_CameraVideoStreamFrameHeader_t_1819_lin_to_win(&lin, pFrameHeader, nFrameHeaderSize); + struct_CameraVideoStreamFrameHeader_t_11030_lin_to_win(&lin, pFrameHeader, nFrameHeaderSize); return _ret; } diff --git a/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.h b/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.h index b5d402f2f0..fdbc9c3357 100644 --- a/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.h +++ b/vrclient_x64/vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.h @@ -8,10 +8,10 @@ extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetCameraI extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetCameraProjection(void *, TrackedDeviceIndex_t, uint32_t, EVRTrackedCameraFrameType, float, float, HmdMatrix44_t *); extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_AcquireVideoStreamingService(void *, TrackedDeviceIndex_t, TrackedCameraHandle_t *); extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_ReleaseVideoStreamingService(void *, TrackedCameraHandle_t); -extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, uint32_t, winCameraVideoStreamFrameHeader_t_1819 *, uint32_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, uint32_t, winCameraVideoStreamFrameHeader_t_11030 *, uint32_t); extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureSize(void *, TrackedDeviceIndex_t, EVRTrackedCameraFrameType, VRTextureBounds_t *, uint32_t *, uint32_t *); -extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, void **, winCameraVideoStreamFrameHeader_t_1819 *, uint32_t); -extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, glUInt_t *, winCameraVideoStreamFrameHeader_t_1819 *, uint32_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, void *, void **, winCameraVideoStreamFrameHeader_t_11030 *, uint32_t); +extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(void *, TrackedCameraHandle_t, EVRTrackedCameraFrameType, glUInt_t *, winCameraVideoStreamFrameHeader_t_11030 *, uint32_t); extern EVRTrackedCameraError cppIVRTrackedCamera_IVRTrackedCamera_006_ReleaseVideoStreamTextureGL(void *, TrackedCameraHandle_t, glUInt_t); extern void cppIVRTrackedCamera_IVRTrackedCamera_006_SetCameraTrackingSpace(void *, ETrackingUniverseOrigin); extern ETrackingUniverseOrigin cppIVRTrackedCamera_IVRTrackedCamera_006_GetCameraTrackingSpace(void *); diff --git a/vrclient_x64/vrclient_x64/json/json-forwards.h b/vrclient_x64/vrclient_x64/json/json-forwards.h new file mode 100644 index 0000000000..910c7de976 --- /dev/null +++ b/vrclient_x64/vrclient_x64/json/json-forwards.h @@ -0,0 +1,284 @@ +/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/). +/// It is intended to be used with #include "json/json-forwards.h" +/// This header provides forward declaration for all JsonCpp types. + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +*/ + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + + + + + +#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED +# define JSON_FORWARD_AMALGATED_H_INCLUDED +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +#define JSON_IS_AMALGAMATION + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_CONFIG_H_INCLUDED +#define JSON_CONFIG_H_INCLUDED + +/// If defined, indicates that json library is embedded in CppTL library. +//# define JSON_IN_CPPTL 1 + +/// If defined, indicates that json may leverage CppTL library +//# define JSON_USE_CPPTL 1 +/// If defined, indicates that cpptl vector based map should be used instead of +/// std::map +/// as Value container. +//# define JSON_USE_CPPTL_SMALLMAP 1 + +// If non-zero, the library uses exceptions to report bad input instead of C +// assertion macros. The default is to use exceptions. +#ifndef JSON_USE_EXCEPTION +#define JSON_USE_EXCEPTION 1 +#endif + +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +/// Remarks: it is automatically defined in the generated amalgated header. +// #define JSON_IS_AMALGAMATION + +#ifdef JSON_IN_CPPTL +#include +#ifndef JSON_USE_CPPTL +#define JSON_USE_CPPTL 1 +#endif +#endif + +#ifdef JSON_IN_CPPTL +#define JSON_API CPPTL_API +#elif defined(JSON_DLL_BUILD) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllexport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#elif defined(JSON_DLL) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllimport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#endif // ifdef JSON_IN_CPPTL +#if !defined(JSON_API) +#define JSON_API +#endif + +// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for +// integer +// Storages, and 64 bits integer support is disabled. +// #define JSON_NO_INT64 1 + +#if defined(_MSC_VER) // MSVC +# if _MSC_VER <= 1200 // MSVC 6 + // Microsoft Visual Studio 6 only support conversion from __int64 to double + // (no conversion from unsigned __int64). +# define JSON_USE_INT64_DOUBLE_CONVERSION 1 + // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' + // characters in the debug information) + // All projects I've ever seen with VS6 were using this globally (not bothering + // with pragma push/pop). +# pragma warning(disable : 4786) +# endif // MSVC 6 + +# if _MSC_VER >= 1500 // MSVC 2008 + /// Indicates that the following function is deprecated. +# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) +# endif + +#endif // defined(_MSC_VER) + + +#ifndef JSON_HAS_RVALUE_REFERENCES + +#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // MSVC >= 2010 + +#ifdef __clang__ +#if __has_feature(cxx_rvalue_references) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // has_feature + +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // GXX_EXPERIMENTAL + +#endif // __clang__ || __GNUC__ + +#endif // not defined JSON_HAS_RVALUE_REFERENCES + +#ifndef JSON_HAS_RVALUE_REFERENCES +#define JSON_HAS_RVALUE_REFERENCES 0 +#endif + +#ifdef __clang__ +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) +# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) +# endif // GNUC version +#endif // __clang__ || __GNUC__ + +#if !defined(JSONCPP_DEPRECATED) +#define JSONCPP_DEPRECATED(message) +#endif // if !defined(JSONCPP_DEPRECATED) + +namespace Json { +typedef int Int; +typedef unsigned int UInt; +#if defined(JSON_NO_INT64) +typedef int LargestInt; +typedef unsigned int LargestUInt; +#undef JSON_HAS_INT64 +#else // if defined(JSON_NO_INT64) +// For Microsoft Visual use specific types as long long is not supported +#if defined(_MSC_VER) // Microsoft Visual Studio +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#else // if defined(_MSC_VER) // Other platforms, use long long +typedef long long int Int64; +typedef unsigned long long int UInt64; +#endif // if defined(_MSC_VER) +typedef Int64 LargestInt; +typedef UInt64 LargestUInt; +#define JSON_HAS_INT64 +#endif // if defined(JSON_NO_INT64) +} // end namespace Json + +#endif // JSON_CONFIG_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_FORWARDS_H_INCLUDED +#define JSON_FORWARDS_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "config.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +// writer.h +class FastWriter; +class StyledWriter; + +// reader.h +class Reader; + +// features.h +class Features; + +// value.h +typedef unsigned int ArrayIndex; +class StaticString; +class Path; +class PathArgument; +class Value; +class ValueIteratorBase; +class ValueIterator; +class ValueConstIterator; + +} // namespace Json + +#endif // JSON_FORWARDS_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + + + + + +#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED diff --git a/vrclient_x64/vrclient_x64/json/json.h b/vrclient_x64/vrclient_x64/json/json.h new file mode 100644 index 0000000000..d27f65d9df --- /dev/null +++ b/vrclient_x64/vrclient_x64/json/json.h @@ -0,0 +1,2077 @@ +/// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/). +/// It is intended to be used with #include "json/json.h" + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +*/ + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + + + + + +#ifndef JSON_AMALGATED_H_INCLUDED +# define JSON_AMALGATED_H_INCLUDED +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +#define JSON_IS_AMALGAMATION + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/version.h +// ////////////////////////////////////////////////////////////////////// + +// DO NOT EDIT. This file (and "version") is generated by CMake. +// Run CMake configure step to update it. +#ifndef JSON_VERSION_H_INCLUDED +# define JSON_VERSION_H_INCLUDED + +# define JSONCPP_VERSION_STRING "1.6.5" +# define JSONCPP_VERSION_MAJOR 1 +# define JSONCPP_VERSION_MINOR 6 +# define JSONCPP_VERSION_PATCH 5 +# define JSONCPP_VERSION_QUALIFIER +# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) + +#endif // JSON_VERSION_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/version.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_CONFIG_H_INCLUDED +#define JSON_CONFIG_H_INCLUDED + +/// If defined, indicates that json library is embedded in CppTL library. +//# define JSON_IN_CPPTL 1 + +/// If defined, indicates that json may leverage CppTL library +//# define JSON_USE_CPPTL 1 +/// If defined, indicates that cpptl vector based map should be used instead of +/// std::map +/// as Value container. +//# define JSON_USE_CPPTL_SMALLMAP 1 + +// If non-zero, the library uses exceptions to report bad input instead of C +// assertion macros. The default is to use exceptions. +#ifndef JSON_USE_EXCEPTION +#define JSON_USE_EXCEPTION 1 +#endif + +/// If defined, indicates that the source file is amalgated +/// to prevent private header inclusion. +/// Remarks: it is automatically defined in the generated amalgated header. +// #define JSON_IS_AMALGAMATION + +#ifdef JSON_IN_CPPTL +#include +#ifndef JSON_USE_CPPTL +#define JSON_USE_CPPTL 1 +#endif +#endif + +#ifdef JSON_IN_CPPTL +#define JSON_API CPPTL_API +#elif defined(JSON_DLL_BUILD) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllexport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#elif defined(JSON_DLL) +#if defined(_MSC_VER) +#define JSON_API __declspec(dllimport) +#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING +#endif // if defined(_MSC_VER) +#endif // ifdef JSON_IN_CPPTL +#if !defined(JSON_API) +#define JSON_API +#endif + +// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for +// integer +// Storages, and 64 bits integer support is disabled. +// #define JSON_NO_INT64 1 + +#if defined(_MSC_VER) // MSVC +# if _MSC_VER <= 1200 // MSVC 6 + // Microsoft Visual Studio 6 only support conversion from __int64 to double + // (no conversion from unsigned __int64). +# define JSON_USE_INT64_DOUBLE_CONVERSION 1 + // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' + // characters in the debug information) + // All projects I've ever seen with VS6 were using this globally (not bothering + // with pragma push/pop). +# pragma warning(disable : 4786) +# endif // MSVC 6 + +# if _MSC_VER >= 1500 // MSVC 2008 + /// Indicates that the following function is deprecated. +# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) +# endif + +#endif // defined(_MSC_VER) + + +#ifndef JSON_HAS_RVALUE_REFERENCES + +#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // MSVC >= 2010 + +#ifdef __clang__ +#if __has_feature(cxx_rvalue_references) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // has_feature + +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +#define JSON_HAS_RVALUE_REFERENCES 1 +#endif // GXX_EXPERIMENTAL + +#endif // __clang__ || __GNUC__ + +#endif // not defined JSON_HAS_RVALUE_REFERENCES + +#ifndef JSON_HAS_RVALUE_REFERENCES +#define JSON_HAS_RVALUE_REFERENCES 0 +#endif + +#ifdef __clang__ +#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) +# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) +# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) +# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) +# endif // GNUC version +#endif // __clang__ || __GNUC__ + +#if !defined(JSONCPP_DEPRECATED) +#define JSONCPP_DEPRECATED(message) +#endif // if !defined(JSONCPP_DEPRECATED) + +namespace Json { +typedef int Int; +typedef unsigned int UInt; +#if defined(JSON_NO_INT64) +typedef int LargestInt; +typedef unsigned int LargestUInt; +#undef JSON_HAS_INT64 +#else // if defined(JSON_NO_INT64) +// For Microsoft Visual use specific types as long long is not supported +#if defined(_MSC_VER) // Microsoft Visual Studio +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#else // if defined(_MSC_VER) // Other platforms, use long long +typedef long long int Int64; +typedef unsigned long long int UInt64; +#endif // if defined(_MSC_VER) +typedef Int64 LargestInt; +typedef UInt64 LargestUInt; +#define JSON_HAS_INT64 +#endif // if defined(JSON_NO_INT64) +} // end namespace Json + +#endif // JSON_CONFIG_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/config.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_FORWARDS_H_INCLUDED +#define JSON_FORWARDS_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "config.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +// writer.h +class FastWriter; +class StyledWriter; + +// reader.h +class Reader; + +// features.h +class Features; + +// value.h +typedef unsigned int ArrayIndex; +class StaticString; +class Path; +class PathArgument; +class Value; +class ValueIteratorBase; +class ValueIterator; +class ValueConstIterator; + +} // namespace Json + +#endif // JSON_FORWARDS_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/forwards.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/features.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_FEATURES_H_INCLUDED +#define CPPTL_JSON_FEATURES_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "forwards.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +/** \brief Configuration passed to reader and writer. + * This configuration object can be used to force the Reader or Writer + * to behave in a standard conforming way. + */ +class JSON_API Features { +public: + /** \brief A configuration that allows all features and assumes all strings + * are UTF-8. + * - C & C++ comments are allowed + * - Root object can be any JSON value + * - Assumes Value strings are encoded in UTF-8 + */ + static Features all(); + + /** \brief A configuration that is strictly compatible with the JSON + * specification. + * - Comments are forbidden. + * - Root object must be either an array or an object value. + * - Assumes Value strings are encoded in UTF-8 + */ + static Features strictMode(); + + /** \brief Initialize the configuration like JsonConfig::allFeatures; + */ + Features(); + + /// \c true if comments are allowed. Default: \c true. + bool allowComments_; + + /// \c true if root must be either an array or an object value. Default: \c + /// false. + bool strictRoot_; + + /// \c true if dropped null placeholders are allowed. Default: \c false. + bool allowDroppedNullPlaceholders_; + + /// \c true if numeric object key are allowed. Default: \c false. + bool allowNumericKeys_; +}; + +} // namespace Json + +#endif // CPPTL_JSON_FEATURES_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/features.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/value.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_H_INCLUDED +#define CPPTL_JSON_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "forwards.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include + +#ifndef JSON_USE_CPPTL_SMALLMAP +#include +#else +#include +#endif +#ifdef JSON_USE_CPPTL +#include +#endif + +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +/** \brief JSON (JavaScript Object Notation). + */ +namespace Json { + +/** Base class for all exceptions we throw. + * + * We use nothing but these internally. Of course, STL can throw others. + */ +class JSON_API Exception : public std::exception { +public: + Exception(std::string const& msg); + ~Exception() throw(); + char const* what() const throw(); +protected: + std::string msg_; +}; + +/** Exceptions which the user cannot easily avoid. + * + * E.g. out-of-memory (when we use malloc), stack-overflow, malicious input + * + * \remark derived from Json::Exception + */ +class JSON_API RuntimeError : public Exception { +public: + RuntimeError(std::string const& msg); +}; + +/** Exceptions thrown by JSON_ASSERT/JSON_FAIL macros. + * + * These are precondition-violations (user bugs) and internal errors (our bugs). + * + * \remark derived from Json::Exception + */ +class JSON_API LogicError : public Exception { +public: + LogicError(std::string const& msg); +}; + +/// used internally +void throwRuntimeError(std::string const& msg); +/// used internally +void throwLogicError(std::string const& msg); + +/** \brief Type of the value held by a Value object. + */ +enum ValueType { + nullValue = 0, ///< 'null' value + intValue, ///< signed integer value + uintValue, ///< unsigned integer value + realValue, ///< double value + stringValue, ///< UTF-8 string value + booleanValue, ///< bool value + arrayValue, ///< array value (ordered list) + objectValue ///< object value (collection of name/value pairs). +}; + +enum CommentPlacement { + commentBefore = 0, ///< a comment placed on the line before a value + commentAfterOnSameLine, ///< a comment just after a value on the same line + commentAfter, ///< a comment on the line after a value (only make sense for + /// root value) + numberOfCommentPlacement +}; + +//# ifdef JSON_USE_CPPTL +// typedef CppTL::AnyEnumerator EnumMemberNames; +// typedef CppTL::AnyEnumerator EnumValues; +//# endif + +/** \brief Lightweight wrapper to tag static string. + * + * Value constructor and objectValue member assignement takes advantage of the + * StaticString and avoid the cost of string duplication when storing the + * string or the member name. + * + * Example of usage: + * \code + * Json::Value aValue( StaticString("some text") ); + * Json::Value object; + * static const StaticString code("code"); + * object[code] = 1234; + * \endcode + */ +class JSON_API StaticString { +public: + explicit StaticString(const char* czstring) : c_str_(czstring) {} + + operator const char*() const { return c_str_; } + + const char* c_str() const { return c_str_; } + +private: + const char* c_str_; +}; + +/** \brief Represents a JSON value. + * + * This class is a discriminated union wrapper that can represents a: + * - signed integer [range: Value::minInt - Value::maxInt] + * - unsigned integer (range: 0 - Value::maxUInt) + * - double + * - UTF-8 string + * - boolean + * - 'null' + * - an ordered list of Value + * - collection of name/value pairs (javascript object) + * + * The type of the held value is represented by a #ValueType and + * can be obtained using type(). + * + * Values of an #objectValue or #arrayValue can be accessed using operator[]() + * methods. + * Non-const methods will automatically create the a #nullValue element + * if it does not exist. + * The sequence of an #arrayValue will be automatically resized and initialized + * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue. + * + * The get() methods can be used to obtain default value in the case the + * required element does not exist. + * + * It is possible to iterate over the list of a #objectValue values using + * the getMemberNames() method. + * + * \note #Value string-length fit in size_t, but keys must be < 2^30. + * (The reason is an implementation detail.) A #CharReader will raise an + * exception if a bound is exceeded to avoid security holes in your app, + * but the Value API does *not* check bounds. That is the responsibility + * of the caller. + */ +class JSON_API Value { + friend class ValueIteratorBase; +public: + typedef std::vector Members; + typedef ValueIterator iterator; + typedef ValueConstIterator const_iterator; + typedef Json::UInt UInt; + typedef Json::Int Int; +#if defined(JSON_HAS_INT64) + typedef Json::UInt64 UInt64; + typedef Json::Int64 Int64; +#endif // defined(JSON_HAS_INT64) + typedef Json::LargestInt LargestInt; + typedef Json::LargestUInt LargestUInt; + typedef Json::ArrayIndex ArrayIndex; + + static const Value& null; ///< We regret this reference to a global instance; prefer the simpler Value(). + static const Value& nullRef; ///< just a kludge for binary-compatibility; same as null + /// Minimum signed integer value that can be stored in a Json::Value. + static const LargestInt minLargestInt; + /// Maximum signed integer value that can be stored in a Json::Value. + static const LargestInt maxLargestInt; + /// Maximum unsigned integer value that can be stored in a Json::Value. + static const LargestUInt maxLargestUInt; + + /// Minimum signed int value that can be stored in a Json::Value. + static const Int minInt; + /// Maximum signed int value that can be stored in a Json::Value. + static const Int maxInt; + /// Maximum unsigned int value that can be stored in a Json::Value. + static const UInt maxUInt; + +#if defined(JSON_HAS_INT64) + /// Minimum signed 64 bits int value that can be stored in a Json::Value. + static const Int64 minInt64; + /// Maximum signed 64 bits int value that can be stored in a Json::Value. + static const Int64 maxInt64; + /// Maximum unsigned 64 bits int value that can be stored in a Json::Value. + static const UInt64 maxUInt64; +#endif // defined(JSON_HAS_INT64) + +private: +#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION + class CZString { + public: + enum DuplicationPolicy { + noDuplication = 0, + duplicate, + duplicateOnCopy + }; + CZString(ArrayIndex index); + CZString(char const* str, unsigned length, DuplicationPolicy allocate); + CZString(CZString const& other); +#if JSON_HAS_RVALUE_REFERENCES + CZString(CZString&& other); +#endif + ~CZString(); + CZString& operator=(CZString other); + bool operator<(CZString const& other) const; + bool operator==(CZString const& other) const; + ArrayIndex index() const; + //const char* c_str() const; ///< \deprecated + char const* data() const; + unsigned length() const; + bool isStaticString() const; + + private: + void swap(CZString& other); + + struct StringStorage { + unsigned policy_: 2; + unsigned length_: 30; // 1GB max + }; + + char const* cstr_; // actually, a prefixed string, unless policy is noDup + union { + ArrayIndex index_; + StringStorage storage_; + }; + }; + +public: +#ifndef JSON_USE_CPPTL_SMALLMAP + typedef std::map ObjectValues; +#else + typedef CppTL::SmallMap ObjectValues; +#endif // ifndef JSON_USE_CPPTL_SMALLMAP +#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION + +public: + /** \brief Create a default Value of the given type. + + This is a very useful constructor. + To create an empty array, pass arrayValue. + To create an empty object, pass objectValue. + Another Value can then be set to this one by assignment. +This is useful since clear() and resize() will not alter types. + + Examples: +\code +Json::Value null_value; // null +Json::Value arr_value(Json::arrayValue); // [] +Json::Value obj_value(Json::objectValue); // {} +\endcode + */ + Value(ValueType type = nullValue); + Value(Int value); + Value(UInt value); +#if defined(JSON_HAS_INT64) + Value(Int64 value); + Value(UInt64 value); +#endif // if defined(JSON_HAS_INT64) + Value(double value); + Value(const char* value); ///< Copy til first 0. (NULL causes to seg-fault.) + Value(const char* begin, const char* end); ///< Copy all, incl zeroes. + /** \brief Constructs a value from a static string. + + * Like other value string constructor but do not duplicate the string for + * internal storage. The given string must remain alive after the call to this + * constructor. + * \note This works only for null-terminated strings. (We cannot change the + * size of this class, so we have nowhere to store the length, + * which might be computed later for various operations.) + * + * Example of usage: + * \code + * static StaticString foo("some text"); + * Json::Value aValue(foo); + * \endcode + */ + Value(const StaticString& value); + Value(const std::string& value); ///< Copy data() til size(). Embedded zeroes too. +#ifdef JSON_USE_CPPTL + Value(const CppTL::ConstString& value); +#endif + Value(bool value); + /// Deep copy. + Value(const Value& other); +#if JSON_HAS_RVALUE_REFERENCES + /// Move constructor + Value(Value&& other); +#endif + ~Value(); + + /// Deep copy, then swap(other). + /// \note Over-write existing comments. To preserve comments, use #swapPayload(). + Value& operator=(Value other); + /// Swap everything. + void swap(Value& other); + /// Swap values but leave comments and source offsets in place. + void swapPayload(Value& other); + + ValueType type() const; + + /// Compare payload only, not comments etc. + bool operator<(const Value& other) const; + bool operator<=(const Value& other) const; + bool operator>=(const Value& other) const; + bool operator>(const Value& other) const; + bool operator==(const Value& other) const; + bool operator!=(const Value& other) const; + int compare(const Value& other) const; + + const char* asCString() const; ///< Embedded zeroes could cause you trouble! + std::string asString() const; ///< Embedded zeroes are possible. + /** Get raw char* of string-value. + * \return false if !string. (Seg-fault if str or end are NULL.) + */ + bool getString( + char const** begin, char const** end) const; +#ifdef JSON_USE_CPPTL + CppTL::ConstString asConstString() const; +#endif + Int asInt() const; + UInt asUInt() const; +#if defined(JSON_HAS_INT64) + Int64 asInt64() const; + UInt64 asUInt64() const; +#endif // if defined(JSON_HAS_INT64) + LargestInt asLargestInt() const; + LargestUInt asLargestUInt() const; + float asFloat() const; + double asDouble() const; + bool asBool() const; + + bool isNull() const; + bool isBool() const; + bool isInt() const; + bool isInt64() const; + bool isUInt() const; + bool isUInt64() const; + bool isIntegral() const; + bool isDouble() const; + bool isNumeric() const; + bool isString() const; + bool isArray() const; + bool isObject() const; + + bool isConvertibleTo(ValueType other) const; + + /// Number of values in array or object + ArrayIndex size() const; + + /// \brief Return true if empty array, empty object, or null; + /// otherwise, false. + bool empty() const; + + /// Return isNull() + bool operator!() const; + + /// Remove all object members and array elements. + /// \pre type() is arrayValue, objectValue, or nullValue + /// \post type() is unchanged + void clear(); + + /// Resize the array to size elements. + /// New elements are initialized to null. + /// May only be called on nullValue or arrayValue. + /// \pre type() is arrayValue or nullValue + /// \post type() is arrayValue + void resize(ArrayIndex size); + + /// Access an array element (zero based index ). + /// If the array contains less than index element, then null value are + /// inserted + /// in the array so that its size is index+1. + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + Value& operator[](ArrayIndex index); + + /// Access an array element (zero based index ). + /// If the array contains less than index element, then null value are + /// inserted + /// in the array so that its size is index+1. + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + Value& operator[](int index); + + /// Access an array element (zero based index ) + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + const Value& operator[](ArrayIndex index) const; + + /// Access an array element (zero based index ) + /// (You may need to say 'value[0u]' to get your compiler to distinguish + /// this from the operator[] which takes a string.) + const Value& operator[](int index) const; + + /// If the array contains at least index+1 elements, returns the element + /// value, + /// otherwise returns defaultValue. + Value get(ArrayIndex index, const Value& defaultValue) const; + /// Return true if index < size(). + bool isValidIndex(ArrayIndex index) const; + /// \brief Append value to array at the end. + /// + /// Equivalent to jsonvalue[jsonvalue.size()] = value; + Value& append(const Value& value); + + /// Access an object value by name, create a null member if it does not exist. + /// \note Because of our implementation, keys are limited to 2^30 -1 chars. + /// Exceeding that will cause an exception. + Value& operator[](const char* key); + /// Access an object value by name, returns null if there is no member with + /// that name. + const Value& operator[](const char* key) const; + /// Access an object value by name, create a null member if it does not exist. + /// \param key may contain embedded nulls. + Value& operator[](const std::string& key); + /// Access an object value by name, returns null if there is no member with + /// that name. + /// \param key may contain embedded nulls. + const Value& operator[](const std::string& key) const; + /** \brief Access an object value by name, create a null member if it does not + exist. + + * If the object has no entry for that name, then the member name used to store + * the new entry is not duplicated. + * Example of use: + * \code + * Json::Value object; + * static const StaticString code("code"); + * object[code] = 1234; + * \endcode + */ + Value& operator[](const StaticString& key); +#ifdef JSON_USE_CPPTL + /// Access an object value by name, create a null member if it does not exist. + Value& operator[](const CppTL::ConstString& key); + /// Access an object value by name, returns null if there is no member with + /// that name. + const Value& operator[](const CppTL::ConstString& key) const; +#endif + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + Value get(const char* key, const Value& defaultValue) const; + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + /// \note key may contain embedded nulls. + Value get(const char* begin, const char* end, const Value& defaultValue) const; + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + /// \param key may contain embedded nulls. + Value get(const std::string& key, const Value& defaultValue) const; +#ifdef JSON_USE_CPPTL + /// Return the member named key if it exist, defaultValue otherwise. + /// \note deep copy + Value get(const CppTL::ConstString& key, const Value& defaultValue) const; +#endif + /// Most general and efficient version of isMember()const, get()const, + /// and operator[]const + /// \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30 + Value const* find(char const* begin, char const* end) const; + /// Most general and efficient version of object-mutators. + /// \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30 + /// \return non-zero, but JSON_ASSERT if this is neither object nor nullValue. + Value const* demand(char const* begin, char const* end); + /// \brief Remove and return the named member. + /// + /// Do nothing if it did not exist. + /// \return the removed Value, or null. + /// \pre type() is objectValue or nullValue + /// \post type() is unchanged + /// \deprecated + Value removeMember(const char* key); + /// Same as removeMember(const char*) + /// \param key may contain embedded nulls. + /// \deprecated + Value removeMember(const std::string& key); + /// Same as removeMember(const char* begin, const char* end, Value* removed), + /// but 'key' is null-terminated. + bool removeMember(const char* key, Value* removed); + /** \brief Remove the named map member. + + Update 'removed' iff removed. + \param key may contain embedded nulls. + \return true iff removed (no exceptions) + */ + bool removeMember(std::string const& key, Value* removed); + /// Same as removeMember(std::string const& key, Value* removed) + bool removeMember(const char* begin, const char* end, Value* removed); + /** \brief Remove the indexed array element. + + O(n) expensive operations. + Update 'removed' iff removed. + \return true iff removed (no exceptions) + */ + bool removeIndex(ArrayIndex i, Value* removed); + + /// Return true if the object has a member named key. + /// \note 'key' must be null-terminated. + bool isMember(const char* key) const; + /// Return true if the object has a member named key. + /// \param key may contain embedded nulls. + bool isMember(const std::string& key) const; + /// Same as isMember(std::string const& key)const + bool isMember(const char* begin, const char* end) const; +#ifdef JSON_USE_CPPTL + /// Return true if the object has a member named key. + bool isMember(const CppTL::ConstString& key) const; +#endif + + /// \brief Return a list of the member names. + /// + /// If null, return an empty list. + /// \pre type() is objectValue or nullValue + /// \post if type() was nullValue, it remains nullValue + Members getMemberNames() const; + + //# ifdef JSON_USE_CPPTL + // EnumMemberNames enumMemberNames() const; + // EnumValues enumValues() const; + //# endif + + /// \deprecated Always pass len. + JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.") + void setComment(const char* comment, CommentPlacement placement); + /// Comments must be //... or /* ... */ + void setComment(const char* comment, size_t len, CommentPlacement placement); + /// Comments must be //... or /* ... */ + void setComment(const std::string& comment, CommentPlacement placement); + bool hasComment(CommentPlacement placement) const; + /// Include delimiters and embedded newlines. + std::string getComment(CommentPlacement placement) const; + + std::string toStyledString() const; + + const_iterator begin() const; + const_iterator end() const; + + iterator begin(); + iterator end(); + + // Accessors for the [start, limit) range of bytes within the JSON text from + // which this value was parsed, if any. + void setOffsetStart(size_t start); + void setOffsetLimit(size_t limit); + size_t getOffsetStart() const; + size_t getOffsetLimit() const; + +private: + void initBasic(ValueType type, bool allocated = false); + + Value& resolveReference(const char* key); + Value& resolveReference(const char* key, const char* end); + + struct CommentInfo { + CommentInfo(); + ~CommentInfo(); + + void setComment(const char* text, size_t len); + + char* comment_; + }; + + // struct MemberNamesTransform + //{ + // typedef const char *result_type; + // const char *operator()( const CZString &name ) const + // { + // return name.c_str(); + // } + //}; + + union ValueHolder { + LargestInt int_; + LargestUInt uint_; + double real_; + bool bool_; + char* string_; // actually ptr to unsigned, followed by str, unless !allocated_ + ObjectValues* map_; + } value_; + ValueType type_ : 8; + unsigned int allocated_ : 1; // Notes: if declared as bool, bitfield is useless. + // If not allocated_, string_ must be null-terminated. + CommentInfo* comments_; + Value *default_value_; // if via .get( "key", default ), this was the default + + // [start, limit) byte offsets in the source JSON text from which this Value + // was extracted. + size_t start_; + size_t limit_; +}; + +/** \brief Experimental and untested: represents an element of the "path" to + * access a node. + */ +class JSON_API PathArgument { +public: + friend class Path; + + PathArgument(); + PathArgument(ArrayIndex index); + PathArgument(const char* key); + PathArgument(const std::string& key); + +private: + enum Kind { + kindNone = 0, + kindIndex, + kindKey + }; + std::string key_; + ArrayIndex index_; + Kind kind_; +}; + +/** \brief Experimental and untested: represents a "path" to access a node. + * + * Syntax: + * - "." => root node + * - ".[n]" => elements at index 'n' of root node (an array value) + * - ".name" => member named 'name' of root node (an object value) + * - ".name1.name2.name3" + * - ".[0][1][2].name1[3]" + * - ".%" => member name is provided as parameter + * - ".[%]" => index is provied as parameter + */ +class JSON_API Path { +public: + Path(const std::string& path, + const PathArgument& a1 = PathArgument(), + const PathArgument& a2 = PathArgument(), + const PathArgument& a3 = PathArgument(), + const PathArgument& a4 = PathArgument(), + const PathArgument& a5 = PathArgument()); + + const Value& resolve(const Value& root) const; + Value resolve(const Value& root, const Value& defaultValue) const; + /// Creates the "path" to access the specified node and returns a reference on + /// the node. + Value& make(Value& root) const; + +private: + typedef std::vector InArgs; + typedef std::vector Args; + + void makePath(const std::string& path, const InArgs& in); + void addPathInArg(const std::string& path, + const InArgs& in, + InArgs::const_iterator& itInArg, + PathArgument::Kind kind); + void invalidPath(const std::string& path, int location); + + Args args_; +}; + +/** \brief base class for Value iterators. + * + */ +class JSON_API ValueIteratorBase { +public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef unsigned int size_t; + typedef int difference_type; + typedef ValueIteratorBase SelfType; + + bool operator==(const SelfType& other) const { return isEqual(other); } + + bool operator!=(const SelfType& other) const { return !isEqual(other); } + + difference_type operator-(const SelfType& other) const { + return other.computeDistance(*this); + } + + /// Return either the index or the member name of the referenced value as a + /// Value. + Value key() const; + + /// Return the index of the referenced Value, or -1 if it is not an arrayValue. + UInt index() const; + + /// Return the member name of the referenced Value, or "" if it is not an + /// objectValue. + /// \note Avoid `c_str()` on result, as embedded zeroes are possible. + std::string name() const; + + /// Return the member name of the referenced Value. "" if it is not an + /// objectValue. + /// \deprecated This cannot be used for UTF-8 strings, since there can be embedded nulls. + JSONCPP_DEPRECATED("Use `key = name();` instead.") + char const* memberName() const; + /// Return the member name of the referenced Value, or NULL if it is not an + /// objectValue. + /// \note Better version than memberName(). Allows embedded nulls. + char const* memberName(char const** end) const; + +protected: + Value& deref() const; + + void increment(); + + void decrement(); + + difference_type computeDistance(const SelfType& other) const; + + bool isEqual(const SelfType& other) const; + + void copy(const SelfType& other); + +private: + Value::ObjectValues::iterator current_; + // Indicates that iterator is for a null value. + bool isNull_; + +public: + // For some reason, BORLAND needs these at the end, rather + // than earlier. No idea why. + ValueIteratorBase(); + explicit ValueIteratorBase(const Value::ObjectValues::iterator& current); +}; + +/** \brief const iterator for object and array value. + * + */ +class JSON_API ValueConstIterator : public ValueIteratorBase { + friend class Value; + +public: + typedef const Value value_type; + //typedef unsigned int size_t; + //typedef int difference_type; + typedef const Value& reference; + typedef const Value* pointer; + typedef ValueConstIterator SelfType; + + ValueConstIterator(); + ValueConstIterator(ValueIterator const& other); + +private: +/*! \internal Use by Value to create an iterator. + */ + explicit ValueConstIterator(const Value::ObjectValues::iterator& current); +public: + SelfType& operator=(const ValueIteratorBase& other); + + SelfType operator++(int) { + SelfType temp(*this); + ++*this; + return temp; + } + + SelfType operator--(int) { + SelfType temp(*this); + --*this; + return temp; + } + + SelfType& operator--() { + decrement(); + return *this; + } + + SelfType& operator++() { + increment(); + return *this; + } + + reference operator*() const { return deref(); } + + pointer operator->() const { return &deref(); } +}; + +/** \brief Iterator for object and array value. + */ +class JSON_API ValueIterator : public ValueIteratorBase { + friend class Value; + +public: + typedef Value value_type; + typedef unsigned int size_t; + typedef int difference_type; + typedef Value& reference; + typedef Value* pointer; + typedef ValueIterator SelfType; + + ValueIterator(); + explicit ValueIterator(const ValueConstIterator& other); + ValueIterator(const ValueIterator& other); + +private: +/*! \internal Use by Value to create an iterator. + */ + explicit ValueIterator(const Value::ObjectValues::iterator& current); +public: + SelfType& operator=(const SelfType& other); + + SelfType operator++(int) { + SelfType temp(*this); + ++*this; + return temp; + } + + SelfType operator--(int) { + SelfType temp(*this); + --*this; + return temp; + } + + SelfType& operator--() { + decrement(); + return *this; + } + + SelfType& operator++() { + increment(); + return *this; + } + + reference operator*() const { return deref(); } + + pointer operator->() const { return &deref(); } +}; + +} // namespace Json + + +namespace std { +/// Specialize std::swap() for Json::Value. +template<> +inline void swap(Json::Value& a, Json::Value& b) { a.swap(b); } +} + + +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(pop) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +#endif // CPPTL_JSON_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/value.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/reader.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_READER_H_INCLUDED +#define CPPTL_JSON_READER_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "features.h" +#include "value.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include + +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +namespace Json { + +/** \brief Unserialize a JSON document into a + *Value. + * + * \deprecated Use CharReader and CharReaderBuilder. + */ +class JSON_API Reader { +public: + typedef char Char; + typedef const Char* Location; + + /** \brief An error tagged with where in the JSON text it was encountered. + * + * The offsets give the [start, limit) range of bytes within the text. Note + * that this is bytes, not codepoints. + * + */ + struct StructuredError { + size_t offset_start; + size_t offset_limit; + std::string message; + }; + + /** \brief Constructs a Reader allowing all features + * for parsing. + */ + Reader(); + + /** \brief Constructs a Reader allowing the specified feature set + * for parsing. + */ + Reader(const Features& features); + + /** \brief Read a Value from a JSON + * document. + * \param document UTF-8 encoded string containing the document to read. + * \param root [out] Contains the root value of the document if it was + * successfully parsed. + * \param collectComments \c true to collect comment and allow writing them + * back during + * serialization, \c false to discard comments. + * This parameter is ignored if + * Features::allowComments_ + * is \c false. + * \return \c true if the document was successfully parsed, \c false if an + * error occurred. + */ + bool + parse(const std::string& document, Value& root, bool collectComments = true); + + /** \brief Read a Value from a JSON + document. + * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the + document to read. + * \param endDoc Pointer on the end of the UTF-8 encoded string of the + document to read. + * Must be >= beginDoc. + * \param root [out] Contains the root value of the document if it was + * successfully parsed. + * \param collectComments \c true to collect comment and allow writing them + back during + * serialization, \c false to discard comments. + * This parameter is ignored if + Features::allowComments_ + * is \c false. + * \return \c true if the document was successfully parsed, \c false if an + error occurred. + */ + bool parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments = true); + + /// \brief Parse from input stream. + /// \see Json::operator>>(std::istream&, Json::Value&). + bool parse(std::istream& is, Value& root, bool collectComments = true); + + /** \brief Returns a user friendly string that list errors in the parsed + * document. + * \return Formatted error message with the list of errors with their location + * in + * the parsed document. An empty string is returned if no error + * occurred + * during parsing. + * \deprecated Use getFormattedErrorMessages() instead (typo fix). + */ + JSONCPP_DEPRECATED("Use getFormattedErrorMessages() instead.") + std::string getFormatedErrorMessages() const; + + /** \brief Returns a user friendly string that list errors in the parsed + * document. + * \return Formatted error message with the list of errors with their location + * in + * the parsed document. An empty string is returned if no error + * occurred + * during parsing. + */ + std::string getFormattedErrorMessages() const; + + /** \brief Returns a vector of structured erros encounted while parsing. + * \return A (possibly empty) vector of StructuredError objects. Currently + * only one error can be returned, but the caller should tolerate + * multiple + * errors. This can occur if the parser recovers from a non-fatal + * parse error and then encounters additional errors. + */ + std::vector getStructuredErrors() const; + + /** \brief Add a semantic error message. + * \param value JSON Value location associated with the error + * \param message The error message. + * \return \c true if the error was successfully added, \c false if the + * Value offset exceeds the document size. + */ + bool pushError(const Value& value, const std::string& message); + + /** \brief Add a semantic error message with extra context. + * \param value JSON Value location associated with the error + * \param message The error message. + * \param extra Additional JSON Value location to contextualize the error + * \return \c true if the error was successfully added, \c false if either + * Value offset exceeds the document size. + */ + bool pushError(const Value& value, const std::string& message, const Value& extra); + + /** \brief Return whether there are any errors. + * \return \c true if there are no errors to report \c false if + * errors have occurred. + */ + bool good() const; + +private: + enum TokenType { + tokenEndOfStream = 0, + tokenObjectBegin, + tokenObjectEnd, + tokenArrayBegin, + tokenArrayEnd, + tokenString, + tokenNumber, + tokenTrue, + tokenFalse, + tokenNull, + tokenArraySeparator, + tokenMemberSeparator, + tokenComment, + tokenError + }; + + class Token { + public: + TokenType type_; + Location start_; + Location end_; + }; + + class ErrorInfo { + public: + Token token_; + std::string message_; + Location extra_; + }; + + typedef std::deque Errors; + + bool readToken(Token& token); + void skipSpaces(); + bool match(Location pattern, int patternLength); + bool readComment(); + bool readCStyleComment(); + bool readCppStyleComment(); + bool readString(); + void readNumber(); + bool readValue(); + bool readObject(Token& token); + bool readArray(Token& token); + bool decodeNumber(Token& token); + bool decodeNumber(Token& token, Value& decoded); + bool decodeString(Token& token); + bool decodeString(Token& token, std::string& decoded); + bool decodeDouble(Token& token); + bool decodeDouble(Token& token, Value& decoded); + bool decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool addError(const std::string& message, Token& token, Location extra = 0); + bool recoverFromError(TokenType skipUntilToken); + bool addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken); + void skipUntilSpace(); + Value& currentValue(); + Char getNextChar(); + void + getLocationLineAndColumn(Location location, int& line, int& column) const; + std::string getLocationLineAndColumn(Location location) const; + std::string getLocationSnippet(Location location) const; + void addComment(Location begin, Location end, CommentPlacement placement); + void skipCommentTokens(Token& token); + + typedef std::stack Nodes; + Nodes nodes_; + Errors errors_; + std::string document_; + Location begin_; + Location end_; + Location current_; + Location lastValueEnd_; + Value* lastValue_; + std::string commentsBefore_; + Features features_; + bool collectComments_; +}; // Reader + +/** Interface for reading JSON from a char array. + */ +class JSON_API CharReader { +public: + virtual ~CharReader() {} + /** \brief Read a Value from a JSON + document. + * The document must be a UTF-8 encoded string containing the document to read. + * + * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the + document to read. + * \param endDoc Pointer on the end of the UTF-8 encoded string of the + document to read. + * Must be >= beginDoc. + * \param root [out] Contains the root value of the document if it was + * successfully parsed. + * \param errs [out] Formatted error messages (if not NULL) + * a user friendly string that lists errors in the parsed + * document. + * \return \c true if the document was successfully parsed, \c false if an + error occurred. + */ + virtual bool parse( + char const* beginDoc, char const* endDoc, + Value* root, std::string* errs) = 0; + + class JSON_API Factory { + public: + virtual ~Factory() {} + /** \brief Allocate a CharReader via operator new(). + * \throw std::exception if something goes wrong (e.g. invalid settings) + */ + virtual CharReader* newCharReader() const = 0; + }; // Factory +}; // CharReader + +/** \brief Build a CharReader implementation. + +Usage: +\code + using namespace Json; + CharReaderBuilder builder; + builder["collectComments"] = false; + Value value; + std::string errs; + bool ok = parseFromStream(builder, std::cin, &value, &errs); +\endcode +*/ +class JSON_API CharReaderBuilder : public CharReader::Factory { +public: + // Note: We use a Json::Value so that we can add data-members to this class + // without a major version bump. + /** Configuration of this builder. + These are case-sensitive. + Available settings (case-sensitive): + - `"collectComments": false or true` + - true to collect comment and allow writing them + back during serialization, false to discard comments. + This parameter is ignored if allowComments is false. + - `"allowComments": false or true` + - true if comments are allowed. + - `"strictRoot": false or true` + - true if root must be either an array or an object value + - `"allowDroppedNullPlaceholders": false or true` + - true if dropped null placeholders are allowed. (See StreamWriterBuilder.) + - `"allowNumericKeys": false or true` + - true if numeric object keys are allowed. + - `"allowSingleQuotes": false or true` + - true if '' are allowed for strings (both keys and values) + - `"stackLimit": integer` + - Exceeding stackLimit (recursive depth of `readValue()`) will + cause an exception. + - This is a security issue (seg-faults caused by deeply nested JSON), + so the default is low. + - `"failIfExtra": false or true` + - If true, `parse()` returns false when extra non-whitespace trails + the JSON value in the input string. + - `"rejectDupKeys": false or true` + - If true, `parse()` returns false when a key is duplicated within an object. + - `"allowSpecialFloats": false or true` + - If true, special float values (NaNs and infinities) are allowed + and their values are lossfree restorable. + + You can examine 'settings_` yourself + to see the defaults. You can also write and read them just like any + JSON Value. + \sa setDefaults() + */ + Json::Value settings_; + + CharReaderBuilder(); + ~CharReaderBuilder(); + + CharReader* newCharReader() const; + + /** \return true if 'settings' are legal and consistent; + * otherwise, indicate bad settings via 'invalid'. + */ + bool validate(Json::Value* invalid) const; + + /** A simple way to update a specific setting. + */ + Value& operator[](std::string key); + + /** Called by ctor, but you can use this to reset settings_. + * \pre 'settings' != NULL (but Json::null is fine) + * \remark Defaults: + * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults + */ + static void setDefaults(Json::Value* settings); + /** Same as old Features::strictMode(). + * \pre 'settings' != NULL (but Json::null is fine) + * \remark Defaults: + * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode + */ + static void strictMode(Json::Value* settings); +}; + +/** Consume entire stream and use its begin/end. + * Someday we might have a real StreamReader, but for now this + * is convenient. + */ +bool JSON_API parseFromStream( + CharReader::Factory const&, + std::istream&, + Value* root, std::string* errs); + +/** \brief Read from 'sin' into 'root'. + + Always keep comments from the input JSON. + + This can be used to read a file into a particular sub-object. + For example: + \code + Json::Value root; + cin >> root["dir"]["file"]; + cout << root; + \endcode + Result: + \verbatim + { + "dir": { + "file": { + // The input stream JSON would be nested here. + } + } + } + \endverbatim + \throw std::exception on parse error. + \see Json::operator<<() +*/ +JSON_API std::istream& operator>>(std::istream&, Value&); + +} // namespace Json + +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(pop) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +#endif // CPPTL_JSON_READER_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/reader.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/writer.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef JSON_WRITER_H_INCLUDED +#define JSON_WRITER_H_INCLUDED + +#if !defined(JSON_IS_AMALGAMATION) +#include "value.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include + +// Disable warning C4251: : needs to have dll-interface to +// be used by... +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(push) +#pragma warning(disable : 4251) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +namespace Json { + +class Value; + +/** + +Usage: +\code + using namespace Json; + void writeToStdout(StreamWriter::Factory const& factory, Value const& value) { + std::unique_ptr const writer( + factory.newStreamWriter()); + writer->write(value, &std::cout); + std::cout << std::endl; // add lf and flush + } +\endcode +*/ +class JSON_API StreamWriter { +protected: + std::ostream* sout_; // not owned; will not delete +public: + StreamWriter(); + virtual ~StreamWriter(); + /** Write Value into document as configured in sub-class. + Do not take ownership of sout, but maintain a reference during function. + \pre sout != NULL + \return zero on success (For now, we always return zero, so check the stream instead.) + \throw std::exception possibly, depending on configuration + */ + virtual int write(Value const& root, std::ostream* sout) = 0; + + /** \brief A simple abstract factory. + */ + class JSON_API Factory { + public: + virtual ~Factory(); + /** \brief Allocate a CharReader via operator new(). + * \throw std::exception if something goes wrong (e.g. invalid settings) + */ + virtual StreamWriter* newStreamWriter() const = 0; + }; // Factory +}; // StreamWriter + +/** \brief Write into stringstream, then return string, for convenience. + * A StreamWriter will be created from the factory, used, and then deleted. + */ +std::string JSON_API writeString(StreamWriter::Factory const& factory, Value const& root); + + +/** \brief Build a StreamWriter implementation. + +Usage: +\code + using namespace Json; + Value value = ...; + StreamWriterBuilder builder; + builder["commentStyle"] = "None"; + builder["indentation"] = " "; // or whatever you like + std::unique_ptr writer( + builder.newStreamWriter()); + writer->write(value, &std::cout); + std::cout << std::endl; // add lf and flush +\endcode +*/ +class JSON_API StreamWriterBuilder : public StreamWriter::Factory { +public: + // Note: We use a Json::Value so that we can add data-members to this class + // without a major version bump. + /** Configuration of this builder. + Available settings (case-sensitive): + - "commentStyle": "None" or "All" + - "indentation": "" + - "enableYAMLCompatibility": false or true + - slightly change the whitespace around colons + - "dropNullPlaceholders": false or true + - Drop the "null" string from the writer's output for nullValues. + Strictly speaking, this is not valid JSON. But when the output is being + fed to a browser's Javascript, it makes for smaller output and the + browser can handle the output just fine. + - "useSpecialFloats": false or true + - If true, outputs non-finite floating point values in the following way: + NaN values as "NaN", positive infinity as "Infinity", and negative infinity + as "-Infinity". + + You can examine 'settings_` yourself + to see the defaults. You can also write and read them just like any + JSON Value. + \sa setDefaults() + */ + Json::Value settings_; + + StreamWriterBuilder(); + ~StreamWriterBuilder(); + + /** + * \throw std::exception if something goes wrong (e.g. invalid settings) + */ + StreamWriter* newStreamWriter() const; + + /** \return true if 'settings' are legal and consistent; + * otherwise, indicate bad settings via 'invalid'. + */ + bool validate(Json::Value* invalid) const; + /** A simple way to update a specific setting. + */ + Value& operator[](std::string key); + + /** Called by ctor, but you can use this to reset settings_. + * \pre 'settings' != NULL (but Json::null is fine) + * \remark Defaults: + * \snippet src/lib_json/json_writer.cpp StreamWriterBuilderDefaults + */ + static void setDefaults(Json::Value* settings); +}; + +/** \brief Abstract class for writers. + * \deprecated Use StreamWriter. (And really, this is an implementation detail.) + */ +class JSON_API Writer { +public: + virtual ~Writer(); + + virtual std::string write(const Value& root) = 0; +}; + +/** \brief Outputs a Value in JSON format + *without formatting (not human friendly). + * + * The JSON document is written in a single line. It is not intended for 'human' + *consumption, + * but may be usefull to support feature such as RPC where bandwith is limited. + * \sa Reader, Value + * \deprecated Use StreamWriterBuilder. + */ +class JSON_API FastWriter : public Writer { + +public: + FastWriter(); + ~FastWriter() {} + + void enableYAMLCompatibility(); + + /** \brief Drop the "null" string from the writer's output for nullValues. + * Strictly speaking, this is not valid JSON. But when the output is being + * fed to a browser's Javascript, it makes for smaller output and the + * browser can handle the output just fine. + */ + void dropNullPlaceholders(); + + void omitEndingLineFeed(); + +public: // overridden from Writer + std::string write(const Value& root); + +private: + void writeValue(const Value& value); + + std::string document_; + bool yamlCompatiblityEnabled_; + bool dropNullPlaceholders_; + bool omitEndingLineFeed_; +}; + +/** \brief Writes a Value in JSON format in a + *human friendly way. + * + * The rules for line break and indent are as follow: + * - Object value: + * - if empty then print {} without indent and line break + * - if not empty the print '{', line break & indent, print one value per + *line + * and then unindent and line break and print '}'. + * - Array value: + * - if empty then print [] without indent and line break + * - if the array contains no object value, empty array or some other value + *types, + * and all the values fit on one lines, then print the array on a single + *line. + * - otherwise, it the values do not fit on one line, or the array contains + * object or non empty array, then print one value per line. + * + * If the Value have comments then they are outputed according to their + *#CommentPlacement. + * + * \sa Reader, Value, Value::setComment() + * \deprecated Use StreamWriterBuilder. + */ +class JSON_API StyledWriter : public Writer { +public: + StyledWriter(); + ~StyledWriter() {} + +public: // overridden from Writer + /** \brief Serialize a Value in JSON format. + * \param root Value to serialize. + * \return String containing the JSON document that represents the root value. + */ + std::string write(const Value& root); + +private: + void writeValue(const Value& value); + void writeArrayValue(const Value& value); + bool isMultineArray(const Value& value); + void pushValue(const std::string& value); + void writeIndent(); + void writeWithIndent(const std::string& value); + void indent(); + void unindent(); + void writeCommentBeforeValue(const Value& root); + void writeCommentAfterValueOnSameLine(const Value& root); + bool hasCommentForValue(const Value& value); + static std::string normalizeEOL(const std::string& text); + + typedef std::vector ChildValues; + + ChildValues childValues_; + std::string document_; + std::string indentString_; + int rightMargin_; + int indentSize_; + bool addChildValues_; +}; + +/** \brief Writes a Value in JSON format in a + human friendly way, + to a stream rather than to a string. + * + * The rules for line break and indent are as follow: + * - Object value: + * - if empty then print {} without indent and line break + * - if not empty the print '{', line break & indent, print one value per + line + * and then unindent and line break and print '}'. + * - Array value: + * - if empty then print [] without indent and line break + * - if the array contains no object value, empty array or some other value + types, + * and all the values fit on one lines, then print the array on a single + line. + * - otherwise, it the values do not fit on one line, or the array contains + * object or non empty array, then print one value per line. + * + * If the Value have comments then they are outputed according to their + #CommentPlacement. + * + * \param indentation Each level will be indented by this amount extra. + * \sa Reader, Value, Value::setComment() + * \deprecated Use StreamWriterBuilder. + */ +class JSON_API StyledStreamWriter { +public: + StyledStreamWriter(std::string indentation = "\t"); + ~StyledStreamWriter() {} + +public: + /** \brief Serialize a Value in JSON format. + * \param out Stream to write to. (Can be ostringstream, e.g.) + * \param root Value to serialize. + * \note There is no point in deriving from Writer, since write() should not + * return a value. + */ + void write(std::ostream& out, const Value& root); + +private: + void writeValue(const Value& value); + void writeArrayValue(const Value& value); + bool isMultineArray(const Value& value); + void pushValue(const std::string& value); + void writeIndent(); + void writeWithIndent(const std::string& value); + void indent(); + void unindent(); + void writeCommentBeforeValue(const Value& root); + void writeCommentAfterValueOnSameLine(const Value& root); + bool hasCommentForValue(const Value& value); + static std::string normalizeEOL(const std::string& text); + + typedef std::vector ChildValues; + + ChildValues childValues_; + std::ostream* document_; + std::string indentString_; + int rightMargin_; + std::string indentation_; + bool addChildValues_ : 1; + bool indented_ : 1; +}; + +#if defined(JSON_HAS_INT64) +std::string JSON_API valueToString(Int value); +std::string JSON_API valueToString(UInt value); +#endif // if defined(JSON_HAS_INT64) +std::string JSON_API valueToString(LargestInt value); +std::string JSON_API valueToString(LargestUInt value); +std::string JSON_API valueToString(double value); +std::string JSON_API valueToString(bool value); +std::string JSON_API valueToQuotedString(const char* value); + +/// \brief Output using the StyledStreamWriter. +/// \see Json::operator>>() +JSON_API std::ostream& operator<<(std::ostream&, const Value& root); + +} // namespace Json + +#if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) +#pragma warning(pop) +#endif // if defined(JSONCPP_DISABLE_DLL_INTERFACE_WARNING) + +#endif // JSON_WRITER_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/writer.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: include/json/assertions.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED +#define CPPTL_JSON_ASSERTIONS_H_INCLUDED + +#include +#include + +#if !defined(JSON_IS_AMALGAMATION) +#include "config.h" +#endif // if !defined(JSON_IS_AMALGAMATION) + +/** It should not be possible for a maliciously designed file to + * cause an abort() or seg-fault, so these macros are used only + * for pre-condition violations and internal logic errors. + */ +#if JSON_USE_EXCEPTION + +// @todo <= add detail about condition in exception +# define JSON_ASSERT(condition) \ + {if (!(condition)) {Json::throwLogicError( "assert json failed" );}} + +# define JSON_FAIL_MESSAGE(message) \ + { \ + std::ostringstream oss; oss << message; \ + Json::throwLogicError(oss.str()); \ + abort(); \ + } + +#else // JSON_USE_EXCEPTION + +# define JSON_ASSERT(condition) assert(condition) + +// The call to assert() will show the failure message in debug builds. In +// release builds we abort, for a core-dump or debugger. +# define JSON_FAIL_MESSAGE(message) \ + { \ + std::ostringstream oss; oss << message; \ + assert(false && oss.str().c_str()); \ + abort(); \ + } + + +#endif + +#define JSON_ASSERT_MESSAGE(condition, message) \ + if (!(condition)) { \ + JSON_FAIL_MESSAGE(message); \ + } + +#endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: include/json/assertions.h +// ////////////////////////////////////////////////////////////////////// + + + + + +#endif //ifndef JSON_AMALGATED_H_INCLUDED diff --git a/vrclient_x64/vrclient_x64/json_converter.cpp b/vrclient_x64/vrclient_x64/json_converter.cpp new file mode 100644 index 0000000000..076d95b383 --- /dev/null +++ b/vrclient_x64/vrclient_x64/json_converter.cpp @@ -0,0 +1,109 @@ +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "vrclient_private.h" + +#include "json/json.h" + +extern "C" { + +static bool ends_with(const std::string &s, char c) +{ + auto e = s.end(); + if(e != s.begin()){ + --e; + return *e == c; + } + return false; +} + +static bool convert_path_to_win(std::string &s) +{ + bool need_slash = ends_with(s, '\\') || ends_with(s, '/'); + + DWORD sz = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, NULL, 0); + if(!sz) + { + return false; + } + + WCHAR *dos_path = (WCHAR *)HeapAlloc(GetProcessHeap(), 0, sz * sizeof(WCHAR)); + if(!dos_path) + { + return false; + } + + sz = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, dos_path, sz); + if(!sz) + { + HeapFree(GetProcessHeap(), 0, dos_path); + return false; + } + + char *unix_path = wine_get_unix_file_name(dos_path); + if(!unix_path) + { + HeapFree(GetProcessHeap(), 0, dos_path); + return false; + } + + /* XXX assuming the system encoding is UTF-8 */ + s = unix_path; + + if(need_slash) + s += '/'; + + HeapFree(GetProcessHeap(), 0, unix_path); + HeapFree(GetProcessHeap(), 0, dos_path); + + return true; +} + +char *json_convert_paths(const char *input) +{ + Json::Reader reader; + Json::Value root; + + if(!reader.parse(input, root)) + return NULL; + + if(root.isMember("type") && + root["type"].isString() && + root["type"] == "set_paths") + { + if(root.isMember("webroot") && + root["webroot"].isString()) + { + std::string path(root["webroot"].asString()); + if(convert_path_to_win(path)) + root["webroot"] = path; + } + + if(root.isMember("models") && + root["models"].isString()) + { + std::string path(root["models"].asString()); + if(convert_path_to_win(path)) + root["models"] = path; + } + + Json::FastWriter writer; + + std::string contents(writer.write(root)); + + char *ret = (char *)malloc(contents.length() + 1); + if(!ret) + return NULL; + + size_t len = contents.copy(ret, contents.length()); + ret[len] = 0; + + return ret; + } + + return NULL; +} + +} diff --git a/vrclient_x64/vrclient_x64/jsoncpp.cpp b/vrclient_x64/vrclient_x64/jsoncpp.cpp new file mode 100644 index 0000000000..e67d353383 --- /dev/null +++ b/vrclient_x64/vrclient_x64/jsoncpp.cpp @@ -0,0 +1,5266 @@ +/// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/). +/// It is intended to be used with #include "json/json.h" + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... + +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. + +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). + +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. + +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: + + http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +======================================================================== +Copyright (c) 2007-2010 Baptiste Lepilleur + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +======================================================================== +(END LICENSE TEXT) + +The MIT license is compatible with both the GPL and commercial +software, affording one all of the rights of Public Domain with the +minor nuisance of being required to keep the above copyright notice +and license text in the source code. Note also that by accepting the +Public Domain "license" you can re-license your copy using whatever +license you like. + +*/ + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: LICENSE +// ////////////////////////////////////////////////////////////////////// + + + + + + +#include "json/json.h" + +#ifndef JSON_IS_AMALGAMATION +#error "Compile with -I PATH_TO_JSON_DIRECTORY" +#endif + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_tool.h +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED +#define LIB_JSONCPP_JSON_TOOL_H_INCLUDED + +/* This header provides common string manipulation support, such as UTF-8, + * portable conversion from/to string... + * + * It is an internal header that must not be exposed. + */ + +namespace Json { + +/// Converts a unicode code-point to UTF-8. +static inline std::string codePointToUTF8(unsigned int cp) { + std::string result; + + // based on description from http://en.wikipedia.org/wiki/UTF-8 + + if (cp <= 0x7f) { + result.resize(1); + result[0] = static_cast(cp); + } else if (cp <= 0x7FF) { + result.resize(2); + result[1] = static_cast(0x80 | (0x3f & cp)); + result[0] = static_cast(0xC0 | (0x1f & (cp >> 6))); + } else if (cp <= 0xFFFF) { + result.resize(3); + result[2] = static_cast(0x80 | (0x3f & cp)); + result[1] = static_cast(0x80 | (0x3f & (cp >> 6))); + result[0] = static_cast(0xE0 | (0xf & (cp >> 12))); + } else if (cp <= 0x10FFFF) { + result.resize(4); + result[3] = static_cast(0x80 | (0x3f & cp)); + result[2] = static_cast(0x80 | (0x3f & (cp >> 6))); + result[1] = static_cast(0x80 | (0x3f & (cp >> 12))); + result[0] = static_cast(0xF0 | (0x7 & (cp >> 18))); + } + + return result; +} + +/// Returns true if ch is a control character (in range [1,31]). +static inline bool isControlCharacter(char ch) { return ch > 0 && ch <= 0x1F; } + +enum { + /// Constant that specify the size of the buffer that must be passed to + /// uintToString. + uintToStringBufferSize = 3 * sizeof(LargestUInt) + 1 +}; + +// Defines a char buffer for use with uintToString(). +typedef char UIntToStringBuffer[uintToStringBufferSize]; + +/** Converts an unsigned integer to string. + * @param value Unsigned interger to convert to string + * @param current Input/Output string buffer. + * Must have at least uintToStringBufferSize chars free. + */ +static inline void uintToString(LargestUInt value, char*& current) { + *--current = 0; + do { + *--current = static_cast(value % 10U + static_cast('0')); + value /= 10; + } while (value != 0); +} + +/** Change ',' to '.' everywhere in buffer. + * + * We had a sophisticated way, but it did not work in WinCE. + * @see https://github.com/open-source-parsers/jsoncpp/pull/9 + */ +static inline void fixNumericLocale(char* begin, char* end) { + while (begin < end) { + if (*begin == ',') { + *begin = '.'; + } + ++begin; + } +} + +} // namespace Json { + +#endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_tool.h +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_reader.cpp +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2011 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include "json_tool.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above +#define snprintf sprintf_s +#elif _MSC_VER >= 1900 // VC++ 14.0 and above +#define snprintf std::snprintf +#else +#define snprintf _snprintf +#endif +#elif defined(__ANDROID__) || defined(__QNXNTO__) +#define snprintf snprintf +#elif __cplusplus >= 201103L +#define snprintf std::snprintf +#endif + +#if defined(__QNXNTO__) +#define sscanf std::sscanf +#endif + +#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 +// Disable warning about strdup being deprecated. +#pragma warning(disable : 4996) +#endif + +static int const stackLimit_g = 1000; +static int stackDepth_g = 0; // see readValue() + +namespace Json { + +#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) +typedef std::unique_ptr CharReaderPtr; +#else +typedef std::auto_ptr CharReaderPtr; +#endif + +// Implementation of class Features +// //////////////////////////////// + +Features::Features() + : allowComments_(true), strictRoot_(false), + allowDroppedNullPlaceholders_(false), allowNumericKeys_(false) {} + +Features Features::all() { return Features(); } + +Features Features::strictMode() { + Features features; + features.allowComments_ = false; + features.strictRoot_ = true; + features.allowDroppedNullPlaceholders_ = false; + features.allowNumericKeys_ = false; + return features; +} + +// Implementation of class Reader +// //////////////////////////////// + +static bool containsNewLine(Reader::Location begin, Reader::Location end) { + for (; begin < end; ++begin) + if (*begin == '\n' || *begin == '\r') + return true; + return false; +} + +// Class Reader +// ////////////////////////////////////////////////////////////////// + +Reader::Reader() + : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), + lastValue_(), commentsBefore_(), features_(Features::all()), + collectComments_() {} + +Reader::Reader(const Features& features) + : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), + lastValue_(), commentsBefore_(), features_(features), collectComments_() { +} + +bool +Reader::parse(const std::string& document, Value& root, bool collectComments) { + document_ = document; + const char* begin = document_.c_str(); + const char* end = begin + document_.length(); + return parse(begin, end, root, collectComments); +} + +bool Reader::parse(std::istream& sin, Value& root, bool collectComments) { + // std::istream_iterator begin(sin); + // std::istream_iterator end; + // Those would allow streamed input from a file, if parse() were a + // template function. + + // Since std::string is reference-counted, this at least does not + // create an extra copy. + std::string doc; + std::getline(sin, doc, (char)EOF); + return parse(doc, root, collectComments); +} + +bool Reader::parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments) { + if (!features_.allowComments_) { + collectComments = false; + } + + begin_ = beginDoc; + end_ = endDoc; + collectComments_ = collectComments; + current_ = begin_; + lastValueEnd_ = 0; + lastValue_ = 0; + commentsBefore_ = ""; + errors_.clear(); + while (!nodes_.empty()) + nodes_.pop(); + nodes_.push(&root); + + stackDepth_g = 0; // Yes, this is bad coding, but options are limited. + bool successful = readValue(); + Token token; + skipCommentTokens(token); + if (collectComments_ && !commentsBefore_.empty()) + root.setComment(commentsBefore_, commentAfter); + if (features_.strictRoot_) { + if (!root.isArray() && !root.isObject()) { + // Set error location to start of doc, ideally should be first token found + // in doc + token.type_ = tokenError; + token.start_ = beginDoc; + token.end_ = endDoc; + addError( + "A valid JSON document must be either an array or an object value.", + token); + return false; + } + } + return successful; +} + +bool Reader::readValue() { + // This is a non-reentrant way to support a stackLimit. Terrible! + // But this deprecated class has a security problem: Bad input can + // cause a seg-fault. This seems like a fair, binary-compatible way + // to prevent the problem. + if (stackDepth_g >= stackLimit_g) throwRuntimeError("Exceeded stackLimit in readValue()."); + ++stackDepth_g; + + Token token; + skipCommentTokens(token); + bool successful = true; + + if (collectComments_ && !commentsBefore_.empty()) { + currentValue().setComment(commentsBefore_, commentBefore); + commentsBefore_ = ""; + } + + switch (token.type_) { + case tokenObjectBegin: + successful = readObject(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenArrayBegin: + successful = readArray(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenNumber: + successful = decodeNumber(token); + break; + case tokenString: + successful = decodeString(token); + break; + case tokenTrue: + { + Value v(true); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenFalse: + { + Value v(false); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNull: + { + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenArraySeparator: + case tokenObjectEnd: + case tokenArrayEnd: + if (features_.allowDroppedNullPlaceholders_) { + // "Un-read" the current token and mark the current value as a null + // token. + current_--; + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(current_ - begin_ - 1); + currentValue().setOffsetLimit(current_ - begin_); + break; + } // Else, fall through... + default: + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return addError("Syntax error: value, object or array expected.", token); + } + + if (collectComments_) { + lastValueEnd_ = current_; + lastValue_ = ¤tValue(); + } + + --stackDepth_g; + return successful; +} + +void Reader::skipCommentTokens(Token& token) { + if (features_.allowComments_) { + do { + readToken(token); + } while (token.type_ == tokenComment); + } else { + readToken(token); + } +} + +bool Reader::readToken(Token& token) { + skipSpaces(); + token.start_ = current_; + Char c = getNextChar(); + bool ok = true; + switch (c) { + case '{': + token.type_ = tokenObjectBegin; + break; + case '}': + token.type_ = tokenObjectEnd; + break; + case '[': + token.type_ = tokenArrayBegin; + break; + case ']': + token.type_ = tokenArrayEnd; + break; + case '"': + token.type_ = tokenString; + ok = readString(); + break; + case '/': + token.type_ = tokenComment; + ok = readComment(); + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + token.type_ = tokenNumber; + readNumber(); + break; + case 't': + token.type_ = tokenTrue; + ok = match("rue", 3); + break; + case 'f': + token.type_ = tokenFalse; + ok = match("alse", 4); + break; + case 'n': + token.type_ = tokenNull; + ok = match("ull", 3); + break; + case ',': + token.type_ = tokenArraySeparator; + break; + case ':': + token.type_ = tokenMemberSeparator; + break; + case 0: + token.type_ = tokenEndOfStream; + break; + default: + ok = false; + break; + } + if (!ok) + token.type_ = tokenError; + token.end_ = current_; + return true; +} + +void Reader::skipSpaces() { + while (current_ != end_) { + Char c = *current_; + if (c == ' ' || c == '\t' || c == '\r' || c == '\n') + ++current_; + else + break; + } +} + +bool Reader::match(Location pattern, int patternLength) { + if (end_ - current_ < patternLength) + return false; + int index = patternLength; + while (index--) + if (current_[index] != pattern[index]) + return false; + current_ += patternLength; + return true; +} + +bool Reader::readComment() { + Location commentBegin = current_ - 1; + Char c = getNextChar(); + bool successful = false; + if (c == '*') + successful = readCStyleComment(); + else if (c == '/') + successful = readCppStyleComment(); + if (!successful) + return false; + + if (collectComments_) { + CommentPlacement placement = commentBefore; + if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) { + if (c != '*' || !containsNewLine(commentBegin, current_)) + placement = commentAfterOnSameLine; + } + + addComment(commentBegin, current_, placement); + } + return true; +} + +static std::string normalizeEOL(Reader::Location begin, Reader::Location end) { + std::string normalized; + normalized.reserve(end - begin); + Reader::Location current = begin; + while (current != end) { + char c = *current++; + if (c == '\r') { + if (current != end && *current == '\n') + // convert dos EOL + ++current; + // convert Mac EOL + normalized += '\n'; + } else { + normalized += c; + } + } + return normalized; +} + +void +Reader::addComment(Location begin, Location end, CommentPlacement placement) { + assert(collectComments_); + const std::string& normalized = normalizeEOL(begin, end); + if (placement == commentAfterOnSameLine) { + assert(lastValue_ != 0); + lastValue_->setComment(normalized, placement); + } else { + commentsBefore_ += normalized; + } +} + +bool Reader::readCStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '*' && *current_ == '/') + break; + } + return getNextChar() == '/'; +} + +bool Reader::readCppStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '\n') + break; + if (c == '\r') { + // Consume DOS EOL. It will be normalized in addComment. + if (current_ != end_ && *current_ == '\n') + getNextChar(); + // Break on Moc OS 9 EOL. + break; + } + } + return true; +} + +void Reader::readNumber() { + const char *p = current_; + char c = '0'; // stopgap for already consumed character + // integral part + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + // fractional part + if (c == '.') { + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } + // exponential part + if (c == 'e' || c == 'E') { + c = (current_ = p) < end_ ? *p++ : 0; + if (c == '+' || c == '-') + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } +} + +bool Reader::readString() { + Char c = 0; + while (current_ != end_) { + c = getNextChar(); + if (c == '\\') + getNextChar(); + else if (c == '"') + break; + } + return c == '"'; +} + +bool Reader::readObject(Token& tokenStart) { + Token tokenName; + std::string name; + Value init(objectValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + while (readToken(tokenName)) { + bool initialTokenOk = true; + while (tokenName.type_ == tokenComment && initialTokenOk) + initialTokenOk = readToken(tokenName); + if (!initialTokenOk) + break; + if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object + return true; + name = ""; + if (tokenName.type_ == tokenString) { + if (!decodeString(tokenName, name)) + return recoverFromError(tokenObjectEnd); + } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) { + Value numberName; + if (!decodeNumber(tokenName, numberName)) + return recoverFromError(tokenObjectEnd); + name = numberName.asString(); + } else { + break; + } + + Token colon; + if (!readToken(colon) || colon.type_ != tokenMemberSeparator) { + return addErrorAndRecover( + "Missing ':' after object member name", colon, tokenObjectEnd); + } + Value& value = currentValue()[name]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenObjectEnd); + + Token comma; + if (!readToken(comma) || + (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator && + comma.type_ != tokenComment)) { + return addErrorAndRecover( + "Missing ',' or '}' in object declaration", comma, tokenObjectEnd); + } + bool finalizeTokenOk = true; + while (comma.type_ == tokenComment && finalizeTokenOk) + finalizeTokenOk = readToken(comma); + if (comma.type_ == tokenObjectEnd) + return true; + } + return addErrorAndRecover( + "Missing '}' or object member name", tokenName, tokenObjectEnd); +} + +bool Reader::readArray(Token& tokenStart) { + Value init(arrayValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + skipSpaces(); + if (*current_ == ']') // empty array + { + Token endArray; + readToken(endArray); + return true; + } + int index = 0; + for (;;) { + Value& value = currentValue()[index++]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenArrayEnd); + + Token token; + // Accept Comment after last item in the array. + ok = readToken(token); + while (token.type_ == tokenComment && ok) { + ok = readToken(token); + } + bool badTokenType = + (token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd); + if (!ok || badTokenType) { + return addErrorAndRecover( + "Missing ',' or ']' in array declaration", token, tokenArrayEnd); + } + if (token.type_ == tokenArrayEnd) + break; + } + return true; +} + +bool Reader::decodeNumber(Token& token) { + Value decoded; + if (!decodeNumber(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool Reader::decodeNumber(Token& token, Value& decoded) { + // Attempts to parse the number as an integer. If the number is + // larger than the maximum supported value of an integer then + // we decode the number as a double. + Location current = token.start_; + bool isNegative = *current == '-'; + if (isNegative) + ++current; + // TODO: Help the compiler do the div and mod at compile time or get rid of them. + Value::LargestUInt maxIntegerValue = + isNegative ? Value::LargestUInt(Value::maxLargestInt) + 1 + : Value::maxLargestUInt; + Value::LargestUInt threshold = maxIntegerValue / 10; + Value::LargestUInt value = 0; + while (current < token.end_) { + Char c = *current++; + if (c < '0' || c > '9') + return decodeDouble(token, decoded); + Value::UInt digit(c - '0'); + if (value >= threshold) { + // We've hit or exceeded the max value divided by 10 (rounded down). If + // a) we've only just touched the limit, b) this is the last digit, and + // c) it's small enough to fit in that rounding delta, we're okay. + // Otherwise treat this number as a double to avoid overflow. + if (value > threshold || current != token.end_ || + digit > maxIntegerValue % 10) { + return decodeDouble(token, decoded); + } + } + value = value * 10 + digit; + } + if (isNegative && value == maxIntegerValue) + decoded = Value::minLargestInt; + else if (isNegative) + decoded = -Value::LargestInt(value); + else if (value <= Value::LargestUInt(Value::maxInt)) + decoded = Value::LargestInt(value); + else + decoded = value; + return true; +} + +bool Reader::decodeDouble(Token& token) { + Value decoded; + if (!decodeDouble(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool Reader::decodeDouble(Token& token, Value& decoded) { + double value = 0; + std::string buffer(token.start_, token.end_); + std::istringstream is(buffer); + if (!(is >> value)) + return addError("'" + std::string(token.start_, token.end_) + + "' is not a number.", + token); + decoded = value; + return true; +} + +bool Reader::decodeString(Token& token) { + std::string decoded_string; + if (!decodeString(token, decoded_string)) + return false; + Value decoded(decoded_string); + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool Reader::decodeString(Token& token, std::string& decoded) { + decoded.reserve(token.end_ - token.start_ - 2); + Location current = token.start_ + 1; // skip '"' + Location end = token.end_ - 1; // do not include '"' + while (current != end) { + Char c = *current++; + if (c == '"') + break; + else if (c == '\\') { + if (current == end) + return addError("Empty escape sequence in string", token, current); + Char escape = *current++; + switch (escape) { + case '"': + decoded += '"'; + break; + case '/': + decoded += '/'; + break; + case '\\': + decoded += '\\'; + break; + case 'b': + decoded += '\b'; + break; + case 'f': + decoded += '\f'; + break; + case 'n': + decoded += '\n'; + break; + case 'r': + decoded += '\r'; + break; + case 't': + decoded += '\t'; + break; + case 'u': { + unsigned int unicode; + if (!decodeUnicodeCodePoint(token, current, end, unicode)) + return false; + decoded += codePointToUTF8(unicode); + } break; + default: + return addError("Bad escape sequence in string", token, current); + } + } else { + decoded += c; + } + } + return true; +} + +bool Reader::decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + + if (!decodeUnicodeEscapeSequence(token, current, end, unicode)) + return false; + if (unicode >= 0xD800 && unicode <= 0xDBFF) { + // surrogate pairs + if (end - current < 6) + return addError( + "additional six characters expected to parse unicode surrogate pair.", + token, + current); + unsigned int surrogatePair; + if (*(current++) == '\\' && *(current++) == 'u') { + if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) { + unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF); + } else + return false; + } else + return addError("expecting another \\u token to begin the second half of " + "a unicode surrogate pair", + token, + current); + } + return true; +} + +bool Reader::decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + if (end - current < 4) + return addError( + "Bad unicode escape sequence in string: four digits expected.", + token, + current); + unicode = 0; + for (int index = 0; index < 4; ++index) { + Char c = *current++; + unicode *= 16; + if (c >= '0' && c <= '9') + unicode += c - '0'; + else if (c >= 'a' && c <= 'f') + unicode += c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + unicode += c - 'A' + 10; + else + return addError( + "Bad unicode escape sequence in string: hexadecimal digit expected.", + token, + current); + } + return true; +} + +bool +Reader::addError(const std::string& message, Token& token, Location extra) { + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = extra; + errors_.push_back(info); + return false; +} + +bool Reader::recoverFromError(TokenType skipUntilToken) { + int errorCount = int(errors_.size()); + Token skip; + for (;;) { + if (!readToken(skip)) + errors_.resize(errorCount); // discard errors caused by recovery + if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream) + break; + } + errors_.resize(errorCount); + return false; +} + +bool Reader::addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken) { + addError(message, token); + return recoverFromError(skipUntilToken); +} + +Value& Reader::currentValue() { return *(nodes_.top()); } + +Reader::Char Reader::getNextChar() { + if (current_ == end_) + return 0; + return *current_++; +} + +void Reader::getLocationLineAndColumn(Location location, + int& line, + int& column) const { + Location current = begin_; + Location lastLineStart = current; + line = 0; + while (current < location && current != end_) { + Char c = *current++; + if (c == '\r') { + if (*current == '\n') + ++current; + lastLineStart = current; + ++line; + } else if (c == '\n') { + lastLineStart = current; + ++line; + } + } + // column & line start at 1 + column = int(location - lastLineStart) + 1; + ++line; +} + +std::string Reader::getLocationLineAndColumn(Location location) const { + int line, column; + getLocationLineAndColumn(location, line, column); + char buffer[18 + 16 + 16 + 1]; + snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); + return buffer; +} + +std::string Reader::getLocationSnippet(Location location) const { + std::string snippet = ""; + std::istringstream docStream(document_); + int lin, col; + getLocationLineAndColumn(location, lin, col); + std::string line; + for (int i=1; i Reader::getStructuredErrors() const { + std::vector allErrors; + for (Errors::const_iterator itError = errors_.begin(); + itError != errors_.end(); + ++itError) { + const ErrorInfo& error = *itError; + Reader::StructuredError structured; + structured.offset_start = error.token_.start_ - begin_; + structured.offset_limit = error.token_.end_ - begin_; + structured.message = error.message_; + allErrors.push_back(structured); + } + return allErrors; +} + +bool Reader::pushError(const Value& value, const std::string& message) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = end_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = 0; + errors_.push_back(info); + return true; +} + +bool Reader::pushError(const Value& value, const std::string& message, const Value& extra) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length + || extra.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = begin_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = begin_ + extra.getOffsetStart(); + errors_.push_back(info); + return true; +} + +bool Reader::good() const { + return !errors_.size(); +} + +// exact copy of Features +class OurFeatures { +public: + static OurFeatures all(); + bool allowComments_; + bool strictRoot_; + bool allowDroppedNullPlaceholders_; + bool allowNumericKeys_; + bool allowSingleQuotes_; + bool failIfExtra_; + bool rejectDupKeys_; + bool allowSpecialFloats_; + int stackLimit_; +}; // OurFeatures + +// exact copy of Implementation of class Features +// //////////////////////////////// + +OurFeatures OurFeatures::all() { return OurFeatures(); } + +// Implementation of class Reader +// //////////////////////////////// + +// exact copy of Reader, renamed to OurReader +class OurReader { +public: + typedef char Char; + typedef const Char* Location; + struct StructuredError { + size_t offset_start; + size_t offset_limit; + std::string message; + }; + + OurReader(OurFeatures const& features); + bool parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments = true); + std::string getFormattedErrorMessages() const; + std::vector getStructuredErrors() const; + bool pushError(const Value& value, const std::string& message); + bool pushError(const Value& value, const std::string& message, const Value& extra); + bool good() const; + +private: + OurReader(OurReader const&); // no impl + void operator=(OurReader const&); // no impl + + enum TokenType { + tokenEndOfStream = 0, + tokenObjectBegin, + tokenObjectEnd, + tokenArrayBegin, + tokenArrayEnd, + tokenString, + tokenNumber, + tokenTrue, + tokenFalse, + tokenNull, + tokenNaN, + tokenPosInf, + tokenNegInf, + tokenArraySeparator, + tokenMemberSeparator, + tokenComment, + tokenError + }; + + class Token { + public: + TokenType type_; + Location start_; + Location end_; + }; + + class ErrorInfo { + public: + Token token_; + std::string message_; + Location extra_; + }; + + typedef std::deque Errors; + + bool readToken(Token& token); + void skipSpaces(); + bool match(Location pattern, int patternLength); + bool readComment(); + bool readCStyleComment(); + bool readCppStyleComment(); + bool readString(); + bool readStringSingleQuote(); + bool readNumber(bool checkInf); + bool readValue(); + bool readObject(Token& token); + bool readArray(Token& token); + bool decodeNumber(Token& token); + bool decodeNumber(Token& token, Value& decoded); + bool decodeString(Token& token); + bool decodeString(Token& token, std::string& decoded); + bool decodeDouble(Token& token); + bool decodeDouble(Token& token, Value& decoded); + bool decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode); + bool addError(const std::string& message, Token& token, Location extra = 0); + bool recoverFromError(TokenType skipUntilToken); + bool addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken); + void skipUntilSpace(); + Value& currentValue(); + Char getNextChar(); + void + getLocationLineAndColumn(Location location, int& line, int& column) const; + std::string getLocationLineAndColumn(Location location) const; + void addComment(Location begin, Location end, CommentPlacement placement); + void skipCommentTokens(Token& token); + + typedef std::stack Nodes; + Nodes nodes_; + Errors errors_; + std::string document_; + Location begin_; + Location end_; + Location current_; + Location lastValueEnd_; + Value* lastValue_; + std::string commentsBefore_; + int stackDepth_; + + OurFeatures const features_; + bool collectComments_; +}; // OurReader + +// complete copy of Read impl, for OurReader + +OurReader::OurReader(OurFeatures const& features) + : errors_(), document_(), begin_(), end_(), current_(), lastValueEnd_(), + lastValue_(), commentsBefore_(), + stackDepth_(0), + features_(features), collectComments_() { +} + +bool OurReader::parse(const char* beginDoc, + const char* endDoc, + Value& root, + bool collectComments) { + if (!features_.allowComments_) { + collectComments = false; + } + + begin_ = beginDoc; + end_ = endDoc; + collectComments_ = collectComments; + current_ = begin_; + lastValueEnd_ = 0; + lastValue_ = 0; + commentsBefore_ = ""; + errors_.clear(); + while (!nodes_.empty()) + nodes_.pop(); + nodes_.push(&root); + + stackDepth_ = 0; + bool successful = readValue(); + Token token; + skipCommentTokens(token); + if (features_.failIfExtra_) { + if (token.type_ != tokenError && token.type_ != tokenEndOfStream) { + addError("Extra non-whitespace after JSON value.", token); + return false; + } + } + if (collectComments_ && !commentsBefore_.empty()) + root.setComment(commentsBefore_, commentAfter); + if (features_.strictRoot_) { + if (!root.isArray() && !root.isObject()) { + // Set error location to start of doc, ideally should be first token found + // in doc + token.type_ = tokenError; + token.start_ = beginDoc; + token.end_ = endDoc; + addError( + "A valid JSON document must be either an array or an object value.", + token); + return false; + } + } + return successful; +} + +bool OurReader::readValue() { + if (stackDepth_ >= features_.stackLimit_) throwRuntimeError("Exceeded stackLimit in readValue()."); + ++stackDepth_; + Token token; + skipCommentTokens(token); + bool successful = true; + + if (collectComments_ && !commentsBefore_.empty()) { + currentValue().setComment(commentsBefore_, commentBefore); + commentsBefore_ = ""; + } + + switch (token.type_) { + case tokenObjectBegin: + successful = readObject(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenArrayBegin: + successful = readArray(token); + currentValue().setOffsetLimit(current_ - begin_); + break; + case tokenNumber: + successful = decodeNumber(token); + break; + case tokenString: + successful = decodeString(token); + break; + case tokenTrue: + { + Value v(true); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenFalse: + { + Value v(false); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNull: + { + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNaN: + { + Value v(std::numeric_limits::quiet_NaN()); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenPosInf: + { + Value v(std::numeric_limits::infinity()); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenNegInf: + { + Value v(-std::numeric_limits::infinity()); + currentValue().swapPayload(v); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + } + break; + case tokenArraySeparator: + case tokenObjectEnd: + case tokenArrayEnd: + if (features_.allowDroppedNullPlaceholders_) { + // "Un-read" the current token and mark the current value as a null + // token. + current_--; + Value v; + currentValue().swapPayload(v); + currentValue().setOffsetStart(current_ - begin_ - 1); + currentValue().setOffsetLimit(current_ - begin_); + break; + } // else, fall through ... + default: + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return addError("Syntax error: value, object or array expected.", token); + } + + if (collectComments_) { + lastValueEnd_ = current_; + lastValue_ = ¤tValue(); + } + + --stackDepth_; + return successful; +} + +void OurReader::skipCommentTokens(Token& token) { + if (features_.allowComments_) { + do { + readToken(token); + } while (token.type_ == tokenComment); + } else { + readToken(token); + } +} + +bool OurReader::readToken(Token& token) { + skipSpaces(); + token.start_ = current_; + Char c = getNextChar(); + bool ok = true; + switch (c) { + case '{': + token.type_ = tokenObjectBegin; + break; + case '}': + token.type_ = tokenObjectEnd; + break; + case '[': + token.type_ = tokenArrayBegin; + break; + case ']': + token.type_ = tokenArrayEnd; + break; + case '"': + token.type_ = tokenString; + ok = readString(); + break; + case '\'': + if (features_.allowSingleQuotes_) { + token.type_ = tokenString; + ok = readStringSingleQuote(); + break; + } // else continue + case '/': + token.type_ = tokenComment; + ok = readComment(); + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + token.type_ = tokenNumber; + readNumber(false); + break; + case '-': + if (readNumber(true)) { + token.type_ = tokenNumber; + } else { + token.type_ = tokenNegInf; + ok = features_.allowSpecialFloats_ && match("nfinity", 7); + } + break; + case 't': + token.type_ = tokenTrue; + ok = match("rue", 3); + break; + case 'f': + token.type_ = tokenFalse; + ok = match("alse", 4); + break; + case 'n': + token.type_ = tokenNull; + ok = match("ull", 3); + break; + case 'N': + if (features_.allowSpecialFloats_) { + token.type_ = tokenNaN; + ok = match("aN", 2); + } else { + ok = false; + } + break; + case 'I': + if (features_.allowSpecialFloats_) { + token.type_ = tokenPosInf; + ok = match("nfinity", 7); + } else { + ok = false; + } + break; + case ',': + token.type_ = tokenArraySeparator; + break; + case ':': + token.type_ = tokenMemberSeparator; + break; + case 0: + token.type_ = tokenEndOfStream; + break; + default: + ok = false; + break; + } + if (!ok) + token.type_ = tokenError; + token.end_ = current_; + return true; +} + +void OurReader::skipSpaces() { + while (current_ != end_) { + Char c = *current_; + if (c == ' ' || c == '\t' || c == '\r' || c == '\n') + ++current_; + else + break; + } +} + +bool OurReader::match(Location pattern, int patternLength) { + if (end_ - current_ < patternLength) + return false; + int index = patternLength; + while (index--) + if (current_[index] != pattern[index]) + return false; + current_ += patternLength; + return true; +} + +bool OurReader::readComment() { + Location commentBegin = current_ - 1; + Char c = getNextChar(); + bool successful = false; + if (c == '*') + successful = readCStyleComment(); + else if (c == '/') + successful = readCppStyleComment(); + if (!successful) + return false; + + if (collectComments_) { + CommentPlacement placement = commentBefore; + if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) { + if (c != '*' || !containsNewLine(commentBegin, current_)) + placement = commentAfterOnSameLine; + } + + addComment(commentBegin, current_, placement); + } + return true; +} + +void +OurReader::addComment(Location begin, Location end, CommentPlacement placement) { + assert(collectComments_); + const std::string& normalized = normalizeEOL(begin, end); + if (placement == commentAfterOnSameLine) { + assert(lastValue_ != 0); + lastValue_->setComment(normalized, placement); + } else { + commentsBefore_ += normalized; + } +} + +bool OurReader::readCStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '*' && *current_ == '/') + break; + } + return getNextChar() == '/'; +} + +bool OurReader::readCppStyleComment() { + while (current_ != end_) { + Char c = getNextChar(); + if (c == '\n') + break; + if (c == '\r') { + // Consume DOS EOL. It will be normalized in addComment. + if (current_ != end_ && *current_ == '\n') + getNextChar(); + // Break on Moc OS 9 EOL. + break; + } + } + return true; +} + +bool OurReader::readNumber(bool checkInf) { + const char *p = current_; + if (checkInf && p != end_ && *p == 'I') { + current_ = ++p; + return false; + } + char c = '0'; // stopgap for already consumed character + // integral part + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + // fractional part + if (c == '.') { + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } + // exponential part + if (c == 'e' || c == 'E') { + c = (current_ = p) < end_ ? *p++ : 0; + if (c == '+' || c == '-') + c = (current_ = p) < end_ ? *p++ : 0; + while (c >= '0' && c <= '9') + c = (current_ = p) < end_ ? *p++ : 0; + } + return true; +} +bool OurReader::readString() { + Char c = 0; + while (current_ != end_) { + c = getNextChar(); + if (c == '\\') + getNextChar(); + else if (c == '"') + break; + } + return c == '"'; +} + + +bool OurReader::readStringSingleQuote() { + Char c = 0; + while (current_ != end_) { + c = getNextChar(); + if (c == '\\') + getNextChar(); + else if (c == '\'') + break; + } + return c == '\''; +} + +bool OurReader::readObject(Token& tokenStart) { + Token tokenName; + std::string name; + Value init(objectValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + while (readToken(tokenName)) { + bool initialTokenOk = true; + while (tokenName.type_ == tokenComment && initialTokenOk) + initialTokenOk = readToken(tokenName); + if (!initialTokenOk) + break; + if (tokenName.type_ == tokenObjectEnd && name.empty()) // empty object + return true; + name = ""; + if (tokenName.type_ == tokenString) { + if (!decodeString(tokenName, name)) + return recoverFromError(tokenObjectEnd); + } else if (tokenName.type_ == tokenNumber && features_.allowNumericKeys_) { + Value numberName; + if (!decodeNumber(tokenName, numberName)) + return recoverFromError(tokenObjectEnd); + name = numberName.asString(); + } else { + break; + } + + Token colon; + if (!readToken(colon) || colon.type_ != tokenMemberSeparator) { + return addErrorAndRecover( + "Missing ':' after object member name", colon, tokenObjectEnd); + } + if (name.length() >= (1U<<30)) throwRuntimeError("keylength >= 2^30"); + if (features_.rejectDupKeys_ && currentValue().isMember(name)) { + std::string msg = "Duplicate key: '" + name + "'"; + return addErrorAndRecover( + msg, tokenName, tokenObjectEnd); + } + Value& value = currentValue()[name]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenObjectEnd); + + Token comma; + if (!readToken(comma) || + (comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator && + comma.type_ != tokenComment)) { + return addErrorAndRecover( + "Missing ',' or '}' in object declaration", comma, tokenObjectEnd); + } + bool finalizeTokenOk = true; + while (comma.type_ == tokenComment && finalizeTokenOk) + finalizeTokenOk = readToken(comma); + if (comma.type_ == tokenObjectEnd) + return true; + } + return addErrorAndRecover( + "Missing '}' or object member name", tokenName, tokenObjectEnd); +} + +bool OurReader::readArray(Token& tokenStart) { + Value init(arrayValue); + currentValue().swapPayload(init); + currentValue().setOffsetStart(tokenStart.start_ - begin_); + skipSpaces(); + if (*current_ == ']') // empty array + { + Token endArray; + readToken(endArray); + return true; + } + int index = 0; + for (;;) { + Value& value = currentValue()[index++]; + nodes_.push(&value); + bool ok = readValue(); + nodes_.pop(); + if (!ok) // error already set + return recoverFromError(tokenArrayEnd); + + Token token; + // Accept Comment after last item in the array. + ok = readToken(token); + while (token.type_ == tokenComment && ok) { + ok = readToken(token); + } + bool badTokenType = + (token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd); + if (!ok || badTokenType) { + return addErrorAndRecover( + "Missing ',' or ']' in array declaration", token, tokenArrayEnd); + } + if (token.type_ == tokenArrayEnd) + break; + } + return true; +} + +bool OurReader::decodeNumber(Token& token) { + Value decoded; + if (!decodeNumber(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool OurReader::decodeNumber(Token& token, Value& decoded) { + // Attempts to parse the number as an integer. If the number is + // larger than the maximum supported value of an integer then + // we decode the number as a double. + Location current = token.start_; + bool isNegative = *current == '-'; + if (isNegative) + ++current; + // TODO: Help the compiler do the div and mod at compile time or get rid of them. + Value::LargestUInt maxIntegerValue = + isNegative ? Value::LargestUInt(-Value::minLargestInt) + : Value::maxLargestUInt; + Value::LargestUInt threshold = maxIntegerValue / 10; + Value::LargestUInt value = 0; + while (current < token.end_) { + Char c = *current++; + if (c < '0' || c > '9') + return decodeDouble(token, decoded); + Value::UInt digit(c - '0'); + if (value >= threshold) { + // We've hit or exceeded the max value divided by 10 (rounded down). If + // a) we've only just touched the limit, b) this is the last digit, and + // c) it's small enough to fit in that rounding delta, we're okay. + // Otherwise treat this number as a double to avoid overflow. + if (value > threshold || current != token.end_ || + digit > maxIntegerValue % 10) { + return decodeDouble(token, decoded); + } + } + value = value * 10 + digit; + } + if (isNegative) + decoded = -Value::LargestInt(value); + else if (value <= Value::LargestUInt(Value::maxInt)) + decoded = Value::LargestInt(value); + else + decoded = value; + return true; +} + +bool OurReader::decodeDouble(Token& token) { + Value decoded; + if (!decodeDouble(token, decoded)) + return false; + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool OurReader::decodeDouble(Token& token, Value& decoded) { + double value = 0; + const int bufferSize = 32; + int count; + int length = int(token.end_ - token.start_); + + // Sanity check to avoid buffer overflow exploits. + if (length < 0) { + return addError("Unable to parse token length", token); + } + + // Avoid using a string constant for the format control string given to + // sscanf, as this can cause hard to debug crashes on OS X. See here for more + // info: + // + // http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0.1/gcc/Incompatibilities.html + char format[] = "%lf"; + + if (length <= bufferSize) { + Char buffer[bufferSize + 1]; + memcpy(buffer, token.start_, length); + buffer[length] = 0; + count = sscanf(buffer, format, &value); + } else { + std::string buffer(token.start_, token.end_); + count = sscanf(buffer.c_str(), format, &value); + } + + if (count != 1) + return addError("'" + std::string(token.start_, token.end_) + + "' is not a number.", + token); + decoded = value; + return true; +} + +bool OurReader::decodeString(Token& token) { + std::string decoded_string; + if (!decodeString(token, decoded_string)) + return false; + Value decoded(decoded_string); + currentValue().swapPayload(decoded); + currentValue().setOffsetStart(token.start_ - begin_); + currentValue().setOffsetLimit(token.end_ - begin_); + return true; +} + +bool OurReader::decodeString(Token& token, std::string& decoded) { + decoded.reserve(token.end_ - token.start_ - 2); + Location current = token.start_ + 1; // skip '"' + Location end = token.end_ - 1; // do not include '"' + while (current != end) { + Char c = *current++; + if (c == '"') + break; + else if (c == '\\') { + if (current == end) + return addError("Empty escape sequence in string", token, current); + Char escape = *current++; + switch (escape) { + case '"': + decoded += '"'; + break; + case '/': + decoded += '/'; + break; + case '\\': + decoded += '\\'; + break; + case 'b': + decoded += '\b'; + break; + case 'f': + decoded += '\f'; + break; + case 'n': + decoded += '\n'; + break; + case 'r': + decoded += '\r'; + break; + case 't': + decoded += '\t'; + break; + case 'u': { + unsigned int unicode; + if (!decodeUnicodeCodePoint(token, current, end, unicode)) + return false; + decoded += codePointToUTF8(unicode); + } break; + default: + return addError("Bad escape sequence in string", token, current); + } + } else { + decoded += c; + } + } + return true; +} + +bool OurReader::decodeUnicodeCodePoint(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + + if (!decodeUnicodeEscapeSequence(token, current, end, unicode)) + return false; + if (unicode >= 0xD800 && unicode <= 0xDBFF) { + // surrogate pairs + if (end - current < 6) + return addError( + "additional six characters expected to parse unicode surrogate pair.", + token, + current); + unsigned int surrogatePair; + if (*(current++) == '\\' && *(current++) == 'u') { + if (decodeUnicodeEscapeSequence(token, current, end, surrogatePair)) { + unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF); + } else + return false; + } else + return addError("expecting another \\u token to begin the second half of " + "a unicode surrogate pair", + token, + current); + } + return true; +} + +bool OurReader::decodeUnicodeEscapeSequence(Token& token, + Location& current, + Location end, + unsigned int& unicode) { + if (end - current < 4) + return addError( + "Bad unicode escape sequence in string: four digits expected.", + token, + current); + unicode = 0; + for (int index = 0; index < 4; ++index) { + Char c = *current++; + unicode *= 16; + if (c >= '0' && c <= '9') + unicode += c - '0'; + else if (c >= 'a' && c <= 'f') + unicode += c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + unicode += c - 'A' + 10; + else + return addError( + "Bad unicode escape sequence in string: hexadecimal digit expected.", + token, + current); + } + return true; +} + +bool +OurReader::addError(const std::string& message, Token& token, Location extra) { + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = extra; + errors_.push_back(info); + return false; +} + +bool OurReader::recoverFromError(TokenType skipUntilToken) { + int errorCount = int(errors_.size()); + Token skip; + for (;;) { + if (!readToken(skip)) + errors_.resize(errorCount); // discard errors caused by recovery + if (skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream) + break; + } + errors_.resize(errorCount); + return false; +} + +bool OurReader::addErrorAndRecover(const std::string& message, + Token& token, + TokenType skipUntilToken) { + addError(message, token); + return recoverFromError(skipUntilToken); +} + +Value& OurReader::currentValue() { return *(nodes_.top()); } + +OurReader::Char OurReader::getNextChar() { + if (current_ == end_) + return 0; + return *current_++; +} + +void OurReader::getLocationLineAndColumn(Location location, + int& line, + int& column) const { + Location current = begin_; + Location lastLineStart = current; + line = 0; + while (current < location && current != end_) { + Char c = *current++; + if (c == '\r') { + if (*current == '\n') + ++current; + lastLineStart = current; + ++line; + } else if (c == '\n') { + lastLineStart = current; + ++line; + } + } + // column & line start at 1 + column = int(location - lastLineStart) + 1; + ++line; +} + +std::string OurReader::getLocationLineAndColumn(Location location) const { + int line, column; + getLocationLineAndColumn(location, line, column); + char buffer[18 + 16 + 16 + 1]; + snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); + return buffer; +} + +std::string OurReader::getFormattedErrorMessages() const { + std::string formattedMessage; + for (Errors::const_iterator itError = errors_.begin(); + itError != errors_.end(); + ++itError) { + const ErrorInfo& error = *itError; + formattedMessage += + "* " + getLocationLineAndColumn(error.token_.start_) + "\n"; + formattedMessage += " " + error.message_ + "\n"; + if (error.extra_) + formattedMessage += + "See " + getLocationLineAndColumn(error.extra_) + " for detail.\n"; + } + return formattedMessage; +} + +std::vector OurReader::getStructuredErrors() const { + std::vector allErrors; + for (Errors::const_iterator itError = errors_.begin(); + itError != errors_.end(); + ++itError) { + const ErrorInfo& error = *itError; + OurReader::StructuredError structured; + structured.offset_start = error.token_.start_ - begin_; + structured.offset_limit = error.token_.end_ - begin_; + structured.message = error.message_; + allErrors.push_back(structured); + } + return allErrors; +} + +bool OurReader::pushError(const Value& value, const std::string& message) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = end_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = 0; + errors_.push_back(info); + return true; +} + +bool OurReader::pushError(const Value& value, const std::string& message, const Value& extra) { + size_t length = end_ - begin_; + if(value.getOffsetStart() > length + || value.getOffsetLimit() > length + || extra.getOffsetLimit() > length) + return false; + Token token; + token.type_ = tokenError; + token.start_ = begin_ + value.getOffsetStart(); + token.end_ = begin_ + value.getOffsetLimit(); + ErrorInfo info; + info.token_ = token; + info.message_ = message; + info.extra_ = begin_ + extra.getOffsetStart(); + errors_.push_back(info); + return true; +} + +bool OurReader::good() const { + return !errors_.size(); +} + + +class OurCharReader : public CharReader { + bool const collectComments_; + OurReader reader_; +public: + OurCharReader( + bool collectComments, + OurFeatures const& features) + : collectComments_(collectComments) + , reader_(features) + {} + bool parse( + char const* beginDoc, char const* endDoc, + Value* root, std::string* errs) { + bool ok = reader_.parse(beginDoc, endDoc, *root, collectComments_); + if (errs) { + *errs = reader_.getFormattedErrorMessages(); + } + return ok; + } +}; + +CharReaderBuilder::CharReaderBuilder() +{ + setDefaults(&settings_); +} +CharReaderBuilder::~CharReaderBuilder() +{} +CharReader* CharReaderBuilder::newCharReader() const +{ + bool collectComments = settings_["collectComments"].asBool(); + OurFeatures features = OurFeatures::all(); + features.allowComments_ = settings_["allowComments"].asBool(); + features.strictRoot_ = settings_["strictRoot"].asBool(); + features.allowDroppedNullPlaceholders_ = settings_["allowDroppedNullPlaceholders"].asBool(); + features.allowNumericKeys_ = settings_["allowNumericKeys"].asBool(); + features.allowSingleQuotes_ = settings_["allowSingleQuotes"].asBool(); + features.stackLimit_ = settings_["stackLimit"].asInt(); + features.failIfExtra_ = settings_["failIfExtra"].asBool(); + features.rejectDupKeys_ = settings_["rejectDupKeys"].asBool(); + features.allowSpecialFloats_ = settings_["allowSpecialFloats"].asBool(); + return new OurCharReader(collectComments, features); +} +static void getValidReaderKeys(std::set* valid_keys) +{ + valid_keys->clear(); + valid_keys->insert("collectComments"); + valid_keys->insert("allowComments"); + valid_keys->insert("strictRoot"); + valid_keys->insert("allowDroppedNullPlaceholders"); + valid_keys->insert("allowNumericKeys"); + valid_keys->insert("allowSingleQuotes"); + valid_keys->insert("stackLimit"); + valid_keys->insert("failIfExtra"); + valid_keys->insert("rejectDupKeys"); + valid_keys->insert("allowSpecialFloats"); +} +bool CharReaderBuilder::validate(Json::Value* invalid) const +{ + Json::Value my_invalid; + if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL + Json::Value& inv = *invalid; + std::set valid_keys; + getValidReaderKeys(&valid_keys); + Value::Members keys = settings_.getMemberNames(); + size_t n = keys.size(); + for (size_t i = 0; i < n; ++i) { + std::string const& key = keys[i]; + if (valid_keys.find(key) == valid_keys.end()) { + inv[key] = settings_[key]; + } + } + return 0u == inv.size(); +} +Value& CharReaderBuilder::operator[](std::string key) +{ + return settings_[key]; +} +// static +void CharReaderBuilder::strictMode(Json::Value* settings) +{ +//! [CharReaderBuilderStrictMode] + (*settings)["allowComments"] = false; + (*settings)["strictRoot"] = true; + (*settings)["allowDroppedNullPlaceholders"] = false; + (*settings)["allowNumericKeys"] = false; + (*settings)["allowSingleQuotes"] = false; + (*settings)["stackLimit"] = 1000; + (*settings)["failIfExtra"] = true; + (*settings)["rejectDupKeys"] = true; + (*settings)["allowSpecialFloats"] = false; +//! [CharReaderBuilderStrictMode] +} +// static +void CharReaderBuilder::setDefaults(Json::Value* settings) +{ +//! [CharReaderBuilderDefaults] + (*settings)["collectComments"] = true; + (*settings)["allowComments"] = true; + (*settings)["strictRoot"] = false; + (*settings)["allowDroppedNullPlaceholders"] = false; + (*settings)["allowNumericKeys"] = false; + (*settings)["allowSingleQuotes"] = false; + (*settings)["stackLimit"] = 1000; + (*settings)["failIfExtra"] = false; + (*settings)["rejectDupKeys"] = false; + (*settings)["allowSpecialFloats"] = false; +//! [CharReaderBuilderDefaults] +} + +////////////////////////////////// +// global functions + +bool parseFromStream( + CharReader::Factory const& fact, std::istream& sin, + Value* root, std::string* errs) +{ + std::ostringstream ssin; + ssin << sin.rdbuf(); + std::string doc = ssin.str(); + char const* begin = doc.data(); + char const* end = begin + doc.size(); + // Note that we do not actually need a null-terminator. + CharReaderPtr const reader(fact.newCharReader()); + return reader->parse(begin, end, root, errs); +} + +std::istream& operator>>(std::istream& sin, Value& root) { + CharReaderBuilder b; + std::string errs; + bool ok = parseFromStream(b, sin, &root, &errs); + if (!ok) { + fprintf(stderr, + "Error from reader: %s", + errs.c_str()); + + throwRuntimeError(errs); + } + return sin; +} + +} // namespace Json + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_reader.cpp +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_valueiterator.inl +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2007-2010 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +// included by json_value.cpp + +namespace Json { + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class ValueIteratorBase +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +ValueIteratorBase::ValueIteratorBase() + : current_(), isNull_(true) { +} + +ValueIteratorBase::ValueIteratorBase( + const Value::ObjectValues::iterator& current) + : current_(current), isNull_(false) {} + +Value& ValueIteratorBase::deref() const { + return current_->second; +} + +void ValueIteratorBase::increment() { + ++current_; +} + +void ValueIteratorBase::decrement() { + --current_; +} + +ValueIteratorBase::difference_type +ValueIteratorBase::computeDistance(const SelfType& other) const { +#ifdef JSON_USE_CPPTL_SMALLMAP + return other.current_ - current_; +#else + // Iterator for null value are initialized using the default + // constructor, which initialize current_ to the default + // std::map::iterator. As begin() and end() are two instance + // of the default std::map::iterator, they can not be compared. + // To allow this, we handle this comparison specifically. + if (isNull_ && other.isNull_) { + return 0; + } + + // Usage of std::distance is not portable (does not compile with Sun Studio 12 + // RogueWave STL, + // which is the one used by default). + // Using a portable hand-made version for non random iterator instead: + // return difference_type( std::distance( current_, other.current_ ) ); + difference_type myDistance = 0; + for (Value::ObjectValues::iterator it = current_; it != other.current_; + ++it) { + ++myDistance; + } + return myDistance; +#endif +} + +bool ValueIteratorBase::isEqual(const SelfType& other) const { + if (isNull_) { + return other.isNull_; + } + return current_ == other.current_; +} + +void ValueIteratorBase::copy(const SelfType& other) { + current_ = other.current_; + isNull_ = other.isNull_; +} + +Value ValueIteratorBase::key() const { + const Value::CZString czstring = (*current_).first; + if (czstring.data()) { + if (czstring.isStaticString()) + return Value(StaticString(czstring.data())); + return Value(czstring.data(), czstring.data() + czstring.length()); + } + return Value(czstring.index()); +} + +UInt ValueIteratorBase::index() const { + const Value::CZString czstring = (*current_).first; + if (!czstring.data()) + return czstring.index(); + return Value::UInt(-1); +} + +std::string ValueIteratorBase::name() const { + char const* keey; + char const* end; + keey = memberName(&end); + if (!keey) return std::string(); + return std::string(keey, end); +} + +char const* ValueIteratorBase::memberName() const { + const char* cname = (*current_).first.data(); + return cname ? cname : ""; +} + +char const* ValueIteratorBase::memberName(char const** end) const { + const char* cname = (*current_).first.data(); + if (!cname) { + *end = NULL; + return NULL; + } + *end = cname + (*current_).first.length(); + return cname; +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class ValueConstIterator +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +ValueConstIterator::ValueConstIterator() {} + +ValueConstIterator::ValueConstIterator( + const Value::ObjectValues::iterator& current) + : ValueIteratorBase(current) {} + +ValueConstIterator::ValueConstIterator(ValueIterator const& other) + : ValueIteratorBase(other) {} + +ValueConstIterator& ValueConstIterator:: +operator=(const ValueIteratorBase& other) { + copy(other); + return *this; +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class ValueIterator +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +ValueIterator::ValueIterator() {} + +ValueIterator::ValueIterator(const Value::ObjectValues::iterator& current) + : ValueIteratorBase(current) {} + +ValueIterator::ValueIterator(const ValueConstIterator& other) + : ValueIteratorBase(other) { + throwRuntimeError("ConstIterator to Iterator should never be allowed."); +} + +ValueIterator::ValueIterator(const ValueIterator& other) + : ValueIteratorBase(other) {} + +ValueIterator& ValueIterator::operator=(const SelfType& other) { + copy(other); + return *this; +} + +} // namespace Json + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_valueiterator.inl +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_value.cpp +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2011 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include +#ifdef JSON_USE_CPPTL +#include +#endif +#include // size_t +#include // min() + +#define JSON_ASSERT_UNREACHABLE assert(false) + +/* +-- Valve 1/7/16 +4702 unreachable code +*/ +#pragma warning (push) +#pragma warning (disable: 4702) + +namespace Json { + +// This is a walkaround to avoid the static initialization of Value::null. +// kNull must be word-aligned to avoid crashing on ARM. We use an alignment of +// 8 (instead of 4) as a bit of future-proofing. +#if defined(__ARMEL__) +#define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) +#else +#define ALIGNAS(byte_alignment) +#endif +static const unsigned char ALIGNAS(8) kNull[sizeof(Value)] = { 0 }; +const unsigned char& kNullRef = kNull[0]; +const Value& Value::null = reinterpret_cast(kNullRef); +const Value& Value::nullRef = null; + +const Int Value::minInt = Int(~(UInt(-1) / 2)); +const Int Value::maxInt = Int(UInt(-1) / 2); +const UInt Value::maxUInt = UInt(-1); +#if defined(JSON_HAS_INT64) +const Int64 Value::minInt64 = Int64(~(UInt64(-1) / 2)); +const Int64 Value::maxInt64 = Int64(UInt64(-1) / 2); +const UInt64 Value::maxUInt64 = UInt64(-1); +// The constant is hard-coded because some compiler have trouble +// converting Value::maxUInt64 to a double correctly (AIX/xlC). +// Assumes that UInt64 is a 64 bits integer. +static const double maxUInt64AsDouble = 18446744073709551615.0; +#endif // defined(JSON_HAS_INT64) +const LargestInt Value::minLargestInt = LargestInt(~(LargestUInt(-1) / 2)); +const LargestInt Value::maxLargestInt = LargestInt(LargestUInt(-1) / 2); +const LargestUInt Value::maxLargestUInt = LargestUInt(-1); + +#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) +template +static inline bool InRange(double d, T min, U max) { + return d >= min && d <= max; +} +#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) +static inline double integerToDouble(Json::UInt64 value) { + return static_cast(Int64(value / 2)) * 2.0 + Int64(value & 1); +} + +template static inline double integerToDouble(T value) { + return static_cast(value); +} + +template +static inline bool InRange(double d, T min, U max) { + return d >= integerToDouble(min) && d <= integerToDouble(max); +} +#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + +/** Duplicates the specified string value. + * @param value Pointer to the string to duplicate. Must be zero-terminated if + * length is "unknown". + * @param length Length of the value. if equals to unknown, then it will be + * computed using strlen(value). + * @return Pointer on the duplicate instance of string. + */ +static inline char* duplicateStringValue(const char* value, + size_t length) { + // Avoid an integer overflow in the call to malloc below by limiting length + // to a sane value. + if (length >= (size_t)Value::maxInt) + length = Value::maxInt - 1; + + char* newString = static_cast(malloc(length + 1)); + if (newString == NULL) { + throwRuntimeError( + "in Json::Value::duplicateStringValue(): " + "Failed to allocate string value buffer"); + } + memcpy(newString, value, length); + newString[length] = 0; + return newString; +} + +/* Record the length as a prefix. + */ +static inline char* duplicateAndPrefixStringValue( + const char* value, + unsigned int length) +{ + // Avoid an integer overflow in the call to malloc below by limiting length + // to a sane value. + JSON_ASSERT_MESSAGE(length <= (unsigned)Value::maxInt - sizeof(unsigned) - 1U, + "in Json::Value::duplicateAndPrefixStringValue(): " + "length too big for prefixing"); + unsigned actualLength = length + static_cast(sizeof(unsigned)) + 1U; + char* newString = static_cast(malloc(actualLength)); + if (newString == 0) { + throwRuntimeError( + "in Json::Value::duplicateAndPrefixStringValue(): " + "Failed to allocate string value buffer"); + } + *reinterpret_cast(newString) = length; + memcpy(newString + sizeof(unsigned), value, length); + newString[actualLength - 1U] = 0; // to avoid buffer over-run accidents by users later + return newString; +} +inline static void decodePrefixedString( + bool isPrefixed, char const* prefixed, + unsigned* length, char const** value) +{ + if (!isPrefixed) { + *length = static_cast(strlen(prefixed)); + *value = prefixed; + } else { + *length = *reinterpret_cast(prefixed); + *value = prefixed + sizeof(unsigned); + } +} +/** Free the string duplicated by duplicateStringValue()/duplicateAndPrefixStringValue(). + */ +static inline void releaseStringValue(char* value) { free(value); } + +} // namespace Json + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ValueInternals... +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +#if !defined(JSON_IS_AMALGAMATION) + +#include "json_valueiterator.inl" +#endif // if !defined(JSON_IS_AMALGAMATION) + +namespace Json { + +Exception::Exception(std::string const& msg) + : msg_(msg) +{} +Exception::~Exception() throw() +{} +char const* Exception::what() const throw() +{ + return msg_.c_str(); +} +RuntimeError::RuntimeError(std::string const& msg) + : Exception(msg) +{} +LogicError::LogicError(std::string const& msg) + : Exception(msg) +{} +void throwRuntimeError(std::string const& msg) +{ + throw RuntimeError(msg); +} +void throwLogicError(std::string const& msg) +{ + throw LogicError(msg); +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class Value::CommentInfo +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +Value::CommentInfo::CommentInfo() : comment_(0) {} + +Value::CommentInfo::~CommentInfo() { + if (comment_) + releaseStringValue(comment_); +} + +void Value::CommentInfo::setComment(const char* text, size_t len) { + if (comment_) { + releaseStringValue(comment_); + comment_ = 0; + } + JSON_ASSERT(text != 0); + JSON_ASSERT_MESSAGE( + text[0] == '\0' || text[0] == '/', + "in Json::Value::setComment(): Comments must start with /"); + // It seems that /**/ style comments are acceptable as well. + comment_ = duplicateStringValue(text, len); +} + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class Value::CZString +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +// Notes: policy_ indicates if the string was allocated when +// a string is stored. + +Value::CZString::CZString(ArrayIndex aindex) : cstr_(0), index_(aindex) {} + +Value::CZString::CZString(char const* str, unsigned ulength, DuplicationPolicy allocate) + : cstr_(str) { + // allocate != duplicate + storage_.policy_ = allocate & 0x3; + storage_.length_ = ulength & 0x3FFFFFFF; +} + +Value::CZString::CZString(const CZString& other) + : cstr_(other.storage_.policy_ != noDuplication && other.cstr_ != 0 + ? duplicateStringValue(other.cstr_, other.storage_.length_) + : other.cstr_) { + storage_.policy_ = (other.cstr_ + ? (static_cast(other.storage_.policy_) == noDuplication + ? noDuplication : duplicate) + : static_cast(other.storage_.policy_)); + storage_.length_ = other.storage_.length_; +} + +#if JSON_HAS_RVALUE_REFERENCES +Value::CZString::CZString(CZString&& other) + : cstr_(other.cstr_), index_(other.index_) { + other.cstr_ = nullptr; +} +#endif + +Value::CZString::~CZString() { + if (cstr_ && storage_.policy_ == duplicate) + releaseStringValue(const_cast(cstr_)); +} + +void Value::CZString::swap(CZString& other) { + std::swap(cstr_, other.cstr_); + std::swap(index_, other.index_); +} + +Value::CZString& Value::CZString::operator=(CZString other) { + swap(other); + return *this; +} + +bool Value::CZString::operator<(const CZString& other) const { + if (!cstr_) return index_ < other.index_; + //return strcmp(cstr_, other.cstr_) < 0; + // Assume both are strings. + unsigned this_len = this->storage_.length_; + unsigned other_len = other.storage_.length_; + unsigned min_len = std::min(this_len, other_len); + int comp = memcmp(this->cstr_, other.cstr_, min_len); + if (comp < 0) return true; + if (comp > 0) return false; + return (this_len < other_len); +} + +bool Value::CZString::operator==(const CZString& other) const { + if (!cstr_) return index_ == other.index_; + //return strcmp(cstr_, other.cstr_) == 0; + // Assume both are strings. + unsigned this_len = this->storage_.length_; + unsigned other_len = other.storage_.length_; + if (this_len != other_len) return false; + int comp = memcmp(this->cstr_, other.cstr_, this_len); + return comp == 0; +} + +ArrayIndex Value::CZString::index() const { return index_; } + +//const char* Value::CZString::c_str() const { return cstr_; } +const char* Value::CZString::data() const { return cstr_; } +unsigned Value::CZString::length() const { return storage_.length_; } +bool Value::CZString::isStaticString() const { return storage_.policy_ == noDuplication; } + +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// class Value::Value +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////// + +/*! \internal Default constructor initialization must be equivalent to: + * memset( this, 0, sizeof(Value) ) + * This optimization is used in ValueInternalMap fast allocator. + */ +Value::Value(ValueType vtype) { + initBasic(vtype); + switch (vtype) { + case nullValue: + break; + case intValue: + case uintValue: + value_.int_ = 0; + break; + case realValue: + value_.real_ = 0.0; + break; + case stringValue: + value_.string_ = 0; + break; + case arrayValue: + case objectValue: + value_.map_ = new ObjectValues(); + break; + case booleanValue: + value_.bool_ = false; + break; + default: + JSON_ASSERT_UNREACHABLE; + } +} + +Value::Value(Int value) { + initBasic(intValue); + value_.int_ = value; +} + +Value::Value(UInt value) { + initBasic(uintValue); + value_.uint_ = value; +} +#if defined(JSON_HAS_INT64) +Value::Value(Int64 value) { + initBasic(intValue); + value_.int_ = value; +} +Value::Value(UInt64 value) { + initBasic(uintValue); + value_.uint_ = value; +} +#endif // defined(JSON_HAS_INT64) + +Value::Value(double value) { + initBasic(realValue); + value_.real_ = value; +} + +Value::Value(const char* value) { + initBasic(stringValue, true); + value_.string_ = duplicateAndPrefixStringValue(value, static_cast(strlen(value))); +} + +Value::Value(const char* beginValue, const char* endValue) { + initBasic(stringValue, true); + value_.string_ = + duplicateAndPrefixStringValue(beginValue, static_cast(endValue - beginValue)); +} + +Value::Value(const std::string& value) { + initBasic(stringValue, true); + value_.string_ = + duplicateAndPrefixStringValue(value.data(), static_cast(value.length())); +} + +Value::Value(const StaticString& value) { + initBasic(stringValue); + value_.string_ = const_cast(value.c_str()); +} + +#ifdef JSON_USE_CPPTL +Value::Value(const CppTL::ConstString& value) { + initBasic(stringValue, true); + value_.string_ = duplicateAndPrefixStringValue(value, static_cast(value.length())); +} +#endif + +Value::Value(bool value) { + initBasic(booleanValue); + value_.bool_ = value; +} + +Value::Value(Value const& other) + : type_(other.type_), allocated_(false) + , + comments_(nullptr), default_value_(nullptr), start_(other.start_), limit_(other.limit_) +{ + switch (type_) { + case nullValue: + case intValue: + case uintValue: + case realValue: + case booleanValue: + value_ = other.value_; + break; + case stringValue: + if (other.value_.string_ && other.allocated_) { + unsigned len; + char const* str; + decodePrefixedString(other.allocated_, other.value_.string_, + &len, &str); + value_.string_ = duplicateAndPrefixStringValue(str, len); + allocated_ = true; + } else { + value_.string_ = other.value_.string_; + allocated_ = false; + } + break; + case arrayValue: + case objectValue: + value_.map_ = new ObjectValues(*other.value_.map_); + break; + default: + JSON_ASSERT_UNREACHABLE; + } + if (other.comments_) { + comments_ = new CommentInfo[numberOfCommentPlacement]; + for (int comment = 0; comment < numberOfCommentPlacement; ++comment) { + const CommentInfo& otherComment = other.comments_[comment]; + if (otherComment.comment_) + comments_[comment].setComment( + otherComment.comment_, strlen(otherComment.comment_)); + } + } + + if ( other.default_value_ ) + { + default_value_ = new Value( *other.default_value_ ); + } + +} + +#if JSON_HAS_RVALUE_REFERENCES +// Move constructor +Value::Value(Value&& other) { + initBasic(nullValue); + swap(other); +} +#endif + +Value::~Value() { + switch (type_) { + case nullValue: + case intValue: + case uintValue: + case realValue: + case booleanValue: + break; + case stringValue: + if (allocated_) + releaseStringValue(value_.string_); + break; + case arrayValue: + case objectValue: + delete value_.map_; + break; + default: + JSON_ASSERT_UNREACHABLE; + } + + if (comments_) + delete[] comments_; + + if ( default_value_) + delete default_value_; +} + +Value& Value::operator=(Value other) { + swap(other); + return *this; +} + +void Value::swapPayload(Value& other) { + ValueType temp = type_; + type_ = other.type_; + other.type_ = temp; + std::swap(value_, other.value_); + int temp2 = allocated_; + allocated_ = other.allocated_; + other.allocated_ = temp2 & 0x1; +} + +void Value::swap(Value& other) { + swapPayload(other); + std::swap(comments_, other.comments_); + std::swap(default_value_, other.default_value_); + std::swap(start_, other.start_); + std::swap(limit_, other.limit_); +} + +ValueType Value::type() const { return type_; } + +int Value::compare(const Value& other) const { + if (*this < other) + return -1; + if (*this > other) + return 1; + return 0; +} + +bool Value::operator<(const Value& other) const { + int typeDelta = type_ - other.type_; + if (typeDelta) + return typeDelta < 0 ? true : false; + switch (type_) { + case nullValue: + return false; + case intValue: + return value_.int_ < other.value_.int_; + case uintValue: + return value_.uint_ < other.value_.uint_; + case realValue: + return value_.real_ < other.value_.real_; + case booleanValue: + return value_.bool_ < other.value_.bool_; + case stringValue: + { + if ((value_.string_ == 0) || (other.value_.string_ == 0)) { + if (other.value_.string_) return true; + else return false; + } + unsigned this_len; + unsigned other_len; + char const* this_str; + char const* other_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str); + unsigned min_len = std::min(this_len, other_len); + int comp = memcmp(this_str, other_str, min_len); + if (comp < 0) return true; + if (comp > 0) return false; + return (this_len < other_len); + } + case arrayValue: + case objectValue: { + int delta = int(value_.map_->size() - other.value_.map_->size()); + if (delta) + return delta < 0; + return (*value_.map_) < (*other.value_.map_); + } + default: + JSON_ASSERT_UNREACHABLE; + } + return false; // unreachable +} + +bool Value::operator<=(const Value& other) const { return !(other < *this); } + +bool Value::operator>=(const Value& other) const { return !(*this < other); } + +bool Value::operator>(const Value& other) const { return other < *this; } + +bool Value::operator==(const Value& other) const { + // if ( type_ != other.type_ ) + // GCC 2.95.3 says: + // attempt to take address of bit-field structure member `Json::Value::type_' + // Beats me, but a temp solves the problem. + int temp = other.type_; + if (type_ != temp) + return false; + switch (type_) { + case nullValue: + return true; + case intValue: + return value_.int_ == other.value_.int_; + case uintValue: + return value_.uint_ == other.value_.uint_; + case realValue: + return value_.real_ == other.value_.real_; + case booleanValue: + return value_.bool_ == other.value_.bool_; + case stringValue: + { + if ((value_.string_ == 0) || (other.value_.string_ == 0)) { + return (value_.string_ == other.value_.string_); + } + unsigned this_len; + unsigned other_len; + char const* this_str; + char const* other_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str); + if (this_len != other_len) return false; + int comp = memcmp(this_str, other_str, this_len); + return comp == 0; + } + case arrayValue: + case objectValue: + return value_.map_->size() == other.value_.map_->size() && + (*value_.map_) == (*other.value_.map_); + default: + JSON_ASSERT_UNREACHABLE; + } + return false; // unreachable +} + +bool Value::operator!=(const Value& other) const { return !(*this == other); } + +const char* Value::asCString() const { + JSON_ASSERT_MESSAGE(type_ == stringValue, + "in Json::Value::asCString(): requires stringValue"); + if (value_.string_ == 0) return 0; + unsigned this_len; + char const* this_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + return this_str; +} + +bool Value::getString(char const** str, char const** cend) const { + if (type_ != stringValue) return false; + if (value_.string_ == 0) return false; + unsigned length; + decodePrefixedString(this->allocated_, this->value_.string_, &length, str); + *cend = *str + length; + return true; +} + +std::string Value::asString() const { + switch (type_) { + case nullValue: + return ""; + case stringValue: + { + if (value_.string_ == 0) return ""; + unsigned this_len; + char const* this_str; + decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str); + return std::string(this_str, this_len); + } + case booleanValue: + return value_.bool_ ? "true" : "false"; + case intValue: + return valueToString(value_.int_); + case uintValue: + return valueToString(value_.uint_); + case realValue: + return valueToString(value_.real_); + default: + if ( default_value_ ) + return default_value_->asString(); + else + return ""; + } +} + +#ifdef JSON_USE_CPPTL +CppTL::ConstString Value::asConstString() const { + unsigned len; + char const* str; + decodePrefixedString(allocated_, value_.string_, + &len, &str); + return CppTL::ConstString(str, len); +} +#endif + +Value::Int Value::asInt() const { + switch (type_) { + case intValue: + JSON_ASSERT_MESSAGE(isInt(), "LargestInt out of Int range"); + return Int(value_.int_); + case uintValue: + JSON_ASSERT_MESSAGE(isInt(), "LargestUInt out of Int range"); + return Int(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt, maxInt), + "double out of Int range"); + return Int(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asInt(); + else + return 0; + } +} + +Value::UInt Value::asUInt() const { + switch (type_) { + case intValue: + JSON_ASSERT_MESSAGE(isUInt(), "LargestInt out of UInt range"); + return UInt(value_.int_); + case uintValue: + JSON_ASSERT_MESSAGE(isUInt(), "LargestUInt out of UInt range"); + return UInt(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt), + "double out of UInt range"); + return UInt(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asUInt(); + else + return 0u; + } +} + +#if defined(JSON_HAS_INT64) + +Value::Int64 Value::asInt64() const { + switch (type_) { + case intValue: + return Int64(value_.int_); + case uintValue: + JSON_ASSERT_MESSAGE(isInt64(), "LargestUInt out of Int64 range"); + return Int64(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, minInt64, maxInt64), + "double out of Int64 range"); + return Int64(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asInt64(); + else + return 0l; + } +} + +Value::UInt64 Value::asUInt64() const { + switch (type_) { + case intValue: + JSON_ASSERT_MESSAGE(isUInt64(), "LargestInt out of UInt64 range"); + return UInt64(value_.int_); + case uintValue: + return UInt64(value_.uint_); + case realValue: + JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64), + "double out of UInt64 range"); + return UInt64(value_.real_); + case nullValue: + return 0; + case booleanValue: + return value_.bool_ ? 1 : 0; + default: + if ( default_value_ ) + return default_value_->asUInt64(); + else + return 0ul; + } +} +#endif // if defined(JSON_HAS_INT64) + +LargestInt Value::asLargestInt() const { +#if defined(JSON_NO_INT64) + return asInt(); +#else + return asInt64(); +#endif +} + +LargestUInt Value::asLargestUInt() const { +#if defined(JSON_NO_INT64) + return asUInt(); +#else + return asUInt64(); +#endif +} + +double Value::asDouble() const { + switch (type_) { + case intValue: + return static_cast(value_.int_); + case uintValue: +#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return static_cast(value_.uint_); +#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return integerToDouble(value_.uint_); +#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + case realValue: + return value_.real_; + case nullValue: + return 0.0; + case booleanValue: + return value_.bool_ ? 1.0 : 0.0; + default: + if ( default_value_ ) + return default_value_->asDouble(); + else + return 0.0; + } +} + +float Value::asFloat() const { + switch (type_) { + case intValue: + return static_cast(value_.int_); + case uintValue: +#if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return static_cast(value_.uint_); +#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + return integerToDouble(value_.uint_); +#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) + case realValue: + return static_cast(value_.real_); + case nullValue: + return 0.0; + case booleanValue: + return value_.bool_ ? 1.0f : 0.0f; + default: + if ( default_value_ ) + return default_value_->asFloat(); + else + return 0.0f; + } +} + +bool Value::asBool() const { + switch (type_) { + case booleanValue: + return value_.bool_; + case nullValue: + return false; + case intValue: + return value_.int_ ? true : false; + case uintValue: + return value_.uint_ ? true : false; + case realValue: + // This is kind of strange. Not recommended. + return (value_.real_ != 0.0) ? true : false; + default: + if ( default_value_ ) + return default_value_->asBool(); + else + return false; + } +} + +bool Value::isConvertibleTo(ValueType other) const { + switch (other) { + case nullValue: + return (isNumeric() && asDouble() == 0.0) || + (type_ == booleanValue && value_.bool_ == false) || + (type_ == stringValue && asString() == "") || + (type_ == arrayValue && value_.map_->size() == 0) || + (type_ == objectValue && value_.map_->size() == 0) || + type_ == nullValue; + case intValue: + return isInt() || + (type_ == realValue && InRange(value_.real_, minInt, maxInt)) || + type_ == booleanValue || type_ == nullValue; + case uintValue: + return isUInt() || + (type_ == realValue && InRange(value_.real_, 0, maxUInt)) || + type_ == booleanValue || type_ == nullValue; + case realValue: + return isNumeric() || type_ == booleanValue || type_ == nullValue; + case booleanValue: + return isNumeric() || type_ == booleanValue || type_ == nullValue; + case stringValue: + return isNumeric() || type_ == booleanValue || type_ == stringValue || + type_ == nullValue; + case arrayValue: + return type_ == arrayValue || type_ == nullValue; + case objectValue: + return type_ == objectValue || type_ == nullValue; + } + JSON_ASSERT_UNREACHABLE; + return false; +} + +/// Number of values in array or object +ArrayIndex Value::size() const { + switch (type_) { + case nullValue: + case intValue: + case uintValue: + case realValue: + case booleanValue: + case stringValue: + return 0; + case arrayValue: // size of the array is highest index + 1 + if (!value_.map_->empty()) { + ObjectValues::const_iterator itLast = value_.map_->end(); + --itLast; + return (*itLast).first.index() + 1; + } + return 0; + case objectValue: + return ArrayIndex(value_.map_->size()); + } + JSON_ASSERT_UNREACHABLE; + return 0; // unreachable; +} + +bool Value::empty() const { + if (isNull() || isArray() || isObject()) + return size() == 0u; + else + return false; +} + +bool Value::operator!() const { return isNull(); } + +void Value::clear() { + JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue || + type_ == objectValue, + "in Json::Value::clear(): requires complex value"); + start_ = 0; + limit_ = 0; + delete default_value_; + default_value_ = nullptr; + switch (type_) { + case arrayValue: + case objectValue: + value_.map_->clear(); + break; + default: + break; + } +} + +void Value::resize(ArrayIndex newSize) { + JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue, + "in Json::Value::resize(): requires arrayValue"); + if (type_ == nullValue) + *this = Value(arrayValue); + ArrayIndex oldSize = size(); + if (newSize == 0) + clear(); + else if (newSize > oldSize) + (*this)[newSize - 1]; + else { + for (ArrayIndex index = newSize; index < oldSize; ++index) { + value_.map_->erase(index); + } + assert(size() == newSize); + } +} + +Value& Value::operator[](ArrayIndex index) { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == arrayValue, + "in Json::Value::operator[](ArrayIndex): requires arrayValue"); + if (type_ == nullValue) + *this = Value(arrayValue); + CZString key(index); + ObjectValues::iterator it = value_.map_->lower_bound(key); + if (it != value_.map_->end() && (*it).first == key) + return (*it).second; + + ObjectValues::value_type defaultValue(key, nullRef); + it = value_.map_->insert(it, defaultValue); + return (*it).second; +} + +Value& Value::operator[](int index) { + JSON_ASSERT_MESSAGE( + index >= 0, + "in Json::Value::operator[](int index): index cannot be negative"); + return (*this)[ArrayIndex(index)]; +} + +const Value& Value::operator[](ArrayIndex index) const { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == arrayValue, + "in Json::Value::operator[](ArrayIndex)const: requires arrayValue"); + if (type_ == nullValue) + return nullRef; + CZString key(index); + ObjectValues::const_iterator it = value_.map_->find(key); + if (it == value_.map_->end()) + return nullRef; + return (*it).second; +} + +const Value& Value::operator[](int index) const { + JSON_ASSERT_MESSAGE( + index >= 0, + "in Json::Value::operator[](int index) const: index cannot be negative"); + return (*this)[ArrayIndex(index)]; +} + +void Value::initBasic(ValueType vtype, bool allocated) { + type_ = vtype; + allocated_ = allocated; + comments_ = 0; + start_ = 0; + limit_ = 0; + default_value_ = nullptr; +} + +// Access an object value by name, create a null member if it does not exist. +// @pre Type of '*this' is object or null. +// @param key is null-terminated. +Value& Value::resolveReference(const char* key) { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::resolveReference(): requires objectValue"); + if (type_ == nullValue) + *this = Value(objectValue); + CZString actualKey( + key, static_cast(strlen(key)), CZString::noDuplication); // NOTE! + ObjectValues::iterator it = value_.map_->lower_bound(actualKey); + if (it != value_.map_->end() && (*it).first == actualKey) + return (*it).second; + + ObjectValues::value_type defaultValue(actualKey, nullRef); + it = value_.map_->insert(it, defaultValue); + Value& value = (*it).second; + return value; +} + +// @param key is not null-terminated. +Value& Value::resolveReference(char const* key, char const* cend) +{ + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::resolveReference(key, end): requires objectValue"); + if (type_ == nullValue) + *this = Value(objectValue); + CZString actualKey( + key, static_cast(cend-key), CZString::duplicateOnCopy); + ObjectValues::iterator it = value_.map_->lower_bound(actualKey); + if (it != value_.map_->end() && (*it).first == actualKey) + return (*it).second; + + ObjectValues::value_type defaultValue(actualKey, nullRef); + it = value_.map_->insert(it, defaultValue); + Value& value = (*it).second; + return value; +} + +Value Value::get(ArrayIndex index, const Value& defaultValue) const { + const Value* value = &((*this)[index]); + if ( value == &nullRef ) + { + return defaultValue; + } + else + { + Value result = *value; + result.default_value_ = new Value( defaultValue ); + return result; + } +} + +bool Value::isValidIndex(ArrayIndex index) const { return index < size(); } + +Value const* Value::find(char const* key, char const* cend) const +{ + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::find(key, end, found): requires objectValue or nullValue"); + if (type_ == nullValue) return NULL; + CZString actualKey(key, static_cast(cend-key), CZString::noDuplication); + ObjectValues::const_iterator it = value_.map_->find(actualKey); + if (it == value_.map_->end()) return NULL; + return &(*it).second; +} +const Value& Value::operator[](const char* key) const +{ + Value const* found = find(key, key + strlen(key)); + if (!found) return nullRef; + return *found; +} +Value const& Value::operator[](std::string const& key) const +{ + Value const* found = find(key.data(), key.data() + key.length()); + if (!found) return nullRef; + return *found; +} + +Value& Value::operator[](const char* key) { + return resolveReference(key, key + strlen(key)); +} + +Value& Value::operator[](const std::string& key) { + return resolveReference(key.data(), key.data() + key.length()); +} + +Value& Value::operator[](const StaticString& key) { + return resolveReference(key.c_str()); +} + +#ifdef JSON_USE_CPPTL +Value& Value::operator[](const CppTL::ConstString& key) { + return resolveReference(key.c_str(), key.end_c_str()); +} +Value const& Value::operator[](CppTL::ConstString const& key) const +{ + Value const* found = find(key.c_str(), key.end_c_str()); + if (!found) return nullRef; + return *found; +} +#endif + +Value& Value::append(const Value& value) { return (*this)[size()] = value; } + +Value Value::get(char const* key, char const* cend, Value const& defaultValue) const +{ + Value const* found = find(key, cend); + if ( !found ) + { + return defaultValue; + } + else + { + Value result = *found; + result.default_value_ = new Value( defaultValue ); + return result; + } +} +Value Value::get(char const* key, Value const& defaultValue) const +{ + return get(key, key + strlen(key), defaultValue); +} +Value Value::get(std::string const& key, Value const& defaultValue) const +{ + return get(key.data(), key.data() + key.length(), defaultValue); +} + + +bool Value::removeMember(const char* key, const char* cend, Value* removed) +{ + if (type_ != objectValue) { + return false; + } + CZString actualKey(key, static_cast(cend-key), CZString::noDuplication); + ObjectValues::iterator it = value_.map_->find(actualKey); + if (it == value_.map_->end()) + return false; + *removed = it->second; + value_.map_->erase(it); + return true; +} +bool Value::removeMember(const char* key, Value* removed) +{ + return removeMember(key, key + strlen(key), removed); +} +bool Value::removeMember(std::string const& key, Value* removed) +{ + return removeMember(key.data(), key.data() + key.length(), removed); +} +Value Value::removeMember(const char* key) +{ + JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == objectValue, + "in Json::Value::removeMember(): requires objectValue"); + if (type_ == nullValue) + return nullRef; + + Value removed; // null + removeMember(key, key + strlen(key), &removed); + return removed; // still null if removeMember() did nothing +} +Value Value::removeMember(const std::string& key) +{ + return removeMember(key.c_str()); +} + +bool Value::removeIndex(ArrayIndex index, Value* removed) { + if (type_ != arrayValue) { + return false; + } + CZString key(index); + ObjectValues::iterator it = value_.map_->find(key); + if (it == value_.map_->end()) { + return false; + } + *removed = it->second; + ArrayIndex oldSize = size(); + // shift left all items left, into the place of the "removed" + for (ArrayIndex i = index; i < (oldSize - 1); ++i){ + CZString keey(i); + (*value_.map_)[keey] = (*this)[i + 1]; + } + // erase the last one ("leftover") + CZString keyLast(oldSize - 1); + ObjectValues::iterator itLast = value_.map_->find(keyLast); + value_.map_->erase(itLast); + return true; +} + +#ifdef JSON_USE_CPPTL +Value Value::get(const CppTL::ConstString& key, + const Value& defaultValue) const { + return get(key.c_str(), key.end_c_str(), defaultValue); +} +#endif + +bool Value::isMember(char const* key, char const* cend) const +{ + Value const* value = find(key, cend); + return NULL != value; +} +bool Value::isMember(char const* key) const +{ + return isMember(key, key + strlen(key)); +} +bool Value::isMember(std::string const& key) const +{ + return isMember(key.data(), key.data() + key.length()); +} + +#ifdef JSON_USE_CPPTL +bool Value::isMember(const CppTL::ConstString& key) const { + return isMember(key.c_str(), key.end_c_str()); +} +#endif + +Value::Members Value::getMemberNames() const { + JSON_ASSERT_MESSAGE( + type_ == nullValue || type_ == objectValue, + "in Json::Value::getMemberNames(), value must be objectValue"); + if (type_ == nullValue) + return Value::Members(); + Members members; + members.reserve(value_.map_->size()); + ObjectValues::const_iterator it = value_.map_->begin(); + ObjectValues::const_iterator itEnd = value_.map_->end(); + for (; it != itEnd; ++it) { + members.push_back(std::string((*it).first.data(), + (*it).first.length())); + } + return members; +} +// +//# ifdef JSON_USE_CPPTL +// EnumMemberNames +// Value::enumMemberNames() const +//{ +// if ( type_ == objectValue ) +// { +// return CppTL::Enum::any( CppTL::Enum::transform( +// CppTL::Enum::keys( *(value_.map_), CppTL::Type() ), +// MemberNamesTransform() ) ); +// } +// return EnumMemberNames(); +//} +// +// +// EnumValues +// Value::enumValues() const +//{ +// if ( type_ == objectValue || type_ == arrayValue ) +// return CppTL::Enum::anyValues( *(value_.map_), +// CppTL::Type() ); +// return EnumValues(); +//} +// +//# endif + +static bool IsIntegral(double d) { + double integral_part; + return modf(d, &integral_part) == 0.0; +} + +bool Value::isNull() const { return type_ == nullValue; } + +bool Value::isBool() const { return type_ == booleanValue; } + +bool Value::isInt() const { + switch (type_) { + case intValue: + return value_.int_ >= minInt && value_.int_ <= maxInt; + case uintValue: + return value_.uint_ <= UInt(maxInt); + case realValue: + return value_.real_ >= minInt && value_.real_ <= maxInt && + IsIntegral(value_.real_); + default: + break; + } + return false; +} + +bool Value::isUInt() const { + switch (type_) { + case intValue: + return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt); + case uintValue: + return value_.uint_ <= maxUInt; + case realValue: + return value_.real_ >= 0 && value_.real_ <= maxUInt && + IsIntegral(value_.real_); + default: + break; + } + return false; +} + +bool Value::isInt64() const { +#if defined(JSON_HAS_INT64) + switch (type_) { + case intValue: + return true; + case uintValue: + return value_.uint_ <= UInt64(maxInt64); + case realValue: + // Note that maxInt64 (= 2^63 - 1) is not exactly representable as a + // double, so double(maxInt64) will be rounded up to 2^63. Therefore we + // require the value to be strictly less than the limit. + return value_.real_ >= double(minInt64) && + value_.real_ < double(maxInt64) && IsIntegral(value_.real_); + default: + break; + } +#endif // JSON_HAS_INT64 + return false; +} + +bool Value::isUInt64() const { +#if defined(JSON_HAS_INT64) + switch (type_) { + case intValue: + return value_.int_ >= 0; + case uintValue: + return true; + case realValue: + // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a + // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we + // require the value to be strictly less than the limit. + return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble && + IsIntegral(value_.real_); + default: + break; + } +#endif // JSON_HAS_INT64 + return false; +} + +bool Value::isIntegral() const { +#if defined(JSON_HAS_INT64) + return isInt64() || isUInt64(); +#else + return isInt() || isUInt(); +#endif +} + +bool Value::isDouble() const { return type_ == realValue || isIntegral(); } + +bool Value::isNumeric() const { return isIntegral() || isDouble(); } + +bool Value::isString() const { return type_ == stringValue; } + +bool Value::isArray() const { return type_ == arrayValue; } + +bool Value::isObject() const { return type_ == objectValue; } + +void Value::setComment(const char* comment, size_t len, CommentPlacement placement) { + if (!comments_) + comments_ = new CommentInfo[numberOfCommentPlacement]; + if ((len > 0) && (comment[len-1] == '\n')) { + // Always discard trailing newline, to aid indentation. + len -= 1; + } + comments_[placement].setComment(comment, len); +} + +void Value::setComment(const char* comment, CommentPlacement placement) { + setComment(comment, strlen(comment), placement); +} + +void Value::setComment(const std::string& comment, CommentPlacement placement) { + setComment(comment.c_str(), comment.length(), placement); +} + +bool Value::hasComment(CommentPlacement placement) const { + return comments_ != 0 && comments_[placement].comment_ != 0; +} + +std::string Value::getComment(CommentPlacement placement) const { + if (hasComment(placement)) + return comments_[placement].comment_; + return ""; +} + +void Value::setOffsetStart(size_t start) { start_ = start; } + +void Value::setOffsetLimit(size_t limit) { limit_ = limit; } + +size_t Value::getOffsetStart() const { return start_; } + +size_t Value::getOffsetLimit() const { return limit_; } + +std::string Value::toStyledString() const { + StyledWriter writer; + return writer.write(*this); +} + +Value::const_iterator Value::begin() const { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return const_iterator(value_.map_->begin()); + break; + default: + break; + } + return const_iterator(); +} + +Value::const_iterator Value::end() const { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return const_iterator(value_.map_->end()); + break; + default: + break; + } + return const_iterator(); +} + +Value::iterator Value::begin() { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return iterator(value_.map_->begin()); + break; + default: + break; + } + return iterator(); +} + +Value::iterator Value::end() { + switch (type_) { + case arrayValue: + case objectValue: + if (value_.map_) + return iterator(value_.map_->end()); + break; + default: + break; + } + return iterator(); +} + +// class PathArgument +// ////////////////////////////////////////////////////////////////// + +PathArgument::PathArgument() : key_(), index_(), kind_(kindNone) {} + +PathArgument::PathArgument(ArrayIndex index) + : key_(), index_(index), kind_(kindIndex) {} + +PathArgument::PathArgument(const char* key) + : key_(key), index_(), kind_(kindKey) {} + +PathArgument::PathArgument(const std::string& key) + : key_(key.c_str()), index_(), kind_(kindKey) {} + +// class Path +// ////////////////////////////////////////////////////////////////// + +Path::Path(const std::string& path, + const PathArgument& a1, + const PathArgument& a2, + const PathArgument& a3, + const PathArgument& a4, + const PathArgument& a5) { + InArgs in; + in.push_back(&a1); + in.push_back(&a2); + in.push_back(&a3); + in.push_back(&a4); + in.push_back(&a5); + makePath(path, in); +} + +void Path::makePath(const std::string& path, const InArgs& in) { + const char* current = path.c_str(); + const char* end = current + path.length(); + InArgs::const_iterator itInArg = in.begin(); + while (current != end) { + if (*current == '[') { + ++current; + if (*current == '%') + addPathInArg(path, in, itInArg, PathArgument::kindIndex); + else { + ArrayIndex index = 0; + for (; current != end && *current >= '0' && *current <= '9'; ++current) + index = index * 10 + ArrayIndex(*current - '0'); + args_.push_back(index); + } + if (current == end || *current++ != ']') + invalidPath(path, int(current - path.c_str())); + } else if (*current == '%') { + addPathInArg(path, in, itInArg, PathArgument::kindKey); + ++current; + } else if (*current == '.') { + ++current; + } else { + const char* beginName = current; + while (current != end && !strchr("[.", *current)) + ++current; + args_.push_back(std::string(beginName, current)); + } + } +} + +void Path::addPathInArg(const std::string& /*path*/, + const InArgs& in, + InArgs::const_iterator& itInArg, + PathArgument::Kind kind) { + if (itInArg == in.end()) { + // Error: missing argument %d + } else if ((*itInArg)->kind_ != kind) { + // Error: bad argument type + } else { + args_.push_back(**itInArg); + } +} + +void Path::invalidPath(const std::string& /*path*/, int /*location*/) { + // Error: invalid path. +} + +const Value& Path::resolve(const Value& root) const { + const Value* node = &root; + for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) { + const PathArgument& arg = *it; + if (arg.kind_ == PathArgument::kindIndex) { + if (!node->isArray() || !node->isValidIndex(arg.index_)) { + // Error: unable to resolve path (array value expected at position... + } + node = &((*node)[arg.index_]); + } else if (arg.kind_ == PathArgument::kindKey) { + if (!node->isObject()) { + // Error: unable to resolve path (object value expected at position...) + } + node = &((*node)[arg.key_]); + if (node == &Value::nullRef) { + // Error: unable to resolve path (object has no member named '' at + // position...) + } + } + } + return *node; +} + +Value Path::resolve(const Value& root, const Value& defaultValue) const { + const Value* node = &root; + for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) { + const PathArgument& arg = *it; + if (arg.kind_ == PathArgument::kindIndex) { + if (!node->isArray() || !node->isValidIndex(arg.index_)) + return defaultValue; + node = &((*node)[arg.index_]); + } else if (arg.kind_ == PathArgument::kindKey) { + if (!node->isObject()) + return defaultValue; + node = &((*node)[arg.key_]); + if (node == &Value::nullRef) + return defaultValue; + } + } + return *node; +} + +Value& Path::make(Value& root) const { + Value* node = &root; + for (Args::const_iterator it = args_.begin(); it != args_.end(); ++it) { + const PathArgument& arg = *it; + if (arg.kind_ == PathArgument::kindIndex) { + if (!node->isArray()) { + // Error: node is not an array at position ... + } + node = &((*node)[arg.index_]); + } else if (arg.kind_ == PathArgument::kindKey) { + if (!node->isObject()) { + // Error: node is not an object at position... + } + node = &((*node)[arg.key_]); + } + } + return *node; +} + +} // namespace Json + +#pragma warning (pop) + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_value.cpp +// ////////////////////////////////////////////////////////////////////// + + + + + + +// ////////////////////////////////////////////////////////////////////// +// Beginning of content of file: src/lib_json/json_writer.cpp +// ////////////////////////////////////////////////////////////////////// + +// Copyright 2011 Baptiste Lepilleur +// Distributed under MIT license, or public domain if desired and +// recognized in your jurisdiction. +// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE + +#if !defined(JSON_IS_AMALGAMATION) +#include +#include "json_tool.h" +#endif // if !defined(JSON_IS_AMALGAMATION) +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1800 // Between VC++ 6.0 and VC++ 11.0 +#include +#define isfinite _finite +#elif defined(__sun) && defined(__SVR4) //Solaris +#if !defined(isfinite) +#include +#define isfinite finite +#endif +#elif defined(_AIX) +#if !defined(isfinite) +#include +#define isfinite finite +#endif +#elif defined(__hpux) +#if !defined(isfinite) +#if defined(__ia64) && !defined(finite) +#define isfinite(x) ((sizeof(x) == sizeof(float) ? \ + _Isfinitef(x) : _IsFinite(x))) +#else +#include +#define isfinite finite +#endif +#endif +#else +#include +#if !(defined(__QNXNTO__)) // QNX already defines isfinite +#define isfinite std::isfinite +#endif +#endif + +#if defined(_MSC_VER) +#if !defined(WINCE) && defined(__STDC_SECURE_LIB__) && _MSC_VER >= 1500 // VC++ 9.0 and above +#define snprintf sprintf_s +#elif _MSC_VER >= 1900 // VC++ 14.0 and above +#define snprintf std::snprintf +#else +#define snprintf _snprintf +#endif +#elif defined(__ANDROID__) || defined(__QNXNTO__) +#define snprintf snprintf +#elif __cplusplus >= 201103L +#define snprintf std::snprintf +#endif + +#if defined(__BORLANDC__) +#include +#define isfinite _finite +#define snprintf _snprintf +#endif + +#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 +// Disable warning about strdup being deprecated. +#pragma warning(disable : 4996) +#endif + +namespace Json { + +#if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520) +typedef std::unique_ptr StreamWriterPtr; +#else +typedef std::auto_ptr StreamWriterPtr; +#endif + +static bool containsControlCharacter(const char* str) { + while (*str) { + if (isControlCharacter(*(str++))) + return true; + } + return false; +} + +static bool containsControlCharacter0(const char* str, unsigned len) { + char const* end = str + len; + while (end != str) { + if (isControlCharacter(*str) || 0==*str) + return true; + ++str; + } + return false; +} + +std::string valueToString(LargestInt value) { + UIntToStringBuffer buffer; + char* current = buffer + sizeof(buffer); + if (value == Value::minLargestInt) { + uintToString(LargestUInt(Value::maxLargestInt) + 1, current); + *--current = '-'; + } else if (value < 0) { + uintToString(LargestUInt(-value), current); + *--current = '-'; + } else { + uintToString(LargestUInt(value), current); + } + assert(current >= buffer); + return current; +} + +std::string valueToString(LargestUInt value) { + UIntToStringBuffer buffer; + char* current = buffer + sizeof(buffer); + uintToString(value, current); + assert(current >= buffer); + return current; +} + +#if defined(JSON_HAS_INT64) + +std::string valueToString(Int value) { + return valueToString(LargestInt(value)); +} + +std::string valueToString(UInt value) { + return valueToString(LargestUInt(value)); +} + +#endif // # if defined(JSON_HAS_INT64) + +std::string valueToString(double value, bool useSpecialFloats, unsigned int precision) { + // Allocate a buffer that is more than large enough to store the 16 digits of + // precision requested below. + char buffer[32]; + int len = -1; + + char formatString[6]; + sprintf(formatString, "%%.%dg", precision); + + // Print into the buffer. We need not request the alternative representation + // that always has a decimal point because JSON doesn't distingish the + // concepts of reals and integers. + if (isfinite(value)) { + len = snprintf(buffer, sizeof(buffer), formatString, value); + } else { + // IEEE standard states that NaN values will not compare to themselves + if (value != value) { + len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "NaN" : "null"); + } else if (value < 0) { + len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "-Infinity" : "-1e+9999"); + } else { + len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "Infinity" : "1e+9999"); + } + // For those, we do not need to call fixNumLoc, but it is fast. + } + assert(len >= 0); + fixNumericLocale(buffer, buffer + len); + return buffer; +} + +std::string valueToString(double value) { return valueToString(value, false, 17); } + +std::string valueToString(bool value) { return value ? "true" : "false"; } + +std::string valueToQuotedString(const char* value) { + if (value == NULL) + return ""; + // Not sure how to handle unicode... + if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && + !containsControlCharacter(value)) + return std::string("\"") + value + "\""; + // We have to walk value and escape any special characters. + // Appending to std::string is not efficient, but this should be rare. + // (Note: forward slashes are *not* rare, but I am not escaping them.) + std::string::size_type maxsize = + strlen(value) * 2 + 3; // allescaped+quotes+NULL + std::string result; + result.reserve(maxsize); // to avoid lots of mallocs + result += "\""; + for (const char* c = value; *c != 0; ++c) { + switch (*c) { + case '\"': + result += "\\\""; + break; + case '\\': + result += "\\\\"; + break; + case '\b': + result += "\\b"; + break; + case '\f': + result += "\\f"; + break; + case '\n': + result += "\\n"; + break; + case '\r': + result += "\\r"; + break; + case '\t': + result += "\\t"; + break; + // case '/': + // Even though \/ is considered a legal escape in JSON, a bare + // slash is also legal, so I see no reason to escape it. + // (I hope I am not misunderstanding something. + // blep notes: actually escaping \/ may be useful in javascript to avoid (*c); + result += oss.str(); + } else { + result += *c; + } + break; + } + } + result += "\""; + return result; +} + +// https://github.com/upcaste/upcaste/blob/master/src/upcore/src/cstring/strnpbrk.cpp +static char const* strnpbrk(char const* s, char const* accept, size_t n) { + assert((s || !n) && accept); + + char const* const end = s + n; + for (char const* cur = s; cur < end; ++cur) { + int const c = *cur; + for (char const* a = accept; *a; ++a) { + if (*a == c) { + return cur; + } + } + } + return NULL; +} +static std::string valueToQuotedStringN(const char* value, unsigned length) { + if (value == NULL) + return ""; + // Not sure how to handle unicode... + if (strnpbrk(value, "\"\\\b\f\n\r\t", length) == NULL && + !containsControlCharacter0(value, length)) + return std::string("\"") + value + "\""; + // We have to walk value and escape any special characters. + // Appending to std::string is not efficient, but this should be rare. + // (Note: forward slashes are *not* rare, but I am not escaping them.) + std::string::size_type maxsize = + length * 2 + 3; // allescaped+quotes+NULL + std::string result; + result.reserve(maxsize); // to avoid lots of mallocs + result += "\""; + char const* end = value + length; + for (const char* c = value; c != end; ++c) { + switch (*c) { + case '\"': + result += "\\\""; + break; + case '\\': + result += "\\\\"; + break; + case '\b': + result += "\\b"; + break; + case '\f': + result += "\\f"; + break; + case '\n': + result += "\\n"; + break; + case '\r': + result += "\\r"; + break; + case '\t': + result += "\\t"; + break; + // case '/': + // Even though \/ is considered a legal escape in JSON, a bare + // slash is also legal, so I see no reason to escape it. + // (I hope I am not misunderstanding something.) + // blep notes: actually escaping \/ may be useful in javascript to avoid (*c); + result += oss.str(); + } else { + result += *c; + } + break; + } + } + result += "\""; + return result; +} + +// Class Writer +// ////////////////////////////////////////////////////////////////// +Writer::~Writer() {} + +// Class FastWriter +// ////////////////////////////////////////////////////////////////// + +FastWriter::FastWriter() + : yamlCompatiblityEnabled_(false), dropNullPlaceholders_(false), + omitEndingLineFeed_(false) {} + +void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; } + +void FastWriter::dropNullPlaceholders() { dropNullPlaceholders_ = true; } + +void FastWriter::omitEndingLineFeed() { omitEndingLineFeed_ = true; } + +std::string FastWriter::write(const Value& root) { + document_ = ""; + writeValue(root); + if (!omitEndingLineFeed_) + document_ += "\n"; + return document_; +} + +void FastWriter::writeValue(const Value& value) { + switch (value.type()) { + case nullValue: + if (!dropNullPlaceholders_) + document_ += "null"; + break; + case intValue: + document_ += valueToString(value.asLargestInt()); + break; + case uintValue: + document_ += valueToString(value.asLargestUInt()); + break; + case realValue: + document_ += valueToString(value.asDouble()); + break; + case stringValue: + { + // Is NULL possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) document_ += valueToQuotedStringN(str, static_cast(end-str)); + break; + } + case booleanValue: + document_ += valueToString(value.asBool()); + break; + case arrayValue: { + document_ += '['; + int size = value.size(); + for (int index = 0; index < size; ++index) { + if (index > 0) + document_ += ','; + writeValue(value[index]); + } + document_ += ']'; + } break; + case objectValue: { + Value::Members members(value.getMemberNames()); + document_ += '{'; + for (Value::Members::iterator it = members.begin(); it != members.end(); + ++it) { + const std::string& name = *it; + if (it != members.begin()) + document_ += ','; + document_ += valueToQuotedStringN(name.data(), static_cast(name.length())); + document_ += yamlCompatiblityEnabled_ ? ": " : ":"; + writeValue(value[name]); + } + document_ += '}'; + } break; + } +} + +// Class StyledWriter +// ////////////////////////////////////////////////////////////////// + +StyledWriter::StyledWriter() + : rightMargin_(74), indentSize_(3), addChildValues_() {} + +std::string StyledWriter::write(const Value& root) { + document_ = ""; + addChildValues_ = false; + indentString_ = ""; + writeCommentBeforeValue(root); + writeValue(root); + writeCommentAfterValueOnSameLine(root); + document_ += "\n"; + return document_; +} + +void StyledWriter::writeValue(const Value& value) { + switch (value.type()) { + case nullValue: + pushValue("null"); + break; + case intValue: + pushValue(valueToString(value.asLargestInt())); + break; + case uintValue: + pushValue(valueToString(value.asLargestUInt())); + break; + case realValue: + pushValue(valueToString(value.asDouble())); + break; + case stringValue: + { + // Is NULL possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str))); + else pushValue(""); + break; + } + case booleanValue: + pushValue(valueToString(value.asBool())); + break; + case arrayValue: + writeArrayValue(value); + break; + case objectValue: { + Value::Members members(value.getMemberNames()); + if (members.empty()) + pushValue("{}"); + else { + writeWithIndent("{"); + indent(); + Value::Members::iterator it = members.begin(); + for (;;) { + const std::string& name = *it; + const Value& childValue = value[name]; + writeCommentBeforeValue(childValue); + writeWithIndent(valueToQuotedString(name.c_str())); + document_ += " : "; + writeValue(childValue); + if (++it == members.end()) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + document_ += ','; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("}"); + } + } break; + } +} + +void StyledWriter::writeArrayValue(const Value& value) { + unsigned size = value.size(); + if (size == 0) + pushValue("[]"); + else { + bool isArrayMultiLine = isMultineArray(value); + if (isArrayMultiLine) { + writeWithIndent("["); + indent(); + bool hasChildValue = !childValues_.empty(); + unsigned index = 0; + for (;;) { + const Value& childValue = value[index]; + writeCommentBeforeValue(childValue); + if (hasChildValue) + writeWithIndent(childValues_[index]); + else { + writeIndent(); + writeValue(childValue); + } + if (++index == size) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + document_ += ','; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("]"); + } else // output on a single line + { + assert(childValues_.size() == size); + document_ += "[ "; + for (unsigned index = 0; index < size; ++index) { + if (index > 0) + document_ += ", "; + document_ += childValues_[index]; + } + document_ += " ]"; + } + } +} + +bool StyledWriter::isMultineArray(const Value& value) { + int size = value.size(); + bool isMultiLine = size * 3 >= rightMargin_; + childValues_.clear(); + for (int index = 0; index < size && !isMultiLine; ++index) { + const Value& childValue = value[index]; + isMultiLine = ((childValue.isArray() || childValue.isObject()) && + childValue.size() > 0); + } + if (!isMultiLine) // check if line length > max line length + { + childValues_.reserve(size); + addChildValues_ = true; + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { + if (hasCommentForValue(value[index])) { + isMultiLine = true; + } + writeValue(value[index]); + lineLength += int(childValues_[index].length()); + } + addChildValues_ = false; + isMultiLine = isMultiLine || lineLength >= rightMargin_; + } + return isMultiLine; +} + +void StyledWriter::pushValue(const std::string& value) { + if (addChildValues_) + childValues_.push_back(value); + else + document_ += value; +} + +void StyledWriter::writeIndent() { + if (!document_.empty()) { + char last = document_[document_.length() - 1]; + if (last == ' ') // already indented + return; + if (last != '\n') // Comments may add new-line + document_ += '\n'; + } + document_ += indentString_; +} + +void StyledWriter::writeWithIndent(const std::string& value) { + writeIndent(); + document_ += value; +} + +void StyledWriter::indent() { indentString_ += std::string(indentSize_, ' '); } + +void StyledWriter::unindent() { + assert(int(indentString_.size()) >= indentSize_); + indentString_.resize(indentString_.size() - indentSize_); +} + +void StyledWriter::writeCommentBeforeValue(const Value& root) { + if (!root.hasComment(commentBefore)) + return; + + document_ += "\n"; + writeIndent(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); + while (iter != comment.end()) { + document_ += *iter; + if (*iter == '\n' && + (iter != comment.end() && *(iter + 1) == '/')) + writeIndent(); + ++iter; + } + + // Comments are stripped of trailing newlines, so add one here + document_ += "\n"; +} + +void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) { + if (root.hasComment(commentAfterOnSameLine)) + document_ += " " + root.getComment(commentAfterOnSameLine); + + if (root.hasComment(commentAfter)) { + document_ += "\n"; + document_ += root.getComment(commentAfter); + document_ += "\n"; + } +} + +bool StyledWriter::hasCommentForValue(const Value& value) { + return value.hasComment(commentBefore) || + value.hasComment(commentAfterOnSameLine) || + value.hasComment(commentAfter); +} + +// Class StyledStreamWriter +// ////////////////////////////////////////////////////////////////// + +StyledStreamWriter::StyledStreamWriter(std::string indentation) + : document_(NULL), rightMargin_(74), indentation_(indentation), + addChildValues_() {} + +void StyledStreamWriter::write(std::ostream& out, const Value& root) { + document_ = &out; + addChildValues_ = false; + indentString_ = ""; + indented_ = true; + writeCommentBeforeValue(root); + if (!indented_) writeIndent(); + indented_ = true; + writeValue(root); + writeCommentAfterValueOnSameLine(root); + *document_ << "\n"; + document_ = NULL; // Forget the stream, for safety. +} + +void StyledStreamWriter::writeValue(const Value& value) { + switch (value.type()) { + case nullValue: + pushValue("null"); + break; + case intValue: + pushValue(valueToString(value.asLargestInt())); + break; + case uintValue: + pushValue(valueToString(value.asLargestUInt())); + break; + case realValue: + pushValue(valueToString(value.asDouble())); + break; + case stringValue: + { + // Is NULL possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str))); + else pushValue(""); + break; + } + case booleanValue: + pushValue(valueToString(value.asBool())); + break; + case arrayValue: + writeArrayValue(value); + break; + case objectValue: { + Value::Members members(value.getMemberNames()); + if (members.empty()) + pushValue("{}"); + else { + writeWithIndent("{"); + indent(); + Value::Members::iterator it = members.begin(); + for (;;) { + const std::string& name = *it; + const Value& childValue = value[name]; + writeCommentBeforeValue(childValue); + writeWithIndent(valueToQuotedString(name.c_str())); + *document_ << " : "; + writeValue(childValue); + if (++it == members.end()) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *document_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("}"); + } + } break; + } +} + +void StyledStreamWriter::writeArrayValue(const Value& value) { + unsigned size = value.size(); + if (size == 0) + pushValue("[]"); + else { + bool isArrayMultiLine = isMultineArray(value); + if (isArrayMultiLine) { + writeWithIndent("["); + indent(); + bool hasChildValue = !childValues_.empty(); + unsigned index = 0; + for (;;) { + const Value& childValue = value[index]; + writeCommentBeforeValue(childValue); + if (hasChildValue) + writeWithIndent(childValues_[index]); + else { + if (!indented_) writeIndent(); + indented_ = true; + writeValue(childValue); + indented_ = false; + } + if (++index == size) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *document_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("]"); + } else // output on a single line + { + assert(childValues_.size() == size); + *document_ << "[ "; + for (unsigned index = 0; index < size; ++index) { + if (index > 0) + *document_ << ", "; + *document_ << childValues_[index]; + } + *document_ << " ]"; + } + } +} + +bool StyledStreamWriter::isMultineArray(const Value& value) { + int size = value.size(); + bool isMultiLine = size * 3 >= rightMargin_; + childValues_.clear(); + for (int index = 0; index < size && !isMultiLine; ++index) { + const Value& childValue = value[index]; + isMultiLine = ((childValue.isArray() || childValue.isObject()) && + childValue.size() > 0); + } + if (!isMultiLine) // check if line length > max line length + { + childValues_.reserve(size); + addChildValues_ = true; + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { + if (hasCommentForValue(value[index])) { + isMultiLine = true; + } + writeValue(value[index]); + lineLength += int(childValues_[index].length()); + } + addChildValues_ = false; + isMultiLine = isMultiLine || lineLength >= rightMargin_; + } + return isMultiLine; +} + +void StyledStreamWriter::pushValue(const std::string& value) { + if (addChildValues_) + childValues_.push_back(value); + else + *document_ << value; +} + +void StyledStreamWriter::writeIndent() { + // blep intended this to look at the so-far-written string + // to determine whether we are already indented, but + // with a stream we cannot do that. So we rely on some saved state. + // The caller checks indented_. + *document_ << '\n' << indentString_; +} + +void StyledStreamWriter::writeWithIndent(const std::string& value) { + if (!indented_) writeIndent(); + *document_ << value; + indented_ = false; +} + +void StyledStreamWriter::indent() { indentString_ += indentation_; } + +void StyledStreamWriter::unindent() { + assert(indentString_.size() >= indentation_.size()); + indentString_.resize(indentString_.size() - indentation_.size()); +} + +void StyledStreamWriter::writeCommentBeforeValue(const Value& root) { + if (!root.hasComment(commentBefore)) + return; + + if (!indented_) writeIndent(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); + while (iter != comment.end()) { + *document_ << *iter; + if (*iter == '\n' && + (iter != comment.end() && *(iter + 1) == '/')) + // writeIndent(); // would include newline + *document_ << indentString_; + ++iter; + } + indented_ = false; +} + +void StyledStreamWriter::writeCommentAfterValueOnSameLine(const Value& root) { + if (root.hasComment(commentAfterOnSameLine)) + *document_ << ' ' << root.getComment(commentAfterOnSameLine); + + if (root.hasComment(commentAfter)) { + writeIndent(); + *document_ << root.getComment(commentAfter); + } + indented_ = false; +} + +bool StyledStreamWriter::hasCommentForValue(const Value& value) { + return value.hasComment(commentBefore) || + value.hasComment(commentAfterOnSameLine) || + value.hasComment(commentAfter); +} + +////////////////////////// +// BuiltStyledStreamWriter + +/// Scoped enums are not available until C++11. +struct CommentStyle { + /// Decide whether to write comments. + enum Enum { + None, ///< Drop all comments. + Most, ///< Recover odd behavior of previous versions (not implemented yet). + All ///< Keep all comments. + }; +}; + +struct BuiltStyledStreamWriter : public StreamWriter +{ + BuiltStyledStreamWriter( + std::string const& indentation, + CommentStyle::Enum cs, + std::string const& colonSymbol, + std::string const& nullSymbol, + std::string const& endingLineFeedSymbol, + bool useSpecialFloats, + unsigned int precision); + int write(Value const& root, std::ostream* sout); +private: + void writeValue(Value const& value); + void writeArrayValue(Value const& value); + bool isMultineArray(Value const& value); + void pushValue(std::string const& value); + void writeIndent(); + void writeWithIndent(std::string const& value); + void indent(); + void unindent(); + void writeCommentBeforeValue(Value const& root); + void writeCommentAfterValueOnSameLine(Value const& root); + static bool hasCommentForValue(const Value& value); + + typedef std::vector ChildValues; + + ChildValues childValues_; + std::string indentString_; + int rightMargin_; + std::string indentation_; + CommentStyle::Enum cs_; + std::string colonSymbol_; + std::string nullSymbol_; + std::string endingLineFeedSymbol_; + bool addChildValues_ : 1; + bool indented_ : 1; + bool useSpecialFloats_ : 1; + unsigned int precision_; +}; +BuiltStyledStreamWriter::BuiltStyledStreamWriter( + std::string const& indentation, + CommentStyle::Enum cs, + std::string const& colonSymbol, + std::string const& nullSymbol, + std::string const& endingLineFeedSymbol, + bool useSpecialFloats, + unsigned int precision) + : rightMargin_(74) + , indentation_(indentation) + , cs_(cs) + , colonSymbol_(colonSymbol) + , nullSymbol_(nullSymbol) + , endingLineFeedSymbol_(endingLineFeedSymbol) + , addChildValues_(false) + , indented_(false) + , useSpecialFloats_(useSpecialFloats) + , precision_(precision) +{ +} +int BuiltStyledStreamWriter::write(Value const& root, std::ostream* sout) +{ + sout_ = sout; + addChildValues_ = false; + indented_ = true; + indentString_ = ""; + writeCommentBeforeValue(root); + if (!indented_) writeIndent(); + indented_ = true; + writeValue(root); + writeCommentAfterValueOnSameLine(root); + *sout_ << endingLineFeedSymbol_; + sout_ = NULL; + return 0; +} +void BuiltStyledStreamWriter::writeValue(Value const& value) { + switch (value.type()) { + case nullValue: + pushValue(nullSymbol_); + break; + case intValue: + pushValue(valueToString(value.asLargestInt())); + break; + case uintValue: + pushValue(valueToString(value.asLargestUInt())); + break; + case realValue: + pushValue(valueToString(value.asDouble(), useSpecialFloats_, precision_)); + break; + case stringValue: + { + // Is NULL is possible for value.string_? + char const* str; + char const* end; + bool ok = value.getString(&str, &end); + if (ok) pushValue(valueToQuotedStringN(str, static_cast(end-str))); + else pushValue(""); + break; + } + case booleanValue: + pushValue(valueToString(value.asBool())); + break; + case arrayValue: + writeArrayValue(value); + break; + case objectValue: { + Value::Members members(value.getMemberNames()); + if (members.empty()) + pushValue("{}"); + else { + writeWithIndent("{"); + indent(); + Value::Members::iterator it = members.begin(); + for (;;) { + std::string const& name = *it; + Value const& childValue = value[name]; + writeCommentBeforeValue(childValue); + writeWithIndent(valueToQuotedStringN(name.data(), static_cast(name.length()))); + *sout_ << colonSymbol_; + writeValue(childValue); + if (++it == members.end()) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *sout_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("}"); + } + } break; + } +} + +void BuiltStyledStreamWriter::writeArrayValue(Value const& value) { + unsigned size = value.size(); + if (size == 0) + pushValue("[]"); + else { + bool isMultiLine = (cs_ == CommentStyle::All) || isMultineArray(value); + if (isMultiLine) { + writeWithIndent("["); + indent(); + bool hasChildValue = !childValues_.empty(); + unsigned index = 0; + for (;;) { + Value const& childValue = value[index]; + writeCommentBeforeValue(childValue); + if (hasChildValue) + writeWithIndent(childValues_[index]); + else { + if (!indented_) writeIndent(); + indented_ = true; + writeValue(childValue); + indented_ = false; + } + if (++index == size) { + writeCommentAfterValueOnSameLine(childValue); + break; + } + *sout_ << ","; + writeCommentAfterValueOnSameLine(childValue); + } + unindent(); + writeWithIndent("]"); + } else // output on a single line + { + assert(childValues_.size() == size); + *sout_ << "["; + if (!indentation_.empty()) *sout_ << " "; + for (unsigned index = 0; index < size; ++index) { + if (index > 0) + *sout_ << ", "; + *sout_ << childValues_[index]; + } + if (!indentation_.empty()) *sout_ << " "; + *sout_ << "]"; + } + } +} + +bool BuiltStyledStreamWriter::isMultineArray(Value const& value) { + int size = value.size(); + bool isMultiLine = size * 3 >= rightMargin_; + childValues_.clear(); + for (int index = 0; index < size && !isMultiLine; ++index) { + Value const& childValue = value[index]; + isMultiLine = ((childValue.isArray() || childValue.isObject()) && + childValue.size() > 0); + } + if (!isMultiLine) // check if line length > max line length + { + childValues_.reserve(size); + addChildValues_ = true; + int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]' + for (int index = 0; index < size; ++index) { + if (hasCommentForValue(value[index])) { + isMultiLine = true; + } + writeValue(value[index]); + lineLength += int(childValues_[index].length()); + } + addChildValues_ = false; + isMultiLine = isMultiLine || lineLength >= rightMargin_; + } + return isMultiLine; +} + +void BuiltStyledStreamWriter::pushValue(std::string const& value) { + if (addChildValues_) + childValues_.push_back(value); + else + *sout_ << value; +} + +void BuiltStyledStreamWriter::writeIndent() { + // blep intended this to look at the so-far-written string + // to determine whether we are already indented, but + // with a stream we cannot do that. So we rely on some saved state. + // The caller checks indented_. + + if (!indentation_.empty()) { + // In this case, drop newlines too. + *sout_ << '\n' << indentString_; + } +} + +void BuiltStyledStreamWriter::writeWithIndent(std::string const& value) { + if (!indented_) writeIndent(); + *sout_ << value; + indented_ = false; +} + +void BuiltStyledStreamWriter::indent() { indentString_ += indentation_; } + +void BuiltStyledStreamWriter::unindent() { + assert(indentString_.size() >= indentation_.size()); + indentString_.resize(indentString_.size() - indentation_.size()); +} + +void BuiltStyledStreamWriter::writeCommentBeforeValue(Value const& root) { + if (cs_ == CommentStyle::None) return; + if (!root.hasComment(commentBefore)) + return; + + if (!indented_) writeIndent(); + const std::string& comment = root.getComment(commentBefore); + std::string::const_iterator iter = comment.begin(); + while (iter != comment.end()) { + *sout_ << *iter; + if (*iter == '\n' && + (iter != comment.end() && *(iter + 1) == '/')) + // writeIndent(); // would write extra newline + *sout_ << indentString_; + ++iter; + } + indented_ = false; +} + +void BuiltStyledStreamWriter::writeCommentAfterValueOnSameLine(Value const& root) { + if (cs_ == CommentStyle::None) return; + if (root.hasComment(commentAfterOnSameLine)) + *sout_ << " " + root.getComment(commentAfterOnSameLine); + + if (root.hasComment(commentAfter)) { + writeIndent(); + *sout_ << root.getComment(commentAfter); + } +} + +// static +bool BuiltStyledStreamWriter::hasCommentForValue(const Value& value) { + return value.hasComment(commentBefore) || + value.hasComment(commentAfterOnSameLine) || + value.hasComment(commentAfter); +} + +/////////////// +// StreamWriter + +StreamWriter::StreamWriter() + : sout_(NULL) +{ +} +StreamWriter::~StreamWriter() +{ +} +StreamWriter::Factory::~Factory() +{} +StreamWriterBuilder::StreamWriterBuilder() +{ + setDefaults(&settings_); +} +StreamWriterBuilder::~StreamWriterBuilder() +{} +StreamWriter* StreamWriterBuilder::newStreamWriter() const +{ + std::string indentation = settings_["indentation"].asString(); + std::string cs_str = settings_["commentStyle"].asString(); + bool eyc = settings_["enableYAMLCompatibility"].asBool(); + bool dnp = settings_["dropNullPlaceholders"].asBool(); + bool usf = settings_["useSpecialFloats"].asBool(); + unsigned int pre = settings_["precision"].asUInt(); + CommentStyle::Enum cs = CommentStyle::All; + if (cs_str == "All") { + cs = CommentStyle::All; + } else if (cs_str == "None") { + cs = CommentStyle::None; + } else { + throwRuntimeError("commentStyle must be 'All' or 'None'"); + } + std::string colonSymbol = " : "; + if (eyc) { + colonSymbol = ": "; + } else if (indentation.empty()) { + colonSymbol = ":"; + } + std::string nullSymbol = "null"; + if (dnp) { + nullSymbol = ""; + } + if (pre > 17) pre = 17; + std::string endingLineFeedSymbol = ""; + return new BuiltStyledStreamWriter( + indentation, cs, + colonSymbol, nullSymbol, endingLineFeedSymbol, usf, pre); +} +static void getValidWriterKeys(std::set* valid_keys) +{ + valid_keys->clear(); + valid_keys->insert("indentation"); + valid_keys->insert("commentStyle"); + valid_keys->insert("enableYAMLCompatibility"); + valid_keys->insert("dropNullPlaceholders"); + valid_keys->insert("useSpecialFloats"); + valid_keys->insert("precision"); +} +bool StreamWriterBuilder::validate(Json::Value* invalid) const +{ + Json::Value my_invalid; + if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL + Json::Value& inv = *invalid; + std::set valid_keys; + getValidWriterKeys(&valid_keys); + Value::Members keys = settings_.getMemberNames(); + size_t n = keys.size(); + for (size_t i = 0; i < n; ++i) { + std::string const& key = keys[i]; + if (valid_keys.find(key) == valid_keys.end()) { + inv[key] = settings_[key]; + } + } + return 0u == inv.size(); +} +Value& StreamWriterBuilder::operator[](std::string key) +{ + return settings_[key]; +} +// static +void StreamWriterBuilder::setDefaults(Json::Value* settings) +{ + //! [StreamWriterBuilderDefaults] + (*settings)["commentStyle"] = "All"; + (*settings)["indentation"] = "\t"; + (*settings)["enableYAMLCompatibility"] = false; + (*settings)["dropNullPlaceholders"] = false; + (*settings)["useSpecialFloats"] = false; + (*settings)["precision"] = 17; + //! [StreamWriterBuilderDefaults] +} + +std::string writeString(StreamWriter::Factory const& builder, Value const& root) { + std::ostringstream sout; + StreamWriterPtr const writer(builder.newStreamWriter()); + writer->write(root, &sout); + return sout.str(); +} + +std::ostream& operator<<(std::ostream& sout, Value const& root) { + StreamWriterBuilder builder; + StreamWriterPtr const writer(builder.newStreamWriter()); + writer->write(root, &sout); + return sout; +} + +} // namespace Json + +// ////////////////////////////////////////////////////////////////////// +// End of content of file: src/lib_json/json_writer.cpp +// ////////////////////////////////////////////////////////////////////// + + + + + diff --git a/vrclient_x64/vrclient_x64/struct_converters.h b/vrclient_x64/vrclient_x64/struct_converters.h index 63ffc97bf5..05cc09c22e 100644 --- a/vrclient_x64/vrclient_x64/struct_converters.h +++ b/vrclient_x64/vrclient_x64/struct_converters.h @@ -1,3 +1,65 @@ +typedef struct winVREvent_t_11030 winVREvent_t_11030; +extern void struct_VREvent_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_VREvent_t_11030_win_to_lin(void *w, void *l); +typedef struct winVRControllerState001_t_11030 winVRControllerState001_t_11030; +extern void struct_VRControllerState001_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_VRControllerState001_t_11030_win_to_lin(void *w, void *l); +typedef struct winCameraVideoStreamFrameHeader_t_11030 winCameraVideoStreamFrameHeader_t_11030; +extern void struct_CameraVideoStreamFrameHeader_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_CameraVideoStreamFrameHeader_t_11030_win_to_lin(void *w, void *l); +typedef struct winRenderModel_TextureMap_t_11030 winRenderModel_TextureMap_t_11030; +extern void struct_RenderModel_TextureMap_t_11030_lin_to_win(void *l, void *w); +extern void struct_RenderModel_TextureMap_t_11030_win_to_lin(void *w, void *l); +extern struct winRenderModel_TextureMap_t_11030 *struct_RenderModel_TextureMap_t_11030_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_11030_unwrap(winRenderModel_TextureMap_t_11030 *w); +typedef struct winRenderModel_t_11030 winRenderModel_t_11030; +extern void struct_RenderModel_t_11030_lin_to_win(void *l, void *w); +extern void struct_RenderModel_t_11030_win_to_lin(void *w, void *l); +extern struct winRenderModel_t_11030 *struct_RenderModel_t_11030_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_11030_unwrap(winRenderModel_t_11030 *w); +typedef struct winInputAnalogActionData_t_11030 winInputAnalogActionData_t_11030; +extern void struct_InputAnalogActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputAnalogActionData_t_11030_win_to_lin(void *w, void *l); +typedef struct winInputDigitalActionData_t_11030 winInputDigitalActionData_t_11030; +extern void struct_InputDigitalActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputDigitalActionData_t_11030_win_to_lin(void *w, void *l); +typedef struct winInputPoseActionData_t_11030 winInputPoseActionData_t_11030; +extern void struct_InputPoseActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputPoseActionData_t_11030_win_to_lin(void *w, void *l); +typedef struct winInputSkeletalActionData_t_11030 winInputSkeletalActionData_t_11030; +extern void struct_InputSkeletalActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputSkeletalActionData_t_11030_win_to_lin(void *w, void *l); +typedef struct winVREvent_t_1916 winVREvent_t_1916; +extern void struct_VREvent_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_VREvent_t_1916_win_to_lin(void *w, void *l); +typedef struct winVRControllerState001_t_1916 winVRControllerState001_t_1916; +extern void struct_VRControllerState001_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_VRControllerState001_t_1916_win_to_lin(void *w, void *l); +typedef struct winCameraVideoStreamFrameHeader_t_1916 winCameraVideoStreamFrameHeader_t_1916; +extern void struct_CameraVideoStreamFrameHeader_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_CameraVideoStreamFrameHeader_t_1916_win_to_lin(void *w, void *l); +typedef struct winRenderModel_TextureMap_t_1916 winRenderModel_TextureMap_t_1916; +extern void struct_RenderModel_TextureMap_t_1916_lin_to_win(void *l, void *w); +extern void struct_RenderModel_TextureMap_t_1916_win_to_lin(void *w, void *l); +extern struct winRenderModel_TextureMap_t_1916 *struct_RenderModel_TextureMap_t_1916_wrap(void *l); +extern RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1916_unwrap(winRenderModel_TextureMap_t_1916 *w); +typedef struct winRenderModel_t_1916 winRenderModel_t_1916; +extern void struct_RenderModel_t_1916_lin_to_win(void *l, void *w); +extern void struct_RenderModel_t_1916_win_to_lin(void *w, void *l); +extern struct winRenderModel_t_1916 *struct_RenderModel_t_1916_wrap(void *l); +extern RenderModel_t *struct_RenderModel_t_1916_unwrap(winRenderModel_t_1916 *w); +typedef struct winInputAnalogActionData_t_1916 winInputAnalogActionData_t_1916; +extern void struct_InputAnalogActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputAnalogActionData_t_1916_win_to_lin(void *w, void *l); +typedef struct winInputDigitalActionData_t_1916 winInputDigitalActionData_t_1916; +extern void struct_InputDigitalActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputDigitalActionData_t_1916_win_to_lin(void *w, void *l); +typedef struct winInputPoseActionData_t_1916 winInputPoseActionData_t_1916; +extern void struct_InputPoseActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputPoseActionData_t_1916_win_to_lin(void *w, void *l); +typedef struct winInputSkeletalActionData_t_1916 winInputSkeletalActionData_t_1916; +extern void struct_InputSkeletalActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz); +extern void struct_InputSkeletalActionData_t_1916_win_to_lin(void *w, void *l); typedef struct winVREvent_t_1819 winVREvent_t_1819; extern void struct_VREvent_t_1819_lin_to_win(void *l, void *w, uint32_t sz); extern void struct_VREvent_t_1819_win_to_lin(void *w, void *l); diff --git a/vrclient_x64/vrclient_x64/struct_converters_11030.cpp b/vrclient_x64/vrclient_x64/struct_converters_11030.cpp new file mode 100644 index 0000000000..e787d74022 --- /dev/null +++ b/vrclient_x64/vrclient_x64/struct_converters_11030.cpp @@ -0,0 +1,331 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.10.30/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +#pragma pack(push, 8) +struct winVREvent_t_11030 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data __attribute__((aligned(8))); +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_VREvent_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winVREvent_t_11030 *win = (struct winVREvent_t_11030 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + memcpy(&win->data, &lin->data, sz - (((char*)&win->data) - ((char*)win))); +} + +void struct_VREvent_t_11030_win_to_lin(void *w, void *l) +{ + struct winVREvent_t_11030 *win = (struct winVREvent_t_11030 *)w; + VREvent_t *lin = (VREvent_t *)l; + lin->eventType = win->eventType; + lin->trackedDeviceIndex = win->trackedDeviceIndex; + lin->eventAgeSeconds = win->eventAgeSeconds; + lin->data = win->data; +} + +#pragma pack(push, 8) +struct winVRControllerState001_t_11030 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_VRControllerState001_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winVRControllerState001_t_11030 *win = (struct winVRControllerState001_t_11030 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +void struct_VRControllerState001_t_11030_win_to_lin(void *w, void *l) +{ + struct winVRControllerState001_t_11030 *win = (struct winVRControllerState001_t_11030 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + lin->unPacketNum = win->unPacketNum; + lin->ulButtonPressed = win->ulButtonPressed; + lin->ulButtonTouched = win->ulButtonTouched; + memcpy(lin->rAxis, win->rAxis, sizeof(lin->rAxis)); +} + +#pragma pack(push, 8) +struct winCameraVideoStreamFrameHeader_t_11030 { + vr::EVRTrackedCameraFrameType eFrameType; + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + uint32_t nFrameSequence; + vr::TrackedDevicePose_t trackedDevicePose __attribute__((aligned(4))); + uint64_t ulFrameExposureTime; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_CameraVideoStreamFrameHeader_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winCameraVideoStreamFrameHeader_t_11030 *win = (struct winCameraVideoStreamFrameHeader_t_11030 *)w; + CameraVideoStreamFrameHeader_t *lin = (CameraVideoStreamFrameHeader_t *)l; + win->eFrameType = lin->eFrameType; + win->nWidth = lin->nWidth; + win->nHeight = lin->nHeight; + win->nBytesPerPixel = lin->nBytesPerPixel; + win->nFrameSequence = lin->nFrameSequence; + win->trackedDevicePose = lin->trackedDevicePose; + win->ulFrameExposureTime = lin->ulFrameExposureTime; +} + +void struct_CameraVideoStreamFrameHeader_t_11030_win_to_lin(void *w, void *l) +{ + struct winCameraVideoStreamFrameHeader_t_11030 *win = (struct winCameraVideoStreamFrameHeader_t_11030 *)w; + CameraVideoStreamFrameHeader_t *lin = (CameraVideoStreamFrameHeader_t *)l; + lin->eFrameType = win->eFrameType; + lin->nWidth = win->nWidth; + lin->nHeight = win->nHeight; + lin->nBytesPerPixel = win->nBytesPerPixel; + lin->nFrameSequence = win->nFrameSequence; + lin->trackedDevicePose = win->trackedDevicePose; + lin->ulFrameExposureTime = win->ulFrameExposureTime; +} + +#pragma pack(push, 8) +struct winRenderModel_TextureMap_t_11030 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_RenderModel_TextureMap_t_11030_lin_to_win(void *l, void *w) +{ + struct winRenderModel_TextureMap_t_11030 *win = (struct winRenderModel_TextureMap_t_11030 *)w; + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; +} + +void struct_RenderModel_TextureMap_t_11030_win_to_lin(void *w, void *l) +{ + struct winRenderModel_TextureMap_t_11030 *win = (struct winRenderModel_TextureMap_t_11030 *)w; + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + lin->unWidth = win->unWidth; + lin->unHeight = win->unHeight; + lin->rubTextureMapData = win->rubTextureMapData; +} + +struct winRenderModel_TextureMap_t_11030 *struct_RenderModel_TextureMap_t_11030_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_11030 *win = (struct winRenderModel_TextureMap_t_11030 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_11030_unwrap(winRenderModel_TextureMap_t_11030 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +#pragma pack(push, 8) +struct winRenderModel_t_11030 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_RenderModel_t_11030_lin_to_win(void *l, void *w) +{ + struct winRenderModel_t_11030 *win = (struct winRenderModel_t_11030 *)w; + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; +} + +void struct_RenderModel_t_11030_win_to_lin(void *w, void *l) +{ + struct winRenderModel_t_11030 *win = (struct winRenderModel_t_11030 *)w; + RenderModel_t *lin = (RenderModel_t *)l; + lin->rVertexData = win->rVertexData; + lin->unVertexCount = win->unVertexCount; + lin->rIndexData = win->rIndexData; + lin->unTriangleCount = win->unTriangleCount; + lin->diffuseTextureId = win->diffuseTextureId; +} + +struct winRenderModel_t_11030 *struct_RenderModel_t_11030_wrap(void *l) +{ + struct winRenderModel_t_11030 *win = (struct winRenderModel_t_11030 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_11030_unwrap(winRenderModel_t_11030 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +#pragma pack(push, 8) +struct winInputAnalogActionData_t_11030 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; + float x; + float y; + float z; + float deltaX; + float deltaY; + float deltaZ; + float fUpdateTime; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputAnalogActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputAnalogActionData_t_11030 *win = (struct winInputAnalogActionData_t_11030 *)w; + InputAnalogActionData_t *lin = (InputAnalogActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; + win->x = lin->x; + win->y = lin->y; + win->z = lin->z; + win->deltaX = lin->deltaX; + win->deltaY = lin->deltaY; + win->deltaZ = lin->deltaZ; + win->fUpdateTime = lin->fUpdateTime; +} + +void struct_InputAnalogActionData_t_11030_win_to_lin(void *w, void *l) +{ + struct winInputAnalogActionData_t_11030 *win = (struct winInputAnalogActionData_t_11030 *)w; + InputAnalogActionData_t *lin = (InputAnalogActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; + lin->x = win->x; + lin->y = win->y; + lin->z = win->z; + lin->deltaX = win->deltaX; + lin->deltaY = win->deltaY; + lin->deltaZ = win->deltaZ; + lin->fUpdateTime = win->fUpdateTime; +} + +#pragma pack(push, 8) +struct winInputDigitalActionData_t_11030 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; + bool bState; + bool bChanged; + float fUpdateTime; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputDigitalActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputDigitalActionData_t_11030 *win = (struct winInputDigitalActionData_t_11030 *)w; + InputDigitalActionData_t *lin = (InputDigitalActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; + win->bState = lin->bState; + win->bChanged = lin->bChanged; + win->fUpdateTime = lin->fUpdateTime; +} + +void struct_InputDigitalActionData_t_11030_win_to_lin(void *w, void *l) +{ + struct winInputDigitalActionData_t_11030 *win = (struct winInputDigitalActionData_t_11030 *)w; + InputDigitalActionData_t *lin = (InputDigitalActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; + lin->bState = win->bState; + lin->bChanged = win->bChanged; + lin->fUpdateTime = win->fUpdateTime; +} + +#pragma pack(push, 8) +struct winInputPoseActionData_t_11030 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; + vr::TrackedDevicePose_t pose __attribute__((aligned(4))); +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputPoseActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputPoseActionData_t_11030 *win = (struct winInputPoseActionData_t_11030 *)w; + InputPoseActionData_t *lin = (InputPoseActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; + win->pose = lin->pose; +} + +void struct_InputPoseActionData_t_11030_win_to_lin(void *w, void *l) +{ + struct winInputPoseActionData_t_11030 *win = (struct winInputPoseActionData_t_11030 *)w; + InputPoseActionData_t *lin = (InputPoseActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; + lin->pose = win->pose; +} + +#pragma pack(push, 8) +struct winInputSkeletalActionData_t_11030 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputSkeletalActionData_t_11030_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputSkeletalActionData_t_11030 *win = (struct winInputSkeletalActionData_t_11030 *)w; + InputSkeletalActionData_t *lin = (InputSkeletalActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; +} + +void struct_InputSkeletalActionData_t_11030_win_to_lin(void *w, void *l) +{ + struct winInputSkeletalActionData_t_11030 *win = (struct winInputSkeletalActionData_t_11030 *)w; + InputSkeletalActionData_t *lin = (InputSkeletalActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; +} + + +} diff --git a/vrclient_x64/vrclient_x64/struct_converters_1916.cpp b/vrclient_x64/vrclient_x64/struct_converters_1916.cpp new file mode 100644 index 0000000000..8fe61587f2 --- /dev/null +++ b/vrclient_x64/vrclient_x64/struct_converters_1916.cpp @@ -0,0 +1,331 @@ +#include +#include +#include "vrclient_private.h" +#include "vrclient_defs.h" +#include "openvr_v1.9.16/openvr.h" +using namespace vr; +extern "C" { +#include "struct_converters.h" +#pragma pack(push, 8) +struct winVREvent_t_1916 { + uint32_t eventType; + vr::TrackedDeviceIndex_t trackedDeviceIndex; + float eventAgeSeconds; + vr::VREvent_Data_t data __attribute__((aligned(8))); +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_VREvent_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winVREvent_t_1916 *win = (struct winVREvent_t_1916 *)w; + VREvent_t *lin = (VREvent_t *)l; + win->eventType = lin->eventType; + win->trackedDeviceIndex = lin->trackedDeviceIndex; + win->eventAgeSeconds = lin->eventAgeSeconds; + memcpy(&win->data, &lin->data, sz - (((char*)&win->data) - ((char*)win))); +} + +void struct_VREvent_t_1916_win_to_lin(void *w, void *l) +{ + struct winVREvent_t_1916 *win = (struct winVREvent_t_1916 *)w; + VREvent_t *lin = (VREvent_t *)l; + lin->eventType = win->eventType; + lin->trackedDeviceIndex = win->trackedDeviceIndex; + lin->eventAgeSeconds = win->eventAgeSeconds; + lin->data = win->data; +} + +#pragma pack(push, 8) +struct winVRControllerState001_t_1916 { + uint32_t unPacketNum; + uint64_t ulButtonPressed; + uint64_t ulButtonTouched; + vr::VRControllerAxis_t rAxis[5]; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_VRControllerState001_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winVRControllerState001_t_1916 *win = (struct winVRControllerState001_t_1916 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + win->unPacketNum = lin->unPacketNum; + win->ulButtonPressed = lin->ulButtonPressed; + win->ulButtonTouched = lin->ulButtonTouched; + memcpy(win->rAxis, lin->rAxis, sizeof(win->rAxis)); +} + +void struct_VRControllerState001_t_1916_win_to_lin(void *w, void *l) +{ + struct winVRControllerState001_t_1916 *win = (struct winVRControllerState001_t_1916 *)w; + VRControllerState001_t *lin = (VRControllerState001_t *)l; + lin->unPacketNum = win->unPacketNum; + lin->ulButtonPressed = win->ulButtonPressed; + lin->ulButtonTouched = win->ulButtonTouched; + memcpy(lin->rAxis, win->rAxis, sizeof(lin->rAxis)); +} + +#pragma pack(push, 8) +struct winCameraVideoStreamFrameHeader_t_1916 { + vr::EVRTrackedCameraFrameType eFrameType; + uint32_t nWidth; + uint32_t nHeight; + uint32_t nBytesPerPixel; + uint32_t nFrameSequence; + vr::TrackedDevicePose_t trackedDevicePose __attribute__((aligned(4))); + uint64_t ulFrameExposureTime; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_CameraVideoStreamFrameHeader_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winCameraVideoStreamFrameHeader_t_1916 *win = (struct winCameraVideoStreamFrameHeader_t_1916 *)w; + CameraVideoStreamFrameHeader_t *lin = (CameraVideoStreamFrameHeader_t *)l; + win->eFrameType = lin->eFrameType; + win->nWidth = lin->nWidth; + win->nHeight = lin->nHeight; + win->nBytesPerPixel = lin->nBytesPerPixel; + win->nFrameSequence = lin->nFrameSequence; + win->trackedDevicePose = lin->trackedDevicePose; + win->ulFrameExposureTime = lin->ulFrameExposureTime; +} + +void struct_CameraVideoStreamFrameHeader_t_1916_win_to_lin(void *w, void *l) +{ + struct winCameraVideoStreamFrameHeader_t_1916 *win = (struct winCameraVideoStreamFrameHeader_t_1916 *)w; + CameraVideoStreamFrameHeader_t *lin = (CameraVideoStreamFrameHeader_t *)l; + lin->eFrameType = win->eFrameType; + lin->nWidth = win->nWidth; + lin->nHeight = win->nHeight; + lin->nBytesPerPixel = win->nBytesPerPixel; + lin->nFrameSequence = win->nFrameSequence; + lin->trackedDevicePose = win->trackedDevicePose; + lin->ulFrameExposureTime = win->ulFrameExposureTime; +} + +#pragma pack(push, 8) +struct winRenderModel_TextureMap_t_1916 { + uint16_t unWidth; + uint16_t unHeight; + const uint8_t * rubTextureMapData; + + RenderModel_TextureMap_t *linux_side; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_RenderModel_TextureMap_t_1916_lin_to_win(void *l, void *w) +{ + struct winRenderModel_TextureMap_t_1916 *win = (struct winRenderModel_TextureMap_t_1916 *)w; + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; +} + +void struct_RenderModel_TextureMap_t_1916_win_to_lin(void *w, void *l) +{ + struct winRenderModel_TextureMap_t_1916 *win = (struct winRenderModel_TextureMap_t_1916 *)w; + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + lin->unWidth = win->unWidth; + lin->unHeight = win->unHeight; + lin->rubTextureMapData = win->rubTextureMapData; +} + +struct winRenderModel_TextureMap_t_1916 *struct_RenderModel_TextureMap_t_1916_wrap(void *l) +{ + struct winRenderModel_TextureMap_t_1916 *win = (struct winRenderModel_TextureMap_t_1916 *)malloc(sizeof(*win)); + RenderModel_TextureMap_t *lin = (RenderModel_TextureMap_t *)l; + win->unWidth = lin->unWidth; + win->unHeight = lin->unHeight; + win->rubTextureMapData = lin->rubTextureMapData; + win->linux_side = lin; + return win; +} + +struct RenderModel_TextureMap_t *struct_RenderModel_TextureMap_t_1916_unwrap(winRenderModel_TextureMap_t_1916 *w) +{ + RenderModel_TextureMap_t *ret = w->linux_side; + free(w); + return ret; +} + +#pragma pack(push, 8) +struct winRenderModel_t_1916 { + const vr::RenderModel_Vertex_t * rVertexData; + uint32_t unVertexCount; + const uint16_t * rIndexData; + uint32_t unTriangleCount; + vr::TextureID_t diffuseTextureId; + + RenderModel_t *linux_side; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_RenderModel_t_1916_lin_to_win(void *l, void *w) +{ + struct winRenderModel_t_1916 *win = (struct winRenderModel_t_1916 *)w; + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; +} + +void struct_RenderModel_t_1916_win_to_lin(void *w, void *l) +{ + struct winRenderModel_t_1916 *win = (struct winRenderModel_t_1916 *)w; + RenderModel_t *lin = (RenderModel_t *)l; + lin->rVertexData = win->rVertexData; + lin->unVertexCount = win->unVertexCount; + lin->rIndexData = win->rIndexData; + lin->unTriangleCount = win->unTriangleCount; + lin->diffuseTextureId = win->diffuseTextureId; +} + +struct winRenderModel_t_1916 *struct_RenderModel_t_1916_wrap(void *l) +{ + struct winRenderModel_t_1916 *win = (struct winRenderModel_t_1916 *)malloc(sizeof(*win)); + RenderModel_t *lin = (RenderModel_t *)l; + win->rVertexData = lin->rVertexData; + win->unVertexCount = lin->unVertexCount; + win->rIndexData = lin->rIndexData; + win->unTriangleCount = lin->unTriangleCount; + win->diffuseTextureId = lin->diffuseTextureId; + win->linux_side = lin; + return win; +} + +struct RenderModel_t *struct_RenderModel_t_1916_unwrap(winRenderModel_t_1916 *w) +{ + RenderModel_t *ret = w->linux_side; + free(w); + return ret; +} + +#pragma pack(push, 8) +struct winInputAnalogActionData_t_1916 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; + float x; + float y; + float z; + float deltaX; + float deltaY; + float deltaZ; + float fUpdateTime; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputAnalogActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputAnalogActionData_t_1916 *win = (struct winInputAnalogActionData_t_1916 *)w; + InputAnalogActionData_t *lin = (InputAnalogActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; + win->x = lin->x; + win->y = lin->y; + win->z = lin->z; + win->deltaX = lin->deltaX; + win->deltaY = lin->deltaY; + win->deltaZ = lin->deltaZ; + win->fUpdateTime = lin->fUpdateTime; +} + +void struct_InputAnalogActionData_t_1916_win_to_lin(void *w, void *l) +{ + struct winInputAnalogActionData_t_1916 *win = (struct winInputAnalogActionData_t_1916 *)w; + InputAnalogActionData_t *lin = (InputAnalogActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; + lin->x = win->x; + lin->y = win->y; + lin->z = win->z; + lin->deltaX = win->deltaX; + lin->deltaY = win->deltaY; + lin->deltaZ = win->deltaZ; + lin->fUpdateTime = win->fUpdateTime; +} + +#pragma pack(push, 8) +struct winInputDigitalActionData_t_1916 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; + bool bState; + bool bChanged; + float fUpdateTime; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputDigitalActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputDigitalActionData_t_1916 *win = (struct winInputDigitalActionData_t_1916 *)w; + InputDigitalActionData_t *lin = (InputDigitalActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; + win->bState = lin->bState; + win->bChanged = lin->bChanged; + win->fUpdateTime = lin->fUpdateTime; +} + +void struct_InputDigitalActionData_t_1916_win_to_lin(void *w, void *l) +{ + struct winInputDigitalActionData_t_1916 *win = (struct winInputDigitalActionData_t_1916 *)w; + InputDigitalActionData_t *lin = (InputDigitalActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; + lin->bState = win->bState; + lin->bChanged = win->bChanged; + lin->fUpdateTime = win->fUpdateTime; +} + +#pragma pack(push, 8) +struct winInputPoseActionData_t_1916 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; + vr::TrackedDevicePose_t pose __attribute__((aligned(4))); +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputPoseActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputPoseActionData_t_1916 *win = (struct winInputPoseActionData_t_1916 *)w; + InputPoseActionData_t *lin = (InputPoseActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; + win->pose = lin->pose; +} + +void struct_InputPoseActionData_t_1916_win_to_lin(void *w, void *l) +{ + struct winInputPoseActionData_t_1916 *win = (struct winInputPoseActionData_t_1916 *)w; + InputPoseActionData_t *lin = (InputPoseActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; + lin->pose = win->pose; +} + +#pragma pack(push, 8) +struct winInputSkeletalActionData_t_1916 { + bool bActive; + vr::VRInputValueHandle_t activeOrigin; +} __attribute__ ((ms_struct)); +#pragma pack(pop) + +void struct_InputSkeletalActionData_t_1916_lin_to_win(void *l, void *w, uint32_t sz) +{ + struct winInputSkeletalActionData_t_1916 *win = (struct winInputSkeletalActionData_t_1916 *)w; + InputSkeletalActionData_t *lin = (InputSkeletalActionData_t *)l; + win->bActive = lin->bActive; + win->activeOrigin = lin->activeOrigin; +} + +void struct_InputSkeletalActionData_t_1916_win_to_lin(void *w, void *l) +{ + struct winInputSkeletalActionData_t_1916 *win = (struct winInputSkeletalActionData_t_1916 *)w; + InputSkeletalActionData_t *lin = (InputSkeletalActionData_t *)l; + lin->bActive = win->bActive; + lin->activeOrigin = win->activeOrigin; +} + + +} diff --git a/vrclient_x64/vrclient_x64/vrclient_defs.h b/vrclient_x64/vrclient_x64/vrclient_defs.h index 8d89cabb8f..e51646f6f3 100644 --- a/vrclient_x64/vrclient_x64/vrclient_defs.h +++ b/vrclient_x64/vrclient_x64/vrclient_defs.h @@ -66,7 +66,10 @@ typedef int EVRSkeletalReferencePose, EVRSkeletalTrackingLevel, EVRSummaryType, - EVRSceneApplicationState; + EVRSceneApplicationState, + HeadsetViewMode_t, + EVRState, + vrmb_typeb; typedef uint32_t DriverId_t; typedef uint32_t TrackedDeviceIndex_t; @@ -86,6 +89,8 @@ typedef uint64_t VRActionHandle_t; typedef uint64_t VRActionSetHandle_t; typedef uint64_t VRInputValueHandle_t; typedef int32_t BoneIndex_t; +typedef uint64_t WebConsoleHandle_t; +typedef uint64_t vrmb_typea; /* never dereferenced */ typedef struct VROverlayIntersectionParams_t VROverlayIntersectionParams_t; @@ -98,6 +103,8 @@ typedef struct TrackedDevicePose_t TrackedDevicePose_t; typedef struct VREvent_t VREvent_t; typedef struct Compositor_FrameTiming Compositor_FrameTiming; typedef struct Compositor_CumulativeStats Compositor_CumulativeStats; +typedef struct Compositor_StageRenderSettings Compositor_StageRenderSettings; +typedef struct Compositor_BenchmarkResults Compositor_BenchmarkResults; typedef struct AppOverrideKeys_t AppOverrideKeys_t; typedef struct VROverlayIntersectionMaskPrimitive_t VROverlayIntersectionMaskPrimitive_t; typedef struct NotificationBitmap_t NotificationBitmap_t; @@ -124,6 +131,8 @@ typedef struct InputOriginInfo_t InputOriginInfo_t; typedef struct InputSkeletalActionData_t InputSkeletalActionData_t; typedef struct VRSkeletalSummaryData_t VRSkeletalSummaryData_t; typedef struct InputBindingInfo_t InputBindingInfo_t; +typedef struct VRNativeDevice_t VRNativeDevice_t; +typedef struct VROverlayView_t VROverlayView_t; /* dereferenced structs */ typedef struct HmdMatrix34_t diff --git a/vrclient_x64/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_x64/vrclient_main.c index e42a1b3cd0..ea8e375ed8 100644 --- a/vrclient_x64/vrclient_x64/vrclient_main.c +++ b/vrclient_x64/vrclient_x64/vrclient_main.c @@ -39,10 +39,12 @@ typedef struct winRenderModel_TextureMap_t_1015 winRenderModel_TextureMap_t_1015 /* this is cast to 1015 during load_linux_texture_map, so ensure they're * binary compatible before updating this number */ -typedef struct winRenderModel_t_1819 winRenderModel_t_1819; -typedef struct winRenderModel_TextureMap_t_1819 winRenderModel_TextureMap_t_1819; +typedef struct winRenderModel_t_11030 winRenderModel_t_11030; +typedef struct winRenderModel_TextureMap_t_11030 winRenderModel_TextureMap_t_11030; #include "cppIVRRenderModels_IVRRenderModels_006.h" +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + WINE_DEFAULT_DEBUG_CHANNEL(vrclient); BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) @@ -216,25 +218,47 @@ static void *(*vrclient_VRClientCoreFactory)(const char *name, int *return_code) static int load_vrclient(void) { - char path[PATH_MAX]; + WCHAR pathW[PATH_MAX]; + char *pathU; + DWORD sz; + +#ifdef _WIN64 + static const char append_path[] = "/bin/linux64/vrclient.so"; +#else + static const char append_path[] = "/bin/vrclient.so"; +#endif if(vrclient_lib) return 1; /* PROTON_VR_RUNTIME is provided by the proton setup script */ - if(!getenv("PROTON_VR_RUNTIME")){ + if(!GetEnvironmentVariableW(L"PROTON_VR_RUNTIME", pathW, ARRAY_SIZE(pathW))) + { TRACE("Linux OpenVR runtime is not available\n"); return 0; } -#ifdef _WIN64 - snprintf(path, PATH_MAX, "%s/bin/linux64/vrclient.so", getenv("PROTON_VR_RUNTIME")); -#else - snprintf(path, PATH_MAX, "%s/bin/vrclient.so", getenv("PROTON_VR_RUNTIME")); -#endif - TRACE("got openvr runtime path: %s\n", path); + sz = WideCharToMultiByte(CP_UNIXCP, 0, pathW, -1, NULL, 0, NULL, NULL); + if(!sz) + { + ERR("Can't convert path to unixcp! %s\n", wine_dbgstr_w(pathW)); + return 0; + } + + pathU = HeapAlloc(GetProcessHeap(), 0, sz + sizeof(append_path)); - vrclient_lib = wine_dlopen(path, RTLD_NOW, NULL, 0); + sz = WideCharToMultiByte(CP_UNIXCP, 0, pathW, -1, pathU, sz, NULL, NULL); + if(!sz) + { + ERR("Can't convert path to unixcp! %s\n", wine_dbgstr_w(pathW)); + return 0; + } + + strcat(pathU, append_path); + + TRACE("got openvr runtime path: %s\n", pathU); + + vrclient_lib = wine_dlopen(pathU, RTLD_NOW, NULL, 0); if(!vrclient_lib){ TRACE("unable to load vrclient.so\n"); return 0; @@ -1113,7 +1137,7 @@ static EVRRenderModelError load_linux_texture_map(void *linux_side, TextureID_t case 5: return cppIVRRenderModels_IVRRenderModels_005_LoadTexture_Async(linux_side, texture_id, texture_map); case 6: - return cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(linux_side, texture_id, (struct winRenderModel_TextureMap_t_1819 **)texture_map); + return cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(linux_side, texture_id, (struct winRenderModel_TextureMap_t_11030 **)texture_map); } FIXME("Unsupported IVRRenderModels version! %u\n", version); return VRRenderModelError_NotSupported; @@ -1130,7 +1154,7 @@ static void free_linux_texture_map(void *linux_side, cppIVRRenderModels_IVRRenderModels_005_FreeTexture(linux_side, texture_map); break; case 6: - cppIVRRenderModels_IVRRenderModels_006_FreeTexture(linux_side, (struct winRenderModel_TextureMap_t_1819 *)texture_map); + cppIVRRenderModels_IVRRenderModels_006_FreeTexture(linux_side, (struct winRenderModel_TextureMap_t_11030 *)texture_map); break; default: FIXME("Unsupported IVRRenderModels version! %u\n", version); @@ -1246,6 +1270,20 @@ EVRRenderModelError ivrrendermodels_load_into_texture_d3d11_async( return error; } +vrmb_typeb ivrmailbox_undoc3( + vrmb_typeb (*cpp_func)(void *, vrmb_typea, const char *, const char *), + void *linux_side, vrmb_typea a, const char *b, const char *c, unsigned int version) +{ + vrmb_typeb r; + char *converted = json_convert_paths(c); + + r = cpp_func(linux_side, a, b, converted ? converted : c); + + free(converted); + + return r; +} + void destroy_compositor_data(struct compositor_data *data) { IWineD3D11Device *wined3d_device; diff --git a/vrclient_x64/vrclient_x64/vrclient_private.h b/vrclient_x64/vrclient_x64/vrclient_private.h index e7fe066a63..e8d8252100 100644 --- a/vrclient_x64/vrclient_x64/vrclient_private.h +++ b/vrclient_x64/vrclient_x64/vrclient_private.h @@ -6,6 +6,16 @@ #define VRCLIENT_HAVE_DXVK #endif +#if __cplusplus +extern "C" { +#endif + +char *json_convert_paths(const char *input); + +#if __cplusplus +} +#endif + /* TODO these should be generated */ typedef struct __winISteamClient winISteamClient; typedef struct __winISteamUser winISteamUser; diff --git a/vrclient_x64/vrclient_x64/winIVRCompositor.c b/vrclient_x64/vrclient_x64/winIVRCompositor.c index ff2fc4dcc0..8a64c86df4 100644 --- a/vrclient_x64/vrclient_x64/winIVRCompositor.c +++ b/vrclient_x64/vrclient_x64/winIVRCompositor.c @@ -18,6 +18,1025 @@ WINE_DEFAULT_DEBUG_CHANNEL(vrclient); +#include "cppIVRCompositor_IVRCompositor_026.h" + +typedef struct __winIVRCompositor_IVRCompositor_026 { + vtable_ptr *vtable; + void *linux_side; + struct compositor_data user_data; +} winIVRCompositor_IVRCompositor_026; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_026_SetTrackingSpace(winIVRCompositor_IVRCompositor_026 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_026_GetTrackingSpace(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_WaitGetPoses, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_WaitGetPoses(winIVRCompositor_IVRCompositor_026 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return ivrcompositor_wait_get_poses(cppIVRCompositor_IVRCompositor_026_WaitGetPoses, _this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount, 26, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetLastPoses, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_GetLastPoses(winIVRCompositor_IVRCompositor_026 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_026 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_Submit, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_Submit(winIVRCompositor_IVRCompositor_026 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return ivrcompositor_submit(cppIVRCompositor_IVRCompositor_026_Submit, _this->linux_side, eEye, pTexture, pBounds, nSubmitFlags, 26, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_PostPresentHandoff(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + ivrcompositor_post_present_handoff(cppIVRCompositor_IVRCompositor_026_PostPresentHandoff, _this->linux_side, 26, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetFrameTiming, 12) +bool __thiscall winIVRCompositor_IVRCompositor_026_GetFrameTiming(winIVRCompositor_IVRCompositor_026 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetFrameTimings, 12) +uint32_t __thiscall winIVRCompositor_IVRCompositor_026_GetFrameTimings(winIVRCompositor_IVRCompositor_026 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetCumulativeStats, 12) +void __thiscall winIVRCompositor_IVRCompositor_026_GetCumulativeStats(winIVRCompositor_IVRCompositor_026 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_026_FadeToColor(winIVRCompositor_IVRCompositor_026 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_026_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_026 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_026_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_026_FadeGrid(winIVRCompositor_IVRCompositor_026 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_SetSkyboxOverride, 12) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_SetSkyboxOverride(winIVRCompositor_IVRCompositor_026 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_CompositorBringToFront(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_CompositorGoToBack(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_CompositorQuit(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_IsFullscreen(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_026_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_CanRenderScene(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_ShowMirrorWindow(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_HideMirrorWindow(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_CompositorDumpImages(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_026 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_ForceReconnectProcess(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_026_SuspendRendering(winIVRCompositor_IVRCompositor_026 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_026 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11, 8) +void __thiscall winIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11(winIVRCompositor_IVRCompositor_026 *_this, void * pD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11(_this->linux_side, pD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetMirrorTextureGL, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_026 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture, 12) +bool __thiscall winIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_026 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess, 8) +void __thiscall winIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_026 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess, 8) +void __thiscall winIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_026 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired, 12) +uint32_t __thiscall winIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired(winIVRCompositor_IVRCompositor_026 *_this, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired(_this->linux_side, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_026 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return ivrcompositor_get_vulkan_device_extensions_required(cppIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired, _this->linux_side, pPhysicalDevice, pchValue, unBufferSize, 26, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_SetExplicitTimingMode, 8) +void __thiscall winIVRCompositor_IVRCompositor_026_SetExplicitTimingMode(winIVRCompositor_IVRCompositor_026 *_this, EVRCompositorTimingMode eTimingMode) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_SetExplicitTimingMode(_this->linux_side, eTimingMode); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData, 4) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading, 4) +bool __thiscall winIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_SetStageOverride_Async, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_SetStageOverride_Async(winIVRCompositor_IVRCompositor_026 *_this, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) +{ + char lin_pchRenderModelPath[PATH_MAX]; + vrclient_dos_path_to_unix_path(pchRenderModelPath, lin_pchRenderModelPath); + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_SetStageOverride_Async(_this->linux_side, pchRenderModelPath ? lin_pchRenderModelPath : NULL, pTransform, pRenderSettings, nSizeOfRenderSettings); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_ClearStageOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_026_ClearStageOverride(winIVRCompositor_IVRCompositor_026 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_026_ClearStageOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults, 12) +bool __thiscall winIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults(winIVRCompositor_IVRCompositor_026 *_this, Compositor_BenchmarkResults * pBenchmarkResults, uint32_t nSizeOfBenchmarkResults) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults(_this->linux_side, pBenchmarkResults, nSizeOfBenchmarkResults); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs, 12) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs(winIVRCompositor_IVRCompositor_026 *_this, uint32_t * pRenderPosePredictionID, uint32_t * pGamePosePredictionID) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs(_this->linux_side, pRenderPosePredictionID, pGamePosePredictionID); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_026_GetPosesForFrame, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_026_GetPosesForFrame(winIVRCompositor_IVRCompositor_026 *_this, uint32_t unPosePredictionID, TrackedDevicePose_t * pPoseArray, uint32_t unPoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_026_GetPosesForFrame(_this->linux_side, unPosePredictionID, pPoseArray, unPoseArrayCount); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_026_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_026, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_SetExplicitTimingMode) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_SetStageOverride_Async) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_ClearStageOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_026_GetPosesForFrame) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_026 *create_winIVRCompositor_IVRCompositor_026(void *linux_side) +{ + winIVRCompositor_IVRCompositor_026 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRCompositor_IVRCompositor_026)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_026_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRCompositor_IVRCompositor_026(void *object) +{ + TRACE("%p\n", object); + struct __winIVRCompositor_IVRCompositor_026 *win_object = object; + destroy_compositor_data(&win_object->user_data); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRCompositor_IVRCompositor_026 *create_winIVRCompositor_IVRCompositor_026_FnTable(void *linux_side) +{ + winIVRCompositor_IVRCompositor_026 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRCompositor_IVRCompositor_026)); + struct thunk *thunks = alloc_thunks(51); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 51 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRCompositor_IVRCompositor_026_SetTrackingSpace, 1, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRCompositor_IVRCompositor_026_GetTrackingSpace, 0, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRCompositor_IVRCompositor_026_WaitGetPoses, 4, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRCompositor_IVRCompositor_026_GetLastPoses, 4, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVRCompositor_IVRCompositor_026_GetLastPoseForTrackedDeviceIndex, 3, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVRCompositor_IVRCompositor_026_Submit, 4, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVRCompositor_IVRCompositor_026_ClearLastSubmittedFrame, 0, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVRCompositor_IVRCompositor_026_PostPresentHandoff, 0, FALSE, FALSE); + init_thunk(&thunks[8], r, winIVRCompositor_IVRCompositor_026_GetFrameTiming, 2, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVRCompositor_IVRCompositor_026_GetFrameTimings, 2, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVRCompositor_IVRCompositor_026_GetFrameTimeRemaining, 0, FALSE, FALSE); + init_thunk(&thunks[11], r, winIVRCompositor_IVRCompositor_026_GetCumulativeStats, 2, FALSE, FALSE); + init_thunk(&thunks[12], r, winIVRCompositor_IVRCompositor_026_FadeToColor, 6, TRUE, TRUE); + init_thunk(&thunks[13], r, winIVRCompositor_IVRCompositor_026_GetCurrentFadeColor, 2, FALSE, FALSE); + init_thunk(&thunks[14], r, winIVRCompositor_IVRCompositor_026_FadeGrid, 2, TRUE, FALSE); + init_thunk(&thunks[15], r, winIVRCompositor_IVRCompositor_026_GetCurrentGridAlpha, 0, FALSE, FALSE); + init_thunk(&thunks[16], r, winIVRCompositor_IVRCompositor_026_SetSkyboxOverride, 2, FALSE, FALSE); + init_thunk(&thunks[17], r, winIVRCompositor_IVRCompositor_026_ClearSkyboxOverride, 0, FALSE, FALSE); + init_thunk(&thunks[18], r, winIVRCompositor_IVRCompositor_026_CompositorBringToFront, 0, FALSE, FALSE); + init_thunk(&thunks[19], r, winIVRCompositor_IVRCompositor_026_CompositorGoToBack, 0, FALSE, FALSE); + init_thunk(&thunks[20], r, winIVRCompositor_IVRCompositor_026_CompositorQuit, 0, FALSE, FALSE); + init_thunk(&thunks[21], r, winIVRCompositor_IVRCompositor_026_IsFullscreen, 0, FALSE, FALSE); + init_thunk(&thunks[22], r, winIVRCompositor_IVRCompositor_026_GetCurrentSceneFocusProcess, 0, FALSE, FALSE); + init_thunk(&thunks[23], r, winIVRCompositor_IVRCompositor_026_GetLastFrameRenderer, 0, FALSE, FALSE); + init_thunk(&thunks[24], r, winIVRCompositor_IVRCompositor_026_CanRenderScene, 0, FALSE, FALSE); + init_thunk(&thunks[25], r, winIVRCompositor_IVRCompositor_026_ShowMirrorWindow, 0, FALSE, FALSE); + init_thunk(&thunks[26], r, winIVRCompositor_IVRCompositor_026_HideMirrorWindow, 0, FALSE, FALSE); + init_thunk(&thunks[27], r, winIVRCompositor_IVRCompositor_026_IsMirrorWindowVisible, 0, FALSE, FALSE); + init_thunk(&thunks[28], r, winIVRCompositor_IVRCompositor_026_CompositorDumpImages, 0, FALSE, FALSE); + init_thunk(&thunks[29], r, winIVRCompositor_IVRCompositor_026_ShouldAppRenderWithLowResources, 0, FALSE, FALSE); + init_thunk(&thunks[30], r, winIVRCompositor_IVRCompositor_026_ForceInterleavedReprojectionOn, 1, FALSE, FALSE); + init_thunk(&thunks[31], r, winIVRCompositor_IVRCompositor_026_ForceReconnectProcess, 0, FALSE, FALSE); + init_thunk(&thunks[32], r, winIVRCompositor_IVRCompositor_026_SuspendRendering, 1, FALSE, FALSE); + init_thunk(&thunks[33], r, winIVRCompositor_IVRCompositor_026_GetMirrorTextureD3D11, 3, FALSE, FALSE); + init_thunk(&thunks[34], r, winIVRCompositor_IVRCompositor_026_ReleaseMirrorTextureD3D11, 1, FALSE, FALSE); + init_thunk(&thunks[35], r, winIVRCompositor_IVRCompositor_026_GetMirrorTextureGL, 3, FALSE, FALSE); + init_thunk(&thunks[36], r, winIVRCompositor_IVRCompositor_026_ReleaseSharedGLTexture, 2, FALSE, FALSE); + init_thunk(&thunks[37], r, winIVRCompositor_IVRCompositor_026_LockGLSharedTextureForAccess, 1, FALSE, FALSE); + init_thunk(&thunks[38], r, winIVRCompositor_IVRCompositor_026_UnlockGLSharedTextureForAccess, 1, FALSE, FALSE); + init_thunk(&thunks[39], r, winIVRCompositor_IVRCompositor_026_GetVulkanInstanceExtensionsRequired, 2, FALSE, FALSE); + init_thunk(&thunks[40], r, winIVRCompositor_IVRCompositor_026_GetVulkanDeviceExtensionsRequired, 3, FALSE, FALSE); + init_thunk(&thunks[41], r, winIVRCompositor_IVRCompositor_026_SetExplicitTimingMode, 1, FALSE, FALSE); + init_thunk(&thunks[42], r, winIVRCompositor_IVRCompositor_026_SubmitExplicitTimingData, 0, FALSE, FALSE); + init_thunk(&thunks[43], r, winIVRCompositor_IVRCompositor_026_IsMotionSmoothingEnabled, 0, FALSE, FALSE); + init_thunk(&thunks[44], r, winIVRCompositor_IVRCompositor_026_IsMotionSmoothingSupported, 0, FALSE, FALSE); + init_thunk(&thunks[45], r, winIVRCompositor_IVRCompositor_026_IsCurrentSceneFocusAppLoading, 0, FALSE, FALSE); + init_thunk(&thunks[46], r, winIVRCompositor_IVRCompositor_026_SetStageOverride_Async, 4, FALSE, FALSE); + init_thunk(&thunks[47], r, winIVRCompositor_IVRCompositor_026_ClearStageOverride, 0, FALSE, FALSE); + init_thunk(&thunks[48], r, winIVRCompositor_IVRCompositor_026_GetCompositorBenchmarkResults, 2, FALSE, FALSE); + init_thunk(&thunks[49], r, winIVRCompositor_IVRCompositor_026_GetLastPosePredictionIDs, 2, FALSE, FALSE); + init_thunk(&thunks[50], r, winIVRCompositor_IVRCompositor_026_GetPosesForFrame, 3, FALSE, FALSE); + for (i = 0; i < 51; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRCompositor_IVRCompositor_026_FnTable(void *object) +{ + winIVRCompositor_IVRCompositor_026 *win_object = object; + TRACE("%p\n", win_object); + destroy_compositor_data(&win_object->user_data); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + +#include "cppIVRCompositor_IVRCompositor_024.h" + +typedef struct __winIVRCompositor_IVRCompositor_024 { + vtable_ptr *vtable; + void *linux_side; + struct compositor_data user_data; +} winIVRCompositor_IVRCompositor_024; + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_SetTrackingSpace, 8) +void __thiscall winIVRCompositor_IVRCompositor_024_SetTrackingSpace(winIVRCompositor_IVRCompositor_024 *_this, ETrackingUniverseOrigin eOrigin) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_SetTrackingSpace(_this->linux_side, eOrigin); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetTrackingSpace, 4) +ETrackingUniverseOrigin __thiscall winIVRCompositor_IVRCompositor_024_GetTrackingSpace(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetTrackingSpace(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_WaitGetPoses, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_WaitGetPoses(winIVRCompositor_IVRCompositor_024 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return ivrcompositor_wait_get_poses(cppIVRCompositor_IVRCompositor_024_WaitGetPoses, _this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount, 24, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetLastPoses, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_GetLastPoses(winIVRCompositor_IVRCompositor_024 *_this, TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetLastPoses(_this->linux_side, pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(winIVRCompositor_IVRCompositor_024 *_this, TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t * pOutputPose, TrackedDevicePose_t * pOutputGamePose) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex(_this->linux_side, unDeviceIndex, pOutputPose, pOutputGamePose); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_Submit, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_Submit(winIVRCompositor_IVRCompositor_024 *_this, EVREye eEye, Texture_t * pTexture, VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags) +{ + TRACE("%p\n", _this); + return ivrcompositor_submit(cppIVRCompositor_IVRCompositor_024_Submit, _this->linux_side, eEye, pTexture, pBounds, nSubmitFlags, 24, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_PostPresentHandoff, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_PostPresentHandoff(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + ivrcompositor_post_present_handoff(cppIVRCompositor_IVRCompositor_024_PostPresentHandoff, _this->linux_side, 24, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetFrameTiming, 12) +bool __thiscall winIVRCompositor_IVRCompositor_024_GetFrameTiming(winIVRCompositor_IVRCompositor_024 *_this, Compositor_FrameTiming * pTiming, uint32_t unFramesAgo) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetFrameTiming(_this->linux_side, pTiming, unFramesAgo); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetFrameTimings, 12) +uint32_t __thiscall winIVRCompositor_IVRCompositor_024_GetFrameTimings(winIVRCompositor_IVRCompositor_024 *_this, Compositor_FrameTiming * pTiming, uint32_t nFrames) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetFrameTimings(_this->linux_side, pTiming, nFrames); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining, 4) +float __thiscall winIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetCumulativeStats, 12) +void __thiscall winIVRCompositor_IVRCompositor_024_GetCumulativeStats(winIVRCompositor_IVRCompositor_024 *_this, Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_GetCumulativeStats(_this->linux_side, pStats, nStatsSizeInBytes); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_FadeToColor, 25) +void __thiscall winIVRCompositor_IVRCompositor_024_FadeToColor(winIVRCompositor_IVRCompositor_024 *_this, float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_FadeToColor(_this->linux_side, fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetCurrentFadeColor, 9) +HmdColor_t *__thiscall winIVRCompositor_IVRCompositor_024_GetCurrentFadeColor(winIVRCompositor_IVRCompositor_024 *_this, HmdColor_t *_r, bool bBackground) +{ + TRACE("%p\n", _this); + *_r = cppIVRCompositor_IVRCompositor_024_GetCurrentFadeColor(_this->linux_side, bBackground); + return _r; +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_FadeGrid, 9) +void __thiscall winIVRCompositor_IVRCompositor_024_FadeGrid(winIVRCompositor_IVRCompositor_024 *_this, float fSeconds, bool bFadeIn) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_FadeGrid(_this->linux_side, fSeconds, bFadeIn); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha, 4) +float __thiscall winIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_SetSkyboxOverride, 12) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_SetSkyboxOverride(winIVRCompositor_IVRCompositor_024 *_this, Texture_t * pTextures, uint32_t unTextureCount) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_SetSkyboxOverride(_this->linux_side, pTextures, unTextureCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ClearSkyboxOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_ClearSkyboxOverride(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ClearSkyboxOverride(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_CompositorBringToFront, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_CompositorBringToFront(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_CompositorBringToFront(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_CompositorGoToBack, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_CompositorGoToBack(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_CompositorGoToBack(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_CompositorQuit, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_CompositorQuit(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_CompositorQuit(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_IsFullscreen, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_IsFullscreen(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_IsFullscreen(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetLastFrameRenderer, 4) +uint32_t __thiscall winIVRCompositor_IVRCompositor_024_GetLastFrameRenderer(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetLastFrameRenderer(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_CanRenderScene, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_CanRenderScene(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_CanRenderScene(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ShowMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_ShowMirrorWindow(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ShowMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_HideMirrorWindow, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_HideMirrorWindow(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_HideMirrorWindow(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_CompositorDumpImages, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_CompositorDumpImages(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_CompositorDumpImages(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn, 5) +void __thiscall winIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn(winIVRCompositor_IVRCompositor_024 *_this, bool bOverride) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn(_this->linux_side, bOverride); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ForceReconnectProcess, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_ForceReconnectProcess(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ForceReconnectProcess(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_SuspendRendering, 5) +void __thiscall winIVRCompositor_IVRCompositor_024_SuspendRendering(winIVRCompositor_IVRCompositor_024 *_this, bool bSuspend) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_SuspendRendering(_this->linux_side, bSuspend); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11(winIVRCompositor_IVRCompositor_024 *_this, EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11(_this->linux_side, eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11, 8) +void __thiscall winIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11(winIVRCompositor_IVRCompositor_024 *_this, void * pD3D11ShaderResourceView) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11(_this->linux_side, pD3D11ShaderResourceView); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetMirrorTextureGL, 16) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_GetMirrorTextureGL(winIVRCompositor_IVRCompositor_024 *_this, EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetMirrorTextureGL(_this->linux_side, eEye, pglTextureId, pglSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture, 12) +bool __thiscall winIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture(winIVRCompositor_IVRCompositor_024 *_this, glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture(_this->linux_side, glTextureId, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess, 8) +void __thiscall winIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_024 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess, 8) +void __thiscall winIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess(winIVRCompositor_IVRCompositor_024 *_this, glSharedTextureHandle_t glSharedTextureHandle) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess(_this->linux_side, glSharedTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired, 12) +uint32_t __thiscall winIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired(winIVRCompositor_IVRCompositor_024 *_this, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired(_this->linux_side, pchValue, unBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired, 16) +uint32_t __thiscall winIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired(winIVRCompositor_IVRCompositor_024 *_this, VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize) +{ + TRACE("%p\n", _this); + return ivrcompositor_get_vulkan_device_extensions_required(cppIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired, _this->linux_side, pPhysicalDevice, pchValue, unBufferSize, 24, &_this->user_data); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_SetExplicitTimingMode, 8) +void __thiscall winIVRCompositor_IVRCompositor_024_SetExplicitTimingMode(winIVRCompositor_IVRCompositor_024 *_this, EVRCompositorTimingMode eTimingMode) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_SetExplicitTimingMode(_this->linux_side, eTimingMode); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData, 4) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading, 4) +bool __thiscall winIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_SetStageOverride_Async, 20) +EVRCompositorError __thiscall winIVRCompositor_IVRCompositor_024_SetStageOverride_Async(winIVRCompositor_IVRCompositor_024 *_this, const char * pchRenderModelPath, HmdMatrix34_t * pTransform, Compositor_StageRenderSettings * pRenderSettings, uint32_t nSizeOfRenderSettings) +{ + char lin_pchRenderModelPath[PATH_MAX]; + vrclient_dos_path_to_unix_path(pchRenderModelPath, lin_pchRenderModelPath); + TRACE("%p\n", _this); + return cppIVRCompositor_IVRCompositor_024_SetStageOverride_Async(_this->linux_side, pchRenderModelPath ? lin_pchRenderModelPath : NULL, pTransform, pRenderSettings, nSizeOfRenderSettings); +} + +DEFINE_THISCALL_WRAPPER(winIVRCompositor_IVRCompositor_024_ClearStageOverride, 4) +void __thiscall winIVRCompositor_IVRCompositor_024_ClearStageOverride(winIVRCompositor_IVRCompositor_024 *_this) +{ + TRACE("%p\n", _this); + cppIVRCompositor_IVRCompositor_024_ClearStageOverride(_this->linux_side); +} + +extern vtable_ptr winIVRCompositor_IVRCompositor_024_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRCompositor_IVRCompositor_024, + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_SetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetTrackingSpace) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_WaitGetPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetLastPoses) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_Submit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_PostPresentHandoff) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetFrameTiming) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetFrameTimings) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetCumulativeStats) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_FadeToColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetCurrentFadeColor) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_FadeGrid) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_SetSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ClearSkyboxOverride) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_CompositorBringToFront) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_CompositorGoToBack) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_CompositorQuit) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_IsFullscreen) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetLastFrameRenderer) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_CanRenderScene) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ShowMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_HideMirrorWindow) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_CompositorDumpImages) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ForceReconnectProcess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_SuspendRendering) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetMirrorTextureGL) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_SetExplicitTimingMode) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_SetStageOverride_Async) + VTABLE_ADD_FUNC(winIVRCompositor_IVRCompositor_024_ClearStageOverride) + ); +#ifndef __GNUC__ +} +#endif + +winIVRCompositor_IVRCompositor_024 *create_winIVRCompositor_IVRCompositor_024(void *linux_side) +{ + winIVRCompositor_IVRCompositor_024 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRCompositor_IVRCompositor_024)); + TRACE("-> %p\n", r); + r->vtable = &winIVRCompositor_IVRCompositor_024_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRCompositor_IVRCompositor_024(void *object) +{ + TRACE("%p\n", object); + struct __winIVRCompositor_IVRCompositor_024 *win_object = object; + destroy_compositor_data(&win_object->user_data); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRCompositor_IVRCompositor_024 *create_winIVRCompositor_IVRCompositor_024_FnTable(void *linux_side) +{ + winIVRCompositor_IVRCompositor_024 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRCompositor_IVRCompositor_024)); + struct thunk *thunks = alloc_thunks(48); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 48 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRCompositor_IVRCompositor_024_SetTrackingSpace, 1, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRCompositor_IVRCompositor_024_GetTrackingSpace, 0, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRCompositor_IVRCompositor_024_WaitGetPoses, 4, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRCompositor_IVRCompositor_024_GetLastPoses, 4, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVRCompositor_IVRCompositor_024_GetLastPoseForTrackedDeviceIndex, 3, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVRCompositor_IVRCompositor_024_Submit, 4, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVRCompositor_IVRCompositor_024_ClearLastSubmittedFrame, 0, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVRCompositor_IVRCompositor_024_PostPresentHandoff, 0, FALSE, FALSE); + init_thunk(&thunks[8], r, winIVRCompositor_IVRCompositor_024_GetFrameTiming, 2, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVRCompositor_IVRCompositor_024_GetFrameTimings, 2, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVRCompositor_IVRCompositor_024_GetFrameTimeRemaining, 0, FALSE, FALSE); + init_thunk(&thunks[11], r, winIVRCompositor_IVRCompositor_024_GetCumulativeStats, 2, FALSE, FALSE); + init_thunk(&thunks[12], r, winIVRCompositor_IVRCompositor_024_FadeToColor, 6, TRUE, TRUE); + init_thunk(&thunks[13], r, winIVRCompositor_IVRCompositor_024_GetCurrentFadeColor, 2, FALSE, FALSE); + init_thunk(&thunks[14], r, winIVRCompositor_IVRCompositor_024_FadeGrid, 2, TRUE, FALSE); + init_thunk(&thunks[15], r, winIVRCompositor_IVRCompositor_024_GetCurrentGridAlpha, 0, FALSE, FALSE); + init_thunk(&thunks[16], r, winIVRCompositor_IVRCompositor_024_SetSkyboxOverride, 2, FALSE, FALSE); + init_thunk(&thunks[17], r, winIVRCompositor_IVRCompositor_024_ClearSkyboxOverride, 0, FALSE, FALSE); + init_thunk(&thunks[18], r, winIVRCompositor_IVRCompositor_024_CompositorBringToFront, 0, FALSE, FALSE); + init_thunk(&thunks[19], r, winIVRCompositor_IVRCompositor_024_CompositorGoToBack, 0, FALSE, FALSE); + init_thunk(&thunks[20], r, winIVRCompositor_IVRCompositor_024_CompositorQuit, 0, FALSE, FALSE); + init_thunk(&thunks[21], r, winIVRCompositor_IVRCompositor_024_IsFullscreen, 0, FALSE, FALSE); + init_thunk(&thunks[22], r, winIVRCompositor_IVRCompositor_024_GetCurrentSceneFocusProcess, 0, FALSE, FALSE); + init_thunk(&thunks[23], r, winIVRCompositor_IVRCompositor_024_GetLastFrameRenderer, 0, FALSE, FALSE); + init_thunk(&thunks[24], r, winIVRCompositor_IVRCompositor_024_CanRenderScene, 0, FALSE, FALSE); + init_thunk(&thunks[25], r, winIVRCompositor_IVRCompositor_024_ShowMirrorWindow, 0, FALSE, FALSE); + init_thunk(&thunks[26], r, winIVRCompositor_IVRCompositor_024_HideMirrorWindow, 0, FALSE, FALSE); + init_thunk(&thunks[27], r, winIVRCompositor_IVRCompositor_024_IsMirrorWindowVisible, 0, FALSE, FALSE); + init_thunk(&thunks[28], r, winIVRCompositor_IVRCompositor_024_CompositorDumpImages, 0, FALSE, FALSE); + init_thunk(&thunks[29], r, winIVRCompositor_IVRCompositor_024_ShouldAppRenderWithLowResources, 0, FALSE, FALSE); + init_thunk(&thunks[30], r, winIVRCompositor_IVRCompositor_024_ForceInterleavedReprojectionOn, 1, FALSE, FALSE); + init_thunk(&thunks[31], r, winIVRCompositor_IVRCompositor_024_ForceReconnectProcess, 0, FALSE, FALSE); + init_thunk(&thunks[32], r, winIVRCompositor_IVRCompositor_024_SuspendRendering, 1, FALSE, FALSE); + init_thunk(&thunks[33], r, winIVRCompositor_IVRCompositor_024_GetMirrorTextureD3D11, 3, FALSE, FALSE); + init_thunk(&thunks[34], r, winIVRCompositor_IVRCompositor_024_ReleaseMirrorTextureD3D11, 1, FALSE, FALSE); + init_thunk(&thunks[35], r, winIVRCompositor_IVRCompositor_024_GetMirrorTextureGL, 3, FALSE, FALSE); + init_thunk(&thunks[36], r, winIVRCompositor_IVRCompositor_024_ReleaseSharedGLTexture, 2, FALSE, FALSE); + init_thunk(&thunks[37], r, winIVRCompositor_IVRCompositor_024_LockGLSharedTextureForAccess, 1, FALSE, FALSE); + init_thunk(&thunks[38], r, winIVRCompositor_IVRCompositor_024_UnlockGLSharedTextureForAccess, 1, FALSE, FALSE); + init_thunk(&thunks[39], r, winIVRCompositor_IVRCompositor_024_GetVulkanInstanceExtensionsRequired, 2, FALSE, FALSE); + init_thunk(&thunks[40], r, winIVRCompositor_IVRCompositor_024_GetVulkanDeviceExtensionsRequired, 3, FALSE, FALSE); + init_thunk(&thunks[41], r, winIVRCompositor_IVRCompositor_024_SetExplicitTimingMode, 1, FALSE, FALSE); + init_thunk(&thunks[42], r, winIVRCompositor_IVRCompositor_024_SubmitExplicitTimingData, 0, FALSE, FALSE); + init_thunk(&thunks[43], r, winIVRCompositor_IVRCompositor_024_IsMotionSmoothingEnabled, 0, FALSE, FALSE); + init_thunk(&thunks[44], r, winIVRCompositor_IVRCompositor_024_IsMotionSmoothingSupported, 0, FALSE, FALSE); + init_thunk(&thunks[45], r, winIVRCompositor_IVRCompositor_024_IsCurrentSceneFocusAppLoading, 0, FALSE, FALSE); + init_thunk(&thunks[46], r, winIVRCompositor_IVRCompositor_024_SetStageOverride_Async, 4, FALSE, FALSE); + init_thunk(&thunks[47], r, winIVRCompositor_IVRCompositor_024_ClearStageOverride, 0, FALSE, FALSE); + for (i = 0; i < 48; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRCompositor_IVRCompositor_024_FnTable(void *object) +{ + winIVRCompositor_IVRCompositor_024 *win_object = object; + TRACE("%p\n", win_object); + destroy_compositor_data(&win_object->user_data); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + #include "cppIVRCompositor_IVRCompositor_022.h" typedef struct __winIVRCompositor_IVRCompositor_022 { diff --git a/vrclient_x64/vrclient_x64/winIVRControlPanel.c b/vrclient_x64/vrclient_x64/winIVRControlPanel.c new file mode 100644 index 0000000000..91489ea420 --- /dev/null +++ b/vrclient_x64/vrclient_x64/winIVRControlPanel.c @@ -0,0 +1,333 @@ +/* This file is auto-generated, do not edit. */ +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +#include "flatapi.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRControlPanel_IVRControlPanel_006.h" + +typedef struct __winIVRControlPanel_IVRControlPanel_006 { + vtable_ptr *vtable; + void *linux_side; +} winIVRControlPanel_IVRControlPanel_006; + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc1, 4) +uint32_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc1(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc1(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc2, 16) +uint32_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc2(winIVRControlPanel_IVRControlPanel_006 *_this, uint32_t a, char * b, uint32_t c) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc2(_this->linux_side, a, b, c); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc3, 8) +EVRInitError __thiscall winIVRControlPanel_IVRControlPanel_006_undoc3(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc3(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc4, 8) +uint32_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc4(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc4(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc5, 20) +uint32_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc5(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a, uint32_t b, char * c, uint32_t d) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc5(_this->linux_side, a, b, c, d); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc6, 20) +uint32_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc6(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a, const char * b, char * c, uint32_t d) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc6(_this->linux_side, a, b, c, d); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc7, 20) +uint32_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc7(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a, const char * b, char * c, uint32_t d) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc7(_this->linux_side, a, b, c, d); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc8, 8) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc8(winIVRControlPanel_IVRControlPanel_006 *_this, uint32_t a) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc8(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc9, 4) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc9(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc9(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc10, 4) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc10(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc10(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc11, 8) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc11(winIVRControlPanel_IVRControlPanel_006 *_this, uint32_t a) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc11(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc12, 4) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc12(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc12(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc13, 8) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc13(winIVRControlPanel_IVRControlPanel_006 *_this, TrackedDeviceIndex_t a) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc13(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc14, 8) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc14(winIVRControlPanel_IVRControlPanel_006 *_this, EVRState a) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc14(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc15, 4) +EVRState __thiscall winIVRControlPanel_IVRControlPanel_006_undoc15(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc15(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc16, 5) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc16(winIVRControlPanel_IVRControlPanel_006 *_this, bool a) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc16(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc17, 4) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc17(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc17(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc18, 4) +EVRApplicationError __thiscall winIVRControlPanel_IVRControlPanel_006_undoc18(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc18(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc19, 5) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc19(winIVRControlPanel_IVRControlPanel_006 *_this, bool a) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc19(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc20, 4) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc20(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc20(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc21, 4) +EVRInitError __thiscall winIVRControlPanel_IVRControlPanel_006_undoc21(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc21(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc22, 28) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc22(winIVRControlPanel_IVRControlPanel_006 *_this, WebConsoleHandle_t a, const char * b, uint32_t c, uint32_t d, const char * e) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc22(_this->linux_side, a, b, c, d, e); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc23, 8) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc23(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a) +{ + char lin_a[PATH_MAX]; + vrclient_dos_path_to_unix_path(a, lin_a); + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc23(_this->linux_side, a ? lin_a : NULL); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc24, 4) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc24(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc24(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc25, 5) +bool __thiscall winIVRControlPanel_IVRControlPanel_006_undoc25(winIVRControlPanel_IVRControlPanel_006 *_this, bool a) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc25(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc26, 4) +uint64_t __thiscall winIVRControlPanel_IVRControlPanel_006_undoc26(winIVRControlPanel_IVRControlPanel_006 *_this) +{ + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc26(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc27, 8) +EVRCompositorError __thiscall winIVRControlPanel_IVRControlPanel_006_undoc27(winIVRControlPanel_IVRControlPanel_006 *_this, const char * a) +{ + char lin_a[PATH_MAX]; + vrclient_dos_path_to_unix_path(a, lin_a); + TRACE("%p\n", _this); + return cppIVRControlPanel_IVRControlPanel_006_undoc27(_this->linux_side, a ? lin_a : NULL); +} + +DEFINE_THISCALL_WRAPPER(winIVRControlPanel_IVRControlPanel_006_undoc28, 12) +void __thiscall winIVRControlPanel_IVRControlPanel_006_undoc28(winIVRControlPanel_IVRControlPanel_006 *_this, VROverlayHandle_t a) +{ + TRACE("%p\n", _this); + cppIVRControlPanel_IVRControlPanel_006_undoc28(_this->linux_side, a); +} + +extern vtable_ptr winIVRControlPanel_IVRControlPanel_006_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRControlPanel_IVRControlPanel_006, + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc1) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc2) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc3) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc4) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc5) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc6) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc7) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc8) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc9) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc10) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc11) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc12) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc13) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc14) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc15) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc16) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc17) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc18) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc19) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc20) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc21) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc22) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc23) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc24) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc25) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc26) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc27) + VTABLE_ADD_FUNC(winIVRControlPanel_IVRControlPanel_006_undoc28) + ); +#ifndef __GNUC__ +} +#endif + +winIVRControlPanel_IVRControlPanel_006 *create_winIVRControlPanel_IVRControlPanel_006(void *linux_side) +{ + winIVRControlPanel_IVRControlPanel_006 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRControlPanel_IVRControlPanel_006)); + TRACE("-> %p\n", r); + r->vtable = &winIVRControlPanel_IVRControlPanel_006_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRControlPanel_IVRControlPanel_006(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRControlPanel_IVRControlPanel_006 *create_winIVRControlPanel_IVRControlPanel_006_FnTable(void *linux_side) +{ + winIVRControlPanel_IVRControlPanel_006 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRControlPanel_IVRControlPanel_006)); + struct thunk *thunks = alloc_thunks(28); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 28 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRControlPanel_IVRControlPanel_006_undoc1, 0, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRControlPanel_IVRControlPanel_006_undoc2, 3, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRControlPanel_IVRControlPanel_006_undoc3, 1, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRControlPanel_IVRControlPanel_006_undoc4, 1, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVRControlPanel_IVRControlPanel_006_undoc5, 4, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVRControlPanel_IVRControlPanel_006_undoc6, 4, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVRControlPanel_IVRControlPanel_006_undoc7, 4, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVRControlPanel_IVRControlPanel_006_undoc8, 1, FALSE, FALSE); + init_thunk(&thunks[8], r, winIVRControlPanel_IVRControlPanel_006_undoc9, 0, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVRControlPanel_IVRControlPanel_006_undoc10, 0, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVRControlPanel_IVRControlPanel_006_undoc11, 1, FALSE, FALSE); + init_thunk(&thunks[11], r, winIVRControlPanel_IVRControlPanel_006_undoc12, 0, FALSE, FALSE); + init_thunk(&thunks[12], r, winIVRControlPanel_IVRControlPanel_006_undoc13, 1, FALSE, FALSE); + init_thunk(&thunks[13], r, winIVRControlPanel_IVRControlPanel_006_undoc14, 1, FALSE, FALSE); + init_thunk(&thunks[14], r, winIVRControlPanel_IVRControlPanel_006_undoc15, 0, FALSE, FALSE); + init_thunk(&thunks[15], r, winIVRControlPanel_IVRControlPanel_006_undoc16, 1, FALSE, FALSE); + init_thunk(&thunks[16], r, winIVRControlPanel_IVRControlPanel_006_undoc17, 0, FALSE, FALSE); + init_thunk(&thunks[17], r, winIVRControlPanel_IVRControlPanel_006_undoc18, 0, FALSE, FALSE); + init_thunk(&thunks[18], r, winIVRControlPanel_IVRControlPanel_006_undoc19, 1, FALSE, FALSE); + init_thunk(&thunks[19], r, winIVRControlPanel_IVRControlPanel_006_undoc20, 0, FALSE, FALSE); + init_thunk(&thunks[20], r, winIVRControlPanel_IVRControlPanel_006_undoc21, 0, FALSE, FALSE); + init_thunk(&thunks[21], r, winIVRControlPanel_IVRControlPanel_006_undoc22, 5, FALSE, FALSE); + init_thunk(&thunks[22], r, winIVRControlPanel_IVRControlPanel_006_undoc23, 1, FALSE, FALSE); + init_thunk(&thunks[23], r, winIVRControlPanel_IVRControlPanel_006_undoc24, 0, FALSE, FALSE); + init_thunk(&thunks[24], r, winIVRControlPanel_IVRControlPanel_006_undoc25, 1, FALSE, FALSE); + init_thunk(&thunks[25], r, winIVRControlPanel_IVRControlPanel_006_undoc26, 0, FALSE, FALSE); + init_thunk(&thunks[26], r, winIVRControlPanel_IVRControlPanel_006_undoc27, 1, FALSE, FALSE); + init_thunk(&thunks[27], r, winIVRControlPanel_IVRControlPanel_006_undoc28, 1, FALSE, FALSE); + for (i = 0; i < 28; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRControlPanel_IVRControlPanel_006_FnTable(void *object) +{ + winIVRControlPanel_IVRControlPanel_006 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + diff --git a/vrclient_x64/vrclient_x64/winIVRHeadsetView.c b/vrclient_x64/vrclient_x64/winIVRHeadsetView.c new file mode 100644 index 0000000000..ec11b257fb --- /dev/null +++ b/vrclient_x64/vrclient_x64/winIVRHeadsetView.c @@ -0,0 +1,158 @@ +/* This file is auto-generated, do not edit. */ +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +#include "flatapi.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRHeadsetView_IVRHeadsetView_001.h" + +typedef struct __winIVRHeadsetView_IVRHeadsetView_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRHeadsetView_IVRHeadsetView_001; + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize, 12) +void __thiscall winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize(winIVRHeadsetView_IVRHeadsetView_001 *_this, uint32_t nWidth, uint32_t nHeight) +{ + TRACE("%p\n", _this); + cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize(_this->linux_side, nWidth, nHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize, 12) +void __thiscall winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize(winIVRHeadsetView_IVRHeadsetView_001 *_this, uint32_t * pnWidth, uint32_t * pnHeight) +{ + TRACE("%p\n", _this); + cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize(_this->linux_side, pnWidth, pnHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode, 8) +void __thiscall winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode(winIVRHeadsetView_IVRHeadsetView_001 *_this, HeadsetViewMode_t eHeadsetViewMode) +{ + TRACE("%p\n", _this); + cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode(_this->linux_side, eHeadsetViewMode); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode, 4) +HeadsetViewMode_t __thiscall winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode(winIVRHeadsetView_IVRHeadsetView_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped, 5) +void __thiscall winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped(winIVRHeadsetView_IVRHeadsetView_001 *_this, bool bCropped) +{ + TRACE("%p\n", _this); + cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped(_this->linux_side, bCropped); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped, 4) +bool __thiscall winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped(winIVRHeadsetView_IVRHeadsetView_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio, 4) +float __thiscall winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio(winIVRHeadsetView_IVRHeadsetView_001 *_this) +{ + TRACE("%p\n", _this); + return cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange, 12) +void __thiscall winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange(winIVRHeadsetView_IVRHeadsetView_001 *_this, float flStartPct, float flEndPct) +{ + TRACE("%p\n", _this); + cppIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange(_this->linux_side, flStartPct, flEndPct); +} + +DEFINE_THISCALL_WRAPPER(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange, 12) +void __thiscall winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange(winIVRHeadsetView_IVRHeadsetView_001 *_this, float * pStartPct, float * pEndPct) +{ + TRACE("%p\n", _this); + cppIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange(_this->linux_side, pStartPct, pEndPct); +} + +extern vtable_ptr winIVRHeadsetView_IVRHeadsetView_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRHeadsetView_IVRHeadsetView_001, + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange) + VTABLE_ADD_FUNC(winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange) + ); +#ifndef __GNUC__ +} +#endif + +winIVRHeadsetView_IVRHeadsetView_001 *create_winIVRHeadsetView_IVRHeadsetView_001(void *linux_side) +{ + winIVRHeadsetView_IVRHeadsetView_001 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRHeadsetView_IVRHeadsetView_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRHeadsetView_IVRHeadsetView_001_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRHeadsetView_IVRHeadsetView_001(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRHeadsetView_IVRHeadsetView_001 *create_winIVRHeadsetView_IVRHeadsetView_001_FnTable(void *linux_side) +{ + winIVRHeadsetView_IVRHeadsetView_001 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRHeadsetView_IVRHeadsetView_001)); + struct thunk *thunks = alloc_thunks(9); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 9 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewSize, 2, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewSize, 2, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewMode, 1, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewMode, 0, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewCropped, 1, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewCropped, 0, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewAspectRatio, 0, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVRHeadsetView_IVRHeadsetView_001_SetHeadsetViewBlendRange, 2, TRUE, FALSE); + init_thunk(&thunks[8], r, winIVRHeadsetView_IVRHeadsetView_001_GetHeadsetViewBlendRange, 2, FALSE, FALSE); + for (i = 0; i < 9; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRHeadsetView_IVRHeadsetView_001_FnTable(void *object) +{ + winIVRHeadsetView_IVRHeadsetView_001 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + diff --git a/vrclient_x64/vrclient_x64/winIVRInput.c b/vrclient_x64/vrclient_x64/winIVRInput.c index f5c2ccdfa3..170cfd47f6 100644 --- a/vrclient_x64/vrclient_x64/winIVRInput.c +++ b/vrclient_x64/vrclient_x64/winIVRInput.c @@ -18,6 +18,353 @@ WINE_DEFAULT_DEBUG_CHANNEL(vrclient); +#include "cppIVRInput_IVRInput_010.h" + +typedef struct __winIVRInput_IVRInput_010 { + vtable_ptr *vtable; + void *linux_side; +} winIVRInput_IVRInput_010; + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_SetActionManifestPath, 8) +EVRInputError __thiscall winIVRInput_IVRInput_010_SetActionManifestPath(winIVRInput_IVRInput_010 *_this, const char * pchActionManifestPath) +{ + char lin_pchActionManifestPath[PATH_MAX]; + vrclient_dos_path_to_unix_path(pchActionManifestPath, lin_pchActionManifestPath); + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_SetActionManifestPath(_this->linux_side, pchActionManifestPath ? lin_pchActionManifestPath : NULL); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetActionSetHandle, 12) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetActionSetHandle(winIVRInput_IVRInput_010 *_this, const char * pchActionSetName, VRActionSetHandle_t * pHandle) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetActionSetHandle(_this->linux_side, pchActionSetName, pHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetActionHandle, 12) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetActionHandle(winIVRInput_IVRInput_010 *_this, const char * pchActionName, VRActionHandle_t * pHandle) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetActionHandle(_this->linux_side, pchActionName, pHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetInputSourceHandle, 12) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetInputSourceHandle(winIVRInput_IVRInput_010 *_this, const char * pchInputSourcePath, VRInputValueHandle_t * pHandle) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetInputSourceHandle(_this->linux_side, pchInputSourcePath, pHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_UpdateActionState, 16) +EVRInputError __thiscall winIVRInput_IVRInput_010_UpdateActionState(winIVRInput_IVRInput_010 *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_UpdateActionState(_this->linux_side, pSets, unSizeOfVRSelectedActionSet_t, unSetCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetDigitalActionData, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetDigitalActionData(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, winInputDigitalActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetDigitalActionData(_this->linux_side, action, pActionData, unActionDataSize, ulRestrictToDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetAnalogActionData, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetAnalogActionData(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, winInputAnalogActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetAnalogActionData(_this->linux_side, action, pActionData, unActionDataSize, ulRestrictToDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow, 36) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, winInputPoseActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow(_this->linux_side, action, eOrigin, fPredictedSecondsFromNow, pActionData, unActionDataSize, ulRestrictToDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetPoseActionDataForNextFrame, 32) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetPoseActionDataForNextFrame(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, winInputPoseActionData_t_11030 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetPoseActionDataForNextFrame(_this->linux_side, action, eOrigin, pActionData, unActionDataSize, ulRestrictToDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetSkeletalActionData, 20) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetSkeletalActionData(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, winInputSkeletalActionData_t_11030 * pActionData, uint32_t unActionDataSize) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetSkeletalActionData(_this->linux_side, action, pActionData, unActionDataSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetDominantHand, 8) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetDominantHand(winIVRInput_IVRInput_010 *_this, ETrackedControllerRole * peDominantHand) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetDominantHand(_this->linux_side, peDominantHand); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_SetDominantHand, 8) +EVRInputError __thiscall winIVRInput_IVRInput_010_SetDominantHand(winIVRInput_IVRInput_010 *_this, ETrackedControllerRole eDominantHand) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_SetDominantHand(_this->linux_side, eDominantHand); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetBoneCount, 16) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetBoneCount(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, uint32_t * pBoneCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetBoneCount(_this->linux_side, action, pBoneCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetBoneHierarchy, 20) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetBoneHierarchy(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, BoneIndex_t * pParentIndices, uint32_t unIndexArayCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetBoneHierarchy(_this->linux_side, action, pParentIndices, unIndexArayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetBoneName, 24) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetBoneName(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, BoneIndex_t nBoneIndex, char * pchBoneName, uint32_t unNameBufferSize) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetBoneName(_this->linux_side, action, nBoneIndex, pchBoneName, unNameBufferSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetSkeletalReferenceTransforms, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetSkeletalReferenceTransforms(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetSkeletalReferenceTransforms(_this->linux_side, action, eTransformSpace, eReferencePose, pTransformArray, unTransformArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetSkeletalTrackingLevel, 16) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetSkeletalTrackingLevel(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, EVRSkeletalTrackingLevel * pSkeletalTrackingLevel) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetSkeletalTrackingLevel(_this->linux_side, action, pSkeletalTrackingLevel); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetSkeletalBoneData, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetSkeletalBoneData(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetSkeletalBoneData(_this->linux_side, action, eTransformSpace, eMotionRange, pTransformArray, unTransformArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetSkeletalSummaryData, 20) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetSkeletalSummaryData(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, EVRSummaryType eSummaryType, VRSkeletalSummaryData_t * pSkeletalSummaryData) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetSkeletalSummaryData(_this->linux_side, action, eSummaryType, pSkeletalSummaryData); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, EVRSkeletalMotionRange eMotionRange, void * pvCompressedData, uint32_t unCompressedSize, uint32_t * punRequiredCompressedSize) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed(_this->linux_side, action, eMotionRange, pvCompressedData, unCompressedSize, punRequiredCompressedSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_DecompressSkeletalBoneData, 24) +EVRInputError __thiscall winIVRInput_IVRInput_010_DecompressSkeletalBoneData(winIVRInput_IVRInput_010 *_this, const void * pvCompressedBuffer, uint32_t unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, VRBoneTransform_t * pTransformArray, uint32_t unTransformArrayCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_DecompressSkeletalBoneData(_this->linux_side, pvCompressedBuffer, unCompressedBufferSize, eTransformSpace, pTransformArray, unTransformArrayCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_TriggerHapticVibrationAction, 36) +EVRInputError __thiscall winIVRInput_IVRInput_010_TriggerHapticVibrationAction(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, VRInputValueHandle_t ulRestrictToDevice) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_TriggerHapticVibrationAction(_this->linux_side, action, fStartSecondsFromNow, fDurationSeconds, fFrequency, fAmplitude, ulRestrictToDevice); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetActionOrigins, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetActionOrigins(winIVRInput_IVRInput_010 *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t digitalActionHandle, VRInputValueHandle_t * originsOut, uint32_t originOutCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetActionOrigins(_this->linux_side, actionSetHandle, digitalActionHandle, originsOut, originOutCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetOriginLocalizedName, 24) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetOriginLocalizedName(winIVRInput_IVRInput_010 *_this, VRInputValueHandle_t origin, char * pchNameArray, uint32_t unNameArraySize, int32_t unStringSectionsToInclude) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetOriginLocalizedName(_this->linux_side, origin, pchNameArray, unNameArraySize, unStringSectionsToInclude); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo, 20) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo(winIVRInput_IVRInput_010 *_this, VRInputValueHandle_t origin, InputOriginInfo_t * pOriginInfo, uint32_t unOriginInfoSize) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo(_this->linux_side, origin, pOriginInfo, unOriginInfoSize); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetActionBindingInfo, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetActionBindingInfo(winIVRInput_IVRInput_010 *_this, VRActionHandle_t action, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, uint32_t * punReturnedBindingInfoCount) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetActionBindingInfo(_this->linux_side, action, pOriginInfo, unBindingInfoSize, unBindingInfoCount, punReturnedBindingInfoCount); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_ShowActionOrigins, 20) +EVRInputError __thiscall winIVRInput_IVRInput_010_ShowActionOrigins(winIVRInput_IVRInput_010 *_this, VRActionSetHandle_t actionSetHandle, VRActionHandle_t ulActionHandle) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_ShowActionOrigins(_this->linux_side, actionSetHandle, ulActionHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_ShowBindingsForActionSet, 24) +EVRInputError __thiscall winIVRInput_IVRInput_010_ShowBindingsForActionSet(winIVRInput_IVRInput_010 *_this, VRActiveActionSet_t * pSets, uint32_t unSizeOfVRSelectedActionSet_t, uint32_t unSetCount, VRInputValueHandle_t originToHighlight) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_ShowBindingsForActionSet(_this->linux_side, pSets, unSizeOfVRSelectedActionSet_t, unSetCount, originToHighlight); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetComponentStateForBinding, 28) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetComponentStateForBinding(winIVRInput_IVRInput_010 *_this, const char * pchRenderModelName, const char * pchComponentName, InputBindingInfo_t * pOriginInfo, uint32_t unBindingInfoSize, uint32_t unBindingInfoCount, RenderModel_ComponentState_t * pComponentState) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetComponentStateForBinding(_this->linux_side, pchRenderModelName, pchComponentName, pOriginInfo, unBindingInfoSize, unBindingInfoCount, pComponentState); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_IsUsingLegacyInput, 4) +bool __thiscall winIVRInput_IVRInput_010_IsUsingLegacyInput(winIVRInput_IVRInput_010 *_this) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_IsUsingLegacyInput(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_OpenBindingUI, 25) +EVRInputError __thiscall winIVRInput_IVRInput_010_OpenBindingUI(winIVRInput_IVRInput_010 *_this, const char * pchAppKey, VRActionSetHandle_t ulActionSetHandle, VRInputValueHandle_t ulDeviceHandle, bool bShowOnDesktop) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_OpenBindingUI(_this->linux_side, pchAppKey, ulActionSetHandle, ulDeviceHandle, bShowOnDesktop); +} + +DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_010_GetBindingVariant, 20) +EVRInputError __thiscall winIVRInput_IVRInput_010_GetBindingVariant(winIVRInput_IVRInput_010 *_this, VRInputValueHandle_t ulDevicePath, char * pchVariantArray, uint32_t unVariantArraySize) +{ + TRACE("%p\n", _this); + return cppIVRInput_IVRInput_010_GetBindingVariant(_this->linux_side, ulDevicePath, pchVariantArray, unVariantArraySize); +} + +extern vtable_ptr winIVRInput_IVRInput_010_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRInput_IVRInput_010, + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_SetActionManifestPath) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetActionSetHandle) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetActionHandle) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetInputSourceHandle) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_UpdateActionState) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetDigitalActionData) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetAnalogActionData) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetPoseActionDataForNextFrame) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetSkeletalActionData) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetDominantHand) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_SetDominantHand) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetBoneCount) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetBoneHierarchy) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetBoneName) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetSkeletalReferenceTransforms) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetSkeletalTrackingLevel) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetSkeletalBoneData) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetSkeletalSummaryData) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_DecompressSkeletalBoneData) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_TriggerHapticVibrationAction) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetActionOrigins) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetOriginLocalizedName) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetActionBindingInfo) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_ShowActionOrigins) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_ShowBindingsForActionSet) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetComponentStateForBinding) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_IsUsingLegacyInput) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_OpenBindingUI) + VTABLE_ADD_FUNC(winIVRInput_IVRInput_010_GetBindingVariant) + ); +#ifndef __GNUC__ +} +#endif + +winIVRInput_IVRInput_010 *create_winIVRInput_IVRInput_010(void *linux_side) +{ + winIVRInput_IVRInput_010 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRInput_IVRInput_010)); + TRACE("-> %p\n", r); + r->vtable = &winIVRInput_IVRInput_010_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRInput_IVRInput_010(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRInput_IVRInput_010 *create_winIVRInput_IVRInput_010_FnTable(void *linux_side) +{ + winIVRInput_IVRInput_010 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRInput_IVRInput_010)); + struct thunk *thunks = alloc_thunks(32); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 32 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRInput_IVRInput_010_SetActionManifestPath, 1, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRInput_IVRInput_010_GetActionSetHandle, 2, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRInput_IVRInput_010_GetActionHandle, 2, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRInput_IVRInput_010_GetInputSourceHandle, 2, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVRInput_IVRInput_010_UpdateActionState, 3, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVRInput_IVRInput_010_GetDigitalActionData, 4, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVRInput_IVRInput_010_GetAnalogActionData, 4, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVRInput_IVRInput_010_GetPoseActionDataRelativeToNow, 6, TRUE, FALSE); + init_thunk(&thunks[8], r, winIVRInput_IVRInput_010_GetPoseActionDataForNextFrame, 5, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVRInput_IVRInput_010_GetSkeletalActionData, 3, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVRInput_IVRInput_010_GetDominantHand, 1, FALSE, FALSE); + init_thunk(&thunks[11], r, winIVRInput_IVRInput_010_SetDominantHand, 1, FALSE, FALSE); + init_thunk(&thunks[12], r, winIVRInput_IVRInput_010_GetBoneCount, 2, FALSE, FALSE); + init_thunk(&thunks[13], r, winIVRInput_IVRInput_010_GetBoneHierarchy, 3, FALSE, FALSE); + init_thunk(&thunks[14], r, winIVRInput_IVRInput_010_GetBoneName, 4, FALSE, FALSE); + init_thunk(&thunks[15], r, winIVRInput_IVRInput_010_GetSkeletalReferenceTransforms, 5, FALSE, FALSE); + init_thunk(&thunks[16], r, winIVRInput_IVRInput_010_GetSkeletalTrackingLevel, 2, FALSE, FALSE); + init_thunk(&thunks[17], r, winIVRInput_IVRInput_010_GetSkeletalBoneData, 5, FALSE, FALSE); + init_thunk(&thunks[18], r, winIVRInput_IVRInput_010_GetSkeletalSummaryData, 3, FALSE, FALSE); + init_thunk(&thunks[19], r, winIVRInput_IVRInput_010_GetSkeletalBoneDataCompressed, 5, FALSE, FALSE); + init_thunk(&thunks[20], r, winIVRInput_IVRInput_010_DecompressSkeletalBoneData, 5, FALSE, FALSE); + init_thunk(&thunks[21], r, winIVRInput_IVRInput_010_TriggerHapticVibrationAction, 6, TRUE, TRUE); + init_thunk(&thunks[22], r, winIVRInput_IVRInput_010_GetActionOrigins, 4, FALSE, FALSE); + init_thunk(&thunks[23], r, winIVRInput_IVRInput_010_GetOriginLocalizedName, 4, FALSE, FALSE); + init_thunk(&thunks[24], r, winIVRInput_IVRInput_010_GetOriginTrackedDeviceInfo, 3, FALSE, FALSE); + init_thunk(&thunks[25], r, winIVRInput_IVRInput_010_GetActionBindingInfo, 5, FALSE, FALSE); + init_thunk(&thunks[26], r, winIVRInput_IVRInput_010_ShowActionOrigins, 2, FALSE, FALSE); + init_thunk(&thunks[27], r, winIVRInput_IVRInput_010_ShowBindingsForActionSet, 4, FALSE, FALSE); + init_thunk(&thunks[28], r, winIVRInput_IVRInput_010_GetComponentStateForBinding, 6, FALSE, FALSE); + init_thunk(&thunks[29], r, winIVRInput_IVRInput_010_IsUsingLegacyInput, 0, FALSE, FALSE); + init_thunk(&thunks[30], r, winIVRInput_IVRInput_010_OpenBindingUI, 4, FALSE, FALSE); + init_thunk(&thunks[31], r, winIVRInput_IVRInput_010_GetBindingVariant, 3, FALSE, FALSE); + for (i = 0; i < 32; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRInput_IVRInput_010_FnTable(void *object) +{ + winIVRInput_IVRInput_010 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + #include "cppIVRInput_IVRInput_007.h" typedef struct __winIVRInput_IVRInput_007 { @@ -63,35 +410,35 @@ EVRInputError __thiscall winIVRInput_IVRInput_007_UpdateActionState(winIVRInput_ } DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_007_GetDigitalActionData, 28) -EVRInputError __thiscall winIVRInput_IVRInput_007_GetDigitalActionData(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, winInputDigitalActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall winIVRInput_IVRInput_007_GetDigitalActionData(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, winInputDigitalActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { TRACE("%p\n", _this); return cppIVRInput_IVRInput_007_GetDigitalActionData(_this->linux_side, action, pActionData, unActionDataSize, ulRestrictToDevice); } DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_007_GetAnalogActionData, 28) -EVRInputError __thiscall winIVRInput_IVRInput_007_GetAnalogActionData(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, winInputAnalogActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall winIVRInput_IVRInput_007_GetAnalogActionData(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, winInputAnalogActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { TRACE("%p\n", _this); return cppIVRInput_IVRInput_007_GetAnalogActionData(_this->linux_side, action, pActionData, unActionDataSize, ulRestrictToDevice); } DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow, 36) -EVRInputError __thiscall winIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, winInputPoseActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall winIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, winInputPoseActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { TRACE("%p\n", _this); return cppIVRInput_IVRInput_007_GetPoseActionDataRelativeToNow(_this->linux_side, action, eOrigin, fPredictedSecondsFromNow, pActionData, unActionDataSize, ulRestrictToDevice); } DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_007_GetPoseActionDataForNextFrame, 32) -EVRInputError __thiscall winIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, winInputPoseActionData_t_1819 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) +EVRInputError __thiscall winIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, ETrackingUniverseOrigin eOrigin, winInputPoseActionData_t_1916 * pActionData, uint32_t unActionDataSize, VRInputValueHandle_t ulRestrictToDevice) { TRACE("%p\n", _this); return cppIVRInput_IVRInput_007_GetPoseActionDataForNextFrame(_this->linux_side, action, eOrigin, pActionData, unActionDataSize, ulRestrictToDevice); } DEFINE_THISCALL_WRAPPER(winIVRInput_IVRInput_007_GetSkeletalActionData, 20) -EVRInputError __thiscall winIVRInput_IVRInput_007_GetSkeletalActionData(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, winInputSkeletalActionData_t_1819 * pActionData, uint32_t unActionDataSize) +EVRInputError __thiscall winIVRInput_IVRInput_007_GetSkeletalActionData(winIVRInput_IVRInput_007 *_this, VRActionHandle_t action, winInputSkeletalActionData_t_1916 * pActionData, uint32_t unActionDataSize) { TRACE("%p\n", _this); return cppIVRInput_IVRInput_007_GetSkeletalActionData(_this->linux_side, action, pActionData, unActionDataSize); diff --git a/vrclient_x64/vrclient_x64/winIVRMailbox.c b/vrclient_x64/vrclient_x64/winIVRMailbox.c new file mode 100644 index 0000000000..f7b6588520 --- /dev/null +++ b/vrclient_x64/vrclient_x64/winIVRMailbox.c @@ -0,0 +1,113 @@ +/* This file is auto-generated, do not edit. */ +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +#include "flatapi.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVRMailbox_IVRMailbox_001.h" + +typedef struct __winIVRMailbox_IVRMailbox_001 { + vtable_ptr *vtable; + void *linux_side; +} winIVRMailbox_IVRMailbox_001; + +DEFINE_THISCALL_WRAPPER(winIVRMailbox_IVRMailbox_001_undoc1, 12) +vrmb_typeb __thiscall winIVRMailbox_IVRMailbox_001_undoc1(winIVRMailbox_IVRMailbox_001 *_this, const char * a, vrmb_typea * b) +{ + TRACE("%p\n", _this); + return cppIVRMailbox_IVRMailbox_001_undoc1(_this->linux_side, a, b); +} + +DEFINE_THISCALL_WRAPPER(winIVRMailbox_IVRMailbox_001_undoc2, 12) +vrmb_typeb __thiscall winIVRMailbox_IVRMailbox_001_undoc2(winIVRMailbox_IVRMailbox_001 *_this, vrmb_typea a) +{ + TRACE("%p\n", _this); + return cppIVRMailbox_IVRMailbox_001_undoc2(_this->linux_side, a); +} + +DEFINE_THISCALL_WRAPPER(winIVRMailbox_IVRMailbox_001_undoc3, 20) +vrmb_typeb __thiscall winIVRMailbox_IVRMailbox_001_undoc3(winIVRMailbox_IVRMailbox_001 *_this, vrmb_typea a, const char * b, const char * c) +{ + TRACE("%p\n", _this); + return ivrmailbox_undoc3(cppIVRMailbox_IVRMailbox_001_undoc3, _this->linux_side, a, b, c, 1); +} + +DEFINE_THISCALL_WRAPPER(winIVRMailbox_IVRMailbox_001_undoc4, 24) +vrmb_typeb __thiscall winIVRMailbox_IVRMailbox_001_undoc4(winIVRMailbox_IVRMailbox_001 *_this, vrmb_typea a, char * b, uint32_t c, uint32_t * d) +{ + TRACE("%p\n", _this); + return cppIVRMailbox_IVRMailbox_001_undoc4(_this->linux_side, a, b, c, d); +} + +extern vtable_ptr winIVRMailbox_IVRMailbox_001_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRMailbox_IVRMailbox_001, + VTABLE_ADD_FUNC(winIVRMailbox_IVRMailbox_001_undoc1) + VTABLE_ADD_FUNC(winIVRMailbox_IVRMailbox_001_undoc2) + VTABLE_ADD_FUNC(winIVRMailbox_IVRMailbox_001_undoc3) + VTABLE_ADD_FUNC(winIVRMailbox_IVRMailbox_001_undoc4) + ); +#ifndef __GNUC__ +} +#endif + +winIVRMailbox_IVRMailbox_001 *create_winIVRMailbox_IVRMailbox_001(void *linux_side) +{ + winIVRMailbox_IVRMailbox_001 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRMailbox_IVRMailbox_001)); + TRACE("-> %p\n", r); + r->vtable = &winIVRMailbox_IVRMailbox_001_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRMailbox_IVRMailbox_001(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRMailbox_IVRMailbox_001 *create_winIVRMailbox_IVRMailbox_001_FnTable(void *linux_side) +{ + winIVRMailbox_IVRMailbox_001 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRMailbox_IVRMailbox_001)); + struct thunk *thunks = alloc_thunks(4); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 4 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRMailbox_IVRMailbox_001_undoc1, 2, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRMailbox_IVRMailbox_001_undoc2, 1, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRMailbox_IVRMailbox_001_undoc3, 3, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRMailbox_IVRMailbox_001_undoc4, 4, FALSE, FALSE); + for (i = 0; i < 4; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRMailbox_IVRMailbox_001_FnTable(void *object) +{ + winIVRMailbox_IVRMailbox_001 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + diff --git a/vrclient_x64/vrclient_x64/winIVROverlay.c b/vrclient_x64/vrclient_x64/winIVROverlay.c index 79dd783d00..3d946c618a 100644 --- a/vrclient_x64/vrclient_x64/winIVROverlay.c +++ b/vrclient_x64/vrclient_x64/winIVROverlay.c @@ -18,6 +18,1564 @@ WINE_DEFAULT_DEBUG_CHANNEL(vrclient); +#include "cppIVROverlay_IVROverlay_024.h" + +typedef struct __winIVROverlay_IVROverlay_024 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_024; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_FindOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_FindOverlay(winIVROverlay_IVROverlay_024 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_CreateOverlay, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_CreateOverlay(winIVROverlay_IVROverlay_024 *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_DestroyOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayKey, 24) +uint32_t __thiscall winIVROverlay_IVROverlay_024_GetOverlayKey(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayName, 24) +uint32_t __thiscall winIVROverlay_IVROverlay_024_GetOverlayName(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayName, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayName(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayName(_this->linux_side, ulOverlayHandle, pchName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayImageData, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayImageData(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_024 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayRenderingPid(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_024_GetOverlayRenderingPid(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayFlag(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayFlag, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayFlag(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayFlags, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayFlags(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayFlags(_this->linux_side, ulOverlayHandle, pFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayColor(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayColor(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayAlpha(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayAlpha(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTexelAspect(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, fTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTexelAspect(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, pfTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlaySortOrder(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlaySortOrder(_this->linux_side, ulOverlayHandle, unSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlaySortOrder(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlaySortOrder(_this->linux_side, ulOverlayHandle, punSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayCurvature, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayCurvature(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayCurvature(_this->linux_side, ulOverlayHandle, fCurvature); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayCurvature, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayCurvature(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayCurvature(_this->linux_side, ulOverlayHandle, pfCurvature); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTextureBounds, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTextureBounds(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTextureBounds, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTextureBounds(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTransformType, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTransformType(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTransformCursor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTransformCursor(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTransformCursor(_this->linux_side, ulCursorOverlayHandle, pvHotspot); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTransformCursor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTransformCursor(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTransformCursor(_this->linux_side, ulOverlayHandle, pvHotspot); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_ShowOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_HideOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_024_IsOverlayVisible(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_024_PollNextOverlayEvent(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_11030 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayInputMethod(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayInputMethod(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayMouseScale, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayMouseScale(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayMouseScale, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayMouseScale(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ComputeOverlayIntersection, 20) +bool __thiscall winIVROverlay_IVROverlay_024_ComputeOverlayIntersection(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_024_IsHoverTargetOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayIntersectionMask, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayIntersectionMask(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayIntersectionMask(_this->linux_side, ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration(_this->linux_side, ulOverlayHandle, fDurationSeconds, fFrequency, fAmplitude); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayCursor, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayCursor(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayCursor(_this->linux_side, ulOverlayHandle, ulCursorHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride(_this->linux_side, ulOverlayHandle, pvCursor); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayTexture, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayTexture(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_ClearOverlayTexture(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayRaw, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayRaw(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unBytesPerPixel); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetOverlayFromFile, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetOverlayFromFile(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + char lin_pchFilePath[PATH_MAX]; + vrclient_dos_path_to_unix_path(pchFilePath, lin_pchFilePath); + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath ? lin_pchFilePath : NULL); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTexture, 44) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTexture(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPIType, pColorSpace, pTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetOverlayTextureSize, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetOverlayTextureSize(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_CreateDashboardOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_CreateDashboardOverlay(winIVROverlay_IVROverlay_024 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_024_IsDashboardVisible(winIVROverlay_IVROverlay_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_024_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ShowDashboard, 8) +void __thiscall winIVROverlay_IVROverlay_024_ShowDashboard(winIVROverlay_IVROverlay_024 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_024_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_024 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ShowKeyboard, 36) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_ShowKeyboard(winIVROverlay_IVROverlay_024 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, unFlags, pchDescription, unCharMax, pchExistingText, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ShowKeyboardForOverlay, 44) +EVROverlayError __thiscall winIVROverlay_IVROverlay_024_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, uint32_t unFlags, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, unFlags, pchDescription, unCharMax, pchExistingText, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_GetKeyboardText, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_024_GetKeyboardText(winIVROverlay_IVROverlay_024 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_024_HideKeyboard(winIVROverlay_IVROverlay_024 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_024_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute, 12) +void __thiscall winIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_024 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_024 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_ShowMessageOverlay, 28) +VRMessageOverlayResponse __thiscall winIVROverlay_IVROverlay_024_ShowMessageOverlay(winIVROverlay_IVROverlay_024 *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_024_ShowMessageOverlay(_this->linux_side, pchText, pchCaption, pchButton0Text, pchButton1Text, pchButton2Text, pchButton3Text); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_024_CloseMessageOverlay, 4) +void __thiscall winIVROverlay_IVROverlay_024_CloseMessageOverlay(winIVROverlay_IVROverlay_024 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_024_CloseMessageOverlay(_this->linux_side); +} + +extern vtable_ptr winIVROverlay_IVROverlay_024_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_024, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayFlags) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayCurvature) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayCurvature) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTransformCursor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTransformCursor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayIntersectionMask) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayCursor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_ShowMessageOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_024_CloseMessageOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_024 *create_winIVROverlay_IVROverlay_024(void *linux_side) +{ + winIVROverlay_IVROverlay_024 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVROverlay_IVROverlay_024)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_024_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVROverlay_IVROverlay_024(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVROverlay_IVROverlay_024 *create_winIVROverlay_IVROverlay_024_FnTable(void *linux_side) +{ + winIVROverlay_IVROverlay_024 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVROverlay_IVROverlay_024)); + struct thunk *thunks = alloc_thunks(78); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 78 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVROverlay_IVROverlay_024_FindOverlay, 2, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVROverlay_IVROverlay_024_CreateOverlay, 3, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVROverlay_IVROverlay_024_DestroyOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVROverlay_IVROverlay_024_GetOverlayKey, 4, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVROverlay_IVROverlay_024_GetOverlayName, 4, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVROverlay_IVROverlay_024_SetOverlayName, 2, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVROverlay_IVROverlay_024_GetOverlayImageData, 5, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVROverlay_IVROverlay_024_GetOverlayErrorNameFromEnum, 1, FALSE, FALSE); + init_thunk(&thunks[8], r, winIVROverlay_IVROverlay_024_SetOverlayRenderingPid, 2, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVROverlay_IVROverlay_024_GetOverlayRenderingPid, 1, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVROverlay_IVROverlay_024_SetOverlayFlag, 3, FALSE, FALSE); + init_thunk(&thunks[11], r, winIVROverlay_IVROverlay_024_GetOverlayFlag, 3, FALSE, FALSE); + init_thunk(&thunks[12], r, winIVROverlay_IVROverlay_024_GetOverlayFlags, 2, FALSE, FALSE); + init_thunk(&thunks[13], r, winIVROverlay_IVROverlay_024_SetOverlayColor, 4, TRUE, TRUE); + init_thunk(&thunks[14], r, winIVROverlay_IVROverlay_024_GetOverlayColor, 4, FALSE, FALSE); + init_thunk(&thunks[15], r, winIVROverlay_IVROverlay_024_SetOverlayAlpha, 2, TRUE, FALSE); + init_thunk(&thunks[16], r, winIVROverlay_IVROverlay_024_GetOverlayAlpha, 2, FALSE, FALSE); + init_thunk(&thunks[17], r, winIVROverlay_IVROverlay_024_SetOverlayTexelAspect, 2, TRUE, FALSE); + init_thunk(&thunks[18], r, winIVROverlay_IVROverlay_024_GetOverlayTexelAspect, 2, FALSE, FALSE); + init_thunk(&thunks[19], r, winIVROverlay_IVROverlay_024_SetOverlaySortOrder, 2, FALSE, FALSE); + init_thunk(&thunks[20], r, winIVROverlay_IVROverlay_024_GetOverlaySortOrder, 2, FALSE, FALSE); + init_thunk(&thunks[21], r, winIVROverlay_IVROverlay_024_SetOverlayWidthInMeters, 2, TRUE, FALSE); + init_thunk(&thunks[22], r, winIVROverlay_IVROverlay_024_GetOverlayWidthInMeters, 2, FALSE, FALSE); + init_thunk(&thunks[23], r, winIVROverlay_IVROverlay_024_SetOverlayCurvature, 2, TRUE, FALSE); + init_thunk(&thunks[24], r, winIVROverlay_IVROverlay_024_GetOverlayCurvature, 2, FALSE, FALSE); + init_thunk(&thunks[25], r, winIVROverlay_IVROverlay_024_SetOverlayTextureColorSpace, 2, FALSE, FALSE); + init_thunk(&thunks[26], r, winIVROverlay_IVROverlay_024_GetOverlayTextureColorSpace, 2, FALSE, FALSE); + init_thunk(&thunks[27], r, winIVROverlay_IVROverlay_024_SetOverlayTextureBounds, 2, FALSE, FALSE); + init_thunk(&thunks[28], r, winIVROverlay_IVROverlay_024_GetOverlayTextureBounds, 2, FALSE, FALSE); + init_thunk(&thunks[29], r, winIVROverlay_IVROverlay_024_GetOverlayTransformType, 2, FALSE, FALSE); + init_thunk(&thunks[30], r, winIVROverlay_IVROverlay_024_SetOverlayTransformAbsolute, 3, FALSE, FALSE); + init_thunk(&thunks[31], r, winIVROverlay_IVROverlay_024_GetOverlayTransformAbsolute, 3, FALSE, FALSE); + init_thunk(&thunks[32], r, winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + init_thunk(&thunks[33], r, winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + init_thunk(&thunks[34], r, winIVROverlay_IVROverlay_024_SetOverlayTransformTrackedDeviceComponent, 3, FALSE, FALSE); + init_thunk(&thunks[35], r, winIVROverlay_IVROverlay_024_GetOverlayTransformTrackedDeviceComponent, 4, FALSE, FALSE); + init_thunk(&thunks[36], r, winIVROverlay_IVROverlay_024_GetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + init_thunk(&thunks[37], r, winIVROverlay_IVROverlay_024_SetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + init_thunk(&thunks[38], r, winIVROverlay_IVROverlay_024_SetOverlayTransformCursor, 2, FALSE, FALSE); + init_thunk(&thunks[39], r, winIVROverlay_IVROverlay_024_GetOverlayTransformCursor, 2, FALSE, FALSE); + init_thunk(&thunks[40], r, winIVROverlay_IVROverlay_024_ShowOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[41], r, winIVROverlay_IVROverlay_024_HideOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[42], r, winIVROverlay_IVROverlay_024_IsOverlayVisible, 1, FALSE, FALSE); + init_thunk(&thunks[43], r, winIVROverlay_IVROverlay_024_GetTransformForOverlayCoordinates, 4, FALSE, FALSE); + init_thunk(&thunks[44], r, winIVROverlay_IVROverlay_024_PollNextOverlayEvent, 3, FALSE, FALSE); + init_thunk(&thunks[45], r, winIVROverlay_IVROverlay_024_GetOverlayInputMethod, 2, FALSE, FALSE); + init_thunk(&thunks[46], r, winIVROverlay_IVROverlay_024_SetOverlayInputMethod, 2, FALSE, FALSE); + init_thunk(&thunks[47], r, winIVROverlay_IVROverlay_024_GetOverlayMouseScale, 2, FALSE, FALSE); + init_thunk(&thunks[48], r, winIVROverlay_IVROverlay_024_SetOverlayMouseScale, 2, FALSE, FALSE); + init_thunk(&thunks[49], r, winIVROverlay_IVROverlay_024_ComputeOverlayIntersection, 3, FALSE, FALSE); + init_thunk(&thunks[50], r, winIVROverlay_IVROverlay_024_IsHoverTargetOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[51], r, winIVROverlay_IVROverlay_024_SetOverlayIntersectionMask, 4, FALSE, FALSE); + init_thunk(&thunks[52], r, winIVROverlay_IVROverlay_024_TriggerLaserMouseHapticVibration, 4, TRUE, TRUE); + init_thunk(&thunks[53], r, winIVROverlay_IVROverlay_024_SetOverlayCursor, 2, FALSE, FALSE); + init_thunk(&thunks[54], r, winIVROverlay_IVROverlay_024_SetOverlayCursorPositionOverride, 2, FALSE, FALSE); + init_thunk(&thunks[55], r, winIVROverlay_IVROverlay_024_ClearOverlayCursorPositionOverride, 1, FALSE, FALSE); + init_thunk(&thunks[56], r, winIVROverlay_IVROverlay_024_SetOverlayTexture, 2, FALSE, FALSE); + init_thunk(&thunks[57], r, winIVROverlay_IVROverlay_024_ClearOverlayTexture, 1, FALSE, FALSE); + init_thunk(&thunks[58], r, winIVROverlay_IVROverlay_024_SetOverlayRaw, 5, FALSE, FALSE); + init_thunk(&thunks[59], r, winIVROverlay_IVROverlay_024_SetOverlayFromFile, 2, FALSE, FALSE); + init_thunk(&thunks[60], r, winIVROverlay_IVROverlay_024_GetOverlayTexture, 9, FALSE, FALSE); + init_thunk(&thunks[61], r, winIVROverlay_IVROverlay_024_ReleaseNativeOverlayHandle, 2, FALSE, FALSE); + init_thunk(&thunks[62], r, winIVROverlay_IVROverlay_024_GetOverlayTextureSize, 3, FALSE, FALSE); + init_thunk(&thunks[63], r, winIVROverlay_IVROverlay_024_CreateDashboardOverlay, 4, FALSE, FALSE); + init_thunk(&thunks[64], r, winIVROverlay_IVROverlay_024_IsDashboardVisible, 0, FALSE, FALSE); + init_thunk(&thunks[65], r, winIVROverlay_IVROverlay_024_IsActiveDashboardOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[66], r, winIVROverlay_IVROverlay_024_SetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + init_thunk(&thunks[67], r, winIVROverlay_IVROverlay_024_GetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + init_thunk(&thunks[68], r, winIVROverlay_IVROverlay_024_ShowDashboard, 1, FALSE, FALSE); + init_thunk(&thunks[69], r, winIVROverlay_IVROverlay_024_GetPrimaryDashboardDevice, 0, FALSE, FALSE); + init_thunk(&thunks[70], r, winIVROverlay_IVROverlay_024_ShowKeyboard, 7, FALSE, FALSE); + init_thunk(&thunks[71], r, winIVROverlay_IVROverlay_024_ShowKeyboardForOverlay, 8, FALSE, FALSE); + init_thunk(&thunks[72], r, winIVROverlay_IVROverlay_024_GetKeyboardText, 2, FALSE, FALSE); + init_thunk(&thunks[73], r, winIVROverlay_IVROverlay_024_HideKeyboard, 0, FALSE, FALSE); + init_thunk(&thunks[74], r, winIVROverlay_IVROverlay_024_SetKeyboardTransformAbsolute, 2, FALSE, FALSE); + init_thunk(&thunks[75], r, winIVROverlay_IVROverlay_024_SetKeyboardPositionForOverlay, 2, FALSE, FALSE); + init_thunk(&thunks[76], r, winIVROverlay_IVROverlay_024_ShowMessageOverlay, 6, FALSE, FALSE); + init_thunk(&thunks[77], r, winIVROverlay_IVROverlay_024_CloseMessageOverlay, 0, FALSE, FALSE); + for (i = 0; i < 78; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVROverlay_IVROverlay_024_FnTable(void *object) +{ + winIVROverlay_IVROverlay_024 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + +#include "cppIVROverlay_IVROverlay_022.h" + +typedef struct __winIVROverlay_IVROverlay_022 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlay_IVROverlay_022; + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_FindOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_FindOverlay(winIVROverlay_IVROverlay_022 *_this, const char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_FindOverlay(_this->linux_side, pchOverlayKey, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_CreateOverlay, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_CreateOverlay(winIVROverlay_IVROverlay_022 *_this, const char * pchOverlayKey, const char * pchOverlayName, VROverlayHandle_t * pOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_CreateOverlay(_this->linux_side, pchOverlayKey, pchOverlayName, pOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_DestroyOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_DestroyOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_DestroyOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayKey, 24) +uint32_t __thiscall winIVROverlay_IVROverlay_022_GetOverlayKey(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayKey(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayName, 24) +uint32_t __thiscall winIVROverlay_IVROverlay_022_GetOverlayName(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayName(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayName, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayName(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayName(_this->linux_side, ulOverlayHandle, pchName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayImageData, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayImageData(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayImageData(_this->linux_side, ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum, 8) +const char * __thiscall winIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum(winIVROverlay_IVROverlay_022 *_this, EVROverlayError error) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum(_this->linux_side, error); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayRenderingPid, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayRenderingPid(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unPID) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayRenderingPid(_this->linux_side, ulOverlayHandle, unPID); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayRenderingPid, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_022_GetOverlayRenderingPid(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayRenderingPid(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayFlag, 17) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayFlag(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, bEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayFlag, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayFlag(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayFlag(_this->linux_side, ulOverlayHandle, eOverlayFlag, pbEnabled); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayFlags, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayFlags(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayFlags(_this->linux_side, ulOverlayHandle, pFlags); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayColor(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayColor(_this->linux_side, ulOverlayHandle, fRed, fGreen, fBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayColor, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayColor(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayColor(_this->linux_side, ulOverlayHandle, pfRed, pfGreen, pfBlue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayAlpha(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float fAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayAlpha(_this->linux_side, ulOverlayHandle, fAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayAlpha, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayAlpha(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float * pfAlpha) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayAlpha(_this->linux_side, ulOverlayHandle, pfAlpha); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTexelAspect(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float fTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, fTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTexelAspect, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTexelAspect(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTexelAspect(_this->linux_side, ulOverlayHandle, pfTexelAspect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlaySortOrder(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlaySortOrder(_this->linux_side, ulOverlayHandle, unSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlaySortOrder, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlaySortOrder(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlaySortOrder(_this->linux_side, ulOverlayHandle, punSortOrder); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayWidthInMeters(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float fWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, fWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayWidthInMeters, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayWidthInMeters(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayWidthInMeters(_this->linux_side, ulOverlayHandle, pfWidthInMeters); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayCurvature, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayCurvature(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float fCurvature) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayCurvature(_this->linux_side, ulOverlayHandle, fCurvature); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayCurvature, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayCurvature(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float * pfCurvature) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayCurvature(_this->linux_side, ulOverlayHandle, pfCurvature); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, eTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace(_this->linux_side, ulOverlayHandle, peTextureColorSpace); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTextureBounds, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTextureBounds(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTextureBounds, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTextureBounds(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t * pOverlayTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTextureBounds(_this->linux_side, ulOverlayHandle, pOverlayTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayRenderModel, 28) +uint32_t __thiscall winIVROverlay_IVROverlay_022_GetOverlayRenderModel(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, HmdColor_t * pColor, EVROverlayError * pError) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayRenderModel(_this->linux_side, ulOverlayHandle, pchValue, unBufferSize, pColor, pError); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayRenderModel, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayRenderModel(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchRenderModel, HmdColor_t * pColor) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayRenderModel(_this->linux_side, ulOverlayHandle, pchRenderModel, pColor); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTransformType, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTransformType(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTransformType(_this->linux_side, ulOverlayHandle, peTransformType); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute(_this->linux_side, ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative(_this->linux_side, ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char * pchComponentName) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, unDeviceIndex, pchComponentName); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent(_this->linux_side, ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t * ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulOverlayHandleParent, HmdMatrix34_t * pmatParentOverlayToOverlayTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative(_this->linux_side, ulOverlayHandle, ulOverlayHandleParent, pmatParentOverlayToOverlayTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTransformCursor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTransformCursor(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulCursorOverlayHandle, HmdVector2_t * pvHotspot) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTransformCursor(_this->linux_side, ulCursorOverlayHandle, pvHotspot); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTransformCursor, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTransformCursor(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvHotspot) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTransformCursor(_this->linux_side, ulOverlayHandle, pvHotspot); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ShowOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_ShowOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ShowOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_HideOverlay, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_HideOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_HideOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_IsOverlayVisible, 12) +bool __thiscall winIVROverlay_IVROverlay_022_IsOverlayVisible(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_IsOverlayVisible(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t * pmatTransform) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates(_this->linux_side, ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_PollNextOverlayEvent, 20) +bool __thiscall winIVROverlay_IVROverlay_022_PollNextOverlayEvent(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, winVREvent_t_1916 * pEvent, uint32_t uncbVREvent) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_PollNextOverlayEvent(_this->linux_side, ulOverlayHandle, pEvent, uncbVREvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayInputMethod(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayInputMethod(_this->linux_side, ulOverlayHandle, peInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayInputMethod, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayInputMethod(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayInputMethod(_this->linux_side, ulOverlayHandle, eInputMethod); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayMouseScale, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayMouseScale(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayMouseScale, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayMouseScale(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvecMouseScale) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayMouseScale(_this->linux_side, ulOverlayHandle, pvecMouseScale); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ComputeOverlayIntersection, 20) +bool __thiscall winIVROverlay_IVROverlay_022_ComputeOverlayIntersection(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionParams_t * pParams, VROverlayIntersectionResults_t * pResults) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ComputeOverlayIntersection(_this->linux_side, ulOverlayHandle, pParams, pResults); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_IsHoverTargetOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_022_IsHoverTargetOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_IsHoverTargetOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float fRadius) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform(_this->linux_side, ulOverlay, eWhich, pvCenter, fRadius); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlay, EDualAnalogWhich eWhich, HmdVector2_t * pvCenter, float * pfRadius) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform(_this->linux_side, ulOverlay, eWhich, pvCenter, pfRadius); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayIntersectionMask, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayIntersectionMask(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayIntersectionMask(_this->linux_side, ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration, 24) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration(_this->linux_side, ulOverlayHandle, fDurationSeconds, fFrequency, fAmplitude); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayCursor, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayCursor(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, VROverlayHandle_t ulCursorHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayCursor(_this->linux_side, ulOverlayHandle, ulCursorHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, HmdVector2_t * pvCursor) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride(_this->linux_side, ulOverlayHandle, pvCursor); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayTexture, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayTexture(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, Texture_t * pTexture) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayTexture(_this->linux_side, ulOverlayHandle, pTexture); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ClearOverlayTexture, 12) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_ClearOverlayTexture(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ClearOverlayTexture(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayRaw, 28) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayRaw(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unBytesPerPixel) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayRaw(_this->linux_side, ulOverlayHandle, pvBuffer, unWidth, unHeight, unBytesPerPixel); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetOverlayFromFile, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetOverlayFromFile(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, const char * pchFilePath) +{ + char lin_pchFilePath[PATH_MAX]; + vrclient_dos_path_to_unix_path(pchFilePath, lin_pchFilePath); + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetOverlayFromFile(_this->linux_side, ulOverlayHandle, pchFilePath ? lin_pchFilePath : NULL); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTexture, 44) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTexture(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, ETextureType * pAPIType, EColorSpace * pColorSpace, VRTextureBounds_t * pTextureBounds) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTexture(_this->linux_side, ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPIType, pColorSpace, pTextureBounds); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle(_this->linux_side, ulOverlayHandle, pNativeTextureHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetOverlayTextureSize, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetOverlayTextureSize(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetOverlayTextureSize(_this->linux_side, ulOverlayHandle, pWidth, pHeight); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_CreateDashboardOverlay, 20) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_CreateDashboardOverlay(winIVROverlay_IVROverlay_022 *_this, const char * pchOverlayKey, const char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_CreateDashboardOverlay(_this->linux_side, pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_IsDashboardVisible, 4) +bool __thiscall winIVROverlay_IVROverlay_022_IsDashboardVisible(winIVROverlay_IVROverlay_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_IsDashboardVisible(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_IsActiveDashboardOverlay, 12) +bool __thiscall winIVROverlay_IVROverlay_022_IsActiveDashboardOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_IsActiveDashboardOverlay(_this->linux_side, ulOverlayHandle); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, unProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess, 16) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess(_this->linux_side, ulOverlayHandle, punProcessId); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ShowDashboard, 8) +void __thiscall winIVROverlay_IVROverlay_022_ShowDashboard(winIVROverlay_IVROverlay_022 *_this, const char * pchOverlayToShow) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_022_ShowDashboard(_this->linux_side, pchOverlayToShow); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice, 4) +TrackedDeviceIndex_t __thiscall winIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice(winIVROverlay_IVROverlay_022 *_this) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ShowKeyboard, 33) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_ShowKeyboard(winIVROverlay_IVROverlay_022 *_this, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ShowKeyboard(_this->linux_side, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ShowKeyboardForOverlay, 41) +EVROverlayError __thiscall winIVROverlay_IVROverlay_022_ShowKeyboardForOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char * pchDescription, uint32_t unCharMax, const char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ShowKeyboardForOverlay(_this->linux_side, ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_GetKeyboardText, 12) +uint32_t __thiscall winIVROverlay_IVROverlay_022_GetKeyboardText(winIVROverlay_IVROverlay_022 *_this, char * pchText, uint32_t cchText) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_GetKeyboardText(_this->linux_side, pchText, cchText); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_HideKeyboard, 4) +void __thiscall winIVROverlay_IVROverlay_022_HideKeyboard(winIVROverlay_IVROverlay_022 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_022_HideKeyboard(_this->linux_side); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute, 12) +void __thiscall winIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute(winIVROverlay_IVROverlay_022 *_this, ETrackingUniverseOrigin eTrackingOrigin, HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute(_this->linux_side, eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay, 28) +void __thiscall winIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay(winIVROverlay_IVROverlay_022 *_this, VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay(_this->linux_side, ulOverlayHandle, avoidRect); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_ShowMessageOverlay, 28) +VRMessageOverlayResponse __thiscall winIVROverlay_IVROverlay_022_ShowMessageOverlay(winIVROverlay_IVROverlay_022 *_this, const char * pchText, const char * pchCaption, const char * pchButton0Text, const char * pchButton1Text, const char * pchButton2Text, const char * pchButton3Text) +{ + TRACE("%p\n", _this); + return cppIVROverlay_IVROverlay_022_ShowMessageOverlay(_this->linux_side, pchText, pchCaption, pchButton0Text, pchButton1Text, pchButton2Text, pchButton3Text); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlay_IVROverlay_022_CloseMessageOverlay, 4) +void __thiscall winIVROverlay_IVROverlay_022_CloseMessageOverlay(winIVROverlay_IVROverlay_022 *_this) +{ + TRACE("%p\n", _this); + cppIVROverlay_IVROverlay_022_CloseMessageOverlay(_this->linux_side); +} + +extern vtable_ptr winIVROverlay_IVROverlay_022_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlay_IVROverlay_022, + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_FindOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_CreateOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_DestroyOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayKey) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayName) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayImageData) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayRenderingPid) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayFlag) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayFlags) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayColor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayAlpha) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTexelAspect) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlaySortOrder) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayWidthInMeters) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayCurvature) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayCurvature) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTextureBounds) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayRenderModel) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayRenderModel) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTransformType) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTransformCursor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTransformCursor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ShowOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_HideOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_IsOverlayVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_PollNextOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayInputMethod) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayMouseScale) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ComputeOverlayIntersection) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_IsHoverTargetOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayIntersectionMask) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayCursor) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ClearOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayRaw) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetOverlayFromFile) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTexture) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetOverlayTextureSize) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_CreateDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_IsDashboardVisible) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_IsActiveDashboardOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ShowDashboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ShowKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ShowKeyboardForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_GetKeyboardText) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_HideKeyboard) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_ShowMessageOverlay) + VTABLE_ADD_FUNC(winIVROverlay_IVROverlay_022_CloseMessageOverlay) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlay_IVROverlay_022 *create_winIVROverlay_IVROverlay_022(void *linux_side) +{ + winIVROverlay_IVROverlay_022 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVROverlay_IVROverlay_022)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlay_IVROverlay_022_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVROverlay_IVROverlay_022(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVROverlay_IVROverlay_022 *create_winIVROverlay_IVROverlay_022_FnTable(void *linux_side) +{ + winIVROverlay_IVROverlay_022 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVROverlay_IVROverlay_022)); + struct thunk *thunks = alloc_thunks(82); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 82 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVROverlay_IVROverlay_022_FindOverlay, 2, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVROverlay_IVROverlay_022_CreateOverlay, 3, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVROverlay_IVROverlay_022_DestroyOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVROverlay_IVROverlay_022_GetOverlayKey, 4, FALSE, FALSE); + init_thunk(&thunks[4], r, winIVROverlay_IVROverlay_022_GetOverlayName, 4, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVROverlay_IVROverlay_022_SetOverlayName, 2, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVROverlay_IVROverlay_022_GetOverlayImageData, 5, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVROverlay_IVROverlay_022_GetOverlayErrorNameFromEnum, 1, FALSE, FALSE); + init_thunk(&thunks[8], r, winIVROverlay_IVROverlay_022_SetOverlayRenderingPid, 2, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVROverlay_IVROverlay_022_GetOverlayRenderingPid, 1, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVROverlay_IVROverlay_022_SetOverlayFlag, 3, FALSE, FALSE); + init_thunk(&thunks[11], r, winIVROverlay_IVROverlay_022_GetOverlayFlag, 3, FALSE, FALSE); + init_thunk(&thunks[12], r, winIVROverlay_IVROverlay_022_GetOverlayFlags, 2, FALSE, FALSE); + init_thunk(&thunks[13], r, winIVROverlay_IVROverlay_022_SetOverlayColor, 4, TRUE, TRUE); + init_thunk(&thunks[14], r, winIVROverlay_IVROverlay_022_GetOverlayColor, 4, FALSE, FALSE); + init_thunk(&thunks[15], r, winIVROverlay_IVROverlay_022_SetOverlayAlpha, 2, TRUE, FALSE); + init_thunk(&thunks[16], r, winIVROverlay_IVROverlay_022_GetOverlayAlpha, 2, FALSE, FALSE); + init_thunk(&thunks[17], r, winIVROverlay_IVROverlay_022_SetOverlayTexelAspect, 2, TRUE, FALSE); + init_thunk(&thunks[18], r, winIVROverlay_IVROverlay_022_GetOverlayTexelAspect, 2, FALSE, FALSE); + init_thunk(&thunks[19], r, winIVROverlay_IVROverlay_022_SetOverlaySortOrder, 2, FALSE, FALSE); + init_thunk(&thunks[20], r, winIVROverlay_IVROverlay_022_GetOverlaySortOrder, 2, FALSE, FALSE); + init_thunk(&thunks[21], r, winIVROverlay_IVROverlay_022_SetOverlayWidthInMeters, 2, TRUE, FALSE); + init_thunk(&thunks[22], r, winIVROverlay_IVROverlay_022_GetOverlayWidthInMeters, 2, FALSE, FALSE); + init_thunk(&thunks[23], r, winIVROverlay_IVROverlay_022_SetOverlayCurvature, 2, TRUE, FALSE); + init_thunk(&thunks[24], r, winIVROverlay_IVROverlay_022_GetOverlayCurvature, 2, FALSE, FALSE); + init_thunk(&thunks[25], r, winIVROverlay_IVROverlay_022_SetOverlayTextureColorSpace, 2, FALSE, FALSE); + init_thunk(&thunks[26], r, winIVROverlay_IVROverlay_022_GetOverlayTextureColorSpace, 2, FALSE, FALSE); + init_thunk(&thunks[27], r, winIVROverlay_IVROverlay_022_SetOverlayTextureBounds, 2, FALSE, FALSE); + init_thunk(&thunks[28], r, winIVROverlay_IVROverlay_022_GetOverlayTextureBounds, 2, FALSE, FALSE); + init_thunk(&thunks[29], r, winIVROverlay_IVROverlay_022_GetOverlayRenderModel, 5, FALSE, FALSE); + init_thunk(&thunks[30], r, winIVROverlay_IVROverlay_022_SetOverlayRenderModel, 3, FALSE, FALSE); + init_thunk(&thunks[31], r, winIVROverlay_IVROverlay_022_GetOverlayTransformType, 2, FALSE, FALSE); + init_thunk(&thunks[32], r, winIVROverlay_IVROverlay_022_SetOverlayTransformAbsolute, 3, FALSE, FALSE); + init_thunk(&thunks[33], r, winIVROverlay_IVROverlay_022_GetOverlayTransformAbsolute, 3, FALSE, FALSE); + init_thunk(&thunks[34], r, winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + init_thunk(&thunks[35], r, winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceRelative, 3, FALSE, FALSE); + init_thunk(&thunks[36], r, winIVROverlay_IVROverlay_022_SetOverlayTransformTrackedDeviceComponent, 3, FALSE, FALSE); + init_thunk(&thunks[37], r, winIVROverlay_IVROverlay_022_GetOverlayTransformTrackedDeviceComponent, 4, FALSE, FALSE); + init_thunk(&thunks[38], r, winIVROverlay_IVROverlay_022_GetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + init_thunk(&thunks[39], r, winIVROverlay_IVROverlay_022_SetOverlayTransformOverlayRelative, 3, FALSE, FALSE); + init_thunk(&thunks[40], r, winIVROverlay_IVROverlay_022_SetOverlayTransformCursor, 2, FALSE, FALSE); + init_thunk(&thunks[41], r, winIVROverlay_IVROverlay_022_GetOverlayTransformCursor, 2, FALSE, FALSE); + init_thunk(&thunks[42], r, winIVROverlay_IVROverlay_022_ShowOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[43], r, winIVROverlay_IVROverlay_022_HideOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[44], r, winIVROverlay_IVROverlay_022_IsOverlayVisible, 1, FALSE, FALSE); + init_thunk(&thunks[45], r, winIVROverlay_IVROverlay_022_GetTransformForOverlayCoordinates, 4, FALSE, FALSE); + init_thunk(&thunks[46], r, winIVROverlay_IVROverlay_022_PollNextOverlayEvent, 3, FALSE, FALSE); + init_thunk(&thunks[47], r, winIVROverlay_IVROverlay_022_GetOverlayInputMethod, 2, FALSE, FALSE); + init_thunk(&thunks[48], r, winIVROverlay_IVROverlay_022_SetOverlayInputMethod, 2, FALSE, FALSE); + init_thunk(&thunks[49], r, winIVROverlay_IVROverlay_022_GetOverlayMouseScale, 2, FALSE, FALSE); + init_thunk(&thunks[50], r, winIVROverlay_IVROverlay_022_SetOverlayMouseScale, 2, FALSE, FALSE); + init_thunk(&thunks[51], r, winIVROverlay_IVROverlay_022_ComputeOverlayIntersection, 3, FALSE, FALSE); + init_thunk(&thunks[52], r, winIVROverlay_IVROverlay_022_IsHoverTargetOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[53], r, winIVROverlay_IVROverlay_022_SetOverlayDualAnalogTransform, 4, TRUE, TRUE); + init_thunk(&thunks[54], r, winIVROverlay_IVROverlay_022_GetOverlayDualAnalogTransform, 4, FALSE, FALSE); + init_thunk(&thunks[55], r, winIVROverlay_IVROverlay_022_SetOverlayIntersectionMask, 4, FALSE, FALSE); + init_thunk(&thunks[56], r, winIVROverlay_IVROverlay_022_TriggerLaserMouseHapticVibration, 4, TRUE, TRUE); + init_thunk(&thunks[57], r, winIVROverlay_IVROverlay_022_SetOverlayCursor, 2, FALSE, FALSE); + init_thunk(&thunks[58], r, winIVROverlay_IVROverlay_022_SetOverlayCursorPositionOverride, 2, FALSE, FALSE); + init_thunk(&thunks[59], r, winIVROverlay_IVROverlay_022_ClearOverlayCursorPositionOverride, 1, FALSE, FALSE); + init_thunk(&thunks[60], r, winIVROverlay_IVROverlay_022_SetOverlayTexture, 2, FALSE, FALSE); + init_thunk(&thunks[61], r, winIVROverlay_IVROverlay_022_ClearOverlayTexture, 1, FALSE, FALSE); + init_thunk(&thunks[62], r, winIVROverlay_IVROverlay_022_SetOverlayRaw, 5, FALSE, FALSE); + init_thunk(&thunks[63], r, winIVROverlay_IVROverlay_022_SetOverlayFromFile, 2, FALSE, FALSE); + init_thunk(&thunks[64], r, winIVROverlay_IVROverlay_022_GetOverlayTexture, 9, FALSE, FALSE); + init_thunk(&thunks[65], r, winIVROverlay_IVROverlay_022_ReleaseNativeOverlayHandle, 2, FALSE, FALSE); + init_thunk(&thunks[66], r, winIVROverlay_IVROverlay_022_GetOverlayTextureSize, 3, FALSE, FALSE); + init_thunk(&thunks[67], r, winIVROverlay_IVROverlay_022_CreateDashboardOverlay, 4, FALSE, FALSE); + init_thunk(&thunks[68], r, winIVROverlay_IVROverlay_022_IsDashboardVisible, 0, FALSE, FALSE); + init_thunk(&thunks[69], r, winIVROverlay_IVROverlay_022_IsActiveDashboardOverlay, 1, FALSE, FALSE); + init_thunk(&thunks[70], r, winIVROverlay_IVROverlay_022_SetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + init_thunk(&thunks[71], r, winIVROverlay_IVROverlay_022_GetDashboardOverlaySceneProcess, 2, FALSE, FALSE); + init_thunk(&thunks[72], r, winIVROverlay_IVROverlay_022_ShowDashboard, 1, FALSE, FALSE); + init_thunk(&thunks[73], r, winIVROverlay_IVROverlay_022_GetPrimaryDashboardDevice, 0, FALSE, FALSE); + init_thunk(&thunks[74], r, winIVROverlay_IVROverlay_022_ShowKeyboard, 7, FALSE, FALSE); + init_thunk(&thunks[75], r, winIVROverlay_IVROverlay_022_ShowKeyboardForOverlay, 8, FALSE, FALSE); + init_thunk(&thunks[76], r, winIVROverlay_IVROverlay_022_GetKeyboardText, 2, FALSE, FALSE); + init_thunk(&thunks[77], r, winIVROverlay_IVROverlay_022_HideKeyboard, 0, FALSE, FALSE); + init_thunk(&thunks[78], r, winIVROverlay_IVROverlay_022_SetKeyboardTransformAbsolute, 2, FALSE, FALSE); + init_thunk(&thunks[79], r, winIVROverlay_IVROverlay_022_SetKeyboardPositionForOverlay, 2, FALSE, FALSE); + init_thunk(&thunks[80], r, winIVROverlay_IVROverlay_022_ShowMessageOverlay, 6, FALSE, FALSE); + init_thunk(&thunks[81], r, winIVROverlay_IVROverlay_022_CloseMessageOverlay, 0, FALSE, FALSE); + for (i = 0; i < 82; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVROverlay_IVROverlay_022_FnTable(void *object) +{ + winIVROverlay_IVROverlay_022 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + #include "cppIVROverlay_IVROverlay_021.h" typedef struct __winIVROverlay_IVROverlay_021 { diff --git a/vrclient_x64/vrclient_x64/winIVROverlayView.c b/vrclient_x64/vrclient_x64/winIVROverlayView.c new file mode 100644 index 0000000000..9b7c475aed --- /dev/null +++ b/vrclient_x64/vrclient_x64/winIVROverlayView.c @@ -0,0 +1,113 @@ +/* This file is auto-generated, do not edit. */ +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +#include "cxx.h" + +#include "vrclient_defs.h" + +#include "vrclient_private.h" + +#include "struct_converters.h" + +#include "flatapi.h" + +WINE_DEFAULT_DEBUG_CHANNEL(vrclient); + +#include "cppIVROverlayView_IVROverlayView_003.h" + +typedef struct __winIVROverlayView_IVROverlayView_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVROverlayView_IVROverlayView_003; + +DEFINE_THISCALL_WRAPPER(winIVROverlayView_IVROverlayView_003_AcquireOverlayView, 24) +EVROverlayError __thiscall winIVROverlayView_IVROverlayView_003_AcquireOverlayView(winIVROverlayView_IVROverlayView_003 *_this, VROverlayHandle_t ulOverlayHandle, VRNativeDevice_t * pNativeDevice, VROverlayView_t * pOverlayView, uint32_t unOverlayViewSize) +{ + TRACE("%p\n", _this); + return cppIVROverlayView_IVROverlayView_003_AcquireOverlayView(_this->linux_side, ulOverlayHandle, pNativeDevice, pOverlayView, unOverlayViewSize); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlayView_IVROverlayView_003_ReleaseOverlayView, 8) +EVROverlayError __thiscall winIVROverlayView_IVROverlayView_003_ReleaseOverlayView(winIVROverlayView_IVROverlayView_003 *_this, VROverlayView_t * pOverlayView) +{ + TRACE("%p\n", _this); + return cppIVROverlayView_IVROverlayView_003_ReleaseOverlayView(_this->linux_side, pOverlayView); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlayView_IVROverlayView_003_PostOverlayEvent, 16) +void __thiscall winIVROverlayView_IVROverlayView_003_PostOverlayEvent(winIVROverlayView_IVROverlayView_003 *_this, VROverlayHandle_t ulOverlayHandle, VREvent_t * pvrEvent) +{ + TRACE("%p\n", _this); + cppIVROverlayView_IVROverlayView_003_PostOverlayEvent(_this->linux_side, ulOverlayHandle, pvrEvent); +} + +DEFINE_THISCALL_WRAPPER(winIVROverlayView_IVROverlayView_003_IsViewingPermitted, 12) +bool __thiscall winIVROverlayView_IVROverlayView_003_IsViewingPermitted(winIVROverlayView_IVROverlayView_003 *_this, VROverlayHandle_t ulOverlayHandle) +{ + TRACE("%p\n", _this); + return cppIVROverlayView_IVROverlayView_003_IsViewingPermitted(_this->linux_side, ulOverlayHandle); +} + +extern vtable_ptr winIVROverlayView_IVROverlayView_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVROverlayView_IVROverlayView_003, + VTABLE_ADD_FUNC(winIVROverlayView_IVROverlayView_003_AcquireOverlayView) + VTABLE_ADD_FUNC(winIVROverlayView_IVROverlayView_003_ReleaseOverlayView) + VTABLE_ADD_FUNC(winIVROverlayView_IVROverlayView_003_PostOverlayEvent) + VTABLE_ADD_FUNC(winIVROverlayView_IVROverlayView_003_IsViewingPermitted) + ); +#ifndef __GNUC__ +} +#endif + +winIVROverlayView_IVROverlayView_003 *create_winIVROverlayView_IVROverlayView_003(void *linux_side) +{ + winIVROverlayView_IVROverlayView_003 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVROverlayView_IVROverlayView_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVROverlayView_IVROverlayView_003_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVROverlayView_IVROverlayView_003(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVROverlayView_IVROverlayView_003 *create_winIVROverlayView_IVROverlayView_003_FnTable(void *linux_side) +{ + winIVROverlayView_IVROverlayView_003 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVROverlayView_IVROverlayView_003)); + struct thunk *thunks = alloc_thunks(4); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 4 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVROverlayView_IVROverlayView_003_AcquireOverlayView, 4, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVROverlayView_IVROverlayView_003_ReleaseOverlayView, 1, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVROverlayView_IVROverlayView_003_PostOverlayEvent, 2, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVROverlayView_IVROverlayView_003_IsViewingPermitted, 1, FALSE, FALSE); + for (i = 0; i < 4; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVROverlayView_IVROverlayView_003_FnTable(void *object) +{ + winIVROverlayView_IVROverlayView_003 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + diff --git a/vrclient_x64/vrclient_x64/winIVRRenderModels.c b/vrclient_x64/vrclient_x64/winIVRRenderModels.c index 684c5f7d22..54bba15c7e 100644 --- a/vrclient_x64/vrclient_x64/winIVRRenderModels.c +++ b/vrclient_x64/vrclient_x64/winIVRRenderModels.c @@ -26,28 +26,28 @@ typedef struct __winIVRRenderModels_IVRRenderModels_006 { } winIVRRenderModels_IVRRenderModels_006; DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async, 12) -EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(winIVRRenderModels_IVRRenderModels_006 *_this, const char * pchRenderModelName, winRenderModel_t_1819 ** ppRenderModel) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(winIVRRenderModels_IVRRenderModels_006 *_this, const char * pchRenderModelName, winRenderModel_t_11030 ** ppRenderModel) { TRACE("%p\n", _this); return cppIVRRenderModels_IVRRenderModels_006_LoadRenderModel_Async(_this->linux_side, pchRenderModelName, ppRenderModel); } DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_FreeRenderModel, 8) -void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeRenderModel(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_t_1819 * pRenderModel) +void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeRenderModel(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_t_11030 * pRenderModel) { TRACE("%p\n", _this); cppIVRRenderModels_IVRRenderModels_006_FreeRenderModel(_this->linux_side, pRenderModel); } DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_LoadTexture_Async, 12) -EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(winIVRRenderModels_IVRRenderModels_006 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_1819 ** ppTexture) +EVRRenderModelError __thiscall winIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(winIVRRenderModels_IVRRenderModels_006 *_this, TextureID_t textureId, winRenderModel_TextureMap_t_11030 ** ppTexture) { TRACE("%p\n", _this); return cppIVRRenderModels_IVRRenderModels_006_LoadTexture_Async(_this->linux_side, textureId, ppTexture); } DEFINE_THISCALL_WRAPPER(winIVRRenderModels_IVRRenderModels_006_FreeTexture, 8) -void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeTexture(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_TextureMap_t_1819 * pTexture) +void __thiscall winIVRRenderModels_IVRRenderModels_006_FreeTexture(winIVRRenderModels_IVRRenderModels_006 *_this, winRenderModel_TextureMap_t_11030 * pTexture) { TRACE("%p\n", _this); cppIVRRenderModels_IVRRenderModels_006_FreeTexture(_this->linux_side, pTexture); diff --git a/vrclient_x64/vrclient_x64/winIVRSettings.c b/vrclient_x64/vrclient_x64/winIVRSettings.c index 411ee6047a..60f2e435e1 100644 --- a/vrclient_x64/vrclient_x64/winIVRSettings.c +++ b/vrclient_x64/vrclient_x64/winIVRSettings.c @@ -18,6 +18,162 @@ WINE_DEFAULT_DEBUG_CHANNEL(vrclient); +#include "cppIVRSettings_IVRSettings_003.h" + +typedef struct __winIVRSettings_IVRSettings_003 { + vtable_ptr *vtable; + void *linux_side; +} winIVRSettings_IVRSettings_003; + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum, 8) +const char * __thiscall winIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum(winIVRSettings_IVRSettings_003 *_this, EVRSettingsError eError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum(_this->linux_side, eError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_SetBool, 17) +void __thiscall winIVRSettings_IVRSettings_003_SetBool(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, bool bValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_SetBool(_this->linux_side, pchSection, pchSettingsKey, bValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_SetInt32, 20) +void __thiscall winIVRSettings_IVRSettings_003_SetInt32(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_SetInt32(_this->linux_side, pchSection, pchSettingsKey, nValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_SetFloat, 20) +void __thiscall winIVRSettings_IVRSettings_003_SetFloat(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, float flValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_SetFloat(_this->linux_side, pchSection, pchSettingsKey, flValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_SetString, 20) +void __thiscall winIVRSettings_IVRSettings_003_SetString(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, const char * pchValue, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_SetString(_this->linux_side, pchSection, pchSettingsKey, pchValue, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_GetBool, 16) +bool __thiscall winIVRSettings_IVRSettings_003_GetBool(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_003_GetBool(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_GetInt32, 16) +int32_t __thiscall winIVRSettings_IVRSettings_003_GetInt32(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_003_GetInt32(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_GetFloat, 16) +float __thiscall winIVRSettings_IVRSettings_003_GetFloat(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + return cppIVRSettings_IVRSettings_003_GetFloat(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_GetString, 24) +void __thiscall winIVRSettings_IVRSettings_003_GetString(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_GetString(_this->linux_side, pchSection, pchSettingsKey, pchValue, unValueLen, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_RemoveSection, 12) +void __thiscall winIVRSettings_IVRSettings_003_RemoveSection(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_RemoveSection(_this->linux_side, pchSection, peError); +} + +DEFINE_THISCALL_WRAPPER(winIVRSettings_IVRSettings_003_RemoveKeyInSection, 16) +void __thiscall winIVRSettings_IVRSettings_003_RemoveKeyInSection(winIVRSettings_IVRSettings_003 *_this, const char * pchSection, const char * pchSettingsKey, EVRSettingsError * peError) +{ + TRACE("%p\n", _this); + cppIVRSettings_IVRSettings_003_RemoveKeyInSection(_this->linux_side, pchSection, pchSettingsKey, peError); +} + +extern vtable_ptr winIVRSettings_IVRSettings_003_vtable; + +#ifndef __GNUC__ +void __asm_dummy_vtables(void) { +#endif + __ASM_VTABLE(winIVRSettings_IVRSettings_003, + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_SetBool) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_SetInt32) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_SetFloat) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_SetString) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_GetBool) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_GetInt32) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_GetFloat) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_GetString) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_RemoveSection) + VTABLE_ADD_FUNC(winIVRSettings_IVRSettings_003_RemoveKeyInSection) + ); +#ifndef __GNUC__ +} +#endif + +winIVRSettings_IVRSettings_003 *create_winIVRSettings_IVRSettings_003(void *linux_side) +{ + winIVRSettings_IVRSettings_003 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRSettings_IVRSettings_003)); + TRACE("-> %p\n", r); + r->vtable = &winIVRSettings_IVRSettings_003_vtable; + r->linux_side = linux_side; + return r; +} + +void destroy_winIVRSettings_IVRSettings_003(void *object) +{ + TRACE("%p\n", object); + HeapFree(GetProcessHeap(), 0, object); +} + +winIVRSettings_IVRSettings_003 *create_winIVRSettings_IVRSettings_003_FnTable(void *linux_side) +{ + winIVRSettings_IVRSettings_003 *r = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(winIVRSettings_IVRSettings_003)); + struct thunk *thunks = alloc_thunks(11); + struct thunk **vtable = HeapAlloc(GetProcessHeap(), 0, 11 * sizeof(*vtable)); + int i; + + TRACE("-> %p, vtable %p, thunks %p\n", r, vtable, thunks); + init_thunk(&thunks[0], r, winIVRSettings_IVRSettings_003_GetSettingsErrorNameFromEnum, 1, FALSE, FALSE); + init_thunk(&thunks[1], r, winIVRSettings_IVRSettings_003_SetBool, 4, FALSE, FALSE); + init_thunk(&thunks[2], r, winIVRSettings_IVRSettings_003_SetInt32, 4, FALSE, FALSE); + init_thunk(&thunks[3], r, winIVRSettings_IVRSettings_003_SetFloat, 4, TRUE, FALSE); + init_thunk(&thunks[4], r, winIVRSettings_IVRSettings_003_SetString, 4, FALSE, FALSE); + init_thunk(&thunks[5], r, winIVRSettings_IVRSettings_003_GetBool, 3, FALSE, FALSE); + init_thunk(&thunks[6], r, winIVRSettings_IVRSettings_003_GetInt32, 3, FALSE, FALSE); + init_thunk(&thunks[7], r, winIVRSettings_IVRSettings_003_GetFloat, 3, FALSE, FALSE); + init_thunk(&thunks[8], r, winIVRSettings_IVRSettings_003_GetString, 5, FALSE, FALSE); + init_thunk(&thunks[9], r, winIVRSettings_IVRSettings_003_RemoveSection, 2, FALSE, FALSE); + init_thunk(&thunks[10], r, winIVRSettings_IVRSettings_003_RemoveKeyInSection, 3, FALSE, FALSE); + for (i = 0; i < 11; i++) + vtable[i] = &thunks[i]; + r->linux_side = linux_side; + r->vtable = (void *)vtable; + return r; +} + +void destroy_winIVRSettings_IVRSettings_003_FnTable(void *object) +{ + winIVRSettings_IVRSettings_003 *win_object = object; + TRACE("%p\n", win_object); + VirtualFree(win_object->vtable[0], 0, MEM_RELEASE); + HeapFree(GetProcessHeap(), 0, win_object->vtable); + HeapFree(GetProcessHeap(), 0, win_object); +} + #include "cppIVRSettings_IVRSettings_002.h" typedef struct __winIVRSettings_IVRSettings_002 { diff --git a/vrclient_x64/vrclient_x64/winIVRSystem.c b/vrclient_x64/vrclient_x64/winIVRSystem.c index 4fc69823a9..c168bc6ac8 100644 --- a/vrclient_x64/vrclient_x64/winIVRSystem.c +++ b/vrclient_x64/vrclient_x64/winIVRSystem.c @@ -241,14 +241,14 @@ const char * __thiscall winIVRSystem_IVRSystem_021_GetPropErrorNameFromEnum(winI } DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_021_PollNextEvent, 12) -bool __thiscall winIVRSystem_IVRSystem_021_PollNextEvent(winIVRSystem_IVRSystem_021 *_this, winVREvent_t_1819 * pEvent, uint32_t uncbVREvent) +bool __thiscall winIVRSystem_IVRSystem_021_PollNextEvent(winIVRSystem_IVRSystem_021 *_this, winVREvent_t_11030 * pEvent, uint32_t uncbVREvent) { TRACE("%p\n", _this); return cppIVRSystem_IVRSystem_021_PollNextEvent(_this->linux_side, pEvent, uncbVREvent); } DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_021_PollNextEventWithPose, 20) -bool __thiscall winIVRSystem_IVRSystem_021_PollNextEventWithPose(winIVRSystem_IVRSystem_021 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_1819 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) +bool __thiscall winIVRSystem_IVRSystem_021_PollNextEventWithPose(winIVRSystem_IVRSystem_021 *_this, ETrackingUniverseOrigin eOrigin, winVREvent_t_11030 * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose) { TRACE("%p\n", _this); return cppIVRSystem_IVRSystem_021_PollNextEventWithPose(_this->linux_side, eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); @@ -270,14 +270,14 @@ HiddenAreaMesh_t *__thiscall winIVRSystem_IVRSystem_021_GetHiddenAreaMesh(winIVR } DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_021_GetControllerState, 16) -bool __thiscall winIVRSystem_IVRSystem_021_GetControllerState(winIVRSystem_IVRSystem_021 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1819 * pControllerState, uint32_t unControllerStateSize) +bool __thiscall winIVRSystem_IVRSystem_021_GetControllerState(winIVRSystem_IVRSystem_021 *_this, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_11030 * pControllerState, uint32_t unControllerStateSize) { TRACE("%p\n", _this); return cppIVRSystem_IVRSystem_021_GetControllerState(_this->linux_side, unControllerDeviceIndex, pControllerState, unControllerStateSize); } DEFINE_THISCALL_WRAPPER(winIVRSystem_IVRSystem_021_GetControllerStateWithPose, 24) -bool __thiscall winIVRSystem_IVRSystem_021_GetControllerStateWithPose(winIVRSystem_IVRSystem_021 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_1819 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) +bool __thiscall winIVRSystem_IVRSystem_021_GetControllerStateWithPose(winIVRSystem_IVRSystem_021 *_this, ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, winVRControllerState001_t_11030 * pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t * pTrackedDevicePose) { TRACE("%p\n", _this); return cppIVRSystem_IVRSystem_021_GetControllerStateWithPose(_this->linux_side, eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose); diff --git a/vrclient_x64/vrclient_x64/winIVRTrackedCamera.c b/vrclient_x64/vrclient_x64/winIVRTrackedCamera.c index 11929a659d..0df6659561 100644 --- a/vrclient_x64/vrclient_x64/winIVRTrackedCamera.c +++ b/vrclient_x64/vrclient_x64/winIVRTrackedCamera.c @@ -75,7 +75,7 @@ EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_Releas } DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer, 32) -EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(winIVRTrackedCamera_IVRTrackedCamera_006 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, winCameraVideoStreamFrameHeader_t_1819 * pFrameHeader, uint32_t nFrameHeaderSize) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(winIVRTrackedCamera_IVRTrackedCamera_006 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, winCameraVideoStreamFrameHeader_t_11030 * pFrameHeader, uint32_t nFrameHeaderSize) { TRACE("%p\n", _this); return cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamFrameBuffer(_this->linux_side, hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, pFrameHeader, nFrameHeaderSize); @@ -89,14 +89,14 @@ EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVid } DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11, 32) -EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(winIVRTrackedCamera_IVRTrackedCamera_006 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, winCameraVideoStreamFrameHeader_t_1819 * pFrameHeader, uint32_t nFrameHeaderSize) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(winIVRTrackedCamera_IVRTrackedCamera_006 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, winCameraVideoStreamFrameHeader_t_11030 * pFrameHeader, uint32_t nFrameHeaderSize) { TRACE("%p\n", _this); return cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureD3D11(_this->linux_side, hTrackedCamera, eFrameType, pD3D11DeviceOrResource, ppD3D11ShaderResourceView, pFrameHeader, nFrameHeaderSize); } DEFINE_THISCALL_WRAPPER(winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL, 28) -EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(winIVRTrackedCamera_IVRTrackedCamera_006 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, winCameraVideoStreamFrameHeader_t_1819 * pFrameHeader, uint32_t nFrameHeaderSize) +EVRTrackedCameraError __thiscall winIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(winIVRTrackedCamera_IVRTrackedCamera_006 *_this, TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, winCameraVideoStreamFrameHeader_t_11030 * pFrameHeader, uint32_t nFrameHeaderSize) { TRACE("%p\n", _this); return cppIVRTrackedCamera_IVRTrackedCamera_006_GetVideoStreamTextureGL(_this->linux_side, hTrackedCamera, eFrameType, pglTextureId, pFrameHeader, nFrameHeaderSize); diff --git a/vrclient_x64/vrclient_x64/win_constructors.h b/vrclient_x64/vrclient_x64/win_constructors.h index 0d777386d2..d9a3d79f03 100644 --- a/vrclient_x64/vrclient_x64/win_constructors.h +++ b/vrclient_x64/vrclient_x64/win_constructors.h @@ -2,18 +2,22 @@ extern void *create_winIVRSystem_IVRSystem_021(void *); extern void *create_winIVRSystem_IVRSystem_021_FnTable(void *); extern void *create_winIVRApplications_IVRApplications_007(void *); extern void *create_winIVRApplications_IVRApplications_007_FnTable(void *); -extern void *create_winIVRSettings_IVRSettings_002(void *); -extern void *create_winIVRSettings_IVRSettings_002_FnTable(void *); +extern void *create_winIVRSettings_IVRSettings_003(void *); +extern void *create_winIVRSettings_IVRSettings_003_FnTable(void *); extern void *create_winIVRChaperone_IVRChaperone_003(void *); extern void *create_winIVRChaperone_IVRChaperone_003_FnTable(void *); extern void *create_winIVRChaperoneSetup_IVRChaperoneSetup_006(void *); extern void *create_winIVRChaperoneSetup_IVRChaperoneSetup_006_FnTable(void *); -extern void *create_winIVRCompositor_IVRCompositor_022(void *); -extern void *create_winIVRCompositor_IVRCompositor_022_FnTable(void *); +extern void *create_winIVRCompositor_IVRCompositor_026(void *); +extern void *create_winIVRCompositor_IVRCompositor_026_FnTable(void *); +extern void *create_winIVRHeadsetView_IVRHeadsetView_001(void *); +extern void *create_winIVRHeadsetView_IVRHeadsetView_001_FnTable(void *); extern void *create_winIVRNotifications_IVRNotifications_002(void *); extern void *create_winIVRNotifications_IVRNotifications_002_FnTable(void *); -extern void *create_winIVROverlay_IVROverlay_021(void *); -extern void *create_winIVROverlay_IVROverlay_021_FnTable(void *); +extern void *create_winIVROverlay_IVROverlay_024(void *); +extern void *create_winIVROverlay_IVROverlay_024_FnTable(void *); +extern void *create_winIVROverlayView_IVROverlayView_003(void *); +extern void *create_winIVROverlayView_IVROverlayView_003_FnTable(void *); extern void *create_winIVRRenderModels_IVRRenderModels_006(void *); extern void *create_winIVRRenderModels_IVRRenderModels_006_FnTable(void *); extern void *create_winIVRExtendedDisplay_IVRExtendedDisplay_001(void *); @@ -26,12 +30,28 @@ extern void *create_winIVRResources_IVRResources_001(void *); extern void *create_winIVRResources_IVRResources_001_FnTable(void *); extern void *create_winIVRDriverManager_IVRDriverManager_001(void *); extern void *create_winIVRDriverManager_IVRDriverManager_001_FnTable(void *); -extern void *create_winIVRInput_IVRInput_007(void *); -extern void *create_winIVRInput_IVRInput_007_FnTable(void *); +extern void *create_winIVRInput_IVRInput_010(void *); +extern void *create_winIVRInput_IVRInput_010_FnTable(void *); extern void *create_winIVRIOBuffer_IVRIOBuffer_002(void *); extern void *create_winIVRIOBuffer_IVRIOBuffer_002_FnTable(void *); +extern void *create_winIVRControlPanel_IVRControlPanel_006(void *); +extern void *create_winIVRControlPanel_IVRControlPanel_006_FnTable(void *); +extern void *create_winIVRMailbox_IVRMailbox_001(void *); +extern void *create_winIVRMailbox_IVRMailbox_001_FnTable(void *); extern void *create_winIVRClientCore_IVRClientCore_003(void *); extern void *create_winIVRClientCore_IVRClientCore_003_FnTable(void *); +extern void *create_winIVRCompositor_IVRCompositor_024(void *); +extern void *create_winIVRCompositor_IVRCompositor_024_FnTable(void *); +extern void *create_winIVROverlay_IVROverlay_022(void *); +extern void *create_winIVROverlay_IVROverlay_022_FnTable(void *); +extern void *create_winIVRInput_IVRInput_007(void *); +extern void *create_winIVRInput_IVRInput_007_FnTable(void *); +extern void *create_winIVRSettings_IVRSettings_002(void *); +extern void *create_winIVRSettings_IVRSettings_002_FnTable(void *); +extern void *create_winIVRCompositor_IVRCompositor_022(void *); +extern void *create_winIVRCompositor_IVRCompositor_022_FnTable(void *); +extern void *create_winIVROverlay_IVROverlay_021(void *); +extern void *create_winIVROverlay_IVROverlay_021_FnTable(void *); extern void *create_winIVRSystem_IVRSystem_020(void *); extern void *create_winIVRSystem_IVRSystem_020_FnTable(void *); extern void *create_winIVRApplications_IVRApplications_006(void *); diff --git a/vrclient_x64/vrclient_x64/win_constructors_table.dat b/vrclient_x64/vrclient_x64/win_constructors_table.dat index 7ade313993..dcdc70425e 100644 --- a/vrclient_x64/vrclient_x64/win_constructors_table.dat +++ b/vrclient_x64/vrclient_x64/win_constructors_table.dat @@ -2,18 +2,22 @@ {"FnTable:IVRSystem_021", &create_winIVRSystem_IVRSystem_021_FnTable, &destroy_winIVRSystem_IVRSystem_021_FnTable}, {"IVRApplications_007", &create_winIVRApplications_IVRApplications_007, &destroy_winIVRApplications_IVRApplications_007}, {"FnTable:IVRApplications_007", &create_winIVRApplications_IVRApplications_007_FnTable, &destroy_winIVRApplications_IVRApplications_007_FnTable}, - {"IVRSettings_002", &create_winIVRSettings_IVRSettings_002, &destroy_winIVRSettings_IVRSettings_002}, - {"FnTable:IVRSettings_002", &create_winIVRSettings_IVRSettings_002_FnTable, &destroy_winIVRSettings_IVRSettings_002_FnTable}, + {"IVRSettings_003", &create_winIVRSettings_IVRSettings_003, &destroy_winIVRSettings_IVRSettings_003}, + {"FnTable:IVRSettings_003", &create_winIVRSettings_IVRSettings_003_FnTable, &destroy_winIVRSettings_IVRSettings_003_FnTable}, {"IVRChaperone_003", &create_winIVRChaperone_IVRChaperone_003, &destroy_winIVRChaperone_IVRChaperone_003}, {"FnTable:IVRChaperone_003", &create_winIVRChaperone_IVRChaperone_003_FnTable, &destroy_winIVRChaperone_IVRChaperone_003_FnTable}, {"IVRChaperoneSetup_006", &create_winIVRChaperoneSetup_IVRChaperoneSetup_006, &destroy_winIVRChaperoneSetup_IVRChaperoneSetup_006}, {"FnTable:IVRChaperoneSetup_006", &create_winIVRChaperoneSetup_IVRChaperoneSetup_006_FnTable, &destroy_winIVRChaperoneSetup_IVRChaperoneSetup_006_FnTable}, - {"IVRCompositor_022", &create_winIVRCompositor_IVRCompositor_022, &destroy_winIVRCompositor_IVRCompositor_022}, - {"FnTable:IVRCompositor_022", &create_winIVRCompositor_IVRCompositor_022_FnTable, &destroy_winIVRCompositor_IVRCompositor_022_FnTable}, + {"IVRCompositor_026", &create_winIVRCompositor_IVRCompositor_026, &destroy_winIVRCompositor_IVRCompositor_026}, + {"FnTable:IVRCompositor_026", &create_winIVRCompositor_IVRCompositor_026_FnTable, &destroy_winIVRCompositor_IVRCompositor_026_FnTable}, + {"IVRHeadsetView_001", &create_winIVRHeadsetView_IVRHeadsetView_001, &destroy_winIVRHeadsetView_IVRHeadsetView_001}, + {"FnTable:IVRHeadsetView_001", &create_winIVRHeadsetView_IVRHeadsetView_001_FnTable, &destroy_winIVRHeadsetView_IVRHeadsetView_001_FnTable}, {"IVRNotifications_002", &create_winIVRNotifications_IVRNotifications_002, &destroy_winIVRNotifications_IVRNotifications_002}, {"FnTable:IVRNotifications_002", &create_winIVRNotifications_IVRNotifications_002_FnTable, &destroy_winIVRNotifications_IVRNotifications_002_FnTable}, - {"IVROverlay_021", &create_winIVROverlay_IVROverlay_021, &destroy_winIVROverlay_IVROverlay_021}, - {"FnTable:IVROverlay_021", &create_winIVROverlay_IVROverlay_021_FnTable, &destroy_winIVROverlay_IVROverlay_021_FnTable}, + {"IVROverlay_024", &create_winIVROverlay_IVROverlay_024, &destroy_winIVROverlay_IVROverlay_024}, + {"FnTable:IVROverlay_024", &create_winIVROverlay_IVROverlay_024_FnTable, &destroy_winIVROverlay_IVROverlay_024_FnTable}, + {"IVROverlayView_003", &create_winIVROverlayView_IVROverlayView_003, &destroy_winIVROverlayView_IVROverlayView_003}, + {"FnTable:IVROverlayView_003", &create_winIVROverlayView_IVROverlayView_003_FnTable, &destroy_winIVROverlayView_IVROverlayView_003_FnTable}, {"IVRRenderModels_006", &create_winIVRRenderModels_IVRRenderModels_006, &destroy_winIVRRenderModels_IVRRenderModels_006}, {"FnTable:IVRRenderModels_006", &create_winIVRRenderModels_IVRRenderModels_006_FnTable, &destroy_winIVRRenderModels_IVRRenderModels_006_FnTable}, {"IVRExtendedDisplay_001", &create_winIVRExtendedDisplay_IVRExtendedDisplay_001, &destroy_winIVRExtendedDisplay_IVRExtendedDisplay_001}, @@ -26,12 +30,28 @@ {"FnTable:IVRResources_001", &create_winIVRResources_IVRResources_001_FnTable, &destroy_winIVRResources_IVRResources_001_FnTable}, {"IVRDriverManager_001", &create_winIVRDriverManager_IVRDriverManager_001, &destroy_winIVRDriverManager_IVRDriverManager_001}, {"FnTable:IVRDriverManager_001", &create_winIVRDriverManager_IVRDriverManager_001_FnTable, &destroy_winIVRDriverManager_IVRDriverManager_001_FnTable}, - {"IVRInput_007", &create_winIVRInput_IVRInput_007, &destroy_winIVRInput_IVRInput_007}, - {"FnTable:IVRInput_007", &create_winIVRInput_IVRInput_007_FnTable, &destroy_winIVRInput_IVRInput_007_FnTable}, + {"IVRInput_010", &create_winIVRInput_IVRInput_010, &destroy_winIVRInput_IVRInput_010}, + {"FnTable:IVRInput_010", &create_winIVRInput_IVRInput_010_FnTable, &destroy_winIVRInput_IVRInput_010_FnTable}, {"IVRIOBuffer_002", &create_winIVRIOBuffer_IVRIOBuffer_002, &destroy_winIVRIOBuffer_IVRIOBuffer_002}, {"FnTable:IVRIOBuffer_002", &create_winIVRIOBuffer_IVRIOBuffer_002_FnTable, &destroy_winIVRIOBuffer_IVRIOBuffer_002_FnTable}, + {"IVRControlPanel_006", &create_winIVRControlPanel_IVRControlPanel_006, &destroy_winIVRControlPanel_IVRControlPanel_006}, + {"FnTable:IVRControlPanel_006", &create_winIVRControlPanel_IVRControlPanel_006_FnTable, &destroy_winIVRControlPanel_IVRControlPanel_006_FnTable}, + {"IVRMailbox_001", &create_winIVRMailbox_IVRMailbox_001, &destroy_winIVRMailbox_IVRMailbox_001}, + {"FnTable:IVRMailbox_001", &create_winIVRMailbox_IVRMailbox_001_FnTable, &destroy_winIVRMailbox_IVRMailbox_001_FnTable}, {"IVRClientCore_003", &create_winIVRClientCore_IVRClientCore_003, &destroy_winIVRClientCore_IVRClientCore_003}, {"FnTable:IVRClientCore_003", &create_winIVRClientCore_IVRClientCore_003_FnTable, &destroy_winIVRClientCore_IVRClientCore_003_FnTable}, + {"IVRCompositor_024", &create_winIVRCompositor_IVRCompositor_024, &destroy_winIVRCompositor_IVRCompositor_024}, + {"FnTable:IVRCompositor_024", &create_winIVRCompositor_IVRCompositor_024_FnTable, &destroy_winIVRCompositor_IVRCompositor_024_FnTable}, + {"IVROverlay_022", &create_winIVROverlay_IVROverlay_022, &destroy_winIVROverlay_IVROverlay_022}, + {"FnTable:IVROverlay_022", &create_winIVROverlay_IVROverlay_022_FnTable, &destroy_winIVROverlay_IVROverlay_022_FnTable}, + {"IVRInput_007", &create_winIVRInput_IVRInput_007, &destroy_winIVRInput_IVRInput_007}, + {"FnTable:IVRInput_007", &create_winIVRInput_IVRInput_007_FnTable, &destroy_winIVRInput_IVRInput_007_FnTable}, + {"IVRSettings_002", &create_winIVRSettings_IVRSettings_002, &destroy_winIVRSettings_IVRSettings_002}, + {"FnTable:IVRSettings_002", &create_winIVRSettings_IVRSettings_002_FnTable, &destroy_winIVRSettings_IVRSettings_002_FnTable}, + {"IVRCompositor_022", &create_winIVRCompositor_IVRCompositor_022, &destroy_winIVRCompositor_IVRCompositor_022}, + {"FnTable:IVRCompositor_022", &create_winIVRCompositor_IVRCompositor_022_FnTable, &destroy_winIVRCompositor_IVRCompositor_022_FnTable}, + {"IVROverlay_021", &create_winIVROverlay_IVROverlay_021, &destroy_winIVROverlay_IVROverlay_021}, + {"FnTable:IVROverlay_021", &create_winIVROverlay_IVROverlay_021_FnTable, &destroy_winIVROverlay_IVROverlay_021_FnTable}, {"IVRSystem_020", &create_winIVRSystem_IVRSystem_020, &destroy_winIVRSystem_IVRSystem_020}, {"FnTable:IVRSystem_020", &create_winIVRSystem_IVRSystem_020_FnTable, &destroy_winIVRSystem_IVRSystem_020_FnTable}, {"IVRApplications_006", &create_winIVRApplications_IVRApplications_006, &destroy_winIVRApplications_IVRApplications_006}, diff --git a/vrclient_x64/vrclient_x64/win_destructors.h b/vrclient_x64/vrclient_x64/win_destructors.h index 63f2a1e97b..8aed697e31 100644 --- a/vrclient_x64/vrclient_x64/win_destructors.h +++ b/vrclient_x64/vrclient_x64/win_destructors.h @@ -2,18 +2,22 @@ extern void destroy_winIVRSystem_IVRSystem_021(void *); extern void destroy_winIVRSystem_IVRSystem_021_FnTable(void *); extern void destroy_winIVRApplications_IVRApplications_007(void *); extern void destroy_winIVRApplications_IVRApplications_007_FnTable(void *); -extern void destroy_winIVRSettings_IVRSettings_002(void *); -extern void destroy_winIVRSettings_IVRSettings_002_FnTable(void *); +extern void destroy_winIVRSettings_IVRSettings_003(void *); +extern void destroy_winIVRSettings_IVRSettings_003_FnTable(void *); extern void destroy_winIVRChaperone_IVRChaperone_003(void *); extern void destroy_winIVRChaperone_IVRChaperone_003_FnTable(void *); extern void destroy_winIVRChaperoneSetup_IVRChaperoneSetup_006(void *); extern void destroy_winIVRChaperoneSetup_IVRChaperoneSetup_006_FnTable(void *); -extern void destroy_winIVRCompositor_IVRCompositor_022(void *); -extern void destroy_winIVRCompositor_IVRCompositor_022_FnTable(void *); +extern void destroy_winIVRCompositor_IVRCompositor_026(void *); +extern void destroy_winIVRCompositor_IVRCompositor_026_FnTable(void *); +extern void destroy_winIVRHeadsetView_IVRHeadsetView_001(void *); +extern void destroy_winIVRHeadsetView_IVRHeadsetView_001_FnTable(void *); extern void destroy_winIVRNotifications_IVRNotifications_002(void *); extern void destroy_winIVRNotifications_IVRNotifications_002_FnTable(void *); -extern void destroy_winIVROverlay_IVROverlay_021(void *); -extern void destroy_winIVROverlay_IVROverlay_021_FnTable(void *); +extern void destroy_winIVROverlay_IVROverlay_024(void *); +extern void destroy_winIVROverlay_IVROverlay_024_FnTable(void *); +extern void destroy_winIVROverlayView_IVROverlayView_003(void *); +extern void destroy_winIVROverlayView_IVROverlayView_003_FnTable(void *); extern void destroy_winIVRRenderModels_IVRRenderModels_006(void *); extern void destroy_winIVRRenderModels_IVRRenderModels_006_FnTable(void *); extern void destroy_winIVRExtendedDisplay_IVRExtendedDisplay_001(void *); @@ -26,12 +30,28 @@ extern void destroy_winIVRResources_IVRResources_001(void *); extern void destroy_winIVRResources_IVRResources_001_FnTable(void *); extern void destroy_winIVRDriverManager_IVRDriverManager_001(void *); extern void destroy_winIVRDriverManager_IVRDriverManager_001_FnTable(void *); -extern void destroy_winIVRInput_IVRInput_007(void *); -extern void destroy_winIVRInput_IVRInput_007_FnTable(void *); +extern void destroy_winIVRInput_IVRInput_010(void *); +extern void destroy_winIVRInput_IVRInput_010_FnTable(void *); extern void destroy_winIVRIOBuffer_IVRIOBuffer_002(void *); extern void destroy_winIVRIOBuffer_IVRIOBuffer_002_FnTable(void *); +extern void destroy_winIVRControlPanel_IVRControlPanel_006(void *); +extern void destroy_winIVRControlPanel_IVRControlPanel_006_FnTable(void *); +extern void destroy_winIVRMailbox_IVRMailbox_001(void *); +extern void destroy_winIVRMailbox_IVRMailbox_001_FnTable(void *); extern void destroy_winIVRClientCore_IVRClientCore_003(void *); extern void destroy_winIVRClientCore_IVRClientCore_003_FnTable(void *); +extern void destroy_winIVRCompositor_IVRCompositor_024(void *); +extern void destroy_winIVRCompositor_IVRCompositor_024_FnTable(void *); +extern void destroy_winIVROverlay_IVROverlay_022(void *); +extern void destroy_winIVROverlay_IVROverlay_022_FnTable(void *); +extern void destroy_winIVRInput_IVRInput_007(void *); +extern void destroy_winIVRInput_IVRInput_007_FnTable(void *); +extern void destroy_winIVRSettings_IVRSettings_002(void *); +extern void destroy_winIVRSettings_IVRSettings_002_FnTable(void *); +extern void destroy_winIVRCompositor_IVRCompositor_022(void *); +extern void destroy_winIVRCompositor_IVRCompositor_022_FnTable(void *); +extern void destroy_winIVROverlay_IVROverlay_021(void *); +extern void destroy_winIVROverlay_IVROverlay_021_FnTable(void *); extern void destroy_winIVRSystem_IVRSystem_020(void *); extern void destroy_winIVRSystem_IVRSystem_020_FnTable(void *); extern void destroy_winIVRApplications_IVRApplications_006(void *); diff --git a/wine b/wine index a1e5640b60..21888ad1af 160000 --- a/wine +++ b/wine @@ -1 +1 @@ -Subproject commit a1e5640b60439f0df83fc24c8a69629cef2c6c67 +Subproject commit 21888ad1af89c449b78d3fc5aaa71e9608d50e42