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

krandr

  • krandr
libkrandr.h
1 /* libkrandr.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 _LIBKRANDR_H
25 #define _LIBKRANDR_H
26 
27 #include "randr.h"
28 #include "lowlevel_randr.h"
29 
30 #ifdef __cplusplus
31 
32 #include <tqfile.h>
33 
34 #include <kconfig.h>
35 #include <ksimpleconfig.h>
36 #include <kdelibs_export.h>
37 
48 class KRANDR_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  TQByteArray getEDID(int card, TQString displayname);
165 
169  TQString getEDIDMonitorName(int card, TQString displayname);
170 
176  void saveSystemwideDisplayConfiguration(bool enable, TQString profilename, TQString kde_confdir, TQPtrList<SingleScreenData> screenInfoArray);
177 
183  TQPtrList<SingleScreenData> loadSystemwideDisplayConfiguration(TQString profilename, TQString kde_confdir);
184 
190  TQPoint applySystemwideDisplayConfiguration(TQString profilename, TQString kde_confdir);
191 
197  bool applySystemwideDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test=TRUE, TQString kde_confdir="");
198 
202  void applySystemwideDisplayGamma(TQPtrList<SingleScreenData> screenInfoArray);
203 
207  void applySystemwideDisplayDPMS(TQPtrList<SingleScreenData> screenInfoArray);
208 
212  void destroyScreenInformationObject(TQPtrList<SingleScreenData> screenInfoArray);
213 
217  TQPoint primaryScreenOffsetFromTLC(TQPtrList<SingleScreenData> screenInfoArray);
218 
222  void ensureMonitorDataConsistency(TQPtrList<SingleScreenData> screenInfoArray);
223 
227  TQPtrList<SingleScreenData> readCurrentDisplayConfiguration();
228 
232  int getHardwareRotationFlags(SingleScreenData*);
233 
237  bool kRandrHasRandr();
238 
242  static const char *kRandrVersion(void);
243 
251  static const char *kRandrCopyright(void);
252 
253 };
254 
255 
256 
257 extern "C" {
258 
259 #else
260 #define KRANDR_EXPORT
261 #endif
262 
263 // KRANDR_EXPORT ScreenInfo* read_screen_info(Display *);
264 // KRANDR_EXPORT int set_screen_size (ScreenInfo *screen_info);
265 // KRANDR_EXPORT void output_auto (ScreenInfo *screen_info, OutputInfo *output_info);
266 // KRANDR_EXPORT void output_off(ScreenInfo *screen_info, OutputInfo *output);
267 // KRANDR_EXPORT CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info);
268 // KRANDR_EXPORT XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id);
269 // KRANDR_EXPORT int mode_height (XRRModeInfo *mode_info, Rotation rotation);
270 // KRANDR_EXPORT int mode_width (XRRModeInfo *mode_info, Rotation rotation);
271 // KRANDR_EXPORT int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id);
272 // KRANDR_EXPORT int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id);
273 // KRANDR_EXPORT char *get_output_name (ScreenInfo *screen_info, RROutput id);
274 // KRANDR_EXPORT Status crtc_apply (CrtcInfo *crtc_info);
275 // KRANDR_EXPORT Status crtc_disable (CrtcInfo *crtc);
276 // KRANDR_EXPORT int main_low_apply (ScreenInfo *screen_info);
277 // KRANDR_EXPORT bool kRandrHasRandr();
278 
279 KRANDR_EXPORT const char *kRandrVersion(void);
280 KRANDR_EXPORT const char *kRandrCopyright(void);
281 
282 #ifdef __cplusplus
283 
284 }
285 
286 
287 #endif
288 
289 
290 #endif

krandr

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

krandr

Skip menu "krandr"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for krandr by doxygen 1.9.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |