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 | ␊ |
11 | #ifndef __BOOT_GRAPHICS_H␊ |
12 | #define __BOOT_GRAPHICS_H␊ |
13 | ␊ |
14 | #include "boot.h"␊ |
15 | #include "bootstruct.h"␊ |
16 | #include "vbe.h"␊ |
17 | ␊ |
18 | #define DEFAULT_SCREEN_WIDTH 1024␊ |
19 | #define DEFAULT_SCREEN_HEIGHT 768␊ |
20 | ␊ |
21 | ␊ |
22 | unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth );␊ |
23 | ␊ |
24 | void drawColorRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char colorIndex );␊ |
25 | void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data );␊ |
26 | int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData );␊ |
27 | ␊ |
28 | int initGraphicsMode ();␊ |
29 | ␊ |
30 | void drawCheckerBoard();␊ |
31 | ␊ |
32 | void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);␊ |
33 | ␊ |
34 | void drawCheckerBoard();␊ |
35 | void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);␊ |
36 | ␊ |
37 | ␊ |
38 | char *getVBEInfoString();␊ |
39 | char *getVBEModeInfoString();␊ |
40 | void getGraphicModeParams(unsigned long params[]);␊ |
41 | ␊ |
42 | #if UNUSED␊ |
43 | int setVESAGraphicsMode( unsigned short width, unsigned short height, unsigned char bitsPerPixel, unsigned short refreshRate );␊ |
44 | #else␊ |
45 | int setVESAGraphicsMode( unsigned short width, unsigned short height, unsigned char bitsPerPixel);␊ |
46 | #endif␊ |
47 | ␊ |
48 | int getNumberArrayFromProperty( const char * propKey,␊ |
49 | ␉␉␉␉␉␉ unsigned long numbers[],␊ |
50 | ␉␉␉␉␉␉ unsigned long maxArrayCount );␊ |
51 | ␊ |
52 | ␊ |
53 | unsigned short␊ |
54 | getVESAModeWithProperties( unsigned short width,␊ |
55 | ␉␉␉␉␉␉ unsigned short height,␊ |
56 | ␉␉␉␉␉␉ unsigned char bitsPerPixel,␊ |
57 | ␉␉␉␉␉␉ unsigned short attributesSet,␊ |
58 | ␉␉␉␉␉␉ unsigned short attributesClear,␊ |
59 | ␉␉␉␉␉␉ VBEModeInfoBlock * outModeInfo,␊ |
60 | ␉␉␉␉␉␉ unsigned short * vesaVersion );␊ |
61 | ␊ |
62 | ␊ |
63 | ␊ |
64 | #endif /* !__BOOT_GRAPHICS_H */␊ |
65 | |