#include #include #include namespace raleigh { window::window(widget &root) : size(root.size), root(root) { root.w = this; root.window_offset = coord(0, 0); root.notify_window_change(); pixbuf = (_pixel_t *)get_block(size.x * size.y * sizeof(_pixel_t)); root.paint(pixbuf, size.x); handle = _new_window(size.x, size.y, pixbuf); open_windows.add_front(*this); } window::try_actions_return_t window::try_actions() { struct window_action wa; window::try_actions_return_t got = NONE; while (1) { _get_win_action(handle, &wa); if (!wa.action_type) return got; if ((wa.action_type == wa.KEY_DOWN) && (wa.as_key.modifiers & wa.as_key.ALTS) && (wa.as_key.key_id == wa.as_key.KEY_F4)) return DELETE; got = GOOD; //TODO } } }