846 Commits

Author SHA1 Message Date
David Herrmann
93c553c1bc shl: move timer to shl_timer_*
This moves the timers to SHL and removes the old static_misc header and
source. They are no longer needed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-16 17:08:21 +02:00
David Herrmann
04e3bcc652 shl: move kmscon_ring_* to shl
The ring implementation is only used in one place so move it into SHL to
avoid linking it into all other libraries and applications.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-16 09:23:35 +02:00
David Herrmann
f3e3973d56 shl: move kmscon_hashtable to shl
This moves the whole hashtable implementation into the SHL library. Now we
can link it only to the applications that really use it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-16 09:13:30 +02:00
David Herrmann
2b5b7d3736 shl: move kmscon_array_* to shl_array_*
This moves all array code into the SHL library and fixes all users.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-16 09:10:36 +02:00
David Herrmann
aed1373bc6 shl: move dlist to shl_dlist.h
Instead of including dlist in the static library, we now move it to SHL.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-15 20:11:00 +02:00
David Herrmann
715e247676 shl: move dlist implementation to shl_dlist_*
Shl (Static helper library) is the new name of all static helpers in
kmscon that might be shared between different applications.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-15 19:10:37 +02:00
David Herrmann
719ac16607 unicode: move KMSCON_UCS4_MAXLEN to TSM_UCS4_MAXLEN
We want to get rid of all non-static kmscon dependencies in TSM so move
this constant.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:31:18 +02:00
David Herrmann
81a9a30040 unicode: remove KMSCON_UCS4_MAX
We have TSM_UCS4_MAX so use it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:29:07 +02:00
David Herrmann
61e0d9d098 unicode: move kmscon_symbol* to tsm_symbol*
All the unicode helpers are move to TSM so move the symbols, too.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:26:43 +02:00
David Herrmann
fa31942c02 unicode: inline locking helpers
There is really no need to use these helper functions. Just directly call
the pthread locks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:21:37 +02:00
David Herrmann
601592a866 unicode: update comments
Update all the introduction and documentation comments. Also remove an old
TODO item regarding glib.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:19:15 +02:00
David Herrmann
e9f39be3e8 unicode: add description of UTF8-state-machine
A short comment on how the UTF8 state machine works and why it does not do
any sophisticated error recovery.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:01:34 +02:00
David Herrmann
468e265138 unicode: add UCS4 constants
Four helpers that define maximum UCS4 values, invalid values and a
replacement character for unknown values.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 18:00:59 +02:00
David Herrmann
c1075fba18 unicode: rename kmscon_utf8_* to tsm_utf8_*
All terminal-emulation code is moved into a new library called "TSM -
Terminal State Machine". So we rename everything to have a separate
namespace.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-14 17:18:51 +02:00
David Herrmann
2df4fc0d31 uterm: video: add *_display_fake_blend(v) requests
Instead of requiring to use uterm_screen objects we now add a
fake_blendv() request directly to the display object. We rename it to
"fake_blend" instead of just "blend" so we can later implement real
blending.

This reuses the existing infrastructure. But the fake_blendv is the way to
go so we rename the existing functions to "fake_*" either.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-12 15:23:15 +02:00
David Herrmann
87c9963438 uterm: add *_swap() and *_use() helpers for displays
Instead of requiring to use a uterm_screen object we now also add these
helpers to the display directly. This allows to use libuterm without any
screens, which is often useful if no virtual screen are needed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-12 15:00:28 +02:00
David Herrmann
38edd97143 uterm: video: be more verbose when reading DRM properties
The user should be notified what went wrong when DRM properties couldn't
been read. There are also pending patches on the dri-devel ML that fix
reading properties without DRM-master.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-12 13:40:19 +02:00
David Herrmann
2458b04fb3 uterm: video: dumb: be more verbose when destroying buffers
This call may fail with recent kernel versions as DRM_MASTER is required.
Therefore, print more information so we know what went wrong.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 20:18:29 +02:00
David Herrmann
c1fcb47654 build: fix missing header includes
"make distcheck" fails as we aren't declaring the headers correctly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 19:37:35 +02:00
David Herrmann
085aef9e38 uterm: move uterm_vt to the end
Move uterm_vt to the end of the file to avoid forward declaration of
uterm_input.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 19:33:58 +02:00
David Herrmann
55e37dde77 uterm: add uterm_keysyms.h
We need a copy of xkbcommon-keysyms.h as long as xkbcommon is not included
in all major distributions. We _need_ this build-time dependency,
otherwise, we cannot build the other keyboard backends.

However, requiring xkbcommon as build-time dependency is not a solution as
no major distribution includes it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 19:30:26 +02:00
David Herrmann
7f2d9dc4ff uterm: move uterm_internal.h to uterm_input.h
uterm_internal.h contains only input related content so we can rename it
and remove all the inclusions where it is not needed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 19:16:54 +02:00
David Herrmann
d0ac886972 uterm: move internal video-helpers to uterm_video.h
This splits off all video related helpers of the big internal
uterm_internal.h header into uterm_video.h.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 19:11:01 +02:00
David Herrmann
6967f0acda fakevt: remove unused tool
The fakevt tool is no longer used. The same functionality was integrated
into kmscon with the fake-VT uterm_vt backend.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 19:03:29 +02:00
David Herrmann
c69bb05bcd genshader: avoid generating source file during configuration
There is no need to make genshader being generated by configure, anymore.
We used to use @srcdir@ but this was not embedded into Makefile.am. Hence,
we can avoid this and make it build normally.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 18:46:28 +02:00
David Herrmann
6ab227acbd build: fix gbm_bo_get_stride() upstream bug
libkms doesn't link to libdrm so our current check for gbm_bo_get_stride()
fails. This has been fixed upstream but distributions still need to pick
it up. Therefore, we simply add the drm libs to our checks. They are
available at this point, anyway.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 18:41:30 +02:00
David Herrmann
a5b4f7df9b build: add uterm pkg-config file
We intend to make libuterm independent of kmscon so it can be used by
other projects. Therefore, add a pkg-config file for easier integration
into other build systems.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 18:08:00 +02:00
David Herrmann
12db259e6f build: reorder makefile
This moves the independent libraries to the top as they can be built
without kmscon, too.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 17:59:45 +02:00
David Herrmann
9160194946 external: add xkbcommon-keysyms.h
If libxkbcommon is not available on the current platform, we still want to
be able to use the keysyms. We currently do this by depending on xproto
but this is ugly and we want to avoid this.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 17:31:46 +02:00
David Herrmann
cea022d36e eloop: add pkg-config file
The pkg-config file allows other users of libeloop to more easily
configure build-time options for eloop.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 16:54:49 +02:00
David Herrmann
246595ab5a eloop: add pre-cbs
pre-cbs are similar to post-cbs but they are called _before_ the actual
dispatching takes place. It can be used to perform any actions before
going to sleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 16:37:30 +02:00
David Herrmann
2534b99d9a eloop: call post-cbs on errors during dispatch
If the dispatch files or is skipped for whatever reason, we should
nevertheless call the post-cbs to avoid any integration errors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 16:36:41 +02:00
David Herrmann
de9111b40a eloop: fix unregistering post-cbs
This is obviously a copy/paste error. This fixes the unregistering to
correctly work now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-11 16:34:56 +02:00
David Herrmann
962dfd8bea eloop: fix registering post-cb hooks
We actually have to register the hook-helper before we can add any hooks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-09 17:36:14 +02:00
David Herrmann
2f6b6a3d07 eloop: improve idle-source logic
Instead of using an ev_counter object internally, we now directly create a
new eventfd object. This avoids adding/removing the fd from the epoll-set
constantly when adding/removing idle sources. This should increase
idle-source speed considerably.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-09 16:49:31 +02:00
David Herrmann
9dc589561b llog: add "d"irect variants
The "d" variants of the log functions take a direct pointer to the llog
helper instead of the parent. This is sometimes used when we have no
parent but still want to log errors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-09 16:42:34 +02:00
David Herrmann
cf318f710e eloop: add post-dispatch hook
When integrating other event-sources or event-loops into eloop which do
not provide FD-abstractions, we often want to check for specific
conditions before returning from the dispatch-callback or going to sleep.
Therefore, you can now register a post-dispatch-cb and check whether your
alien event source is firing. If it is, simply push an idle-source into
the event-loop and it will fire during the next dispatch without going to
sleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-09 16:14:50 +02:00
David Herrmann
014c468829 eloop: add ev_eloop_get_fd()
This new helper allows retrieving a single file descriptor which
represents the whole event loop. This is very useful if you want to use
your own event loop in combination with libeloop.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-09 15:01:32 +02:00
David Herrmann
eceaa5ecb8 Release kmscon-4
This is the first public release. Most major features are implemented and
kmscon works reliably. I use it for real work since several weeks now so I
consider it stable.
Anyway, there is still much to do. The TODO list is long...

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
kmscon-4
2012-09-08 16:21:45 +02:00
David Herrmann
6fb1e5d7b4 build: fix distcheck errors
Correctly include everything in the distribution so distcheck and dist
really work.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:21:09 +02:00
David Herrmann
16e292830d docs: remove gtkdoc
This never really worked and was horrible to maintain. We need to find
something else for documentation, but we will probably have to do it with
a separate XML file without any generator.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:19:49 +02:00
David Herrmann
d84ed347bf build: fix dbus-loop build
We need to include everything in the distribution and fix the
include-path, otherwise, we might get "distcheck" errors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:18:19 +02:00
David Herrmann
667f5d16f6 log: add log_dummyf() helper
Instead of doing nothing we now pass everything to log_dummyf() if a
logging macro is not enabled. This silences all the "unused variable"
warnings which are really annoying.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 16:17:04 +02:00
David Herrmann
f8a352f316 Update NEWS file
Add all new functionality to the NEWS file as "kmscon-4" entry.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 15:36:23 +02:00
David Herrmann
5d7bdd3584 uterm: vt: be more verbose on errors
Print more information when VT allocation fails.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 15:36:02 +02:00
Marcin Slusarz
1060e57a8d main: change default font-size to 15
"10" is really small and not really suited as default value. We currently
do debugging a lot and hence using bigger fonts makes that task a lot more
easy. Furthermore, as a "first impression" people get from kmscon, we want
the font to be at a proper size.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 15:08:09 +02:00
David Herrmann
a0c644f3b3 main: change default TERM to xterm-256color
We have added a lot of more xterm functionality so "xterm-256color" should
be the better default value now. It also makes most applications behave
better as they can use improved control sequences.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 14:53:49 +02:00
David Herrmann
c3528f1a42 vte: separate color-codes from RGB values
We need to know whether a current attribute was created with a specific
RGB value or whether a vt-color-code was used. This is, because several
affects have to be applied when color-codes are used. For instance, bold
colors are always brightened to simulate "bold".

Therefore, two new fields are added which contain the color-code or -1 if
an RGB value is used. All of this is always applied internally of the VTE
layer so other layers (like the console layer) can be sure, that the RGB
value is always correct and use it.
But the VTE layer needs to keep track of the color-codes so we put them
into the attribute structure.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 14:48:21 +02:00
David Herrmann
71b8cfe93c vte: make independent of uterm
Remove the last reference to uterm structures so we can put the vte layer
into a separate library without any dependency to rendering
infrastructure.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 14:20:53 +02:00
David Herrmann
0d43751e88 console: make independent of text drawing layer
We finally want to get rid of any dependencies in the vte/console layer so
we can split it out into a separate library.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-08 14:09:09 +02:00