Enlightenment CVS committal

Author  : fletch3k
Project : misc
Module  : enotes

Dir     : misc/enotes/src


Modified Files:
        indentem main.c main.h newentry.c notecmds.c notenum.c 


Log Message:
New Launch Bar Feature.  Which is configurable/themable from configuration and command 
line, i've made it extremely configurable to the point where its more than doubled my 
usage.

===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/indentem,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- indentem    23 Feb 2003 10:07:17 -0000      1.1
+++ indentem    26 Feb 2003 20:38:02 -0000      1.2
@@ -1,4 +1,5 @@
 #!/bin/bash
 
 indent *.c -i8
+indent *.h -i8
 rm *.*~ -rf
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- main.c      23 Feb 2003 10:07:17 -0000      1.13
+++ main.c      26 Feb 2003 20:38:02 -0000      1.14
@@ -48,6 +48,53 @@
 unsigned int font_size;
 unsigned int title_font_size;
 
+
+unsigned int win_x;
+unsigned int win_y;
+unsigned int win_width;
+unsigned int win_height;
+
+unsigned int firstbtn_x;
+unsigned int firstbtn_y;
+unsigned int firstbtn_width;
+unsigned int firstbtn_height;
+
+unsigned int lastbtn_x;
+unsigned int lastbtn_y;
+unsigned int lastbtn_width;
+unsigned int lastbtn_height;
+
+unsigned int nubtn_x;
+unsigned int nubtn_y;
+unsigned int nubtn_width;
+unsigned int nubtn_height;
+
+unsigned int newbtn_x;
+unsigned int newbtn_y;
+unsigned int newbtn_width;
+unsigned int newbtn_height;
+
+unsigned int exitbtn_x;
+unsigned int exitbtn_y;
+unsigned int exitbtn_width;
+unsigned int exitbtn_height;
+
+char *bgimg;
+char *firstbtnimg;
+char *lastbtnimg;
+char *newbtnimg;
+char *nubtnimg;
+char *exitbtnimg;
+
+E_Prog *bar;
+Evas_Object *bar_bg;
+Evas_Object *bar_firstbtn;
+Evas_Object *bar_lastbtn;
+Evas_Object *bar_nubtn;
+Evas_Object *bar_newbtn;
+Evas_Object *bar_exitbtn;
+
+
 E_Prog *root;
 Evas_Object *bg;
 Evas_Object *title;
@@ -88,7 +135,15 @@
        firstbtn = malloc (str_size);
        nubtn = malloc (str_size);
        newbtn = malloc (str_size);
+
        barimg = malloc (str_size);
+       bgimg = malloc (str_size);
+       firstbtnimg = malloc (str_size);
+       lastbtnimg = malloc (str_size);
+       firstbtnimg = malloc (str_size);
+       nubtnimg = malloc (str_size);
+       newbtnimg = malloc (str_size);
+       exitbtnimg = malloc (str_size);
 
        strcat (fontdir, ".");
        strcpy (fn, getenv ("HOME"));
@@ -112,6 +167,46 @@
        title_font_size = 16;
        font_size = 12;
 
+
+       win_x = 0;
+       win_y = 0;
+       win_width = 100;
+       win_height = 25;
+
+       firstbtn_x = 2;
+       firstbtn_y = 2;
+       firstbtn_width = 17;
+       firstbtn_height = 21;
+
+       lastbtn_x = 21;
+       lastbtn_y = 2;
+       lastbtn_width = 17;
+       lastbtn_height = 21;
+
+       nubtn_x = 40;
+       nubtn_y = 2;
+       nubtn_width = 17;
+       nubtn_height = 21;
+
+       newbtn_x = 59;
+       newbtn_y = 2;
+       newbtn_width = 17;
+       newbtn_height = 21;
+
+       exitbtn_x = 78;
+       exitbtn_y = 2;
+       exitbtn_width = 17;
+       exitbtn_height = 21;
+
+       strcpy (bgimg, "/usr/local/share/enotes/data/barbg.png");
+       strcpy (firstbtnimg,
+               "/usr/local/share/enotes/data/barfirstbtnimg.png");
+       strcpy (lastbtnimg, "/usr/local/share/enotes/data/barlastbtnimg.png");
+       strcpy (nubtnimg, "/usr/local/share/enotes/data/barnubtnimg.png");
+       strcpy (newbtnimg, "/usr/local/share/enotes/data/barnewbtnimg.png");
+       strcpy (exitbtnimg, "/usr/local/share/enotes/data/barexitbtnimg.png");
+
+
        eprog_init ();
 
        setconfig ();
@@ -141,7 +236,7 @@
                           || !strcmp (argv[a], "--titleimg"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -152,7 +247,7 @@
                           || !strcmp (argv[a], "--xbtnimg"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -164,7 +259,7 @@
                           || !strcmp (argv[a], "--config"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -200,7 +295,7 @@
                  else if (!strcmp (argv[a], "--lastbtn"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -210,7 +305,7 @@
                  else if (!strcmp (argv[a], "--firstbtn"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -220,7 +315,7 @@
                  else if (!strcmp (argv[a], "--nubtn"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -230,7 +325,7 @@
                  else if (!strcmp (argv[a], "--newbtn"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -241,7 +336,7 @@
                           || !strcmp (argv[a], "--barimg"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -252,7 +347,7 @@
                           || !strcmp (argv[a], "--fontsize"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
@@ -263,13 +358,340 @@
                           || !strcmp (argv[a], "--tsize"))
                    {
                            mtmp = argv[a + 1];
-                           if (mtmp == NULL || mtmp[0] == "-")
+                           if (mtmp == NULL || mtmp[0] == '-')
                              {
                                      printf ("Missing Argument!\n");
                                      return (0);
                              }
                            title_font_size = atoi (mtmp);
                    }
+                 else if (!strcmp (argv[a], "--barwin_x"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           win_x = atoi (mtmp);
+                   }
+                 else if (!strcmp (argv[a], "--barwin_y"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           win_y = atoi (mtmp);
+                   }
+                 else if (!strcmp (argv[a], "--barwin_width"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           win_width = atoi (mtmp);
+                   }
+                 else if (!strcmp (argv[a], "--barwin_height"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+
+                           win_height = atoi (mtmp);
+                   }
+                 else if (!strcmp (argv[a], "--barwin_bg"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+
+                           strcpy (bgimg, mtmp);
+                   }
+                 else if (!strcmp (argv[a], "--firstbtn_x"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           firstbtn_x = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--firstbtn_y"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           firstbtn_y = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--firstbtn_width"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           firstbtn_width = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--firstbtn_height"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           firstbtn_height = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--lastbtn_x"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           lastbtn_x = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--lastbtn_y"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           lastbtn_y = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--lastbtn_width"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           lastbtn_width = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--lastbtn_height"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           lastbtn_height = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--nubtn_x"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           nubtn_x = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--nubtn_y"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           nubtn_y = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--nubtn_width"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           nubtn_width = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--nubtn_height"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           nubtn_height = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--newbtn_x"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           newbtn_x = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--newbtn_y"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           newbtn_y = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--newbtn_width"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           newbtn_width = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--newbtn_height"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           newbtn_height = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--exitbtn_x"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           exitbtn_x = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--exitbtn_y"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           exitbtn_y = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--exitbtn_width"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           exitbtn_width = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--exitbtn_height"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           exitbtn_height = atoi (mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--firstbtn_img"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           strcpy (firstbtnimg, mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--lastbtn_img"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           strcpy (lastbtnimg, mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--nubtn_img"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           strcpy (nubtnimg, mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--newbtn_img"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           strcpy (newbtnimg, mtmp);
+
+                   }
+                 else if (!strcmp (argv[a], "--exitbtn_img"))
+                   {
+                           mtmp = argv[a + 1];
+                           if (mtmp == NULL || mtmp[0] == '-')
+                             {
+                                     printf ("Missing Argument!\n");
+                                     return (0);
+                             }
+                           strcpy (exitbtnimg, mtmp);
+
+                   }
                  else if (!strcmp (argv[a], "-u")
                           || !strcmp (argv[a], "--usage")
                           || !strcmp (argv[a], "-h")
@@ -333,6 +755,11 @@
                            count ();
                            actionbool = 1;
                    }
+                 else if (!strcmp (argv[a], "--bar"))
+                   {
+                           runbar ();
+                           actionbool = 1;
+                   }
                  a++;
          }
        a = 0;
@@ -377,7 +804,7 @@
 {
        char *tmp2 = malloc (str_size);
        int sectiontype = 0;
-       int donebool[13];
+       int donebool[43];
        if (file != NULL)
          {
                  fclose (file);
@@ -465,6 +892,36 @@
                            sectiontype = 19;
                            goto lp1;
                    }
+                 else if (!strncmp (tmp2, "[barwin]", 8))
+                   {
+                           sectiontype = 20;
+                           goto lp1;
+                   }
+                 else if (!strncmp (tmp2, "[barfirstbtn]", 13))
+                   {
+                           sectiontype = 25;
+                           goto lp1;
+                   }
+                 else if (!strncmp (tmp2, "[barlastbtn]", 12))
+                   {
+                           sectiontype = 30;
+                           goto lp1;
+                   }
+                 else if (!strncmp (tmp2, "[barnubtn]", 10))
+                   {
+                           sectiontype = 35;
+                           goto lp1;
+                   }
+                 else if (!strncmp (tmp2, "[barnewbtn]", 11))
+                   {
+                           sectiontype = 40;
+                           goto lp1;
+                   }
+                 else if (!strncmp (tmp2, "[barexitbtn]", 12))
+                   {
+                           sectiontype = 45;
+                           goto lp1;
+                   }
 
                  if (sectiontype == 1)
                    {
@@ -545,7 +1002,7 @@
                              {
                                      strncpy (openwinimg, tmp2,
                                               strlen (tmp2) - 1);
-                                     donebool[7] == 1;
+                                     donebool[7] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -556,7 +1013,7 @@
                              {
                                      strncpy (lastbtn, tmp2,
                                               strlen (tmp2) - 1);
-                                     donebool[8] == 1;
+                                     donebool[8] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -567,7 +1024,7 @@
                              {
                                      strncpy (firstbtn, tmp2,
                                               strlen (tmp2) - 1);
-                                     donebool[9] == 1;
+                                     donebool[9] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -578,7 +1035,7 @@
                              {
                                      strncpy (nubtn, tmp2,
                                               strlen (tmp2) - 1);
-                                     donebool[10] == 1;
+                                     donebool[10] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -589,7 +1046,7 @@
                              {
                                      strncpy (newbtn, tmp2,
                                               strlen (tmp2) - 1);
-                                     donebool[11] == 1;
+                                     donebool[11] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -599,7 +1056,7 @@
                            if (donebool[12] != 1)
                              {
                                      font_size = atoi (tmp2);
-                                     donebool[12] == 1;
+                                     donebool[12] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -609,7 +1066,313 @@
                            if (donebool[13] != 1)
                              {
                                      title_font_size = atoi (tmp2);
-                                     donebool[13] == 1;
+                                     donebool[13] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 20)
+                   {
+                           if (donebool[14] != 1)
+                             {
+                                     win_x = atoi (tmp2);
+                                     donebool[14] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 21)
+                   {
+                           if (donebool[15] != 1)
+                             {
+                                     win_y = atoi (tmp2);
+                                     donebool[15] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 22)
+                   {
+                           if (donebool[16] != 1)
+                             {
+                                     win_width = atoi (tmp2);
+                                     donebool[16] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 23)
+                   {
+                           if (donebool[17] != 1)
+                             {
+                                     win_height = atoi (tmp2);
+                                     donebool[17] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 24)
+                   {
+                           if (donebool[18] != 1)
+                             {
+                                     strncpy (bgimg, tmp2,
+                                              strlen (tmp2) - 1);
+                                     donebool[18] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 25)
+                   {
+                           if (donebool[19] != 1)
+                             {
+                                     firstbtn_x = atoi (tmp2);
+                                     donebool[19] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 26)
+                   {
+                           if (donebool[20] != 1)
+                             {
+                                     firstbtn_y = atoi (tmp2);
+                                     donebool[20] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 27)
+                   {
+                           if (donebool[21] != 1)
+                             {
+                                     firstbtn_width = atoi (tmp2);
+                                     donebool[21] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 28)
+                   {
+                           if (donebool[22] != 1)
+                             {
+                                     firstbtn_height = atoi (tmp2);
+                                     donebool[22] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 29)
+                   {
+                           if (donebool[23] != 1)
+                             {
+                                     strncpy (firstbtnimg, tmp2,
+                                              strlen (tmp2) - 1);
+                                     donebool[23] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 30)
+                   {
+                           if (donebool[24] != 1)
+                             {
+                                     lastbtn_x = atoi (tmp2);
+                                     donebool[24] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 31)
+                   {
+                           if (donebool[25] != 1)
+                             {
+                                     lastbtn_y = atoi (tmp2);
+                                     donebool[25] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 32)
+                   {
+                           if (donebool[26] != 1)
+                             {
+                                     lastbtn_width = atoi (tmp2);
+                                     donebool[26] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 33)
+                   {
+                           if (donebool[27] != 1)
+                             {
+                                     lastbtn_height = atoi (tmp2);
+                                     donebool[27] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 34)
+                   {
+                           if (donebool[28] != 1)
+                             {
+                                     strncpy (lastbtnimg, tmp2,
+                                              strlen (tmp2) - 1);
+                                     donebool[28] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 35)
+                   {
+                           if (donebool[29] != 1)
+                             {
+                                     nubtn_x = atoi (tmp2);
+                                     donebool[29] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 36)
+                   {
+                           if (donebool[30] != 1)
+                             {
+                                     nubtn_y = atoi (tmp2);
+                                     donebool[30] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 37)
+                   {
+                           if (donebool[31] != 1)
+                             {
+                                     nubtn_width = atoi (tmp2);
+                                     donebool[31] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 38)
+                   {
+                           if (donebool[32] != 1)
+                             {
+                                     nubtn_height = atoi (tmp2);
+                                     donebool[32] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 39)
+                   {
+                           if (donebool[33] != 1)
+                             {
+                                     strncpy (nubtnimg, tmp2,
+                                              strlen (tmp2) - 1);
+                                     donebool[33] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 40)
+                   {
+                           if (donebool[34] != 1)
+                             {
+                                     newbtn_x = atoi (tmp2);
+                                     donebool[34] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 41)
+                   {
+                           if (donebool[35] != 1)
+                             {
+                                     newbtn_y = atoi (tmp2);
+                                     donebool[35] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 42)
+                   {
+                           if (donebool[36] != 1)
+                             {
+                                     newbtn_width = atoi (tmp2);
+                                     donebool[36] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 43)
+                   {
+                           if (donebool[37] != 1)
+                             {
+                                     newbtn_height = atoi (tmp2);
+                                     donebool[37] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 44)
+                   {
+                           if (donebool[38] != 1)
+                             {
+                                     strncpy (newbtnimg, tmp2,
+                                              strlen (tmp2) - 1);
+                                     donebool[38] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 45)
+                   {
+                           if (donebool[39] != 1)
+                             {
+                                     exitbtn_x = atoi (tmp2);
+                                     donebool[39] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 46)
+                   {
+                           if (donebool[40] != 1)
+                             {
+                                     exitbtn_y = atoi (tmp2);
+                                     donebool[40] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 47)
+                   {
+                           if (donebool[41] != 1)
+                             {
+                                     exitbtn_width = atoi (tmp2);
+                                     donebool[41] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 48)
+                   {
+                           if (donebool[42] != 1)
+                             {
+                                     exitbtn_height = atoi (tmp2);
+                                     donebool[42] = 1;
+                             }
+                           sectiontype++;
+                           goto lp1;
+                   }
+                 else if (sectiontype == 49)
+                   {
+                           if (donebool[43] != 1)
+                             {
+                                     strncpy (exitbtnimg, tmp2,
+                                              strlen (tmp2) - 1);
+                                     donebool[43] = 1;
                              }
                            sectiontype++;
                            goto lp1;
@@ -619,6 +1382,5 @@
          }
        fclose (file);
        free (tmp2);
-       printf ("%d", strlen (bgfile));
        return;
 }
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- main.h      23 Feb 2003 10:07:17 -0000      1.16
+++ main.h      26 Feb 2003 20:38:04 -0000      1.17
@@ -45,7 +45,9 @@
 -a        --consolenew   Use console based note\n\
                          creation system.\n\n\
 -C        --count        Display Number of notes\n\
-                         stored.\n\n\
+                         stored.\n\
+          --bar          Display the E-Notes\n\
+                         Execution Bar.\n\n\
     Options:\n\
 POSIX     GNU            Description\n\
 -d <d>    --db <d>       Use <d> as the enotes\n\
@@ -73,6 +75,68 @@
 -S <s>    --fontsize <s> Use a different font size.\n\
 -T <s>    --tsize <s>    Use a different font size\n\
                          for the title.\n\n\
+    E-Notes Execution Bar - Options:\n\
+GNU                      Description\n\
+--barwin_x <n>           Use N as the X co-ordinate for\n\
+                         the E-Notes Bar window.\n\
+--barwin_y <n>           Use N as the Y co-ordinate for\n\
+                         the E-Notes Bar window.\n\
+--barwin_width <n>       Use N as the width for the\n\
+                         E-Notes Bar Window.\n\
+--barwin_height <n>      Use N as the height for the\n\
+                         E-Notes Bar Window.\n\
+--barwin_bg <i>          Use I as the background image\n\
+                         use on the E-Notes Bar Window.\n\n\
+--firstbtn_x <n>         Use N for the X co-ordinate on\n\
+                         the \"Display First Note\" button.\n\
+--firstbtn_y <n>         Use N for the Y co-ordinate on\n\
+                         the \"Display First Note\" button.\n\
+--lastbtn_x <n>          Use N for the X co-ordinate on\n\
+                         the \"Display Last Note\" button.\n\
+--lastbtn_y <n>          Use N for the Y co-ordinate on\n\
+                         the \"Display Last Note\" button.\n\
+--nubtn_x <n>            Use N for the X co-ordinate on\n\
+                         the \"Display Note Number\" button.\n\
+--nubtn_y <n>            Use N for the Y co-ordinate on\n\
+                         the \"Display Note Number\" button.\n\
+--newbtn_x <n>           Use N for the X co-ordinate on\n\
+                         the \"Append New Note\" button.\n\
+--newbtn_y <n>           Use N for the Y co-ordinate on\n\
+                         the \"Append New Note\" button.\n\
+--exitbtn_x <n>          Use N for the X co-ordinate on\n\
+                         the \"Exit E-Notes Bar\" button.\n\
+--exitbtn_y <n>          Use N for the X co-ordinate on\n\
+                         the \"Exit E-Notes Bar\" button.\n\n\
+--firstbtn_width <n>     Use N for the width of the\n\
+                         \"Display First Note\" button.\n\
+--firstbtn_height <n>    Use N for the height of the\n\
+                         \"Display First Note\" button.\n\
+--lastbtn_width <n>      Use N for the width of the\n\
+                         \"Display Last Note\" button.\n\
+--lastbtn_height <n>     Use N for the height of the\n\
+                         \"Display Last Note\" button.\n\
+--nubtn_width <n>        Use N for the width of the\n\
+                         \"Display Note Number\" button.\n\
+--nubtn_height <n>       Use N for the height of the\n\
+                         \"Display Note Number\" button.\n\
+--newbtn_width <n>       Use N for the width of the\n\
+                         \"Append New Note\" button.\n\
+--newbtn_height <n>      Use N for the height of the\n\
+                         \"Append New Note\" button.\n\
+--exitbtn_width <n>      Use N for the width of the\n\
+                         \"Exit E-Notes Bar\" button.\n\
+--exitbtn_height <n>     Use N for the height of the\n\
+                         \"Exit E-Notes Bar\" button.\n\
+--firstbtn_img <i>       Use I for the image displayed as\n\
+                         the \"Display First Note\" button.\n\
+--lastbtn_img <i>        Use I for the image displayed as\n\
+                         the \"Display Last Note\" button.\n\
+--nubtn_img <i>          Use I for the image displayed as\n\
+                         the \"Display Note Number\" button.\n\
+--newbtn_img <i>         Use I for the image displayed as\n\
+                         the \"Append New Note\" button.\n\
+--exitbtn_img <i>        Use I for the image displayed as\n\
+                        the \"Exit E-Notes Bar\" button.\n\n\
        E-Notes can be run with or without both\n\
        options and commands.  If you run it with\n\
        neither it will simply open E-Notes at the\n\
@@ -123,6 +187,53 @@
 extern unsigned int font_size;
 extern unsigned int title_font_size;
 
+
+extern unsigned int win_x;
+extern unsigned int win_y;
+extern unsigned int win_width;
+extern unsigned int win_height;
+
+extern unsigned int firstbtn_x;
+extern unsigned int firstbtn_y;
+extern unsigned int firstbtn_width;
+extern unsigned int firstbtn_height;
+
+extern unsigned int lastbtn_x;
+extern unsigned int lastbtn_y;
+extern unsigned int lastbtn_width;
+extern unsigned int lastbtn_height;
+
+extern unsigned int nubtn_x;
+extern unsigned int nubtn_y;
+extern unsigned int nubtn_width;
+extern unsigned int nubtn_height;
+
+extern unsigned int newbtn_x;
+extern unsigned int newbtn_y;
+extern unsigned int newbtn_width;
+extern unsigned int newbtn_height;
+
+extern unsigned int exitbtn_x;
+extern unsigned int exitbtn_y;
+extern unsigned int exitbtn_width;
+extern unsigned int exitbtn_height;
+
+extern char *bgimg;
+extern char *firstbtnimg;
+extern char *lastbtnimg;
+extern char *newbtnimg;
+extern char *nubtnimg;
+extern char *exitbtnimg;
+
+extern E_Prog *bar;
+extern Evas_Object *bar_bg;
+extern Evas_Object *bar_firstbtn;
+extern Evas_Object *bar_lastbtn;
+extern Evas_Object *bar_nubtn;
+extern Evas_Object *bar_newbtn;
+extern Evas_Object *bar_exitbtn;
+
+
 extern E_Prog *root;
 extern Evas_Object *bg;
 extern Evas_Object *title;
@@ -144,7 +255,8 @@
 
 typedef struct _fadeinfo fadeinfo;
 
-struct _fadeinfo {
+struct _fadeinfo
+{
        Evas_Object *ob;
        int a1;
        int a2;
@@ -154,61 +266,66 @@
 };
 
 
-void fadein_loop           (int val, fadeinfo *fi);
-void fadeobin                (Evas_Object *ob, int a1, int a2, int freq, double 
speed);
-void change_alpha          (Evas_Object *ob, int alpha);
-
-Evas_Object *new_line      (Evas *evas, int x1, int y1, int x2, int y2, int r, int g,
-                          int b, int alpha, int layer);
-Evas_Object *new_image     (Evas *evas, char *imagefile, int layer, int fill_x,
-                           int fill_y, int width, int height, int x, int y);
-Evas_Object *new_rectangle (Evas *evas, int r, int g, int b, int alpha,
-                           int width_x, int width_y, int x, int y, int layer);
-Evas_Object *new_text      (Evas *evas, char *font, int size, char *text, int r,
-                           int g, int b, int alpha, int x, int y, int layer);
-E_Prog *new_window         (int width, int height);
-
-void move_object           (Evas_Object *ob, int x, int y);
-void resize_object         (Evas_Object *ob, int width, int height);
-void init                  ();
-void floop                 ();
-void onclick               (Evas_Object *ob, void (*func), const void *data);
-void addtimer              (char *name, double interval, void (*func),
-                           int initloopval /*Optional For Use*/, const void *data);
-void mousemoveforward      (Ecore_Event *event);
-void onmousemove           (E_Prog *eprog, void (*func));
-void movemouseimg          (Ecore_Event *event);
-void changemouse           (E_Prog *eprog, char *img, int width, int height);
+void fadein_loop (int val, fadeinfo * fi);
+void fadeobin (Evas_Object * ob, int a1, int a2, int freq, double speed);
+void change_alpha (Evas_Object * ob, int alpha);
+
+Evas_Object *new_line (Evas * evas, int x1, int y1, int x2, int y2, int r,
+                      int g, int b, int alpha, int layer);
+Evas_Object *new_image (Evas * evas, char *imagefile, int layer, int fill_x,
+                       int fill_y, int width, int height, int x, int y);
+Evas_Object *new_rectangle (Evas * evas, int r, int g, int b, int alpha,
+                           int width_x, int width_y, int x, int y,
+                           int layer);
+Evas_Object *new_text (Evas * evas, char *font, int size, char *text, int r,
+                      int g, int b, int alpha, int x, int y, int layer);
+E_Prog *new_window (int width, int height);
+
+void move_object (Evas_Object * ob, int x, int y);
+void resize_object (Evas_Object * ob, int width, int height);
+void init ();
+void floop ();
+void onclick (Evas_Object * ob, void (*func), const void *data);
+void addtimer (char *name, double interval, void (*func),
+              int initloopval /*Optional For Use */ , const void *data);
+void mousemoveforward (Ecore_Event * event);
+void onmousemove (E_Prog * eprog, void (*func));
+void movemouseimg (Ecore_Event * event);
+void changemouse (E_Prog * eprog, char *img, int width, int height);
 /* Should I do this or not? */
 
+void parseconfig (int argc, char **argv[]);
+void setdefaultvalues ();
+
+void openwin (void);
+void makebar (void);
 
-void openwin               (void);
-void makebar               (void);
+void fnotenum (int num);
+void fileopen (char *mode);
 
-void fnotenum              (int num);
-void fileopen              (char *mode);
+void displayall (void);
+void dislast (void);
+void clear (void);
+void newnote (int argc, char *argv[]);
+void count (void);
 
-void displayall            (void);
-void dislast               (void);
-void clear                 (void);
-void newnote               (int argc, char *argv[]);
-void count                 (void);
+void notengui (void);
 
-void notengui              (void);
+void getncmd (Ewl_Widget * w, void *ev_data, void *user_data);
 
-void getncmd               (Ewl_Widget *w, void *ev_data, void *user_data);
+void setconfig (void);
 
-void setconfig             (void);
+void kill_main_window (Ewl_Widget * main_win, void *ev_data, void *user_data);
 
-void kill_main_window      (Ewl_Widget *main_win, void *ev_data, void *user_data);
+void fadein (int fadeloop, char *tmpstr);
+void fadeout (int fadeloop);
+void freethem (void);
 
-void fadein                (int fadeloop, char *tmpstr);
-void fadeout               (int fadeloop);
-void freethem              (void);
+void slideout (int slideloop);
+void slidein (int slideloop);
 
-void slideout              (int slideloop);
-void slidein               (int slideloop);
+void mousemoveevent (Ecore_Event * event);
 
-void mousemoveevent        (Ecore_Event *event);
+void okbtnclicked ();
 
-void okbtnclicked          ();
+void runbar ();
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/newentry.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- newentry.c  23 Feb 2003 10:07:17 -0000      1.6
+++ newentry.c  26 Feb 2003 20:38:04 -0000      1.7
@@ -90,7 +90,8 @@
        ewl_widget_show (okbtn);
 
        ewl_callback_append (okbtn, EWL_CALLBACK_CLICKED, okbtnclicked, NULL);
-       ewl_callback_append (cancelbtn, EWL_CALLBACK_CLICKED, exit, "-1");
+       ewl_callback_append (cancelbtn, EWL_CALLBACK_CLICKED, (void *) exit,
+                            "-1");
 
        free (wtmp);
 
@@ -105,7 +106,7 @@
 
        fileopen ("a");
 
-       dtmp = ewl_entry_get_text (ewltitle);
+       dtmp = ewl_entry_get_text ((Ewl_Entry *) ewltitle);
        strcat (dtmp, "\n");
        fputs (dtmp, file);
 
@@ -115,7 +116,7 @@
                    {
                            break;
                    }
-                 dtmp = ewl_entry_get_text (note[d]);
+                 dtmp = ewl_entry_get_text ((Ewl_Entry *) note[d]);
                  strcat (dtmp, "\n");
                  fputs (dtmp, file);
          }
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/notecmds.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- notecmds.c  23 Feb 2003 10:07:17 -0000      1.9
+++ notecmds.c  26 Feb 2003 20:38:04 -0000      1.10
@@ -81,7 +81,7 @@
 void
 notengui ()
 {
-       ewl_init (1, "enotes");
+       ewl_init (1, NULL);
 
        ewlwin = ewl_window_new ();
        ewl_window_set_title (EWL_WINDOW (ewlwin), "View Note Number?");
@@ -335,7 +335,8 @@
 addtimer (char *name, double interval, void (*func),
          int initloopval /*Optional For Use */ , const void *data)
 {
-       ecore_add_event_timer (name, interval, func, initloopval, data);
+       ecore_add_event_timer (name, interval, func, initloopval,
+                              (void *) data);
        return;
 }
 
@@ -351,7 +352,7 @@
                  return;
          }
 
-       addtimer ("tmpquick", 0, tmpfunc, &eemm->x, &eemm->y);
+       addtimer ("tmpquick", 0, tmpfunc, eemm->x, &eemm->y);
        return;
 }
 
@@ -398,4 +399,56 @@
        tmpmouseeprog = eprog;
 
        ecore_event_filter_handler_add (ECORE_EVENT_MOUSE_MOVE, movemouseimg);
+}
+
+
+
+/* BAR CODE BEGINS HERE */
+
+
+void
+runbar ()
+{
+       bar = new_window (win_width, win_height);
+       eprog_borderless_set (bar, 1);
+
+       eprog_move (bar, win_x, win_y);
+
+       bar_bg = new_image (bar->evas, bgimg, 0, win_width, win_height,
+                           win_width, win_height, 0, 0);
+       bar_firstbtn =
+               new_image (bar->evas, firstbtnimg, 1, firstbtn_width,
+                          firstbtn_height, firstbtn_width, firstbtn_height,
+                          firstbtn_x, firstbtn_y);
+       bar_lastbtn =
+               new_image (bar->evas, lastbtnimg, 1, lastbtn_width,
+                          lastbtn_height, lastbtn_width,
+                          lastbtn_height, lastbtn_x, lastbtn_y);
+       bar_nubtn =
+               new_image (bar->evas, nubtnimg, 1, nubtn_width, nubtn_height,
+                          nubtn_width, nubtn_height, nubtn_x, nubtn_y);
+       bar_newbtn =
+               new_image (bar->evas, newbtnimg, 1, newbtn_width,
+                          newbtn_height, newbtn_width, newbtn_height,
+                          newbtn_x, newbtn_y);
+       bar_exitbtn =
+               new_image (bar->evas, exitbtnimg, 1, exitbtn_width,
+                          exitbtn_height, exitbtn_width, exitbtn_height,
+                          exitbtn_x, exitbtn_y);
+
+
+       onclick (bar_exitbtn, exit, "-1");
+       onclick (bar_firstbtn, system, "enotes -o&");
+       onclick (bar_lastbtn, system, "enotes -l&");
+       onclick (bar_nubtn, system, "enotes --nu&");
+       onclick (bar_newbtn, system, "enotes -N&");
+
+
+       eprog_show (bar);
+       evas_object_show (bar_bg);
+       evas_object_show (bar_firstbtn);
+       evas_object_show (bar_lastbtn);
+       evas_object_show (bar_nubtn);
+       evas_object_show (bar_newbtn);
+       evas_object_show (bar_exitbtn);
 }
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/notenum.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- notenum.c   23 Feb 2003 10:07:17 -0000      1.15
+++ notenum.c   26 Feb 2003 20:38:04 -0000      1.16
@@ -46,7 +46,7 @@
        ecore_event_filter_handler_add (ECORE_EVENT_MOUSE_MOVE,
                                        mousemoveevent);
 
-       onclick (exitbtn, exit, -1);
+       onclick (exitbtn, exit, (void *) "-1");
 
        eprog_show (root);
        evas_object_show (bg);
@@ -110,7 +110,7 @@
        ecore_event_filter_handler_add (ECORE_EVENT_MOUSE_MOVE,
                                        mousemoveevent);
 
-       onclick (exitbtn, fadeout, 255);
+       onclick (exitbtn, fadeout, (void *) 255);
 
        eprog_show (root);
 
@@ -206,8 +206,8 @@
          }
        if (slideloop < 50)
          {
-                 ecore_add_event_timer ("slideout", slidespeed, slideout,
-                                        slideloop, NULL);
+                 ecore_add_event_timer ("slideout", slidespeed,
+                                        (void *) slideout, slideloop, NULL);
          }
 }
 
@@ -236,8 +236,8 @@
 
        if (slideloop > 0)
          {
-                 ecore_add_event_timer ("slidein", slidespeed, slidein,
-                                        slideloop, NULL);
+                 ecore_add_event_timer ("slidein", slidespeed,
+                                        (void *) slidein, slideloop, NULL);
          }
        if (slideloop == 0)
          {
@@ -276,8 +276,8 @@
          }
        if (fadeloop < 255 || fadeloop != 255)
          {
-                 ecore_add_event_timer ("fadetimer", fadespeed, fadein,
-                                        fadeloop, NULL);
+                 ecore_add_event_timer ("fadetimer", fadespeed,
+                                        (void *) fadein, fadeloop, NULL);
          }
 }
 
@@ -310,7 +310,7 @@
 
        if (fadeloop > 0 || fadeloop == 255)
          {
-                 ecore_add_event_timer ("fadeouttimer", fadespeed, fadeout,
-                                        fadeloop, NULL);
+                 ecore_add_event_timer ("fadeouttimer", fadespeed,
+                                        (void *) fadeout, fadeloop, NULL);
          }
 }




-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to