2011-03-05 04:17:57 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2014-02-18 01:34:20 +00:00
|
|
|
*
|
2011-03-05 04:17:57 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2014-02-18 01:34:20 +00:00
|
|
|
*
|
2011-03-05 04:17:57 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GRAPHICS_WINCURSOR_H
|
|
|
|
#define GRAPHICS_WINCURSOR_H
|
|
|
|
|
|
|
|
#include "common/array.h"
|
|
|
|
#include "common/winexe.h"
|
|
|
|
|
2011-08-16 04:05:31 +00:00
|
|
|
#include "graphics/cursor.h"
|
|
|
|
|
2011-03-05 04:17:57 +00:00
|
|
|
namespace Common {
|
2011-04-25 19:29:26 +00:00
|
|
|
class SeekableReadStream;
|
2011-03-05 04:17:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace Graphics {
|
|
|
|
|
2011-03-07 18:24:05 +00:00
|
|
|
/**
|
|
|
|
* A structure holding an array of cursors from a single Windows Executable cursor group.
|
|
|
|
*
|
|
|
|
* Windows lumps different versions of the same cursors/icons together and decides which one
|
|
|
|
* to use based on the screen's color depth and resolution. For instance, one cursor group
|
|
|
|
* could hold a 1bpp 16x16 cursorand a 8bpp 16x16 cursor. This will hold all cursors in the
|
|
|
|
* group. This class should be used to actually parse the cursors, whereas WinCursor is just
|
|
|
|
* the representation used by this struct to store the cursors.
|
|
|
|
*/
|
2011-03-05 04:17:57 +00:00
|
|
|
struct WinCursorGroup {
|
|
|
|
WinCursorGroup();
|
|
|
|
~WinCursorGroup();
|
|
|
|
|
|
|
|
struct CursorItem {
|
|
|
|
Common::WinResourceID id;
|
2012-05-14 04:59:50 +00:00
|
|
|
Cursor *cursor;
|
2011-03-05 04:17:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Common::Array<CursorItem> cursors;
|
|
|
|
|
2020-01-02 22:32:03 +00:00
|
|
|
/** Create a cursor group from an EXE, returns 0 on failure */
|
|
|
|
static WinCursorGroup *createCursorGroup(Common::WinResources *exe, const Common::WinResourceID &id);
|
2011-03-05 04:17:57 +00:00
|
|
|
};
|
|
|
|
|
2011-08-16 04:30:12 +00:00
|
|
|
/**
|
|
|
|
* Create a Cursor for the default Windows cursor.
|
|
|
|
*
|
|
|
|
* @note The calling code is responsible for deleting the returned pointer.
|
|
|
|
*/
|
|
|
|
Cursor *makeDefaultWinCursor();
|
|
|
|
|
2011-03-05 04:17:57 +00:00
|
|
|
} // End of namespace Graphics
|
|
|
|
|
|
|
|
#endif
|