mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-03-24 11:20:22 +03:00
Compare commits
79 Commits
proton_8.0
...
experiment
Author | SHA1 | Date | |
---|---|---|---|
|
59ebb8b36c | ||
|
64e723754a | ||
|
a79a25e04c | ||
|
6310abbb0d | ||
|
81d3e6183a | ||
|
ad7a809add | ||
|
64aba95d1d | ||
|
fc819e4ab6 | ||
|
afd22a763c | ||
|
35c88c28d2 | ||
|
89b2c527d0 | ||
|
fce187d5bf | ||
|
758df23745 | ||
|
d43b542ce3 | ||
|
2f02954519 | ||
|
5e39359b62 | ||
|
47b0be2082 | ||
|
5d6d6bb38d | ||
|
492bb580d1 | ||
|
3ba1c093a5 | ||
|
74a40b17aa | ||
|
066f2dccd8 | ||
|
6939bd7741 | ||
|
dd288bf872 | ||
|
48e5845d50 | ||
|
af96ce63af | ||
|
7b08d7fa81 | ||
|
ce2f4327cd | ||
|
1bac3ae22d | ||
|
00b867845d | ||
|
6fdc1b54bc | ||
|
bc54942ad0 | ||
|
ec6effee05 | ||
|
3e47499d6f | ||
|
e61fd8d59f | ||
|
7c53fcb494 | ||
|
801e195cfe | ||
|
0d8ab95d90 | ||
|
998767ff4c | ||
|
c3773b9068 | ||
|
8baf0bf073 | ||
|
049bf517eb | ||
|
8939859322 | ||
|
c097eae5a9 | ||
|
1ee2544f6b | ||
|
c3815897b8 | ||
|
f3c3f79e35 | ||
|
f984ac1fd4 | ||
|
c07744714d | ||
|
b11c5bcfb0 | ||
|
03476e7e21 | ||
|
5e2cf117ce | ||
|
b0db1c3bfe | ||
|
ddb704d92c | ||
|
9aa4fe10e3 | ||
|
a376f56328 | ||
|
8d8ed6f4e6 | ||
|
460e4d47b8 | ||
|
d368e283ca | ||
|
dd66702ecd | ||
|
b6dad71a85 | ||
|
6007a2f672 | ||
|
eca65f4f72 | ||
|
87e88e0fd8 | ||
|
5a6b6c1931 | ||
|
1b1f8b01cd | ||
|
513a3a90ea | ||
|
c6d94ec45e | ||
|
b88f728ddb | ||
|
b1642171db | ||
|
2f7658f4eb | ||
|
4338e7c1aa | ||
|
bd28ab3d99 | ||
|
ebdd596d2a | ||
|
f93600f46e | ||
|
4a00366b88 | ||
|
6107778cbc | ||
|
76dfa15e95 | ||
|
f2adc24dd2 |
9
.gitmodules
vendored
9
.gitmodules
vendored
@ -34,3 +34,12 @@
|
||||
[submodule "dxvk-nvapi"]
|
||||
path = dxvk-nvapi
|
||||
url = https://github.com/jp7677/dxvk-nvapi
|
||||
[submodule "vkd3d"]
|
||||
path = vkd3d
|
||||
url = git://repo.or.cz/vkd3d/zf.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||
[submodule "SPIRV-Headers"]
|
||||
path = SPIRV-Headers
|
||||
url = https://github.com/KhronosGroup/SPIRV-Headers
|
||||
|
35
Makefile
35
Makefile
@ -145,19 +145,24 @@ install-internal: downloads
|
||||
|
||||
install: install-internal
|
||||
mkdir -p $(STEAM_DIR)/compatibilitytools.d/
|
||||
rm -rf $(STEAM_DIR)/compatibilitytools.d/$(_build_name)/files/ #remove proton's internal files, but preserve user_settings etc from top-level
|
||||
cp -Rf --no-dereference --preserve=mode,links vagrant_share/compatibilitytools.d/$(_build_name) $(STEAM_DIR)/compatibilitytools.d/
|
||||
echo "Proton installed to your local Steam installation"
|
||||
|
||||
redist: | vagrant_share/$(DEPLOY_DIR)
|
||||
redist: private SHELL := $(VAGRANT_SHELL)
|
||||
redist: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) redist && cp $(BUILD_DIR)/redist/* /vagrant/$(DEPLOY_DIR) && \
|
||||
rm -rf /vagrant/$(DEPLOY_DIR)/* && \
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) redist && \
|
||||
cp -Rf $(BUILD_DIR)/redist/* /vagrant/$(DEPLOY_DIR) && \
|
||||
echo "Proton build available at vagrant_share/$(DEPLOY_DIR)"
|
||||
|
||||
deploy: | vagrant_share/$(DEPLOY_DIR)-deploy
|
||||
deploy: private SHELL := $(VAGRANT_SHELL)
|
||||
deploy: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) deploy && cp $(BUILD_DIR)/deploy/* /vagrant/$(DEPLOY_DIR)-deploy && \
|
||||
rm -rf /vagrant/$(DEPLOY_DIR)-deploy/* && \
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) deploy && \
|
||||
cp -Rf $(BUILD_DIR)/deploy/* /vagrant/$(DEPLOY_DIR)-deploy && \
|
||||
echo "Proton deployed to vagrant_share/$(DEPLOY_DIR)-deploy"
|
||||
|
||||
module: | vagrant_share/$(module)/lib/wine/
|
||||
@ -178,8 +183,8 @@ dxvk: | vagrant_share/dxvk/lib64/wine/dxvk
|
||||
dxvk: private SHELL := $(VAGRANT_SHELL)
|
||||
dxvk: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) dxvk && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/dxvk/*.dll /vagrant/dxvk/lib/wine/dxvk/ && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll /vagrant/dxvk/lib64/wine/dxvk/
|
||||
|
||||
dxvk-nvapi: | vagrant_share/dxvk-nvapi/lib/wine/nvapi
|
||||
dxvk-nvapi: | vagrant_share/dxvk-nvapi/lib64/wine/nvapi
|
||||
@ -194,31 +199,39 @@ vkd3d-proton: | vagrant_share/vkd3d-proton/lib64/wine/vkd3d-proton
|
||||
vkd3d-proton: private SHELL := $(VAGRANT_SHELL)
|
||||
vkd3d-proton: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vkd3d-proton && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib/wine/vkd3d-proton/ && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vkd3d-proton/*.dll /vagrant/vkd3d-proton/lib64/wine/vkd3d-proton/
|
||||
|
||||
lsteamclient: | vagrant_share/lsteamclient/lib/wine
|
||||
lsteamclient: | vagrant_share/lsteamclient/lib64/wine
|
||||
lsteamclient: private SHELL := $(VAGRANT_SHELL)
|
||||
lsteamclient: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) lsteamclient && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/lsteamclient.dll.so /vagrant/lsteamclient/lib64/wine
|
||||
|
||||
vrclient: | vagrant_share/vrclient/lib/wine
|
||||
vrclient: | vagrant_share/vrclient/lib64/wine
|
||||
vrclient: private SHELL := $(VAGRANT_SHELL)
|
||||
vrclient: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) vrclient && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine
|
||||
cp -f $(BUILD_DIR)/dist/files/lib/wine/vrclient.dll.so /vagrant/vrclient/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vrclient_x64.dll.so /vagrant/vrclient/lib64/wine
|
||||
|
||||
wineopenxr: | vagrant_share/wineopenxr/lib/wine
|
||||
wineopenxr: | vagrant_share/wineopenxr/lib64/wine
|
||||
wineopenxr: private SHELL := $(VAGRANT_SHELL)
|
||||
wineopenxr: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) wineopenxr && \
|
||||
cp -f $(BUILD_DIR)/dist/dist/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine
|
||||
cp -f $(BUILD_DIR)/dist/files/lib64/wine/wineopenxr.dll.so /vagrant/wineopenxr/lib64/wine
|
||||
|
||||
battleye: | vagrant_share/battleye/v1/lib/wine
|
||||
battleye: | vagrant_share/battleye/v1/lib64/wine
|
||||
battleye: private SHELL := $(VAGRANT_SHELL)
|
||||
battleye: downloads
|
||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CCACHE_FLAG) battleye && \
|
||||
cp -f $(BUILD_DIR)/dist-battleye/v1/lib/wine/beclient.dll.so /vagrant/battleye/v1/lib/wine && \
|
||||
cp -f $(BUILD_DIR)/dist-battleye/v1/lib64/wine/beclient_x64.dll.so /vagrant/battleye/v1/lib64/wine
|
||||
|
||||
vagrant_share/%:
|
||||
mkdir -p $@
|
||||
|
496
README.md
496
README.md
@ -1,220 +1,93 @@
|
||||
---
|
||||
Introduction
|
||||
---
|
||||
Proton is a tool for use with the Steam client which allows games which are
|
||||
------------
|
||||
|
||||
**Proton** is a tool for use with the Steam client which allows games which are
|
||||
exclusive to Windows to run on the Linux operating system. It uses Wine to
|
||||
facilitate this.
|
||||
|
||||
Most users will prefer to use Proton provided by the Steam client itself. The
|
||||
source code is provided to enable advanced users the ability to alter
|
||||
Proton. For example, some users may wish to use a different version of Wine with
|
||||
a particular title.
|
||||
**Most users should use Proton provided by the Steam Client itself.** See
|
||||
[this Steam Community post][steam-play-introduction] for more details.
|
||||
|
||||
---
|
||||
Getting Started with Proton from Steam Play
|
||||
---
|
||||
* As the new Steam Play is still in Beta, it is recommended that you opt into the [Steam Client Beta](https://steamcommunity.com/sharedfiles/filedetails/?id=182912431) for the latest features and fixes.
|
||||
* Proton works best with the latest graphics drivers. For some cutting edge games and graphical features, you may need drivers newer than what your distribution ships.
|
||||
* Install and play games! Please refer to [this post](https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561) for more information.
|
||||
* Visit the [changelog](https://github.com/ValveSoftware/Proton/wiki/Changelog) for information about recent updates.
|
||||
The source code is provided to enable advanced users the ability to alter
|
||||
Proton. For example, some users may wish to use a different version of Wine
|
||||
with a particular title.
|
||||
|
||||
---
|
||||
Obtaining Proton from source
|
||||
---
|
||||
**NOTE:** If you are not comfortable in a command line terminal, or if you find
|
||||
any of the information presented in here strange and uncomfortable, then
|
||||
this is probably not for you. The instructions are likely to be incomplete
|
||||
and require some knowledge and skill on your part, and there is no warranty
|
||||
or guarantee that anyone will help you with this process.
|
||||
**The changelog** is available on [our wiki][changelog].
|
||||
|
||||
We strongly recommend that most users use the production build of Proton.
|
||||
[steam-play-introduction]: https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561
|
||||
[changelog]: https://github.com/ValveSoftware/Proton/wiki/Changelog
|
||||
|
||||
|
||||
Obtaining Proton sources
|
||||
------------------------
|
||||
|
||||
Acquire Proton's source by cloning <https://github.com/ValveSoftware/Proton>
|
||||
and checking out the branch you desire. Be sure to update submodules when
|
||||
switching between or updating branches.
|
||||
and checking out the branch you desire.
|
||||
|
||||
You can clone the latest Proton to your system with this command:
|
||||
|
||||
git clone --recurse-submodules https://github.com/ValveSoftware/Proton.git proton
|
||||
cd proton
|
||||
```bash
|
||||
git clone --recurse-submodules https://github.com/ValveSoftware/Proton.git proton
|
||||
```
|
||||
|
||||
If you wish to change any subcomponent, now is the time to do so.
|
||||
For example, if you wish make changes to Wine, you would apply those
|
||||
changes to the <tt>wine/</tt> directory.
|
||||
Be sure to update submodules when switching between branches:
|
||||
|
||||
---
|
||||
Easy build path
|
||||
---
|
||||
```bash
|
||||
git checkout experimental_6.3
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Building Proton is quite complicated. We provide a top-level Makefile which
|
||||
will execute most of the build commands for you. This section describes how to
|
||||
use this Makefile for simple Proton builds.
|
||||
If you want to change any subcomponent, now is the time to do so. For
|
||||
example, if you wish to make changes to Wine, you would apply them to the
|
||||
`wine/` directory.
|
||||
|
||||
This Makefile uses a virtual machine to create a consistent build environment.
|
||||
The VM is managed with [Vagrant](https://www.vagrantup.com/), which you will
|
||||
need to install and configure before invoking these commands. Proton's build
|
||||
system is most well tested with Vagrant's VirtualBox and libvirt/qemu backends.
|
||||
It also requires the vagrant-sshfs plugin. You may run into problems with the
|
||||
shared folder (`vagrant_share`) and/or CPU and memory usage with other
|
||||
backends.
|
||||
|
||||
If your build VM gets cluttered, or falls out of date, you can use `vagrant
|
||||
destroy` to wipe the VM clean, then invoke one of the below commands to start
|
||||
over.
|
||||
Bulding Proton
|
||||
--------------
|
||||
|
||||
After checking out Proton and updating its submodules, you can use these
|
||||
targets to build Proton:
|
||||
Most of Proton builds inside the Proton SDK container with very few
|
||||
dependencies on the host side. For convenience we also provide
|
||||
[Vagrant][vagrant] scripts that will create a VM with all the dependencies
|
||||
and a working container runtime and build Proton inside it.
|
||||
|
||||
`make install` - This will build and install Proton into your user's Steam
|
||||
directory. You may need to restart the Steam client to see the new Proton
|
||||
tool. The tool's name in the Steam client will be based on the currently
|
||||
checked out branch of Proton. You can override this name using the `build_name`
|
||||
variable.
|
||||
The direct container build is recommended for people building Proton on a
|
||||
regular basis as it is faster and less resource hungry.
|
||||
|
||||
`make redist` - This will create a build which you can easily redistribute to
|
||||
other users. The package will be dropped into a new directory in
|
||||
`vagrant_share/`, named after the nearest Git tag (see `git describe`). Copying
|
||||
this directory into `~/.steam/root/compatibilitytools.d/` will make the build
|
||||
available after restarting the Steam client. If you distribute your build to
|
||||
other users, be sure to understand and follow your obligations to make your
|
||||
source code modifications available to your users, see <tt>LICENSE</tt>.
|
||||
The Vagrant VM is easier to set up but comes with higher overhead, which
|
||||
makes it more suitable for an occassional Proton build.
|
||||
|
||||
`make deploy` - This will create a deployment tarball and set of files which
|
||||
can be distributed as a Proton package. This is what we use to deploy Proton to
|
||||
Steam users. The package will be dropped into a new directory in
|
||||
`vagrant_share/`, named after the nearest Git tag (see `git describe`).
|
||||
[vagrant]: https://www.vagrantup.com/
|
||||
|
||||
`make clean` - This will completely erase the Proton build tree within the VM.
|
||||
|
||||
`make help` - View the Makefile documentation and examples.
|
||||
Building with Podman or Docker
|
||||
------------------------------
|
||||
|
||||
We also provide targets useful for simple Wine development:
|
||||
### Preparing the build environment
|
||||
|
||||
`make proton` - This will build Proton without copying its files out of the VM.
|
||||
You need either a Docker or a Podman setup. We highly recommend [the rootless
|
||||
Podman setup][rootless-podman]. Please refer to your distribution's
|
||||
docummentation for setup instructions (e.g. Arch [Podman][arch-podman] /
|
||||
[Docker][arch-docker], Debian [Podman][debian-podman] /
|
||||
[Docker][debian-docker]).
|
||||
|
||||
`make module=<module> module` - This will build both 32- and 64-bit versions of
|
||||
the specified module, and copy the result into the `vagrant_share` directory.
|
||||
This allows rapid iteration on one module. This target is only useful after
|
||||
building Proton.
|
||||
[rootless-podman]: https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md
|
||||
[arch-podman]: https://wiki.archlinux.org/title/Podman
|
||||
[arch-docker]: https://wiki.archlinux.org/title/Docker
|
||||
[debian-podman]: https://wiki.debian.org/Podman
|
||||
[debian-docker]: https://wiki.debian.org/Docker
|
||||
|
||||
`make dxvk` - This will rebuild DXVK and copy it into `vagrant_share`.
|
||||
|
||||
`make vkd3d-proton` - This will rebuild vkd3d-proton and copy it into
|
||||
`vagrant_share`.
|
||||
### Configuring the build
|
||||
|
||||
If you are doing significant Wine development or want to control the build with
|
||||
more fine detail, see the full documentation below.
|
||||
```bash
|
||||
mkdir ../build && cd ../build
|
||||
../proton/configure.sh --container-engine=podman --enable-ccache --build-name=my_build
|
||||
```
|
||||
|
||||
---
|
||||
Building
|
||||
---
|
||||
At a high level, the build instructions are:
|
||||
|
||||
1. Set up your build environment
|
||||
1. Configure the build
|
||||
1. Build Proton
|
||||
1. Install Proton locally (optional)
|
||||
|
||||
See below for more details on all of these steps. Please read all of the
|
||||
instructions before proceeding.
|
||||
|
||||
---
|
||||
Set up the build environment
|
||||
---
|
||||
Proton has a lot of build-time dependencies. The following instructions
|
||||
describe how we create the build environment for the production builds of
|
||||
Proton. For reproducibility and security reasons, we will be setting up a
|
||||
Debian virtual machine. However, you should be able to follow these
|
||||
instructions on other distributions as well.
|
||||
|
||||
Proton provides a Vagrantfile, which will automatically set up the Debian VM
|
||||
for you. After installing [Vagrant](https://www.vagrantup.com/), initialize the
|
||||
VM by running from within the Proton directory:
|
||||
|
||||
vagrant up
|
||||
|
||||
It will take a long time to download and install the Steam runtime containers
|
||||
and so on. Eventually it will complete. You can SSH into the virtual machine
|
||||
with:
|
||||
|
||||
vagrant ssh
|
||||
|
||||
At this point you will need to configure the build directory. See below.
|
||||
|
||||
The Vagrantfile is set up to rsync the `proton` directory into the VM on boot.
|
||||
On the host machine, you can use `vagrant rsync-auto` to have Vagrant
|
||||
automatically sync changes on your host machine into the build machine. It is
|
||||
recommended that you make changes on your host machine, and then perform the
|
||||
build in the VM. Any changes you make in the `proton` directory on the VM may
|
||||
be overwritten by later rsync updates from the host machine.
|
||||
|
||||
The Vagrantfile also creates a directory called `vagrant_share` in the `proton`
|
||||
directory of your host machine, which is mounted at `/vagrant` within the VM.
|
||||
You can use this shared folder to move your Proton build out of the VM, or as
|
||||
one way to copy files into the VM.
|
||||
|
||||
When you are done with the VM, you can shut it down from the host machine:
|
||||
|
||||
vagrant halt
|
||||
|
||||
Please read the Vagrant documentation for more information about how to use
|
||||
Vagrant VMs.
|
||||
|
||||
If you do not wish to use Vagrant, you can read through the Vagrantfile for the
|
||||
list of dependencies and instructions on how to set up your own machine or
|
||||
another VM of your choosing. It is aimed at Debian 10, but you should be able
|
||||
to adapt them for other distributions.
|
||||
|
||||
---
|
||||
Configure the build
|
||||
---
|
||||
After setting up the build machine, it is time to run the configure script
|
||||
which will generate the Makefile to build your project. Run these steps. You
|
||||
may of course use whatever paths you like.
|
||||
|
||||
To build Proton using the official Proton SDK images:
|
||||
|
||||
mkdir build/
|
||||
cd build
|
||||
../proton/configure.sh
|
||||
|
||||
If you want to build with a custom version of the Proton SDK images, then instead use:
|
||||
|
||||
../proton/configure.sh --proton-sdk-image=registry.gitlab.steamos.cloud/proton/soldier/sdk:<version>
|
||||
|
||||
Or, if you want to build without the Proton SDK, then instead use:
|
||||
|
||||
../proton/configure.sh --no-proton-sdk
|
||||
|
||||
**Tip**: If you are building without the Steam runtime, you should now run
|
||||
`make wine-configure64 wine-configure32` and check the files
|
||||
`obj-wine64/config.log` and `obj-wine32/config.log` for missing packages.
|
||||
Search for `won't be supported`. A couple of missing packages are normal:
|
||||
`opencv`, `oss`. More than that may indicate a problem. Please see your
|
||||
distro's documentation to acquire the considerable build dependencies for Wine.
|
||||
Be aware that the build you make may not run correctly on other machines and
|
||||
distributions.
|
||||
|
||||
---
|
||||
Build Proton
|
||||
---
|
||||
A couple of Makefile targets are provided.
|
||||
|
||||
`make dist` will create a Proton installation in `dist/` that you can install
|
||||
manually (see below), or automatically with `make install`.
|
||||
|
||||
`make deploy` will package Proton up for distribution via Steamworks.
|
||||
|
||||
---
|
||||
Building without the VM
|
||||
---
|
||||
|
||||
Since most of the build happens inside the Proton SDK container, building
|
||||
without a VM should be mostly safe. It requires a working container engine
|
||||
(Docker / Podman) and few command line tools.
|
||||
|
||||
Running `configure.sh` will check if containers are functional and prompt you
|
||||
if any dependencies are missing.
|
||||
Running `configure.sh` will create a `Makefile` allowing you to build Proton.
|
||||
The scripts checks if containers are functional and prompt you if any
|
||||
host-side dependencies are missing. You should run the command from a
|
||||
directory created specifically for your build.
|
||||
|
||||
The build by default uses Docker, but you can switch to another, compatible
|
||||
engine with `--container-engine=<executable_name>`.
|
||||
@ -222,66 +95,184 @@ engine with `--container-engine=<executable_name>`.
|
||||
You can enable ccache with `--enable-cache` flag. This will mount your
|
||||
`$CCACHE_DIR` or `$HOME/.ccache` inside the container.
|
||||
|
||||
If SELinux is in use, the Proton build container may fail to access your
|
||||
user's files. This is caused by [SELinux's filesystem labels][selinux-labels].
|
||||
You may pass the --relabel-volumes switch to configure to cause the
|
||||
[container engine to relabel its bind-mounts][bind-mounts] and allow access
|
||||
to those files from within the container. This can be dangerous when used
|
||||
with system directories. Proceed with caution and refer your container
|
||||
engine's manual.
|
||||
`--proton-sdk-image=registry.gitlab.steamos.cloud/proton/soldier/sdk:<version>`
|
||||
can be used to build with a custom version of the Proton SDK images.
|
||||
|
||||
Check `--help` for other configuration options.
|
||||
|
||||
NOTE: If **SELinux** is in use, the Proton build container may fail to access
|
||||
your user's files. This is caused by [SELinux's filesystem
|
||||
labels][selinux-labels]. You may pass the `--relabel-volumes` switch to
|
||||
configure to cause the [container engine to relabel its
|
||||
bind-mounts][bind-mounts] and allow access to those files from within the
|
||||
container. This can be dangerous when used with system directories. Proceed
|
||||
with caution and refer your container engine's manual.
|
||||
|
||||
[selinux-labels]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security-enhanced_linux/sect-security-enhanced_linux-working_with_selinux-selinux_contexts_labeling_files
|
||||
[bind-mounts]: https://docs.docker.com/storage/bind-mounts/
|
||||
|
||||
|
||||
Example:
|
||||
### Building
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
**Important make targets:**
|
||||
|
||||
`make install` - install Proton into your user's Steam directory, see the [install Proton
|
||||
locally](#install-proton-locally) section for details.
|
||||
|
||||
`make redist` - create a redistribute build (`redist/`) that can be copied to
|
||||
`~/.steam/root/compatibilitytools.d/`.
|
||||
|
||||
`make deploy` - create a deployment build (`deploy/`). This is what we use to
|
||||
deploy Proton to Steam users via Steamworks.
|
||||
|
||||
`make module=<module> module` - build both 32- and 64-bit versions of the
|
||||
specified wine module. This allows rapid iteration on one module. This target
|
||||
is only useful after building Proton.
|
||||
|
||||
`make dxvk` / `make vkd3d-proton` - rebuild DXVK / vkd3d-proton.
|
||||
|
||||
|
||||
Building using Vagrant
|
||||
----------------------
|
||||
|
||||
This section describes how to use a virtual machine to build proton.
|
||||
|
||||
### Preparing the build environment
|
||||
|
||||
The VM is managed with [Vagrant][vagrant], which you will need to install and
|
||||
configure before invoking these commands. Proton's build system is most well
|
||||
tested with Vagrant's VirtualBox and libvirt/qemu backends. It also requires
|
||||
the vagrant-sshfs plugin. You may run into problems with the shared folder
|
||||
(`vagrant_share`) and/or CPU and memory usage with other backends.
|
||||
|
||||
[vagrant]: https://www.vagrantup.com/
|
||||
|
||||
|
||||
### The Easy Way
|
||||
|
||||
We provide a top-level Makefile which will execute most of the build commands
|
||||
for you.
|
||||
|
||||
After checking out the repository and updating its submodules, assuming that
|
||||
you have working Vagrant setup, you can build and install Proton with a
|
||||
simple:
|
||||
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
|
||||
You may need to restart the Steam client to see the new Proton tool. The
|
||||
tool's name in the Steam client will be based on the currently checked out
|
||||
branch of Proton. You can override this name using the `build_name` variable.
|
||||
|
||||
See `make help` for other build targets and options.
|
||||
|
||||
If your build VM gets cluttered, or falls out of date, you can use `vagrant
|
||||
destroy` to wipe the VM clean, then invoke one of the below commands to start
|
||||
over.
|
||||
|
||||
|
||||
### The Detailed Way
|
||||
|
||||
Proton provides a Vagrantfile, which will automatically set up the Debian VM
|
||||
for you. After installing Vagrant, initialize the VM by running from within
|
||||
the Proton directory:
|
||||
|
||||
```bash
|
||||
vagrant up
|
||||
```
|
||||
|
||||
It will take a long time to download the base image and install all the build
|
||||
dependencies. Eventually it will complete. You can SSH into the virtual
|
||||
machine with:
|
||||
|
||||
```bash
|
||||
vagrant ssh
|
||||
```
|
||||
|
||||
**You are now inside a virtual machine with a working Docker setup.** At this
|
||||
point you will need to configure and make the build, see [building with
|
||||
podman or docker](#building-with-podman-or-docker) section for details.
|
||||
|
||||
```bash
|
||||
mkdir build/
|
||||
cd build
|
||||
../proton/configure.sh --build-name=my_build
|
||||
make
|
||||
```
|
||||
|
||||
The Vagrantfile is set up to rsync the `proton` directory into the VM on
|
||||
boot. On the host machine, you can use `vagrant rsync-auto` to have Vagrant
|
||||
automatically sync changes on your host machine into the build machine. It is
|
||||
recommended that you make changes on your host machine, and then perform the
|
||||
build in the VM. Any changes you make in the `proton` directory on the VM may
|
||||
be overwritten by later rsync updates from the host machine.
|
||||
|
||||
The Vagrantfile also creates a directory called `vagrant_share/` in the
|
||||
`proton/` directory of your host machine, which is mounted at `/vagrant`
|
||||
within the VM. You can use this shared folder to move your Proton build out
|
||||
of the VM, or as one way to copy files into the VM.
|
||||
|
||||
When you are done with the VM, you can shut it down from the host machine:
|
||||
|
||||
```bash
|
||||
vagrant halt
|
||||
```
|
||||
|
||||
Please read the Vagrant documentation for more information about how to use
|
||||
Vagrant VMs.
|
||||
|
||||
mkdir build && cd build
|
||||
../proton/configure.sh --container-engine=podman --enable-ccache
|
||||
make dist
|
||||
|
||||
---
|
||||
Install Proton locally
|
||||
---
|
||||
----------------------
|
||||
|
||||
Steam ships with several versions of Proton, which games will use by default or
|
||||
that you can select in Steam Settings's Steam Play page. Steam also supports
|
||||
running games with local builds of Proton, which you can install on your
|
||||
machine. The `install` target will perform the below steps for you.
|
||||
machine.
|
||||
|
||||
To install a local build of Proton into Steam, make a new directory in
|
||||
`~/.steam/root/compatibilitytools.d/` with a tool name of your choosing and
|
||||
place the contents of `dist` into that folder. The `make install` target will
|
||||
perform this task for you, installing the Proton build into the Steam folder
|
||||
for the current user. You will have to restart the Steam client for it to pick
|
||||
up on a new tool.
|
||||
place the directory containing your redistributable build under that path.
|
||||
|
||||
The `make install` target will perform this task for you, installing the
|
||||
Proton build into the Steam folder for the current user. You will have to
|
||||
restart the Steam client for it to pick up on a new tool.
|
||||
|
||||
A correct local tool installation should look like this:
|
||||
|
||||
compatibilitytools.d/my_proton/
|
||||
├── compatibilitytool.vdf
|
||||
├── filelock.py
|
||||
├── LICENSE
|
||||
├── proton
|
||||
├── proton_dist.tar
|
||||
├── toolmanifest.vdf
|
||||
├── user_settings.sample.py
|
||||
└── version
|
||||
```
|
||||
compatibilitytools.d/my_proton/
|
||||
├── compatibilitytool.vdf
|
||||
├── filelock.py
|
||||
├── LICENSE
|
||||
├── proton
|
||||
├── proton_dist.tar
|
||||
├── toolmanifest.vdf
|
||||
├── user_settings.sample.py
|
||||
└── version
|
||||
```
|
||||
|
||||
To enable your local build in Steam, go to the Steam Play section of the
|
||||
Settings window. If the build was correctly installed, you should see
|
||||
"proton-localbuild" in the drop-down list of compatibility tools.
|
||||
|
||||
Each component of this software is used under the terms of their licenses. See
|
||||
the <tt>LICENSE</tt> files here, as well as the <tt>LICENSE</tt>,
|
||||
<tt>COPYING</tt>, etc files in each submodule and directory for details. If you
|
||||
distribute a built version of Proton to other users, you must adhere to the
|
||||
terms of these licenses.
|
||||
Each component of this software is used under the terms of their licenses.
|
||||
See the `LICENSE` files here, as well as the `LICENSE`, `COPYING`, etc files
|
||||
in each submodule and directory for details. If you distribute a built
|
||||
version of Proton to other users, you must adhere to the terms of these
|
||||
licenses.
|
||||
|
||||
|
||||
----
|
||||
Runtime Config Options
|
||||
----
|
||||
----------------------
|
||||
|
||||
Proton can be tuned at runtime to help certain games run. The Steam client sets
|
||||
some options for known games using the <tt>STEAM_COMPAT_CONFIG</tt> variable.
|
||||
some options for known games using the `STEAM_COMPAT_CONFIG` variable.
|
||||
You can override these options using the environment variables described below.
|
||||
|
||||
The best way to set these environment overrides for all games is by renaming
|
||||
@ -295,40 +286,41 @@ Steam client. Set the variable, followed by `%command%`. For example, input
|
||||
"`PROTON_USE_WINED3D=1 %command%`" to use the OpenGL-based wined3d renderer
|
||||
instead of the Vulkan-based DXVK renderer.
|
||||
|
||||
To enable an option, set the variable to a non-<tt>0</tt> value. To disable an
|
||||
option, set the variable to <tt>0</tt>. To use Steam's default configuration, do
|
||||
To enable an option, set the variable to a non-`0` value. To disable an
|
||||
option, set the variable to `0`. To use Steam's default configuration, do
|
||||
not specify the variable at all.
|
||||
|
||||
All of the below are runtime options. They do not effect permanent changes to
|
||||
the Wine prefix. Removing the option will revert to the previous behavior.
|
||||
|
||||
| Compat config string | Environment Variable | Description |
|
||||
| :-------------------- | :----------------------------- | :----------- |
|
||||
| | <tt>PROTON_LOG</tt> | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log` For more thorough logging, use `user_settings.py`. |
|
||||
| | <tt>PROTON_LOG_DIR</tt> | Output log files into the directory specified. Defaults to your home directory. |
|
||||
| | <tt>PROTON_DUMP_DEBUG_COMMANDS</tt> | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. |
|
||||
| | <tt>PROTON_DEBUG_DIR</tt> | Root directory for the Proton debug scripts, `/tmp` by default. |
|
||||
| | <tt>PROTON_CRASH_REPORT_DIR</tt> | Write crash logs into this directory. Does not clean up old logs, so may eat all your disk space eventually. |
|
||||
| <tt>wined3d</tt> | <tt>PROTON_USE_WINED3D</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. |
|
||||
| <tt>nod3d11</tt> | <tt>PROTON_NO_D3D11</tt> | Disable <tt>d3d11.dll</tt>, for d3d11 games which can fall back to and run better with d3d9. |
|
||||
| <tt>nod3d10</tt> | <tt>PROTON_NO_D3D10</tt> | Disable <tt>d3d10.dll</tt> and <tt>dxgi.dll</tt>, for d3d10 games which can fall back to and run better with d3d9. |
|
||||
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
|
||||
| <tt>nofsync</tt> | <tt>PROTON_NO_FSYNC</tt> | Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no `FUTEX_WAIT_MULTIPLE` support.) |
|
||||
| <tt>noxim</tt> | <tt>PROTON_NO_XIM</tt> | Enabled by default. Do not attempt to use XIM (X Input Methods) support. XIM support is known to cause crashes with libx11 older than version 1.7. |
|
||||
| <tt>enablenvapi</tt> | <tt>PROTON_ENABLE_NVAPI</tt> | Enable NVIDIA's NVAPI GPU support library. |
|
||||
| <tt>nativevulkanloader</tt> | | Use the Vulkan loader shipped with the game instead of Proton's built-in Vulkan loader. This breaks VR support, but is required by a few games. |
|
||||
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. |
|
||||
| <tt>heapdelayfree</tt>| <tt>PROTON_HEAP_DELAY_FREE</tt>| Delay freeing some memory, to work around application use-after-free bugs. |
|
||||
| <tt>gamedrive</tt> | <tt>PROTON_SET_GAME_DRIVE</tt> | Create an S: drive which points to the Steam Library which contains the game. |
|
||||
| <tt>noforcelgadd</tt> | | Disable forcelgadd. If both this and `forcelgadd` are set, enabled wins. |
|
||||
| <tt>oldglstr</tt> | <tt>PROTON_OLD_GL_STRING</tt> | Set some driver overrides to limit the length of the GL extension string, for old games that crash on very long extension strings. |
|
||||
| <tt>vkd3dfl12</tt> | | Force the Direct3D 12 feature level to 12, regardless of driver support. |
|
||||
| <tt>vkd3dbindlesstb</tt>| | Put `force_bindless_texel_buffer` into `VKD3D_CONFIG`. |
|
||||
| <tt>hidenvgpu</tt> | <tt>PROTON_HIDE_NVIDIA_GPU</tt>| Force Nvidia GPUs to always be reported as AMD GPUs. Some games require this if they depend on Windows-only Nvidia driver functionality. See also DXVK's nvapiHack config, which only affects reporting from Direct3D. |
|
||||
| | <tt>WINE_FULLSCREEN_INTEGER_SCALING</tt> | Enable integer scaling mode, to give sharp pixels when upscaling. |
|
||||
| <tt>cmdlineappend:</tt>| | 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. |
|
||||
| <tt>nowritewatch</tt> | <tt>PROTON_NO_WRITE_WATCH</tt> | Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games). |
|
||||
| <tt>seccomp</tt> | <tt>PROTON_USE_SECCOMP</tt> | **Note: Obsoleted in Proton 5.13.** In older versions, enable seccomp-bpf filter to emulate native syscalls, required for some DRM protections to work. |
|
||||
| <tt>d9vk</tt> | <tt>PROTON_USE_D9VK</tt> | **Note: Obsoleted in Proton 5.0.** In older versions, use Vulkan-based DXVK instead of OpenGL-based wined3d for d3d9. |
|
||||
| Compat config string | Environment Variable | Description |
|
||||
| :-------------------- | :--------------------------------- | :----------- |
|
||||
| | `PROTON_LOG` | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log` For more thorough logging, use `user_settings.py`. |
|
||||
| | `PROTON_LOG_DIR` | Output log files into the directory specified. Defaults to your home directory. |
|
||||
| | `PROTON_DUMP_DEBUG_COMMANDS` | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. |
|
||||
| | `PROTON_DEBUG_DIR` | Root directory for the Proton debug scripts, `/tmp` by default. |
|
||||
| | `PROTON_WAIT_ATTACH` | Wait for a debugger to attach to steam.exe before launching the game process. To attach to the game process at startup, debuggers should be set to follow child processes. |
|
||||
| | `PROTON_CRASH_REPORT_DIR` | Write crash logs into this directory. Does not clean up old logs, so may eat all your disk space eventually. |
|
||||
| `wined3d` | `PROTON_USE_WINED3D` | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. |
|
||||
| `nod3d11` | `PROTON_NO_D3D11` | Disable `d3d11.dll`, for d3d11 games which can fall back to and run better with d3d9. |
|
||||
| `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.) |
|
||||
| `noxim` | `PROTON_NO_XIM` | Enabled by default. Do not attempt to use XIM (X Input Methods) support. XIM support is known to cause crashes with libx11 older than version 1.7. |
|
||||
| `enablenvapi` | `PROTON_ENABLE_NVAPI` | Enable NVIDIA's NVAPI GPU support library. |
|
||||
| `nativevulkanloader` | | Use the Vulkan loader shipped with the game instead of Proton's built-in Vulkan loader. This breaks VR support, but is required by a few games. |
|
||||
| `forcelgadd` | `PROTON_FORCE_LARGE_ADDRESS_AWARE` | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. |
|
||||
| `heapdelayfree` | `PROTON_HEAP_DELAY_FREE` | Delay freeing some memory, to work around application use-after-free bugs. |
|
||||
| `gamedrive` | `PROTON_SET_GAME_DRIVE` | Create an S: drive which points to the Steam Library which contains the game. |
|
||||
| `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. |
|
||||
| `vkd3dfl12` | | Force the Direct3D 12 feature level to 12, regardless of driver support. |
|
||||
| `vkd3dbindlesstb` | | Put `force_bindless_texel_buffer` into `VKD3D_CONFIG`. |
|
||||
| `hidenvgpu` | `PROTON_HIDE_NVIDIA_GPU` | Force Nvidia GPUs to always be reported as AMD GPUs. Some games require this if they depend on Windows-only Nvidia driver functionality. See also DXVK's nvapiHack config, which only affects reporting from Direct3D. |
|
||||
| | `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. |
|
||||
| `nowritewatch` | `PROTON_NO_WRITE_WATCH` | Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games). |
|
||||
| `seccomp` | `PROTON_USE_SECCOMP` | **Note: Obsoleted in Proton 5.13.** In older versions, enable seccomp-bpf filter to emulate native syscalls, required for some DRM protections to work. |
|
||||
| `d9vk` | `PROTON_USE_D9VK` | **Note: Obsoleted in Proton 5.0.** In older versions, use Vulkan-based DXVK instead of OpenGL-based wined3d for d3d9. |
|
||||
|
||||
<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
|
||||
|
1
SPIRV-Headers
Submodule
1
SPIRV-Headers
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6cae8216a6ea19ff3f237af01e54378c1ff81fcd
|
11
Vagrantfile
vendored
11
Vagrantfile
vendored
@ -65,6 +65,7 @@ Vagrant.configure(2) do |config|
|
||||
debian10.vm.synced_folder ".", "/home/vagrant/proton", id: "proton", type: "rsync", rsync__exclude: ["vagrant_share"]
|
||||
|
||||
debian10.vm.provision "shell", privileged: "true", inline: <<-SHELL
|
||||
set -e
|
||||
#install docker and steam-runtime dependencies
|
||||
dpkg --add-architecture i386
|
||||
apt-get update
|
||||
@ -77,13 +78,13 @@ Vagrant.configure(2) do |config|
|
||||
#install host build-time dependencies
|
||||
apt-get update
|
||||
apt-get install -y ccache texinfo gpgv2 gnupg2 git docker-ce docker-ce-cli containerd.io \
|
||||
fontforge-nox python-debian python-pip
|
||||
fontforge-nox python-debian uuid-dev python3-pip
|
||||
|
||||
# https://github.blog/2021-09-01-improving-git-protocol-security-github/
|
||||
git config --global url.https://github.com/.insteadOf git://github.com/
|
||||
|
||||
#install adobe font devkit to build source san hans
|
||||
pip install afdko
|
||||
|
||||
#work around an afdko dependency bug
|
||||
pip install singledispatch==3.4.0.4
|
||||
pip3 install afdko
|
||||
|
||||
#allow vagrant user to run docker
|
||||
adduser vagrant docker
|
||||
|
1
Vulkan-Headers
Submodule
1
Vulkan-Headers
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9e62d027636cd7210f60d934f56107ed6e1579b8
|
@ -143,7 +143,7 @@ endif
|
||||
##
|
||||
|
||||
DST_BASE := $(OBJ)/dist
|
||||
DST_DIR := $(DST_BASE)/dist
|
||||
DST_DIR := $(DST_BASE)/files
|
||||
DST_LIBDIR32 := $(DST_DIR)/lib
|
||||
DST_LIBDIR64 := $(DST_DIR)/lib64
|
||||
DEPLOY_DIR := ./deploy
|
||||
@ -185,12 +185,13 @@ CARGO_BUILD_ARG := --release
|
||||
COMPAT_MANIFEST_TEMPLATE := $(SRCDIR)/compatibilitytool.vdf.template
|
||||
LICENSE := $(SRCDIR)/dist.LICENSE
|
||||
OFL_LICENSE := $(SRCDIR)/fonts/liberation-fonts/LICENSE
|
||||
STEAMPIPE_FIXUPS_PY := $(SRCDIR)/steampipe_fixups.py
|
||||
|
||||
GECKO_VER := 2.47.2
|
||||
GECKO32_TARBALL := wine-gecko-$(GECKO_VER)-x86.tar.xz
|
||||
GECKO64_TARBALL := wine-gecko-$(GECKO_VER)-x86_64.tar.xz
|
||||
|
||||
WINEMONO_VER := 6.3.0
|
||||
WINEMONO_VER := 6.4.1
|
||||
WINEMONO_TARBALL := wine-mono-$(WINEMONO_VER)-x86.tar.xz
|
||||
|
||||
FONTS := $(SRCDIR)/fonts
|
||||
@ -271,8 +272,9 @@ DIST_TARGETS := $(DIST_COPY_TARGETS) $(DIST_OVR32) $(DIST_OVR64) \
|
||||
$(DIST_GECKO32) $(DIST_GECKO64) $(DIST_WINEMONO) \
|
||||
$(DIST_COMPAT_MANIFEST) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE) $(DIST_FONTS)
|
||||
|
||||
DEPLOY_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE)
|
||||
REDIST_COPY_TARGETS := $(DEPLOY_COPY_TARGETS) $(DIST_COMPAT_MANIFEST)
|
||||
BASE_COPY_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_LICENSE) $(DIST_TOOLMANIFEST) $(DIST_OFL_LICENSE) $(DST_DIR)
|
||||
DEPLOY_COPY_TARGETS := $(BASE_COPY_TARGETS) $(STEAMPIPE_FIXUPS_PY)
|
||||
REDIST_COPY_TARGETS := $(BASE_COPY_TARGETS) $(DIST_COMPAT_MANIFEST)
|
||||
|
||||
$(DIST_LICENSE): $(LICENSE)
|
||||
cp -a $< $@
|
||||
@ -365,24 +367,21 @@ dist: $(DIST_TARGETS) all-dist dist_wineopenxr | $(DST_DIR)
|
||||
echo `date '+%s'` `GIT_DIR=$(abspath $(SRCDIR)/.git) git describe --tags` > $(DIST_VERSION)
|
||||
|
||||
deploy: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
|
||||
mkdir -p $(DEPLOY_DIR) && \
|
||||
cp -a $(DEPLOY_COPY_TARGETS) $(DEPLOY_DIR) && \
|
||||
tar -C $(DST_DIR) -c . > $(DEPLOY_DIR)/proton_dist.tar
|
||||
@echo "Created deployment archive at "$(DEPLOY_DIR)"/proton_dist.tar"
|
||||
mkdir -p $(DEPLOY_DIR)
|
||||
cp -af --no-dereference --preserve=mode,links $(DEPLOY_COPY_TARGETS) $(DEPLOY_DIR)
|
||||
python3 $(STEAMPIPE_FIXUPS_PY) process $(DEPLOY_DIR)
|
||||
|
||||
install: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
|
||||
if [ ! -d $(STEAM_DIR) ]; then echo >&2 "!! "$(STEAM_DIR)" does not exist, cannot install"; return 1; fi
|
||||
mkdir -p $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||
# Use -r instead of -a for sshfs
|
||||
cp -rf --no-dereference --preserve=mode,links $(DST_BASE)/* $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||
cp -f $(DIST_VERSION) $(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)/dist/
|
||||
@echo "Installed Proton to "$(STEAM_DIR)/compatibilitytools.d/$(BUILD_NAME)
|
||||
@echo "You may need to restart Steam to select this tool"
|
||||
|
||||
redist: dist | $(filter-out dist deploy install redist,$(MAKECMDGOALS))
|
||||
mkdir -p $(REDIST_DIR)
|
||||
cp -a $(REDIST_COPY_TARGETS) $(REDIST_DIR)
|
||||
tar -C $(DST_DIR) -c . | gzip -c -1 > $(REDIST_DIR)/proton_dist.tar.gz
|
||||
@echo "Created redistribution tarball at "$(REDIST_DIR)"/proton_dist.tar.gz"
|
||||
cp -af --no-dereference --preserve=mode,links $(REDIST_COPY_TARGETS) $(REDIST_DIR)
|
||||
|
||||
.PHONY: module32 module64 module
|
||||
|
||||
@ -573,6 +572,24 @@ $(eval $(call rules-cmake,jxrlib,32))
|
||||
$(eval $(call rules-cmake,jxrlib,64))
|
||||
|
||||
|
||||
##
|
||||
## Vulkan-Headers
|
||||
##
|
||||
|
||||
$(eval $(call rules-source,vulkan-headers,$(SRCDIR)/Vulkan-Headers))
|
||||
$(eval $(call rules-cmake,vulkan-headers,32))
|
||||
$(eval $(call rules-cmake,vulkan-headers,64))
|
||||
|
||||
|
||||
##
|
||||
## SPIRV-Headers
|
||||
##
|
||||
|
||||
$(eval $(call rules-source,spirv-headers,$(SRCDIR)/SPIRV-Headers))
|
||||
$(eval $(call rules-cmake,spirv-headers,32))
|
||||
$(eval $(call rules-cmake,spirv-headers,64))
|
||||
|
||||
|
||||
##
|
||||
## lsteamclient
|
||||
##
|
||||
@ -631,7 +648,7 @@ $(DIST_WINEOPENXR_JSON64): $(WINEOPENXR_SRC)/wineopenxr64.json dist_prefix
|
||||
|
||||
STEAMEXE_CFLAGS = -Wno-attributes
|
||||
STEAMEXE_CXXFLAGS = -Wno-attributes
|
||||
STEAMEXE_LDFLAGS = -lsteam_api -lole32 -ldl -static-libgcc -static-libstdc++
|
||||
STEAMEXE_LDFLAGS = -L$(STEAMEXE_SRC)/32/ -L$(STEAMEXE_SRC)/64/ -lsteam_api -lole32 -ldl -static-libgcc -static-libstdc++
|
||||
|
||||
STEAMEXE_WINEMAKER_ARGS = \
|
||||
"-I$(SRC)/lsteamclient/steamworks_sdk_142/" \
|
||||
@ -641,10 +658,15 @@ STEAMEXE_WINEMAKER_ARGS = \
|
||||
STEAMEXE_DEPENDS = wine
|
||||
|
||||
$(eval $(call rules-source,steamexe,$(SRCDIR)/steam_helper))
|
||||
$(eval $(call rules-winemaker,steamexe,64,steam.exe))
|
||||
$(eval $(call rules-winemaker,steamexe,32,steam.exe))
|
||||
|
||||
$(OBJ)/.steamexe-post-build32:
|
||||
cp $(STEAMEXE_SRC)/libsteam_api.so $(DST_LIBDIR32)/
|
||||
cp $(STEAMEXE_SRC)/32/libsteam_api.so $(DST_LIBDIR32)/
|
||||
touch $@
|
||||
|
||||
$(OBJ)/.steamexe-post-build64:
|
||||
cp $(STEAMEXE_SRC)/64/libsteam_api.so $(DST_LIBDIR64)/
|
||||
touch $@
|
||||
|
||||
|
||||
@ -670,11 +692,7 @@ $(eval $(call rules-source,wine,$(SRCDIR)/wine))
|
||||
$(eval $(call rules-autoconf,wine,32))
|
||||
$(eval $(call rules-autoconf,wine,64))
|
||||
|
||||
$(WINE_SRC)/configure: $(SRCDIR)/wine/configure.ac | $(OBJ)/.wine-source
|
||||
cd $(WINE_SRC) && autoreconf -fi
|
||||
touch $@
|
||||
|
||||
$(OBJ)/.wine-post-source: $(WINE_SRC)/configure
|
||||
$(OBJ)/.wine-post-source:
|
||||
cd $(WINE_SRC) && tools/make_requests
|
||||
touch $@
|
||||
|
||||
@ -770,6 +788,60 @@ $(OBJ)/.dxvk-nvapi-post-build32:
|
||||
touch $@
|
||||
|
||||
|
||||
##
|
||||
## vkd3d
|
||||
##
|
||||
|
||||
VKD3D_SOURCE_ARGS = \
|
||||
--exclude aclocal.m4 \
|
||||
--exclude autom4te.cache \
|
||||
--exclude bin/ \
|
||||
--exclude configure \
|
||||
--exclude include/config.h.in \
|
||||
--exclude Makefile.in \
|
||||
--exclude m4/libtool.m4 \
|
||||
--exclude m4/ltoptions.m4 \
|
||||
--exclude m4/ltsugar.m4 \
|
||||
--exclude m4/ltversion.m4 \
|
||||
--exclude m4/lt~obsolete.m4 \
|
||||
|
||||
VKD3D_CONFIGURE_ARGS = \
|
||||
--disable-doxygen-doc \
|
||||
--disable-tests \
|
||||
--disable-demos \
|
||||
--without-ncurses \
|
||||
WIDL=$(WINE_OBJ64)/tools/widl/widl
|
||||
|
||||
VKD3D_CONFIGURE_ARGS32 = \
|
||||
--host=i686-w64-mingw32 \
|
||||
CC="$(CCACHE_BIN) i686-w64-mingw32-gcc" \
|
||||
LD="i686-w64-mingw32-ld" \
|
||||
|
||||
VKD3D_CONFIGURE_ARGS64 = \
|
||||
--host=x86_64-w64-mingw32 \
|
||||
CC="$(CCACHE_BIN) x86_64-w64-mingw32-gcc" \
|
||||
LD="x86_64-w64-mingw32-ld" \
|
||||
|
||||
VKD3D_LDFLAGS = -static-libgcc $(CROSSLDFLAGS)
|
||||
VKD3D_LDFLAGS32 = -L$(WINE_OBJ32)/dlls/vulkan-1/
|
||||
VKD3D_LDFLAGS64 = -L$(WINE_OBJ64)/dlls/vulkan-1/
|
||||
|
||||
VKD3D_DEPENDS = wine vulkan-headers spirv-headers
|
||||
|
||||
$(eval $(call rules-source,vkd3d,$(SRCDIR)/vkd3d))
|
||||
$(eval $(call rules-autoconf,vkd3d,32))
|
||||
$(eval $(call rules-autoconf,vkd3d,64))
|
||||
|
||||
$(OBJ)/.vkd3d-post-build64:
|
||||
mkdir -p $(DST_DIR)/lib64/vkd3d/
|
||||
$(call install-strip,$(VKD3D_DST64)/bin/libvkd3d-shader-1.dll,$(DST_LIBDIR64)/vkd3d)
|
||||
touch $@
|
||||
|
||||
$(OBJ)/.vkd3d-post-build32:
|
||||
mkdir -p $(DST_DIR)/lib/vkd3d/
|
||||
$(call install-strip,$(VKD3D_DST32)/bin/libvkd3d-shader-1.dll,$(DST_LIBDIR32)/vkd3d)
|
||||
touch $@
|
||||
|
||||
##
|
||||
## vkd3d-proton
|
||||
##
|
||||
@ -833,6 +905,39 @@ $(OBJ)/.mediaconv-post-build32:
|
||||
touch $@
|
||||
|
||||
|
||||
##
|
||||
## BattlEye Bridge
|
||||
##
|
||||
|
||||
ifneq ($(wildcard $(SRCDIR)/battleye-bridge/.*),)
|
||||
|
||||
BATTLEYE_LDFLAGS = -static-libgcc -static-libstdc++ -ldl
|
||||
|
||||
BATTLEYE_DEPENDS = wine
|
||||
|
||||
$(eval $(call rules-source,battleye,$(SRCDIR)/battleye-bridge))
|
||||
$(eval $(call rules-winemaker,battleye,32,beclient.dll))
|
||||
$(eval $(call rules-winemaker,battleye,64,beclient_x64.dll))
|
||||
|
||||
$(OBJ)/.battleye-post-source:
|
||||
mkdir -p $(BATTLEYE_OBJ32) && cp -a $(BATTLEYE_SRC)/beclient.spec $(BATTLEYE_OBJ32)/beclient.spec
|
||||
mkdir -p $(BATTLEYE_OBJ64) && cp -a $(BATTLEYE_SRC)/beclient.spec $(BATTLEYE_OBJ64)/beclient_x64.spec
|
||||
touch $@
|
||||
|
||||
$(OBJ)/.battleye-post-build64:
|
||||
mkdir -p $(OBJ)/dist-battleye/v1
|
||||
cp -r $(BATTLEYE_DST64)/* $(OBJ)/dist-battleye/v1/
|
||||
rm -rf $(BATTLEYE_DST64)/*
|
||||
touch $@
|
||||
|
||||
$(OBJ)/.battleye-post-build32:
|
||||
mkdir -p $(OBJ)/dist-battleye/v1
|
||||
cp -r $(BATTLEYE_DST32)/* $(OBJ)/dist-battleye/v1/
|
||||
rm -rf $(BATTLEYE_DST32)/*
|
||||
touch $@
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONTAINER),)
|
||||
ALL_TARGETS += fonts
|
||||
GOAL_TARGETS += fonts
|
||||
|
@ -53,7 +53,8 @@ dependency_afdko() {
|
||||
AFDKO_VERB=afdko
|
||||
else
|
||||
err "Couldn't find 'afdko'. Install it and make sure that 'makeotf' is in your PATH or 'afdko makeotf' works."
|
||||
MISSING_DEPENDENCIES=1
|
||||
err "Some distributions don't package afdko correctly, you may need to 'pip install afdko'."
|
||||
MISSING_DEPENDENCIES=1
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,14 @@ def setup_dll_symlinks(default_pfx_dir, dist_dir):
|
||||
os.unlink(filename)
|
||||
make_relative_symlink(target, filename)
|
||||
|
||||
#steampipe can't handle filenames with colons, so we remove them here
|
||||
#and restore them in the proton script
|
||||
def fixup_drive_links(default_pfx_dir):
|
||||
for walk_dir, dirs, files in os.walk(os.path.join(default_pfx_dir, "dosdevices")):
|
||||
for dir_ in dirs:
|
||||
if ":" in dir_:
|
||||
os.remove(os.path.join(walk_dir, dir_))
|
||||
|
||||
def make_default_pfx(default_pfx_dir, dist_dir, runtime):
|
||||
local_env = dict(os.environ)
|
||||
|
||||
@ -96,6 +104,7 @@ def make_default_pfx(default_pfx_dir, dist_dir, runtime):
|
||||
|
||||
env=local_env, check=True)
|
||||
setup_dll_symlinks(default_pfx_dir, dist_dir)
|
||||
fixup_drive_links(default_pfx_dir)
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
@ -1,4 +1,4 @@
|
||||
STEAMRT_VERSION = 0.20210126.1
|
||||
STEAMRT_VERSION = 0.20210505.0
|
||||
STEAMRT_URLBASE = registry.gitlab.steamos.cloud
|
||||
|
||||
PROTONSDK_URLBASE = $(STEAMRT_URLBASE)/proton/soldier/sdk
|
||||
|
@ -52,9 +52,14 @@ RUN bash -c 'mkdir -p /usr/lib/ccache && ls /usr/bin/{,*-}{cc,c++,gcc,g++}{,-[0-
|
||||
ENV PATH=/usr/lib/ccache:$PATH
|
||||
|
||||
RUN apt-get install -y \
|
||||
tini \
|
||||
libxpresent-dev \
|
||||
libxpresent-dev:i386 \
|
||||
python3-pefile \
|
||||
libcapstone-dev \
|
||||
libcapstone-dev:i386 \
|
||||
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini-static", "-s", "-g", "--"]
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
|
2
dxvk
2
dxvk
@ -1 +1 @@
|
||||
Subproject commit b63ceedaef9333d82056e0fca71ef6a9165e3011
|
||||
Subproject commit 03af9afe57e32abfb2a87765700d051c7cdc0310
|
@ -1 +1 @@
|
||||
Subproject commit 8b3987f6707946b9202eda3dda38632197d2286b
|
||||
Subproject commit acbcf35e327f2d189e1a9322bc1359a22d36cf6a
|
@ -7,7 +7,6 @@ case 0x0014145e: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetPr
|
||||
case 0x000c145f: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_EndGameResultCallback_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x011414b5: win_msg->m_cubParam = 280; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_JoinPartyCallback_t_280((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x000c14b6: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_CreateBeaconCallback_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x01180517: win_msg->m_cubParam = 288; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStorageAppSyncProgress_t_288((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x0110051b: win_msg->m_cubParam = 280; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStorageFileShareResult_t_280((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x0010051d: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStoragePublishFileResult_t_24((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x000c051f: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStorageDeletePublishedFileResult_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
@ -32,6 +31,7 @@ case 0x002403ff: win_msg->m_cubParam = 40; win_msg->m_pubParam = HeapAlloc(GetPr
|
||||
case 0x00180835: win_msg->m_cubParam = 32; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_HTTPRequestCompleted_t_32((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x000c0836: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_HTTPRequestHeadersReceived_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x00140837: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_HTTPRequestDataReceived_t_24((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x00200af3: win_msg->m_cubParam = 40; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SteamInputConfigurationLoaded_t_40((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x26280d4a: win_msg->m_cubParam = 9784; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SteamUGCRequestUGCDetailsResult_t_9784((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x00100d4b: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_CreateItemResult_t_24((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x000c0d4d: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_ItemInstalled_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
@ -127,9 +127,10 @@ case 0x000811ad: win_msg->m_cubParam = 8; win_msg->m_pubParam = HeapAlloc(GetPro
|
||||
case 0x000c11ad: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_HTML_UpdateToolTip_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
#endif
|
||||
case 0x00141260: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SteamInventoryStartPurchaseResult_t_24((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x024004c5: win_msg->m_cubParam = 584; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SteamNetConnectionStatusChangedCallback_t_584((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x002000d1: win_msg->m_cubParam = 40; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_GSReputation_t_40((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x02c004c5: win_msg->m_cubParam = 712; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SteamNetConnectionStatusChangedCallback_t_712((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x002000d1: win_msg->m_cubParam = 40; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_GSReputation_t_40((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x01180517: win_msg->m_cubParam = 288; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_RemoteStorageAppSyncProgress_t_288((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x024004c5: win_msg->m_cubParam = 584; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_SteamNetConnectionStatusChangedCallback_t_584((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
case 0x00140835: win_msg->m_cubParam = 24; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_HTTPRequestCompleted_t_24((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
#ifdef __i386__
|
||||
case 0x001011a5: win_msg->m_cubParam = 16; win_msg->m_pubParam = HeapAlloc(GetProcessHeap(), 0, win_msg->m_cubParam); cb_HTML_ComboNeedsPaint_t_16((void*)lin_msg.m_pubParam, (void*)win_msg->m_pubParam); break;
|
||||
|
@ -34,10 +34,6 @@ struct CreateBeaconCallback_t;
|
||||
struct winCreateBeaconCallback_t_16;
|
||||
extern void cb_CreateBeaconCallback_t_16(const struct CreateBeaconCallback_t *l, struct winCreateBeaconCallback_t_16 *w);
|
||||
|
||||
struct RemoteStorageAppSyncProgress_t;
|
||||
struct winRemoteStorageAppSyncProgress_t_288;
|
||||
extern void cb_RemoteStorageAppSyncProgress_t_288(const struct RemoteStorageAppSyncProgress_t *l, struct winRemoteStorageAppSyncProgress_t_288 *w);
|
||||
|
||||
struct RemoteStorageFileShareResult_t;
|
||||
struct winRemoteStorageFileShareResult_t_280;
|
||||
extern void cb_RemoteStorageFileShareResult_t_280(const struct RemoteStorageFileShareResult_t *l, struct winRemoteStorageFileShareResult_t_280 *w);
|
||||
@ -134,6 +130,10 @@ struct HTTPRequestDataReceived_t;
|
||||
struct winHTTPRequestDataReceived_t_24;
|
||||
extern void cb_HTTPRequestDataReceived_t_24(const struct HTTPRequestDataReceived_t *l, struct winHTTPRequestDataReceived_t_24 *w);
|
||||
|
||||
struct SteamInputConfigurationLoaded_t;
|
||||
struct winSteamInputConfigurationLoaded_t_40;
|
||||
extern void cb_SteamInputConfigurationLoaded_t_40(const struct SteamInputConfigurationLoaded_t *l, struct winSteamInputConfigurationLoaded_t_40 *w);
|
||||
|
||||
struct SteamUGCRequestUGCDetailsResult_t;
|
||||
struct winSteamUGCRequestUGCDetailsResult_t_9784;
|
||||
extern void cb_SteamUGCRequestUGCDetailsResult_t_9784(const struct SteamUGCRequestUGCDetailsResult_t *l, struct winSteamUGCRequestUGCDetailsResult_t_9784 *w);
|
||||
@ -319,16 +319,20 @@ struct winSteamInventoryStartPurchaseResult_t_24;
|
||||
extern void cb_SteamInventoryStartPurchaseResult_t_24(const struct SteamInventoryStartPurchaseResult_t *l, struct winSteamInventoryStartPurchaseResult_t_24 *w);
|
||||
|
||||
struct SteamNetConnectionStatusChangedCallback_t;
|
||||
struct winSteamNetConnectionStatusChangedCallback_t_584;
|
||||
extern void cb_SteamNetConnectionStatusChangedCallback_t_584(const struct SteamNetConnectionStatusChangedCallback_t *l, struct winSteamNetConnectionStatusChangedCallback_t_584 *w);
|
||||
struct winSteamNetConnectionStatusChangedCallback_t_712;
|
||||
extern void cb_SteamNetConnectionStatusChangedCallback_t_712(const struct SteamNetConnectionStatusChangedCallback_t *l, struct winSteamNetConnectionStatusChangedCallback_t_712 *w);
|
||||
|
||||
struct GSReputation_t;
|
||||
struct winGSReputation_t_40;
|
||||
extern void cb_GSReputation_t_40(const struct GSReputation_t *l, struct winGSReputation_t_40 *w);
|
||||
|
||||
struct RemoteStorageAppSyncProgress_t;
|
||||
struct winRemoteStorageAppSyncProgress_t_288;
|
||||
extern void cb_RemoteStorageAppSyncProgress_t_288(const struct RemoteStorageAppSyncProgress_t *l, struct winRemoteStorageAppSyncProgress_t_288 *w);
|
||||
|
||||
struct SteamNetConnectionStatusChangedCallback_t;
|
||||
struct winSteamNetConnectionStatusChangedCallback_t_712;
|
||||
extern void cb_SteamNetConnectionStatusChangedCallback_t_712(const struct SteamNetConnectionStatusChangedCallback_t *l, struct winSteamNetConnectionStatusChangedCallback_t_712 *w);
|
||||
struct winSteamNetConnectionStatusChangedCallback_t_584;
|
||||
extern void cb_SteamNetConnectionStatusChangedCallback_t_584(const struct SteamNetConnectionStatusChangedCallback_t *l, struct winSteamNetConnectionStatusChangedCallback_t_584 *w);
|
||||
|
||||
struct HTTPRequestCompleted_t;
|
||||
struct winHTTPRequestCompleted_t_24;
|
||||
|
@ -13,8 +13,8 @@ case 1111: /* LeaderboardUGCSet_t_16 */
|
||||
return 12;
|
||||
case 1112: /* PS3TrophiesInstalled_t_24 */
|
||||
return 20;
|
||||
case 1221: /* SteamNetConnectionStatusChangedCallback_t_584 */
|
||||
return 576;
|
||||
case 1221: /* SteamNetConnectionStatusChangedCallback_t_712 */
|
||||
return 704;
|
||||
case 1303: /* RemoteStorageAppSyncProgress_t_288 */
|
||||
return 280;
|
||||
case 1307: /* RemoteStorageFileShareResult_t_280 */
|
||||
@ -61,6 +61,8 @@ case 2102: /* HTTPRequestHeadersReceived_t_16 */
|
||||
return 12;
|
||||
case 2103: /* HTTPRequestDataReceived_t_24 */
|
||||
return 20;
|
||||
case 2803: /* SteamInputConfigurationLoaded_t_40 */
|
||||
return 32;
|
||||
case 3402: /* SteamUGCRequestUGCDetailsResult_t_9784 */
|
||||
return 9768;
|
||||
case 3403: /* CreateItemResult_t_24 */
|
||||
@ -143,8 +145,8 @@ case 1111: /* LeaderboardUGCSet_t_16 */
|
||||
return 12;
|
||||
case 1112: /* PS3TrophiesInstalled_t_24 */
|
||||
return 20;
|
||||
case 1221: /* SteamNetConnectionStatusChangedCallback_t_584 */
|
||||
return 576;
|
||||
case 1221: /* SteamNetConnectionStatusChangedCallback_t_712 */
|
||||
return 704;
|
||||
case 1303: /* RemoteStorageAppSyncProgress_t_288 */
|
||||
return 280;
|
||||
case 1307: /* RemoteStorageFileShareResult_t_280 */
|
||||
@ -191,6 +193,8 @@ case 2102: /* HTTPRequestHeadersReceived_t_16 */
|
||||
return 12;
|
||||
case 2103: /* HTTPRequestDataReceived_t_24 */
|
||||
return 20;
|
||||
case 2803: /* SteamInputConfigurationLoaded_t_40 */
|
||||
return 32;
|
||||
case 3402: /* SteamUGCRequestUGCDetailsResult_t_9784 */
|
||||
return 9768;
|
||||
case 3403: /* CreateItemResult_t_24 */
|
||||
|
@ -44,8 +44,8 @@ case 1112:
|
||||
case 1221:
|
||||
switch(callback_len){
|
||||
default:
|
||||
case 584: cb_SteamNetConnectionStatusChangedCallback_t_584(lin_callback, callback); break;
|
||||
case 712: cb_SteamNetConnectionStatusChangedCallback_t_712(lin_callback, callback); break;
|
||||
case 584: cb_SteamNetConnectionStatusChangedCallback_t_584(lin_callback, callback); break;
|
||||
}
|
||||
break;
|
||||
case 1303:
|
||||
@ -193,6 +193,12 @@ case 2103:
|
||||
case 24: cb_HTTPRequestDataReceived_t_24(lin_callback, callback); break;
|
||||
}
|
||||
break;
|
||||
case 2803:
|
||||
switch(callback_len){
|
||||
default:
|
||||
case 40: cb_SteamInputConfigurationLoaded_t_40(lin_callback, callback); break;
|
||||
}
|
||||
break;
|
||||
case 3402:
|
||||
switch(callback_len){
|
||||
default:
|
||||
@ -441,8 +447,8 @@ case 1112:
|
||||
case 1221:
|
||||
switch(callback_len){
|
||||
default:
|
||||
case 584: cb_SteamNetConnectionStatusChangedCallback_t_584(lin_callback, callback); break;
|
||||
case 712: cb_SteamNetConnectionStatusChangedCallback_t_712(lin_callback, callback); break;
|
||||
case 584: cb_SteamNetConnectionStatusChangedCallback_t_584(lin_callback, callback); break;
|
||||
}
|
||||
break;
|
||||
case 1303:
|
||||
@ -590,6 +596,12 @@ case 2103:
|
||||
case 24: cb_HTTPRequestDataReceived_t_24(lin_callback, callback); break;
|
||||
}
|
||||
break;
|
||||
case 2803:
|
||||
switch(callback_len){
|
||||
default:
|
||||
case 40: cb_SteamInputConfigurationLoaded_t_40(lin_callback, callback); break;
|
||||
}
|
||||
break;
|
||||
case 3402:
|
||||
switch(callback_len){
|
||||
default:
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamAppList_STEAMAPPLIST_INTERFACE_VERSION001.h"
|
||||
uint32 cppISteamAppList_STEAMAPPLIST_INTERFACE_VERSION001_GetNumInstalledApps(void *linux_side)
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamappticket.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamappticket.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamAppTicket_STEAMAPPTICKET_INTERFACE_VERSION001.h"
|
||||
uint32 cppISteamAppTicket_STEAMAPPTICKET_INTERFACE_VERSION001_GetAppOwnershipTicketData(void *linux_side, uint32 nAppID, void * pvBuffer, uint32 cbBufferLength, uint32 * piAppId, uint32 * piSteamId, uint32 * piSignature, uint32 * pcbSignature)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamApps_STEAMAPPS_INTERFACE_VERSION008.h"
|
||||
bool cppISteamApps_STEAMAPPS_INTERFACE_VERSION008_BIsSubscribed(void *linux_side)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamClient_SteamClient020.h"
|
||||
HSteamPipe cppISteamClient_SteamClient020_CreateSteamPipe(void *linux_side)
|
||||
|
@ -135,11 +135,6 @@ const char * cppISteamController_SteamController005_GetStringForActionOrigin(voi
|
||||
return ((ISteamController*)linux_side)->GetStringForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController005_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -155,11 +155,6 @@ const char * cppISteamController_SteamController006_GetStringForActionOrigin(voi
|
||||
return ((ISteamController*)linux_side)->GetStringForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController006_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
ESteamInputType cppISteamController_SteamController006_GetInputTypeForHandle(void *linux_side, ControllerHandle_t controllerHandle)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetInputTypeForHandle((ControllerHandle_t)controllerHandle);
|
||||
|
@ -96,11 +96,6 @@ int cppISteamController_SteamController007_GetAnalogActionOrigins(void *linux_si
|
||||
return ((ISteamController*)linux_side)->GetAnalogActionOrigins((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetHandle, (ControllerAnalogActionHandle_t)analogActionHandle, (EControllerActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController007_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController007_GetStringForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetStringForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
@ -161,11 +156,6 @@ const char * cppISteamController_SteamController007_GetStringForXboxOrigin(void
|
||||
return ((ISteamController*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController007_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EControllerActionOrigin cppISteamController_SteamController007_GetActionOriginFromXboxOrigin(void *linux_side, ControllerHandle_t controllerHandle, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetActionOriginFromXboxOrigin((ControllerHandle_t)controllerHandle, (EXboxOrigin)eOrigin);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamController_SteamController008.h"
|
||||
bool cppISteamController_SteamController008_Init(void *linux_side)
|
||||
@ -96,11 +96,6 @@ int cppISteamController_SteamController008_GetAnalogActionOrigins(void *linux_si
|
||||
return ((ISteamController*)linux_side)->GetAnalogActionOrigins((ControllerHandle_t)controllerHandle, (ControllerActionSetHandle_t)actionSetHandle, (ControllerAnalogActionHandle_t)analogActionHandle, (EControllerActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController008_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController008_GetStringForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetStringForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
@ -161,11 +156,6 @@ const char * cppISteamController_SteamController008_GetStringForXboxOrigin(void
|
||||
return ((ISteamController*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController008_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EControllerActionOrigin cppISteamController_SteamController008_GetActionOriginFromXboxOrigin(void *linux_side, ControllerHandle_t controllerHandle, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamController*)linux_side)->GetActionOriginFromXboxOrigin((ControllerHandle_t)controllerHandle, (EXboxOrigin)eOrigin);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamFriends_SteamFriends017.h"
|
||||
const char * cppISteamFriends_SteamFriends017_GetPersonaName(void *linux_side)
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamgamecoordinator.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamgamecoordinator.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamGameCoordinator_SteamGameCoordinator001.h"
|
||||
EGCResults cppISteamGameCoordinator_SteamGameCoordinator001_SendMessage(void *linux_side, uint32 unMsgType, const void * pubData, uint32 cubData)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamGameSearch_SteamMatchGameSearch001.h"
|
||||
EGameSearchErrorCode_t cppISteamGameSearch_SteamMatchGameSearch001_AddGameSearchParams(void *linux_side, const char * pchKeyToFind, const char * pchValuesToFind)
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamgameserverstats.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamgameserverstats.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamGameServerStats_SteamGameServerStats001.h"
|
||||
SteamAPICall_t cppISteamGameServerStats_SteamGameServerStats001_RequestUserStats(void *linux_side, CSteamID steamIDUser)
|
||||
|
237
lsteamclient/cppISteamGameServer_SteamGameServer014.cpp
Normal file
237
lsteamclient/cppISteamGameServer_SteamGameServer014.cpp
Normal file
@ -0,0 +1,237 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamgameserver.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamGameServer_SteamGameServer014.h"
|
||||
bool cppISteamGameServer_SteamGameServer014_InitGameServer(void *linux_side, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->InitGameServer((uint32)unIP, (uint16)usGamePort, (uint16)usQueryPort, (uint32)unFlags, (AppId_t)nGameAppId, (const char *)pchVersionString);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetProduct(void *linux_side, const char * pszProduct)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetProduct((const char *)pszProduct);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetGameDescription(void *linux_side, const char * pszGameDescription)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetGameDescription((const char *)pszGameDescription);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetModDir(void *linux_side, const char * pszModDir)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetModDir((const char *)pszModDir);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetDedicatedServer(void *linux_side, bool bDedicated)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetDedicatedServer((bool)bDedicated);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_LogOn(void *linux_side, const char * pszToken)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->LogOn((const char *)pszToken);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_LogOnAnonymous(void *linux_side)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->LogOnAnonymous();
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_LogOff(void *linux_side)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->LogOff();
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_BLoggedOn(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->BLoggedOn();
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_BSecure(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->BSecure();
|
||||
}
|
||||
|
||||
CSteamID cppISteamGameServer_SteamGameServer014_GetSteamID(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->GetSteamID();
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_WasRestartRequested(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->WasRestartRequested();
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetMaxPlayerCount(void *linux_side, int cPlayersMax)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetMaxPlayerCount((int)cPlayersMax);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetBotPlayerCount(void *linux_side, int cBotplayers)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetBotPlayerCount((int)cBotplayers);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetServerName(void *linux_side, const char * pszServerName)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetServerName((const char *)pszServerName);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetMapName(void *linux_side, const char * pszMapName)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetMapName((const char *)pszMapName);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetPasswordProtected(void *linux_side, bool bPasswordProtected)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetPasswordProtected((bool)bPasswordProtected);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetSpectatorPort(void *linux_side, uint16 unSpectatorPort)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetSpectatorPort((uint16)unSpectatorPort);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetSpectatorServerName(void *linux_side, const char * pszSpectatorServerName)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetSpectatorServerName((const char *)pszSpectatorServerName);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_ClearAllKeyValues(void *linux_side)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->ClearAllKeyValues();
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetKeyValue(void *linux_side, const char * pKey, const char * pValue)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetKeyValue((const char *)pKey, (const char *)pValue);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetGameTags(void *linux_side, const char * pchGameTags)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetGameTags((const char *)pchGameTags);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetGameData(void *linux_side, const char * pchGameData)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetGameData((const char *)pchGameData);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetRegion(void *linux_side, const char * pszRegion)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetRegion((const char *)pszRegion);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetAdvertiseServerActive(void *linux_side, bool bActive)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetAdvertiseServerActive((bool)bActive);
|
||||
}
|
||||
|
||||
HAuthTicket cppISteamGameServer_SteamGameServer014_GetAuthSessionTicket(void *linux_side, void * pTicket, int cbMaxTicket, uint32 * pcbTicket)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->GetAuthSessionTicket((void *)pTicket, (int)cbMaxTicket, (uint32 *)pcbTicket);
|
||||
}
|
||||
|
||||
EBeginAuthSessionResult cppISteamGameServer_SteamGameServer014_BeginAuthSession(void *linux_side, const void * pAuthTicket, int cbAuthTicket, CSteamID steamID)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->BeginAuthSession((const void *)pAuthTicket, (int)cbAuthTicket, (CSteamID)steamID);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_EndAuthSession(void *linux_side, CSteamID steamID)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->EndAuthSession((CSteamID)steamID);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_CancelAuthTicket(void *linux_side, HAuthTicket hAuthTicket)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->CancelAuthTicket((HAuthTicket)hAuthTicket);
|
||||
}
|
||||
|
||||
EUserHasLicenseForAppResult cppISteamGameServer_SteamGameServer014_UserHasLicenseForApp(void *linux_side, CSteamID steamID, AppId_t appID)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->UserHasLicenseForApp((CSteamID)steamID, (AppId_t)appID);
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_RequestUserGroupStatus(void *linux_side, CSteamID steamIDUser, CSteamID steamIDGroup)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->RequestUserGroupStatus((CSteamID)steamIDUser, (CSteamID)steamIDGroup);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_GetGameplayStats(void *linux_side)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->GetGameplayStats();
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamGameServer_SteamGameServer014_GetServerReputation(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->GetServerReputation();
|
||||
}
|
||||
|
||||
SteamIPAddress_t cppISteamGameServer_SteamGameServer014_GetPublicIP(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->GetPublicIP();
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_HandleIncomingPacket(void *linux_side, const void * pData, int cbData, uint32 srcIP, uint16 srcPort)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->HandleIncomingPacket((const void *)pData, (int)cbData, (uint32)srcIP, (uint16)srcPort);
|
||||
}
|
||||
|
||||
int cppISteamGameServer_SteamGameServer014_GetNextOutgoingPacket(void *linux_side, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->GetNextOutgoingPacket((void *)pOut, (int)cbMaxOut, (uint32 *)pNetAdr, (uint16 *)pPort);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamGameServer_SteamGameServer014_AssociateWithClan(void *linux_side, CSteamID steamIDClan)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->AssociateWithClan((CSteamID)steamIDClan);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamGameServer_SteamGameServer014_ComputeNewPlayerCompatibility(void *linux_side, CSteamID steamIDNewPlayer)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->ComputeNewPlayerCompatibility((CSteamID)steamIDNewPlayer);
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_SendUserConnectAndAuthenticate_DEPRECATED(void *linux_side, uint32 unIPClient, const void * pvAuthBlob, uint32 cubAuthBlobSize, CSteamID * pSteamIDUser)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->SendUserConnectAndAuthenticate_DEPRECATED((uint32)unIPClient, (const void *)pvAuthBlob, (uint32)cubAuthBlobSize, (CSteamID *)pSteamIDUser);
|
||||
}
|
||||
|
||||
CSteamID cppISteamGameServer_SteamGameServer014_CreateUnauthenticatedUserConnection(void *linux_side)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->CreateUnauthenticatedUserConnection();
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SendUserDisconnect_DEPRECATED(void *linux_side, CSteamID steamIDUser)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SendUserDisconnect_DEPRECATED((CSteamID)steamIDUser);
|
||||
}
|
||||
|
||||
bool cppISteamGameServer_SteamGameServer014_BUpdateUserData(void *linux_side, CSteamID steamIDUser, const char * pchPlayerName, uint32 uScore)
|
||||
{
|
||||
return ((ISteamGameServer*)linux_side)->BUpdateUserData((CSteamID)steamIDUser, (const char *)pchPlayerName, (uint32)uScore);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_SetMasterServerHeartbeatInterval_DEPRECATED(void *linux_side, int iHeartbeatInterval)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->SetMasterServerHeartbeatInterval_DEPRECATED((int)iHeartbeatInterval);
|
||||
}
|
||||
|
||||
void cppISteamGameServer_SteamGameServer014_ForceMasterServerHeartbeat_DEPRECATED(void *linux_side)
|
||||
{
|
||||
((ISteamGameServer*)linux_side)->ForceMasterServerHeartbeat_DEPRECATED();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
44
lsteamclient/cppISteamGameServer_SteamGameServer014.h
Normal file
44
lsteamclient/cppISteamGameServer_SteamGameServer014.h
Normal file
@ -0,0 +1,44 @@
|
||||
extern bool cppISteamGameServer_SteamGameServer014_InitGameServer(void *, uint32, uint16, uint16, uint32, AppId_t, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetProduct(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetGameDescription(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetModDir(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetDedicatedServer(void *, bool);
|
||||
extern void cppISteamGameServer_SteamGameServer014_LogOn(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_LogOnAnonymous(void *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_LogOff(void *);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_BLoggedOn(void *);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_BSecure(void *);
|
||||
extern CSteamID cppISteamGameServer_SteamGameServer014_GetSteamID(void *);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_WasRestartRequested(void *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetMaxPlayerCount(void *, int);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetBotPlayerCount(void *, int);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetServerName(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetMapName(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetPasswordProtected(void *, bool);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetSpectatorPort(void *, uint16);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetSpectatorServerName(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_ClearAllKeyValues(void *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetKeyValue(void *, const char *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetGameTags(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetGameData(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetRegion(void *, const char *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetAdvertiseServerActive(void *, bool);
|
||||
extern HAuthTicket cppISteamGameServer_SteamGameServer014_GetAuthSessionTicket(void *, void *, int, uint32 *);
|
||||
extern EBeginAuthSessionResult cppISteamGameServer_SteamGameServer014_BeginAuthSession(void *, const void *, int, CSteamID);
|
||||
extern void cppISteamGameServer_SteamGameServer014_EndAuthSession(void *, CSteamID);
|
||||
extern void cppISteamGameServer_SteamGameServer014_CancelAuthTicket(void *, HAuthTicket);
|
||||
extern EUserHasLicenseForAppResult cppISteamGameServer_SteamGameServer014_UserHasLicenseForApp(void *, CSteamID, AppId_t);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_RequestUserGroupStatus(void *, CSteamID, CSteamID);
|
||||
extern void cppISteamGameServer_SteamGameServer014_GetGameplayStats(void *);
|
||||
extern SteamAPICall_t cppISteamGameServer_SteamGameServer014_GetServerReputation(void *);
|
||||
extern SteamIPAddress_t cppISteamGameServer_SteamGameServer014_GetPublicIP(void *);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_HandleIncomingPacket(void *, const void *, int, uint32, uint16);
|
||||
extern int cppISteamGameServer_SteamGameServer014_GetNextOutgoingPacket(void *, void *, int, uint32 *, uint16 *);
|
||||
extern SteamAPICall_t cppISteamGameServer_SteamGameServer014_AssociateWithClan(void *, CSteamID);
|
||||
extern SteamAPICall_t cppISteamGameServer_SteamGameServer014_ComputeNewPlayerCompatibility(void *, CSteamID);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_SendUserConnectAndAuthenticate_DEPRECATED(void *, uint32, const void *, uint32, CSteamID *);
|
||||
extern CSteamID cppISteamGameServer_SteamGameServer014_CreateUnauthenticatedUserConnection(void *);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SendUserDisconnect_DEPRECATED(void *, CSteamID);
|
||||
extern bool cppISteamGameServer_SteamGameServer014_BUpdateUserData(void *, CSteamID, const char *, uint32);
|
||||
extern void cppISteamGameServer_SteamGameServer014_SetMasterServerHeartbeatInterval_DEPRECATED(void *, int);
|
||||
extern void cppISteamGameServer_SteamGameServer014_ForceMasterServerHeartbeat_DEPRECATED(void *);
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005.h"
|
||||
bool cppISteamHTMLSurface_STEAMHTMLSURFACE_INTERFACE_VERSION_005_Init(void *linux_side)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003.h"
|
||||
HTTPRequestHandle cppISteamHTTP_STEAMHTTP_INTERFACE_VERSION003_CreateHTTPRequest(void *linux_side, EHTTPMethod eHTTPRequestMethod, const char * pchAbsoluteURL)
|
||||
|
@ -96,11 +96,6 @@ int cppISteamInput_SteamInput001_GetAnalogActionOrigins(void *linux_side, InputH
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionOrigins((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle, (InputAnalogActionHandle_t)analogActionHandle, (EInputActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput001_GetGlyphForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput001_GetStringForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
@ -161,11 +156,6 @@ const char * cppISteamInput_SteamInput001_GetStringForXboxOrigin(void *linux_sid
|
||||
return ((ISteamInput*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput001_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EInputActionOrigin cppISteamInput_SteamInput001_GetActionOriginFromXboxOrigin(void *linux_side, InputHandle_t inputHandle, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActionOriginFromXboxOrigin((InputHandle_t)inputHandle, (EXboxOrigin)eOrigin);
|
||||
|
@ -96,11 +96,6 @@ int cppISteamInput_SteamInput002_GetAnalogActionOrigins(void *linux_side, InputH
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionOrigins((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle, (InputAnalogActionHandle_t)analogActionHandle, (EInputActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput002_GetGlyphForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput002_GetStringForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
@ -161,11 +156,6 @@ const char * cppISteamInput_SteamInput002_GetStringForXboxOrigin(void *linux_sid
|
||||
return ((ISteamInput*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput002_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EInputActionOrigin cppISteamInput_SteamInput002_GetActionOriginFromXboxOrigin(void *linux_side, InputHandle_t inputHandle, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActionOriginFromXboxOrigin((InputHandle_t)inputHandle, (EXboxOrigin)eOrigin);
|
||||
|
226
lsteamclient/cppISteamInput_SteamInput005.cpp
Normal file
226
lsteamclient/cppISteamInput_SteamInput005.cpp
Normal file
@ -0,0 +1,226 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_152/steam_api.h"
|
||||
#include "steamworks_sdk_152/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_152
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamInput_SteamInput005.h"
|
||||
bool cppISteamInput_SteamInput005_Init(void *linux_side, bool bExplicitlyCallRunFrame)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->Init((bool)bExplicitlyCallRunFrame);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput005_Shutdown(void *linux_side)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->Shutdown();
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput005_SetInputActionManifestFilePath(void *linux_side, const char * pchInputActionManifestAbsolutePath)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->SetInputActionManifestFilePath((const char *)pchInputActionManifestAbsolutePath);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_RunFrame(void *linux_side, bool bReservedValue)
|
||||
{
|
||||
((ISteamInput*)linux_side)->RunFrame((bool)bReservedValue);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput005_BWaitForData(void *linux_side, bool bWaitForever, uint32 unTimeout)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->BWaitForData((bool)bWaitForever, (uint32)unTimeout);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput005_BNewDataAvailable(void *linux_side)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->BNewDataAvailable();
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput005_GetConnectedControllers(void *linux_side, InputHandle_t * handlesOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetConnectedControllers((InputHandle_t *)handlesOut);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_EnableDeviceCallbacks(void *linux_side)
|
||||
{
|
||||
((ISteamInput*)linux_side)->EnableDeviceCallbacks();
|
||||
}
|
||||
|
||||
InputActionSetHandle_t cppISteamInput_SteamInput005_GetActionSetHandle(void *linux_side, const char * pszActionSetName)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActionSetHandle((const char *)pszActionSetName);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_ActivateActionSet(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->ActivateActionSet((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle);
|
||||
}
|
||||
|
||||
InputActionSetHandle_t cppISteamInput_SteamInput005_GetCurrentActionSet(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetCurrentActionSet((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_ActivateActionSetLayer(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->ActivateActionSetLayer((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetLayerHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_DeactivateActionSetLayer(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->DeactivateActionSetLayer((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetLayerHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_DeactivateAllActionSetLayers(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->DeactivateAllActionSetLayers((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput005_GetActiveActionSetLayers(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t * handlesOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActiveActionSetLayers((InputHandle_t)inputHandle, (InputActionSetHandle_t *)handlesOut);
|
||||
}
|
||||
|
||||
InputDigitalActionHandle_t cppISteamInput_SteamInput005_GetDigitalActionHandle(void *linux_side, const char * pszActionName)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDigitalActionHandle((const char *)pszActionName);
|
||||
}
|
||||
|
||||
InputDigitalActionData_t cppISteamInput_SteamInput005_GetDigitalActionData(void *linux_side, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDigitalActionData((InputHandle_t)inputHandle, (InputDigitalActionHandle_t)digitalActionHandle);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput005_GetDigitalActionOrigins(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDigitalActionOrigins((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle, (InputDigitalActionHandle_t)digitalActionHandle, (EInputActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetStringForDigitalActionName(void *linux_side, InputDigitalActionHandle_t eActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForDigitalActionName((InputDigitalActionHandle_t)eActionHandle);
|
||||
}
|
||||
|
||||
InputAnalogActionHandle_t cppISteamInput_SteamInput005_GetAnalogActionHandle(void *linux_side, const char * pszActionName)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionHandle((const char *)pszActionName);
|
||||
}
|
||||
|
||||
InputAnalogActionData_t cppISteamInput_SteamInput005_GetAnalogActionData(void *linux_side, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionData((InputHandle_t)inputHandle, (InputAnalogActionHandle_t)analogActionHandle);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput005_GetAnalogActionOrigins(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionOrigins((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle, (InputAnalogActionHandle_t)analogActionHandle, (EInputActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetStringForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetStringForAnalogActionName(void *linux_side, InputAnalogActionHandle_t eActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForAnalogActionName((InputAnalogActionHandle_t)eActionHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_StopAnalogActionMomentum(void *linux_side, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction)
|
||||
{
|
||||
((ISteamInput*)linux_side)->StopAnalogActionMomentum((InputHandle_t)inputHandle, (InputAnalogActionHandle_t)eAction);
|
||||
}
|
||||
|
||||
InputMotionData_t cppISteamInput_SteamInput005_GetMotionData(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetMotionData((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_TriggerVibration(void *linux_side, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed)
|
||||
{
|
||||
((ISteamInput*)linux_side)->TriggerVibration((InputHandle_t)inputHandle, (unsigned short)usLeftSpeed, (unsigned short)usRightSpeed);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_TriggerVibrationExtended(void *linux_side, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed)
|
||||
{
|
||||
((ISteamInput*)linux_side)->TriggerVibrationExtended((InputHandle_t)inputHandle, (unsigned short)usLeftSpeed, (unsigned short)usRightSpeed, (unsigned short)usLeftTriggerSpeed, (unsigned short)usRightTriggerSpeed);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_TriggerSimpleHapticEvent(void *linux_side, InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB)
|
||||
{
|
||||
((ISteamInput*)linux_side)->TriggerSimpleHapticEvent((InputHandle_t)inputHandle, (EControllerHapticLocation)eHapticLocation, (uint8)nIntensity, (char)nGainDB, (uint8)nOtherIntensity, (char)nOtherGainDB);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_SetLEDColor(void *linux_side, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags)
|
||||
{
|
||||
((ISteamInput*)linux_side)->SetLEDColor((InputHandle_t)inputHandle, (uint8)nColorR, (uint8)nColorG, (uint8)nColorB, (unsigned int)nFlags);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_Legacy_TriggerHapticPulse(void *linux_side, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec)
|
||||
{
|
||||
((ISteamInput*)linux_side)->Legacy_TriggerHapticPulse((InputHandle_t)inputHandle, (ESteamControllerPad)eTargetPad, (unsigned short)usDurationMicroSec);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_Legacy_TriggerRepeatedHapticPulse(void *linux_side, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags)
|
||||
{
|
||||
((ISteamInput*)linux_side)->Legacy_TriggerRepeatedHapticPulse((InputHandle_t)inputHandle, (ESteamControllerPad)eTargetPad, (unsigned short)usDurationMicroSec, (unsigned short)usOffMicroSec, (unsigned short)unRepeat, (unsigned int)nFlags);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput005_ShowBindingPanel(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->ShowBindingPanel((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
ESteamInputType cppISteamInput_SteamInput005_GetInputTypeForHandle(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetInputTypeForHandle((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
InputHandle_t cppISteamInput_SteamInput005_GetControllerForGamepadIndex(void *linux_side, int nIndex)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetControllerForGamepadIndex((int)nIndex);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput005_GetGamepadIndexForController(void *linux_side, InputHandle_t ulinputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGamepadIndexForController((InputHandle_t)ulinputHandle);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetStringForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EInputActionOrigin cppISteamInput_SteamInput005_GetActionOriginFromXboxOrigin(void *linux_side, InputHandle_t inputHandle, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActionOriginFromXboxOrigin((InputHandle_t)inputHandle, (EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EInputActionOrigin cppISteamInput_SteamInput005_TranslateActionOrigin(void *linux_side, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->TranslateActionOrigin((ESteamInputType)eDestinationInputType, (EInputActionOrigin)eSourceOrigin);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput005_GetDeviceBindingRevision(void *linux_side, InputHandle_t inputHandle, int * pMajor, int * pMinor)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDeviceBindingRevision((InputHandle_t)inputHandle, (int *)pMajor, (int *)pMinor);
|
||||
}
|
||||
|
||||
uint32 cppISteamInput_SteamInput005_GetRemotePlaySessionID(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetRemotePlaySessionID((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
uint16 cppISteamInput_SteamInput005_GetSessionInputConfigurationSettings(void *linux_side)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetSessionInputConfigurationSettings();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
47
lsteamclient/cppISteamInput_SteamInput005.h
Normal file
47
lsteamclient/cppISteamInput_SteamInput005.h
Normal file
@ -0,0 +1,47 @@
|
||||
extern bool cppISteamInput_SteamInput005_Init(void *, bool);
|
||||
extern bool cppISteamInput_SteamInput005_Shutdown(void *);
|
||||
extern bool cppISteamInput_SteamInput005_SetInputActionManifestFilePath(void *, const char *);
|
||||
extern void cppISteamInput_SteamInput005_RunFrame(void *, bool);
|
||||
extern bool cppISteamInput_SteamInput005_BWaitForData(void *, bool, uint32);
|
||||
extern bool cppISteamInput_SteamInput005_BNewDataAvailable(void *);
|
||||
extern int cppISteamInput_SteamInput005_GetConnectedControllers(void *, InputHandle_t *);
|
||||
extern void cppISteamInput_SteamInput005_EnableDeviceCallbacks(void *);
|
||||
extern void cppISteamInput_SteamInput005_EnableActionEventCallbacks(void *, SteamInputActionEventCallbackPointer);
|
||||
extern InputActionSetHandle_t cppISteamInput_SteamInput005_GetActionSetHandle(void *, const char *);
|
||||
extern void cppISteamInput_SteamInput005_ActivateActionSet(void *, InputHandle_t, InputActionSetHandle_t);
|
||||
extern InputActionSetHandle_t cppISteamInput_SteamInput005_GetCurrentActionSet(void *, InputHandle_t);
|
||||
extern void cppISteamInput_SteamInput005_ActivateActionSetLayer(void *, InputHandle_t, InputActionSetHandle_t);
|
||||
extern void cppISteamInput_SteamInput005_DeactivateActionSetLayer(void *, InputHandle_t, InputActionSetHandle_t);
|
||||
extern void cppISteamInput_SteamInput005_DeactivateAllActionSetLayers(void *, InputHandle_t);
|
||||
extern int cppISteamInput_SteamInput005_GetActiveActionSetLayers(void *, InputHandle_t, InputActionSetHandle_t *);
|
||||
extern InputDigitalActionHandle_t cppISteamInput_SteamInput005_GetDigitalActionHandle(void *, const char *);
|
||||
extern InputDigitalActionData_t cppISteamInput_SteamInput005_GetDigitalActionData(void *, InputHandle_t, InputDigitalActionHandle_t);
|
||||
extern int cppISteamInput_SteamInput005_GetDigitalActionOrigins(void *, InputHandle_t, InputActionSetHandle_t, InputDigitalActionHandle_t, EInputActionOrigin *);
|
||||
extern const char * cppISteamInput_SteamInput005_GetStringForDigitalActionName(void *, InputDigitalActionHandle_t);
|
||||
extern InputAnalogActionHandle_t cppISteamInput_SteamInput005_GetAnalogActionHandle(void *, const char *);
|
||||
extern InputAnalogActionData_t cppISteamInput_SteamInput005_GetAnalogActionData(void *, InputHandle_t, InputAnalogActionHandle_t);
|
||||
extern int cppISteamInput_SteamInput005_GetAnalogActionOrigins(void *, InputHandle_t, InputActionSetHandle_t, InputAnalogActionHandle_t, EInputActionOrigin *);
|
||||
extern const char * cppISteamInput_SteamInput005_GetGlyphPNGForActionOrigin(void *, EInputActionOrigin, ESteamInputGlyphSize, uint32);
|
||||
extern const char * cppISteamInput_SteamInput005_GetGlyphSVGForActionOrigin(void *, EInputActionOrigin, uint32);
|
||||
extern const char * cppISteamInput_SteamInput005_GetGlyphForActionOrigin_Legacy(void *, EInputActionOrigin);
|
||||
extern const char * cppISteamInput_SteamInput005_GetStringForActionOrigin(void *, EInputActionOrigin);
|
||||
extern const char * cppISteamInput_SteamInput005_GetStringForAnalogActionName(void *, InputAnalogActionHandle_t);
|
||||
extern void cppISteamInput_SteamInput005_StopAnalogActionMomentum(void *, InputHandle_t, InputAnalogActionHandle_t);
|
||||
extern InputMotionData_t cppISteamInput_SteamInput005_GetMotionData(void *, InputHandle_t);
|
||||
extern void cppISteamInput_SteamInput005_TriggerVibration(void *, InputHandle_t, unsigned short, unsigned short);
|
||||
extern void cppISteamInput_SteamInput005_TriggerVibrationExtended(void *, InputHandle_t, unsigned short, unsigned short, unsigned short, unsigned short);
|
||||
extern void cppISteamInput_SteamInput005_TriggerSimpleHapticEvent(void *, InputHandle_t, EControllerHapticLocation, uint8, char, uint8, char);
|
||||
extern void cppISteamInput_SteamInput005_SetLEDColor(void *, InputHandle_t, uint8, uint8, uint8, unsigned int);
|
||||
extern void cppISteamInput_SteamInput005_Legacy_TriggerHapticPulse(void *, InputHandle_t, ESteamControllerPad, unsigned short);
|
||||
extern void cppISteamInput_SteamInput005_Legacy_TriggerRepeatedHapticPulse(void *, InputHandle_t, ESteamControllerPad, unsigned short, unsigned short, unsigned short, unsigned int);
|
||||
extern bool cppISteamInput_SteamInput005_ShowBindingPanel(void *, InputHandle_t);
|
||||
extern ESteamInputType cppISteamInput_SteamInput005_GetInputTypeForHandle(void *, InputHandle_t);
|
||||
extern InputHandle_t cppISteamInput_SteamInput005_GetControllerForGamepadIndex(void *, int);
|
||||
extern int cppISteamInput_SteamInput005_GetGamepadIndexForController(void *, InputHandle_t);
|
||||
extern const char * cppISteamInput_SteamInput005_GetStringForXboxOrigin(void *, EXboxOrigin);
|
||||
extern const char * cppISteamInput_SteamInput005_GetGlyphForXboxOrigin(void *, EXboxOrigin);
|
||||
extern EInputActionOrigin cppISteamInput_SteamInput005_GetActionOriginFromXboxOrigin(void *, InputHandle_t, EXboxOrigin);
|
||||
extern EInputActionOrigin cppISteamInput_SteamInput005_TranslateActionOrigin(void *, ESteamInputType, EInputActionOrigin);
|
||||
extern bool cppISteamInput_SteamInput005_GetDeviceBindingRevision(void *, InputHandle_t, int *, int *);
|
||||
extern uint32 cppISteamInput_SteamInput005_GetRemotePlaySessionID(void *, InputHandle_t);
|
||||
extern uint16 cppISteamInput_SteamInput005_GetSessionInputConfigurationSettings(void *);
|
251
lsteamclient/cppISteamInput_SteamInput006.cpp
Normal file
251
lsteamclient/cppISteamInput_SteamInput006.cpp
Normal file
@ -0,0 +1,251 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamInput_SteamInput006.h"
|
||||
bool cppISteamInput_SteamInput006_Init(void *linux_side, bool bExplicitlyCallRunFrame)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->Init((bool)bExplicitlyCallRunFrame);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput006_Shutdown(void *linux_side)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->Shutdown();
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput006_SetInputActionManifestFilePath(void *linux_side, const char * pchInputActionManifestAbsolutePath)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->SetInputActionManifestFilePath((const char *)pchInputActionManifestAbsolutePath);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_RunFrame(void *linux_side, bool bReservedValue)
|
||||
{
|
||||
((ISteamInput*)linux_side)->RunFrame((bool)bReservedValue);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput006_BWaitForData(void *linux_side, bool bWaitForever, uint32 unTimeout)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->BWaitForData((bool)bWaitForever, (uint32)unTimeout);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput006_BNewDataAvailable(void *linux_side)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->BNewDataAvailable();
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput006_GetConnectedControllers(void *linux_side, InputHandle_t * handlesOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetConnectedControllers((InputHandle_t *)handlesOut);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_EnableDeviceCallbacks(void *linux_side)
|
||||
{
|
||||
((ISteamInput*)linux_side)->EnableDeviceCallbacks();
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_EnableActionEventCallbacks(void *linux_side, SteamInputActionEventCallbackPointer pCallback)
|
||||
{
|
||||
((ISteamInput*)linux_side)->EnableActionEventCallbacks((SteamInputActionEventCallbackPointer)pCallback);
|
||||
}
|
||||
|
||||
InputActionSetHandle_t cppISteamInput_SteamInput006_GetActionSetHandle(void *linux_side, const char * pszActionSetName)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActionSetHandle((const char *)pszActionSetName);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_ActivateActionSet(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->ActivateActionSet((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle);
|
||||
}
|
||||
|
||||
InputActionSetHandle_t cppISteamInput_SteamInput006_GetCurrentActionSet(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetCurrentActionSet((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_ActivateActionSetLayer(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->ActivateActionSetLayer((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetLayerHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_DeactivateActionSetLayer(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->DeactivateActionSetLayer((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetLayerHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_DeactivateAllActionSetLayers(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
((ISteamInput*)linux_side)->DeactivateAllActionSetLayers((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput006_GetActiveActionSetLayers(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t * handlesOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActiveActionSetLayers((InputHandle_t)inputHandle, (InputActionSetHandle_t *)handlesOut);
|
||||
}
|
||||
|
||||
InputDigitalActionHandle_t cppISteamInput_SteamInput006_GetDigitalActionHandle(void *linux_side, const char * pszActionName)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDigitalActionHandle((const char *)pszActionName);
|
||||
}
|
||||
|
||||
InputDigitalActionData_t cppISteamInput_SteamInput006_GetDigitalActionData(void *linux_side, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDigitalActionData((InputHandle_t)inputHandle, (InputDigitalActionHandle_t)digitalActionHandle);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput006_GetDigitalActionOrigins(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin * originsOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDigitalActionOrigins((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle, (InputDigitalActionHandle_t)digitalActionHandle, (EInputActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetStringForDigitalActionName(void *linux_side, InputDigitalActionHandle_t eActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForDigitalActionName((InputDigitalActionHandle_t)eActionHandle);
|
||||
}
|
||||
|
||||
InputAnalogActionHandle_t cppISteamInput_SteamInput006_GetAnalogActionHandle(void *linux_side, const char * pszActionName)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionHandle((const char *)pszActionName);
|
||||
}
|
||||
|
||||
InputAnalogActionData_t cppISteamInput_SteamInput006_GetAnalogActionData(void *linux_side, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionData((InputHandle_t)inputHandle, (InputAnalogActionHandle_t)analogActionHandle);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput006_GetAnalogActionOrigins(void *linux_side, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin * originsOut)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetAnalogActionOrigins((InputHandle_t)inputHandle, (InputActionSetHandle_t)actionSetHandle, (InputAnalogActionHandle_t)analogActionHandle, (EInputActionOrigin *)originsOut);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetGlyphPNGForActionOrigin(void *linux_side, EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphPNGForActionOrigin((EInputActionOrigin)eOrigin, (ESteamInputGlyphSize)eSize, (uint32)unFlags);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetGlyphSVGForActionOrigin(void *linux_side, EInputActionOrigin eOrigin, uint32 unFlags)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphSVGForActionOrigin((EInputActionOrigin)eOrigin, (uint32)unFlags);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetGlyphForActionOrigin_Legacy(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphForActionOrigin_Legacy((EInputActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetStringForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetStringForAnalogActionName(void *linux_side, InputAnalogActionHandle_t eActionHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForAnalogActionName((InputAnalogActionHandle_t)eActionHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_StopAnalogActionMomentum(void *linux_side, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction)
|
||||
{
|
||||
((ISteamInput*)linux_side)->StopAnalogActionMomentum((InputHandle_t)inputHandle, (InputAnalogActionHandle_t)eAction);
|
||||
}
|
||||
|
||||
InputMotionData_t cppISteamInput_SteamInput006_GetMotionData(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetMotionData((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_TriggerVibration(void *linux_side, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed)
|
||||
{
|
||||
((ISteamInput*)linux_side)->TriggerVibration((InputHandle_t)inputHandle, (unsigned short)usLeftSpeed, (unsigned short)usRightSpeed);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_TriggerVibrationExtended(void *linux_side, InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed)
|
||||
{
|
||||
((ISteamInput*)linux_side)->TriggerVibrationExtended((InputHandle_t)inputHandle, (unsigned short)usLeftSpeed, (unsigned short)usRightSpeed, (unsigned short)usLeftTriggerSpeed, (unsigned short)usRightTriggerSpeed);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_TriggerSimpleHapticEvent(void *linux_side, InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB)
|
||||
{
|
||||
((ISteamInput*)linux_side)->TriggerSimpleHapticEvent((InputHandle_t)inputHandle, (EControllerHapticLocation)eHapticLocation, (uint8)nIntensity, (char)nGainDB, (uint8)nOtherIntensity, (char)nOtherGainDB);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_SetLEDColor(void *linux_side, InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags)
|
||||
{
|
||||
((ISteamInput*)linux_side)->SetLEDColor((InputHandle_t)inputHandle, (uint8)nColorR, (uint8)nColorG, (uint8)nColorB, (unsigned int)nFlags);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_Legacy_TriggerHapticPulse(void *linux_side, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec)
|
||||
{
|
||||
((ISteamInput*)linux_side)->Legacy_TriggerHapticPulse((InputHandle_t)inputHandle, (ESteamControllerPad)eTargetPad, (unsigned short)usDurationMicroSec);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput006_Legacy_TriggerRepeatedHapticPulse(void *linux_side, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags)
|
||||
{
|
||||
((ISteamInput*)linux_side)->Legacy_TriggerRepeatedHapticPulse((InputHandle_t)inputHandle, (ESteamControllerPad)eTargetPad, (unsigned short)usDurationMicroSec, (unsigned short)usOffMicroSec, (unsigned short)unRepeat, (unsigned int)nFlags);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput006_ShowBindingPanel(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->ShowBindingPanel((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
ESteamInputType cppISteamInput_SteamInput006_GetInputTypeForHandle(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetInputTypeForHandle((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
InputHandle_t cppISteamInput_SteamInput006_GetControllerForGamepadIndex(void *linux_side, int nIndex)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetControllerForGamepadIndex((int)nIndex);
|
||||
}
|
||||
|
||||
int cppISteamInput_SteamInput006_GetGamepadIndexForController(void *linux_side, InputHandle_t ulinputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGamepadIndexForController((InputHandle_t)ulinputHandle);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetStringForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetStringForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput006_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EInputActionOrigin cppISteamInput_SteamInput006_GetActionOriginFromXboxOrigin(void *linux_side, InputHandle_t inputHandle, EXboxOrigin eOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetActionOriginFromXboxOrigin((InputHandle_t)inputHandle, (EXboxOrigin)eOrigin);
|
||||
}
|
||||
|
||||
EInputActionOrigin cppISteamInput_SteamInput006_TranslateActionOrigin(void *linux_side, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->TranslateActionOrigin((ESteamInputType)eDestinationInputType, (EInputActionOrigin)eSourceOrigin);
|
||||
}
|
||||
|
||||
bool cppISteamInput_SteamInput006_GetDeviceBindingRevision(void *linux_side, InputHandle_t inputHandle, int * pMajor, int * pMinor)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetDeviceBindingRevision((InputHandle_t)inputHandle, (int *)pMajor, (int *)pMinor);
|
||||
}
|
||||
|
||||
uint32 cppISteamInput_SteamInput006_GetRemotePlaySessionID(void *linux_side, InputHandle_t inputHandle)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetRemotePlaySessionID((InputHandle_t)inputHandle);
|
||||
}
|
||||
|
||||
uint16 cppISteamInput_SteamInput006_GetSessionInputConfigurationSettings(void *linux_side)
|
||||
{
|
||||
return ((ISteamInput*)linux_side)->GetSessionInputConfigurationSettings();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
47
lsteamclient/cppISteamInput_SteamInput006.h
Normal file
47
lsteamclient/cppISteamInput_SteamInput006.h
Normal file
@ -0,0 +1,47 @@
|
||||
extern bool cppISteamInput_SteamInput006_Init(void *, bool);
|
||||
extern bool cppISteamInput_SteamInput006_Shutdown(void *);
|
||||
extern bool cppISteamInput_SteamInput006_SetInputActionManifestFilePath(void *, const char *);
|
||||
extern void cppISteamInput_SteamInput006_RunFrame(void *, bool);
|
||||
extern bool cppISteamInput_SteamInput006_BWaitForData(void *, bool, uint32);
|
||||
extern bool cppISteamInput_SteamInput006_BNewDataAvailable(void *);
|
||||
extern int cppISteamInput_SteamInput006_GetConnectedControllers(void *, InputHandle_t *);
|
||||
extern void cppISteamInput_SteamInput006_EnableDeviceCallbacks(void *);
|
||||
extern void cppISteamInput_SteamInput006_EnableActionEventCallbacks(void *, SteamInputActionEventCallbackPointer);
|
||||
extern InputActionSetHandle_t cppISteamInput_SteamInput006_GetActionSetHandle(void *, const char *);
|
||||
extern void cppISteamInput_SteamInput006_ActivateActionSet(void *, InputHandle_t, InputActionSetHandle_t);
|
||||
extern InputActionSetHandle_t cppISteamInput_SteamInput006_GetCurrentActionSet(void *, InputHandle_t);
|
||||
extern void cppISteamInput_SteamInput006_ActivateActionSetLayer(void *, InputHandle_t, InputActionSetHandle_t);
|
||||
extern void cppISteamInput_SteamInput006_DeactivateActionSetLayer(void *, InputHandle_t, InputActionSetHandle_t);
|
||||
extern void cppISteamInput_SteamInput006_DeactivateAllActionSetLayers(void *, InputHandle_t);
|
||||
extern int cppISteamInput_SteamInput006_GetActiveActionSetLayers(void *, InputHandle_t, InputActionSetHandle_t *);
|
||||
extern InputDigitalActionHandle_t cppISteamInput_SteamInput006_GetDigitalActionHandle(void *, const char *);
|
||||
extern InputDigitalActionData_t cppISteamInput_SteamInput006_GetDigitalActionData(void *, InputHandle_t, InputDigitalActionHandle_t);
|
||||
extern int cppISteamInput_SteamInput006_GetDigitalActionOrigins(void *, InputHandle_t, InputActionSetHandle_t, InputDigitalActionHandle_t, EInputActionOrigin *);
|
||||
extern const char * cppISteamInput_SteamInput006_GetStringForDigitalActionName(void *, InputDigitalActionHandle_t);
|
||||
extern InputAnalogActionHandle_t cppISteamInput_SteamInput006_GetAnalogActionHandle(void *, const char *);
|
||||
extern InputAnalogActionData_t cppISteamInput_SteamInput006_GetAnalogActionData(void *, InputHandle_t, InputAnalogActionHandle_t);
|
||||
extern int cppISteamInput_SteamInput006_GetAnalogActionOrigins(void *, InputHandle_t, InputActionSetHandle_t, InputAnalogActionHandle_t, EInputActionOrigin *);
|
||||
extern const char * cppISteamInput_SteamInput006_GetGlyphPNGForActionOrigin(void *, EInputActionOrigin, ESteamInputGlyphSize, uint32);
|
||||
extern const char * cppISteamInput_SteamInput006_GetGlyphSVGForActionOrigin(void *, EInputActionOrigin, uint32);
|
||||
extern const char * cppISteamInput_SteamInput006_GetGlyphForActionOrigin_Legacy(void *, EInputActionOrigin);
|
||||
extern const char * cppISteamInput_SteamInput006_GetStringForActionOrigin(void *, EInputActionOrigin);
|
||||
extern const char * cppISteamInput_SteamInput006_GetStringForAnalogActionName(void *, InputAnalogActionHandle_t);
|
||||
extern void cppISteamInput_SteamInput006_StopAnalogActionMomentum(void *, InputHandle_t, InputAnalogActionHandle_t);
|
||||
extern InputMotionData_t cppISteamInput_SteamInput006_GetMotionData(void *, InputHandle_t);
|
||||
extern void cppISteamInput_SteamInput006_TriggerVibration(void *, InputHandle_t, unsigned short, unsigned short);
|
||||
extern void cppISteamInput_SteamInput006_TriggerVibrationExtended(void *, InputHandle_t, unsigned short, unsigned short, unsigned short, unsigned short);
|
||||
extern void cppISteamInput_SteamInput006_TriggerSimpleHapticEvent(void *, InputHandle_t, EControllerHapticLocation, uint8, char, uint8, char);
|
||||
extern void cppISteamInput_SteamInput006_SetLEDColor(void *, InputHandle_t, uint8, uint8, uint8, unsigned int);
|
||||
extern void cppISteamInput_SteamInput006_Legacy_TriggerHapticPulse(void *, InputHandle_t, ESteamControllerPad, unsigned short);
|
||||
extern void cppISteamInput_SteamInput006_Legacy_TriggerRepeatedHapticPulse(void *, InputHandle_t, ESteamControllerPad, unsigned short, unsigned short, unsigned short, unsigned int);
|
||||
extern bool cppISteamInput_SteamInput006_ShowBindingPanel(void *, InputHandle_t);
|
||||
extern ESteamInputType cppISteamInput_SteamInput006_GetInputTypeForHandle(void *, InputHandle_t);
|
||||
extern InputHandle_t cppISteamInput_SteamInput006_GetControllerForGamepadIndex(void *, int);
|
||||
extern int cppISteamInput_SteamInput006_GetGamepadIndexForController(void *, InputHandle_t);
|
||||
extern const char * cppISteamInput_SteamInput006_GetStringForXboxOrigin(void *, EXboxOrigin);
|
||||
extern const char * cppISteamInput_SteamInput006_GetGlyphForXboxOrigin(void *, EXboxOrigin);
|
||||
extern EInputActionOrigin cppISteamInput_SteamInput006_GetActionOriginFromXboxOrigin(void *, InputHandle_t, EXboxOrigin);
|
||||
extern EInputActionOrigin cppISteamInput_SteamInput006_TranslateActionOrigin(void *, ESteamInputType, EInputActionOrigin);
|
||||
extern bool cppISteamInput_SteamInput006_GetDeviceBindingRevision(void *, InputHandle_t, int *, int *);
|
||||
extern uint32 cppISteamInput_SteamInput006_GetRemotePlaySessionID(void *, InputHandle_t);
|
||||
extern uint16 cppISteamInput_SteamInput006_GetSessionInputConfigurationSettings(void *);
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamInventory_STEAMINVENTORY_INTERFACE_V003.h"
|
||||
EResult cppISteamInventory_STEAMINVENTORY_INTERFACE_V003_GetResultStatus(void *linux_side, SteamInventoryResult_t resultHandle)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamMatchmakingServers_SteamMatchMakingServers002.h"
|
||||
HServerListRequest cppISteamMatchmakingServers_SteamMatchMakingServers002_RequestInternetServerList(void *linux_side, AppId_t iApp, MatchMakingKeyValuePair_t ** ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse * pRequestServersResponse)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamMatchmaking_SteamMatchMaking009.h"
|
||||
int cppISteamMatchmaking_SteamMatchMaking009_GetFavoriteGameCount(void *linux_side)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamMusicRemote_STEAMMUSICREMOTE_INTERFACE_VERSION001.h"
|
||||
bool cppISteamMusicRemote_STEAMMUSICREMOTE_INTERFACE_VERSION001_RegisterSteamMusicRemote(void *linux_side, const char * pchName)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamMusic_STEAMMUSIC_INTERFACE_VERSION001.h"
|
||||
bool cppISteamMusic_STEAMMUSIC_INTERFACE_VERSION001_BIsEnabled(void *linux_side)
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamnetworkingmessages.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamnetworkingmessages.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamNetworkingMessages_SteamNetworkingMessages002.h"
|
||||
EResult cppISteamNetworkingMessages_SteamNetworkingMessages002_SendMessageToUser(void *linux_side, const SteamNetworkingIdentity * identityRemote, const void * pubData, uint32 cubData, int nSendFlags, int nRemoteChannel)
|
||||
|
@ -1,5 +1,5 @@
|
||||
extern EResult cppISteamNetworkingMessages_SteamNetworkingMessages002_SendMessageToUser(void *, const SteamNetworkingIdentity *, const void *, uint32, int, int);
|
||||
extern int cppISteamNetworkingMessages_SteamNetworkingMessages002_ReceiveMessagesOnChannel(void *, int, winSteamNetworkingMessage_t_151 **, int);
|
||||
extern int cppISteamNetworkingMessages_SteamNetworkingMessages002_ReceiveMessagesOnChannel(void *, int, winSteamNetworkingMessage_t_153_preview **, int);
|
||||
extern bool cppISteamNetworkingMessages_SteamNetworkingMessages002_AcceptSessionWithUser(void *, const SteamNetworkingIdentity *);
|
||||
extern bool cppISteamNetworkingMessages_SteamNetworkingMessages002_CloseSessionWithUser(void *, const SteamNetworkingIdentity *);
|
||||
extern bool cppISteamNetworkingMessages_SteamNetworkingMessages002_CloseChannelWithUser(void *, const SteamNetworkingIdentity *, int);
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamnetworkingsockets.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamnetworkingsockets.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamNetworkingSockets_SteamNetworkingSockets009.h"
|
||||
HSteamListenSocket cppISteamNetworkingSockets_SteamNetworkingSockets009_CreateListenSocketIP(void *linux_side, const SteamNetworkingIPAddr * localAddress, int nOptions, const SteamNetworkingConfigValue_t * pOptions)
|
||||
|
@ -10,9 +10,9 @@ extern int64 cppISteamNetworkingSockets_SteamNetworkingSockets009_GetConnectionU
|
||||
extern void cppISteamNetworkingSockets_SteamNetworkingSockets009_SetConnectionName(void *, HSteamNetConnection, const char *);
|
||||
extern bool cppISteamNetworkingSockets_SteamNetworkingSockets009_GetConnectionName(void *, HSteamNetConnection, char *, int);
|
||||
extern EResult cppISteamNetworkingSockets_SteamNetworkingSockets009_SendMessageToConnection(void *, HSteamNetConnection, const void *, uint32, int, int64 *);
|
||||
extern void cppISteamNetworkingSockets_SteamNetworkingSockets009_SendMessages(void *, int, winSteamNetworkingMessage_t_151 *const *, int64 *);
|
||||
extern void cppISteamNetworkingSockets_SteamNetworkingSockets009_SendMessages(void *, int, winSteamNetworkingMessage_t_153_preview *const *, int64 *);
|
||||
extern EResult cppISteamNetworkingSockets_SteamNetworkingSockets009_FlushMessagesOnConnection(void *, HSteamNetConnection);
|
||||
extern int cppISteamNetworkingSockets_SteamNetworkingSockets009_ReceiveMessagesOnConnection(void *, HSteamNetConnection, winSteamNetworkingMessage_t_151 **, int);
|
||||
extern int cppISteamNetworkingSockets_SteamNetworkingSockets009_ReceiveMessagesOnConnection(void *, HSteamNetConnection, winSteamNetworkingMessage_t_153_preview **, int);
|
||||
extern bool cppISteamNetworkingSockets_SteamNetworkingSockets009_GetConnectionInfo(void *, HSteamNetConnection, SteamNetConnectionInfo_t *);
|
||||
extern bool cppISteamNetworkingSockets_SteamNetworkingSockets009_GetQuickConnectionStatus(void *, HSteamNetConnection, SteamNetworkingQuickConnectionStatus *);
|
||||
extern int cppISteamNetworkingSockets_SteamNetworkingSockets009_GetDetailedConnectionStatus(void *, HSteamNetConnection, char *, int);
|
||||
@ -24,7 +24,7 @@ extern ESteamNetworkingAvailability cppISteamNetworkingSockets_SteamNetworkingSo
|
||||
extern HSteamNetPollGroup cppISteamNetworkingSockets_SteamNetworkingSockets009_CreatePollGroup(void *);
|
||||
extern bool cppISteamNetworkingSockets_SteamNetworkingSockets009_DestroyPollGroup(void *, HSteamNetPollGroup);
|
||||
extern bool cppISteamNetworkingSockets_SteamNetworkingSockets009_SetConnectionPollGroup(void *, HSteamNetConnection, HSteamNetPollGroup);
|
||||
extern int cppISteamNetworkingSockets_SteamNetworkingSockets009_ReceiveMessagesOnPollGroup(void *, HSteamNetPollGroup, winSteamNetworkingMessage_t_151 **, int);
|
||||
extern int cppISteamNetworkingSockets_SteamNetworkingSockets009_ReceiveMessagesOnPollGroup(void *, HSteamNetPollGroup, winSteamNetworkingMessage_t_153_preview **, int);
|
||||
extern bool cppISteamNetworkingSockets_SteamNetworkingSockets009_ReceivedRelayAuthTicket(void *, const void *, int, SteamDatagramRelayAuthTicket *);
|
||||
extern int cppISteamNetworkingSockets_SteamNetworkingSockets009_FindRelayAuthTicketForServer(void *, const SteamNetworkingIdentity *, int, SteamDatagramRelayAuthTicket *);
|
||||
extern HSteamNetConnection cppISteamNetworkingSockets_SteamNetworkingSockets009_ConnectToHostedDedicatedServer(void *, const SteamNetworkingIdentity *, int, int, const SteamNetworkingConfigValue_t *);
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamnetworkingutils.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamnetworkingutils.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamNetworkingUtils_SteamNetworkingUtils003.h"
|
||||
ESteamNetworkingAvailability cppISteamNetworkingUtils_SteamNetworkingUtils003_GetRelayNetworkStatus(void *linux_side, SteamRelayNetworkStatus_t * pDetails)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamNetworking_SteamNetworking006.h"
|
||||
bool cppISteamNetworking_SteamNetworking006_SendP2PPacket(void *linux_side, CSteamID steamIDRemote, const void * pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel)
|
||||
|
@ -1,15 +1,15 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_151/isteamparentalsettings.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/isteamparentalsettings.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamParentalSettings_STEAMPARENTALSETTINGS_INTERFACE_VERSION001.h"
|
||||
bool cppISteamParentalSettings_STEAMPARENTALSETTINGS_INTERFACE_VERSION001_BIsParentalLockEnabled(void *linux_side)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamParties_SteamParties002.h"
|
||||
uint32 cppISteamParties_SteamParties002_GetNumActiveBeacons(void *linux_side)
|
||||
@ -21,12 +21,12 @@ PartyBeaconID_t cppISteamParties_SteamParties002_GetBeaconByIndex(void *linux_si
|
||||
return ((ISteamParties*)linux_side)->GetBeaconByIndex((uint32)unIndex);
|
||||
}
|
||||
|
||||
bool cppISteamParties_SteamParties002_GetBeaconDetails(void *linux_side, PartyBeaconID_t ulBeaconID, CSteamID * pSteamIDBeaconOwner, winSteamPartyBeaconLocation_t_151 * pLocation, char * pchMetadata, int cchMetadata)
|
||||
bool cppISteamParties_SteamParties002_GetBeaconDetails(void *linux_side, PartyBeaconID_t ulBeaconID, CSteamID * pSteamIDBeaconOwner, winSteamPartyBeaconLocation_t_153_preview * pLocation, char * pchMetadata, int cchMetadata)
|
||||
{
|
||||
SteamPartyBeaconLocation_t lin_pLocation;
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_151(pLocation, &lin_pLocation);
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_153_preview(pLocation, &lin_pLocation);
|
||||
bool retval = ((ISteamParties*)linux_side)->GetBeaconDetails((PartyBeaconID_t)ulBeaconID, (CSteamID *)pSteamIDBeaconOwner, &lin_pLocation, (char *)pchMetadata, (int)cchMetadata);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_151(&lin_pLocation, pLocation);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_153_preview(&lin_pLocation, pLocation);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -40,21 +40,21 @@ bool cppISteamParties_SteamParties002_GetNumAvailableBeaconLocations(void *linux
|
||||
return ((ISteamParties*)linux_side)->GetNumAvailableBeaconLocations((uint32 *)puNumLocations);
|
||||
}
|
||||
|
||||
bool cppISteamParties_SteamParties002_GetAvailableBeaconLocations(void *linux_side, winSteamPartyBeaconLocation_t_151 * pLocationList, uint32 uMaxNumLocations)
|
||||
bool cppISteamParties_SteamParties002_GetAvailableBeaconLocations(void *linux_side, winSteamPartyBeaconLocation_t_153_preview * pLocationList, uint32 uMaxNumLocations)
|
||||
{
|
||||
SteamPartyBeaconLocation_t lin_pLocationList;
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_151(pLocationList, &lin_pLocationList);
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_153_preview(pLocationList, &lin_pLocationList);
|
||||
bool retval = ((ISteamParties*)linux_side)->GetAvailableBeaconLocations(&lin_pLocationList, (uint32)uMaxNumLocations);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_151(&lin_pLocationList, pLocationList);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_153_preview(&lin_pLocationList, pLocationList);
|
||||
return retval;
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamParties_SteamParties002_CreateBeacon(void *linux_side, uint32 unOpenSlots, winSteamPartyBeaconLocation_t_151 * pBeaconLocation, const char * pchConnectString, const char * pchMetadata)
|
||||
SteamAPICall_t cppISteamParties_SteamParties002_CreateBeacon(void *linux_side, uint32 unOpenSlots, winSteamPartyBeaconLocation_t_153_preview * pBeaconLocation, const char * pchConnectString, const char * pchMetadata)
|
||||
{
|
||||
SteamPartyBeaconLocation_t lin_pBeaconLocation;
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_151(pBeaconLocation, &lin_pBeaconLocation);
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_153_preview(pBeaconLocation, &lin_pBeaconLocation);
|
||||
SteamAPICall_t retval = ((ISteamParties*)linux_side)->CreateBeacon((uint32)unOpenSlots, &lin_pBeaconLocation, (const char *)pchConnectString, (const char *)pchMetadata);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_151(&lin_pBeaconLocation, pBeaconLocation);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_153_preview(&lin_pBeaconLocation, pBeaconLocation);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -78,12 +78,12 @@ bool cppISteamParties_SteamParties002_DestroyBeacon(void *linux_side, PartyBeaco
|
||||
return ((ISteamParties*)linux_side)->DestroyBeacon((PartyBeaconID_t)ulBeacon);
|
||||
}
|
||||
|
||||
bool cppISteamParties_SteamParties002_GetBeaconLocationData(void *linux_side, winSteamPartyBeaconLocation_t_151 BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut)
|
||||
bool cppISteamParties_SteamParties002_GetBeaconLocationData(void *linux_side, winSteamPartyBeaconLocation_t_153_preview BeaconLocation, ESteamPartyBeaconLocationData eData, char * pchDataStringOut, int cchDataStringOut)
|
||||
{
|
||||
SteamPartyBeaconLocation_t lin_BeaconLocation;
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_151(&BeaconLocation, &lin_BeaconLocation);
|
||||
win_to_lin_struct_SteamPartyBeaconLocation_t_153_preview(&BeaconLocation, &lin_BeaconLocation);
|
||||
bool retval = ((ISteamParties*)linux_side)->GetBeaconLocationData(lin_BeaconLocation, (ESteamPartyBeaconLocationData)eData, (char *)pchDataStringOut, (int)cchDataStringOut);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_151(&lin_BeaconLocation, &BeaconLocation);
|
||||
lin_to_win_struct_SteamPartyBeaconLocation_t_153_preview(&lin_BeaconLocation, &BeaconLocation);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
extern uint32 cppISteamParties_SteamParties002_GetNumActiveBeacons(void *);
|
||||
extern PartyBeaconID_t cppISteamParties_SteamParties002_GetBeaconByIndex(void *, uint32);
|
||||
extern bool cppISteamParties_SteamParties002_GetBeaconDetails(void *, PartyBeaconID_t, CSteamID *, winSteamPartyBeaconLocation_t_151 *, char *, int);
|
||||
extern bool cppISteamParties_SteamParties002_GetBeaconDetails(void *, PartyBeaconID_t, CSteamID *, winSteamPartyBeaconLocation_t_153_preview *, char *, int);
|
||||
extern SteamAPICall_t cppISteamParties_SteamParties002_JoinParty(void *, PartyBeaconID_t);
|
||||
extern bool cppISteamParties_SteamParties002_GetNumAvailableBeaconLocations(void *, uint32 *);
|
||||
extern bool cppISteamParties_SteamParties002_GetAvailableBeaconLocations(void *, winSteamPartyBeaconLocation_t_151 *, uint32);
|
||||
extern SteamAPICall_t cppISteamParties_SteamParties002_CreateBeacon(void *, uint32, winSteamPartyBeaconLocation_t_151 *, const char *, const char *);
|
||||
extern bool cppISteamParties_SteamParties002_GetAvailableBeaconLocations(void *, winSteamPartyBeaconLocation_t_153_preview *, uint32);
|
||||
extern SteamAPICall_t cppISteamParties_SteamParties002_CreateBeacon(void *, uint32, winSteamPartyBeaconLocation_t_153_preview *, const char *, const char *);
|
||||
extern void cppISteamParties_SteamParties002_OnReservationCompleted(void *, PartyBeaconID_t, CSteamID);
|
||||
extern void cppISteamParties_SteamParties002_CancelReservation(void *, PartyBeaconID_t, CSteamID);
|
||||
extern SteamAPICall_t cppISteamParties_SteamParties002_ChangeNumOpenSlots(void *, PartyBeaconID_t, uint32);
|
||||
extern bool cppISteamParties_SteamParties002_DestroyBeacon(void *, PartyBeaconID_t);
|
||||
extern bool cppISteamParties_SteamParties002_GetBeaconLocationData(void *, winSteamPartyBeaconLocation_t_151, ESteamPartyBeaconLocationData, char *, int);
|
||||
extern bool cppISteamParties_SteamParties002_GetBeaconLocationData(void *, winSteamPartyBeaconLocation_t_153_preview, ESteamPartyBeaconLocationData, char *, int);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamRemotePlay_STEAMREMOTEPLAY_INTERFACE_VERSION001.h"
|
||||
uint32 cppISteamRemotePlay_STEAMREMOTEPLAY_INTERFACE_VERSION001_GetSessionCount(void *linux_side)
|
||||
|
@ -0,0 +1,311 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016.h"
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWrite(void *linux_side, const char * pchFile, const void * pvData, int32 cubData)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileWrite((const char *)pchFile, (const void *)pvData, (int32)cubData);
|
||||
}
|
||||
|
||||
int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileRead(void *linux_side, const char * pchFile, void * pvData, int32 cubDataToRead)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileRead((const char *)pchFile, (void *)pvData, (int32)cubDataToRead);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteAsync(void *linux_side, const char * pchFile, const void * pvData, uint32 cubData)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileWriteAsync((const char *)pchFile, (const void *)pvData, (uint32)cubData);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileReadAsync(void *linux_side, const char * pchFile, uint32 nOffset, uint32 cubToRead)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileReadAsync((const char *)pchFile, (uint32)nOffset, (uint32)cubToRead);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileReadAsyncComplete(void *linux_side, SteamAPICall_t hReadCall, void * pvBuffer, uint32 cubToRead)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileReadAsyncComplete((SteamAPICall_t)hReadCall, (void *)pvBuffer, (uint32)cubToRead);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileForget(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileForget((const char *)pchFile);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileDelete(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileDelete((const char *)pchFile);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileShare(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileShare((const char *)pchFile);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SetSyncPlatforms(void *linux_side, const char * pchFile, ERemoteStoragePlatform eRemoteStoragePlatform)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->SetSyncPlatforms((const char *)pchFile, (ERemoteStoragePlatform)eRemoteStoragePlatform);
|
||||
}
|
||||
|
||||
UGCFileWriteStreamHandle_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamOpen(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileWriteStreamOpen((const char *)pchFile);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamWriteChunk(void *linux_side, UGCFileWriteStreamHandle_t writeHandle, const void * pvData, int32 cubData)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileWriteStreamWriteChunk((UGCFileWriteStreamHandle_t)writeHandle, (const void *)pvData, (int32)cubData);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamClose(void *linux_side, UGCFileWriteStreamHandle_t writeHandle)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileWriteStreamClose((UGCFileWriteStreamHandle_t)writeHandle);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamCancel(void *linux_side, UGCFileWriteStreamHandle_t writeHandle)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileWriteStreamCancel((UGCFileWriteStreamHandle_t)writeHandle);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileExists(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FileExists((const char *)pchFile);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FilePersisted(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->FilePersisted((const char *)pchFile);
|
||||
}
|
||||
|
||||
int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileSize(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetFileSize((const char *)pchFile);
|
||||
}
|
||||
|
||||
int64 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileTimestamp(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetFileTimestamp((const char *)pchFile);
|
||||
}
|
||||
|
||||
ERemoteStoragePlatform cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetSyncPlatforms(void *linux_side, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetSyncPlatforms((const char *)pchFile);
|
||||
}
|
||||
|
||||
int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileCount(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetFileCount();
|
||||
}
|
||||
|
||||
const char * cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileNameAndSize(void *linux_side, int iFile, int32 * pnFileSizeInBytes)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetFileNameAndSize((int)iFile, (int32 *)pnFileSizeInBytes);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetQuota(void *linux_side, uint64 * pnTotalBytes, uint64 * puAvailableBytes)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetQuota((uint64 *)pnTotalBytes, (uint64 *)puAvailableBytes);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_IsCloudEnabledForAccount(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->IsCloudEnabledForAccount();
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_IsCloudEnabledForApp(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->IsCloudEnabledForApp();
|
||||
}
|
||||
|
||||
void cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SetCloudEnabledForApp(void *linux_side, bool bEnabled)
|
||||
{
|
||||
((ISteamRemoteStorage*)linux_side)->SetCloudEnabledForApp((bool)bEnabled);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UGCDownload(void *linux_side, UGCHandle_t hContent, uint32 unPriority)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UGCDownload((UGCHandle_t)hContent, (uint32)unPriority);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetUGCDownloadProgress(void *linux_side, UGCHandle_t hContent, int32 * pnBytesDownloaded, int32 * pnBytesExpected)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetUGCDownloadProgress((UGCHandle_t)hContent, (int32 *)pnBytesDownloaded, (int32 *)pnBytesExpected);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetUGCDetails(void *linux_side, UGCHandle_t hContent, AppId_t * pnAppID, char ** ppchName, int32 * pnFileSizeInBytes, CSteamID * pSteamIDOwner)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetUGCDetails((UGCHandle_t)hContent, (AppId_t *)pnAppID, (char **)ppchName, (int32 *)pnFileSizeInBytes, (CSteamID *)pSteamIDOwner);
|
||||
}
|
||||
|
||||
int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UGCRead(void *linux_side, UGCHandle_t hContent, void * pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UGCRead((UGCHandle_t)hContent, (void *)pvData, (int32)cubDataToRead, (uint32)cOffset, (EUGCReadAction)eAction);
|
||||
}
|
||||
|
||||
int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetCachedUGCCount(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetCachedUGCCount();
|
||||
}
|
||||
|
||||
UGCHandle_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetCachedUGCHandle(void *linux_side, int32 iCachedContent)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetCachedUGCHandle((int32)iCachedContent);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_PublishWorkshopFile(void *linux_side, const char * pchFile, const char * pchPreviewFile, AppId_t nConsumerAppId, const char * pchTitle, const char * pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t * pTags, EWorkshopFileType eWorkshopFileType)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->PublishWorkshopFile((const char *)pchFile, (const char *)pchPreviewFile, (AppId_t)nConsumerAppId, (const char *)pchTitle, (const char *)pchDescription, (ERemoteStoragePublishedFileVisibility)eVisibility, (SteamParamStringArray_t *)pTags, (EWorkshopFileType)eWorkshopFileType);
|
||||
}
|
||||
|
||||
PublishedFileUpdateHandle_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_CreatePublishedFileUpdateRequest(void *linux_side, PublishedFileId_t unPublishedFileId)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->CreatePublishedFileUpdateRequest((PublishedFileId_t)unPublishedFileId);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileFile(void *linux_side, PublishedFileUpdateHandle_t updateHandle, const char * pchFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFileFile((PublishedFileUpdateHandle_t)updateHandle, (const char *)pchFile);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFilePreviewFile(void *linux_side, PublishedFileUpdateHandle_t updateHandle, const char * pchPreviewFile)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFilePreviewFile((PublishedFileUpdateHandle_t)updateHandle, (const char *)pchPreviewFile);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileTitle(void *linux_side, PublishedFileUpdateHandle_t updateHandle, const char * pchTitle)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFileTitle((PublishedFileUpdateHandle_t)updateHandle, (const char *)pchTitle);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileDescription(void *linux_side, PublishedFileUpdateHandle_t updateHandle, const char * pchDescription)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFileDescription((PublishedFileUpdateHandle_t)updateHandle, (const char *)pchDescription);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileVisibility(void *linux_side, PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFileVisibility((PublishedFileUpdateHandle_t)updateHandle, (ERemoteStoragePublishedFileVisibility)eVisibility);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileTags(void *linux_side, PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t * pTags)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFileTags((PublishedFileUpdateHandle_t)updateHandle, (SteamParamStringArray_t *)pTags);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_CommitPublishedFileUpdate(void *linux_side, PublishedFileUpdateHandle_t updateHandle)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->CommitPublishedFileUpdate((PublishedFileUpdateHandle_t)updateHandle);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetPublishedFileDetails(void *linux_side, PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetPublishedFileDetails((PublishedFileId_t)unPublishedFileId, (uint32)unMaxSecondsOld);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_DeletePublishedFile(void *linux_side, PublishedFileId_t unPublishedFileId)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->DeletePublishedFile((PublishedFileId_t)unPublishedFileId);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumerateUserPublishedFiles(void *linux_side, uint32 unStartIndex)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->EnumerateUserPublishedFiles((uint32)unStartIndex);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SubscribePublishedFile(void *linux_side, PublishedFileId_t unPublishedFileId)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->SubscribePublishedFile((PublishedFileId_t)unPublishedFileId);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumerateUserSubscribedFiles(void *linux_side, uint32 unStartIndex)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->EnumerateUserSubscribedFiles((uint32)unStartIndex);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UnsubscribePublishedFile(void *linux_side, PublishedFileId_t unPublishedFileId)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UnsubscribePublishedFile((PublishedFileId_t)unPublishedFileId);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileSetChangeDescription(void *linux_side, PublishedFileUpdateHandle_t updateHandle, const char * pchChangeDescription)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdatePublishedFileSetChangeDescription((PublishedFileUpdateHandle_t)updateHandle, (const char *)pchChangeDescription);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetPublishedItemVoteDetails(void *linux_side, PublishedFileId_t unPublishedFileId)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetPublishedItemVoteDetails((PublishedFileId_t)unPublishedFileId);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdateUserPublishedItemVote(void *linux_side, PublishedFileId_t unPublishedFileId, bool bVoteUp)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UpdateUserPublishedItemVote((PublishedFileId_t)unPublishedFileId, (bool)bVoteUp);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetUserPublishedItemVoteDetails(void *linux_side, PublishedFileId_t unPublishedFileId)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetUserPublishedItemVoteDetails((PublishedFileId_t)unPublishedFileId);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumerateUserSharedWorkshopFiles(void *linux_side, CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t * pRequiredTags, SteamParamStringArray_t * pExcludedTags)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->EnumerateUserSharedWorkshopFiles((CSteamID)steamId, (uint32)unStartIndex, (SteamParamStringArray_t *)pRequiredTags, (SteamParamStringArray_t *)pExcludedTags);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_PublishVideo(void *linux_side, EWorkshopVideoProvider eVideoProvider, const char * pchVideoAccount, const char * pchVideoIdentifier, const char * pchPreviewFile, AppId_t nConsumerAppId, const char * pchTitle, const char * pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t * pTags)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->PublishVideo((EWorkshopVideoProvider)eVideoProvider, (const char *)pchVideoAccount, (const char *)pchVideoIdentifier, (const char *)pchPreviewFile, (AppId_t)nConsumerAppId, (const char *)pchTitle, (const char *)pchDescription, (ERemoteStoragePublishedFileVisibility)eVisibility, (SteamParamStringArray_t *)pTags);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SetUserPublishedFileAction(void *linux_side, PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->SetUserPublishedFileAction((PublishedFileId_t)unPublishedFileId, (EWorkshopFileAction)eAction);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumeratePublishedFilesByUserAction(void *linux_side, EWorkshopFileAction eAction, uint32 unStartIndex)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->EnumeratePublishedFilesByUserAction((EWorkshopFileAction)eAction, (uint32)unStartIndex);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumeratePublishedWorkshopFiles(void *linux_side, EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t * pTags, SteamParamStringArray_t * pUserTags)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->EnumeratePublishedWorkshopFiles((EWorkshopEnumerationType)eEnumerationType, (uint32)unStartIndex, (uint32)unCount, (uint32)unDays, (SteamParamStringArray_t *)pTags, (SteamParamStringArray_t *)pUserTags);
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UGCDownloadToLocation(void *linux_side, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->UGCDownloadToLocation((UGCHandle_t)hContent, (const char *)pchLocation, (uint32)unPriority);
|
||||
}
|
||||
|
||||
int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetLocalFileChangeCount(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetLocalFileChangeCount();
|
||||
}
|
||||
|
||||
const char * cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetLocalFileChange(void *linux_side, int iFile, ERemoteStorageLocalFileChange * pEChangeType, ERemoteStorageFilePathType * pEFilePathType)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->GetLocalFileChange((int)iFile, (ERemoteStorageLocalFileChange *)pEChangeType, (ERemoteStorageFilePathType *)pEFilePathType);
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_BeginFileWriteBatch(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->BeginFileWriteBatch();
|
||||
}
|
||||
|
||||
bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EndFileWriteBatch(void *linux_side)
|
||||
{
|
||||
return ((ISteamRemoteStorage*)linux_side)->EndFileWriteBatch();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -0,0 +1,59 @@
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWrite(void *, const char *, const void *, int32);
|
||||
extern int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileRead(void *, const char *, void *, int32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteAsync(void *, const char *, const void *, uint32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileReadAsync(void *, const char *, uint32, uint32);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileReadAsyncComplete(void *, SteamAPICall_t, void *, uint32);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileForget(void *, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileDelete(void *, const char *);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileShare(void *, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SetSyncPlatforms(void *, const char *, ERemoteStoragePlatform);
|
||||
extern UGCFileWriteStreamHandle_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamOpen(void *, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamWriteChunk(void *, UGCFileWriteStreamHandle_t, const void *, int32);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamClose(void *, UGCFileWriteStreamHandle_t);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileWriteStreamCancel(void *, UGCFileWriteStreamHandle_t);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FileExists(void *, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_FilePersisted(void *, const char *);
|
||||
extern int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileSize(void *, const char *);
|
||||
extern int64 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileTimestamp(void *, const char *);
|
||||
extern ERemoteStoragePlatform cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetSyncPlatforms(void *, const char *);
|
||||
extern int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileCount(void *);
|
||||
extern const char * cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetFileNameAndSize(void *, int, int32 *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetQuota(void *, uint64 *, uint64 *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_IsCloudEnabledForAccount(void *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_IsCloudEnabledForApp(void *);
|
||||
extern void cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SetCloudEnabledForApp(void *, bool);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UGCDownload(void *, UGCHandle_t, uint32);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetUGCDownloadProgress(void *, UGCHandle_t, int32 *, int32 *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetUGCDetails(void *, UGCHandle_t, AppId_t *, char **, int32 *, CSteamID *);
|
||||
extern int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UGCRead(void *, UGCHandle_t, void *, int32, uint32, EUGCReadAction);
|
||||
extern int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetCachedUGCCount(void *);
|
||||
extern UGCHandle_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetCachedUGCHandle(void *, int32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_PublishWorkshopFile(void *, const char *, const char *, AppId_t, const char *, const char *, ERemoteStoragePublishedFileVisibility, SteamParamStringArray_t *, EWorkshopFileType);
|
||||
extern PublishedFileUpdateHandle_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_CreatePublishedFileUpdateRequest(void *, PublishedFileId_t);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileFile(void *, PublishedFileUpdateHandle_t, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFilePreviewFile(void *, PublishedFileUpdateHandle_t, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileTitle(void *, PublishedFileUpdateHandle_t, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileDescription(void *, PublishedFileUpdateHandle_t, const char *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileVisibility(void *, PublishedFileUpdateHandle_t, ERemoteStoragePublishedFileVisibility);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileTags(void *, PublishedFileUpdateHandle_t, SteamParamStringArray_t *);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_CommitPublishedFileUpdate(void *, PublishedFileUpdateHandle_t);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetPublishedFileDetails(void *, PublishedFileId_t, uint32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_DeletePublishedFile(void *, PublishedFileId_t);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumerateUserPublishedFiles(void *, uint32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SubscribePublishedFile(void *, PublishedFileId_t);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumerateUserSubscribedFiles(void *, uint32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UnsubscribePublishedFile(void *, PublishedFileId_t);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdatePublishedFileSetChangeDescription(void *, PublishedFileUpdateHandle_t, const char *);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetPublishedItemVoteDetails(void *, PublishedFileId_t);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UpdateUserPublishedItemVote(void *, PublishedFileId_t, bool);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetUserPublishedItemVoteDetails(void *, PublishedFileId_t);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumerateUserSharedWorkshopFiles(void *, CSteamID, uint32, SteamParamStringArray_t *, SteamParamStringArray_t *);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_PublishVideo(void *, EWorkshopVideoProvider, const char *, const char *, const char *, AppId_t, const char *, const char *, ERemoteStoragePublishedFileVisibility, SteamParamStringArray_t *);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_SetUserPublishedFileAction(void *, PublishedFileId_t, EWorkshopFileAction);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumeratePublishedFilesByUserAction(void *, EWorkshopFileAction, uint32);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EnumeratePublishedWorkshopFiles(void *, EWorkshopEnumerationType, uint32, uint32, uint32, SteamParamStringArray_t *, SteamParamStringArray_t *);
|
||||
extern SteamAPICall_t cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_UGCDownloadToLocation(void *, UGCHandle_t, const char *, uint32);
|
||||
extern int32 cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetLocalFileChangeCount(void *);
|
||||
extern const char * cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_GetLocalFileChange(void *, int, ERemoteStorageLocalFileChange *, ERemoteStorageFilePathType *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_BeginFileWriteBatch(void *);
|
||||
extern bool cppISteamRemoteStorage_STEAMREMOTESTORAGE_INTERFACE_VERSION016_EndFileWriteBatch(void *);
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamScreenshots_STEAMSCREENSHOTS_INTERFACE_VERSION003.h"
|
||||
ScreenshotHandle cppISteamScreenshots_STEAMSCREENSHOTS_INTERFACE_VERSION003_WriteScreenshot(void *linux_side, void * pubRGB, uint32 cubRGB, int nWidth, int nHeight)
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamUGC_STEAMUGC_INTERFACE_VERSION015.h"
|
||||
UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_CreateQueryUserUGCRequest(void *linux_side, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage)
|
||||
@ -36,12 +36,12 @@ SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_SendQueryUGCRequest(vo
|
||||
return ((ISteamUGC*)linux_side)->SendQueryUGCRequest((UGCQueryHandle_t)handle);
|
||||
}
|
||||
|
||||
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCResult(void *linux_side, UGCQueryHandle_t handle, uint32 index, winSteamUGCDetails_t_151 * pDetails)
|
||||
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCResult(void *linux_side, UGCQueryHandle_t handle, uint32 index, winSteamUGCDetails_t_153_preview * pDetails)
|
||||
{
|
||||
SteamUGCDetails_t lin_pDetails;
|
||||
win_to_lin_struct_SteamUGCDetails_t_151(pDetails, &lin_pDetails);
|
||||
win_to_lin_struct_SteamUGCDetails_t_153_preview(pDetails, &lin_pDetails);
|
||||
bool retval = ((ISteamUGC*)linux_side)->GetQueryUGCResult((UGCQueryHandle_t)handle, (uint32)index, &lin_pDetails);
|
||||
lin_to_win_struct_SteamUGCDetails_t_151(&lin_pDetails, pDetails);
|
||||
lin_to_win_struct_SteamUGCDetails_t_153_preview(&lin_pDetails, pDetails);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -425,6 +425,16 @@ SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_DeleteItem(void *linux
|
||||
return ((ISteamUGC*)linux_side)->DeleteItem((PublishedFileId_t)nPublishedFileID);
|
||||
}
|
||||
|
||||
bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_ShowWorkshopEULA(void *linux_side)
|
||||
{
|
||||
return ((ISteamUGC*)linux_side)->ShowWorkshopEULA();
|
||||
}
|
||||
|
||||
SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetWorkshopEULAStatus(void *linux_side)
|
||||
{
|
||||
return ((ISteamUGC*)linux_side)->GetWorkshopEULAStatus();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -3,7 +3,7 @@ extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_CreateQueryAl
|
||||
extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_CreateQueryAllUGCRequest_2(void *, EUGCQuery, EUGCMatchingUGCType, AppId_t, AppId_t, const char *);
|
||||
extern UGCQueryHandle_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_CreateQueryUGCDetailsRequest(void *, PublishedFileId_t *, uint32);
|
||||
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_SendQueryUGCRequest(void *, UGCQueryHandle_t);
|
||||
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCResult(void *, UGCQueryHandle_t, uint32, winSteamUGCDetails_t_151 *);
|
||||
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCResult(void *, UGCQueryHandle_t, uint32, winSteamUGCDetails_t_153_preview *);
|
||||
extern uint32 cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCNumTags(void *, UGCQueryHandle_t, uint32);
|
||||
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCTag(void *, UGCQueryHandle_t, uint32, uint32, char *, uint32);
|
||||
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetQueryUGCTagDisplayName(void *, UGCQueryHandle_t, uint32, uint32, char *, uint32);
|
||||
@ -80,3 +80,5 @@ extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_AddAppDependenc
|
||||
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_RemoveAppDependency(void *, PublishedFileId_t, AppId_t);
|
||||
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetAppDependencies(void *, PublishedFileId_t);
|
||||
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_DeleteItem(void *, PublishedFileId_t);
|
||||
extern bool cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_ShowWorkshopEULA(void *);
|
||||
extern SteamAPICall_t cppISteamUGC_STEAMUGC_INTERFACE_VERSION015_GetWorkshopEULAStatus(void *);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012.h"
|
||||
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_RequestCurrentStats(void *linux_side)
|
||||
@ -161,12 +161,12 @@ SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_DownloadLe
|
||||
return ((ISteamUserStats*)linux_side)->DownloadLeaderboardEntriesForUsers((SteamLeaderboard_t)hSteamLeaderboard, (CSteamID *)prgUsers, (int)cUsers);
|
||||
}
|
||||
|
||||
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_GetDownloadedLeaderboardEntry(void *linux_side, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, winLeaderboardEntry_t_151 * pLeaderboardEntry, int32 * pDetails, int cDetailsMax)
|
||||
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_GetDownloadedLeaderboardEntry(void *linux_side, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, winLeaderboardEntry_t_153_preview * pLeaderboardEntry, int32 * pDetails, int cDetailsMax)
|
||||
{
|
||||
LeaderboardEntry_t lin_pLeaderboardEntry;
|
||||
win_to_lin_struct_LeaderboardEntry_t_151(pLeaderboardEntry, &lin_pLeaderboardEntry);
|
||||
win_to_lin_struct_LeaderboardEntry_t_153_preview(pLeaderboardEntry, &lin_pLeaderboardEntry);
|
||||
bool retval = ((ISteamUserStats*)linux_side)->GetDownloadedLeaderboardEntry((SteamLeaderboardEntries_t)hSteamLeaderboardEntries, (int)index, &lin_pLeaderboardEntry, (int32 *)pDetails, (int)cDetailsMax);
|
||||
lin_to_win_struct_LeaderboardEntry_t_151(&lin_pLeaderboardEntry, pLeaderboardEntry);
|
||||
lin_to_win_struct_LeaderboardEntry_t_153_preview(&lin_pLeaderboardEntry, pLeaderboardEntry);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ extern ELeaderboardSortMethod cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSIO
|
||||
extern ELeaderboardDisplayType cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_GetLeaderboardDisplayType(void *, SteamLeaderboard_t);
|
||||
extern SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_DownloadLeaderboardEntries(void *, SteamLeaderboard_t, ELeaderboardDataRequest, int, int);
|
||||
extern SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_DownloadLeaderboardEntriesForUsers(void *, SteamLeaderboard_t, CSteamID *, int);
|
||||
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_GetDownloadedLeaderboardEntry(void *, SteamLeaderboardEntries_t, int, winLeaderboardEntry_t_151 *, int32 *, int);
|
||||
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_GetDownloadedLeaderboardEntry(void *, SteamLeaderboardEntries_t, int, winLeaderboardEntry_t_153_preview *, int32 *, int);
|
||||
extern SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_UploadLeaderboardScore(void *, SteamLeaderboard_t, ELeaderboardUploadScoreMethod, int32, const int32 *, int);
|
||||
extern SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_AttachLeaderboardUGC(void *, SteamLeaderboard_t, UGCHandle_t);
|
||||
extern SteamAPICall_t cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION012_GetNumberOfCurrentPlayers(void *);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamUser_SteamUser021.h"
|
||||
HSteamUser cppISteamUser_SteamUser021_GetHSteamUser(void *linux_side)
|
||||
@ -26,14 +26,14 @@ CSteamID cppISteamUser_SteamUser021_GetSteamID(void *linux_side)
|
||||
return ((ISteamUser*)linux_side)->GetSteamID();
|
||||
}
|
||||
|
||||
int cppISteamUser_SteamUser021_InitiateGameConnection(void *linux_side, void * pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure)
|
||||
int cppISteamUser_SteamUser021_InitiateGameConnection_DEPRECATED(void *linux_side, void * pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure)
|
||||
{
|
||||
return ((ISteamUser*)linux_side)->InitiateGameConnection((void *)pAuthBlob, (int)cbMaxAuthBlob, (CSteamID)steamIDGameServer, (uint32)unIPServer, (uint16)usPortServer, (bool)bSecure);
|
||||
return ((ISteamUser*)linux_side)->InitiateGameConnection_DEPRECATED((void *)pAuthBlob, (int)cbMaxAuthBlob, (CSteamID)steamIDGameServer, (uint32)unIPServer, (uint16)usPortServer, (bool)bSecure);
|
||||
}
|
||||
|
||||
void cppISteamUser_SteamUser021_TerminateGameConnection(void *linux_side, uint32 unIPServer, uint16 usPortServer)
|
||||
void cppISteamUser_SteamUser021_TerminateGameConnection_DEPRECATED(void *linux_side, uint32 unIPServer, uint16 usPortServer)
|
||||
{
|
||||
((ISteamUser*)linux_side)->TerminateGameConnection((uint32)unIPServer, (uint16)usPortServer);
|
||||
((ISteamUser*)linux_side)->TerminateGameConnection_DEPRECATED((uint32)unIPServer, (uint16)usPortServer);
|
||||
}
|
||||
|
||||
void cppISteamUser_SteamUser021_TrackAppUsageEvent(void *linux_side, CGameID gameID, int eAppUsageEvent, const char * pchExtraInfo)
|
||||
|
@ -1,8 +1,8 @@
|
||||
extern HSteamUser cppISteamUser_SteamUser021_GetHSteamUser(void *);
|
||||
extern bool cppISteamUser_SteamUser021_BLoggedOn(void *);
|
||||
extern CSteamID cppISteamUser_SteamUser021_GetSteamID(void *);
|
||||
extern int cppISteamUser_SteamUser021_InitiateGameConnection(void *, void *, int, CSteamID, uint32, uint16, bool);
|
||||
extern void cppISteamUser_SteamUser021_TerminateGameConnection(void *, uint32, uint16);
|
||||
extern int cppISteamUser_SteamUser021_InitiateGameConnection_DEPRECATED(void *, void *, int, CSteamID, uint32, uint16, bool);
|
||||
extern void cppISteamUser_SteamUser021_TerminateGameConnection_DEPRECATED(void *, uint32, uint16);
|
||||
extern void cppISteamUser_SteamUser021_TrackAppUsageEvent(void *, CGameID, int, const char *);
|
||||
extern bool cppISteamUser_SteamUser021_GetUserDataFolder(void *, char *, int);
|
||||
extern void cppISteamUser_SteamUser021_StartVoiceRecording(void *);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamUtils_SteamUtils010.h"
|
||||
uint32 cppISteamUtils_SteamUtils010_GetSecondsSinceAppActive(void *linux_side)
|
||||
@ -181,6 +181,26 @@ ESteamIPv6ConnectivityState cppISteamUtils_SteamUtils010_GetIPv6ConnectivityStat
|
||||
return ((ISteamUtils*)linux_side)->GetIPv6ConnectivityState((ESteamIPv6ConnectivityProtocol)eProtocol);
|
||||
}
|
||||
|
||||
bool cppISteamUtils_SteamUtils010_IsSteamRunningOnSteamDeck(void *linux_side)
|
||||
{
|
||||
return ((ISteamUtils*)linux_side)->IsSteamRunningOnSteamDeck();
|
||||
}
|
||||
|
||||
bool cppISteamUtils_SteamUtils010_ShowFloatingGamepadTextInput(void *linux_side, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight)
|
||||
{
|
||||
return ((ISteamUtils*)linux_side)->ShowFloatingGamepadTextInput((EFloatingGamepadTextInputMode)eKeyboardMode, (int)nTextFieldXPosition, (int)nTextFieldYPosition, (int)nTextFieldWidth, (int)nTextFieldHeight);
|
||||
}
|
||||
|
||||
void cppISteamUtils_SteamUtils010_SetGameLauncherMode(void *linux_side, bool bLauncherMode)
|
||||
{
|
||||
((ISteamUtils*)linux_side)->SetGameLauncherMode((bool)bLauncherMode);
|
||||
}
|
||||
|
||||
bool cppISteamUtils_SteamUtils010_DismissFloatingGamepadTextInput(void *linux_side)
|
||||
{
|
||||
return ((ISteamUtils*)linux_side)->DismissFloatingGamepadTextInput();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -32,3 +32,7 @@ extern bool cppISteamUtils_SteamUtils010_IsSteamChinaLauncher(void *);
|
||||
extern bool cppISteamUtils_SteamUtils010_InitFilterText(void *, uint32);
|
||||
extern int cppISteamUtils_SteamUtils010_FilterText(void *, ETextFilteringContext, CSteamID, const char *, char *, uint32);
|
||||
extern ESteamIPv6ConnectivityState cppISteamUtils_SteamUtils010_GetIPv6ConnectivityState(void *, ESteamIPv6ConnectivityProtocol);
|
||||
extern bool cppISteamUtils_SteamUtils010_IsSteamRunningOnSteamDeck(void *);
|
||||
extern bool cppISteamUtils_SteamUtils010_ShowFloatingGamepadTextInput(void *, EFloatingGamepadTextInputMode, int, int, int, int);
|
||||
extern void cppISteamUtils_SteamUtils010_SetGameLauncherMode(void *, bool);
|
||||
extern bool cppISteamUtils_SteamUtils010_DismissFloatingGamepadTextInput(void *);
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#include "steamworks_sdk_151/steamnetworkingtypes.h"
|
||||
#include "steamworks_sdk_153_preview/steam_api.h"
|
||||
#include "steamworks_sdk_153_preview/steamnetworkingtypes.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define SDKVER_151
|
||||
#define SDKVER_153_preview
|
||||
#include "struct_converters.h"
|
||||
#include "cppISteamVideo_STEAMVIDEO_INTERFACE_V002.h"
|
||||
void cppISteamVideo_STEAMVIDEO_INTERFACE_V002_GetVideoURL(void *linux_side, AppId_t unVideoAppID)
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
CLANG_PATH='/usr/lib/clang/11.1.0'
|
||||
CLANG_PATH='/usr/lib/clang/12.0.1'
|
||||
|
||||
import pprint
|
||||
import sys
|
||||
@ -15,6 +15,8 @@ import re
|
||||
import math
|
||||
|
||||
sdk_versions = [
|
||||
"153_preview",
|
||||
"152",
|
||||
"151",
|
||||
"150",
|
||||
"149",
|
||||
@ -218,6 +220,35 @@ manually_handled_methods = {
|
||||
"cppISteamNetworkingMessages_SteamNetworkingMessages002": [
|
||||
"ReceiveMessagesOnChannel"
|
||||
],
|
||||
"cppISteamInput_SteamInput001": [
|
||||
"GetGlyphForActionOrigin",
|
||||
"GetGlyphForXboxOrigin"
|
||||
],
|
||||
"cppISteamInput_SteamInput002": [
|
||||
"GetGlyphForActionOrigin",
|
||||
"GetGlyphForXboxOrigin"
|
||||
],
|
||||
"cppISteamInput_SteamInput005": [
|
||||
"EnableActionEventCallbacks",
|
||||
"GetGlyphPNGForActionOrigin",
|
||||
"GetGlyphSVGForActionOrigin",
|
||||
"GetGlyphForActionOrigin_Legacy",
|
||||
"GetGlyphForXboxOrigin"
|
||||
],
|
||||
"cppISteamController_SteamController005": [
|
||||
"GetGlyphForActionOrigin"
|
||||
],
|
||||
"cppISteamController_SteamController006": [
|
||||
"GetGlyphForActionOrigin"
|
||||
],
|
||||
"cppISteamController_SteamController007": [
|
||||
"GetGlyphForActionOrigin",
|
||||
"GetGlyphForXboxOrigin"
|
||||
],
|
||||
"cppISteamController_SteamController008": [
|
||||
"GetGlyphForActionOrigin",
|
||||
"GetGlyphForXboxOrigin"
|
||||
],
|
||||
}
|
||||
|
||||
# manual converters for simple types (function pointers)
|
||||
@ -284,16 +315,6 @@ path_conversions = [
|
||||
"w2l_urls": [False],
|
||||
"return_is_size": True
|
||||
},
|
||||
{
|
||||
"parent_name": "GetGlyphForActionOrigin",
|
||||
"l2w_names": [None], #return value
|
||||
"l2w_lens": [None],
|
||||
"l2w_urls": [None],
|
||||
"w2l_names": [],
|
||||
"w2l_arrays": [],
|
||||
"w2l_urls": [],
|
||||
"return_is_size": False
|
||||
},
|
||||
### ISteamGameServer::SetModDir - "Just the folder name, not the whole path. I.e. "Spacewar"."
|
||||
{
|
||||
"parent_name": "LoadURL",
|
||||
@ -554,7 +575,17 @@ path_conversions = [
|
||||
"w2l_arrays": [False],
|
||||
"w2l_urls": [False],
|
||||
"return_is_size": False
|
||||
}
|
||||
},
|
||||
{
|
||||
"parent_name": "SetInputActionManifestFilePath",
|
||||
"l2w_names": [],
|
||||
"l2w_lens": [],
|
||||
"l2w_urls": [],
|
||||
"w2l_names": ["pchInputActionManifestAbsolutePath"],
|
||||
"w2l_arrays": [False],
|
||||
"w2l_urls": [False],
|
||||
"return_is_size": False
|
||||
},
|
||||
]
|
||||
|
||||
def strip_const(typename):
|
||||
@ -586,6 +617,8 @@ def struct_needs_conversion_nocache(struct):
|
||||
|
||||
#check 32-bit compat
|
||||
windows_struct = find_windows_struct(struct)
|
||||
if windows_struct is None:
|
||||
print("Couldn't find windows struct for " + struct.spelling)
|
||||
assert(not windows_struct is None) #must find windows_struct
|
||||
for field in struct.get_fields():
|
||||
if struct.get_offset(field.spelling) != windows_struct.get_offset(field.spelling):
|
||||
@ -836,15 +869,10 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
|
||||
cfile.write(" return _r;\n")
|
||||
if path_conv and len(path_conv["l2w_names"]) > 0:
|
||||
for i in range(len(path_conv["l2w_names"])):
|
||||
if path_conv["l2w_names"][i]:
|
||||
cfile.write(" ")
|
||||
if path_conv["return_is_size"]:
|
||||
cfile.write("path_result = ")
|
||||
cfile.write("steamclient_unix_path_to_dos_path(path_result, %s, %s, %s, %s);\n" % (path_conv["l2w_names"][i], path_conv["l2w_names"][i], path_conv["l2w_lens"][i], to_c_bool(path_conv["l2w_urls"][i])))
|
||||
else:
|
||||
#string is in return value
|
||||
#ISteamController::GetGlyphForActionOrigin is the only user here for now
|
||||
cfile.write(" path_result = steamclient_isteamcontroller_getglyph(eOrigin, path_result);\n")
|
||||
cfile.write(" ")
|
||||
if path_conv["return_is_size"]:
|
||||
cfile.write("path_result = ")
|
||||
cfile.write("steamclient_unix_path_to_dos_path(path_result, %s, %s, %s, %s);\n" % (path_conv["l2w_names"][i], path_conv["l2w_names"][i], path_conv["l2w_lens"][i], to_c_bool(path_conv["l2w_urls"][i])))
|
||||
cfile.write(" return path_result;\n")
|
||||
if path_conv:
|
||||
for i in range(len(path_conv["w2l_names"])):
|
||||
@ -959,7 +987,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
|
||||
cfile.write("}\n")
|
||||
cfile.write("#endif\n\n")
|
||||
cfile.write("%s *create_%s(void *linux_side)\n{\n" % (winclassname, winclassname))
|
||||
cfile.write(" %s *r = HeapAlloc(GetProcessHeap(), 0, sizeof(%s));\n" % (winclassname, winclassname))
|
||||
cfile.write(" %s *r = alloc_mem_for_iface(sizeof(%s), \"%s\");\n" % (winclassname, winclassname, iface_version))
|
||||
cfile.write(" TRACE(\"-> %p\\n\", r);\n")
|
||||
cfile.write(" r->vtable = &%s_vtable;\n" % winclassname)
|
||||
cfile.write(" r->linux_side = linux_side;\n")
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
typedef uint32_t EHTMLMouseButton, EHTMLKeyModifiers;
|
||||
#define nullptr (void*)0
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef bool
|
||||
@ -99,7 +98,12 @@ typedef uint32_t EUserUGCList,
|
||||
ESteamIPv6ConnectivityProtocol,
|
||||
EDurationControlOnlineState,
|
||||
ETextFilteringContext,
|
||||
ESteamNetworkingConnectionState
|
||||
ESteamNetworkingConnectionState,
|
||||
EFloatingGamepadTextInputMode,
|
||||
ERemoteStorageLocalFileChange,
|
||||
ERemoteStorageFilePathType,
|
||||
ESteamInputGlyphSize,
|
||||
EControllerHapticLocation
|
||||
;
|
||||
|
||||
/* XXX NO */
|
||||
@ -117,9 +121,7 @@ typedef struct ControllerAnalogActionData_t { unsigned char a[13]; } ControllerA
|
||||
typedef struct ControllerDigitalActionData_t { unsigned char a[2]; } ControllerDigitalActionData_t;
|
||||
typedef struct ControllerMotionData_t { unsigned char a[40]; } ControllerMotionData_t;
|
||||
typedef struct SteamNetworkPingLocation_t { uint8 m_data[ 512 ]; } SteamNetworkPingLocation_t;
|
||||
|
||||
/* XXX GET SIZE */
|
||||
typedef struct SteamIPAddress_t { uint8 m_data[12]; } SteamIPAddress_t;
|
||||
typedef struct SteamIPAddress_t { uint8 m_data[20]; } SteamIPAddress_t;
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
@ -226,6 +228,7 @@ typedef struct SteamRelayNetworkStatus_t SteamRelayNetworkStatus_t;
|
||||
typedef struct SteamIPAddress_t SteamIPAddress_t;
|
||||
typedef struct SteamNetworkingConfigValue_t SteamNetworkingConfigValue_t;
|
||||
typedef struct SteamNetworkingMessage_t SteamNetworkingMessage_t;
|
||||
typedef struct SteamInputActionEvent_t SteamInputActionEvent_t;
|
||||
|
||||
typedef uint32 (*SteamAPI_CheckCallbackRegistered_t)(int cb);
|
||||
typedef void *SteamAPIWarningMessageHook_t; //already cdecl, no need for conversion(?)
|
||||
@ -291,6 +294,8 @@ typedef uint32 SteamNetworkingPOPID;
|
||||
typedef uint32 RemotePlaySessionID_t;
|
||||
typedef char* SteamNetworkingErrMsg;
|
||||
|
||||
typedef void (*SteamInputActionEventCallbackPointer)(SteamInputActionEvent_t *);
|
||||
|
||||
#pragma pack( push, 4 )
|
||||
typedef struct CallbackMsg_t
|
||||
{
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "winuser.h"
|
||||
#include "winternl.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/list.h"
|
||||
#include "steam_defs.h"
|
||||
@ -25,8 +26,6 @@ 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 };
|
||||
static HANDLE steam_overlay_event;
|
||||
|
||||
@ -234,17 +233,142 @@ void steamclient_free_stringlist(const char **out)
|
||||
}
|
||||
}
|
||||
|
||||
const char *steamclient_isteamcontroller_getglyph(int origin, const char *lin_path)
|
||||
static BYTE *alloc_start, *alloc_end;
|
||||
|
||||
static BOOL allocated_from_steamclient_dll( void *ptr )
|
||||
{
|
||||
if(!lin_path)
|
||||
return (BYTE *)ptr >= alloc_start && (BYTE *)ptr < alloc_end;
|
||||
}
|
||||
|
||||
static void *get_mem_from_steamclient_dll(size_t size, unsigned int version)
|
||||
{
|
||||
static BYTE * const error_ptr = (BYTE *)~(ULONG_PTR)0;
|
||||
static const unsigned int magic = 0x53ba947a;
|
||||
static struct
|
||||
{
|
||||
unsigned int version;
|
||||
size_t size;
|
||||
void *ptr;
|
||||
}
|
||||
allocated[32];
|
||||
static unsigned int allocated_count;
|
||||
static BYTE *alloc_base;
|
||||
unsigned int i;
|
||||
|
||||
if (alloc_base == error_ptr)
|
||||
{
|
||||
/* Previously failed to locate the section. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!controller_glyphs[origin])
|
||||
controller_glyphs[origin] = HeapAlloc(GetProcessHeap(), 0, PATH_MAX);
|
||||
if (alloc_base && (IsBadReadPtr(alloc_start, sizeof(magic)) || *(unsigned int *)alloc_start != magic))
|
||||
{
|
||||
TRACE("steamclient.dll reloaded.\n");
|
||||
alloc_base = alloc_start = alloc_end = NULL;
|
||||
allocated_count = 0;
|
||||
}
|
||||
|
||||
steamclient_unix_path_to_dos_path(1, lin_path, controller_glyphs[origin], PATH_MAX, 0);
|
||||
for (i = 0; i < allocated_count; ++i)
|
||||
{
|
||||
if (allocated[i].version == version)
|
||||
{
|
||||
if (allocated[i].size != size)
|
||||
{
|
||||
FIXME("Size does not match.\n");
|
||||
return NULL;
|
||||
}
|
||||
return allocated[i].ptr;
|
||||
}
|
||||
}
|
||||
|
||||
return controller_glyphs[origin];
|
||||
if (allocated_count == ARRAY_SIZE(allocated))
|
||||
{
|
||||
FIXME("Too many interface versions.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!alloc_base)
|
||||
{
|
||||
const IMAGE_SECTION_HEADER *sec;
|
||||
const IMAGE_NT_HEADERS *nt;
|
||||
HMODULE mod;
|
||||
|
||||
if (!(mod = GetModuleHandleW(L"steamclient.dll")))
|
||||
{
|
||||
/* That is steamclient64.dll for x64 but no known use cases on x64.*/
|
||||
WARN("Module not found, err %u.\n", GetLastError());
|
||||
alloc_base = error_ptr;
|
||||
return NULL;
|
||||
}
|
||||
if (!(nt = RtlImageNtHeader(mod)))
|
||||
{
|
||||
FIXME("Got NULL NT image headers.\n");
|
||||
alloc_base = error_ptr;
|
||||
return NULL;
|
||||
}
|
||||
sec = (const IMAGE_SECTION_HEADER *)((const BYTE *)&nt->OptionalHeader + nt->FileHeader.SizeOfOptionalHeader);
|
||||
for (i = 0; i < nt->FileHeader.NumberOfSections; i++)
|
||||
{
|
||||
if (!memcmp(sec[i].Name, ".data", 5))
|
||||
{
|
||||
alloc_start = alloc_base = (BYTE *)mod + sec[i].VirtualAddress;
|
||||
alloc_end = alloc_base + sec[i].SizeOfRawData;
|
||||
if (alloc_end - alloc_start < sizeof(magic))
|
||||
{
|
||||
ERR(".data section is too small.\n");
|
||||
alloc_base = error_ptr;
|
||||
return NULL;
|
||||
}
|
||||
TRACE("Found .data section, start %p, end %p.\n", alloc_base, alloc_end);
|
||||
*(unsigned int *)alloc_base = magic;
|
||||
alloc_base += sizeof(unsigned int);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == nt->FileHeader.NumberOfSections)
|
||||
{
|
||||
FIXME(".data section not found.\n");
|
||||
alloc_base = error_ptr;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (alloc_end - alloc_base < size)
|
||||
{
|
||||
FIXME("Not enough section size left.\n");
|
||||
return NULL;
|
||||
}
|
||||
allocated[allocated_count].version = version;
|
||||
allocated[allocated_count].size = size;
|
||||
allocated[allocated_count].ptr = alloc_base;
|
||||
alloc_base += size;
|
||||
|
||||
return allocated[allocated_count++].ptr;
|
||||
}
|
||||
|
||||
void *alloc_mem_for_iface(size_t size, const char *iface_version)
|
||||
{
|
||||
const char steamclient_iface_name[] = "SteamClient";
|
||||
unsigned int version;
|
||||
void *ret;
|
||||
|
||||
/* Mafia II depends on SteamClient interface pointer to point inside
|
||||
* native Windows steamclient.dll. */
|
||||
if (strncmp(iface_version, steamclient_iface_name, ARRAY_SIZE(steamclient_iface_name) - 1))
|
||||
goto fallback;
|
||||
|
||||
version = atoi(iface_version + ARRAY_SIZE(steamclient_iface_name) - 1);
|
||||
if (!version)
|
||||
{
|
||||
FIXME("Could not get iface version from %s.\n", iface_version);
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
if ((ret = get_mem_from_steamclient_dll(size, version)))
|
||||
return ret;
|
||||
|
||||
fallback:
|
||||
return HeapAlloc(GetProcessHeap(), 0, size);
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
@ -432,13 +556,16 @@ void *create_win_interface(const char *name, void *linux_side)
|
||||
{
|
||||
if (!strcmp(name, constructors[i].iface_version))
|
||||
{
|
||||
ret = constructors[i].ctor(linux_side);
|
||||
if (allocated_from_steamclient_dll(ret))
|
||||
break;
|
||||
|
||||
e = HeapAlloc(GetProcessHeap(), 0, sizeof(*e));
|
||||
e->name = constructors[i].iface_version;
|
||||
e->linux_side = linux_side;
|
||||
e->interface = constructors[i].ctor(linux_side);
|
||||
e->interface = ret;
|
||||
list_add_tail(&steamclient_interfaces, &e->entry);
|
||||
|
||||
ret = e->interface;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
27
lsteamclient/steamclient_manual_141.cpp
Normal file
27
lsteamclient/steamclient_manual_141.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
extern "C" {
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
|
||||
}
|
||||
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_141/steam_api.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
const char * cppISteamController_SteamController005_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
return steamclient_isteamcontroller_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
}
|
27
lsteamclient/steamclient_manual_142.cpp
Normal file
27
lsteamclient/steamclient_manual_142.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
extern "C" {
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
|
||||
}
|
||||
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_142/steam_api.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
const char * cppISteamController_SteamController006_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
return steamclient_isteamcontroller_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
}
|
@ -362,4 +362,32 @@ bool cppISteamNetworkingUtils_SteamNetworkingUtils003_SetConfigValue(void *linux
|
||||
}
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput001_GetGlyphForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput001_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph_xbox(eOrigin, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController007_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
return steamclient_isteamcontroller_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController007_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamController*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph_xbox(eOrigin, path_result);
|
||||
}
|
||||
|
||||
}
|
||||
|
37
lsteamclient/steamclient_manual_151.cpp
Normal file
37
lsteamclient/steamclient_manual_151.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
extern "C" {
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
|
||||
}
|
||||
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_151/steam_api.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
|
||||
extern "C" {
|
||||
#define SDKVER_151
|
||||
#include "struct_converters.h"
|
||||
#include "cb_converters.h"
|
||||
|
||||
const char * cppISteamInput_SteamInput002_GetGlyphForActionOrigin(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphForActionOrigin((EInputActionOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput002_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph_xbox(eOrigin, path_result);
|
||||
}
|
||||
|
||||
}
|
180
lsteamclient/steamclient_manual_152.cpp
Normal file
180
lsteamclient/steamclient_manual_152.cpp
Normal file
@ -0,0 +1,180 @@
|
||||
extern "C" {
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
|
||||
}
|
||||
|
||||
#include "steam_defs.h"
|
||||
#pragma push_macro("__cdecl")
|
||||
#undef __cdecl
|
||||
#include "steamworks_sdk_152/steam_api.h"
|
||||
#include "steamworks_sdk_152/isteaminput.h"
|
||||
#pragma pop_macro("__cdecl")
|
||||
#include "steamclient_private.h"
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
extern "C" {
|
||||
#define SDKVER_152
|
||||
#include "struct_converters.h"
|
||||
#include "cb_converters.h"
|
||||
|
||||
/***** manual fn wrapper for ISteamInput::EnableActionEventCallbacks *****/
|
||||
typedef void (*CDECL win_SteamInputActionEventCallbackPointer)(SteamInputActionEvent_t *);
|
||||
win_SteamInputActionEventCallbackPointer win_EnableActionEventCallbacks;
|
||||
|
||||
void lin_SteamInputActionEventCallbackPointer(SteamInputActionEvent_t *dat)
|
||||
{
|
||||
win_SteamInputActionEventCallbackPointer fn = win_EnableActionEventCallbacks;
|
||||
if(fn)
|
||||
fn(dat);
|
||||
}
|
||||
|
||||
void cppISteamInput_SteamInput005_EnableActionEventCallbacks(void *linux_side, win_SteamInputActionEventCallbackPointer pCallback)
|
||||
{
|
||||
win_EnableActionEventCallbacks = pCallback;
|
||||
((ISteamInput*)linux_side)->EnableActionEventCallbacks(pCallback ? &lin_SteamInputActionEventCallbackPointer : NULL);
|
||||
}
|
||||
|
||||
/***** convert and cache ISteamInput glyph paths *****/
|
||||
static const size_t ESteamInputGlyphSize_count = 3;
|
||||
static std::unordered_map<int /*EInputActionOrigin*/, char *> cached_input_glyphs;
|
||||
static std::unordered_map<int /*EInputActionOrigin*/, char *> cached_input_glyphs_xbox;
|
||||
static std::unordered_map<int /*flags*/, std::unordered_map<int /*EInputActionOrigin*/, char *> > cached_input_glyphs_svg;
|
||||
static std::unordered_map<int /*flags*/, std::unordered_map<int /*EInputActionOrigin*/, char *> > cached_input_glyphs_png[ESteamInputGlyphSize_count];
|
||||
|
||||
static const char *steamclient_isteaminput_getglyph_png(int origin, int flags, int size, const char *lin_path)
|
||||
{
|
||||
if(!lin_path)
|
||||
return NULL;
|
||||
|
||||
if(size >= ESteamInputGlyphSize_count){
|
||||
ERR("invalid glyph size: %u\n", size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(cached_input_glyphs_png[size][flags].find(origin) == cached_input_glyphs_png[size][flags].end()){
|
||||
char *dos_path = (char *)HeapAlloc(GetProcessHeap(), 0, PATH_MAX);
|
||||
|
||||
steamclient_unix_path_to_dos_path(1, lin_path, dos_path, PATH_MAX, 0);
|
||||
|
||||
cached_input_glyphs_png[size][flags][origin] = dos_path;
|
||||
}
|
||||
|
||||
return cached_input_glyphs_png[size][flags][origin];
|
||||
}
|
||||
|
||||
static const char *steamclient_isteaminput_getglyph_svg(int origin, int flags, const char *lin_path)
|
||||
{
|
||||
if(!lin_path)
|
||||
return NULL;
|
||||
|
||||
if(cached_input_glyphs_svg[flags].find(origin) == cached_input_glyphs_svg[flags].end()){
|
||||
char *dos_path = (char *)HeapAlloc(GetProcessHeap(), 0, PATH_MAX);
|
||||
|
||||
steamclient_unix_path_to_dos_path(1, lin_path, dos_path, PATH_MAX, 0);
|
||||
|
||||
cached_input_glyphs_svg[flags][origin] = dos_path;
|
||||
}
|
||||
|
||||
return cached_input_glyphs_svg[flags][origin];
|
||||
}
|
||||
|
||||
const char *steamclient_isteaminput_getglyph(int origin, const char *lin_path)
|
||||
{
|
||||
if(!lin_path)
|
||||
return NULL;
|
||||
|
||||
if(cached_input_glyphs.find(origin) == cached_input_glyphs.end()){
|
||||
char *dos_path = (char *)HeapAlloc(GetProcessHeap(), 0, PATH_MAX);
|
||||
|
||||
steamclient_unix_path_to_dos_path(1, lin_path, dos_path, PATH_MAX, 0);
|
||||
|
||||
cached_input_glyphs[origin] = dos_path;
|
||||
}
|
||||
|
||||
return cached_input_glyphs[origin];
|
||||
}
|
||||
|
||||
const char *steamclient_isteaminput_getglyph_xbox(int origin, const char *lin_path)
|
||||
{
|
||||
if(!lin_path)
|
||||
return NULL;
|
||||
|
||||
if(cached_input_glyphs_xbox.find(origin) == cached_input_glyphs_xbox.end()){
|
||||
char *dos_path = (char *)HeapAlloc(GetProcessHeap(), 0, PATH_MAX);
|
||||
|
||||
steamclient_unix_path_to_dos_path(1, lin_path, dos_path, PATH_MAX, 0);
|
||||
|
||||
cached_input_glyphs_xbox[origin] = dos_path;
|
||||
}
|
||||
|
||||
return cached_input_glyphs_xbox[origin];
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetGlyphPNGForActionOrigin(void *linux_side, EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphPNGForActionOrigin((EInputActionOrigin)eOrigin, eSize, unFlags);
|
||||
return steamclient_isteaminput_getglyph_png(eOrigin, eSize, unFlags, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetGlyphSVGForActionOrigin(void *linux_side, EInputActionOrigin eOrigin, uint32 unFlags)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphSVGForActionOrigin((EInputActionOrigin)eOrigin, unFlags);
|
||||
return steamclient_isteaminput_getglyph_svg(eOrigin, unFlags, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetGlyphForActionOrigin_Legacy(void *linux_side, EInputActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphForActionOrigin_Legacy((EInputActionOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamInput_SteamInput005_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamInput*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph_xbox(eOrigin, path_result);
|
||||
}
|
||||
|
||||
/***** convert and cache ISteamController glyph paths *****/
|
||||
static std::unordered_map<int /*EControllerActionOrigin*/, char *> cached_controller_glyphs;
|
||||
|
||||
const char *steamclient_isteamcontroller_getglyph(int origin, const char *lin_path)
|
||||
{
|
||||
if(!lin_path)
|
||||
return NULL;
|
||||
|
||||
if(cached_controller_glyphs.find(origin) == cached_controller_glyphs.end()){
|
||||
char *dos_path = (char *)HeapAlloc(GetProcessHeap(), 0, PATH_MAX);
|
||||
|
||||
steamclient_unix_path_to_dos_path(1, lin_path, dos_path, PATH_MAX, 0);
|
||||
|
||||
cached_controller_glyphs[origin] = dos_path;
|
||||
}
|
||||
|
||||
return cached_controller_glyphs[origin];
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController008_GetGlyphForActionOrigin(void *linux_side, EControllerActionOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamController*)linux_side)->GetGlyphForActionOrigin((EControllerActionOrigin)eOrigin);
|
||||
return steamclient_isteamcontroller_getglyph(eOrigin, path_result);
|
||||
}
|
||||
|
||||
const char * cppISteamController_SteamController008_GetGlyphForXboxOrigin(void *linux_side, EXboxOrigin eOrigin)
|
||||
{
|
||||
const char *path_result;
|
||||
path_result = ((ISteamController*)linux_side)->GetGlyphForXboxOrigin((EXboxOrigin)eOrigin);
|
||||
return steamclient_isteaminput_getglyph_xbox(eOrigin, path_result);
|
||||
}
|
||||
|
||||
}
|
@ -43,6 +43,8 @@ bool steamclient_dos_path_to_unix_path(const char *src, char *dst, int is_url);
|
||||
const char **steamclient_dos_to_unix_stringlist(const char **src);
|
||||
void steamclient_free_stringlist(const char **out);
|
||||
const char *steamclient_isteamcontroller_getglyph(int origin, const char *lin_path);
|
||||
const char *steamclient_isteaminput_getglyph(int origin, const char *lin_path);
|
||||
const char *steamclient_isteaminput_getglyph_xbox(int origin, const char *lin_path);
|
||||
uint32 manual_convert_nNativeKeyCode(uint32 win_vk);
|
||||
void *create_LinuxISteamMatchmakingServerListResponse(void *win, const char *version);
|
||||
void *create_LinuxISteamMatchmakingPingResponse(void *win, const char *version);
|
||||
@ -56,6 +58,8 @@ extern char g_tmppath[PATH_MAX];
|
||||
typedef uint64 SteamAPICall_t; //for ancient SDKs
|
||||
bool do_cb_wrap(HSteamPipe pipe, void *linux_side, bool (*cpp_func)(void *, SteamAPICall_t, void *, int, int, bool *), SteamAPICall_t call, void *callback, int callback_len, int cb_expected, bool *failed);
|
||||
|
||||
void *alloc_mem_for_iface(size_t size, const char *iface_version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -200,7 +200,7 @@ struct SteamIPAddress_t
|
||||
|
||||
// Internal use only
|
||||
uint64 m_ipv6Qword[2]; // big endian
|
||||
};
|
||||
} x;
|
||||
|
||||
ESteamIPType m_eType;
|
||||
|
||||
|
@ -201,7 +201,7 @@ struct SteamIPAddress_t
|
||||
|
||||
// Internal use only
|
||||
uint64 m_ipv6Qword[2]; // big endian
|
||||
};
|
||||
} x;
|
||||
|
||||
ESteamIPType m_eType;
|
||||
|
||||
|
@ -201,7 +201,7 @@ struct SteamIPAddress_t
|
||||
|
||||
// Internal use only
|
||||
uint64 m_ipv6Qword[2]; // big endian
|
||||
};
|
||||
} x;
|
||||
|
||||
ESteamIPType m_eType;
|
||||
|
||||
|
@ -201,7 +201,7 @@ struct SteamIPAddress_t
|
||||
|
||||
// Internal use only
|
||||
uint64 m_ipv6Qword[2]; // big endian
|
||||
};
|
||||
} x;
|
||||
|
||||
ESteamIPType m_eType;
|
||||
|
||||
|
@ -201,7 +201,7 @@ struct SteamIPAddress_t
|
||||
|
||||
// Internal use only
|
||||
uint64 m_ipv6Qword[2]; // big endian
|
||||
};
|
||||
} x;
|
||||
|
||||
ESteamIPType m_eType;
|
||||
|
||||
|
68
lsteamclient/steamworks_sdk_152/isteamapplist.h
Normal file
68
lsteamclient/steamworks_sdk_152/isteamapplist.h
Normal file
@ -0,0 +1,68 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to app data in Steam
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMAPPLIST_H
|
||||
#define ISTEAMAPPLIST_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: This is a restricted interface that can only be used by previously approved apps,
|
||||
// contact your Steam Account Manager if you believe you need access to this API.
|
||||
// This interface lets you detect installed apps for the local Steam client, useful for debugging tools
|
||||
// to offer lists of apps to debug via Steam.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamAppList
|
||||
{
|
||||
public:
|
||||
virtual uint32 GetNumInstalledApps() = 0;
|
||||
virtual uint32 GetInstalledApps( AppId_t *pvecAppID, uint32 unMaxAppIDs ) = 0;
|
||||
|
||||
virtual int GetAppName( AppId_t nAppID, STEAM_OUT_STRING() char *pchName, int cchNameMax ) = 0; // returns -1 if no name was found
|
||||
virtual int GetAppInstallDir( AppId_t nAppID, char *pchDirectory, int cchNameMax ) = 0; // returns -1 if no dir was found
|
||||
|
||||
virtual int GetAppBuildId( AppId_t nAppID ) = 0; // return the buildid of this app, may change at any time based on backend updates to the game
|
||||
};
|
||||
|
||||
#define STEAMAPPLIST_INTERFACE_VERSION "STEAMAPPLIST_INTERFACE_VERSION001"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamAppList *SteamAppList();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIST_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Sent when a new app is installed
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 )
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app is installed
|
||||
STEAM_CALLBACK_END( 2 )
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: Sent when an app is uninstalled
|
||||
//---------------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 )
|
||||
STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs
|
||||
STEAM_CALLBACK_MEMBER( 1, int, m_iInstallFolderIndex ) // library folder the app was installed
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
#endif // ISTEAMAPPLIST_H
|
213
lsteamclient/steamworks_sdk_152/isteamapps.h
Normal file
213
lsteamclient/steamworks_sdk_152/isteamapps.h
Normal file
@ -0,0 +1,213 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to app data in Steam
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMAPPS_H
|
||||
#define ISTEAMAPPS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
const int k_cubAppProofOfPurchaseKeyMax = 240; // max supported length of a legacy cd key
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to app data
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamApps
|
||||
{
|
||||
public:
|
||||
virtual bool BIsSubscribed() = 0;
|
||||
virtual bool BIsLowViolence() = 0;
|
||||
virtual bool BIsCybercafe() = 0;
|
||||
virtual bool BIsVACBanned() = 0;
|
||||
virtual const char *GetCurrentGameLanguage() = 0;
|
||||
virtual const char *GetAvailableGameLanguages() = 0;
|
||||
|
||||
// only use this member if you need to check ownership of another game related to yours, a demo for example
|
||||
virtual bool BIsSubscribedApp( AppId_t appID ) = 0;
|
||||
|
||||
// Takes AppID of DLC and checks if the user owns the DLC & if the DLC is installed
|
||||
virtual bool BIsDlcInstalled( AppId_t appID ) = 0;
|
||||
|
||||
// returns the Unix time of the purchase of the app
|
||||
virtual uint32 GetEarliestPurchaseUnixTime( AppId_t nAppID ) = 0;
|
||||
|
||||
// Checks if the user is subscribed to the current app through a free weekend
|
||||
// This function will return false for users who have a retail or other type of license
|
||||
// Before using, please ask your Valve technical contact how to package and secure your free weekened
|
||||
virtual bool BIsSubscribedFromFreeWeekend() = 0;
|
||||
|
||||
// Returns the number of DLC pieces for the running app
|
||||
virtual int GetDLCCount() = 0;
|
||||
|
||||
// Returns metadata for DLC by index, of range [0, GetDLCCount()]
|
||||
virtual bool BGetDLCDataByIndex( int iDLC, AppId_t *pAppID, bool *pbAvailable, char *pchName, int cchNameBufferSize ) = 0;
|
||||
|
||||
// Install/Uninstall control for optional DLC
|
||||
virtual void InstallDLC( AppId_t nAppID ) = 0;
|
||||
virtual void UninstallDLC( AppId_t nAppID ) = 0;
|
||||
|
||||
// Request legacy cd-key for yourself or owned DLC. If you are interested in this
|
||||
// data then make sure you provide us with a list of valid keys to be distributed
|
||||
// to users when they purchase the game, before the game ships.
|
||||
// You'll receive an AppProofOfPurchaseKeyResponse_t callback when
|
||||
// the key is available (which may be immediately).
|
||||
virtual void RequestAppProofOfPurchaseKey( AppId_t nAppID ) = 0;
|
||||
|
||||
virtual bool GetCurrentBetaName( char *pchName, int cchNameBufferSize ) = 0; // returns current beta branch name, 'public' is the default branch
|
||||
virtual bool MarkContentCorrupt( bool bMissingFilesOnly ) = 0; // signal Steam that game files seems corrupt or missing
|
||||
virtual uint32 GetInstalledDepots( AppId_t appID, DepotId_t *pvecDepots, uint32 cMaxDepots ) = 0; // return installed depots in mount order
|
||||
|
||||
// returns current app install folder for AppID, returns folder name length
|
||||
virtual uint32 GetAppInstallDir( AppId_t appID, char *pchFolder, uint32 cchFolderBufferSize ) = 0;
|
||||
virtual bool BIsAppInstalled( AppId_t appID ) = 0; // returns true if that app is installed (not necessarily owned)
|
||||
|
||||
// returns the SteamID of the original owner. If this CSteamID is different from ISteamUser::GetSteamID(),
|
||||
// the user has a temporary license borrowed via Family Sharing
|
||||
virtual CSteamID GetAppOwner() = 0;
|
||||
|
||||
// Returns the associated launch param if the game is run via steam://run/<appid>//?param1=value1¶m2=value2¶m3=value3 etc.
|
||||
// Parameter names starting with the character '@' are reserved for internal use and will always return and empty string.
|
||||
// Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
|
||||
// but it is advised that you not param names beginning with an underscore for your own features.
|
||||
// Check for new launch parameters on callback NewUrlLaunchParameters_t
|
||||
virtual const char *GetLaunchQueryParam( const char *pchKey ) = 0;
|
||||
|
||||
// get download progress for optional DLC
|
||||
virtual bool GetDlcDownloadProgress( AppId_t nAppID, uint64 *punBytesDownloaded, uint64 *punBytesTotal ) = 0;
|
||||
|
||||
// return the buildid of this app, may change at any time based on backend updates to the game
|
||||
virtual int GetAppBuildId() = 0;
|
||||
|
||||
// Request all proof of purchase keys for the calling appid and asociated DLC.
|
||||
// A series of AppProofOfPurchaseKeyResponse_t callbacks will be sent with
|
||||
// appropriate appid values, ending with a final callback where the m_nAppId
|
||||
// member is k_uAppIdInvalid (zero).
|
||||
virtual void RequestAllProofOfPurchaseKeys() = 0;
|
||||
|
||||
STEAM_CALL_RESULT( FileDetailsResult_t )
|
||||
virtual SteamAPICall_t GetFileDetails( const char* pszFileName ) = 0;
|
||||
|
||||
// Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/.
|
||||
// This method of passing a connect string (used when joining via rich presence, accepting an
|
||||
// invite, etc) is preferable to passing the connect string on the operating system command
|
||||
// line, which is a security risk. In order for rich presence joins to go through this
|
||||
// path and not be placed on the OS command line, you must set a value in your app's
|
||||
// configuration on Steam. Ask Valve for help with this.
|
||||
//
|
||||
// If game was already running and launched again, the NewUrlLaunchParameters_t will be fired.
|
||||
virtual int GetLaunchCommandLine( char *pszCommandLine, int cubCommandLine ) = 0;
|
||||
|
||||
// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
||||
virtual bool BIsSubscribedFromFamilySharing() = 0;
|
||||
|
||||
// check if game is a timed trial with limited playtime
|
||||
virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamApps *SteamApps();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamApps *, SteamApps, STEAMAPPS_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains ownership of DLC & that DLC is installed
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DlcInstalled_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 5 };
|
||||
AppId_t m_nAppID; // AppID of the DLC
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: possible results when registering an activation code
|
||||
//-----------------------------------------------------------------------------
|
||||
enum ERegisterActivationCodeResult
|
||||
{
|
||||
k_ERegisterActivationCodeResultOK = 0,
|
||||
k_ERegisterActivationCodeResultFail = 1,
|
||||
k_ERegisterActivationCodeResultAlreadyRegistered = 2,
|
||||
k_ERegisterActivationCodeResultTimeout = 3,
|
||||
k_ERegisterActivationCodeAlreadyOwned = 4,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RegisterActivationCode()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct RegisterActivationCodeResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 8 };
|
||||
ERegisterActivationCodeResult m_eResult;
|
||||
uint32 m_unPackageRegistered; // package that was registered. Only set on success
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
// Purpose: posted after the user gains executes a Steam URL with command line or query parameters
|
||||
// such as steam://run/<appid>//-commandline/?param1=value1¶m2=value2¶m3=value3 etc
|
||||
// while the game is already running. The new params can be queried
|
||||
// with GetLaunchQueryParam and GetLaunchCommandLine
|
||||
//---------------------------------------------------------------------------------
|
||||
struct NewUrlLaunchParameters_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 14 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys
|
||||
// for supporting third-party CD keys, or other proof-of-purchase systems.
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AppProofOfPurchaseKeyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 21 };
|
||||
EResult m_eResult;
|
||||
uint32 m_nAppID;
|
||||
uint32 m_cchKeyLength;
|
||||
char m_rgchKey[k_cubAppProofOfPurchaseKeyMax];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetFileDetails
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FileDetailsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 23 };
|
||||
EResult m_eResult;
|
||||
uint64 m_ulFileSize; // original file size in bytes
|
||||
uint8 m_FileSHA[20]; // original file SHA1 hash
|
||||
uint32 m_unFlags; //
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called for games in Timed Trial mode
|
||||
//-----------------------------------------------------------------------------
|
||||
struct TimedTrialStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 30 };
|
||||
AppId_t m_unAppID; // appID
|
||||
bool m_bIsOffline; // if true, time allowed / played refers to offline time, not total time
|
||||
uint32 m_unSecondsAllowed; // how many seconds the app can be played in total
|
||||
uint32 m_unSecondsPlayed; // how many seconds the app was already played
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
#endif // ISTEAMAPPS_H
|
28
lsteamclient/steamworks_sdk_152/isteamappticket.h
Normal file
28
lsteamclient/steamworks_sdk_152/isteamappticket.h
Normal file
@ -0,0 +1,28 @@
|
||||
//====== Copyright 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: a private, but well versioned, interface to get at critical bits
|
||||
// of a steam3 appticket - consumed by the simple drm wrapper to let it
|
||||
// ask about ownership with greater confidence.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMAPPTICKET_H
|
||||
#define ISTEAMAPPTICKET_H
|
||||
#include "steamtypes.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: hand out a reasonable "future proof" view of an app ownership ticket
|
||||
// the raw (signed) buffer, and indices into that buffer where the appid and
|
||||
// steamid are located. the sizes of the appid and steamid are implicit in
|
||||
// (each version of) the interface - currently uin32 appid and uint64 steamid
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamAppTicket
|
||||
{
|
||||
public:
|
||||
virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPTICKET_INTERFACE_VERSION "STEAMAPPTICKET_INTERFACE_VERSION001"
|
||||
|
||||
|
||||
#endif // ISTEAMAPPTICKET_H
|
179
lsteamclient/steamworks_sdk_152/isteamclient.h
Normal file
179
lsteamclient/steamworks_sdk_152/isteamclient.h
Normal file
@ -0,0 +1,179 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
//
|
||||
// Internal low-level access to Steamworks interfaces.
|
||||
//
|
||||
// Most users of the Steamworks SDK do not need to include this file.
|
||||
// You should only include this if you are doing something special.
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMCLIENT_H
|
||||
#define ISTEAMCLIENT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface to creating a new steam instance, or to
|
||||
// connect to an existing steam instance, whether it's in a
|
||||
// different process or is local.
|
||||
//
|
||||
// For most scenarios this is all handled automatically via SteamAPI_Init().
|
||||
// You'll only need these APIs if you have a more complex versioning scheme,
|
||||
// or if you want to implement a multiplexed gameserver where a single process
|
||||
// is handling multiple games at once with independent gameserver SteamIDs.
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamClient
|
||||
{
|
||||
public:
|
||||
// Creates a communication pipe to the Steam client.
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual HSteamPipe CreateSteamPipe() = 0;
|
||||
|
||||
// Releases a previously created communications pipe
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0;
|
||||
|
||||
// connects to an existing global user, failing if none exists
|
||||
// used by the game to coordinate with the steamUI
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0;
|
||||
|
||||
// used by game servers, create a steam user that won't be shared with anyone else
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0;
|
||||
|
||||
// removes an allocated user
|
||||
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
|
||||
virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0;
|
||||
|
||||
// retrieves the ISteamUser interface associated with the handle
|
||||
virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// retrieves the ISteamGameServer interface associated with the handle
|
||||
virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// set the local IP and Port to bind to
|
||||
// this must be set before CreateLocalUser()
|
||||
virtual void SetLocalIPBinding( const SteamIPAddress_t *unIP, uint16 usPort ) = 0;
|
||||
|
||||
// returns the ISteamFriends interface
|
||||
virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamUtils interface
|
||||
virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamMatchmaking interface
|
||||
virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamMatchmakingServers interface
|
||||
virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the a generic interface
|
||||
virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamUserStats interface
|
||||
virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns the ISteamGameServerStats interface
|
||||
virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns apps interface
|
||||
virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// networking
|
||||
virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// remote storage
|
||||
virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// user screenshots
|
||||
virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// game search
|
||||
virtual ISteamGameSearch *GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
|
||||
STEAM_PRIVATE_API( virtual void RunFrame() = 0; )
|
||||
|
||||
// returns the number of IPC calls made since the last time this function was called
|
||||
// Used for perf debugging so you can understand how many IPC calls your game makes per frame
|
||||
// Every IPC call is at minimum a thread context switch if not a process one so you want to rate
|
||||
// control how often you do them.
|
||||
virtual uint32 GetIPCCallCount() = 0;
|
||||
|
||||
// API warning handling
|
||||
// 'int' is the severity; 0 for msg, 1 for warning
|
||||
// 'const char *' is the text of the message
|
||||
// callbacks will occur directly after the API function is called that generated the warning or message.
|
||||
virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0;
|
||||
|
||||
// Trigger global shutdown for the DLL
|
||||
virtual bool BShutdownIfAllPipesClosed() = 0;
|
||||
|
||||
// Expose HTTP interface
|
||||
virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
|
||||
STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; )
|
||||
|
||||
// Exposes the ISteamController interface - deprecated in favor of Steam Input
|
||||
virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Exposes the ISteamUGC interface
|
||||
virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// returns app list interface, only available on specially registered apps
|
||||
virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Music Player
|
||||
virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Music Player Remote
|
||||
virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
|
||||
|
||||
// html page display
|
||||
virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
|
||||
|
||||
// Helper functions for internal Steam usage
|
||||
STEAM_PRIVATE_API( virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
|
||||
STEAM_PRIVATE_API( virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
|
||||
STEAM_PRIVATE_API( virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; )
|
||||
|
||||
// inventory
|
||||
virtual ISteamInventory *GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Video
|
||||
virtual ISteamVideo *GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Parental controls
|
||||
virtual ISteamParentalSettings *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Exposes the Steam Input interface for controller support
|
||||
virtual ISteamInput *GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Steam Parties interface
|
||||
virtual ISteamParties *GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
// Steam Remote Play interface
|
||||
virtual ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
|
||||
|
||||
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )
|
||||
|
||||
};
|
||||
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"
|
||||
|
||||
#ifndef STEAM_API_EXPORTS
|
||||
|
||||
// Global ISteamClient interface accessor
|
||||
inline ISteamClient *SteamClient();
|
||||
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamClient *, SteamClient, SteamInternal_CreateInterface( STEAMCLIENT_INTERFACE_VERSION ), "global", STEAMCLIENT_INTERFACE_VERSION );
|
||||
|
||||
// The internal ISteamClient used for the gameserver interface.
|
||||
// (This is actually the same thing. You really shouldn't need to access any of this stuff directly.)
|
||||
inline ISteamClient *SteamGameServerClient() { return SteamClient(); }
|
||||
|
||||
#endif
|
||||
|
||||
#endif // ISTEAMCLIENT_H
|
641
lsteamclient/steamworks_sdk_152/isteamcontroller.h
Normal file
641
lsteamclient/steamworks_sdk_152/isteamcontroller.h
Normal file
@ -0,0 +1,641 @@
|
||||
//====== Copyright 1996-2018, Valve Corporation, All rights reserved. =======
|
||||
// Note: The older ISteamController interface has been deprecated in favor of ISteamInput - this interface
|
||||
// was updated in this SDK but will be removed from future SDK's. The Steam Client will retain
|
||||
// compatibility with the older interfaces so your any existing integrations should be unaffected.
|
||||
//
|
||||
// Purpose: Steam Input is a flexible input API that supports over three hundred devices including all
|
||||
// common variants of Xbox, Playstation, Nintendo Switch Pro, and Steam Controllers.
|
||||
// For more info including a getting started guide for developers
|
||||
// please visit: https://partner.steamgames.com/doc/features/steam_controller
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMCONTROLLER_H
|
||||
#define ISTEAMCONTROLLER_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "isteaminput.h"
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_COUNT 16
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_ANALOG_ACTIONS 16
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_DIGITAL_ACTIONS 128
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_ORIGINS 8
|
||||
|
||||
#define STEAM_CONTROLLER_MAX_ACTIVE_LAYERS 16
|
||||
|
||||
// When sending an option to a specific controller handle, you can send to all controllers via this command
|
||||
#define STEAM_CONTROLLER_HANDLE_ALL_CONTROLLERS UINT64_MAX
|
||||
|
||||
#define STEAM_CONTROLLER_MIN_ANALOG_ACTION_DATA -1.0f
|
||||
#define STEAM_CONTROLLER_MAX_ANALOG_ACTION_DATA 1.0f
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
enum ESteamControllerPad
|
||||
{
|
||||
k_ESteamControllerPad_Left,
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
#endif
|
||||
|
||||
// Note: Please do not use action origins as a way to identify controller types. There is no
|
||||
// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead
|
||||
// Versions of Steam that add new controller types in the future will extend this enum if you're
|
||||
// using a lookup table please check the bounds of any origins returned by Steam.
|
||||
enum EControllerActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EControllerActionOrigin_None,
|
||||
k_EControllerActionOrigin_A,
|
||||
k_EControllerActionOrigin_B,
|
||||
k_EControllerActionOrigin_X,
|
||||
k_EControllerActionOrigin_Y,
|
||||
k_EControllerActionOrigin_LeftBumper,
|
||||
k_EControllerActionOrigin_RightBumper,
|
||||
k_EControllerActionOrigin_LeftGrip,
|
||||
k_EControllerActionOrigin_RightGrip,
|
||||
k_EControllerActionOrigin_Start,
|
||||
k_EControllerActionOrigin_Back,
|
||||
k_EControllerActionOrigin_LeftPad_Touch,
|
||||
k_EControllerActionOrigin_LeftPad_Swipe,
|
||||
k_EControllerActionOrigin_LeftPad_Click,
|
||||
k_EControllerActionOrigin_LeftPad_DPadNorth,
|
||||
k_EControllerActionOrigin_LeftPad_DPadSouth,
|
||||
k_EControllerActionOrigin_LeftPad_DPadWest,
|
||||
k_EControllerActionOrigin_LeftPad_DPadEast,
|
||||
k_EControllerActionOrigin_RightPad_Touch,
|
||||
k_EControllerActionOrigin_RightPad_Swipe,
|
||||
k_EControllerActionOrigin_RightPad_Click,
|
||||
k_EControllerActionOrigin_RightPad_DPadNorth,
|
||||
k_EControllerActionOrigin_RightPad_DPadSouth,
|
||||
k_EControllerActionOrigin_RightPad_DPadWest,
|
||||
k_EControllerActionOrigin_RightPad_DPadEast,
|
||||
k_EControllerActionOrigin_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_LeftStick_Move,
|
||||
k_EControllerActionOrigin_LeftStick_Click,
|
||||
k_EControllerActionOrigin_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_Gyro_Move,
|
||||
k_EControllerActionOrigin_Gyro_Pitch,
|
||||
k_EControllerActionOrigin_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_Gyro_Roll,
|
||||
|
||||
// PS4 Dual Shock
|
||||
k_EControllerActionOrigin_PS4_X,
|
||||
k_EControllerActionOrigin_PS4_Circle,
|
||||
k_EControllerActionOrigin_PS4_Triangle,
|
||||
k_EControllerActionOrigin_PS4_Square,
|
||||
k_EControllerActionOrigin_PS4_LeftBumper,
|
||||
k_EControllerActionOrigin_PS4_RightBumper,
|
||||
k_EControllerActionOrigin_PS4_Options, //Start
|
||||
k_EControllerActionOrigin_PS4_Share, //Back
|
||||
k_EControllerActionOrigin_PS4_LeftPad_Touch,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_Swipe,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_Click,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_LeftPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_RightPad_Touch,
|
||||
k_EControllerActionOrigin_PS4_RightPad_Swipe,
|
||||
k_EControllerActionOrigin_PS4_RightPad_Click,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_RightPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_Touch,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_Swipe,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_Click,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_CenterPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_PS4_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_PS4_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_PS4_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_Move,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_Click,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_RightStick_Move,
|
||||
k_EControllerActionOrigin_PS4_RightStick_Click,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_PS4_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_PS4_DPad_North,
|
||||
k_EControllerActionOrigin_PS4_DPad_South,
|
||||
k_EControllerActionOrigin_PS4_DPad_West,
|
||||
k_EControllerActionOrigin_PS4_DPad_East,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Move,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Pitch,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_PS4_Gyro_Roll,
|
||||
|
||||
// XBox One
|
||||
k_EControllerActionOrigin_XBoxOne_A,
|
||||
k_EControllerActionOrigin_XBoxOne_B,
|
||||
k_EControllerActionOrigin_XBoxOne_X,
|
||||
k_EControllerActionOrigin_XBoxOne_Y,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftBumper,
|
||||
k_EControllerActionOrigin_XBoxOne_RightBumper,
|
||||
k_EControllerActionOrigin_XBoxOne_Menu, //Start
|
||||
k_EControllerActionOrigin_XBoxOne_View, //Back
|
||||
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBoxOne_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_Move,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_Move,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_Click,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBoxOne_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_North,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_South,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_West,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_East,
|
||||
|
||||
// XBox 360
|
||||
k_EControllerActionOrigin_XBox360_A,
|
||||
k_EControllerActionOrigin_XBox360_B,
|
||||
k_EControllerActionOrigin_XBox360_X,
|
||||
k_EControllerActionOrigin_XBox360_Y,
|
||||
k_EControllerActionOrigin_XBox360_LeftBumper,
|
||||
k_EControllerActionOrigin_XBox360_RightBumper,
|
||||
k_EControllerActionOrigin_XBox360_Start, //Start
|
||||
k_EControllerActionOrigin_XBox360_Back, //Back
|
||||
k_EControllerActionOrigin_XBox360_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBox360_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_XBox360_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_XBox360_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_Move,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_Click,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBox360_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_Move,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_Click,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_XBox360_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_XBox360_DPad_North,
|
||||
k_EControllerActionOrigin_XBox360_DPad_South,
|
||||
k_EControllerActionOrigin_XBox360_DPad_West,
|
||||
k_EControllerActionOrigin_XBox360_DPad_East,
|
||||
|
||||
// SteamController V2
|
||||
k_EControllerActionOrigin_SteamV2_A,
|
||||
k_EControllerActionOrigin_SteamV2_B,
|
||||
k_EControllerActionOrigin_SteamV2_X,
|
||||
k_EControllerActionOrigin_SteamV2_Y,
|
||||
k_EControllerActionOrigin_SteamV2_LeftBumper,
|
||||
k_EControllerActionOrigin_SteamV2_RightBumper,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Lower,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Lower,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Upper,
|
||||
k_EControllerActionOrigin_SteamV2_LeftBumper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightBumper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_LeftGrip_Upper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightGrip_Upper_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_Start,
|
||||
k_EControllerActionOrigin_SteamV2_Back,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Touch,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Swipe,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Click,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadNorth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadSouth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadWest,
|
||||
k_EControllerActionOrigin_SteamV2_LeftPad_DPadEast,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Touch,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Swipe,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Click,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_Pressure,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadNorth,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadSouth,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadWest,
|
||||
k_EControllerActionOrigin_SteamV2_RightPad_DPadEast,
|
||||
k_EControllerActionOrigin_SteamV2_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_SteamV2_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_SteamV2_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_SteamV2_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_Move,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_Click,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_SteamV2_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Move,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Pitch,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_SteamV2_Gyro_Roll,
|
||||
|
||||
// Switch - Pro or Joycons used as a single input device.
|
||||
// This does not apply to a single joycon
|
||||
k_EControllerActionOrigin_Switch_A,
|
||||
k_EControllerActionOrigin_Switch_B,
|
||||
k_EControllerActionOrigin_Switch_X,
|
||||
k_EControllerActionOrigin_Switch_Y,
|
||||
k_EControllerActionOrigin_Switch_LeftBumper,
|
||||
k_EControllerActionOrigin_Switch_RightBumper,
|
||||
k_EControllerActionOrigin_Switch_Plus, //Start
|
||||
k_EControllerActionOrigin_Switch_Minus, //Back
|
||||
k_EControllerActionOrigin_Switch_Capture,
|
||||
k_EControllerActionOrigin_Switch_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_Switch_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_Switch_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_Switch_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_Switch_LeftStick_Move,
|
||||
k_EControllerActionOrigin_Switch_LeftStick_Click,
|
||||
k_EControllerActionOrigin_Switch_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_Switch_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_Switch_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_Switch_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_Switch_RightStick_Move,
|
||||
k_EControllerActionOrigin_Switch_RightStick_Click,
|
||||
k_EControllerActionOrigin_Switch_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_Switch_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_Switch_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_Switch_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_Switch_DPad_North,
|
||||
k_EControllerActionOrigin_Switch_DPad_South,
|
||||
k_EControllerActionOrigin_Switch_DPad_West,
|
||||
k_EControllerActionOrigin_Switch_DPad_East,
|
||||
k_EControllerActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EControllerActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EControllerActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EControllerActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
// Switch JoyCon Specific
|
||||
k_EControllerActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EControllerActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EControllerActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EControllerActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EControllerActionOrigin_Switch_LeftGyro_Move,
|
||||
k_EControllerActionOrigin_Switch_LeftGyro_Pitch,
|
||||
k_EControllerActionOrigin_Switch_LeftGyro_Yaw,
|
||||
k_EControllerActionOrigin_Switch_LeftGyro_Roll,
|
||||
k_EControllerActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button
|
||||
k_EControllerActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button
|
||||
k_EControllerActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button
|
||||
k_EControllerActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button
|
||||
|
||||
// Added in SDK 1.45
|
||||
k_EControllerActionOrigin_PS4_DPad_Move,
|
||||
k_EControllerActionOrigin_XBoxOne_DPad_Move,
|
||||
k_EControllerActionOrigin_XBox360_DPad_Move,
|
||||
k_EControllerActionOrigin_Switch_DPad_Move,
|
||||
|
||||
// Added in SDK 1.51
|
||||
k_EControllerActionOrigin_PS5_X,
|
||||
k_EControllerActionOrigin_PS5_Circle,
|
||||
k_EControllerActionOrigin_PS5_Triangle,
|
||||
k_EControllerActionOrigin_PS5_Square,
|
||||
k_EControllerActionOrigin_PS5_LeftBumper,
|
||||
k_EControllerActionOrigin_PS5_RightBumper,
|
||||
k_EControllerActionOrigin_PS5_Option, //Start
|
||||
k_EControllerActionOrigin_PS5_Create, //Back
|
||||
k_EControllerActionOrigin_PS5_Mute,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_Touch,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_Swipe,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_Click,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS5_LeftPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS5_RightPad_Touch,
|
||||
k_EControllerActionOrigin_PS5_RightPad_Swipe,
|
||||
k_EControllerActionOrigin_PS5_RightPad_Click,
|
||||
k_EControllerActionOrigin_PS5_RightPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS5_RightPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS5_RightPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS5_RightPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_Touch,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_Swipe,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_Click,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_DPadNorth,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_DPadSouth,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_DPadWest,
|
||||
k_EControllerActionOrigin_PS5_CenterPad_DPadEast,
|
||||
k_EControllerActionOrigin_PS5_LeftTrigger_Pull,
|
||||
k_EControllerActionOrigin_PS5_LeftTrigger_Click,
|
||||
k_EControllerActionOrigin_PS5_RightTrigger_Pull,
|
||||
k_EControllerActionOrigin_PS5_RightTrigger_Click,
|
||||
k_EControllerActionOrigin_PS5_LeftStick_Move,
|
||||
k_EControllerActionOrigin_PS5_LeftStick_Click,
|
||||
k_EControllerActionOrigin_PS5_LeftStick_DPadNorth,
|
||||
k_EControllerActionOrigin_PS5_LeftStick_DPadSouth,
|
||||
k_EControllerActionOrigin_PS5_LeftStick_DPadWest,
|
||||
k_EControllerActionOrigin_PS5_LeftStick_DPadEast,
|
||||
k_EControllerActionOrigin_PS5_RightStick_Move,
|
||||
k_EControllerActionOrigin_PS5_RightStick_Click,
|
||||
k_EControllerActionOrigin_PS5_RightStick_DPadNorth,
|
||||
k_EControllerActionOrigin_PS5_RightStick_DPadSouth,
|
||||
k_EControllerActionOrigin_PS5_RightStick_DPadWest,
|
||||
k_EControllerActionOrigin_PS5_RightStick_DPadEast,
|
||||
k_EControllerActionOrigin_PS5_DPad_Move,
|
||||
k_EControllerActionOrigin_PS5_DPad_North,
|
||||
k_EControllerActionOrigin_PS5_DPad_South,
|
||||
k_EControllerActionOrigin_PS5_DPad_West,
|
||||
k_EControllerActionOrigin_PS5_DPad_East,
|
||||
k_EControllerActionOrigin_PS5_Gyro_Move,
|
||||
k_EControllerActionOrigin_PS5_Gyro_Pitch,
|
||||
k_EControllerActionOrigin_PS5_Gyro_Yaw,
|
||||
k_EControllerActionOrigin_PS5_Gyro_Roll,
|
||||
|
||||
k_EControllerActionOrigin_XBoxOne_LeftGrip_Lower,
|
||||
k_EControllerActionOrigin_XBoxOne_LeftGrip_Upper,
|
||||
k_EControllerActionOrigin_XBoxOne_RightGrip_Lower,
|
||||
k_EControllerActionOrigin_XBoxOne_RightGrip_Upper,
|
||||
k_EControllerActionOrigin_XBoxOne_Share,
|
||||
|
||||
k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
|
||||
k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
|
||||
};
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
enum EXboxOrigin
|
||||
{
|
||||
k_EXboxOrigin_A,
|
||||
k_EXboxOrigin_B,
|
||||
k_EXboxOrigin_X,
|
||||
k_EXboxOrigin_Y,
|
||||
k_EXboxOrigin_LeftBumper,
|
||||
k_EXboxOrigin_RightBumper,
|
||||
k_EXboxOrigin_Menu, //Start
|
||||
k_EXboxOrigin_View, //Back
|
||||
k_EXboxOrigin_LeftTrigger_Pull,
|
||||
k_EXboxOrigin_LeftTrigger_Click,
|
||||
k_EXboxOrigin_RightTrigger_Pull,
|
||||
k_EXboxOrigin_RightTrigger_Click,
|
||||
k_EXboxOrigin_LeftStick_Move,
|
||||
k_EXboxOrigin_LeftStick_Click,
|
||||
k_EXboxOrigin_LeftStick_DPadNorth,
|
||||
k_EXboxOrigin_LeftStick_DPadSouth,
|
||||
k_EXboxOrigin_LeftStick_DPadWest,
|
||||
k_EXboxOrigin_LeftStick_DPadEast,
|
||||
k_EXboxOrigin_RightStick_Move,
|
||||
k_EXboxOrigin_RightStick_Click,
|
||||
k_EXboxOrigin_RightStick_DPadNorth,
|
||||
k_EXboxOrigin_RightStick_DPadSouth,
|
||||
k_EXboxOrigin_RightStick_DPadWest,
|
||||
k_EXboxOrigin_RightStick_DPadEast,
|
||||
k_EXboxOrigin_DPad_North,
|
||||
k_EXboxOrigin_DPad_South,
|
||||
k_EXboxOrigin_DPad_West,
|
||||
k_EXboxOrigin_DPad_East,
|
||||
};
|
||||
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
k_ESteamInputType_XBoxOneController,
|
||||
k_ESteamInputType_GenericGamepad, // DirectInput controllers
|
||||
k_ESteamInputType_PS4Controller,
|
||||
k_ESteamInputType_AppleMFiController, // Unused
|
||||
k_ESteamInputType_AndroidController, // Unused
|
||||
k_ESteamInputType_SwitchJoyConPair, // Unused
|
||||
k_ESteamInputType_SwitchJoyConSingle, // Unused
|
||||
k_ESteamInputType_SwitchProController,
|
||||
k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller
|
||||
k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins
|
||||
k_ESteamInputType_PS5Controller, // Added in SDK 151
|
||||
k_ESteamInputType_Count,
|
||||
k_ESteamInputType_MaximumPossibleValue = 255,
|
||||
};
|
||||
#endif
|
||||
|
||||
enum ESteamControllerLEDFlag
|
||||
{
|
||||
k_ESteamControllerLEDFlag_SetColor,
|
||||
k_ESteamControllerLEDFlag_RestoreUserDefault
|
||||
};
|
||||
|
||||
// ControllerHandle_t is used to refer to a specific controller.
|
||||
// This handle will consistently identify a controller, even if it is disconnected and re-connected
|
||||
typedef uint64 ControllerHandle_t;
|
||||
|
||||
|
||||
// These handles are used to refer to a specific in-game action or action set
|
||||
// All action handles should be queried during initialization for performance reasons
|
||||
typedef uint64 ControllerActionSetHandle_t;
|
||||
typedef uint64 ControllerDigitalActionHandle_t;
|
||||
typedef uint64 ControllerAnalogActionHandle_t;
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
#ifdef ISTEAMINPUT_H
|
||||
#define ControllerAnalogActionData_t InputAnalogActionData_t
|
||||
#define ControllerDigitalActionData_t InputDigitalActionData_t
|
||||
#define ControllerMotionData_t InputMotionData_t
|
||||
#else
|
||||
struct ControllerAnalogActionData_t
|
||||
{
|
||||
// Type of data coming from this action, this will match what got specified in the action set
|
||||
EControllerSourceMode eMode;
|
||||
|
||||
// The current state of this action; will be delta updates for mouse actions
|
||||
float x, y;
|
||||
|
||||
// Whether or not this action is currently available to be bound in the active action set
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerDigitalActionData_t
|
||||
{
|
||||
// The current state of this action; will be true if currently pressed
|
||||
bool bState;
|
||||
|
||||
// Whether or not this action is currently available to be bound in the active action set
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct ControllerMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
float rotQuatZ;
|
||||
float rotQuatW;
|
||||
|
||||
// Positional acceleration
|
||||
float posAccelX;
|
||||
float posAccelY;
|
||||
float posAccelZ;
|
||||
|
||||
// Angular velocity
|
||||
float rotVelX;
|
||||
float rotVelY;
|
||||
float rotVelZ;
|
||||
};
|
||||
#endif
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamController
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Synchronize API state with the latest Steam Controller inputs available. This
|
||||
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
|
||||
// possible latency, you call this directly before reading controller state. This must
|
||||
// be called from somewhere before GetConnectedControllers will return any handles
|
||||
virtual void RunFrame() = 0;
|
||||
|
||||
// Enumerate currently connected controllers
|
||||
// handlesOut should point to a STEAM_CONTROLLER_MAX_COUNT sized array of ControllerHandle_t handles
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetConnectedControllers( STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_COUNT, Receives list of connected controllers ) ControllerHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTION SETS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual ControllerActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0;
|
||||
|
||||
// Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')
|
||||
// This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in
|
||||
// your state loops, instead of trying to place it in all of your state transitions.
|
||||
virtual void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) = 0;
|
||||
virtual ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// ACTION SET LAYERS
|
||||
virtual void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) = 0;
|
||||
// Enumerate currently active layers
|
||||
// handlesOut should point to a STEAM_CONTROLLER_MAX_ACTIVE_LAYERS sized array of ControllerActionSetHandle_t handles.
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_ACTIVE_LAYERS, Receives list of active layers ) ControllerActionSetHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTIONS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of the supplied digital game action
|
||||
virtual ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
|
||||
virtual int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_ORIGINS, Receives list of aciton origins ) EControllerActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual ControllerAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of these supplied analog game action
|
||||
virtual ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_CONTROLLER_MAX_ORIGINS sized array of EControllerActionOrigin handles. The EControllerActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
|
||||
virtual int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_CONTROLLER_MAX_ORIGINS, Receives list of action origins ) EControllerActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular origin - this call is cheap
|
||||
virtual const char *GetGlyphForActionOrigin( EControllerActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified origin - this call is serialized
|
||||
virtual const char *GetStringForActionOrigin( EControllerActionOrigin eOrigin ) = 0;
|
||||
|
||||
virtual void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) = 0;
|
||||
|
||||
// Returns raw motion data from the specified controller
|
||||
virtual ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// OUTPUTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Trigger a haptic pulse on a controller
|
||||
virtual void TriggerHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
|
||||
|
||||
// Trigger a pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times.
|
||||
// nFlags is currently unused and reserved for future use.
|
||||
virtual void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
|
||||
// Trigger a vibration event on supported controllers.
|
||||
virtual void TriggerVibration( ControllerHandle_t controllerHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
|
||||
|
||||
// Set the controller LED color on supported controllers.
|
||||
virtual void SetLEDColor( ControllerHandle_t controllerHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions available without using the rest of Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
|
||||
// If the user is not in Big Picture Mode it will open up the binding in a new window
|
||||
virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// Returns the input type for a particular handle - unlike EControllerActionOrigin which update with Steam and may return unrecognized values
|
||||
// ESteamInputType will remain static and only return valid values from your SDK version
|
||||
virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0;
|
||||
|
||||
// Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions
|
||||
// to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input
|
||||
virtual ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) = 0;
|
||||
|
||||
// Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index
|
||||
virtual int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified Xbox controller origin.
|
||||
virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular Xbox controller origin.
|
||||
virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for
|
||||
// non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration
|
||||
virtual EControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EControllerActionOrigin_None
|
||||
virtual EControllerActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EControllerActionOrigin eSourceOrigin ) = 0;
|
||||
|
||||
// Get the binding revision for a given device. Returns false if the handle was not valid or if a mapping is not yet loaded for the device
|
||||
virtual bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, int *pMajor, int *pMinor ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController008"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamController *SteamController();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamController *, SteamController, STEAMCONTROLLER_INTERFACE_VERSION );
|
||||
|
||||
#endif // ISTEAMCONTROLLER_H
|
693
lsteamclient/steamworks_sdk_152/isteamfriends.h
Normal file
693
lsteamclient/steamworks_sdk_152/isteamfriends.h
Normal file
@ -0,0 +1,693 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
//
|
||||
// Purpose: interface to both friends list data and general information about users
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMFRIENDS_H
|
||||
#define ISTEAMFRIENDS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: set of relationships to other users
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EFriendRelationship
|
||||
{
|
||||
k_EFriendRelationshipNone = 0,
|
||||
k_EFriendRelationshipBlocked = 1, // this doesn't get stored; the user has just done an Ignore on an friendship invite
|
||||
k_EFriendRelationshipRequestRecipient = 2,
|
||||
k_EFriendRelationshipFriend = 3,
|
||||
k_EFriendRelationshipRequestInitiator = 4,
|
||||
k_EFriendRelationshipIgnored = 5, // this is stored; the user has explicit blocked this other user from comments/chat/etc
|
||||
k_EFriendRelationshipIgnoredFriend = 6,
|
||||
k_EFriendRelationshipSuggested_DEPRECATED = 7, // was used by the original implementation of the facebook linking feature, but now unused.
|
||||
|
||||
// keep this updated
|
||||
k_EFriendRelationshipMax = 8,
|
||||
};
|
||||
|
||||
// maximum length of friend group name (not including terminating nul!)
|
||||
const int k_cchMaxFriendsGroupName = 64;
|
||||
|
||||
// maximum number of groups a single user is allowed
|
||||
const int k_cFriendsGroupLimit = 100;
|
||||
|
||||
// friends group identifier type
|
||||
typedef int16 FriendsGroupID_t;
|
||||
|
||||
// invalid friends group identifier constant
|
||||
const FriendsGroupID_t k_FriendsGroupID_Invalid = -1;
|
||||
|
||||
const int k_cEnumerateFollowersMax = 50;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: list of states a friend can be in
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EPersonaState
|
||||
{
|
||||
k_EPersonaStateOffline = 0, // friend is not currently logged on
|
||||
k_EPersonaStateOnline = 1, // friend is logged on
|
||||
k_EPersonaStateBusy = 2, // user is on, but busy
|
||||
k_EPersonaStateAway = 3, // auto-away feature
|
||||
k_EPersonaStateSnooze = 4, // auto-away for a long time
|
||||
k_EPersonaStateLookingToTrade = 5, // Online, trading
|
||||
k_EPersonaStateLookingToPlay = 6, // Online, wanting to play
|
||||
k_EPersonaStateInvisible = 7, // Online, but appears offline to friends. This status is never published to clients.
|
||||
k_EPersonaStateMax,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: flags for enumerating friends list, or quickly checking a the relationship between users
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EFriendFlags
|
||||
{
|
||||
k_EFriendFlagNone = 0x00,
|
||||
k_EFriendFlagBlocked = 0x01,
|
||||
k_EFriendFlagFriendshipRequested = 0x02,
|
||||
k_EFriendFlagImmediate = 0x04, // "regular" friend
|
||||
k_EFriendFlagClanMember = 0x08,
|
||||
k_EFriendFlagOnGameServer = 0x10,
|
||||
// k_EFriendFlagHasPlayedWith = 0x20, // not currently used
|
||||
// k_EFriendFlagFriendOfFriend = 0x40, // not currently used
|
||||
k_EFriendFlagRequestingFriendship = 0x80,
|
||||
k_EFriendFlagRequestingInfo = 0x100,
|
||||
k_EFriendFlagIgnored = 0x200,
|
||||
k_EFriendFlagIgnoredFriend = 0x400,
|
||||
// k_EFriendFlagSuggested = 0x800, // not used
|
||||
k_EFriendFlagChatMember = 0x1000,
|
||||
k_EFriendFlagAll = 0xFFFF,
|
||||
};
|
||||
|
||||
|
||||
// friend game played information
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct FriendGameInfo_t
|
||||
{
|
||||
CGameID m_gameID;
|
||||
uint32 m_unGameIP;
|
||||
uint16 m_usGamePort;
|
||||
uint16 m_usQueryPort;
|
||||
CSteamID m_steamIDLobby;
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
|
||||
// The UTF-8 version has to be very generous to accomodate characters that get large when encoded
|
||||
// in UTF-8.
|
||||
enum
|
||||
{
|
||||
k_cchPersonaNameMax = 128,
|
||||
k_cwchPersonaNameMax = 32,
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: user restriction flags
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EUserRestriction
|
||||
{
|
||||
k_nUserRestrictionNone = 0, // no known chat/content restriction
|
||||
k_nUserRestrictionUnknown = 1, // we don't know yet (user offline)
|
||||
k_nUserRestrictionAnyChat = 2, // user is not allowed to (or can't) send/recv any chat
|
||||
k_nUserRestrictionVoiceChat = 4, // user is not allowed to (or can't) send/recv voice chat
|
||||
k_nUserRestrictionGroupChat = 8, // user is not allowed to (or can't) send/recv group chat
|
||||
k_nUserRestrictionRating = 16, // user is too young according to rating in current region
|
||||
k_nUserRestrictionGameInvites = 32, // user cannot send or recv game invites (e.g. mobile)
|
||||
k_nUserRestrictionTrading = 64, // user cannot participate in trading (console, mobile)
|
||||
};
|
||||
|
||||
// size limit on chat room or member metadata
|
||||
const uint32 k_cubChatMetadataMax = 8192;
|
||||
|
||||
// size limits on Rich Presence data
|
||||
enum { k_cchMaxRichPresenceKeys = 30 };
|
||||
enum { k_cchMaxRichPresenceKeyLength = 64 };
|
||||
enum { k_cchMaxRichPresenceValueLength = 256 };
|
||||
|
||||
// These values are passed as parameters to the store
|
||||
enum EOverlayToStoreFlag
|
||||
{
|
||||
k_EOverlayToStoreFlag_None = 0,
|
||||
k_EOverlayToStoreFlag_AddToCart = 1,
|
||||
k_EOverlayToStoreFlag_AddToCartAndShow = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Tells Steam where to place the browser window inside the overlay
|
||||
//-----------------------------------------------------------------------------
|
||||
enum EActivateGameOverlayToWebPageMode
|
||||
{
|
||||
k_EActivateGameOverlayToWebPageMode_Default = 0, // Browser will open next to all other windows that the user has open in the overlay.
|
||||
// The window will remain open, even if the user closes then re-opens the overlay.
|
||||
|
||||
k_EActivateGameOverlayToWebPageMode_Modal = 1 // Browser will be opened in a special overlay configuration which hides all other windows
|
||||
// that the user has open in the overlay. When the user closes the overlay, the browser window
|
||||
// will also close. When the user closes the browser window, the overlay will automatically close.
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to accessing information about individual users,
|
||||
// that can be a friend, in a group, on a game server or in a lobby with the local user
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamFriends
|
||||
{
|
||||
public:
|
||||
// returns the local players name - guaranteed to not be NULL.
|
||||
// this is the same name as on the users community profile page
|
||||
// this is stored in UTF-8 format
|
||||
// like all the other interface functions that return a char *, it's important that this pointer is not saved
|
||||
// off; it will eventually be free'd or re-allocated
|
||||
virtual const char *GetPersonaName() = 0;
|
||||
|
||||
// Sets the player name, stores it on the server and publishes the changes to all friends who are online.
|
||||
// Changes take place locally immediately, and a PersonaStateChange_t is posted, presuming success.
|
||||
//
|
||||
// The final results are available through the return value SteamAPICall_t, using SetPersonaNameResponse_t.
|
||||
//
|
||||
// If the name change fails to happen on the server, then an additional global PersonaStateChange_t will be posted
|
||||
// to change the name back, in addition to the SetPersonaNameResponse_t callback.
|
||||
STEAM_CALL_RESULT( SetPersonaNameResponse_t )
|
||||
virtual SteamAPICall_t SetPersonaName( const char *pchPersonaName ) = 0;
|
||||
|
||||
// gets the status of the current user
|
||||
virtual EPersonaState GetPersonaState() = 0;
|
||||
|
||||
// friend iteration
|
||||
// takes a set of k_EFriendFlags, and returns the number of users the client knows about who meet that criteria
|
||||
// then GetFriendByIndex() can then be used to return the id's of each of those users
|
||||
virtual int GetFriendCount( int iFriendFlags ) = 0;
|
||||
|
||||
// returns the steamID of a user
|
||||
// iFriend is a index of range [0, GetFriendCount())
|
||||
// iFriendsFlags must be the same value as used in GetFriendCount()
|
||||
// the returned CSteamID can then be used by all the functions below to access details about the user
|
||||
virtual CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) = 0;
|
||||
|
||||
// returns a relationship to a user
|
||||
virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// returns the current status of the specified user
|
||||
// this will only be known by the local user if steamIDFriend is in their friends list; on the same game server; in a chat room or lobby; or in a small group with the local user
|
||||
virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// returns the name another user - guaranteed to not be NULL.
|
||||
// same rules as GetFriendPersonaState() apply as to whether or not the user knowns the name of the other user
|
||||
// note that on first joining a lobby, chat room or game server the local user will not known the name of the other users automatically; that information will arrive asyncronously
|
||||
//
|
||||
virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// returns true if the friend is actually in a game, and fills in pFriendGameInfo with an extra details
|
||||
virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, STEAM_OUT_STRUCT() FriendGameInfo_t *pFriendGameInfo ) = 0;
|
||||
// accesses old friends names - returns an empty string when their are no more items in the history
|
||||
virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0;
|
||||
// friends steam level
|
||||
virtual int GetFriendSteamLevel( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// Returns nickname the current user has set for the specified player. Returns NULL if the no nickname has been set for that player.
|
||||
// DEPRECATED: GetPersonaName follows the Steam nickname preferences, so apps shouldn't need to care about nicknames explicitly.
|
||||
virtual const char *GetPlayerNickname( CSteamID steamIDPlayer ) = 0;
|
||||
|
||||
// friend grouping (tag) apis
|
||||
// returns the number of friends groups
|
||||
virtual int GetFriendsGroupCount() = 0;
|
||||
// returns the friends group ID for the given index (invalid indices return k_FriendsGroupID_Invalid)
|
||||
virtual FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) = 0;
|
||||
// returns the name for the given friends group (NULL in the case of invalid friends group IDs)
|
||||
virtual const char *GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) = 0;
|
||||
// returns the number of members in a given friends group
|
||||
virtual int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) = 0;
|
||||
// gets up to nMembersCount members of the given friends group, if fewer exist than requested those positions' SteamIDs will be invalid
|
||||
virtual void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, STEAM_OUT_ARRAY_CALL(nMembersCount, GetFriendsGroupMembersCount, friendsGroupID ) CSteamID *pOutSteamIDMembers, int nMembersCount ) = 0;
|
||||
|
||||
// returns true if the specified user meets any of the criteria specified in iFriendFlags
|
||||
// iFriendFlags can be the union (binary or, |) of one or more k_EFriendFlags values
|
||||
virtual bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) = 0;
|
||||
|
||||
// clan (group) iteration and access functions
|
||||
virtual int GetClanCount() = 0;
|
||||
virtual CSteamID GetClanByIndex( int iClan ) = 0;
|
||||
virtual const char *GetClanName( CSteamID steamIDClan ) = 0;
|
||||
virtual const char *GetClanTag( CSteamID steamIDClan ) = 0;
|
||||
// returns the most recent information we have about what's happening in a clan
|
||||
virtual bool GetClanActivityCounts( CSteamID steamIDClan, int *pnOnline, int *pnInGame, int *pnChatting ) = 0;
|
||||
|
||||
// for clans a user is a member of, they will have reasonably up-to-date information, but for others you'll have to download the info to have the latest
|
||||
STEAM_CALL_RESULT( DownloadClanActivityCountsResult_t )
|
||||
virtual SteamAPICall_t DownloadClanActivityCounts( STEAM_ARRAY_COUNT(cClansToRequest) CSteamID *psteamIDClans, int cClansToRequest ) = 0;
|
||||
|
||||
// iterators for getting users in a chat room, lobby, game server or clan
|
||||
// note that large clans that cannot be iterated by the local user
|
||||
// note that the current user must be in a lobby to retrieve CSteamIDs of other users in that lobby
|
||||
// steamIDSource can be the steamID of a group, game server, lobby or chat room
|
||||
virtual int GetFriendCountFromSource( CSteamID steamIDSource ) = 0;
|
||||
virtual CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) = 0;
|
||||
|
||||
// returns true if the local user can see that steamIDUser is a member or in steamIDSource
|
||||
virtual bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) = 0;
|
||||
|
||||
// User is in a game pressing the talk button (will suppress the microphone for all voice comms from the Steam friends UI)
|
||||
virtual void SetInGameVoiceSpeaking( CSteamID steamIDUser, bool bSpeaking ) = 0;
|
||||
|
||||
// activates the game overlay, with an optional dialog to open
|
||||
// valid options include "Friends", "Community", "Players", "Settings", "OfficialGameGroup", "Stats", "Achievements",
|
||||
// "chatroomgroup/nnnn"
|
||||
virtual void ActivateGameOverlay( const char *pchDialog ) = 0;
|
||||
|
||||
// activates game overlay to a specific place
|
||||
// valid options are
|
||||
// "steamid" - opens the overlay web browser to the specified user or groups profile
|
||||
// "chat" - opens a chat window to the specified user, or joins the group chat
|
||||
// "jointrade" - opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API
|
||||
// "stats" - opens the overlay web browser to the specified user's stats
|
||||
// "achievements" - opens the overlay web browser to the specified user's achievements
|
||||
// "friendadd" - opens the overlay in minimal mode prompting the user to add the target user as a friend
|
||||
// "friendremove" - opens the overlay in minimal mode prompting the user to remove the target friend
|
||||
// "friendrequestaccept" - opens the overlay in minimal mode prompting the user to accept an incoming friend invite
|
||||
// "friendrequestignore" - opens the overlay in minimal mode prompting the user to ignore an incoming friend invite
|
||||
virtual void ActivateGameOverlayToUser( const char *pchDialog, CSteamID steamID ) = 0;
|
||||
|
||||
// activates game overlay web browser directly to the specified URL
|
||||
// full address with protocol type is required, e.g. http://www.steamgames.com/
|
||||
virtual void ActivateGameOverlayToWebPage( const char *pchURL, EActivateGameOverlayToWebPageMode eMode = k_EActivateGameOverlayToWebPageMode_Default ) = 0;
|
||||
|
||||
// activates game overlay to store page for app
|
||||
virtual void ActivateGameOverlayToStore( AppId_t nAppID, EOverlayToStoreFlag eFlag ) = 0;
|
||||
|
||||
// Mark a target user as 'played with'. This is a client-side only feature that requires that the calling user is
|
||||
// in game
|
||||
virtual void SetPlayedWith( CSteamID steamIDUserPlayedWith ) = 0;
|
||||
|
||||
// activates game overlay to open the invite dialog. Invitations will be sent for the provided lobby.
|
||||
virtual void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// gets the small (32x32) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
|
||||
virtual int GetSmallFriendAvatar( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// gets the medium (64x64) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
|
||||
virtual int GetMediumFriendAvatar( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// gets the large (184x184) avatar of the current user, which is a handle to be used in IClientUtils::GetImageRGBA(), or 0 if none set
|
||||
// returns -1 if this image has yet to be loaded, in this case wait for a AvatarImageLoaded_t callback and then call this again
|
||||
virtual int GetLargeFriendAvatar( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// requests information about a user - persona name & avatar
|
||||
// if bRequireNameOnly is set, then the avatar of a user isn't downloaded
|
||||
// - it's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them
|
||||
// if returns true, it means that data is being requested, and a PersonaStateChanged_t callback will be posted when it's retrieved
|
||||
// if returns false, it means that we already have all the details about that user, and functions can be called immediately
|
||||
virtual bool RequestUserInformation( CSteamID steamIDUser, bool bRequireNameOnly ) = 0;
|
||||
|
||||
// requests information about a clan officer list
|
||||
// when complete, data is returned in ClanOfficerListResponse_t call result
|
||||
// this makes available the calls below
|
||||
// you can only ask about clans that a user is a member of
|
||||
// note that this won't download avatars automatically; if you get an officer,
|
||||
// and no avatar image is available, call RequestUserInformation( steamID, false ) to download the avatar
|
||||
STEAM_CALL_RESULT( ClanOfficerListResponse_t )
|
||||
virtual SteamAPICall_t RequestClanOfficerList( CSteamID steamIDClan ) = 0;
|
||||
|
||||
// iteration of clan officers - can only be done when a RequestClanOfficerList() call has completed
|
||||
|
||||
// returns the steamID of the clan owner
|
||||
virtual CSteamID GetClanOwner( CSteamID steamIDClan ) = 0;
|
||||
// returns the number of officers in a clan (including the owner)
|
||||
virtual int GetClanOfficerCount( CSteamID steamIDClan ) = 0;
|
||||
// returns the steamID of a clan officer, by index, of range [0,GetClanOfficerCount)
|
||||
virtual CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) = 0;
|
||||
// if current user is chat restricted, he can't send or receive any text/voice chat messages.
|
||||
// the user can't see custom avatars. But the user can be online and send/recv game invites.
|
||||
// a chat restricted user can't add friends or join any groups.
|
||||
virtual uint32 GetUserRestrictions() = 0;
|
||||
|
||||
// Rich Presence data is automatically shared between friends who are in the same game
|
||||
// Each user has a set of Key/Value pairs
|
||||
// Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength
|
||||
// There are five magic keys:
|
||||
// "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list
|
||||
// "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game
|
||||
// "steam_display" - Names a rich presence localization token that will be displayed in the viewing user's selected language
|
||||
// in the Steam client UI. For more info: https://partner.steamgames.com/doc/api/ISteamFriends#richpresencelocalization
|
||||
// "steam_player_group" - When set, indicates to the Steam client that the player is a member of a particular group. Players in the same group
|
||||
// may be organized together in various places in the Steam UI.
|
||||
// "steam_player_group_size" - When set, indicates the total number of players in the steam_player_group. The Steam client may use this number to
|
||||
// display additional information about a group when all of the members are not part of a user's friends list.
|
||||
// GetFriendRichPresence() returns an empty string "" if no value is set
|
||||
// SetRichPresence() to a NULL or an empty string deletes the key
|
||||
// You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount()
|
||||
// and GetFriendRichPresenceKeyByIndex() (typically only used for debugging)
|
||||
virtual bool SetRichPresence( const char *pchKey, const char *pchValue ) = 0;
|
||||
virtual void ClearRichPresence() = 0;
|
||||
virtual const char *GetFriendRichPresence( CSteamID steamIDFriend, const char *pchKey ) = 0;
|
||||
virtual int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) = 0;
|
||||
virtual const char *GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) = 0;
|
||||
// Requests rich presence for a specific user.
|
||||
virtual void RequestFriendRichPresence( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// Rich invite support.
|
||||
// If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string.
|
||||
// (Or you can configure your game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.)
|
||||
virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0;
|
||||
|
||||
// recently-played-with friends iteration
|
||||
// this iterates the entire list of users recently played with, across games
|
||||
// GetFriendCoplayTime() returns as a unix time
|
||||
virtual int GetCoplayFriendCount() = 0;
|
||||
virtual CSteamID GetCoplayFriend( int iCoplayFriend ) = 0;
|
||||
virtual int GetFriendCoplayTime( CSteamID steamIDFriend ) = 0;
|
||||
virtual AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) = 0;
|
||||
|
||||
// chat interface for games
|
||||
// this allows in-game access to group (clan) chats from in the game
|
||||
// the behavior is somewhat sophisticated, because the user may or may not be already in the group chat from outside the game or in the overlay
|
||||
// use ActivateGameOverlayToUser( "chat", steamIDClan ) to open the in-game overlay version of the chat
|
||||
STEAM_CALL_RESULT( JoinClanChatRoomCompletionResult_t )
|
||||
virtual SteamAPICall_t JoinClanChatRoom( CSteamID steamIDClan ) = 0;
|
||||
virtual bool LeaveClanChatRoom( CSteamID steamIDClan ) = 0;
|
||||
virtual int GetClanChatMemberCount( CSteamID steamIDClan ) = 0;
|
||||
virtual CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) = 0;
|
||||
virtual bool SendClanChatMessage( CSteamID steamIDClanChat, const char *pchText ) = 0;
|
||||
virtual int GetClanChatMessage( CSteamID steamIDClanChat, int iMessage, void *prgchText, int cchTextMax, EChatEntryType *peChatEntryType, STEAM_OUT_STRUCT() CSteamID *psteamidChatter ) = 0;
|
||||
virtual bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) = 0;
|
||||
|
||||
// interact with the Steam (game overlay / desktop)
|
||||
virtual bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) = 0;
|
||||
virtual bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0;
|
||||
virtual bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) = 0;
|
||||
|
||||
// peer-to-peer chat interception
|
||||
// this is so you can show P2P chats inline in the game
|
||||
virtual bool SetListenForFriendsMessages( bool bInterceptEnabled ) = 0;
|
||||
virtual bool ReplyToFriendMessage( CSteamID steamIDFriend, const char *pchMsgToSend ) = 0;
|
||||
virtual int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
|
||||
|
||||
// following apis
|
||||
STEAM_CALL_RESULT( FriendsGetFollowerCount_t )
|
||||
virtual SteamAPICall_t GetFollowerCount( CSteamID steamID ) = 0;
|
||||
STEAM_CALL_RESULT( FriendsIsFollowing_t )
|
||||
virtual SteamAPICall_t IsFollowing( CSteamID steamID ) = 0;
|
||||
STEAM_CALL_RESULT( FriendsEnumerateFollowingList_t )
|
||||
virtual SteamAPICall_t EnumerateFollowingList( uint32 unStartIndex ) = 0;
|
||||
|
||||
virtual bool IsClanPublic( CSteamID steamIDClan ) = 0;
|
||||
virtual bool IsClanOfficialGameGroup( CSteamID steamIDClan ) = 0;
|
||||
|
||||
/// Return the number of chats (friends or chat rooms) with unread messages.
|
||||
/// A "priority" message is one that would generate some sort of toast or
|
||||
/// notification, and depends on user settings.
|
||||
///
|
||||
/// You can register for UnreadChatMessagesChanged_t callbacks to know when this
|
||||
/// has potentially changed.
|
||||
virtual int GetNumChatsWithUnreadPriorityMessages() = 0;
|
||||
|
||||
// activates game overlay to open the remote play together invite dialog. Invitations will be sent for remote play together
|
||||
virtual void ActivateGameOverlayRemotePlayTogetherInviteDialog( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// Call this before calling ActivateGameOverlayToWebPage() to have the Steam Overlay Browser block navigations
|
||||
// to your specified protocol (scheme) uris and instead dispatch a OverlayBrowserProtocolNavigation_t callback to your game.
|
||||
// ActivateGameOverlayToWebPage() must have been called with k_EActivateGameOverlayToWebPageMode_Modal
|
||||
virtual bool RegisterProtocolInOverlayBrowser( const char *pchProtocol ) = 0;
|
||||
|
||||
// Activates the game overlay to open an invite dialog that will send the provided Rich Presence connect string to selected friends
|
||||
virtual void ActivateGameOverlayInviteDialogConnectString( const char *pchConnectString ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamFriends *SteamFriends();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamFriends *, SteamFriends, STEAMFRIENDS_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a friends' status changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct PersonaStateChange_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
|
||||
|
||||
uint64 m_ulSteamID; // steamID of the friend who changed
|
||||
int m_nChangeFlags; // what's changed
|
||||
};
|
||||
|
||||
|
||||
// used in PersonaStateChange_t::m_nChangeFlags to describe what's changed about a user
|
||||
// these flags describe what the client has learned has changed recently, so on startup you'll see a name, avatar & relationship change for every friend
|
||||
enum EPersonaChange
|
||||
{
|
||||
k_EPersonaChangeName = 0x0001,
|
||||
k_EPersonaChangeStatus = 0x0002,
|
||||
k_EPersonaChangeComeOnline = 0x0004,
|
||||
k_EPersonaChangeGoneOffline = 0x0008,
|
||||
k_EPersonaChangeGamePlayed = 0x0010,
|
||||
k_EPersonaChangeGameServer = 0x0020,
|
||||
k_EPersonaChangeAvatar = 0x0040,
|
||||
k_EPersonaChangeJoinedSource= 0x0080,
|
||||
k_EPersonaChangeLeftSource = 0x0100,
|
||||
k_EPersonaChangeRelationshipChanged = 0x0200,
|
||||
k_EPersonaChangeNameFirstSet = 0x0400,
|
||||
k_EPersonaChangeBroadcast = 0x0800,
|
||||
k_EPersonaChangeNickname = 0x1000,
|
||||
k_EPersonaChangeSteamLevel = 0x2000,
|
||||
k_EPersonaChangeRichPresence = 0x4000,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: posted when game overlay activates or deactivates
|
||||
// the game can use this to be pause or resume single player games
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameOverlayActivated_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 31 };
|
||||
uint8 m_bActive; // true if it's just been activated, false otherwise
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a different game server from their friends list
|
||||
// game client should attempt to connect to specified server when this is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameServerChangeRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 32 };
|
||||
char m_rgchServer[64]; // server address ("127.0.0.1:27015", "tf2.valvesoftware.com")
|
||||
char m_rgchPassword[64]; // server password, if any
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a lobby from their friends list
|
||||
// game client should attempt to connect to specified lobby when this is received
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameLobbyJoinRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 33 };
|
||||
CSteamID m_steamIDLobby;
|
||||
|
||||
// The friend they did the join via (will be invalid if not directly via a friend)
|
||||
//
|
||||
// On PS3, the friend will be invalid if this was triggered by a PSN invite via the XMB, but
|
||||
// the account type will be console user so you can tell at least that this was from a PSN friend
|
||||
// rather than a Steam friend.
|
||||
CSteamID m_steamIDFriend;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call
|
||||
// if the image wasn't already available
|
||||
//-----------------------------------------------------------------------------
|
||||
struct AvatarImageLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 34 };
|
||||
CSteamID m_steamID; // steamid the avatar has been loaded for
|
||||
int m_iImage; // the image index of the now loaded image
|
||||
int m_iWide; // width of the loaded image
|
||||
int m_iTall; // height of the loaded image
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: marks the return of a request officer list call
|
||||
//-----------------------------------------------------------------------------
|
||||
struct ClanOfficerListResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 35 };
|
||||
CSteamID m_steamIDClan;
|
||||
int m_cOfficers;
|
||||
uint8 m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callback indicating updated data about friends rich presence information
|
||||
//-----------------------------------------------------------------------------
|
||||
struct FriendRichPresenceUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 36 };
|
||||
CSteamID m_steamIDFriend; // friend who's rich presence has changed
|
||||
AppId_t m_nAppID; // the appID of the game (should always be the current game)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the user tries to join a game from their friends list
|
||||
// rich presence will have been set with the "connect" key which is set here
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameRichPresenceJoinRequested_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 37 };
|
||||
CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend)
|
||||
char m_rgchConnect[k_cchMaxRichPresenceValueLength];
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received for a clan chat the game has joined
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedClanChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 38 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has joined a clan chat
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatJoin_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 39 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a user has left the chat we're in
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedChatLeave_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 40 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
CSteamID m_steamIDUser;
|
||||
bool m_bKicked; // true if admin kicked
|
||||
bool m_bDropped; // true if Steam connection dropped
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a DownloadClanActivityCounts() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct DownloadClanActivityCountsResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 41 };
|
||||
bool m_bSuccess;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a JoinClanChatRoom() call has finished
|
||||
//-----------------------------------------------------------------------------
|
||||
struct JoinClanChatRoomCompletionResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 42 };
|
||||
CSteamID m_steamIDClanChat;
|
||||
EChatRoomEnterResponse m_eChatRoomEnterResponse;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a chat message has been received from a user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GameConnectedFriendChatMsg_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 43 };
|
||||
CSteamID m_steamIDUser;
|
||||
int m_iMessageID;
|
||||
};
|
||||
|
||||
|
||||
struct FriendsGetFollowerCount_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 44 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
int m_nCount;
|
||||
};
|
||||
|
||||
|
||||
struct FriendsIsFollowing_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 45 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_steamID;
|
||||
bool m_bIsFollowing;
|
||||
};
|
||||
|
||||
|
||||
struct FriendsEnumerateFollowingList_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 46 };
|
||||
EResult m_eResult;
|
||||
CSteamID m_rgSteamID[ k_cEnumerateFollowersMax ];
|
||||
int32 m_nResultsReturned;
|
||||
int32 m_nTotalResultCount;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: reports the result of an attempt to change the user's persona name
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SetPersonaNameResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 47 };
|
||||
|
||||
bool m_bSuccess; // true if name change succeeded completely.
|
||||
bool m_bLocalSuccess; // true if name change was retained locally. (We might not have been able to communicate with Steam)
|
||||
EResult m_result; // detailed result code
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Invoked when the status of unread messages changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct UnreadChatMessagesChanged_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 48 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct OverlayBrowserProtocolNavigation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 49 };
|
||||
char rgchURI[ 1024 ];
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMFRIENDS_H
|
74
lsteamclient/steamworks_sdk_152/isteamgamecoordinator.h
Normal file
74
lsteamclient/steamworks_sdk_152/isteamgamecoordinator.h
Normal file
@ -0,0 +1,74 @@
|
||||
//====== Copyright ©, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to the game coordinator for this application
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMGAMECOORDINATOR
|
||||
#define ISTEAMGAMECOORDINATOR
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
|
||||
// list of possible return values from the ISteamGameCoordinator API
|
||||
enum EGCResults
|
||||
{
|
||||
k_EGCResultOK = 0,
|
||||
k_EGCResultNoMessage = 1, // There is no message in the queue
|
||||
k_EGCResultBufferTooSmall = 2, // The buffer is too small for the requested message
|
||||
k_EGCResultNotLoggedOn = 3, // The client is not logged onto Steam
|
||||
k_EGCResultInvalidMessage = 4, // Something was wrong with the message being sent with SendMessage
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for sending and receiving messages from the Game Coordinator
|
||||
// for this application
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameCoordinator
|
||||
{
|
||||
public:
|
||||
|
||||
// sends a message to the Game Coordinator
|
||||
virtual EGCResults SendMessage( uint32 unMsgType, const void *pubData, uint32 cubData ) = 0;
|
||||
|
||||
// returns true if there is a message waiting from the game coordinator
|
||||
virtual bool IsMessageAvailable( uint32 *pcubMsgSize ) = 0;
|
||||
|
||||
// fills the provided buffer with the first message in the queue and returns k_EGCResultOK or
|
||||
// returns k_EGCResultNoMessage if there is no message waiting. pcubMsgSize is filled with the message size.
|
||||
// If the provided buffer is not large enough to fit the entire message, k_EGCResultBufferTooSmall is returned
|
||||
// and the message remains at the head of the queue.
|
||||
virtual EGCResults RetrieveMessage( uint32 *punMsgType, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0;
|
||||
|
||||
};
|
||||
#define STEAMGAMECOORDINATOR_INTERFACE_VERSION "SteamGameCoordinator001"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
// callback notification - A new message is available for reading from the message queue
|
||||
struct GCMessageAvailable_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 1 };
|
||||
uint32 m_nMessageSize;
|
||||
};
|
||||
|
||||
// callback notification - A message failed to make it to the GC. It may be down temporarily
|
||||
struct GCMessageFailed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameCoordinatorCallbacks + 2 };
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMGAMECOORDINATOR
|
392
lsteamclient/steamworks_sdk_152/isteamgameserver.h
Normal file
392
lsteamclient/steamworks_sdk_152/isteamgameserver.h
Normal file
@ -0,0 +1,392 @@
|
||||
//====== Copyright (c) 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to steam for game servers
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMGAMESERVER_H
|
||||
#define ISTEAMGAMESERVER_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameServer
|
||||
{
|
||||
public:
|
||||
|
||||
//
|
||||
// Basic server data. These properties, if set, must be set before before calling LogOn. They
|
||||
// may not be changed after logged in.
|
||||
//
|
||||
|
||||
/// This is called by SteamGameServer_Init, and you will usually not need to call it directly
|
||||
STEAM_PRIVATE_API( virtual bool InitGameServer( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char *pchVersionString ) = 0; )
|
||||
|
||||
/// Game product identifier. This is currently used by the master server for version checking purposes.
|
||||
/// It's a required field, but will eventually will go away, and the AppID will be used for this purpose.
|
||||
virtual void SetProduct( const char *pszProduct ) = 0;
|
||||
|
||||
/// Description of the game. This is a required field and is displayed in the steam server browser....for now.
|
||||
/// This is a required field, but it will go away eventually, as the data should be determined from the AppID.
|
||||
virtual void SetGameDescription( const char *pszGameDescription ) = 0;
|
||||
|
||||
/// If your game is a "mod," pass the string that identifies it. The default is an empty string, meaning
|
||||
/// this application is the original game, not a mod.
|
||||
///
|
||||
/// @see k_cbMaxGameServerGameDir
|
||||
virtual void SetModDir( const char *pszModDir ) = 0;
|
||||
|
||||
/// Is this is a dedicated server? The default value is false.
|
||||
virtual void SetDedicatedServer( bool bDedicated ) = 0;
|
||||
|
||||
//
|
||||
// Login
|
||||
//
|
||||
|
||||
/// Begin process to login to a persistent game server account
|
||||
///
|
||||
/// You need to register for callbacks to determine the result of this operation.
|
||||
/// @see SteamServersConnected_t
|
||||
/// @see SteamServerConnectFailure_t
|
||||
/// @see SteamServersDisconnected_t
|
||||
virtual void LogOn( const char *pszToken ) = 0;
|
||||
|
||||
/// Login to a generic, anonymous account.
|
||||
///
|
||||
/// Note: in previous versions of the SDK, this was automatically called within SteamGameServer_Init,
|
||||
/// but this is no longer the case.
|
||||
virtual void LogOnAnonymous() = 0;
|
||||
|
||||
/// Begin process of logging game server out of steam
|
||||
virtual void LogOff() = 0;
|
||||
|
||||
// status functions
|
||||
virtual bool BLoggedOn() = 0;
|
||||
virtual bool BSecure() = 0;
|
||||
virtual CSteamID GetSteamID() = 0;
|
||||
|
||||
/// Returns true if the master server has requested a restart.
|
||||
/// Only returns true once per request.
|
||||
virtual bool WasRestartRequested() = 0;
|
||||
|
||||
//
|
||||
// Server state. These properties may be changed at any time.
|
||||
//
|
||||
|
||||
/// Max player count that will be reported to server browser and client queries
|
||||
virtual void SetMaxPlayerCount( int cPlayersMax ) = 0;
|
||||
|
||||
/// Number of bots. Default value is zero
|
||||
virtual void SetBotPlayerCount( int cBotplayers ) = 0;
|
||||
|
||||
/// Set the name of server as it will appear in the server browser
|
||||
///
|
||||
/// @see k_cbMaxGameServerName
|
||||
virtual void SetServerName( const char *pszServerName ) = 0;
|
||||
|
||||
/// Set name of map to report in the server browser
|
||||
///
|
||||
/// @see k_cbMaxGameServerMapName
|
||||
virtual void SetMapName( const char *pszMapName ) = 0;
|
||||
|
||||
/// Let people know if your server will require a password
|
||||
virtual void SetPasswordProtected( bool bPasswordProtected ) = 0;
|
||||
|
||||
/// Spectator server port to advertise. The default value is zero, meaning the
|
||||
/// service is not used. If your server receives any info requests on the LAN,
|
||||
/// this is the value that will be placed into the reply for such local queries.
|
||||
///
|
||||
/// This is also the value that will be advertised by the master server.
|
||||
/// The only exception is if your server is using a FakeIP. Then then the second
|
||||
/// fake port number (index 1) assigned to your server will be listed on the master
|
||||
/// server as the spectator port, if you set this value to any nonzero value.
|
||||
///
|
||||
/// This function merely controls the values that are advertised -- it's up to you to
|
||||
/// configure the server to actually listen on this port and handle any spectator traffic
|
||||
virtual void SetSpectatorPort( uint16 unSpectatorPort ) = 0;
|
||||
|
||||
/// Name of the spectator server. (Only used if spectator port is nonzero.)
|
||||
///
|
||||
/// @see k_cbMaxGameServerMapName
|
||||
virtual void SetSpectatorServerName( const char *pszSpectatorServerName ) = 0;
|
||||
|
||||
/// Call this to clear the whole list of key/values that are sent in rules queries.
|
||||
virtual void ClearAllKeyValues() = 0;
|
||||
|
||||
/// Call this to add/update a key/value pair.
|
||||
virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0;
|
||||
|
||||
/// Sets a string defining the "gametags" for this server, this is optional, but if it is set
|
||||
/// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
||||
///
|
||||
/// @see k_cbMaxGameServerTags
|
||||
virtual void SetGameTags( const char *pchGameTags ) = 0;
|
||||
|
||||
/// Sets a string defining the "gamedata" for this server, this is optional, but if it is set
|
||||
/// it allows users to filter in the matchmaking/server-browser interfaces based on the value
|
||||
///
|
||||
/// @see k_cbMaxGameServerGameData
|
||||
virtual void SetGameData( const char *pchGameData ) = 0;
|
||||
|
||||
/// Region identifier. This is an optional field, the default value is empty, meaning the "world" region
|
||||
virtual void SetRegion( const char *pszRegion ) = 0;
|
||||
|
||||
/// Indicate whether you wish to be listed on the master server list
|
||||
/// and/or respond to server browser / LAN discovery packets.
|
||||
/// The server starts with this value set to false. You should set all
|
||||
/// relevant server parameters before enabling advertisement on the server.
|
||||
///
|
||||
/// (This function used to be named EnableHeartbeats, so if you are wondering
|
||||
/// where that function went, it's right here. It does the same thing as before,
|
||||
/// the old name was just confusing.)
|
||||
virtual void SetAdvertiseServerActive( bool bActive ) = 0;
|
||||
|
||||
//
|
||||
// Player list management / authentication.
|
||||
//
|
||||
|
||||
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
|
||||
// pcbTicket retrieves the length of the actual ticket.
|
||||
virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
|
||||
|
||||
// Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused
|
||||
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
|
||||
virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0;
|
||||
|
||||
// Stop tracking started by BeginAuthSession - called when no longer playing game with this entity
|
||||
virtual void EndAuthSession( CSteamID steamID ) = 0;
|
||||
|
||||
// Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to
|
||||
virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0;
|
||||
|
||||
// After receiving a user's authentication data, and passing it to SendUserConnectAndAuthenticate, use this function
|
||||
// to determine if the user owns downloadable content specified by the provided AppID.
|
||||
virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0;
|
||||
|
||||
// Ask if a user in in the specified group, results returns async by GSUserGroupStatus_t
|
||||
// returns false if we're not connected to the steam servers and thus cannot ask
|
||||
virtual bool RequestUserGroupStatus( CSteamID steamIDUser, CSteamID steamIDGroup ) = 0;
|
||||
|
||||
|
||||
// these two functions s are deprecated, and will not return results
|
||||
// they will be removed in a future version of the SDK
|
||||
virtual void GetGameplayStats( ) = 0;
|
||||
STEAM_CALL_RESULT( GSReputation_t )
|
||||
virtual SteamAPICall_t GetServerReputation() = 0;
|
||||
|
||||
// Returns the public IP of the server according to Steam, useful when the server is
|
||||
// behind NAT and you want to advertise its IP in a lobby for other clients to directly
|
||||
// connect to
|
||||
virtual SteamIPAddress_t GetPublicIP() = 0;
|
||||
|
||||
// Server browser related query packet processing for shared socket mode. These are used
|
||||
// when you pass STEAMGAMESERVER_QUERY_PORT_SHARED as the query port to SteamGameServer_Init.
|
||||
// IP address and port are in host order, i.e 127.0.0.1 == 0x7f000001
|
||||
|
||||
// These are used when you've elected to multiplex the game server's UDP socket
|
||||
// rather than having the master server updater use its own sockets.
|
||||
//
|
||||
// Source games use this to simplify the job of the server admins, so they
|
||||
// don't have to open up more ports on their firewalls.
|
||||
|
||||
// Call this when a packet that starts with 0xFFFFFFFF comes in. That means
|
||||
// it's for us.
|
||||
virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0;
|
||||
|
||||
// AFTER calling HandleIncomingPacket for any packets that came in that frame, call this.
|
||||
// This gets a packet that the master server updater needs to send out on UDP.
|
||||
// It returns the length of the packet it wants to send, or 0 if there are no more packets to send.
|
||||
// Call this each frame until it returns 0.
|
||||
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
|
||||
|
||||
//
|
||||
// Server clan association
|
||||
//
|
||||
|
||||
// associate this game server with this clan for the purposes of computing player compat
|
||||
STEAM_CALL_RESULT( AssociateWithClanResult_t )
|
||||
virtual SteamAPICall_t AssociateWithClan( CSteamID steamIDClan ) = 0;
|
||||
|
||||
// ask if any of the current players dont want to play with this new player - or vice versa
|
||||
STEAM_CALL_RESULT( ComputeNewPlayerCompatibilityResult_t )
|
||||
virtual SteamAPICall_t ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer ) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
// Handles receiving a new connection from a Steam user. This call will ask the Steam
|
||||
// servers to validate the users identity, app ownership, and VAC status. If the Steam servers
|
||||
// are off-line, then it will validate the cached ticket itself which will validate app ownership
|
||||
// and identity. The AuthBlob here should be acquired on the game client using SteamUser()->InitiateGameConnection()
|
||||
// and must then be sent up to the game server for authentication.
|
||||
//
|
||||
// Return Value: returns true if the users ticket passes basic checks. pSteamIDUser will contain the Steam ID of this user. pSteamIDUser must NOT be NULL
|
||||
// If the call succeeds then you should expect a GSClientApprove_t or GSClientDeny_t callback which will tell you whether authentication
|
||||
// for the user has succeeded or failed (the steamid in the callback will match the one returned by this call)
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual bool SendUserConnectAndAuthenticate_DEPRECATED( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser ) = 0;
|
||||
|
||||
// Creates a fake user (ie, a bot) which will be listed as playing on the server, but skips validation.
|
||||
//
|
||||
// Return Value: Returns a SteamID for the user to be tracked with, you should call EndAuthSession()
|
||||
// when this user leaves the server just like you would for a real user.
|
||||
virtual CSteamID CreateUnauthenticatedUserConnection() = 0;
|
||||
|
||||
// Should be called whenever a user leaves our game server, this lets Steam internally
|
||||
// track which users are currently on which servers for the purposes of preventing a single
|
||||
// account being logged into multiple servers, showing who is currently on a server, etc.
|
||||
//
|
||||
// DEPRECATED! This function will be removed from the SDK in an upcoming version.
|
||||
// Please migrate to BeginAuthSession and related functions.
|
||||
virtual void SendUserDisconnect_DEPRECATED( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// Update the data to be displayed in the server browser and matchmaking interfaces for a user
|
||||
// currently connected to the server. For regular users you must call this after you receive a
|
||||
// GSUserValidationSuccess callback.
|
||||
//
|
||||
// Return Value: true if successful, false if failure (ie, steamIDUser wasn't for an active player)
|
||||
virtual bool BUpdateUserData( CSteamID steamIDUser, const char *pchPlayerName, uint32 uScore ) = 0;
|
||||
|
||||
// Deprecated functions. These will be removed in a future version of the SDK.
|
||||
// If you really need these, please contact us and help us understand what you are
|
||||
// using them for.
|
||||
|
||||
STEAM_PRIVATE_API(
|
||||
virtual void SetMasterServerHeartbeatInterval_DEPRECATED( int iHeartbeatInterval ) = 0;
|
||||
virtual void ForceMasterServerHeartbeat_DEPRECATED() = 0;
|
||||
)
|
||||
};
|
||||
|
||||
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer014"
|
||||
|
||||
// Global accessor
|
||||
inline ISteamGameServer *SteamGameServer();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServer *, SteamGameServer, STEAMGAMESERVER_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
// client has been approved to connect to this game server
|
||||
struct GSClientApprove_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 1 };
|
||||
CSteamID m_SteamID; // SteamID of approved player
|
||||
CSteamID m_OwnerSteamID; // SteamID of original owner for game license
|
||||
};
|
||||
|
||||
|
||||
// client has been denied to connection to this game server
|
||||
struct GSClientDeny_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 2 };
|
||||
CSteamID m_SteamID;
|
||||
EDenyReason m_eDenyReason;
|
||||
char m_rgchOptionalText[128];
|
||||
};
|
||||
|
||||
|
||||
// request the game server should kick the user
|
||||
struct GSClientKick_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 3 };
|
||||
CSteamID m_SteamID;
|
||||
EDenyReason m_eDenyReason;
|
||||
};
|
||||
|
||||
// NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks,
|
||||
// do not reuse them here.
|
||||
|
||||
|
||||
// client achievement info
|
||||
struct GSClientAchievementStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 6 };
|
||||
uint64 m_SteamID;
|
||||
char m_pchAchievement[128];
|
||||
bool m_bUnlocked;
|
||||
};
|
||||
|
||||
// received when the game server requests to be displayed as secure (VAC protected)
|
||||
// m_bSecure is true if the game server should display itself as secure to users, false otherwise
|
||||
struct GSPolicyResponse_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserCallbacks + 15 };
|
||||
uint8 m_bSecure;
|
||||
};
|
||||
|
||||
// GS gameplay stats info
|
||||
struct GSGameplayStats_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 7 };
|
||||
EResult m_eResult; // Result of the call
|
||||
int32 m_nRank; // Overall rank of the server (0-based)
|
||||
uint32 m_unTotalConnects; // Total number of clients who have ever connected to the server
|
||||
uint32 m_unTotalMinutesPlayed; // Total number of minutes ever played on the server
|
||||
};
|
||||
|
||||
// send as a reply to RequestUserGroupStatus()
|
||||
struct GSClientGroupStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 8 };
|
||||
CSteamID m_SteamIDUser;
|
||||
CSteamID m_SteamIDGroup;
|
||||
bool m_bMember;
|
||||
bool m_bOfficer;
|
||||
};
|
||||
|
||||
// Sent as a reply to GetServerReputation()
|
||||
struct GSReputation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 9 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
uint32 m_unReputationScore; // The reputation score for the game server
|
||||
bool m_bBanned; // True if the server is banned from the Steam
|
||||
// master servers
|
||||
|
||||
// The following members are only filled out if m_bBanned is true. They will all
|
||||
// be set to zero otherwise. Master server bans are by IP so it is possible to be
|
||||
// banned even when the score is good high if there is a bad server on another port.
|
||||
// This information can be used to determine which server is bad.
|
||||
|
||||
uint32 m_unBannedIP; // The IP of the banned server
|
||||
uint16 m_usBannedPort; // The port of the banned server
|
||||
uint64 m_ulBannedGameID; // The game ID the banned server is serving
|
||||
uint32 m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970)
|
||||
};
|
||||
|
||||
// Sent as a reply to AssociateWithClan()
|
||||
struct AssociateWithClanResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 10 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
};
|
||||
|
||||
// Sent as a reply to ComputeNewPlayerCompatibility()
|
||||
struct ComputeNewPlayerCompatibilityResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerCallbacks + 11 };
|
||||
EResult m_eResult; // Result of the call;
|
||||
int m_cPlayersThatDontLikeCandidate;
|
||||
int m_cPlayersThatCandidateDoesntLike;
|
||||
int m_cClanPlayersThatDontLikeCandidate;
|
||||
CSteamID m_SteamIDCandidate;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMGAMESERVER_H
|
114
lsteamclient/steamworks_sdk_152/isteamgameserverstats.h
Normal file
114
lsteamclient/steamworks_sdk_152/isteamgameserverstats.h
Normal file
@ -0,0 +1,114 @@
|
||||
//====== Copyright © Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface for game servers to steam stats and achievements
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMGAMESERVERSTATS_H
|
||||
#define ISTEAMGAMESERVERSTATS_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for authenticating users via Steam to play on a game server
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamGameServerStats
|
||||
{
|
||||
public:
|
||||
// downloads stats for the user
|
||||
// returns a GSStatsReceived_t callback when completed
|
||||
// if the user has no stats, GSStatsReceived_t.m_eResult will be set to k_EResultFail
|
||||
// these stats will only be auto-updated for clients playing on the server. For other
|
||||
// users you'll need to call RequestUserStats() again to refresh any data
|
||||
STEAM_CALL_RESULT( GSStatsReceived_t )
|
||||
virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// requests stat information for a user, usable after a successful call to RequestUserStats()
|
||||
STEAM_FLAT_NAME( GetUserStatInt32 )
|
||||
virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( GetUserStatFloat )
|
||||
virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0;
|
||||
|
||||
virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0;
|
||||
|
||||
// Set / update stats and achievements.
|
||||
// Note: These updates will work only on stats game servers are allowed to edit and only for
|
||||
// game servers that have been declared as officially controlled by the game creators.
|
||||
// Set the IP range of your official servers on the Steamworks page
|
||||
|
||||
STEAM_FLAT_NAME( SetUserStatInt32 )
|
||||
virtual bool SetUserStat( CSteamID steamIDUser, const char *pchName, int32 nData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( SetUserStatFloat )
|
||||
virtual bool SetUserStat( CSteamID steamIDUser, const char *pchName, float fData ) = 0;
|
||||
|
||||
virtual bool UpdateUserAvgRateStat( CSteamID steamIDUser, const char *pchName, float flCountThisSession, double dSessionLength ) = 0;
|
||||
|
||||
virtual bool SetUserAchievement( CSteamID steamIDUser, const char *pchName ) = 0;
|
||||
virtual bool ClearUserAchievement( CSteamID steamIDUser, const char *pchName ) = 0;
|
||||
|
||||
// Store the current data on the server, will get a GSStatsStored_t callback when set.
|
||||
//
|
||||
// If the callback has a result of k_EResultInvalidParam, one or more stats
|
||||
// uploaded has been rejected, either because they broke constraints
|
||||
// or were out of date. In this case the server sends back updated values.
|
||||
// The stats should be re-iterated to keep in sync.
|
||||
STEAM_CALL_RESULT( GSStatsStored_t )
|
||||
virtual SteamAPICall_t StoreUserStats( CSteamID steamIDUser ) = 0;
|
||||
};
|
||||
#define STEAMGAMESERVERSTATS_INTERFACE_VERSION "SteamGameServerStats001"
|
||||
|
||||
// Global accessor
|
||||
inline ISteamGameServerStats *SteamGameServerStats();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServerStats *, SteamGameServerStats, STEAMGAMESERVERSTATS_INTERFACE_VERSION );
|
||||
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when the latests stats and achievements have been received
|
||||
// from the server
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerStatsCallbacks };
|
||||
EResult m_eResult; // Success / error fetching the stats
|
||||
CSteamID m_steamIDUser; // The user for whom the stats are retrieved for
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: result of a request to store the user stats for a game
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsStored_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamGameServerStatsCallbacks + 1 };
|
||||
EResult m_eResult; // success / error
|
||||
CSteamID m_steamIDUser; // The user for whom the stats were stored
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Callback indicating that a user's stats have been unloaded.
|
||||
// Call RequestUserStats again to access stats for this user
|
||||
//-----------------------------------------------------------------------------
|
||||
struct GSStatsUnloaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamUserStatsCallbacks + 8 };
|
||||
CSteamID m_steamIDUser; // User whose stats have been unloaded
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMGAMESERVERSTATS_H
|
479
lsteamclient/steamworks_sdk_152/isteamhtmlsurface.h
Normal file
479
lsteamclient/steamworks_sdk_152/isteamhtmlsurface.h
Normal file
@ -0,0 +1,479 @@
|
||||
//====== Copyright 1996-2013, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to display html pages in a texture
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMHTMLSURFACE_H
|
||||
#define ISTEAMHTMLSURFACE_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
typedef uint32 HHTMLBrowser;
|
||||
const uint32 INVALID_HTMLBROWSER = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for displaying HTML pages and interacting with them
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamHTMLSurface
|
||||
{
|
||||
public:
|
||||
virtual ~ISteamHTMLSurface() {}
|
||||
|
||||
// Must call init and shutdown when starting/ending use of the interface
|
||||
virtual bool Init() = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Create a browser object for display of a html page, when creation is complete the call handle
|
||||
// will return a HTML_BrowserReady_t callback for the HHTMLBrowser of your new browser.
|
||||
// The user agent string is a substring to be added to the general user agent string so you can
|
||||
// identify your client on web servers.
|
||||
// The userCSS string lets you apply a CSS style sheet to every displayed page, leave null if
|
||||
// you do not require this functionality.
|
||||
//
|
||||
// YOU MUST HAVE IMPLEMENTED HANDLERS FOR HTML_BrowserReady_t, HTML_StartRequest_t,
|
||||
// HTML_JSAlert_t, HTML_JSConfirm_t, and HTML_FileOpenDialog_t! See the CALLBACKS
|
||||
// section of this interface (AllowStartRequest, etc) for more details. If you do
|
||||
// not implement these callback handlers, the browser may appear to hang instead of
|
||||
// navigating to new pages or triggering javascript popups.
|
||||
//
|
||||
STEAM_CALL_RESULT( HTML_BrowserReady_t )
|
||||
virtual SteamAPICall_t CreateBrowser( const char *pchUserAgent, const char *pchUserCSS ) = 0;
|
||||
|
||||
// Call this when you are done with a html surface, this lets us free the resources being used by it
|
||||
virtual void RemoveBrowser( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
|
||||
// Navigate to this URL, results in a HTML_StartRequest_t as the request commences
|
||||
virtual void LoadURL( HHTMLBrowser unBrowserHandle, const char *pchURL, const char *pchPostData ) = 0;
|
||||
|
||||
// Tells the surface the size in pixels to display the surface
|
||||
virtual void SetSize( HHTMLBrowser unBrowserHandle, uint32 unWidth, uint32 unHeight ) = 0;
|
||||
|
||||
// Stop the load of the current html page
|
||||
virtual void StopLoad( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
// Reload (most likely from local cache) the current page
|
||||
virtual void Reload( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
// navigate back in the page history
|
||||
virtual void GoBack( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
// navigate forward in the page history
|
||||
virtual void GoForward( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
|
||||
// add this header to any url requests from this browser
|
||||
virtual void AddHeader( HHTMLBrowser unBrowserHandle, const char *pchKey, const char *pchValue ) = 0;
|
||||
// run this javascript script in the currently loaded page
|
||||
virtual void ExecuteJavascript( HHTMLBrowser unBrowserHandle, const char *pchScript ) = 0;
|
||||
|
||||
enum EHTMLMouseButton
|
||||
{
|
||||
eHTMLMouseButton_Left = 0,
|
||||
eHTMLMouseButton_Right = 1,
|
||||
eHTMLMouseButton_Middle = 2,
|
||||
};
|
||||
|
||||
// Mouse click and mouse movement commands
|
||||
virtual void MouseUp( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0;
|
||||
virtual void MouseDown( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0;
|
||||
virtual void MouseDoubleClick( HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton ) = 0;
|
||||
// x and y are relative to the HTML bounds
|
||||
virtual void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) = 0;
|
||||
// nDelta is pixels of scroll
|
||||
virtual void MouseWheel( HHTMLBrowser unBrowserHandle, int32 nDelta ) = 0;
|
||||
|
||||
enum EMouseCursor
|
||||
{
|
||||
dc_user = 0,
|
||||
dc_none,
|
||||
dc_arrow,
|
||||
dc_ibeam,
|
||||
dc_hourglass,
|
||||
dc_waitarrow,
|
||||
dc_crosshair,
|
||||
dc_up,
|
||||
dc_sizenw,
|
||||
dc_sizese,
|
||||
dc_sizene,
|
||||
dc_sizesw,
|
||||
dc_sizew,
|
||||
dc_sizee,
|
||||
dc_sizen,
|
||||
dc_sizes,
|
||||
dc_sizewe,
|
||||
dc_sizens,
|
||||
dc_sizeall,
|
||||
dc_no,
|
||||
dc_hand,
|
||||
dc_blank, // don't show any custom cursor, just use your default
|
||||
dc_middle_pan,
|
||||
dc_north_pan,
|
||||
dc_north_east_pan,
|
||||
dc_east_pan,
|
||||
dc_south_east_pan,
|
||||
dc_south_pan,
|
||||
dc_south_west_pan,
|
||||
dc_west_pan,
|
||||
dc_north_west_pan,
|
||||
dc_alias,
|
||||
dc_cell,
|
||||
dc_colresize,
|
||||
dc_copycur,
|
||||
dc_verticaltext,
|
||||
dc_rowresize,
|
||||
dc_zoomin,
|
||||
dc_zoomout,
|
||||
dc_help,
|
||||
dc_custom,
|
||||
|
||||
dc_last, // custom cursors start from this value and up
|
||||
};
|
||||
|
||||
enum EHTMLKeyModifiers
|
||||
{
|
||||
k_eHTMLKeyModifier_None = 0,
|
||||
k_eHTMLKeyModifier_AltDown = 1 << 0,
|
||||
k_eHTMLKeyModifier_CtrlDown = 1 << 1,
|
||||
k_eHTMLKeyModifier_ShiftDown = 1 << 2,
|
||||
};
|
||||
|
||||
// keyboard interactions, native keycode is the virtual key code value from your OS, system key flags the key to not
|
||||
// be sent as a typed character as well as a key down
|
||||
virtual void KeyDown( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey = false ) = 0;
|
||||
virtual void KeyUp( HHTMLBrowser unBrowserHandle, uint32 nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0;
|
||||
// cUnicodeChar is the unicode character point for this keypress (and potentially multiple chars per press)
|
||||
virtual void KeyChar( HHTMLBrowser unBrowserHandle, uint32 cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers ) = 0;
|
||||
|
||||
// programmatically scroll this many pixels on the page
|
||||
virtual void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0;
|
||||
virtual void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint32 nAbsolutePixelScroll ) = 0;
|
||||
|
||||
// tell the html control if it has key focus currently, controls showing the I-beam cursor in text controls amongst other things
|
||||
virtual void SetKeyFocus( HHTMLBrowser unBrowserHandle, bool bHasKeyFocus ) = 0;
|
||||
|
||||
// open the current pages html code in the local editor of choice, used for debugging
|
||||
virtual void ViewSource( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
// copy the currently selected text on the html page to the local clipboard
|
||||
virtual void CopyToClipboard( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
// paste from the local clipboard to the current html page
|
||||
virtual void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
|
||||
// find this string in the browser, if bCurrentlyInFind is true then instead cycle to the next matching element
|
||||
virtual void Find( HHTMLBrowser unBrowserHandle, const char *pchSearchStr, bool bCurrentlyInFind, bool bReverse ) = 0;
|
||||
// cancel a currently running find
|
||||
virtual void StopFind( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
|
||||
// return details about the link at position x,y on the current page
|
||||
virtual void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) = 0;
|
||||
|
||||
// set a webcookie for the hostname in question
|
||||
virtual void SetCookie( const char *pchHostname, const char *pchKey, const char *pchValue, const char *pchPath = "/", RTime32 nExpires = 0, bool bSecure = false, bool bHTTPOnly = false ) = 0;
|
||||
|
||||
// Zoom the current page by flZoom ( from 0.0 to 2.0, so to zoom to 120% use 1.2 ), zooming around point X,Y in the page (use 0,0 if you don't care)
|
||||
virtual void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) = 0;
|
||||
|
||||
// Enable/disable low-resource background mode, where javascript and repaint timers are throttled, resources are
|
||||
// more aggressively purged from memory, and audio/video elements are paused. When background mode is enabled,
|
||||
// all HTML5 video and audio objects will execute ".pause()" and gain the property "._steam_background_paused = 1".
|
||||
// When background mode is disabled, any video or audio objects with that property will resume with ".play()".
|
||||
virtual void SetBackgroundMode( HHTMLBrowser unBrowserHandle, bool bBackgroundMode ) = 0;
|
||||
|
||||
// Scale the output display space by this factor, this is useful when displaying content on high dpi devices.
|
||||
// Specifies the ratio between physical and logical pixels.
|
||||
virtual void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling ) = 0;
|
||||
|
||||
// Open HTML/JS developer tools
|
||||
virtual void OpenDeveloperTools( HHTMLBrowser unBrowserHandle ) = 0;
|
||||
|
||||
// CALLBACKS
|
||||
//
|
||||
// These set of functions are used as responses to callback requests
|
||||
//
|
||||
|
||||
// You MUST call this in response to a HTML_StartRequest_t callback
|
||||
// Set bAllowed to true to allow this navigation, false to cancel it and stay
|
||||
// on the current page. You can use this feature to limit the valid pages
|
||||
// allowed in your HTML surface.
|
||||
virtual void AllowStartRequest( HHTMLBrowser unBrowserHandle, bool bAllowed ) = 0;
|
||||
|
||||
// You MUST call this in response to a HTML_JSAlert_t or HTML_JSConfirm_t callback
|
||||
// Set bResult to true for the OK option of a confirm, use false otherwise
|
||||
virtual void JSDialogResponse( HHTMLBrowser unBrowserHandle, bool bResult ) = 0;
|
||||
|
||||
// You MUST call this in response to a HTML_FileOpenDialog_t callback
|
||||
virtual void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, const char **pchSelectedFiles ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMHTMLSURFACE_INTERFACE_VERSION "STEAMHTMLSURFACE_INTERFACE_VERSION_005"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamHTMLSurface *SteamHTMLSurface();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTMLSurface *, SteamHTMLSurface, STEAMHTMLSURFACE_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser is ready for use
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_BrowserReady_t, k_iSteamHTMLSurfaceCallbacks + 1 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this browser is now fully created and ready to navigate to pages
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the browser has a pending paint
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN(HTML_NeedsPaint_t, k_iSteamHTMLSurfaceCallbacks + 2)
|
||||
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the browser that needs the paint
|
||||
STEAM_CALLBACK_MEMBER(1, const char *, pBGRA ) // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called
|
||||
STEAM_CALLBACK_MEMBER(2, uint32, unWide) // the total width of the pBGRA texture
|
||||
STEAM_CALLBACK_MEMBER(3, uint32, unTall) // the total height of the pBGRA texture
|
||||
STEAM_CALLBACK_MEMBER(4, uint32, unUpdateX) // the offset in X for the damage rect for this update
|
||||
STEAM_CALLBACK_MEMBER(5, uint32, unUpdateY) // the offset in Y for the damage rect for this update
|
||||
STEAM_CALLBACK_MEMBER(6, uint32, unUpdateWide) // the width of the damage rect for this update
|
||||
STEAM_CALLBACK_MEMBER(7, uint32, unUpdateTall) // the height of the damage rect for this update
|
||||
STEAM_CALLBACK_MEMBER(8, uint32, unScrollX) // the page scroll the browser was at when this texture was rendered
|
||||
STEAM_CALLBACK_MEMBER(9, uint32, unScrollY) // the page scroll the browser was at when this texture was rendered
|
||||
STEAM_CALLBACK_MEMBER(10, float, flPageScale) // the page scale factor on this page when rendered
|
||||
STEAM_CALLBACK_MEMBER(11, uint32, unPageSerial) // incremented on each new page load, you can use this to reject draws while navigating to new pages
|
||||
STEAM_CALLBACK_END(12)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser wanted to navigate to a new page
|
||||
// NOTE - you MUST call AllowStartRequest in response to this callback
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN(HTML_StartRequest_t, k_iSteamHTMLSurfaceCallbacks + 3)
|
||||
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface navigating
|
||||
STEAM_CALLBACK_MEMBER(1, const char *, pchURL) // the url they wish to navigate to
|
||||
STEAM_CALLBACK_MEMBER(2, const char *, pchTarget) // the html link target type (i.e _blank, _self, _parent, _top )
|
||||
STEAM_CALLBACK_MEMBER(3, const char *, pchPostData ) // any posted data for the request
|
||||
STEAM_CALLBACK_MEMBER(4, bool, bIsRedirect) // true if this was a http/html redirect from the last load request
|
||||
STEAM_CALLBACK_END(5)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call)
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN(HTML_CloseBrowser_t, k_iSteamHTMLSurfaceCallbacks + 4)
|
||||
STEAM_CALLBACK_MEMBER(0, HHTMLBrowser, unBrowserHandle) // the handle of the surface
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the browser is navigating to a new url
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_URLChanged_t, k_iSteamHTMLSurfaceCallbacks + 5 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface navigating
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the url they wish to navigate to
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchPostData ) // any posted data for the request
|
||||
STEAM_CALLBACK_MEMBER( 3, bool, bIsRedirect ) // true if this was a http/html redirect from the last load request
|
||||
STEAM_CALLBACK_MEMBER( 4, const char *, pchPageTitle ) // the title of the page
|
||||
STEAM_CALLBACK_MEMBER( 5, bool, bNewNavigation ) // true if this was from a fresh tab and not a click on an existing page
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: A page is finished loading
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_FinishedRequest_t, k_iSteamHTMLSurfaceCallbacks + 6 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchPageTitle ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a request to load this url in a new tab
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_OpenLinkInNewTab_t, k_iSteamHTMLSurfaceCallbacks + 7 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: the page has a new title now
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_ChangedTitle_t, k_iSteamHTMLSurfaceCallbacks + 8 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: results from a search
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_SearchResults_t, k_iSteamHTMLSurfaceCallbacks + 9 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, unResults ) //
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, unCurrentMatch ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: page history status changed on the ability to go backwards and forward
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_CanGoBackAndForward_t, k_iSteamHTMLSurfaceCallbacks + 10 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, bool, bCanGoBack ) //
|
||||
STEAM_CALLBACK_MEMBER( 2, bool, bCanGoForward ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: details on the visibility and size of the horizontal scrollbar
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_HorizontalScroll_t, k_iSteamHTMLSurfaceCallbacks + 11 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
|
||||
STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) //
|
||||
STEAM_CALLBACK_MEMBER( 4, bool , bVisible ) //
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: details on the visibility and size of the vertical scrollbar
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_VerticalScroll_t, k_iSteamHTMLSurfaceCallbacks + 12 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, unScrollMax ) //
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, unScrollCurrent ) //
|
||||
STEAM_CALLBACK_MEMBER( 3, float, flPageScale ) //
|
||||
STEAM_CALLBACK_MEMBER( 4, bool, bVisible ) //
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unPageSize ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: response to GetLinkAtPosition call
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_LinkAtPosition_t, k_iSteamHTMLSurfaceCallbacks + 13 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, x ) // NOTE - Not currently set
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, y ) // NOTE - Not currently set
|
||||
STEAM_CALLBACK_MEMBER( 3, const char *, pchURL ) //
|
||||
STEAM_CALLBACK_MEMBER( 4, bool, bInput ) //
|
||||
STEAM_CALLBACK_MEMBER( 5, bool, bLiveLink ) //
|
||||
STEAM_CALLBACK_END(6)
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a Javascript alert dialog, call JSDialogResponse
|
||||
// when the user dismisses this dialog (or right away to ignore it)
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_JSAlert_t, k_iSteamHTMLSurfaceCallbacks + 14 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a Javascript confirmation dialog, call JSDialogResponse
|
||||
// when the user dismisses this dialog (or right away to ignore it)
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_JSConfirm_t, k_iSteamHTMLSurfaceCallbacks + 15 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMessage ) //
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when received show a file open dialog
|
||||
// then call FileLoadDialogResponse with the file(s) the user selected.
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_FileOpenDialog_t, k_iSteamHTMLSurfaceCallbacks + 16 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchTitle ) //
|
||||
STEAM_CALLBACK_MEMBER( 2, const char *, pchInitialFile ) //
|
||||
STEAM_CALLBACK_END(3)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: a new html window is being created.
|
||||
//
|
||||
// IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or
|
||||
// render the contents of this new window, so the new window is always destroyed
|
||||
// immediately. The URL and other parameters of the new window are passed here
|
||||
// to give your application the opportunity to call CreateBrowser and set up
|
||||
// a new browser in response to the attempted popup, if you wish to do so.
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_NewWindow_t, k_iSteamHTMLSurfaceCallbacks + 21 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the current surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchURL ) // the page to load
|
||||
STEAM_CALLBACK_MEMBER( 2, uint32, unX ) // the x pos into the page to display the popup
|
||||
STEAM_CALLBACK_MEMBER( 3, uint32, unY ) // the y pos into the page to display the popup
|
||||
STEAM_CALLBACK_MEMBER( 4, uint32, unWide ) // the total width of the pBGRA texture
|
||||
STEAM_CALLBACK_MEMBER( 5, uint32, unTall ) // the total height of the pBGRA texture
|
||||
STEAM_CALLBACK_MEMBER( 6, HHTMLBrowser, unNewWindow_BrowserHandle_IGNORE )
|
||||
STEAM_CALLBACK_END(7)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: change the cursor to display
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_SetCursor_t, k_iSteamHTMLSurfaceCallbacks + 22 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, uint32, eMouseCursor ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: informational message from the browser
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_StatusText_t, k_iSteamHTMLSurfaceCallbacks + 23 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: show a tooltip
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_ShowToolTip_t, k_iSteamHTMLSurfaceCallbacks + 24 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: update the text of an existing tooltip
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_UpdateToolTip_t, k_iSteamHTMLSurfaceCallbacks + 25 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_MEMBER( 1, const char *, pchMsg ) // the EMouseCursor to display
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: hide the tooltip you are showing
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_HideToolTip_t, k_iSteamHTMLSurfaceCallbacks + 26 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // the handle of the surface
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: The browser has restarted due to an internal failure, use this new handle value
|
||||
//-----------------------------------------------------------------------------
|
||||
STEAM_CALLBACK_BEGIN( HTML_BrowserRestarted_t, k_iSteamHTMLSurfaceCallbacks + 27 )
|
||||
STEAM_CALLBACK_MEMBER( 0, HHTMLBrowser, unBrowserHandle ) // this is the new browser handle after the restart
|
||||
STEAM_CALLBACK_MEMBER( 1, HHTMLBrowser, unOldBrowserHandle ) // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls
|
||||
STEAM_CALLBACK_END(2)
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMHTMLSURFACE_H
|
219
lsteamclient/steamworks_sdk_152/isteamhttp.h
Normal file
219
lsteamclient/steamworks_sdk_152/isteamhttp.h
Normal file
@ -0,0 +1,219 @@
|
||||
//====== Copyright © 1996-2009, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to http client
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMHTTP_H
|
||||
#define ISTEAMHTTP_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "steamhttpenums.h"
|
||||
|
||||
// Handle to a HTTP Request handle
|
||||
typedef uint32 HTTPRequestHandle;
|
||||
#define INVALID_HTTPREQUEST_HANDLE 0
|
||||
|
||||
typedef uint32 HTTPCookieContainerHandle;
|
||||
#define INVALID_HTTPCOOKIE_HANDLE 0
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface to http client
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamHTTP
|
||||
{
|
||||
public:
|
||||
|
||||
// Initializes a new HTTP request, returning a handle to use in further operations on it. Requires
|
||||
// the method (GET or POST) and the absolute URL for the request. Both http and https are supported,
|
||||
// so this string must start with http:// or https:// and should look like http://store.steampowered.com/app/250/
|
||||
// or such.
|
||||
virtual HTTPRequestHandle CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) = 0;
|
||||
|
||||
// Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after
|
||||
// sending the request. This is just so the caller can easily keep track of which callbacks go with which request data.
|
||||
virtual bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) = 0;
|
||||
|
||||
// Set a timeout in seconds for the HTTP request, must be called prior to sending the request. Default
|
||||
// timeout is 60 seconds if you don't call this. Returns false if the handle is invalid, or the request
|
||||
// has already been sent.
|
||||
virtual bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint32 unTimeoutSeconds ) = 0;
|
||||
|
||||
// Set a request header value for the request, must be called prior to sending the request. Will
|
||||
// return false if the handle is invalid or the request is already sent.
|
||||
virtual bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, const char *pchHeaderValue ) = 0;
|
||||
|
||||
// Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified
|
||||
// when creating the request. Must be called prior to sending the request. Will return false if the
|
||||
// handle is invalid or the request is already sent.
|
||||
virtual bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, const char *pchParamName, const char *pchParamValue ) = 0;
|
||||
|
||||
// Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on
|
||||
// asynchronous response via callback.
|
||||
//
|
||||
// Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control
|
||||
// header and only do a local cache lookup rather than sending any actual remote request.
|
||||
virtual bool SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0;
|
||||
|
||||
// Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on
|
||||
// asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and
|
||||
// HTTPRequestDataReceived_t callbacks while streaming.
|
||||
virtual bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) = 0;
|
||||
|
||||
// Defers a request you have sent, the actual HTTP client code may have many requests queued, and this will move
|
||||
// the specified request to the tail of the queue. Returns false on invalid handle, or if the request is not yet sent.
|
||||
virtual bool DeferHTTPRequest( HTTPRequestHandle hRequest ) = 0;
|
||||
|
||||
// Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move
|
||||
// the specified request to the head of the queue. Returns false on invalid handle, or if the request is not yet sent.
|
||||
virtual bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) = 0;
|
||||
|
||||
// Checks if a response header is present in a HTTP response given a handle from HTTPRequestCompleted_t, also
|
||||
// returns the size of the header value if present so the caller and allocate a correctly sized buffer for
|
||||
// GetHTTPResponseHeaderValue.
|
||||
virtual bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, const char *pchHeaderName, uint32 *unResponseHeaderSize ) = 0;
|
||||
|
||||
// Gets header values from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
|
||||
// header is not present or if your buffer is too small to contain it's value. You should first call
|
||||
// BGetHTTPResponseHeaderSize to check for the presence of the header and to find out the size buffer needed.
|
||||
virtual bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, const char *pchHeaderName, uint8 *pHeaderValueBuffer, uint32 unBufferSize ) = 0;
|
||||
|
||||
// Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
|
||||
// handle is invalid.
|
||||
virtual bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, uint32 *unBodySize ) = 0;
|
||||
|
||||
// Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
|
||||
// handle is invalid or is to a streaming response, or if the provided buffer is not the correct size. Use BGetHTTPResponseBodySize first to find out
|
||||
// the correct buffer size to use.
|
||||
virtual bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0;
|
||||
|
||||
// Gets the body data from a streaming HTTP response given a handle from HTTPRequestDataReceived_t. Will return false if the
|
||||
// handle is invalid or is to a non-streaming response (meaning it wasn't sent with SendHTTPRequestAndStreamResponse), or if the buffer size and offset
|
||||
// do not match the size and offset sent in HTTPRequestDataReceived_t.
|
||||
virtual bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint32 cOffset, uint8 *pBodyDataBuffer, uint32 unBufferSize ) = 0;
|
||||
|
||||
// Releases an HTTP response handle, should always be called to free resources after receiving a HTTPRequestCompleted_t
|
||||
// callback and finishing using the response.
|
||||
virtual bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) = 0;
|
||||
|
||||
// Gets progress on downloading the body for the request. This will be zero unless a response header has already been
|
||||
// received which included a content-length field. For responses that contain no content-length it will report
|
||||
// zero for the duration of the request as the size is unknown until the connection closes.
|
||||
virtual bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float *pflPercentOut ) = 0;
|
||||
|
||||
// Sets the body for an HTTP Post request. Will fail and return false on a GET request, and will fail if POST params
|
||||
// have already been set for the request. Setting this raw body makes it the only contents for the post, the pchContentType
|
||||
// parameter will set the content-type header for the request so the server may know how to interpret the body.
|
||||
virtual bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) = 0;
|
||||
|
||||
// Creates a cookie container handle which you must later free with ReleaseCookieContainer(). If bAllowResponsesToModify=true
|
||||
// than any response to your requests using this cookie container may add new cookies which may be transmitted with
|
||||
// future requests. If bAllowResponsesToModify=false than only cookies you explicitly set will be sent. This API is just for
|
||||
// during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across
|
||||
// repeat executions of your process.
|
||||
virtual HTTPCookieContainerHandle CreateCookieContainer( bool bAllowResponsesToModify ) = 0;
|
||||
|
||||
// Release a cookie container you are finished using, freeing it's memory
|
||||
virtual bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer ) = 0;
|
||||
|
||||
// Adds a cookie to the specified cookie container that will be used with future requests.
|
||||
virtual bool SetCookie( HTTPCookieContainerHandle hCookieContainer, const char *pchHost, const char *pchUrl, const char *pchCookie ) = 0;
|
||||
|
||||
// Set the cookie container to use for a HTTP request
|
||||
virtual bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer ) = 0;
|
||||
|
||||
// Set the extra user agent info for a request, this doesn't clobber the normal user agent, it just adds the extra info on the end
|
||||
virtual bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, const char *pchUserAgentInfo ) = 0;
|
||||
|
||||
// Disable or re-enable verification of SSL/TLS certificates.
|
||||
// By default, certificates are checked for all HTTPS requests.
|
||||
virtual bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate ) = 0;
|
||||
|
||||
// Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout
|
||||
// which can bump everytime we get more data
|
||||
virtual bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint32 unMilliseconds ) = 0;
|
||||
|
||||
// Check if the reason the request failed was because we timed it out (rather than some harder failure)
|
||||
virtual bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMHTTP_INTERFACE_VERSION "STEAMHTTP_INTERFACE_VERSION003"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamHTTP *SteamHTTP();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamHTTP, STEAMHTTP_INTERFACE_VERSION );
|
||||
|
||||
// Global accessor for the gameserver client
|
||||
inline ISteamHTTP *SteamGameServerHTTP();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamHTTP *, SteamGameServerHTTP, STEAMHTTP_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
struct HTTPRequestCompleted_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientHTTPCallbacks + 1 };
|
||||
|
||||
// Handle value for the request that has completed.
|
||||
HTTPRequestHandle m_hRequest;
|
||||
|
||||
// Context value that the user defined on the request that this callback is associated with, 0 if
|
||||
// no context value was set.
|
||||
uint64 m_ulContextValue;
|
||||
|
||||
// This will be true if we actually got any sort of response from the server (even an error).
|
||||
// It will be false if we failed due to an internal error or client side network failure.
|
||||
bool m_bRequestSuccessful;
|
||||
|
||||
// Will be the HTTP status code value returned by the server, k_EHTTPStatusCode200OK is the normal
|
||||
// OK response, if you get something else you probably need to treat it as a failure.
|
||||
EHTTPStatusCode m_eStatusCode;
|
||||
|
||||
uint32 m_unBodySize; // Same as GetHTTPResponseBodySize()
|
||||
};
|
||||
|
||||
|
||||
struct HTTPRequestHeadersReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientHTTPCallbacks + 2 };
|
||||
|
||||
// Handle value for the request that has received headers.
|
||||
HTTPRequestHandle m_hRequest;
|
||||
|
||||
// Context value that the user defined on the request that this callback is associated with, 0 if
|
||||
// no context value was set.
|
||||
uint64 m_ulContextValue;
|
||||
};
|
||||
|
||||
struct HTTPRequestDataReceived_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientHTTPCallbacks + 3 };
|
||||
|
||||
// Handle value for the request that has received data.
|
||||
HTTPRequestHandle m_hRequest;
|
||||
|
||||
// Context value that the user defined on the request that this callback is associated with, 0 if
|
||||
// no context value was set.
|
||||
uint64 m_ulContextValue;
|
||||
|
||||
|
||||
// Offset to provide to GetHTTPStreamingResponseBodyData to get this chunk of data
|
||||
uint32 m_cOffset;
|
||||
|
||||
// Size to provide to GetHTTPStreamingResponseBodyData to get this chunk of data
|
||||
uint32 m_cBytesReceived;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMHTTP_H
|
861
lsteamclient/steamworks_sdk_152/isteaminput.h
Normal file
861
lsteamclient/steamworks_sdk_152/isteaminput.h
Normal file
@ -0,0 +1,861 @@
|
||||
//====== Copyright 1996-2018, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: Steam Input is a flexible input API that supports over three hundred devices including all
|
||||
// common variants of Xbox, Playstation, Nintendo Switch Pro, and Steam Controllers.
|
||||
// For more info including a getting started guide for developers
|
||||
// please visit: https://partner.steamgames.com/doc/features/steam_controller
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMINPUT_H
|
||||
#define ISTEAMINPUT_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
#define STEAM_INPUT_MAX_COUNT 16
|
||||
|
||||
#define STEAM_INPUT_MAX_ANALOG_ACTIONS 16
|
||||
|
||||
#define STEAM_INPUT_MAX_DIGITAL_ACTIONS 128
|
||||
|
||||
#define STEAM_INPUT_MAX_ORIGINS 8
|
||||
|
||||
#define STEAM_INPUT_MAX_ACTIVE_LAYERS 16
|
||||
|
||||
// When sending an option to a specific controller handle, you can send to all devices via this command
|
||||
#define STEAM_INPUT_HANDLE_ALL_CONTROLLERS UINT64_MAX
|
||||
|
||||
#define STEAM_INPUT_MIN_ANALOG_ACTION_DATA -1.0f
|
||||
#define STEAM_INPUT_MAX_ANALOG_ACTION_DATA 1.0f
|
||||
|
||||
enum EInputSourceMode
|
||||
{
|
||||
k_EInputSourceMode_None,
|
||||
k_EInputSourceMode_Dpad,
|
||||
k_EInputSourceMode_Buttons,
|
||||
k_EInputSourceMode_FourButtons,
|
||||
k_EInputSourceMode_AbsoluteMouse,
|
||||
k_EInputSourceMode_RelativeMouse,
|
||||
k_EInputSourceMode_JoystickMove,
|
||||
k_EInputSourceMode_JoystickMouse,
|
||||
k_EInputSourceMode_JoystickCamera,
|
||||
k_EInputSourceMode_ScrollWheel,
|
||||
k_EInputSourceMode_Trigger,
|
||||
k_EInputSourceMode_TouchMenu,
|
||||
k_EInputSourceMode_MouseJoystick,
|
||||
k_EInputSourceMode_MouseRegion,
|
||||
k_EInputSourceMode_RadialMenu,
|
||||
k_EInputSourceMode_SingleButton,
|
||||
k_EInputSourceMode_Switches
|
||||
};
|
||||
|
||||
// Note: Please do not use action origins as a way to identify controller types. There is no
|
||||
// guarantee that they will be added in a contiguous manner - use GetInputTypeForHandle instead.
|
||||
// Versions of Steam that add new controller types in the future will extend this enum so if you're
|
||||
// using a lookup table please check the bounds of any origins returned by Steam.
|
||||
enum EInputActionOrigin
|
||||
{
|
||||
// Steam Controller
|
||||
k_EInputActionOrigin_None,
|
||||
k_EInputActionOrigin_SteamController_A,
|
||||
k_EInputActionOrigin_SteamController_B,
|
||||
k_EInputActionOrigin_SteamController_X,
|
||||
k_EInputActionOrigin_SteamController_Y,
|
||||
k_EInputActionOrigin_SteamController_LeftBumper,
|
||||
k_EInputActionOrigin_SteamController_RightBumper,
|
||||
k_EInputActionOrigin_SteamController_LeftGrip,
|
||||
k_EInputActionOrigin_SteamController_RightGrip,
|
||||
k_EInputActionOrigin_SteamController_Start,
|
||||
k_EInputActionOrigin_SteamController_Back,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_Touch,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_Swipe,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_Click,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_DPadNorth,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_DPadSouth,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_DPadWest,
|
||||
k_EInputActionOrigin_SteamController_LeftPad_DPadEast,
|
||||
k_EInputActionOrigin_SteamController_RightPad_Touch,
|
||||
k_EInputActionOrigin_SteamController_RightPad_Swipe,
|
||||
k_EInputActionOrigin_SteamController_RightPad_Click,
|
||||
k_EInputActionOrigin_SteamController_RightPad_DPadNorth,
|
||||
k_EInputActionOrigin_SteamController_RightPad_DPadSouth,
|
||||
k_EInputActionOrigin_SteamController_RightPad_DPadWest,
|
||||
k_EInputActionOrigin_SteamController_RightPad_DPadEast,
|
||||
k_EInputActionOrigin_SteamController_LeftTrigger_Pull,
|
||||
k_EInputActionOrigin_SteamController_LeftTrigger_Click,
|
||||
k_EInputActionOrigin_SteamController_RightTrigger_Pull,
|
||||
k_EInputActionOrigin_SteamController_RightTrigger_Click,
|
||||
k_EInputActionOrigin_SteamController_LeftStick_Move,
|
||||
k_EInputActionOrigin_SteamController_LeftStick_Click,
|
||||
k_EInputActionOrigin_SteamController_LeftStick_DPadNorth,
|
||||
k_EInputActionOrigin_SteamController_LeftStick_DPadSouth,
|
||||
k_EInputActionOrigin_SteamController_LeftStick_DPadWest,
|
||||
k_EInputActionOrigin_SteamController_LeftStick_DPadEast,
|
||||
k_EInputActionOrigin_SteamController_Gyro_Move,
|
||||
k_EInputActionOrigin_SteamController_Gyro_Pitch,
|
||||
k_EInputActionOrigin_SteamController_Gyro_Yaw,
|
||||
k_EInputActionOrigin_SteamController_Gyro_Roll,
|
||||
k_EInputActionOrigin_SteamController_Reserved0,
|
||||
k_EInputActionOrigin_SteamController_Reserved1,
|
||||
k_EInputActionOrigin_SteamController_Reserved2,
|
||||
k_EInputActionOrigin_SteamController_Reserved3,
|
||||
k_EInputActionOrigin_SteamController_Reserved4,
|
||||
k_EInputActionOrigin_SteamController_Reserved5,
|
||||
k_EInputActionOrigin_SteamController_Reserved6,
|
||||
k_EInputActionOrigin_SteamController_Reserved7,
|
||||
k_EInputActionOrigin_SteamController_Reserved8,
|
||||
k_EInputActionOrigin_SteamController_Reserved9,
|
||||
k_EInputActionOrigin_SteamController_Reserved10,
|
||||
|
||||
// PS4 Dual Shock
|
||||
k_EInputActionOrigin_PS4_X,
|
||||
k_EInputActionOrigin_PS4_Circle,
|
||||
k_EInputActionOrigin_PS4_Triangle,
|
||||
k_EInputActionOrigin_PS4_Square,
|
||||
k_EInputActionOrigin_PS4_LeftBumper,
|
||||
k_EInputActionOrigin_PS4_RightBumper,
|
||||
k_EInputActionOrigin_PS4_Options, //Start
|
||||
k_EInputActionOrigin_PS4_Share, //Back
|
||||
k_EInputActionOrigin_PS4_LeftPad_Touch,
|
||||
k_EInputActionOrigin_PS4_LeftPad_Swipe,
|
||||
k_EInputActionOrigin_PS4_LeftPad_Click,
|
||||
k_EInputActionOrigin_PS4_LeftPad_DPadNorth,
|
||||
k_EInputActionOrigin_PS4_LeftPad_DPadSouth,
|
||||
k_EInputActionOrigin_PS4_LeftPad_DPadWest,
|
||||
k_EInputActionOrigin_PS4_LeftPad_DPadEast,
|
||||
k_EInputActionOrigin_PS4_RightPad_Touch,
|
||||
k_EInputActionOrigin_PS4_RightPad_Swipe,
|
||||
k_EInputActionOrigin_PS4_RightPad_Click,
|
||||
k_EInputActionOrigin_PS4_RightPad_DPadNorth,
|
||||
k_EInputActionOrigin_PS4_RightPad_DPadSouth,
|
||||
k_EInputActionOrigin_PS4_RightPad_DPadWest,
|
||||
k_EInputActionOrigin_PS4_RightPad_DPadEast,
|
||||
k_EInputActionOrigin_PS4_CenterPad_Touch,
|
||||
k_EInputActionOrigin_PS4_CenterPad_Swipe,
|
||||
k_EInputActionOrigin_PS4_CenterPad_Click,
|
||||
k_EInputActionOrigin_PS4_CenterPad_DPadNorth,
|
||||
k_EInputActionOrigin_PS4_CenterPad_DPadSouth,
|
||||
k_EInputActionOrigin_PS4_CenterPad_DPadWest,
|
||||
k_EInputActionOrigin_PS4_CenterPad_DPadEast,
|
||||
k_EInputActionOrigin_PS4_LeftTrigger_Pull,
|
||||
k_EInputActionOrigin_PS4_LeftTrigger_Click,
|
||||
k_EInputActionOrigin_PS4_RightTrigger_Pull,
|
||||
k_EInputActionOrigin_PS4_RightTrigger_Click,
|
||||
k_EInputActionOrigin_PS4_LeftStick_Move,
|
||||
k_EInputActionOrigin_PS4_LeftStick_Click,
|
||||
k_EInputActionOrigin_PS4_LeftStick_DPadNorth,
|
||||
k_EInputActionOrigin_PS4_LeftStick_DPadSouth,
|
||||
k_EInputActionOrigin_PS4_LeftStick_DPadWest,
|
||||
k_EInputActionOrigin_PS4_LeftStick_DPadEast,
|
||||
k_EInputActionOrigin_PS4_RightStick_Move,
|
||||
k_EInputActionOrigin_PS4_RightStick_Click,
|
||||
k_EInputActionOrigin_PS4_RightStick_DPadNorth,
|
||||
k_EInputActionOrigin_PS4_RightStick_DPadSouth,
|
||||
k_EInputActionOrigin_PS4_RightStick_DPadWest,
|
||||
k_EInputActionOrigin_PS4_RightStick_DPadEast,
|
||||
k_EInputActionOrigin_PS4_DPad_North,
|
||||
k_EInputActionOrigin_PS4_DPad_South,
|
||||
k_EInputActionOrigin_PS4_DPad_West,
|
||||
k_EInputActionOrigin_PS4_DPad_East,
|
||||
k_EInputActionOrigin_PS4_Gyro_Move,
|
||||
k_EInputActionOrigin_PS4_Gyro_Pitch,
|
||||
k_EInputActionOrigin_PS4_Gyro_Yaw,
|
||||
k_EInputActionOrigin_PS4_Gyro_Roll,
|
||||
k_EInputActionOrigin_PS4_DPad_Move,
|
||||
k_EInputActionOrigin_PS4_Reserved1,
|
||||
k_EInputActionOrigin_PS4_Reserved2,
|
||||
k_EInputActionOrigin_PS4_Reserved3,
|
||||
k_EInputActionOrigin_PS4_Reserved4,
|
||||
k_EInputActionOrigin_PS4_Reserved5,
|
||||
k_EInputActionOrigin_PS4_Reserved6,
|
||||
k_EInputActionOrigin_PS4_Reserved7,
|
||||
k_EInputActionOrigin_PS4_Reserved8,
|
||||
k_EInputActionOrigin_PS4_Reserved9,
|
||||
k_EInputActionOrigin_PS4_Reserved10,
|
||||
|
||||
// XBox One
|
||||
k_EInputActionOrigin_XBoxOne_A,
|
||||
k_EInputActionOrigin_XBoxOne_B,
|
||||
k_EInputActionOrigin_XBoxOne_X,
|
||||
k_EInputActionOrigin_XBoxOne_Y,
|
||||
k_EInputActionOrigin_XBoxOne_LeftBumper,
|
||||
k_EInputActionOrigin_XBoxOne_RightBumper,
|
||||
k_EInputActionOrigin_XBoxOne_Menu, //Start
|
||||
k_EInputActionOrigin_XBoxOne_View, //Back
|
||||
k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull,
|
||||
k_EInputActionOrigin_XBoxOne_LeftTrigger_Click,
|
||||
k_EInputActionOrigin_XBoxOne_RightTrigger_Pull,
|
||||
k_EInputActionOrigin_XBoxOne_RightTrigger_Click,
|
||||
k_EInputActionOrigin_XBoxOne_LeftStick_Move,
|
||||
k_EInputActionOrigin_XBoxOne_LeftStick_Click,
|
||||
k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth,
|
||||
k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth,
|
||||
k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest,
|
||||
k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast,
|
||||
k_EInputActionOrigin_XBoxOne_RightStick_Move,
|
||||
k_EInputActionOrigin_XBoxOne_RightStick_Click,
|
||||
k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth,
|
||||
k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth,
|
||||
k_EInputActionOrigin_XBoxOne_RightStick_DPadWest,
|
||||
k_EInputActionOrigin_XBoxOne_RightStick_DPadEast,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_North,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_South,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_West,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_East,
|
||||
k_EInputActionOrigin_XBoxOne_DPad_Move,
|
||||
k_EInputActionOrigin_XBoxOne_LeftGrip_Lower,
|
||||
k_EInputActionOrigin_XBoxOne_LeftGrip_Upper,
|
||||
k_EInputActionOrigin_XBoxOne_RightGrip_Lower,
|
||||
k_EInputActionOrigin_XBoxOne_RightGrip_Upper,
|
||||
k_EInputActionOrigin_XBoxOne_Share, // Xbox Series X controllers only
|
||||
k_EInputActionOrigin_XBoxOne_Reserved6,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved7,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved8,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved9,
|
||||
k_EInputActionOrigin_XBoxOne_Reserved10,
|
||||
|
||||
// XBox 360
|
||||
k_EInputActionOrigin_XBox360_A,
|
||||
k_EInputActionOrigin_XBox360_B,
|
||||
k_EInputActionOrigin_XBox360_X,
|
||||
k_EInputActionOrigin_XBox360_Y,
|
||||
k_EInputActionOrigin_XBox360_LeftBumper,
|
||||
k_EInputActionOrigin_XBox360_RightBumper,
|
||||
k_EInputActionOrigin_XBox360_Start, //Start
|
||||
k_EInputActionOrigin_XBox360_Back, //Back
|
||||
k_EInputActionOrigin_XBox360_LeftTrigger_Pull,
|
||||
k_EInputActionOrigin_XBox360_LeftTrigger_Click,
|
||||
k_EInputActionOrigin_XBox360_RightTrigger_Pull,
|
||||
k_EInputActionOrigin_XBox360_RightTrigger_Click,
|
||||
k_EInputActionOrigin_XBox360_LeftStick_Move,
|
||||
k_EInputActionOrigin_XBox360_LeftStick_Click,
|
||||
k_EInputActionOrigin_XBox360_LeftStick_DPadNorth,
|
||||
k_EInputActionOrigin_XBox360_LeftStick_DPadSouth,
|
||||
k_EInputActionOrigin_XBox360_LeftStick_DPadWest,
|
||||
k_EInputActionOrigin_XBox360_LeftStick_DPadEast,
|
||||
k_EInputActionOrigin_XBox360_RightStick_Move,
|
||||
k_EInputActionOrigin_XBox360_RightStick_Click,
|
||||
k_EInputActionOrigin_XBox360_RightStick_DPadNorth,
|
||||
k_EInputActionOrigin_XBox360_RightStick_DPadSouth,
|
||||
k_EInputActionOrigin_XBox360_RightStick_DPadWest,
|
||||
k_EInputActionOrigin_XBox360_RightStick_DPadEast,
|
||||
k_EInputActionOrigin_XBox360_DPad_North,
|
||||
k_EInputActionOrigin_XBox360_DPad_South,
|
||||
k_EInputActionOrigin_XBox360_DPad_West,
|
||||
k_EInputActionOrigin_XBox360_DPad_East,
|
||||
k_EInputActionOrigin_XBox360_DPad_Move,
|
||||
k_EInputActionOrigin_XBox360_Reserved1,
|
||||
k_EInputActionOrigin_XBox360_Reserved2,
|
||||
k_EInputActionOrigin_XBox360_Reserved3,
|
||||
k_EInputActionOrigin_XBox360_Reserved4,
|
||||
k_EInputActionOrigin_XBox360_Reserved5,
|
||||
k_EInputActionOrigin_XBox360_Reserved6,
|
||||
k_EInputActionOrigin_XBox360_Reserved7,
|
||||
k_EInputActionOrigin_XBox360_Reserved8,
|
||||
k_EInputActionOrigin_XBox360_Reserved9,
|
||||
k_EInputActionOrigin_XBox360_Reserved10,
|
||||
|
||||
|
||||
// Switch - Pro or Joycons used as a single input device.
|
||||
// This does not apply to a single joycon
|
||||
k_EInputActionOrigin_Switch_A,
|
||||
k_EInputActionOrigin_Switch_B,
|
||||
k_EInputActionOrigin_Switch_X,
|
||||
k_EInputActionOrigin_Switch_Y,
|
||||
k_EInputActionOrigin_Switch_LeftBumper,
|
||||
k_EInputActionOrigin_Switch_RightBumper,
|
||||
k_EInputActionOrigin_Switch_Plus, //Start
|
||||
k_EInputActionOrigin_Switch_Minus, //Back
|
||||
k_EInputActionOrigin_Switch_Capture,
|
||||
k_EInputActionOrigin_Switch_LeftTrigger_Pull,
|
||||
k_EInputActionOrigin_Switch_LeftTrigger_Click,
|
||||
k_EInputActionOrigin_Switch_RightTrigger_Pull,
|
||||
k_EInputActionOrigin_Switch_RightTrigger_Click,
|
||||
k_EInputActionOrigin_Switch_LeftStick_Move,
|
||||
k_EInputActionOrigin_Switch_LeftStick_Click,
|
||||
k_EInputActionOrigin_Switch_LeftStick_DPadNorth,
|
||||
k_EInputActionOrigin_Switch_LeftStick_DPadSouth,
|
||||
k_EInputActionOrigin_Switch_LeftStick_DPadWest,
|
||||
k_EInputActionOrigin_Switch_LeftStick_DPadEast,
|
||||
k_EInputActionOrigin_Switch_RightStick_Move,
|
||||
k_EInputActionOrigin_Switch_RightStick_Click,
|
||||
k_EInputActionOrigin_Switch_RightStick_DPadNorth,
|
||||
k_EInputActionOrigin_Switch_RightStick_DPadSouth,
|
||||
k_EInputActionOrigin_Switch_RightStick_DPadWest,
|
||||
k_EInputActionOrigin_Switch_RightStick_DPadEast,
|
||||
k_EInputActionOrigin_Switch_DPad_North,
|
||||
k_EInputActionOrigin_Switch_DPad_South,
|
||||
k_EInputActionOrigin_Switch_DPad_West,
|
||||
k_EInputActionOrigin_Switch_DPad_East,
|
||||
k_EInputActionOrigin_Switch_ProGyro_Move, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EInputActionOrigin_Switch_ProGyro_Pitch, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EInputActionOrigin_Switch_ProGyro_Yaw, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EInputActionOrigin_Switch_ProGyro_Roll, // Primary Gyro in Pro Controller, or Right JoyCon
|
||||
k_EInputActionOrigin_Switch_DPad_Move,
|
||||
k_EInputActionOrigin_Switch_Reserved1,
|
||||
k_EInputActionOrigin_Switch_Reserved2,
|
||||
k_EInputActionOrigin_Switch_Reserved3,
|
||||
k_EInputActionOrigin_Switch_Reserved4,
|
||||
k_EInputActionOrigin_Switch_Reserved5,
|
||||
k_EInputActionOrigin_Switch_Reserved6,
|
||||
k_EInputActionOrigin_Switch_Reserved7,
|
||||
k_EInputActionOrigin_Switch_Reserved8,
|
||||
k_EInputActionOrigin_Switch_Reserved9,
|
||||
k_EInputActionOrigin_Switch_Reserved10,
|
||||
|
||||
// Switch JoyCon Specific
|
||||
k_EInputActionOrigin_Switch_RightGyro_Move, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EInputActionOrigin_Switch_RightGyro_Pitch, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EInputActionOrigin_Switch_RightGyro_Yaw, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EInputActionOrigin_Switch_RightGyro_Roll, // Right JoyCon Gyro generally should correspond to Pro's single gyro
|
||||
k_EInputActionOrigin_Switch_LeftGyro_Move,
|
||||
k_EInputActionOrigin_Switch_LeftGyro_Pitch,
|
||||
k_EInputActionOrigin_Switch_LeftGyro_Yaw,
|
||||
k_EInputActionOrigin_Switch_LeftGyro_Roll,
|
||||
k_EInputActionOrigin_Switch_LeftGrip_Lower, // Left JoyCon SR Button
|
||||
k_EInputActionOrigin_Switch_LeftGrip_Upper, // Left JoyCon SL Button
|
||||
k_EInputActionOrigin_Switch_RightGrip_Lower, // Right JoyCon SL Button
|
||||
k_EInputActionOrigin_Switch_RightGrip_Upper, // Right JoyCon SR Button
|
||||
k_EInputActionOrigin_Switch_Reserved11,
|
||||
k_EInputActionOrigin_Switch_Reserved12,
|
||||
k_EInputActionOrigin_Switch_Reserved13,
|
||||
k_EInputActionOrigin_Switch_Reserved14,
|
||||
k_EInputActionOrigin_Switch_Reserved15,
|
||||
k_EInputActionOrigin_Switch_Reserved16,
|
||||
k_EInputActionOrigin_Switch_Reserved17,
|
||||
k_EInputActionOrigin_Switch_Reserved18,
|
||||
k_EInputActionOrigin_Switch_Reserved19,
|
||||
k_EInputActionOrigin_Switch_Reserved20,
|
||||
|
||||
// Added in SDK 1.51
|
||||
k_EInputActionOrigin_PS5_X,
|
||||
k_EInputActionOrigin_PS5_Circle,
|
||||
k_EInputActionOrigin_PS5_Triangle,
|
||||
k_EInputActionOrigin_PS5_Square,
|
||||
k_EInputActionOrigin_PS5_LeftBumper,
|
||||
k_EInputActionOrigin_PS5_RightBumper,
|
||||
k_EInputActionOrigin_PS5_Option, //Start
|
||||
k_EInputActionOrigin_PS5_Create, //Back
|
||||
k_EInputActionOrigin_PS5_Mute,
|
||||
k_EInputActionOrigin_PS5_LeftPad_Touch,
|
||||
k_EInputActionOrigin_PS5_LeftPad_Swipe,
|
||||
k_EInputActionOrigin_PS5_LeftPad_Click,
|
||||
k_EInputActionOrigin_PS5_LeftPad_DPadNorth,
|
||||
k_EInputActionOrigin_PS5_LeftPad_DPadSouth,
|
||||
k_EInputActionOrigin_PS5_LeftPad_DPadWest,
|
||||
k_EInputActionOrigin_PS5_LeftPad_DPadEast,
|
||||
k_EInputActionOrigin_PS5_RightPad_Touch,
|
||||
k_EInputActionOrigin_PS5_RightPad_Swipe,
|
||||
k_EInputActionOrigin_PS5_RightPad_Click,
|
||||
k_EInputActionOrigin_PS5_RightPad_DPadNorth,
|
||||
k_EInputActionOrigin_PS5_RightPad_DPadSouth,
|
||||
k_EInputActionOrigin_PS5_RightPad_DPadWest,
|
||||
k_EInputActionOrigin_PS5_RightPad_DPadEast,
|
||||
k_EInputActionOrigin_PS5_CenterPad_Touch,
|
||||
k_EInputActionOrigin_PS5_CenterPad_Swipe,
|
||||
k_EInputActionOrigin_PS5_CenterPad_Click,
|
||||
k_EInputActionOrigin_PS5_CenterPad_DPadNorth,
|
||||
k_EInputActionOrigin_PS5_CenterPad_DPadSouth,
|
||||
k_EInputActionOrigin_PS5_CenterPad_DPadWest,
|
||||
k_EInputActionOrigin_PS5_CenterPad_DPadEast,
|
||||
k_EInputActionOrigin_PS5_LeftTrigger_Pull,
|
||||
k_EInputActionOrigin_PS5_LeftTrigger_Click,
|
||||
k_EInputActionOrigin_PS5_RightTrigger_Pull,
|
||||
k_EInputActionOrigin_PS5_RightTrigger_Click,
|
||||
k_EInputActionOrigin_PS5_LeftStick_Move,
|
||||
k_EInputActionOrigin_PS5_LeftStick_Click,
|
||||
k_EInputActionOrigin_PS5_LeftStick_DPadNorth,
|
||||
k_EInputActionOrigin_PS5_LeftStick_DPadSouth,
|
||||
k_EInputActionOrigin_PS5_LeftStick_DPadWest,
|
||||
k_EInputActionOrigin_PS5_LeftStick_DPadEast,
|
||||
k_EInputActionOrigin_PS5_RightStick_Move,
|
||||
k_EInputActionOrigin_PS5_RightStick_Click,
|
||||
k_EInputActionOrigin_PS5_RightStick_DPadNorth,
|
||||
k_EInputActionOrigin_PS5_RightStick_DPadSouth,
|
||||
k_EInputActionOrigin_PS5_RightStick_DPadWest,
|
||||
k_EInputActionOrigin_PS5_RightStick_DPadEast,
|
||||
k_EInputActionOrigin_PS5_DPad_North,
|
||||
k_EInputActionOrigin_PS5_DPad_South,
|
||||
k_EInputActionOrigin_PS5_DPad_West,
|
||||
k_EInputActionOrigin_PS5_DPad_East,
|
||||
k_EInputActionOrigin_PS5_Gyro_Move,
|
||||
k_EInputActionOrigin_PS5_Gyro_Pitch,
|
||||
k_EInputActionOrigin_PS5_Gyro_Yaw,
|
||||
k_EInputActionOrigin_PS5_Gyro_Roll,
|
||||
k_EInputActionOrigin_PS5_DPad_Move,
|
||||
k_EInputActionOrigin_PS5_Reserved1,
|
||||
k_EInputActionOrigin_PS5_Reserved2,
|
||||
k_EInputActionOrigin_PS5_Reserved3,
|
||||
k_EInputActionOrigin_PS5_Reserved4,
|
||||
k_EInputActionOrigin_PS5_Reserved5,
|
||||
k_EInputActionOrigin_PS5_Reserved6,
|
||||
k_EInputActionOrigin_PS5_Reserved7,
|
||||
k_EInputActionOrigin_PS5_Reserved8,
|
||||
k_EInputActionOrigin_PS5_Reserved9,
|
||||
k_EInputActionOrigin_PS5_Reserved10,
|
||||
k_EInputActionOrigin_PS5_Reserved11,
|
||||
k_EInputActionOrigin_PS5_Reserved12,
|
||||
k_EInputActionOrigin_PS5_Reserved13,
|
||||
k_EInputActionOrigin_PS5_Reserved14,
|
||||
k_EInputActionOrigin_PS5_Reserved15,
|
||||
k_EInputActionOrigin_PS5_Reserved16,
|
||||
k_EInputActionOrigin_PS5_Reserved17,
|
||||
k_EInputActionOrigin_PS5_Reserved18,
|
||||
k_EInputActionOrigin_PS5_Reserved19,
|
||||
k_EInputActionOrigin_PS5_Reserved20,
|
||||
|
||||
k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here.
|
||||
k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits.
|
||||
};
|
||||
|
||||
enum EXboxOrigin
|
||||
{
|
||||
k_EXboxOrigin_A,
|
||||
k_EXboxOrigin_B,
|
||||
k_EXboxOrigin_X,
|
||||
k_EXboxOrigin_Y,
|
||||
k_EXboxOrigin_LeftBumper,
|
||||
k_EXboxOrigin_RightBumper,
|
||||
k_EXboxOrigin_Menu, //Start
|
||||
k_EXboxOrigin_View, //Back
|
||||
k_EXboxOrigin_LeftTrigger_Pull,
|
||||
k_EXboxOrigin_LeftTrigger_Click,
|
||||
k_EXboxOrigin_RightTrigger_Pull,
|
||||
k_EXboxOrigin_RightTrigger_Click,
|
||||
k_EXboxOrigin_LeftStick_Move,
|
||||
k_EXboxOrigin_LeftStick_Click,
|
||||
k_EXboxOrigin_LeftStick_DPadNorth,
|
||||
k_EXboxOrigin_LeftStick_DPadSouth,
|
||||
k_EXboxOrigin_LeftStick_DPadWest,
|
||||
k_EXboxOrigin_LeftStick_DPadEast,
|
||||
k_EXboxOrigin_RightStick_Move,
|
||||
k_EXboxOrigin_RightStick_Click,
|
||||
k_EXboxOrigin_RightStick_DPadNorth,
|
||||
k_EXboxOrigin_RightStick_DPadSouth,
|
||||
k_EXboxOrigin_RightStick_DPadWest,
|
||||
k_EXboxOrigin_RightStick_DPadEast,
|
||||
k_EXboxOrigin_DPad_North,
|
||||
k_EXboxOrigin_DPad_South,
|
||||
k_EXboxOrigin_DPad_West,
|
||||
k_EXboxOrigin_DPad_East,
|
||||
k_EXboxOrigin_Count,
|
||||
};
|
||||
|
||||
enum ESteamControllerPad
|
||||
{
|
||||
k_ESteamControllerPad_Left,
|
||||
k_ESteamControllerPad_Right
|
||||
};
|
||||
|
||||
enum EControllerHapticLocation
|
||||
{
|
||||
k_EControllerHapticLocation_Left = ( 1 << k_ESteamControllerPad_Left ),
|
||||
k_EControllerHapticLocation_Right = ( 1 << k_ESteamControllerPad_Right ),
|
||||
k_EControllerHapticLocation_Both = ( 1 << k_ESteamControllerPad_Left | 1 << k_ESteamControllerPad_Right ),
|
||||
};
|
||||
|
||||
enum EControllerHapticType
|
||||
{
|
||||
k_EControllerHapticType_Off,
|
||||
k_EControllerHapticType_Tick,
|
||||
k_EControllerHapticType_Click,
|
||||
};
|
||||
|
||||
enum ESteamInputType
|
||||
{
|
||||
k_ESteamInputType_Unknown,
|
||||
k_ESteamInputType_SteamController,
|
||||
k_ESteamInputType_XBox360Controller,
|
||||
k_ESteamInputType_XBoxOneController,
|
||||
k_ESteamInputType_GenericGamepad, // DirectInput controllers
|
||||
k_ESteamInputType_PS4Controller,
|
||||
k_ESteamInputType_AppleMFiController, // Unused
|
||||
k_ESteamInputType_AndroidController, // Unused
|
||||
k_ESteamInputType_SwitchJoyConPair, // Unused
|
||||
k_ESteamInputType_SwitchJoyConSingle, // Unused
|
||||
k_ESteamInputType_SwitchProController,
|
||||
k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller
|
||||
k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins
|
||||
k_ESteamInputType_PS5Controller, // Added in SDK 151
|
||||
k_ESteamInputType_Count,
|
||||
k_ESteamInputType_MaximumPossibleValue = 255,
|
||||
};
|
||||
|
||||
// Individual values are used by the GetSessionInputConfigurationSettings bitmask
|
||||
enum ESteamInputConfigurationEnableType
|
||||
{
|
||||
k_ESteamInputConfigurationEnableType_None = 0x0000,
|
||||
k_ESteamInputConfigurationEnableType_Playstation = 0x0001,
|
||||
k_ESteamInputConfigurationEnableType_Xbox = 0x0002,
|
||||
k_ESteamInputConfigurationEnableType_Generic = 0x0004,
|
||||
k_ESteamInputConfigurationEnableType_Switch = 0x0008,
|
||||
};
|
||||
|
||||
// These values are passed into SetLEDColor
|
||||
enum ESteamInputLEDFlag
|
||||
{
|
||||
k_ESteamInputLEDFlag_SetColor,
|
||||
// Restore the LED color to the user's preference setting as set in the controller personalization menu.
|
||||
// This also happens automatically on exit of your game.
|
||||
k_ESteamInputLEDFlag_RestoreUserDefault
|
||||
};
|
||||
|
||||
// These values are passed into GetGlyphPNGForActionOrigin
|
||||
enum ESteamInputGlyphSize
|
||||
{
|
||||
k_ESteamInputGlyphSize_Small,
|
||||
k_ESteamInputGlyphSize_Medium,
|
||||
k_ESteamInputGlyphSize_Large,
|
||||
};
|
||||
|
||||
enum ESteamInputActionEventType
|
||||
{
|
||||
ESteamInputActionEventType_DigitalAction,
|
||||
ESteamInputActionEventType_AnalogAction,
|
||||
};
|
||||
|
||||
// InputHandle_t is used to refer to a specific controller.
|
||||
// This handle will consistently identify a controller, even if it is disconnected and re-connected
|
||||
typedef uint64 InputHandle_t;
|
||||
|
||||
// These handles are used to refer to a specific in-game action or action set
|
||||
// All action handles should be queried during initialization for performance reasons
|
||||
typedef uint64 InputActionSetHandle_t;
|
||||
typedef uint64 InputDigitalActionHandle_t;
|
||||
typedef uint64 InputAnalogActionHandle_t;
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
struct InputAnalogActionData_t
|
||||
{
|
||||
// Type of data coming from this action, this will match what got specified in the action set
|
||||
EInputSourceMode eMode;
|
||||
|
||||
// The current state of this action; will be delta updates for mouse actions
|
||||
float x, y;
|
||||
|
||||
// Whether or not this action is currently available to be bound in the active action set
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct InputDigitalActionData_t
|
||||
{
|
||||
// The current state of this action; will be true if currently pressed
|
||||
bool bState;
|
||||
|
||||
// Whether or not this action is currently available to be bound in the active action set
|
||||
bool bActive;
|
||||
};
|
||||
|
||||
struct InputMotionData_t
|
||||
{
|
||||
// Sensor-fused absolute rotation; will drift in heading
|
||||
float rotQuatX;
|
||||
float rotQuatY;
|
||||
float rotQuatZ;
|
||||
float rotQuatW;
|
||||
|
||||
// Positional acceleration
|
||||
float posAccelX;
|
||||
float posAccelY;
|
||||
float posAccelZ;
|
||||
|
||||
// Angular velocity
|
||||
float rotVelX;
|
||||
float rotVelY;
|
||||
float rotVelZ;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: when callbacks are enabled this fires each time a controller action
|
||||
// state changes
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputActionEvent_t
|
||||
{
|
||||
InputHandle_t controllerHandle;
|
||||
ESteamInputActionEventType eEventType;
|
||||
union {
|
||||
struct {
|
||||
InputAnalogActionHandle_t actionHandle;
|
||||
InputAnalogActionData_t analogActionData;
|
||||
} analogAction;
|
||||
struct {
|
||||
InputDigitalActionHandle_t actionHandle;
|
||||
InputDigitalActionData_t digitalActionData;
|
||||
} digitalAction;
|
||||
} x;
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
typedef void ( *SteamInputActionEventCallbackPointer )( SteamInputActionEvent_t * );
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamInput
|
||||
{
|
||||
public:
|
||||
|
||||
// Init and Shutdown must be called when starting/ending use of this interface.
|
||||
// if bExplicitlyCallRunFrame is called then you will need to manually call RunFrame
|
||||
// each frame, otherwise Steam Input will updated when SteamAPI_RunCallbacks() is called
|
||||
virtual bool Init( bool bExplicitlyCallRunFrame ) = 0;
|
||||
virtual bool Shutdown() = 0;
|
||||
|
||||
// Set the absolute path to the Input Action Manifest file containing the in-game actions
|
||||
// and file paths to the official configurations. Used in games that bundle Steam Input
|
||||
// configurations inside of the game depot instead of using the Steam Workshop
|
||||
virtual bool SetInputActionManifestFilePath( const char *pchInputActionManifestAbsolutePath ) = 0;
|
||||
|
||||
// Synchronize API state with the latest Steam Input action data available. This
|
||||
// is performed automatically by SteamAPI_RunCallbacks, but for the absolute lowest
|
||||
// possible latency, you call this directly before reading controller state.
|
||||
// Note: This must be called from somewhere before GetConnectedControllers will
|
||||
// return any handles
|
||||
virtual void RunFrame( bool bReservedValue = true ) = 0;
|
||||
|
||||
// Waits on an IPC event from Steam sent when there is new data to be fetched from
|
||||
// the data drop. Returns true when data was recievied before the timeout expires.
|
||||
// Useful for games with a dedicated input thread
|
||||
virtual bool BWaitForData( bool bWaitForever, uint32 unTimeout ) = 0;
|
||||
|
||||
// Returns true if new data has been received since the last time action data was accessed
|
||||
// via GetDigitalActionData or GetAnalogActionData. The game will still need to call
|
||||
// SteamInput()->RunFrame() or SteamAPI_RunCallbacks() before this to update the data stream
|
||||
virtual bool BNewDataAvailable() = 0;
|
||||
|
||||
// Enumerate currently connected Steam Input enabled devices - developers can opt in controller by type (ex: Xbox/Playstation/etc) via
|
||||
// the Steam Input settings in the Steamworks site or users can opt-in in their controller settings in Steam.
|
||||
// handlesOut should point to a STEAM_INPUT_MAX_COUNT sized array of InputHandle_t handles
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetConnectedControllers( STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_COUNT, Receives list of connected controllers ) InputHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CALLBACKS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Controller configuration loaded - these callbacks will always fire if you have
|
||||
// a handler. Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputConfigurationLoaded_t )
|
||||
|
||||
// Enable SteamInputDeviceConnected_t and SteamInputDeviceDisconnected_t callbacks.
|
||||
// Each controller that is already connected will generate a device connected
|
||||
// callback when you enable them
|
||||
virtual void EnableDeviceCallbacks() = 0;
|
||||
|
||||
// Controller Connected - provides info about a single newly connected controller
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputDeviceConnected_t )
|
||||
|
||||
// Controller Disconnected - provides info about a single disconnected controller
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
STEAM_CALL_BACK( SteamInputDeviceDisconnected_t )
|
||||
|
||||
// Enable SteamInputActionEvent_t callbacks. Directly calls your callback function
|
||||
// for lower latency than standard Steam callbacks. Supports one callback at a time.
|
||||
// Note: this is called within either SteamInput()->RunFrame or by SteamAPI_RunCallbacks
|
||||
virtual void EnableActionEventCallbacks( SteamInputActionEventCallbackPointer pCallback ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTION SETS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for an Action Set. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual InputActionSetHandle_t GetActionSetHandle( const char *pszActionSetName ) = 0;
|
||||
|
||||
// Reconfigure the controller to use the specified action set (ie 'Menu', 'Walk' or 'Drive')
|
||||
// This is cheap, and can be safely called repeatedly. It's often easier to repeatedly call it in
|
||||
// your state loops, instead of trying to place it in all of your state transitions.
|
||||
virtual void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) = 0;
|
||||
virtual InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// ACTION SET LAYERS
|
||||
virtual void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) = 0;
|
||||
virtual void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Enumerate currently active layers.
|
||||
// handlesOut should point to a STEAM_INPUT_MAX_ACTIVE_LAYERS sized array of InputActionSetHandle_t handles
|
||||
// Returns the number of handles written to handlesOut
|
||||
virtual int GetActiveActionSetLayers( InputHandle_t inputHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ACTIVE_LAYERS, Receives list of active layers ) InputActionSetHandle_t *handlesOut ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ACTIONS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Lookup the handle for a digital action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual InputDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of the supplied digital game action
|
||||
virtual InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for a digital action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
|
||||
virtual int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
|
||||
virtual const char *GetStringForDigitalActionName( InputDigitalActionHandle_t eActionHandle ) = 0;
|
||||
|
||||
// Lookup the handle for an analog action. Best to do this once on startup, and store the handles for all future API calls.
|
||||
virtual InputAnalogActionHandle_t GetAnalogActionHandle( const char *pszActionName ) = 0;
|
||||
|
||||
// Returns the current state of these supplied analog game action
|
||||
virtual InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) = 0;
|
||||
|
||||
// Get the origin(s) for an analog action within an action set. Returns the number of origins supplied in originsOut. Use this to display the appropriate on-screen prompt for the action.
|
||||
// originsOut should point to a STEAM_INPUT_MAX_ORIGINS sized array of EInputActionOrigin handles. The EInputActionOrigin enum will get extended as support for new controller controllers gets added to
|
||||
// the Steam client and will exceed the values from this header, please check bounds if you are using a look up table.
|
||||
virtual int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, STEAM_OUT_ARRAY_COUNT( STEAM_INPUT_MAX_ORIGINS, Receives list of action origins ) EInputActionOrigin *originsOut ) = 0;
|
||||
|
||||
// Get a local path to a PNG file for the provided origin's glyph.
|
||||
virtual const char *GetGlyphPNGForActionOrigin( EInputActionOrigin eOrigin, ESteamInputGlyphSize eSize, uint32 unFlags ) = 0;
|
||||
|
||||
// Get a local path to a SVG file for the provided origin's glyph.
|
||||
virtual const char *GetGlyphSVGForActionOrigin( EInputActionOrigin eOrigin, uint32 unFlags ) = 0;
|
||||
|
||||
// Get a local path to an older, Big Picture Mode-style PNG file for a particular origin
|
||||
virtual const char *GetGlyphForActionOrigin_Legacy( EInputActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified origin.
|
||||
virtual const char *GetStringForActionOrigin( EInputActionOrigin eOrigin ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the user-facing action name corresponding to the specified handle
|
||||
virtual const char *GetStringForAnalogActionName( InputAnalogActionHandle_t eActionHandle ) = 0;
|
||||
|
||||
// Stop analog momentum for the action if it is a mouse action in trackball mode
|
||||
virtual void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) = 0;
|
||||
|
||||
// Returns raw motion data from the specified device
|
||||
virtual InputMotionData_t GetMotionData( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// OUTPUTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Trigger a vibration event on supported controllers - Steam will translate these commands into haptic pulses for Steam Controllers
|
||||
virtual void TriggerVibration( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed ) = 0;
|
||||
|
||||
// Trigger a vibration event on supported controllers including Xbox trigger impulse rumble - Steam will translate these commands into haptic pulses for Steam Controllers
|
||||
virtual void TriggerVibrationExtended( InputHandle_t inputHandle, unsigned short usLeftSpeed, unsigned short usRightSpeed, unsigned short usLeftTriggerSpeed, unsigned short usRightTriggerSpeed ) = 0;
|
||||
|
||||
// Send a haptic pulse, works on Steam Deck and Steam Controller devices
|
||||
virtual void TriggerSimpleHapticEvent( InputHandle_t inputHandle, EControllerHapticLocation eHapticLocation, uint8 nIntensity, char nGainDB, uint8 nOtherIntensity, char nOtherGainDB ) = 0;
|
||||
|
||||
// Set the controller LED color on supported controllers. nFlags is a bitmask of values from ESteamInputLEDFlag - 0 will default to setting a color. Steam will handle
|
||||
// the behavior on exit of your program so you don't need to try restore the default as you are shutting down
|
||||
virtual void SetLEDColor( InputHandle_t inputHandle, uint8 nColorR, uint8 nColorG, uint8 nColorB, unsigned int nFlags ) = 0;
|
||||
|
||||
// Trigger a haptic pulse on a Steam Controller - if you are approximating rumble you may want to use TriggerVibration instead.
|
||||
// Good uses for Haptic pulses include chimes, noises, or directional gameplay feedback (taking damage, footstep locations, etc).
|
||||
virtual void Legacy_TriggerHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec ) = 0;
|
||||
|
||||
// Trigger a haptic pulse with a duty cycle of usDurationMicroSec / usOffMicroSec, unRepeat times. If you are approximating rumble you may want to use TriggerVibration instead.
|
||||
// nFlags is currently unused and reserved for future use.
|
||||
virtual void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, ESteamControllerPad eTargetPad, unsigned short usDurationMicroSec, unsigned short usOffMicroSec, unsigned short unRepeat, unsigned int nFlags ) = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Utility functions available without using the rest of Steam Input API
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Invokes the Steam overlay and brings up the binding screen if the user is using Big Picture Mode
|
||||
// If the user is not in Big Picture Mode it will open up the binding in a new window
|
||||
virtual bool ShowBindingPanel( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Returns the input type for a particular handle - unlike EInputActionOrigin which update with Steam and may return unrecognized values
|
||||
// ESteamInputType will remain static and only return valid values from your SDK version
|
||||
virtual ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions
|
||||
// to identify controllers presented to your game over Xinput. Returns 0 if the Xinput index isn't associated with Steam Input
|
||||
virtual InputHandle_t GetControllerForGamepadIndex( int nIndex ) = 0;
|
||||
|
||||
// Returns the associated gamepad index for the specified controller, if emulating a gamepad or -1 if not associated with an Xinput index
|
||||
virtual int GetGamepadIndexForController( InputHandle_t ulinputHandle ) = 0;
|
||||
|
||||
// Returns a localized string (from Steam's language setting) for the specified Xbox controller origin.
|
||||
virtual const char *GetStringForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get a local path to art for on-screen glyph for a particular Xbox controller origin
|
||||
virtual const char *GetGlyphForXboxOrigin( EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Get the equivalent ActionOrigin for a given Xbox controller origin this can be chained with GetGlyphForActionOrigin to provide future proof glyphs for
|
||||
// non-Steam Input API action games. Note - this only translates the buttons directly and doesn't take into account any remapping a user has made in their configuration
|
||||
virtual EInputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, EXboxOrigin eOrigin ) = 0;
|
||||
|
||||
// Convert an origin to another controller type - for inputs not present on the other controller type this will return k_EInputActionOrigin_None
|
||||
// When a new input type is added you will be able to pass in k_ESteamInputType_Unknown and the closest origin that your version of the SDK recognized will be returned
|
||||
// ex: if a Playstation 5 controller was released this function would return Playstation 4 origins.
|
||||
virtual EInputActionOrigin TranslateActionOrigin( ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin ) = 0;
|
||||
|
||||
// Get the binding revision for a given device. Returns false if the handle was not valid or if a mapping is not yet loaded for the device
|
||||
virtual bool GetDeviceBindingRevision( InputHandle_t inputHandle, int *pMajor, int *pMinor ) = 0;
|
||||
|
||||
// Get the Steam Remote Play session ID associated with a device, or 0 if there is no session associated with it
|
||||
// See isteamremoteplay.h for more information on Steam Remote Play sessions
|
||||
virtual uint32 GetRemotePlaySessionID( InputHandle_t inputHandle ) = 0;
|
||||
|
||||
// Get a bitmask of the Steam Input Configuration types opted in for the current session. Returns ESteamInputConfigurationEnableType values.?
|
||||
// Note: user can override the settings from the Steamworks Partner site so the returned values may not exactly match your default configuration
|
||||
virtual uint16 GetSessionInputConfigurationSettings() = 0;
|
||||
};
|
||||
|
||||
#define STEAMINPUT_INTERFACE_VERSION "SteamInput005"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamInput *SteamInput();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION );
|
||||
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a new controller has been connected, will fire once
|
||||
// per controller if multiple new controllers connect in the same frame
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputDeviceConnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 1 };
|
||||
InputHandle_t m_ulConnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a new controller has been connected, will fire once
|
||||
// per controller if multiple new controllers connect in the same frame
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputDeviceDisconnected_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 2 };
|
||||
InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called when a controller configuration has been loaded, will fire once
|
||||
// per controller per focus change for Steam Input enabled controllers
|
||||
//-----------------------------------------------------------------------------
|
||||
struct SteamInputConfigurationLoaded_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamControllerCallbacks + 3 };
|
||||
AppId_t m_unAppID;
|
||||
InputHandle_t m_ulDeviceHandle; // Handle for device
|
||||
CSteamID m_ulMappingCreator; // May differ from local user when using
|
||||
// an unmodified community or official config
|
||||
uint32 m_unMajorRevision; // Binding revision from In-game Action File.
|
||||
// Same value as queried by GetDeviceBindingRevision
|
||||
uint32 m_unMinorRevision;
|
||||
bool m_bUsesSteamInputAPI; // Does the configuration contain any Analog/Digital actions?
|
||||
bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings?
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMINPUT_H
|
435
lsteamclient/steamworks_sdk_152/isteaminventory.h
Normal file
435
lsteamclient/steamworks_sdk_152/isteaminventory.h
Normal file
@ -0,0 +1,435 @@
|
||||
//====== Copyright © 1996-2014 Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to Steam Inventory
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMINVENTORY_H
|
||||
#define ISTEAMINVENTORY_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
// Every individual instance of an item has a globally-unique ItemInstanceID.
|
||||
// This ID is unique to the combination of (player, specific item instance)
|
||||
// and will not be transferred to another player or re-used for another item.
|
||||
typedef uint64 SteamItemInstanceID_t;
|
||||
|
||||
static const SteamItemInstanceID_t k_SteamItemInstanceIDInvalid = (SteamItemInstanceID_t)~0;
|
||||
|
||||
// Types of items in your game are identified by a 32-bit "item definition number".
|
||||
// Valid definition numbers are between 1 and 999999999; numbers less than or equal to
|
||||
// zero are invalid, and numbers greater than or equal to one billion (1x10^9) are
|
||||
// reserved for internal Steam use.
|
||||
typedef int32 SteamItemDef_t;
|
||||
|
||||
|
||||
enum ESteamItemFlags
|
||||
{
|
||||
// Item status flags - these flags are permanently attached to specific item instances
|
||||
k_ESteamItemNoTrade = 1 << 0, // This item is account-locked and cannot be traded or given away.
|
||||
|
||||
// Action confirmation flags - these flags are set one time only, as part of a result set
|
||||
k_ESteamItemRemoved = 1 << 8, // The item has been destroyed, traded away, expired, or otherwise invalidated
|
||||
k_ESteamItemConsumed = 1 << 9, // The item quantity has been decreased by 1 via ConsumeItem API.
|
||||
|
||||
// All other flag bits are currently reserved for internal Steam use at this time.
|
||||
// Do not assume anything about the state of other flags which are not defined here.
|
||||
};
|
||||
|
||||
struct SteamItemDetails_t
|
||||
{
|
||||
SteamItemInstanceID_t m_itemId;
|
||||
SteamItemDef_t m_iDefinition;
|
||||
uint16 m_unQuantity;
|
||||
uint16 m_unFlags; // see ESteamItemFlags
|
||||
};
|
||||
|
||||
typedef int32 SteamInventoryResult_t;
|
||||
|
||||
static const SteamInventoryResult_t k_SteamInventoryResultInvalid = -1;
|
||||
|
||||
typedef uint64 SteamInventoryUpdateHandle_t;
|
||||
const SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffffull;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Steam Inventory query and manipulation API
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamInventory
|
||||
{
|
||||
public:
|
||||
|
||||
// INVENTORY ASYNC RESULT MANAGEMENT
|
||||
//
|
||||
// Asynchronous inventory queries always output a result handle which can be used with
|
||||
// GetResultStatus, GetResultItems, etc. A SteamInventoryResultReady_t callback will
|
||||
// be triggered when the asynchronous result becomes ready (or fails).
|
||||
//
|
||||
|
||||
// Find out the status of an asynchronous inventory result handle. Possible values:
|
||||
// k_EResultPending - still in progress
|
||||
// k_EResultOK - done, result ready
|
||||
// k_EResultExpired - done, result ready, maybe out of date (see DeserializeResult)
|
||||
// k_EResultInvalidParam - ERROR: invalid API call parameters
|
||||
// k_EResultServiceUnavailable - ERROR: service temporarily down, you may retry later
|
||||
// k_EResultLimitExceeded - ERROR: operation would exceed per-user inventory limits
|
||||
// k_EResultFail - ERROR: unknown / generic error
|
||||
virtual EResult GetResultStatus( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
// Copies the contents of a result set into a flat array. The specific
|
||||
// contents of the result set depend on which query which was used.
|
||||
virtual bool GetResultItems( SteamInventoryResult_t resultHandle,
|
||||
STEAM_OUT_ARRAY_COUNT( punOutItemsArraySize,Output array) SteamItemDetails_t *pOutItemsArray,
|
||||
uint32 *punOutItemsArraySize ) = 0;
|
||||
|
||||
// In combination with GetResultItems, you can use GetResultItemProperty to retrieve
|
||||
// dynamic string properties for a given item returned in the result set.
|
||||
//
|
||||
// Property names are always composed of ASCII letters, numbers, and/or underscores.
|
||||
//
|
||||
// Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
|
||||
// property names.
|
||||
//
|
||||
// If pchValueBuffer is NULL, *punValueBufferSize will contain the
|
||||
// suggested buffer size. Otherwise it will be the number of bytes actually copied
|
||||
// to pchValueBuffer. If the results do not fit in the given buffer, partial
|
||||
// results may be copied.
|
||||
virtual bool GetResultItemProperty( SteamInventoryResult_t resultHandle,
|
||||
uint32 unItemIndex,
|
||||
const char *pchPropertyName,
|
||||
STEAM_OUT_STRING_COUNT( punValueBufferSizeOut ) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Returns the server time at which the result was generated. Compare against
|
||||
// the value of IClientUtils::GetServerRealTime() to determine age.
|
||||
virtual uint32 GetResultTimestamp( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
// Returns true if the result belongs to the target steam ID, false if the
|
||||
// result does not. This is important when using DeserializeResult, to verify
|
||||
// that a remote player is not pretending to have a different user's inventory.
|
||||
virtual bool CheckResultSteamID( SteamInventoryResult_t resultHandle, CSteamID steamIDExpected ) = 0;
|
||||
|
||||
// Destroys a result handle and frees all associated memory.
|
||||
virtual void DestroyResult( SteamInventoryResult_t resultHandle ) = 0;
|
||||
|
||||
|
||||
// INVENTORY ASYNC QUERY
|
||||
//
|
||||
|
||||
// Captures the entire state of the current user's Steam inventory.
|
||||
// You must call DestroyResult on this handle when you are done with it.
|
||||
// Returns false and sets *pResultHandle to zero if inventory is unavailable.
|
||||
// Note: calls to this function are subject to rate limits and may return
|
||||
// cached results if called too frequently. It is suggested that you call
|
||||
// this function only when you are about to display the user's full inventory,
|
||||
// or if you expect that the inventory may have changed.
|
||||
virtual bool GetAllItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
|
||||
// Captures the state of a subset of the current user's Steam inventory,
|
||||
// identified by an array of item instance IDs. The results from this call
|
||||
// can be serialized and passed to other players to "prove" that the current
|
||||
// user owns specific items, without exposing the user's entire inventory.
|
||||
// For example, you could call GetItemsByID with the IDs of the user's
|
||||
// currently equipped cosmetic items and serialize this to a buffer, and
|
||||
// then transmit this buffer to other players upon joining a game.
|
||||
virtual bool GetItemsByID( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT( unCountInstanceIDs ) const SteamItemInstanceID_t *pInstanceIDs, uint32 unCountInstanceIDs ) = 0;
|
||||
|
||||
|
||||
// RESULT SERIALIZATION AND AUTHENTICATION
|
||||
//
|
||||
// Serialized result sets contain a short signature which can't be forged
|
||||
// or replayed across different game sessions. A result set can be serialized
|
||||
// on the local client, transmitted to other players via your game networking,
|
||||
// and deserialized by the remote players. This is a secure way of preventing
|
||||
// hackers from lying about posessing rare/high-value items.
|
||||
|
||||
// Serializes a result set with signature bytes to an output buffer. Pass
|
||||
// NULL as an output buffer to get the required size via punOutBufferSize.
|
||||
// The size of a serialized result depends on the number items which are being
|
||||
// serialized. When securely transmitting items to other players, it is
|
||||
// recommended to use "GetItemsByID" first to create a minimal result set.
|
||||
// Results have a built-in timestamp which will be considered "expired" after
|
||||
// an hour has elapsed. See DeserializeResult for expiration handling.
|
||||
virtual bool SerializeResult( SteamInventoryResult_t resultHandle, STEAM_OUT_BUFFER_COUNT(punOutBufferSize) void *pOutBuffer, uint32 *punOutBufferSize ) = 0;
|
||||
|
||||
// Deserializes a result set and verifies the signature bytes. Returns false
|
||||
// if bRequireFullOnlineVerify is set but Steam is running in Offline mode.
|
||||
// Otherwise returns true and then delivers error codes via GetResultStatus.
|
||||
//
|
||||
// The bRESERVED_MUST_BE_FALSE flag is reserved for future use and should not
|
||||
// be set to true by your game at this time.
|
||||
//
|
||||
// DeserializeResult has a potential soft-failure mode where the handle status
|
||||
// is set to k_EResultExpired. GetResultItems() still succeeds in this mode.
|
||||
// The "expired" result could indicate that the data may be out of date - not
|
||||
// just due to timed expiration (one hour), but also because one of the items
|
||||
// in the result set may have been traded or consumed since the result set was
|
||||
// generated. You could compare the timestamp from GetResultTimestamp() to
|
||||
// ISteamUtils::GetServerRealTime() to determine how old the data is. You could
|
||||
// simply ignore the "expired" result code and continue as normal, or you
|
||||
// could challenge the player with expired data to send an updated result set.
|
||||
virtual bool DeserializeResult( SteamInventoryResult_t *pOutResultHandle, STEAM_BUFFER_COUNT(punOutBufferSize) const void *pBuffer, uint32 unBufferSize, bool bRESERVED_MUST_BE_FALSE = false ) = 0;
|
||||
|
||||
|
||||
// INVENTORY ASYNC MODIFICATION
|
||||
//
|
||||
|
||||
// GenerateItems() creates one or more items and then generates a SteamInventoryCallback_t
|
||||
// notification with a matching nCallbackContext parameter. This API is only intended
|
||||
// for prototyping - it is only usable by Steam accounts that belong to the publisher group
|
||||
// for your game.
|
||||
// If punArrayQuantity is not NULL, it should be the same length as pArrayItems and should
|
||||
// describe the quantity of each item to generate.
|
||||
virtual bool GenerateItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
|
||||
|
||||
// GrantPromoItems() checks the list of promotional items for which the user may be eligible
|
||||
// and grants the items (one time only). On success, the result set will include items which
|
||||
// were granted, if any. If no items were granted because the user isn't eligible for any
|
||||
// promotions, this is still considered a success.
|
||||
virtual bool GrantPromoItems( SteamInventoryResult_t *pResultHandle ) = 0;
|
||||
|
||||
// AddPromoItem() / AddPromoItems() are restricted versions of GrantPromoItems(). Instead of
|
||||
// scanning for all eligible promotional items, the check is restricted to a single item
|
||||
// definition or set of item definitions. This can be useful if your game has custom UI for
|
||||
// showing a specific promo item to the user.
|
||||
virtual bool AddPromoItem( SteamInventoryResult_t *pResultHandle, SteamItemDef_t itemDef ) = 0;
|
||||
virtual bool AddPromoItems( SteamInventoryResult_t *pResultHandle, STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, uint32 unArrayLength ) = 0;
|
||||
|
||||
// ConsumeItem() removes items from the inventory, permanently. They cannot be recovered.
|
||||
// Not for the faint of heart - if your game implements item removal at all, a high-friction
|
||||
// UI confirmation process is highly recommended.
|
||||
virtual bool ConsumeItem( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemConsume, uint32 unQuantity ) = 0;
|
||||
|
||||
// ExchangeItems() is an atomic combination of item generation and consumption.
|
||||
// It can be used to implement crafting recipes or transmutations, or items which unpack
|
||||
// themselves into other items (e.g., a chest).
|
||||
// Exchange recipes are defined in the ItemDef, and explicitly list the required item
|
||||
// types and resulting generated type.
|
||||
// Exchange recipes are evaluated atomically by the Inventory Service; if the supplied
|
||||
// components do not match the recipe, or do not contain sufficient quantity, the
|
||||
// exchange will fail.
|
||||
virtual bool ExchangeItems( SteamInventoryResult_t *pResultHandle,
|
||||
STEAM_ARRAY_COUNT(unArrayGenerateLength) const SteamItemDef_t *pArrayGenerate, STEAM_ARRAY_COUNT(unArrayGenerateLength) const uint32 *punArrayGenerateQuantity, uint32 unArrayGenerateLength,
|
||||
STEAM_ARRAY_COUNT(unArrayDestroyLength) const SteamItemInstanceID_t *pArrayDestroy, STEAM_ARRAY_COUNT(unArrayDestroyLength) const uint32 *punArrayDestroyQuantity, uint32 unArrayDestroyLength ) = 0;
|
||||
|
||||
|
||||
// TransferItemQuantity() is intended for use with items which are "stackable" (can have
|
||||
// quantity greater than one). It can be used to split a stack into two, or to transfer
|
||||
// quantity from one stack into another stack of identical items. To split one stack into
|
||||
// two, pass k_SteamItemInstanceIDInvalid for itemIdDest and a new item will be generated.
|
||||
virtual bool TransferItemQuantity( SteamInventoryResult_t *pResultHandle, SteamItemInstanceID_t itemIdSource, uint32 unQuantity, SteamItemInstanceID_t itemIdDest ) = 0;
|
||||
|
||||
|
||||
// TIMED DROPS AND PLAYTIME CREDIT
|
||||
//
|
||||
|
||||
// Deprecated. Calling this method is not required for proper playtime accounting.
|
||||
virtual void SendItemDropHeartbeat() = 0;
|
||||
|
||||
// Playtime credit must be consumed and turned into item drops by your game. Only item
|
||||
// definitions which are marked as "playtime item generators" can be spawned. The call
|
||||
// will return an empty result set if there is not enough playtime credit for a drop.
|
||||
// Your game should call TriggerItemDrop at an appropriate time for the user to receive
|
||||
// new items, such as between rounds or while the player is dead. Note that players who
|
||||
// hack their clients could modify the value of "dropListDefinition", so do not use it
|
||||
// to directly control rarity.
|
||||
// See your Steamworks configuration to set playtime drop rates for individual itemdefs.
|
||||
// The client library will suppress too-frequent calls to this method.
|
||||
virtual bool TriggerItemDrop( SteamInventoryResult_t *pResultHandle, SteamItemDef_t dropListDefinition ) = 0;
|
||||
|
||||
|
||||
// Deprecated. This method is not supported.
|
||||
virtual bool TradeItems( SteamInventoryResult_t *pResultHandle, CSteamID steamIDTradePartner,
|
||||
STEAM_ARRAY_COUNT(nArrayGiveLength) const SteamItemInstanceID_t *pArrayGive, STEAM_ARRAY_COUNT(nArrayGiveLength) const uint32 *pArrayGiveQuantity, uint32 nArrayGiveLength,
|
||||
STEAM_ARRAY_COUNT(nArrayGetLength) const SteamItemInstanceID_t *pArrayGet, STEAM_ARRAY_COUNT(nArrayGetLength) const uint32 *pArrayGetQuantity, uint32 nArrayGetLength ) = 0;
|
||||
|
||||
|
||||
// ITEM DEFINITIONS
|
||||
//
|
||||
// Item definitions are a mapping of "definition IDs" (integers between 1 and 1000000)
|
||||
// to a set of string properties. Some of these properties are required to display items
|
||||
// on the Steam community web site. Other properties can be defined by applications.
|
||||
// Use of these functions is optional; there is no reason to call LoadItemDefinitions
|
||||
// if your game hardcodes the numeric definition IDs (eg, purple face mask = 20, blue
|
||||
// weapon mod = 55) and does not allow for adding new item types without a client patch.
|
||||
//
|
||||
|
||||
// LoadItemDefinitions triggers the automatic load and refresh of item definitions.
|
||||
// Every time new item definitions are available (eg, from the dynamic addition of new
|
||||
// item types while players are still in-game), a SteamInventoryDefinitionUpdate_t
|
||||
// callback will be fired.
|
||||
virtual bool LoadItemDefinitions() = 0;
|
||||
|
||||
// GetItemDefinitionIDs returns the set of all defined item definition IDs (which are
|
||||
// defined via Steamworks configuration, and not necessarily contiguous integers).
|
||||
// If pItemDefIDs is null, the call will return true and *punItemDefIDsArraySize will
|
||||
// contain the total size necessary for a subsequent call. Otherwise, the call will
|
||||
// return false if and only if there is not enough space in the output array.
|
||||
virtual bool GetItemDefinitionIDs(
|
||||
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// GetItemDefinitionProperty returns a string property from a given item definition.
|
||||
// Note that some properties (for example, "name") may be localized and will depend
|
||||
// on the current Steam language settings (see ISteamApps::GetCurrentGameLanguage).
|
||||
// Property names are always composed of ASCII letters, numbers, and/or underscores.
|
||||
// Pass a NULL pointer for pchPropertyName to get a comma - separated list of available
|
||||
// property names. If pchValueBuffer is NULL, *punValueBufferSize will contain the
|
||||
// suggested buffer size. Otherwise it will be the number of bytes actually copied
|
||||
// to pchValueBuffer. If the results do not fit in the given buffer, partial
|
||||
// results may be copied.
|
||||
virtual bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPropertyName,
|
||||
STEAM_OUT_STRING_COUNT(punValueBufferSizeOut) char *pchValueBuffer, uint32 *punValueBufferSizeOut ) = 0;
|
||||
|
||||
// Request the list of "eligible" promo items that can be manually granted to the given
|
||||
// user. These are promo items of type "manual" that won't be granted automatically.
|
||||
// An example usage of this is an item that becomes available every week.
|
||||
STEAM_CALL_RESULT( SteamInventoryEligiblePromoItemDefIDs_t )
|
||||
virtual SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID ) = 0;
|
||||
|
||||
// After handling a SteamInventoryEligiblePromoItemDefIDs_t call result, use this
|
||||
// function to pull out the list of item definition ids that the user can be
|
||||
// manually granted via the AddPromoItems() call.
|
||||
virtual bool GetEligiblePromoItemDefinitionIDs(
|
||||
CSteamID steamID,
|
||||
STEAM_OUT_ARRAY_COUNT(punItemDefIDsArraySize,List of item definition IDs) SteamItemDef_t *pItemDefIDs,
|
||||
STEAM_DESC(Size of array is passed in and actual size used is returned in this param) uint32 *punItemDefIDsArraySize ) = 0;
|
||||
|
||||
// Starts the purchase process for the given item definitions. The callback SteamInventoryStartPurchaseResult_t
|
||||
// will be posted if Steam was able to initialize the transaction.
|
||||
//
|
||||
// Once the purchase has been authorized and completed by the user, the callback SteamInventoryResultReady_t
|
||||
// will be posted.
|
||||
STEAM_CALL_RESULT( SteamInventoryStartPurchaseResult_t )
|
||||
virtual SteamAPICall_t StartPurchase( STEAM_ARRAY_COUNT(unArrayLength) const SteamItemDef_t *pArrayItemDefs, STEAM_ARRAY_COUNT(unArrayLength) const uint32 *punArrayQuantity, uint32 unArrayLength ) = 0;
|
||||
|
||||
// Request current prices for all applicable item definitions
|
||||
STEAM_CALL_RESULT( SteamInventoryRequestPricesResult_t )
|
||||
virtual SteamAPICall_t RequestPrices() = 0;
|
||||
|
||||
// Returns the number of items with prices. Need to call RequestPrices() first.
|
||||
virtual uint32 GetNumItemsWithPrices() = 0;
|
||||
|
||||
// Returns item definition ids and their prices in the user's local currency.
|
||||
// Need to call RequestPrices() first.
|
||||
virtual bool GetItemsWithPrices( STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pArrayItemDefs, Items with prices) SteamItemDef_t *pArrayItemDefs,
|
||||
STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pCurrentPrices,
|
||||
STEAM_ARRAY_COUNT(unArrayLength) STEAM_OUT_ARRAY_COUNT(pPrices, List of prices for the given item defs) uint64 *pBasePrices,
|
||||
uint32 unArrayLength ) = 0;
|
||||
|
||||
// Retrieves the price for the item definition id
|
||||
// Returns false if there is no price stored for the item definition.
|
||||
virtual bool GetItemPrice( SteamItemDef_t iDefinition, uint64 *pCurrentPrice, uint64 *pBasePrice ) = 0;
|
||||
|
||||
// Create a request to update properties on items
|
||||
virtual SteamInventoryUpdateHandle_t StartUpdateProperties() = 0;
|
||||
// Remove the property on the item
|
||||
virtual bool RemoveProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName ) = 0;
|
||||
// Accessor methods to set properties on items
|
||||
|
||||
STEAM_FLAT_NAME( SetPropertyString )
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, const char *pchPropertyValue ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( SetPropertyBool )
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, bool bValue ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( SetPropertyInt64 )
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, int64 nValue ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( SetPropertyFloat )
|
||||
virtual bool SetProperty( SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char *pchPropertyName, float flValue ) = 0;
|
||||
|
||||
// Submit the update request by handle
|
||||
virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0;
|
||||
|
||||
virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamInventory *SteamInventory();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInventory *, SteamInventory, STEAMINVENTORY_INTERFACE_VERSION );
|
||||
|
||||
// Global accessor for the gameserver client
|
||||
inline ISteamInventory *SteamGameServerInventory();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamInventory *, SteamGameServerInventory, STEAMINVENTORY_INTERFACE_VERSION );
|
||||
|
||||
// SteamInventoryResultReady_t callbacks are fired whenever asynchronous
|
||||
// results transition from "Pending" to "OK" or an error state. There will
|
||||
// always be exactly one callback per handle.
|
||||
struct SteamInventoryResultReady_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 0 };
|
||||
SteamInventoryResult_t m_handle;
|
||||
EResult m_result;
|
||||
};
|
||||
|
||||
|
||||
// SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems
|
||||
// successfully returns a result which is newer / fresher than the last
|
||||
// known result. (It will not trigger if the inventory hasn't changed,
|
||||
// or if results from two overlapping calls are reversed in flight and
|
||||
// the earlier result is already known to be stale/out-of-date.)
|
||||
// The normal ResultReady callback will still be triggered immediately
|
||||
// afterwards; this is an additional notification for your convenience.
|
||||
struct SteamInventoryFullUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 1 };
|
||||
SteamInventoryResult_t m_handle;
|
||||
};
|
||||
|
||||
|
||||
// A SteamInventoryDefinitionUpdate_t callback is triggered whenever
|
||||
// item definitions have been updated, which could be in response to
|
||||
// LoadItemDefinitions() or any other async request which required
|
||||
// a definition update in order to process results from the server.
|
||||
struct SteamInventoryDefinitionUpdate_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 2 };
|
||||
};
|
||||
|
||||
// Returned
|
||||
struct SteamInventoryEligiblePromoItemDefIDs_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 3 };
|
||||
EResult m_result;
|
||||
CSteamID m_steamID;
|
||||
int m_numEligiblePromoItemDefs;
|
||||
bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server
|
||||
};
|
||||
|
||||
// Triggered from StartPurchase call
|
||||
struct SteamInventoryStartPurchaseResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 4 };
|
||||
EResult m_result;
|
||||
uint64 m_ulOrderID;
|
||||
uint64 m_ulTransID;
|
||||
};
|
||||
|
||||
|
||||
// Triggered from RequestPrices
|
||||
struct SteamInventoryRequestPricesResult_t
|
||||
{
|
||||
enum { k_iCallback = k_iClientInventoryCallbacks + 5 };
|
||||
EResult m_result;
|
||||
char m_rgchCurrency[4];
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // ISTEAMCONTROLLER_H
|
1087
lsteamclient/steamworks_sdk_152/isteammatchmaking.h
Normal file
1087
lsteamclient/steamworks_sdk_152/isteammatchmaking.h
Normal file
File diff suppressed because it is too large
Load Diff
71
lsteamclient/steamworks_sdk_152/isteammusic.h
Normal file
71
lsteamclient/steamworks_sdk_152/isteammusic.h
Normal file
@ -0,0 +1,71 @@
|
||||
//============ Copyright (c) Valve Corporation, All rights reserved. ============
|
||||
|
||||
#ifndef ISTEAMMUSIC_H
|
||||
#define ISTEAMMUSIC_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
enum AudioPlayback_Status
|
||||
{
|
||||
AudioPlayback_Undefined = 0,
|
||||
AudioPlayback_Playing = 1,
|
||||
AudioPlayback_Paused = 2,
|
||||
AudioPlayback_Idle = 3
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions to control music playback in the steam client
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamMusic
|
||||
{
|
||||
public:
|
||||
virtual bool BIsEnabled() = 0;
|
||||
virtual bool BIsPlaying() = 0;
|
||||
|
||||
virtual AudioPlayback_Status GetPlaybackStatus() = 0;
|
||||
|
||||
virtual void Play() = 0;
|
||||
virtual void Pause() = 0;
|
||||
virtual void PlayPrevious() = 0;
|
||||
virtual void PlayNext() = 0;
|
||||
|
||||
// volume is between 0.0 and 1.0
|
||||
virtual void SetVolume( float flVolume ) = 0;
|
||||
virtual float GetVolume() = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMMUSIC_INTERFACE_VERSION "STEAMMUSIC_INTERFACE_VERSION001"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamMusic *SteamMusic();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusic *, SteamMusic, STEAMMUSIC_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( PlaybackStatusHasChanged_t, k_iSteamMusicCallbacks + 1 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( VolumeHasChanged_t, k_iSteamMusicCallbacks + 2 )
|
||||
STEAM_CALLBACK_MEMBER( 0, float, m_flNewVolume )
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
#endif // #define ISTEAMMUSIC_H
|
133
lsteamclient/steamworks_sdk_152/isteammusicremote.h
Normal file
133
lsteamclient/steamworks_sdk_152/isteammusicremote.h
Normal file
@ -0,0 +1,133 @@
|
||||
//============ Copyright (c) Valve Corporation, All rights reserved. ============
|
||||
|
||||
#ifndef ISTEAMMUSICREMOTE_H
|
||||
#define ISTEAMMUSICREMOTE_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
#include "isteammusic.h"
|
||||
|
||||
#define k_SteamMusicNameMaxLength 255
|
||||
#define k_SteamMusicPNGMaxLength 65535
|
||||
|
||||
|
||||
class ISteamMusicRemote
|
||||
{
|
||||
public:
|
||||
// Service Definition
|
||||
virtual bool RegisterSteamMusicRemote( const char *pchName ) = 0;
|
||||
virtual bool DeregisterSteamMusicRemote() = 0;
|
||||
virtual bool BIsCurrentMusicRemote() = 0;
|
||||
virtual bool BActivationSuccess( bool bValue ) = 0;
|
||||
|
||||
virtual bool SetDisplayName( const char *pchDisplayName ) = 0;
|
||||
virtual bool SetPNGIcon_64x64( void *pvBuffer, uint32 cbBufferLength ) = 0;
|
||||
|
||||
// Abilities for the user interface
|
||||
virtual bool EnablePlayPrevious(bool bValue) = 0;
|
||||
virtual bool EnablePlayNext( bool bValue ) = 0;
|
||||
virtual bool EnableShuffled( bool bValue ) = 0;
|
||||
virtual bool EnableLooped( bool bValue ) = 0;
|
||||
virtual bool EnableQueue( bool bValue ) = 0;
|
||||
virtual bool EnablePlaylists( bool bValue ) = 0;
|
||||
|
||||
// Status
|
||||
virtual bool UpdatePlaybackStatus( AudioPlayback_Status nStatus ) = 0;
|
||||
virtual bool UpdateShuffled( bool bValue ) = 0;
|
||||
virtual bool UpdateLooped( bool bValue ) = 0;
|
||||
virtual bool UpdateVolume( float flValue ) = 0; // volume is between 0.0 and 1.0
|
||||
|
||||
// Current Entry
|
||||
virtual bool CurrentEntryWillChange() = 0;
|
||||
virtual bool CurrentEntryIsAvailable( bool bAvailable ) = 0;
|
||||
virtual bool UpdateCurrentEntryText( const char *pchText ) = 0;
|
||||
virtual bool UpdateCurrentEntryElapsedSeconds( int nValue ) = 0;
|
||||
virtual bool UpdateCurrentEntryCoverArt( void *pvBuffer, uint32 cbBufferLength ) = 0;
|
||||
virtual bool CurrentEntryDidChange() = 0;
|
||||
|
||||
// Queue
|
||||
virtual bool QueueWillChange() = 0;
|
||||
virtual bool ResetQueueEntries() = 0;
|
||||
virtual bool SetQueueEntry( int nID, int nPosition, const char *pchEntryText ) = 0;
|
||||
virtual bool SetCurrentQueueEntry( int nID ) = 0;
|
||||
virtual bool QueueDidChange() = 0;
|
||||
|
||||
// Playlist
|
||||
virtual bool PlaylistWillChange() = 0;
|
||||
virtual bool ResetPlaylistEntries() = 0;
|
||||
virtual bool SetPlaylistEntry( int nID, int nPosition, const char *pchEntryText ) = 0;
|
||||
virtual bool SetCurrentPlaylistEntry( int nID ) = 0;
|
||||
virtual bool PlaylistDidChange() = 0;
|
||||
};
|
||||
|
||||
#define STEAMMUSICREMOTE_INTERFACE_VERSION "STEAMMUSICREMOTE_INTERFACE_VERSION001"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamMusicRemote *SteamMusicRemote();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamMusicRemote *, SteamMusicRemote, STEAMMUSICREMOTE_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillActivate_t, k_iSteamMusicRemoteCallbacks + 1)
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteWillDeactivate_t, k_iSteamMusicRemoteCallbacks + 2 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerRemoteToFront_t, k_iSteamMusicRemoteCallbacks + 3 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWillQuit_t, k_iSteamMusicRemoteCallbacks + 4 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlay_t, k_iSteamMusicRemoteCallbacks + 5 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPause_t, k_iSteamMusicRemoteCallbacks + 6 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayPrevious_t, k_iSteamMusicRemoteCallbacks + 7 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayNext_t, k_iSteamMusicRemoteCallbacks + 8 )
|
||||
STEAM_CALLBACK_END(0)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsShuffled_t, k_iSteamMusicRemoteCallbacks + 9 )
|
||||
STEAM_CALLBACK_MEMBER( 0, bool, m_bShuffled )
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsLooped_t, k_iSteamMusicRemoteCallbacks + 10 )
|
||||
STEAM_CALLBACK_MEMBER(0, bool, m_bLooped )
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsVolume_t, k_iSteamMusicCallbacks + 11 )
|
||||
STEAM_CALLBACK_MEMBER(0, float, m_flNewVolume)
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerSelectsQueueEntry_t, k_iSteamMusicCallbacks + 12 )
|
||||
STEAM_CALLBACK_MEMBER(0, int, nID )
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerSelectsPlaylistEntry_t, k_iSteamMusicCallbacks + 13 )
|
||||
STEAM_CALLBACK_MEMBER(0, int, nID )
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
STEAM_CALLBACK_BEGIN( MusicPlayerWantsPlayingRepeatStatus_t, k_iSteamMusicRemoteCallbacks + 14 )
|
||||
STEAM_CALLBACK_MEMBER(0, int, m_nPlayingRepeatStatus )
|
||||
STEAM_CALLBACK_END(1)
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
|
||||
#endif // #define ISTEAMMUSICREMOTE_H
|
343
lsteamclient/steamworks_sdk_152/isteamnetworking.h
Normal file
343
lsteamclient/steamworks_sdk_152/isteamnetworking.h
Normal file
@ -0,0 +1,343 @@
|
||||
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: interface to steam managing network connections between game clients & servers
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMNETWORKING
|
||||
#define ISTEAMNETWORKING
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "steam_api_common.h"
|
||||
|
||||
// list of possible errors returned by SendP2PPacket() API
|
||||
// these will be posted in the P2PSessionConnectFail_t callback
|
||||
enum EP2PSessionError
|
||||
{
|
||||
k_EP2PSessionErrorNone = 0,
|
||||
k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running
|
||||
k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser()
|
||||
// corporate firewalls can also block this (NAT traversal is not firewall traversal)
|
||||
// make sure that UDP ports 3478, 4379, and 4380 are open in an outbound direction
|
||||
|
||||
// The following error codes were removed and will never be sent.
|
||||
// For privacy reasons, there is no reply if the user is offline or playing another game.
|
||||
k_EP2PSessionErrorNotRunningApp_DELETED = 1,
|
||||
k_EP2PSessionErrorDestinationNotLoggedIn_DELETED = 3,
|
||||
|
||||
k_EP2PSessionErrorMax = 5
|
||||
};
|
||||
|
||||
// SendP2PPacket() send types
|
||||
// Typically k_EP2PSendUnreliable is what you want for UDP-like packets, k_EP2PSendReliable for TCP-like packets
|
||||
enum EP2PSend
|
||||
{
|
||||
// Basic UDP send. Packets can't be bigger than 1200 bytes (your typical MTU size). Can be lost, or arrive out of order (rare).
|
||||
// The sending API does have some knowledge of the underlying connection, so if there is no NAT-traversal accomplished or
|
||||
// there is a recognized adjustment happening on the connection, the packet will be batched until the connection is open again.
|
||||
k_EP2PSendUnreliable = 0,
|
||||
|
||||
// As above, but if the underlying p2p connection isn't yet established the packet will just be thrown away. Using this on the first
|
||||
// packet sent to a remote host almost guarantees the packet will be dropped.
|
||||
// This is only really useful for kinds of data that should never buffer up, i.e. voice payload packets
|
||||
k_EP2PSendUnreliableNoDelay = 1,
|
||||
|
||||
// Reliable message send. Can send up to 1MB of data in a single message.
|
||||
// Does fragmentation/re-assembly of messages under the hood, as well as a sliding window for efficient sends of large chunks of data.
|
||||
k_EP2PSendReliable = 2,
|
||||
|
||||
// As above, but applies the Nagle algorithm to the send - sends will accumulate
|
||||
// until the current MTU size (typically ~1200 bytes, but can change) or ~200ms has passed (Nagle algorithm).
|
||||
// Useful if you want to send a set of smaller messages but have the coalesced into a single packet
|
||||
// Since the reliable stream is all ordered, you can do several small message sends with k_EP2PSendReliableWithBuffering and then
|
||||
// do a normal k_EP2PSendReliable to force all the buffered data to be sent.
|
||||
k_EP2PSendReliableWithBuffering = 3,
|
||||
|
||||
};
|
||||
|
||||
|
||||
// connection state to a specified user, returned by GetP2PSessionState()
|
||||
// this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
struct P2PSessionState_t
|
||||
{
|
||||
uint8 m_bConnectionActive; // true if we've got an active open connection
|
||||
uint8 m_bConnecting; // true if we're currently trying to establish a connection
|
||||
uint8 m_eP2PSessionError; // last error recorded (see enum above)
|
||||
uint8 m_bUsingRelay; // true if it's going through a relay server (TURN)
|
||||
int32 m_nBytesQueuedForSend;
|
||||
int32 m_nPacketsQueuedForSend;
|
||||
uint32 m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server.
|
||||
uint16 m_nRemotePort; // Only exists for compatibility with older authentication api's
|
||||
};
|
||||
#pragma pack( pop )
|
||||
|
||||
|
||||
// handle to a socket
|
||||
typedef uint32 SNetSocket_t; // CreateP2PConnectionSocket()
|
||||
typedef uint32 SNetListenSocket_t; // CreateListenSocket()
|
||||
|
||||
// connection progress indicators, used by CreateP2PConnectionSocket()
|
||||
enum ESNetSocketState
|
||||
{
|
||||
k_ESNetSocketStateInvalid = 0,
|
||||
|
||||
// communication is valid
|
||||
k_ESNetSocketStateConnected = 1,
|
||||
|
||||
// states while establishing a connection
|
||||
k_ESNetSocketStateInitiated = 10, // the connection state machine has started
|
||||
|
||||
// p2p connections
|
||||
k_ESNetSocketStateLocalCandidatesFound = 11, // we've found our local IP info
|
||||
k_ESNetSocketStateReceivedRemoteCandidates = 12,// we've received information from the remote machine, via the Steam back-end, about their IP info
|
||||
|
||||
// direct connections
|
||||
k_ESNetSocketStateChallengeHandshake = 15, // we've received a challenge packet from the server
|
||||
|
||||
// failure states
|
||||
k_ESNetSocketStateDisconnecting = 21, // the API shut it down, and we're in the process of telling the other end
|
||||
k_ESNetSocketStateLocalDisconnect = 22, // the API shut it down, and we've completed shutdown
|
||||
k_ESNetSocketStateTimeoutDuringConnect = 23, // we timed out while trying to creating the connection
|
||||
k_ESNetSocketStateRemoteEndDisconnected = 24, // the remote end has disconnected from us
|
||||
k_ESNetSocketStateConnectionBroken = 25, // connection has been broken; either the other end has disappeared or our local network connection has broke
|
||||
|
||||
};
|
||||
|
||||
// describes how the socket is currently connected
|
||||
enum ESNetSocketConnectionType
|
||||
{
|
||||
k_ESNetSocketConnectionTypeNotConnected = 0,
|
||||
k_ESNetSocketConnectionTypeUDP = 1,
|
||||
k_ESNetSocketConnectionTypeUDPRelay = 2,
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for making connections and sending data between clients,
|
||||
// traversing NAT's where possible
|
||||
//
|
||||
// NOTE: This interface is deprecated and may be removed in a future release of
|
||||
/// the Steamworks SDK. Please see ISteamNetworkingSockets and
|
||||
/// ISteamNetworkingMessages
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamNetworking
|
||||
{
|
||||
public:
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// UDP-style (connectionless) networking interface. These functions send messages using
|
||||
// an API organized around the destination. Reliable and unreliable messages are supported.
|
||||
//
|
||||
// For a more TCP-style interface (meaning you have a connection handle), see the functions below.
|
||||
// Both interface styles can send both reliable and unreliable messages.
|
||||
//
|
||||
// Automatically establishes NAT-traversing or Relay server connections
|
||||
//
|
||||
// These APIs are deprecated, and may be removed in a future version of the Steamworks
|
||||
// SDK. See ISteamNetworkingMessages.
|
||||
|
||||
// Sends a P2P packet to the specified user
|
||||
// UDP-like, unreliable and a max packet size of 1200 bytes
|
||||
// the first packet send may be delayed as the NAT-traversal code runs
|
||||
// if we can't get through to the user, an error will be posted via the callback P2PSessionConnectFail_t
|
||||
// see EP2PSend enum above for the descriptions of the different ways of sending packets
|
||||
//
|
||||
// nChannel is a routing number you can use to help route message to different systems - you'll have to call ReadP2PPacket()
|
||||
// with the same channel number in order to retrieve the data on the other end
|
||||
// using different channels to talk to the same user will still use the same underlying p2p connection, saving on resources
|
||||
virtual bool SendP2PPacket( CSteamID steamIDRemote, const void *pubData, uint32 cubData, EP2PSend eP2PSendType, int nChannel = 0 ) = 0;
|
||||
|
||||
// returns true if any data is available for read, and the amount of data that will need to be read
|
||||
virtual bool IsP2PPacketAvailable( uint32 *pcubMsgSize, int nChannel = 0 ) = 0;
|
||||
|
||||
// reads in a packet that has been sent from another user via SendP2PPacket()
|
||||
// returns the size of the message and the steamID of the user who sent it in the last two parameters
|
||||
// if the buffer passed in is too small, the message will be truncated
|
||||
// this call is not blocking, and will return false if no data is available
|
||||
virtual bool ReadP2PPacket( void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, CSteamID *psteamIDRemote, int nChannel = 0 ) = 0;
|
||||
|
||||
// AcceptP2PSessionWithUser() should only be called in response to a P2PSessionRequest_t callback
|
||||
// P2PSessionRequest_t will be posted if another user tries to send you a packet that you haven't talked to yet
|
||||
// if you don't want to talk to the user, just ignore the request
|
||||
// if the user continues to send you packets, another P2PSessionRequest_t will be posted periodically
|
||||
// this may be called multiple times for a single user
|
||||
// (if you've called SendP2PPacket() on the other user, this implicitly accepts the session request)
|
||||
virtual bool AcceptP2PSessionWithUser( CSteamID steamIDRemote ) = 0;
|
||||
|
||||
// call CloseP2PSessionWithUser() when you're done talking to a user, will free up resources under-the-hood
|
||||
// if the remote user tries to send data to you again, another P2PSessionRequest_t callback will be posted
|
||||
virtual bool CloseP2PSessionWithUser( CSteamID steamIDRemote ) = 0;
|
||||
|
||||
// call CloseP2PChannelWithUser() when you're done talking to a user on a specific channel. Once all channels
|
||||
// open channels to a user have been closed, the open session to the user will be closed and new data from this
|
||||
// user will trigger a P2PSessionRequest_t callback
|
||||
virtual bool CloseP2PChannelWithUser( CSteamID steamIDRemote, int nChannel ) = 0;
|
||||
|
||||
// fills out P2PSessionState_t structure with details about the underlying connection to the user
|
||||
// should only needed for debugging purposes
|
||||
// returns false if no connection exists to the specified user
|
||||
virtual bool GetP2PSessionState( CSteamID steamIDRemote, P2PSessionState_t *pConnectionState ) = 0;
|
||||
|
||||
// Allow P2P connections to fall back to being relayed through the Steam servers if a direct connection
|
||||
// or NAT-traversal cannot be established. Only applies to connections created after setting this value,
|
||||
// or to existing connections that need to automatically reconnect after this value is set.
|
||||
//
|
||||
// P2P packet relay is allowed by default
|
||||
//
|
||||
// NOTE: This function is deprecated and may be removed in a future version of the SDK. For
|
||||
// security purposes, we may decide to relay the traffic to certain peers, even if you pass false
|
||||
// to this function, to prevent revealing the client's IP address top another peer.
|
||||
virtual bool AllowP2PPacketRelay( bool bAllow ) = 0;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LISTEN / CONNECT connection-oriented interface functions
|
||||
//
|
||||
// These functions are more like a client-server TCP API. One side is the "server"
|
||||
// and "listens" for incoming connections, which then must be "accepted." The "client"
|
||||
// initiates a connection by "connecting." Sending and receiving is done through a
|
||||
// connection handle.
|
||||
//
|
||||
// For a more UDP-style interface, where you do not track connection handles but
|
||||
// simply send messages to a SteamID, use the UDP-style functions above.
|
||||
//
|
||||
// Both methods can send both reliable and unreliable methods.
|
||||
//
|
||||
// These APIs are deprecated, and may be removed in a future version of the Steamworks
|
||||
// SDK. See ISteamNetworkingSockets.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// creates a socket and listens others to connect
|
||||
// will trigger a SocketStatusCallback_t callback on another client connecting
|
||||
// nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports
|
||||
// this can usually just be 0 unless you want multiple sets of connections
|
||||
// unIP is the local IP address to bind to
|
||||
// pass in 0 if you just want the default local IP
|
||||
// unPort is the port to use
|
||||
// pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only
|
||||
virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, SteamIPAddress_t nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0;
|
||||
|
||||
// creates a socket and begin connection to a remote destination
|
||||
// can connect via a known steamID (client or game server), or directly to an IP
|
||||
// on success will trigger a SocketStatusCallback_t callback
|
||||
// on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState
|
||||
virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0;
|
||||
virtual SNetSocket_t CreateConnectionSocket( SteamIPAddress_t nIP, uint16 nPort, int nTimeoutSec ) = 0;
|
||||
|
||||
// disconnects the connection to the socket, if any, and invalidates the handle
|
||||
// any unread data on the socket will be thrown away
|
||||
// if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect
|
||||
virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0;
|
||||
// destroying a listen socket will automatically kill all the regular sockets generated from it
|
||||
virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0;
|
||||
|
||||
// sending data
|
||||
// must be a handle to a connected socket
|
||||
// data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets
|
||||
// use the reliable flag with caution; although the resend rate is pretty aggressive,
|
||||
// it can still cause stalls in receiving data (like TCP)
|
||||
virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0;
|
||||
|
||||
// receiving data
|
||||
// returns false if there is no data remaining
|
||||
// fills out *pcubMsgSize with the size of the next message, in bytes
|
||||
virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0;
|
||||
|
||||
// fills in pubDest with the contents of the message
|
||||
// messages are always complete, of the same size as was sent (i.e. packetized, not streaming)
|
||||
// if *pcubMsgSize < cubDest, only partial data is written
|
||||
// returns false if no data is available
|
||||
virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0;
|
||||
|
||||
// checks for data from any socket that has been connected off this listen socket
|
||||
// returns false if there is no data remaining
|
||||
// fills out *pcubMsgSize with the size of the next message, in bytes
|
||||
// fills out *phSocket with the socket that data is available on
|
||||
virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0;
|
||||
|
||||
// retrieves data from any socket that has been connected off this listen socket
|
||||
// fills in pubDest with the contents of the message
|
||||
// messages are always complete, of the same size as was sent (i.e. packetized, not streaming)
|
||||
// if *pcubMsgSize < cubDest, only partial data is written
|
||||
// returns false if no data is available
|
||||
// fills out *phSocket with the socket that data is available on
|
||||
virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0;
|
||||
|
||||
// returns information about the specified socket, filling out the contents of the pointers
|
||||
virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, SteamIPAddress_t *punIPRemote, uint16 *punPortRemote ) = 0;
|
||||
|
||||
// returns which local port the listen socket is bound to
|
||||
// *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only
|
||||
virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, SteamIPAddress_t *pnIP, uint16 *pnPort ) = 0;
|
||||
|
||||
// returns true to describe how the socket ended up connecting
|
||||
virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0;
|
||||
|
||||
// max packet size, in bytes
|
||||
virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0;
|
||||
};
|
||||
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking006"
|
||||
|
||||
// Global interface accessor
|
||||
inline ISteamNetworking *SteamNetworking();
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamNetworking, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
|
||||
// Global accessor for the gameserver client
|
||||
inline ISteamNetworking *SteamGameServerNetworking();
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworking *, SteamGameServerNetworking, STEAMNETWORKING_INTERFACE_VERSION );
|
||||
|
||||
// callbacks
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error steam_api_common.h should define VALVE_CALLBACK_PACK_xxx
|
||||
#endif
|
||||
|
||||
// callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API
|
||||
// in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them
|
||||
struct P2PSessionRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 2 };
|
||||
CSteamID m_steamIDRemote; // user who wants to talk to us
|
||||
};
|
||||
|
||||
|
||||
// callback notification - packets can't get through to the specified user via the SendP2PPacket() API
|
||||
// all packets queued packets unsent at this point will be dropped
|
||||
// further attempts to send will retry making the connection (but will be dropped if we fail again)
|
||||
struct P2PSessionConnectFail_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 3 };
|
||||
CSteamID m_steamIDRemote; // user we were sending packets to
|
||||
uint8 m_eP2PSessionError; // EP2PSessionError indicating why we're having trouble
|
||||
};
|
||||
|
||||
|
||||
// callback notification - status of a socket has changed
|
||||
// used as part of the CreateListenSocket() / CreateP2PConnectionSocket()
|
||||
struct SocketStatusCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingCallbacks + 1 };
|
||||
SNetSocket_t m_hSocket; // the socket used to send/receive data to the remote host
|
||||
SNetListenSocket_t m_hListenSocket; // this is the server socket that we were listening on; NULL if this was an outgoing connection
|
||||
CSteamID m_steamIDRemote; // remote steamID we have connected to, if it has one
|
||||
int m_eSNetSocketState; // socket state, ESNetSocketState
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMNETWORKING
|
198
lsteamclient/steamworks_sdk_152/isteamnetworkingmessages.h
Normal file
198
lsteamclient/steamworks_sdk_152/isteamnetworkingmessages.h
Normal file
@ -0,0 +1,198 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
|
||||
#ifndef ISTEAMNETWORKINGMESSAGES
|
||||
#define ISTEAMNETWORKINGMESSAGES
|
||||
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// The non-connection-oriented interface to send and receive messages
|
||||
/// (whether they be "clients" or "servers").
|
||||
///
|
||||
/// ISteamNetworkingSockets is connection-oriented (like TCP), meaning you
|
||||
/// need to listen and connect, and then you send messages using a connection
|
||||
/// handle. ISteamNetworkingMessages is more like UDP, in that you can just send
|
||||
/// messages to arbitrary peers at any time. The underlying connections are
|
||||
/// established implicitly.
|
||||
///
|
||||
/// Under the hood ISteamNetworkingMessages works on top of the ISteamNetworkingSockets
|
||||
/// code, so you get the same routing and messaging efficiency. The difference is
|
||||
/// mainly in your responsibility to explicitly establish a connection and
|
||||
/// the type of feedback you get about the state of the connection. Both
|
||||
/// interfaces can do "P2P" communications, and both support both unreliable
|
||||
/// and reliable messages, fragmentation and reassembly.
|
||||
///
|
||||
/// The primary purpose of this interface is to be "like UDP", so that UDP-based code
|
||||
/// can be ported easily to take advantage of relayed connections. If you find
|
||||
/// yourself needing more low level information or control, or to be able to better
|
||||
/// handle failure, then you probably need to use ISteamNetworkingSockets directly.
|
||||
/// Also, note that if your main goal is to obtain a connection between two peers
|
||||
/// without concerning yourself with assigning roles of "client" and "server",
|
||||
/// you may find the symmetric connection mode of ISteamNetworkingSockets useful.
|
||||
/// (See k_ESteamNetworkingConfig_SymmetricConnect.)
|
||||
///
|
||||
class ISteamNetworkingMessages
|
||||
{
|
||||
public:
|
||||
/// Sends a message to the specified host. If we don't already have a session with that user,
|
||||
/// a session is implicitly created. There might be some handshaking that needs to happen
|
||||
/// before we can actually begin sending message data. If this handshaking fails and we can't
|
||||
/// get through, an error will be posted via the callback SteamNetworkingMessagesSessionFailed_t.
|
||||
/// There is no notification when the operation succeeds. (You should have the peer send a reply
|
||||
/// for this purpose.)
|
||||
///
|
||||
/// Sending a message to a host will also implicitly accept any incoming connection from that host.
|
||||
///
|
||||
/// nSendFlags is a bitmask of k_nSteamNetworkingSend_xxx options
|
||||
///
|
||||
/// nRemoteChannel is a routing number you can use to help route message to different systems.
|
||||
/// You'll have to call ReceiveMessagesOnChannel() with the same channel number in order to retrieve
|
||||
/// the data on the other end.
|
||||
///
|
||||
/// Using different channels to talk to the same user will still use the same underlying
|
||||
/// connection, saving on resources. If you don't need this feature, use 0.
|
||||
/// Otherwise, small integers are the most efficient.
|
||||
///
|
||||
/// It is guaranteed that reliable messages to the same host on the same channel
|
||||
/// will be be received by the remote host (if they are received at all) exactly once,
|
||||
/// and in the same order that they were sent.
|
||||
///
|
||||
/// NO other order guarantees exist! In particular, unreliable messages may be dropped,
|
||||
/// received out of order with respect to each other and with respect to reliable data,
|
||||
/// or may be received multiple times. Messages on different channels are *not* guaranteed
|
||||
/// to be received in the order they were sent.
|
||||
///
|
||||
/// A note for those familiar with TCP/IP ports, or converting an existing codebase that
|
||||
/// opened multiple sockets: You might notice that there is only one channel, and with
|
||||
/// TCP/IP each endpoint has a port number. You can think of the channel number as the
|
||||
/// *destination* port. If you need each message to also include a "source port" (so the
|
||||
/// recipient can route the reply), then just put that in your message. That is essentially
|
||||
/// how UDP works!
|
||||
///
|
||||
/// Returns:
|
||||
/// - k_EREsultOK on success.
|
||||
/// - k_EResultNoConnection will be returned if the session has failed or was closed by the peer,
|
||||
/// and k_nSteamNetworkingSend_AutoRestartBrokenSession is not used. (You can use
|
||||
/// GetSessionConnectionInfo to get the details.) In order to acknowledge the broken session
|
||||
/// and start a new one, you must call CloseSessionWithUser
|
||||
/// - See ISteamNetworkingSockets::SendMessageToConnection for more possible return values
|
||||
virtual EResult SendMessageToUser( const SteamNetworkingIdentity *identityRemote, const void *pubData, uint32 cubData, int nSendFlags, int nRemoteChannel ) = 0;
|
||||
|
||||
/// Reads the next message that has been sent from another user via SendMessageToUser() on the given channel.
|
||||
/// Returns number of messages returned into your list. (0 if no message are available on that channel.)
|
||||
///
|
||||
/// When you're done with the message object(s), make sure and call SteamNetworkingMessage_t::Release()!
|
||||
virtual int ReceiveMessagesOnChannel( int nLocalChannel, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0;
|
||||
|
||||
/// Call this in response to a SteamNetworkingMessagesSessionRequest_t callback.
|
||||
/// SteamNetworkingMessagesSessionRequest_t are posted when a user tries to send you a message,
|
||||
/// and you haven't tried to talk to them first. If you don't want to talk to them, just ignore
|
||||
/// the request. If the user continues to send you messages, SteamNetworkingMessagesSessionRequest_t
|
||||
/// callbacks will continue to be posted periodically.
|
||||
///
|
||||
/// Returns false if there is no session with the user pending or otherwise. If there is an
|
||||
/// existing active session, this function will return true, even if it is not pending.
|
||||
///
|
||||
/// Calling SendMessageToUser() will implicitly accepts any pending session request to that user.
|
||||
virtual bool AcceptSessionWithUser( const SteamNetworkingIdentity *identityRemote ) = 0;
|
||||
|
||||
/// Call this when you're done talking to a user to immediately free up resources under-the-hood.
|
||||
/// If the remote user tries to send data to you again, another SteamNetworkingMessagesSessionRequest_t
|
||||
/// callback will be posted.
|
||||
///
|
||||
/// Note that sessions that go unused for a few minutes are automatically timed out.
|
||||
virtual bool CloseSessionWithUser( const SteamNetworkingIdentity *identityRemote ) = 0;
|
||||
|
||||
/// Call this when you're done talking to a user on a specific channel. Once all
|
||||
/// open channels to a user have been closed, the open session to the user will be
|
||||
/// closed, and any new data from this user will trigger a
|
||||
/// SteamSteamNetworkingMessagesSessionRequest_t callback
|
||||
virtual bool CloseChannelWithUser( const SteamNetworkingIdentity *identityRemote, int nLocalChannel ) = 0;
|
||||
|
||||
/// Returns information about the latest state of a connection, if any, with the given peer.
|
||||
/// Primarily intended for debugging purposes, but can also be used to get more detailed
|
||||
/// failure information. (See SendMessageToUser and k_nSteamNetworkingSend_AutoRestartBrokenSession.)
|
||||
///
|
||||
/// Returns the value of SteamNetConnectionInfo_t::m_eState, or k_ESteamNetworkingConnectionState_None
|
||||
/// if no connection exists with specified peer. You may pass nullptr for either parameter if
|
||||
/// you do not need the corresponding details. Note that sessions time out after a while,
|
||||
/// so if a connection fails, or SendMessageToUser returns k_EResultNoConnection, you cannot wait
|
||||
/// indefinitely to obtain the reason for failure.
|
||||
virtual ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity *identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetworkingQuickConnectionStatus *pQuickStatus ) = 0;
|
||||
};
|
||||
#define STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "SteamNetworkingMessages002"
|
||||
|
||||
//
|
||||
// Callbacks
|
||||
//
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
/// Posted when a remote host is sending us a message, and we do not already have a session with them
|
||||
struct SteamNetworkingMessagesSessionRequest_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 1 };
|
||||
SteamNetworkingIdentity m_identityRemote; // user who wants to talk to us
|
||||
};
|
||||
|
||||
/// Posted when we fail to establish a connection, or we detect that communications
|
||||
/// have been disrupted it an unusual way. There is no notification when a peer proactively
|
||||
/// closes the session. ("Closed by peer" is not a concept of UDP-style communications, and
|
||||
/// SteamNetworkingMessages is primarily intended to make porting UDP code easy.)
|
||||
///
|
||||
/// Remember: callbacks are asynchronous. See notes on SendMessageToUser,
|
||||
/// and k_nSteamNetworkingSend_AutoRestartBrokenSession in particular.
|
||||
///
|
||||
/// Also, if a session times out due to inactivity, no callbacks will be posted. The only
|
||||
/// way to detect that this is happening is that querying the session state may return
|
||||
/// none, connecting, and findingroute again.
|
||||
struct SteamNetworkingMessagesSessionFailed_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 2 };
|
||||
|
||||
/// Detailed info about the session that failed.
|
||||
/// SteamNetConnectionInfo_t::m_identityRemote indicates who this session
|
||||
/// was with.
|
||||
SteamNetConnectionInfo_t m_info;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
// Global accessors
|
||||
// Using standalone lib
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
|
||||
// Standalone lib.
|
||||
static_assert( STEAMNETWORKINGMESSAGES_INTERFACE_VERSION[25] == '2', "Version mismatch" );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages_LibV2();
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages_Lib() { return SteamNetworkingMessages_LibV2(); }
|
||||
|
||||
// If running in context of steam, we also define a gameserver instance.
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAM
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamGameServerNetworkingMessages_LibV2();
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); }
|
||||
#endif
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); }
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAM
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Using Steamworks SDK
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
|
||||
// Steamworks SDK
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION );
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamGameServerNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION );
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_SteamAPI(); }
|
||||
inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // ISTEAMNETWORKINGMESSAGES
|
819
lsteamclient/steamworks_sdk_152/isteamnetworkingsockets.h
Normal file
819
lsteamclient/steamworks_sdk_152/isteamnetworkingsockets.h
Normal file
@ -0,0 +1,819 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
|
||||
#ifndef ISTEAMNETWORKINGSOCKETS
|
||||
#define ISTEAMNETWORKINGSOCKETS
|
||||
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
struct SteamNetAuthenticationStatus_t;
|
||||
class ISteamNetworkingConnectionSignaling;
|
||||
class ISteamNetworkingSignalingRecvContext;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// Lower level networking API.
|
||||
///
|
||||
/// - Connection-oriented API (like TCP, not UDP). When sending and receiving
|
||||
/// messages, a connection handle is used. (For a UDP-style interface, where
|
||||
/// the peer is identified by their address with each send/recv call, see
|
||||
/// ISteamNetworkingMessages.) The typical pattern is for a "server" to "listen"
|
||||
/// on a "listen socket." A "client" will "connect" to the server, and the
|
||||
/// server will "accept" the connection. If you have a symmetric situation
|
||||
/// where either peer may initiate the connection and server/client roles are
|
||||
/// not clearly defined, check out k_ESteamNetworkingConfig_SymmetricConnect.
|
||||
/// - But unlike TCP, it's message-oriented, not stream-oriented.
|
||||
/// - Mix of reliable and unreliable messages
|
||||
/// - Fragmentation and reassembly
|
||||
/// - Supports connectivity over plain UDP
|
||||
/// - Also supports SDR ("Steam Datagram Relay") connections, which are
|
||||
/// addressed by the identity of the peer. There is a "P2P" use case and
|
||||
/// a "hosted dedicated server" use case.
|
||||
///
|
||||
/// Note that neither of the terms "connection" nor "socket" necessarily correspond
|
||||
/// one-to-one with an underlying UDP socket. An attempt has been made to
|
||||
/// keep the semantics as similar to the standard socket model when appropriate,
|
||||
/// but some deviations do exist.
|
||||
///
|
||||
/// See also: ISteamNetworkingMessages, the UDP-style interface. This API might be
|
||||
/// easier to use, especially when porting existing UDP code.
|
||||
class ISteamNetworkingSockets
|
||||
{
|
||||
public:
|
||||
|
||||
/// Creates a "server" socket that listens for clients to connect to by
|
||||
/// calling ConnectByIPAddress, over ordinary UDP (IPv4 or IPv6)
|
||||
///
|
||||
/// You must select a specific local port to listen on and set it
|
||||
/// the port field of the local address.
|
||||
///
|
||||
/// Usually you will set the IP portion of the address to zero (SteamNetworkingIPAddr::Clear()).
|
||||
/// This means that you will not bind to any particular local interface (i.e. the same
|
||||
/// as INADDR_ANY in plain socket code). Furthermore, if possible the socket will be bound
|
||||
/// in "dual stack" mode, which means that it can accept both IPv4 and IPv6 client connections.
|
||||
/// If you really do wish to bind a particular interface, then set the local address to the
|
||||
/// appropriate IPv4 or IPv6 IP.
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
///
|
||||
/// When a client attempts to connect, a SteamNetConnectionStatusChangedCallback_t
|
||||
/// will be posted. The connection will be in the connecting state.
|
||||
virtual HSteamListenSocket CreateListenSocketIP( const SteamNetworkingIPAddr *localAddress, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
/// Creates a connection and begins talking to a "server" over UDP at the
|
||||
/// given IPv4 or IPv6 address. The remote host must be listening with a
|
||||
/// matching call to CreateListenSocketIP on the specified port.
|
||||
///
|
||||
/// A SteamNetConnectionStatusChangedCallback_t callback will be triggered when we start
|
||||
/// connecting, and then another one on either timeout or successful connection.
|
||||
///
|
||||
/// If the server does not have any identity configured, then their network address
|
||||
/// will be the only identity in use. Or, the network host may provide a platform-specific
|
||||
/// identity with or without a valid certificate to authenticate that identity. (These
|
||||
/// details will be contained in the SteamNetConnectionStatusChangedCallback_t.) It's
|
||||
/// up to your application to decide whether to allow the connection.
|
||||
///
|
||||
/// By default, all connections will get basic encryption sufficient to prevent
|
||||
/// casual eavesdropping. But note that without certificates (or a shared secret
|
||||
/// distributed through some other out-of-band mechanism), you don't have any
|
||||
/// way of knowing who is actually on the other end, and thus are vulnerable to
|
||||
/// man-in-the-middle attacks.
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
virtual HSteamNetConnection ConnectByIPAddress( const SteamNetworkingIPAddr *address, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
/// Like CreateListenSocketIP, but clients will connect using ConnectP2P.
|
||||
///
|
||||
/// nLocalVirtualPort specifies how clients can connect to this socket using
|
||||
/// ConnectP2P. It's very common for applications to only have one listening socket;
|
||||
/// in that case, use zero. If you need to open multiple listen sockets and have clients
|
||||
/// be able to connect to one or the other, then nLocalVirtualPort should be a small
|
||||
/// integer (<1000) unique to each listen socket you create.
|
||||
///
|
||||
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
|
||||
/// when your app initializes.
|
||||
///
|
||||
/// If you are listening on a dedicated servers in known data center,
|
||||
/// then you can listen using this function instead of CreateHostedDedicatedServerListenSocket,
|
||||
/// to allow clients to connect without a ticket. Any user that owns
|
||||
/// the app and is signed into Steam will be able to attempt to connect to
|
||||
/// your server. Also, a connection attempt may require the client to
|
||||
/// be connected to Steam, which is one more moving part that may fail. When
|
||||
/// tickets are used, then once a ticket is obtained, a client can connect to
|
||||
/// your server even if they got disconnected from Steam or Steam is offline.
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
virtual HSteamListenSocket CreateListenSocketP2P( int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
/// Begin connecting to a peer that is identified using a platform-specific identifier.
|
||||
/// This uses the default rendezvous service, which depends on the platform and library
|
||||
/// configuration. (E.g. on Steam, it goes through the steam backend.)
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
///
|
||||
/// To use your own signaling service, see:
|
||||
/// - ConnectP2PCustomSignaling
|
||||
/// - k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling
|
||||
virtual HSteamNetConnection ConnectP2P( const SteamNetworkingIdentity *identityRemote, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
/// Accept an incoming connection that has been received on a listen socket.
|
||||
///
|
||||
/// When a connection attempt is received (perhaps after a few basic handshake
|
||||
/// packets have been exchanged to prevent trivial spoofing), a connection interface
|
||||
/// object is created in the k_ESteamNetworkingConnectionState_Connecting state
|
||||
/// and a SteamNetConnectionStatusChangedCallback_t is posted. At this point, your
|
||||
/// application MUST either accept or close the connection. (It may not ignore it.)
|
||||
/// Accepting the connection will transition it either into the connected state,
|
||||
/// or the finding route state, depending on the connection type.
|
||||
///
|
||||
/// You should take action within a second or two, because accepting the connection is
|
||||
/// what actually sends the reply notifying the client that they are connected. If you
|
||||
/// delay taking action, from the client's perspective it is the same as the network
|
||||
/// being unresponsive, and the client may timeout the connection attempt. In other
|
||||
/// words, the client cannot distinguish between a delay caused by network problems
|
||||
/// and a delay caused by the application.
|
||||
///
|
||||
/// This means that if your application goes for more than a few seconds without
|
||||
/// processing callbacks (for example, while loading a map), then there is a chance
|
||||
/// that a client may attempt to connect in that interval and fail due to timeout.
|
||||
///
|
||||
/// If the application does not respond to the connection attempt in a timely manner,
|
||||
/// and we stop receiving communication from the client, the connection attempt will
|
||||
/// be timed out locally, transitioning the connection to the
|
||||
/// k_ESteamNetworkingConnectionState_ProblemDetectedLocally state. The client may also
|
||||
/// close the connection before it is accepted, and a transition to the
|
||||
/// k_ESteamNetworkingConnectionState_ClosedByPeer is also possible depending the exact
|
||||
/// sequence of events.
|
||||
///
|
||||
/// Returns k_EResultInvalidParam if the handle is invalid.
|
||||
/// Returns k_EResultInvalidState if the connection is not in the appropriate state.
|
||||
/// (Remember that the connection state could change in between the time that the
|
||||
/// notification being posted to the queue and when it is received by the application.)
|
||||
///
|
||||
/// A note about connection configuration options. If you need to set any configuration
|
||||
/// options that are common to all connections accepted through a particular listen
|
||||
/// socket, consider setting the options on the listen socket, since such options are
|
||||
/// inherited automatically. If you really do need to set options that are connection
|
||||
/// specific, it is safe to set them on the connection before accepting the connection.
|
||||
virtual EResult AcceptConnection( HSteamNetConnection hConn ) = 0;
|
||||
|
||||
/// Disconnects from the remote host and invalidates the connection handle.
|
||||
/// Any unread data on the connection is discarded.
|
||||
///
|
||||
/// nReason is an application defined code that will be received on the other
|
||||
/// end and recorded (when possible) in backend analytics. The value should
|
||||
/// come from a restricted range. (See ESteamNetConnectionEnd.) If you don't need
|
||||
/// to communicate any information to the remote host, and do not want analytics to
|
||||
/// be able to distinguish "normal" connection terminations from "exceptional" ones,
|
||||
/// You may pass zero, in which case the generic value of
|
||||
/// k_ESteamNetConnectionEnd_App_Generic will be used.
|
||||
///
|
||||
/// pszDebug is an optional human-readable diagnostic string that will be received
|
||||
/// by the remote host and recorded (when possible) in backend analytics.
|
||||
///
|
||||
/// If you wish to put the socket into a "linger" state, where an attempt is made to
|
||||
/// flush any remaining sent data, use bEnableLinger=true. Otherwise reliable data
|
||||
/// is not flushed.
|
||||
///
|
||||
/// If the connection has already ended and you are just freeing up the
|
||||
/// connection interface, the reason code, debug string, and linger flag are
|
||||
/// ignored.
|
||||
virtual bool CloseConnection( HSteamNetConnection hPeer, int nReason, const char *pszDebug, bool bEnableLinger ) = 0;
|
||||
|
||||
/// Destroy a listen socket. All the connections that were accepting on the listen
|
||||
/// socket are closed ungracefully.
|
||||
virtual bool CloseListenSocket( HSteamListenSocket hSocket ) = 0;
|
||||
|
||||
/// Set connection user data. the data is returned in the following places
|
||||
/// - You can query it using GetConnectionUserData.
|
||||
/// - The SteamNetworkingmessage_t structure.
|
||||
/// - The SteamNetConnectionInfo_t structure.
|
||||
/// (Which is a member of SteamNetConnectionStatusChangedCallback_t -- but see WARNINGS below!!!!)
|
||||
///
|
||||
/// Do you need to set this atomically when the connection is created?
|
||||
/// See k_ESteamNetworkingConfig_ConnectionUserData.
|
||||
///
|
||||
/// WARNING: Be *very careful* when using the value provided in callbacks structs.
|
||||
/// Callbacks are queued, and the value that you will receive in your
|
||||
/// callback is the userdata that was effective at the time the callback
|
||||
/// was queued. There are subtle race conditions that can happen if you
|
||||
/// don't understand this!
|
||||
///
|
||||
/// If any incoming messages for this connection are queued, the userdata
|
||||
/// field is updated, so that when when you receive messages (e.g. with
|
||||
/// ReceiveMessagesOnConnection), they will always have the very latest
|
||||
/// userdata. So the tricky race conditions that can happen with callbacks
|
||||
/// do not apply to retrieving messages.
|
||||
///
|
||||
/// Returns false if the handle is invalid.
|
||||
virtual bool SetConnectionUserData( HSteamNetConnection hPeer, int64 nUserData ) = 0;
|
||||
|
||||
/// Fetch connection user data. Returns -1 if handle is invalid
|
||||
/// or if you haven't set any userdata on the connection.
|
||||
virtual int64 GetConnectionUserData( HSteamNetConnection hPeer ) = 0;
|
||||
|
||||
/// Set a name for the connection, used mostly for debugging
|
||||
virtual void SetConnectionName( HSteamNetConnection hPeer, const char *pszName ) = 0;
|
||||
|
||||
/// Fetch connection name. Returns false if handle is invalid
|
||||
virtual bool GetConnectionName( HSteamNetConnection hPeer, char *pszName, int nMaxLen ) = 0;
|
||||
|
||||
/// Send a message to the remote host on the specified connection.
|
||||
///
|
||||
/// nSendFlags determines the delivery guarantees that will be provided,
|
||||
/// when data should be buffered, etc. E.g. k_nSteamNetworkingSend_Unreliable
|
||||
///
|
||||
/// Note that the semantics we use for messages are not precisely
|
||||
/// the same as the semantics of a standard "stream" socket.
|
||||
/// (SOCK_STREAM) For an ordinary stream socket, the boundaries
|
||||
/// between chunks are not considered relevant, and the sizes of
|
||||
/// the chunks of data written will not necessarily match up to
|
||||
/// the sizes of the chunks that are returned by the reads on
|
||||
/// the other end. The remote host might read a partial chunk,
|
||||
/// or chunks might be coalesced. For the message semantics
|
||||
/// used here, however, the sizes WILL match. Each send call
|
||||
/// will match a successful read call on the remote host
|
||||
/// one-for-one. If you are porting existing stream-oriented
|
||||
/// code to the semantics of reliable messages, your code should
|
||||
/// work the same, since reliable message semantics are more
|
||||
/// strict than stream semantics. The only caveat is related to
|
||||
/// performance: there is per-message overhead to retain the
|
||||
/// message sizes, and so if your code sends many small chunks
|
||||
/// of data, performance will suffer. Any code based on stream
|
||||
/// sockets that does not write excessively small chunks will
|
||||
/// work without any changes.
|
||||
///
|
||||
/// The pOutMessageNumber is an optional pointer to receive the
|
||||
/// message number assigned to the message, if sending was successful.
|
||||
///
|
||||
/// Returns:
|
||||
/// - k_EResultInvalidParam: invalid connection handle, or the individual message is too big.
|
||||
/// (See k_cbMaxSteamNetworkingSocketsMessageSizeSend)
|
||||
/// - k_EResultInvalidState: connection is in an invalid state
|
||||
/// - k_EResultNoConnection: connection has ended
|
||||
/// - k_EResultIgnored: You used k_nSteamNetworkingSend_NoDelay, and the message was dropped because
|
||||
/// we were not ready to send it.
|
||||
/// - k_EResultLimitExceeded: there was already too much data queued to be sent.
|
||||
/// (See k_ESteamNetworkingConfig_SendBufferSize)
|
||||
virtual EResult SendMessageToConnection( HSteamNetConnection hConn, const void *pData, uint32 cbData, int nSendFlags, int64 *pOutMessageNumber ) = 0;
|
||||
|
||||
/// Send one or more messages without copying the message payload.
|
||||
/// This is the most efficient way to send messages. To use this
|
||||
/// function, you must first allocate a message object using
|
||||
/// ISteamNetworkingUtils::AllocateMessage. (Do not declare one
|
||||
/// on the stack or allocate your own.)
|
||||
///
|
||||
/// You should fill in the message payload. You can either let
|
||||
/// it allocate the buffer for you and then fill in the payload,
|
||||
/// or if you already have a buffer allocated, you can just point
|
||||
/// m_pData at your buffer and set the callback to the appropriate function
|
||||
/// to free it. Note that if you use your own buffer, it MUST remain valid
|
||||
/// until the callback is executed. And also note that your callback can be
|
||||
/// invoked at any time from any thread (perhaps even before SendMessages
|
||||
/// returns!), so it MUST be fast and threadsafe.
|
||||
///
|
||||
/// You MUST also fill in:
|
||||
/// - m_conn - the handle of the connection to send the message to
|
||||
/// - m_nFlags - bitmask of k_nSteamNetworkingSend_xxx flags.
|
||||
///
|
||||
/// All other fields are currently reserved and should not be modified.
|
||||
///
|
||||
/// The library will take ownership of the message structures. They may
|
||||
/// be modified or become invalid at any time, so you must not read them
|
||||
/// after passing them to this function.
|
||||
///
|
||||
/// pOutMessageNumberOrResult is an optional array that will receive,
|
||||
/// for each message, the message number that was assigned to the message
|
||||
/// if sending was successful. If sending failed, then a negative EResult
|
||||
/// value is placed into the array. For example, the array will hold
|
||||
/// -k_EResultInvalidState if the connection was in an invalid state.
|
||||
/// See ISteamNetworkingSockets::SendMessageToConnection for possible
|
||||
/// failure codes.
|
||||
virtual void SendMessages( int nMessages, SteamNetworkingMessage_t *const *pMessages, int64 *pOutMessageNumberOrResult ) = 0;
|
||||
|
||||
/// Flush any messages waiting on the Nagle timer and send them
|
||||
/// at the next transmission opportunity (often that means right now).
|
||||
///
|
||||
/// If Nagle is enabled (it's on by default) then when calling
|
||||
/// SendMessageToConnection the message will be buffered, up to the Nagle time
|
||||
/// before being sent, to merge small messages into the same packet.
|
||||
/// (See k_ESteamNetworkingConfig_NagleTime)
|
||||
///
|
||||
/// Returns:
|
||||
/// k_EResultInvalidParam: invalid connection handle
|
||||
/// k_EResultInvalidState: connection is in an invalid state
|
||||
/// k_EResultNoConnection: connection has ended
|
||||
/// k_EResultIgnored: We weren't (yet) connected, so this operation has no effect.
|
||||
virtual EResult FlushMessagesOnConnection( HSteamNetConnection hConn ) = 0;
|
||||
|
||||
/// Fetch the next available message(s) from the connection, if any.
|
||||
/// Returns the number of messages returned into your array, up to nMaxMessages.
|
||||
/// If the connection handle is invalid, -1 is returned.
|
||||
///
|
||||
/// The order of the messages returned in the array is relevant.
|
||||
/// Reliable messages will be received in the order they were sent (and with the
|
||||
/// same sizes --- see SendMessageToConnection for on this subtle difference from a stream socket).
|
||||
///
|
||||
/// Unreliable messages may be dropped, or delivered out of order with respect to
|
||||
/// each other or with respect to reliable messages. The same unreliable message
|
||||
/// may be received multiple times.
|
||||
///
|
||||
/// If any messages are returned, you MUST call SteamNetworkingMessage_t::Release() on each
|
||||
/// of them free up resources after you are done. It is safe to keep the object alive for
|
||||
/// a little while (put it into some queue, etc), and you may call Release() from any thread.
|
||||
virtual int ReceiveMessagesOnConnection( HSteamNetConnection hConn, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0;
|
||||
|
||||
/// Returns basic information about the high-level state of the connection.
|
||||
virtual bool GetConnectionInfo( HSteamNetConnection hConn, SteamNetConnectionInfo_t *pInfo ) = 0;
|
||||
|
||||
/// Returns a small set of information about the real-time state of the connection
|
||||
/// Returns false if the connection handle is invalid, or the connection has ended.
|
||||
virtual bool GetQuickConnectionStatus( HSteamNetConnection hConn, SteamNetworkingQuickConnectionStatus *pStats ) = 0;
|
||||
|
||||
/// Returns detailed connection stats in text format. Useful
|
||||
/// for dumping to a log, etc.
|
||||
///
|
||||
/// Returns:
|
||||
/// -1 failure (bad connection handle)
|
||||
/// 0 OK, your buffer was filled in and '\0'-terminated
|
||||
/// >0 Your buffer was either nullptr, or it was too small and the text got truncated.
|
||||
/// Try again with a buffer of at least N bytes.
|
||||
virtual int GetDetailedConnectionStatus( HSteamNetConnection hConn, char *pszBuf, int cbBuf ) = 0;
|
||||
|
||||
/// Returns local IP and port that a listen socket created using CreateListenSocketIP is bound to.
|
||||
///
|
||||
/// An IPv6 address of ::0 means "any IPv4 or IPv6"
|
||||
/// An IPv6 address of ::ffff:0000:0000 means "any IPv4"
|
||||
virtual bool GetListenSocketAddress( HSteamListenSocket hSocket, SteamNetworkingIPAddr *address ) = 0;
|
||||
|
||||
/// Create a pair of connections that are talking to each other, e.g. a loopback connection.
|
||||
/// This is very useful for testing, or so that your client/server code can work the same
|
||||
/// even when you are running a local "server".
|
||||
///
|
||||
/// The two connections will immediately be placed into the connected state, and no callbacks
|
||||
/// will be posted immediately. After this, if you close either connection, the other connection
|
||||
/// will receive a callback, exactly as if they were communicating over the network. You must
|
||||
/// close *both* sides in order to fully clean up the resources!
|
||||
///
|
||||
/// By default, internal buffers are used, completely bypassing the network, the chopping up of
|
||||
/// messages into packets, encryption, copying the payload, etc. This means that loopback
|
||||
/// packets, by default, will not simulate lag or loss. Passing true for bUseNetworkLoopback will
|
||||
/// cause the socket pair to send packets through the local network loopback device (127.0.0.1)
|
||||
/// on ephemeral ports. Fake lag and loss are supported in this case, and CPU time is expended
|
||||
/// to encrypt and decrypt.
|
||||
///
|
||||
/// If you wish to assign a specific identity to either connection, you may pass a particular
|
||||
/// identity. Otherwise, if you pass nullptr, the respective connection will assume a generic
|
||||
/// "localhost" identity. If you use real network loopback, this might be translated to the
|
||||
/// actual bound loopback port. Otherwise, the port will be zero.
|
||||
virtual bool CreateSocketPair( HSteamNetConnection *pOutConnection1, HSteamNetConnection *pOutConnection2, bool bUseNetworkLoopback, const SteamNetworkingIdentity *pIdentity1, const SteamNetworkingIdentity *pIdentity2 ) = 0;
|
||||
|
||||
/// Get the identity assigned to this interface.
|
||||
/// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned
|
||||
/// to the gameserver. Returns false and sets the result to an invalid identity if we don't know
|
||||
/// our identity yet. (E.g. GameServer has not logged in. On Steam, the user will know their SteamID
|
||||
/// even if they are not signed into Steam.)
|
||||
virtual bool GetIdentity( SteamNetworkingIdentity *pIdentity ) = 0;
|
||||
|
||||
/// Indicate our desire to be ready participate in authenticated communications.
|
||||
/// If we are currently not ready, then steps will be taken to obtain the necessary
|
||||
/// certificates. (This includes a certificate for us, as well as any CA certificates
|
||||
/// needed to authenticate peers.)
|
||||
///
|
||||
/// You can call this at program init time if you know that you are going to
|
||||
/// be making authenticated connections, so that we will be ready immediately when
|
||||
/// those connections are attempted. (Note that essentially all connections require
|
||||
/// authentication, with the exception of ordinary UDP connections with authentication
|
||||
/// disabled using k_ESteamNetworkingConfig_IP_AllowWithoutAuth.) If you don't call
|
||||
/// this function, we will wait until a feature is utilized that that necessitates
|
||||
/// these resources.
|
||||
///
|
||||
/// You can also call this function to force a retry, if failure has occurred.
|
||||
/// Once we make an attempt and fail, we will not automatically retry.
|
||||
/// In this respect, the behavior of the system after trying and failing is the same
|
||||
/// as before the first attempt: attempting authenticated communication or calling
|
||||
/// this function will call the system to attempt to acquire the necessary resources.
|
||||
///
|
||||
/// You can use GetAuthenticationStatus or listen for SteamNetAuthenticationStatus_t
|
||||
/// to monitor the status.
|
||||
///
|
||||
/// Returns the current value that would be returned from GetAuthenticationStatus.
|
||||
virtual ESteamNetworkingAvailability InitAuthentication() = 0;
|
||||
|
||||
/// Query our readiness to participate in authenticated communications. A
|
||||
/// SteamNetAuthenticationStatus_t callback is posted any time this status changes,
|
||||
/// but you can use this function to query it at any time.
|
||||
///
|
||||
/// The value of SteamNetAuthenticationStatus_t::m_eAvail is returned. If you only
|
||||
/// want this high level status, you can pass NULL for pDetails. If you want further
|
||||
/// details, pass non-NULL to receive them.
|
||||
virtual ESteamNetworkingAvailability GetAuthenticationStatus( SteamNetAuthenticationStatus_t *pDetails ) = 0;
|
||||
|
||||
//
|
||||
// Poll groups. A poll group is a set of connections that can be polled efficiently.
|
||||
// (In our API, to "poll" a connection means to retrieve all pending messages. We
|
||||
// actually don't have an API to "poll" the connection *state*, like BSD sockets.)
|
||||
//
|
||||
|
||||
/// Create a new poll group.
|
||||
///
|
||||
/// You should destroy the poll group when you are done using DestroyPollGroup
|
||||
virtual HSteamNetPollGroup CreatePollGroup() = 0;
|
||||
|
||||
/// Destroy a poll group created with CreatePollGroup().
|
||||
///
|
||||
/// If there are any connections in the poll group, they are removed from the group,
|
||||
/// and left in a state where they are not part of any poll group.
|
||||
/// Returns false if passed an invalid poll group handle.
|
||||
virtual bool DestroyPollGroup( HSteamNetPollGroup hPollGroup ) = 0;
|
||||
|
||||
/// Assign a connection to a poll group. Note that a connection may only belong to a
|
||||
/// single poll group. Adding a connection to a poll group implicitly removes it from
|
||||
/// any other poll group it is in.
|
||||
///
|
||||
/// You can pass k_HSteamNetPollGroup_Invalid to remove a connection from its current
|
||||
/// poll group without adding it to a new poll group.
|
||||
///
|
||||
/// If there are received messages currently pending on the connection, an attempt
|
||||
/// is made to add them to the queue of messages for the poll group in approximately
|
||||
/// the order that would have applied if the connection was already part of the poll
|
||||
/// group at the time that the messages were received.
|
||||
///
|
||||
/// Returns false if the connection handle is invalid, or if the poll group handle
|
||||
/// is invalid (and not k_HSteamNetPollGroup_Invalid).
|
||||
virtual bool SetConnectionPollGroup( HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup ) = 0;
|
||||
|
||||
/// Same as ReceiveMessagesOnConnection, but will return the next messages available
|
||||
/// on any connection in the poll group. Examine SteamNetworkingMessage_t::m_conn
|
||||
/// to know which connection. (SteamNetworkingMessage_t::m_nConnUserData might also
|
||||
/// be useful.)
|
||||
///
|
||||
/// Delivery order of messages among different connections will usually match the
|
||||
/// order that the last packet was received which completed the message. But this
|
||||
/// is not a strong guarantee, especially for packets received right as a connection
|
||||
/// is being assigned to poll group.
|
||||
///
|
||||
/// Delivery order of messages on the same connection is well defined and the
|
||||
/// same guarantees are present as mentioned in ReceiveMessagesOnConnection.
|
||||
/// (But the messages are not grouped by connection, so they will not necessarily
|
||||
/// appear consecutively in the list; they may be interleaved with messages for
|
||||
/// other connections.)
|
||||
virtual int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0;
|
||||
|
||||
//
|
||||
// Clients connecting to dedicated servers hosted in a data center,
|
||||
// using tickets issued by your game coordinator. If you are not
|
||||
// issuing your own tickets to restrict who can attempt to connect
|
||||
// to your server, then you won't use these functions.
|
||||
//
|
||||
|
||||
/// Call this when you receive a ticket from your backend / matchmaking system. Puts the
|
||||
/// ticket into a persistent cache, and optionally returns the parsed ticket.
|
||||
///
|
||||
/// See stamdatagram_ticketgen.h for more details.
|
||||
virtual bool ReceivedRelayAuthTicket( const void *pvTicket, int cbTicket, SteamDatagramRelayAuthTicket *pOutParsedTicket ) = 0;
|
||||
|
||||
/// Search cache for a ticket to talk to the server on the specified virtual port.
|
||||
/// If found, returns the number of seconds until the ticket expires, and optionally
|
||||
/// the complete cracked ticket. Returns 0 if we don't have a ticket.
|
||||
///
|
||||
/// Typically this is useful just to confirm that you have a ticket, before you
|
||||
/// call ConnectToHostedDedicatedServer to connect to the server.
|
||||
virtual int FindRelayAuthTicketForServer( const SteamNetworkingIdentity *identityGameServer, int nRemoteVirtualPort, SteamDatagramRelayAuthTicket *pOutParsedTicket ) = 0;
|
||||
|
||||
/// Client call to connect to a server hosted in a Valve data center, on the specified virtual
|
||||
/// port. You must have placed a ticket for this server into the cache, or else this connect
|
||||
/// attempt will fail! If you are not issuing your own tickets, then to connect to a dedicated
|
||||
/// server via SDR in auto-ticket mode, use ConnectP2P. (The server must be configured to allow
|
||||
/// this type of connection by listening using CreateListenSocketP2P.)
|
||||
///
|
||||
/// You may wonder why tickets are stored in a cache, instead of simply being passed as an argument
|
||||
/// here. The reason is to make reconnection to a gameserver robust, even if the client computer loses
|
||||
/// connection to Steam or the central backend, or the app is restarted or crashes, etc.
|
||||
///
|
||||
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
|
||||
/// when your app initializes
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
virtual HSteamNetConnection ConnectToHostedDedicatedServer( const SteamNetworkingIdentity *identityTarget, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
//
|
||||
// Servers hosted in data centers known to the Valve relay network
|
||||
//
|
||||
|
||||
/// Returns the value of the SDR_LISTEN_PORT environment variable. This
|
||||
/// is the UDP server your server will be listening on. This will
|
||||
/// configured automatically for you in production environments.
|
||||
///
|
||||
/// In development, you'll need to set it yourself. See
|
||||
/// https://partner.steamgames.com/doc/api/ISteamNetworkingSockets
|
||||
/// for more information on how to configure dev environments.
|
||||
virtual uint16 GetHostedDedicatedServerPort() = 0;
|
||||
|
||||
/// Returns 0 if SDR_LISTEN_PORT is not set. Otherwise, returns the data center the server
|
||||
/// is running in. This will be k_SteamDatagramPOPID_dev in non-production environment.
|
||||
virtual SteamNetworkingPOPID GetHostedDedicatedServerPOPID() = 0;
|
||||
|
||||
/// Return info about the hosted server. This contains the PoPID of the server,
|
||||
/// and opaque routing information that can be used by the relays to send traffic
|
||||
/// to your server.
|
||||
///
|
||||
/// You will need to send this information to your backend, and put it in tickets,
|
||||
/// so that the relays will know how to forward traffic from
|
||||
/// clients to your server. See SteamDatagramRelayAuthTicket for more info.
|
||||
///
|
||||
/// Also, note that the routing information is contained in SteamDatagramGameCoordinatorServerLogin,
|
||||
/// so if possible, it's preferred to use GetGameCoordinatorServerLogin to send this info
|
||||
/// to your game coordinator service, and also login securely at the same time.
|
||||
///
|
||||
/// On a successful exit, k_EResultOK is returned
|
||||
///
|
||||
/// Unsuccessful exit:
|
||||
/// - Something other than k_EResultOK is returned.
|
||||
/// - k_EResultInvalidState: We are not configured to listen for SDR (SDR_LISTEN_SOCKET
|
||||
/// is not set.)
|
||||
/// - k_EResultPending: we do not (yet) have the authentication information needed.
|
||||
/// (See GetAuthenticationStatus.) If you use environment variables to pre-fetch
|
||||
/// the network config, this data should always be available immediately.
|
||||
/// - A non-localized diagnostic debug message will be placed in m_data that describes
|
||||
/// the cause of the failure.
|
||||
///
|
||||
/// NOTE: The returned blob is not encrypted. Send it to your backend, but don't
|
||||
/// directly share it with clients.
|
||||
virtual EResult GetHostedDedicatedServerAddress( SteamDatagramHostedAddress *pRouting ) = 0;
|
||||
|
||||
/// Create a listen socket on the specified virtual port. The physical UDP port to use
|
||||
/// will be determined by the SDR_LISTEN_PORT environment variable. If a UDP port is not
|
||||
/// configured, this call will fail.
|
||||
///
|
||||
/// This call MUST be made through the SteamGameServerNetworkingSockets() interface.
|
||||
///
|
||||
/// This function should be used when you are using the ticket generator library
|
||||
/// to issue your own tickets. Clients connecting to the server on this virtual
|
||||
/// port will need a ticket, and they must connect using ConnectToHostedDedicatedServer.
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
virtual HSteamListenSocket CreateHostedDedicatedServerListenSocket( int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
/// Generate an authentication blob that can be used to securely login with
|
||||
/// your backend, using SteamDatagram_ParseHostedServerLogin. (See
|
||||
/// steamdatagram_gamecoordinator.h)
|
||||
///
|
||||
/// Before calling the function:
|
||||
/// - Populate the app data in pLoginInfo (m_cbAppData and m_appData). You can leave
|
||||
/// all other fields uninitialized.
|
||||
/// - *pcbSignedBlob contains the size of the buffer at pBlob. (It should be
|
||||
/// at least k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized.)
|
||||
///
|
||||
/// On a successful exit:
|
||||
/// - k_EResultOK is returned
|
||||
/// - All of the remaining fields of pLoginInfo will be filled out.
|
||||
/// - *pcbSignedBlob contains the size of the serialized blob that has been
|
||||
/// placed into pBlob.
|
||||
///
|
||||
/// Unsuccessful exit:
|
||||
/// - Something other than k_EResultOK is returned.
|
||||
/// - k_EResultNotLoggedOn: you are not logged in (yet)
|
||||
/// - See GetHostedDedicatedServerAddress for more potential failure return values.
|
||||
/// - A non-localized diagnostic debug message will be placed in pBlob that describes
|
||||
/// the cause of the failure.
|
||||
///
|
||||
/// This works by signing the contents of the SteamDatagramGameCoordinatorServerLogin
|
||||
/// with the cert that is issued to this server. In dev environments, it's OK if you do
|
||||
/// not have a cert. (You will need to enable insecure dev login in SteamDatagram_ParseHostedServerLogin.)
|
||||
/// Otherwise, you will need a signed cert.
|
||||
///
|
||||
/// NOTE: The routing blob returned here is not encrypted. Send it to your backend
|
||||
/// and don't share it directly with clients.
|
||||
virtual EResult GetGameCoordinatorServerLogin( SteamDatagramGameCoordinatorServerLogin *pLoginInfo, int *pcbSignedBlob, void *pBlob ) = 0;
|
||||
|
||||
|
||||
//
|
||||
// Relayed connections using custom signaling protocol
|
||||
//
|
||||
// This is used if you have your own method of sending out-of-band
|
||||
// signaling / rendezvous messages through a mutually trusted channel.
|
||||
//
|
||||
|
||||
/// Create a P2P "client" connection that does signaling over a custom
|
||||
/// rendezvous/signaling channel.
|
||||
///
|
||||
/// pSignaling points to a new object that you create just for this connection.
|
||||
/// It must stay valid until Release() is called. Once you pass the
|
||||
/// object to this function, it assumes ownership. Release() will be called
|
||||
/// from within the function call if the call fails. Furthermore, until Release()
|
||||
/// is called, you should be prepared for methods to be invoked on your
|
||||
/// object from any thread! You need to make sure your object is threadsafe!
|
||||
/// Furthermore, you should make sure that dispatching the methods is done
|
||||
/// as quickly as possible.
|
||||
///
|
||||
/// This function will immediately construct a connection in the "connecting"
|
||||
/// state. Soon after (perhaps before this function returns, perhaps in another thread),
|
||||
/// the connection will begin sending signaling messages by calling
|
||||
/// ISteamNetworkingConnectionSignaling::SendSignal.
|
||||
///
|
||||
/// When the remote peer accepts the connection (See
|
||||
/// ISteamNetworkingSignalingRecvContext::OnConnectRequest),
|
||||
/// it will begin sending signaling messages. When these messages are received,
|
||||
/// you can pass them to the connection using ReceivedP2PCustomSignal.
|
||||
///
|
||||
/// If you know the identity of the peer that you expect to be on the other end,
|
||||
/// you can pass their identity to improve debug output or just detect bugs.
|
||||
/// If you don't know their identity yet, you can pass NULL, and their
|
||||
/// identity will be established in the connection handshake.
|
||||
///
|
||||
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
|
||||
/// when your app initializes
|
||||
///
|
||||
/// If you need to set any initial config options, pass them here. See
|
||||
/// SteamNetworkingConfigValue_t for more about why this is preferable to
|
||||
/// setting the options "immediately" after creation.
|
||||
virtual HSteamNetConnection ConnectP2PCustomSignaling( ISteamNetworkingConnectionSignaling *pSignaling, const SteamNetworkingIdentity *pPeerIdentity, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
|
||||
|
||||
/// Called when custom signaling has received a message. When your
|
||||
/// signaling channel receives a message, it should save off whatever
|
||||
/// routing information was in the envelope into the context object,
|
||||
/// and then pass the payload to this function.
|
||||
///
|
||||
/// A few different things can happen next, depending on the message:
|
||||
///
|
||||
/// - If the signal is associated with existing connection, it is dealt
|
||||
/// with immediately. If any replies need to be sent, they will be
|
||||
/// dispatched using the ISteamNetworkingConnectionSignaling
|
||||
/// associated with the connection.
|
||||
/// - If the message represents a connection request (and the request
|
||||
/// is not redundant for an existing connection), a new connection
|
||||
/// will be created, and ReceivedConnectRequest will be called on your
|
||||
/// context object to determine how to proceed.
|
||||
/// - Otherwise, the message is for a connection that does not
|
||||
/// exist (anymore). In this case, we *may* call SendRejectionReply
|
||||
/// on your context object.
|
||||
///
|
||||
/// In any case, we will not save off pContext or access it after this
|
||||
/// function returns.
|
||||
///
|
||||
/// Returns true if the message was parsed and dispatched without anything
|
||||
/// unusual or suspicious happening. Returns false if there was some problem
|
||||
/// with the message that prevented ordinary handling. (Debug output will
|
||||
/// usually have more information.)
|
||||
///
|
||||
/// If you expect to be using relayed connections, then you probably want
|
||||
/// to call ISteamNetworkingUtils::InitRelayNetworkAccess() when your app initializes
|
||||
virtual bool ReceivedP2PCustomSignal( const void *pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext *pContext ) = 0;
|
||||
|
||||
//
|
||||
// Certificate provision by the application. On Steam, we normally handle all this automatically
|
||||
// and you will not need to use these advanced functions.
|
||||
//
|
||||
|
||||
/// Get blob that describes a certificate request. You can send this to your game coordinator.
|
||||
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
|
||||
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
|
||||
/// size. (512 bytes is a conservative estimate.)
|
||||
///
|
||||
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
|
||||
virtual bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg *errMsg ) = 0;
|
||||
|
||||
/// Set the certificate. The certificate blob should be the output of
|
||||
/// SteamDatagram_CreateCert.
|
||||
virtual bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkingErrMsg *errMsg ) = 0;
|
||||
|
||||
/// Invoke all callback functions queued for this interface.
|
||||
/// See k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, etc
|
||||
///
|
||||
/// You don't need to call this if you are using Steam's callback dispatch
|
||||
/// mechanism (SteamAPI_RunCallbacks and SteamGameserver_RunCallbacks).
|
||||
virtual void RunCallbacks() = 0;
|
||||
protected:
|
||||
~ISteamNetworkingSockets(); // Silence some warnings
|
||||
};
|
||||
#define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets009"
|
||||
|
||||
// Global accessors
|
||||
// Using standalone lib
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
|
||||
// Standalone lib.
|
||||
static_assert( STEAMNETWORKINGSOCKETS_INTERFACE_VERSION[24] == '9', "Version mismatch" );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_LibV9();
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return SteamNetworkingSockets_LibV9(); }
|
||||
|
||||
// If running in context of steam, we also define a gameserver instance.
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAM
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_LibV9();
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV9(); }
|
||||
#endif
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV9(); }
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAM
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV9(); }
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Using Steamworks SDK
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
|
||||
// Steamworks SDK
|
||||
STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION );
|
||||
STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION );
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_SteamAPI(); }
|
||||
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// Callback struct used to notify when a connection has changed state
|
||||
#if defined( VALVE_CALLBACK_PACK_SMALL )
|
||||
#pragma pack( push, 4 )
|
||||
#elif defined( VALVE_CALLBACK_PACK_LARGE )
|
||||
#pragma pack( push, 8 )
|
||||
#else
|
||||
#error "Must define VALVE_CALLBACK_PACK_SMALL or VALVE_CALLBACK_PACK_LARGE"
|
||||
#endif
|
||||
|
||||
/// This callback is posted whenever a connection is created, destroyed, or changes state.
|
||||
/// The m_info field will contain a complete description of the connection at the time the
|
||||
/// change occurred and the callback was posted. In particular, m_eState will have the
|
||||
/// new connection state.
|
||||
///
|
||||
/// You will usually need to listen for this callback to know when:
|
||||
/// - A new connection arrives on a listen socket.
|
||||
/// m_info.m_hListenSocket will be set, m_eOldState = k_ESteamNetworkingConnectionState_None,
|
||||
/// and m_info.m_eState = k_ESteamNetworkingConnectionState_Connecting.
|
||||
/// See ISteamNetworkigSockets::AcceptConnection.
|
||||
/// - A connection you initiated has been accepted by the remote host.
|
||||
/// m_eOldState = k_ESteamNetworkingConnectionState_Connecting, and
|
||||
/// m_info.m_eState = k_ESteamNetworkingConnectionState_Connected.
|
||||
/// Some connections might transition to k_ESteamNetworkingConnectionState_FindingRoute first.
|
||||
/// - A connection has been actively rejected or closed by the remote host.
|
||||
/// m_eOldState = k_ESteamNetworkingConnectionState_Connecting or k_ESteamNetworkingConnectionState_Connected,
|
||||
/// and m_info.m_eState = k_ESteamNetworkingConnectionState_ClosedByPeer. m_info.m_eEndReason
|
||||
/// and m_info.m_szEndDebug will have for more details.
|
||||
/// NOTE: upon receiving this callback, you must still destroy the connection using
|
||||
/// ISteamNetworkingSockets::CloseConnection to free up local resources. (The details
|
||||
/// passed to the function are not used in this case, since the connection is already closed.)
|
||||
/// - A problem was detected with the connection, and it has been closed by the local host.
|
||||
/// The most common failure is timeout, but other configuration or authentication failures
|
||||
/// can cause this. m_eOldState = k_ESteamNetworkingConnectionState_Connecting or
|
||||
/// k_ESteamNetworkingConnectionState_Connected, and m_info.m_eState = k_ESteamNetworkingConnectionState_ProblemDetectedLocally.
|
||||
/// m_info.m_eEndReason and m_info.m_szEndDebug will have for more details.
|
||||
/// NOTE: upon receiving this callback, you must still destroy the connection using
|
||||
/// ISteamNetworkingSockets::CloseConnection to free up local resources. (The details
|
||||
/// passed to the function are not used in this case, since the connection is already closed.)
|
||||
///
|
||||
/// Remember that callbacks are posted to a queue, and networking connections can
|
||||
/// change at any time. It is possible that the connection has already changed
|
||||
/// state by the time you process this callback.
|
||||
///
|
||||
/// Also note that callbacks will be posted when connections are created and destroyed by your own API calls.
|
||||
struct SteamNetConnectionStatusChangedCallback_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 1 };
|
||||
|
||||
/// Connection handle
|
||||
HSteamNetConnection m_hConn;
|
||||
|
||||
/// Full connection info
|
||||
SteamNetConnectionInfo_t m_info;
|
||||
|
||||
/// Previous state. (Current state is in m_info.m_eState)
|
||||
ESteamNetworkingConnectionState m_eOldState;
|
||||
};
|
||||
|
||||
/// A struct used to describe our readiness to participate in authenticated,
|
||||
/// encrypted communication. In order to do this we need:
|
||||
///
|
||||
/// - The list of trusted CA certificates that might be relevant for this
|
||||
/// app.
|
||||
/// - A valid certificate issued by a CA.
|
||||
///
|
||||
/// This callback is posted whenever the state of our readiness changes.
|
||||
struct SteamNetAuthenticationStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 2 };
|
||||
|
||||
/// Status
|
||||
ESteamNetworkingAvailability m_eAvail;
|
||||
|
||||
/// Non-localized English language status. For diagnostic/debugging
|
||||
/// purposes only.
|
||||
char m_debugMsg[ 256 ];
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMNETWORKINGSOCKETS
|
461
lsteamclient/steamworks_sdk_152/isteamnetworkingutils.h
Normal file
461
lsteamclient/steamworks_sdk_152/isteamnetworkingutils.h
Normal file
@ -0,0 +1,461 @@
|
||||
//====== Copyright Valve Corporation, All rights reserved. ====================
|
||||
//
|
||||
// Purpose: misc networking utilities
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ISTEAMNETWORKINGUTILS
|
||||
#define ISTEAMNETWORKINGUTILS
|
||||
|
||||
#include "steamnetworkingtypes.h"
|
||||
#include "steam_api_common.h"
|
||||
|
||||
struct SteamDatagramRelayAuthTicket;
|
||||
struct SteamRelayNetworkStatus_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// Misc networking utilities for checking the local networking environment
|
||||
/// and estimating pings.
|
||||
class ISteamNetworkingUtils
|
||||
{
|
||||
public:
|
||||
//
|
||||
// Efficient message sending
|
||||
//
|
||||
|
||||
/// Allocate and initialize a message object. Usually the reason
|
||||
/// you call this is to pass it to ISteamNetworkingSockets::SendMessages.
|
||||
/// The returned object will have all of the relevant fields cleared to zero.
|
||||
///
|
||||
/// Optionally you can also request that this system allocate space to
|
||||
/// hold the payload itself. If cbAllocateBuffer is nonzero, the system
|
||||
/// will allocate memory to hold a payload of at least cbAllocateBuffer bytes.
|
||||
/// m_pData will point to the allocated buffer, m_cbSize will be set to the
|
||||
/// size, and m_pfnFreeData will be set to the proper function to free up
|
||||
/// the buffer.
|
||||
///
|
||||
/// If cbAllocateBuffer=0, then no buffer is allocated. m_pData will be NULL,
|
||||
/// m_cbSize will be zero, and m_pfnFreeData will be NULL. You will need to
|
||||
/// set each of these.
|
||||
virtual SteamNetworkingMessage_t *AllocateMessage( int cbAllocateBuffer ) = 0;
|
||||
|
||||
//
|
||||
// Access to Steam Datagram Relay (SDR) network
|
||||
//
|
||||
|
||||
//
|
||||
// Initialization and status check
|
||||
//
|
||||
|
||||
/// If you know that you are going to be using the relay network (for example,
|
||||
/// because you anticipate making P2P connections), call this to initialize the
|
||||
/// relay network. If you do not call this, the initialization will
|
||||
/// be delayed until the first time you use a feature that requires access
|
||||
/// to the relay network, which will delay that first access.
|
||||
///
|
||||
/// You can also call this to force a retry if the previous attempt has failed.
|
||||
/// Performing any action that requires access to the relay network will also
|
||||
/// trigger a retry, and so calling this function is never strictly necessary,
|
||||
/// but it can be useful to call it a program launch time, if access to the
|
||||
/// relay network is anticipated.
|
||||
///
|
||||
/// Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
|
||||
/// callbacks to know when initialization has completed.
|
||||
/// Typically initialization completes in a few seconds.
|
||||
///
|
||||
/// Note: dedicated servers hosted in known data centers do *not* need
|
||||
/// to call this, since they do not make routing decisions. However, if
|
||||
/// the dedicated server will be using P2P functionality, it will act as
|
||||
/// a "client" and this should be called.
|
||||
inline void InitRelayNetworkAccess();
|
||||
|
||||
/// Fetch current status of the relay network.
|
||||
///
|
||||
/// SteamRelayNetworkStatus_t is also a callback. It will be triggered on
|
||||
/// both the user and gameserver interfaces any time the status changes, or
|
||||
/// ping measurement starts or stops.
|
||||
///
|
||||
/// SteamRelayNetworkStatus_t::m_eAvail is returned. If you want
|
||||
/// more details, you can pass a non-NULL value.
|
||||
virtual ESteamNetworkingAvailability GetRelayNetworkStatus( SteamRelayNetworkStatus_t *pDetails ) = 0;
|
||||
|
||||
//
|
||||
// "Ping location" functions
|
||||
//
|
||||
// We use the ping times to the valve relays deployed worldwide to
|
||||
// generate a "marker" that describes the location of an Internet host.
|
||||
// Given two such markers, we can estimate the network latency between
|
||||
// two hosts, without sending any packets. The estimate is based on the
|
||||
// optimal route that is found through the Valve network. If you are
|
||||
// using the Valve network to carry the traffic, then this is precisely
|
||||
// the ping you want. If you are not, then the ping time will probably
|
||||
// still be a reasonable estimate.
|
||||
//
|
||||
// This is extremely useful to select peers for matchmaking!
|
||||
//
|
||||
// The markers can also be converted to a string, so they can be transmitted.
|
||||
// We have a separate library you can use on your app's matchmaking/coordinating
|
||||
// server to manipulate these objects. (See steamdatagram_gamecoordinator.h)
|
||||
|
||||
/// Return location info for the current host. Returns the approximate
|
||||
/// age of the data, in seconds, or -1 if no data is available.
|
||||
///
|
||||
/// It takes a few seconds to initialize access to the relay network. If
|
||||
/// you call this very soon after calling InitRelayNetworkAccess,
|
||||
/// the data may not be available yet.
|
||||
///
|
||||
/// This always return the most up-to-date information we have available
|
||||
/// right now, even if we are in the middle of re-calculating ping times.
|
||||
virtual float GetLocalPingLocation( SteamNetworkPingLocation_t *result ) = 0;
|
||||
|
||||
/// Estimate the round-trip latency between two arbitrary locations, in
|
||||
/// milliseconds. This is a conservative estimate, based on routing through
|
||||
/// the relay network. For most basic relayed connections, this ping time
|
||||
/// will be pretty accurate, since it will be based on the route likely to
|
||||
/// be actually used.
|
||||
///
|
||||
/// If a direct IP route is used (perhaps via NAT traversal), then the route
|
||||
/// will be different, and the ping time might be better. Or it might actually
|
||||
/// be a bit worse! Standard IP routing is frequently suboptimal!
|
||||
///
|
||||
/// But even in this case, the estimate obtained using this method is a
|
||||
/// reasonable upper bound on the ping time. (Also it has the advantage
|
||||
/// of returning immediately and not sending any packets.)
|
||||
///
|
||||
/// In a few cases we might not able to estimate the route. In this case
|
||||
/// a negative value is returned. k_nSteamNetworkingPing_Failed means
|
||||
/// the reason was because of some networking difficulty. (Failure to
|
||||
/// ping, etc) k_nSteamNetworkingPing_Unknown is returned if we cannot
|
||||
/// currently answer the question for some other reason.
|
||||
///
|
||||
/// Do you need to be able to do this from a backend/matchmaking server?
|
||||
/// You are looking for the "game coordinator" library.
|
||||
virtual int EstimatePingTimeBetweenTwoLocations( const SteamNetworkPingLocation_t *location1, const SteamNetworkPingLocation_t *location2 ) = 0;
|
||||
|
||||
/// Same as EstimatePingTime, but assumes that one location is the local host.
|
||||
/// This is a bit faster, especially if you need to calculate a bunch of
|
||||
/// these in a loop to find the fastest one.
|
||||
///
|
||||
/// In rare cases this might return a slightly different estimate than combining
|
||||
/// GetLocalPingLocation with EstimatePingTimeBetweenTwoLocations. That's because
|
||||
/// this function uses a slightly more complete set of information about what
|
||||
/// route would be taken.
|
||||
virtual int EstimatePingTimeFromLocalHost( const SteamNetworkPingLocation_t *remoteLocation ) = 0;
|
||||
|
||||
/// Convert a ping location into a text format suitable for sending over the wire.
|
||||
/// The format is a compact and human readable. However, it is subject to change
|
||||
/// so please do not parse it yourself. Your buffer must be at least
|
||||
/// k_cchMaxSteamNetworkingPingLocationString bytes.
|
||||
virtual void ConvertPingLocationToString( const SteamNetworkPingLocation_t *location, char *pszBuf, int cchBufSize ) = 0;
|
||||
|
||||
/// Parse back SteamNetworkPingLocation_t string. Returns false if we couldn't understand
|
||||
/// the string.
|
||||
virtual bool ParsePingLocationString( const char *pszString, SteamNetworkPingLocation_t *result ) = 0;
|
||||
|
||||
/// Check if the ping data of sufficient recency is available, and if
|
||||
/// it's too old, start refreshing it.
|
||||
///
|
||||
/// Please only call this function when you *really* do need to force an
|
||||
/// immediate refresh of the data. (For example, in response to a specific
|
||||
/// user input to refresh this information.) Don't call it "just in case",
|
||||
/// before every connection, etc. That will cause extra traffic to be sent
|
||||
/// for no benefit. The library will automatically refresh the information
|
||||
/// as needed.
|
||||
///
|
||||
/// Returns true if sufficiently recent data is already available.
|
||||
///
|
||||
/// Returns false if sufficiently recent data is not available. In this
|
||||
/// case, ping measurement is initiated, if it is not already active.
|
||||
/// (You cannot restart a measurement already in progress.)
|
||||
///
|
||||
/// You can use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
|
||||
/// to know when ping measurement completes.
|
||||
virtual bool CheckPingDataUpToDate( float flMaxAgeSeconds ) = 0;
|
||||
|
||||
//
|
||||
// List of Valve data centers, and ping times to them. This might
|
||||
// be useful to you if you are use our hosting, or just need to measure
|
||||
// latency to a cloud data center where we are running relays.
|
||||
//
|
||||
|
||||
/// Fetch ping time of best available relayed route from this host to
|
||||
/// the specified data center.
|
||||
virtual int GetPingToDataCenter( SteamNetworkingPOPID popID, SteamNetworkingPOPID *pViaRelayPoP ) = 0;
|
||||
|
||||
/// Get *direct* ping time to the relays at the data center.
|
||||
virtual int GetDirectPingToPOP( SteamNetworkingPOPID popID ) = 0;
|
||||
|
||||
/// Get number of network points of presence in the config
|
||||
virtual int GetPOPCount() = 0;
|
||||
|
||||
/// Get list of all POP IDs. Returns the number of entries that were filled into
|
||||
/// your list.
|
||||
virtual int GetPOPList( SteamNetworkingPOPID *list, int nListSz ) = 0;
|
||||
|
||||
//
|
||||
// Misc
|
||||
//
|
||||
|
||||
/// Fetch current timestamp. This timer has the following properties:
|
||||
///
|
||||
/// - Monotonicity is guaranteed.
|
||||
/// - The initial value will be at least 24*3600*30*1e6, i.e. about
|
||||
/// 30 days worth of microseconds. In this way, the timestamp value of
|
||||
/// 0 will always be at least "30 days ago". Also, negative numbers
|
||||
/// will never be returned.
|
||||
/// - Wraparound / overflow is not a practical concern.
|
||||
///
|
||||
/// If you are running under the debugger and stop the process, the clock
|
||||
/// might not advance the full wall clock time that has elapsed between
|
||||
/// calls. If the process is not blocked from normal operation, the
|
||||
/// timestamp values will track wall clock time, even if you don't call
|
||||
/// the function frequently.
|
||||
///
|
||||
/// The value is only meaningful for this run of the process. Don't compare
|
||||
/// it to values obtained on another computer, or other runs of the same process.
|
||||
virtual SteamNetworkingMicroseconds GetLocalTimestamp() = 0;
|
||||
|
||||
/// Set a function to receive network-related information that is useful for debugging.
|
||||
/// This can be very useful during development, but it can also be useful for troubleshooting
|
||||
/// problems with tech savvy end users. If you have a console or other log that customers
|
||||
/// can examine, these log messages can often be helpful to troubleshoot network issues.
|
||||
/// (Especially any warning/error messages.)
|
||||
///
|
||||
/// The detail level indicates what message to invoke your callback on. Lower numeric
|
||||
/// value means more important, and the value you pass is the lowest priority (highest
|
||||
/// numeric value) you wish to receive callbacks for.
|
||||
///
|
||||
/// The value here controls the detail level for most messages. You can control the
|
||||
/// detail level for various subsystems (perhaps only for certain connections) by
|
||||
/// adjusting the configuration values k_ESteamNetworkingConfig_LogLevel_Xxxxx.
|
||||
///
|
||||
/// Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg
|
||||
/// or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT
|
||||
/// request a high detail level and then filter out messages in your callback. This incurs
|
||||
/// all of the expense of formatting the messages, which are then discarded. Setting a high
|
||||
/// priority value (low numeric value) here allows the library to avoid doing this work.
|
||||
///
|
||||
/// IMPORTANT: This may be called from a service thread, while we own a mutex, etc.
|
||||
/// Your output function must be threadsafe and fast! Do not make any other
|
||||
/// Steamworks calls from within the handler.
|
||||
virtual void SetDebugOutputFunction( ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ) = 0;
|
||||
|
||||
//
|
||||
// Set and get configuration values, see ESteamNetworkingConfigValue for individual descriptions.
|
||||
//
|
||||
|
||||
// Shortcuts for common cases. (Implemented as inline functions below)
|
||||
bool SetGlobalConfigValueInt32( ESteamNetworkingConfigValue eValue, int32 val );
|
||||
bool SetGlobalConfigValueFloat( ESteamNetworkingConfigValue eValue, float val );
|
||||
bool SetGlobalConfigValueString( ESteamNetworkingConfigValue eValue, const char *val );
|
||||
bool SetGlobalConfigValuePtr( ESteamNetworkingConfigValue eValue, void *val );
|
||||
bool SetConnectionConfigValueInt32( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, int32 val );
|
||||
bool SetConnectionConfigValueFloat( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, float val );
|
||||
bool SetConnectionConfigValueString( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, const char *val );
|
||||
|
||||
//
|
||||
// Set global callbacks. If you do not want to use Steam's callback dispatch mechanism and you
|
||||
// want to use the same callback on all (or most) listen sockets and connections, then
|
||||
// simply install these callbacks first thing, and you are good to go.
|
||||
// See ISteamNetworkingSockets::RunCallbacks
|
||||
//
|
||||
bool SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback );
|
||||
bool SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback );
|
||||
bool SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback );
|
||||
bool SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback );
|
||||
bool SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback );
|
||||
|
||||
/// Set a configuration value.
|
||||
/// - eValue: which value is being set
|
||||
/// - eScope: Onto what type of object are you applying the setting?
|
||||
/// - scopeArg: Which object you want to change? (Ignored for global scope). E.g. connection handle, listen socket handle, interface pointer, etc.
|
||||
/// - eDataType: What type of data is in the buffer at pValue? This must match the type of the variable exactly!
|
||||
/// - pArg: Value to set it to. You can pass NULL to remove a non-global setting at this scope,
|
||||
/// causing the value for that object to use global defaults. Or at global scope, passing NULL
|
||||
/// will reset any custom value and restore it to the system default.
|
||||
/// NOTE: When setting pointers (e.g. callback functions), do not pass the function pointer directly.
|
||||
/// Your argument should be a pointer to a function pointer.
|
||||
virtual bool SetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
|
||||
ESteamNetworkingConfigDataType eDataType, const void *pArg ) = 0;
|
||||
|
||||
/// Set a configuration value, using a struct to pass the value.
|
||||
/// (This is just a convenience shortcut; see below for the implementation and
|
||||
/// a little insight into how SteamNetworkingConfigValue_t is used when
|
||||
/// setting config options during listen socket and connection creation.)
|
||||
bool SetConfigValueStruct( const SteamNetworkingConfigValue_t *opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
|
||||
|
||||
/// Get a configuration value.
|
||||
/// - eValue: which value to fetch
|
||||
/// - eScopeType: query setting on what type of object
|
||||
/// - eScopeArg: the object to query the setting for
|
||||
/// - pOutDataType: If non-NULL, the data type of the value is returned.
|
||||
/// - pResult: Where to put the result. Pass NULL to query the required buffer size. (k_ESteamNetworkingGetConfigValue_BufferTooSmall will be returned.)
|
||||
/// - cbResult: IN: the size of your buffer. OUT: the number of bytes filled in or required.
|
||||
virtual ESteamNetworkingGetConfigValueResult GetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
|
||||
ESteamNetworkingConfigDataType *pOutDataType, void *pResult, size_t *cbResult ) = 0;
|
||||
|
||||
/// Returns info about a configuration value. Returns false if the value does not exist.
|
||||
/// pOutNextValue can be used to iterate through all of the known configuration values.
|
||||
/// (Use GetFirstConfigValue() to begin the iteration, will be k_ESteamNetworkingConfig_Invalid on the last value)
|
||||
/// Any of the output parameters can be NULL if you do not need that information.
|
||||
///
|
||||
/// See k_ESteamNetworkingConfig_EnumerateDevVars for some more info about "dev" variables,
|
||||
/// which are usually excluded from the set of variables enumerated using this function.
|
||||
virtual bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue ) = 0;
|
||||
|
||||
/// Return the lowest numbered configuration value available in the current environment.
|
||||
virtual ESteamNetworkingConfigValue GetFirstConfigValue() = 0;
|
||||
|
||||
// String conversions. You'll usually access these using the respective
|
||||
// inline methods.
|
||||
virtual void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *addr, char *buf, size_t cbBuf, bool bWithPort ) = 0;
|
||||
virtual bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ) = 0;
|
||||
virtual void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *identity, char *buf, size_t cbBuf ) = 0;
|
||||
virtual bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, const char *pszStr ) = 0;
|
||||
|
||||
protected:
|
||||
~ISteamNetworkingUtils(); // Silence some warnings
|
||||
};
|
||||
#define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils003"
|
||||
|
||||
// Global accessors
|
||||
// Using standalone lib
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
|
||||
// Standalone lib
|
||||
static_assert( STEAMNETWORKINGUTILS_INTERFACE_VERSION[22] == '3', "Version mismatch" );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamNetworkingUtils_LibV3();
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV3(); }
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV3(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Using Steamworks SDK
|
||||
#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI
|
||||
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils_SteamAPI,
|
||||
/* Prefer user version of the interface. But if it isn't found, then use
|
||||
gameserver one. Yes, this is a completely terrible hack */
|
||||
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) ?
|
||||
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) :
|
||||
SteamInternal_FindOrCreateGameServerInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ),
|
||||
"global",
|
||||
STEAMNETWORKINGUTILS_INTERFACE_VERSION
|
||||
)
|
||||
|
||||
#ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB
|
||||
inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_SteamAPI(); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/// A struct used to describe our readiness to use the relay network.
|
||||
/// To do this we first need to fetch the network configuration,
|
||||
/// which describes what POPs are available.
|
||||
struct SteamRelayNetworkStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamNetworkingUtilsCallbacks + 1 };
|
||||
|
||||
/// Summary status. When this is "current", initialization has
|
||||
/// completed. Anything else means you are not ready yet, or
|
||||
/// there is a significant problem.
|
||||
ESteamNetworkingAvailability m_eAvail;
|
||||
|
||||
/// Nonzero if latency measurement is in progress (or pending,
|
||||
/// awaiting a prerequisite).
|
||||
int m_bPingMeasurementInProgress;
|
||||
|
||||
/// Status obtaining the network config. This is a prerequisite
|
||||
/// for relay network access.
|
||||
///
|
||||
/// Failure to obtain the network config almost always indicates
|
||||
/// a problem with the local internet connection.
|
||||
ESteamNetworkingAvailability m_eAvailNetworkConfig;
|
||||
|
||||
/// Current ability to communicate with ANY relay. Note that
|
||||
/// the complete failure to communicate with any relays almost
|
||||
/// always indicates a problem with the local Internet connection.
|
||||
/// (However, just because you can reach a single relay doesn't
|
||||
/// mean that the local connection is in perfect health.)
|
||||
ESteamNetworkingAvailability m_eAvailAnyRelay;
|
||||
|
||||
/// Non-localized English language status. For diagnostic/debugging
|
||||
/// purposes only.
|
||||
char m_debugMsg[ 256 ];
|
||||
};
|
||||
|
||||
#if 0
|
||||
/// Utility class for printing a SteamNetworkingIdentity.
|
||||
/// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() );
|
||||
struct SteamNetworkingIdentityRender
|
||||
{
|
||||
SteamNetworkingIdentityRender( const SteamNetworkingIdentity &x ) { x.ToString( buf, sizeof(buf) ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
private:
|
||||
char buf[ SteamNetworkingIdentity::k_cchMaxString ];
|
||||
};
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIPAddrRender.
|
||||
struct SteamNetworkingIPAddrRender
|
||||
{
|
||||
SteamNetworkingIPAddrRender( const SteamNetworkingIPAddr &x, bool bWithPort = true ) { x.ToString( buf, sizeof(buf), bWithPort ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
private:
|
||||
char buf[ SteamNetworkingIPAddr::k_cchMaxString ];
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal stuff
|
||||
|
||||
inline void ISteamNetworkingUtils::InitRelayNetworkAccess() { CheckPingDataUpToDate( 1e10f ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalConfigValueInt32( ESteamNetworkingConfigValue eValue, int32 val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_Int32, &val ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalConfigValueFloat( ESteamNetworkingConfigValue eValue, float val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_Float, &val ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalConfigValueString( ESteamNetworkingConfigValue eValue, const char *val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_String, val ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalConfigValuePtr( ESteamNetworkingConfigValue eValue, void *val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_Ptr, &val ); } // Note: passing pointer to pointer.
|
||||
inline bool ISteamNetworkingUtils::SetConnectionConfigValueInt32( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, int32 val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_Int32, &val ); }
|
||||
inline bool ISteamNetworkingUtils::SetConnectionConfigValueFloat( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, float val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_Float, &val ); }
|
||||
inline bool ISteamNetworkingUtils::SetConnectionConfigValueString( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, const char *val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_String, val ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetConnectionStatusChanged( FnSteamNetConnectionStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged, (void*)fnCallback ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamNetAuthenticationStatusChanged( FnSteamNetAuthenticationStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_AuthStatusChanged, (void*)fnCallback ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalCallback_SteamRelayNetworkStatusChanged( FnSteamRelayNetworkStatusChanged fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged, (void*)fnCallback ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionRequest( FnSteamNetworkingMessagesSessionRequest fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_MessagesSessionRequest, (void*)fnCallback ); }
|
||||
inline bool ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionFailed( FnSteamNetworkingMessagesSessionFailed fnCallback ) { return SetGlobalConfigValuePtr( k_ESteamNetworkingConfig_Callback_MessagesSessionFailed, (void*)fnCallback ); }
|
||||
|
||||
inline bool ISteamNetworkingUtils::SetConfigValueStruct( const SteamNetworkingConfigValue_t &opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj )
|
||||
{
|
||||
// Locate the argument. Strings are a special case, since the
|
||||
// "value" (the whole string buffer) doesn't fit in the struct
|
||||
// NOTE: for pointer values, we pass a pointer to the pointer,
|
||||
// we do not pass the pointer directly.
|
||||
const void *pVal = ( opt.m_eDataType == k_ESteamNetworkingConfig_String ) ? (const void *)opt.m_val.m_string : (const void *)&opt.m_val;
|
||||
return SetConfigValue( opt.m_eValue, eScopeType, scopeObj, opt.m_eDataType, pVal );
|
||||
}
|
||||
#endif
|
||||
|
||||
// How to get helper functions.
|
||||
#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || defined( STEAMNETWORKINGSOCKETS_STANDALONELIB )
|
||||
|
||||
// Call direct to static functions
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr );
|
||||
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); }
|
||||
inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); }
|
||||
inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); }
|
||||
inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); }
|
||||
|
||||
#elif defined( STEAMNETWORKINGSOCKETS_STEAMAPI )
|
||||
// Using steamworks SDK - go through SteamNetworkingUtils()
|
||||
#if 0
|
||||
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *this, buf, cbBuf, bWithPort ); }
|
||||
inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIPAddr_ParseString( this, pszStr ); }
|
||||
inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingUtils()->SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); }
|
||||
inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIdentity_ParseString( this, pszStr ); }
|
||||
#endif
|
||||
#else
|
||||
#error "Invalid config"
|
||||
#endif
|
||||
|
||||
#endif // ISTEAMNETWORKINGUTILS
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user