Author: miguel
Date: 2007-06-09 16:57:25 -0400 (Sat, 09 Jun 2007)
New Revision: 79075
Added:
trunk/moon/src/text.cpp
trunk/moon/src/text.h
Modified:
trunk/moon/src/Makefile.am
trunk/moon/src/brush.cpp
trunk/moon/src/runtime.cpp
trunk/moon/src/runtime.h
trunk/moon/src/value.h
Log:
Add a handful of extra types
Modified: trunk/moon/src/Makefile.am
===================================================================
--- trunk/moon/src/Makefile.am 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/Makefile.am 2007-06-09 20:57:25 UTC (rev 79075)
@@ -18,6 +18,7 @@
runtime.h \
shape.cpp \
shape.h \
+ text.cpp \
transform.cpp \
transform.h \
value.h \
Modified: trunk/moon/src/brush.cpp
===================================================================
--- trunk/moon/src/brush.cpp 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/brush.cpp 2007-06-09 20:57:25 UTC (rev 79075)
@@ -198,7 +198,7 @@
/* Brush fields */
Brush::OpacityProperty = DependencyObject::Register (Value::BRUSH,
"Opacity", new Value (1.0));
Brush::RelativeTransformProperty = DependencyObject::Register
(Value::BRUSH, "RelativeTransform", new Value ());
- Brush::TransformProperty = DependencyObject::Register (Value::BRUSH,
"TransformProperty", new Value ());
+ Brush::TransformProperty = DependencyObject::Register (Value::BRUSH,
"Transform", new Value ());
/* SolidColorBrush fields */
SolidColorBrush::ColorProperty = DependencyObject::Register
(Value::SOLIDCOLORBRUSH, "Color", new Value (Color (0x00FFFFFF)));
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/runtime.cpp 2007-06-09 20:57:25 UTC (rev 79075)
@@ -388,6 +388,12 @@
AS_DEP_SUBCLASS_IMPL(CLOCKGROUP, ClockGroup)
AS_DEP_SUBCLASS_IMPL(BRUSH, Brush)
AS_DEP_SUBCLASS_IMPL(SOLIDCOLORBRUSH, SolidColorBrush)
+AS_DEP_SUBCLASS_IMPL(TILEBRUSH, TileBrush)
+AS_DEP_SUBCLASS_IMPL(IMAGEBRUSH, ImageBrush)
+AS_DEP_SUBCLASS_IMPL(VIDEOBRUSH, VideoBrush)
+AS_DEP_SUBCLASS_IMPL(LINEARGRADIENTBRUSH, LinearGradientBrush)
+AS_DEP_SUBCLASS_IMPL(GRADIENTBRUSH, GradientBrush)
+AS_DEP_SUBCLASS_IMPL(GRADIENTSTOP, GradientStop)
AS_DEP_SUBCLASS_IMPL(PATHFIGURE, PathFigure)
AS_DEP_SUBCLASS_IMPL(PATHSEGMENT, PathSegment)
AS_DEP_SUBCLASS_IMPL(ARCSEGMENT, ArcSegment)
@@ -1657,6 +1663,12 @@
Type::RegisterType ("ClockGroup", Value::CLOCKGROUP, Value::CLOCK);
Type::RegisterType ("Brush", Value::BRUSH, Value::DEPENDENCY_OBJECT);
Type::RegisterType ("SolidColorBrush", Value::SOLIDCOLORBRUSH,
Value::BRUSH);
+ Type::RegisterType ("TileBrush", Value::TILEBRUSH, Value::BRUSH);
+ Type::RegisterType ("ImageBrush", Value::IMAGEBRUSH, Value::TILEBRUSH);
+ Type::RegisterType ("VideoBrush", Value::VIDEOBRUSH, Value::TILEBRUSH);
+ Type::RegisterType ("GradientBrush", Value::GRADIENTBRUSH,
Value::BRUSH);
+ Type::RegisterType ("LinearGradientBrush", Value::LINEARGRADIENTBRUSH,
Value::GRADIENTBRUSH);
+ Type::RegisterType ("GradientStop", Value::GRADIENTSTOP,
Value::DEPENDENCY_OBJECT);
Type::RegisterType ("PathFigure", Value::PATHFIGURE,
Value::DEPENDENCY_OBJECT);
Type::RegisterType ("PathSegment", Value::PATHSEGMENT,
Value::DEPENDENCY_OBJECT);
Type::RegisterType ("ArcSegment", Value::ARCSEGMENT,
Value::PATHSEGMENT);
Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/runtime.h 2007-06-09 20:57:25 UTC (rev 79075)
@@ -395,8 +395,21 @@
virtual void SetupBrush (cairo_t *cairo);
};
+class TileBrush : public Brush {
+};
+class ImageBrush : public TileBrush {
+};
+class VideoBrush : public TileBrush {
+};
+
+class LinearGradientBrush : public GradientBrush {
+};
+
+class GradientStop : public DependencyObject {
+};
+
enum Stretch {
StretchNone,
StretchFill,
Added: trunk/moon/src/text.cpp
===================================================================
--- trunk/moon/src/text.cpp 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/text.cpp 2007-06-09 20:57:25 UTC (rev 79075)
@@ -0,0 +1,24 @@
+/*
+ * text.cpp: Support for Text (Inline, Inlines, TextBlock)
+ *
+ * Author:
+ * Miguel de Icaza ([EMAIL PROTECTED])
+ *
+ * Copyright 2007 Novell, Inc. (http://www.novell.com)
+ *
+ * See the LICENSE file included with the distribution for details.
+ *
+ */
+#define __STDC_CONSTANT_MACROS
+#include <unistd.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <cairo.h>
+#include <malloc.h>
+#include <glib.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <errno.h>
+#include "runtime.h"
+#include "text.h"
+
Property changes on: trunk/moon/src/text.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/moon/src/text.h
===================================================================
--- trunk/moon/src/text.h 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/text.h 2007-06-09 20:57:25 UTC (rev 79075)
@@ -0,0 +1,26 @@
+#ifndef __TEXT_H__
+#define __TEXT_H__
+
+G_BEGIN_DECLS
+
+#include <stdint.h>
+#include <cairo.h>
+#include "runtime.h"
+
+class Inline : public DependencyObject {
+ public:
+ static DependencyProperty* FontFamily;
+ static DependencyProperty* FontSize;
+ static DependencyProperty* FontStrech;
+ static DependencyProperty* FontStyle;
+ static DependencyProperty* FontWeight;
+ static DependencyProperty* Foreground;
+ static DependencyProperty* TextDecorations;
+
+};
+
+
+
+G_END_DECLS
+
+#endif
Property changes on: trunk/moon/src/text.h
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/moon/src/value.h
===================================================================
--- trunk/moon/src/value.h 2007-06-09 20:56:54 UTC (rev 79074)
+++ trunk/moon/src/value.h 2007-06-09 20:57:25 UTC (rev 79075)
@@ -66,6 +66,12 @@
class ScaleTransform;
class Shape;
class SolidColorBrush;
+class TileBrush;
+class ImageBrush;
+class VideoBrush;
+class LinearGradientBrush;
+class GradientBrush;
+class GradientStop;
class Storyboard;
class Surface;
class Timeline;
@@ -143,6 +149,7 @@
CLOCKGROUP,
BRUSH,
SOLIDCOLORBRUSH,
+ TILEBRUSH,
IMAGEBRUSH,
VIDEOBRUSH,
LINEARGRADIENTBRUSH,
@@ -292,6 +299,12 @@
ClockGroup* AsClockGroup ();
Brush* AsBrush ();
SolidColorBrush* AsSolidColorBrush ();
+ TileBrush* AsTileBrush ();
+ ImageBrush* AsImageBrush ();
+ VideoBrush* AsVideoBrush ();
+ LinearGradientBrush* AsLinearGradientBrush ();
+ GradientBrush* AsGradientBrush ();
+ GradientStop* AsGradientStop ();
PathFigure* AsPathFigure ();
PathSegment* AsPathSegment ();
ArcSegment* AsArcSegment ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches