Author: alp
Date: 2006-07-21 11:49:13 -0400 (Fri, 21 Jul 2006)
New Revision: 62868
Added:
trunk/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs
trunk/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs
Modified:
trunk/mcs/class/Mono.Cairo/ChangeLog
trunk/mcs/class/Mono.Cairo/Mono.Cairo.dll.sources
trunk/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs
Log:
2006-07-21 Alp Toker <[EMAIL PROTECTED]>
* Mono.Cairo.dll.sources:
* Mono.Cairo/DirectFBSurface.cs:
* Mono.Cairo/XcbSurface.cs: Add new surfaces.
Modified: trunk/mcs/class/Mono.Cairo/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Cairo/ChangeLog 2006-07-21 15:37:16 UTC (rev
62867)
+++ trunk/mcs/class/Mono.Cairo/ChangeLog 2006-07-21 15:49:13 UTC (rev
62868)
@@ -1,3 +1,9 @@
+2006-07-21 Alp Toker <[EMAIL PROTECTED]>
+
+ * Mono.Cairo.dll.sources:
+ * Mono.Cairo/DirectFBSurface.cs:
+ * Mono.Cairo/XcbSurface.cs: Add new surfaces.
+
2006-07-06 John Luke <[EMAIL PROTECTED]>
* Mono.Cairo/Cairo.cs:
Modified: trunk/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs
===================================================================
--- trunk/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs 2006-07-21 15:37:16 UTC
(rev 62867)
+++ trunk/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs 2006-07-21 15:49:13 UTC
(rev 62868)
@@ -684,6 +684,10 @@
[DllImport (cairo)]
internal static extern IntPtr cairo_version_string ();
+ // DirectFBSurface
+ [DllImport (cairo)]
+ internal static extern IntPtr cairo_directfb_surface_create
(IntPtr dfb, IntPtr surface);
+
// win32 fonts
[DllImport (cairo)]
internal static extern IntPtr
cairo_win32_font_face_create_for_logfontw (IntPtr logfontw);
@@ -703,10 +707,10 @@
// XcbSurface
[DllImport (cairo)]
- internal static extern IntPtr cairo_xcb_surface_create (IntPtr
connection, IntPtr drawable, IntPtr visual, int width, int height);
+ internal static extern IntPtr cairo_xcb_surface_create (IntPtr
connection, uint drawable, IntPtr visual, int width, int height);
[DllImport (cairo)]
- internal static extern IntPtr
cairo_xcb_surface_create_for_bitmap (IntPtr connection, IntPtr bitmap, int
width, int height);
+ internal static extern IntPtr
cairo_xcb_surface_create_for_bitmap (IntPtr connection, uint bitmap, IntPtr
screen, int width, int height);
[DllImport (cairo)]
internal static extern void cairo_xcb_surface_set_size (IntPtr
surface, int width, int height);
Added: trunk/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs
===================================================================
--- trunk/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs 2006-07-21
15:37:16 UTC (rev 62867)
+++ trunk/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs 2006-07-21
15:49:13 UTC (rev 62868)
@@ -0,0 +1,50 @@
+//
+// Mono.Cairo.DirectFBSurface.cs
+//
+// Authors:
+// Alp Toker
+//
+// (C) Alp Toker, 2006.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if CAIRO_1_2
+
+using System;
+
+namespace Cairo {
+ public class DirectFBSurface : Surface
+ {
+ internal DirectFBSurface (IntPtr handle, bool owns) : base
(handle, owns)
+ {
+ }
+
+ public DirectFBSurface (IntPtr dfb, IntPtr surface)
+ {
+ surface = CairoAPI.cairo_directfb_surface_create (dfb,
surface);
+ lock (surfaces.SyncRoot) {
+ surfaces [surface] = this;
+ }
+ }
+ }
+}
+
+#endif
Added: trunk/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs
===================================================================
--- trunk/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs 2006-07-21 15:37:16 UTC
(rev 62867)
+++ trunk/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs 2006-07-21 15:49:13 UTC
(rev 62868)
@@ -0,0 +1,59 @@
+//
+// Mono.Cairo.XcbSurface.cs
+//
+// Authors:
+// Alp Toker
+//
+// (C) Alp Toker, 2006.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Cairo {
+ public class XcbSurface : Surface
+ {
+ internal XcbSurface (IntPtr handle, bool owns) : base (handle,
owns)
+ {
+ }
+
+ public XcbSurface (IntPtr connection, uint drawable, IntPtr
visual, int width, int height)
+ {
+ surface = CairoAPI.cairo_xcb_surface_create
(connection, drawable, visual, width, height);
+ lock (surfaces.SyncRoot) {
+ surfaces [surface] = this;
+ }
+ }
+
+ public static XcbSurface FromBitmap (IntPtr connection, uint
bitmap, IntPtr screen, int width, int height)
+ {
+ IntPtr ptr;
+
+ ptr = CairoAPI.cairo_xcb_surface_create_for_bitmap
(connection, bitmap, screen, width, height);
+ return new XcbSurface (ptr, true);
+ }
+
+ public void SetSize (int width, int height)
+ {
+ CairoAPI.cairo_xcb_surface_set_size (surface, width,
height);
+ }
+ }
+}
Modified: trunk/mcs/class/Mono.Cairo/Mono.Cairo.dll.sources
===================================================================
--- trunk/mcs/class/Mono.Cairo/Mono.Cairo.dll.sources 2006-07-21 15:37:16 UTC
(rev 62867)
+++ trunk/mcs/class/Mono.Cairo/Mono.Cairo.dll.sources 2006-07-21 15:49:13 UTC
(rev 62868)
@@ -5,6 +5,7 @@
./Mono.Cairo/Cairo.cs
./Mono.Cairo/Content.cs
./Mono.Cairo/Context.cs
+./Mono.Cairo/DirectFBSurface.cs
./Mono.Cairo/Extend.cs
./Mono.Cairo/FillRule.cs
./Mono.Cairo/Filter.cs
@@ -40,5 +41,6 @@
./Mono.Cairo/SvgVersion.cs
./Mono.Cairo/TextExtents.cs
./Mono.Cairo/Win32Surface.cs
+./Mono.Cairo/XcbSurface.cs
./Mono.Cairo/XlibSurface.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches