#include <desktop.h>
Inheritance diagram for SaX::SaXManipulateDesktop:
Public Member Functions | |
void | calculateModelines (bool) |
void | setExtraModelineString (const QString &) |
void | setExtraModeline (int, int, int, int) |
void | addExtraModeline (int, int, int, int) |
void | removeExtraModeline (int, int) |
void | setResolution (int, int, int) |
void | addResolution (int, int, int) |
void | removeResolution (int, int, int) |
void | setVirtualResolution (int, int, int) |
void | removeVirtualResolution (int) |
void | setColorDepth (int) |
bool | enable3D (void) |
bool | disable3D (void) |
void | setDisplaySize (int, int) |
void | setDisplayRatioAndTraversal (double, int, int) |
void | setHsyncRange (double, double) |
void | setVsyncRange (double, double) |
void | enableDPMS (void) |
void | disableDPMS (void) |
void | setMonitorVendor (const QString &) |
void | setMonitorName (const QString &) |
void | setCDBMonitor (const QString &) |
QList< QString > | getCDBMonitorVendorList (void) |
QList< QString > | getCDBMonitorModelList (const QString &) |
QDict< QString > | getCDBMonitorData (const QString &, const QString &) |
QDict< QString > | getCDBMonitorIDData (const QString &) |
void | setCDBMonitorData (const QString &, const QString &, const QString &, const QString &) |
QList< QString > | getResolutions (int) |
QList< QString > | getResolutionFromServer (void) |
QList< QString > | getDisplaySize (void) |
QList< QString > | getDisplayRatio (void) |
QString | getDisplayTraversal (void) |
QList< QString > | getHsyncRange (void) |
QList< QString > | getVsyncRange (void) |
bool | is3DEnabled (void) |
bool | is3DCard (void) |
bool | isDualHeadCard (void) |
bool | isXineramaMode (void) |
bool | DPMSEnabled (void) |
QString | getMonitorVendor (void) |
QString | getMonitorName (void) |
QString | getColorDepth (void) |
QString | getVirtualResolution (int) |
QString | getDualHeadProfile (void) |
QString | getModelineAlgorithm (void) |
bool | willCalculateModelines (void) |
bool | selectDesktop (int) |
SaXManipulateDesktop (SaXImport *, SaXImport *, SaXImport *, int=0) |
The desktop manipulator requires three import objects to become created:
Once created the manipulator object is able to get/set desktop related information like resolutions color depth monitor specs or 3D. The following example shows how to use the desktop manipulator for adding a new standard resolution in 24 bit color depth:
#include <sax/sax.h> int main (void) { SaXException().setDebug (true); QDict<SaXImport> section; int importID[] = { SAX_CARD, SAX_DESKTOP, SAX_PATH, }; printf ("Importing data...\n"); SaXConfig* config = new SaXConfig; for (int id=0; id<3; id++) { SaXImport* import = new SaXImport ( importID[id] ); import->setSource ( SAX_SYSTEM_CONFIG ); import->doImport(); config->addImport (import); section.insert ( import->getSectionName(),import ); } printf ("Setting up resolution...\n"); SaXManipulateDesktop mDesktop ( section["Desktop"],section["Card"],section["Path"] ); if (mDesktop.selectDesktop (0)) { mDesktop.addResolution (24,1600,1200); } printf ("Writing configuration\n"); config->setMode (SAX_MERGE); if ( ! config->createConfiguration() ) { printf ("%s\n",config->errorString()); printf ("%s\n",config->getParseErrorValue()); return 1; } return 0; }
Definition at line 175 of file desktop.h.
|
An object of this type is used to configure desktop properties like resolution and colors Definition at line 27 of file desktop.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excDesktopImportBindFailed(), SaX::SaXException::excNullPointerArgument(), and SaX::SaXImport::getSectionID(). Here is the call graph for this function: ![]() |
|
This method add a modeline XxY with refresh Hz but without checking if it fits into the current range. This method should be used carefully Implements SaX::SaXManipulateDesktopIF. Definition at line 1449 of file desktop.cpp. |
|
add resolution (X)x(Y) for colordepth (c). Using this member will add the resolution to the current setting Implements SaX::SaXManipulateDesktopIF. Definition at line 122 of file desktop.cpp. |
|
enable/disable the modeline calculation. This is onyl needed for non VESA modes or modes which are not part of the internal X-Server mode pool Implements SaX::SaXManipulateDesktopIF. Definition at line 85 of file desktop.cpp. |
|
remove the needed extension module(s) related to the 3D subsystem. This method will handle the special nvidia case as well. An exception will be throwed if the nvidia driver is installed and needs to get uninstalled to deactivate 3D in this case Implements SaX::SaXManipulateDesktopIF. Definition at line 614 of file desktop.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excDriverMismatch(), SaX::SaXException::excNvidiaDriverInstalled(), SaX::SaXManipulateCard::getCardDriver(), SaX::SaXStorage::getItem(), SaX::SaXManipulateCard::getOptions(), SaX::SaXFile::readDict(), SaX::SaXManipulateCard::removeCardOption(), SaX::SaXManipulatePath::removeLoadableModule(), and SaX::SaXManipulateCard::setCardDriver(). Here is the call graph for this function: ![]() |
|
disable monitor option DPMS by removing the complete entry. This works because there is only one option available Implements SaX::SaXManipulateDesktopIF. Definition at line 828 of file desktop.cpp. |
|
check if DPMS is enabled by checking the value for MonitorOptions. Currently there is only one monitor option available so the check is rather simple Implements SaX::SaXManipulateDesktopIF. Definition at line 1112 of file desktop.cpp. |
|
enable 3D system. This method will include the needed extension module to activate 3D. It is necessary to restart the X-Server after the configuration has been written. The method will take care about the special nvidia setup which requires the nvidia installer to uninstall -> disable or install -> enable the 3D subsystem. NOTE: libsax will not install or uninstall anything but an exception will be throwed if the binary nvidia driver is not installed Implements SaX::SaXManipulateDesktopIF. Definition at line 459 of file desktop.cpp. References SaX::SaXManipulateCard::addCardOption(), SaX::SaXManipulatePath::addLoadableModule(), SaX::SaXException::errorString(), SaX::SaXException::excDriverMismatch(), SaX::SaXException::excNvidiaDriverMissing(), SaX::SaXManipulateCard::getCardDriver(), SaX::SaXStorage::getItem(), SaX::SaXManipulateCard::getOptions(), SaX::SaXFile::readDict(), SaX::SaXManipulatePath::removeLoadableModule(), and SaX::SaXManipulateCard::setCardDriver(). Here is the call graph for this function: ![]() |
|
enable monitor option DPMS, currently there is only one monitor option so we will set the value and overwrite the current setting Implements SaX::SaXManipulateDesktopIF. Definition at line 813 of file desktop.cpp. |
|
return the monitor data dictionary associated with the given vendor and model name. Implements SaX::SaXManipulateDesktopIF. Definition at line 1317 of file desktop.cpp. |
|
return the monitor data dictionary associated with the given DDC id. Implements SaX::SaXManipulateDesktopIF. Definition at line 1344 of file desktop.cpp. |
|
retrieve a list of supported monitor models. Each item contains the vendor name as it is stored in the CDB Implements SaX::SaXManipulateDesktopIF. Definition at line 1289 of file desktop.cpp. |
|
retrieve a list of supported monitor vendors. Each item contains the vendor name as it is stored in the CDB Implements SaX::SaXManipulateDesktopIF. Definition at line 1256 of file desktop.cpp. |
|
get the currently set default color depth for the active desktop Implements SaX::SaXManipulateDesktopIF. Definition at line 1159 of file desktop.cpp. |
|
get the aspect ratio x/y values according to the information from the getDisplaySize() method Implements SaX::SaXManipulateDesktopIF. Definition at line 1022 of file desktop.cpp. References getDisplaySize(). Here is the call graph for this function: ![]() |
|
get the values for the display size wheras the first entry in the list refers to the X value in mm and the second value refers to the Y value in mm. If there is no display size defined an empty list is returned Implements SaX::SaXManipulateDesktopIF. Definition at line 970 of file desktop.cpp. Referenced by getDisplayRatio(), and getDisplayTraversal(). |
|
get the traversal length according to the information from the getDisplaySize() method Implements SaX::SaXManipulateDesktopIF. Definition at line 999 of file desktop.cpp. References getDisplaySize(). Here is the call graph for this function: ![]() |
|
return the full qualified profile file name used to set the driver options for a dual head configuration. if the card is not a dual head card or the assigned profile is not a DualHead_DriverOptions profile the method will return an empty QString Implements SaX::SaXManipulateDesktopIF. Definition at line 275 of file desktop.cpp. References SaX::SaXManipulateCard::isNoteBook(). Here is the call graph for this function: ![]() |
|
get the values for the horizontal sync range in Khz the first entry specify the start value and the second value specify the end of the range Implements SaX::SaXManipulateDesktopIF. Definition at line 1058 of file desktop.cpp. |
|
get the currently used modeline algorithm method Implements SaX::SaXManipulateDesktopIF. Definition at line 1173 of file desktop.cpp. |
|
get the name of the monitor model for the currently selected desktop Implements SaX::SaXManipulateDesktopIF. Definition at line 1145 of file desktop.cpp. |
|
get the name of the monitor vendor for the currently selected desktop Implements SaX::SaXManipulateDesktopIF. Definition at line 1131 of file desktop.cpp. |
|
return the resolution the currently running server is using This call will only work if there is a server which can be asked for the resolution. The xquery -r call is used to obtain the resolution Implements SaX::SaXManipulateDesktopIF. Definition at line 932 of file desktop.cpp. References SaX::SaXProcessCall::readStdout(). Here is the call graph for this function: ![]() |
|
return a list of resolutions refering to the given color depth. If there is no resolution defined for the given color an empty list is returned Implements SaX::SaXManipulateDesktopIF. Definition at line 905 of file desktop.cpp. |
|
get the virtual resolution if defined for the given color depth. If there is no virtual resolution a (null) string is returned Implements SaX::SaXManipulateDesktopIF. Definition at line 1204 of file desktop.cpp. |
|
get the values for the vertical sync range in Khz the first entry specify the start value and the second value specify the end of the range Implements SaX::SaXManipulateDesktopIF. Definition at line 1085 of file desktop.cpp. |
|
check if the card can be used with 3D hardware acceleration according to the CDB information Implements SaX::SaXManipulateDesktopIF. Definition at line 216 of file desktop.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excEmptyCDBGroup(), and SaX::SaXStorage::getItem(). Here is the call graph for this function: ![]() |
|
check if 3D is enabled. first we will have a look at the driver used. In case of nvidia 3D is always enabled in any other case the dri module must be used to enable the 3D subsystem Implements SaX::SaXManipulateDesktopIF. Definition at line 870 of file desktop.cpp. References SaX::SaXManipulatePath::getModules(). Here is the call graph for this function: ![]() |
|
check if the card is a dual head card The check is based on a profile check. If the card is bound to a DualHead profile the method will return true Implements SaX::SaXManipulateDesktopIF. Definition at line 373 of file desktop.cpp. |
|
This function removes a modeline XxY from the SpecialModeline value Implements SaX::SaXManipulateDesktopIF. Definition at line 1473 of file desktop.cpp. |
|
remove the resolution (X)x(Y) for colordepth (c) from the current Modes value Implements SaX::SaXManipulateDesktopIF. Definition at line 144 of file desktop.cpp. |
|
remove the virtual resolution (X)x(Y) set for colordepth (c). Implements SaX::SaXManipulateDesktopIF. Definition at line 182 of file desktop.cpp. |
|
select the desktop device the changes should be applied to if the device does not exist (false) is returned Implements SaX::SaXManipulateDesktopIF. Definition at line 67 of file desktop.cpp. References SaX::SaXStorage::setID(). Here is the call graph for this function: ![]() |
|
set all monitor data associated with the given group name to the current desktop data. The group name consists of the vendor and model name separated by a colon Implements SaX::SaXManipulateDesktopIF. Definition at line 1228 of file desktop.cpp. References SaX::SaXException::errorString(), and SaX::SaXException::excCDBRecordNotFound(). Here is the call graph for this function: ![]() |
|
add a CDB group to the current CDB monitor table of this manipulator instance. Note the information is not part of the CDB directly it is only stored temporarly as long as the object instance exists Implements SaX::SaXManipulateDesktopIF. Definition at line 1375 of file desktop.cpp. |
|
set the default color depth. Valid values are 4,8,15,16 and 24 Implements SaX::SaXManipulateDesktopIF. Definition at line 200 of file desktop.cpp. |
|
set the DisplaySize in [mm] for the traversal and ratio of the currently selected display Implements SaX::SaXManipulateDesktopIF. Definition at line 759 of file desktop.cpp. References setDisplaySize(). Here is the call graph for this function: ![]() |
|
set the DisplaySize in [mm] for the width and height of the currently selected display Implements SaX::SaXManipulateDesktopIF. Definition at line 743 of file desktop.cpp. Referenced by setDisplayRatioAndTraversal(). |
|
This method includes one modeline XxY with refresh Hz but without checking if it fits into the current range. This method should be used carefully Implements SaX::SaXManipulateDesktopIF. Definition at line 1432 of file desktop.cpp. |
|
This method includes one modeline specified by mode without checking if it fits into the current range. Implements SaX::SaXManipulateDesktopIF. Definition at line 1416 of file desktop.cpp. |
|
set the horizontal sync range in [Khz] of the currently selected display. Implements SaX::SaXManipulateDesktopIF. Definition at line 781 of file desktop.cpp. |
|
set the monitor model name. This method will only set the model string to identify the monitor Implements SaX::SaXManipulateDesktopIF. Definition at line 856 of file desktop.cpp. |
|
set monitor vendor name. This method will only set the vendor string to identify the monitor Implements SaX::SaXManipulateDesktopIF. Definition at line 842 of file desktop.cpp. |
|
set resolution (X)x(Y) for colordepth (c). Using this member will overwrite the current resolution setting Implements SaX::SaXManipulateDesktopIF. Definition at line 104 of file desktop.cpp. |
|
set virtual resolution (X)x(Y) for colordepth (c). This call will overwrite the current setting Implements SaX::SaXManipulateDesktopIF. Definition at line 164 of file desktop.cpp. |
|
set the vertical sync range in [Hz] of the currently selected display. Implements SaX::SaXManipulateDesktopIF. Definition at line 797 of file desktop.cpp. |
|
check if the modeline calculation is enabled or not The method will return true if enabled otherwise false Implements SaX::SaXManipulateDesktopIF. Definition at line 1186 of file desktop.cpp. |