mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-24 07:06:36 +00:00
Move font API to GpCommon
This commit is contained in:
@@ -115,7 +115,7 @@ void GpAppEnvironment::SetInputDrivers(IGpInputDriver *const* inputDrivers, size
|
||||
m_numInputDrivers = numDrivers;
|
||||
}
|
||||
|
||||
void GpAppEnvironment::SetFontHandler(PortabilityLayer::HostFontHandler *fontHandler)
|
||||
void GpAppEnvironment::SetFontHandler(IGpFontHandler *fontHandler)
|
||||
{
|
||||
m_fontHandler = fontHandler;
|
||||
}
|
||||
|
@@ -9,7 +9,6 @@
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
union HostSuspendCallArgument;
|
||||
class HostFontHandler;
|
||||
class HostVOSEventQueue;
|
||||
}
|
||||
|
||||
@@ -17,6 +16,7 @@ struct IGpDisplayDriver;
|
||||
struct IGpAudioDriver;
|
||||
struct IGpInputDriver;
|
||||
struct IGpFiber;
|
||||
struct IGpFontHandler;
|
||||
|
||||
class GpAppEnvironment
|
||||
{
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
void SetDisplayDriver(IGpDisplayDriver *displayDriver);
|
||||
void SetAudioDriver(IGpAudioDriver *audioDriver);
|
||||
void SetInputDrivers(IGpInputDriver *const* inputDrivers, size_t numDrivers);
|
||||
void SetFontHandler(PortabilityLayer::HostFontHandler *fontHandler);
|
||||
void SetFontHandler(IGpFontHandler *fontHandler);
|
||||
void SetVOSEventQueue(GpVOSEventQueue *eventQueue);
|
||||
|
||||
private:
|
||||
@@ -59,7 +59,7 @@ private:
|
||||
IGpDisplayDriver *m_displayDriver;
|
||||
IGpAudioDriver *m_audioDriver;
|
||||
IGpInputDriver *const* m_inputDrivers;
|
||||
PortabilityLayer::HostFontHandler *m_fontHandler;
|
||||
IGpFontHandler *m_fontHandler;
|
||||
GpVOSEventQueue *m_vosEventQueue;
|
||||
IGpFiber *m_applicationFiber;
|
||||
IGpFiber *m_vosFiber;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
PortabilityLayer::HostFontHandler *GpFontHandlerFactory::CreateFontHandler(const GpFontHandlerProperties &properties)
|
||||
IGpFontHandler *GpFontHandlerFactory::CreateFontHandler(const GpFontHandlerProperties &properties)
|
||||
{
|
||||
assert(properties.m_type < EGpFontHandlerType_Count);
|
||||
|
||||
|
@@ -2,19 +2,16 @@
|
||||
|
||||
#include "EGpFontHandlerType.h"
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class HostFontHandler;
|
||||
}
|
||||
struct IGpFontHandler;
|
||||
|
||||
struct GpFontHandlerProperties;
|
||||
|
||||
class GpFontHandlerFactory
|
||||
{
|
||||
public:
|
||||
typedef PortabilityLayer::HostFontHandler *(*FactoryFunc_t)(const GpFontHandlerProperties &properties);
|
||||
typedef IGpFontHandler *(*FactoryFunc_t)(const GpFontHandlerProperties &properties);
|
||||
|
||||
static PortabilityLayer::HostFontHandler *CreateFontHandler(const GpFontHandlerProperties &properties);
|
||||
static IGpFontHandler *CreateFontHandler(const GpFontHandlerProperties &properties);
|
||||
static void RegisterFontHandlerFactory(EGpFontHandlerType type, FactoryFunc_t func);
|
||||
|
||||
private:
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#include "GpAppEnvironment.h"
|
||||
#include "IGpAudioDriver.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpFontHandler.h"
|
||||
#include "IGpInputDriver.h"
|
||||
|
||||
#include <string.h>
|
||||
@@ -105,7 +106,7 @@ int GpMain::Run()
|
||||
|
||||
IGpDisplayDriver *displayDriver = GpDisplayDriverFactory::CreateDisplayDriver(ddProps);
|
||||
IGpAudioDriver *audioDriver = GpAudioDriverFactory::CreateAudioDriver(adProps);
|
||||
PortabilityLayer::HostFontHandler *fontHandler = GpFontHandlerFactory::CreateFontHandler(fontProps);
|
||||
IGpFontHandler *fontHandler = GpFontHandlerFactory::CreateFontHandler(fontProps);
|
||||
|
||||
appEnvironment->Init();
|
||||
|
||||
|
Reference in New Issue
Block a user