Author: miguel
Date: 2007-05-28 14:00:24 -0400 (Mon, 28 May 2007)
New Revision: 78082

Added:
   trunk/moon/src/brush.cpp
Modified:
   trunk/moon/src/demo.cpp
   trunk/moon/src/video.cpp
Log:
Add missing brush.cpp, tiny fixes

Added: trunk/moon/src/brush.cpp
===================================================================
--- trunk/moon/src/brush.cpp    2007-05-28 17:47:53 UTC (rev 78081)
+++ trunk/moon/src/brush.cpp    2007-05-28 18:00:24 UTC (rev 78082)
@@ -0,0 +1,65 @@
+/*
+ * brush.cpp: Brushes
+ *
+ * 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"
+
+Brush *
+brush_ref (Brush *brush)
+{
+       brush->refcount++;
+       return brush;
+}
+
+void 
+brush_unref (Brush *brush)
+{
+       if (--brush->refcount == 0)
+               delete brush;
+}
+
+struct Consumer {
+       BrushChangedNotify notify;
+       void *data;
+};
+
+void *
+Brush::AddListener (BrushChangedNotify notify, void *data)
+{
+       Consumer *c = new Consumer;
+       c->notify = notify;
+       c->data = data;
+
+       listeners = g_slist_append (listeners, c);
+       return c;
+}
+
+void
+Brush::RemoveListener (void *listener)
+{
+       listeners = g_slist_remove (listeners, listener);
+       delete (Brush *)listener;
+}
+
+void
+SolidColorBrush::SetupBrush (cairo_t *target)
+{
+       cairo_set_source_rgba (target, color.r, color.g, color.b, color.a);
+}


Property changes on: trunk/moon/src/brush.cpp
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/moon/src/demo.cpp
===================================================================
--- trunk/moon/src/demo.cpp     2007-05-28 17:47:53 UTC (rev 78081)
+++ trunk/moon/src/demo.cpp     2007-05-28 18:00:24 UTC (rev 78082)
@@ -1,4 +1,4 @@
-//#define VIDEO_DEMO
+#define VIDEO_DEMO
 #include <string.h>
 #include <gtk/gtk.h>
 #include <malloc.h>
@@ -78,7 +78,7 @@
        item_transform_set (r, (double *) (&trans));
        surface_repaint (t, 0, 0, 300, 300);
        
-#ifdef VIDEO_DEMO
+#ifdef VIDEO_DEMO1
        v = video_new ("file:///tmp/BoxerSmacksdownInhoffe.wmv", 0, 0);
        //printf ("Got %d\n", v);
        item_transform_set (v, (double *) (&trans));

Modified: trunk/moon/src/video.cpp
===================================================================
--- trunk/moon/src/video.cpp    2007-05-28 17:47:53 UTC (rev 78081)
+++ trunk/moon/src/video.cpp    2007-05-28 18:00:24 UTC (rev 78082)
@@ -212,7 +212,9 @@
 
                if (pkt->stream_index == video_stream_idx){
                        int got_picture, n;
-                       
+
+                       printf ("Decoding frame for time %7.2f\r", pkt->pts);
+                       fflush (stdout);
                        video_frame = avcodec_alloc_frame ();
 
                        while (g_async_queue_length (video->video_frames) > 10)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to