X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwm_layer_control.hpp;h=7a283b9feae219fb831b18d88776d5f540f64e5f;hb=31482a71ab968f1214a1cba600921c9f493f183b;hp=10b2082057958e3c3ec5deb16455fc793ed4a1b0;hpb=359f7cd7b49d714bc7cce3fc702c353455a5f168;p=apps%2Fagl-service-windowmanager.git diff --git a/src/wm_layer_control.hpp b/src/wm_layer_control.hpp index 10b2082..7a283b9 100644 --- a/src/wm_layer_control.hpp +++ b/src/wm_layer_control.hpp @@ -44,8 +44,8 @@ class LayerControlCallbacks { LayerControlCallbacks(const LayerControlCallbacks &obj) = default; // callback functions - void test(unsigned i) { HMI_DEBUG("test %d", i); } std::function surfaceCreated; + std::function surfaceDestroyed; /* std::function surfaceDestroyed; std::function layerCreated; std::function layerDestroyed; */ @@ -64,8 +64,10 @@ class LayerControl WMError init(const LayerControlCallbacks& cb); void createNewLayer(unsigned id); unsigned getNewLayerID(const std::string& role, std::string* layer_name); + std::shared_ptr getWMLayer(unsigned layer); + std::shared_ptr getWMLayer(std::string layer_name); struct rect getAreaSize(const std::string& area); - void setupArea(double scaling); + void setupArea(const rectangle& base_rct, double scaling); Screen getScreenInfo(); double scale(); // void setRenderOrder(const std::vector layer_render_order); @@ -73,26 +75,34 @@ class LayerControl // std::vector>& getAllLayers(); // std::vector getRenderOrder(const std::string& layer_name); WMError updateLayer(LayerState& layer_state); - WMError commitChange(); + WMError renderLayers(); + // WMError renderWMLayers(); void undoUpdate(); WMError layoutChange(const WMAction& action); WMError visibilityChange(const WMAction &action); + void terminateApp(const std::shared_ptr client); // Don't use this function. void dispatchCreateEvent(ilmObjectType object, unsigned id, bool created); - void dispatchPropertyChangeEvent(unsigned id, struct ilmSurfaceProperties*, t_ilm_notification_mask); - void dispatchPropertyChangeEvent(unsigned id, struct ilmLayerProperties*, t_ilm_notification_mask); + void dispatchSurfacePropChangeEvent(unsigned id, struct ilmSurfaceProperties*, t_ilm_notification_mask); + void dispatchLayerPropChangeEvent(unsigned id, struct ilmLayerProperties*, t_ilm_notification_mask); + private: WMError makeVisible(const std::shared_ptr client); WMError makeInvisible(const std::shared_ptr client); + bool moveForeGround(const std::shared_ptr client); + bool moveBackGround(const std::shared_ptr client); WMError loadLayerSetting(const std::string& path); WMError loadAreaDb(const std::string& path); std::vector> wm_layers; + std::unordered_map lid2wmlid; std::unordered_map area2size; unsigned screenID; struct ilmScreenProperties screen_prop; double scaling; + int offset_x; + int offset_y; LayerControlCallbacks cb; };