summaryrefslogtreecommitdiff
path: root/iup/src/iup_drvinfo.h
blob: 7ff303f70024199df0ba3707b86cff1623d1f967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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