Welcome to mirror list, hosted at ThFree Co, Russian Federation.

GHOST_WindowNULL.h « intern « ghost « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3f9e2f0a137742f077d1abc382b0320c0cfd993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

/** \file
 * \ingroup GHOST
 * Declaration of GHOST_WindowNULL class.
 */

#pragma once

#include "GHOST_Window.h"

#include <map>

class GHOST_SystemNULL;

class GHOST_WindowNULL : public GHOST_Window {
 public:
  GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor)
  {
    return GHOST_kSuccess;
  }

  GHOST_WindowNULL(GHOST_SystemNULL *system,
                   const char *title,
                   int32_t left,
                   int32_t top,
                   uint32_t width,
                   uint32_t height,
                   GHOST_TWindowState state,
                   const GHOST_IWindow *parentWindow,
                   GHOST_TDrawingContextType type,
                   const bool stereoVisual)
      : GHOST_Window(width, height, state, stereoVisual, false), m_system(system)
  {
    setTitle(title);
  }

 protected:
  GHOST_TSuccess installDrawingContext(GHOST_TDrawingContextType type)
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess removeDrawingContext()
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode)
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape)
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess setWindowCustomCursorShape(uint8_t *bitmap,
                                            uint8_t *mask,
                                            int sizex,
                                            int sizey,
                                            int hotX,
                                            int hotY,
                                            bool canInvertColor)
  {
    return GHOST_kSuccess;
  }

  bool getValid() const
  {
    return true;
  }
  void setTitle(const char *title)
  { /* nothing */
  }
  std::string getTitle() const
  {
    return "untitled";
  }
  void getWindowBounds(GHOST_Rect &bounds) const
  {
    getClientBounds(bounds);
  }
  void getClientBounds(GHOST_Rect &bounds) const
  { /* nothing */
  }
  GHOST_TSuccess setClientWidth(uint32_t width)
  {
    return GHOST_kFailure;
  }
  GHOST_TSuccess setClientHeight(uint32_t height)
  {
    return GHOST_kFailure;
  }
  GHOST_TSuccess setClientSize(uint32_t width, uint32_t height)
  {
    return GHOST_kFailure;
  }
  void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const
  {
    outX = inX;
    outY = inY;
  }
  void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const
  {
    outX = inX;
    outY = inY;
  }
  GHOST_TSuccess swapBuffers()
  {
    return GHOST_kFailure;
  }
  GHOST_TSuccess activateDrawingContext()
  {
    return GHOST_kFailure;
  }
  ~GHOST_WindowNULL()
  { /* nothing */
  }
  GHOST_TSuccess setWindowCursorVisibility(bool visible)
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess setState(GHOST_TWindowState state)
  {
    return GHOST_kSuccess;
  }
  GHOST_TWindowState getState() const
  {
    return GHOST_kWindowStateNormal;
  }
  GHOST_TSuccess invalidate()
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess setOrder(GHOST_TWindowOrder order)
  {
    return GHOST_kSuccess;
  }

  GHOST_TSuccess beginFullScreen() const
  {
    return GHOST_kSuccess;
  }
  GHOST_TSuccess endFullScreen() const
  {
    return GHOST_kSuccess;
  }

 private:
  GHOST_SystemNULL *m_system;

  /**
   * \param type: The type of rendering context create.
   * \return Indication of success.
   */
  GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type)
  {
    return NULL;
  }
};