rust-x-bindings / rust-xcb

Rust bindings and wrapper for XCB.
MIT License
161 stars 63 forks source link

randr: export well-known property names `RR_PROPERTY_BACKLIGHT` & friends #231

Closed strohel closed 1 year ago

strohel commented 1 year ago

My /usr/include/X11/extensions/randr.h currently defines these official output property names:

#define RR_PROPERTY_BACKLIGHT           "Backlight"
#define RR_PROPERTY_RANDR_EDID          "EDID"
#define RR_PROPERTY_SIGNAL_FORMAT       "SignalFormat"
#define RR_PROPERTY_SIGNAL_PROPERTIES   "SignalProperties"
#define RR_PROPERTY_CONNECTOR_TYPE      "ConnectorType"
#define RR_PROPERTY_CONNECTOR_NUMBER    "ConnectorNumber"
#define RR_PROPERTY_COMPATIBILITY_LIST  "CompatibilityList"
#define RR_PROPERTY_CLONE_LIST          "CloneList"
#define RR_PROPERTY_BORDER              "Border"
#define RR_PROPERTY_BORDER_DIMENSIONS   "BorderDimensions"
#define RR_PROPERTY_GUID                "GUID"
#define RR_PROPERTY_RANDR_TILE          "TILE"
#define RR_PROPERTY_NON_DESKTOP         "non-desktop"

These are also documented in https://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt#n1860

Would be nice if xcb::randr bindgen'ed these from the .h file to Rust so that client code doesn't have to redefine them.

strohel commented 1 year ago

Oh thank you @RealKC and @rtbo!