this must be explicitly added for windows builds
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8725
this breaks library path setup in the build: the dependencies for runtime
are set for the 'env' executable instead of for edje_cc
for now, EFL_RUN_IN_TREE must be set manually
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8724
This splits the eolian_file_parse API into two, one for parsing
files already present in the database (always by filename) and
one for parsing paths.
It fixes several bugs/leaks on the way (incorrect use of
stringshare etc.) as well as adds checking for whether there
are no conflicting filenames at scan time, for free. That means
it is now no longer possible to scan two paths which have an eo
or eot file of the same name in them.
It should also be faster now.
It also fixes T7820.
@fix
the pack interface is a general interface for how we pack things into a
container. the align and padding property has less to nothing to do with
this. Hence this commit splits the two properties into theire own
interface.
fix T7825
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8699
Summary:
I forgot `efl_pack_layout_request` after relation_xxx is changed.
Unnecessary register function in `relation_xxx_get` will return unexpected result.
if a object is not child of relative_layout, `relation_xxx_get` should return
`target = NULL` and `relative = 0.0` with error message.
Test Plan: make check
Reviewers: Jaehyun_Cho
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8627
Summary:
If the size or hints of a child changes, relative_layout need to update layout.
And, if a child is deleted, it should be unregisterd from relative_layout.
Depends on D8625
Test Plan: elementary_test -to 'efl.ui.relative_layout'
Reviewers: Jaehyun_Cho
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8626
Summary: If there is no clipper of container, color_set and clipper_set api won't work.
Test Plan:
1. elementary_test -to 'efl.ui.relative_layout'
2. Click button1
3. check that buttons color are changed.
Reviewers: Jaehyun_Cho
Reviewed By: Jaehyun_Cho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8625
Summary:
After D8397, interfaces have the I prefix again, so the "Do" prefix on
methods with repeated names may not be needed for them in most cases.
This commit also consolidates the method_managed_name calls with the
overload receiving attributes::function_def instead of plain name.
Fixes T7791
Depends on D8645
Reviewers: vitor.sousa, felipealmeida, segfaultxavi
Reviewed By: segfaultxavi
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7791
Differential Revision: https://phab.enlightenment.org/D8650
Summary:
Efl.Ui.Button_NativeInherit -> Efl.Ui.Button.NativeMethods
Will help using EFL# with completion tools.
* Added pragmas around the native function definitions to avoid
warnings related to the name of native functions
* Updated some style fixes for native function wrappers.
Their preamble and epilogue styling will be dealt with in future diffs.
As a side effect, concrete classes had to be made public again as they
hold the function pointers to the native methods of their interfaces.
Thus a third party library class that implements IFoo should be able to
access these methods.
Fixes T7743
Depends on D8622
Reviewers: vitor.sousa, felipealmeida, segfaultxavi
Reviewed By: vitor.sousa, segfaultxavi
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7743
Differential Revision: https://phab.enlightenment.org/D8645
Summary: Also do not generated empty tag if doc would be empty.
Reviewers: vitor.sousa, segfaultxavi
Reviewed By: vitor.sousa, segfaultxavi
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8612
Summary: Only generate it if there was at least one method registered.
Reviewers: vitor.sousa, felipealmeida
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8608
Summary:
dotnet's GC seems to be more agressive, showing some issues that usually
do not appear when running under Mono's.
This commit uses for free_cb's the same scheme we already use for
regular Eo refs, using a GC handle to keep the cleaning callback alive.
Reviewers: vitor.sousa, felipealmeida, woohyun
Reviewed By: vitor.sousa
Subscribers: segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8593
Summary:
They don't need to be public anymore. After merging other changes we can
try to actually remove them.
Fixes T7801
Reviewers: segfaultxavi, vitor.sousa, felipealmeida
Reviewed By: segfaultxavi, vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7801
Differential Revision: https://phab.enlightenment.org/D8601
Summary:
You can now have external example files for derived classes (Efl.Ui.Button.SetText)
as well as for base classes (Efl.IText.SetText).
If both files are present, both examples are embedded in the docs. The more
examples the better!
Examples for classes in-between the hierarchy (Efl.Ui.Widget.SetText) are not
picked up. Might be worth examining in the future.
Test Plan:
Create example files for both `Efl.Ui.Button.AutorepeatEnabled.cs` and `Efl.Ui.IAutorepeat.AutorepeatEnabled.cs`.
You should see both examples appearing in the docs.
Reviewers: lauromoura, vitor.sousa
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8597
First code line was indented differently by DocFX because of tabs,
whitespace or who knows what. This adds a newline after the <code>
tag so all code lines have the same indentation.
Summary:
New option added to eolian_gen: -e <dir>
This specifies a directory to search for examples. If a file is found with the
same name as an EFL C# class (e.g. Efl.Ui.Button.cs) or as an EFL C# method or
property (e.g. Efl.IText.Text.cs, Efl.IText.SetText.cs) its full
contents will be embedded in the documentation for that class or method within
<example> and <code> tags. This is, in turn, is parsed by DocFX and shown
in Example boxes in the generated pages.
If an example file is not found, no examples are embedded for that object.
If -e is not used, no examples are embedded for any object.
New option added to meson: mono-examples-dir to point to the examples directory.
This directory is then passed to eolian_mono through -e.
Do not use it (or define it to nothing) to disable example embedding.
No performance drop has been observed because of these extra tests.
Right now examples can only be given for base classes, not for derived ones
(i.e. Efl.IText.Text but not Efl.Ui.Button.Text). This will be addressed in a
later commit.
Feature
Depends on D8587
Test Plan:
Create an examples folder and put some files in it:
```
mkdir /tmp/examples
echo 'var button = new Efl.Ui.Button();' > /tmp/examples/Efl.Ui.Button.cs
echo 'button.AutoRepeatEnabled = true;' > /tmp/examples/Efl.Ui.IAutorepeat.AutorepeatEnabled.cs
echo 'button.SetAutoRepeatEnabled(true);' > /tmp/examples/Efl.Ui.IAutorepeat.SetAutorepeatEnabled.cs
```
Configure meson to embed examples and build:
```
meson configure -Dmono-examples-dir=/tmp/examples
ninja
```
Examine the generated efl_ui_button.eo.cs file to see embedded <example> tags,
or run DocFX and bask in the glory of documentation pages with examples:
```
cd doc/docfx
./gendoc.sh
```
Reviewers: lauromoura, felipealmeida, vitor.sousa, zmike, bu5hm4n
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8592
Summary:
This allows inserting nested tags like:
<example><code>bla bla bla</code></example>
The generate_tag_example() is currently unused but serves as an example.
Depends on D8585
Test Plan:
Not much, unless you want to manually call generate_tag_example()
(Which I have done, and it works, I promise).
Reviewers: lauromoura, vitor.sousa
Reviewed By: vitor.sousa
Subscribers: vitor.sousa, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8587
Summary:
Methods without a class (global) make the previous code crash because
func.klass contains something (it cannot be NULL because it is a reference)
but you cannot make much calls on this something.
Test Plan: Currently there are no such references, but I need this working for upcoming patches.
Reviewers: lauromoura, vitor.sousa
Reviewed By: vitor.sousa
Subscribers: vitor.sousa, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8585
Summary:
- Check for nullness when getting stuff from C# to C
- We should return null when wrapping a NULL pointer instead of throwing
an exception
Reviewers: felipealmeida, vitor.sousa, woohyun
Reviewed By: vitor.sousa
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8580
Summary:
Instead of overriding every method and making the callback to C, we
just override the methods that are found by reflection on the type.
Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, YOhoho, lauromoura
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8579
Summary:
Rework general event handling to check individually each event call, if the
object is not alive then the event will not be propagated.
WeakReferences (and lambdas capturing those WeakRefs) are used to ensure this.
Dispose methods in object now take care of checking if efl libraries are still
initialized and thread-safely unregister each event before performing an
efl_unref on the Eo object.
Event handling in C# is now centered around a single dictionary inside the
object: `EoEvents`.
C# event triggers now properly trigger events on C too.
Standardize C# event-triggering methods names (remove underscores).
Some diminished use of static memory due events no longer requiring static key
objects to be registered/unregistered.
Some fixing of white space generation for generated events.
Depends on D8431
Reviewers: lauromoura, felipealmeida, segfaultxavi
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8564
Summary:
This commit mainly fixes errors caused by deallocating resources in the garbage
collector thread. Using `ecore_main_loop_thread_safe_call_async` to queue
resource deallocation in the main thread seems to solve it.
Also, some `efl_ref` calls are added in places they were missing, mainly
objects that unref in the destructor thus taking ownership if efl_ref is not
called.
Also fix improper resource deallocation in tests that were causing it to crash,
enabling it to call Efl.All.Shutdown again. This allocation and the deallocation
process was moved from the Eo class constructor to static class methods that are
called in the test 'set up' and 'tear down' methods.
Queuing resource deallocation in the main thread make it mandatory that tests
call `Efl.App.AppMain.Iterate()` if they want to check proper resource
deallocation (like TestFunctionPointers.set_callback_inherited_called_from_c).
Extras:
Remove duplicated declaration of 'eflcustomexportsmono' in meson in order to fix
some linking problems.
Remove some unused code around deallocation functions that had to be reworked.
Object allocation is now supplied with the call site information it expects
(file name and line for _efl_add_start).
Depends on D8550
Test Plan: meson test
Reviewers: felipealmeida, lauromoura, cedric, segfaultxavi
Reviewed By: lauromoura
Subscribers: segfaultxavi
Tags: #efl_language_bindings, #do_not_merge
Differential Revision: https://phab.enlightenment.org/D8431
Summary:
Abstract Eo classes are now proper C# abstract classes.
As a side effect, returning Eo instances from native code was reworked
to return instances of their actual Eo classes instead of previous
behavior of returning a generic Efl.Object and using static_cast.
Instead of `var window = Efl.Ui.Win.static_cast(widget.GetParent());`
Use `var window = widget.GetParent() as Efl.Ui.Win;`
Another side effect was that `efl_constructor` was removed from the list
of supported `Efl.Object` overrides. It is invoked inside
`efl_add_internal_start`, before the bindings makes the association of
the newly created EoId with the C# instance that created it, making the
managed delegate meaningless. C# users then can use regular C#
constructors to initialize fields.
Also changed to set the private data of C#-inherited classes before the
call to constructing methods (aka constructor parameters) so C# classes
can override them correctly.
Fixes T7778
Fixes T7757
Reviewers: vitor.sousa, felipealmeida, segfaultxavi
Reviewed By: vitor.sousa, segfaultxavi
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7778, T7757, T7702
Differential Revision: https://phab.enlightenment.org/D8550
Summary:
edje_cc calls epp, so we should not only add edje_cc to the depends on
target, but rather also ensure that epp is availble. Additionally, this
removes unneccessary depends on declarations when we do cross compile.
Depends on D8561
Reviewers: zmike, segfaultxavi, cedric
Reviewed By: zmike
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8562
Summary:
there is a global variable that is defined tentatively.
this patch modify it not to be tentitive explictly.
Reviewers: raster, cedric, zmike
Reviewed By: raster, zmike
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8551
This reverts commit 30bd541bf2.
The commit is reverted to revert the following commits.
74c48f0296913a5bff66
The above commits will be restored after release and then
30bd541bf2 will be also restored.
This reverts commit d3bb1a7342.
The commit is reverted to revert the following commits.
74c48f0296913a5bff66
The above commits will be restored after release and then
d3bb1a7342 will be also restored.
Summary:
Rework the struct binding generator to declare the native struct nested inside
the managed one.
This way native structs are less likely to cause confusion; for example
with an IDE that supports automatic completion.
Get rid of struct conversion class methods in favor of using (the already
generated) implicit conversion operators.
Depends on D8469
Reviewers: segfaultxavi, lauromoura, felipealmeida
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8470
Summary:
Make the struct generator (the first one to) extract indentation information
from the context, an effort for a future overall consistency in white space
generation.
Depends on D8468
Reviewers: lauromoura, segfaultxavi, felipealmeida
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8469
Summary:
Also, use new context class for cleaner constructs.
Also, make functions receive context objects by reference to avoid
unnecessary object copies (since context objects are bigger now).
This commit contains preparation structures for a future overhaul of
white space generation.
Depends on D8467
Test Plan: ninja test
Reviewers: felipealmeida, lauromoura
Reviewed By: lauromoura
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8468