X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fplatform%2Fbase_platform.h;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fsrc%2Fanbox%2Fplatform%2Fbase_platform.h;h=1b43958da8375ff9e5a839a306dda81920c02b30;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/src/anbox/platform/base_platform.h b/src/type3_AndroidCloud/anbox-master/src/anbox/platform/base_platform.h new file mode 100644 index 0000000..1b43958 --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/src/anbox/platform/base_platform.h @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2016 Simon Fels + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + * + */ + +#ifndef ANBOX_PLATFORM_POLICY_H_ +#define ANBOX_PLATFORM_POLICY_H_ + +#include "anbox/graphics/rect.h" +#include "anbox/wm/window_state.h" + +#include + +class Renderer; + +namespace anbox { +namespace audio { +class Sink; +class Source; +} // namespace audio +namespace wm { +class Window; +class Manager; +} // namespace wm +namespace input { +class Manager; +} // namespace input +namespace platform { +class BasePlatform { + public: + virtual ~BasePlatform() {} + + virtual std::shared_ptr create_window(const anbox::wm::Task::Id &task, const anbox::graphics::Rect &frame, const std::string &title) = 0; + + struct ClipboardData { + std::string text; + }; + + virtual void set_clipboard_data(const ClipboardData &data) = 0; + virtual ClipboardData get_clipboard_data() = 0; + + virtual std::shared_ptr create_audio_sink() = 0; + virtual std::shared_ptr create_audio_source() = 0; + + virtual void set_renderer(const std::shared_ptr &renderer) = 0; + virtual void set_window_manager(const std::shared_ptr &window_manager) = 0; + + virtual bool supports_multi_window() const = 0; +}; + +struct Configuration { + graphics::Rect display_frame = graphics::Rect::Invalid; + bool single_window = false; + bool no_touch_emulation = false; + bool server_side_decoration = false; +}; + +std::shared_ptr create(const std::string &name, + const std::shared_ptr &input_manager, + const Configuration &config); +} // namespace platform +} // namespace anbox + +#endif