






|
 |
Developers
onHand Manual: Lcdbios (C bindings)
Common functions
- int screen(int mode)
Set screen mode to LCD mode (mode:0) or GVRAM mode (mode:1)
- int getscreen(void)
Get the current screen mode
- int cls(int mode)
Clear the screen (b0: work screen, b1: whole GVRAM)
- int lcdon(int power)
Power-on (power:1) or off (power:0) the LCD display
- int getlcdon(void)
Get the LCD power status (1 if LCD display is on, 0 otherwise)
- int mpread(char *buf,char *name)
Load a MonoMap file into the specified memory buffer
- struct moji *mojisize(unsigned short s_code)
Get the character width, height and memory address of the specified font
- int getbufsize(int x1,int y1,int x2,int y2)
int pgetbufsize(RECT *rct )
Returns the buffer size required to hold a MMP of the specified area of LCD
display
- int reverse(int x1,int y1,int x2,int y2 )/int
preverse(RECT *rct)
Set a reverse area in the LCD and returns a handler to it
- int revstart(int num)
Restart the reversing of the specified reverse area (only required if it has
been revstopped)
- int revstop(int num)
Temporary reverse stop of the specified reverse area
- int revend(int num)
Release the specified reverse area handler
- int revdraw(void)
Redraw all active reverse areas
- int blink(int x1,int y1,int x2,int y2,int color)
int pblink(BLINK_DRAW *blk)
Set a blink area in the LCD and returns a handler to it
- int blstop(int num)
Temporary stop blinking the blink area
- int blstart(int num)
Resume blinking of the specified blink area (only required if it has been blstopped)
- int blend(int num)
Release the specified blink area handler
- int lcdfreeze(int mode)
Stop (mode=1) or resume (mode=0) the LCD display refresh from video memory
- int lcdvol(int vol)
Sets the LCD contrast level
- int getlcdvol(void)
Get the LCD contrast level
GVRAM drawing functions
- int gv_place(int x,int y )
int pv_place(POINT *ppt)
Sets the (upper-left) LCD screen origin to the specified GVRAM coordinate
- int gv_kput(int x,int y,char *str,int font,int gap,int
lop)
int pv_kput(KANJI_PUT *kpt)
Draws the specified string in GVRAM using the font, character spacing and
logical operation (0:COPY,1:OR,3:XOR)
- int gv_sput(int x,int y,unisgned short code,int lop)
int pv_sput(SIICODE_PUT *spt)
Puts a SII pictograph into the specified position. Code is between 0xF6C0
(63184) and 0xF93F (63807).
- int gv_aput(int x,int y,int w,int h,unsigned long
addr,int lop)
int pv_aput(FONT_PUT *apt)
Draws the first character of the user-supplied font in the specified
position
- int gv_mmap(int x,int y,char *name,int lop)
int pv_mmap(MMAP_PUT *mpt)
Load a MonoMap file directly into GVRAM in the specified position
- int gv_line(int x1,int y1,int x2,int y2,int
lop,unsigned char style)
int pv_line(LINE_DRAW *lpt)
Draws a line from x1,y1 to x2,y2 using the specified logical operation
(0:COPY,1:OR,3:XOR)
- int gv_square(int x1,int y1,int x2,int y2,int
lop,unsigned long style)
int pv_square(SQUARE_DRAW *spt)
Draws a rectangle (lop&3: logical operation; lop&4:0 not filled, LSB
of style is line draw format; lop&4:1 filled, style is tile pattern).
- gv_circle(int x,int y,int xr,int yr,int d1,int d2,int
lop,unsigned long style,unsigned char *buf)
int pv_circle(CIRCLE_DRAW *cpt)
Display a circle/oval, circle/oval arc or fan at position x, y, with radius
xr and yr, start/end angles d1 and d2, logical operation lop b1,b0 (00:COPY,
01: XOR, 10:OR, 11:AND), b2 (0: do not fill, LSB of style is line draw
format, 1: fill, style is fill pattern) and b4,b3 (0X: Circle/oval, 10:Arc,
11:Fan). Buf is an 8000 bytes buffer needed to draw a fan (not needed
elsewhere).
- int gv_pset(int x,int y,int lop)
int pv_pset(POINT_DRAW *ppt)
Draws the specified pixel using the specified logical operation and color in
lop b1,b0 (00: COPY, 01: XOR, 10: OR, 11:AND) and b2 (0: Clear, 1:Black)
- int gv_point(int x,int y)
int pv_point(POINT *ppt)
Get the color (1:Black, 0:White) of the specified position
- int gv_get(int x1,int y1,int x2,int y2,char *buf)
int pv_get(GVRAM_GET *gpt)
Stores the specified screen rectangle into the specified MonoMap memory
buffer
- int gv_put(int x,int y,char *buf,int logic)
int pv_put(GVRAM_PUT *gpt)
Draws the specified monomap buffer into the specified screen coordinate with
the specified logical operation (0:COPY, 1: XOR, 2:OR, 3:AND)
- int gv_scroll(int lines)
Scroll GVRAM the specified number of pixels (lines)
- int gv_reverse(int x1,int y1,int x2,int y2)
int pv_reverse(RECT *rpt)
Reverse the contents of the specified area of GVRAM
- int gv_clear(int x1,int y1,int x2,int y2)
int pv_clear(RECT *cpt)
Clear (set to 0) the specified area of GVRAM
LCD direct drawing functions (analogous to the GVRAM functions of similar
name)
- int lc_kput(int x,int y,char *str,int font,int gap,int
lop)
int pc_kput(KANJI_PUT *kpt)
Draws the specified string in LCD using the font, character spacing and
logical operation (0:COPY,1:OR,3:XOR)
- int lc_sput(int x,int y,unisgned short code,int lop)
int pc_sput(SIICODE_PUT *spt)
Puts a SII pictograph into the specified position. Code is between 0xF6C0
(63184) and 0xF93F (63807).
- int lc_aput(int x,int y,int w,int h,unsigned long
addr,int lop)
int pc_aput(FONT_PUT *apt)
Draws the first character of the user-supplied font in the specified
position
- int lc_mmap(int x,int y,char *name,int lop)
int pc_mmap(MMAP_PUT *mpt)
Load a MonoMap file directly into LCD in the specified position
- int lc_line(int x1,int y1,int x2,int y2,int
lop,unsigned char style)
int pc_line(LINE_DRAW *lpt)
Draws a line from x1,y1 to x2,y2 using the specified logical operation
(0:COPY,1:OR,3:XOR)
- int lc_square(int x1,int y1,int x2,int y2,int
lop,unsigned long style)
int pc_square(SQUARE_DRAW *spt)
Draws a rectangle (lop&3: logical operation; lop&4:0 not filled, LSB
of style is line draw format; lop&4:1 filled, style is tile pattern).
- lc_circle(int x,int y,int xr,int yr,int d1,int d2,int
lop,unsigned long style,unsigned char *buf)
int pc_circle(CIRCLE_DRAW *cpt)
Display a circle/oval, circle/oval arc or fan at position x, y, with radius
xr and yr, start/end angles d1 and d2, logical operation lop b1,b0 (00:COPY,
01: XOR, 10:OR, 11:AND), b2 (0: do not fill, LSB of style is line draw
format, 1: fill, style is fill pattern) and b4,b3 (0X: Circle/oval, 10:Arc,
11:Fan). Buf is an 8000 bytes buffer needed to draw a fan (not needed
elsewhere).
- int lc_pset(int x,int y,int lop)
int pc_pset(POINT_DRAW *ppt)
Draws the specified pixel using the specified logical operation and color in
lop b1,b0 (00: COPY, 01: XOR, 10: OR, 11:AND) and b2 (0: Clear, 1:Black)
- int lc_point(int x,int y)
int pc_point(POINT *ppt)
Get the color (1:Black, 0:White) of the specified position
- int lc_get(int x1,int y1,int x2,int y2,char *buf)
int pc_get(LCD_GET *gpt)
Stores the specified screen rectangle into the specified MonoMap memory
buffer
- int lc_put(int x,int y,char *buf,int logic)
int pc_put(LCD_PUT *gpt)
Draws the specified monomap buffer into the specified screen coordinate with
the specified logical operation (0:COPY, 1: XOR, 2:OR, 3:AND)
- int lc_scroll(int lines)
Scroll LCD the specified number of pixels (lines)
- int lc_reverse(int x1,int y1,int x2,int y2)
int pc_reverse(RECT *rpt)
Reverse the contents of the specified area of LCD
- int lc_clear(int x1,int y1,int x2,int y2)
int pc_clear(RECT *cpt)
Clear (set to 0) the specified area of LCD
Written with the information provided in the onHand
manuals. Copyleft by dario@softhome.net
This text is distributed under the GNU FDL. Last updated (dd/mm/yyyy):
21/10/2001
|