Input::Binding for non-C++ language bindings

Quietly insert forward declaration of a Input::Binding class, and make
it a friend of Input::Event and Input::Session_client. This is to allow
non-C++ language bindings (Nim) to access private members by providing
their own implementation of the Binding class.

Fix #2889
This commit is contained in:
Ehmry - 2018-06-27 11:31:59 +02:00 committed by Norman Feske
parent d068eaa9f7
commit c18bee3d5b
2 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,7 @@ namespace Input {
struct Touch_release { Touch_id id; };
class Event;
class Binding;
}
@ -74,6 +75,8 @@ class Input::Event
template <typename R, typename T>
static Genode::Point<R> _xy(T const &a) { return Genode::Point<R>(a.x, a.y); }
friend class Input::Binding;
public:
/**

View File

@ -31,6 +31,8 @@ class Input::Session_client : public Genode::Rpc_client<Session>
Genode::size_t const _max_events =
_event_ds.size() / sizeof(Input::Event);
friend class Input::Binding;
public:
Session_client(Genode::Region_map &local_rm, Session_capability session)