This commit is contained in:
Joel Bodenmann 2016-02-10 23:30:24 +01:00
commit 23e04c4803
5 changed files with 24 additions and 15 deletions

View File

@ -123,7 +123,7 @@
}
if (fb_var.red.offset != LLDCOLOR_SHIFT_R || fb_var.green.offset != LLDCOLOR_SHIFT_G || fb_var.blue.offset != LLDCOLOR_SHIFT_B) {
#if LLDCOLOR_SHIFT_B == 0
fprintf(stderr, "GDISP Framebuffer: THe display pixel format is not RGB\n");
fprintf(stderr, "GDISP Framebuffer: The display pixel format is not RGB\n");
#else
fprintf(stderr, "GDISP Framebuffer: The display pixel format is not BGR\n");
#endif

View File

@ -1,15 +1,20 @@
This directory contains the interface for the Raspberry Pi framebuffer.
This directory contains the interface for the Raspberry Pi direct hardware framebuffer.
This talks directly to the raspberry pi hardware (not via a linux framebuffer driver).
If you are using linux on the Pi then consider using the linux-X or the linux-Framebuffer
board definitions instead of this one. This is really designed for non-Linux platforms
or where there is no linux display driver available. It will still work under linux but
the other solutions might be better.
This graphics interface is software driven - it is not an accelerated interface.
This board definition should work on any operating system that will work on the Raspberry Pi
eg. Linux, FreeRTOS.
The board definition should work on any operating system that will work on the Raspberry Pi
eg. Linux, FreeRTOS, FreeBSD.
On this board uGFX currently supports:
- GDISP via the framebuffer driver
THe following variables may optionally be defined in your gfxconf.h or your makefile...
The following variables may optionally be defined in your gfxconf.h or your makefile...
- GDISP_LLD_PIXELFORMAT default = GDISP_PIXELFORMAT_RGB565
- GDISP_SCREEN_WIDTH default = 800
- GDISP_SCREEN_HEIGHT default = 600

View File

@ -10,6 +10,7 @@ FEATURE: Added Altera-MAX10-NEEK board support
FIX: Vastly improving keyboard widget default rendering
FEATURE: Added ILI9342 driver
FIX: Fixing issues where wrong 'progress' color from widget style palette was used
FEATURE: Added GWIN_FRAME_KEEPONCLOSE flag to prevent destruction of a frame on close
*** Release 2.4 ***

View File

@ -28,11 +28,11 @@
#define FRM_BORDER_B 2 // Bottom Border
/* Internal state flags */
#define GWIN_FRAME_USER_FLAGS (GWIN_FRAME_CLOSE_BTN|GWIN_FRAME_MINMAX_BTN)
#define GWIN_FRAME_CLOSE_PRESSED (GWIN_FRAME_MINMAX_BTN << 1)
#define GWIN_FRAME_MIN_PRESSED (GWIN_FRAME_MINMAX_BTN << 2)
#define GWIN_FRAME_MAX_PRESSED (GWIN_FRAME_MINMAX_BTN << 3)
#define GWIN_FRAME_REDRAW_FRAME (GWIN_FRAME_MINMAX_BTN << 4) // Only redraw the frame
#define GWIN_FRAME_USER_FLAGS (GWIN_FRAME_CLOSE_BTN|GWIN_FRAME_MINMAX_BTN|GWIN_FRAME_KEEPONCLOSE)
#define GWIN_FRAME_CLOSE_PRESSED (GWIN_FRAME_KEEPONCLOSE << 1)
#define GWIN_FRAME_MIN_PRESSED (GWIN_FRAME_KEEPONCLOSE << 2)
#define GWIN_FRAME_MAX_PRESSED (GWIN_FRAME_KEEPONCLOSE << 3)
#define GWIN_FRAME_REDRAW_FRAME (GWIN_FRAME_KEEPONCLOSE << 4) // Only redraw the frame
#if GWIN_FRAME_CLOSE_BTN < GWIN_FIRST_CONTROL_FLAG
#error "GWIN Frame: - Flag definitions don't match"
#endif
@ -96,6 +96,7 @@ static void forceFrameRedraw(GWidgetObject *gw) {
gw->g.flags &= ~(GWIN_FRAME_CLOSE_PRESSED|GWIN_FRAME_MAX_PRESSED|GWIN_FRAME_MIN_PRESSED);
forceFrameRedraw(gw);
_gwinSendEvent(&gw->g, GEVENT_GWIN_CLOSE);
if (!(gw->g.flags & GWIN_FRAME_KEEPONCLOSE))
_gwinDestroy(&gw->g, REDRAW_INSESSION);
return;
}
@ -129,6 +130,7 @@ static void forceFrameRedraw(GWidgetObject *gw) {
gw->g.flags &= ~(GWIN_FRAME_CLOSE_PRESSED|GWIN_FRAME_MAX_PRESSED|GWIN_FRAME_MIN_PRESSED);
forceFrameRedraw(gw);
_gwinSendEvent(&gw->g, GEVENT_GWIN_CLOSE);
if (!(gw->g.flags & GWIN_FRAME_KEEPONCLOSE))
_gwinDestroy(&gw->g, REDRAW_INSESSION);
return;
}

View File

@ -31,9 +31,10 @@
* @brief Flags for gwinFrameCreate()
* @{
*/
#define GWIN_FRAME_BORDER 0x00000000 // Deprecated. A border is always shown with a frame window now.
#define GWIN_FRAME_CLOSE_BTN 0x00000001
#define GWIN_FRAME_MINMAX_BTN 0x00000002
#define GWIN_FRAME_BORDER 0x00000000 /**< Deprecated. A border is always shown with a frame window now. */
#define GWIN_FRAME_CLOSE_BTN 0x00000001 /**< Should a close button be shown? */
#define GWIN_FRAME_MINMAX_BTN 0x00000002 /**< Should minimize and maximize buttons be shown? */
#define GWIN_FRAME_KEEPONCLOSE 0x00000004 /**< Don't automatically destroy the frame on close */
/** @} */
typedef GContainerObject GFrameObject;