2009-12-03 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / src / tilesource.h
blob6a26c5cfda8fca42cdab066a97d46d07290cb218
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * tilesource.h
5 * Contact:
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2007,2009 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
14 #ifndef __TILESOURCE_H__
15 #define __TILESOURCE_H__
17 #include <stdio.h>
18 #include "dependencyobject.h"
20 /* @CBindingRequisite */
21 typedef bool (*get_image_uri_func) (int level, int posX, int posY, Uri *uri, void* user_data);
22 typedef void (*invalidate_tile_layer_func) (MultiScaleImage *msi, int level, int tilePositionX, int tilePositionY, int tileLayer);
24 /* @Version=2,Namespace=System.Windows.Media */
25 /* @CallInitialize */
26 class MultiScaleTileSource : public DependencyObject {
27 protected:
28 /* @PropertyType=double,Version=2.0,GenerateAccessors,GenerateManagedAccessors,ManagedAccess=Internal */
29 const static int ImageWidthProperty;
30 /* @PropertyType=double,Version=2.0,GenerateAccessors,GenerateManagedAccessors,ManagedAccess=Internal */
31 const static int ImageHeightProperty;
32 /* @PropertyType=gint32,Version=2.0,GenerateAccessors,GenerateManagedAccessors,ManagedAccess=Internal */
33 const static int TileWidthProperty;
34 /* @PropertyType=gint32,Version=2.0,GenerateAccessors,GenerateManagedAccessors,ManagedAccess=Internal */
35 const static int TileHeightProperty;
36 /* @PropertyType=gint32,Version=2.0,GenerateAccessors,GenerateManagedAccessors,ManagedAccess=Internal */
37 const static int TileOverlapProperty;
38 /* @PropertyType=TimeSpan,Version=2.0,DefaultValue=(gint64) TimeSpan_FromSecondsFloat (0.5)\,Type::TIMESPAN,GenerateAccessors,GenerateManagedAccessors,ManagedAccess=Protected,ManagedFieldAccess=Private */
39 const static int TileBlendTimeProperty;
41 virtual ~MultiScaleTileSource () {}
43 invalidate_tile_layer_func invalidate_cb;
44 MultiScaleImage *invalidate_data;
46 public:
47 get_image_uri_func get_tile_func;
49 /* @GenerateCBinding,GeneratePInvoke,ManagedAccess=Internal */
50 MultiScaleTileSource ();
52 double GetImageWidth ();
53 void SetImageWidth (double width);
55 double GetImageHeight ();
56 void SetImageHeight (double height);
58 int GetTileWidth ();
59 void SetTileWidth (int width);
61 int GetTileHeight ();
62 void SetTileHeight (int height);
64 int GetTileOverlap ();
65 void SetTileOverlap (int overlap);
67 TimeSpan GetTileBlendTime ();
68 void SetTileBlendTime (TimeSpan time);
70 /* @GenerateCBinding,GeneratePInvoke */
71 void set_image_uri_func (get_image_uri_func func);
73 /* @GenerateCBinding,GeneratePInvoke,ManagedAccess=Internal */
74 void InvalidateTileLayer (int level, int tilePositionX, int tilePositionY, int tileLayer);
76 void set_invalidate_tile_layer_func (invalidate_tile_layer_func func, MultiScaleImage *user_data);
79 #endif /* __TILESOURCE_H__ */