Modules | Functions

Driver Interface

Collaboration diagram for Driver Interface:


 Driver Font Interface
 Driver Information Interface


int iupdrvSetGlobal (const char *name, const char *value)
char * iupdrvGetGlobal (const char *name)
void iupdrvSetIdleFunction (Icallback func)
void iupdrvScreenToClient (Ihandle *ih, int *x, int *y)
void iupdrvClientToScreen (Ihandle *ih, int *x, int *y)
int iupdrvIsVisible (Ihandle *ih)
int iupdrvIsActive (Ihandle *ih)
void iupdrvSetFocus (Ihandle *ih)
void iupdrvSetVisible (Ihandle *ih, int enable)
void iupdrvSetActive (Ihandle *ih, int enable)
void iupdrvPostRedraw (Ihandle *ih)
void iupdrvRedrawNow (Ihandle *ih)
void iupdrvReparent (Ihandle *ih)
void iupdrvPaintFocusRect (Ihandle *ih, void *gc, int x, int y, int w, int h)
int iupdrvGetScrollbarSize (void)
void iupdrvActivate (Ihandle *ih)
int iupdrvMenuGetMenuBarSize (Ihandle *ih)
void iupdrvSendKey (int key, int press)
void iupdrvSendMouse (int x, int y, int bt, int status)
void iupdrvWarpPointer (int x, int y)
void iupdrvKeyEncode (int key, unsigned int *keyval, unsigned int *state)
void iupdrvSleep (int time)

Detailed Description

Each driver must export the symbols defined here.
See iup_drv.h

Function Documentation

int iupdrvSetGlobal ( const char *  name,
const char *  value 

Sets a global environment attribute. Called from IupSetGlobal and IupStoreGlobal. Must return 1 is process the attribute, or 0 is not.

char* iupdrvGetGlobal ( const char *  name  ) 

Returns a global environment attribute. Called from IupGetGlobal.

void iupdrvSetIdleFunction ( Icallback  func  ) 

Changes the idle callback. Called from IupSetFunction.

void iupdrvScreenToClient ( Ihandle *  ih,
int *  x,
int *  y 

Convert the coordinates from screen relative to client area.

void iupdrvClientToScreen ( Ihandle *  ih,
int *  x,
int *  y 

Convert the coordinates from relative client area to screen.

int iupdrvIsVisible ( Ihandle *  ih  ) 

Returns true if the element is visible.

int iupdrvIsActive ( Ihandle *  ih  ) 

Returns true if the element is active.

void iupdrvSetFocus ( Ihandle *  ih  ) 

Actually changes the focus to the given element.

void iupdrvSetVisible ( Ihandle *  ih,
int  enable 

Changes the visible state of an element. Not used for dialogs.

void iupdrvSetActive ( Ihandle *  ih,
int  enable 

Changes the active state of an element.

void iupdrvPostRedraw ( Ihandle *  ih  ) 

Post a redraw of a control and children.

void iupdrvRedrawNow ( Ihandle *  ih  ) 

Force a redraw of a control and children.

void iupdrvReparent ( Ihandle *  ih  ) 

Reparent the native control.

void iupdrvPaintFocusRect ( Ihandle *  ih,
void *  gc,
int  x,
int  y,
int  w,
int  h 

Draws a focus rectangle gc is:

  • HDC in Win32
  • GC in Motif
  • unused in GTK2
  • cairo_t in GTK3 When using CD, use the "GC" CD canvas attribute.
int iupdrvGetScrollbarSize ( void   ) 

Size of the scrollbar.

void iupdrvActivate ( Ihandle *  ih  ) 

Activates a button or toggle.

int iupdrvMenuGetMenuBarSize ( Ihandle *  ih  ) 

Returns the height of a menu bar.

void iupdrvSendKey ( int  key,
int  press 

Sends a global keyboard message.

void iupdrvSendMouse ( int  x,
int  y,
int  bt,
int  status 

Sends a global mouse message. status: 2=double pressed, 1=pressed, 0=released, -1=move

void iupdrvWarpPointer ( int  x,
int  y 

Moves the cursor on screen.

void iupdrvKeyEncode ( int  key,
unsigned int *  keyval,
unsigned int *  state 

Translates an IUP key definition into a system definition.

void iupdrvSleep ( int  time  ) 

Suspends execution for the specified number of milliseconds.