Functions

Driver Information Interface
[Driver Interface]

Collaboration diagram for Driver Information Interface:

Functions

void iupdrvGetFullSize (int *width, int *height)
void iupdrvGetScreenSize (int *width, int *height)
void iupdrvAddScreenOffset (int *x, int *y, int add)
int iupdrvCheckMainScreen (int *width, int *height)
int iupdrvGetScreenDepth (void)
double iupdrvGetScreenDpi (void)
char * iupdrvGetSystemVersion (void)
char * iupdrvGetSystemName (void)
char * iupdrvGetComputerName (void)
char * iupdrvGetUserName (void)
void iupdrvGetKeyState (char *key)
void iupdrvGetCursorPos (int *x, int *y)
void * iupdrvGetDisplay (void)
char * iupdrvLocaleInfo (void)

Detailed Description

Each driver must export the symbols defined here. But in this case the functions are shared by different drivers in the same system.
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.
See iup_drvinfo.h

Function Documentation

void iupdrvGetFullSize ( int *  width,
int *  height 
)

Retrieve the main desktop full size.

void iupdrvGetScreenSize ( int *  width,
int *  height 
)

Retrieve the main desktop available size.

void iupdrvAddScreenOffset ( int *  x,
int *  y,
int  add 
)

Adds the main desktop offset because of a taskbar/menubar positioning. Only useful in Windows. In X-Windows the position of the origin 0,0 is already adjusted to be after the taskbar/menubar.

int iupdrvCheckMainScreen ( int *  width,
int *  height 
)

Retrieve the main desktop size when there are multiple monitors. Useful only when in GTK.

int iupdrvGetScreenDepth ( void   ) 

Retrieve the default desktop bits per pixel.

double iupdrvGetScreenDpi ( void   ) 

Retrieve the default desktop resolution in dpi (dots or pixels per inch).

char* iupdrvGetSystemVersion ( void   ) 

Returns a string with the system version number.

char* iupdrvGetSystemName ( void   ) 

Returns a string with the system name.

char* iupdrvGetComputerName ( void   ) 

Returns a string with the computer name.

char* iupdrvGetUserName ( void   ) 

Returns a string with the user name.

void iupdrvGetKeyState ( char *  key  ) 

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".

void iupdrvGetCursorPos ( int *  x,
int *  y 
)

Returns the current position of the mouse cursor.

void* iupdrvGetDisplay ( void   ) 

Returns the driver "Display" in UNIX and NULL in Windows. Must be implemented somewhere else.

char* iupdrvLocaleInfo ( void   ) 

Returns the current locale name.