Commit Graph

60993 Commits

Author SHA1 Message Date
Carsten Haitzler d6294fa22b Revert the env object because it's broken portability - please redo
setenv and unsetenv are not portable. i explained to you at fosdem
there are issues and it's why i used putenv in the original
implementation and even though it's a pain (the string tou pass to
putenv is a pointer used literallt from there on in and you get it
from getenv, thus making ownership a pain -this is a libc issue we
can't readily solve). use putenv like the original code. then put it
back in. vtorri now has windows porting issues with the setenv use. i
knew there was a reason that still existed...

in addition your in_sync stuff is broken.  psuedocode:

// assuming BLAGH env is not set to anything here
c = efl_core_env_get(global_env, "BLAH");
...
putenv("BLAH=10");
...
c = efl_core_env_Get(global_env, "BLAH");

i will get NULL in both cases for c ... but i should get "10" for the
2nd in reality. reality is lots of code across application code and
libraries will at times mess with the environment. it has to work with
this. the prior implementation did work with this.

Revert "ecore: here comes a env object"
  This reverts commit 2373d5db5b.

Revert "efl_task: remove env from this object"
  This reverts commit c3d69f66a6.
2019-02-12 20:22:28 +00:00
Carsten Haitzler a57c7f7510 Revert command line array object because it's broken by design
Revert "ecore: get rid of commands in efl_task."
  This reverts commit 616381e9cf.
Revert "ecore: here comes a command line object"
  This reverts commit 48e5684b3c.

1. this is broken:

EOLIAN static const char*
_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd)
{
   return eina_strdup(pd->string_command);
}

it returns a const char * BUT it duplicates it on return. no. a big
fat honking NO. return a char * or don't duplicate. pick.

2. _efl_core_command_line_command_array_set() is broken by design. it
accepts an array of strings, but the strings are owned by the caller
who creates the array (requiring they free them up themselves after
this call) but the array becomes owned by the callee. the code here frees the
incoming array but doesn't care about the string content of it. it's
leak heaven waiting to happen (or bugs when someone wants to access
the array they create to walk it to free the strings they put into it
after it is set).

i brought this up and it was dismissed. now exactly he issue i brought
up is there with mixed ownership and the added complexity as well as
transfer of some ownership but not others.

go back and think about this so it isn't broken by design.
2019-02-12 19:54:35 +00:00
Marcel Hollerbach e908142da6 build: also build eo-tests with debug profile
this checks that eo-dbg is also working in the same manner as normal eo

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7911
2019-02-12 16:24:24 +01:00
Marcel Hollerbach fac3fa1c88 efl_ui_focus: delete elements on invalidate
this lead to ERR's. A element is invalidated while the composition
element is invalidated, which means, not yet deleted, but the Pointer
will fail a call to efl_isa.

Differential Revision: https://phab.enlightenment.org/D7623
2019-02-12 11:25:31 +01:00
Marcel Hollerbach 87373bf66c eo: efl_isa with a EFL_OVERRIDE_CLASS should return true
this is important, as basically every single class etc. can be a
EFL_OVERRIDE_CLASS. This makes efl_override work with eo_debug.

Differential Revision: https://phab.enlightenment.org/D7910
2019-02-12 11:20:21 +01:00
Marcel Hollerbach 0221ff480d eo: the object size changes for the eo_debug profile
Differential Revision: https://phab.enlightenment.org/D7909
2019-02-12 11:20:21 +01:00
Marcel Hollerbach bbe0151670 eo: fix typo
this while loop is actaully iterating obj->xref, therefore we should not
take the pointer of data_xrefs.

Differential Revision: https://phab.enlightenment.org/D7908
2019-02-12 11:20:21 +01:00
Marcel Hollerbach 616381e9cf ecore: get rid of commands in efl_task.
Note that the usage in efl_thread.c should and could be removed.
the problem with its usage is that when the ARGUMENTS event is fired,
noone ever had the chance to subscribe to the loop of the thread yet. So
all in all this is unneccessary, since noone could ever touch that.

Differential Revision: https://phab.enlightenment.org/D7517
2019-02-12 11:19:28 +01:00
Marcel Hollerbach 48e5684b3c ecore: here comes a command line object
the mixin for now can carry a command, which can be setted as an string.
The string is then parsed again, this is done in order to make sure that
everything that needs escaping really is escaped or parsed correctly.

Differential Revision: https://phab.enlightenment.org/D7516
2019-02-12 11:19:28 +01:00
Marcel Hollerbach c3d69f66a6 efl_task: remove env from this object
the env operations are moved to the efl.core.env objects, which can be
used there.

Differential Revision: https://phab.enlightenment.org/D7514
2019-02-12 11:19:28 +01:00
Marcel Hollerbach 2373d5db5b ecore: here comes a env object
the env object can be used to alter and edit the content of environment
variables. Additionally, the class efl.core.env can be used to to setup
a not applied set of environment variables, which then can be applied
later (in the future) to set it directly to a spawned process for
example, or as a general key/data storage. A efl.core.env object can
also be forked off, which makes it easy to customize predefined objects.

ref T7514

Differential Revision: https://phab.enlightenment.org/D7510
2019-02-12 11:19:28 +01:00
Jaehyun Cho a7eb0695b8 efl_ui_format: fix to display %% and unknown format element
This fixes 2 things as follows.

1. Displays format string "%%" as "%".
   Like printf does, "%%" is displayed as "%".

2. Displays unknown format element as it is.
   In format string "(50%)", ")" is an unknown format element.
   Although format string has unknown format element, the format string
   is displayed like printf does.

The cause of the issue displaying "0%" which was mentioned on
a96933f964 is as follows.

The default format string of progressbar is set as "%.0f%%".
Therefore, if progressbar's format string is not set, then "%" postfix
is always displayed.

This commit reverts commit a96933f964.
This commit restores commit b4112b9735.
This commit restores commit be770d37fb.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7856
2019-02-11 15:41:07 -08:00
Stephen 'Okra' Houston 7b19573895 elm_progressbar test: Add test for custom format strings to show when %% is not escaped correctly.
This adds a test that sets a custom progressbar format string that includes a custom percent (%%) that should be escaped to just one percent (%).  This case has been broken and fixed many times and is broken again so it makes sense to now add a check for it to try and prevent the continual breakage.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7745
2019-02-11 15:41:04 -08:00
Mike Blumenkrantz 56dbd2bf86 edje: apply maps to textblock cursors and backgrounds
when a map is applied to an edje part, it is expected that all components of
the part respect the map attributes. this requires that, in the case of
textblock parts, all the sub-parts which are internal to the textblock
(entry) object also go through the map populate and apply codepaths

fix T4977
@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7648
2019-02-11 15:10:45 -08:00
Derek Foreman 4ff180ac6a evas_object_smart: Speed up some cache invalidation calls
Summary:
A large number of cache invalidation calls are doing pointer
indirection that is completely avoidable.
Depends on D7852

Reviewers: devilhorns, cedric

Reviewed By: devilhorns, cedric

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7853
2019-02-11 14:13:33 -05:00
SangHyeon Jade Lee 053146598c efl_ui : rename model connect and factory connect to bind property and factory.
As we discussed in T7469 with V40,

efl_ui_model_connect
efl_ui_factory_model_connect

need to be renamed to

efl_ui_bind_property
efl_ui_bind_factory

for this work,
Efl.Ui.Model.Connect interface is changed as Efl.Ui.Bind,
and bind_property and bind_factory both method is supported by this interface.

bind_factory need Efl.Ui.Factory,
and Efl.Ui.Factory inheritted Efl.Ui.Bind,
so I little bit concerned about circular referencing, but so far, it works well.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7529
2019-02-11 11:06:13 -08:00
Lauro Moura 9277586fd8 efl-csharp: Fix self in iface concrete functions
Summary:
It was mistakenly being called as static functions.

Fixes T7619

Test Plan: See attached testcase.

Reviewers: segfaultxavi, bu5hm4n, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7619

Differential Revision: https://phab.enlightenment.org/D7904
2019-02-11 16:59:10 -02:00
Xavi Artigas 133b659b73 docs: Add custom DocFX templates
Summary:
These templates add the following features:
- Collapsible sections for simpler reading
- Full class names in ancestors list
  (Could not make it work for descendants)
- Removed duplicated Implements section
- Removed huge Inherited Members section
- Extended maximum number of hierarchy levels from 5 to 10
  (because our hierarchy is really that big)

Test Plan:
Follow the doc/docfx README to generate the HTML pages and enjoy the improved
and slightly-more-usable docs.

Reviewers: lauromoura, bu5hm4n, zmike, cedric

Reviewed By: lauromoura

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7832
2019-02-11 14:18:12 +01:00
Xavi Artigas 8985222f47 docs: Update efl_object lifecycle docs
Summary:
Explained the different phases, added method refs and removed outdated links.
Ref T7557

Reviewers: zmike, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7557

Differential Revision: https://phab.enlightenment.org/D7903
2019-02-11 14:16:48 +01:00
Mike Blumenkrantz 1b568327c4 efl_gfx_color_class: make this a mixin and move color_class_code here
Summary:
color_class_code seems to only have been added to efl_gfx_color in order to
share the hex conversion code, but this is trivial to do when it's in another
class and makes the api more sensible

ref T7559

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7559

Differential Revision: https://phab.enlightenment.org/D7898
2019-02-11 12:34:12 +01:00
Marcel Hollerbach b805f11c89 build: next attempt to fix build race condition
the source should be used in the dependency. However, only the generated
header source, not the .c files or we will get duplicated sources.

This is another attempt to fix the build OSX travis failure

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7896
2019-02-08 15:48:02 +01:00
Lauro Moura a2101a5c00 efl-mono: Turn printfs into debug messages.
Summary: Cleaner output by default.

Test Plan: Run examples and tests

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7895
2019-02-08 12:04:22 +01:00
Marcel Hollerbach 38612b5490 eo: lets drop efl_interfaces
its not required anymore, our wonderfull new syntax solves the original
problem it was trying to solve.

fixes T7565

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7893
2019-02-08 10:27:27 +01:00
Mike Blumenkrantz f1ad9d7467 efl_ui_text: s/ELM_SEL_FORMAT_IMAGE/EFL_UI_SELECTION_FORMAT_IMAGE/g
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D7894
2019-02-07 12:59:41 -05:00
Lauro Moura 9e3707f0b4 efl: Change non required constructors to @optional.
Summary:
These constructors aren't checked for in the finalize step of the
initialization and may be given the @optional tag.

For C# this means they can be ommitted from the constructor call.

This also adds `Efl.Ui.View.model` as a constructor of
`Efl.Composite_Model` as the finalizer checks for it.

Fixes T7673

Test Plan: make check

Reviewers: segfaultxavi, zmike, bu5hm4n, cedric, felipealmeida

Reviewed By: segfaultxavi, cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7673

Differential Revision: https://phab.enlightenment.org/D7855
2019-02-07 18:05:00 +01:00
Marcel Hollerbach 0f32bb9047 eo: here comes reflection API
this adds support in eo to generate a reflection API. To get the actaul
reflection to the klass, the API efl_class_reflection_table_set needs to
be called, the table in the end can be generated by eolian. Reflection
API is inherited by the extended class. This means, if you have two
reflection tables, first, the most upperst is called, then the next
lower one is called.

For now this API accepts NULL setter or getter, and will ignore them
silently when they are called.

fix T7681

Differential Revision: https://phab.enlightenment.org/D7879
2019-02-07 14:43:25 +01:00
Marcel Hollerbach 0709bdea6f eo: change API call of efl_class_functions_set
The next commit will bring support for something like reflection. This
commit prepares the whole tree for getting another argument in
efl_class_functions_set.

ref T7681

Differential Revision: https://phab.enlightenment.org/D7882
2019-02-07 14:43:25 +01:00
Mike Blumenkrantz 4f9abba440 efl_ui_text: emit EFL_UI_TEXT_EVENT_CHANGED_USER from paste + drop operations
Summary:
this is a user-triggered change so it must emit the event

ref T6979
Depends on D7886

Reviewers: bu5hm4n, cedric, segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T6979

Differential Revision: https://phab.enlightenment.org/D7887
2019-02-07 12:42:00 +01:00
Mike Blumenkrantz cd816eec01 efl_ui_text: forward EFL_TEXT_INTERACTIVE_EVENT_SELECTION_CHANGED event
Summary:
this is emitted on the internal object and must be propagated

fix T6535
Depends on D7885

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T6535

Differential Revision: https://phab.enlightenment.org/D7886
2019-02-07 12:41:55 +01:00
Mike Blumenkrantz 4672bbae5a efl_ui_text: forward EFL_UI_TEXT_EVENT_CHANGED_USER events
Summary:
these are emitted on the internal object and need to be propagated

ref T7621
Depends on D7884

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7621

Differential Revision: https://phab.enlightenment.org/D7885
2019-02-07 12:41:54 +01:00
Mike Blumenkrantz 765fad936b efl_ui_text: emit EFL_UI_TEXT_EVENT_CHANGED events properly
Summary:
these should be emitted any time text is changed in the object

fix T7615, T7417, T6978, T6979
Depends on D7883

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7615, T7417, T6979, T6978

Differential Revision: https://phab.enlightenment.org/D7884
2019-02-07 12:41:52 +01:00
Mike Blumenkrantz d7d33b9fe4 efl_ui_text: use Efl_Ui_Selection_Format for cnp_mode struct member
Summary: fix T7068

Reviewers: bu5hm4n, cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7068

Differential Revision: https://phab.enlightenment.org/D7883
2019-02-07 12:41:51 +01:00
Lauro Moura 9bea248d3c efl-mono: Remove uneeded declaration from classes.
Summary: The constructing method is not used anymore after D7789 landed.

Test Plan: run tests

Reviewers: segfaultxavi, felipealmeida, vitor.sousa

Reviewed By: segfaultxavi, vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7875
2019-02-06 19:52:45 -02:00
Cedric BAIL f484ca0951 edje: migrate Eo API to use Eo callback instead of opaque type.
Summary: Depends on D7869

Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7870
2019-02-06 13:48:43 -05:00
Cedric BAIL 917e0aa0fe edje: make legacy edje call rely directly on edje internal.
Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7869
2019-02-06 13:08:19 -05:00
Christopher Michael c62bac00cb ecore-drm2: Minor formatting fixes.
NB: No functional changes
2019-02-06 10:07:20 -05:00
Christopher Michael 3999a97579 ecore-drm2: Reduce duplicated code
No need for this line to be there twice as it is going to be called in
either case.

NB: No functional changes
2019-02-06 10:03:02 -05:00
Christopher Michael 65bf9c6e0f ecore-drm2: Remove useless if check
_ecore_drm2_use_atomic is already checked just above this, so there is
no need for this if statement
2019-02-06 10:00:51 -05:00
Daniel Kolesa 347f096bf7 eolian_gen: add support for header-only depfiles
By default, dependency files are now generated only for headers.
This makes sense for the C generator and our dependency tracking
needs. If full dependencies are needed, there is now the 'D'
output, which has the old behavior.
2019-02-06 14:31:23 +01:00
Marcel Hollerbach 3009bee9ee eo: remove whitespaces
remove the whitespaces from this file. Every editor in this world
removes unneccessay whitespaces at the end of a line. So every time i am
touching this header, i need to get rid of them, which is super
annoying. I know we are used to *not* doing such patches, but this is
just a waste of time, getting them out of the header every and every
single time.

Differential Revision: https://phab.enlightenment.org/D7880
2019-02-06 10:01:02 +01:00
Marcel Hollerbach 609e24eb85 eo: repair EO_CLASS_POINTER macros
the function has changed, but the macro was not adjusted.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7878
2019-02-06 10:00:57 +01:00
Mike Blumenkrantz c2ae61ed0d autotools: remove all usage of evas_image_loader_tgv_(cflags|libs)
Summary:
these are empty variables which are apparently causing build errors for
some users in certain cases

Reviewers: bu5hm4n, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7876
2019-02-05 11:08:01 -05:00
Xavi Artigas 04d1c54e1f docs: Minor Efl.Access.Window EO fixes 2019-02-05 13:29:48 +01:00
Stefan Schmidt f95163a9ba ecore: tests: add missing include path to make ecore_audio build in distcheck
We missed the include path to the tests folder where the generated
ecore_audio_ou_test files are located. Found by our relentless TravisCI
cron job.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7877
2019-02-05 11:57:23 +01:00
Mike Blumenkrantz 93694ffd12 tests: improve efl loop test (concentric)
I forgot to spin the sub-loop, so this was previously just a test to verify
that the IDLE callback was working.

now this spins the sub-loop on the idle callback and tests the idle enter
callback to verify that the main loop is being iterated

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phab.enlightenment.org/D7874
2019-02-04 14:11:48 -06:00
Mike Blumenkrantz c946b1477d eo: implement class overriding (+unit tests)
this enables an app or a platform to add an override for a given class,
then return a different object when that class is created. the benefit is
that a class can be internally customized by the app without needing to
modify upstream versions of that class

@feature
fix T7516

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7702
2019-02-04 19:31:17 +01:00
Stefan Schmidt 305f77607c examples: ecore: bring back inet.h include for inet_pton()
In commit f7c560c311 this include has been
removed while we still need it for inet_pton() as the compliler warns us
about.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7873
2019-02-04 16:01:36 +01:00
Marcel Hollerbach 7ef793e7ef build: fix macos race condition
There was the problem that evas_ector_software_buffer.eo was not arround
but required by the gl_generic engine, this fixes that by adding the
generated source and dependencies to the software_generic dependency.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D7871
2019-02-04 11:08:03 +01:00
Mike Blumenkrantz 21bdcf4265 tests: add explicit test for concentric loop usage
having multiple loops which interact is a valid use case that should be
tested to ensure functionality

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phab.enlightenment.org/D7868
2019-02-01 15:13:36 -06:00
Mike Blumenkrantz 08b7974fa1 tests/elm: speed up all main loop timer execution
this spins a second loop which manages a timer to trigger the canvas tick
and increase the loop timer by a fixed interval on every timer call

by increasing the loop time manually, timers such as edje animation timers
which would usually take a very long time (e.g., 0.5s) to run will instead
complete almost instantly, making tests run much faster

the second loop is necessary in this case in order to accurately provide ticks
at a consistent interval without any modifications to timing

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Differential Revision: https://phab.enlightenment.org/D6791
2019-02-01 14:10:52 -06:00