Author: rolf
Date: 2007-06-14 11:21:16 -0400 (Thu, 14 Jun 2007)
New Revision: 79554
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/brush.cpp
trunk/moon/src/brush.h
trunk/moon/src/geometry.cpp
trunk/moon/src/geometry.h
trunk/moon/src/media.cpp
trunk/moon/src/runtime.cpp
trunk/moon/src/runtime.h
Log:
2007-06-14 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* geometry.cpp, geometry.h: Add collection constructors.
* brush.cpp, brush.h: Add ImageBrush and VideoBrush DPs.
* runtime.cpp|runtime.h: Implement collection add/remove methods.
Add Downloader DPs.
* media.cpp: Add MediaAttribute DP.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/ChangeLog 2007-06-14 15:21:16 UTC (rev 79554)
@@ -1,3 +1,11 @@
+2007-06-14 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * geometry.cpp, geometry.h: Add collection constructors.
+ * brush.cpp, brush.h: Add ImageBrush and VideoBrush DPs.
+ * runtime.cpp|runtime.h: Implement collection add/remove methods.
+ Add Downloader DPs.
+ * media.cpp: Add MediaAttribute DP.
+
2007-06-14 Sebastien Pouliot <[EMAIL PROTECTED]>
* brush.cpp|h: Refactor Opacity to make it reusable to other brushes
Modified: trunk/moon/src/brush.cpp
===================================================================
--- trunk/moon/src/brush.cpp 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/brush.cpp 2007-06-14 15:21:16 UTC (rev 79554)
@@ -779,9 +779,22 @@
}
//
+// ImageBrush
//
+
+DependencyProperty* ImageBrush::DownloadProgressProperty;
+DependencyProperty* ImageBrush::ImageSourceProperty;
+
//
+// VideoBrush
+//
+DependencyProperty* VideoBrush::SourceNameProperty;
+
+//
+//
+//
+
void
brush_init ()
{
@@ -813,6 +826,14 @@
GradientStop::ColorProperty = DependencyObject::Register
(Value::GRADIENTSTOP, "Color", new Value (Color (0x00FFFFFF)));
GradientStop::OffsetProperty = DependencyObject::Register
(Value::GRADIENTSTOP, "Offset", new Value (0.0));
+ /* ImageBrush */
+ ImageBrush::DownloadProgressProperty = DependencyObject::Register
(Value::IMAGEBRUSH, "DownloadProgress", new Value (0.0));
+ ImageBrush::ImageSourceProperty = DependencyObject::Register
(Value::IMAGEBRUSH, "ImageSource", new Value (""));
+
+ /* VideoBrush */
+ VideoBrush::SourceNameProperty = DependencyObject::Register
(Value::VIDEOBRUSH, "SourceName", new Value (""));
+
+
/* TileBrush fields */
TileBrush::AlignmentXProperty = DependencyObject::Register
(Value::TILEBRUSH, "AlignmentX", new Value (AlignmentXCenter));
TileBrush::AlignmentYProperty = DependencyObject::Register
(Value::TILEBRUSH, "AlignmentY", new Value (AlignmentYCenter));
Modified: trunk/moon/src/brush.h
===================================================================
--- trunk/moon/src/brush.h 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/brush.h 2007-06-14 15:21:16 UTC (rev 79554)
@@ -115,11 +115,20 @@
void tile_brush_set_stretch (TileBrush *brush, Stretch
stretch);
class ImageBrush : public TileBrush {
+ public:
+ static DependencyProperty *DownloadProgressProperty;
+ static DependencyProperty *ImageSourceProperty;
+
virtual Value::Kind GetObjectType () { return Value::IMAGEBRUSH; }
+
};
class VideoBrush : public TileBrush {
+ public:
+ static DependencyProperty *SourceNameProperty;
+
virtual Value::Kind GetObjectType () { return Value::VIDEOBRUSH; }
+
};
class LinearGradientBrush : public GradientBrush {
Modified: trunk/moon/src/geometry.cpp
===================================================================
--- trunk/moon/src/geometry.cpp 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/geometry.cpp 2007-06-14 15:21:16 UTC (rev 79554)
@@ -145,6 +145,36 @@
}
//
+// GeometryCollection
+//
+
+GeometryCollection*
+geometry_collection_new ()
+{
+ return new GeometryCollection ();
+}
+
+//
+// PathFigureCollection
+//
+
+PathFigureCollection*
+path_figure_collection_new ()
+{
+ return new PathFigureCollection ();
+}
+
+//
+// PathSegmentCollection
+//
+
+PathSegmentCollection*
+path_segment_collection_new ()
+{
+ return new PathSegmentCollection ();
+}
+
+//
// EllipseGeometry
//
@@ -1029,7 +1059,7 @@
PolyLineSegment::PointsProperty = DependencyObject::Register
(Value::POLYLINESEGMENT, "Points", Value::POINT_ARRAY);
/* PolyQuadraticBezierSegment field */
- PolyQuadraticBezierSegment::PointsProperty = DependencyObject::Register
(Value::POLYQUADRATICBEZIERSEGMENT, "Point", Value::POINT);
+ PolyQuadraticBezierSegment::PointsProperty = DependencyObject::Register
(Value::POLYQUADRATICBEZIERSEGMENT, "Points", Value::POINT_ARRAY);
/* QuadraticBezierSegment field */
QuadraticBezierSegment::Point1Property = DependencyObject::Register
(Value::QUADRATICBEZIERSEGMENT, "Point1", Value::POINT);
Modified: trunk/moon/src/geometry.h
===================================================================
--- trunk/moon/src/geometry.h 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/geometry.h 2007-06-14 15:21:16 UTC (rev 79554)
@@ -49,6 +49,7 @@
virtual Value::Kind GetObjectType () { return
Value::GEOMETRY_COLLECTION; }
virtual Value::Kind GetElementType () { return Value::GEOMETRY; }
};
+GeometryCollection* geometry_collection_new ();
//
// GeometryGroup
@@ -119,6 +120,7 @@
virtual Value::Kind GetObjectType () { return
Value::PATHFIGURE_COLLECTION; }
virtual Value::Kind GetElementType () { return Value::PATHFIGURE; }
};
+PathFigureCollection* path_figure_collection_new ();
//
// PathGeometry
@@ -173,6 +175,7 @@
virtual Value::Kind GetObjectType () { return
Value::PATHSEGMENT_COLLECTION; }
virtual Value::Kind GetElementType () { return Value::PATHSEGMENT; }
};
+PathSegmentCollection* path_segment_collection_new ();
//
// PathFigure
Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/media.cpp 2007-06-14 15:21:16 UTC (rev 79554)
@@ -245,3 +245,16 @@
{
media->SetValue (MediaElement::VolumeProperty, Value (value));
}
+
+//
+// MediaAttribute
+//
+
+DependencyProperty* MediaAttribute::ValueProperty;
+
+void
+media_init ()
+{
+ /* MediaAttribute */
+ MediaAttribute::ValueProperty = DependencyObject::Register
(Value::MEDIAATTRIBUTE, "Value", new Value (""));
+}
\ No newline at end of file
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/runtime.cpp 2007-06-14 15:21:16 UTC (rev 79554)
@@ -1780,6 +1780,66 @@
trigger->RemoveTarget (fwe);
}
+void
+ResourceCollection::Add (DependencyObject *data)
+{
+ Collection::Add (data);
+}
+
+void
+ResourceCollection::Remove (DependencyObject *data)
+{
+ Collection::Remove (data);
+}
+
+void
+StrokeCollection::Add (DependencyObject *data)
+{
+ Collection::Add (data);
+}
+
+void
+StrokeCollection::Remove (DependencyObject *data)
+{
+ Collection::Remove (data);
+}
+
+void
+MediaAttributeCollection::Add (DependencyObject *data)
+{
+ Collection::Add (data);
+}
+
+void
+MediaAttributeCollection::Remove (DependencyObject *data)
+{
+ Collection::Remove (data);
+}
+
+void
+StylusPointCollection::Add (DependencyObject *data)
+{
+ Collection::Add (data);
+}
+
+void
+StylusPointCollection::Remove (DependencyObject *data)
+{
+ Collection::Remove (data);
+}
+
+void
+TimelineMarkerCollection::Add (DependencyObject *data)
+{
+ Collection::Add (data);
+}
+
+void
+TimelineMarkerCollection::Remove (DependencyObject *data)
+{
+ Collection::Remove (data);
+}
+
VisualCollection *
visual_collection_new ()
{
@@ -1797,7 +1857,7 @@
{
return new TriggerActionCollection ();
}
-/*
+
ResourceCollection *
resource_collection_new ()
{
@@ -1827,7 +1887,6 @@
{
return new MediaAttributeCollection ();
}
-*/
EventTrigger::EventTrigger () : actions (NULL)
{
@@ -1998,6 +2057,23 @@
EventTrigger::ActionsProperty = DependencyObject::Register
(Value::EVENTTRIGGER, "Actions", Value::TRIGGERACTION_COLLECTION);
}
+DependencyProperty *Downloader::DownloadProgressProperty;
+DependencyProperty *Downloader::ResponseTextProperty;
+DependencyProperty *Downloader::StatusProperty;
+DependencyProperty *Downloader::StatusTextProperty;
+DependencyProperty *Downloader::UriProperty;
+
+void
+downloader_init ()
+{
+ Downloader::DownloadProgressProperty = DependencyObject::Register
(Value::DOWNLOADER, "DownloadProgress", Value::DOUBLE);
+ Downloader::ResponseTextProperty = DependencyObject::Register
(Value::DOWNLOADER, "ResponseText", Value::STRING);
+ Downloader::StatusProperty = DependencyObject::Register
(Value::DOWNLOADER, "Status", Value::INT32);
+ Downloader::StatusTextProperty = DependencyObject::Register
(Value::DOWNLOADER, "StatusText", Value::STRING);
+ Downloader::UriProperty = DependencyObject::Register
(Value::DOWNLOADER, "Uri", Value::STRING);
+
+}
+
Type* Type::types [];
GHashTable* Type::types_by_name = NULL;
@@ -2095,6 +2171,8 @@
xaml_init ();
clock_init ();
text_init ();
+ downloader_init ();
+ media_init ();
}
void surface_register_events (Surface *s,
Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h 2007-06-14 14:53:49 UTC (rev 79553)
+++ trunk/moon/src/runtime.h 2007-06-14 15:21:16 UTC (rev 79554)
@@ -471,14 +471,12 @@
VisualCollection* visual_collection_new ();
TriggerCollection* trigger_collection_new ();
TriggerActionCollection* trigger_action_collection_new ();
-/*
ResourceCollection* resource_collection_new ();
StrokeCollection* stroke_collection_new ();
StylusPointCollection* stylus_point_collection_new ();
TimelineMarkerCollection* time_line_marker_collection_new ();
GradientStopCollection* gradient_stop_collection_new ();
MediaAttributeCollection* media_attribute_collection_new ();
-*/
enum Stretch {
@@ -831,6 +829,8 @@
void xaml_init ();
void types_init ();
void dependencyobject_init ();
+void downloader_init ();
+void media_init ();
G_END_DECLS
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches