gandi_active(3) - Linux man page
Name
GANDI_activateNwidget, GANDI_activatenext, GANDI_activateprev, GANDI_activatewidget, GANDI_getactive_widget
Synopsis
#include <gandi_core.h>
GANDIW_widget *GANDI_activateNwidget(int n);
GANDIW_widget *GANDI_activate(bool next);
GANDIW_widget *GANDI_activatenext();
GANDIW_widget *GANDI_activateprev();
int GANDI_activatewidget(void *ws);
GANDIW_widget *GANDI_getactive_widget();
GANDIW_widget *GANDI_active;
Description
GANDIW_widget *GANDI_activateNwidget(int n);
- If you know what the index is of each widget in your program then you could activate a particular widget with this function. However, it recomended that you do not use this function but rather use GANDI_activatewidget instead although it is slower.
GANDIW_widget *GANDI_activate(bool next);
- This routine moves the focus to the nearest (by order) widget - next or previous. By default the keys TAB and M-TAB cause the same result.
GANDIW_widget *GANDI_activatenext();
GANDIW_widget *GANDI_activateprev();
- Macros for GANDI_activate(TRUE) and GANDI_activate(FALSE).
int GANDI_activatewidget(void *ws);
- Makes a specified widget active. If you have not activated any widget and run the driver GANDI_driver(3gandi), the first possible widget will be activated.
GANDIW_widget *GANDI_getactive_widget();
- This macros reads a global array of registrated widgets and returns GANDI_widget[GANDI_actwidget]. But do not use any of the global variables directly, use special wrapper functions instead (like this).
GANDIW_widget *GANDI_active;
- An abbreviation from the GANDI_getactive_widget. It is a macro too.
Return Value
All functions (excluding GANDI_activatewidget) return a pointer to the widget which is active just after the function process or NULL if something goes wrong or there are no widgets left which are able of being activated.
GANDI_activatewidget returns the order number of the widget which becomes active.
Notes
GANDI_widget variable contains only the core part of each widget (of type GANDIW_widget *). If you want to get the active widget of the library defined type (e.g. GANDIW_some_widget_name *), do it thus:
( (GANDIW_some_widget_name *) (GANDI_active ? GANDI_wtv(GANDI_active) : NULL) )
See Also
gandi(3gandi) gandi_driver(3gandi)
