[Base/UI] Android globals initialization + WindowedAppContext parts
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
namespace xe {
|
||||
namespace ui {
|
||||
|
||||
class AndroidWindow;
|
||||
class WindowedApp;
|
||||
|
||||
class AndroidWindowedAppContext final : public WindowedAppContext {
|
||||
@@ -39,6 +40,13 @@ class AndroidWindowedAppContext final : public WindowedAppContext {
|
||||
|
||||
void PlatformQuitFromUIThread() override;
|
||||
|
||||
// The single Window instance that will be receiving window callbacks.
|
||||
// Multiple windows cannot be created as one activity or fragment can have
|
||||
// only one layout. This window acts purely as a proxy between the activity
|
||||
// and the Xenia logic.
|
||||
AndroidWindow* GetActivityWindow() const { return activity_window_; }
|
||||
void SetActivityWindow(AndroidWindow* window) { activity_window_ = window; }
|
||||
|
||||
private:
|
||||
explicit AndroidWindowedAppContext(ANativeActivity* activity);
|
||||
bool InitializeApp(std::unique_ptr<WindowedApp> (*app_creator)(
|
||||
@@ -50,6 +58,8 @@ class AndroidWindowedAppContext final : public WindowedAppContext {
|
||||
ANativeActivity* activity_;
|
||||
std::unique_ptr<WindowedApp> app_;
|
||||
|
||||
AndroidWindow* activity_window_ = nullptr;
|
||||
|
||||
// TODO(Triang3l): The rest of the context, including quit handler (and the
|
||||
// destructor) calling `finish` on the activity, UI looper notification
|
||||
// posting, etc.
|
||||
|
||||
Reference in New Issue
Block a user