summaryrefslogtreecommitdiffstats
path: root/kcontrol/randr/lowlevel_randr.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kcontrol/randr/lowlevel_randr.h
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/randr/lowlevel_randr.h')
-rw-r--r--kcontrol/randr/lowlevel_randr.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/kcontrol/randr/lowlevel_randr.h b/kcontrol/randr/lowlevel_randr.h
new file mode 100644
index 000000000..a9a519125
--- /dev/null
+++ b/kcontrol/randr/lowlevel_randr.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright © 2007 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrandr.h>
+
+struct ScreenInfo;
+
+struct CrtcInfo {
+ RRCrtc id;
+ XRRCrtcInfo *info;
+ int cur_x;
+ int cur_y;
+ RRMode cur_mode_id;
+ Rotation cur_rotation;
+ Rotation rotations;
+ int cur_noutput;
+
+ int changed;
+
+ struct ScreenInfo *screen_info;
+};
+
+struct OutputInfo {
+ RROutput id;
+ XRROutputInfo *info;
+ struct CrtcInfo *cur_crtc;
+
+ int auto_set;
+ int off_set;
+};
+
+struct ScreenInfo {
+ Display *dpy;
+ Window window;
+ XRRScreenResources *res;
+ int min_width, min_height;
+ int max_width, max_height;
+ int cur_width;
+ int cur_height;
+ int cur_mmWidth;
+ int cur_mmHeight;
+
+ int n_output;
+ int n_crtc;
+ struct OutputInfo **outputs;
+ struct CrtcInfo **crtcs;
+
+ int clone;
+ struct CrtcInfo *primary_crtc;
+
+ struct CrtcInfo *cur_crtc;
+ struct OutputInfo *cur_output;
+};
+
+extern struct ScreenInfo *screen_info;
+extern const uint big_pixbuf[], small_pixbuf[];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void free_screen_info (struct ScreenInfo *screen_info);
+
+struct ScreenInfo* read_screen_info (Display *);
+
+int set_screen_size (struct ScreenInfo *screen_info);
+void output_auto (struct ScreenInfo *screen_info, struct OutputInfo *output_info);
+void output_off (struct ScreenInfo *screen_info, struct OutputInfo *output);
+struct CrtcInfo* auto_find_crtc (struct ScreenInfo *screen_info, struct OutputInfo *output_info);
+
+XRRModeInfo *find_mode_by_xid (struct ScreenInfo *screen_info, RRMode mode_id);
+int mode_height (XRRModeInfo *mode_info, Rotation rotation);
+int mode_width (XRRModeInfo *mode_info, Rotation rotation);
+int get_width_by_output_id (struct ScreenInfo *screen_info, RROutput output_id);
+int get_height_by_output_id (struct ScreenInfo *screen_info, RROutput output_id);
+char *get_output_name (struct ScreenInfo *screen_info, RROutput id);
+Status crtc_apply (struct CrtcInfo *crtc_info);
+Status crtc_disable (struct CrtcInfo *crtc);
+int main_low_apply (struct ScreenInfo *screen_info);
+
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file