Overview#
You can find the DBus API Specification here. While this was the initial specification that was used for development, the actual implementation may not have been completely faithful to it due to technical issues that had to be resolved. You can find the technical DBus specification here, and examples of it’s consumption in some of the embedded applications (e.g. fret)
Further reading:
Options for interacting with the API#
There are a number of options for interacting with the API.
Using the
rot
command line tool and Oxide-Utils.Making calls using dbus-send.
Generating classes using the automatic interface xml files.
Making D-Bus calls manually in your language of choice.
Using the python wrapper for the
rot
command line python-liboxide
For the purposes of this documentation we will document using CLI Tool (rot) as well as using Qt generated classes.
Oxide Qt Platform Abstraction (QPA)#
Oxide ships a QPA for Qt applications to use. This will automatically use the display server for updating the screen, as well as user input.
If you are using liboxide, a call to deviceSettings.setupQtEnvironment() will setup the application to use the Oxide QPA. To manualy use the QPA, you will need to use the following code:
void setup(){
QCoreApplication::addLibraryPath("/opt/usr/lib/plugins");
qputenv("QMLSCENE_DEVICE", "software");
qputenv("QT_QUICK_BACKEND","software");
QString platform(
"oxide:enable_fonts:freetype:freetype:rotate=180"
);
if(is_on_rm2){
platform += ":invertx"
}
qputenv("QT_QPA_PLATFORM", platform);
}