2011-12-22 15:19:25 +00:00
|
|
|
/*
|
2020-06-11 12:27:20 +00:00
|
|
|
* \brief Client-side GUI session interface
|
2011-12-22 15:19:25 +00:00
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2006-08-23
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2006-2017 Genode Labs GmbH
|
2011-12-22 15:19:25 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2011-12-22 15:19:25 +00:00
|
|
|
*/
|
|
|
|
|
2020-06-11 12:27:20 +00:00
|
|
|
#ifndef _INCLUDE__GUI_SESSION__CLIENT_H_
|
|
|
|
#define _INCLUDE__GUI_SESSION__CLIENT_H_
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2020-06-11 12:27:20 +00:00
|
|
|
#include <gui_session/capability.h>
|
2011-12-22 15:19:25 +00:00
|
|
|
#include <base/rpc_client.h>
|
|
|
|
|
2020-06-12 09:23:57 +00:00
|
|
|
namespace Gui { struct Session_client; }
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
|
2024-08-05 11:47:22 +00:00
|
|
|
struct Gui::Session_client : Rpc_client<Session>
|
2013-10-14 19:31:14 +00:00
|
|
|
{
|
2024-08-06 10:28:15 +00:00
|
|
|
Session_client(Capability<Session> session) : Rpc_client<Session>(session) { }
|
2017-01-09 14:18:49 +00:00
|
|
|
|
2024-08-06 10:28:15 +00:00
|
|
|
Framebuffer::Session_capability framebuffer() override {
|
|
|
|
return call<Rpc_framebuffer>(); }
|
2013-10-14 19:31:14 +00:00
|
|
|
|
2024-08-06 10:28:15 +00:00
|
|
|
Input::Session_capability input() override {
|
|
|
|
return call<Rpc_input>(); }
|
2013-10-14 19:31:14 +00:00
|
|
|
|
2024-10-01 12:56:18 +00:00
|
|
|
Info_result info() override {
|
|
|
|
return call<Rpc_info>(); }
|
|
|
|
|
2024-09-02 15:27:09 +00:00
|
|
|
[[nodiscard]] View_result view(View_id id, View_attr const &attr) override {
|
2024-08-09 12:27:26 +00:00
|
|
|
return call<Rpc_view>(id, attr); }
|
2024-06-10 14:03:40 +00:00
|
|
|
|
2024-09-02 15:27:09 +00:00
|
|
|
[[nodiscard]] Child_view_result child_view(View_id id, View_id parent, View_attr const &attr) override {
|
2024-08-09 12:27:26 +00:00
|
|
|
return call<Rpc_child_view>(id, parent, attr); }
|
2014-06-04 13:58:49 +00:00
|
|
|
|
2024-08-08 15:38:36 +00:00
|
|
|
void destroy_view(View_id view) override {
|
2024-08-06 10:28:15 +00:00
|
|
|
call<Rpc_destroy_view>(view); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-09-02 15:27:09 +00:00
|
|
|
[[nodiscard]] Associate_result associate(View_id id, View_capability view) override {
|
2024-08-14 12:43:37 +00:00
|
|
|
return call<Rpc_associate>(id, view); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-09-02 15:27:09 +00:00
|
|
|
[[nodiscard]] View_capability_result view_capability(View_id id) override {
|
2024-08-08 15:38:36 +00:00
|
|
|
return call<Rpc_view_capability>(id); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-08-08 15:38:36 +00:00
|
|
|
void release_view_id(View_id id) override {
|
|
|
|
call<Rpc_release_view_id>(id); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-08-06 10:28:15 +00:00
|
|
|
Dataspace_capability command_dataspace() override {
|
|
|
|
return call<Rpc_command_dataspace>(); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-08-06 10:28:15 +00:00
|
|
|
void execute() override { call<Rpc_execute>(); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-09-25 09:34:39 +00:00
|
|
|
[[nodiscard]] Buffer_result buffer(Framebuffer::Mode mode) override {
|
|
|
|
return call<Rpc_buffer>(mode); }
|
2014-06-06 15:26:53 +00:00
|
|
|
|
2024-08-06 10:28:15 +00:00
|
|
|
void focus(Gui::Session_capability session) override {
|
|
|
|
call<Rpc_focus>(session); }
|
2013-10-14 19:31:14 +00:00
|
|
|
};
|
2011-12-22 15:19:25 +00:00
|
|
|
|
2020-06-11 12:27:20 +00:00
|
|
|
#endif /* _INCLUDE__GUI_SESSION__CLIENT_H_ */
|