2013-05-03 14:36:17 +00:00
|
|
|
/*
|
2013-06-15 11:37:22 +00:00
|
|
|
* This file is subject to the terms of the GFX License. If a copy of
|
2013-05-03 14:36:17 +00:00
|
|
|
* the license was not distributed with this file, you can obtain one at:
|
|
|
|
*
|
2018-10-01 15:32:39 +00:00
|
|
|
* http://ugfx.io/license.html
|
2016-07-19 08:54:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GDISP_LLD_CONFIG_H
|
|
|
|
#define _GDISP_LLD_CONFIG_H
|
|
|
|
|
|
|
|
#if GFX_USE_GDISP
|
|
|
|
|
|
|
|
/*===========================================================================*/
|
|
|
|
/* Driver hardware support. */
|
|
|
|
/*===========================================================================*/
|
2013-11-04 14:36:54 +00:00
|
|
|
|
2013-10-21 03:34:55 +00:00
|
|
|
// Calling gdispGFlush() is optional for this driver but can be used by the
|
|
|
|
// application to force a display update. eg after streaming.
|
2013-11-04 14:36:54 +00:00
|
|
|
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_FLUSH GFXON
|
|
|
|
#define GDISP_HARDWARE_CONTROL GFXON
|
2013-10-24 01:30:17 +00:00
|
|
|
|
|
|
|
//#define GDISP_WIN32_STREAMING_TEST
|
|
|
|
#ifdef GDISP_WIN32_STREAMING_TEST
|
|
|
|
// These streaming routines are here only to debug the high level gdisp
|
|
|
|
// code for streaming controllers. They are slow, inefficient and have
|
2016-07-19 08:54:17 +00:00
|
|
|
// lots of debugging turned on.
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_STREAM_WRITE GFXON
|
|
|
|
#define GDISP_HARDWARE_STREAM_READ GFXON
|
|
|
|
#define GDISP_HARDWARE_STREAM_POS GFXON
|
2013-10-24 01:30:17 +00:00
|
|
|
#else
|
|
|
|
// The proper way on the Win32. These routines are nice and fast.
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_DRAWPIXEL GFXON
|
|
|
|
#define GDISP_HARDWARE_FILLS GFXON
|
|
|
|
#define GDISP_HARDWARE_PIXELREAD GFXON
|
|
|
|
#define GDISP_HARDWARE_SCROLL GFXON
|
2013-11-05 09:34:12 +00:00
|
|
|
|
|
|
|
// Bit-blits on Win32 are currently only supported for True-Color bit-depths greater than 8 bits
|
|
|
|
// Note: At the time this file is included we have not calculated all our color
|
|
|
|
// definitions so we need to do this by hand.
|
|
|
|
#if !defined(GDISP_PIXELFORMAT)
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_BITFILLS GFXON
|
2013-11-05 09:34:12 +00:00
|
|
|
#elif (GDISP_PIXELFORMAT & 0x2000) && (((GDISP_PIXELFORMAT & 0x0F00)>>8)+((GDISP_PIXELFORMAT & 0x00F0)>>4)+((GDISP_PIXELFORMAT & 0x000F))) > 8
|
2018-02-27 07:44:21 +00:00
|
|
|
#define GDISP_HARDWARE_BITFILLS GFXON
|
2013-11-05 09:34:12 +00:00
|
|
|
#endif
|
2013-10-24 01:30:17 +00:00
|
|
|
#endif
|
2013-09-18 13:46:37 +00:00
|
|
|
|
2013-11-05 09:34:12 +00:00
|
|
|
#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_BGR888
|
2016-07-19 08:54:17 +00:00
|
|
|
|
|
|
|
// This function allows you to specify the parent window for any ugfx display windows created.
|
|
|
|
// Passing a NULL will reset window creation to creating top level windows.
|
|
|
|
// Note: In order to affect any static displays it must be called BEFORE gfxInit().
|
|
|
|
// Note: Creating a window under a parent causes the Mouse to be disabled by default (rather than enabled as for a top window)
|
2016-12-12 09:58:46 +00:00
|
|
|
void gfxEmulatorSetParentWindow(void *hwnd);
|
2016-07-19 08:54:17 +00:00
|
|
|
|
|
|
|
#if GINPUT_NEED_MOUSE
|
|
|
|
// This function allows you to inject mouse events into the ugfx mouse driver
|
2018-11-03 00:51:23 +00:00
|
|
|
void gfxEmulatorMouseInject(GDisplay *g, gU16 buttons, gCoord x, gCoord y);
|
2017-04-01 03:22:30 +00:00
|
|
|
|
2016-07-19 08:54:17 +00:00
|
|
|
// This function enables you to turn on/off normal mouse functions on a ugfx Win32 display window.
|
2018-06-23 03:02:07 +00:00
|
|
|
void gfxEmulatorMouseEnable(GDisplay *g, gBool enabled);
|
2017-04-01 03:22:30 +00:00
|
|
|
|
2016-07-19 08:54:17 +00:00
|
|
|
// This function enables you to capture mouse events on a ugfx Win32 display window.
|
|
|
|
// Passing NULL turns off the capture
|
2018-11-03 00:51:23 +00:00
|
|
|
void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, gU16 buttons, gCoord x, gCoord y));
|
2016-07-19 08:54:17 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* GFX_USE_GDISP */
|
|
|
|
|
|
|
|
#endif /* _GDISP_LLD_CONFIG_H */
|