staging/windowmanager.git
6 years agowayland: controller_surface() sets surface visibility, less lookups
Marcus Fritzsch [Mon, 26 Jun 2017 14:41:15 +0000 (16:41 +0200)]
wayland: controller_surface() sets surface visibility, less lookups

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: less lookup-y controller_layer()
Marcus Fritzsch [Mon, 26 Jun 2017 14:40:51 +0000 (16:40 +0200)]
wayland: less lookup-y controller_layer()

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: remove layer on controller::layer_destroyed
Marcus Fritzsch [Mon, 26 Jun 2017 14:39:05 +0000 (16:39 +0200)]
wayland: remove layer on controller::layer_destroyed

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: set layer visibility in init_layout()
Marcus Fritzsch [Mon, 26 Jun 2017 14:38:40 +0000 (16:38 +0200)]
main: set layer visibility in init_layout()

Also don't set layer visibility when adding surfaces.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: minor clang-format fixes
Marcus Fritzsch [Mon, 26 Jun 2017 14:38:22 +0000 (16:38 +0200)]
wayland: minor clang-format fixes

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: introduce reverse mappings of proxy-ptr to id
Marcus Fritzsch [Mon, 26 Jun 2017 14:37:52 +0000 (16:37 +0200)]
wayland: introduce reverse mappings of proxy-ptr to id

Needed to lookup the objects when we receive calls like e.g.
surface::layer().

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: rename controlled_entity to controller_child
Marcus Fritzsch [Mon, 26 Jun 2017 14:34:55 +0000 (16:34 +0200)]
wayland: rename controlled_entity to controller_child

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: pass struct conn by-reference to init_layout()
Marcus Fritzsch [Mon, 26 Jun 2017 11:26:50 +0000 (13:26 +0200)]
main: pass struct conn by-reference to init_layout()

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: strip std::quniue_ptr from wl::display as it is superfluous
Marcus Fritzsch [Mon, 26 Jun 2017 11:22:00 +0000 (13:22 +0200)]
main: strip std::quniue_ptr from wl::display as it is superfluous

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: cast wl_fixed_to_double() return to float for our interface
Marcus Fritzsch [Mon, 26 Jun 2017 11:20:37 +0000 (13:20 +0200)]
wayland: cast wl_fixed_to_double() return to float for our interface

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: display unique_ptr holds a void(*)(...) deleter
Marcus Fritzsch [Mon, 26 Jun 2017 11:20:05 +0000 (13:20 +0200)]
wayland: display unique_ptr holds a void(*)(...) deleter

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: clang-format
Marcus Fritzsch [Mon, 26 Jun 2017 11:19:21 +0000 (13:19 +0200)]
wayland: clang-format

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoutil: make log_() static
Marcus Fritzsch [Mon, 26 Jun 2017 11:17:33 +0000 (13:17 +0200)]
util: make log_() static

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: one less level of unique_ptr
Marcus Fritzsch [Mon, 26 Jun 2017 10:18:31 +0000 (12:18 +0200)]
wayland: one less level of unique_ptr

Display now holds struct registry by value, as holding it through a
unique_ptr was rather unnecessary.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: use auto variables where appropriate and sensible
Marcus Fritzsch [Mon, 26 Jun 2017 10:16:00 +0000 (12:16 +0200)]
main: use auto variables where appropriate and sensible

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: header hygiene
Marcus Fritzsch [Mon, 26 Jun 2017 10:15:40 +0000 (12:15 +0200)]
main: header hygiene

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agocmake: modernized to the best of my knowledge
Marcus Fritzsch [Mon, 26 Jun 2017 10:15:27 +0000 (12:15 +0200)]
cmake: modernized to the best of my knowledge

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: set surface layout in controller::surface
Marcus Fritzsch [Fri, 23 Jun 2017 13:51:12 +0000 (15:51 +0200)]
wayland: set surface layout in controller::surface

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agouse unordered_map for id->obj maps
Marcus Fritzsch [Fri, 23 Jun 2017 13:37:34 +0000 (15:37 +0200)]
use unordered_map for id->obj maps

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: c++-ifiy struct conn c init
Marcus Fritzsch [Fri, 23 Jun 2017 13:11:57 +0000 (15:11 +0200)]
main: c++-ifiy struct conn c init

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: do not capture the whole environment in lambdas
Marcus Fritzsch [Fri, 23 Jun 2017 13:09:03 +0000 (15:09 +0200)]
main: do not capture the whole environment in lambdas

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: added some 'demarcation' comments
Marcus Fritzsch [Fri, 23 Jun 2017 13:08:02 +0000 (15:08 +0200)]
main: added some 'demarcation' comments

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain/init_layout: use screen::set_render_order instead of add_layer calls
Marcus Fritzsch [Fri, 23 Jun 2017 13:05:14 +0000 (15:05 +0200)]
main/init_layout: use screen::set_render_order instead of add_layer calls

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: C++ified set_render_order requests for layer and screen
Marcus Fritzsch [Fri, 23 Jun 2017 13:04:37 +0000 (15:04 +0200)]
wayland: C++ified set_render_order requests for layer and screen

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoupdate session
Marcus Fritzsch [Fri, 23 Jun 2017 12:48:06 +0000 (14:48 +0200)]
update session

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: initialize layer members
Marcus Fritzsch [Fri, 23 Jun 2017 12:47:39 +0000 (14:47 +0200)]
wayland: initialize layer members

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: print debug message when setting surface onto layer
Marcus Fritzsch [Fri, 23 Jun 2017 12:47:23 +0000 (14:47 +0200)]
wayland: print debug message when setting surface onto layer

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: remove surface immediately on surface_destroyed event
Marcus Fritzsch [Fri, 23 Jun 2017 12:47:00 +0000 (14:47 +0200)]
wayland: remove surface immediately on surface_destroyed event

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: flush after execute_pending
Marcus Fritzsch [Fri, 23 Jun 2017 12:28:10 +0000 (14:28 +0200)]
main: flush after execute_pending

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: Reset layout on stratup; bottom and top layer layout
Marcus Fritzsch [Fri, 23 Jun 2017 12:27:55 +0000 (14:27 +0200)]
main: Reset layout on stratup; bottom and top layer layout

* When started, layout is cleared, that is layers will be removed and
screen render order reset
* Layers 100 and 1000 are created, layer 1000 s the top layer.
* Add layers to screen
* C++-ification of some cumbersome direct-pointer accesses.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: put surface 0x16180 on layer 100, all others on layer 1000
Marcus Fritzsch [Fri, 23 Jun 2017 12:26:16 +0000 (14:26 +0200)]
wayland: put surface 0x16180 on layer 100, all others on layer 1000

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: minimal code style change
Marcus Fritzsch [Fri, 23 Jun 2017 12:25:50 +0000 (14:25 +0200)]
wayland: minimal code style change

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: also show layer info on line break
Marcus Fritzsch [Fri, 23 Jun 2017 12:10:21 +0000 (14:10 +0200)]
main: also show layer info on line break

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: simplify surface property setting
Marcus Fritzsch [Fri, 23 Jun 2017 12:09:52 +0000 (14:09 +0200)]
wayland: simplify surface property setting

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: store layer properties
Marcus Fritzsch [Fri, 23 Jun 2017 12:09:32 +0000 (14:09 +0200)]
wayland: store layer properties

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: set surfaces fullscreen when configured.
Marcus Fritzsch [Fri, 23 Jun 2017 10:41:25 +0000 (12:41 +0200)]
wayland: set surfaces fullscreen when configured.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: initalize all controll members
Marcus Fritzsch [Fri, 23 Jun 2017 10:40:55 +0000 (12:40 +0200)]
wayland: initalize all controll members

* Also; added output_size - for now.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: init dummy layout of layer 100 on the first screen
Marcus Fritzsch [Fri, 23 Jun 2017 10:29:27 +0000 (12:29 +0200)]
main: init dummy layout of layer 100 on the first screen

* If the layer is not existent, create it.
* Set the layer to the output dimensions.
* Set layer visibility to 1.
* Add the layer to the first screen.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: check that outputs are available before running main loop
Marcus Fritzsch [Fri, 23 Jun 2017 10:24:41 +0000 (12:24 +0200)]
main: check that outputs are available before running main loop

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: add missing add_layer and clear requests to genivi::screen
Marcus Fritzsch [Fri, 23 Jun 2017 10:24:06 +0000 (12:24 +0200)]
wayland: add missing add_layer and clear requests to genivi::screen

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: add missing controller requests
Marcus Fritzsch [Fri, 23 Jun 2017 10:23:36 +0000 (12:23 +0200)]
wayland: add missing controller requests

* Added layer_create and surface_create to genivi::controller.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: task names, delete surfaces using pending_tasks
Marcus Fritzsch [Fri, 23 Jun 2017 07:25:26 +0000 (09:25 +0200)]
wayland: task names, delete surfaces using pending_tasks

* Use the pending task list to delete surfaces
* Added task names for debug output, simple pointers to const char for
dirty and cheap storage.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain: execute controllers pending tasks, clang-format
Marcus Fritzsch [Thu, 22 Jun 2017 14:23:35 +0000 (16:23 +0200)]
main: execute controllers pending tasks, clang-format

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: added a pending tasks list to controller
Marcus Fritzsch [Thu, 22 Jun 2017 14:23:17 +0000 (16:23 +0200)]
wayland: added a pending tasks list to controller

With this item it is possible to append tasks to the controller, which
will be executed after the current events have been dispatched. Note,
that tasks need to check their needed resources are still alive!

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: storing output mode and surface properties
Marcus Fritzsch [Thu, 22 Jun 2017 14:21:26 +0000 (16:21 +0200)]
wayland: storing output mode and surface properties

The events for this are received by the controller, the data however is
stored in the surface proxe wrappers.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: added genivi::rect and genivi::size and props to genivi::surface
Marcus Fritzsch [Thu, 22 Jun 2017 14:22:21 +0000 (16:22 +0200)]
wayland: added genivi::rect and genivi::size and props to genivi::surface

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: remove surfaces that got destroyed
Marcus Fritzsch [Thu, 22 Jun 2017 12:20:16 +0000 (14:20 +0200)]
wayland: remove surfaces that got destroyed

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomain/wayland: added a simple main loop
Marcus Fritzsch [Thu, 22 Jun 2017 12:19:36 +0000 (14:19 +0200)]
main/wayland: added a simple main loop

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoupdated session
Marcus Fritzsch [Mon, 19 Jun 2017 13:05:09 +0000 (15:05 +0200)]
updated session

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: minor fix with this-> and formatting
Marcus Fritzsch [Mon, 19 Jun 2017 11:52:10 +0000 (13:52 +0200)]
wayland: minor fix with this-> and formatting

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoutil: add printf format check attributes
Marcus Fritzsch [Mon, 19 Jun 2017 11:51:44 +0000 (13:51 +0200)]
util: add printf format check attributes

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agocmake: introduce ENABLE_DEBUG_OUTPUT cmake cache variable
Marcus Fritzsch [Mon, 19 Jun 2017 11:51:12 +0000 (13:51 +0200)]
cmake: introduce ENABLE_DEBUG_OUTPUT cmake cache variable

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agorenamed controller event methods, all have now a controller_ prefix
Marcus Fritzsch [Mon, 19 Jun 2017 08:29:38 +0000 (10:29 +0200)]
renamed controller event methods, all have now a controller_ prefix

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agodo not initialize registry when display is unavailable
Marcus Fritzsch [Mon, 19 Jun 2017 08:16:20 +0000 (10:16 +0200)]
do not initialize registry when display is unavailable

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoremoved all notifier remnants
Marcus Fritzsch [Fri, 9 Jun 2017 15:18:28 +0000 (17:18 +0200)]
removed all notifier remnants

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: refactored genivi object events
Marcus Fritzsch [Fri, 9 Jun 2017 15:13:43 +0000 (17:13 +0200)]
wayland: refactored genivi object events

Events are now delivered to surface_* and layer_* methods of the
controller. The genivi object wrappers still are needed to hold wl_proxy
objects, their id and a reference/pointer to the controller.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agowayland: added notification prototype, be more explicit about struct types
Marcus Fritzsch [Fri, 9 Jun 2017 13:55:20 +0000 (15:55 +0200)]
wayland: added notification prototype, be more explicit about struct types

Notification support can be implemented on genivi objects using the
genivi::notify::notifier, it is supposed to be inherited from by the
notification-needing types, e.g. genivi::surface.

Currently no implementation for notifier is present (only an empty
shell) also it is not yet clear, if the notifications will be sent from
the genivi objects method's or e.g. their thunks (which would simplify
the methods considerably).

Added request wrappers for genivi::surface and genivi::layer, just
inline them into the class and be done with it.

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agocmake: visibility is hidden, do not warn about comments
Marcus Fritzsch [Fri, 9 Jun 2017 13:52:36 +0000 (15:52 +0200)]
cmake: visibility is hidden, do not warn about comments

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agofixed display dtor message, added layer request defs
Marcus Fritzsch [Thu, 8 Jun 2017 14:20:39 +0000 (16:20 +0200)]
fixed display dtor message, added layer request defs

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agomoved callback thunks to impl, makes classes readable
Marcus Fritzsch [Thu, 8 Jun 2017 13:40:11 +0000 (15:40 +0200)]
moved callback thunks to impl, makes classes readable

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agohooked up genivi::surface and layer
Marcus Fritzsch [Thu, 8 Jun 2017 13:00:55 +0000 (15:00 +0200)]
hooked up genivi::surface and layer

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agocpp, simple wrappers for most of what we need, ivi_* still incomplete
Marcus Fritzsch [Thu, 8 Jun 2017 11:33:47 +0000 (13:33 +0200)]
cpp, simple wrappers for most of what we need, ivi_* still incomplete

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agocpp, more listeners
Marcus Fritzsch [Wed, 7 Jun 2017 16:02:36 +0000 (18:02 +0200)]
cpp, more listeners

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoadd gvim session
Marcus Fritzsch [Wed, 7 Jun 2017 12:29:15 +0000 (14:29 +0200)]
add gvim session

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
6 years agoinitial commit
Marcus Fritzsch [Wed, 7 Jun 2017 12:28:57 +0000 (14:28 +0200)]
initial commit

Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>