genode/repos/os/src/server/nitpicker
Norman Feske 0ed68a56b7 Use signals for delivering input events
This patch changes both the Input::Session interface and the skeleton
for the server-side implementation of this interface
('input/component.h').

The Input::Session interface offers a new 'sigh' function, which can be
called be the client to register a signal handler. The signal handler
gets notified on the arrival of new input. This alleviates the need to
poll for input events at the client side.

The server-side skeleton for implementing input services underwent a
redesign to make it more modular and robust. I.e., there are no
global functions needed at the server side and the event-queue
enable/disable mechanism is implemented at a central place (in the root
component) rather than inside each driver.

Fixes #46
2014-06-06 14:54:07 +02:00
..
background.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
big_mouse.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
canvas.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
chunky_menubar.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
clip_guard.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
color.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
default.tff Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
draw_label.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
global_keys.cc Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
global_keys.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
input.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
main.cc Use signals for delivering input events 2014-06-06 14:54:07 +02:00
menubar.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
mode.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
mouse_cursor.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
README Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
session.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
target.mk Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
user_state.cc Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
user_state.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
view_stack.cc Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
view_stack.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
view.cc Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
view.h Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Nitpicker is the low-level GUI server of Genode. For the general concepts,
please refer to the following document:

:A Nitpickers guide to a minimal-complexity secure GUI:

  [http://genode-labs.com/publications/nitpicker-secure-gui-2005.pdf]


Configuration
~~~~~~~~~~~~~

Nitpicker supports the following configuration options, supplied via
Genode's config mechanism.

Tinting of clients in X-Ray mode
--------------------------------

Nitpicker allows for assigning a color to single clients or a groups
of clients based on the client's label. The following configuration
tints all views of the launchpad subsystem in blue except for those
views that belong to the testnit child of launchpad.

! <config>
!   <policy label="launchpad"            color="#0000ff"/>
!   <policy label="launchpad -> testnit" color="#ff0000"/>
! </config>

Global key definitions
----------------------

Nitpicker has a few built-in function that can be activated via global
keyboard shortcuts, namely the X-ray mode and the kill mode. The keys
for toggling those functions can be defined as follows:

! <config>
!   <global-keys>
!     <key name="KEY_SCROLLLOCK" operation="xray" />
!     <key name="KEY_PRINT"      operation="kill" />
!   </global-keys>
! </config>

The '<global-keys>' node contains the policy for handling global keys. Each
'<key>' subnode expresses a rule for named key. The 'operation' attribute
refers nitpicker's built-in operations. In the example above, the X-ray
mode can be activated via the scroll-lock key and the kill mode can be
activated via the print key.

Alternatively to specifying an 'operation' attribute, a key node can contain
a 'label' attribute. If specified, all events regarding the key will be
reported to the client with the specified label. This enables clients to
handle global shortcuts. The client with the matching label will receive
all events until the number of concurrently pressed keys reaches zero.
This way, it is possible to handle chords of multiple keys starting with
the key specified in the '<key>' node. For the routing of global keys to
clients, the order of '<key>' nodes is important. If multiple nodes exists for
different labels, the first match will take effect. For example:

! <global-keys>
!   <key name="KEY_F11" label="launchpad -> testnit" />
!   <key name="KEY_F11" label="launchpad" />
! </global-keys>

The "launchpad" client will receive all key sequences starting with F11 unless
the "launchpad -> testnit" program is running. As soon as testnit gets started
by launchpad, testnit will receive the events. If the order was reversed,
launchpad would always receive the events.

Background color
----------------

The background color can be defined via the '<background>' config node:

! <background color="#112233" />