// 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; */
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);
// 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);
unsigned screenID;
struct ilmScreenProperties screen_prop;
double scaling;
+ int offset_x;
+ int offset_y;
LayerControlCallbacks cb;
};