revert previous commit
[moon.git] / src / tilesource.cpp
blobee20969890d63d27bf0d6ac966fdb246c47ad389
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * tilesource.cpp
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 #include "tilesource.h"
17 MultiScaleTileSource::MultiScaleTileSource ()
19 SetObjectType (Type::MULTISCALETILESOURCE);
20 SetImageWidth (-1);
21 get_tile_func = NULL;
22 invalidate_cb = NULL;
25 void
26 MultiScaleTileSource::set_image_uri_func (get_image_uri_func func)
28 if (!get_tile_func)
29 get_tile_func = func;
30 else
31 g_warning ("get_tile_func already set\n");
34 void
35 MultiScaleTileSource::InvalidateTileLayer (int level, int tilePositionX, int tilePositionY, int tileLayer)
37 if (invalidate_cb)
38 invalidate_cb (invalidate_data, level, tilePositionX, tilePositionY, tileLayer);
41 void
42 MultiScaleTileSource::set_invalidate_tile_layer_func (invalidate_tile_layer_func func, MultiScaleImage *user_data)
44 invalidate_cb = func;
45 invalidate_data = user_data;