Commit Graph

1763 Commits

Author SHA1 Message Date
Jean-Philippe Andre 76088133dc naviframe: Override resize_object_set
This is a first step into allowing me to removing the sub_obj argument.
Make elm_widget resize_object a protected property.

See also D265

Ref T5363
2017-08-09 12:21:42 +09:00
Jean-Philippe Andre 1dad7e3e02 widget: Move signal functions to internal only
elm_widget APIs are internal only, even if they may be EAPI. The EAPI
here is for modules.

I believe this API is only required for layout objects, so simply should
remain in the layout class. Then you can do efl_isa() and call the
functions or accept error messages if you want to be more careless.

Ref T5363
2017-08-09 12:21:42 +09:00
Youngbok Shin 14754744fa elementary cursor: remove a warning message from Wayland supports
Summary:
"_cursors_count" static variable is not used when Elementary is built
for Wayland. It should be removed if els_cursor doesn't use it.
@fix

Test Plan: N/A

Reviewers: raster, zmike, ManMower

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5065
2017-08-08 10:17:50 -04:00
Jaeun Choi 81f94ecada elm_panel: use widget data for getting geometry
_elm_panel_efl_gfx_size_set() ends up calling
_elm_panel_elm_layout_sizing_eval() to adjust the layout
according to the updated width and height.
however, evas_object_geometr_get() doesn't return the updated values.
in fact, it is not necessary to call any API since the values are
stored as widget data in _elm_widget_efl_gfx_size_set().
2017-08-08 15:33:19 +09:00
Jean-Philippe Andre 3add24fa45 elm: Continue elm_layout renaming
This renames a few macros.

Ref T5315
2017-08-08 13:39:44 +09:00
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00
Jean-Philippe Andre f79960839d layout: Implement missing edje APIs
This makes elm_layout implement:
 - efl_canvas_layout_signal_message_send
 - efl_canvas_layout_signal_process

This only transfers the calls from the elm widget to the internal
edje object.

PS: message_send is quite ugly in C...

Ref T5315

@feature
2017-08-08 11:10:56 +09:00
Jean-Philippe Andre 6864495c99 elm: Move elm_layout_sizing_eval to legacy
elm_layout_sizing_eval() marks an object as requiring recalc.

Unfortunately, it's been massively abused by various widgets into
actually doing the calc, or the min calc. So we end up with one API
that has 3 different definitions depending on the widget type:
1. Mark as requiring recalc (correct, respects doc, elm_layout)
2. Calculate min size and other size hints
3. Actually do some geometry modification

I believe we need to clarify these 3 requirements into 3 very clear
and specific APIs in elementary. Right now we have similar functions
in evas for 1 (evas_object_smart_changed) and 3 (smart_calculate).
But their exact definition also isn't necessarily what we want for
elementary.

Another clear problem is that layout_eval does not do any calculation
(in theory), so the "eval" word is a bit of a stretch here.

Once we're sure about the exact API we want, we can add this back to
EO and make it work across our EO widgets. For now let's just keep
the legacy API, and its EO overrides, as is.

Ref T5315
2017-08-08 11:10:56 +09:00
Mike Blumenkrantz f7278719c1 elm_win: set shadow geometry based on borderless state
@fix
2017-08-07 13:26:51 -04:00
Mike Blumenkrantz 56936c91c0 elm_win: simplify/fix recalc logic when changing csd
forcing a full eval here is unnecessary and broken since such an eval could
either change geometry in unexpected ways or fail to accurately change
the underlying canvas geometry

@fix
2017-08-07 13:26:51 -04:00
Marcel Hollerbach 66265c2f4d efl_ui_focus_manager: free iterator when done 2017-08-07 12:31:10 +02:00
Marcel Hollerbach 63393d344b efl_ui_focus_manager: fix leak when setting order
We should free the list when we set it again.
2017-08-07 12:31:10 +02:00
Stefan Schmidt dbf7057bca Revert "efl: terrible kludge so avoid termination crash on osx"
This reverts commit 9368eedd35.

The release is out so we can revert this bandaid again. In the hope to
find the real culprit and solution before the next release.
2017-08-07 11:53:00 +02:00
Amitesh Singh 40945d9859 elm: rename elm panes to Efl.Ui.Panes 2017-08-07 15:49:11 +09:00
Mike Blumenkrantz 6a6505106a elm_win: propagate window aspect hint in wayland 2017-08-04 16:15:43 -04:00
JinYong Park f2082c0412 layout: fix "elm,state,text,hidden" signal never be emitted
Summary:
 In _elm_layout_text_set function, text_signal_emit is called.
 But in that case, check text whether it is null or not null before call signal_emit.
 So "text" is not null always, and text_signal_emit's parameter "visible" is also always EINA_TRUE.

Reviewers: Jaehyun_Cho, cedric, jpeg

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5049
2017-08-04 15:33:27 +09:00
Jean-Philippe Andre 63f0dcc5fc layout: Fix compilation break
Oooops! This broke external apps!
2017-08-04 12:31:14 +09:00
Jean-Philippe Andre 4c8f87974c layout: Implement data_get from edje
This also implements size_min and size_max get.

Ref T5315
2017-08-04 11:52:17 +09:00
Jean-Philippe Andre 240cc9e501 edje: Move size_min/max and data to an interface
The new interface is:
  Efl.Canvas.Layout_Group

I'm not fan of the name.

Ref T5315
2017-08-04 11:52:17 +09:00
Jean-Philippe Andre 3e5cfb83c0 elm: Remove custom layout signal APIs
This merges them with the now standard interface:
  Efl.Canvas.Layout_Signal

Some wrapping work was required for legacy API which
takes no user_data in del() but instead returns it. The
new EO function, while harder to use, is more correct
(you can't delete the invalid callback by accident, and
this follows EO events design).

Another crazy wrapping was done in entry/text in order
to add the callbacks to 2 objects instead of just one,
and still return the user data.

As for Naviframe and Popup, those two widgets override
signal_emit to forward the call to another object than
the resize object, but not callback_add/del. So they
are definitely broken.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre ad7e16bcf4 layout: Use only legacy "elm_layout_sizing_eval"
This removes all uses of elm_obj_layout_sizing_eval.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre fb941c457c layout: Improve doc for theme_set
Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 82e6100322 layout: Move Part_Alias struct to legacy
Part aliases need to be handled differently in EO.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre f0730f6f4c layout: Move edje_get to legacy only
Here's the reasoning:
 1. We will expose as many edje APIs as possible (and meaningful)
    through the elm layout class.
 2. Access to internal objects is usually risky, as it allows apps
    to bypass EFL in some ways, leading to potentially undefined
    behaviours.
 3. If the need arises we can still add a similar API back to EO,
    later.

Back to #1, it seems that the need for edje_get() was mostly to
call manual sizing functions, or the missing message_send(). I will
make sure these are accessible from the layout itself.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre aebd37cab8 layout: Remove sub_object_add_enable
Same as the previous patch. This was an ugly hack. Use another
one instead.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre a4940ae6c9 layout: Remove method theme_enable
This was an internal thing, ugly, replaced by another ugly
solution, but maybe less ugly.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre ed94e8b535 scroller: Implement default content part
This:
  efl_content_set(efl_part(scroller, "default"), obj)
worked fine, but, this:
  efl_content_set(scroller, obj)
didn't work as expected.

Thanks @JackDanielz for the report.

Note: There is a problem still... "default" should not work
      with efl_part. This is quite bad, actually. It should
      probably be "content" instead.
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 7ba0ab5182 layout: Implement freeze and thaw from interface
This implements part of the interface
  Efl.Canvas.Layout_Calc
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre a4c3929894 layout: Implement cursor part APIs with efl_part
This makes layout parts implement Efl.Ui.Cursor.
This also adds the missing bool returns from that interface.

This removes 7 APIs from Elm.Layout.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre aeacb54c35 cursor: EO-ify elm_cursor API
This creates an interface and makes Elm.Widget implement it.
Next step: make elm_layout parts implement it.

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre f63a564817 layout: Move edje_object_can_access to legacy
This is an API enabling accessibility on text(block) parts
in a layout. But it is said to have many issues. I can already
see that it only changes a flag but doesn't trigger any code
to create the appropriate objects, so definitely not fully
working.

According to @kimcinoo this may remain in legacy land for now.
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 6df17b2ed0 edje: Split off calc APIs to an interface (EO)
Those APIs can then be used by Elm.Layout, hopefully
simplifying the API.

I wonder if the APIs should be prefixed "calc_" (as is)
or "layout_calc_". The extra "layout_" prefix would make
it common with other layout APIs (eg. signals, data,
size min/max, ...).

Ref T5315
2017-08-04 11:52:16 +09:00
Jean-Philippe Andre 796d4b138b elm: Make content and text aliases internal only
This removes the APIs from the EO API.

Ref T5315
2017-08-04 10:24:03 +09:00
Taehyub Kim 94d3fd3d82 win: implement efl_provider_find for EFL_UI_WIN_CLASS
Summary:
Implement efl_provider_find function for efl_ui_win class.
This will support to search window class by efl_provider_find function.

Reviewers: jpeg, cedric, Jaehyun_Cho, thiepha, woohyun, Blackmole

Reviewed By: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5045
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre a1509ab98d frame: Implement text set/get (EO only)
This is required for the default style which has a title.
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 999dbd9764 eo debug name: Use strbuf instead of slstr
This should be a little bit more efficient, even if more "risky"
in terms of leaks. The final API still looks exactly the same.
2017-08-04 10:24:03 +09:00
Jean-Philippe Andre 569ad0bac4 evas/edje/elm: Override debug_name in core classes
This is really only a demonstration of what kind of information
we can print with efl_debug_name_get(). Hopefully this can help
debugging with printf/ERR logs and even help with live debugging
inside gdb.

This shouldn't be used for other purposes than debugging, as the
exact string format is not defined.

@feature
2017-08-04 10:24:03 +09:00
Jean Guyomarc'h 9368eedd35 efl: terrible kludge so avoid termination crash on osx
Currently, elementary programs crash on termination on macOS (seems
Sierra-specific). This is very nasty, looks like deep memory corruption...
Without valgrind (or like) support on Sierra, it is difficult to
pinpoint the origin of the problem.

Due to the imminient release, and after discussion with @stefan, this
kludge will allow the release to happen.

This commit MUST be reverted just after the release, so we don't
blindfold ourselves!

Ref T5245
2017-08-03 10:31:26 +02:00
Andy Williams 91293d3b25 elm_code: small optimisation for large files 2017-08-02 10:32:13 +01:00
Jiyoun Park c3d8a1d9f4 efl_ui_win: add error hanling code for malloc fail 2017-08-02 16:42:04 +09:00
Jean-Philippe Andre 3b8c60954e Revert "elm gesture layer - use fabs not abs when actually comparing floats"
This reverts commit 2d4d836018.

Don't pretend to fix an issue found by a static analyzer by
introducing another issue that even clang warns about.

Fixes:
elm_gesture_layer.c:2533: warning: using floating point absolute value
  function 'fabs' when argument is of integer type [-Wabsolute-value]
        if ((fabs(st->info.mx) > ELM_GESTURE_MINIMUM_MOMENTUM) ||
             ^
2017-08-01 20:03:20 +09:00
Shinwoo Kim 391a777c01 elementary: access overrides Accessible.state_set.get
The elm_access a widget makes primitive object accessible. If a primitive
object is not visible, then the elm_access should NOT have state VISIBLE, and
SHOWING. From now the elm_access is checking visibility of primitive object.
2017-08-01 19:52:38 +09:00
Jiyoun Park ca625aa323 efl_ui_win: add EFL_UI_WIN_SOCKET_IMAGE type check
elm_win_socket_listen api only work for EFL_UI_WIN_SOCKET_IMAGE type window.
    So it is better to add type check code.
2017-07-31 15:20:02 +09:00
Carsten Haitzler b1e9d46bcc elm code - handle alloc failure for line split
this culd optentially use large offsets before accessing the ptr thus
it may not segv inthe first page but actually work if positionoffsets
are large enouh, so handle this case explicitly.

@fix

found by PVS studio
2017-07-31 12:01:41 +09:00
Carsten Haitzler d639063b50 elm code - handle alloc failure for line split
this culd optentially use large offsets before accessing the ptr thus
it may not segv inthe first page but actually work if positionoffsets
are large enouh, so handle this case explicitly.

@fix

found by PVS studio
2017-07-31 12:00:45 +09:00
Carsten Haitzler 0efb70e317 elm theme - remove redundent check
found by PVS studio
2017-07-31 11:38:42 +09:00
Carsten Haitzler 2d4d836018 elm gesture layer - use fabs not abs when actually comparing floats
2 abs uses should have been fabs as they compe a src float with
anot her float.

found by PVS studio

@fix
2017-07-31 10:41:39 +09:00
Carsten Haitzler ae79052376 elm calendar - fix gmtime call to use an actual value
e85c92662b added this bug. before it was
always set to 259200 (first sunday after epoch).

found by PVS studio
2017-07-31 10:00:00 +09:00
Carsten Haitzler 7abf4715f2 efl ui text - remove useless else + free
string is null so no need to free. not a bug but cleaner and analysers
dont like it.

found by PVS studio
2017-07-29 11:11:21 +09:00
Carsten Haitzler 8b6e72bfad els box - remove rudundant double check
not a bug but checking something twice in a row isn't too useful

found by PVS studio
2017-07-29 10:56:53 +09:00