Chameleon

Chameleon Svn Source Tree

Root/branches/prasys/i386/boot2/graphics.h

1/*
2 * graphics.h
3 *
4 *
5 * Created by fassl on 22.12.08.
6 * Copyright 2008 __MyCompanyName__. All rights reserved.
7 *
8 */
9
10#include "boot.h"
11#include "bootstruct.h"
12#include "graphic_utils.h"
13#include "vbe.h"
14
15
16#ifndef __BOOT_GRAPHICS_H
17#define __BOOT_GRAPHICS_H
18
19#define DEFAULT_SCREEN_WIDTH 1024
20#define DEFAULT_SCREEN_HEIGHT 768
21
22int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData);
23int loadPixmapFromPng(const char *filename, pixmap_t *p);
24int loadPixmapFromEmbeddedPng(uint8_t *pngData, uint32_t pngSize, pixmap_t *p);
25
26unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth );
27
28void drawColorRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char colorIndex );
29void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data );
30int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData );
31
32int initGraphicsMode ();
33
34void drawCheckerBoard();
35
36void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);
37
38void drawCheckerBoard();
39void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);
40
41int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData);
42
43
44char *getVBEInfoString();
45char *getVBEModeInfoString();
46void getGraphicModeParams(unsigned long params[]);
47
48
49unsigned short getVESAModeWithProperties( unsigned short width,
50 unsigned short height,
51 unsigned char bitsPerPixel,
52 unsigned short attributesSet,
53 unsigned short attributesClear,
54 VBEModeInfoBlock * outModeInfo,
55 unsigned short * vesaVersion );
56
57
58#endif /* !__BOOT_GRAPHICS_H */

Archive Download this file

Revision: 33