mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-02-03 17:01:07 +02:00
64 lines
1.5 KiB
C
64 lines
1.5 KiB
C
/*
|
|
* fbutils.h
|
|
*
|
|
* Headers for utility routines for framebuffer interaction
|
|
*
|
|
* Copyright 2002 Russell King and Doug Lowder
|
|
*
|
|
* This file is placed under the GPL. Please see the
|
|
* file COPYING for details.
|
|
*
|
|
*/
|
|
|
|
#ifndef _FBUTILS_H
|
|
#define _FBUTILS_H
|
|
|
|
#include <asm/types.h>
|
|
#include <linux/types.h>
|
|
|
|
/* This constant, being ORed with the color index tells the library
|
|
* to draw in exclusive-or mode (that is, drawing the same second time
|
|
* in the same place will remove the element leaving the background intact).
|
|
*/
|
|
#define XORMODE 0x80000000
|
|
|
|
extern __u32 xres, yres;
|
|
|
|
int open_framebuffer(void);
|
|
void close_framebuffer(void);
|
|
void setcolor(unsigned colidx, unsigned value);
|
|
void put_cross(int x, int y, unsigned colidx);
|
|
void put_string(int x, int y, char *s, unsigned colidx);
|
|
void put_string_center(int x, int y, char *s, unsigned colidx);
|
|
void pixel (int x, int y, unsigned colidx);
|
|
void line (int x1, int y1, int x2, int y2, unsigned colidx);
|
|
void rect (int x1, int y1, int x2, int y2, unsigned colidx);
|
|
void fillrect (int x1, int y1, int x2, int y2, unsigned colidx);
|
|
void setColorsFromDefaultPallet();
|
|
void put_int(int x, int y, int c, int colidx);
|
|
|
|
/*
|
|
*FONT
|
|
*/
|
|
|
|
struct fbcon_font_desc {
|
|
int idx;
|
|
const char *name;
|
|
int width, height;
|
|
unsigned char *data;
|
|
int pref;
|
|
};
|
|
|
|
#define VGA8x8_IDX 0
|
|
#define PEARL8x8_IDX 2
|
|
#define VGA6x11_IDX 3
|
|
#define SUN8x16_IDX 4
|
|
#define SUN12x22_IDX 5
|
|
#define ACORN8x8_IDX 6
|
|
|
|
/* Max. length for the name of a predefined font */
|
|
#define MAX_FONT_NAME 32
|
|
#define FONTDATAMAX 2048
|
|
|
|
#endif /* _FBUTILS_H */
|