This is a stable release for kmscon. It includes mainly bugfixes and
cleanups. The TSM library was created out of the internal VTE layers and
mostly code-cleanups took place.
Happy testing!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
I just noticed that older compiles do not support _Static_assert() so we
now check in configure.ac for it. We do not use it heavily, anyway.
Dynamic asserts are avoided entirely.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
wlterm needs xkbcommon as the wayland protocol depends on XKB states.
Hence, we add a hard-dependency for wlterm.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Sorry for the big commit, but I was working on the wlterm application and
then thought I can rework the whole configure-logic again. This mainly
renames all build-defines to BUILD_DEFINE_* and BUILD_HAVE_* and allows
specifying which applications to build via --enable-kmscon/--enable-wlterm
and similar.
wlterm is a new application which is a native wayland client with no
external dependencies. It serves several purposes:
* It uses TSM (not yet implemented, but will come soon) to create a
console independent from kmscon. This shows how TSM can easily be used
to create independent terminal emulators.
* It is a native wayland application (probably the first independent
wayland app so far?) and is used to test how well the wayland API
works. As wayland is still under heavy development, we need more
application-writers who report back whether the wayland-API makes
sense to them and whether it works correctly.
* A proper terminal-emulator for wayland! There is currently no proper
emulator so we really need something that we can work with.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
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>
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>
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>
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>
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>
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>
The bbulk renderer is very similar to the bblit renderer but it assembles
a request-buffer of all characters and then pushes these requests via a
vector-call to the video hardware.
This turns out to increase performance slightly as we do not call into the
video subsystem for every characters but only once.
This renderer can reduce performance when used with partial-redraws (which
are not implemented, yet), so we keep the bblit renderer around.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This adds a new Unifont font-backend based on the recently added Unifont
data. The backend is disabled by default for 2 reasons:
- It takes about 5min to compile and needs >1GB of memory on an Intel
Atom N450
- License situation is unclear as it is GPL
Written-by: Ted Kotz <ted@kotz.us>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
There were 3 problems with previous version:
- it didn't take into account libgbm cflags (fatal error: gbm.h: No such file or directory)
- it was vulnerable to gbm.h include bugs (gbm.h:259:50: error: unknown type name 'size_t')
- it was checked even when libgbm was not detected
Fix it.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Upstream mesa renamed gbm_bo_get_pitch() to gbm_bo_get_stride(). As gbm
has not seen an official release, they actually don't care but several
users complained about this. Therefore, we simply add a build-time check
for this. However, this may break when mesa is updated without recompiling
kmscon but that is less intrusive.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This is again a development release. However, the kmscon application is
now at a point where it is quite stable and provides many of the planned
features. API/ABI compatibility is not guaranteed, yet.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This adds an OpenGL text renderer. It uses textures to store glyph
information and renders the characters by assembling a vertex-list first.
To improve performance, we use texture-atlases.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This allows configuring the bblit backend during kmscon-build. If other
rendering backends are preferred, you can now compile kmscon without the
bblit backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We are in a state where redrawing the console can take a significant
amount of time on slower machines. Therefore, we definitely need gcc code
optimizations which help here a _lot_. However, they are currently bundled
to the debug flags.
This splits this into two options. We still need this flag to get getter
backtraces. Otherwise, those inlined functions are horrible to track done.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
The freetype2 renderer uses ft2 and fontconfig to provide a very
simplistic renderer. We also simplify the logic of the whole subsystem a
lot and guarantee that each glyph will have the same size now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This fixes the console and terminal layer to use the new text renderer
instead of the old one.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This is a rewrite of the input system. The backends itself are not
modified. However, it is now possible to have multiple backends and change
them on runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We no longer require glib, yeah! Drop the mandatory glib dependency from
all build-files. Notice that there is not a single dependency, anymore,
except for libc.
We still have a not-mentioned pango dependency but this can be replaced
with freetype or a static font renderer so we currently do not care.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
As we might need dbus for inter-process-communication later, this adds a
very rudimentary dbus client integration for epoll-based loops.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This is the second release of kmscon. It's again a development release but
should now be good enough so it can run on any linux system.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
When building without DRM we should correctly clear the GBM and EGL flags.
Otherwise, we will be linking them either way.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This removes the mode where we compiled uterm with OpenGL instead of
OpenGLES2 (it was broken anyway) and makes it fully optional now.
gl_shader.h is no longer compiled if OpenGL is not available and provides
dummy helpers instead.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Nearly all drm drivers provide a GEM/TTM buffer backend called "dumb
buffers". These buffers can simply be mmap'ped like fbdev device so 2D
acceleration is available. This patch adds a backend to uterm-video that
uses these buffers. It is quite similar to the drm backend but removes all
the egl/gl/gles2 dependencies.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Remove all obsolete code and make it more readable. Nearly all features
can now be configured. However, the code doesn't work correctly if udev or
systemd is removed. That will be fixed soon, though.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This adds gtk-doc documentation builds to kmscon. All documentation is
build in a central place due to gtk-doc restrictions.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We build several internal libraries and to keep the namespaces apart we
also need different debug constants. Therefore, introduce the new
KMSCON_ENABLE_DEBUG constant which is for every debug object in base
kmscon code.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
The new uterm_monitor watches the system for seat-changes and puts all
devices under the correct seat. This allows to run kmscon on multiple
seats in a single process. It now also correctly handles seat-changes,
that is, devices that are reattached to a different seat on runtime.
It is not integrated into the kmscon source, yet, but will soon be.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
The old font-renderer was horribly slow. There were several ideas to
speed it up but I decided to add the pango backend again. Pango allows us
to draw combined-characters and all other kinds of special characters. We
would have to rewrite pango if we wouldn't want this dependency so I
currently have no idea why we should make it optional.
However, some people might not care whether they can correctly display all
kind of Unicode text but instead want some shiny kmscon without any
dependencies. Therefore, I will keep the old freetype font-renderer even
though it is not used yet. However, we can convert it at any time.
The new font-renderer is not used yet. We need to cleanup the console
layer first before it can be hooked into the terminal.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We use a single version number. The current state seems to be pretty
stable and has all the important features regarding the DRM/input setup.
Only missing stuff is VTE and console.
This is no stable release but rather a first development release.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Define LOG_ENABLE_DEBUG if we enabled debugging. The log subsystem uses
this to enable the log_debug() statements.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
uterm_video can work with any backend so we need a DRM backend to get the
same functionality as our previous compositor/output API.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We recently moved log_warning to log_warn and I forgot to fix it when
merging the kbd-dumb backend. Fix this now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
The paths can be off when building out of tree, so have make put them in
for us instead. This requires turning the straight genshader.c file to a
template.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit adds a very simple keyboard backend which does basic keycode
interpretation. It is used as a fallback when xkbcommon is unavailable
or is not required.
See the file header for what is supported.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Currently it's required by xkbcommon. However, we will need it for other
backends as well, even with xkbcommon support disabled.
xproto consisted only of static header files. We use the XK_ keysym
definitions. It is therefore only required during compilation and we
shouldn't needlessly duplicate it ourselves.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
OpenGL pulls in lot of X dependencies on linux. To avoid this we also
support OpenGLES2 now. This will also allow to run kmscon on
embedded/mobile platforms.
We still get X dependencies through EGL which we cannot avoid as EGL is
compiled with multiple backends on most systems. However, switching to
GLES2 reduces memory footprint by 30MB which is pretty good.
This also enables GLES2 as default in autogen.sh. However, default
behaviour of configure will still be GL.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
We currently define NDEBUG only if --<set>-debug is not specified at all. That
is, --disable-debug currently has almost no effect.
This fixes this bug and also corrects a wrong parenthesis.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This is a first attempt of a freetype2 backend for the font drawing functions.
This avoids the heavy pango/cairo dependencies, although, we might lose
important font handling that pango does for us like correctly drawing combined
characters.
This is still a stub implementation. The drawing operations are not supported,
yet. Use --enable-pango during configure to enable the still working pango
backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit introduces a new kmscon_input_event structure which is
delivered to the input consumer. The information provided is
- The evdev scancode (=physical keyboard key).
- The X keysym (a symbol representing what the typist really intended).
- The active modifiers (e.g. Shift, Control..)
- The unicode (UCS-4) value, when it makes sense.
To achieve this we add two dependencies:
- libxkbcommon (this entails xproto and kbproto, but shouldn't bring any of
big X dependencies)
- A function to translate keysyms to unicode values (taken from xlib,
copied in-tree).
libxkbcommon is not an all-around solution, and requires various degrees
of supporting code, depending on how much we wish to support. This
commit implements the common, basic uses:
- Choosing layouts, variants and options
- Switching groups
- Switching shift-levels
- Setting modifiers
Though some stuff is missing. Further information in the comments.
test_input.c is updated to use the new input event interface. You can
change the layouts in input.c:init_input() and see what works and what
doesn't.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This does all the boring stuff for an input subsystem:
- Input device discovery using udev
- Input device hotplug (add/remove)
- Reading the evdev data from the devices
- Publishing input events to a callback through the eloop
- Suspending and resuming the input capture
Currently the delivered input events are basically just evdev's
"struct input_event" (type, code, value). More work is required to
have it pass out useful data.
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>