remove GetNativeWindowHandler() in devel window 88/133088/2
authordongsug.song <dongsug.song@samsung.com>
Fri, 9 Jun 2017 01:42:31 +0000 (10:42 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Fri, 23 Jun 2017 05:30:31 +0000 (14:30 +0900)
Conflicts:
dali-csharp-binder/src/dali_wrap.cpp

Change-Id: I446df33289307cb81d06f9c13db5d2e88244c87e
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
configure.ac
dali-csharp-binder/Makefile.am
dali-csharp-binder/file.list
dali-csharp-binder/src/key-grab.cpp
packaging/dali-csharp-binder.spec

index d081046..4f8b044 100755 (executable)
@@ -12,8 +12,20 @@ AM_INIT_AUTOMAKE(1.6)
 AC_PROG_CXX
 AC_PROG_LIBTOOL
 
+# added for key grab binding only for tizen
+AC_ARG_ENABLE(tizenBuild,
+              [  --enable-tizenBuild       build on tizen],
+              enable_tizenBuild=yes,
+              enable_tizenBuild=no)
+
+AM_CONDITIONAL([TIZENBUILD], [test x$enable_tizenBuild = xyes])
+
 # Checks for libraries.
 PKG_CHECK_MODULES([DALI], [dali-core dali-adaptor dali-toolkit])
+# added for key grab binding only for tizen
+if test x$enable_tizenBuild = xyes; then
+PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
+fi
 
 AC_CONFIG_FILES([
 Makefile
index 7680c31..abcc7cd 100755 (executable)
@@ -11,9 +11,16 @@ libdali_csharp_binder_la_LDFLAGS = ${LDFLAGS}
 libdali_csharp_binder_la_CXXFLAGS = \
    ${CFLAGS} \
    $(DALI_CFLAGS) \
+   $(ECORE_WAYLAND_CFLAGS) \
    $(dali_csharp_binder_includes)
 
+# added for key grab binding only for tizen
+if TIZENBUILD
+libdali_csharp_binder_la_CXXFLAGS += -DTIZEN_BUILD
+libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files_tizen)
+else
 libdali_csharp_binder_la_SOURCES = $(dali_csharp_binder_src_files)
+endif
 
 libdali_csharp_binderdir = $(includedir)/dali-csharp-binder
 libdali_csharp_binder_HEADERS = $(dali_csharp_binder_header_files)
index 630a6ec..7e10a37 100755 (executable)
@@ -11,6 +11,18 @@ dali_csharp_binder_src_files = \
   src/view-wrapper-impl-wrap.cpp \
   src/event-thread-callback-wrap.cpp \
   src/manual-bindings-all.cpp \
+  src/tts-player.cpp
+
+# added for key grab binding only for tizen
+dali_csharp_binder_src_files_tizen = \
+  src/dali_wrap.cpp \
+  src/callbackbase_wrap.cpp \
+  src/keyboard_focus_manager_wrap.cpp \
+  src/devel-property-wrap.cpp \
+  src/version-check.cpp \
+  src/view-wrapper-impl-wrap.cpp \
+  src/event-thread-callback-wrap.cpp \
+  src/manual-bindings-all.cpp \
   src/tts-player.cpp \
   src/text-editor.cpp \
   src/window.cpp \
index 248edd0..d589e4f 100755 (executable)
@@ -20,6 +20,9 @@
 #include <dali/public-api/adaptor-framework/key-grab.h>
 #include <dali/devel-api/adaptor-framework/window-devel.h>
 
+#ifdef TIZEN_BUILD
+#include <Ecore_Wayland.h>
+#endif
 
 #undef LOG
 //#define LOG DALI_LOG_ERROR
@@ -30,7 +33,6 @@
 extern "C" {
 #endif
 
-
 SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_GrabKeyTopmost(void * window, int daliKey)
 {
   Dali::Window *_win = (Dali::Window *)window;
@@ -159,8 +161,13 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_GetNativeWindowHandler( void* window )
   LOG("CSharp_Dali_GetNativeWindowHandler() [DP1] window=%d", window);
 
   {
+    Dali::Any result;
     try {
-      ret = Dali::DevelWindow::GetNativeWindowHandler(*_win);
+      result = _win->GetNativeHandle();
+
+      Ecore_Wl_Window * ecore_win = Dali::AnyCast<Ecore_Wl_Window*>(result);
+      ret = (void*)ecore_win;
+
     } catch (std::out_of_range& e) {
     {
       SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return NULL;
index 132fe97..47b2ac2 100755 (executable)
@@ -1,3 +1,4 @@
+
 Name: dali-csharp-binder
 Version: 1.2.39
 Release: 1
@@ -9,6 +10,7 @@ Source: %{name}-%{version}.tar.xz
 BuildRequires: pkgconfig(dali-core)
 BuildRequires: pkgconfig(dali-adaptor)
 BuildRequires: pkgconfig(dali-toolkit)
+BuildRequires: pkgconfig(ecore-wayland)
 
 %description
 dali-csharp-binder
@@ -35,6 +37,8 @@ This package includes developer files common to all packages.
 ##############################
 %build
 %autogen
+# added for key grab binding only for tizen
+%configure --enable-tizenBuild=yes
 make %{?_smp_mflags}
 
 ##############################