MCPcopy Create free account
hub / github.com/davisking/dlib / XCheckIfEventPredicate

Function XCheckIfEventPredicate

dlib/gui_core/gui_core_kernel_2.cpp:339–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337 // ----------------------------------------------------------------------------------------
338
339 Bool XCheckIfEventPredicate (
340 Display* ,
341 XEvent* event,
342 XPointer arg
343 )
344 /*!
345 ensures
346 - if (event is an Expose event for the window pointed to by arg) then
347 - returns true
348 - else
349 - returns false
350 !*/
351 {
352 if (event->type == Expose)
353 {
354 XExposeEvent* e = reinterpret_cast<XExposeEvent*>(event);
355 Window* win= reinterpret_cast<Window*>(arg);
356 if (e->window == *win)
357 {
358 return 1;
359 }
360 }
361 return 0;
362 }
363
364 // ----------------------------------------------------------------------------------------
365

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected