Commit Graph

213 Commits

Author SHA1 Message Date
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
Jiyoun Park c3d8a1d9f4 efl_ui_win: add error hanling code for malloc fail 2017-08-02 16:42:04 +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
Mike Blumenkrantz 812be4a43b elm_win: do not implement aspect_get()
this breaks aspect hints.

@fix
2017-07-28 15:40:47 -04:00
Mike Blumenkrantz 5070ecc99a elm_win: instantiate csd frame after creating pointer surface
csd attempts to create sw cursors if the pointer surface doesn't exist,
so create the pointer surface before the csd to avoid duplicate cursors

 #TheDisappointer
2017-07-21 16:17:53 -04:00
Mike Blumenkrantz 5acd75c0c9 elm_win: do not set invalid geometries on the window object
clamping to 1x1 is not valid, neither is trying to always position at 0,0

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:53 -04:00
Mike Blumenkrantz 10516fa3fd elm_win: hide pointer surface on mouse out
this should be unmapped so edje stops trying to render to it, though
at some point it could be optimized to not hide and just reuse the buffer
when showing again

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:53 -04:00
Mike Blumenkrantz d67bdc92b7 elm_win: show pointer canvas after setting cursor
setting cursor calls resize, which is what sets the surface size

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:53 -04:00
Jean-Philippe Andre dccdd20335 elm: Fix a safety error message
Happens when shutting down E
2017-07-20 14:46:49 +09:00
Jean-Philippe Andre 521f41f536 win: Fix main menu when not in framespace
On OSX the framespace and CSD (Client-Side Decorations) are not
supported at all... I am not able to test this case. This patch
restores the main menu functionality based on pre 1.19 themes,
where it was located inside win.edc (app content) and not in
border.edc (framespace).

Note that the initial size of a window may be wrong, eg as in
  elementary_test -to "Main Menu"

Fixes T5734 (hopefully!)
2017-07-18 18:42:16 +09:00
Jean-Philippe Andre 9dddc075d4 win: Amend previous commit about modifiers
The code was invalid, so making it valid now. Explicitely marking
the modifiers as unused, as mentionned in the documentation as
well.

See 9baa8752a9
2017-07-17 16:38:38 +09:00
Jean-Philippe Andre 9baa8752a9 win: Fix ABI compatibility for grab modifiers
This fixes an ABI change when moving from unsigned long long
modifier mask to a simple enum. This is a fix for the release
of EFL 1.20.
2017-07-17 14:24:30 +09:00
Amitesh Singh 98b9bb0da5 win: fix compiler warning 2017-07-13 11:16:48 +09:00
Marcel Hollerbach 23203c9e72 elementary: fix leaking manager objects
they are now automatically destroyed once the object is deleted.
2017-07-10 20:32:07 +02:00
Mike Blumenkrantz 4be19d87f4 elm_win: remove engine checks from window_id_get()
if these exist then just return the id
2017-07-07 15:22:23 -04:00
Mike Blumenkrantz 0ea3d0daaa elm_win: remove engine checks from wl_window_get
if there's a win, return it, otherwise this returns null anyway
2017-07-07 15:22:23 -04:00
Mike Blumenkrantz 81adac88dc elm_win: manually create a wl2 window for FAKE wins under wayland
this enables elm_cnp to function using protocol
2017-07-07 15:22:23 -04:00
Jean-Philippe Andre f8d8136b2c win: Avoid CRI message before finalized
Test case was Bg EO API in elm_test
2017-07-07 15:44:51 +09:00
Jean-Philippe Andre 68ad235f4e win: Try to fix some resizing issues with main menus
Omg this was a pain... The code is complete spaghetti and the
fact that the main menu is now in the framespace doesn't help
either. With this patch and the previous one (about ecore_evas_x)
Edi should be able to open correctly at the proper size and with
a visible menu.

This patch introduces a lot of changes so it'll need testing
before we accept it fully.

Fixes T5482
2017-07-05 18:46:38 +09:00
Jean-Philippe Andre 4488c51c5f win: Fix some sizing issues with main menu
This should fix issues when the main menu is wider than the
window content. This assumes that the menu is horizontal and
aligned with the client content.

The theme should probably handle this case better but right
now I am lost in the spaghetti resizes happening between
edje, elm, evas and X...

I am not very happy with this patch, and I think border.edc
needs some love in order to make it more robust and simpler
to read.

Ref T5482
2017-07-05 17:43:59 +09:00
Jean-Philippe Andre 59081043a8 elm: Always pass valid part name inside part APIs
This affects the legacy content_set/get/unset part APIs. This
should avoid some unwanted ERR messages in case an elm_object_
API is used on an elm widget that doesn't implement said API.

What this does is request the widget for the name of the default
part if NULL was passed in. Since some widgets are not elm_layout,
they have to override the API themselves, which is why I made it
an internal EO API (rather than a series of efl_isa()).

In theory, part should never be NULL when reaching the internal
implementation code in the widgets, at least for content.

In EO, efl_part(obj, NULL) should be invalid.

Ref T5629
2017-06-30 14:37:54 +09:00
Mike Blumenkrantz 34ce5d648f elm_win: access wl seats in a more portable way
seat names are not guaranteed to be the same in every compositor so
this should not be hardcoded
2017-06-23 17:43:44 -04:00
Jean-Philippe Andre 8ba83b102f win: Implement Efl.Canvas device & seat get
By name or id
2017-06-15 17:35:44 +09:00
Vincent Torri c233274529 elm+evas - windows - fix alt+f4 to work without losing alt key
fixes  T5581
2017-06-15 16:00:38 +09:00
Jean-Philippe Andre f54d891b2c win: Use efl_data_scope_safe_get instead of macros
This removes macros that don't make the code easier to read
and aren't actually as safe as this safe data_get.
2017-06-14 16:54:15 +09:00
Jean-Philippe Andre ed41adf791 widget: Implement mirrored from Efl.Ui.Base
Ref T5363
2017-06-14 11:02:05 +09:00
Jean-Philippe Andre 06b14827b7 widget: Implement scale from Efl.Ui.Base 2017-06-12 11:50:30 +09:00
Marcel Hollerbach af858d1d93 elm_widget: add factory method to the widget
with this function you can trap the creation of the mangers, and change
the behaviour as you need it. For example returning a custom manager.
2017-06-09 10:16:19 +02:00
Bryce Harrington 4f5ea8f3b7 elm_win: Fix breakage in frame bg style with Elementary WL2
Summary:
An else statement was added in 5ebdf8f3 with no clause, resulting in the
bg_solid property becoming conditionalized such that it won't be set
correctly when HAVE_ELEMENTARY_WL2 is defined and there is no wayland
window in use.

Further, this also causes focus to be left undefined.  Since there's no
window, presumably it should be turned off in this circumstance.

fix CID1375496, CID1375497

Reviewers: zmike

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4899
2017-05-23 16:46:00 -04:00
Mike Blumenkrantz 2fe7878235 wayland: move pointer-related functions to ecore_wl2_input namespace
windows do not have pointers or cursors under wayland, seats do. due to
lack of multiseat support, most components simply use the "default" seat
with these functions, but this should make the corresponding code more
easily adaptable
2017-05-19 12:41:17 -04:00
Mike Blumenkrantz 5ebdf8f341 wayland: use shell activated state to indicate focus in csd
the current (v6) xdg-shell spec reads as follows:

	  Client window decorations should be painted as if the window is
	  active. Do not assume this means that the window actually has
	  keyboard or pointer focus.

so this is not equivalent to receiving/losing input focus and should not
be propagated as such

@fix
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 01d3edef00 elm_win: don't unset wl cursor when starting move operation
I don't understand why this is here and it isn't required by spec?

ref ea7bbfe47d
2017-05-19 12:41:16 -04:00
Mike Blumenkrantz 23cf5e80f7 elm_win: add elm_win_get()
it's frequently useful to be able to return the window object from
any object. this simplifies doing so for users

@feature
2017-05-19 12:41:16 -04:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre 781594088e evas: Make Efl.Canvas.Object.legacy_ctor internal
Continuing...
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre 093938e5d9 win: Remove special class Efl.Ui.Win.Standard
All windows should be standard, really. Except when using legacy
elm_win_add() or if type_set() was called with a specific type.

I dislike type_set...

Ref T5322
2017-05-17 10:39:43 +09:00
Jean-Philippe Andre 01d4886328 evas: Add seat arg to modifier/lock EO APIs
This now matches the new seat-related set of APIs present as EAPI.
2017-05-16 20:47:49 +09:00
Jean-Philippe Andre 054aa012c4 evas: Use enum instead of string in Efl.Input.State
Ref T5312
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre 2d6f53f2b9 evas: Replace Evas.Modifier_Mask with Efl.Input enums
This removes Evas.Modifier_Mask from EO.

This introduces two new types instead:
 - Efl.Input.Modifier
 - Efl.Input.Lock

Those are enums, not strings, containing all the known and
currently supported lock and modifier keys. The enums are
bit masks.

This effectively removes the ability for an application to
create and handle specific modifier or lock keys - with EO
API (legacy compatibility is unchanged, of course). I wonder
who ever required this?
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre da229e34aa evas: Remove evas touch_point from EO
Note: it seems the EAPI evas_touch_point_list_xy_get() was
lst at some point, as it doesn't appear in the headers anymore.
It looks like we fail to catch an ABI break! abi_checker didn't
catch this!?

Ref T5312
2017-05-15 16:21:20 +09:00
Carsten Haitzler 3a60246297 efl ui win -> add test for centering + fix center of window before show
we haven't gotten replies yet on what our position or size should be,
so we should store them so centering works before show but after
resizing is evaluated (that also fixed by forcing an eval).

@fix
2017-05-12 19:21:48 +09:00
Mike Blumenkrantz ea0a3d304a elm_win: do not require mouse buttons to be pressed to activate csd move/resize
the api function requires this, but the unified handler for api+edje handler does
not, since edje singals are deferred and the button which triggered the move
may be released before the signal is processed

ref ea7bbfe47d
@fix
2017-04-21 16:16:12 -04:00
Marcel Hollerbach fb6c37f16f elementary: introduce helper functions for the redirects 2017-04-20 14:38:59 +02:00
Marcel Hollerbach ef8aed0385 efl_ui_win: migrate to the new focus system
this means, focus requests are redirected to the new focus manager.
2017-04-20 14:38:58 +02:00
Marcel Hollerbach 9aa7c63b2f efl_ui_win: make it a focus manager
Added a focusmanager with the window itself as the root.
2017-04-20 14:38:57 +02:00
Mike Blumenkrantz 442844441e elm_win: set wl window type during finalize
@fix
2017-04-07 16:06:41 -04:00
Cedric BAIL d2816c3879 elementary: fix test breakage.
It is perfectly valid to call this API with no pointer provided.
2017-04-07 11:38:10 -07:00
Shinwoo Kim 7a2aeec9ce elementary: win - override atspi component get interface
The efl_ui_win overrides _elm_interface_atspi_component_extents_get to give
correct value if screen_coord is EINA_FALSE which means relative position.
The efl_ui_win has given its object geometry value + ecore evas geometry value.
The object geometry value was equal to the ecore evas geometry value, so the
relative position was not correct(twice of ecore evas geometry value).
2017-04-07 13:43:00 +09:00
Carsten Haitzler c3372a5c7a fix evas canvas callbacks to use correct legacy callback function 2017-04-06 14:43:04 +09:00
Jean-Philippe Andre c234422357 win: Mark unstable APIs as @beta (stack API)
We have a tag for unstable API, use it. It'll be visible in the
doc and force users to add the macro before being able to compile
code.

This amends d8dd685966.
2017-03-29 09:51:28 +09:00