MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ReadProperty

Function ReadProperty

Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp:560–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558 }
559
560 Property ReadProperty(X11::Display* display, X11::Window window, X11::Atom property)
561 {
562 X11::Atom readType = 0;
563 int readFormat = 0;
564 unsigned long nitems = 0;
565 unsigned long readBytes = 0;
566 unsigned char* result = nullptr;
567 int bytesCount = 1024;
568 if (property != 0)
569 {
570 do
571 {
572 if (result != nullptr)
573 X11::XFree(result);
574 XGetWindowProperty(display, window, property, 0, bytesCount, 0, AnyPropertyType, &readType, &readFormat, &nitems, &readBytes, &result);
575 bytesCount *= 2;
576 } while (readBytes != 0);
577 }
578 Property p = { result, readFormat, (int)nitems, readType };
579 return p;
580 }
581
582 static StringAnsi GetAtomName(X11::Display* display, X11::Atom atom)
583 {

Callers 1

X11EventHookMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected