changeset 336:995eb2c1a1aa

Merge
author wycc
date Sat, 07 Mar 2009 14:25:20 +0800
parents 01038b8d8f05 (current diff) 02e457d374f5 (diff)
children 55e0b22b919e 63aaf96209cd
files
diffstat 4 files changed, 34 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/examples/dynamic/Makefile.am	Sat Mar 07 14:24:55 2009 +0800
+++ b/examples/dynamic/Makefile.am	Sat Mar 07 14:25:20 2009 +0800
@@ -11,7 +11,9 @@
 dynamic_LDFLAGS = @pangocairo_LIBS@ 
 dynamic_LDADD = $(top_builddir)/src/libmbfly.la
 BUILT_SOURCES = 
-CLEANFILES = menu.c menu.h menu.mb  button.mb
+CLEANFILES = menu.c menu.h menu.mb \
+	button.c button.h button.mb \
+	scene.c scene.h scene.mb
 
 
 hello_SOURCES = hello.c 
--- a/tools/mb_c_header.m4	Sat Mar 07 14:24:55 2009 +0800
+++ b/tools/mb_c_header.m4	Sat Mar 07 14:25:20 2009 +0800
@@ -1,12 +1,12 @@
 changequote(`[', `]')dnl
 divert([-1])
 
-define([ADD_LINEAR_PAINT],[[
-    paint_t *$1;
+define([ADD_LINEAR_PAINT],[
+[    paint_t *$1;
 ]])
 
-define([ADD_RADIAL_PAINT],[[
-    paint_t *$1;
+define([ADD_RADIAL_PAINT],[
+[    paint_t *$1;
 ]])
 define([ADD_PATH],[
 [    shape_t *$1;
@@ -27,8 +27,7 @@
 define([PANGO_BEGIN_TEXT],[
 [    shape_t *$1;
 ]])
-define([PANGO_END_TEXT],[
-])
+define([PANGO_END_TEXT],[])
 define([PANGO_SIZE],[])
 define([PANGO_STYLE],[])
 define([PANGO_WEIGHT],[])
@@ -37,11 +36,11 @@
 
 define([REF_STOPS_RADIAL],)
 define([REF_STOPS_LINEAR],)
-define([FILL_SHAPE],[[
-    paint_t *$1_fill;
+define([FILL_SHAPE],[
+[    paint_t *$1_fill;
 ]])
-define([STROKE_SHAPE],[[
-    paint_t *$1_stroke;
+define([STROKE_SHAPE],[
+[    paint_t *$1_stroke;
 ]])
 define([FILL_SHAPE_WITH_PAINT],)
 define([STROKE_SHAPE_WITH_PAINT],)
--- a/tools/mb_c_source.m4	Sat Mar 07 14:24:55 2009 +0800
+++ b/tools/mb_c_source.m4	Sat Mar 07 14:25:20 2009 +0800
@@ -443,9 +443,9 @@
 $2[
 };
 
-]DEFINE_SCENES
-$2
-DEFINE_SCENES_ARRAY
+]DEFINE_SCENES[]dnl
+$2[]dnl
+DEFINE_SCENES_ARRAY[]dnl
 static const int *$1_scenes[[]] = {
 $2[]dnl
 	NULL
--- a/tools/svg2code.py	Sat Mar 07 14:24:55 2009 +0800
+++ b/tools/svg2code.py	Sat Mar 07 14:25:20 2009 +0800
@@ -477,25 +477,25 @@
     	    # FIXME: Implement all units here
             if style_map['font-size'].endswith('px'):
                 font_sz = float(style_map['font-size'][:-2])
-                print >> codefo, 'PANGO_SIZE(%d,%d,%d)' % (font_sz*1024,start,end)
+                print >> codefo, 'PANGO_SIZE(%d,%d,%d)dnl' % (font_sz*1024,start,end)
 	    else:
                 font_sz = float(style_map['font-size'])
-                print >> codefo, 'PANGO_SIZE(%d,%d,%d)' % (font_sz*1024,start,end)
+                print >> codefo, 'PANGO_SIZE(%d,%d,%d)dnl' % (font_sz*1024,start,end)
             pass
 
         if style_map.has_key('font-style'):
             font_style = style_map['font-style'].lower()
 	    if font_style == 'normal':
-                print >> codefo, 'PANGO_STYLE(PANGO_STYLE_NORMAL,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_STYLE_NORMAL,%d,%d)dnl' % (start,end)
 	    elif font_style == 'italic':
-                print >> codefo, 'PANGO_STYLE(PANGO_STYLE_ITALIC,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_STYLE_ITALIC,%d,%d)dnl' % (start,end)
 	    elif font_style == 'oblique':
-                print >> codefo, 'PANGO_STYLE(PANGO_STYLE_OBLIQUE,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_STYLE_OBLIQUE,%d,%d)dnl' % (start,end)
         pass
 
         if style_map.has_key('font-family'):
             font_family = style_map['font-family']
-            print >> codefo, 'PANGO_FAMILY(%s,%d,%d)' % (font_family,start,end)
+            print >> codefo, 'PANGO_FAMILY(%s,%d,%d)dnl' % (font_family,start,end)
         pass
         if style_map.has_key('text-anchor'):
             text_anchor = style_map['text-anchor'].lower()
@@ -509,31 +509,31 @@
         if style_map.has_key('font-weight'):
             font_weight = style_map['font-weight'].lower()
 	    if font_weight == 'normal':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)dnl' % (start,end)
 	    elif font_weight == 'bold':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_BOLD,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_BOLD,%d,%d)dnl' % (start,end)
 	    elif font_weight == 'bolder':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_HEAVY,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_HEAVY,%d,%d)dnl' % (start,end)
 	    elif font_weight == 'lighter':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)dnl' % (start,end)
 	    elif font_weight == '100':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)dnl' % (start,end)
 	    elif font_weight == '200':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)dnl' % (start,end)
 	    elif font_weight == '300':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_LIGHT,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_LIGHT,%d,%d)dnl' % (start,end)
 	    elif font_weight == '400':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)dnl' % (start,end)
 	    elif font_weight == '500':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)dnl' % (start,end)
 	    elif font_weight == '600':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_SEMIBOLD,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_SEMIBOLD,%d,%d)dnl' % (start,end)
 	    elif font_weight == '700':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_BOLD,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_BOLD,%d,%d)dnl' % (start,end)
 	    elif font_weight == '800':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRABOLD,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRABOLD,%d,%d)dnl' % (start,end)
 	    elif font_weight == '900':
-                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_HEAVY,%d,%d)' % (start,end)
+                print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_HEAVY,%d,%d)dnl' % (start,end)
 	    else:
 		print "The font-weight %s is not supported" % font_weight
         pass