3 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
12 #include <l4/mag-gfx/gfx_colors>
14 #include <l4/cxx/string>
15 #include <l4/cxx/dlist>
16 #include <l4/cxx/observer>
18 namespace Mag_server {
22 class Session : public cxx::D_list_item<Session>
27 Mag_gfx::Rgb32::Color _color;
38 struct Property_handler
42 void (*handler)(Session *, Property_handler const *h, cxx::String const &value);
46 : _flags(0), _bg(0), _color(Mag_gfx::Rgb32::Black), _label(0), _ntfy(0)
49 void set_notifier(cxx::Notifier *n) { _ntfy = n; }
51 bool ignore() const { return _flags & F_ignore; }
60 char const *label() const { return _label; }
61 Mag_gfx::Rgb32::Color color() const { return _color; }
62 View *background() const { return _bg; }
64 void color(Mag_gfx::Rgb32::Color color) { _color = color; }
65 void background(View *bg) { _bg = bg; }
67 static void set_label_prop(Session *s, Property_handler const *, cxx::String const &v);
68 static void set_color_prop(Session *s, Property_handler const *, cxx::String const &v);
74 typedef cxx::D_list<Session> Session_list;