Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : apps/elicit

Dir     : e17/apps/elicit/src


Modified Files:
        Elicit.h Makefile.am callbacks.c conf.c config.h.in elicit.c 
        util.c util.h 


Log Message:

compiles now.
cleanup some compiler warnings.
set ecore args.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/Elicit.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- Elicit.h    6 Feb 2004 19:13:32 -0000       1.3
+++ Elicit.h    7 Feb 2004 20:27:27 -0000       1.4
@@ -13,9 +13,10 @@
 #include <stdio.h>
 #include <limits.h>
 #include <sys/stat.h>
+#include <fnmatch.h>
 
 #include "config.h"
-#define DATADIR PACKAGE_DATA_DIR"/data"
+#define DATADIR PACKAGE_DATA_DIR
 
 typedef struct _Elicit Elicit;
 
@@ -51,6 +52,8 @@
   char *change_sig;
 };
 
+void elicit_ui_update_text(Elicit *el);
+void elicit_ui_theme_set(Elicit *el, char *name);
 
 #endif
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- Makefile.am 6 Feb 2004 19:13:32 -0000       1.2
+++ Makefile.am 7 Feb 2004 20:27:27 -0000       1.3
@@ -12,5 +12,5 @@
         conf.c conf.h
 
 elicit_LDADD = @edje_libs@ @ecore_libs@ @edb_libs@ @evas_libs@ \
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@ 
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/callbacks.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- callbacks.c 6 Feb 2004 07:22:14 -0000       1.2
+++ callbacks.c 7 Feb 2004 20:27:27 -0000       1.3
@@ -12,7 +12,7 @@
 void 
 elicit_cb_resize(Ecore_Evas *ee)
 {
-  int x,y,w, h;
+  int w, h;
   double sw, sh;
   Evas_Object *gui, *shot;
 
@@ -45,7 +45,7 @@
   {
     if (el->flags.picking == 1)
     {
-      elicit_action_color_get(&(el->color.r), &(el->color.g), &(el->color.b));
+      elicit_util_color_get(&(el->color.r), &(el->color.g), &(el->color.b));
       evas_object_color_set(el->swatch, el->color.r, el->color.g, el->color.b, 255);
       elicit_color_rgb_to_hsv(el->color.r, el->color.g, el->color.b,
                               &(el->color.h), &(el->color.s), &(el->color.v));
@@ -74,12 +74,12 @@
     if (el->flags.shooting == 1)
     {
       double sw, sh;
-      double x, y, w, h;
+      double w, h;
 
       evas_object_geometry_get(el->shot, NULL, NULL, &sw, &sh);
       w = sw * (1 / el->zoom);
       h = sh * (1 / el->zoom);
-      elicit_action_shoot(el->shot, (int)w, (int)h);
+      elicit_util_shoot(el->shot, (int)w, (int)h);
     }
   }
 }
@@ -108,7 +108,6 @@
   static double start = 0.0;
   double duration = 2.0;
   double r, d, dir;
-  int w;
 
   /* we're done */
   if (!el->flags.changing)
@@ -219,13 +218,9 @@
 
   el->flags.changed = 1;
   
-  /* if changing, keep on calling it */
-  if (el->flags.changing)
-  {
-   /* we want the time to wait to depend on how far along it is... */
-   el->change_timer = ecore_timer_add(.16 - .15*r, elicit_timer_color, el);
-   return 0; 
-  }
+  /* we want the time to wait to depend on how far along it is... */
+  el->change_timer = ecore_timer_add(.16 - .15*r, elicit_timer_color, el);
 
+  return 0;
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/conf.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- conf.c      7 Feb 2004 19:54:56 -0000       1.1
+++ conf.c      7 Feb 2004 20:27:27 -0000       1.2
@@ -9,6 +9,7 @@
 
   elicit_config_load(el);
   ecore_config_listen("theme", "/settings/theme", elicit_config_listener, 0, el);
+  return 1;
 }
 
 void
@@ -42,7 +43,7 @@
 void
 elicit_config_shutdown()
 {
-  elicit_config_save(el);
+  elicit_config_save();
   ecore_config_exit();
 }
 
@@ -51,7 +52,6 @@
 {
   char *theme = ecore_config_get_string("/settings/theme");
 
-  printf("theme: %s\n", theme);
   return theme ? theme : "winter";
 }
 
@@ -71,8 +71,8 @@
 void
 elicit_config_size_set(int w, int h)
 {
-  ecore_config_set_int("/window/w");
-  ecore_config_set_int("/window/h");
+  ecore_config_set_int("/window/w", w);
+  ecore_config_set_int("/window/h", h);
 }
 
 void
@@ -86,9 +86,9 @@
 void
 elicit_config_color_set(int r, int g, int b)
 {
-  ecore_config_set_int("/color/r");
-  ecore_config_set_int("/color/g");
-  ecore_config_set_int("/color/b");
+  ecore_config_set_int("/color/r", r);
+  ecore_config_set_int("/color/g", g);
+  ecore_config_set_int("/color/b", b);
 }
 
 static int
@@ -99,7 +99,10 @@
   {
     case ELICIT_CONF_TAG_THEME:
       if (el->gui)
+      {
         elicit_ui_theme_set(el, ecore_config_get_string(key));
+      }
       break;
   }
+  return 1;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/config.h.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- config.h.in 6 Feb 2004 19:13:32 -0000       1.2
+++ config.h.in 7 Feb 2004 20:27:27 -0000       1.3
@@ -1,76 +1,56 @@
-/* src/config.h.in.  Generated from configure.in by autoheader.  */
+/* src/config.h.in.  Generated automatically from configure.in by autoheader.  */
 
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
+/* Define to empty if the keyword does not work.  */
+#undef const
 
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
+/* Define if you have the <dlfcn.h> header file.  */
+#undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+/* Name of package */
+#undef PACKAGE
 
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Version number of package */
+#undef VERSION
 
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+/* Define if using the dmalloc debugging malloc package */
+#undef WITH_DMALLOC
 
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Locale-specific data directory */
+#undef PACKAGE_LOCALE_DIR
 
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
+/* Locale-specific data directory */
+#undef PACKAGE_LOCALE_DIR
 
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
+/* Shared data directory */
+#undef PACKAGE_DATA_DIR
 
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
+/* Shared data directory */
+#undef PACKAGE_DATA_DIR
 
-/* Name of package */
-#undef PACKAGE
+/* Shared data directory */
+#undef PACKAGE_DATA_DIR
 
 /* Installation directory for user executables */
 #undef PACKAGE_BIN_DIR
 
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
+/* Installation directory for user executables */
+#undef PACKAGE_BIN_DIR
 
-/* Shared data directory */
-#undef PACKAGE_DATA_DIR
+/* Installation directory for user executables */
+#undef PACKAGE_BIN_DIR
 
 /* Installation directory for libraries */
 #undef PACKAGE_LIB_DIR
 
-/* Locale-specific data directory */
-#undef PACKAGE_LOCALE_DIR
+/* Installation directory for libraries */
+#undef PACKAGE_LIB_DIR
 
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
+/* Installation directory for libraries */
+#undef PACKAGE_LIB_DIR
 
 /* Source code directory */
 #undef PACKAGE_SOURCE_DIR
 
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if using the dmalloc debugging malloc package */
-#undef WITH_DMALLOC
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/elicit.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- elicit.c    6 Feb 2004 19:13:32 -0000       1.5
+++ elicit.c    7 Feb 2004 20:27:27 -0000       1.6
@@ -5,9 +5,6 @@
 int setup(int argc, char **argv, Elicit *el);
 void pick_color();
 void shoot();
-void elicit_ui_update_text(Elicit *el);
-void elicit_ui_theme_set(Elicit *el, char *name);
-int timer_color(void *data);
 
 /* variables */
 
@@ -22,6 +19,7 @@
     printf("ERROR: can't initialize Ecore.\n");
     return 1;
   }
+  ecore_app_args_set(argc, (const char **)argv);
   
   if (!ecore_evas_init())
   {
@@ -88,9 +86,6 @@
 int
 setup(int argc, char **argv, Elicit *el)
 {
-  Evas_Object *o;
-  double mw, mh;
-
   elicit_config_init(el);
 
   ecore_evas_borderless_set(el->ee, 1);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/util.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- util.c      6 Feb 2004 19:13:32 -0000       1.3
+++ util.c      7 Feb 2004 20:27:27 -0000       1.4
@@ -4,17 +4,16 @@
 #include "util.h"
 
 void
-elicit_action_color_get(int *r, int *g, int *b)
+elicit_util_color_get(int *r, int *g, int *b)
 {
   Imlib_Image *im;
   Imlib_Color col;
-  int red, green, blue;
-  int h, s, v;
   int x, y;
   int tr;
+  Window dummy;
 
   /* where are we pointing? */
-  XQueryPointer(ecore_x_display_get(), RootWindow(ecore_x_display_get(),0), &tr, &tr, 
&tr, &tr, &x, &y, &tr);
+  XQueryPointer(ecore_x_display_get(), RootWindow(ecore_x_display_get(),0), &dummy, 
&dummy, &tr, &tr, &x, &y, &tr);
 
   /* setup the imlib context */
   imlib_context_set_display(ecore_x_display_get());
@@ -45,7 +44,7 @@
 }
 
 void
-elicit_action_shoot(Evas_Object *shot, int w, int h)
+elicit_util_shoot(Evas_Object *shot, int w, int h)
 {
   Imlib_Image *im;
   int x, y;
@@ -53,8 +52,9 @@
   int dw, dh;
   int tr;
   double sw, sh;
+  Window dummy;
 
-  XQueryPointer(ecore_x_display_get(), RootWindow(ecore_x_display_get(),0), &tr, &tr, 
&tr, &tr, &px, &py, &tr);
+  XQueryPointer(ecore_x_display_get(), RootWindow(ecore_x_display_get(),0), &dummy, 
&dummy, &tr, &tr, &px, &py, &tr);
 
   x = px - .5 * w;
   y = py - .5 * h;
@@ -101,7 +101,7 @@
    int r, g, b;
    int f;
    float i,j,k,max,min,d;
-   float h, s, v;
+   float h = 0, s = 0, v = 0;
 
    r = rr;
    g = gg;
@@ -150,7 +150,7 @@
 {
    int i,p,q,t;
    float vs,vsf;
-   int r, g, b;
+   int r = 0, g = 0, b = 0;
    float h, s, v;
 
    h = hh;
@@ -212,14 +212,14 @@
 char * 
 elicit_color_rgb_to_hex(int rr, int gg, int bb)
 {
-  char buf[8];
+  char buf[10];
 
-  sprintf(buf, "#%.2x%.2x%.2x\0", rr, gg, bb);
+  snprintf(buf, 10, "#%.2x%.2x%.2x", rr, gg, bb);
   return (char *)strdup(buf);
 }
 
 int
-elicit_glob_match(char *str, char *glob)
+elicit_glob_match(const char *str, const char *glob)
 {
    if (!strcmp(glob, "*")) return 1;
    if (!fnmatch(glob, str, 0)) return 1;
@@ -240,6 +240,5 @@
     return eet;
 
   snprintf(eet, sizeof(eet), DATADIR"/themes/%s.eet", name);
-
   return stat(eet, &st) ? NULL : eet;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/elicit/src/util.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- util.h      6 Feb 2004 06:32:58 -0000       1.1
+++ util.h      7 Feb 2004 20:27:27 -0000       1.2
@@ -4,9 +4,11 @@
 void elicit_color_rgb_to_hsv(int rr, int gg, int bb, double *hh, double *ss, double 
*vv);
 void elicit_color_hsv_to_rgb(double hh, double ss, double vv, int *rr, int *gg, int 
*bb);
 char * elicit_color_rgb_to_hex(int rr, int gg, int bb);
-int elicit_glob_match(char *str, char *glob);
+int elicit_glob_match(const char *str, const char *glob);
 
 void elicit_util_color_get(int *r, int *g, int *b);
 void elicit_util_shoot(Evas_Object *shot, int w, int h);
 
+char *elicit_theme_find(const char *name);
+
 #endif




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to