--- /dev/null
+Developer:
+ Ji-hoon Lee <dalton.lee at samsung dot com>
--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(libscl-common CXX)
+
+SET(SRCS
+ src/sclcommon.cpp
+)
+
+SET(PACKAGE ${PROJECT_NAME})
+SET(PKGNAME ${PACKAGE})
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(LIBDIR "${PREFIX}/lib")
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF()
+MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/src/include
+ )
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ elementary
+ )
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall")
+SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -g")
+
+ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
+ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
+ADD_DEFINITIONS("-DLOG_TAG=\"LIBSCL_COMMON\"")
+ADD_DEFINITIONS("-D__EFL__")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
+
+INSTALL(FILES "${CMAKE_SOURCE_DIR}/src/sclcommon.h" DESTINATION include/libscl-common)
+INSTALL(FILES "${CMAKE_SOURCE_DIR}/src/scltypes.h" DESTINATION include/libscl-common)
+INSTALL(FILES "${CMAKE_SOURCE_DIR}/src/sclcast.h" DESTINATION include/libscl-common)
+INSTALL(FILES "${CMAKE_SOURCE_DIR}/src/sclcast-efl.h" DESTINATION include/libscl-common)
+
+CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
--- /dev/null
+2014-10-29 11:15 Ji-hoon Lee <dalton.lee@samsung.com>
+
+ Initial version.
+
--- /dev/null
+Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE file for Apache License terms and conditions.
--- /dev/null
+libscl-common
+==============
+
+This is a library that helps developing S/W Keyboards.
+
--- /dev/null
+# Package Information for pkg-config
+
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: libscl-common
+Description: SCL Common - A library for developing software keyboards
+Version: 1.0
+Libs: -L${libdir} -lscl-common
+Cflags: -I${includedir}/libscl-common
+
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+%define _optdir /opt
+%define _appdir %{_optdir}/apps
+
+Name: libscl-common
+Summary: A library for developing software keyboards
+Version: 0.0.1
+Release: 1
+Group: System Environment/Libraries
+License: Apache License, Version 2.0
+Source0: libscl-common-%{version}.tar.gz
+BuildRequires: gettext-tools
+BuildRequires: cmake
+BuildRequires: pkgconfig(elementary)
+
+
+%description
+A library that helps developing S/W Keyboard
+
+%package devel
+Summary: SCL-Common header file
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+A devel pacakge of libscl-common library that helps developing S/W Keyboard
+
+%prep
+%setup -q
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE %{buildroot}/usr/share/license/%{name}
+
+%make_install
+
+
+
+%post
+
+%postun
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libscl-common.so
+/usr/share/license/%{name}
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*
+%{_libdir}/pkgconfig/libscl-common.pc
--- /dev/null
+/*
+ * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SCL_CAST_EFL_H__
+#define __SCL_CAST_EFL_H__
+
+#include "scltypes.h"
+
+#include <Evas.h>
+
+namespace scl
+{
+
+ inline Evas_Object* NATIVE_WINDOW_CAST(sclwindow window) {
+ return static_cast<Evas_Object*>(window);
+ }
+ inline sclwindow SCL_WINDOW_CAST(Evas_Object *window) {
+ return static_cast<sclwindow>(window);
+ }
+
+}
+
+#endif //__SCL_CAST_EFL_H__
--- /dev/null
+/*
+ * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SCL_CAST_H__
+#define __SCL_CAST_H__
+
+#include "sclcast-efl.h"
+
+#endif //__SCL_CAST_H__
--- /dev/null
+/*
+ * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "sclcommon.h"
+
+using namespace scl;
+
--- /dev/null
+/*
+ * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SCL_COMMON_H__
+#define __SCL_COMMON_H__
+
+#include "scltypes.h"
+#include "sclcast.h"
+
+//SCL_BEGIN_DECLS
+
+namespace scl
+{
+
+
+}
+
+//SCL_END_DECLS
+
+#endif //__SCL_COMMON_H__
--- /dev/null
+/*
+ * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SCL_TYPES_H__
+#define __SCL_TYPES_H__
+
+namespace scl
+{
+
+#define SCL_BEGIN_DECLS extern "C" {
+#define SCL_END_DECLS }
+
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
+#ifndef NOT_USED
+#define NOT_USED -1
+#endif
+
+#ifndef USED
+#define USED 1
+#endif
+
+typedef signed char scl8;
+typedef signed short scl16;
+typedef signed int scl32;
+
+typedef unsigned char sclu8;
+typedef unsigned short sclu16;
+typedef unsigned int sclu32;
+
+typedef char sclchar;
+typedef short sclshort;
+typedef long scllong;
+typedef int sclint;
+typedef char sclboolean;
+
+typedef unsigned char sclbyte;
+typedef unsigned char scluchar;
+typedef unsigned short sclushort;
+typedef unsigned long sclulong;
+typedef unsigned int scluint;
+
+typedef float sclfloat;
+typedef double scldouble;
+
+/* sclwindow should be a struct - containing a flag whether it is a virtual window or not*/
+#define SCLWINDOW_INVALID 0
+#define SCLWINDOW_VIRTUAL_DIM -1
+#define SCLWINDOW_VIRTUAL_MAGNIFIER -2
+
+typedef enum {
+ SCL_EVENT_PASS_ON, /* This event needs further handling of default SCL event handler */
+ SCL_EVENT_DONE, /* We're done with this event, do not call any other default SCL event handlers */
+} SCLEventReturnType;
+/*
+typedef struct _SclWindow {
+ operator =(void *ptr) {is = false}
+ sclboolean isVirtual;
+ void* ptr;
+} SclWindow;*/
+
+typedef void* sclwindow;
+typedef void* sclimage;
+typedef void* sclfont;
+typedef void* scldrawctx;
+typedef sclint scltouchdevice;
+#define SCLTOUCHDEVICE_INVALID -1
+
+typedef struct {
+ sclint x, y;
+} SclPoint;
+
+typedef struct {
+ sclint width, height;
+} SclSize;
+
+typedef struct {
+ sclint left, top, right, bottom;
+} SclRect;
+
+typedef struct {
+ sclint x, y, width, height;
+} SclRectangle;
+
+typedef struct {
+ sclbyte r, g, b, a;
+} SclColor;
+
+#define SCL_MAKEWORD(low, high) ((sclu16)(((sclu8)(low)) | ((sclu16)((sclu8)(high))) << 8))
+#define SCL_MAKELONG(low, high) ((sclu32)(((sclu16)(low)) | ((sclu32)((sclu16)(high))) << 16))
+#define SCL_LOWORD(i32) ((sclu16)((i32) & 0xFFFF))
+#define SCL_HIWORD(i32) ((sclu16)(((sclu32)(i32) >> 16) & 0xFFFF))
+#define SCL_LOBYTE(i16) ((sclu8)((i16) & 0xFF))
+#define SCL_HIBYTE(i16) ((sclu8)(((sclu16)(i16) >> 8) & 0xFF))
+
+/* Checks if the given character is in between '!'(0x21) and '~'(0x7e) range */
+#define SCL_ISCHAR(ch) ((ch) >= '!' && (ch) <= '~')
+
+}
+
+#endif //__SCL_TYPES_H__