MCPcopy Create free account
hub / github.com/SFML/SFML / forwardEvent

Method forwardEvent

src/SFML/Window/Android/WindowImplAndroid.cpp:240–261  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

238
239////////////////////////////////////////////////////////////
240void WindowImplAndroid::forwardEvent(const Event& event)
241{
242 if (WindowImplAndroid::singleInstance != nullptr)
243 {
244 const ActivityStates& states = getActivity();
245
246 if (event.is<Event::FocusGained>())
247 {
248 WindowImplAndroid::singleInstance->m_size = Vector2u(
249 Vector2i(ANativeWindow_getWidth(states.window), ANativeWindow_getHeight(states.window)));
250 WindowImplAndroid::singleInstance->m_windowBeingCreated = true;
251 WindowImplAndroid::singleInstance->m_hasFocus = true;
252 }
253 else if (event.is<Event::FocusLost>())
254 {
255 WindowImplAndroid::singleInstance->m_windowBeingDestroyed = true;
256 WindowImplAndroid::singleInstance->m_hasFocus = false;
257 }
258
259 WindowImplAndroid::singleInstance->pushEvent(event);
260 }
261}
262
263
264////////////////////////////////////////////////////////////

Callers 6

onResumeFunction · 0.80
onPauseFunction · 0.80
onDestroyFunction · 0.80
onNativeWindowCreatedFunction · 0.80
onNativeWindowDestroyedFunction · 0.80
onContentRectChangedFunction · 0.80

Calls 1

pushEventMethod · 0.80

Tested by

no test coverage detected