forked from mono/moon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeepzoomimagetilesource.h
More file actions
103 lines (81 loc) · 2.37 KB
/
deepzoomimagetilesource.h
File metadata and controls
103 lines (81 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* deepzoomimagetilesource.h
*
* Contact:
* Moonlight List (moonlight-list@lists.ximian.com)
*
* Copyright 2007-2009 Novell, Inc. (http://www.novell.com)
*
* See the LICENSE file included with the distribution for details.
*
*/
#ifndef __DEEPZOOMIMAGETILESOURCE_H__
#define __DEEPZOOMIMAGETILESOURCE_H__
#include <expat.h>
#include "multiscalesubimage.h"
#include "multiscaleimage.h"
#include "tilesource.h"
#include "downloader.h"
#include "uri.h"
#include "utils.h"
namespace Moonlight {
/* @Namespace=System.Windows.Media */
class DeepZoomImageTileSource : public MultiScaleTileSource {
Cancellable *get_resource_aborter;
bool is_collection;
bool downloaded;
bool parsed;
bool nested;
char *format;
char *server_format;
GPtrArray *display_rects;
GPtrArray *subimages;
XML_Parser parser;
int max_level;
void Init ();
void UriSourceChanged ();
void Abort ();
protected:
/* @GeneratePInvoke */
DeepZoomImageTileSource ();
virtual ~DeepZoomImageTileSource ();
friend class MoonUnmanagedFactory;
friend class MoonManagedFactory;
public:
/* @PropertyType=Uri,IsConstPropertyType,GenerateAccessors */
const static int UriSourceProperty;
/* @SkipFactories */
DeepZoomImageTileSource (Uri *uri, bool nested = false);
bool IsCollection () { return is_collection; }
int GetMaxLevel () { return max_level; }
MultiScaleSubImage *GetSubImage (guint index);
guint GetSubImageCount ();
void Download ();
void DownloaderComplete ();
void DownloaderFailed ();
bool GetTileLayer (int level, int x, int y, Uri **uri);
bool IsDownloaded () { return downloaded; }
bool IsParsed () { return parsed; }
void SetServerFormat (const char *server_format);
void SetFormat (const char *format);
char *GetServerFormat () { return server_format; }
virtual void OnPropertyChanged (PropertyChangedEventArgs *args, MoonError *error);
void XmlWrite (char *buffer, gint32 offset, gint32 n);
//
// Property Accessors
//
void SetUriSource (const Uri *value);
const Uri *GetUriSource ();
//
// Events
//
/* @GenerateManagedEvent=false */
const static int DownloaderCompletedEvent;
/* @GenerateManagedEvent=false */
const static int DownloaderFailedEvent;
/* @GenerateManagedEvent=false */
const static int UriSourceChangedEvent;
};
};
#endif /* __DEEPZOOMIMAGETILESOURCE_H__ */