summaryrefslogtreecommitdiff
path: root/iup/src/iup_drvinfo.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-04 11:56:41 -0800
committerPixel <pixel@nobis-crew.org>2009-11-04 11:59:33 -0800
commitd577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch)
tree590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/src/iup_drvinfo.h
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/src/iup_drvinfo.h')
-rwxr-xr-xiup/src/iup_drvinfo.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/iup/src/iup_drvinfo.h b/iup/src/iup_drvinfo.h
new file mode 100755
index 0000000..7ff303f
--- /dev/null
+++ b/iup/src/iup_drvinfo.h
@@ -0,0 +1,103 @@
+/** \file
+ * \brief Driver Information Functions
+ *
+ * See Copyright Notice in "iup.h"
+ */
+
+#ifndef __IUP_DRVINFO_H
+#define __IUP_DRVINFO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \defgroup drvinfo Driver Information Interface
+ * \par
+ * Each driver must export the symbols defined here.
+ * But in this case the functions are shared by different drivers in the same system.
+ * \par
+ * For example, the GTK driver and the Windows driver share the same implementation
+ * of these functions when the GTK driver is compiled in Windows.
+ * The GTK driver and the Motif driver share the same implementation
+ * of these functions when the GTK driver is compiled in UNIX.
+ * \par
+ * See \ref iup_drvinfo.h
+ * \ingroup drv */
+
+
+/** Retrieve the main desktop full size.
+ * \ingroup drvinfo */
+void iupdrvGetFullSize(int *width, int *height);
+
+/** Retrieve the main desktop available size.
+ * \ingroup drvinfo */
+void iupdrvGetScreenSize(int *width, int *height);
+
+/** Retrieve the default desktop bits per pixel.
+ * \ingroup drvinfo */
+int iupdrvGetScreenDepth(void);
+
+/** Returns a string with the system version number.
+ * \ingroup drvinfo */
+char *iupdrvGetSystemVersion(void);
+
+/** Returns a string with the system name.
+ * \ingroup drvinfo */
+char* iupdrvGetSystemName(void);
+
+/** Returns a string with the computer name.
+ * \ingroup drvinfo */
+char* iupdrvGetComputerName(void);
+
+/** Returns a string with the user name.
+ * \ingroup drvinfo */
+char* iupdrvGetUserName(void);
+
+/** Returns the key state for Shift, Ctrl, Alt and sYs, in this order.
+ * Left and right keys are considered.
+ * Should declare "char key[5]".
+ * Values could be space (" ") or "SCAY".
+ * \ingroup drvinfo */
+void iupdrvGetKeyState(char* key);
+
+/** Returns the current position of the mouse cursor.
+ * \ingroup drvinfo */
+void iupdrvGetCursorPos(int *x, int *y);
+
+/** Returns the driver "Display" in UNIX and NULL in Windows.
+ * Must be implemented somewhere else.
+ * \ingroup drvinfo */
+void* iupdrvGetDisplay(void);
+
+/** Returns the decoration size of the native window.
+ * In Windows will also includes the menu if any.
+ * Used in DialogGetDecoration.
+ * \ingroup drvinfo */
+int iupdrvGetWindowDecor(void* wnd, int *border, int *caption);
+
+/** Returns the current directory.
+ * \ingroup drvinfo */
+char* iupdrvGetCurrentDirectory(void);
+
+/** Changes the current directory.
+ * \ingroup drvinfo */
+int iupdrvSetCurrentDirectory(const char* dir);
+
+/** Returns true if the given name is an existant file.
+ * \ingroup drvinfo */
+int iupdrvIsFile(const char* name);
+
+/** Returns true if the given name is an existant directory.
+ * \ingroup drvinfo */
+int iupdrvIsDirectory(const char* name);
+
+/** Creates a new direcotry.
+ * \ingroup drvinfo */
+int iupdrvMakeDirectory(const char* name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif