diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-07-02 18:02:57 +0900 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2018-07-09 12:57:40 +0000 |
commit | d5d31fe493c88756831e7cf36255acdccbbdde98 (patch) | |
tree | 86947cd7cbecada9f87c2ea807547c6327dddfd0 /src | |
parent | ee162e3e74baa74411441304edf8389eeab04995 (diff) |
Rename APIsHEADjellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish_9.99.1jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.2jellyfish/9.99.1icefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.1halibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut_7.99.3halibut_7.99.2halibut_7.99.1halibut_7.90.0halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.0halibut/7.99.3halibut/7.99.2halibut/7.99.1halibut/7.90.0guppy_6.99.4guppy_6.99.3guppy_6.99.2guppy_6.99.1guppy_6.90.0guppy/6.99.4guppy/6.99.3guppy/6.99.2guppy/6.99.1guppy/6.90.0flounder_5.99.6flounder_5.99.5flounder_5.99.4flounder_5.99.3flounder_5.99.2flounder/5.99.6flounder/5.99.5flounder/5.99.4flounder/5.99.3flounder/5.99.29.99.49.99.39.99.29.99.18.99.58.99.48.99.38.99.28.99.18.0.68.0.58.0.48.0.38.0.28.0.18.0.07.99.37.99.27.99.17.90.06.99.46.99.36.99.26.99.16.90.05.99.65.99.55.99.45.99.35.99.2masterhalibut
rename WindowManager APIs as follows:
- activateSurface -> activateWindow
- deactivateSurface -> deactivateWindow
The "surface" means information of display material frame buffer
anaged by Graphics Subsystem (Weston).
And the "window" means the right to draw on display.
The "surface" is physical information and used inside WindowManager.
So we think it is not good for "surface" to be included in API name.
These APIs provide the function
which is to activate/deactivate the right to draw for the applications.
So we change to "activateWindow/deactivateWindow".
We plan to delete the old API by GG.
Therefore the applications can use old APIs until GG,
but the warning "-Wdeprecated-declarations" is occured when compile.
After GG, old APIs can not be used.
If use it, the error is occured when compile.
Bug-AGL: SPEC-1565
Change-Id: Ic2e8893146fd41beb8f261a71a7e3b7c683d7838
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/qlibwindowmanager.cpp | 36 | ||||
-rw-r--r-- | src/qlibwindowmanager.h | 16 |
2 files changed, 40 insertions, 12 deletions
diff --git a/src/qlibwindowmanager.cpp b/src/qlibwindowmanager.cpp index 4a6419e..b264c94 100644 --- a/src/qlibwindowmanager.cpp +++ b/src/qlibwindowmanager.cpp @@ -51,30 +51,45 @@ int QLibWindowmanager::requestSurface(const QString &label) { } } -int QLibWindowmanager::activateSurface(const QString &label) { +int QLibWindowmanager::activateWindow(const QString &label) { json_object *obj = json_object_new_object(); string clabel = label.toStdString(); // Request default drawing area "normal.full" string cdrawing_area = wm->kStrLayoutNormal + "." + wm->kStrAreaFull; json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(clabel.c_str())); json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string(cdrawing_area.c_str())); - return this->wm->activateSurface(obj); + return this->wm->activateWindow(obj); } -int QLibWindowmanager::activateSurface(const QString &label, const QString &drawing_area) { +int QLibWindowmanager::activateWindow(const QString &label, const QString &drawing_area) { json_object *obj = json_object_new_object(); string clabel = label.toStdString(); string cdrawing_area = drawing_area.toStdString(); json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(clabel.c_str())); json_object_object_add(obj, wm->kKeyDrawingArea, json_object_new_string(cdrawing_area.c_str())); - return this->wm->activateSurface(obj); + return this->wm->activateWindow(obj); } -int QLibWindowmanager::deactivateSurface(const QString &label) { +int QLibWindowmanager::deactivateWindow(const QString &label) { json_object *obj = json_object_new_object(); string clabel = label.toStdString(); json_object_object_add(obj, wm->kKeyDrawingName, json_object_new_string(clabel.c_str())); - return this->wm->deactivateSurface(obj); + return this->wm->deactivateWindow(obj); +} + +// This API is deprecated, please use new API +int QLibWindowmanager::activateSurface(const QString &label) { + return this->activateWindow(label); +} + +// This API is deprecated, please use new API +int QLibWindowmanager::activateSurface(const QString &label, const QString &drawing_area) { + return this->activateWindow(label, drawing_area); +} + +// This API is deprecated, please use new API +int QLibWindowmanager::deactivateSurface(const QString &label) { + return this->deactivateWindow(label); } int QLibWindowmanager::endDraw(const QString &label) { @@ -90,15 +105,20 @@ void QLibWindowmanager::set_event_handler(enum QEventType et, return this->wm->set_event_handler(wet, std::move(f)); } -void QLibWindowmanager::slotActivateSurface(){ +void QLibWindowmanager::slotActivateWindow(){ // This is needed for first rendering when the app is launched if(!isActive){ qDebug("Let's show %s", qPrintable(applabel)); isActive = true; - this->activateSurface(applabel); + this->activateWindow(applabel); } } +// This API is deprecated, please use new API +void QLibWindowmanager::slotActivateSurface(){ + this->slotActivateWindow(); +} + QLibWindowmanager::QLibWindowmanager(QObject *parent) :QObject(parent), isActive(false) { diff --git a/src/qlibwindowmanager.h b/src/qlibwindowmanager.h index 9e80abb..8fb653d 100644 --- a/src/qlibwindowmanager.h +++ b/src/qlibwindowmanager.h @@ -54,14 +54,22 @@ public: // WM API Q_INVOKABLE int requestSurface(const QString &label); - Q_INVOKABLE int activateSurface(const QString &label); - Q_INVOKABLE int activateSurface(const QString &label, const QString &drawing_area); - Q_INVOKABLE int deactivateSurface(const QString &label); + Q_INVOKABLE int activateWindow(const QString &label); + Q_INVOKABLE int activateWindow(const QString &label, const QString &drawing_area); + Q_INVOKABLE int deactivateWindow(const QString &label); Q_INVOKABLE int endDraw(const QString &label); void set_event_handler(enum QEventType et, handler_fun f); + // These APIs are deprecated, please use new API + THIS_FUNCTION_IS_DEPRECATED(Q_INVOKABLE int activateSurface(const QString &label)); + THIS_FUNCTION_IS_DEPRECATED(Q_INVOKABLE int activateSurface(const QString &label, const QString &drawing_area)); + THIS_FUNCTION_IS_DEPRECATED(Q_INVOKABLE int deactivateSurface(const QString &label)); + public slots: - void slotActivateSurface(); + void slotActivateWindow(); + + // This API is deprecated, please use new API + THIS_FUNCTION_IS_DEPRECATED(void slotActivateSurface()); private: LibWindowmanager* wm; |