X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=blobdiff_plain;f=dali%2Finternal%2Fclipboard%2Ftizen-wayland%2Fclipboard-impl-ecore-wl.cpp;h=77b48de75ac41c9caf337eb68e595dc891da4f54;hp=821a7305c6531c73a26b98984965f7c59230ad99;hb=44ac6b074a4d7d2f9474331a364e4629c0bce11a;hpb=969eba3fde5242ccfdef562bb3dd21712ff9df9b diff --git a/dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp b/dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp index 821a730..77b48de 100644 --- a/dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp +++ b/dali/internal/clipboard/tizen-wayland/clipboard-impl-ecore-wl.cpp @@ -23,7 +23,13 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wold-style-cast" #include + +#ifdef ECORE_WAYLAND2 +#include +#else #include +#endif + #include #include #include @@ -103,21 +109,37 @@ struct Clipboard::Impl // ELM_SEL_TYPE_CLIPBOARD - To distinguish clipboard selection in cbhm types[++i] = "CLIPBOARD_END"; - ecore_wl_dnd_selection_set(ecore_wl_input_get(), types); + +#ifdef ECORE_WAYLAND2 + Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get( ecore_wl2_connected_display_get( NULL ) ); + ecore_wl2_dnd_selection_set( input, types ); +#else + ecore_wl_dnd_selection_set( ecore_wl_input_get(), types ); +#endif } void RequestItem() { +#ifdef ECORE_WAYLAND2 + Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get( ecore_wl2_connected_display_get( NULL ) ); + ecore_wl2_dnd_selection_get( input ); +#else const char *types[10] = {0, }; int i = -1; types[++i] = "text/plain;charset=utf-8"; ecore_wl_dnd_selection_get(ecore_wl_input_get(), *types); +#endif } char *ExcuteSend( void *event ) { +#ifdef ECORE_WAYLAND2 + Ecore_Wl2_Event_Data_Source_Send *ev = (Ecore_Wl2_Event_Data_Source_Send *)event; +#else Ecore_Wl_Event_Data_Source_Send *ev = (Ecore_Wl_Event_Data_Source_Send *)event; +#endif + int len_buf = mSendBuffer.length(); int len_remained = len_buf; int len_written = 0, ret; @@ -137,7 +159,11 @@ struct Clipboard::Impl char *ExcuteReceive( void *event ) { +#ifdef ECORE_WAYLAND2 + Ecore_Wl2_Event_Selection_Data_Ready *ev = (Ecore_Wl2_Event_Selection_Data_Ready *)event; +#else Ecore_Wl_Event_Selection_Data_Ready *ev = (Ecore_Wl_Event_Selection_Data_Ready *)event; +#endif return (char *)ev->data; }