summaryrefslogtreecommitdiff
path: root/src/gui/window.h
blob: 793d8b3ef3d8121fed1c3b2444c969b62dcea159 (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
#ifndef WINDOW_H
#define WINDOW_H

#include "composite_widget.h"

#include <stdbool.h>

typedef struct {
	composite_widget_vtable_t base;
} window_vtable_t;

typedef struct {
	composite_widget_t base;
	bool dragging;
} window_t;

void window_init( window_t *window, widget_t *parent, const int x, const int y, const int w, const int h, const vga_color_t background_color );

void window_draw( void *obj, graphics_context_t *context );
void window_on_mouse_down( void *obj, const int x, const int y );
void window_on_mouse_up( void *obj, const int x, const int y );
void window_on_mouse_move( void *obj, const int old_x, const int old_y, const int x, const int y );

#endif // WINDOW_H