aboutsummaryrefslogtreecommitdiff
path: root/arch/casiowin/fxlib/include/fxlib/display.h
blob: 7bf6a8871bfa111e270f63e3fc89b17408ec652b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* ****************************************************************************
 * fxlib's display management.
 * ************************************************************************* */
#include <fxlib/cdefs.h>
#include <dispbios.h>
__BEGIN_NAMESPACE_FXLIB
__BEGIN_DECLS

/* ************************************************************************* */
/*  Interact with the VRAM/display driver                                    */
/* ************************************************************************* */
/* Clear the screen/VRAM */
extern void Bdisp_AllClr_DD     _OF((void)) __THROW;
extern void Bdisp_AllClr_VRAM   _OF((void)) __THROW;
extern void Bdisp_AllClr_DDVRAM _OF((void)) __THROW;

/* Clear an area of the screen/vram */
extern __nonnull(1, __pArea)
void Bdisp_AreaClr_DD     _OF((const DISPBOX *__pArea)) __THROW;
extern __nonnull(1, __pArea)
void Bdisp_AreaClr_VRAM   _OF((const DISPBOX *__pArea)) __THROW;
extern __nonnull(1, __pArea)
void Bdisp_AreaClr_DDVRAM _OF((const DISPBOX *__pArea)) __THROW;

/* Reverse an area of the VRAM */
extern void Bdisp_AreaReverseVRAM _OF((int __x1, int __y1, int __x2, int __y2))
	__THROW;

/* Update the display */
extern void Bdisp_PutDisp_DD _OF((void)) __THROW;
extern __nonnull(1, __PutDispArea)
void Bdisp_PutDispArea_DD _OF((const DISPBOX *__PutDispArea))
	__THROW;

/* Get the content of the display/VRAM */
extern __nonnull(1, __pData)
void Bdisp_GetDisp_DD   _OF((unsigned char *__pData))
	__THROW;
extern __nonnull(1, __pData)
void Bdisp_GetDisp_VRAM _OF((unsigned char *__pData))
	__THROW;

/* Get an area from the display/VRAM */
extern __nonnull(1, __ReadArea) __nonnull(2, __ReadData)
void Bdisp_ReadArea_DD   _OF((const DISPBOX *__ReadArea,
	unsigned char *__ReadData)) __THROW;
extern __nonnull(1, __ReadArea) __nonnull(2, __ReadData)
void Bdisp_ReadArea_VRAM _OF((const DISPBOX *__ReadArea,
	unsigned char *__ReadData)) __THROW;

/* Get the VRAM address */
extern void *Bdisp_GetVRAMAddress _OF((void)) __THROW;

/* Set a point (pixel) */
extern void Bdisp_SetPoint_DD     _OF((int __x, int __y,
	unsigned char __point)) __THROW;
extern void Bdisp_SetPoint_VRAM   _OF((int __x, int __y,
	unsigned char __point)) __THROW;
extern void Bdisp_SetPoint_DDVRAM _OF((int __x, int __y,
	unsigned char __point)) __THROW;

/* Get a point (pixel) */
extern __wur int Bdisp_GetPoint_VRAM _OF((int __x, int __y)) __THROW;
/* ************************************************************************* */
/*  Drawing functions                                                        */
/* ************************************************************************* */
/* write a graph */
extern __nonnull(1, __WriteGraph)
void Bdisp_WriteGraph_DD     _OF((const DISPGRAPH *__WriteGraph)) __THROW;
extern __nonnull(1, __WriteGraph)
void Bdisp_WriteGraph_VRAM   _OF((const DISPGRAPH *__WriteGraph)) __THROW;
extern __nonnull(1, __WriteGraph)
void Bdisp_WriteGraph_DDVRAM _OF((const DISPGRAPH *__WriteGraph)) __THROW;

/* Draw/clear a line */
extern void Bdisp_DrawLineVRAM  _OF((int __x1, int __y1, int __x2, int __y2))
	__THROW;
extern void Bdisp_ClearLineVRAM _OF((int __x1, int __y1, int __x2, int __y2))
	__THROW;

# if __USE_FXLIB_UNOFFICIAL
/* Put a shape */
extern __nonnull(1, __shape) void Bdisp_ShapeToVRAM    _OF((shape_t *__shape))
	__THROW;
extern __nonnull(1, __shape) void Bdisp_ShapeToDD      _OF((shape_t *__shape))
	__THROW;
extern __nonnull(1, __shape) void Bdisp_ShapeToVRAM_DD _OF((shape_t *__shape))
	__THROW;

/* Put a rectangle */
extern void Bdisp_DrawRectangle _OF((int __x1, int __y1, int __x2, int __y2))
	__THROW;
# endif
/* ************************************************************************* */
/*  Text printing                                                            */
/* ************************************************************************* */
/* Change the cursor position */
extern void locate _OF((int __x, int __y)) __THROW;

/* Print a string */
extern __nonnull(1, __str) void Print    _OF((const unsigned char *__str))
	__THROW;
extern __nonnull(1, __str) void PrintRev _OF((const unsigned char *__str))
	__THROW;

/* Print a character */
extern __nonnull(1, __chr) void PrintC    _OF((const unsigned char *__chr))
	__THROW;
extern __nonnull(1, __str) void PrintRevC _OF((const unsigned char *__str))
	__THROW;

/* Print a line */
extern __nonnull(1, __str)
void PrintLine  _OF((const unsigned char *__str, int __max)) __THROW;
extern __nonnull(1, __str)
void PrintRLine _OF((const unsigned char *__str, int __max)) __THROW;

/* Print at a position */
extern __nonnull(3, __str)
void PrintXY   _OF((int __x, int __y, const unsigned char *__str,
	int __type)) __THROW;
extern __nonnull(3, __str)
int  PrintMini _OF((int __x, int __y, const unsigned char *__str,
	int __type)) __THROW;

/* Save and restore the display */
extern void    SaveDisp _OF((unsigned char __num)) __THROW;
extern void RestoreDisp _OF((unsigned char __num)) __THROW;

/* Make a pop-up window */
extern void PopUpWin _OF((int __n)) __THROW;

__END_DECLS
__END_NAMESPACE_FXLIB