mirror of
https://codeberg.org/WinDurango/WinDurango.git
synced 2026-04-18 02:23:34 -04:00
feat: added windows.xbox.input and windows.xbox.system.idl
This commit is contained in:
@@ -148,14 +148,19 @@ namespace Windows.Xbox.Input
|
||||
NavigationButtons Buttons;
|
||||
};
|
||||
|
||||
[interface_name("IBodyController", ABCAAAAB-AAAA-AABA-AAAA-AACCFFDAAAAF)]
|
||||
runtimeclass BodyController
|
||||
[uuid(ABCAAAAB-AAAA-AABA-AAAA-AACCFFDAAAAF)]
|
||||
interface IBodyController requires IController
|
||||
{
|
||||
UInt32 BiometricUserId { get; };
|
||||
event Windows.Foundation.TypedEventHandler<BodyController, BiometricUserChangedEventArgs> BiometricUserChanged;
|
||||
BodyControllerReading GetCurrentReading;
|
||||
event Windows.Foundation.TypedEventHandler<BodyController, BodyControllerReadingChangedEventArgs> ReadingChanged;
|
||||
}
|
||||
|
||||
runtimeclass BodyController : [default] IBodyController
|
||||
{
|
||||
BodyController();
|
||||
}
|
||||
|
||||
[interface_name("IBodyControllerReading", ABCAAAAB-AAAA-AABA-AAAA-AACC88DAAAAF)]
|
||||
runtimeclass BodyControllerReading
|
||||
@@ -169,6 +174,7 @@ namespace Windows.Xbox.Input
|
||||
[interface_name("IBodyHandPair", AB88AA8B-AAAA-AABA-AAAA-AACC88DAAAAF)]
|
||||
runtimeclass BodyHandPair
|
||||
{
|
||||
BodyHandPair();
|
||||
UInt64 BodyTrackingId { get; set; };
|
||||
HandType HandType { get; set; };
|
||||
}
|
||||
@@ -247,6 +253,11 @@ namespace Windows.Xbox.Input
|
||||
RawNavigationReading GetRawNavigationReading();
|
||||
}
|
||||
|
||||
runtimeclass NavigationController : [default] INavigationController
|
||||
{
|
||||
NavigationController();
|
||||
}
|
||||
|
||||
[uuid(AACAAAAB-AADC-AAAA-AAAA-AFAAAAAAAAAA)]
|
||||
interface IGamepad requires INavigationController
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Windows.Xbox.System
|
||||
static Guid GetNetworkCacheIdForUsers(Windows.Foundation.Collections.IVectorView<unsigned int> unk);
|
||||
UInt32 Id { get; };
|
||||
Windows.Foundation.Collections.IVectorView<AudioDeviceInfo> AudioDevices { get; };
|
||||
Windows.Foundation.Collections.IVectorView<Windows.Xbox.Input.Controller> Controllers { get; };
|
||||
Windows.Foundation.Collections.IVectorView<Windows.Xbox.Input.IController> Controllers { get; };
|
||||
UserDisplayInfo DisplayInfo { get; };
|
||||
Boolean IsGuest { get; };
|
||||
Boolean IsSignedIn { get; };
|
||||
@@ -166,9 +166,15 @@ namespace Windows.Xbox.System
|
||||
User User { get; };
|
||||
}
|
||||
|
||||
// Placeholder GUID TODO
|
||||
[interface_name("ISignOutDeferral", AAAFFDDA-AFAA-AAAA-AAAA-AAAAAAAAAAAA)]
|
||||
runtimeclass SignOutDeferral
|
||||
// Placeholder GUID
|
||||
[uuid(AAAFFDDA-AFAA-AAAA-AAAA-AAAAAAAA22AA)]
|
||||
[version(1.0)]
|
||||
interface ISignOutDeferral
|
||||
{
|
||||
HRESULT Complete();
|
||||
}
|
||||
|
||||
runtimeclass SignOutDeferral : [default] ISignOutDeferral
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,10 @@ HRESULT EraXboxUserLicenseInformationWrapper::QueryInterface(const IID &riid, vo
|
||||
}
|
||||
|
||||
*ppvObject = nullptr;
|
||||
winDurango->log.Warn("WinDurango::KernelX::CurrentApp", "No Interface Found: EraXboxUserLicenseInformationWrapper - {}-{}-{}-{}", riid.Data1, riid.Data2, riid.Data3, riid.Data4);
|
||||
winDurango->log.Warn("WinDurango::KernelX::CurrentApp", "No Interface Found: EraXboxUserLicenseInformationWrapper - {:08x}-{:04x}-{:04x}-{:02x}{:02x}-{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}",
|
||||
riid.Data1, riid.Data2, riid.Data3, riid.Data4[0],
|
||||
riid.Data4[1], riid.Data4[2], riid.Data4[3], riid.Data4[4],
|
||||
riid.Data4[5], riid.Data4[6], riid.Data4[7]);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
@@ -73,11 +76,10 @@ HRESULT EraLicenseInformationWrapper::QueryInterface(const IID &riid, void **ppv
|
||||
OLECHAR iidwstr[sizeof(iidstr)];
|
||||
StringFromGUID2(riid, iidwstr, ARRAYSIZE(iidwstr));
|
||||
WideCharToMultiByte(CP_UTF8, 0, iidwstr, -1, iidstr, sizeof(iidstr), nullptr, nullptr);
|
||||
printf("[LicenseInformationWrapperX] Interface Not Implemented: %s\n", iidstr);
|
||||
winDurango->log.Warn("WinDurango::KernelX::CurrentApp", "No Interface Found: EraLicenseInformationWrapper - {}", iidstr);
|
||||
}
|
||||
|
||||
*ppvObject = nullptr;
|
||||
winDurango->log.Warn("WinDurango::KernelX::CurrentApp", "No Interface Found: EraLicenseInformationWrapper - {}-{}-{}-{}", riid.Data1, riid.Data2, riid.Data3, riid.Data4);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
@@ -161,11 +163,10 @@ HRESULT __stdcall EraCurrentAppWrapper::QueryInterface(REFIID riid, void **ppvOb
|
||||
OLECHAR iidwstr[sizeof(iidstr)];
|
||||
StringFromGUID2(riid, iidwstr, ARRAYSIZE(iidwstr));
|
||||
WideCharToMultiByte(CP_UTF8, 0, iidwstr, -1, iidstr, sizeof(iidstr), nullptr, nullptr);
|
||||
printf("[EraCurrentAppWrapper] Interface Not Implemented: %s\n", iidstr);
|
||||
winDurango->log.Warn("WinDurango::KernelX::CurrentApp", "No Interface Found: EraCurrentAppWrapper - {}", iidstr);
|
||||
}
|
||||
|
||||
*ppvObject = nullptr;
|
||||
winDurango->log.Warn("WinDurango::KernelX::CurrentApp", "No Interface Found: EraCurrentAppWrapper - {}-{}-{}-{}", riid.Data1, riid.Data2, riid.Data3, riid.Data4);
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,16 @@ set(FILES
|
||||
"src/Windows/Xbox/Media/Windows.Xbox.Media.GameTransportControls.cpp"
|
||||
"src/Windows/Xbox/Media/Windows.Xbox.Media.GameTransportControlsButtonPressedEventArgs.cpp"
|
||||
"src/Windows/Xbox/Media/Windows.Xbox.Media.GameTransportControlsPropertyChangedEventArgs.cpp"
|
||||
"src/Windows/Xbox/Input/Windows.Xbox.Input.BiometricUser.cpp"
|
||||
"src/Windows/Xbox/Input/Windows.Xbox.Input.BodyController.cpp"
|
||||
"src/Windows/Xbox/Input/Windows.Xbox.Input.BodyHandPair.cpp"
|
||||
"src/Windows/Xbox/Input/Windows.Xbox.Input.Controller.cpp"
|
||||
"src/Windows/Xbox/Input/Windows.Xbox.Input.Gamepad.cpp"
|
||||
"src/Windows/Xbox/Input/Windows.Xbox.Input.NavigationController.cpp"
|
||||
"src/Windows/Xbox/System/Windows.Xbox.System.AudioDeviceInfo.cpp"
|
||||
"src/Windows/Xbox/System/Windows.Xbox.System.cpp"
|
||||
"src/Windows/Xbox/System/Windows.Xbox.System.User.cpp"
|
||||
"src/Windows/Xbox/System/Windows.Xbox.System.UserDisplayInfo.cpp"
|
||||
"src/WinDurangoWinRT.cpp"
|
||||
)
|
||||
|
||||
@@ -55,6 +65,8 @@ target_include_directories(WinDurango.WinRT PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/Media"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/System"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/Input"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Generated Files"
|
||||
"${CMAKE_SOURCE_DIR}/projects/WinDurango.Common/include"
|
||||
)
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Input.BiometricUserChangedEventArgs.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
struct BiometricUserChangedEventArgs : BiometricUserChangedEventArgsT<BiometricUserChangedEventArgs>
|
||||
{
|
||||
BiometricUserChangedEventArgs() = default;
|
||||
BiometricUserChangedEventArgs(uint32_t id) : id(id) {}
|
||||
|
||||
uint32_t BiometricUserId();
|
||||
private:
|
||||
uint32_t id = 0;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Input.BodyController.g.h"
|
||||
#include "Windows.Xbox.Input.BodyControllerAddedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.BodyControllerRemovedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.BodyControllerReading.g.h"
|
||||
#include "Windows.Xbox.Input.BodyControllerReadingChangedEventArgs.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
struct BodyControllerAddedEventArgs : BodyControllerAddedEventArgsT<BodyControllerAddedEventArgs>
|
||||
{
|
||||
BodyControllerAddedEventArgs() = default;
|
||||
BodyControllerAddedEventArgs(winrt::Windows::Xbox::Input::BodyController controller) : controller(controller) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::BodyController BodyController();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::BodyController controller;
|
||||
};
|
||||
|
||||
struct BodyControllerRemovedEventArgs : BodyControllerRemovedEventArgsT<BodyControllerRemovedEventArgs>
|
||||
{
|
||||
BodyControllerRemovedEventArgs() = default;
|
||||
BodyControllerRemovedEventArgs(winrt::Windows::Xbox::Input::BodyController controller) : controller(controller) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::BodyController BodyController();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::BodyController controller;
|
||||
};
|
||||
|
||||
struct BodyControllerReading : BodyControllerReadingT<BodyControllerReading>
|
||||
{
|
||||
BodyControllerReading() = default;
|
||||
BodyControllerReading(winrt::Windows::Foundation::DateTime time, bool isLeanTracked, float leanX, float leanY)
|
||||
: time(time), isLeanTracked(isLeanTracked), leanX(leanX), leanY(leanY) {}
|
||||
|
||||
winrt::Windows::Foundation::DateTime Timestamp();
|
||||
bool IsLeanTracked();
|
||||
float LeanX();
|
||||
float LeanY();
|
||||
private:
|
||||
winrt::Windows::Foundation::DateTime time;
|
||||
bool isLeanTracked = false;
|
||||
float leanX = 0.0f;
|
||||
float leanY = 1.0f;
|
||||
};
|
||||
|
||||
struct BodyControllerReadingChangedEventArgs : BodyControllerReadingChangedEventArgsT<BodyControllerReadingChangedEventArgs>
|
||||
{
|
||||
BodyControllerReadingChangedEventArgs() = default;
|
||||
BodyControllerReadingChangedEventArgs(winrt::Windows::Xbox::Input::BodyControllerReading reading) : reading(reading) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::BodyControllerReading Reading();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::BodyControllerReading reading;
|
||||
};
|
||||
|
||||
struct BodyController : BodyControllerT<BodyController>
|
||||
{
|
||||
BodyController() = default;
|
||||
BodyController(uint64_t id) : id(id) {}
|
||||
|
||||
uint64_t Id();
|
||||
hstring Type();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
uint32_t BiometricUserId();
|
||||
winrt::event_token BiometricUserChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Xbox::Input::BodyController, winrt::Windows::Xbox::Input::BiometricUserChangedEventArgs> const& handler);
|
||||
void BiometricUserChanged(winrt::event_token const& token) noexcept;
|
||||
winrt::Windows::Xbox::Input::BodyControllerReading GetCurrentReading();
|
||||
void GetCurrentReading(winrt::Windows::Xbox::Input::BodyControllerReading const& value);
|
||||
winrt::event_token ReadingChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Xbox::Input::BodyController, winrt::Windows::Xbox::Input::BodyControllerReadingChangedEventArgs> const& handler);
|
||||
void ReadingChanged(winrt::event_token const& token) noexcept;
|
||||
private:
|
||||
uint64_t id = 0;
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Input::factory_implementation
|
||||
{
|
||||
struct BodyController : BodyControllerT<BodyController, implementation::BodyController>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Input.BodyHandPair.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
struct BodyHandPair : BodyHandPairT<BodyHandPair>
|
||||
{
|
||||
BodyHandPair() = default;
|
||||
|
||||
uint64_t BodyTrackingId();
|
||||
void BodyTrackingId(uint64_t value);
|
||||
winrt::Windows::Xbox::Input::HandType HandType();
|
||||
void HandType(winrt::Windows::Xbox::Input::HandType const& value);
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::HandType handType = winrt::Windows::Xbox::Input::HandType::LEFT;
|
||||
uint64_t trackingID = 0;
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Input::factory_implementation
|
||||
{
|
||||
struct BodyHandPair : BodyHandPairT<BodyHandPair, implementation::BodyHandPair>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Input.Controller.g.h"
|
||||
#include "Windows.Xbox.Input.ControllerAddedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.ControllerOrderChangedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.ControllerPairingChangedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.ControllerRemovedEventArgs.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
struct ControllerAddedEventArgs : ControllerAddedEventArgsT<ControllerAddedEventArgs>
|
||||
{
|
||||
ControllerAddedEventArgs() = default;
|
||||
ControllerAddedEventArgs(winrt::Windows::Xbox::Input::Controller controller) : controller(controller) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::Controller Controller();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::Controller controller;
|
||||
};
|
||||
|
||||
struct ControllerOrderChangedEventArgs : ControllerOrderChangedEventArgsT<ControllerOrderChangedEventArgs>
|
||||
{
|
||||
ControllerOrderChangedEventArgs() = default;
|
||||
};
|
||||
|
||||
struct ControllerPairingChangedEventArgs : ControllerPairingChangedEventArgsT<ControllerPairingChangedEventArgs>
|
||||
{
|
||||
ControllerPairingChangedEventArgs() = default;
|
||||
ControllerPairingChangedEventArgs(winrt::Windows::Xbox::Input::Controller controller, winrt::Windows::Xbox::System::User user,
|
||||
winrt::Windows::Xbox::System::User previousUser) : controller(controller), user(user), previousUser(previousUser) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::Controller Controller();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
winrt::Windows::Xbox::System::User PreviousUser();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::Controller controller;
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
winrt::Windows::Xbox::System::User previousUser;
|
||||
};
|
||||
|
||||
struct ControllerRemovedEventArgs : ControllerRemovedEventArgsT<ControllerRemovedEventArgs>
|
||||
{
|
||||
ControllerRemovedEventArgs() = default;
|
||||
ControllerRemovedEventArgs(winrt::Windows::Xbox::Input::Controller controller) : controller(controller) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::Controller Controller();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::Controller controller;
|
||||
};
|
||||
|
||||
struct Controller : ControllerT<Controller>
|
||||
{
|
||||
Controller() = default;
|
||||
Controller(uint64_t id) : id(id) {}
|
||||
|
||||
static winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::Controller> Controllers();
|
||||
static winrt::event_token ControllerAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerAddedEventArgs> const& handler);
|
||||
static void ControllerAdded(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token ControllerRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerRemovedEventArgs> const& handler);
|
||||
static void ControllerRemoved(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token ControllerPairingChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerPairingChangedEventArgs> const& handler);
|
||||
static void ControllerPairingChanged(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token ControllerOrderChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerOrderChangedEventArgs> const& handler);
|
||||
static void ControllerOrderChanged(winrt::event_token const& token) noexcept;
|
||||
static winrt::Windows::Xbox::Input::Controller GetControllerById(uint64_t unk);
|
||||
static void GetControllerMetadata(uint64_t unk, winrt::Windows::Xbox::Input::MetadataVersion const& version, winrt::Windows::Foundation::Collections::IVector<uint8_t> const& unka);
|
||||
static winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::Controller> GetControllersOrderedLeftToRight(winrt::Windows::Xbox::Input::ControllerOrderFilter const& filter);
|
||||
uint64_t Id();
|
||||
hstring Type();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
uint64_t id = 0;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerAddedEventArgs>> e_ControllerAdded;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerRemovedEventArgs>> e_ControllerRemoved;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerPairingChangedEventArgs>> e_ControllerPairingChanged;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerOrderChangedEventArgs>> e_ControllerOrderChanged;
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Input::factory_implementation
|
||||
{
|
||||
struct Controller : ControllerT<Controller, implementation::Controller>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Input.Gamepad.g.h"
|
||||
#include "Windows.Xbox.Input.GamepadAddedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.GamepadRemovedEventArgs.g.h"
|
||||
#include "Windows.Xbox.Input.GamepadReading.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
struct GamepadAddedEventArgs : GamepadAddedEventArgsT<GamepadAddedEventArgs>
|
||||
{
|
||||
GamepadAddedEventArgs() = default;
|
||||
GamepadAddedEventArgs(winrt::Windows::Xbox::Input::Gamepad gamepad) : gamepad(gamepad) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::Gamepad Gamepad();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::Gamepad gamepad;
|
||||
};
|
||||
|
||||
struct GamepadRemovedEventArgs : GamepadRemovedEventArgsT<GamepadRemovedEventArgs>
|
||||
{
|
||||
GamepadRemovedEventArgs() = default;
|
||||
GamepadRemovedEventArgs(winrt::Windows::Xbox::Input::Gamepad gamepad) : gamepad(gamepad) {}
|
||||
|
||||
winrt::Windows::Xbox::Input::Gamepad Gamepad();
|
||||
private:
|
||||
winrt::Windows::Xbox::Input::Gamepad gamepad;
|
||||
};
|
||||
|
||||
struct GamepadReading : GamepadReadingT<GamepadReading>
|
||||
{
|
||||
GamepadReading() = default;
|
||||
GamepadReading(winrt::Windows::Foundation::DateTime time, winrt::Windows::Xbox::Input::GamepadButtons buttons)
|
||||
: time(time), buttons(buttons) {}
|
||||
|
||||
winrt::Windows::Foundation::DateTime Timestamp();
|
||||
winrt::Windows::Xbox::Input::GamepadButtons Buttons();
|
||||
bool IsDPadUpPressed();
|
||||
bool IsDPadDownPressed();
|
||||
bool IsDPadLeftPressed();
|
||||
bool IsDPadRightPressed();
|
||||
bool IsMenuPressed();
|
||||
bool IsViewPressed();
|
||||
bool IsLeftThumbstickPressed();
|
||||
bool IsRightThumbstickPressed();
|
||||
bool IsLeftShoulderPressed();
|
||||
bool IsRightShoulderPressed();
|
||||
bool IsAPressed();
|
||||
bool IsBPressed();
|
||||
bool IsXPressed();
|
||||
bool IsYPressed();
|
||||
float LeftTrigger();
|
||||
float RightTrigger();
|
||||
float LeftThumbstickX();
|
||||
float LeftThumbstickY();
|
||||
float RightThumbstickX();
|
||||
float RightThumbstickY();
|
||||
private:
|
||||
winrt::Windows::Foundation::DateTime time;
|
||||
winrt::Windows::Xbox::Input::GamepadButtons buttons = winrt::Windows::Xbox::Input::GamepadButtons::None;
|
||||
};
|
||||
|
||||
struct Gamepad : GamepadT<Gamepad>
|
||||
{
|
||||
Gamepad() = default;
|
||||
Gamepad(uint64_t id) : id(id) {}
|
||||
|
||||
static winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::Gamepad> Gamepads();
|
||||
static winrt::event_token GamepadAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadAddedEventArgs> const& handler);
|
||||
static void GamepadAdded(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token GamepadRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadRemovedEventArgs> const& handler);
|
||||
static void GamepadRemoved(winrt::event_token const& token) noexcept;
|
||||
uint64_t Id();
|
||||
hstring Type();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
winrt::Windows::Xbox::Input::INavigationReading GetNavigationReading();
|
||||
winrt::Windows::Xbox::Input::RawNavigationReading GetRawNavigationReading();
|
||||
winrt::Windows::Xbox::Input::GamepadVibration SetVibration();
|
||||
winrt::Windows::Xbox::Input::GamepadReading GetCurrentReading();
|
||||
winrt::Windows::Xbox::Input::RawGamepadReading GetRawCurrentReading();
|
||||
private:
|
||||
uint64_t id = 0;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadAddedEventArgs>> e_GamepadAdded;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadRemovedEventArgs>> e_GamepadRemoved;
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Input::factory_implementation
|
||||
{
|
||||
struct Gamepad : GamepadT<Gamepad, implementation::Gamepad>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Input.NavigationController.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
struct NavigationController : NavigationControllerT<NavigationController>
|
||||
{
|
||||
NavigationController() = default;
|
||||
NavigationController(uint64_t id) : id(id) {}
|
||||
|
||||
uint64_t Id();
|
||||
hstring Type();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
winrt::Windows::Xbox::Input::INavigationReading GetNavigationReading();
|
||||
winrt::Windows::Xbox::Input::RawNavigationReading GetRawNavigationReading();
|
||||
private:
|
||||
uint64_t id = 0;
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Input::factory_implementation
|
||||
{
|
||||
struct NavigationController : NavigationControllerT<NavigationController, implementation::NavigationController>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.System.AudioDeviceInfo.g.h"
|
||||
#include "Windows.Xbox.System.AudioDeviceAddedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.AudioDeviceChangedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.AudioDeviceRemovedEventArgs.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
struct AudioDeviceAddedEventArgs : AudioDeviceAddedEventArgsT<AudioDeviceAddedEventArgs>
|
||||
{
|
||||
AudioDeviceAddedEventArgs() = default;
|
||||
AudioDeviceAddedEventArgs(winrt::Windows::Xbox::System::User aUser,
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo aAudioDevice) : user(aUser), audioDevice(aAudioDevice) {};
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo AudioDevice();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo audioDevice;
|
||||
};
|
||||
|
||||
struct AudioDeviceChangedEventArgs : AudioDeviceChangedEventArgsT<AudioDeviceChangedEventArgs>
|
||||
{
|
||||
AudioDeviceChangedEventArgs() = default;
|
||||
AudioDeviceChangedEventArgs(winrt::Windows::Xbox::System::User aUser,
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo aAudioDevice) : user(aUser), audioDevice(aAudioDevice) {};
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo AudioDevice();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo audioDevice;
|
||||
};
|
||||
|
||||
struct AudioDeviceRemovedEventArgs : AudioDeviceRemovedEventArgsT<AudioDeviceRemovedEventArgs>
|
||||
{
|
||||
AudioDeviceRemovedEventArgs() = default;
|
||||
AudioDeviceRemovedEventArgs(winrt::Windows::Xbox::System::User aUser,
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo aAudioDevice) : user(aUser), audioDevice(aAudioDevice) {};
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo AudioDevice();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo audioDevice;
|
||||
};
|
||||
|
||||
struct AudioDeviceInfo : AudioDeviceInfoT<AudioDeviceInfo>
|
||||
{
|
||||
AudioDeviceInfo() = default;
|
||||
AudioDeviceInfo(hstring Id, winrt::Windows::Xbox::System::AudioDeviceType audioDeviceType,
|
||||
winrt::Windows::Xbox::System::AudioDeviceSharing audioDeviceSharing,
|
||||
winrt::Windows::Xbox::System::AudioDeviceCategory audioDeviceCategory, bool muted)
|
||||
: id(Id), deviceType(audioDeviceType), sharing(audioDeviceSharing), deviceCategory(audioDeviceCategory), isMuted(muted) {};
|
||||
|
||||
hstring Id();
|
||||
winrt::Windows::Xbox::System::AudioDeviceType DeviceType();
|
||||
winrt::Windows::Xbox::System::AudioDeviceSharing Sharing();
|
||||
winrt::Windows::Xbox::System::AudioDeviceCategory DeviceCategory();
|
||||
bool IsMicrophoneMuted();
|
||||
private:
|
||||
hstring id = L"";
|
||||
winrt::Windows::Xbox::System::AudioDeviceType deviceType = winrt::Windows::Xbox::System::AudioDeviceType::Capture;
|
||||
winrt::Windows::Xbox::System::AudioDeviceSharing sharing = winrt::Windows::Xbox::System::AudioDeviceSharing::Exclusive;
|
||||
winrt::Windows::Xbox::System::AudioDeviceCategory deviceCategory = winrt::Windows::Xbox::System::AudioDeviceCategory::Communications;
|
||||
bool isMuted = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.System.User.g.h"
|
||||
#include "Windows.Xbox.System.UserAddedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.UserRemovedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.UserDisplayInfo.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
struct UserAddedEventArgs : UserAddedEventArgsT<UserAddedEventArgs>
|
||||
{
|
||||
UserAddedEventArgs() = default;
|
||||
UserAddedEventArgs(winrt::Windows::Xbox::System::User user) : m_user(user) {}
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User m_user;
|
||||
};
|
||||
|
||||
struct UserRemovedEventArgs : UserRemovedEventArgsT<UserRemovedEventArgs>
|
||||
{
|
||||
UserRemovedEventArgs() = default;
|
||||
UserRemovedEventArgs(winrt::Windows::Xbox::System::User user) : m_user(user) {}
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User m_user;
|
||||
};
|
||||
|
||||
struct User : UserT<User>
|
||||
{
|
||||
User() = default;
|
||||
User(uint32_t id) : id(id) {}
|
||||
|
||||
static winrt::Windows::Xbox::System::UserOnlineState OnlineState();
|
||||
static winrt::event_token OnlineStateChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::OnlineStateChangedEventArgs> const& handler);
|
||||
static void OnlineStateChanged(winrt::event_token const& token) noexcept;
|
||||
static winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::System::User> Users();
|
||||
static winrt::event_token UserAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserAddedEventArgs> const& handler);
|
||||
static void UserAdded(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token UserRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserRemovedEventArgs> const& handler);
|
||||
static void UserRemoved(winrt::event_token const& token) noexcept;
|
||||
static winrt::Windows::Xbox::System::User GetUserById(uint32_t Id);
|
||||
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers);
|
||||
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers, winrt::Windows::Foundation::Collections::IVector<uint8_t> body);
|
||||
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers, hstring body);
|
||||
static winrt::event_token AudioDeviceAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceAddedEventArgs> const& handler);
|
||||
static void AudioDeviceAdded(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token AudioDeviceRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceRemovedEventArgs> const& handler);
|
||||
static void AudioDeviceRemoved(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token AudioDeviceChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceChangedEventArgs> const& handler);
|
||||
static void AudioDeviceChanged(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token SignInCompleted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignInCompletedEventArgs> const& handler);
|
||||
static void SignInCompleted(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token SignOutStarted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutStartedEventArgs> const& handler);
|
||||
static void SignOutStarted(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token SignOutCompleted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutCompletedEventArgs> const& handler);
|
||||
static void SignOutCompleted(winrt::event_token const& token) noexcept;
|
||||
static winrt::event_token UserDisplayInfoChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserDisplayInfoChangedEventArgs> const& handler);
|
||||
static void UserDisplayInfoChanged(winrt::event_token const& token) noexcept;
|
||||
static winrt::guid GetNetworkCacheIdForUsers(winrt::Windows::Foundation::Collections::IVectorView<uint32_t> const& unk);
|
||||
uint32_t Id();
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::System::AudioDeviceInfo> AudioDevices();
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::IController> Controllers();
|
||||
winrt::Windows::Xbox::System::UserDisplayInfo DisplayInfo();
|
||||
bool IsGuest();
|
||||
bool IsSignedIn();
|
||||
winrt::Windows::Xbox::System::UserLocation Location();
|
||||
winrt::Windows::Xbox::System::User Sponsor();
|
||||
hstring XboxUserHash();
|
||||
hstring XboxUserId();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers);
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers, winrt::Windows::Foundation::Collections::IVector<uint8_t> body);
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers, hstring body);
|
||||
private:
|
||||
uint32_t id = 0;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::OnlineStateChangedEventArgs>> m_OnlineStateChanged;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserAddedEventArgs>> m_UserAdded;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserRemovedEventArgs>> m_UserRemoved;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceAddedEventArgs>> m_AudioDeviceAdded;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceRemovedEventArgs>> m_AudioDeviceRemoved;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceChangedEventArgs>> m_AudioDeviceChanged;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignInCompletedEventArgs>> m_SignInCompleted;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutStartedEventArgs>> m_SignOutStarted;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutCompletedEventArgs>> m_SignOutCompleted;
|
||||
static winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserDisplayInfoChangedEventArgs>> m_UserDisplayInfoChanged;
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::System::factory_implementation
|
||||
{
|
||||
struct User : UserT<User, implementation::User>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.System.UserDisplayInfo.g.h"
|
||||
#include "Windows.Xbox.System.UserDisplayInfoChangedEventArgs.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
struct UserDisplayInfoChangedEventArgs : UserDisplayInfoChangedEventArgsT<UserDisplayInfoChangedEventArgs>
|
||||
{
|
||||
UserDisplayInfoChangedEventArgs() = default;
|
||||
UserDisplayInfoChangedEventArgs(winrt::Windows::Xbox::System::User user) : user(user) {}
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
};
|
||||
|
||||
struct UserDisplayInfo : UserDisplayInfoT<UserDisplayInfo>
|
||||
{
|
||||
UserDisplayInfo() = default;
|
||||
UserDisplayInfo(hstring gamertag, uint32_t gamerscore, hstring appDisplayName, hstring gameDisplayName, uint32_t reputation,
|
||||
winrt::Windows::Xbox::System::UserAgeGroup ageGroup, winrt::Windows::Foundation::Collections::IVectorView<uint32_t> privileges)
|
||||
: gamertag(gamertag), gamerscore(gamerscore), appDisplayName(appDisplayName), gameDisplayName(gameDisplayName), reputation(reputation),
|
||||
ageGroup(ageGroup), privileges(privileges) {}
|
||||
|
||||
hstring Gamertag();
|
||||
uint32_t GamerScore();
|
||||
hstring ApplicationDisplayName();
|
||||
hstring GameDisplayName();
|
||||
uint32_t Reputation();
|
||||
winrt::Windows::Xbox::System::UserAgeGroup AgeGroup();
|
||||
winrt::Windows::Foundation::Collections::IVectorView<uint32_t> Privileges();
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetPictureResult> GetApplicationPictureAsync(winrt::Windows::Xbox::System::UserPictureSize unk, winrt::Windows::Storage::Streams::IBuffer unka);
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetPictureResult> GetGamerPictureAsync(winrt::Windows::Xbox::System::UserPictureSize unk, winrt::Windows::Storage::Streams::IBuffer unka);
|
||||
private:
|
||||
hstring gamertag = L"WinDurango2";
|
||||
uint32_t gamerscore = 2419;
|
||||
hstring appDisplayName = L"";
|
||||
hstring gameDisplayName = L"";
|
||||
uint32_t reputation = 0;
|
||||
winrt::Windows::Xbox::System::UserAgeGroup ageGroup = winrt::Windows::Xbox::System::UserAgeGroup::Adult;
|
||||
winrt::Windows::Foundation::Collections::IVectorView<uint32_t> privileges = {0};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.System.GetTokenAndSignatureResult.g.h"
|
||||
#include "Windows.Xbox.System.OnlineStateChangedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.GetPictureResult.g.h"
|
||||
#include "Windows.Xbox.System.SignInCompletedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.SignOutStartedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.SignOutCompletedEventArgs.g.h"
|
||||
#include "Windows.Xbox.System.SignOutDeferral.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
struct GetTokenAndSignatureResult : GetTokenAndSignatureResultT<GetTokenAndSignatureResult>
|
||||
{
|
||||
GetTokenAndSignatureResult() = default;
|
||||
GetTokenAndSignatureResult(hstring signature, hstring token) : signature(signature), token(token) {}
|
||||
|
||||
hstring Signature();
|
||||
hstring Token();
|
||||
private:
|
||||
hstring signature = L"";
|
||||
hstring token = L"";
|
||||
};
|
||||
|
||||
struct OnlineStateChangedEventArgs : OnlineStateChangedEventArgsT<OnlineStateChangedEventArgs>
|
||||
{
|
||||
OnlineStateChangedEventArgs() = default;
|
||||
OnlineStateChangedEventArgs(winrt::Windows::Xbox::System::UserOnlineState state) : state(state) {}
|
||||
|
||||
winrt::Windows::Xbox::System::UserOnlineState State();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::UserOnlineState state = winrt::Windows::Xbox::System::UserOnlineState::Offline;
|
||||
};
|
||||
|
||||
struct GetPictureResult : GetPictureResultT<GetPictureResult>
|
||||
{
|
||||
GetPictureResult() = default;
|
||||
GetPictureResult(winrt::hresult result, uint32_t requiredBufferSize) : result(result), bufferSize(requiredBufferSize) {}
|
||||
|
||||
winrt::hresult Result();
|
||||
uint32_t RequiredBufferSize();
|
||||
private:
|
||||
winrt::hresult result = 0;
|
||||
uint32_t bufferSize = 0;
|
||||
};
|
||||
|
||||
struct SignInCompletedEventArgs : SignInCompletedEventArgsT<SignInCompletedEventArgs>
|
||||
{
|
||||
SignInCompletedEventArgs() = default;
|
||||
SignInCompletedEventArgs(winrt::Windows::Xbox::System::User user) : user(user) {}
|
||||
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
};
|
||||
|
||||
struct SignOutStartedEventArgs : SignOutStartedEventArgsT<SignOutStartedEventArgs>
|
||||
{
|
||||
SignOutStartedEventArgs() = default;
|
||||
SignOutStartedEventArgs(winrt::Windows::Xbox::System::SignOutDeferral deferral, winrt::Windows::Xbox::System::User user)
|
||||
: deferral(deferral), user(user) {}
|
||||
|
||||
winrt::Windows::Xbox::System::SignOutDeferral GetDeferral();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
winrt::Windows::Xbox::System::SignOutDeferral deferral;
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
};
|
||||
|
||||
struct SignOutCompletedEventArgs : SignOutCompletedEventArgsT<SignOutCompletedEventArgs>
|
||||
{
|
||||
SignOutCompletedEventArgs() = default;
|
||||
SignOutCompletedEventArgs(winrt::hresult result, winrt::Windows::Xbox::System::User user) : result(result), user(user) {}
|
||||
|
||||
winrt::hresult Result();
|
||||
winrt::Windows::Xbox::System::User User();
|
||||
private:
|
||||
winrt::hresult result;
|
||||
winrt::Windows::Xbox::System::User user;
|
||||
};
|
||||
|
||||
struct SignOutDeferral : SignOutDeferralT<SignOutDeferral>
|
||||
{
|
||||
SignOutDeferral() = default;
|
||||
|
||||
void Complete();
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "Windows.Xbox.Input.BiometricUser.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
uint32_t BiometricUserChangedEventArgs::BiometricUserId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
#include "Windows.Xbox.Input.BodyController.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::Input::BodyController BodyControllerAddedEventArgs::BodyController()
|
||||
{
|
||||
return controller;
|
||||
}
|
||||
winrt::Windows::Xbox::Input::BodyController BodyControllerRemovedEventArgs::BodyController()
|
||||
{
|
||||
return controller;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::DateTime BodyControllerReading::Timestamp()
|
||||
{
|
||||
return time;
|
||||
}
|
||||
|
||||
bool BodyControllerReading::IsLeanTracked()
|
||||
{
|
||||
return isLeanTracked;
|
||||
}
|
||||
|
||||
float BodyControllerReading::LeanX()
|
||||
{
|
||||
return leanX;
|
||||
}
|
||||
|
||||
float BodyControllerReading::LeanY()
|
||||
{
|
||||
return leanY;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::BodyControllerReading BodyControllerReadingChangedEventArgs::Reading()
|
||||
{
|
||||
return reading;
|
||||
}
|
||||
|
||||
uint64_t BodyController::Id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
hstring BodyController::Type()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Type");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User BodyController::User()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: User");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
uint32_t BodyController::BiometricUserId()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: BiometricUserId");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event_token BodyController::BiometricUserChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Xbox::Input::BodyController, winrt::Windows::Xbox::Input::BiometricUserChangedEventArgs> const& handler)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: add_BiometricUserChanged");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
void BodyController::BiometricUserChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: remove_BiometricUserChanged");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::BodyControllerReading BodyController::GetCurrentReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: put_GetCurrentReading");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
void BodyController::GetCurrentReading(winrt::Windows::Xbox::Input::BodyControllerReading const& value)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: set_GetCurrentReading");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event_token BodyController::ReadingChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Xbox::Input::BodyController, winrt::Windows::Xbox::Input::BodyControllerReadingChangedEventArgs> const& handler)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: add_ReadingChanged");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
void BodyController::ReadingChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: remove_ReadingChanged");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#include "Windows.Xbox.Input.BodyHandPair.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
uint64_t BodyHandPair::BodyTrackingId()
|
||||
{
|
||||
return trackingID;
|
||||
}
|
||||
|
||||
void BodyHandPair::BodyTrackingId(uint64_t value)
|
||||
{
|
||||
trackingID = value;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::HandType BodyHandPair::HandType()
|
||||
{
|
||||
return handType;
|
||||
}
|
||||
|
||||
void BodyHandPair::HandType(winrt::Windows::Xbox::Input::HandType const& value)
|
||||
{
|
||||
handType = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
#include "Windows.Xbox.Input.Controller.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::Input::Controller ControllerAddedEventArgs::Controller()
|
||||
{
|
||||
return controller;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::Controller ControllerPairingChangedEventArgs::Controller()
|
||||
{
|
||||
return controller;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User ControllerPairingChangedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User ControllerPairingChangedEventArgs::PreviousUser()
|
||||
{
|
||||
return previousUser;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::Controller ControllerRemovedEventArgs::Controller()
|
||||
{
|
||||
return controller;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::Controller> Controller::Controllers()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Controllers");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event_token Controller::ControllerAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerAddedEventArgs> const& handler)
|
||||
{
|
||||
return e_ControllerAdded.add(handler);
|
||||
}
|
||||
|
||||
void Controller::ControllerAdded(winrt::event_token const& token) noexcept
|
||||
{
|
||||
e_ControllerAdded.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token Controller::ControllerRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerRemovedEventArgs> const& handler)
|
||||
{
|
||||
return e_ControllerRemoved.add(handler);
|
||||
}
|
||||
|
||||
void Controller::ControllerRemoved(winrt::event_token const& token) noexcept
|
||||
{
|
||||
e_ControllerRemoved.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token Controller::ControllerPairingChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerPairingChangedEventArgs> const& handler)
|
||||
{
|
||||
return e_ControllerPairingChanged.add(handler);
|
||||
}
|
||||
|
||||
void Controller::ControllerPairingChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
e_ControllerPairingChanged.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token Controller::ControllerOrderChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerOrderChangedEventArgs> const& handler)
|
||||
{
|
||||
return e_ControllerOrderChanged.add(handler);
|
||||
}
|
||||
|
||||
void Controller::ControllerOrderChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
e_ControllerOrderChanged.remove(token);
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::Controller Controller::GetControllerById(uint64_t unk)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: GetControllerById");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
void Controller::GetControllerMetadata(uint64_t unk, winrt::Windows::Xbox::Input::MetadataVersion const& version, winrt::Windows::Foundation::Collections::IVector<uint8_t> const& unka)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: GetControllerMetadata");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::Controller> Controller::GetControllersOrderedLeftToRight(winrt::Windows::Xbox::Input::ControllerOrderFilter const& filter)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: GetControllersOrderedLeftToRight");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
uint64_t Controller::Id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
hstring Controller::Type()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Type");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User Controller::User()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: User");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerAddedEventArgs>> Controller::e_ControllerAdded{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerRemovedEventArgs>> Controller::e_ControllerRemoved{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerPairingChangedEventArgs>> Controller::e_ControllerPairingChanged{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::ControllerOrderChangedEventArgs>> Controller::e_ControllerOrderChanged{};
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
#include "Windows.Xbox.Input.Gamepad.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::Input::Gamepad GamepadAddedEventArgs::Gamepad()
|
||||
{
|
||||
return gamepad;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::Gamepad GamepadRemovedEventArgs::Gamepad()
|
||||
{
|
||||
return gamepad;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::DateTime GamepadReading::Timestamp()
|
||||
{
|
||||
return time;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::GamepadButtons GamepadReading::Buttons()
|
||||
{
|
||||
return buttons;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsDPadUpPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::DPadUp) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsDPadDownPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::DPadDown) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsDPadLeftPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::DPadLeft) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsDPadRightPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::DPadRight) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsMenuPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::Menu) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsViewPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::View) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsLeftThumbstickPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::LeftThumbstick) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsRightThumbstickPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::RightThumbstick) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsLeftShoulderPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::LeftShoulder) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsRightShoulderPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::RightShoulder) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsAPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::A) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsBPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::B) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsXPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::X) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
bool GamepadReading::IsYPressed()
|
||||
{
|
||||
return (buttons & GamepadButtons::Y) != GamepadButtons::None;
|
||||
}
|
||||
|
||||
float GamepadReading::LeftTrigger()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: LeftTrigger");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float GamepadReading::RightTrigger()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightTrigger");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float GamepadReading::LeftThumbstickX()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: LeftThumbstickX");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float GamepadReading::LeftThumbstickY()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: LeftThumbstickY");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float GamepadReading::RightThumbstickX()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickX");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
float GamepadReading::RightThumbstickY()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::Gamepad> Gamepad::Gamepads()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Gamepads");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event_token Gamepad::GamepadAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadAddedEventArgs> const& handler)
|
||||
{
|
||||
return e_GamepadAdded.add(handler);
|
||||
}
|
||||
|
||||
void Gamepad::GamepadAdded(winrt::event_token const& token) noexcept
|
||||
{
|
||||
e_GamepadAdded.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token Gamepad::GamepadRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadRemovedEventArgs> const& handler)
|
||||
{
|
||||
return e_GamepadRemoved.add(handler);
|
||||
}
|
||||
|
||||
void Gamepad::GamepadRemoved(winrt::event_token const& token) noexcept
|
||||
{
|
||||
e_GamepadRemoved.remove(token);
|
||||
}
|
||||
|
||||
uint64_t Gamepad::Id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
hstring Gamepad::Type()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User Gamepad::User()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::INavigationReading Gamepad::GetNavigationReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::RawNavigationReading Gamepad::GetRawNavigationReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::GamepadVibration Gamepad::SetVibration()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::GamepadReading Gamepad::GetCurrentReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::RawGamepadReading Gamepad::GetRawCurrentReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: RightThumbstickY");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadAddedEventArgs>> Gamepad::e_GamepadAdded{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::Input::GamepadRemovedEventArgs>> Gamepad::e_GamepadRemoved{};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "Windows.Xbox.Input.NavigationController.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
namespace winrt::Windows::Xbox::Input::implementation
|
||||
{
|
||||
uint64_t NavigationController::Id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
hstring NavigationController::Type()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: Type");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User NavigationController::User()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: User");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::INavigationReading NavigationController::GetNavigationReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: GetNavigationReading");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::Input::RawNavigationReading NavigationController::GetRawNavigationReading()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Input", "Unimplemented: GetRawNavigationReading");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
#include "Windows.Xbox.System.AudioDeviceInfo.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::System::User AudioDeviceAddedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo AudioDeviceAddedEventArgs::AudioDevice()
|
||||
{
|
||||
return audioDevice;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User AudioDeviceChangedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo AudioDeviceChangedEventArgs::AudioDevice()
|
||||
{
|
||||
return audioDevice;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User AudioDeviceRemovedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::AudioDeviceInfo AudioDeviceRemovedEventArgs::AudioDevice()
|
||||
{
|
||||
return audioDevice;
|
||||
}
|
||||
|
||||
hstring AudioDeviceInfo::Id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::AudioDeviceType AudioDeviceInfo::DeviceType()
|
||||
{
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::AudioDeviceSharing AudioDeviceInfo::Sharing()
|
||||
{
|
||||
return sharing;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::AudioDeviceCategory AudioDeviceInfo::DeviceCategory()
|
||||
{
|
||||
return deviceCategory;
|
||||
}
|
||||
|
||||
bool AudioDeviceInfo::IsMicrophoneMuted()
|
||||
{
|
||||
return isMuted;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
#include "Windows.Xbox.System.User.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::System::User UserAddedEventArgs::User()
|
||||
{
|
||||
return m_user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User UserRemovedEventArgs::User()
|
||||
{
|
||||
return m_user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::UserOnlineState User::OnlineState()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: OnlineState");
|
||||
return winrt::Windows::Xbox::System::UserOnlineState::Offline;
|
||||
}
|
||||
|
||||
winrt::event_token User::OnlineStateChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::OnlineStateChangedEventArgs> const& handler)
|
||||
{
|
||||
return m_OnlineStateChanged.add(handler);
|
||||
}
|
||||
|
||||
void User::OnlineStateChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_OnlineStateChanged.remove(token);
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::System::User> User::Users()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: Users");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event_token User::UserAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserAddedEventArgs> const& handler)
|
||||
{
|
||||
return m_UserAdded.add(handler);
|
||||
}
|
||||
|
||||
void User::UserAdded(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_UserAdded.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::UserRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserRemovedEventArgs> const& handler)
|
||||
{
|
||||
return m_UserRemoved.add(handler);
|
||||
}
|
||||
|
||||
void User::UserRemoved(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_UserRemoved.remove(token);
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User User::GetUserById(uint32_t Id)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: Users");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync(hstring, hstring, hstring)");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers, winrt::Windows::Foundation::Collections::IVector<uint8_t> body)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync(hstring, hstring, hstring, array<uint8_t>)");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers, hstring body)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync(hstring, hstring, hstring, hstring)");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::event_token User::AudioDeviceAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceAddedEventArgs> const& handler)
|
||||
{
|
||||
return m_AudioDeviceAdded.add(handler);
|
||||
}
|
||||
|
||||
void User::AudioDeviceAdded(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_AudioDeviceAdded.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::AudioDeviceRemoved(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceRemovedEventArgs> const& handler)
|
||||
{
|
||||
return m_AudioDeviceRemoved.add(handler);
|
||||
}
|
||||
|
||||
void User::AudioDeviceRemoved(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_AudioDeviceRemoved.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::AudioDeviceChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceChangedEventArgs> const& handler)
|
||||
{
|
||||
return m_AudioDeviceChanged.add(handler);
|
||||
}
|
||||
|
||||
void User::AudioDeviceChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_AudioDeviceChanged.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::SignInCompleted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignInCompletedEventArgs> const& handler)
|
||||
{
|
||||
return m_SignInCompleted.add(handler);
|
||||
}
|
||||
|
||||
void User::SignInCompleted(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_SignInCompleted.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::SignOutStarted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutStartedEventArgs> const& handler)
|
||||
{
|
||||
return m_SignOutStarted.add(handler);
|
||||
}
|
||||
|
||||
void User::SignOutStarted(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_SignOutStarted.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::SignOutCompleted(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutCompletedEventArgs> const& handler)
|
||||
{
|
||||
return m_SignOutCompleted.add(handler);
|
||||
}
|
||||
|
||||
void User::SignOutCompleted(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_SignOutCompleted.remove(token);
|
||||
}
|
||||
|
||||
winrt::event_token User::UserDisplayInfoChanged(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserDisplayInfoChangedEventArgs> const& handler)
|
||||
{
|
||||
return m_UserDisplayInfoChanged.add(handler);
|
||||
}
|
||||
|
||||
void User::UserDisplayInfoChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
m_UserDisplayInfoChanged.remove(token);
|
||||
}
|
||||
|
||||
winrt::guid User::GetNetworkCacheIdForUsers(winrt::Windows::Foundation::Collections::IVectorView<uint32_t> const& unk)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetNetworkCacheIdForUsers");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
uint32_t User::Id()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::System::AudioDeviceInfo> User::AudioDevices()
|
||||
{
|
||||
return winrt::single_threaded_vector<winrt::Windows::Xbox::System::AudioDeviceInfo>().GetView();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Input::IController> User::Controllers()
|
||||
{
|
||||
return winrt::single_threaded_vector<winrt::Windows::Xbox::Input::IController>().GetView();
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::UserDisplayInfo User::DisplayInfo()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: DisplayInfo");
|
||||
return winrt::make<winrt::Windows::Xbox::System::implementation::UserDisplayInfo>();
|
||||
}
|
||||
|
||||
bool User::IsGuest()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: IsGuest");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool User::IsSignedIn()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: IsSignedIn");
|
||||
return true;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::UserLocation User::Location()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: Location");
|
||||
return winrt::Windows::Xbox::System::UserLocation::Local;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User User::Sponsor()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: Sponsor");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
hstring User::XboxUserHash()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: XboxUserHash");
|
||||
return L"";
|
||||
}
|
||||
|
||||
hstring User::XboxUserId()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: XboxUserId");
|
||||
return L"";
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureAsync(hstring, hstring, hstring)");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers, winrt::Windows::Foundation::Collections::IVector<uint8_t> body)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureAsync(hstring, hstring, hstring, array<uint8_t>)");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers, hstring body)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureAsync(hstring, hstring, hstring, hstring)");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::OnlineStateChangedEventArgs>> User::m_OnlineStateChanged{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserAddedEventArgs>> User::m_UserAdded{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserRemovedEventArgs>> User::m_UserRemoved{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceAddedEventArgs>> User::m_AudioDeviceAdded{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceRemovedEventArgs>> User::m_AudioDeviceRemoved{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceChangedEventArgs>> User::m_AudioDeviceChanged{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignInCompletedEventArgs>> User::m_SignInCompleted{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutStartedEventArgs>> User::m_SignOutStarted{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::SignOutCompletedEventArgs>> User::m_SignOutCompleted{};
|
||||
winrt::event<winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::UserDisplayInfoChangedEventArgs>> User::m_UserDisplayInfoChanged{};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
#include "Windows.Xbox.System.UserDisplayInfo.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::System::User UserDisplayInfoChangedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
hstring UserDisplayInfo::Gamertag()
|
||||
{
|
||||
return gamertag;
|
||||
}
|
||||
|
||||
uint32_t UserDisplayInfo::GamerScore()
|
||||
{
|
||||
return gamerscore;
|
||||
}
|
||||
|
||||
hstring UserDisplayInfo::ApplicationDisplayName()
|
||||
{
|
||||
return appDisplayName;
|
||||
}
|
||||
|
||||
hstring UserDisplayInfo::GameDisplayName()
|
||||
{
|
||||
return gameDisplayName;
|
||||
}
|
||||
|
||||
uint32_t UserDisplayInfo::Reputation()
|
||||
{
|
||||
return reputation;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::UserAgeGroup UserDisplayInfo::AgeGroup()
|
||||
{
|
||||
return ageGroup;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<uint32_t> UserDisplayInfo::Privileges()
|
||||
{
|
||||
return privileges;
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetPictureResult> UserDisplayInfo::GetApplicationPictureAsync(winrt::Windows::Xbox::System::UserPictureSize unk, winrt::Windows::Storage::Streams::IBuffer unka)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetApplicationPictureAsync");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
|
||||
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetPictureResult> UserDisplayInfo::GetGamerPictureAsync(winrt::Windows::Xbox::System::UserPictureSize unk, winrt::Windows::Storage::Streams::IBuffer unka)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetGamerPictureAsync");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
#include "Windows.Xbox.System.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::System::implementation
|
||||
{
|
||||
hstring GetTokenAndSignatureResult::Signature()
|
||||
{
|
||||
return signature;
|
||||
}
|
||||
|
||||
hstring GetTokenAndSignatureResult::Token()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::UserOnlineState OnlineStateChangedEventArgs::State()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
winrt::hresult GetPictureResult::Result()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t GetPictureResult::RequiredBufferSize()
|
||||
{
|
||||
return bufferSize;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User SignInCompletedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::SignOutDeferral SignOutStartedEventArgs::GetDeferral()
|
||||
{
|
||||
return deferral;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User SignOutStartedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
winrt::hresult SignOutCompletedEventArgs::Result()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
winrt::Windows::Xbox::System::User SignOutCompletedEventArgs::User()
|
||||
{
|
||||
return user;
|
||||
}
|
||||
|
||||
void SignOutDeferral::Complete()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user