Author: rolf
Date: 2007-06-21 10:32:17 -0400 (Thu, 21 Jun 2007)
New Revision: 80479
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/media.cpp
trunk/moon/src/media.h
trunk/moon/src/stylus.cpp
trunk/moon/src/stylus.h
trunk/moon/src/type.cpp
trunk/moon/src/type.h
trunk/moon/src/value.h
Log:
* stylus.h|cpp: Add InkPresenter.
* media.h|cpp: Add C methods to stop, pause and play a MediaElement.
* value.h, type.h|cpp: Updated.
2007-06-21 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/ChangeLog 2007-06-21 14:32:17 UTC (rev 80479)
@@ -1,5 +1,11 @@
2007-06-21 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+ * stylus.h|cpp: Add InkPresenter.
+ * media.h|cpp: Add C methods to stop, pause and play a MediaElement.
+ * value.h, type.h|cpp: Updated.
+
+2007-06-21 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
* animation.cpp: Register *KeyFrame::Value properties as nullable.
* clock.cpp: Register TimelineMarker properties.
Modified: trunk/moon/src/media.cpp
===================================================================
--- trunk/moon/src/media.cpp 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/media.cpp 2007-06-21 14:32:17 UTC (rev 80479)
@@ -72,6 +72,7 @@
// MediaElement
+DependencyProperty *MediaElement::AttributesProperty;
DependencyProperty *MediaElement::AutoPlayProperty;
DependencyProperty *MediaElement::BalanceProperty;
DependencyProperty *MediaElement::BufferingProgressProperty;
@@ -324,6 +325,30 @@
return new MediaElement ();
}
+void
+media_element_stop (MediaElement *media)
+{
+ media->Stop ();
+}
+
+void
+media_element_play (MediaElement *media)
+{
+ media->Play ();
+}
+
+void
+media_element_pause (MediaElement *media)
+{
+ media->Pause ();
+}
+
+void
+media_element_setsource (MediaElement *media, DependencyObject* Downloader,
char* PartName)
+{
+ media->SetSource (Downloader, PartName);
+}
+
bool
media_element_get_auto_play (MediaElement *media)
{
@@ -968,6 +993,7 @@
Image::DownloadProgressProperty = DependencyObject::Register
(Type::IMAGE, "DownloadProgress", new Value (0.0));
/* MediaElement */
+ MediaElement::AttributesProperty = DependencyObject::Register
(Type::MEDIAELEMENT, "Attributes", Type::MEDIAATTRIBUTE_COLLECTION);
MediaElement::AutoPlayProperty = DependencyObject::Register
(Type::MEDIAELEMENT, "AutoPlay", new Value (true));
MediaElement::BalanceProperty = DependencyObject::Register
(Type::MEDIAELEMENT, "Balance", new Value (0.0));
MediaElement::BufferingProgressProperty = DependencyObject::Register
(Type::MEDIAELEMENT, "BufferingProgress", new Value (0.0));
Modified: trunk/moon/src/media.h
===================================================================
--- trunk/moon/src/media.h 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/media.h 2007-06-21 14:32:17 UTC (rev 80479)
@@ -111,6 +111,7 @@
class MediaElement : public MediaBase {
public:
+ static DependencyProperty *AttributesProperty;
static DependencyProperty *AutoPlayProperty;
static DependencyProperty *BalanceProperty;
static DependencyProperty *BufferingProgressProperty;
@@ -150,6 +151,11 @@
MediaElement *media_element_new (void);
+void media_element_pause (MediaElement *media);
+void media_element_play (MediaElement *media);
+void media_element_stop (MediaElement *media);
+void media_element_setsource (MediaElement *media, DependencyObject
*Downloader, char *PartName);
+
bool media_element_get_auto_play (MediaElement *media);
void media_element_set_auto_play (MediaElement *media, bool value);
Modified: trunk/moon/src/stylus.cpp
===================================================================
--- trunk/moon/src/stylus.cpp 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/stylus.cpp 2007-06-21 14:32:17 UTC (rev 80479)
@@ -44,6 +44,12 @@
return new DrawingAttributes ();
}
+InkPresenter*
+ink_presenter_new ()
+{
+ return new InkPresenter ();
+}
+
DependencyProperty* StylusInfo::DeviceTypeProperty;
DependencyProperty* StylusInfo::IsInvertedProperty;
@@ -59,6 +65,8 @@
DependencyProperty* DrawingAttributes::HeightProperty;
DependencyProperty* DrawingAttributes::WidthProperty;
+DependencyProperty* InkPresenter::StrokesProperty;
+
void stylus_init ()
{
StylusInfo::DeviceTypeProperty = DependencyObject::Register
(Type::STYLUSINFO, "DeviceType", Type::INT32);
@@ -75,5 +83,7 @@
DrawingAttributes::OutlineColorProperty = DependencyObject::Register
(Type::DRAWINGATTRIBUTES, "OutlineColor", Type::COLOR);
DrawingAttributes::HeightProperty = DependencyObject::Register
(Type::DRAWINGATTRIBUTES, "Height", Type::DOUBLE);
DrawingAttributes::WidthProperty = DependencyObject::Register
(Type::DRAWINGATTRIBUTES, "Width", Type::DOUBLE);
+
+ InkPresenter::StrokesProperty = DependencyObject::Register
(Type::INKPRESENTER, "Strokes", Type::STROKE_COLLECTION);
}
Modified: trunk/moon/src/stylus.h
===================================================================
--- trunk/moon/src/stylus.h 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/stylus.h 2007-06-21 14:32:17 UTC (rev 80479)
@@ -60,6 +60,18 @@
DrawingAttributes* drawing_attributes_new ();
+class InkPresenter : public Canvas {
+ public:
+ InkPresenter () { }
+ ~InkPresenter () { };
+
+ virtual Type::Kind GetObjectType () { return Type::INKPRESENTER; };
+
+ static DependencyProperty* StrokesProperty;
+};
+
+InkPresenter* ink_presenter_new ();
+
G_END_DECLS
#endif /* MOON_STYLUS_H */
Modified: trunk/moon/src/type.cpp
===================================================================
--- trunk/moon/src/type.cpp 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/type.cpp 2007-06-21 14:32:17 UTC (rev 80479)
@@ -223,6 +223,7 @@
Type::RegisterType ("GradientStopCollection",
Type::GRADIENTSTOP_COLLECTION, Type::COLLECTION);
Type::RegisterType ("Image", Type::IMAGE, Type::MEDIABASE);
Type::RegisterType ("ImageBrush", Type::IMAGEBRUSH, Type::TILEBRUSH);
+ Type::RegisterType ("InkPresenter", Type::INKPRESENTER, Type::CANVAS);
Type::RegisterType ("Inline", Type::INLINE, Type::DEPENDENCY_OBJECT);
Type::RegisterType ("Inlines", Type::INLINES, Type::COLLECTION);
Type::RegisterType ("KeyFrame", Type::KEYFRAME,
Type::DEPENDENCY_OBJECT);
Modified: trunk/moon/src/type.h
===================================================================
--- trunk/moon/src/type.h 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/type.h 2007-06-21 14:32:17 UTC (rev 80479)
@@ -78,6 +78,7 @@
GRADIENTSTOP_COLLECTION,
IMAGE,
IMAGEBRUSH,
+ INKPRESENTER,
INLINE,
INLINES,
KEYFRAME,
Modified: trunk/moon/src/value.h
===================================================================
--- trunk/moon/src/value.h 2007-06-21 14:31:00 UTC (rev 80478)
+++ trunk/moon/src/value.h 2007-06-21 14:32:17 UTC (rev 80479)
@@ -62,6 +62,7 @@
class GradientStopCollection;
class Image;
class ImageBrush;
+class InkPresenter;
class Inline;
class Inlines;
class KeyFrame;
@@ -248,6 +249,7 @@
GradientStopCollection* AsGradientStopCollection () {
checked_get_subclass (Type::GRADIENTSTOP_COLLECTION, GradientStopCollection) }
Image* AsImage () { checked_get_subclass
(Type::IMAGE, Image) }
ImageBrush* AsImageBrush () { checked_get_subclass
(Type::IMAGEBRUSH, ImageBrush) }
+ InkPresenter* AsInkPresenter () { checked_get_subclass
(Type::INKPRESENTER, InkPresenter) }
Inline* AsInline () { checked_get_subclass
(Type::INLINE, Inline) }
Inlines* AsInlines () { checked_get_subclass
(Type::INLINES, Inlines) }
KeyFrame* AsKeyFrame () { checked_get_subclass
(Type::KEYFRAME, KeyFrame) }
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches