66 Commits

Author SHA1 Message Date
David Herrmann
bab0068bed Set default console size to 80x24
Create for every new console a default cell-size of 80x24.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 18:25:59 +01:00
David Herrmann
9a853a796f Add cells to console objects
A console has a fixed line and column count. Each entry is represented by a
kmscon_cell object. The console can be resized on the fly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 18:21:41 +01:00
David Herrmann
0b5d1932df Compile all sources into tests
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 18:18:22 +01:00
David Herrmann
5af1381ea3 Update TODO list with console subsystem
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 18:02:28 +01:00
David Herrmann
8cd898bb58 Add console subsystem to README
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 17:58:32 +01:00
David Herrmann
bfc6975baf Add console test
This test application prints a console on all connected outputs. It does not
emulate any terminal but instead just prints the test-console.

It can be used to test the console subsystem in connection with the DRM/KMS
output subsystem.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 17:55:57 +01:00
David Herrmann
173d38c0f5 Add console drawing-logic
A console may be displayed on multiple outputs. We allow different screen
resolutions on these outputs so we need a way to map the console image onto
different outputs.

We simply render the console image into a cairo surface with a user-given
resolution. This should be set to the highest resultion of the used outputs. The
application can now map this image onto the different framebuffers. This will
scale the image if the target framebuffer is smaller than the cairo surface.

We also do not clear the framebuffer. This should be done by the user. This
allows us to draw with alpha values and blend the console on top of the current
framebuffer. We do not have to care for background images and the application
has full control of where the console is shown.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 17:49:21 +01:00
David Herrmann
cfdbaeb50e Fix kmscon_console_unref name
The name of the unref function was wrong. Fix this from kmscon_con_unref to
kmscon_console_unref.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 15:47:23 +01:00
David Herrmann
6c19c352bc Avoid refreshing twice in output test
Waking up the compositor automatically refreshed the output list. Therefore,
avoid refreshing it manually again.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 15:46:22 +01:00
David Herrmann
731091a70a Add kmscon_char type
Every cell of the console contains one single printable character. We want to be
Unicode compatible so we must support combined characters. Hence, each cell
consists of a UTF-8 string that can be drawn by pango as a single glyph.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 14:44:39 +01:00
David Herrmann
f85eb100f9 Add console subsystem dummy
Add dummy files for the console subsystem. This subsystem will be used to draw a
console to a framebuffer. It uses pango and cairo for text-rendering and will
provide all required modification functions that the terminal emulation will
require.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 00:41:15 +01:00
David Herrmann
259fcfa12d Add TODO list
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 00:28:53 +01:00
David Herrmann
71ffc2bda3 Add temporary Makefile
This makefile can be used to build kmscon and the test suite. It is quite rough
and will later or sooner be replaced by a proper build-tool like autotools.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 00:21:49 +01:00
David Herrmann
9847437735 Add output test-script
The test_output application is an example how to use the output subsystem. It
lists all connected monitors/DRM-outputs and draws with OpenGL on the selected
framebuffers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 00:16:27 +01:00
David Herrmann
85d7391cda Add output subsystem
The output subsystem manages the connected monitors, provides framebuffers and
OpenGL contexts and handles all DRM/DRI/KMS related functionality.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-20 00:09:39 +01:00
David Herrmann
fca8681dfc New kmscon project
The kmscon application is a terminal emulator which runs on a native linux DRI
device. It uses linux KMS and DRI to get a working OpenGL context without the
need of an X-Server, Wayland or similar.

It is an attempt to replace the in-kernel VT emulator with a full userspace
console.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-19 23:05:38 +01:00