Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        sound.c text.c 


Log Message:
Font and sound module bits.

===================================================================
RCS file: /cvs/e/e16/e/src/sound.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- sound.c     23 Aug 2007 18:48:21 -0000      1.56
+++ sound.c     4 Sep 2007 21:15:21 -0000       1.57
@@ -44,8 +44,12 @@
 
 static Ecore_List  *sound_list = NULL;
 
+#if USE_MODULES
+static const SoundOps *ops = NULL;
+#else
 extern const SoundOps SoundOps_esd;
 static const SoundOps *ops = &SoundOps_esd;
+#endif
 
 static void
 _SclassSampleDestroy(void *data, void *user_data __UNUSED__)
@@ -175,6 +179,10 @@
       return;
 
    err = -1;
+#if USE_MODULES
+   if (!ops)
+      ops = ModLoadSym("sound", "SoundOps", "esd");
+#endif
    if (ops && ops->Init)
       err = ops->Init();
 
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -3 -r1.92 -r1.93
--- text.c      28 Aug 2007 17:58:23 -0000      1.92
+++ text.c      4 Sep 2007 21:15:21 -0000       1.93
@@ -657,6 +657,12 @@
    char                checked;
 } FontHandler;
 
+#if USE_MODULES
+
+#define FONT(type, ops, opsm) { type, opsm, 0 }
+
+#else
+
 #define FONT(type, ops, opsm) { type, ops, 0 }
 
 #if FONT_TYPE_IFT
@@ -669,6 +675,8 @@
 extern const FontOps FontOps_pango;
 #endif
 
+#endif /* USE_MODULES */
+
 static FontHandler  fhs[] = {
 #if FONT_TYPE_XFONT
    FONT("xfont", &FontOpsXfont, &FontOpsXfont),        /* XFontStruct - 
XLoadQueryFont */
@@ -735,6 +743,17 @@
      {
        if (strcmp(fhp->type, type))
           continue;
+#if USE_MODULES
+       if (!fhp->ops)
+         {
+            if (fhp->checked)
+               goto fallback;
+            fhp->checked = 1;
+            fhp->ops = ModLoadSym("font", "FontOps", type);
+            if (!fhp->ops)
+               goto fallback;
+         }
+#endif
        ts->ops = fhp->ops;
        ts->ops->Load(ts, name);
        goto done;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to