gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE... [relea


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE... [release_0_7_2]
Date: Wed, 15 Nov 2006 14:29:23 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         release_0_7_2
Changes by:     Sandro Santilli <strk>  06/11/15 14:29:23

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: DefineEditTextVariableNameTest.c 
                                 ming_utils.c ming_utils.h 

Log message:
                * testsuite/misc-ming.all/ming_utils.{c,h}:
                  removed add_xtrace_function from header,
                  changed add_dejagnu_functions to take a font object and
                  to create the xtrace window w/out the drawing api (so
                  that gnash is able to use it)
                * testsuite/misc-ming.all/DefineEditTextVariableNameTest.c:
                  use pixel coordinates.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.1412.2.175&r2=1.1412.2.176
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest.c?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.7.2.7&r2=1.7.2.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ming_utils.c?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.4.2.4&r2=1.4.2.5
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ming_utils.h?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.3.2.3&r2=1.3.2.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1412.2.175
retrieving revision 1.1412.2.176
diff -u -b -r1.1412.2.175 -r1.1412.2.176
--- ChangeLog   15 Nov 2006 12:56:42 -0000      1.1412.2.175
+++ ChangeLog   15 Nov 2006 14:29:23 -0000      1.1412.2.176
@@ -1,5 +1,15 @@
 2006-11-15 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/ming_utils.{c,h}:
+         removed add_xtrace_function from header,
+         changed add_dejagnu_functions to take a font object and
+         to create the xtrace window w/out the drawing api (so
+         that gnash is able to use it)
+       * testsuite/misc-ming.all/DefineEditTextVariableNameTest.c:
+         use pixel coordinates.
+
+2006-11-15 Sandro Santilli <address@hidden>
+
        * server/edit_text_character.cpp: warn only once
          about missing 'no word wrap' implementation.
 

Index: testsuite/misc-ming.all/DefineEditTextVariableNameTest.c
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest.c,v
retrieving revision 1.7.2.7
retrieving revision 1.7.2.8
diff -u -b -r1.7.2.7 -r1.7.2.8
--- testsuite/misc-ming.all/DefineEditTextVariableNameTest.c    14 Nov 2006 
11:10:12 -0000      1.7.2.7
+++ testsuite/misc-ming.all/DefineEditTextVariableNameTest.c    15 Nov 2006 
14:29:23 -0000      1.7.2.8
@@ -159,11 +159,11 @@
 
        Ming_init();
         Ming_useSWFVersion (OUTPUT_VERSION);
-       Ming_setScale(1.0); /* so we talk twips */
+       Ming_setScale(20.0); /* let's talk pixels */
  
        mo = newSWFMovie();
        SWFMovie_setRate(mo, 1);
-       SWFMovie_setDimension(mo, 12560, 9020);
+       SWFMovie_setDimension(mo, 628, 451);
 
        font_file = fopen(fdbfont, "r");
        if ( font_file == NULL )
@@ -223,7 +223,7 @@
         *********************************************/
 
        /*add_xtrace_function(mo, 3000, 0, 50, 400, 800);*/
-       add_dejagnu_functions(mo, 3000, 0, 50, 400, 800);
+       add_dejagnu_functions(mo, bfont, 3000, 0, 50, 400, 800);
 
        /*********************************************
         *

Index: testsuite/misc-ming.all/ming_utils.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ming_utils.c,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -u -b -r1.4.2.4 -r1.4.2.5
--- testsuite/misc-ming.all/ming_utils.c        14 Nov 2006 10:57:52 -0000      
1.4.2.4
+++ testsuite/misc-ming.all/ming_utils.c        15 Nov 2006 14:29:23 -0000      
1.4.2.5
@@ -23,24 +23,45 @@
 #include <ming_utils.h>
 
 void
-add_xtrace_function(SWFMovie mo, int depth, int x, int y, int width, int 
height)
+add_xtrace_function(SWFMovie mo, SWFBlock font, int depth, int x, int y, int 
width, int height)
 {
-       SWFAction ac;
-
-       static const size_t buflen = 1024;
-
-       char buf[buflen];
-
-       snprintf(buf, buflen, "createTextField(\"out\", %d, %d, %d, %d, %d); "
-               " xtrace = function (msg) { "
+       SWFTextField tf;
+       SWFDisplayItem it;
+       const char* asciichars = "address@hidden&*()-_=+[]{};:.>,</?'\"\\|`~";
+
+       tf = newSWFTextField();
+
+       SWFTextField_setFont(tf, font);
+
+       /* setting flags seem unneeded */
+       /*SWFTextField_setFlags(tf, SWFTEXTFIELD_USEFONT|SWFTEXTFIELD_NOEDIT);*/
+
+       /* Add all ascii chars */
+       SWFTextField_addChars(tf, asciichars);
+       SWFTextField_addString(tf, " - xtrace enabled -\n");
+
+       SWFTextField_setBounds(tf, width, height);
+
+       /*SWFTextField_setHeight(tf, 240);*/
+       /*SWFTextField_setColor(tf, 0x00, 0x00, 0x00, 0xff);*/
+       /*SWFTextField_setAlignment(tf, SWFTEXTFIELD_ALIGN_LEFT);*/
+       /*SWFTextField_setLeftMargin(tf, 0);*/
+       /*SWFTextField_setRightMargin(tf, 0);*/
+       /*SWFTextField_setIndentation(tf, 0);*/
+       /*SWFTextField_setLineSpacing(tf, 40);*/
+       /*SWFTextField_setLineSpacing(tf, 40);*/
+
+       it = SWFMovie_add(mo, (SWFBlock)tf);
+       SWFDisplayItem_moveTo(it, x, y);
+       SWFDisplayItem_setDepth(it, depth);
+       SWFDisplayItem_setName(it, "_xtrace_win");
+
+       /* Where would we find the _xtrace_win ? */
+       add_actions(mo,
+               " _global.xtrace = function (msg) { "
                " trace (msg); "
-               " _level0.out.text += msg + '\n'; "
-               "};",
-               depth, x, y, width, height);
-       buf[buflen-1] = '\0';
-       ac = compileSWFActionCode(buf);
-
-       SWFMovie_add(mo, (SWFBlock)ac);
+               " _level0._xtrace_win.text += msg + '\n'; "
+               "};");
 }
 
 SWFShape
@@ -74,12 +95,12 @@
 }
 
 void
-add_dejagnu_functions(SWFMovie mo,
+add_dejagnu_functions(SWFMovie mo, SWFBlock font,
        int depth, int x, int y, int width, int height)
 {
        SWFAction ac;
 
-       add_xtrace_function(mo, depth, x, y, width, height);
+       add_xtrace_function(mo, font, depth, x, y, width, height);
 
        static const size_t BUFLEN = 2048;
 
@@ -117,7 +138,7 @@
                "   xtrace('#expected failures: '+ this.xfailed);\n"
                " }\n"
                "};\n"
-               "runtest = new TestState();\n"
+               "_global.runtest = new TestState();\n"
                "function check_equals(obt, exp) {\n"
                " if ( obt == exp ) runtest.pass(obt+' == '+exp);\n"
                " else runtest.fail('expected: '+exp+' , obtained: '+obt);\n"

Index: testsuite/misc-ming.all/ming_utils.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/ming_utils.h,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -b -r1.3.2.3 -r1.3.2.4
--- testsuite/misc-ming.all/ming_utils.h        14 Nov 2006 10:57:52 -0000      
1.3.2.3
+++ testsuite/misc-ming.all/ming_utils.h        15 Nov 2006 14:29:23 -0000      
1.3.2.4
@@ -23,18 +23,16 @@
 #include <ming.h>
 
 /** \brief
- * Add an 'xtrace' function that both traces usin 'trace' and
- * printing to a textfield created using the given depth, position and size
+ * Add 'check', 'xcheck', 'check_equals', 'xcheck_equals' ActionScript
+ * functions for use by embedded-swf tests, and a textfield to print
+ * results of the checks to (results will additionally be 'traced').
+ * The textfield uses embedded fonts (only ascii chars loaded).
+ *
+ * Note that the x, y, width and height parameters will depend on
+ * the currently set Ming scale (see Ming_setScale). By default
+ * they are pixels (twips*20).
  */
-void add_xtrace_function(SWFMovie mo, int depth, int x, int y, int width, int 
height);
-
-/** \brief
- * Add 'check', 'xcheck', 'check_equals', 'xcheck_equals' functions for
- * use by embedded-swf tests.
- * This function will internally call add_xtrace_function with the
- * given parameters
- */
-void add_dejagnu_functions(SWFMovie mo, int depth, int x, int y, int width, 
int height);
+void add_dejagnu_functions(SWFMovie mo, SWFBlock font, int depth, int x, int 
y, int width, int height);
 
 /** \brief
  * Evaluate ActionScript 'expr' expression updating the global TestState




reply via email to

[Prev in Thread] Current Thread [Next in Thread]