4 * Copyright 2006 Develer S.r.l. (http://www.develer.com/)
5 * This file is part of DevLib - See README.devlib for information.
10 * \author Bernardo Innocenti <bernie@develer.com>
12 * \brief Very simple hierarchical windowing system.
14 * All functions in this module are to be intended as methods
15 * of the Window class. Please see its documentation
16 * for a module-wise introduction.
23 *#* Revision 1.3 2006/07/19 12:56:27 bernie
24 *#* Convert to new Doxygen style.
26 *#* Revision 1.2 2006/01/26 00:36:48 bernie
27 *#* Const correctness for some new functions.
29 *#* Revision 1.1 2006/01/23 23:14:29 bernie
30 *#* Implement simple, but impressive windowing system.
37 #include <mware/list.h> /* Node, List */
38 #include <gfx/gfx.h> /* coord_t */
44 * Window handle and context structure.
46 * A window is a small rectangular area on the
47 * screen backed by its own bitmap where you
50 * A window can contain any number of children
51 * sub-windows that can be depth arranged with
52 * respect to their siblings.
54 * At any time, a window and all its children
55 * can be drawn into another bitmap to display
56 * a complete screen, taking depth and
57 * overlapping into account.
59 * This rendering model is commonly referred to as
60 * screen composition, and is quite popular among
61 * modern windowing systems.
65 Node link; /**< Link us with other siblings into our parent. */
66 struct Window *parent; /**< Our parent window. NULL for the root window. */
68 Bitmap *bitmap; /**< Pixel storage for window contents. */
69 Rect geom; /**< [px] Window size and position relative to parent. */
72 * List of child windows, arranged by depth (front to back).
74 * Child top/left coordinates are relative to us.
81 * Public function prototypes
83 void win_compose(Window *w);
84 void win_open(Window *w, Window *parent);
85 void win_close(Window *w);
86 void win_raise(Window *w);
87 void win_setGeometry(Window *w, const Rect *new_geom);
88 void win_move(Window *w, coord_t left, coord_t top);
89 void win_resize(Window *w, coord_t width, coord_t height);
90 void win_create(Window *w, Bitmap *bm);
94 #endif /* GFX_WIN_H */