• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tderandr
 

tderandr

  • tderandr
libtderandr.h
1 /* libtderandr.h - class KRandr that makes it easy to use XRandr in KDE
2  This file is part of KRandr 0.9.5
3  Copyright (C) 2010 Timothy Pearson
4  LibKRandr's homepage : http://www.trinitydesktop.org
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 
21  Send comments and bug fixes to Timothy Pearson <kb9vqf@pearsoncomputing.net>
22 
23 ***************************************************************************/
24 #ifndef _LIBTDERANDR_H
25 #define _LIBTDERANDR_H
26 
27 #include "randr.h"
28 #include "lowlevel_randr.h"
29 
30 #ifdef __cplusplus
31 
32 #include <tqfile.h>
33 
34 #include <tdeconfig.h>
35 #include <ksimpleconfig.h>
36 #include <tdelibs_export.h>
37 
48 class TDERANDR_EXPORT KRandrSimpleAPI : public RandRDisplay
49 {
50  private:
51 
52  public:
56  TQString getIccFileName(TQString profileName, TQString screenName, TQString kde_confdir);
57 
62  TQString applyIccFile(TQString screenName, TQString fileName);
63 
68  TQString applyIccConfiguration(TQString profileName, TQString kde_confdir);
69 
73  TQString applySystemWideIccConfiguration(TQString kde_confdir);
74 
78  TQString clearIccConfiguration(void);
79 
83  TQString getCurrentProfile(void);
84 
89  ScreenInfo* read_screen_info(Display *display);
90 
94  void freeScreenInfoStructure(ScreenInfo* screen_info);
95 
99  int set_screen_size (ScreenInfo *screen_info);
100 
104  void output_auto (ScreenInfo *screen_info, OutputInfo *output_info);
105 
109  void output_off(ScreenInfo *screen_info, OutputInfo *output);
110 
114  CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info);
115 
119  XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id);
120 
124  int mode_height (XRRModeInfo *mode_info, Rotation rotation);
125 
129  int mode_width (XRRModeInfo *mode_info, Rotation rotation);
130 
134  int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id);
135 
139  int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id);
140 
144  char *get_output_name (ScreenInfo *screen_info, RROutput id);
145 
149  Status crtc_apply (CrtcInfo *crtc_info);
150 
154  Status crtc_disable (CrtcInfo *crtc);
155 
159  int main_low_apply (ScreenInfo *screen_info);
160 
164  void set_primary_output (ScreenInfo *screen_info, RROutput output_id);
165 
169  TQByteArray getEDID(int card, TQString displayname);
170 
174  TQString getEDIDMonitorName(int card, TQString displayname);
175 
179  bool getDisplayConfigurationEnabled(TQString kde_confdir);
180 
184  bool getDisplayConfigurationStartupAutoApplyEnabled(TQString kde_confdir);
185 
189  TQString getDisplayConfigurationStartupAutoApplyName(TQString kde_confdir);
190 
194  HotPlugRulesList getHotplugRules(TQString kde_confdir);
195 
199  void saveHotplugRules(HotPlugRulesList rules, TQString kde_confdir);
200 
204  void applyHotplugRules(TQString kde_confdir);
205 
210  TQStringList getDisplayConfigurationProfiles(TQString kde_confdir);
211 
216  bool deleteDisplayConfiguration(TQString profilename, TQString kde_confdir);
217 
222  bool renameDisplayConfiguration(TQString profilename, TQString newprofilename, TQString kde_confdir);
223 
229  void saveDisplayConfiguration(bool enable, bool applyonstart, TQString profilename, TQString defaultprofilename, TQString kde_confdir, TQPtrList<SingleScreenData> screenInfoArray);
230 
236  TQPtrList<SingleScreenData> loadDisplayConfiguration(TQString profilename, TQString kde_confdir);
237 
242  TQPoint applyStartupDisplayConfiguration(TQString kde_confdir);
243 
249  TQPoint applyDisplayConfiguration(TQString profilename, TQString kde_confdir);
250 
256  bool applyDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test=TRUE, TQString kde_confdir="");
257 
261  void applyDisplayGamma(TQPtrList<SingleScreenData> screenInfoArray);
262 
266  void applyDisplayDPMS(TQPtrList<SingleScreenData> screenInfoArray);
267 
271  TQPtrList<SingleScreenData> copyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
272 
276  void destroyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
277 
281  TQPoint primaryScreenOffsetFromTLC(TQPtrList<SingleScreenData> screenInfoArray);
282 
286  void ensureMonitorDataConsistency(TQPtrList<SingleScreenData> screenInfoArray);
287 
291  TQPtrList<SingleScreenData> readCurrentDisplayConfiguration();
292 
296  int getHardwareRotationFlags(SingleScreenData*);
297 
301  bool kRandrHasRandr();
302 
306  static const char *kRandrVersion(void);
307 
315  static const char *kRandrCopyright(void);
316 
317 };
318 
319 
320 
321 extern "C" {
322 
323 #else
324 #define TDERANDR_EXPORT
325 #endif
326 
327 // TDERANDR_EXPORT ScreenInfo* read_screen_info(Display *);
328 // TDERANDR_EXPORT int set_screen_size (ScreenInfo *screen_info);
329 // TDERANDR_EXPORT void output_auto (ScreenInfo *screen_info, OutputInfo *output_info);
330 // TDERANDR_EXPORT void output_off(ScreenInfo *screen_info, OutputInfo *output);
331 // TDERANDR_EXPORT CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info);
332 // TDERANDR_EXPORT XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id);
333 // TDERANDR_EXPORT int mode_height (XRRModeInfo *mode_info, Rotation rotation);
334 // TDERANDR_EXPORT int mode_width (XRRModeInfo *mode_info, Rotation rotation);
335 // TDERANDR_EXPORT int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id);
336 // TDERANDR_EXPORT int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id);
337 // TDERANDR_EXPORT char *get_output_name (ScreenInfo *screen_info, RROutput id);
338 // TDERANDR_EXPORT Status crtc_apply (CrtcInfo *crtc_info);
339 // TDERANDR_EXPORT Status crtc_disable (CrtcInfo *crtc);
340 // TDERANDR_EXPORT int main_low_apply (ScreenInfo *screen_info);
341 // TDERANDR_EXPORT bool kRandrHasRandr();
342 
343 TDERANDR_EXPORT const char *kRandrVersion(void);
344 TDERANDR_EXPORT const char *kRandrCopyright(void);
345 
346 #ifdef __cplusplus
347 
348 }
349 
350 
351 #endif
352 
353 
354 #endif

tderandr

Skip menu "tderandr"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tderandr

Skip menu "tderandr"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tderandr by doxygen 1.9.1
This website is maintained by Timothy Pearson.