24 #ifndef _LIBTDERANDR_H 25 #define _LIBTDERANDR_H 28 #include "lowlevel_randr.h" 34 #include <tdeconfig.h> 35 #include <ksimpleconfig.h> 36 #include <tdelibs_export.h> 38 #define ROTATION_0_DEGREES_STRING "0 degrees" 39 #define ROTATION_90_DEGREES_STRING "90 degrees" 40 #define ROTATION_180_DEGREES_STRING "180 degrees" 41 #define ROTATION_270_DEGREES_STRING "270 degrees" 53 class TDERANDR_EXPORT KRandrSimpleAPI :
public RandRDisplay
61 TQString getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir);
67 TQString applyIccFile(TQString screenName, TQString fileName);
73 TQString applyIccConfiguration(TQString profileName, TQString kde_confdir);
78 TQString applySystemWideIccConfiguration(TQString kde_confdir);
83 TQString clearIccConfiguration(
void);
88 TQString getCurrentProfile(
void);
94 ScreenInfo* read_screen_info(Display *display);
99 void freeScreenInfoStructure(ScreenInfo* screen_info);
104 int set_screen_size (ScreenInfo *screen_info);
109 void output_auto (ScreenInfo *screen_info, OutputInfo *output_info);
114 void output_off(ScreenInfo *screen_info, OutputInfo *output);
119 CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info);
124 XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id);
129 int mode_height (XRRModeInfo *mode_info, Rotation rotation);
134 int mode_width (XRRModeInfo *mode_info, Rotation rotation);
139 int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id);
144 int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id);
149 char *get_output_name (ScreenInfo *screen_info, RROutput
id);
154 Status crtc_apply (CrtcInfo *crtc_info);
159 Status crtc_disable (CrtcInfo *crtc);
164 int main_low_apply (ScreenInfo *screen_info);
169 void set_primary_output (ScreenInfo *screen_info, RROutput output_id);
174 TQByteArray getEDID(
int card, TQString displayname);
179 TQString getEDIDMonitorName(
int card, TQString displayname);
184 bool getDisplayConfigurationEnabled(TQString kde_confdir);
189 bool getDisplayConfigurationStartupAutoApplyEnabled(TQString kde_confdir);
194 TQString getDisplayConfigurationStartupAutoApplyName(TQString kde_confdir);
199 HotPlugRulesList getHotplugRules(TQString kde_confdir);
204 void saveHotplugRules(HotPlugRulesList rules, TQString kde_confdir);
209 void applyHotplugRules(TQString kde_confdir);
215 TQStringList getDisplayConfigurationProfiles(TQString kde_confdir);
221 bool deleteDisplayConfiguration(TQString profilename, TQString kde_confdir);
227 bool renameDisplayConfiguration(TQString profilename, TQString newprofilename, TQString kde_confdir);
234 void saveDisplayConfiguration(
bool enable,
bool applyonstart, TQString profilename, TQString defaultprofilename, TQString kde_confdir, TQPtrList<SingleScreenData> screenInfoArray);
241 TQPtrList<SingleScreenData> loadDisplayConfiguration(TQString profilename, TQString kde_confdir);
247 TQPoint applyStartupDisplayConfiguration(TQString kde_confdir);
254 TQPoint applyDisplayConfiguration(TQString profilename, TQString kde_confdir);
261 bool applyDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray,
bool test=TRUE, TQString kde_confdir=
"");
266 void applyDisplayGamma(TQPtrList<SingleScreenData> screenInfoArray);
271 void applyDisplayDPMS(TQPtrList<SingleScreenData> screenInfoArray);
276 TQPtrList<SingleScreenData> copyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
281 void destroyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
286 TQPoint primaryScreenOffsetFromTLC(TQPtrList<SingleScreenData> screenInfoArray);
291 void ensureMonitorDataConsistency(TQPtrList<SingleScreenData> screenInfoArray);
296 TQPtrList<SingleScreenData> readCurrentDisplayConfiguration();
301 int getHardwareRotationFlags(SingleScreenData*);
306 bool kRandrHasRandr();
311 static const char *kRandrVersion(
void);
320 static const char *kRandrCopyright(
void);
329 #define TDERANDR_EXPORT 348 TDERANDR_EXPORT
const char *kRandrVersion(
void);
349 TDERANDR_EXPORT
const char *kRandrCopyright(
void);