Enlightenment CVS committal
Author : davemds
Project : e17
Module : proto/edje_editor
Dir : e17/proto/edje_editor
Modified Files:
edje_edit.patch
Log Message:
* Add ability to do internal autoswallow (part of type GROUP)
wow, this is a great feature, really usefull in the editor. :)
You can for example make a group that is a 'custom button' and then use it in
other groups (maybe your main interface).
===================================================================
RCS file: /cvs/e/e17/proto/edje_editor/edje_edit.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- edje_edit.patch 24 Feb 2008 14:17:09 -0000 1.17
+++ edje_edit.patch 26 Feb 2008 01:33:35 -0000 1.18
@@ -4,7 +4,7 @@
retrieving revision 1.4
diff -u -r1.4 Doxyfile
--- Doxyfile 6 Dec 2007 23:40:48 -0000 1.4
-+++ Doxyfile 24 Feb 2008 14:14:15 -0000
++++ Doxyfile 26 Feb 2008 01:24:35 -0000
@@ -1,7 +1,7 @@
PROJECT_NAME = Edje
PROJECT_NUMBER =
@@ -29,7 +29,7 @@
retrieving revision 1.6
diff -u -r1.6 gendoc
--- gendoc 6 Dec 2007 23:42:38 -0000 1.6
-+++ gendoc 24 Feb 2008 14:14:15 -0000
++++ gendoc 26 Feb 2008 01:24:35 -0000
@@ -1,7 +1,7 @@
#!/bin/sh
cp ./edje.c.in ./edje.c
@@ -53,8 +53,8 @@
RCS file: src/lib/Edje_Edit.h
diff -N src/lib/Edje_Edit.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ src/lib/Edje_Edit.h 24 Feb 2008 14:14:15 -0000
-@@ -0,0 +1,1368 @@
++++ src/lib/Edje_Edit.h 26 Feb 2008 01:24:35 -0000
+@@ -0,0 +1,1386 @@
+#ifndef _EDJE_EDIT_H
+#define _EDJE_EDIT_H
+
@@ -356,6 +356,28 @@
+ const char *clip_to ///< The name of the part to clip part to.
+);
+
++/**Get the source of part.
++ * Source is used in part of type EDJE_PART_TYPE_GROUP to specify the group to
++ * 'autoswallow' inside the given part.
++ */
++EAPI const char * ///@return The name of the group to source the
given part. Use edje_edit_string_free() when you don't need it anymore.
++edje_edit_part_source_get(
++ Evas_Object *obj, ///< The edje object
++ const char *part ///< The name of the part
++);
++
++/**Set the source of part.
++ * Source is used in part of type EDJE_PART_TYPE_GROUP to specify the group to
++ * 'autoswallow' inside the given part.
++ * NOTE: This is not applied now. You must reload the edje to see the change.
++ */
++EAPI unsigned char ///@return 1 on success, 0 otherwise.
++edje_edit_part_source_set(
++ Evas_Object *obj, ///< The edje object
++ const char *part, ///< The name of the part
++ const char *source ///< The name of the group to autoswallow in the
given part
++);
++
+/**Get the effect for a given part. */
+EAPI unsigned char ///@return One of: EDJE_TEXT_EFFECT_NONE, _PLAIN,
_OUTLINE, _SOFT_OUTLINE, _SHADOW, _SOFT_SHADOW, _OUTLINE_SHADOW,
_OUTLINE_SOFT_SHADOW, _FAR_SHADOW, _FAR_SOFT_SHADOW, _GLOW.
+edje_edit_part_effect_get(
@@ -1410,13 +1432,9 @@
+/** @name Scripts API
+ * Description of gen api 2.
+ */ //@{
-+
-+
-+
-+
+EAPI const char* edje_edit_script_get(Evas_Object *obj);
+
-+
++
+
+#ifdef __cplusplus
+}
@@ -1429,7 +1447,7 @@
retrieving revision 1.39
diff -u -r1.39 Makefile.am
--- src/lib/Makefile.am 18 Jan 2008 06:38:46 -0000 1.39
-+++ src/lib/Makefile.am 24 Feb 2008 14:14:15 -0000
++++ src/lib/Makefile.am 26 Feb 2008 01:24:35 -0000
@@ -14,7 +14,8 @@
libedje.la
@@ -1455,8 +1473,8 @@
RCS file: src/lib/edje_edit.c
diff -N src/lib/edje_edit.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ src/lib/edje_edit.c 24 Feb 2008 14:14:15 -0000
-@@ -0,0 +1,3297 @@
++++ src/lib/edje_edit.c 26 Feb 2008 01:24:36 -0000
+@@ -0,0 +1,3378 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
@@ -2765,6 +2783,38 @@
+
+}
+
++
++EAPI const char *
++edje_edit_part_source_get(Evas_Object *obj, const char *part)
++{
++ GET_RP_OR_RETURN(NULL)
++ //Edje_Real_Part *clip = NULL;
++
++ printf("Get source for part: %s\n", part);
++ if (!rp->part->source) return NULL;
++
++ return evas_stringshare_add(rp->part->source);
++}
++
++EAPI unsigned char
++edje_edit_part_source_set(Evas_Object *obj, const char *part, const char
*source)
++{
++ GET_RP_OR_RETURN(0)
++
++ printf("Set source for part: %s [source: %s]\n", part, source);
++
++ if (rp->part->source)
++ {
++ evas_stringshare_del(rp->part->source);
++ rp->part->source = NULL;
++ }
++
++ if (source)
++ rp->part->source = evas_stringshare_add(source);
++
++ return 1;
++}
++
+/*********************/
+/* PART STATES API */
+/*********************/
@@ -2774,7 +2824,7 @@
+ Evas_List *states;
+ Evas_List *l;
+ Edje_Part_Description *state;
-+ char state_name[MAX_PATH]; //TODO 4096?
++ char state_name[MAX_PATH];
+
+ GET_RP_OR_RETURN(NULL)
+
@@ -3664,7 +3714,7 @@
+ fclose(f);
+ }
+ /* Write font to edje file */
-+ char buf[4096];
++ char buf[MAX_PATH];
+ snprintf(buf, sizeof(buf), "fonts/%s", fn->name);
+
+ if (fdata)
@@ -4619,29 +4669,78 @@
+
+ printf("Get Script [%d] %d\n",script,
embryo_program_recursion_get(script));
+
-+
-+
-+ return "ashdashd";
++ return "Not yet complete...";
+}
+
+
+
+
-+#define ABORT_WRITE2(eet_file) \
-+ eet_close(eet_file); \
-+ return 0;
-+
+
+static void
+_edje_generate_source(Edje *ed)
+{
+ printf("\n****** GENERATE SOURCE *********\n");
-+ //Open a temp file
-+ //fprintf all the structs
-+ //Return the generated file name
++ char tmpn[MAX_PATH];
++ int fd;
++ FILE *f;
++ long sz;
++ SrcFile *sf;
++ SrcFile_List *sfl;
++ Eet_File *eetf;
++
++ /* Open a temp file */
++ //TODO this will not work on windows
++ strcpy(tmpn, "/tmp/edje_edit.edc-tmp-XXXXXX");
++ if (!(fd = mkstemp(tmpn))) return;
++ printf("*** tmp file: %s\n", tmpn);
++ if (!(f = fopen(tmpn, "w"))) return;
++
++ /* Write edc into file */
++ fprintf(f, "Put here all edc source\n");
++
++
++ fclose(f);
++
++
++ sfl = mem_alloc(SZ(SrcFile_List));
++ sfl->list = NULL;
++
++ /* reopen the temp file and get the contents */
++ f = fopen(tmpn, "rb");
++ if (!f) return;
++
++ fseek(f, 0, SEEK_END);
++ sz = ftell(f);
++ fseek(f, 0, SEEK_SET);
++ sf = mem_alloc(SZ(SrcFile));
++ sf->name = mem_strdup("edje_source.edc");
++ sf->file = mem_alloc(sz + 1);
++ fread(sf->file, sz, 1, f);
++ sf->file[sz] = '\0';
++ fseek(f, 0, SEEK_SET);
++ fclose(f);
++
++ printf("----------\n%s\n-----------\n", sf->file);
++ sfl->list = evas_list_append(sfl->list, sf);
++
++ /* Write the source to the edje file */
++ //~ eetf = eet_open(ed->file->path, EET_FILE_MODE_READ_WRITE);
++ //~ if (!eetf) return;
++ //~ if (!_srcfile_list_edd)
++ //~ source_edd();
++
++ //~ eet_data_write(eetf, _srcfile_list_edd, "edje_sources", &sfl, 1);
++
++ //~ eet_close(eetf);
++
+}
+
+
++
++#define ABORT_WRITE2(eet_file) \
++ eet_close(eet_file); \
++ return 0;
++
+EAPI int
+edje_edit_save(Evas_Object *obj)
+{
@@ -4760,7 +4859,7 @@
retrieving revision 1.58
diff -u -r1.58 edje_embryo.c
--- src/lib/edje_embryo.c 25 Jan 2008 03:35:46 -0000 1.58
-+++ src/lib/edje_embryo.c 24 Feb 2008 14:14:16 -0000
++++ src/lib/edje_embryo.c 26 Feb 2008 01:24:36 -0000
@@ -847,7 +847,7 @@
Edje *ed;
int part_id = 0;
@@ -4776,7 +4875,7 @@
retrieving revision 1.113
diff -u -r1.113 edje_load.c
--- src/lib/edje_load.c 22 Feb 2008 10:42:50 -0000 1.113
-+++ src/lib/edje_load.c 24 Feb 2008 14:14:16 -0000
++++ src/lib/edje_load.c 26 Feb 2008 01:24:36 -0000
@@ -5,7 +5,7 @@
#include "Edje.h"
#include "edje_private.h"
@@ -4801,7 +4900,7 @@
retrieving revision 1.138
diff -u -r1.138 edje_private.h
--- src/lib/edje_private.h 21 Feb 2008 18:48:36 -0000 1.138
-+++ src/lib/edje_private.h 24 Feb 2008 14:14:16 -0000
++++ src/lib/edje_private.h 26 Feb 2008 01:24:36 -0000
@@ -329,31 +329,31 @@
struct _Edje_Program /* a conditional program to be run */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs