Commit graph

123 commits

Author SHA1 Message Date
Olivier Goffart
142a8dc185 Rename ImageReference to ImageInner and make Immage.0 private 2021-05-28 17:05:16 +02:00
Olivier Goffart
35cce45cbc Add a fii feature so that we don't compile in the ffi code if not required 2021-03-16 18:09:57 +01:00
Olivier Goffart
6f88d78303 Rename Resource to ImageReference in the runtime 2021-03-11 10:06:23 +01:00
Simon Hausmann
f087cc18bc Remove extern "C" functions from wasm module
We don't need these functions and their export. They account for ~20kb in
the optimized .wasm - plus JS glue code.
2021-02-26 17:04:49 +01:00
Simon Hausmann
391d0152f0 Add Color::brighter/darker functions
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Olivier Goffart
9eac131ae5 Add the logo in the docs 2021-02-12 08:24:42 +01:00
Simon Hausmann
57d3a34996 Prospective fix for doc errors
In the nightly it appears that `no_mangle` is now considered "unsafe",
so we need to allow that in the ffi modules. For the layout code this
patch also creates that ffi module with prefixed function names, like in
the other modules and only allows unsafe in there.
2021-02-10 11:26:28 +01:00
Simon Hausmann
93c0fe54ea Prepare for using graphics::Brush in the rendering backends
by introducing mappings to QBrush and femtovg::Paint
2021-02-03 08:39:53 +01:00
Olivier Goffart
547b2a7f6e Introduce Backend trait
Such that the font are properly registered when the GL backend is chosen at runtime
2021-01-15 12:20:32 +01:00
Olivier Goffart
9ef1c36a52 Move the eventloop module to the backend 2021-01-14 08:53:13 +01:00
Simon Hausmann
727c9a19f7 Add basic text item support
This needs more work, but gets something onto the screen at least.
2021-01-14 08:53:13 +01:00
Olivier Goffart
9050c29305 Don't use the window through the eventloop module 2021-01-14 08:53:13 +01:00
Olivier Goffart
e2ac322be0 Move the ComponentWindow in its own module 2021-01-14 08:52:22 +01:00
Olivier Goffart
16f5a03c14 Run cargo fmt 2020-12-18 10:29:15 +01:00
Olivier Goffart
dfa25b96f7 Rename SharedArray to SharedVector 2020-12-18 10:26:07 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
a949570c57 Timer in C++ 2020-12-10 13:08:58 +01:00
Olivier Goffart
8a64f10e84 Remove ComponentVtable::input_event
And the custom handling of the mouse grabber
2020-11-24 16:23:37 +01:00
Olivier Goffart
596b740b62 Rename ARGBColor to RgbaColor 2020-11-23 11:47:47 +01:00
Simon Hausmann
a37d42fa0e Add an init function to the Item vtable
This will be called by the run-time and will allow items to set up
bindings that rely on internals that should not be exposed to the
compiler/runtime.
2020-10-12 16:49:44 +02:00
Simon Hausmann
0d751e6627 Render a text cursor for TextInput items
It doesn't look quite perfect yet, but it's a start.
2020-09-18 17:58:14 +02:00
Simon Hausmann
ad77896312 Change the way Text's default color is implemented
Instead of via an item constructor, implement support for default
bindings in the compiler.
2020-09-16 13:41:18 +02:00
Simon Hausmann
1d6af1da09 Prospective CI build fix
Try to ensure that the C functions in items.rs are included in the binary.
2020-09-16 08:38:30 +02:00
Simon Hausmann
19cce012a0 Add ARGBColor<T> to the color API
As discussed in the last API review, this replaces the as_rgba_f32/u8
"accessor" functions by returning a struct with named fields.
2020-09-08 22:11:23 +02:00
Olivier Goffart
c8fa3354be Change the implementation of SharedArray so that it can destruct its contents 2020-09-04 15:37:38 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
d3a474af26 Move corelib::Component and friends back into their dedicated component module 2020-08-12 11:39:07 +02:00
Simon Hausmann
0df86d7eeb Move corelib::abi::datastructures::Component to corelib 2020-08-12 10:53:03 +02:00
Simon Hausmann
829990f9b1 WIP
Co-authored-by: Olivier Goffart <ogoffart@woboq.com>
2020-08-07 16:06:49 +02:00
Simon Hausmann
df4e837b04 Move model placeholder module out of abi 2020-08-04 08:27:34 +02:00
Simon Hausmann
f79b80f1e6 Split corelib::abi::sharedarray into corelib::sharedarray and corelib::sharedarray::ffi 2020-08-04 08:26:44 +02:00
Simon Hausmann
3ad7a55038 Split corelib::abi::signals into corelib::signals and corelib::signals:ffi 2020-08-04 08:24:04 +02:00
Olivier Goffart
b9088aa178 Fix linking of C++ code 2020-08-03 18:45:25 +02:00
Simon Hausmann
37f874a26b Rename test_ellapse_time to mock_elapsed_time 2020-08-03 17:52:42 +02:00
Simon Hausmann
f2166d91a6 Move tests out of abi 2020-08-03 17:48:17 +02:00
Simon Hausmann
dbd6708959 Move string out of abi
And split the FFI-only bits into an ffi submodule.
2020-08-03 17:44:49 +02:00
Simon Hausmann
0252d2ac34 Move slice out of abi 2020-08-03 17:41:16 +02:00
Simon Hausmann
9b13b363c3 Move corelib::abi::properties to corelib::properties
And the bits that are only there for the C binding are now in an ffi sub-module.
2020-08-03 17:32:28 +02:00
Simon Hausmann
785bdb62ed Fix linking on Linux 2020-08-03 15:35:19 +02:00
Simon Hausmann
8338bd4360 Move CachedRenderingData from datastructures into item_rendering 2020-08-03 14:17:38 +02:00
Simon Hausmann
30d7a0b36d Move PathData and friends from datastructure to
graphics
2020-08-03 13:43:44 +02:00
Simon Hausmann
1b270f42d0 Move datastructures::Color into graphics 2020-08-03 13:27:35 +02:00
Simon Hausmann
ce7f66320b Move datastructures::Resource into graphics
It's only used for graphics at the moment and used
for image resources.
2020-08-03 12:47:05 +02:00
Simon Hausmann
69beab5957 Rename corelib::abi::primitives to corelib::items 2020-08-03 10:32:03 +02:00
Olivier Goffart
9760cf4969 Begin to implement a Flickable
The implementation is still very rough and will need to be improved
2020-07-30 14:36:21 +02:00
Simon Hausmann
8a2ff4fd5f Provide a basic implementation of layout_info for Text
This also starts moving the rendering independent part of the font handling
to corelib. The next step will be to adapt the rendering code to use that
instead of its own.
2020-07-27 21:36:58 +02:00
Olivier Goffart
debd2b5839 Smaller workaround for the fact that some function are not exported 2020-07-23 17:11:00 +02:00
Olivier Goffart
05c5f7c53d Test and fix animations on properties
The animation should not start when the property is initialized, only when the
property is set by the setter
2020-07-23 11:45:34 +02:00
Olivier Goffart
e00491811b Get rid of the context in properties/signal 2020-07-13 18:49:06 +02:00