Hi Avon,

Avon Robertson wrote on Fri, Aug 14, 2026 at 08:52:33PM +1200:

> I will see if what I need can be found in xrandr.c.

In addition to that, also look at

  $ man 3 Xrandr

which is the API that xrandr(1) uses to dig up the information
it prints.  Unfortunately, that manual page appears to be
incomplete.  For example, the function XRRGetOutputInfo(3)
appears to be relevant to your purpose.  That function is
declared in <X11/extensions/Xrandr.h>, but not documented,
which is kind of typical in X11 - much of the documentation
is missing, and what is available is often outdated and/or vague.

Either way, X11 programming is not exactly for the faint-hearted.
You will likely not get around without digging through some
source code, as it appears Thomas already correctly suggested
(though i do not see any posting on his part saying that publicly,
sorry if i missed it).

In general, when people want to write C programs, OpenBSD
developers encourage reading the docs in /usr/share/man/
and the source code in /usr/src/.  With /usr/X11R6/man/
and /usr/xenocara/, the same exercise furthers your education
significantly less while inducing significantly more pain,
but that doesn't mean it is impossible.

Have fun in Xrandr.h (however doubtful that may seem 8-),
  Ingo

Reply via email to