• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Copyright 2016 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_win_DEFINED
9 #define Window_win_DEFINED
10 
11 #include "tools/sk_app/Window.h"
12 
13 #include <windows.h>
14 
15 namespace sk_app {
16 
17 class Window_win : public Window {
18 public:
Window_win()19     Window_win() : Window() {}
20     ~Window_win() override;
21 
22     bool init(HINSTANCE instance);
23 
24     void setTitle(const char*) override;
25     void show() override;
26 
27     bool attach(BackendType) override;
28 
29     void onInval() override;
30 
31     void setRequestedDisplayParams(const DisplayParams&, bool allowReattach) override;
32 
33 private:
34     void closeWindow();
35 
36     HINSTANCE   fHInstance;
37     HWND        fHWnd;
38     BackendType fBackend;
39     bool        fInitializedBackend = false;
40 
41     using INHERITED = Window;
42 };
43 
44 }   // namespace sk_app
45 
46 #endif
47