mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
Added missing TypeInfos to XFX::Input namespace
Updated function incorrect signatures in libXFX
This commit is contained in:
parent
7c5bc83237
commit
95bf1d7ebc
@ -10,6 +10,7 @@
|
||||
#include <System/Collections/Generic/Interfaces.h>
|
||||
#include <System/Delegates.h>
|
||||
#include <System/Interfaces.h>
|
||||
#include <System/Nullable.h>
|
||||
#include <System/TimeSpan.h>
|
||||
#include <System/Types.h>
|
||||
#include <Storage/StorageDevice.h>
|
||||
@ -47,7 +48,7 @@ namespace XFX
|
||||
static IAsyncResult* BeginShowStorageDeviceSelector(const PlayerIndex_t player, AsyncCallback callback, Object* state);
|
||||
static void DelayNotifications(const TimeSpan timespan);
|
||||
static String EndShowKeyboardInput(IAsyncResult* result);
|
||||
static int EndShowMessageBox(IAsyncResult* result);
|
||||
static Nullable<int> EndShowMessageBox(IAsyncResult* result);
|
||||
static StorageDevice EndShowStorageDeviceSelector(IAsyncResult* result);
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*****************************************************************************
|
||||
* Keyboard.h *
|
||||
* *
|
||||
* XFX::Input::Keyboard class definition file *
|
||||
* Copyright (c) XFX Team. All Rights Reserved *
|
||||
* XFX::Input::Keyboard class definition file. *
|
||||
* Copyright (c) XFX Team. All Rights Reserved. *
|
||||
*****************************************************************************/
|
||||
#ifndef _XFX_INPUT_KEYBOARD_
|
||||
#define _XFX_INPUT_KEYBOARD_
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <System/Runtime/InteropServices/ExternalException.h>
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Runtime::InteropServices;
|
||||
|
||||
namespace XFX
|
||||
|
@ -1,9 +1,9 @@
|
||||
/********************************************************
|
||||
/*****************************************************************************
|
||||
* ExternalException.h *
|
||||
* *
|
||||
* XFX ExternalException definition *
|
||||
* Copyright © XFX Team. All Rights Reserved *
|
||||
********************************************************/
|
||||
* System::Runtime::InteropServices::ExternalException definition file. *
|
||||
* Copyright (c) XFX Team. All Rights Reserved *
|
||||
*****************************************************************************/
|
||||
#ifndef _SYSTEM_RUNTIME_INTEROPSERVICES_ExternalException_
|
||||
#define _SYSTEM_RUNTIME_INTEROPSERVICES_ExternalException_
|
||||
|
||||
@ -15,15 +15,15 @@ namespace System
|
||||
{
|
||||
namespace InteropServices
|
||||
{
|
||||
/// <summary>
|
||||
/// The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.
|
||||
/// </summary>
|
||||
/**
|
||||
* The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.
|
||||
*/
|
||||
class ExternalException : public SystemException
|
||||
{
|
||||
public:
|
||||
ExternalException();
|
||||
ExternalException(char* message);
|
||||
ExternalException(char* message, Exception* inner);
|
||||
ExternalException(const String& message);
|
||||
ExternalException(const String& message, Exception * const inner);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -60,10 +60,12 @@ namespace XFX
|
||||
|
||||
ContentReader::~ContentReader()
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
Stream* ContentReader::PrepareStream(Stream * const, const String& assetName)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
Matrix ContentReader::ReadMatrix()
|
||||
|
@ -34,6 +34,7 @@ extern "C"
|
||||
#include <Input/GamePad.h>
|
||||
#include <System/Array.h>
|
||||
#include <System/String.h>
|
||||
#include <System/Type.h>
|
||||
|
||||
using namespace System;
|
||||
|
||||
@ -50,7 +51,12 @@ namespace XFX
|
||||
{
|
||||
namespace Input
|
||||
{
|
||||
GamePadState g_State;
|
||||
static GamePadState g_State;
|
||||
const Type GamePadDPadTypeInfo("GamePadDPad", "XFX::Input::GamePadDPad", TypeCode::Object);
|
||||
const Type GamePadButtonsTypeInfo("GamePadButtons", "XFX::Input::GamePadButtons", TypeCode::Object);
|
||||
const Type GamePadStateTypeInfo("GamePadState", "XFX::Input::GamePadState", TypeCode::Object);
|
||||
const Type GamePadThumbSticksTypeInfo("GamePadThumbSticks", "XFX::Input::GamePadThumbSticks", TypeCode::Object);
|
||||
const Type GamePadTriggersTypeInfo("GamePadTriggers", "XFX::Input::GamePadTriggers", TypeCode::Object);
|
||||
|
||||
GamePadState GamePad::GetState(const PlayerIndex_t playerIndex)
|
||||
{
|
||||
@ -136,9 +142,9 @@ namespace XFX
|
||||
return (((Buttons.GetHashCode() + DPad.GetHashCode()) ^ ThumbSticks.GetHashCode()) ^ Triggers.GetHashCode());
|
||||
}
|
||||
|
||||
int GamePadState::GetType()
|
||||
const Type& GamePadState::GetType()
|
||||
{
|
||||
// TODO: implement
|
||||
return GamePadStateTypeInfo;
|
||||
}
|
||||
|
||||
bool GamePadState::IsButtonDown(const Buttons_t button) const
|
||||
@ -194,6 +200,7 @@ namespace XFX
|
||||
case Buttons::Y:
|
||||
return Buttons.Y == ButtonState::Pressed;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -265,9 +272,9 @@ namespace XFX
|
||||
Start + White + X + Y);
|
||||
}
|
||||
|
||||
int GamePadButtons::GetType()
|
||||
const Type& GamePadButtons::GetType()
|
||||
{
|
||||
// TODO: implement
|
||||
return GamePadButtonsTypeInfo;
|
||||
}
|
||||
|
||||
const String GamePadButtons::ToString() const
|
||||
@ -367,9 +374,9 @@ namespace XFX
|
||||
return Down + Left + Right + Up;
|
||||
}
|
||||
|
||||
int GamePadDPad::GetType()
|
||||
const Type& GamePadDPad::GetType()
|
||||
{
|
||||
// TODO: implement
|
||||
return GamePadDPadTypeInfo;
|
||||
}
|
||||
|
||||
const String GamePadDPad::ToString() const
|
||||
@ -441,9 +448,9 @@ namespace XFX
|
||||
return Left.GetHashCode() ^ Right.GetHashCode();
|
||||
}
|
||||
|
||||
int GamePadThumbSticks::GetType()
|
||||
const Type& GamePadThumbSticks::GetType()
|
||||
{
|
||||
// TODO: implement
|
||||
return GamePadThumbSticksTypeInfo;
|
||||
}
|
||||
|
||||
const String GamePadThumbSticks::ToString() const
|
||||
@ -491,9 +498,9 @@ namespace XFX
|
||||
return (int)Left ^ (int)Right;
|
||||
}
|
||||
|
||||
int GamePadTriggers::GetType()
|
||||
const Type& GamePadTriggers::GetType()
|
||||
{
|
||||
// TODO: implement
|
||||
return GamePadTriggersTypeInfo;
|
||||
}
|
||||
|
||||
const String GamePadTriggers::ToString() const
|
||||
|
@ -45,14 +45,21 @@ namespace XFX
|
||||
IAsyncResult* Guide::BeginShowKeyboardInput(const PlayerIndex_t player, String& title, String& description, String& defaultText, AsyncCallback callback, Object* state)
|
||||
{
|
||||
if (String::IsNullOrEmpty(title))
|
||||
{
|
||||
title = String::Empty;
|
||||
}
|
||||
|
||||
if (String::IsNullOrEmpty(description))
|
||||
{
|
||||
description = String::Empty;
|
||||
}
|
||||
|
||||
if (String::IsNullOrEmpty(defaultText))
|
||||
{
|
||||
defaultText = String::Empty;
|
||||
}
|
||||
|
||||
// TODO: implement
|
||||
// just return null to stop warning until this thing's coded
|
||||
return null;
|
||||
}
|
||||
@ -60,48 +67,56 @@ namespace XFX
|
||||
IAsyncResult* Guide::BeginShowMessageBox(const PlayerIndex_t player, String& title, String& text, IEnumerable<String>* buttons, const int focusButton, const MessageBoxIcon_t icon, AsyncCallback callback, Object* state)
|
||||
{
|
||||
if (String::IsNullOrEmpty(title))
|
||||
{
|
||||
title = String::Empty;
|
||||
}
|
||||
|
||||
sassert(buttons != NULL, String::Format("buttons: %s", FrameworkResources::ArgumentNull_Generic));
|
||||
|
||||
// TODO: implement
|
||||
// just return null to stop warning until this thing's coded
|
||||
return null;
|
||||
}
|
||||
|
||||
IAsyncResult* Guide::BeginShowStorageDeviceSelector(const int sizeInBytes, const int directoryCount, AsyncCallback callback, Object* state)
|
||||
{
|
||||
// TODO: implement
|
||||
// just return null to stop warning until this thing's coded
|
||||
return null;
|
||||
}
|
||||
|
||||
IAsyncResult* Guide::BeginShowStorageDeviceSelector(AsyncCallback callback, Object* state)
|
||||
{
|
||||
// TODO: implement
|
||||
// just return null to stop warning until this thing's coded
|
||||
return null;
|
||||
}
|
||||
|
||||
IAsyncResult* Guide::BeginShowStorageDeviceSelector(const PlayerIndex_t player, const int sizeInBytes, const int directoryCount, AsyncCallback callback, Object* state)
|
||||
{
|
||||
// TODO: implement
|
||||
// just return null to stop warning until this thing's coded
|
||||
return null;
|
||||
}
|
||||
|
||||
IAsyncResult* Guide::BeginShowStorageDeviceSelector(const PlayerIndex_t player, AsyncCallback callback, Object* state)
|
||||
{
|
||||
// TODO: implement
|
||||
// just return null to stop warning until this thing's coded
|
||||
return null;
|
||||
}
|
||||
|
||||
const char* Guide::EndShowKeyboardInput(IAsyncResult* result)
|
||||
String Guide::EndShowKeyboardInput(IAsyncResult* result)
|
||||
{
|
||||
// TODO: implement
|
||||
// just return an empty string to stop warning until this thing's coded
|
||||
return "";
|
||||
}
|
||||
|
||||
int Guide::EndShowMessageBox(IAsyncResult* result)
|
||||
Nullable<int> Guide::EndShowMessageBox(IAsyncResult* result)
|
||||
{
|
||||
// Since C++ doesn't have a nullable type, we return -1, since it represents an invalid value anyways.
|
||||
return -1;
|
||||
// TODO: implement
|
||||
return NULL;
|
||||
}
|
||||
|
||||
StorageDevice Guide::EndShowStorageDeviceSelector(IAsyncResult* asyncResult)
|
||||
|
@ -47,27 +47,24 @@ namespace XFX
|
||||
|
||||
// Initializes the KeyboardState class
|
||||
KeyboardState::KeyboardState()
|
||||
: pressedKeys(NULL)
|
||||
{
|
||||
KeyboardState(null);
|
||||
}
|
||||
|
||||
// Initializes the KeyboardState class with the specified keys pressed
|
||||
KeyboardState::KeyboardState(Keys_t keys[])
|
||||
: pressedKeys(keys)
|
||||
{
|
||||
if (keys == null)
|
||||
pressedKeys = 0;
|
||||
else
|
||||
pressedKeys = keys;
|
||||
}
|
||||
|
||||
KeyboardState::KeyboardState(const KeyboardState &obj)
|
||||
: pressedKeys(obj.pressedKeys)
|
||||
{
|
||||
pressedKeys = obj.pressedKeys;
|
||||
}
|
||||
|
||||
Keys_t* KeyboardState::GetPressedKeys()
|
||||
{
|
||||
return (Keys_t*)pressedKeys;
|
||||
return pressedKeys;
|
||||
}
|
||||
|
||||
// Returns whether the specified key is currently pressed
|
||||
@ -79,8 +76,10 @@ namespace XFX
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//The keyboard was not connected...bail out.
|
||||
return -1;
|
||||
}
|
||||
@ -94,8 +93,10 @@ namespace XFX
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// The keyboard was not connected...bail out.
|
||||
return -1;
|
||||
}
|
||||
|
@ -67,25 +67,49 @@ namespace XFX
|
||||
XMOUSE_current.y = 0;
|
||||
|
||||
if((XMOUSE_current.buttons & XMOUSE_BUTTON_1))
|
||||
{
|
||||
result.LeftButton = ButtonState::Pressed;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.LeftButton = ButtonState::Released;
|
||||
}
|
||||
|
||||
if((XMOUSE_current.buttons & XMOUSE_BUTTON_3))
|
||||
{
|
||||
result.MiddleButton = ButtonState::Pressed;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.MiddleButton = ButtonState::Released;
|
||||
}
|
||||
|
||||
if((XMOUSE_current.buttons & XMOUSE_BUTTON_2))
|
||||
{
|
||||
result.RightButton = ButtonState::Pressed;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.RightButton = ButtonState::Released;
|
||||
}
|
||||
|
||||
if((XMOUSE_current.buttons & XMOUSE_BUTTON_4))
|
||||
{
|
||||
result.XButton1 = ButtonState::Pressed;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.XButton1 = ButtonState::Released;
|
||||
}
|
||||
|
||||
if((XMOUSE_current.buttons & XMOUSE_BUTTON_5))
|
||||
{
|
||||
result.XButton2 = ButtonState::Pressed;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.XButton2 = ButtonState::Released;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -94,6 +118,8 @@ namespace XFX
|
||||
{
|
||||
result.X = x;
|
||||
result.Y = y;
|
||||
|
||||
// TODO: update 'hardware' cursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ namespace XFX
|
||||
|
||||
SoundEffect* SoundEffect::FromStream(Stream * const stream)
|
||||
{
|
||||
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
const Type& SoundEffect::GetType()
|
||||
|
@ -38,34 +38,42 @@ namespace XFX
|
||||
|
||||
bool SoundEffectInstance::IsDisposed() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
bool SoundEffectInstance::IsLooped() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::IsLooped(bool value)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
float SoundEffectInstance::getPan() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::setPan(float value)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
float SoundEffectInstance::getPitch() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::setPitch(float value)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
SoundState_t SoundEffectInstance::getState() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
float SoundEffectInstance::getVolume() const
|
||||
@ -75,6 +83,7 @@ namespace XFX
|
||||
|
||||
void SoundEffectInstance::setVolume(float value)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
SoundEffectInstance::SoundEffectInstance(SoundEffect * const parent, bool fireAndForget)
|
||||
@ -90,10 +99,12 @@ namespace XFX
|
||||
|
||||
void SoundEffectInstance::Apply3D(AudioListener listener, AudioEmitter emitter)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::Apply3D(AudioListener listeners[], AudioEmitter emitter)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::Dispose()
|
||||
@ -116,14 +127,17 @@ namespace XFX
|
||||
|
||||
void SoundEffectInstance::Pause()
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::Play()
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::Resume()
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void SoundEffectInstance::Stop()
|
||||
@ -133,6 +147,7 @@ namespace XFX
|
||||
|
||||
void SoundEffectInstance::Stop(bool immediate)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -125,9 +125,11 @@ namespace XFX
|
||||
isDisposed = true;
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
Disposing(this, EventArgs::Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const String StorageContainer::Path() const
|
||||
{
|
||||
|
@ -38,14 +38,17 @@ namespace XFX
|
||||
{
|
||||
long long StorageDevice::FreeSpace() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
bool StorageDevice::IsConnected() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
long long StorageDevice::TotalSpace() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
StorageDevice::StorageDevice(uint deviceIndex, PlayerIndex_t playerIndex)
|
||||
@ -58,6 +61,7 @@ namespace XFX
|
||||
{
|
||||
sassert(!String::IsNullOrEmpty(titleName), "titleName cannot be null.");
|
||||
|
||||
// TODO: implement
|
||||
//return new StorageContainer(this, titleName, _deviceIndex, _playerIndex);
|
||||
}
|
||||
}
|
||||
|
@ -12,10 +12,11 @@ namespace XFX
|
||||
|
||||
bool StorageDeviceAsyncResult::CompletedSynchronously()
|
||||
{
|
||||
// TODO: implement
|
||||
return true;
|
||||
}
|
||||
|
||||
StorageDeviceAsyncResult::StorageDeviceAsyncResult(Object* stateObject, int player)
|
||||
StorageDeviceAsyncResult::StorageDeviceAsyncResult(Object * const stateObject, int player)
|
||||
{
|
||||
syncObject = stateObject;
|
||||
playerIndex = player;
|
||||
@ -29,7 +30,7 @@ namespace XFX
|
||||
|
||||
StorageDeviceAsyncResult::StorageDeviceAsyncResult(IAsyncResult* &obj)
|
||||
{
|
||||
|
||||
// TODO: implement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <Storage/StorageDeviceNotConnectedException.h>
|
||||
#include <System/String.h>
|
||||
|
||||
namespace XFX
|
||||
{
|
||||
@ -36,12 +37,12 @@ namespace XFX
|
||||
{
|
||||
}
|
||||
|
||||
StorageDeviceNotConnectedException::StorageDeviceNotConnectedException(char* message)
|
||||
StorageDeviceNotConnectedException::StorageDeviceNotConnectedException(const String& message)
|
||||
: ExternalException(message)
|
||||
{
|
||||
}
|
||||
|
||||
StorageDeviceNotConnectedException::StorageDeviceNotConnectedException(char* message, Exception* innerException)
|
||||
StorageDeviceNotConnectedException::StorageDeviceNotConnectedException(const String& message, Exception * const innerException)
|
||||
: ExternalException(message, innerException)
|
||||
{
|
||||
}
|
||||
|
@ -34,24 +34,29 @@ namespace XFX
|
||||
{
|
||||
const Type VideoTypeInfo("Video", "XFX::Media::Video", TypeCode::Object);
|
||||
|
||||
TimeSpan Video::getDuration()
|
||||
TimeSpan Video::getDuration() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
float Video::getFramesPerSecond()
|
||||
float Video::getFramesPerSecond() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
int Video::getHeight()
|
||||
int Video::getHeight() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
VideoSoundtrackType_t Video::getVideoSoundtrackType()
|
||||
VideoSoundtrackType_t Video::getVideoSoundtrackType() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
int Video::getWidth()
|
||||
int Video::getWidth() const
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
const Type& Video::GetType()
|
||||
|
Loading…
x
Reference in New Issue
Block a user