aboutsummaryrefslogtreecommitdiffstats
path: root/src/window_manager.hpp
AgeCommit message (Collapse)AuthorFilesLines
2018-08-31Update windowmanagerKazumasa Mitsunari1-1/+0
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-30Hide variable into privateKazumasa Mitsunari1-23/+19
Change-Id: I372504c030cd69f6f6e667e2370860020431b900 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-28Remove lookup_id and lookup_nameKazumasa Mitsunari1-2/+0
No need to wrap object Change-Id: I2cb403aabd6d55d7b06024e1535c26c48fe74ac7 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-22Start to rework using ilmControlKazumasa Mitsunari1-22/+8
Change-Id: Icfffea4c0587828f4dd863e9000e8aadb135c048 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-22Fix util function HMI_*Kazumasa Mitsunari1-3/+7
To reduce coding, change HMI_* Change-Id: Ib28b6a3c2756253e665498e459f5e1e165095941 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-22Remove hmi-debug.hKazumasa Mitsunari1-2/+2
To reduce warning message, integrates hmi-debug into util. Change-Id: Ibb83db196be8c0d6ff0a8d503978b3bef7b1e870 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-22Rename class name LayerManager to LayerControlKazumasa Mitsunari1-2/+2
Change-Id: I60315e2a71af60b2a8e7576bc4313983330b5b3d Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-20Add initialize of Layout ManagerKazumasa Mitsunari1-1/+2
Layout Manager is not suitable in this case... but this name is set be architecture... Change-Id: Ia1612f243dcae2af229357cc982918b2b5ea7d7d Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-20Add setRoleKazumasa Mitsunari1-0/+1
Change-Id: I6ddf6e1b3b3667493c5a0dd68047d1b72c8b0da9 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-20get callback of surface_stats_receivedKazumasa Mitsunari1-3/+4
Change-Id: I2318752ba00f58c197ba42166c2ab91ea4c15bce Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-08-15Readd Policy Manager as pluginYuta Doi1-4/+6
This patch reverts commit c6f9a9b8468b3746a3dec7ee2a0b7d84ec9fb44a and update it. Policy Manager decides next layout by inputed event and current state based on the policy table. And Policy Manager is plugin for Window Manager. Therefore the OEMs can replace it. This patch provides Policy Manager I/F as reference implementation and does not have policy table. Therefore Policy Manager updates each layers to draw the applications in requested area in accordance with just like activate/deactivate request. [APIs of Policy Manager class] - int initialize(void) Initialize Policy Manger. in: none out: 0(success), -1(error) - void registerCallback(CallbackTable callback_table) Register callback functions. in: the pointers of callback handlers out: 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. in: input event data as json_object out: 0(success), -1(error) - int executeStateTransition(void) Execute state transition by using set input event data. in: none out: 0(success), -1(error) - void undoState(void) Undo state only once per once state transition. in: none out: none [Callbacks of Policy Manager 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: Ib8c71f2e544cb90b6763d07fad56dc1c453e9a97 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2018-08-02Improve output of multiple screen resolutionTadao Tanikawa1-0/+1
To improve output on various monitor with various resolution, the following items are introduced. * Abandon scaling by Weston/IVI-SHELL This is cause of huge memory consumption on AGL CES2018 Demo because all contents are designed and rendered with FullHD resolution. * Add parameter of 'scale' to WM API (getDisplayInfo) WM calculate scale factor from screen resolution from wayland compositor and parameter of layout from WM's configuration, area.db. Bug-AGL: SPEC-1568, SPEC-1569, SPEC-1611 Change-Id: I5eac2da0106228c296550135c5200b2653864fdf Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
2018-08-02Revert "Enable scaling to fit various screen resolutions"Tadao Tanikawa1-3/+3
Abandon scaling support by AGL window manager 2017 Bug-AGL: SPEC-1611 This reverts commit 8ab10aaafc6fb3dc7bbad755dce9b4bdaa41f287. Change-Id: Id6afb263a6dc30929b922e469d906e2e5190f7b0
2018-07-27Fix crashed application can re-launchKazumasa Mitsunari1-8/+8
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-7/+5
This reverts commit 99b6f4d2fcd421d3a760a88a67e511fb6fc98068. Change-Id: I8725ca05a3e3fa0ea9e1db935e9e7d5b85a9affd
2018-07-12Add PolicyManager as pluginYuta Doi1-5/+7
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-11Enable scaling to fit various screen resolutionsKazumasa Mitsunari1-3/+3
Since the AGL HomeScreen of CES2018 assumes that the screen resolution is 1080x1920px, the graphics of it partially corrupted with others. To fix this issue, now the AGL window manager automatically scales size according to "scaling" value in setting.json By default(even if "scaling" is not set), this scaling keeps 'fullscreen' aspect rate in area.db("aspect_fit") User can select 3 options. - "aspect_fit" : Scale aspect rate of 'fullscreen' in area.db.(default) - "display_fit": Force to scale to display size. - "none" or others : Set size just as area.db Bug-AGL: SPEC-1568 Bug-AGL: SPEC-1569 Change-Id: Ia08c0ebb2d71ae8f89a90088e181381c3ba3562d Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-07-09Rename event names to lower camel caseYuta Doi1-3/+3
Change-Id: I973610e2b47ebd842291d568bd88578150efcef5 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2018-07-09Convert the roles from old one to newYuta Doi1-1/+9
Update the role name (drawing_name) and WindowManager converts the role from old one to new. We plan to delete the old roles by GG. Therefore the applications can use old olds until GG, After GG, old roles can not be used. If the applications use it, WindowManager regards the applications as the role "fallback". Therefore the applications may not be displayed in the intended layout. For the role "fallback", please refer to JIRA SPEC-1331. Bug-AGL: SPEC-1566 Change-Id: I6ca703183e3cab72ac460094ef14dc3675a98cb6 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
2018-06-28Add signal when the displayed application changedKazumasa Mitsunari1-0/+5
Add new signal "screen_updated" to Window Manager. This is emitted when application size or visibility is changed, the application ids are notified to subscribers. There are some applications such like HomeScreen, which needs the visibility of other applications turns on, so add new event. The key is "ids" and data is application id which is written in config.xml for each application. This signal format is here: ON-EVENT windowmanager/screen_updated: { "event":"windowmanager\/screen_updated", "data":{ "ids":[ "navigation", "hvac" ] }, "jtype":"afb-event" } Bug-AGL: SPEC-1532 Change-Id: I6c1f263be00d4b496e0e0f77dd88b6118489772f Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-06-27Clean: sort source code according to the order of header fileKazumasa Mitsunari1-2/+3
Sort API order written in source code according to the order in header file to improve readability. Change-Id: I6606590ce2ad9c285b3cfd83dc6c0741890b105f Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
2018-06-27Fix class name "App" to "WindowManager"Kazumasa Mitsunari1-0/+272
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>