root / lab5 / graphics.h @ 120
History | View | Annotate | Download (1.27 KB)
1 |
#ifndef GRAPHICS_H_INCLUDED
|
---|---|
2 |
#define GRAPHICS_H_INCLUDED
|
3 |
|
4 |
#include <lcom/lcf.h> |
5 |
#include <stdint.h> |
6 |
|
7 |
#define GET_RED(n) (0xFF & (n >> 16)) |
8 |
#define GET_GRE(n) (0xFF & (n >> 8)) |
9 |
#define GET_BLU(n) (0xFF & (n )) |
10 |
#define SET_RED(n) ((n&0xFF) << 16) |
11 |
#define SET_GRE(n) ((n&0xFF) << 8) |
12 |
#define SET_BLU(n) ((n&0xFF) ) |
13 |
#define SET_COLOR(r,g,b) (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
|
14 |
|
15 |
int (get_permission)(unsigned int base_addr, unsigned int size); |
16 |
|
17 |
int (get_permissions_first_mbyte)(void); |
18 |
|
19 |
int (vbe_get_mode_information)(uint16_t mode);
|
20 |
|
21 |
phys_bytes get_phys_addr(void);
|
22 |
|
23 |
unsigned int get_vram_size(void); |
24 |
|
25 |
uint16_t get_XRes(void);
|
26 |
|
27 |
uint16_t get_YRes(void);
|
28 |
|
29 |
uint16_t get_bits_pixel(void);
|
30 |
|
31 |
uint16_t get_bytes_pixel(void);
|
32 |
|
33 |
uint16_t get_RedMaskSize(void);
|
34 |
|
35 |
uint16_t get_GreenMaskSize(void);
|
36 |
|
37 |
uint16_t get_BlueMaskSize(void);
|
38 |
|
39 |
int (map_vram)(void); |
40 |
|
41 |
int (free_memory)(void); |
42 |
|
43 |
int (set_pixel)(uint16_t row, uint16_t col, uint32_t color);
|
44 |
|
45 |
/**
|
46 |
* @brief
|
47 |
* @param mode
|
48 |
* @return
|
49 |
*/
|
50 |
int (set_graphics_mode)(uint16_t mode);
|
51 |
|
52 |
int (draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color);
|
53 |
|
54 |
int (draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color);
|
55 |
|
56 |
#endif /* end of include guard: GRAPHICS_H_INCLUDED */ |