gandi_move(3) - Linux man page

Name

Synopsis

#include <gandi_core.h>

int GANDI_mvonly_widget(void *w, int by, int bx);

int GANDI_mvwidget(void *w, int by, int bx);

int GANDI_mvwidget_border(void *w, int by, int bx);

int GANDI_add_move_o(void *w, void *subj);

int GANDI_clr_move_o(void *w);

bool GANDI_is_move_o(void *w, void *subj);

int GANDI_rem_move_o(void *w, void *subj);

Description

int GANDI_mvonly_widget(void *w, int by, int bx);

Moves w to the position (by;bx) which are the coordinates of the top left corner. The effect is that all w's panels (see panel(3CURSES)) will be moved preserving their co-position.

int GANDI_mvwidget(void *w, int by, int bx);

Each GANDI widget has the property move_o (see gandi_gandiw(3gandi)) which is a list of widgets to be moved with (or instead of) the w. This function goes through this list recursively and then applies GANDI_mvonly_widget to each of them (coordinates by and bx will be calculated for each one in order to save their co-location). While looking through the move_o list all unmovable widgets are ignored so these lists are not looked through.

A widget may be not moved in the case its move_o list is empty or e.g. lists of all widgets derived from it are empty. For the user it has the same effect as a widget with movable = FALSE but GANDI_getwidget_movable (see gandi_gandiw(3gandi)) checks the movable property only.

If everything is all right the return value is OK.

int GANDI_mvwidget_border(void *w, int by, int bx);

Like GANDI_mvwidget but the specified position relates to the border rather then to the work area.

int GANDI_add_move_o(void *w, void *subj);

Adds subj into the w's move_o list.

Retuns either OK or ERR.

int GANDI_clr_move_o(void *w);

Clears the w's move_o list so it become an empty array. A widget with a clear move_o cannot be moved (see notice above in the GANDI_mvwidget section).

Retuns either OK or ERR.

bool GANDI_is_move_o(void *w, void *subj);

Checks whether subj is included into the w's move_o list.

Returns either TRUE or FALSE.

int GANDI_rem_move_o(void *w, void *subj);

Removes subj from the w's move_o list.

Retuns either OK or ERR.

Notes

Very bad things may occure if the widget is killed but still exists in the move_o of some other widget. Of course the problem will occur when the widget containing the killed widget is moved.

GANDI_mvwidget has a defence against an infinite loop, so it is safe when one widget refers to another and that one refers to the former again.

See Also

gandi_core(3gandi) gandi_gandiw(3gandi) panel(3CURSES)