File: poutput.h

package info (click to toggle)
ocp 1%3A0.1.21-1.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,344 kB
  • ctags: 7,862
  • sloc: ansic: 91,449; cpp: 9,729; sh: 3,119; makefile: 2,482
file content (91 lines) | stat: -rw-r--r-- 5,142 bytes parent folder | download | duplicates (3)
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
#ifndef __POUTPUT_H
#define __POUTPUT_H

#include "boot/console.h" /* currently from boot/console.h... to be moved later */

#ifndef _CONSOLE_DRIVER

#define vga13() (_vga13())
#define plSetTextMode(x) (_plSetTextMode(x))
#define plSetBarFont(x) (_plSetBarFont(x))
#define displaystr(y, x, attr, str, len) (_displaystr(y, x, attr, str, len))
#define displaystrattr(y, x, buf, len) (_displaystrattr(y, x, buf, len))
#define displaystrattrdi(y, x, txt, attr, len) (_displaystrattrdi(y, x, txt, attr, len))
#define displayvoid(y, x, len) (_displayvoid(y, x, len))
#define plSetGraphMode(size) (_plSetGraphMode(size))
#define gdrawchar(x, y, c, f, b) (_gdrawchar(x, y, c, f, b))
#define gdrawchart(x, y, c, f) (_gdrawchart(x, y, c, f))
#define gdrawcharp(x, y, c, f, picp) (_gdrawcharp(x, y, c, f, picp))
#define gdrawchar8(x, y, c, f, b) (_gdrawchar8(x, y, c, f, b))
#define gdrawchar8t(x, y, c, f) (_gdrawchar8t(x, y, c, f))
#define gdrawchar8p(x, y, c, f, picp) (_gdrawchar8p(x, y, c, f, picp))
#define gdrawstr(y, x, s, len, f, b) (_gdrawstr(y, x, s, len, f, b))
#define gupdatestr(y, x, str, len, old) (_gupdatestr(y, x, str, len, old))
#define drawbar(x, yb, yh, hgt, c) (_drawbar(x, yb, yh, hgt, c))
#define idrawbar(x, yb, yh, hgt, c) (_idrawbar(x, yb, yh, hgt, c))
#define gupdatepal(c,r,g,b) (_gupdatepal(c,r,g,b))
#define gflushpal() (_gflushpal())
#define plDisplaySetupTextmode() (_plDisplaySetupText())
#define plGetDisplayTextModeName() (_plGetDisplayTextModeName())
#define Screenshot() (_Screenshot())
#define TextScreenshot(scrType) (_TextScreenshot(scrType))
#define RefreshScreen() (_RefreshScreen())

#define ekbhit() (_ekbhit())
#define egetch() (_egetch())
#define validkey(k) (_validkey(k))

#define setcur(y, x) _setcur(y, x)
#define setcurshape(shape) _setcurshape(shape)
#define conRestore() _conRestore()
#define conSave() _conSave()

#define plDosShell() _plDosShell()

#endif

/* standard functions that can be used to embed in ekbhit and egetch when
 * escaped key-codes are used, or you want to push ready keys (values above 256)
 */
extern void ___push_key(uint16_t);
extern int ___peek_key(void);
extern /*uint16_t*/int ___pop_key(void);
extern void ___setup_key(int(*kbhit)(void), int(*getch)(void));

extern char *convnum(unsigned long num, char *buf, unsigned char radix, unsigned short len, char clip0/*=1*/);
#define _convnum(num,buf,radix,len) convnum(num,buf,radix,len,1)

extern void writenum(uint16_t *buf, unsigned short ofs, unsigned char attr, unsigned long num, unsigned char radix, unsigned short len, char clip0/*=1*/);
#define _writenum(buf, ofs, attr, num, radix, len) writenum(buf, ofs, attr, num, radix, len, 1)
extern void writestring(uint16_t *buf, unsigned short ofs, unsigned char attr, const char *str, unsigned short len);
extern void writestringattr(uint16_t *buf, unsigned short ofs, const uint16_t *str, unsigned short len);
extern void markstring(uint16_t *buf, unsigned short ofs, unsigned short len);
extern void fillstr(uint16_t *buf, const unsigned short ofs, const unsigned char chr, const unsigned char attr, unsigned short len);


enum { vidNorm, vidVESA};

extern unsigned int plScrHeight;               /* How many textlines can we currently fit. Undefined for wurfel-mode */
extern unsigned int plScrWidth;                /* How many characters can we currently fir on a line */
extern char plVidType;                  /* vidNorm for textmode only, or vidVESA for graphical support also */
extern unsigned char plScrType;         /* Last set textmode */
extern int plScrMode;                   /* If we are in graphical mode, this value is set to either 13 (for wurfel), 100 for 640x480 or 101 for 1024x768 */
extern char *plVidMem;                  /* This points to the current selected bank, and should atleast provide 64k of available bufferspace */
extern int plScrLineBytes;              /* How many bytes does one line from plVidMem use (can be padded) */
extern int plScrLines;                  /* How many graphical lines do we have, should always be 480 or 768, but can be padded */
extern void make_title(char *part);

#ifdef _CONSOLE_DRIVER
extern unsigned char plpalette[256];

extern void generic_gdrawstr(unsigned short y, unsigned short x, const char *str, unsigned short len, unsigned char f, unsigned char b);
extern void generic_gdrawchar8(unsigned short x, unsigned short y, unsigned char c, unsigned char f, unsigned char b);
extern void generic_gdrawchar8t(unsigned short x, unsigned short y, unsigned char c, unsigned char f);
extern void generic_gdrawchar8p(unsigned short x, unsigned short y, unsigned char c, unsigned char f, void *picp);
extern void generic_gdrawstr(unsigned short y, unsigned short x, const char *str, unsigned short len, unsigned char f, unsigned char b);
extern void generic_gdrawcharp(unsigned short x, unsigned short y, unsigned char c, unsigned char f, void *picp);
extern void generic_gdrawchar(unsigned short x, unsigned short y, unsigned char c, unsigned char f, unsigned char b);
extern void generic_gupdatestr(unsigned short y, unsigned short x, const uint16_t *str, unsigned short len, uint16_t *old);
#endif

#endif