Welcome to the EyeBot
Version 7 - RPi1
A Controller For Various Hardware IO
|
Header file for the LCD functions. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include <jpeglib.h>
#include <jerror.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include "types.h"
#include <stdarg.h>
#include "system.h"
#include "globals.h"
#include "key.h"
#include "listmenu.h"
#include <math.h>
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE |
#define | HELVETICA 0 |
#define | TIMES 1 |
#define | COURIER 2 |
#define | NORMAL 0 |
#define | BOLD 1 |
#define | ITALICS 2 |
#define | MIN(a, b) (((a)<(b))?(a):(b)) |
#define | MAX(a, b) (((a)>(b))?(a):(b)) |
#define | LCD_MAX_LIST_ITEM MAX(1,(gLCDHandle->height/(gLCDHandle->fontHeight*2))-2) |
#define | LCD_WHITE getColor("white") |
#define | LCD_SILVER getColor("light gray") |
#define | LCD_LIGHTGRAY getColor("light gray") |
#define | LCD_LIGHTGREY getColor("light grey") |
#define | LCD_GRAY getColor("gray") |
#define | LCD_DARKGRAY getColor("dark gray") |
#define | LCD_DARKGREY getColor("dark grey") |
#define | LCD_BLACK getColor("black") |
#define | LCD_BLUE getColor("blue") |
#define | LCD_NAVY getColor("navy") |
#define | LCD_AQUA getColor("aquamarine") |
#define | LCD_CYAN getColor("cyan") |
#define | LCD_TEAL getColor("dark cyan") |
#define | LCD_FUCHSIA getColor("magenta") |
#define | LCD_MAGENTA getColor("magenta") |
#define | LCD_PURPLE getColor("purple") |
#define | LCD_RED getColor("red") |
#define | LCD_MAROON getColor("maroon") |
#define | LCD_YELLOW getColor("yellow") |
#define | LCD_OLIVE getColor("dark olive green") |
#define | LCD_LIME getColor("lime green") |
#define | LCD_GREEN getColor("green") |
#define | RED 0xFF00000 |
#define | GREEN 0x00FF00 |
#define | BLUE 0x0000FF |
#define | WHITE 0xFFFFFF |
#define | GRAY 0x808080 |
#define | BLACK 0x000000 |
#define | SILVER 0xC0C0C0 |
#define | LIGHTGRAY 0xD3D3D3 |
#define | DARKGRAY 0xA9A9A9 |
#define | NAVY 0x000080 |
#define | CYAN 0x00EEEE |
#define | TEAL 0x008080 |
#define | MAGENTA 0xFF00FF |
#define | PURPLE 0x800080 |
#define | MAROON 0x800000 |
#define | YELLOW 0xFFFF00 |
#define | OLIVE 0x9ACD32 |
#define | ORANGE 0xFFA500 |
#define | LCD_BGCOL_TRANSPARENT 0x01 |
#define | LCD_BGCOL_NOTRANSPARENT 0x10 |
#define | LCD_BGCOL_INVERSE 0x02 |
#define | LCD_BGCOL_NOINVERSE 0x20 |
#define | LCD_FGCOL_INVERSE 0x04 |
#define | LCD_FGCOL_NOINVERSE 0x40 |
#define | LCD_AUTOREFRESH 0x0001 |
#define | LCD_NOAUTOREFRESH 0x0100 |
#define | LCD_SCROLLING 0x0002 |
#define | LCD_NOSCROLLING 0x0200 |
#define | LCD_LINEFEED 0x0004 |
#define | LCD_NOLINEFEED 0x0400 |
#define | LCD_SHOWMENU 0x0008 |
#define | LCD_HIDEMENU 0x0800 |
#define | LCD_LISTMENU 0x0010 |
#define | LCD_CLASSICMENU 0x1000 |
#define | LCD_FB_ROTATE 0x0080 |
#define | LCD_FB_NOROTATION 0x8000 |
#define | FONTDEFAULT "6x13" |
#define | FONTBOLD "6x13bold" |
Functions | |
int | LCDDrawFrame (int x1, int y1, int x2, int y2, XColor color) |
Draw a bordered frame. More... | |
int | LCDDrawMenu (void) |
Draw the menu. More... | |
int | LCDDrawList (void) |
Draw the list. More... | |
int | LCDInit () |
Initialize the LCD. More... | |
int | LCDClear (void) |
Clear the LCD display and all display buffers ie. turn it black. More... | |
int | LCDSetMode (HWORD mode) |
Update the internal mode flag bits. More... | |
HWORD | LCDGetMode (void) |
Get the internal mode flag bits. More... | |
int | LCDResetMode (HWORD mode) |
Reset the internal mode flag bits to a previously saved mode. More... | |
int | LCDMenu (char *string1, char *string2, char *string3, char *string4) |
Set menu entries in KEY_CLASSIC mode (4-buttons). Also sets the LCD_SHOWMENU flag and refresh the LCD. More... | |
int | LCDMenuIRaw (int pos, char *string, XColor fgcol, XColor bgcol, void *userp) |
Set specific menu entry in KEY_CLASSIC mode (index given by pos). Color customization for specific key is now possible (fgcol/bgcol). A user-specific data can be linked to the menu using userp pointer. Will also set the LCD_SHOWMENU flag and refresh the LCD. More... | |
int | LCDMenuI (int pos, char *string, COLOR fg, COLOR bg) |
A wrapper for LCDMenuIRaw. More... | |
MENU_ITEM * | LCDMenuItem (int index) |
Return the menuitem at a given position. More... | |
int | LCDList (LIST_MENU *menulist) |
Setup the list menu display and update appropriate info in the LIST_MENU structure pointed by menulist (e.g. scroll, count). Will also set the LCD_LISTMENU flag and refresh the LCD. More... | |
int | LCDSetList (LIST_MENU *menulist) |
Unlike LCDList(), this will blindly assign menulist to the mainlist for display. Doesn't update anything in the menulist structure, nor modify any internal flags. Useful to maintain multiple lists for menu display. More... | |
LIST_MENU * | LCDGetList (void) |
Get the currently active list menu. More... | |
RECT * | LCDListBox (int pos) |
Get the frame info of a specific list item in form of a RECT structure. More... | |
MENU_ITEM * | LCDListActiveItem (void) |
Get the selected menuitem in the list menu – using index & start variable in LIST_MENU. Will return 0x0 (NUL) if no item is currently selected. More... | |
XColor | getColor (char *colorName) |
Return the XColor color from the color name. More... | |
XColor | InvertColor (XColor color) |
Invert a RGB color. More... | |
int | LCDNeedRefresh (void) |
Indicate if the LCD need to be refreshed. More... | |
int | LCDAreaRaw (int x1, int y1, int x2, int y2, XColor color) |
Draw a color-filled rectangle with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate. More... | |
int | LCDArea (int x1, int y1, int x2, int y2, COLOR col, int fill) |
A wrapper for LCDAreaRaw. More... | |
int | LCDSetPixel (int x, int y, XColor color) |
Sets the color of the pixel at (x,y) coordinate to color. More... | |
int | LCDPixel (int x, int y, COLOR col) |
A wrapper for LCDSet Pixel. More... | |
XColor | LCDGetPixel (int x, int y) |
Get the RGB color value of the pixel at (x,y) coordinate. More... | |
int | LCDPixelInvert (int x, int y) |
Bit-invert the color of the pixel at (x,y) coordinate. More... | |
int | LCDLineRaw (int x1, int y1, int x2, int y2, XColor color) |
Draw a color line from (x1,y1) to (x2,y2). More... | |
int | LCDLine (int x1, int y1, int x2, int y2, COLOR col) |
A wrapper for LCDLineRaw. More... | |
int | LCDLineInvert (int x1, int y1, int x2, int y2) |
Draw a line from (x1,y1) to (x2,y2). The line pixels will invert the color of existing pixels. More... | |
int | LCDAreaInvert (int x1, int y1, int x2, int y2) |
Draw a rectangle with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate. The pixels in the specified area will invert the color of existing pixels. More... | |
int | LCDCircle (int x1, int y1, int size, COLOR col, int fill) |
Draws a circle. More... | |
int | LCDCircleInvert (int x1, int y1, int size) |
Inverts the pixels inside of the given circle. More... | |
int | LCDFrame (int x1, int y1, int x2, int y2, XColor color) |
Draw a color rectangle frame with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate. More... | |
int | LCDRect (int x1, int y1, int x2, int y2, COLOR col) |
A wrapper for LCDDrawFrame. More... | |
int | LCDTextColor (XColor fgcol, XColor bgcol, char colorflags) |
Set the default color for text (including background) and related flags (e.g. for transparent background). More... | |
int | LCDSetColor (COLOR fg, COLOR bg) |
A wrapper for LCDTextColor. More... | |
int | LCDPrintf (const char *format,...) |
Print formatted string to LCD and refresh LCD. Cursor position is updated. More... | |
int | LCDPrintfFont (EYEFONT eyeFont, const char *format,...) |
Print formatted string to LCD and refresh LCD. Cursor position is updated. More... | |
int | LCDSetPrintf (int row, int column, const char *format,...) |
LCDPrintf with text position specified. More... | |
int | LCDSetPrintfFont (int row, int column, EYEFONT eyeFont, const char *format,...) |
LCDPrintf with text position and text colour specified. More... | |
int | LCDSetPos (int row, int column) |
Set the text cursor position to (row, column). More... | |
int | LCDGetPos (int *row, int *column) |
Get the text cursor position. More... | |
RECT | LCDTextBar (int row, int column, int length, int fill, XColor color) |
Draw a textbar for text starting at position (row, column) until (row, column+length). The textbar will take about 25%-50% of text height & width to draw its frame. The fill parameter will define how much of the text bar should be 'filled' with color (like a progress bar). More... | |
int | LCDRelease () |
Release the LCD. More... | |
int | LCDRefresh (void) |
Refresh the screen (i.e write display buffers to the framebuffer device). Refreshes the menu. More... | |
int | LCDGetFBInfo (FBINFO *pinfo) |
Get display information and save to structure pointed by pinfo. Cursor info needs LCDInit() for textsize. More... | |
int | LCDListCount (void) |
Get the number of list items supported by the current display (text) configuration. This includes the item for title bar - thus, different from count variable in LIST_MENU as updated by an LCDList() call. More... | |
int | LCDListIndex (int index) |
Set the list index. More... | |
int | LCDListScrollUp (void) |
Scrolls the list display up. Menu index is not altered. If the active menu item goes out of focus, the index becomes negative (no item selected). More... | |
int | LCDListScrollDown (void) |
Scrolls the list display down. Menu index is not altered. If the active menu item goes out of focus, the index becomes negative (no item selected). More... | |
int | LCDPutImageRGB (int xpos, int ypos, int xsize, int ysize, BYTE *data) |
Place a RGB color image (24bpp) at (xpos,ypos) position on the LCD screen. More... | |
int | LCDPutImageGrey (int xpos, int ypos, int xsize, int ysize, BYTE *data) |
Place a Grey image (24bpp) at (xpos,ypos) position on the LCD screen. More... | |
int | LCDPutImageJPG (int xpos, int ypos, int xsize, int ysize, char *path) |
int | LCDImageStart (int t, int x, int y, int xs, int ys) |
Sets the parameters for subsequent image draws. More... | |
int | LCDImage (BYTE *img) |
Draws a colour (RGB) image to the LCD. More... | |
int | LCDImageGray (BYTE *g) |
Draws a grey image to the LCD. More... | |
int | LCDSetFontRaw (char *fontAlias) |
Sets the font using alias in Xlib. More... | |
int | LCDSetFont (int font, int variation) |
Sets the font using fontName and variation. More... | |
int | LCDSetFontSize (int fontsize) |
Sets the font size. More... | |
int | LCDGetSize (int *x, int *y) |
Get LCD resolution in pixels. More... | |
Variables | |
int | LCD_INITIAL |
int | IM_TYPE |
int | IM_LEFT |
int | IM_TOP |
int | IM_WIDTH |
int | IM_LENGTH |
Header file for the LCD functions.
XColor getColor | ( | char * | colorName | ) |
Return the XColor color from the color name.
char* | colorName |
XColor InvertColor | ( | XColor | color | ) |
Invert a RGB color.
XColor | color : RGB color value |
int LCDArea | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
COLOR | col, | ||
int | fill | ||
) |
A wrapper for LCDAreaRaw.
int | x1 : X-coordinate of top-left pixel |
int | y1 : Y-coordinate of top-left pixel |
int | x2 : X-coordinate of bottom-right pixel |
int | y2 : Y-coordinate of bottom-right pixel |
XColor | color : RGB fill color value |
int LCDAreaInvert | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draw a rectangle with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate. The pixels in the specified area will invert the color of existing pixels.
int | x1 : X-coordinate of top-left pixel |
int | y1 : Y-coordinate of top-left pixel |
int | x2 : X-coordinate of bottom-right pixel |
int | y2 : Y-coordinate of bottom-right pixel |
int LCDAreaRaw | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
XColor | color | ||
) |
Draw a color-filled rectangle with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate.
int | x1 : X-coordinate of top-left pixel |
int | y1 : Y-coordinate of top-left pixel |
int | x2 : X-coordinate of bottom-right pixel |
int | y2 : Y-coordinate of bottom-right pixel |
XColor | color : RGB fill color value |
int LCDCircle | ( | int | x1, |
int | y1, | ||
int | size, | ||
COLOR | col, | ||
int | fill | ||
) |
Draws a circle.
int | x1 : X-coordinate of the centre |
int | y1 : Y-coordinate of the centre |
int | size : radius of the circle |
COLOR | col: the color of the circle |
int | fill : fill(1) or no fill(0) |
int LCDCircleInvert | ( | int | x1, |
int | y1, | ||
int | r | ||
) |
Inverts the pixels inside of the given circle.
int | x1 : X-coordinate of the centre |
int | y1 : Y-coordinate of the centre |
int | r the radius of the circle |
int LCDClear | ( | void | ) |
Clear the LCD display and all display buffers ie. turn it black.
int LCDDrawFrame | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
XColor | color | ||
) |
Draw a bordered frame.
int | x1 : X-coordinate of top-left pixel |
int | y1 : Y-coordinate of top-left pixel |
int | x2 : X-coordinate of bottom-right pixel |
int | y2 : Y-coordinate of bottom-right pixel |
int LCDDrawList | ( | void | ) |
Draw the list.
int LCDDrawMenu | ( | void | ) |
Draw the menu.
int LCDFrame | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
XColor | color | ||
) |
Draw a color rectangle frame with (x1,y1) as top-left coordinate and (x2,y2) as the bottom-right coordinate.
int | x1 : X-coordinate of top-left pixel |
int | y1 : Y-coordinate of top-left pixel |
int | x2 : X-coordinate of bottom-right pixel |
int | y2 : Y-coordinate of bottom-right pixel |
XColor | color : RGB fill color value |
int LCDGetFBInfo | ( | FBINFO * | pinfo | ) |
Get display information and save to structure pointed by pinfo. Cursor info needs LCDInit() for textsize.
FBINFO* | pinfo : Pointer to storage for screen & cursor info |
LIST_MENU* LCDGetList | ( | void | ) |
Get the currently active list menu.
HWORD LCDGetMode | ( | void | ) |
Get the internal mode flag bits.
XColor LCDGetPixel | ( | int | x, |
int | y | ||
) |
Get the RGB color value of the pixel at (x,y) coordinate.
int | x : X-coordinate of the pixel |
int | y : Y-coordinate of the pixel |
int LCDGetPos | ( | int * | row, |
int * | column | ||
) |
Get the text cursor position.
int* | row : Pointer to cursor row index |
int* | column : Pointer to cursor column index |
int LCDGetSize | ( | int * | x, |
int * | y | ||
) |
Get LCD resolution in pixels.
x | : Where to store the width of the LCD |
y | : Where to store the height of the LCD |
int LCDImage | ( | BYTE * | img | ) |
Draws a colour (RGB) image to the LCD.
img | : A pointer to the BYTE buffer of the image |
int LCDImageGray | ( | BYTE * | greyImage | ) |
Draws a grey image to the LCD.
img | : A pointer to the BYTE buffer of the image |
int LCDImageStart | ( | int | t, |
int | x, | ||
int | y, | ||
int | xs, | ||
int | ys | ||
) |
Sets the parameters for subsequent image draws.
int | t : the image type |
int | x : x-coordinate of top-left image position |
int | y : y-coordinate of top-left image position |
int | xs : Image width |
int | ys : Image height |
int LCDInit | ( | ) |
Initialize the LCD.
int LCDLine | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
COLOR | col | ||
) |
A wrapper for LCDLineRaw.
int | x1 : X-coordinate of first pixel |
int | y1 : Y-coordinate of first pixel |
int | x2 : X-coordinate of second pixel |
int | y2 : Y-coordinate of second pixel |
col | : RGB color value for the pixel |
int LCDLineInvert | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draw a line from (x1,y1) to (x2,y2). The line pixels will invert the color of existing pixels.
int | x1 : X-coordinate of first pixel |
int | y1 : Y-coordinate of first pixel |
int | x2 : X-coordinate of second pixel |
int | y2 : Y-coordinate of second pixel |
int LCDLineRaw | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
XColor | color | ||
) |
Draw a color line from (x1,y1) to (x2,y2).
int | x1 : X-coordinate of first pixel |
int | y1 : Y-coordinate of first pixel |
int | x2 : X-coordinate of second pixel |
int | y2 : Y-coordinate of second pixel |
XColor | color : RGB color value for the pixel |
int LCDList | ( | LIST_MENU * | menulist | ) |
Setup the list menu display and update appropriate info in the LIST_MENU structure pointed by menulist (e.g. scroll, count). Will also set the LCD_LISTMENU flag and refresh the LCD.
LIST_MENU* | menulist : Listmenu to be used for display |
MENU_ITEM* LCDListActiveItem | ( | void | ) |
RECT* LCDListBox | ( | int | pos | ) |
int LCDListCount | ( | void | ) |
int LCDListIndex | ( | int | index | ) |
Set the list index.
int | index : List index |
int LCDListScrollDown | ( | void | ) |
Scrolls the list display down. Menu index is not altered. If the active menu item goes out of focus, the index becomes negative (no item selected).
int LCDListScrollUp | ( | void | ) |
Scrolls the list display up. Menu index is not altered. If the active menu item goes out of focus, the index becomes negative (no item selected).
int LCDMenu | ( | char * | string1, |
char * | string2, | ||
char * | string3, | ||
char * | string4 | ||
) |
Set menu entries in KEY_CLASSIC mode (4-buttons). Also sets the LCD_SHOWMENU flag and refresh the LCD.
char* | string1 : Menu entry for KEY1 in classic mode |
char* | string2 : Menu entry for KEY2 in classic mode |
char* | string3 : Menu entry for KEY3 in classic mode |
char* | string4 : Menu entry for KEY4 in classic mode |
int LCDMenuI | ( | int | pos, |
char * | string, | ||
COLOR | fg, | ||
COLOR | bg | ||
) |
A wrapper for LCDMenuIRaw.
int | pos : Select menu entry in classic mode (from 1->4) |
char* | string : Menu entry for the key at specified index |
XColor | fgcol : Textcolor for the menu |
XColor | bgcol : Background color for the menu |
void* | userp : A general purpose pointer for user-specific data |
int LCDMenuIRaw | ( | int | pos, |
char * | string, | ||
XColor | fgcol, | ||
XColor | bgcol, | ||
void * | userp | ||
) |
Set specific menu entry in KEY_CLASSIC mode (index given by pos). Color customization for specific key is now possible (fgcol/bgcol). A user-specific data can be linked to the menu using userp pointer. Will also set the LCD_SHOWMENU flag and refresh the LCD.
int | pos : Select menu entry in classic mode |
char* | string : Menu entry for the key at specified index |
XColor | fgcol : Textcolor for the menu |
XColor | bgcol : Background color for the menu |
void* | userp : A general purpose pointer for user-specific data |
MENU_ITEM* LCDMenuItem | ( | int | index | ) |
Return the menuitem at a given position.
int | index : position of the menuitem (from 1->4) |
int LCDNeedRefresh | ( | void | ) |
Indicate if the LCD need to be refreshed.
int LCDPixel | ( | int | x, |
int | y, | ||
COLOR | col | ||
) |
A wrapper for LCDSet Pixel.
int | x : X-coordinate of the pixel |
int | y : Y-coordinate of the pixel |
col | : RGB color value for the pixel |
int LCDPixelInvert | ( | int | x, |
int | y | ||
) |
Bit-invert the color of the pixel at (x,y) coordinate.
int | x : X-coordinate of the pixel |
int | y : Y-coordinate of the pixel |
int LCDPrintf | ( | const char * | format, |
... | |||
) |
Print formatted string to LCD and refresh LCD. Cursor position is updated.
const | char* format : Formatted string |
int LCDPrintfFont | ( | EYEFONT | eyeFont, |
const char * | format, | ||
... | |||
) |
Print formatted string to LCD and refresh LCD. Cursor position is updated.
const | char* format : Formatted string |
int LCDPutImageGrey | ( | int | xpos, |
int | ypos, | ||
int | xsize, | ||
int | ysize, | ||
BYTE * | image | ||
) |
Place a Grey image (24bpp) at (xpos,ypos) position on the LCD screen.
int | xpos : X-coordinate of top-left image position |
int | ypos : Y-coordinate of top-left image position |
int | xsize : Image width |
int | ysize : Image height |
BYTE* | data : Pointer to image data (24-bit per pixel) |
int LCDPutImageRGB | ( | int | xpos, |
int | ypos, | ||
int | xsize, | ||
int | ysize, | ||
BYTE * | data | ||
) |
Place a RGB color image (24bpp) at (xpos,ypos) position on the LCD screen.
int | xpos : X-coordinate of top-left image position |
int | ypos : Y-coordinate of top-left image position |
int | xsize : Image width |
int | ysize : Image height |
BYTE* | data : Pointer to image data (24-bit per pixel) |
int LCDRect | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
COLOR | col | ||
) |
A wrapper for LCDDrawFrame.
int | x1 : X-coordinate of top-left pixel |
int | y1 : Y-coordinate of top-left pixel |
int | x2 : X-coordinate of bottom-right pixel |
int | y2 : Y-coordinate of bottom-right pixel |
int LCDRefresh | ( | void | ) |
Refresh the screen (i.e write display buffers to the framebuffer device). Refreshes the menu.
int LCDRelease | ( | ) |
Release the LCD.
int LCDResetMode | ( | HWORD | mode | ) |
Reset the internal mode flag bits to a previously saved mode.
HWORD | mode : Mode flag - bit XORed |
int LCDSetColor | ( | COLOR | fg, |
COLOR | bg | ||
) |
A wrapper for LCDTextColor.
fg | : Default color for text |
bg | : Default color for text background |
int LCDSetFont | ( | int | fontName, |
int | variation | ||
) |
Sets the font using fontName and variation.
int | fontNmae the type of font |
int | variation the variation (NORMAL/BOLD) |
int LCDSetFontRaw | ( | char * | fontAlias | ) |
Sets the font using alias in Xlib.
fontAlias | the alias for the font |
int LCDSetFontSize | ( | int | fontsize | ) |
Sets the font size.
int | fontsize the size of font |
int LCDSetList | ( | LIST_MENU * | menulist | ) |
Unlike LCDList(), this will blindly assign menulist to the mainlist for display. Doesn't update anything in the menulist structure, nor modify any internal flags. Useful to maintain multiple lists for menu display.
LIST_MENU* | menulist : Listmenu to be used for display |
int LCDSetMode | ( | HWORD | mode | ) |
Update the internal mode flag bits.
HWORD | mode : LCD Mode flag |
int LCDSetPixel | ( | int | x, |
int | y, | ||
XColor | color | ||
) |
Sets the color of the pixel at (x,y) coordinate to color.
int | x : X-coordinate of the pixel |
int | y : Y-coordinate of the pixel |
XColor | color : color value for the pixel |
int LCDSetPos | ( | int | row, |
int | column | ||
) |
Set the text cursor position to (row, column).
int | row : Text cursor row index |
int | column : Text cursor column index |
int LCDSetPrintf | ( | int | row, |
int | column, | ||
const char * | format, | ||
... | |||
) |
LCDPrintf with text position specified.
int | row : Cursor position |
int | column : Cursor position |
const | char* format : Formatted string |
int LCDSetPrintfFont | ( | int | row, |
int | column, | ||
EYEFONT | eyeFont, | ||
const char * | format, | ||
... | |||
) |
LCDPrintf with text position and text colour specified.
int | row : Cursor position |
int | column : Cursor position |
XColor | colour : the colour of the text |
const | char* format : Formatted string |
RECT LCDTextBar | ( | int | row, |
int | column, | ||
int | length, | ||
int | fill, | ||
XColor | color | ||
) |
Draw a textbar for text starting at position (row, column) until (row, column+length). The textbar will take about 25%-50% of text height & width to draw its frame. The fill parameter will define how much of the text bar should be 'filled' with color (like a progress bar).
int | row : Start text cursor position |
int | column : Start text cursor position |
int | length : Text length of the bar |
int | fill : Percentage of textbar to be filled |
XColor | color : Fill color for the textbar |
int LCDTextColor | ( | XColor | fgcol, |
XColor | bgcol, | ||
char | colorflags | ||
) |
Set the default color for text (including background) and related flags (e.g. for transparent background).
XColor | fgcol : Default color for text |
XColor | bgcol : Default color for text background |
char | colorflags : Mode flag for text color |
Valid value for colorflags :