Olivier Goffart
7fbcb78606
vtable: change VRc and VWeak to add the concrete type as a parameter
...
... or `Dyn` if unkown.
So we can implement Deref for the concreate type.
Sicne Deref is implemented for VRc, all the method of VRc are now
associated function.
2020-11-06 11:50:31 +01:00
Olivier Goffart
270408d485
vtable::VRc: Add few comments and missing function found in review
2020-11-06 10:11:44 +01:00
Olivier Goffart
2c10daa6b2
Update helper_crates/vtable/macro/macro.rs
...
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2020-11-06 10:11:44 +01:00
Olivier Goffart
f852b0bb6a
vtable: new VRc and VWeak pointer
2020-11-06 10:11:44 +01:00
Olivier Goffart
1138c9dbed
Normalize the spelling of SixtyFPS
2020-10-13 07:48:55 +02:00
Simon Hausmann
e5dfb3a4c0
Implement basic focus handling
...
Similar to the mouse_grabber, we use a VisitChildrenResult field to
track the focus item within a component. Unlike the mouse grabber
however, it is set/cleared using dedicated focus events.
The key event now routes the key event directly to the focus item.
The focus can be requested via set_focus_item on a window, which the
TextItem does.
2020-09-25 10:43:47 +02:00
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00
Olivier Goffart
2a0c496e41
minor doc changes
2020-08-26 08:32:13 +02:00
Simon Hausmann
46911f60ee
Minor doc fixes to the vtable crate
2020-08-25 16:22:07 +02:00
Simon Hausmann
b80182ce00
Minor doc fix for FieldOffsets.
...
Split the sentence into two pieces to make it easier to read.
2020-08-25 16:00:48 +02:00
Olivier Goffart
697aa61a0c
Some doc polish
2020-08-25 15:33:15 +02:00
Olivier Goffart
c299bd5483
We are not using the ConstFieldOffset trait, so put it in a feature gate
2020-08-25 14:42:18 +02:00
Olivier Goffart
2c0fc29c5c
Some fixup for the documentation
2020-08-25 14:42:18 +02:00
Olivier Goffart
304b0e7b0e
Make sure the langref doc can be opened if the package is on crates.io
...
One need to make a symlink because the files need to be in the package
2020-08-25 14:42:18 +02:00
Olivier Goffart
6a77142dec
Add the version field for the vtable crate
2020-08-25 12:33:17 +02:00
Olivier Goffart
05a6681b92
The version 0.3.2 of field-offset was released
2020-08-24 16:39:47 +02:00
Olivier Goffart
ea1f215367
Some polishinbg of the .toml files
...
- Give all the sixtyfps-* create a 0.0.1 version
- Make sure that the internal dependences are using the exact same version
(so "=0.0.1")
- Add the description/homepage/repository fields in the .toml files
- Set publish=false to crates that are not meant to be published on crates.io
2020-08-24 16:28:11 +02:00
Olivier Goffart
cbeb982684
Use the FieldOffset struct from the upstream create
2020-08-24 11:20:38 +02:00
Simon Hausmann
b9bcf01019
Exclude const-field-offset from the license check
...
This is in fact a third-party crate slightly forked
2020-08-18 13:59:31 +02:00
Simon Hausmann
7f1d9f5252
Commit correct license tags to Cargo.toml
...
For now that's GPL-3.0 only, but this can be changed :-)
2020-08-18 10:12:59 +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
c7827c9dd5
Add support for Drop when using #[pin] with const_field_offset
...
A new attribute implements the Drop mechanics outlined in the Pin
documentation without requiring the use of unsafe on the caller side,
by means of an intermediate PinnedDrop trait.
2020-08-14 13:44:53 +02:00
Olivier Goffart
681f304768
Add a few Debug impl
2020-08-10 17:25:15 +02:00
Olivier Goffart
0a56912d0f
Mouse grab in rust
2020-08-07 16:06:49 +02:00
Olivier Goffart
0b1648d891
Fix formating
2020-08-04 11:52:47 +02:00
Olivier Goffart
1bfd708784
Change the field_offsets() function to a FIELD_OFFSETS associated const
2020-08-03 16:04:55 +02:00
Olivier Goffart
86a85cf838
vtable: change #[offset] to #[field_offset]
...
And add a documentation for it
2020-08-03 11:26:48 +02:00
Olivier Goffart
00c32e9c6d
vtable: remove the convinient type alias from the macro
...
If one really need them, they can be implemented by the user
2020-08-03 11:03:24 +02:00
Olivier Goffart
2e74fa43cd
Use pin-weak from crates.io
2020-08-03 09:18:04 +02:00
Olivier Goffart
cb67e40c32
Rename WeakPin -> PinWeak
2020-07-31 18:19:26 +02:00
Olivier Goffart
75671c18e7
Rename weak-pin crate to pin-weak
2020-07-31 18:18:12 +02:00
Olivier Goffart
77cf1e1e83
Some documentation change following today review
2020-07-31 16:28:59 +02:00
Simon Hausmann
9d9779ecde
Fix linter warning
...
When docs are required, don't require them for the generated field offset module.
2020-07-07 14:14:17 +02:00
Olivier Goffart
f8a63b1b76
Add a weak-pin crate that can be used to create Weak pointr from Pin<Rc>
2020-06-26 17:30:40 +02:00
Olivier Goffart
1b748792ad
Visit the item as Pin
...
A preparation to have Property::get to take Pin<Self>
2020-06-25 18:50:20 +02:00
Olivier Goffart
40f4265071
Some improvement in ConstFieldOffset trait
2020-06-25 18:23:08 +02:00
Olivier Goffart
812b08b50c
const_field_offset: Add compile type type for the offset
...
WIP
2020-06-25 17:46:29 +02:00
Simon Hausmann
c18861125d
Small typo fix :-)
2020-06-25 14:22:10 +02:00
Olivier Goffart
f50a705e00
Add the #[pin] attribute to be able to project to the pinned item
2020-06-25 12:18:09 +02:00
Olivier Goffart
9ed660926c
Added a #[pin] attribute in the FieldOffsets macro
2020-06-25 12:18:09 +02:00
Olivier Goffart
23e9397578
Add a Pinned flag to FieldOffset
...
So we can have Pinned projection
2020-06-25 12:18:09 +02:00
Olivier Goffart
d4e68971ef
Make FieldOffset contra-variant in U
2020-06-24 18:53:53 +02:00
Olivier Goffart
4960cee542
const-field-offset: some documentation fixup
2020-06-24 18:20:14 +02:00
Olivier Goffart
b6705c6c69
const_field_offset: ensure that the structure is not repr(packed)
2020-06-24 18:20:14 +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
Olivier Goffart
f74c801b59
Fix a bunch of warning in the generated rust
2020-06-17 10:26:20 +02:00
Olivier Goffart
064db5aa5b
const-field-offset: Add a way to specify the crate name
2020-06-16 13:47:02 +02:00
Olivier Goffart
30b201d946
Reduce the use of unsafe in corelib and in the rust backend
2020-06-12 19:03:15 +02:00
Olivier Goffart
bbb2b487b9
Implement a way to create a VRef for non static vtable
2020-06-12 17:09:51 +02:00
Olivier Goffart
34931e58c0
Polishing of the documentation
2020-06-08 17:57:18 +02:00