Age | Commit message (Collapse) | Author |
|
Eolian now separates 'parent' and 'extensions'. For regular
classes, parent is the first item in the inherits list and
extesions is the rest. For interfaces and mixins, parent is
NULL and extends is the inherits list.
The reason for this is the separation of them in syntax in near
future. It also slightly changes the behavior; since for interfaces
and mixins, parent is always NULL now, you can freely inherit from
all types of classes without needing to manually put an interface
type as the first item of the inherits list.
|
|
Summary: Fixes T7324
Reviewers: felipealmeida, bu5hm4n, zmike
Reviewed By: felipealmeida, bu5hm4n, zmike
Subscribers: segfaultxavi, cedric, #reviewers, #committers, zmike
Tags: #efl
Maniphest Tasks: T7324
Differential Revision: https://phab.enlightenment.org/D6881
|
|
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.
Differential Revision: https://phab.enlightenment.org/D6098
|
|
Summary:
Due to the absence of typedef from C#, we generate thin structs with
implicit operators to allow reference the data from their typedef'd name
from C#.
The other alternatives would be always converting to the lowest base on
the alias stack (losing the meaningfulness of the typedef name) or using
the 'using' directive. The latter has the restriction that it makes an
alias visible only in the file they are declared.
Reviewers: felipealmeida, cedric, segfaultxavi
Reviewed By: segfaultxavi
Subscribers: zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6157
|
|
Summary:
Uses a common helper to open and close namespaces, to get the managed
and unmanaged name of things, the interface, concrete and inherit class
names, etc.
eolian_cxx: Add namespace information to func_def, as it'll avoid
eolian-cxx clients dealing with the eolian C api directly when trying
to access a function pointer namespace.
Depends on D6048
Reviewers: felipealmeida, vitor.sousa
Reviewed By: vitor.sousa
Subscribers: cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6049
|
|
Summary:
Also added a blacklist header to temporarily disable generation of eo
methods with futures as arguments or return type.
Once the models branch lands, we should enable future support again with
eina_futures.
Reviewers: cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D6018
|
|
Summary:
Making it easier to share code between self and inherited events.
During this move, the namespace and keyword headers were merged into the
name_helpers header.
Also added the first seed of a generic namespace reducer function,
to be used by other functions in later commits.
Depends on D5994
Reviewers: felipealmeida
Reviewed By: felipealmeida
Subscribers: segfaultxavi, cedric
Differential Revision: https://phab.enlightenment.org/D5995
|
|
Previously, class methods were implemented as regular instance methods.
This commits generates C# static methods for @class methods on the
*Concrete classes (and their childs).
|
|
|
|
Line get_all_methods, gets everything from the inherits too.
|
|
It'll be used in eolian_mono as the 'direction' of return types in some
helper functions.
|
|
|
|
|
|
|
|
Closes D5829.
|
|
|
|
The Klass(Klass &&other) one was causing "synthesized method ... first
required here' warnings on Windows gcc-4.8.
|
|
|
|
As it is no longer necessary to pass unit when evaluating exprs,
it is not necessary to pass it here either. Convert all the APIs
to the new style and update all instances in our tree.
|
|
The necessary information is now stored directly in the expr
during database validation.
Also enable expr validation for params.
|
|
|
|
|
|
|
|
This commit adds the "documentation" generator, which gets the
documentation_def attribute of the given item and generates xml comments
to be exported by MCS.
For items requiring some customization of the generated comments (e.g.
functions and its parameters), the helpers to generate the preamble
(summary), body (paragraphs) and epilogue (currently just the @since
tag) were added.
Currently we do not support converting Eolian references into xmldoc
references.
As we explicitly generate Get/Set methods for properties, for now the
generator tries to get the get/set specific documentation first. If it
is not present, fallback to the common docs.
Later this could be changed to generate the common one as paragraphs of
the Get/Set.
Also some generated code like the wrappers for calling C# methods
from C can be private. This will cleanup the introspection results
and warnings when generating documentation.
Due to this visibility change, the binbuf tests had to be changed
to add redirect calls to the native methods instead of directly
calling the DllImport'd methods.
|
|
Fix several integer binding type deduction based in its size on C.
Generation for function pointers no longer use modified argument name
which is different from the parameter name.
New generation context for structs.
bool from UnmanagedType.I1 to UnmanagedType.U1 (correct use
inside structs according to mono documentation).
byte (signed char) and int8 now is correctly represented by
sbyte in C#.
Check parameter direction in some out generators in parameter.hh.
Add efl_libs.csv to gitignore.
Make eina.Value pointer constructor public.
Add missing fields to efl.kw_event.Description struct.
Remove eina.File workaround (let struct gen handle it).
Remove is_function_ptr bool from regular_type_def and
add a typedecl_type enum to it. Also add some helper
methods for easier comparison.
Left some test cases commented for when pointer parameters
are properly working.
|
|
|
|
Summary:
Unit is now stored in klass_def, parameter_def and function_def for
future calls to the Eolian API.
Reviewers: felipealmeida, jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D5613
|
|
This API is meant to be used by parts only, and by bindings dealing with
part objects. This patch fixes make check which got broken in the after
the previous one (cxx).
|
|
This resolves a few issues and brings back the experimental features.
Also, disable some of the ugliest experiments:
- manual function overrides,
- define APIs only in eo_cxx namespace
Some APIs are generated behind EFL_CXXPERIMENT (eg. event_name_cb_add or
some weak pointer stuff). I believe they are useful but would like to
make sure there are no serious drawbacks with generating those.
|
|
This is useful if the types refer to the current class.
|
|
This prevents generation of del().
I also removed constructor, finalize and destructor as I believe this
requires special work with eo_inherit (where did this work go??).
|
|
Good for IDE's. Not extremely useful considering how unreadable those
files are.
|
|
This will be used for things like efl_del
efl_part was a lucky case where the entire class was to be implemented
manually, thus the global header guard was sufficient.
|
|
|
|
|
|
This generates methods like this:
Part_Class part_name() const;
Which can then be used like:
slider.indicator().format_string_set("%1.1f");
|
|
Those are included headers after all, even if they're only included once
from Elementary.hh (or whatever Efl_Header.hh).
|
|
This affects the generated headers.
|
|
This avoids duplication. Not very important as there are FWD_GUARD
macros anyway.
|
|
This is part of the experimental stuff.
Allows calling C functions without using ._eo_ptr() explicitly. Probably
not super useful, assuming the interfaces are done :)
|
|
Add an experimental (disabled) macro to only generate functions inside
the eo_cxx equivalent of a class, instead of inside both the eo_cxx and
the normal class definition.
I guess the duplicated definition had something to do with doxygen, but
I'm not sure this is quite necessary as doc will be generated with
custom scripts.
|
|
Only regular classes can be instantiated, this should be reflected in
the C++ binding as well.
|
|
I'll hide some controversial features behind this, until we come to an
agreement with @felipealmeida and people who actually know C++ (iow: not
just me^^).
Features protected:
- easy wref (using -> without locking)
- xxx_event_cb_add() functions in object classes
- instantiate(obj) to create a new object
- add as a synonym for instantiate (both in efl::eo)
|
|
This was tested on the function pointer Efl.Ui.Format_Func_Cb
|
|
|
|
This enables a syntax like:
button.clicked_event_cb_add([]() { std::cout << "Hello" << std::endl; });
I could not manage to pass the std::placeholders inside the template,
depending on whether the lambda has arguments or not. Not sure if
that's even possible.
|
|
- Added helper function to get all methods of a given class (local and
inherited methods)
- Add filename information to klass
- Added new defs: enum, value (currently only integers), struct
- Generator refactoring
- Eolian C compatibility
|
|
Mote: for protected we should use "protected:" if that is somehow
possible.
|
|
I hid it behind ifdef for now as I'm very much unsure of what I'm doing.
This whole modern C++ thing is still weird to me :)
Prerequisite:
#define EFL_CXX_WREF_EASY
This allows constructs such as:
auto wobj = obj._get_wref();
std::cout << wobj->text_get() << std::endl;
|
|
This allows constructs like:
auto w_obj = obj._get_wref();
auto cb = std::bind([w_obj]() {
auto o = w_obj.lock();
if (!o) return;
o->call();
});
event_add(..., obj, cb);
Note: I don't like how those wref work. Close to c++ wref but far from
EFL wref.
|