X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/5a0e6ead0fbfbb912cd817abad695c078e82481c..8d9e85aaae867f39cdd610261e3a4181c25add2d:/l4/pkg/mag/plugins/client_fb/client_fb.h diff --git a/l4/pkg/mag/plugins/client_fb/client_fb.h b/l4/pkg/mag/plugins/client_fb/client_fb.h index c7f16fe6f..902871ea9 100644 --- a/l4/pkg/mag/plugins/client_fb/client_fb.h +++ b/l4/pkg/mag/plugins/client_fb/client_fb.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -21,30 +22,36 @@ namespace Mag_server { class Client_fb -: public View, public Object, +: public View, public Session, public Object, private L4Re::Util::Video::Goos_svr, public L4Re::Util::Icu_cap_array_svr { private: typedef L4Re::Util::Icu_cap_array_svr Icu_svr; Core_api const *_core; - Point _offs; Texture *_fb; - Area _bar_size; + int _bar_height; L4Re::Util::Auto_cap::Cap _ev_ds; L4Re::Rm::Auto_region _ev_ds_m; L4Re::Event_buffer _events; Irq _ev_irq; + enum + { + F_fb_fixed_location = 1 << 0, + F_fb_shaded = 1 << 1, + F_fb_focus = 1 << 2, + }; + unsigned _flags; public: - Client_fb(Core_api const *core, Rect const &pos, Point const &offs, - Texture *fb, L4::Cap const &fb_ds); + int setup(); + + explicit Client_fb(Core_api const *core); L4::Cap rcv_cap() const { return _core->rcv_cap(); } - void set_offs(Point const &offs) - { _offs = offs; } + void toggle_shaded(); void draw(Canvas *, View_stack const *, Mode) const; void handle_event(L4Re::Event_buffer::Event const &e, @@ -53,7 +60,15 @@ public: int dispatch(l4_umword_t obj, L4::Ipc_iostream &s); int refresh(int x, int y, int w, int h); + Area visible_size() const; + void destroy(); + + Session *session() const { return const_cast(this); } + + static void set_geometry_prop(Session *s, Property_handler const *p, cxx::String const &v); + static void set_flags_prop(Session *s, Property_handler const *p, cxx::String const &v); + static void set_bar_height_prop(Session *s, Property_handler const *p, cxx::String const &v); }; }