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 104 105 106 107 108
|
/* 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 3 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef M4_GUI_GUI_VMNG_SCREEN_H
#define M4_GUI_GUI_VMNG_SCREEN_H
#include "m4/m4_types.h"
#include "m4/gui/gui_univ.h"
namespace M4 {
/**
* Record the (global) coordinates of the window which was created for scrnContent.
* @param scrnContent The window identifier
* @param x1 Window top-left X
* @param y1 Window top-left Y
* @param x2 Window bottom-right X
* @param y2 Window bottom-right Y
*/
bool GetScreenCoords(void *scrnContent, int32 *x1, int32 *y1, int32 *x2, int32 *y2);
/**
* Change which procedure will be called when a portion of the window
* needs to be redrawn.
* @param scrnContent The window identifier
* @param redraw The new refresh function pointer
*/
bool vmng_SetScreenRefresh(void *scrnContent, RefreshFunc redraw);
/**
* Add a "hot key" to a window.
* @paramscrnContent The window identifier
* @param myKey The "key" which, when pressed, will cause the callback function
* to be executed.
* @param callback The function to be executed when "myKey" is pressed
*/
bool AddScreenHotkey(void *scrnContent, int32 myKey, HotkeyCB callback);
/**
* Remove a hot key
* @param scrnContent The window identifier
* @param myKey The "hot key" to be removed.
* @returns False if either the window or the "hot key" could not be found,
* TRUE if successful
*/
bool RemoveScreenHotkey(void *scrnContent, int32 myKey);
/**
* Obvious shell to MoveScreen
*/
bool MoveScreenAbs(ScreenContext *myScreen, int32 parmX, int32 parmY);
/**
* Obvious shell to MoveScreen
*/
bool MoveScreenDelta(ScreenContext *myScreen, int32 parmX, int32 parmY);
bool MoveScreenDelta(int32 parmX, int32 parmY);
/**
* Resize the windows width and/or height
* @param newW The new width of the window. If <= 0, the old window width will remain
* @param newH The new height of the window. If <= 0, the old window height will remain.
* @returns TRUE if the window was found, FALSE otherwise
*/
bool ResizeScreen(void *scrnContent, int32 newW, int32 newH);
/**
* Restore the monitor image by redrawing the visible portions of each window
* intersecting the given rectangle.
* @param updateX1 Rectangle top-left X
* @param updateY1 Rectangle top-left Y
* @param updateX2 Rectangle bottom-right X
* @param updateY2 Rectangle bottom-right Y
*/
void RestoreScreens(int32 updateX1, int32 updateY1, int32 updateX2, int32 updateY2);
/**
* A shell to RestoreScreens
*/
void RestoreScreensInContext(int32 x1, int32 y1, int32 x2, int32 y2, ScreenContext *myScreen);
/**
* Capture a screenshot to a bitmap.
*/
void Screen2BuffC(int8 *Buff);
} // End of namespace M4
#endif
|