Age | Commit message (Collapse) | Author | Files | Lines |
|
GtkTsmTerminal is a Gtk+-3.0 widget using libtsm. It provides a generic
terminal-widget that can be easily used to create any kinds of
terminal-emulators.
The GtkTsm program is a small example that shows how to use GtkTsm.
Note that all this is optional and only meant as example. Maybe at some
point we will install GtkTsmTerminal as shared object. However, it will
never be mandatory!
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We moved libtsm in the fdo-wiki so it's no longer a sub-kmscon project.
Update the links to reflect that.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Few more shl helpers that we later need for TSM examples. Note that
--gc-sections strips them from normal libtsm builds.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
If the sb is already NULL, there's no need to increase the age of the
screen. This avoids redrawing the terminal on each keystroke as terminals
usually have to reset sbs then.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Same move as with the other TSM files.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Some simple code-moves:
shl => src/shared/
tsm => src/tsm/
..and also move the ./docs/ files into the source tree.
This will make the tree much easier to grasp once we add more tools like
gtktsm.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Mac OS X now uses the llvm linker, so our --gc-sections logic is not
supported. Furthermore, linker-scripts aren't supported either. Add GNU-ld
and Darwin detection and drop any GNU-ld specific options if not
supported.
Dropping --gc-sections and its related options is fine. We will produce
bigger binaries, but that's just what you get if you don't support that.
On Darwin we try the -dead_stip options instead. They should work
sufficiently well.
Regarding version-scripts, we still set visibility=hidden by default and
require compilers to support __attribute__((__visibility__("public"))). So
symbols are correctly exported, but version-information will be lost.
Again, that's an issue of the target architecture and we don't care
whether they lack useful features.
(extended commit-msg and reorder am-conditionals)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Move the screen rendering helpers into a separate file. They keep getting
bigger and are totally separate from screen manipulation. Thus, keep it
separate so we can easily simplify it later.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
The screen-selection code is horrible and just hacked together. It works
and seems to have no bugs, but we definitely need to rework it. Lets move
it into a separate file to make it mostly independent of the core screen
code.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Make inc_age shared and rename it to screen_inc_age so it's obvious where
it actually belongs to.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
The screen-source gets quite huge. Lets move the struct-defs to a shared
header so we can extract the selection and render code.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This reverts:
commit 68e64ecf6d4a0b5d959962d875a97694b6abc23a
Author: David Herrmann <dh.herrmann@gmail.com>
Date: Tue Oct 22 15:53:31 2013 +0200
screen: remove empty cell fallback
Our assumption was actually not true. If we render scrollback-buffer
lines, we cannot assume that they are long enough. So add the dummy cell
again and use it if a cell is not reachable.
Note that we're safe removing the cursor-fallback, though (which was done
in a follow up). Scroll-back buffers never contain the cursor so we're
fine.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Add some minor tests for symbol tables. Also build libtsm twice, once as
static library so we can access internal symbols from within the tests.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Some minor changes and cleanups to shl_llog. Mostly cosmetic changes.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We now use valgrind to perform automated mem-leak tests on selected
test-programs. We also add a separate test_valgrind program which is used
to verify that the memcheck actually works.
We don't run these tests as part of the normal test-suite, however, we
require them for distcheck. Thus, you can avoid using valgrind if you're
not about to do dist-releases. Every developer should have it installed,
anyway, so it's fine.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This helper returns the current default attribute of the VTE object.
Compared to the def-attr of the screen it's immutable by the pty. It
should be used to draw borders and/or padding of your terminal or to
initialize the cells.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Fix library links from github to fdo.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Same as for library/symbol version, we set the package version to 3 to
avoid any conflicts with earlier embedded libtsm releases.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Fix links to point to the fdo wiki and dirs.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We used to provide libtsm as part of kmscon. To avoid any compatibility
problems, increase the library version to 3 (same for symbol versions).
This way, old libtsm libraries will not be linked to by new programs.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
-fstack-protector should be set by the build-environment, not by each
project. It may fail in subtle ways if the toolchain doesn't support it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We need to ship the additional license file with tarballs.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Add temp config.h.in files.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We don't need tsm_*.h as installed headers. Remove them.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Some minor modifications, typo-fixes and comment additions for
configure.ac.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Fix some minor autogen.sh features so we comply to common build-chain
rules.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
If the cursor is hidden we don't need to increase the age. We already do
this whenever the HIDE_CURSOR flag is changed.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Screen-resize doesn't actually move any cells so it's fairly easy to age
new cells. No need to redraw the whole buffer.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Clear parts of the existing screen if it is about to get hidden.
Otherwise, it might reach the scrollback later when it is no longer part
of the line it was during resize.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
tsm_screen_write() is fairly simple so we can easily implement proper
ageing support.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We used to not guarantee that all cells are allocated. Hence, we had to
correctly draw the cursor if they weren't. These days we have this
guarantee, though. So remove the old fallbacks.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
To fully support the new ageing API, we now implement trivial ageing. On
each modification, we simply increase the screen-age (which overwrites any
line or cell age). This basically invalidates the whole screen on each
change, but at least makes the ageing API work.
Note that for cursor movements we actually age only both changed cells.
Same for flag-changes. But these are the only non-trivial ageing
implementations so far.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
shl_hashtable is no longer used. Remove it and replace the tests with
shl_htable tests.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Replace the old shl_hashtable with shl_htable, which avoids the additional
allocations and is considerably faster. The underlying hash-table is still
the same, but our boilerplate code is reduced heavily.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Both are overly complex. Remove the boilerplate and redundant code.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We don't use the default table, anymore. Remove it so no-one else will
ever have the stupid idea to use it again.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We shouldn't use the global symbol table. It's not thread-safe. Allocate a
new one for private use in tsm_screen.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
These symbols have been used by kmscon once internally. We copied them
over during libtsm extraction. Remove them now so no-one else uses them.
They're for internal use only!
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Add a single internal header for all our shared but private code. Remove
now unused shl_misc.h.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We use next_pow2() only in the shl_array implementation, so move it. We
want shl APIs to be self-contained so this removes the array->misc
dependency.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Add C++ protection and proper docbook comments so we can later hook it up.
No huge documentation, but at least some proper grouping is added.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This adds the "ageing"-concept to the screen API. Each cell now has an
integer attached which describes its age. Furthermore, the whole screen
has an age-counter which is increased on every change we do on the screen.
Whenever we modify a cell, we increase the age-counter and set the age of
the cell to the current value of the age-counter.
During rendering, we pass the age of the cell to the cell-renderer.
Furthermore, once rendering is done, we return the current screen age.
This allows renderers to save the age of the screen with a framebuffer.
Once a specific framebuffer is redrawn, only cells with a newer age need
to be updated. Everything else can be skipped.
By saving the age with the framebuffer, this even allows multi-buffered
applications to make use of this (also see the EGL buffer-age ext for a
similar feature).
Note that the age-counter might overflow. We return 0 in that case (which
is an invalid age). Applications need to reset *all* their framebuffer
ages if that happens.
Note that non-ageing-aware applications can simply ignore the new feature
(apart from changing the draw-cb) and it'll work as before.
This does _not_ implement the real ageing feature. It only adds the API.
We currently always return 1 as age, which is wrong.. We need to fix the
whole code to increase ages correctly, which can get quite tricky if we
want the scrollback-buffer to work, too.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We need to reset the lines-link to main_lines during reset, otherwise the
alternate buffer stays active (which is not what we want).
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Fix some coding-style issues and minor logical redudancy. Also improve the
file-documentation to correctly describe what tsm_screen does today.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
The invisible padding during width reduction is not cleared as we clear
it when it gets visible again. However, if the line is pushed into
scrollback in between, it may get visible once the width is increases
again. Hence, clear padding of main-lines if screen-width is decreased.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
If we resize our screen, we guarantee that all cells are allocated. This
hasn't been true in the early times so we needed an empty cell during
rendering as fallback. It's no longer needed so remove it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Again, some leftovers from kmscon. There's no reason to provide these
callbacks. Users can just call the, before/after calling into TSM.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This helper is now unused, remove it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This is still a leftover from kmscon. Remove it, if users want it, they
should implement it themselves.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We incorrectly clear the alternate-screen and width-extensions. Fix this.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|