summaryrefslogtreecommitdiff
path: root/src/gui/desktop.h
blob: a8db094f7da246a0ef3ecafa0d5ae21005549340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef DESKTOP_H
#define DESKTOP_H

#include "composite_widget.h"

#define MAX_NOF_WIDGET_CHILDREN 100

typedef struct {
	composite_widget_vtable_t base;
} desktop_vtable_t;

typedef struct {
	composite_widget_t base;
	desktop_vtable_t *vtable;
	int mouse_x;
	int mouse_y;
} desktop_t;

void desktop_init( desktop_t *widget, const int w, const int h, const vga_color_t background_color );

void desktop_draw( void *obj, graphics_context_t *context );
void desktop_on_mouse_down( void *obj, const int x, const int y );
void desktop_on_mouse_up( void *obj, const int x, const int y );
void desktop_on_mouse_move( void *obj, const int old_x, const int old_y, const int x, const int y );

#endif // DESKTOP_H