Class DirectDrawWarp This class is responsible for displaying the window. More...
#include <SDK_Manila_Sense.h>
Public Member Functions | |
DirectDrawWarp (HINSTANCE hInstance, const TCHAR *name, bool topmost=false, HMENU menuBottom=NULL) | |
Constructor of EventHandler. | |
DirectDrawWarp () | |
Constructor which will not create a window (used by messageBox). | |
~DirectDrawWarp (void) | |
void | add (Section *e) |
Use this method to add a Section to the window. | |
void | addToRedraw (RECT &rc, bool backErase) |
When something has change, you can ask for a redraw of a part of the screen. | |
HRESULT | BltFast (DIRECTDRAW_GDI *out, RECT *dest, DIRECTDRAW_GDI *srcSur, RECT *src, DWORD flag, LPDDBLTFX param) |
This function is used to draw surface on another with alpha transparency when available. | |
HRESULT | BltMask (DIRECTDRAW_GDI *out, RECT *dest, DIRECTDRAW_GDI *srcSur, DIRECTDRAW_GDI *maskBlt, RECT *src) |
This function is used to draw surface on another with a mask. | |
void | BltMix (DIRECTDRAW_GDI *out, RECT *dest, DIRECTDRAW_GDI *srcSur, RECT *src, DWORD constantAlpha) |
This function is used to draw surface on another with a constant alpha mix. | |
void | changeControl (MessageBoxSense *mb) |
When a message box append, tell to the window to wait... | |
void | changeMenu (UINT message, int idMenu, LPARAM info) |
use this method to send message to the toolbar for more informations, see http://msdn.microsoft.com/en-us/library/aa930112.aspx | |
void | doRepaintBuffered (int dy) |
method which is called when something is waiting to a redraw (via addToRedraw) | |
void | initWindow () |
first method used to init the window (call to EventHandler::initApplication) | |
void | setBackgroundColor (COLORREF newColor) |
use this method to change the background color | |
void | setBackgroundImg (LPCWSTR imgSrc=NULL, bool forLandscape=false) |
To set an image in background. | |
void | setMenu (HMENU hMenu) |
use this method to add or remove the bottom bar for more informations, see http://msdn.microsoft.com/en-us/library/aa921327.aspx | |
void | updateElements () |
Use this method to update elements according to an user gesture. | |
void | UpdateFrame (bool eraseBack=false) |
Use this method if you want to redraw the screen before calling this method, set the region GlobalInformations::rcUpdateRegion! | |
Static Public Member Functions | |
static void | beginPaint () |
when drawing on screen use this function before | |
static GDI_OVERLAY * | createOverlay (DDSURFACEDESC *desc) |
This function is used to create an overlay. | |
static HRESULT | createSurf (DDSURFACEDESC *desc, DIRECTDRAW_GDI *surf) |
This function is used to create a surface. | |
static void | deleteSurf (DIRECTDRAW_GDI **surf) |
This function is used to remove from memory a surface (free the resources). | |
static void | endPaint () |
when drawing on screen use this function after | |
Public Attributes | |
RECT | hMenuArea |
size of bottom menu bar | |
HMENU | myHMenu |
handle of bottom menu bar | |
Static Public Attributes | |
static int | background_color = RGB565to32(29,58,29) |
background color (don't change, use setBackgroundColor instead) |
Class DirectDrawWarp This class is responsible for displaying the window.
Definition at line 1850 of file SDK_Manila_Sense.h.
DirectDrawWarp::DirectDrawWarp | ( | HINSTANCE | hInstance, | |
const TCHAR * | name, | |||
bool | topmost = false , |
|||
HMENU | menuBottom = NULL | |||
) |
Constructor of EventHandler.
hInstance | instance from winMain | |
name | Name of your application | |
topmost | If true your app will be in fullscreen mode (no top bar) | |
menu | If wanted, the handle of menu created with CreateMenu (see http://msdn.microsoft.com/en-us/library/aa921327.aspx) |
Definition at line 25 of file DirectDrawWarp.cpp.
DirectDrawWarp::DirectDrawWarp | ( | ) |
Constructor which will not create a window (used by messageBox).
Definition at line 9 of file DirectDrawWarp.cpp.
DirectDrawWarp::~DirectDrawWarp | ( | void | ) |
Definition at line 247 of file DirectDrawWarp.cpp.
void DirectDrawWarp::add | ( | Section * | e | ) |
Use this method to add a Section to the window.
Definition at line 241 of file DirectDrawWarp.cpp.
void DirectDrawWarp::addToRedraw | ( | RECT & | rc, | |
bool | backErase | |||
) |
When something has change, you can ask for a redraw of a part of the screen.
rc | RECT of update | |
backErase | if true, background will be erased |
Definition at line 908 of file DirectDrawWarp.cpp.
void DirectDrawWarp::beginPaint | ( | ) | [static] |
when drawing on screen use this function before
Definition at line 1186 of file DirectDrawWarp.cpp.
HRESULT DirectDrawWarp::BltFast | ( | DIRECTDRAW_GDI * | out, | |
RECT * | dest, | |||
DIRECTDRAW_GDI * | srcSur, | |||
RECT * | src, | |||
DWORD | flag, | |||
LPDDBLTFX | param | |||
) |
This function is used to draw surface on another with alpha transparency when available.
out | surface which will be painted | |
dest | RECT of output (if NULL, entire surface) | |
srcSur | surface source to paint on out | |
src | RECT of input (if NULL, entire surface) | |
flag | if DDBLT_COLORFILL, srcSur will not be used but param->dwFillColor | |
param | if flag=DDBLT_COLORFILL, param->dwFillColor is the color to paint |
Definition at line 944 of file DirectDrawWarp.cpp.
HRESULT DirectDrawWarp::BltMask | ( | DIRECTDRAW_GDI * | out, | |
RECT * | dest, | |||
DIRECTDRAW_GDI * | srcSur, | |||
DIRECTDRAW_GDI * | maskBlt, | |||
RECT * | src | |||
) |
This function is used to draw surface on another with a mask.
out | surface which will be painted | |
dest | RECT of output (if NULL, entire surface) | |
srcSur | surface source to paint on out | |
maskBlt | binary image where white will be transparant and black will be opaque | |
src | RECT of input and mask (if NULL, entire surface) |
Definition at line 1071 of file DirectDrawWarp.cpp.
void DirectDrawWarp::BltMix | ( | DIRECTDRAW_GDI * | out, | |
RECT * | dest, | |||
DIRECTDRAW_GDI * | srcSur, | |||
RECT * | src, | |||
DWORD | constantAlpha | |||
) |
This function is used to draw surface on another with a constant alpha mix.
out | surface which will be painted | |
dest | RECT of output (if NULL, entire surface) | |
srcSur | surface source to paint on out | |
src | RECT of input and mask (if NULL, entire surface) | |
constantAlpha | if 0, totally transparent, if 1 totally opaque |
Definition at line 1035 of file DirectDrawWarp.cpp.
void DirectDrawWarp::changeControl | ( | MessageBoxSense * | mb | ) |
When a message box append, tell to the window to wait...
Definition at line 613 of file DirectDrawWarp.cpp.
void DirectDrawWarp::changeMenu | ( | UINT | message, | |
int | idMenu, | |||
LPARAM | info | |||
) |
use this method to send message to the toolbar for more informations, see http://msdn.microsoft.com/en-us/library/aa930112.aspx
message | for example TB_SETBUTTONINFO | |
idMenu | id of item (user defined) | |
info | depend of message type... |
Definition at line 1328 of file DirectDrawWarp.cpp.
GDI_OVERLAY * DirectDrawWarp::createOverlay | ( | DDSURFACEDESC * | desc | ) | [static] |
This function is used to create an overlay.
desc | see http://msdn.microsoft.com/en-us/library/aa911086.aspx |
Definition at line 1104 of file DirectDrawWarp.cpp.
HRESULT DirectDrawWarp::createSurf | ( | DDSURFACEDESC * | desc, | |
DIRECTDRAW_GDI * | surf | |||
) | [static] |
This function is used to create a surface.
desc | infos for new surface (desc->dwWidth for width, desc->dwHeight for height and desc->dwBackBufferCount for number of bytes per pixels (16,24 or 32) | |
surf | new created surface. |
Definition at line 1117 of file DirectDrawWarp.cpp.
void DirectDrawWarp::deleteSurf | ( | DIRECTDRAW_GDI ** | surf | ) | [static] |
This function is used to remove from memory a surface (free the resources).
surf | surface to free |
Definition at line 1166 of file DirectDrawWarp.cpp.
void DirectDrawWarp::doRepaintBuffered | ( | int | dy | ) |
method which is called when something is waiting to a redraw (via addToRedraw)
dy | set to 0 usually... |
Definition at line 708 of file DirectDrawWarp.cpp.
void DirectDrawWarp::endPaint | ( | ) | [static] |
when drawing on screen use this function after
Definition at line 1207 of file DirectDrawWarp.cpp.
void DirectDrawWarp::initWindow | ( | ) |
first method used to init the window (call to EventHandler::initApplication)
Definition at line 617 of file DirectDrawWarp.cpp.
void DirectDrawWarp::setBackgroundColor | ( | COLORREF | newColor | ) |
use this method to change the background color
newColor | (use RGB macro for easier use) |
Definition at line 1274 of file DirectDrawWarp.cpp.
void DirectDrawWarp::setBackgroundImg | ( | LPCWSTR | imgSrc = NULL , |
|
bool | forLandscape = false | |||
) |
To set an image in background.
imgSrc | path to image (if imgSrc=NULL, just update the background) | |
forLandscape | indicate if imgSrc is for landscape or not |
Definition at line 1230 of file DirectDrawWarp.cpp.
void DirectDrawWarp::setMenu | ( | HMENU | hMenu | ) |
use this method to add or remove the bottom bar for more informations, see http://msdn.microsoft.com/en-us/library/aa921327.aspx
hMenu | new menu, if NULL remove the menu |
Definition at line 1286 of file DirectDrawWarp.cpp.
void DirectDrawWarp::updateElements | ( | ) | [inline] |
Use this method to update elements according to an user gesture.
Definition at line 1914 of file SDK_Manila_Sense.h.
void DirectDrawWarp::UpdateFrame | ( | bool | eraseBack = false |
) |
Use this method if you want to redraw the screen before calling this method, set the region GlobalInformations::rcUpdateRegion!
eraseBack | if true, erase the background |
Definition at line 748 of file DirectDrawWarp.cpp.
int DirectDrawWarp::background_color = RGB565to32(29,58,29) [static] |
background color (don't change, use setBackgroundColor instead)
Definition at line 2008 of file SDK_Manila_Sense.h.
size of bottom menu bar
Definition at line 2009 of file SDK_Manila_Sense.h.
HMENU DirectDrawWarp::myHMenu |
handle of bottom menu bar
Definition at line 2010 of file SDK_Manila_Sense.h.