win.c File Reference
Very simple hierarchical windowing system. More...
#include "win.h"#include <struct/list.h>#include <gfx/gfx.h>Go to the source code of this file.
Functions | |
| void | win_compose (Window *w) |
| Map the contents of all child-windows into the bitmap of w. | |
| void | win_open (Window *w, Window *parent) |
| Map window w into parent. | |
| void | win_close (Window *w) |
| Detach window from its parent. | |
| void | win_raise (Window *w) |
| Move window to the topmost position relative to its sibling. | |
| void | win_setGeometry (Window *w, const Rect *new_geom) |
| Set window position and size at the same time. | |
| void | win_move (Window *w, coord_t left, coord_t top) |
| Move window to specified position. | |
| void | win_resize (Window *w, coord_t width, coord_t height) |
| Resize the rectangle of a window. | |
| void | win_create (Window *w, Bitmap *bm) |
| Initialize a new window structure. | |
Detailed Description
Very simple hierarchical windowing system.
- Version:
- Id
- win.c 2506 2009-04-15 08:29:07Z duplo
All functions in this module are to be intended as methods of the Window class. Please see its documentation for a module-wise introduction.
- See also:
- struct Window
Definition in file win.c.
Function Documentation
| void win_close | ( | Window * | w | ) |
Detach window from its parent.
Closing a window causes it to become orphan of its parent. Its content will no longer appear in its parent after the next refresh cycle.
- Note:
- Closing a window that has not been previously opened is illegal.
- See also:
- win_open()
| void win_compose | ( | Window * | w | ) |
Initialize a new window structure.
The new window initial position is set to (0,0). The size is set to the size of the installed bitmap, or (0,0) if there's no backing store.
- bm The bitmap to install as backing store for drawing into the window, or NULL if the window is not drawable.
Move window to specified position.
Move the window top-left corner to the pixel coordinates left and top, which are relative to the parent window.
- Note:
- A window can also be moved outside the borders of its parent, or at negative coordinates.
- It is allowed to move an orphan window.
Map window w into parent.
The new window becomes the topmost window.
- Note:
- Opening a window twice is illegal.
- See also:
- win_close()
| void win_raise | ( | Window * | w | ) |
Move window to the topmost position relative to its sibling.
- See also:
- win_move(), win_resize(), win_setGeometry()
Set window position and size at the same time.
This function is equivalent to subsequent calls to win_move() and win_resize() using the coordinates provided by the new_geom rectangle.
- Note:
- The xmax and ymax members of new_geom are non-inclusive, as usual for the Rect interface.
- See also:
- win_move()
- win_resize()
