Rename dispatchPropertyChangeEvent API
[apps/agl-service-windowmanager.git] / src / wm_layer_control.hpp
index df6c863..7a283b9 100644 (file)
@@ -45,6 +45,7 @@ class LayerControlCallbacks {
 
     // callback functions
     std::function<void(unsigned, unsigned)> surfaceCreated;
+    std::function<void(unsigned)> surfaceDestroyed;
     /* std::function<void(unsigned)> surfaceDestroyed;
     std::function<void(unsigned)> layerCreated;
     std::function<void(unsigned)> layerDestroyed; */
@@ -64,9 +65,9 @@ class LayerControl
     void createNewLayer(unsigned id);
     unsigned getNewLayerID(const std::string& role, std::string* layer_name);
     std::shared_ptr<WMLayer> getWMLayer(unsigned layer);
-    // std::shared_ptr<WMLayer> getWMLayer(std::string layer_name);
+    std::shared_ptr<WMLayer> 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<unsigned> layer_render_order);
@@ -74,19 +75,23 @@ class LayerControl
     // std::vector<std::shared_ptr<WMLayer>>& getAllLayers();
     // std::vector<unsigned> 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<WMClient> 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<WMClient> client);
     WMError makeInvisible(const std::shared_ptr<WMClient> client);
+    bool moveForeGround(const std::shared_ptr<WMClient> client);
+    bool moveBackGround(const std::shared_ptr<WMClient> client);
     WMError loadLayerSetting(const std::string& path);
     WMError loadAreaDb(const std::string& path);
 
@@ -96,6 +101,8 @@ class LayerControl
     unsigned screenID;
     struct ilmScreenProperties screen_prop;
     double scaling;
+    int offset_x;
+    int offset_y;
     LayerControlCallbacks cb;
 };