Compositor API#
This API handles communication with the display server. If possible it is recommended to use use libblight instead
Name |
Specification |
Description |
---|---|---|
pid |
|
Get the PID of the display server process. |
clipboard |
|
Get the contents of the clipboard |
selection |
|
Get the contents of the primary selection |
secondary |
|
Get the contents of the secondary selection |
clipboardChanged |
signal
|
The clipboard contents changed |
selectionChanged |
signal
|
The primary selection contents changed |
secondaryChanged |
signal
|
The secondary selection contents changed |
open |
method
|
Get the socket descriptor for the current process’ display server connection |
openInput |
method
|
Get the socket descriptor for the current process’ input event stream |
addSurface |
method
|
Add a surface to the display server |
repaint |
method
|
Repaint a surface or all the surfaces for a connection. |
getSurface |
method
|
Get the file descriptor for the buffer of a surface |
setFlags |
method
|
Set flags on a surface or connection |
getSurfaces |
method
|
Get a list of all surfaces currently on the display server |
frameBuffer |
method
|
Get the file descriptor of the device frame buffer |
lower |
method
|
Lower a surface or all the surfaces for a connection. |
raise |
method
|
Raise a surface or all the surfaces for a connection. |
focus |
method
|
Focus a connection so that it recieves input events |
focus |
method |
Focus a connection so that it |
waitForNoRepaints |
method |
Wait for all pending repaints to complete |
enterExclusiveMode |
method |
Enter exlcusive mode |
exitExclusiveMode |
method |
Exit exclusive move |
exlusiveModeRepaint |
method |
Repaint the framebuffer |
Example Usage#
#include <QDebug>
#include <liboxide/dbus.h>
using namespace codes::eeems::blight1;
int main(int argc, char* argv[]){
auto bus = QDBusConnection::systemBus();
Compositor compositor(BLIGHT_SERVICE, "/", bus);
qDebug() << "Display server PID:" << compositor.pid();
return EXIT_SUCCESS;
}
#!/bin/bash
echo "Display server PID: $(rot compositor get pid)"
echo "Display server surfaces:"
rot compositor call getSurfaces | jq -r '.[]'