Chameleon

Chameleon Svn Source Tree

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

Source at commit 340 created 13 years 10 months ago.
By azimutz, Ok.. as i mentioned about the "drivers" override key, this stuff is mostly based on the search algo on search_and_get_acpi_fd, acpi_patcher.c; i just added 2+2 and got 5 in return :) No need to check for ramdisk presence anymore, courtesy of Zef, rev 264. Why check the root of the ramdisk (rd) instead of /Extra? Well, rd's can be aliased as bt(0,0) or not, and the behavior is pretty diff in both situations; a "normal" rd can load "single" files and the paths to it start with rd(0,0).
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
14
15#ifndef __BOOT_GRAPHICS_H
16#define __BOOT_GRAPHICS_H
17
18#define DEFAULT_SCREEN_WIDTH 1024
19#define DEFAULT_SCREEN_HEIGHT 768
20
21int loadPngImage(const char *filename, uint16_t *width, uint16_t *height, uint8_t **imageData);
22
23unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth );
24
25void drawColorRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char colorIndex );
26void drawDataRectangle( unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned char * data );
27int convertImage( unsigned short width, unsigned short height, const unsigned char *imageData, unsigned char **newImageData );
28
29int initGraphicsMode ();
30
31void drawCheckerBoard();
32
33void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);
34
35void drawCheckerBoard();
36void blendImage(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *data);
37
38int loadEmbeddedPngImage(uint8_t *pngData, int pngSize, uint16_t *width, uint16_t *height, uint8_t **imageData);
39
40
41char *getVBEInfoString();
42char *getVBEModeInfoString();
43void getGraphicModeParams(unsigned long params[]);
44
45#endif /* !__BOOT_GRAPHICS_H */
46

Archive Download this file

Revision: 340