Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Window_ios.h
Go to the documentation of this file.
1/*
2* Copyright 2017 Google Inc.
3*
4* Use of this source code is governed by a BSD-style license that can be
5* found in the LICENSE file.
6*/
7
8#ifndef Window_ios_DEFINED
9#define Window_ios_DEFINED
10
11#include "src/core/SkChecksum.h"
13#include "tools/sk_app/Window.h"
14
15#import <UIKit/UIKit.h>
16
17namespace sk_app {
18
19class Window_ios : public Window {
20public:
22 : Window()
23 , fWindow(nil) {}
24 ~Window_ios() override { this->closeWindow(); }
25
26 bool initWindow();
27
28 void setTitle(const char*) override {}
29 void show() override {}
30
31 bool attach(BackendType) override;
32
33 void onInval() override;
34
35 static void PaintWindow();
36
37 UIWindow* uiWindow() { return fWindow; }
38
39 static Window_ios* MainWindow() { return gWindow; }
40
41private:
42 void closeWindow();
43
44 UIWindow* fWindow;
45
46 static Window_ios* gWindow; // there should be only one
47};
48
49} // namespace sk_app
50
51//////////////////////////////////////////////////////////////////////////
52
53@interface MainView : UIView
54
55- (MainView*)initWithWindow:(sk_app::Window_ios*)initWindow;
56
57@end
58
59#endif
void onInval() override
bool attach(BackendType) override
Definition Window_ios.mm:80
static Window_ios * MainWindow()
Definition Window_ios.h:39
void setTitle(const char *) override
Definition Window_ios.h:28
~Window_ios() override
Definition Window_ios.h:24
void show() override
Definition Window_ios.h:29
static void PaintWindow()
UIWindow * uiWindow()
Definition Window_ios.h:37