Daniel Eklöf
95385863ae
particle: remove cairo context from begin_expose()
2019-09-22 00:55:06 +02:00
Daniel Eklöf
b3a5e0b5d7
font: initial port from cairo scaled fonts to raw freetype + pixman
2019-09-22 00:50:11 +02:00
Daniel Eklöf
08e21a4d3b
meson: assign get_option('core-plugins-as-shared-libraries') to variable
2019-05-06 21:49:20 +02:00
Daniel Eklöf
ea9aea8daf
cmake: remove build files (replaced with meson)
2019-05-04 11:48:20 +02:00
Daniel Eklöf
2654d37548
meson: no need to build static libs of plugins
2019-05-03 23:18:49 +02:00
Daniel Eklöf
789cdd949b
meson: use join_paths()
2019-05-03 23:10:01 +02:00
Daniel Eklöf
e563761093
meson: install plugins
2019-05-01 22:08:15 +02:00
Daniel Eklöf
fdb9a9bc1c
meson: initial support for building plugins as shared libraries
2019-05-01 18:21:35 +02:00
Daniel Eklöf
51e9d691e4
meson: initial build conf
...
Not that well tested yet, does not support plugins-as-modules
2019-05-01 12:39:59 +02:00
Daniel Eklöf
cf680573c2
particle/string: improve font centering
...
* Use ascent+descent instead of 'height'
* Center around 'ascent', except when 'descent' is negative
2019-03-01 17:55:05 +01:00
Daniel Eklöf
611b5b551c
particle/string: use *font* extents to calculate font baseline
2019-02-28 20:10:54 +01:00
Daniel Eklöf
ea38ab3b2f
particle/module: pass a cairo context to all begin_expose()
2019-02-28 20:10:26 +01:00
Daniel Eklöf
6bba9200cf
particles: use calloc() instead of malloc()
...
In cases where it makes sense, use calloc() instead of malloc():
* When allocating large objects with many members, many for which
NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 11:05:12 +01:00
Daniel Eklöf
7ff0f5a2f3
cmake: need CMake >= 3.13 since we use target_link_options()
2019-02-07 12:26:05 +01:00
Daniel Eklöf
727d7b343f
cmake: initial support for building wayland-only, or x11-only
2019-02-03 20:05:44 +01:00
Daniel Eklöf
452c4b6015
plugins: export a const function pointer interface struct
2019-01-26 18:32:04 +01:00
Daniel Eklöf
2b3d432164
cmake: we don't *really* need 3.13
2019-01-20 13:07:38 +01:00
Daniel Eklöf
498a3e3d78
particle/string: free glyphs and clusters in destroy()
2019-01-20 10:06:17 +01:00
Daniel Eklöf
5a0d192ec1
particle/string: re-use glyphs calculated in begin_expose()
...
In begin_expose(), we call cairo_scaled_font_text_to_glyphs()
with (x,y) = (0,0), in order to calculate the glyph extents (needed
for width calculation).
Then, in expose(), we called it again, but with correct (x,y) offsets.
Simplify this, by caching the glyphs from begin_expose(). Then, in
expose(), simply adjust the glyph offsets before calling
cairo_show_text_glyphs().
2019-01-20 10:02:13 +01:00
Daniel Eklöf
bfa9ce9970
particle/ramp: value is *also* offsetted by the minimum value
2019-01-19 20:17:26 +01:00
Daniel Eklöf
04f7f3485f
particle/string: don't cut in the middle of an utf-8 multibyte
...
When limiting a string (due to it exceeding it's max length), make
sure not to cut it in the middle of an utf-8 multibyte, as this
results in an invalid utf-8 string.
2019-01-17 20:44:51 +01:00
Daniel Eklöf
09270c4670
particle/string: handle conversion failures in cairo_scaled_font_text_to_glyphs()
...
In particular, use cairo_scaled_font_text_to_glyphs() to calculate the
extents, since the cairo_scaled_font_text_extents() will leave the
scaled font in an error state, which is impossible to recuperate from.
2019-01-17 20:18:46 +01:00
Daniel Eklöf
c868a4ac46
particle/list: disable debug
2019-01-15 19:15:57 +01:00
Daniel Eklöf
8f58e161bc
particle/string: disable debug
2019-01-15 19:15:48 +01:00
Daniel Eklöf
0d591fe5a1
allow plugins to be compiled into the f00bar main binary
2019-01-14 20:57:03 +01:00
Daniel Eklöf
c6b83ac7dc
particles: cmake: compact CMakeLists.txt by using foreach()
2019-01-13 21:55:42 +01:00
Daniel Eklöf
c6ce536cff
particle/string: explicitly link against cairo
...
Because it's the right thing to do. It worked without it, since the
f00bar main binary is linked with -rdynamic (to give plugins access to
core functions).
2019-01-13 21:49:24 +01:00
Daniel Eklöf
bc9c33c187
particle/dynlist: link particle-sdk PRIVATE:ly
2019-01-13 21:45:49 +01:00
Daniel Eklöf
2f83ed1fc3
particle/dynlist: compile as a shared library
2019-01-13 21:43:56 +01:00
Daniel Eklöf
4eee71eaf4
particles: cmake: header files have been removed
2019-01-13 17:41:48 +01:00
Daniel Eklöf
4a26664d8d
particles: remove config-verify.h from particle.h
2019-01-13 17:41:39 +01:00
Daniel Eklöf
07b1615a41
particles: get rid of struct particle_info
...
Since this struct only contained function pointers, make all particles
export those functions directly.
The plugin manager now defines a particle interface struct, and fills
it it by dlsym:ing the functions that used to be in particle_info.
2019-01-13 17:03:35 +01:00
Daniel Eklöf
74b0722d2f
particles: remove header files
2019-01-13 16:49:46 +01:00
Daniel Eklöf
8dc278aaf2
config: pass a struct with inheritable values
...
For now, font and foreground color
2019-01-13 14:13:14 +01:00
Daniel Eklöf
7776135454
particles: caller of from_conf() must provide base particle instance
2019-01-13 13:25:14 +01:00
Daniel Eklöf
8bc6a0b783
oarticles: don't assume particle content is a dictionary
...
This is done by having each particle implement a top-level verifier
function.
2019-01-13 12:47:20 +01:00
Daniel Eklöf
e471c2357d
cmake: set _GNU_SOURCE globally, and only once
2019-01-13 11:40:09 +01:00
Daniel Eklöf
71515e4079
config: conf_verify_dict() now assumes attr list is NULL-terminated
2019-01-13 11:37:05 +01:00
Daniel Eklöf
45280416ff
modules, particles: type-specific filename prefix
...
Instead of naming the shared libraries libfoo.so, add a type-specific
prefix: module_foo.so, or particle_foo.so
2019-01-13 11:26:31 +01:00
Daniel Eklöf
307a1f5ec8
particles: all particles can have a decoration
2019-01-13 11:16:52 +01:00
Daniel Eklöf
311193751c
particles: install target
2019-01-13 11:14:57 +01:00
Daniel Eklöf
47018104da
particles: compile as shared libraries (plugins)
2019-01-13 11:13:47 +01:00
Daniel Eklöf
7b98ea2b7c
particle/string: expose info through the new struct particle_info struct
2019-01-13 10:49:10 +01:00
Daniel Eklöf
9f8000b047
particle/ramp: expose info through the new struct particle_info struct
2019-01-13 10:40:47 +01:00
Daniel Eklöf
21e28315e3
particle/progress-bar: expose info through the new struct particle_info struct
2019-01-13 10:38:25 +01:00
Daniel Eklöf
73b8bf1346
particle/map: expose info through the new struct particle_info struct
2019-01-13 10:34:15 +01:00
Daniel Eklöf
6379b1939f
particle/list: expose info through the new struct particle_info struct
2019-01-12 22:56:00 +01:00
Daniel Eklöf
0f8f21510a
particle/empty: expose info through the new struct particle_info struct
2019-01-12 22:48:23 +01:00
Daniel Eklöf
75bdd2ad3c
config: use dashes, '-', instead of underscores, '_' in attribute names
2019-01-12 10:32:52 +01:00
Daniel Eklöf
558f75a54b
module/particle: remove cairo context from begin_expose()
2019-01-09 18:50:26 +01:00