#include <C4App.h>
Public Member Functions | |
C4AbstractApp () | |
~C4AbstractApp () override | |
virtual void | Clear () |
bool | Init (int argc, char *argv[]) |
void | Run () |
virtual void | Quit () |
bool | GetIndexedDisplayMode (int32_t iIndex, int32_t *piXRes, int32_t *piYRes, int32_t *piBitDepth, int32_t *piRefreshRate, uint32_t iMonitor) |
bool | SetVideoMode (int iXRes, int iYRes, unsigned int iRefreshRate, unsigned int iMonitor, bool fFullScreen) |
void | RestoreVideoMode () |
bool | DoScheduleProcs (int iTimeout) override |
bool | FlushMessages () |
bool | Copy (const std::string &text, bool fClipboard=true) |
std::string | Paste (bool fClipboard=true) |
bool | IsClipboardFull (bool fClipboard=true) |
virtual void | OnCommand (const char *szCmd)=0 |
virtual void | OnResolutionChanged (unsigned int iXRes, unsigned int iYRes)=0 |
virtual void | OnKeyboardLayoutChanged ()=0 |
void | NotifyUserIfInactive () |
void | MessageDialog (const char *message) |
const char * | GetLastError () |
void | Error (const char *m) |
bool | AssertMainThread () |
int | getProcCnt () const |
bool | hasProc (StdSchedulerProc *pProc) |
bool | IsInManualLoop () |
void | Set (StdSchedulerProc **ppProcs, int iProcCnt) |
void | Add (StdSchedulerProc *pProc) |
void | Remove (StdSchedulerProc *pProc) |
void | Added (StdSchedulerProc *pProc) |
void | Removing (StdSchedulerProc *pProc) |
void | Changed (StdSchedulerProc *pProc) |
void | StartOnCurrentThread () |
C4TimeMilliseconds | GetNextTick (C4TimeMilliseconds tNow) |
bool | ScheduleProcs (int iTimeout=1000/36) |
void | UnBlock () |
Public Attributes | |
bool | Active {false} |
C4Window * | pWindow {nullptr} |
bool | fQuitMsgReceived {false} |
pthread_t | MainThread |
Protected Member Functions | |
virtual bool | DoInit (int argc, char *argv[])=0 |
virtual void | OnError (StdSchedulerProc *) |
Protected Attributes | |
std::string | sLastError |
bool | fDspModeSet {false} |
Friends | |
class | CStdGL |
class | CStdGLCtx |
class | C4Window |
class | C4GtkWindow |
C4AbstractApp::C4AbstractApp | ( | ) |
Definition at line 72 of file C4AppSDL.cpp.
|
overridedefault |
Definition at line 40 of file C4AppT.cpp.
References StdScheduler::Remove().
|
inherited |
Definition at line 84 of file StdScheduler.cpp.
References StdScheduler::Added().
Referenced by C4GameLobby::ScenDesc::Activate(), C4GameOptionsList::Activate(), C4Network2ResDlg::Activate(), StdSchedulerThread::Add(), C4GameOverDlg::C4GameOverDlg(), C4GameSec1Timer::C4GameSec1Timer(), C4InteractiveThread::C4InteractiveThread(), C4Network2ClientListBox::C4Network2ClientListBox(), C4Network2ClientListDlg::C4Network2ClientListDlg(), C4Network2Stats::C4Network2Stats(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupModsDownloader::C4StartupModsDownloader(), C4StartupNetDlg::C4StartupNetDlg(), C4GameLobby::Countdown::Countdown(), C4Application::DoInit(), C4GUI::InfoDialog::InfoDialog(), C4Network2::InitHost(), C4Network2::InitialConnect::InitialConnect(), C4Network2::InitLeague(), C4AulDebug::Listen(), C4GameLobby::MainDlg::MainDlg(), StdScheduler::Set(), C4Network2::StartStreaming(), and StdScheduler::StdScheduler().
|
inherited |
Definition at line 281 of file StdSchedulerMac.mm.
References SCHAdditions::assignAdditionForProc:, and SCHAdditions::requestAdditionsForScheduler:.
Referenced by StdScheduler::Add().
|
inline |
Definition at line 123 of file C4App.h.
References MainThread.
Referenced by Log(), LogSilent(), C4Surface::PageFlip(), CStdGL::PrepareRendering(), and ShaderLog().
|
inherited |
Definition at line 294 of file StdSchedulerMac.mm.
References SCHAdditions::additionForProc:, SCHAddition::changed, and SCHAdditions::requestAdditionsForScheduler:.
|
virtual |
Reimplemented in C4Application.
Definition at line 105 of file C4AppSDL.cpp.
Referenced by C4Application::Clear().
bool C4AbstractApp::Copy | ( | const std::string & | text, |
bool | fClipboard = true |
||
) |
Definition at line 34 of file C4AppMac.mm.
References Log(), and C4ScriptGuiWindowPropertyName::text.
Referenced by C4GUI::MessageDialog::KeyCopy().
|
protectedpure virtual |
|
overridevirtual |
Reimplemented from StdScheduler.
Definition at line 59 of file C4App.cpp.
References StdScheduler::DoScheduleProcs(), FlushMessages(), and fQuitMsgReceived.
|
inline |
Definition at line 99 of file C4App.h.
References sLastError.
Referenced by C4Draw::Error(), and SetVideoMode().
bool C4AbstractApp::FlushMessages | ( | ) |
Definition at line 115 of file C4AppSDL.cpp.
References fQuitMsgReceived.
Referenced by DoScheduleProcs(), C4Network2::FinalInit(), and C4Game::SetInitProgress().
bool C4AbstractApp::GetIndexedDisplayMode | ( | int32_t | iIndex, |
int32_t * | piXRes, | ||
int32_t * | piYRes, | ||
int32_t * | piBitDepth, | ||
int32_t * | piRefreshRate, | ||
uint32_t | iMonitor | ||
) |
Definition at line 335 of file C4AppSDL.cpp.
Referenced by C4Application::ApplyResolutionConstraints().
|
inline |
|
inherited |
Definition at line 120 of file StdScheduler.cpp.
References C4TimeMilliseconds::PositiveInfinity.
Referenced by Run(), and StdScheduler::ScheduleProcs().
|
inlineinherited |
Definition at line 245 of file StdScheduler.h.
Referenced by C4InteractiveThread::AddProc(), and C4InteractiveThread::RemoveProc().
|
inlineinherited |
Definition at line 246 of file StdScheduler.h.
Referenced by C4InteractiveThread::RemoveProc().
bool C4AbstractApp::Init | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 87 of file C4AppSDL.cpp.
References DoInit(), and LogF().
Referenced by main().
bool C4AbstractApp::IsClipboardFull | ( | bool | fClipboard = true | ) |
Definition at line 58 of file C4AppMac.mm.
Referenced by C4GUI::Edit::OnContext().
|
inlineinherited |
Definition at line 247 of file StdScheduler.h.
void C4AbstractApp::MessageDialog | ( | const char * | message | ) |
Definition at line 63 of file C4AppMac.mm.
Referenced by C4Application::DoInit().
void C4AbstractApp::NotifyUserIfInactive | ( | ) |
Definition at line 89 of file C4App.cpp.
References Active, C4Window::FlashWindow(), and pWindow.
Referenced by C4Network2::DoLobby().
|
pure virtual |
Implemented in C4Application.
|
inlineprotectedvirtualinherited |
Definition at line 268 of file StdScheduler.h.
|
pure virtual |
Implemented in C4Application.
|
pure virtual |
Implemented in C4Application.
Referenced by SetVideoMode().
std::string C4AbstractApp::Paste | ( | bool | fClipboard = true | ) |
Definition at line 47 of file C4AppMac.mm.
Referenced by C4GUI::Edit::MouseInput().
|
virtual |
Reimplemented in C4Application.
Definition at line 110 of file C4AppSDL.cpp.
References fQuitMsgReceived.
Referenced by C4Application::Quit().
|
inherited |
Definition at line 96 of file StdScheduler.cpp.
References StdScheduler::Removing().
Referenced by C4Network2::Clear(), StdScheduler::Clear(), C4Application::Clear(), C4GameLobby::ScenDesc::Deactivate(), C4GameOptionsList::Deactivate(), C4Network2ResDlg::Deactivate(), C4Network2::DeinitLeague(), StdSchedulerThread::Remove(), C4Network2::StopStreaming(), ~C4AbstractApp(), C4GameOverDlg::~C4GameOverDlg(), C4GameSec1Timer::~C4GameSec1Timer(), C4InteractiveThread::~C4InteractiveThread(), C4Network2ClientListBox::~C4Network2ClientListBox(), C4Network2ClientListDlg::~C4Network2ClientListDlg(), C4Network2Stats::~C4Network2Stats(), C4StartupModsDlg::~C4StartupModsDlg(), C4StartupModsDownloader::~C4StartupModsDownloader(), C4StartupNetDlg::~C4StartupNetDlg(), C4GameLobby::Countdown::~Countdown(), C4GUI::InfoDialog::~InfoDialog(), and C4GameLobby::MainDlg::~MainDlg().
|
inherited |
Definition at line 286 of file StdSchedulerMac.mm.
References SCHAdditions::requestAdditionsForScheduler:.
Referenced by StdScheduler::Remove().
void C4AbstractApp::RestoreVideoMode | ( | ) |
Definition at line 443 of file C4AppSDL.cpp.
References pWindow.
Referenced by C4Application::Clear().
void C4AbstractApp::Run | ( | ) |
Definition at line 26 of file C4App.cpp.
References Application, Clamp(), fQuitMsgReceived, StdScheduler::GetNextTick(), C4Application::isEditor, C4TimeMilliseconds::Now(), and StdScheduler::ScheduleProcs().
Referenced by main().
|
inherited |
Definition at line 130 of file StdScheduler.cpp.
References StdScheduler::DoScheduleProcs(), StdScheduler::GetNextTick(), and C4TimeMilliseconds::Now().
Referenced by C4AulDebug::DebugStep(), C4Network2::DoLobby(), C4GUI::Dialog::DoModal(), C4ScenarioListLoader::DoProcessCallback(), C4GUI::Dialog::Execute(), C4Network2::FinalInit(), C4Game::InitNetworkFromAddress(), C4Network2::LeagueEnd(), C4Network2::LeaguePlrAuth(), C4Network2::LeaguePlrAuthCheck(), C4Network2::LeagueStart(), C4Network2::LeagueWaitNotBusy(), C4AulDebug::Listen(), C4Network2::RetrieveRes(), and Run().
|
inherited |
Definition at line 75 of file StdScheduler.cpp.
References StdScheduler::Add(), and StdScheduler::Clear().
Referenced by StdSchedulerThread::Set().
bool C4AbstractApp::SetVideoMode | ( | int | iXRes, |
int | iYRes, | ||
unsigned int | iRefreshRate, | ||
unsigned int | iMonitor, | ||
bool | fFullScreen | ||
) |
Definition at line 354 of file C4AppSDL.cpp.
References Error(), LogF(), OnResolutionChanged(), pWindow, and C4Window::SetSize().
Referenced by C4Application::DoInit(), and C4Application::GameTick().
|
inherited |
Definition at line 276 of file StdSchedulerMac.mm.
References SCHAdditions::requestAdditionsForScheduler:, and SCHAdditions::start.
|
inherited |
Definition at line 150 of file StdScheduler.cpp.
Referenced by StdSchedulerThread::Stop().
bool C4AbstractApp::Active {false} |
Definition at line 63 of file C4App.h.
Referenced by ConsoleDlgProc(), C4Application::DoInit(), C4MessageBoard::Draw(), NotifyUserIfInactive(), C4Game::SaveGameTitle(), C4GraphicsSystem::StartDrawing(), and C4MouseControl::UpdateClip().
bool C4AbstractApp::fQuitMsgReceived {false} |
Definition at line 81 of file C4App.h.
Referenced by DoScheduleProcs(), FlushMessages(), Quit(), and Run().
pthread_t C4AbstractApp::MainThread |
Definition at line 128 of file C4App.h.
Referenced by AssertMainThread().
C4Window* C4AbstractApp::pWindow {nullptr} |
Definition at line 80 of file C4App.h.
Referenced by C4StartupOptionsDlg::C4StartupOptionsDlg(), C4Application::DoInit(), C4Application::GameTick(), C4Draw::Init(), C4MouseControl::Move(), NotifyUserIfInactive(), C4Application::OnResolutionChanged(), CStdGL::RestoreDeviceObjects(), RestoreVideoMode(), and SetVideoMode().
|
protected |
Definition at line 156 of file C4App.h.
Referenced by Error(), and GetLastError().