[Multisense UI] AUI Module moved out from EDJE package.
authorGovindaraju SM <govi.sm@samsung.com>
Tue, 28 Sep 2010 10:34:55 +0000 (16:04 +0530)
committerGovindaraju SM <govi.sm@samsung.com>
Tue, 28 Sep 2010 10:34:55 +0000 (16:04 +0530)
14 files changed:
configure.ac
debian/control
debian/libedje.install
src/Makefile.am
src/lib/Edje.h
src/lib/Makefile.am
src/lib/edje_multisense_ui.c
src/lib/edje_private.h
src/lib/edje_program.c
src/modules/Makefile.am [deleted file]
src/modules/slp_sound_haptic/Makefile.am [deleted file]
src/modules/slp_sound_haptic/haptic.h [deleted file]
src/modules/slp_sound_haptic/sound.h [deleted file]
src/modules/slp_sound_haptic/sound_haptic.c [deleted file]

index f015f66..9c4a9be 100644 (file)
@@ -262,8 +262,6 @@ PKG_CHECK_MODULES([EDJE],
     ecore >= 1.0.0
     ecore-file >= 1.0.0
     embryo >= 1.0.0
-    mm-sound >= 1.0
-    vconf >= 0.2.12
    ])
 
 EDJE_LIBS="${EDJE_LIBS} ${LUA_LIBS} ${lua_libs}"
@@ -361,8 +359,6 @@ doc/edje.dox
 src/Makefile
 src/lib/Makefile
 src/bin/Makefile
-src/modules/Makefile
-src/modules/slp_sound_haptic/Makefile
 utils/Makefile
 ])
 
index cd059c9..52b67be 100644 (file)
@@ -5,14 +5,14 @@ Maintainer: Jaehwan Kim <jae.hwan.kim@samsung.com>, Jihoon Kim <jihoon48.kim@sam
 Original-Maintainer: Debian Pkg-e Team <pkg-e-devel@lists.alioth.debian.org>
 Uploaders: Albin Tonnerre <albin.tonnerre@gmail.com>
  Xavier Oswald <x.oswald@free.fr>, Jan Lübbe <jluebbe@debian.org>
-Build-Depends: debhelper (>= 6), cdbs, libeet-dev, libevas-dev, libecore-dev (>= 0.9.9.060+svn20100304), libembryo-dev, libeina-dev (>= 0.0.2.060+svn20100304), liblua5.1-0-dev, doxygen, pkg-config, libtool, libmm-sound-dev
+Build-Depends: debhelper (>= 6), cdbs, libeet-dev, libevas-dev, libecore-dev (>= 0.9.9.060+svn20100304), libembryo-dev, libeina-dev (>= 0.0.2.060+svn20100304), liblua5.1-0-dev, doxygen, pkg-config, libtool
 Standards-Version: 3.8.1
 Homepage: http://enlightenment.org
 
 Package: libedje-bin
 Architecture: any
 Section: devel
-Depends: ${misc:Depends}, ${shlibs:Depends}, libembryo-bin (>= 0.9.9.060+svn20100304), libevas-engines, libmpfr-0 [i386], libgmp-0 [i386], libecore-file, libecore-con, libevas, libecore-imf, libecore-evas, libecore, libfontconfig1, libeina, libxcb1, libmm-sound-0
+Depends: ${misc:Depends}, ${shlibs:Depends}, libembryo-bin (>= 0.9.9.060+svn20100304), libevas-engines, libmpfr-0 [i386], libgmp-0 [i386], libecore-file, libecore-con, libevas, libecore-imf, libecore-evas, libecore, libfontconfig1, libeina, libxcb1
 Description: Various binaries for use with libedje
  Edje is a graphical layout and animation library for animated resizable,
  compressed and scalable themes. It is the theming engine behind
@@ -25,7 +25,7 @@ Description: Various binaries for use with libedje
 
 Package: libedje
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, liblua5.1-0, libmpfr-0 [i386], libgmp-0 [i386], libmm-sound-0
+Depends: ${misc:Depends}, ${shlibs:Depends}, liblua5.1-0, libmpfr-0 [i386], libgmp-0 [i386]
 Suggests: libedje-bin (= ${binary:Version})
 Description: Graphical layout and animation library
  Edje is a graphical layout and animation library for animated resizable,
@@ -47,7 +47,7 @@ Description: libedje0 development documentation
 Package: libedje-dev
 Architecture: any
 Section: libdevel
-Depends: ${misc:Depends}, libedje (= ${binary:Version}), libeet-dev, libembryo-dev, libevas-dev (>= 0.9.9.060+svn20100304), libecore-dev (>= 0.9.9.060+svn20100304), libeina-dev (>= 0.0.2.060+svn20100304), pkg-config, libedje-bin, liblua5.1-0-dev, libmm-sound-dev
+Depends: ${misc:Depends}, libedje (= ${binary:Version}), libeet-dev, libembryo-dev, libevas-dev (>= 0.9.9.060+svn20100304), libecore-dev (>= 0.9.9.060+svn20100304), libeina-dev (>= 0.0.2.060+svn20100304), pkg-config, libedje-bin, liblua5.1-0-dev
 Description: libedje headers and static libraries
  Edje is a graphical layout and animation library for animated resizable,
  compressed and scalable themes. It is the theming engine behind
index adfa4ab..87cc3b7 100644 (file)
@@ -1,2 +1 @@
 debian/tmp/usr/lib/libedje.so.*
-debian/tmp/usr/lib/edje/modules/*
index 584182e..6e2eb6d 100644 (file)
@@ -1,3 +1,3 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = lib bin modules 
+SUBDIRS = lib bin 
index d8f304e..b58c359 100644 (file)
@@ -371,6 +371,39 @@ typedef struct _Edje_External_Param_Info Edje_External_Param_Info;
 
 #define EDJE_EXTERNAL_PARAM_INFO_SENTINEL {NULL, 0, {.s = {NULL, NULL, NULL}}}
 
+typedef struct _Edje_Sound_Info                      Edje_Sound_Info;
+typedef struct _Edje_Sound_Data                      Edje_Sound_Data;
+typedef struct _Edje_Haptic_Info                     Edje_Haptic_Info;
+
+struct _Edje_Sound_Info
+{
+   char *name; /* the name of the sound */
+   unsigned int start_point;
+   unsigned int end_point;
+   int   id; /* the id no. of the sound */
+};
+
+struct _Edje_Sound_Data
+{
+   void *sound_data ;
+   int  sound_size ;
+} ;
+
+struct _Edje_Haptic_Info
+{
+   char *name ;
+   int magnitude ;
+   int duration ;
+   int attack_time ;
+   int attack_level ;
+   int fade_level ;
+   int fade_time ;
+   int type ;
+   char* pattern ;
+   int id;
+};
+
+
 /**
  * @struct _Edje_External_Type information about an external type to be used.
  *
index 0aba23b..665c17d 100644 (file)
@@ -16,7 +16,7 @@ AM_CPPFLAGS = \
 
 lib_LTLIBRARIES = libedje.la
 
-includes_HEADERS = Edje.h Edje_Edit.h
+includes_HEADERS = Edje.h Edje_Edit.h Edje_Multisense_Ui_Module.h
 includesdir = $(includedir)/edje-@VMAJ@
 
 base_sources = \
index 86919a2..4c28b9f 100644 (file)
@@ -1,7 +1,9 @@
+#include <string.h>
 #include <Edje.h>
 #include "edje_private.h"
-#include <string.h>
 
+#define EMS_SOUND_PLAY_PLUGIN_API  "ems_ui_sound_play"
+#define EMS_HAPTIC_PLAY_PLUGIN_API "ems_ui_haptic_play"
 
 static Eina_Bool ems_ui_module_loaded = EINA_FALSE;
 
@@ -11,17 +13,17 @@ static Eina_Bool (*ems_ui_haptic_play) (Edje_Haptic_Info* , unsigned int ) = NUL
 Eina_Bool edje_multisense_ui_init()
 {
    if (!ems_ui_module_loaded )
-     {
-        char  *ems_ui_module_name = NULL ;
+   {
+    char  *ems_ui_module_name = NULL ;
        Eina_Module *m = NULL;
        ems_ui_module_name = getenv("EDJE_MULTISENSE_UI_MODULE");
        if(!ems_ui_module_name)return EINA_FALSE;
        m = edje_module_load(ems_ui_module_name);
        if(!m)return EINA_FALSE ;
-       ems_ui_sound_play = eina_module_symbol_get(m, "ems_ui_sound_play");
-       ems_ui_haptic_play = eina_module_symbol_get(m, "ems_ui_haptic_play");
+       ems_ui_sound_play = eina_module_symbol_get(m, EMS_SOUND_PLAY_PLUGIN_API);
+       ems_ui_haptic_play = eina_module_symbol_get(m, EMS_HAPTIC_PLAY_PLUGIN_API);
        ems_ui_module_loaded =  EINA_TRUE;
-     }
+    }
 
    return ems_ui_module_loaded;
 }
index 1190aea..e0422c4 100644 (file)
@@ -228,9 +228,6 @@ typedef struct _Edje_Image_Directory_Entry           Edje_Image_Directory_Entry;
 typedef struct _Edje_Image_Directory_Set             Edje_Image_Directory_Set;
 typedef struct _Edje_Image_Directory_Set_Entry       Edje_Image_Directory_Set_Entry;
 typedef struct _Edje_Sound_Directory                 Edje_Sound_Directory;
-typedef struct _Edje_Sound_Info                      Edje_Sound_Info;
-typedef struct _Edje_Sound_Data                      Edje_Sound_Data;
-typedef struct _Edje_Haptic_Info                     Edje_Haptic_Info;
 typedef struct _Edje_Program                         Edje_Program;
 typedef struct _Edje_Program_Target                  Edje_Program_Target;
 typedef struct _Edje_Program_After                   Edje_Program_After;
@@ -455,33 +452,6 @@ struct _Edje_Sound_Directory
    Eina_List *entries; /* a list of Edje_Sound_Directory_Entry */
 };
 
-struct _Edje_Sound_Info
-{
-   char *name; /* the name of the sound */
-   unsigned int start_point;
-   unsigned int end_point;
-   int   id; /* the id no. of the sound */
-};
-struct _Edje_Sound_Data
-{
-   void *sound_data ;
-   int  sound_size ;
-} ; 
-struct _Edje_Haptic_Info
-{
-   char *name ;
-   int magnitude ;
-   int duration ;
-   int attack_time ;
-   int attack_level ;
-   int fade_level ;
-   int fade_time ;
-   int type ;
-   char* pattern ;
-   int id;
-};
-
-
 /*----------*/
 
 struct _Edje_Program /* a conditional program to be run */
index efd2e6c..50cfb29 100644 (file)
@@ -27,6 +27,8 @@ void *alloca (size_t);
 
 #include "edje_private.h"
 
+extern Eina_Bool edje_multisense_ui_init();
+
 static void _edje_emit_cb(Edje *ed, const char *sig, const char *src);
 static void _edje_param_copy(Edje_Real_Part *src_part, const char *src_param, Edje_Real_Part *dst_part, const char *dst_param);
 static void _edje_param_set(Edje_Real_Part *part, const char *param, const char *value);
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
deleted file mode 100755 (executable)
index 58babf8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = slp_sound_haptic
diff --git a/src/modules/slp_sound_haptic/Makefile.am b/src/modules/slp_sound_haptic/Makefile.am
deleted file mode 100755 (executable)
index 202c2ba..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-\r
-MAINTAINERCLEANFILES = Makefile.in\r
-\r
-AM_CPPFLAGS = \\r
--I. \\r
--I$(top_builddir) \\r
--I$(top_srcdir) \\r
--I$(top_srcdir)/src/lib \\r
--I$(top_builddir)/src/lib \\r
--DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \\r
--DPACKAGE_LIB_DIR=\"$(libdir)\" \\r
-`pkg-config --cflags mm-sound mm-player vconf devman devman_haptic` \\r
-@EVIL_CFLAGS@ \\r
-@EDJE_CFLAGS@ \\r
-@EFL_EDJE_BUILD@\r
-\r
-\r
-pkgdir = $(libdir)/edje/modules/slp_sound_haptic/$(MODULE_ARCH)\r
-pkg_LTLIBRARIES = module.la\r
-\r
-module_la_SOURCES = sound_haptic.c\r
-module_la_LIBADD = $(top_builddir)/src/lib/libedje.la\r
-module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version `pkg-config --libs mm-sound mm-player vconf devman devman_haptic` \r
-module_la_LIBTOOLFLAGS = --tag=disable-static\r
diff --git a/src/modules/slp_sound_haptic/haptic.h b/src/modules/slp_sound_haptic/haptic.h
deleted file mode 100755 (executable)
index ee1521a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _EDJE_HAPTIC_H
-#define _EDJE_HAPTIC_H
-#include <Edje.h>
-#include "edje_private.h"
-
-EAPI Eina_Bool ems_ui_haptic_play(Edje_Haptic_Info *haptic, unsigned int iterations);
-#endif 
diff --git a/src/modules/slp_sound_haptic/sound.h b/src/modules/slp_sound_haptic/sound.h
deleted file mode 100755 (executable)
index 5f2b080..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _EDJE_SOUND_H
-#define _EDJE_SOUND_H
-
-#include<mmf/mm_sound.h>
-#include<vconf.h>
-#include<mmf/mm_sound_private.h>
-#include <Edje.h>
-#include "edje_private.h"
-#include <unistd.h>
-#include <sys/stat.h>
-
-
-
-EAPI Eina_Bool ems_ui_sound_play(Edje_Sound_Info* sinfo, Edje_Sound_Data* sdata, unsigned int it);
-
-#endif 
diff --git a/src/modules/slp_sound_haptic/sound_haptic.c b/src/modules/slp_sound_haptic/sound_haptic.c
deleted file mode 100755 (executable)
index 55e8717..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#include"sound.h"\r
-#include"haptic.h"\r
-\r
-int dev_handle = -1 ;\r
-Eina_Bool aui_haptic_play(char* filename,int iteration)\r
-{\r
-   int ret_val=0 ;\r
-   int mode=0;\r
-   if(dev_handle!=-1)device_haptic_close(dev_handle) ;\r
-   dev_handle= device_haptic_open(1,mode);\r
-   if(dev_handle < 0)return EINA_FALSE ;\r
-   ret_val = device_haptic_play_file(dev_handle,filename,iteration,3);\r
-   if(ret_val<0)\r
-     return EINA_FALSE ;\r
-   return EINA_TRUE ;\r
-}      \r
-                               \r
-EAPI Eina_Bool ems_ui_sound_play(Edje_Sound_Info* sinfo, Edje_Sound_Data* sdata, unsigned int it)\r
-  {    \r
-     int volume_level = 0 ;\r
-     int sound_profile;\r
-     FILE *f ;\r
-     char buf[256] ;\r
-     struct stat st;     \r
-     /*Checking for silent profile */\r
-     if(vconf_get_int(VCONFKEY_SETAPPL_CUR_PROFILE_INT,&sound_profile ) ) ;\r
-     if( sound_profile==1 )return EINA_FALSE; \r
-     if( vconf_get_int(VCONFKEY_SETAPPL_PROFILE_NORMAL_CALL_VOLUME_INT,&volume_level)==-1)return EINA_FALSE ;\r
-     if( sinfo==NULL )return EINA_FALSE ;\r
-     snprintf(buf,sizeof(buf),"/tmp/%s",sinfo->name) ;\r
-     /* Sound File already present in the /tmp directory */\r
-     if (stat(buf,&st) == 0)\r
-       goto PLAY ;\r
-     f = fopen(buf,"wb") ;\r
-     if (f != NULL)\r
-       {  \r
-           if (fwrite(sdata->sound_data, sdata->sound_size, 1, f) != 1)\r
-            return EINA_FALSE ;\r
-          fclose(f);\r
-       }  \r
-     else \r
-       return EINA_FALSE ;\r
-    PLAY:\r
-       mm_sound_play_keysound(buf,volume_level)  ;\r
-     return EINA_TRUE ;\r
-   }\r
-int HexToDec(const char* strHex)\r
-{      \r
-   int nFactor = 1;\r
-   int nRetVal = 0;\r
-   char* p;\r
-   for(p = strHex + strlen(strHex); p >= strHex; --p)\r
-     {\r
-        if( p[0] == ' ' || p[0] == 0) continue ;               \r
-               if(p[0] < 'A') nRetVal += nFactor * (p[0] - '0');\r
-       else if(p[0] < 'a') nRetVal += nFactor * (p[0] - 'A' + 10);                                                                                     \r
-       else nRetVal += nFactor * (p[0] - 'a' + 10);                                                                                            \r
-       nFactor *= 16;                  \r
-     }\r
-          \r
-   return nRetVal;\r
-}\r
-\r
-EAPI Eina_Bool ems_ui_haptic_play(Edje_Haptic_Info *haptic, unsigned int iterations)\r
-   {\r
-       char *pattern =NULL ;\r
-       pattern=(char*)malloc(strlen(haptic->pattern)) ;\r
-        char *t = NULL;\r
-        strcpy(pattern, haptic->pattern);\r
-       char *s =pattern ;\r
-        int a = 0;\r
-       char buf[256] ;\r
-       char test[3] ;\r
-       test[2]=0 ;\r
-       int i=0 ;\r
-\r
-       int counter = 0;\r
-       char data ;\r
-       snprintf(buf,sizeof(buf),"/tmp/%s.ivt",haptic->name) ;\r
-       FILE *f=fopen(buf,"w") ;\r
-       \r
-        while (*s != '\0')\r
-       {\r
-           if (*s == ',')\r
-            counter++;\r
-          s++;\r
-       }\r
-       \r
-        while (a <= counter)\r
-             {\r
-                test[0]= pattern[i] ;\r
-                test[1]=pattern[i+1] ;\r
-                i = i + 3 ;\r
-                data=HexToDec(test) ;\r
-                fputc(data,f) ;\r
-                a++ ;\r
-             }\r
-            \r
-            fclose(f) ;\r
-            if(aui_haptic_play(buf,iterations)==EINA_TRUE) ;\r
-            return EINA_TRUE    ;\r
-   }\r