summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-20 14:04:21 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-05-20 14:54:06 -0400
commit7510e42c1b89867824685f837160702db31cb6de (patch)
tree3180cf9edd7af8f8a2515786a2a98ccbd79a6a2b
parent9be179d740c9b639b309a376c4cb8265f2f1c7b9 (diff)
elm_win: implement v2 of teamwork api using window-based display protocol
this adds support for wayland and makes teamwork integration trivial for any application @feature
-rw-r--r--src/Makefile_Ecore_Wl2.am2
-rw-r--r--src/Makefile_Elementary.am1
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c6
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h4
-rw-r--r--src/lib/ecore_wl2/teamwork_protocol.c46
-rw-r--r--src/lib/ecore_wl2/teamwork_protocol.h128
-rw-r--r--src/lib/ecore_x/Ecore_X_Atoms.h11
-rw-r--r--src/lib/ecore_x/ecore_x_atoms_decl.h23
-rw-r--r--src/lib/elementary/elm_win.c98
-rw-r--r--src/lib/elementary/elm_win.eo37
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h2
11 files changed, 356 insertions, 2 deletions
diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index 9bf375e5a0..66af6f8a1a 100644
--- a/src/Makefile_Ecore_Wl2.am
+++ b/src/Makefile_Ecore_Wl2.am
@@ -8,6 +8,8 @@ installed_ecorewl2mainheadersdir = $(includedir)/ecore-wl2-@VMAJ@
8dist_installed_ecorewl2mainheaders_DATA = lib/ecore_wl2/Ecore_Wl2.h 8dist_installed_ecorewl2mainheaders_DATA = lib/ecore_wl2/Ecore_Wl2.h
9 9
10lib_ecore_wl2_libecore_wl2_la_SOURCES = \ 10lib_ecore_wl2_libecore_wl2_la_SOURCES = \
11lib/ecore_wl2/teamwork_protocol.c \
12lib/ecore_wl2/teamwork_protocol.h \
11lib/ecore_wl2/session-recovery.h \ 13lib/ecore_wl2/session-recovery.h \
12lib/ecore_wl2/session-recovery.c \ 14lib/ecore_wl2/session-recovery.c \
13lib/ecore_wl2/subsurface-client-protocol.h \ 15lib/ecore_wl2/subsurface-client-protocol.h \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 825a24901c..3d9a15f82a 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -641,6 +641,7 @@ lib_elementary_libelementary_la_SOURCES = \
641 lib/elementary/efl_ui_grid.c \ 641 lib/elementary/efl_ui_grid.c \
642 $(NULL) 642 $(NULL)
643 643
644
644lib_elementary_libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@ 645lib_elementary_libelementary_la_CFLAGS = @ELEMENTARY_CFLAGS@
645lib_elementary_libelementary_la_LIBADD = \ 646lib_elementary_libelementary_la_LIBADD = \
646@ELEMENTARY_LIBS@ \ 647@ELEMENTARY_LIBS@ \
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 05b2247ecf..cdc859cc1e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -166,6 +166,12 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
166 wl_registry_bind(registry, id, 166 wl_registry_bind(registry, id,
167 &zwp_e_session_recovery_interface, 1); 167 &zwp_e_session_recovery_interface, 1);
168 } 168 }
169 else if (!strcmp(interface, "zwp_teamwork"))
170 {
171 ewd->wl.teamwork =
172 wl_registry_bind(registry, id,
173 &zwp_teamwork_interface, EFL_TEAMWORK_VERSION);
174 }
169 else if (!strcmp(interface, "wl_output")) 175 else if (!strcmp(interface, "wl_output"))
170 _ecore_wl2_output_add(ewd, id); 176 _ecore_wl2_output_add(ewd, id);
171 else if (!strcmp(interface, "wl_seat")) 177 else if (!strcmp(interface, "wl_seat"))
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index be69725321..680214a4a4 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -6,6 +6,9 @@
6# include "Ecore_Input.h" 6# include "Ecore_Input.h"
7# include "www-protocol.h" 7# include "www-protocol.h"
8 8
9#define EFL_TEAMWORK_VERSION 2
10# include "teamwork_protocol.h"
11
9/* NB: Test if subsurface protocol is part of wayland code, if not then 12/* NB: Test if subsurface protocol is part of wayland code, if not then
10 * include our own copy */ 13 * include our own copy */
11# ifndef WL_SUBSURFACE_ERROR_ENUM 14# ifndef WL_SUBSURFACE_ERROR_ENUM
@@ -84,6 +87,7 @@ struct _Ecore_Wl2_Display
84 struct xdg_shell *xdg_shell; 87 struct xdg_shell *xdg_shell;
85 struct www *www; 88 struct www *www;
86 struct zwp_e_session_recovery *session_recovery; 89 struct zwp_e_session_recovery *session_recovery;
90 struct zwp_teamwork *teamwork;
87 int compositor_version; 91 int compositor_version;
88 } wl; 92 } wl;
89 93
diff --git a/src/lib/ecore_wl2/teamwork_protocol.c b/src/lib/ecore_wl2/teamwork_protocol.c
new file mode 100644
index 0000000000..baca23d3b0
--- /dev/null
+++ b/src/lib/ecore_wl2/teamwork_protocol.c
@@ -0,0 +1,46 @@
1#include <stdlib.h>
2#include <stdint.h>
3#include "wayland-util.h"
4
5extern const struct wl_interface wl_surface_interface;
6
7static const struct wl_interface *types[] = {
8 &wl_surface_interface,
9 NULL,
10 &wl_surface_interface,
11 NULL,
12 NULL,
13 NULL,
14 &wl_surface_interface,
15 NULL,
16 &wl_surface_interface,
17 NULL,
18 &wl_surface_interface,
19 NULL,
20 &wl_surface_interface,
21 NULL,
22 NULL,
23 &wl_surface_interface,
24 NULL,
25 NULL,
26};
27
28static const struct wl_message zwp_teamwork_requests[] = {
29 { "preload_uri", "os", types + 0 },
30 { "activate_uri", "osff", types + 2 },
31 { "deactivate_uri", "os", types + 6 },
32 { "open_uri", "os", types + 8 },
33};
34
35static const struct wl_message zwp_teamwork_events[] = {
36 { "fetching_uri", "os", types + 10 },
37 { "completed_uri", "osi", types + 12 },
38 { "fetch_info", "osu", types + 15 },
39};
40
41WL_EXPORT const struct wl_interface zwp_teamwork_interface = {
42 "zwp_teamwork", 2,
43 4, zwp_teamwork_requests,
44 3, zwp_teamwork_events,
45};
46
diff --git a/src/lib/ecore_wl2/teamwork_protocol.h b/src/lib/ecore_wl2/teamwork_protocol.h
new file mode 100644
index 0000000000..129aa2deb4
--- /dev/null
+++ b/src/lib/ecore_wl2/teamwork_protocol.h
@@ -0,0 +1,128 @@
1#ifndef TEAMWORK_CLIENT_PROTOCOL_H
2#define TEAMWORK_CLIENT_PROTOCOL_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdint.h>
9#include <stddef.h>
10#include "wayland-client.h"
11
12struct wl_client;
13struct wl_resource;
14
15struct wl_surface;
16struct zwp_teamwork;
17
18extern const struct wl_interface zwp_teamwork_interface;
19
20struct zwp_teamwork_listener {
21 /**
22 * fetching_uri - (none)
23 * @surface: (none)
24 * @uri: (none)
25 */
26 void (*fetching_uri)(void *data,
27 struct zwp_teamwork *zwp_teamwork,
28 struct wl_surface *surface,
29 const char *uri);
30 /**
31 * completed_uri - (none)
32 * @surface: (none)
33 * @uri: (none)
34 * @valid: 1 if uri can be displayed, else 0
35 */
36 void (*completed_uri)(void *data,
37 struct zwp_teamwork *zwp_teamwork,
38 struct wl_surface *surface,
39 const char *uri,
40 int32_t valid);
41 /**
42 * fetch_info - (none)
43 * @surface: (none)
44 * @uri: (none)
45 * @progress: percentage of download
46 */
47 void (*fetch_info)(void *data,
48 struct zwp_teamwork *zwp_teamwork,
49 struct wl_surface *surface,
50 const char *uri,
51 uint32_t progress);
52};
53
54static inline int
55zwp_teamwork_add_listener(struct zwp_teamwork *zwp_teamwork,
56 const struct zwp_teamwork_listener *listener, void *data)
57{
58 return wl_proxy_add_listener((struct wl_proxy *) zwp_teamwork,
59 (void (**)(void)) listener, data);
60}
61
62#define ZWP_TEAMWORK_PRELOAD_URI 0
63#define ZWP_TEAMWORK_ACTIVATE_URI 1
64#define ZWP_TEAMWORK_DEACTIVATE_URI 2
65#define ZWP_TEAMWORK_OPEN_URI 3
66
67#define ZWP_TEAMWORK_PRELOAD_URI_SINCE_VERSION 1
68#define ZWP_TEAMWORK_ACTIVATE_URI_SINCE_VERSION 1
69#define ZWP_TEAMWORK_DEACTIVATE_URI_SINCE_VERSION 1
70#define ZWP_TEAMWORK_OPEN_URI_SINCE_VERSION 1
71
72static inline void
73zwp_teamwork_set_user_data(struct zwp_teamwork *zwp_teamwork, void *user_data)
74{
75 wl_proxy_set_user_data((struct wl_proxy *) zwp_teamwork, user_data);
76}
77
78static inline void *
79zwp_teamwork_get_user_data(struct zwp_teamwork *zwp_teamwork)
80{
81 return wl_proxy_get_user_data((struct wl_proxy *) zwp_teamwork);
82}
83
84static inline uint32_t
85zwp_teamwork_get_version(struct zwp_teamwork *zwp_teamwork)
86{
87 return wl_proxy_get_version((struct wl_proxy *) zwp_teamwork);
88}
89
90static inline void
91zwp_teamwork_destroy(struct zwp_teamwork *zwp_teamwork)
92{
93 wl_proxy_destroy((struct wl_proxy *) zwp_teamwork);
94}
95
96static inline void
97zwp_teamwork_preload_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri)
98{
99 wl_proxy_marshal((struct wl_proxy *) zwp_teamwork,
100 ZWP_TEAMWORK_PRELOAD_URI, surface, uri);
101}
102
103static inline void
104zwp_teamwork_activate_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri, wl_fixed_t x, wl_fixed_t y)
105{
106 wl_proxy_marshal((struct wl_proxy *) zwp_teamwork,
107 ZWP_TEAMWORK_ACTIVATE_URI, surface, uri, x, y);
108}
109
110static inline void
111zwp_teamwork_deactivate_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri)
112{
113 wl_proxy_marshal((struct wl_proxy *) zwp_teamwork,
114 ZWP_TEAMWORK_DEACTIVATE_URI, surface, uri);
115}
116
117static inline void
118zwp_teamwork_open_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri)
119{
120 wl_proxy_marshal((struct wl_proxy *) zwp_teamwork,
121 ZWP_TEAMWORK_OPEN_URI, surface, uri);
122}
123
124#ifdef __cplusplus
125}
126#endif
127
128#endif
diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h
index 3f1f14c02e..8fbe149c33 100644
--- a/src/lib/ecore_x/Ecore_X_Atoms.h
+++ b/src/lib/ecore_x/Ecore_X_Atoms.h
@@ -337,4 +337,15 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED; /**< @since 1.1
337/* E keyrouter protocol */ 337/* E keyrouter protocol */
338EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_SUPPORTED; /**< @since 1.15 */ 338EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_SUPPORTED; /**< @since 1.15 */
339EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_WINDOW_KEYTABLE; /**< @since 1.15 */ 339EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_WINDOW_KEYTABLE; /**< @since 1.15 */
340
341/* Teamwork protocol */
342EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PROPERTY; /**< @since 1.18 */
343EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PRELOAD; /**< @since 1.18 */
344EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_ACTIVATE; /**< @since 1.18 */
345EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_DEACTIVATE; /**< @since 1.18 */
346EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_OPEN; /**< @since 1.18 */
347
348EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_COMPLETED; /**< @since 1.18 */
349EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PROGRESS; /**< @since 1.18 */
350EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_STARTED; /**< @since 1.18 */
340#endif /* _ECORE_X_ATOMS_H */ 351#endif /* _ECORE_X_ATOMS_H */
diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h
index 1583025856..64b5764b56 100644
--- a/src/lib/ecore_x/ecore_x_atoms_decl.h
+++ b/src/lib/ecore_x/ecore_x_atoms_decl.h
@@ -367,6 +367,17 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED = 0;
367EAPI Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_SUPPORTED = 0; 367EAPI Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_SUPPORTED = 0;
368EAPI Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_WINDOW_KEYTABLE = 0; 368EAPI Ecore_X_Atom ECORE_X_ATOM_E_KEYROUTER_WINDOW_KEYTABLE = 0;
369 369
370/* Teamwork protocol */
371EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PROPERTY = 0;
372EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PRELOAD = 0;
373EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_ACTIVATE = 0;
374EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_DEACTIVATE = 0;
375EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_OPEN = 0;
376
377EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_COMPLETED = 0;
378EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_PROGRESS = 0;
379EAPI Ecore_X_Atom ECORE_X_ATOM_TEAMWORK_STARTED = 0;
380
370typedef struct _Atom_Item Atom_Item; 381typedef struct _Atom_Item Atom_Item;
371 382
372struct _Atom_Item 383struct _Atom_Item
@@ -684,6 +695,16 @@ const Atom_Item atom_items[] =
684 { "_E_WINDOW_AUX_HINT_SUPPORTED_LIST", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST }, 695 { "_E_WINDOW_AUX_HINT_SUPPORTED_LIST", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST },
685 { "_E_WINDOW_AUX_HINT_SUPPORT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT }, 696 { "_E_WINDOW_AUX_HINT_SUPPORT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT },
686 { "_E_WINDOW_AUX_HINT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT }, 697 { "_E_WINDOW_AUX_HINT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT },
687 { "_E_WINDOW_AUX_HINT_ALLOWED", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED } 698 { "_E_WINDOW_AUX_HINT_ALLOWED", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED },
699
700 { "_TEAMWORK_PROP", &ECORE_X_ATOM_TEAMWORK_PROPERTY },
701 { "_TEAMWORK_PRELOAD", &ECORE_X_ATOM_TEAMWORK_PRELOAD },
702 { "_TEAMWORK_ACTIVATE", &ECORE_X_ATOM_TEAMWORK_ACTIVATE },
703 { "_TEAMWORK_DEACTIVATE", &ECORE_X_ATOM_TEAMWORK_DEACTIVATE },
704 { "_TEAMWORK_OPEN", &ECORE_X_ATOM_TEAMWORK_OPEN },
705
706 { "_TEAMWORK_COMPLETED", &ECORE_X_ATOM_TEAMWORK_COMPLETED },
707 { "_TEAMWORK_PROGRESS", &ECORE_X_ATOM_TEAMWORK_PROGRESS },
708 { "_TEAMWORK_STARTED", &ECORE_X_ATOM_TEAMWORK_STARTED },
688}; 709};
689 710
diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index 9a49dc154b..00ab00aaad 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -134,6 +134,7 @@ struct _Elm_Win_Data
134 Ecore_Win32_Window *win; 134 Ecore_Win32_Window *win;
135 } win32; 135 } win32;
136#endif 136#endif
137 Eina_Stringshare *teamwork_uri;
137 138
138 Eina_Bool deferred_resize_job; 139 Eina_Bool deferred_resize_job;
139 Ecore_Job *deferred_child_eval_job; 140 Ecore_Job *deferred_child_eval_job;
@@ -2013,6 +2014,7 @@ _elm_win_evas_object_smart_del(Eo *obj, Elm_Win_Data *sd)
2013 ecore_job_del(sd->deferred_child_eval_job); 2014 ecore_job_del(sd->deferred_child_eval_job);
2014 eina_stringshare_del(sd->shot.info); 2015 eina_stringshare_del(sd->shot.info);
2015 ecore_timer_del(sd->shot.timer); 2016 ecore_timer_del(sd->shot.timer);
2017 eina_stringshare_replace(&sd->teamwork_uri, NULL);
2016 2018
2017#ifdef HAVE_ELEMENTARY_X 2019#ifdef HAVE_ELEMENTARY_X
2018 ecore_event_handler_del(sd->x.client_message_handler); 2020 ecore_event_handler_del(sd->x.client_message_handler);
@@ -6012,4 +6014,100 @@ elm_win_quickpanel_zone_get(const Evas_Object *obj)
6012 return 0; 6014 return 0;
6013} 6015}
6014 6016
6017static EOLIAN void
6018_elm_win_teamwork_uri_preload(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
6019{
6020#ifdef HAVE_ELEMENTARY_X
6021 if (sd->x.xwin)
6022 {
6023 ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
6024 ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PRELOAD,
6025 ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
6026 }
6027#endif
6028#ifdef HAVE_ELEMENTARY_WL2
6029 if (sd->wl.win)
6030 {
6031 Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
6032 if (ewd->wl.teamwork)
6033 zwp_teamwork_preload_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), uri);
6034 }
6035#endif
6036 eina_stringshare_replace(&sd->teamwork_uri, uri);
6037}
6038
6039static EOLIAN void
6040_elm_win_teamwork_uri_show(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
6041{
6042 int x, y;
6043
6044 EINA_SAFETY_ON_NULL_RETURN(uri);
6045 if (eina_streq(uri, sd->teamwork_uri)) return;
6046
6047 evas_pointer_canvas_xy_get(sd->evas, &x, &y);
6048#ifdef HAVE_ELEMENTARY_X
6049 if (sd->x.xwin)
6050 {
6051 ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
6052 ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_ACTIVATE,
6053 ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, x, y, 0, 0);
6054 }
6055#endif
6056#ifdef HAVE_ELEMENTARY_WL2
6057 if (sd->wl.win)
6058 {
6059 Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
6060 if (ewd->wl.teamwork)
6061 zwp_teamwork_activate_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win),
6062 uri, wl_fixed_from_int(x), wl_fixed_from_int(y));
6063 }
6064#endif
6065 eina_stringshare_replace(&sd->teamwork_uri, uri);
6066}
6067
6068static EOLIAN void
6069_elm_win_teamwork_uri_hide(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
6070{
6071 if (!sd->teamwork_uri) return;
6072#ifdef HAVE_ELEMENTARY_X
6073 if (sd->x.xwin)
6074 {
6075 ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, sd->teamwork_uri);
6076 ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_DEACTIVATE,
6077 ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
6078 }
6079#endif
6080#ifdef HAVE_ELEMENTARY_WL2
6081 if (sd->wl.win)
6082 {
6083 Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
6084 if (ewd->wl.teamwork)
6085 zwp_teamwork_deactivate_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), sd->teamwork_uri);
6086 }
6087#endif
6088 eina_stringshare_replace(&sd->teamwork_uri, NULL);
6089}
6090
6091static EOLIAN void
6092_elm_win_teamwork_uri_open(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *uri)
6093{
6094 EINA_SAFETY_ON_NULL_RETURN(uri);
6095#ifdef HAVE_ELEMENTARY_X
6096 if (sd->x.xwin)
6097 {
6098 ecore_x_window_prop_string_set(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_PROPERTY, uri);
6099 ecore_x_client_message32_send(sd->x.xwin, ECORE_X_ATOM_TEAMWORK_OPEN,
6100 ECORE_X_EVENT_MASK_WINDOW_MANAGE | ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE, EFL_TEAMWORK_VERSION, 0, 0, 0, 0);
6101 }
6102#endif
6103#ifdef HAVE_ELEMENTARY_WL2
6104 if (sd->wl.win)
6105 {
6106 Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(sd->wl.win);
6107 if (ewd->wl.teamwork)
6108 zwp_teamwork_open_uri(ewd->wl.teamwork, ecore_wl2_window_surface_get(sd->wl.win), uri);
6109 }
6110#endif
6111}
6112
6015#include "elm_win.eo.c" 6113#include "elm_win.eo.c"
diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo
index 469d9dfbcb..69571bf9db 100644
--- a/src/lib/elementary/elm_win.eo
+++ b/src/lib/elementary/elm_win.eo
@@ -1132,6 +1132,43 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
1132 @in not_modifiers: Evas.Modifier_Mask; [[This is for the keymask feature. Currently this feature is not supported.]] 1132 @in not_modifiers: Evas.Modifier_Mask; [[This is for the keymask feature. Currently this feature is not supported.]]
1133 } 1133 }
1134 } 1134 }
1135 teamwork_uri_preload {
1136 [[Notify the compositor that a uri should be preloaded
1137 @since 1.18
1138 ]]
1139 params {
1140 @in uri: const(char)*; [[This is the uri to notify with]]
1141 }
1142 }
1143 teamwork_uri_show {
1144 [[Notify the compositor that a uri should be displayed
1145
1146 Sends the current mouse coordinates as a hint for displaying the
1147 related uri in the compositor.
1148 @since 1.18
1149 ]]
1150 params {
1151 @in uri: const(char)*; [[This is the uri to notify with]]
1152 }
1153 }
1154 teamwork_uri_hide {
1155 [[Notify the compositor that a uri should be hidden
1156
1157 Hides any uri-related media displayed in the compositor through
1158 previous \@ref elm_win_teamwork_uri_show request
1159 @since 1.18
1160 ]]
1161 }
1162 teamwork_uri_open {
1163 [[Notify the compositor that a uri should be opened
1164
1165 Use the compositor's default application to open a uri
1166 @since 1.18
1167 ]]
1168 params {
1169 @in uri: const(char)*; [[This is the uri to open]]
1170 }
1171 }
1135 } 1172 }
1136 implements { 1173 implements {
1137 class.constructor; 1174 class.constructor;
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
index 49d02c43b4..06b188dd09 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h
@@ -20,10 +20,10 @@
20#include <Ecore_Input.h> 20#include <Ecore_Input.h>
21#include <Ecore_Input_Evas.h> 21#include <Ecore_Input_Evas.h>
22#include <Ecore_Wl2.h> 22#include <Ecore_Wl2.h>
23#include "ecore_wl2_private.h"
24 23
25#include <Ecore_Evas.h> 24#include <Ecore_Evas.h>
26#endif 25#endif
26#include "ecore_wl2_private.h"
27#include "ecore_private.h" 27#include "ecore_private.h"
28#include "ecore_evas_private.h" 28#include "ecore_evas_private.h"
29#include "ecore_evas_wayland.h" 29#include "ecore_evas_wayland.h"