Landtiger LPC1768 C BigLib 1
A self made, custom C library for the LandTiger board.
 
Loading...
Searching...
No Matches
glcd_types.h File Reference
#include "glcd_errors.h"
#include "types.h"
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  LCD_Coordinate
 
struct  LCD_Dimension
 
struct  LCD_Padding
 
struct  LCD_BBox
 
struct  LCD_Font
 
struct  LCD_Line
 
struct  LCD_Rect
 
struct  LCD_Circle
 
struct  LCD_Image
 
struct  LCD_Text
 
struct  LCD_ButtonLabel
 
struct  LCD_Button
 
struct  LCD_Component
 Used to store a drawable component of any type. More...
 
struct  LCD_Obj
 Represents a generic object, made up of 1 or more basic components, that are rendered on the screen. More...
 

Macros

#define ASCII_FONT_MIN_VALUE   32
 
#define ASCII_FONT_MAX_VALUE   126
 
#define LCD_TEXT_DEF_CHAR_SPACING   0
 
#define LCD_TEXT_DEF_LINE_SPACING   0
 
#define LCD_NO_PADDING   (LCD_Padding){0, 0, 0, 0}
 

Typedefs

typedef u32 LCD_Color
 Represents a color in the RGB565 format.
 
typedef i8 LCD_FontID
 
typedef i32 LCD_ObjID
 

Enumerations

enum  LCD_Orientation { LCD_ORIENT_VER = 0 , LCD_ORIENT_HOR = 90 , LCD_ORIENT_VER_INV = 180 , LCD_ORIENT_HOR_INV = 270 }
 
enum  LCD_ColorPalette {
  LCD_COL_WHITE = 0xFFFF , LCD_COL_BLACK = 0x0000 , LCD_COL_GREY = 0xF7DE , LCD_COL_BLUE = 0x001F ,
  LCD_COL_BLUE2 = 0x051F , LCD_COL_RED = 0xF800 , LCD_COL_MAGENTA = 0xF81F , LCD_COL_GREEN = 0x07E0 ,
  LCD_COL_CYAN = 0x7FFF , LCD_COL_YELLOW = 0xFFE0 , LCD_COL_NONE = 0x10000
}
 Even though the LCD itself supports 260K colors, the bus interface is only 16-bit, so we can only use 65K colors. More...
 
enum  LCD_DefaultFont { LCD_DEF_FONT_MSGOTHIC = 0 , LCD_DEF_FONT_SYSTEM = 1 }
 
enum  LCD_ComponentType {
  LCD_COMP_LINE , LCD_COMP_RECT , LCD_COMP_CIRCLE , LCD_COMP_IMAGE ,
  LCD_COMP_TEXT , LCD_COMP_BUTTON
}
 Represents a drawable component that can be rendered on the screen. More...
 
enum  LCD_RMAddOption { LCD_ADD_OBJ_OPT_DONT_MARK_VISIBLE = 0x1 }
 

Macro Definition Documentation

◆ ASCII_FONT_MAX_VALUE

#define ASCII_FONT_MAX_VALUE   126

Definition at line 94 of file glcd_types.h.

◆ ASCII_FONT_MIN_VALUE

#define ASCII_FONT_MIN_VALUE   32

Definition at line 93 of file glcd_types.h.

◆ LCD_NO_PADDING

#define LCD_NO_PADDING   (LCD_Padding){0, 0, 0, 0}

Definition at line 151 of file glcd_types.h.

◆ LCD_TEXT_DEF_CHAR_SPACING

#define LCD_TEXT_DEF_CHAR_SPACING   0

Definition at line 149 of file glcd_types.h.

◆ LCD_TEXT_DEF_LINE_SPACING

#define LCD_TEXT_DEF_LINE_SPACING   0

Definition at line 150 of file glcd_types.h.

Typedef Documentation

◆ LCD_Color

typedef u32 LCD_Color

Represents a color in the RGB565 format.

Note
32 bits are used to store the color, but only 17 are used: 5 bits for red, 6 bits for green, and 5 bits for blue, and 1 for the transparency bit.

Definition at line 40 of file glcd_types.h.

◆ LCD_FontID

typedef i8 LCD_FontID

Definition at line 91 of file glcd_types.h.

◆ LCD_ObjID

typedef i32 LCD_ObjID

Definition at line 195 of file glcd_types.h.

Enumeration Type Documentation

◆ LCD_ColorPalette

Even though the LCD itself supports 260K colors, the bus interface is only 16-bit, so we can only use 65K colors.

Enumerator
LCD_COL_WHITE 
LCD_COL_BLACK 
LCD_COL_GREY 
LCD_COL_BLUE 
LCD_COL_BLUE2 
LCD_COL_RED 
LCD_COL_MAGENTA 
LCD_COL_GREEN 
LCD_COL_CYAN 
LCD_COL_YELLOW 
LCD_COL_NONE 

Definition at line 21 of file glcd_types.h.

22{
23 LCD_COL_WHITE = 0xFFFF,
24 LCD_COL_BLACK = 0x0000,
25 LCD_COL_GREY = 0xF7DE,
26 LCD_COL_BLUE = 0x001F,
27 LCD_COL_BLUE2 = 0x051F,
28 LCD_COL_RED = 0xF800,
29 LCD_COL_MAGENTA = 0xF81F,
30 LCD_COL_GREEN = 0x07E0,
31 LCD_COL_CYAN = 0x7FFF,
32 LCD_COL_YELLOW = 0xFFE0,
33 LCD_COL_NONE = 0x10000
LCD_ColorPalette
Even though the LCD itself supports 260K colors, the bus interface is only 16-bit,...
Definition glcd_types.h:22
@ LCD_COL_WHITE
Definition glcd_types.h:23
@ LCD_COL_RED
Definition glcd_types.h:28
@ LCD_COL_BLUE
Definition glcd_types.h:26
@ LCD_COL_NONE
Definition glcd_types.h:33
@ LCD_COL_GREY
Definition glcd_types.h:25
@ LCD_COL_MAGENTA
Definition glcd_types.h:29
@ LCD_COL_GREEN
Definition glcd_types.h:30
@ LCD_COL_YELLOW
Definition glcd_types.h:32
@ LCD_COL_BLACK
Definition glcd_types.h:24
@ LCD_COL_CYAN
Definition glcd_types.h:31
@ LCD_COL_BLUE2
Definition glcd_types.h:27

◆ LCD_ComponentType

Represents a drawable component that can be rendered on the screen.

Enumerator
LCD_COMP_LINE 
LCD_COMP_RECT 
LCD_COMP_CIRCLE 
LCD_COMP_IMAGE 
LCD_COMP_TEXT 
LCD_COMP_BUTTON 

Definition at line 156 of file glcd_types.h.

157{
LCD_ComponentType
Represents a drawable component that can be rendered on the screen.
Definition glcd_types.h:157
@ LCD_COMP_RECT
Definition glcd_types.h:159
@ LCD_COMP_BUTTON
Definition glcd_types.h:163
@ LCD_COMP_IMAGE
Definition glcd_types.h:161
@ LCD_COMP_CIRCLE
Definition glcd_types.h:160
@ LCD_COMP_TEXT
Definition glcd_types.h:162
@ LCD_COMP_LINE
Definition glcd_types.h:158

◆ LCD_DefaultFont

Enumerator
LCD_DEF_FONT_MSGOTHIC 
LCD_DEF_FONT_SYSTEM 

Definition at line 67 of file glcd_types.h.

68{
LCD_DefaultFont
Definition glcd_types.h:68
@ LCD_DEF_FONT_MSGOTHIC
Definition glcd_types.h:69
@ LCD_DEF_FONT_SYSTEM
Definition glcd_types.h:70

◆ LCD_Orientation

Enumerator
LCD_ORIENT_VER 
LCD_ORIENT_HOR 
LCD_ORIENT_VER_INV 
LCD_ORIENT_HOR_INV 

Definition at line 11 of file glcd_types.h.

12{
14 LCD_ORIENT_HOR = 90,
LCD_Orientation
Definition glcd_types.h:12
@ LCD_ORIENT_VER_INV
Definition glcd_types.h:15
@ LCD_ORIENT_HOR
Definition glcd_types.h:14
@ LCD_ORIENT_VER
Definition glcd_types.h:13
@ LCD_ORIENT_HOR_INV
Definition glcd_types.h:16

◆ LCD_RMAddOption

Enumerator
LCD_ADD_OBJ_OPT_DONT_MARK_VISIBLE 

Request GLCD to not mark the newly added object as visible. In that way, it it won't be rendered by any LCD_RMRender() call, unless it's been marked as visible through the LCD_RMSetVisibility() function.

Definition at line 199 of file glcd_types.h.

200{
LCD_RMAddOption
Definition glcd_types.h:200
@ LCD_ADD_OBJ_OPT_DONT_MARK_VISIBLE
Request GLCD to not mark the newly added object as visible. In that way, it it won't be rendered by a...
Definition glcd_types.h:204