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.2 2006/01/26 00:36:48 bernie
24 *#* Const correctness for some new functions.
26 *#* Revision 1.1 2006/01/23 23:14:29 bernie
27 *#* Implement simple, but impressive windowing system.
34 #include <mware/list.h> /* Node, List */
35 #include <gfx/gfx.h> /* coord_t */
41 * Window handle and context structure.
43 * A window is a small rectangular area on the
44 * screen backed by its own bitmap where you
47 * A window can contain any number of children
48 * sub-windows that can be depth arranged with
49 * respect to their siblings.
51 * At any time, a window and all its children
52 * can be drawn into another bitmap to display
53 * a complete screen, taking depth and
54 * overlapping into account.
56 * This rendering model is commonly referred to as
57 * screen composition, and is quite popular among
58 * modern windowing systems.
62 Node link; /**< Link us with other siblings into our parent. */
63 struct Window *parent; /**< Our parent window. NULL for the root window. */
65 Bitmap *bitmap; /**< Pixel storage for window contents. */
66 Rect geom; /**< [px] Window size and position relative to parent. */
69 * List of child windows, arranged by depth (front to back).
71 * Child top/left coordinates are relative to us.
78 * Public function prototypes
80 void win_compose(Window *w);
81 void win_open(Window *w, Window *parent);
82 void win_close(Window *w);
83 void win_raise(Window *w);
84 void win_setGeometry(Window *w, const Rect *new_geom);
85 void win_move(Window *w, coord_t left, coord_t top);
86 void win_resize(Window *w, coord_t width, coord_t height);
87 void win_create(Window *w, Bitmap *bm);
91 #endif /* GFX_WIN_H */