aboutsummaryrefslogtreecommitdiff
path: root/src/screen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.h')
-rw-r--r--src/screen.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/screen.h b/src/screen.h
new file mode 100644
index 0000000..2d9a351
--- /dev/null
+++ b/src/screen.h
@@ -0,0 +1,53 @@
+/**
+ * @file screen.h
+ * @author Joe Wingbermuehle
+ * @date 2005-2006
+ *
+ * @brief Header for screen functions.
+ *
+ * Note that screen here refers to physical monitors. Screens are
+ * determined using the xinerama extension (if available). There will
+ * always be at least one screen.
+ *
+ */
+
+#ifndef SCREEN_H
+#define SCREEN_H
+
+/** Structure to contain information about a screen. */
+typedef struct ScreenType {
+ int index; /**< The index of this screen. */
+ int x, y; /**< The location of this screen. */
+ int width, height; /**< The size of this screen. */
+} ScreenType;
+
+void InitializeScreens();
+void StartupScreens();
+void ShutdownScreens();
+void DestroyScreens();
+
+/** Get the screen of the specified coordinates.
+ * @param x The x-coordinate.
+ * @param y The y-coordinate.
+ * @return The screen.
+ */
+const ScreenType *GetCurrentScreen(int x, int y);
+
+/** Get the screen containing the mouse.
+ * @return The screen containing the mouse.
+ */
+const ScreenType *GetMouseScreen();
+
+/** Get the screen of the specified index.
+ * @param index The screen index (0 based).
+ * @return The screen.
+ */
+const ScreenType *GetScreen(int index);
+
+/** Get the number of screens.
+ * @return The number of screens.
+ */
+int GetScreenCount();
+
+#endif
+