summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08clang-format, mostly indenting.Marcus Fritzsch1-1/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08clang-tidy the place upMarcus Fritzsch1-8/+8
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08glue: renamed output files to better represent their actual purposeMarcus Fritzsch1-1/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: move most of main to app, separate ownershipMarcus Fritzsch1-103/+5
* Move everything apart from the display connection itself to App. * Everything depending on the display however is owned by App. * Dispatch events for the application in App::dispatch_events() That is, display_dispatch and local stuff e.g. execute_pending(). Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08Generating binding API glue code using generate-binding.pyMarcus Fritzsch1-93/+7
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main/app: started to move things to appMarcus Fritzsch1-0/+7
Started implementing App, as the actual implementation, that is, to pull out all the stuff that is actually the application and only have glue code reside in main. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: appid and surfaceid in register_surface are unsignedMarcus Fritzsch1-4/+4
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: rename g_wayland to g_afb_instanceMarcus Fritzsch1-36/+38
It holds the data necessary for the AFB to work, hence call it g_afb_instance to make this clear. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08Track surface/layer properties with one structMarcus Fritzsch1-6/+6
As both share the exact same properties this makes sense, we now can write code once and work on both layer and surface properties. This however is only relevant in the wayland "level" of things, as in WM semantics layers are always fullscreen. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: imeplemented dummy register_surface with replyMarcus Fritzsch1-1/+38
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: remove CHECK_WAYLAND, inline logic into WRAPMarcus Fritzsch1-10/+5
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: use our own log functionsMarcus Fritzsch1-9/+8
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: wrap afb verb handlers, "namepace" debug verbsMarcus Fritzsch1-12/+16
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08util: logging to the afb daemonMarcus Fritzsch1-2/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08Move all nlohmann::json to json_helper.cppMarcus Fritzsch1-54/+11
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: further simplificationMarcus Fritzsch1-10/+21
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: reorganize and simplifyMarcus Fritzsch1-67/+82
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08Check for g_wayland in every API call.Marcus Fritzsch1-5/+14
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: add layers and surfaces API callsMarcus Fritzsch1-1/+28
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08Implement window manager as an AGL App-FW bindingMarcus Fritzsch1-81/+167
* Compile to shared object module, to be loaded by afb-daemon. * Take most of main, rewrite to adhere to the AFB API. * Implement dummy API call winman/status. * Use export.map to specify symbol visibility. * Poller and unique_fd are currently useless/unused. * Logging is still only to stdout/stderr. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: read only one signal and only return -1 if it succeededMarcus Fritzsch1-2/+3
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08clang-tidy the place upMarcus Fritzsch1-1/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08all: clang-formatMarcus Fritzsch1-18/+17
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08moved Poller and unique_fd from main to util, fixed c++ issues in utilMarcus Fritzsch1-57/+0
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08util.h and its impl are now c++Marcus Fritzsch1-1/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: read only once from stdin for status logMarcus Fritzsch1-3/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: handling signals, added simple unique_fd RAII helperMarcus Fritzsch1-2/+44
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: read() returns ssize_t not intMarcus Fritzsch1-1/+2
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: cleanup Poller implementationMarcus Fritzsch1-7/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: better check_events implementationMarcus Fritzsch1-53/+49
* Introduced helper struct Poller * Implements check_events() and calls custom handlers on POLLIN. * Moved status dump to genivi::controller. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: add wl_output proxy-to-id mapping in wl_output global handlerMarcus Fritzsch1-4/+10
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: rename connection, streamline init_layout and error handlingMarcus Fritzsch1-14/+16
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: do not include cstdlib, it's unusedMarcus Fritzsch1-2/+0
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08clang-tidy the place upMarcus Fritzsch1-11/+17
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: set layer visibility in init_layout()Marcus Fritzsch1-0/+2
Also don't set layer visibility when adding surfaces. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: pass struct conn by-reference to init_layout()Marcus Fritzsch1-6/+6
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: strip std::quniue_ptr from wl::display as it is superfluousMarcus Fritzsch1-17/+17
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08wayland: one less level of unique_ptrMarcus Fritzsch1-2/+2
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>
2017-08-08main: use auto variables where appropriate and sensibleMarcus Fritzsch1-4/+4
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: header hygieneMarcus Fritzsch1-5/+0
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08use unordered_map for id->obj mapsMarcus Fritzsch1-1/+0
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: c++-ifiy struct conn c initMarcus Fritzsch1-1/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: do not capture the whole environment in lambdasMarcus Fritzsch1-2/+2
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: added some 'demarcation' commentsMarcus Fritzsch1-0/+18
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main/init_layout: use screen::set_render_order instead of add_layer callsMarcus Fritzsch1-2/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: flush after execute_pendingMarcus Fritzsch1-0/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: Reset layout on stratup; bottom and top layer layoutMarcus Fritzsch1-12/+19
* 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>
2017-08-08main: also show layer info on line breakMarcus Fritzsch1-0/+11
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08wayland: set surfaces fullscreen when configured.Marcus Fritzsch1-0/+3
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08main: init dummy layout of layer 100 on the first screenMarcus Fritzsch1-0/+25
* 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>