Compare commits

...

13 Commits

Author SHA1 Message Date
Marcel Hollerbach b14a85fd6c HACK: remove broken API
cannot correctly work
2020-04-19 22:01:52 +02:00
Marcel Hollerbach e0ce78e170 eo-files: convert all Eina.Strbuf & Eina.Binbuf
these structs should not be used, but rather the builtin types that
exist for it.
2020-04-19 22:00:35 +02:00
Marcel Hollerbach 4a88f35e83 efl_ui_win: declare constructors not optional
they cannot be optional, or in later languages types will collide.
2020-04-19 22:00:33 +02:00
Marcel Hollerbach b2752a92e5 elementary: fix string definition
eolian is note made to have ptr(char) be the same as string.
2020-04-19 21:59:20 +02:00
Marcel Hollerbach 5acf2b0820 eina: add new definitions to a old array
this is sadly needed due to the fact that we have a .eo defnition in the
.eot file which contains the flags keyword.
2020-04-19 21:59:20 +02:00
Marcel Hollerbach 1f7682e917 elementary: these definitions are in real header files
there is no reason to have them in the .eot files. They are also not
namespaced in the way we want to have types.
2020-04-19 21:59:20 +02:00
Marcel Hollerbach 6bcb3571c9 evas: remove dead struct definition
this is not used anywhere
2020-04-19 21:59:20 +02:00
Marcel Hollerbach 537fde4997 eo: install eot files correctly
eina_types.eot is needed in order to fetch all needed informations.
2020-04-19 21:37:37 +02:00
Marcel Hollerbach a71a2863b9 elementary: do not install legacy .eo files
they do not have any purpose to be installed on the filesystem.
2020-04-19 21:37:03 +02:00
Marcel Hollerbach 900fde0d6a eo: make the parent a optional constructor
this is needed in order to sanely bind parent calls to some objejcts,
but not all.

However, from the canvas structure up we *need* a parent, so we can
fetch the evas from it. So declare it there a none optional
2020-04-19 21:35:38 +02:00
Marcel Hollerbach 4df0cd2f95 meson: do not install .eo files of not installed header files 2020-04-19 21:34:08 +02:00
Marcel Hollerbach 121067b1db efl_ui_focus_manager_calc: correctly flag elements used
when setting the relation from two widgets a<->b a is used as well as b.
This now correctly sets these flags.
2020-04-19 15:41:22 +02:00
Marcel Hollerbach 21fbe2c0c1 exactness-inspect: remove abscure xor check
this is a obscure check, if this was ever reached, then it would simply
crash, because one pointer will be NULL, but strcmp will be called on
it.

CID 1419854

Differential Revision: https://phab.enlightenment.org/D11722
2020-04-19 15:41:22 +02:00
22 changed files with 95 additions and 214 deletions

View File

@ -326,13 +326,8 @@ _grp_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED)
Eo *gl2 = eina_list_nth(_gls, 1);
Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit");
Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit");
if (!!unit1->fonts_path || !!unit2->fonts_path)
sprintf(buf2, "Fonts directory comparison: XXXXX");
else if (!strcmp(unit1->fonts_path, unit2->fonts_path))
sprintf(buf2, "Fonts directory comparison: %s", unit1->fonts_path);
else
sprintf(buf2, "Fonts directory comparison: "LDIFF(%s)"/"RDIFF(%s),
unit1->fonts_path, unit2->fonts_path);
unit1 ? unit1->fonts_path : "(NULL)", unit2 ? unit2->fonts_path : "(NULL)");
}
return strdup(buf2);
}

View File

@ -148,7 +148,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
destination then the "done" event is emitted.
If the destination is not set (ie: $NULL) then data is kept
in a internal @Eina.Binbuf, which can be stolen with
in a internal binbuf, which can be stolen with
@.binbuf_steal once "data" or "line" events are
emitted. It exists as a useful shortcut to easily drain
readers and store all data in memory with no need to use an
@ -313,7 +313,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer implements Efl.Io.Closer {
which case you should wait for "done", "data" or "line"
events and then call it to retrieve and own the data.
]]
return: ptr(Eina.Binbuf) @move @no_unused; [[Binbuf]]
return: binbuf @move @no_unused; [[Binbuf]]
}
@property pending_size {

View File

@ -271,7 +271,7 @@ typedef struct _Line
double y2;
}Line;
static void
static void
_line_value_set(Line *l, double x1, double y1, double x2, double y2)
{
l->x1 = x1;
@ -281,7 +281,7 @@ _line_value_set(Line *l, double x1, double y1, double x2, double y2)
}
// approximate sqrt(x*x + y*y) using alpha max plus beta min algorithm.
// With alpha = 1, beta = 3/8, giving results with the largest error less
// With alpha = 1, beta = 3/8, giving results with the largest error less
// than 7% compared to the exact value.
static double
_line_length(Line *l)
@ -339,7 +339,7 @@ _dasher_line_to(Dash_Stroker *dasher, double x, double y)
_outline_line_to(dasher->outline, x, y);
}
}
else
else
{
while (line_len > dasher->cur_dash_length)
{
@ -404,7 +404,7 @@ _dasher_cubic_to(Dash_Stroker *dasher, double cx1 , double cy1, double cx2, doub
_outline_cubic_to(dasher->outline, cx1, cy1, cx2, cy2, x, y);
}
}
else
else
{
while (bez_len > dasher->cur_dash_length)
{

View File

@ -163,6 +163,31 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_gfx_stack.eo.h"
#include "interfaces/efl_gfx_fill.eo.h"
#include "interfaces/efl_gfx_view.eo.h"
/**
* @brief Set the list of commands and points to be used to create the content
* of path.
*
* @param[in] obj The object.
* @param[in] op Command list
* @param[in] points Point list
*
* @ingroup Efl_Gfx_Path
*/
EOAPI void efl_gfx_path_set(Eo *obj, const Efl_Gfx_Path_Command_Type *op, const double *points);
/**
* @brief Set the list of commands and points to be used to create the content
* of path.
*
* @param[in] obj The object.
* @param[out] op Command list
* @param[out] points Point list
*
* @ingroup Efl_Gfx_Path
*/
EOAPI void efl_gfx_path_get(const Eo *obj, const Efl_Gfx_Path_Command_Type **op, const double **points);
#include "interfaces/efl_gfx_path.eo.h"
#include "interfaces/efl_gfx_shape.eo.h"
#include "interfaces/efl_gfx_gradient.eo.h"

View File

@ -1375,7 +1375,7 @@ _next_command(char *path, char *cmd, double *arr, int *count)
path++;
*count = _number_count(*cmd);
}
else
else
{
if (*cmd == 'm')
*cmd = 'l';
@ -1542,4 +1542,12 @@ _efl_gfx_path_efl_object_destructor(Eo *obj, Efl_Gfx_Path_Data *pd)
efl_destructor(efl_super(obj, EFL_GFX_PATH_MIXIN));
}
EOAPI EFL_VOID_FUNC_BODYV(efl_gfx_path_set, EFL_FUNC_CALL(op, points), const Efl_Gfx_Path_Command_Type *op, const double *points);
EOAPI EFL_VOID_FUNC_BODYV_CONST(efl_gfx_path_get, EFL_FUNC_CALL(op, points), const Efl_Gfx_Path_Command_Type **op, const double **points);
#define EFL_GFX_PATH_EXTRA_OPS \
EFL_OBJECT_OP_FUNC(efl_gfx_path_set, _efl_gfx_path_path_set), \
EFL_OBJECT_OP_FUNC(efl_gfx_path_get, _efl_gfx_path_path_get),
#include "interfaces/efl_gfx_path.eo.c"

View File

@ -1,23 +1,9 @@
import eina_types;
import efl_gfx_types;
mixin @beta Efl.Gfx.Path requires Efl.Object
{
[[EFL graphics path object interface]]
methods {
@property path {
[[Set the list of commands and points to be used to create the
content of path.
]]
set {
}
get {
}
values {
op: ptr(const(Efl.Gfx.Path_Command_Type)); [[Command list]]
points: ptr(const(double)); [[Point list]]
}
}
@property length {
[[Path length property]]
get {
@ -65,7 +51,7 @@ mixin @beta Efl.Gfx.Path requires Efl.Object
]]
}
append_move_to {
[[Moves the current point to the given point,
[[Moves the current point to the given point,
implicitly starting a new subpath and closing the previous one.
See also @.append_close.
@ -140,7 +126,7 @@ mixin @beta Efl.Gfx.Path requires Efl.Object
}
append_arc_to {
[[Append an arc that connects from the current point int the point list
to the given point (x,y). The arc is defined by the given radius in
to the given point (x,y). The arc is defined by the given radius in
x-direction (rx) and radius in y direction (ry).
Use this api if you know the end point's of the arc otherwise use

View File

@ -133,7 +133,7 @@ class @beta Efl.Io.Buffer extends Efl.Object
On failure, for example a read-only backing store was
adopted with @.adopt_readonly, $NULL is returned.
]]
return: ptr(Eina.Binbuf) @move @no_unused; [[Binbuf]]
return: binbuf @move @no_unused; [[Binbuf]]
}
}

View File

@ -16,7 +16,7 @@ foreach eo_file : pub_eo_files
input : eo_file,
output : [eo_file + '.h'],
depfile : eo_file + '.d',
install : true,
install : false,
install_dir : dir_package_include,
command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
'-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
@ -53,8 +53,8 @@ install_headers(efl_canvas_wl_header_src,
)
eolian_efl_canvas_wl_dir = join_paths(eolian_include_dir, package_version_name)
if get_option('install-eo-files')
install_data(pub_eo_files,
install_dir: eolian_efl_canvas_wl_dir
)
endif
#if get_option('install-eo-files')
# install_data(pub_eo_files,
# install_dir: eolian_efl_canvas_wl_dir
# )
#endif

View File

@ -36,9 +36,13 @@
* @since 1.1
*/
typedef enum {
EINA_XATTR_INSERT, /**< This is the default behavior, it will either create or replace the extended attribute */
EINA_XATTR_REPLACE, /**< This will only succeed if the extended attribute previously existed */
EINA_XATTR_CREATED /**< This will only succeed if the extended attribute wasn't previously set */
EINA_XATTR_INSERT = 0, /**< This is the default behavior, it will either create or replace the extended attribute */
EINA_XATTR_REPLACE = 1, /**< This will only succeed if the extended attribute previously existed */
EINA_XATTR_CREATED = 2, /**< This will only succeed if the extended attribute wasn't previously set */
EINA_XATTR_FLAGS_INSERT = 0, /**< This is the default behavior, it will either create or replace the extended attribute */
EINA_XATTR_FLAGS_REPLACE = 1, /**< This will only succeed if the extended attribute previously existed */
EINA_XATTR_FLAGS_CREATED = 2 /**< This will only succeed if the extended attribute wasn't previously set */
} Eina_Xattr_Flags;
typedef struct _Eina_Xattr Eina_Xattr;

View File

@ -80,13 +80,13 @@ class @beta Efl.Io.Manager extends Efl.Loop_Consumer
[[Retrieves or sets information of a given extended attribute.]]
set {
values {
data: ptr(Eina.Binbuf); [[Data to set as information]]
data: binbuf; [[Data to set as information]]
flags: Eina.Xattr.Flags; [[Extended attributes flags]]
}
return: future<uint64> @move; [[Future for asynchronous set operation]]
}
get {
return: future<Eina.Binbuf> @move; [[Information]]
return: future<binbuf> @move; [[Information]]
}
keys {
path: string; [[File path]]

View File

@ -18,7 +18,7 @@ EAPI elm_atspi_text_text_attribute_free(Efl_Access_Text_Attribute *attr)
EAPI void
elm_atspi_text_text_range_free(Efl_Access_Text_Range *range)
{
free(range->content);
free((char*)range->content);
free(range);
}

View File

@ -31,7 +31,7 @@ struct @beta @free(elm_atspi_text_text_range_free) Efl.Access.Text_Range
[[Text range]]
start_offset: int; [[Range start offset]]
end_offset : int; [[Range end offset]]
content: ptr(char); [[Range content]]
content: string; [[Range content]]
}
struct @beta Efl.Access.Text_Change_Info

View File

@ -402,6 +402,8 @@ dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Cal
{
Efl_Ui_Focus_Direction direction = -1;
Efl_Ui_Focus_Graph_Calc_Direction_Result *res = NULL;
Node *partner;
Eina_List *n;
if (i == 0)
{
@ -424,6 +426,9 @@ dirty_flush_node(Efl_Ui_Focus_Manager *obj EINA_UNUSED, Efl_Ui_Focus_Manager_Cal
res = &result.bottom;
}
EINA_LIST_FOREACH(res->relation, n, partner)
partner->unused = EINA_FALSE;
border_onedirection_set(node, direction, res->relation);
}

View File

@ -835,9 +835,9 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
Efl.Part.part_get;
}
constructors {
.win_name @optional;
.win_name;
.win_type @optional;
.accel_preference @optional;
.accel_preference;
}
events {
delete,request: void; [[Called when the window receives a delete request]]

View File

@ -3,158 +3,3 @@
*/
/* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */
type @beta Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
/* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */
enum @beta @extern Elm.Object.Select_Mode
{
[[Possible values for the #ELM_OBJECT_SELECT_MODE policy.
@since 1.7
]]
default = 0, [[default select mode. Once an item is selected, it would stay
highlighted and not going to call selected callback again
even it was clicked. Items can get focus.]]
always, [[always select mode. Item selected callbacks will be called every
time for click events, even after the item was already selected.
Items can get focus.]]
none, [[no select mode. Items will never be highlighted and selected but
the size will be adjusted by the finger size configuration. Items
can't get focus.]]
display_only, [[no select mode with no finger size rule. Items will never
be highlighted and selected and ignore the finger size. So
the item size can be reduced below than the finger size
configuration. Items can't get focus.]]
max [[canary value: any value greater or equal to ELM_OBJECT_SELECT_MODE_MAX
is forbidden.]]
}
enum @beta @extern Elm.Icon.Type
{
[[Elementary icon types]]
legacy: elm_icon;
none, [[Icon has no type set]]
file, [[Icon is of type file]]
standard [[Icon is of type standard]]
}
/* FIXME: shouldn't exist, they are unusable by the bindings */
struct @beta @extern Elm.Entry_Anchor_Info; [[The info sent in the callback for the "anchor,clicked" signals emitted
by entries.]]
struct @beta @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the callback for "anchor,hover" signals emitted
by the Anchor_Hover widget]]
enum @beta @extern Elm.Input.Panel.Layout
{
[[Input panel (virtual keyboard) layout types.
Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired.
]]
normal, [[Default layout.]]
number, [[Number layout.]]
email, [[Email layout.]]
url, [[URL layout.]]
phonenumber, [[Phone Number layout.]]
ip, [[IP layout.]]
month, [[Month layout.]]
numberonly, [[Number Only layout.]]
invalid, [[Never use this.]]
hex, [[Hexadecimal layout.]]
terminal, [[Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization).]]
password, [[Like normal, but no auto-correct, no auto-capitalization etc.]]
datetime, [[Date and time layout
@since 1.8]]
emoticon, [[Emoticon layout
@since 1.10]]
voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.
@since 1.19]]
}
enum @beta @extern Elm.Input.Panel.Lang
{
[[Input panel (virtual keyboard) language modes.
]]
automatic, [[Automatic]]
alphabet [[Alphabet]]
}
enum @beta @extern Elm.Autocapital.Type
{
[[Autocapitalization Types.
Choose method of auto-capitalization.
]]
none, [[No auto-capitalization when typing.]]
word, [[Autocapitalize each word typed.]]
sentence, [[Autocapitalize the start of each sentence.]]
allcharacter [[Autocapitalize all letters.]]
}
enum @beta @extern Elm.Input.Panel.Return_Key.Type
{
[["Return" Key types on the input panel (virtual keyboard).
]]
default, [[Default.]]
done, [[Done.]]
go, [[Go.]]
join, [[Join.]]
login, [[Login.]]
next, [[Next.]]
search, [[Search string or magnifier icon.]]
send, [[Send.]]
signin [[Sign-in
@since 1.8]]
}
enum @beta @extern Elm.Input.Hints
{
[[Enumeration that defines the types of Input Hints.
@since 1.12
]]
legacy: elm_input_hint;
none = 0, [[No active hints
@since 1.12]]
auto_complete = 1 << 0, [[Suggest word auto completion
@since 1.12]]
sensitive_data = 1 << 1, [[Typed text should not be stored.
@since 1.12]]
autofill_credit_card_expiration_date = 0x100, [[ Autofill hint for a credit card expiration date
@since 1.21]]
autofill_credit_card_expiration_day = 0x200, [[Autofill hint for a credit card expiration day
@since 1.21]]
autofill_credit_card_expiration_month = 0x300, [[ Autofill hint for a credit card expiration month
@since 1.21]]
autofill_credit_card_expiration_year = 0x400, [[ Autofill hint for a credit card expiration year
@since 1.21]]
autofill_credit_card_number = 0x500, [[ Autofill hint for a credit card number
@since 1.21]]
autofill_email_address = 0x600, [[ Autofill hint for an email address
@since 1.21]]
autofill_name = 0x700, [[ Autofill hint for a user's real name
@since 1.21]]
autofill_phone = 0x800, [[ Autofill hint for a phone number
@since 1.21]]
autofill_postal_address = 0x900, [[ Autofill hint for a postal address
@since 1.21]]
autofill_postal_code = 0xA00, [[ Autofill hint for a postal code
@since 1.21]]
autofill_id = 0xB00 [[ Autofill hint for a user's ID
@since 1.21]]
}

View File

@ -17,6 +17,9 @@ pub_legacy_eo_files = [
'elm_actionslider_part.eo',
'elm_bubble_part.eo',
'elm_fileselector_part.eo',
'elm_multibuttonentry_part.eo',
'elm_interface_scrollable.eo',
'elm_code_widget.eo',
]
pub_eo_file_target = []
@ -139,7 +142,6 @@ pub_eo_files = [
'efl_access_window.eo',
'efl_ui_theme.eo',
'efl_config_global.eo',
'elm_code_widget.eo',
'efl_ui_selection.eo',
'efl_ui_dnd.eo',
'efl_ui_focus_manager_window_root.eo',
@ -159,8 +161,6 @@ pub_eo_files = [
'efl_ui_radio_legacy_part.eo',
'efl_ui_check_legacy_part.eo',
'efl_ui_progressbar_legacy_part.eo',
'elm_multibuttonentry_part.eo',
'elm_interface_scrollable.eo',
'efl_ui_image_zoomable_pan.eo',
'efl_ui_textbox_part.eo',
'efl_ui_caching_factory.eo',

View File

@ -432,6 +432,9 @@ abstract Efl.Object
class.constructor;
class.destructor;
}
constructors {
.parent @optional;
}
events {
del @hot: void; [[Object is being deleted. See @.destructor.]]
invalidate @hot: void; [[Object is being invalidated and losing its parent. See @.invalidate.]]

View File

@ -128,9 +128,6 @@ type @extern Eina.Error: int; [[Eina error type
@since 1.22
]]
struct @extern @beta @free(eina_binbuf_free) Eina.Binbuf; [[Eina binbuf data structure]]
struct @extern @beta @free(eina_strbuf_free) Eina.Strbuf; [[Eina strbuf data structure]]
struct @extern @beta Eina.Slice {
[[A linear, read-only, memory segment]]
len: size; [[Length of the memory segment]]

View File

@ -23,10 +23,25 @@ pub_eo_types_files = [
'eina_types.eot'
]
eo_header = ['Eo.h']
pub_eo_file_target = []
priv_eo_file_target = []
foreach eo_file : pub_eo_types_files
pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
input : eo_file,
output : [eo_file + '.h'],
depfile : eo_file + '.d',
install : true,
install_dir : dir_package_include,
command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
'-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
'-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
'-gchd', '@INPUT@'])
endforeach
eo_header = ['Eo.h']
foreach eo_file : pub_eo_files
pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
input : eo_file,

View File

@ -1,8 +1,3 @@
// ----------------------------------------------------------------------------
// All the below types are for Efl Animation
struct @beta Efl.Canvas.Animation_Player_Event_Running; [[Information of event running]]
enum Efl.Canvas.Animation_Repeat_Mode
{
[[Animation repeat mode. @since 1.24]]

View File

@ -1,6 +1,5 @@
import efl_text_types;
struct @beta Efl.Canvas.Object_Animation_Event; [[Information of animation events]]
struct Efl.Event_Animator_Tick {
[[EFL event animator tick data structure
@ -484,6 +483,9 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
}
}
}
constructors {
Efl.Object.parent;
}
implements {
Efl.Object.constructor;
Efl.Object.finalize;

View File

@ -1,4 +1,5 @@
import eina_types;
import efl_gfx_types;
abstract @beta Efl.Canvas.Vg.Node extends Efl.Object
implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Duplicate, Efl.Gfx.Path