MCPcopy Create free account
hub / github.com/SpartanJ/eepp / createWindow

Method createWindow

src/eepp/window/engine.cpp:165–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165EE::Window::Window* Engine::createWindow( WindowSettings Settings, ContextSettings Context ) {
166 EE::Window::Window* window = NULL;
167
168 if ( NULL != mWindow ) {
169 Settings.Backend = mWindow->getWindowInfo()->WindowConfig.Backend;
170 } else {
171 sMainThreadId = Thread::getCurrentThreadId();
172 }
173
174 switch ( Settings.Backend ) {
175 case WindowBackend::Default:
176 default:
177 window = createDefaultWindow( Settings, Context );
178 break;
179 }
180
181 if ( NULL == window ) {
182 window = createDefaultWindow( Settings, Context );
183 }
184
185 setCurrentWindow( window );
186
187 mWindows.insert( { mWindow->getWindowID(), mWindow } );
188
189 if ( Settings.PixelDensity > 0 )
190 PixelDensity::setPixelDensity( Settings.PixelDensity );
191
192 return window;
193}
194
195void Engine::destroyWindow( EE::Window::Window* window ) {
196 mWindows.erase( window->getWindowID() );

Callers 15

initMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
initMethod · 0.80
UIApplicationMethod · 0.80
init_ui_testFunction · 0.80
UTESTFunction · 0.80
UTESTFunction · 0.80
UTESTFunction · 0.80
initMethod · 0.80
mainFunction · 0.80

Calls 3

getWindowInfoMethod · 0.80
insertMethod · 0.45
getWindowIDMethod · 0.45

Tested by 6

init_ui_testFunction · 0.64
UTESTFunction · 0.64
UTESTFunction · 0.64
UTESTFunction · 0.64
initMethod · 0.64
mainFunction · 0.64