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>
48 class TDERANDR_EXPORT KRandrSimpleAPI :
public RandRDisplay
56 TQString getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir);
62 TQString applyIccFile(TQString screenName, TQString fileName);
68 TQString applyIccConfiguration(TQString profileName, TQString kde_confdir);
73 TQString applySystemWideIccConfiguration(TQString kde_confdir);
78 TQString clearIccConfiguration(
void);
83 TQString getCurrentProfile(
void);
89 ScreenInfo* read_screen_info(Display *display);
94 void freeScreenInfoStructure(ScreenInfo* screen_info);
99 int set_screen_size (ScreenInfo *screen_info);
104 void output_auto (ScreenInfo *screen_info, OutputInfo *output_info);
109 void output_off(ScreenInfo *screen_info, OutputInfo *output);
114 CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info);
119 XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id);
124 int mode_height (XRRModeInfo *mode_info, Rotation rotation);
129 int mode_width (XRRModeInfo *mode_info, Rotation rotation);
134 int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id);
139 int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id);
144 char *get_output_name (ScreenInfo *screen_info, RROutput
id);
149 Status crtc_apply (CrtcInfo *crtc_info);
154 Status crtc_disable (CrtcInfo *crtc);
159 int main_low_apply (ScreenInfo *screen_info);
164 void set_primary_output (ScreenInfo *screen_info, RROutput output_id);
169 TQByteArray getEDID(
int card, TQString displayname);
174 TQString getEDIDMonitorName(
int card, TQString displayname);
179 bool getDisplayConfigurationEnabled(TQString kde_confdir);
184 bool getDisplayConfigurationStartupAutoApplyEnabled(TQString kde_confdir);
189 TQString getDisplayConfigurationStartupAutoApplyName(TQString kde_confdir);
194 HotPlugRulesList getHotplugRules(TQString kde_confdir);
199 void saveHotplugRules(HotPlugRulesList rules, TQString kde_confdir);
204 void applyHotplugRules(TQString kde_confdir);
210 TQStringList getDisplayConfigurationProfiles(TQString kde_confdir);
216 bool deleteDisplayConfiguration(TQString profilename, TQString kde_confdir);
222 bool renameDisplayConfiguration(TQString profilename, TQString newprofilename, TQString kde_confdir);
229 void saveDisplayConfiguration(
bool enable,
bool applyonstart, TQString profilename, TQString defaultprofilename, TQString kde_confdir, TQPtrList<SingleScreenData> screenInfoArray);
236 TQPtrList<SingleScreenData> loadDisplayConfiguration(TQString profilename, TQString kde_confdir);
242 TQPoint applyStartupDisplayConfiguration(TQString kde_confdir);
249 TQPoint applyDisplayConfiguration(TQString profilename, TQString kde_confdir);
256 bool applyDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray,
bool test=TRUE, TQString kde_confdir=
"");
261 void applyDisplayGamma(TQPtrList<SingleScreenData> screenInfoArray);
266 void applyDisplayDPMS(TQPtrList<SingleScreenData> screenInfoArray);
271 TQPtrList<SingleScreenData> copyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
276 void destroyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
281 TQPoint primaryScreenOffsetFromTLC(TQPtrList<SingleScreenData> screenInfoArray);
286 void ensureMonitorDataConsistency(TQPtrList<SingleScreenData> screenInfoArray);
291 TQPtrList<SingleScreenData> readCurrentDisplayConfiguration();
296 int getHardwareRotationFlags(SingleScreenData*);
301 bool kRandrHasRandr();
306 static const char *kRandrVersion(
void);
315 static const char *kRandrCopyright(
void);
324 #define TDERANDR_EXPORT
343 TDERANDR_EXPORT
const char *kRandrVersion(
void);
344 TDERANDR_EXPORT
const char *kRandrCopyright(
void);