diff options
author | Darrell Anderson <[email protected]> | 2013-01-12 16:16:03 -0600 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2013-01-12 16:16:03 -0600 |
commit | 2c10a4aac71b1e66d4e3fc0c9401e8b283e73be3 (patch) | |
tree | 15402a6a50f4dc5409f5fa3caf29ebd0d3c2dd21 /krandr/libkrandr.h | |
parent | 01e9b41e1b0412e7281e9ef5c0df586bb66d8763 (diff) | |
parent | 4c9ff70f806c4e8f2f6197b94db39b5bef8c71f2 (diff) | |
download | tdelibs-2c10a4aac71b1e66d4e3fc0c9401e8b283e73be3.tar.gz tdelibs-2c10a4aac71b1e66d4e3fc0c9401e8b283e73be3.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'krandr/libkrandr.h')
-rw-r--r-- | krandr/libkrandr.h | 81 |
1 files changed, 75 insertions, 6 deletions
diff --git a/krandr/libkrandr.h b/krandr/libkrandr.h index f29383f02..3e00d73f7 100644 --- a/krandr/libkrandr.h +++ b/krandr/libkrandr.h @@ -35,6 +35,11 @@ #include <ksimpleconfig.h> #include <tdelibs_export.h> +#define ROTATION_0_DEGREES_STRING "0 degrees" +#define ROTATION_90_DEGREES_STRING "90 degrees" +#define ROTATION_180_DEGREES_STRING "180 degrees" +#define ROTATION_270_DEGREES_STRING "270 degrees" + /** * Simple API covering most of the uses of libkrandr. * @@ -159,6 +164,11 @@ class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay int main_low_apply (ScreenInfo *screen_info); /** + * Sets the primary output device to the specified output_id + */ + void set_primary_output (ScreenInfo *screen_info, RROutput output_id); + + /** * Gets the binary monitor EDID for the specified card and display */ TQByteArray getEDID(int card, TQString displayname); @@ -169,42 +179,101 @@ class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay TQString getEDIDMonitorName(int card, TQString displayname); /** + * Returns true if the specified configuration directory has enabled display configuration + */ + bool getDisplayConfigurationEnabled(TQString kde_confdir); + + /** + * Returns true if the specified configuration directory has enabled automatic profile application on startup + */ + bool getDisplayConfigurationStartupAutoApplyEnabled(TQString kde_confdir); + + /** + * Returns the name of the automatically applied startup profile in the specified configuration directory + */ + TQString getDisplayConfigurationStartupAutoApplyName(TQString kde_confdir); + + /** + * Returns a HotPlugRulesList containing all hotplug rules from the specified configuration directory + */ + HotPlugRulesList getHotplugRules(TQString kde_confdir); + + /** + * Saves a HotPlugRulesList containing all hotplug rules to the specified configuration directory + */ + void saveHotplugRules(HotPlugRulesList rules, TQString kde_confdir); + + /** + * Applies all hotplug rules in the specified configuration directory to the current display configuration + */ + void applyHotplugRules(TQString kde_confdir); + + /** + * Returns a list of all profiles available in the specified configuration directory + * This list does not include the default ("") profile + */ + TQStringList getDisplayConfigurationProfiles(TQString kde_confdir); + + /** + * Deletes the specified profile from the specified configuration directory + * Returns true on success, false on failure + */ + bool deleteDisplayConfiguration(TQString profilename, TQString kde_confdir); + + /** + * Renames the specified profile in the specified configuration directory + * Returns true on success, false on failure + */ + bool renameDisplayConfiguration(TQString profilename, TQString newprofilename, TQString kde_confdir); + + /** * Saves the systemwide display configuration screenInfoArray to the specified profile * If profilename is empty, the default profile is utilized * If enable is set to true, the default profile will be applied at system startup */ - void saveSystemwideDisplayConfiguration(bool enable, TQString profilename, TQString kde_confdir, TQPtrList<SingleScreenData> screenInfoArray); + void saveDisplayConfiguration(bool enable, bool applyonstart, TQString profilename, TQString defaultprofilename, TQString kde_confdir, TQPtrList<SingleScreenData> screenInfoArray); /** * Reads the systemwide display configuration screenInfoArray from the specified profile * If profilename is empty, the default profile is utilized * WARNING: The calling application must free the returned objects when it is done using them */ - TQPtrList<SingleScreenData> loadSystemwideDisplayConfiguration(TQString profilename, TQString kde_confdir); + TQPtrList<SingleScreenData> loadDisplayConfiguration(TQString profilename, TQString kde_confdir); + + /** + * Applies the startup display configuration profile if enabled + * Returns the offset of the primary screen's top left corner + */ + TQPoint applyStartupDisplayConfiguration(TQString kde_confdir); /** * Applies the systemwide display configuration screenInfoArray from the specified profile * If profilename is empty, the default profile is utilized * Returns the offset of the primary screen's top left corner */ - TQPoint applySystemwideDisplayConfiguration(TQString profilename, TQString kde_confdir); + TQPoint applyDisplayConfiguration(TQString profilename, TQString kde_confdir); /** * Applies the systemwide display configuration screenInfoArray to the hardware * If test is true, the new configuration will be loaded for a short period of time, then reverted automatically * Returns true if configuration was accepted; false if not */ - bool applySystemwideDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test=TRUE, TQString kde_confdir=""); + bool applyDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test=TRUE, TQString kde_confdir=""); /** * Applies the gamma contained within the systemwide display configuration screenInfoArray to the hardware */ - void applySystemwideDisplayGamma(TQPtrList<SingleScreenData> screenInfoArray); + void applyDisplayGamma(TQPtrList<SingleScreenData> screenInfoArray); /** * Applies the DPMS settings contained within the systemwide display configuration screenInfoArray to the hardware */ - void applySystemwideDisplayDPMS(TQPtrList<SingleScreenData> screenInfoArray); + void applyDisplayDPMS(TQPtrList<SingleScreenData> screenInfoArray); + + /** + * Copies a screen information object + */ + TQPtrList<SingleScreenData> copyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray); /** * Destroys a screen information object |