ScummVM API documentation
OSystem_iOS7 Class Reference
Inheritance diagram for OSystem_iOS7:
ModularGraphicsBackend EventsBaseBackend BaseBackend BaseBackend Common::EventSource OSystem OSystem Common::NonCopyable Common::NonCopyable

Public Member Functions

void initBackend () override
 
void engineInit () override
 
void engineDone () override
 
void taskStarted (Task) override
 
void taskFinished (Task) override
 
void updateStartSettings (const Common::String &executable, Common::String &command, Common::StringMap &settings, Common::StringArray &additionalArgs) override
 
bool hasFeature (Feature f) override
 
void setFeatureState (Feature f, bool enable) override
 
bool getFeatureState (Feature f) override
 
bool setGraphicsMode (int mode, uint flags) override
 
TouchMode getCurrentTouchMode () const
 
void setCurrentTouchMode (TouchMode mode)
 
void applyTouchSettings (bool _3dMode, bool overlayShown)
 
uint createOpenGLContext ()
 
void destroyOpenGLContext ()
 
void refreshScreen () const
 
int getScreenWidth () const
 
int getScreenHeight () const
 
float getSystemHiDPIScreenFactor () const
 
bool pollEvent (Common::Event &event) override
 
uint32 getMillis (bool skipRecord=false) override
 
void delayMillis (uint msecs) override
 
Common::MutexInternalcreateMutex () override
 
virtual void setupMixer (void)
 
virtual void setTimerCallback (TimerProc callback, int interval)
 
void quit () override
 
void addSysArchivesToSearchSet (Common::SearchSet &s, int priority=0) override
 
void getTimeAndDate (TimeDate &td, bool skipRecord=false) const override
 
Common::HardwareInputSetgetHardwareInputSet () override
 
Audio::MixergetMixer () override
 
void startSoundsystem ()
 
void stopSoundsystem ()
 
Common::Path getDefaultConfigFileName () override
 
void logMessage (LogMessageType::Type type, const char *message) override
 
void fatalError () override
 
bool hasTextInClipboard () override
 
Common::U32String getTextFromClipboard () override
 
bool setTextInClipboard (const Common::U32String &text) override
 
bool openUrl (const Common::String &url) override
 
const char *const * buildHelpDialogData () override
 
Common::String getSystemLanguage () const override
 
bool isConnectionLimited () override
 
void virtualController (bool connect)
 
bool isiOSAppOnMac () const
 
virtual Common::Path getDefaultLogFileName () override
 
virtual GUI::OptionsContainerWidgetbuildBackendOptionsWidget (GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override
 
virtual void applyBackendSettings () override
 
virtual void registerDefaultSettings (const Common::String &target) const override
 
- Public Member Functions inherited from ModularGraphicsBackend
GraphicsManagergetGraphicsManager ()
 
const GraphicsModegetSupportedGraphicsModes () const override
 
int getDefaultGraphicsMode () const override
 
int getGraphicsMode () const override
 
bool setShader (const Common::Path &name) override final
 
const GraphicsModegetSupportedStretchModes () const override final
 
int getDefaultStretchMode () const override final
 
bool setStretchMode (int mode) override final
 
int getStretchMode () const override final
 
uint getDefaultScaler () const override final
 
uint getDefaultScaleFactor () const override final
 
bool setScaler (uint mode, int factor) override final
 
uint getScaler () const override final
 
uint getScaleFactor () const override final
 
void initSize (uint width, uint height, const Graphics::PixelFormat *format=NULL) override final
 
void initSizeHint (const Graphics::ModeList &modes) override final
 
int getScreenChangeID () const override final
 
void beginGFXTransaction () override final
 
OSystem::TransactionError endGFXTransaction () override final
 
int16 getHeight () override final
 
int16 getWidth () override final
 
PaletteManagergetPaletteManager () override final
 
void copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) override final
 
Graphics::SurfacelockScreen () override final
 
void unlockScreen () override final
 
void fillScreen (uint32 col) override final
 
void fillScreen (const Common::Rect &r, uint32 col) override final
 
void updateScreen () override final
 
void setShakePos (int shakeXOffset, int shakeYOffset) override final
 
void setFocusRectangle (const Common::Rect &rect) override final
 
void clearFocusRectangle () override final
 
void showOverlay (bool inGUI) override final
 
void hideOverlay () override final
 
bool isOverlayVisible () const override final
 
Graphics::PixelFormat getOverlayFormat () const override final
 
void clearOverlay () override final
 
void grabOverlay (Graphics::Surface &surface) override final
 
void copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override final
 
int16 getOverlayHeight () override final
 
int16 getOverlayWidth () override final
 
float getHiDPIScreenFactor () const override final
 
bool showMouse (bool visible) override final
 
void warpMouse (int x, int y) override final
 
void setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=NULL, const byte *mask=NULL) override final
 
void setCursorPalette (const byte *colors, uint start, uint num) override final
 
bool lockMouse (bool lock) override final
 
void displayMessageOnOSD (const Common::U32String &msg) override final
 
void displayActivityIconOnOSD (const Graphics::Surface *icon) override final
 
void saveScreenshot () override final
 
- Public Member Functions inherited from BaseBackend
bool setScaler (const char *name, int factor) override final
 
- Public Member Functions inherited from OSystem
void destroy ()
 
virtual void init ()
 
bool backendInitialized () const
 
bool setGraphicsMode (const char *name)
 
Graphics::PixelFormat getScreenFormat () const
 
Common::List< Graphics::PixelFormatgetSupportedFormats () const
 
virtual Common::Array< uint > getSupportedAntiAliasingLevels () const
 
virtual OpenGL::ContextType getOpenGLType () const
 
bool setStretchMode (const char *name)
 
virtual uint32 getDoubleClickTime () const
 
virtual Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
virtual Common::KeymapArray getGlobalKeymaps ()
 
virtual Common::KeymapperDefaultBindingsgetKeymapperDefaultBindings ()
 
AudioCDManagergetAudioCDManager ()
 
virtual void setWindowCaption (const Common::U32String &caption)
 
virtual Common::SaveFileManagergetSavefileManager ()
 
virtual Common::TextToSpeechManagergetTextToSpeechManager ()
 
virtual Common::DialogManagergetDialogManager ()
 
virtual DLC::StoregetDLCStore ()
 
virtual FilesystemFactorygetFilesystemFactory ()
 
virtual Common::SeekableReadStreamcreateConfigReadStream ()
 
virtual Common::WriteStreamcreateConfigWriteStream ()
 
virtual void messageBox (LogMessageType::Type type, const char *message)
 
virtual bool displayLogFile ()
 

Static Public Member Functions

static OSystem_iOS7sharedInstance ()
 
static void mixCallback (void *sys, byte *samples, int len)
 

Protected Member Functions

void updateOutputSurface ()
 
void updateTouchMode ()
 
void setShowKeyboard (bool)
 
bool isKeyboardShown () const
 
void suspendLoop ()
 
void saveState ()
 
void restoreState ()
 
void clearState ()
 
bool handleEvent_swipe (Common::Event &event, int direction, int touches)
 
bool handleEvent_tap (Common::Event &event, UIViewTapDescription type, int touches)
 
bool handleEvent_longPress (Common::Event &event, UIViewLongPressDescription type, int touches)
 
void handleEvent_keyPressed (Common::Event &event, int keyPressed, int modifierFlags)
 
void handleEvent_orientationChanged (int orientation)
 
void handleEvent_touchModeChanged ()
 
void handleEvent_applicationSuspended ()
 
void handleEvent_applicationResumed ()
 
void handleEvent_applicationSaveState ()
 
void handleEvent_applicationRestoreState ()
 
void handleEvent_applicationClearState ()
 
bool handleEvent_touchBegan (Common::Event &event, int x, int y)
 
bool handleEvent_touchMoved (Common::Event &event, int x, int y)
 
void handleEvent_mouseLeftButtonDown (Common::Event &event, int x, int y)
 
void handleEvent_mouseLeftButtonUp (Common::Event &event, int x, int y)
 
void handleEvent_mouseRightButtonDown (Common::Event &event, int x, int y)
 
void handleEvent_mouseRightButtonUp (Common::Event &event, int x, int y)
 
void handleEvent_mouseDelta (Common::Event &event, int deltaX, int deltaY)
 
void handleEvent_mouseEvent (Common::Event &event, int relX, int relY)
 
void rebuildSurface ()
 
float getMouseSpeed ()
 

Static Protected Member Functions

static void AQBufferCallback (void *in, AudioQueueRef inQ, AudioQueueBufferRef outQB)
 
static int timerHandler (int t)
 

Protected Attributes

Audio::MixerImpl_mixer
 
CFTimeInterval _startTime
 
int _runningTasks
 
long _lastMouseDown
 
long _queuedEventTime
 
Common::Event _queuedInputEvent
 
TouchMode _currentTouchMode
 
int _lastPadX
 
int _lastPadY
 
ScreenOrientation _screenOrientation
 
Common::String _lastErrorMessage
 
Common::String _chrootBasePath
 
- Protected Attributes inherited from ModularGraphicsBackend
GraphicsManager_graphicsManager
 
- Protected Attributes inherited from OSystem
AudioCDManager_audiocdManager
 
Common::EventManager_eventManager
 
Common::TimerManager_timerManager
 
Common::SaveFileManager_savefileManager
 
Common::TextToSpeechManager_textToSpeechManager
 
Common::DialogManager_dialogManager
 
FilesystemFactory_fsFactory
 
DLC::Store_dlcStore
 
Common::U32String _clipboard
 
bool _dummyUnused
 

Static Protected Attributes

static AQCallbackStruct s_AudioQueue
 
static SoundProc s_soundCallback
 
static void * s_soundParam
 

Additional Inherited Members

- Public Types inherited from OSystem
enum  Task { kLocalServer, kCloudDownload, kDataPackDownload }
 
enum  Feature {
  kFeatureFullscreenMode, kFeatureAspectRatioCorrection, kFeatureFilteringMode, kFeatureStretchMode,
  kFeatureVirtualKeyboard, kFeatureCursorPalette, kFeatureCursorAlpha, kFeatureCursorMask,
  kFeatureCursorMaskInvert, kFeatureCursorMaskPaletteXorColorXnor, kFeatureOverlaySupportsAlpha, kFeatureIconifyWindow,
  kFeatureOpenGLForGame, kFeatureShadersForGame, kFeatureVSync, kFeatureFullscreenToggleKeepsContext,
  kFeatureDisplayLogFile, kFeatureClipboardSupport, kFeatureOpenUrl, kFeatureTouchpadMode,
  kFeatureKbdMouseSpeed, kFeatureJoystickDeadzone, kFeatureScalers, kFeatureShaders,
  kFeatureDLC, kFeatureSystemBrowserDialog, kFeatureNoQuit, kFeatureTouchscreen,
  kFeatureCpuNEON, kFeatureCpuSSE2, kFeatureCpuSSE41, kFeatureCpuAVX2,
  kFeatureCpuAltivec
}
 
enum  GfxModeFlags { kGfxModeNoFlags = 0, kGfxModeRender3d = (1 << 0) }
 
enum  TransactionError {
  kTransactionSuccess = 0, kTransactionAspectRatioFailed = (1 << 0), kTransactionFullscreenFailed = (1 << 1), kTransactionModeSwitchFailed = (1 << 2),
  kTransactionSizeChangeFailed = (1 << 3), kTransactionFormatNotSupported = (1 << 4), kTransactionFilteringFailed = (1 << 5), kTransactionStretchModeSwitchFailed = (1 << 6),
  kTransactionShaderChangeFailed = (1 << 7), kTransactionVSyncFailed = (1 << 8)
}
 

Member Function Documentation

◆ initBackend()

void OSystem_iOS7::initBackend ( )
overridevirtual

The following method is called once, from main.cpp, after all config data (including command line params etc.) is fully loaded.

Note
Subclasses should always invoke the implementation of their parent class. They should do so near the end of their own implementation.

Reimplemented from EventsBaseBackend.

◆ engineInit()

void OSystem_iOS7::engineInit ( void  )
overridevirtual

Allow the backend to perform engine-specific initialization.

Called just before the engine is run.

Reimplemented from OSystem.

◆ engineDone()

void OSystem_iOS7::engineDone ( )
overridevirtual

Allow the backend to perform engine-specific deinitialization.

Called after the engine finishes.

Reimplemented from OSystem.

◆ taskStarted()

void OSystem_iOS7::taskStarted ( Task  )
overridevirtual

Allow the backend to be notified when a task is started.

Reimplemented from OSystem.

◆ taskFinished()

void OSystem_iOS7::taskFinished ( Task  )
overridevirtual

Allow the backend to be notified when a task is finished.

Reimplemented from OSystem.

◆ updateStartSettings()

void OSystem_iOS7::updateStartSettings ( const Common::String executable,
Common::String command,
Common::StringMap startSettings,
Common::StringArray additionalArgs 
)
overridevirtual

Allow the backend to customize the start settings, such as for example starting automatically a game under certain circumstances.

This function is called after the command line parameters have been parsed, and thus the initial value of command and settings will reflect those.

The default implementation checks if the executable name is "scummvm-auto" or if a file named "scummvm-autorun" sits next to it to enable autorun mode.

Reimplemented from OSystem.

◆ hasFeature()

bool OSystem_iOS7::hasFeature ( Feature  f)
overridevirtual

Determine whether the backend supports the specified feature.

Reimplemented from ModularGraphicsBackend.

◆ setFeatureState()

void OSystem_iOS7::setFeatureState ( Feature  f,
bool  enable 
)
overridevirtual

Enable or disable the specified feature.

For example, this may be used to enable fullscreen mode or to deactivate aspect correction, etc.

Reimplemented from ModularGraphicsBackend.

◆ getFeatureState()

bool OSystem_iOS7::getFeatureState ( Feature  f)
overridevirtual

Query the state of the specified feature.

For example, test whether fullscreen mode is active or not.

Reimplemented from ModularGraphicsBackend.

◆ setGraphicsMode()

bool OSystem_iOS7::setGraphicsMode ( int  mode,
uint  flags 
)
overridevirtual

Switch to the specified graphics mode.

If switching to the new mode fails, this method returns false.

The flag 'kGfxModeRender3d' is optional. It allows to switch to 3D-only rendering mode. In this mode, the game engine is allowed to use OpenGL(ES) directly.

Parameters
modeID of the new graphics mode.
flagsFlags for the new graphics mode.
Returns
True if the switch was successful, false otherwise.

Reimplemented from ModularGraphicsBackend.

◆ pollEvent()

bool OSystem_iOS7::pollEvent ( Common::Event event)
overridevirtual

Query an event from the source.

Parameters
eventReference to the event struct where the event should be stored.
Return values
trueIf an event was polled, false otherwise.

Implements Common::EventSource.

◆ getMillis()

uint32 OSystem_iOS7::getMillis ( bool  skipRecord = false)
overridevirtual

Get the number of milliseconds since the program was started.

Parameters
skipRecordSkip recording of this value by the event recorder. This might be needed particularly when we are in an on-screen GUI loop where the player can pause the recording.

Implements OSystem.

◆ delayMillis()

void OSystem_iOS7::delayMillis ( uint  msecs)
overridevirtual

Delay/sleep for the specified amount of milliseconds.

Implements OSystem.

◆ createMutex()

Common::MutexInternal* OSystem_iOS7::createMutex ( )
overridevirtual

Create a new mutex.

Returns
The newly created mutex, or 0 if an error occurred.

Implements OSystem.

◆ quit()

void OSystem_iOS7::quit ( )
overridevirtual

Quit (exit) the application.

Implements OSystem.

◆ addSysArchivesToSearchSet()

void OSystem_iOS7::addSysArchivesToSearchSet ( Common::SearchSet s,
int  priority = 0 
)
overridevirtual

Add system-specific Common::Archive objects to the given SearchSet. For example, on Unix, the directory corresponding to DATA_PATH (if set), or, on macOS, the 'Resource' dir in the app bundle.

Parameters
sSearchSet to which the system-specific dirs, if any, are added.
priorityPriority with which those dirs are added.

Reimplemented from OSystem.

◆ getTimeAndDate()

void OSystem_iOS7::getTimeAndDate ( TimeDate td,
bool  skipRecord = false 
) const
overridevirtual

Get the current time and date, in the local timezone.

On many systems, this corresponds to the combination of time() and localtime().

Implements OSystem.

◆ getHardwareInputSet()

Common::HardwareInputSet* OSystem_iOS7::getHardwareInputSet ( )
overridevirtual

Register hardware inputs with keymapper.

Returns
HardwareInputSet with all keys and recommended mappings.

For more information, see keymapper.

Reimplemented from OSystem.

◆ getMixer()

Audio::Mixer* OSystem_iOS7::getMixer ( )
overridevirtual

Return the audio mixer.

For more information, see Audio::Mixer.

Implements OSystem.

◆ getDefaultConfigFileName()

Common::Path OSystem_iOS7::getDefaultConfigFileName ( )
overridevirtual

Get the default file name (or even path) where the user configuration of ScummVM will be saved.

Note that not all ports can use this.

Reimplemented from OSystem.

◆ logMessage()

void OSystem_iOS7::logMessage ( LogMessageType::Type  type,
const char *  message 
)
overridevirtual

Log the given message.

It is up to the backend where to log the different messages. The backend should aim at using a non-buffered output for it, so that no log data is lost in case of a crash.

The default implementation outputs them on stdout/stderr.

Parameters
typeType of the message.
messageThe message itself.

Implements OSystem.

◆ fatalError()

void OSystem_iOS7::fatalError ( )
overridevirtual

Signal that a fatal error inside the client code has occurred.

This should quit the application.

Reimplemented from OSystem.

◆ hasTextInClipboard()

bool OSystem_iOS7::hasTextInClipboard ( )
overridevirtual

Check whether there is text available in the clipboard.

The kFeatureClipboardSupport feature flag can be used to test whether this call has been implemented by the active backend.

Returns
True if there is text in the clipboard, false otherwise.

Reimplemented from OSystem.

◆ getTextFromClipboard()

Common::U32String OSystem_iOS7::getTextFromClipboard ( )
overridevirtual

Return clipboard contents as a string.

The kFeatureClipboardSupport feature flag can be used to test whether this call has been implemented by the active backend.

Returns
clipboard contents ("" if hasTextInClipboard() == false).

Reimplemented from OSystem.

◆ setTextInClipboard()

bool OSystem_iOS7::setTextInClipboard ( const Common::U32String text)
overridevirtual

Set the content of the clipboard to the given string.

The kFeatureClipboardSupport feature flag can be used to test whether this call has been implemented by the active backend.

Returns
True if the text has been properly set in the clipboard, false otherwise.

Reimplemented from OSystem.

◆ openUrl()

bool OSystem_iOS7::openUrl ( const Common::String url)
overridevirtual

Open the given URL in the default browser (if available on the target system).

Returns
True on success, false otherwise.
Note
It is up to the backend to ensure that the system is in a state that allows the user to actually see the web page. This might for example require leaving fullscreen mode.
Parameters
urlThe URL to open.

Reimplemented from OSystem.

◆ buildHelpDialogData()

const char* const* OSystem_iOS7::buildHelpDialogData ( )
overridevirtual

Return list of strings used for building help dialog

The strings represented in triplets:

  • Name of a tab (will be translated)
  • ZIP pack name with images (optional)
  • Text of the tab with Markdown formatting (also be translated)

The string list is null-terminated.

Reimplemented from OSystem.

◆ getSystemLanguage()

Common::String OSystem_iOS7::getSystemLanguage ( ) const
overridevirtual

Return the language of the system.

This returns the currently set language of the system on which ScummVM is run.

The format is an ISO 639 language code, optionally followed by an ISO 3166-1 country code in the form language_country.

For information about POSIX locales, see the following link: https://en.wikipedia.org/wiki/ISO_639 https://en.wikipedia.org/wiki/ISO_3166-1

The default implementation returns "en_US".

Returns
Locale of the system.

Reimplemented from OSystem.

◆ isConnectionLimited()

bool OSystem_iOS7::isConnectionLimited ( )
overridevirtual

Return whether the connection is limited (if available on the target system).

Returns
True if the connection is limited.

Reimplemented from OSystem.

◆ getDefaultLogFileName()

virtual Common::Path OSystem_iOS7::getDefaultLogFileName ( )
inlineoverridevirtual

Get the default file name (or even path) where the scummvm.log will be saved.

Note that not all ports can use this.

Reimplemented from OSystem.

◆ buildBackendOptionsWidget()

virtual GUI::OptionsContainerWidget* OSystem_iOS7::buildBackendOptionsWidget ( GUI::GuiObject boss,
const Common::String name,
const Common::String target 
) const
overridevirtual

Return a GUI widget container for configuring the specified target options.

The returned widget is shown in the Backend tab in the options dialog. Backends can build custom options dialogs.

Backends that don't want to have a Backend tab in the options dialog can return nullptr.

Parameters
bossthe widget / dialog the returned widget is a child of
namethe name the returned widget must use
targetname of a config manager target

Reimplemented from OSystem.

◆ applyBackendSettings()

virtual void OSystem_iOS7::applyBackendSettings ( )
overridevirtual

Notify the backend that the settings editable from the game tab in the options dialog may have changed and that they need to be applied if necessary.

Reimplemented from OSystem.

◆ registerDefaultSettings()

virtual void OSystem_iOS7::registerDefaultSettings ( const Common::String target) const
overridevirtual

Register the default values for the settings the backend uses into the configuration manager.

Parameters
targetname of a config manager target

Reimplemented from OSystem.


The documentation for this class was generated from the following file: