summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-09-12misc: fix some minor style issues, fix SCOPE_TRACING compilationMarcus Fritzsch1-3/+4
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-12binding: make the pending_events functionality nicer[tm]Marcus Fritzsch1-4/+8
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-12binding: ping() dispatches only pending eventsMarcus Fritzsch1-1/+0
* Also, move binding_m mutex to the binding glue. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-12binding: manual lock on API call, do not use noconcurrent bitMarcus Fritzsch1-3/+2
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-12app/main: dispatch wayland events using ping(), WIP on split layoutMarcus Fritzsch1-5/+14
* Dispatch ayland events with ping() API call, after having read events from wayland fd - in order to prevent indefinite-poll on wrongly read+ dispatch from multiple threads (dispatcher and API call). * Add scope trace to all API call thunks. * Split layout advancements, still broken AF though. * Add App1 example split layout to App layer. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-05main: only exit on hangup if WINMAN_EXIT_ON_HANGUP env var is presentMarcus Fritzsch1-1/+2
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-05main: exit on compositor hangupMarcus Fritzsch1-0/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-04App/API: fix event emission methodsMarcus Fritzsch1-3/+3
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-04main: simplify event broadcastingMarcus Fritzsch1-2/+1
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-04main/binding: do not allow concurrent threads in AppMarcus Fritzsch1-0/+6
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-09-04app/main: add send_event() to binding_apiMarcus Fritzsch1-0/+12
* Preliminary event support - wrong names, likely wrong implementation Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
2017-08-08add license text to implementation filesMarcus Fritzsch1-0/+16
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
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>