just kick off another build
[moon.git] / src / bitmapsource.h
blob7c97feea324ce171172bb6328acecf304bb9b085
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * bitmapsource.h
5 * Contact:
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2007-2008 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
14 #ifndef __BITMAPSOURCE_H__
15 #define __BITMAPSOURCE_H__
17 #include "dependencyobject.h"
18 #include "imagesource.h"
20 /* @Namespace=System.Windows.Media.Imaging */
21 class BitmapSource : public ImageSource {
22 private:
23 cairo_surface_t *native_surface;
24 gpointer data;
25 bool own_data; // if true, we free in the dtor.
26 protected:
27 cairo_surface_t *image_surface;
29 virtual ~BitmapSource ();
31 public:
32 /* @GenerateCBinding,GeneratePInvoke */
33 BitmapSource ();
35 /* @PropertyType=gint32,DefaultValue=0,ManagedSetterAccess=Internal,GenerateAccessors,Validator=IntGreaterThanZeroValidator */
36 const static int PixelWidthProperty;
37 /* @PropertyType=gint32,DefaultValue=0,ManagedSetterAccess=Internal,GenerateAccessors,Validator=IntGreaterThanZeroValidator */
38 const static int PixelHeightProperty;
39 /* @PropertyType=PixelFormat,DefaultValue=PixelFormatPbgra32,ManagedAccess=Internal,GenerateAccessors */
40 const static int PixelFormatProperty;
42 const static int PixelDataChangedEvent;
44 virtual gint32 GetPixelWidth ();
45 virtual void SetPixelWidth (gint32 width);
46 virtual gint32 GetPixelHeight ();
47 virtual void SetPixelHeight (gint32 height);
49 /* @GenerateCBinding,GeneratePInvoke */
50 gpointer GetBitmapData ();
51 /* @GenerateCBinding,GeneratePInvoke */
52 void SetBitmapData (gpointer data, bool own = true);
54 PixelFormats GetPixelFormat ();
55 void SetPixelFormat (PixelFormats weight);
57 /* @GenerateCBinding,GeneratePInvoke */
58 virtual void Invalidate ();
59 virtual cairo_surface_t *GetSurface (cairo_t *cr);
61 cairo_surface_t *GetImageSurface () { return image_surface; }
64 #endif /* __BITMAPSOURCE_H__ */