aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-07-27Fix crashed application can re-launchKazumasa Mitsunari1-36/+23
WM can't reset the state when application crashes, after the below commit. This patch fix the crashed application can re-launch. Related commit: https://gerrit.automotivelinux.org/gerrit/#/c/14871/ Bug-AGL: SPEC-1471 Change-Id: I46019b30cc8e9a341b4b681a0288f053b3ac1b30 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-07-19Revert "Add PolicyManager as plugin"Jan-Simon Moeller1-0/+12
This reverts commit 99b6f4d2fcd421d3a760a88a67e511fb6fc98068. Change-Id: I8725ca05a3e3fa0ea9e1db935e9e7d5b85a9affd
2018-07-12Add PolicyManager as pluginYuta Doi1-12/+0
PolicyManager decides next layout by using occured event and current state based on the policy table. And PolicyManager is plugin for WindowManager. Therefore the OEMs can replace it. This patch provides PolicyManager I/F as reference implementation and does not have policy table. Therefore PolicyManager updates each layers to draw the applications in normal.full area in accordance with just like activate/deactivate request. [APIs of PolicyManager class] - int initialize(void) Initialize PolicyManger. input: none output: 0(success), -1(error) - void registerCallback(CallbackTable callback_table) Register callback functions. input: the pointers of callback handlers output: none "CallbackTable" type is as follows: typedef struct { Handler onStateTransitioned; Handler onError; } CallbackTable; "Handler" type is as follows: using Handler = std::function<void(json_object *)>; - int setInputEventData(json_object *json_in) Set input event data for the policy table. input: input event data as json_object output: 0(success), -1(error) - int executeStateTransition(void) Execute state transition by using set input event data. input: none output: 0(success), -1(error) - void undoState(void) Undo state only once per once state transition. input: none output: none [Callbacks of PolicyManager class] - void onStateTransitioned(json_object *json_out) When state transition succeeds, this callback is called. The argument json_out has the state after transition. - void onError(json_object *json_out) When state transition fails, this callback is called. The argument json_out has the error information like message, inputed event datas and etc.. Bug-AGL: SPEC-1537 Change-Id: I44b771d4145078bf3ea05e26165bb9c1a03b10c3 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2018-07-09Rename APIsYuta Doi1-4/+4
rename WindowManager APIs as follows: - activateSurface -> activateWindow - deactivateSurface -> deactivateWindow The "surface" means information of display material frame buffer managed 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: Ic7da4e5ddb759e642a2b60ecf61e327aaf74a699 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2018-06-27Fix class name "App" to "WindowManager"Kazumasa Mitsunari1-31/+31
struct App is core class of Window Manager. The name of "struct App" is strange so rename it to WindowManager. Change-Id: Ia5f2e5acbadb8d58fe772aec0cd15a4a2e91369e Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-06-27Refactor: Integrate rework handles by applicationKazumasa Mitsunari1-27/+37
Integrate rework handles information by application. Window Manager handles request by "task" and block other requests until the task finishes. This is necessary because window mangaer task consists of 2 asyncronous parts, which are checking policy and redraw sync, and ensures the 2 parts should be managed consecutively. Bug-AGL: SPEC-1510 Change-Id: I9a1d5daad5b47dd5e68a437173b3d5f1b3923865 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-06-25Bug Fix: Window Manager doesn't react after killing app processKazumasa Mitsunari1-0/+12
After killing an application which has surfaces, Window Manager releases the information for app. Then, invalid access happens. As a result, Application seems to loose their ability to display. This is a potencial bug caused by upgrades of wayland-ivi-extension, so this problem didn't occur in eel branch. This patch fixes the bug. Bug-AGL: SPEC-1421 Change-Id: If921dd4ea6bd46454356e97e1be7e5c136c7383b Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-06-25Clean: remove useless headersKazumasa Mitsunari1-3/+1
* Shorten build time * Remove unnecessary dependencies Change-Id: I960b2a21124cabc62ef73436fb5a7ab5191c4e0d Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-06-25Fix Client Context of afb-binderKazumasa Mitsunari1-8/+10
* Rename wmClientCtxt to WMClientCtxt * Hold application name and requested role Change-Id: I7d600c66bd905b4847d34049b81aa361dd4fb528 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-05-31Format source codesKazumasa Mitsunari1-514/+610
* Format source codes * Change indent spaces to 4 from 3 * Remove trailing spaces in config.xml Change-Id: I745ba6c7cc4dcf4177add81666351c3c01de7d44 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-03-19Change reply timingKazumasa Mitsunari1-21/+23
Some events were emitted in a function before it replies. This patch changes * The function checks parameter then reply error if it is incorrect. * After checking parameters, the function continues to process. The exeption is the syncronous functions such as requestSurface. Change-Id: I168eba3e2b70d53615a4221bcbbba6bc6096c1db Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-02-09Add APIs which can get information about the display and the surface areaYuta Doi1-0/+61
getDisplayInfo() can get the display information as follows: - width[pixel] - height[pixel] - width[mm] - height[mm] NOTE: It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display, but the value is different with measured value. value from wl_output::geometry(): width:320 height:520 measured value : width:193 height:343 getAreaInfo() can get the information of area drawn by the application as follows: - x-coordinate - y-coordinate - width - height The details are described in doc/ApplicationGuide.md. Bug-AGL: SPEC-1087 Change-Id: I9e6d64ff04e0845b83c69db374d06af17a6d6b66 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2018-01-24Change the protocol from ivi-controller to ivi-wmYuta Doi1-1/+1
This patch is for master branch only. For using wayland-ivi-extension version 2.x, the wayland protocol in WindowManager is changed from ivi-controller to ivi-wm. NOTE: If using this patch, the modification for AGL/meta-agl which described in SPEC-1244 is necessary. Bug-AGL: SPEC-1244 Change-Id: I5489db202dfeec8f4626aee53bd1f86c145b95d9 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2017-12-25Enable an application re-launchKazumasa Mitsunari1-0/+54
When an application dies after requestSurface, the application can't be launched because Window Manager doesn't know the application is dead and doesn't clean up its database. In other case, when Mixer app dies due to pulse audio crash just before Window Manager handles surface memory, the connection between weston and Window Manager is dead. So add following * Add context setting with window manager clients. Terminate the context and clean up WM database if a client application is dead. * Add layout_commit() after add surfaces to layer. [PatchSet 2] * Add layout_commit() after add surfaces to layer in api_request_surface Bug-AGL: SPEC-1086 Change-Id: I6ecae2606ac644e49a3383ba849390f8c235f187 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-12-21Clean up source codeKazumasa Mitsunari1-109/+54
To reduce the files and redundant code, * Remove afb_binding_api.* files and generate-binding-glue.py. * Merge them into other source codes. Change-Id: Ib61350ee6a42d73efc3fa29fa0c4868145a88e2e Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-12-19Remove automatic code generationKazumasa Mitsunari1-4/+393
To handle the request from binder(applications) more flexibly, we have to remove automatic code generation. Change-Id: Id14ab749cca68b5aa30376ba3ac543372df87233 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-12-19Exclude execusion bitKazumasa Mitsunari1-0/+0
Change-Id: I8eee96305be1c8808442af92b254fce857e3dfd6 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-12-11Revert "Add APIs which can get information of display and area"Tadao Tanikawa1-11/+2
This reverts commit 6aaba1066fe89f324d4bae67497f4035fe997d5f. To fix double posts to Gerrit Review and repository directly. Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
2017-12-11Add APIs which can get information of display and areaYuta Doi1-2/+11
getDisplayInfo() can get the display information as follows: - width[pixel] - height[pixel] - width[mm] - height[mm] NOTE: It uses wl_output::geometry() for getting physical width[mm] and height[mm] of the display, but the value is different with measured value. value from wl_output::geometry(): width:320 height:520 measured value : width:193 height:343 getAreaInfo() can get the information of area drawn by the application as follows: - x-coordinate - y-coordinate - width - height The details are described in doc/ApplicationGuide.md. Change-Id: I41eec6251527862ef25d1b84cd37d736d3f9c8aa Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2017-11-10Remove and replace the commentsYuta Doi1-6/+3
Remove the unnecessary comments and replace ascii-art comments with doxygen format. Change-Id: Id1abf56db58070a83f403a1f8280bc9888e7de09 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2017-11-01Fix copyright to TOYOTAeel_4.99.2eel/4.99.24.99.2Kazumasa Mitsunari1-1/+1
Change-Id: I8ac0463a8efa215477593a96a45f08e38dc46e36 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-11-01Add debug message macros controlled by environment variableYuta Doi1-13/+13
Add a HMI_DEBUG macro to print debug messages. It is controlled by the USE_HMI_DEBUG environment variable. Change-Id: I3bc5bf2f3b0e9f5ee06f340053f29ad36e7d9dbb Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2017-11-01Modify event notification from broadcast to subscribe modelKazumasa Mitsunari1-5/+5
The event notification was implemented using a broadcast model, change it to a subscription model. Bug-AGL: SPEC-987 Change-Id: I344a3a73320eb81c3f670736b032f07400bb8f64 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-11-01Add drawing_area parameter to APIKazumasa Mitsunari1-2/+18
Add drawing_area parameter in activateSurface API and syncDraw event. This is needed for the following feature - To request writting area - To inform application of writting area I assume that "normal.full" is a full size area in application area, and "split.[main|sub]" is an upper/lower half size area in application area. For example, when Navigation app receives syncDraw event which the label is Navigation, and the area name is "normal.full", it means Navigation will be displayed as a full size(in application area). When Navigation app receives syncDraw event which the label is same, and the area name is "split.main", it means Navigation will be displayed as an upper half size(in application area). Application must return endDraw after changing its design according to the size, when the application receives syncDraw event. Layout is defined in layers.json file. Current layout is set to full screen. Bug-AGL: SPEC-987 Change-Id: I5efed3dda88275e18dc1d951b98bdfcfc79ee46b Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2017-10-09Add agl-service-windowmanager-2017zheng_wenlong1-0/+175
Add a new binding agl-service-windowmanager-2017. A image about this see JIRA SPEC-915. [PatchSet2] Use aglwgt make package. [PatchSet3] Modify to wait until wayland compositor starts up. Bug-AGL: SPEC-925 Change-Id: I8729bb71b5e91d5b009a5bab77232d92605c43ea Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>