Sam Hocevar
a6b98c2518
Change the dirty rectangle API so that it can handle several rectangles. The
inner implementation still only handles one dirty rectangle, but this way
we can prepare supporting applictions for the future.
pirms 16 gadiem
Sam Hocevar
3a6f4323ec
Finish the dirty rectangle architecture. They are now reliable in the sense
that anything outside the dirty rectangle is guaranteed to be unchanged, but
we currently mark far too many cells as dirty. This must be optimised.
pirms 16 gadiem
Sam Hocevar
7b25d39e63
Apparently \033 is more common than \x1b for ESC. Use the former in our
code for clarity.
pirms 16 gadiem
Sam Hocevar
f61816ceb7
Starting refactoring to get rid of libcucul. The initial reason for the
split is rendered moot by the plugin system: when enabled, binaries do
not link directly with libX11 or libGL. I hope this is a step towards
more consisteny and clarity.
pirms 16 gadiem
Sam Hocevar
4ea785f818
* Remove all unsigned ints from exported functions. Signed arithmetic is
far better for error checking.
pirms 17 gadiem
Sam Hocevar
99b5396e8e
* Remove #include <stdint.h> etc. from "common.h". Instead, make sure that
<cucul.h> will provide the C99 types, even if libcaca has been installed.
* Rename what's left of "common.h" to "stubs.h".
* Remove all references to erroneous <inttypes.h> from source files.
pirms 17 gadiem
Sam Hocevar
07b9891afa
* Introduce cucul_get_canvas_chars() and cucul_get_canvas_attrs() to avoid
direct cv->chars and cv->attrs access by display drivers.
pirms 17 gadiem
Sam Hocevar
7362a612c4
* Add cucul_manage_canvas() and cucul_unmanage_canvas(). Display
drivers no longer need to access the cv->refcount private member
and __cucul_set_canvas_size() is no longer needed.
pirms 17 gadiem
Sam Hocevar
2149829bdf
* Added as many "const" qualifiers as possible to the public API.
pirms 17 gadiem
Sam Hocevar
31cbfb5bea
* Rename _cucul_set_canvas_size into __cucul_set_canvas_size to prevent
collisions due to symbol mangling.
pirms 17 gadiem
Sam Hocevar
309e287a84
* Documented which drivers support caca_set_cursor().
pirms 17 gadiem
Sam Hocevar
9597783308
* Bwarf, typo in the no warranty clause.
pirms 18 gadiem
Sam Hocevar
33058757da
* Add a no warranty clause to the code.
pirms 18 gadiem
Sam Hocevar
e1a42d9b42
* Added caca_set_cursor(). Not yet functional.
pirms 18 gadiem
Sam Hocevar
fcee80f87d
* Factored terminal title setting code.
* Do not try to set the terminal title if TERM=linux.
pirms 18 gadiem
Sam Hocevar
dac2f4d57f
* Implemented caca_set_display_title() for ncurses and S-Lang.
pirms 18 gadiem
Sam Hocevar
51936f585c
* Got rid of HAVE_ERRNO_H ifdefs by defining seterrno()/geterrno() functions.
* More debugging information in the import/export and font functions.
pirms 18 gadiem
Sam Hocevar
26c3ea1aa4
* Removed "This function..." constructs from documentation. Fixed a few
documentation errors or imprecisions.
pirms 18 gadiem
Sam Hocevar
bc5415d6a4
* Fixed libcaca prototypes so that all functions use the errno mechanism
and return a value.
pirms 18 gadiem
Sam Hocevar
f713c97f7c
* Reduced IDLE_USEC by half. Today's machines are fast :-)
pirms 19 gadiem
Sam Hocevar
5d12480dd6
* Renamed caca_set_delay() and caca_get_rendertime() into
caca_set_display_time() and caca_get_display_time() for consistency.
pirms 19 gadiem
Sam Hocevar
5cb4d4dedf
* Removed duplicate uint*_t defines from *_internal.h and included common.h
in all .c files that needed it.
pirms 19 gadiem
Sam Hocevar
1ec6544305
* More function mass-renaming: caca_attach -> caca_create_display, etc.
pirms 19 gadiem
Sam Hocevar
18f6532dbc
* Renamed main canvas-related functions so that they have "canvas" in
their name, eg. cucul_create() -> cucul_create_canvas() etc.
* Moved buffer-related functions to cucul/buffer.c.
pirms 19 gadiem
Sam Hocevar
687a2c43f6
* Renamed caca_t into caca_display_t.
* Renamed canvas handle variables from "c" to "cv". Eh ouais mon gros.
pirms 19 gadiem
Sam Hocevar
246c5b4d67
* Renamed cucul_t into cucul_canvas_t. Eh ouais mon con.
pirms 19 gadiem
Sam Hocevar
2c5ccb65e6
* Improved documentation in many places.
pirms 19 gadiem
Sam Hocevar
018fda76e8
* Removed \file directives from all files except caca.h and cucul.h, to
remove redundencies in the Doxygen documentation.
pirms 19 gadiem
Sam Hocevar
5696329b86
* Merged caca_show_cursor() and caca_hide_cursor() into caca_set_mouse() so
that we have one function less.
* Fixed coding style.
* Removed FUCKING TABS. ____.------.___
_______.----'`` ``` `` ``` ``-.
_.--' ` ```` ` ` ` ``` `` `` ``.
_.-' ' ` `` ``` `` ` `' `. _
.-'' ` H A H A H A `' M A I S \/.)
. . .-' / ` ` ` `` ||
|`-.(``-. ` ` ` ' ` ` ``` |\
`. '\```\ `` ` V I E U X ' ' `` `-`` -|\\
`/''````) `` ` - - ````` ' '.' |\_)
|`'_._` ``` ''` P O R C . . ```` /
// @) \ ` `` ''' . ``` '/
/''''' | ` \).`.'-. ''' _ _ .`` ` '/
.''''- `-'`. . // )-- '/,,',,' ,,,,''__,._`' ' /
.' ` `- ` ' .' / ' /,;;;, ,___.---' \ '' / \
(`. .'` __',`''''.--'/ ' /'-----' | ' / ))
`'-'/ `'''_.---' \;;|- '/ ,,, | ''|`- |
`'--'---' |;| / ,,,,;;;;;;;;;;,,,,, |-' /` |
|;|-'| ,;;;;;;;;;;;;;;;; ;;;/ /|`'''
''',,,''',,,,,,,,,,,,,,,' /,,'''
''''
pirms 19 gadiem
Jean-Yves Lamoureux
5661cbd393
* Fixed bug in show/hide cursor, implemented X11 cursor
pirms 19 gadiem
Jean-Yves Lamoureux
6239887913
* Added caca_show/hide_cursor, and corresponding GL binding
pirms 19 gadiem
Sam Hocevar
77f995023d
* Slightly changed header comments.
pirms 19 gadiem
Sam Hocevar
02ccf6ec3b
* Cosmetic fixes.
pirms 19 gadiem
Sam Hocevar
d1e1dbd630
* Use the internal version of cucul_set_size in output drivers so that
they can force a resize. We need to find a way to make those specific
cucul - caca interactions unavailable to the clueless user.
pirms 19 gadiem
Sam Hocevar
8995ef3837
* Removed unused includes.
pirms 19 gadiem
Sam Hocevar
da30961a0e
* Fixed async issues between the driver and libcaca when resizing windows,
and simplified the handle_resize() API. Still can be polished.
pirms 19 gadiem
Sam Hocevar
8f286f6432
* Finished moving everything driver-specific to the apropriate driver_*.c
files. Phew. Now they just need a few comments.
pirms 19 gadiem
Sam Hocevar
70d96c811b
* Polished the driver split a bit (still no events, except resize events),
properly credited authors and documented a few things.
pirms 19 gadiem
Sam Hocevar
34764ae68a
* Split caca/graphics.c into driver-specific files. Resize is currently
broken, and event handling is not yet in the driver-specific files, but
I will of course fix that later.
pirms 19 gadiem
Sam Hocevar
4f59010b4c
* Moved stuff around to differenciate between libcucul and libcaca.
pirms 19 gadiem
Sam Hocevar
6c6beb3541
* Use 32 bit integers for the character array. No visible difference for
now because we only do ASCII, but that will let us do Unicode later.
pirms 19 gadiem
Sam Hocevar
92ef8499f1
* Removed caca_set_{size,width,height} because cucul_set_size ought to be
enough for everyone. Maybe I'll reintroduce caca_set_size sometime in the
future because it's libcaca who gets the resize events, after all.
pirms 19 gadiem
Jean-Yves Lamoureux
044c9d39a0
* I just suck. I'll goatse myself right after beeing back at home.
pirms 19 gadiem
Sam Hocevar
87f22f292e
* src/graphics.c: minor optimisations.
pirms 19 gadiem
Sam Hocevar
730834f30b
* Nan mais je voudrais pas avoir l'air d'insister mon gars, mais primo
dans la vraie vie, 0x007f7f7f et { 0x00, 0x7f, 0x7f, 0x7f } n'ont pas
toujours les bytes dans le meme ordre, deuzio un unsigned int n'a pas
toujours 4 bytes, et troizio tu pourrais au moins checker que ca fait
pas de warnings et/ou que ca segfaulte pas !
pirms 19 gadiem
Jean-Yves Lamoureux
4c53d0ea48
* Mais je fais comme je veux bordel de cul !
pirms 19 gadiem
Sam Hocevar
0ecdc0280b
* Haha mais vieux porc a pattes !
pirms 19 gadiem
Jean-Yves Lamoureux
2826bc67f5
* Reverted to integer colors in GL driver, fixed a bunch of warnings in slang.
pirms 19 gadiem
Sam Hocevar
6d99c79d26
* All output plugins should now work again.
* Renamed caca_refresh() into caca_display() which makes more sense.
* Optimised gl_bgpal by directly storing floats instead of doing the
conversion at runtime.
* Handle resizing in cucul_set_size() and try to keep as much information
as possible from the previous canvas.
* Moved most global variables into cucul_t or caca_t contexts.
* Moved time.c into libcaca.
pirms 19 gadiem
Sam Hocevar
4c72df99aa
A new low-level text management library (canvas for ultrafast compositing
of unicode letters) is now separated from the higher level rendering and I/O
(that is, libcaca). This commit totally breaks the API, but once everything
is polished I will think about source-level backward compatibility. Most
drivers are broken, but X11 still sorta works.
The new design is much more object-oriented and allows having several
active renderers at the same time, changing renderers on the fly, and more
important, having no renderer at all (useful for converters, or when you
want to do your own renderer).
And in case you are still wondering, the libcucul acronym has "Unicode"
because I want to support at least a subset of Unicode. There are awesome
glyphs in it, including the ones inherited from Codepage 437 such as
"gray 25%" that are used in DOS and Win32 ANSI art.
pirms 19 gadiem