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
Simon Hausmann
1f7ae1b318
Rename PathElements to PathData
...
as it can now consists of elements or events.
2020-07-10 13:01:05 +02:00
Olivier Goffart
055a3baf90
Remove the binding when the animation on value is finished.
2020-07-02 17:28:04 +02:00
Olivier Goffart
9d852f802e
Property refactoring
...
The tests are working and everything seems to be back normal.
But there is still some cleanup required
2020-07-02 14:14:49 +02:00
Simon Hausmann
4e22c2839e
Add the rendering primitives for rendering a path
...
Right now the path is limited to polygons (only LineTo elements) and only the fill color can be specified.
2020-07-01 14:58:09 +02:00
Simon Hausmann
e4ab64f858
Add a SharedArray type
...
This is based on the SharedString code and will allow sharing ownership
of arrays between Rust and C++.
2020-07-01 14:58:09 +02:00
Simon Hausmann
f7517f403c
Make the color a valid property type
...
This replaces Property<u32> with Property<Color>
2020-06-26 21:46:37 +02:00
Olivier Goffart
caca0d0ba4
Put the component in a Pin<>
...
Removed the drop and create from the ComponentVTable:
since we are not using VBox<ComponentVTable>, this simplifies a bit
the code of the interpreter and everything else.
But there is still a lot of changes everywhere to support that the Component
is pinned.
This is just for the component. Which would be required if later we want
to access the properties as Pin<Property<_>>. But we have not yet ability
to do projections
2020-06-24 14:13:27 +02:00
Simon Hausmann
8f613685ba
Expose a ComponentWindow in C++
...
This paves a way for a more modular API.
2020-06-17 19:15:18 +02:00
Simon Hausmann
85bf8a195a
Improve EventLoop encapsulation
...
Hide the winit loop and extract it only in the GL renderer
2020-06-17 15:16:46 +02:00
Simon Hausmann
e1455ff4ce
Move fn eventloop::run into the eventloop::EventLoop impl
2020-06-17 10:18:36 +02:00
Simon Hausmann
5711f25195
Newtype'ify the event loop
...
That way it'll be easier to introduce a user event later and control the
public API.
2020-06-17 10:15:03 +02:00
Simon Hausmann
2b95b344d8
Further cleanups
...
Move the GraphicsWindow into graphics.rs -- there's not much in that
file otherwise ;-) and now lib.rs is concise again.
2020-06-16 16:38:37 +02:00
Simon Hausmann
4922364c46
Cleanup: move the event loop code into a separate module
2020-06-16 16:26:52 +02:00
Simon Hausmann
405de0b0ca
Further separation between window and the event loop
...
Make it possible to create the window without an event loop and allow mapping
the window later.
2020-06-16 16:09:52 +02:00
Simon Hausmann
cb0aeb0db7
Minor GenericWindow trait cleanup
...
The trait functions don't need to consume an Rc, it turns out.
2020-06-16 14:42:13 +02:00
Simon Hausmann
8d7395099c
More main window cleanups
...
Fold the standalone functions of rendering and input event processing into the
generic window trait impl
2020-06-16 14:03:57 +02:00
Simon Hausmann
2fba097e81
Clean up window registration
...
Automatically register the weak ref in the "constructor" of the main
window and de-register on drop.
2020-06-16 13:33:16 +02:00
Simon Hausmann
0e0ace8591
Separate window from the event loop
...
Remove the window parameter from the run_event_loop function. Instead
the windows are kept in a global hash map, keyed and retrieved by window
id.
2020-06-16 13:06:56 +02:00
Simon Hausmann
0dd1d953aa
Prepare for cleaner separation between window and event loop, part 5
...
Make the main window a reference counted type. That'll allow keeping
track of all windows safely in the future.
2020-06-16 13:04:43 +02:00
Simon Hausmann
3451048842
Prepare for cleaner separation between window and event loop, part 4
...
Make run_event_loop operate on a GenericWindow trait. It's still an impl
right now (so static dispatch), but that's just cosmetic.
2020-06-16 11:34:21 +02:00