VSF Documented
window.h
Go to the documentation of this file.
1#ifndef __WINDOW_H__
2#define __WINDOW_H__
3
4#include "list.h"
5#include <graphic/surface.h>
6
7// xboot/event.h
8enum {
9 MOUSE_BUTTON_LEFT = (0x1 << 0),
10 MOUSE_BUTTON_RIGHT = (0x1 << 1),
11 MOUSE_BUTTON_MIDDLE = (0x1 << 2),
12};
13
17
22
26};
27struct event_t {
28 void * device;
30 union {
31 /* Key */
32 struct {
35 struct {
38
39 /* Mouse */
40 struct {
44 struct {
45 int32_t x, y;
47 struct {
48 int32_t x, y;
51 struct {
54
55 /* Touch */
56 struct {
57 int32_t x, y;
60 struct {
61 int32_t x, y;
64 struct {
65 int32_t x, y;
68 struct {
69 int32_t x, y;
72 } e;
73};
74
75// xboot/window.h
80 struct {
81 int dirty;
82 int show;
84
86};
87
88struct window_t {
90 struct surface_t * s;
92 void * priv;
93};
94
95struct window_t * window_alloc(const char * fb, const char * input, void * data);
96void window_free(struct window_t * w);
97int window_is_active(struct window_t * w);
98int window_get_width(struct window_t * w);
99int window_get_height(struct window_t * w);
100void window_present(struct window_t * w, struct color_t * c, void * o, void (*draw)(struct window_t *, void *));
101int window_pump_event(struct window_t * w, struct event_t * e);
102
103#endif // __WINDOW_H__
Definition vsf_disp.h:173
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
int spinlock_t
Definition spinlock.h:26
unsigned uint32_t
Definition stdint.h:9
int int32_t
Definition stdint.h:8
Definition window.h:27
int32_t x
Definition window.h:41
struct event_t::@952::@962 touch_end
int32_t y
Definition window.h:41
struct event_t::@952::@960 touch_begin
int32_t dx
Definition window.h:52
enum event_type_t type
Definition window.h:29
struct event_t::@952::@959 touch
uint32_t id
Definition window.h:58
union event_t::@952 e
struct event_t::@952::@961 touch_move
struct event_t::@952::@953 key_down
struct event_t::@952::@958 mouse_wheel
int32_t dy
Definition window.h:52
uint32_t button
Definition window.h:42
struct event_t::@952::@956 mouse_move
void * device
Definition window.h:28
struct event_t::@952::@957 mouse_up
uint32_t key
Definition window.h:33
struct event_t::@952::@954 key_up
struct event_t::@952::@955 mouse_down
Definition vsf_list.h:888
Definition vsf_list.h:883
Definition window.h:76
vk_disp_t * disp
Definition window.h:85
spinlock_t lock
Definition window.h:77
int dirty
Definition window.h:81
struct window_manager_t::@963 cursor
vsf_dlist_t window_list
Definition window.h:78
int show
Definition window.h:82
int refresh
Definition window.h:79
Definition window.h:88
vsf_dlist_node_t window_node
Definition window.h:89
struct window_manager_t * wm
Definition window.h:91
struct surface_t * s
Definition window.h:90
void * priv
Definition window.h:92
int window_get_width(struct window_t *w)
Definition vsf_xboot.c:217
int window_get_height(struct window_t *w)
Definition vsf_xboot.c:225
void window_free(struct window_t *w)
Definition vsf_xboot.c:198
struct window_t * window_alloc(const char *fb, const char *input, void *data)
Definition vsf_xboot.c:170
event_type_t
Definition window.h:14
@ EVENT_TYPE_TOUCH_BEGIN
Definition window.h:23
@ EVENT_TYPE_MOUSE_UP
Definition window.h:20
@ EVENT_TYPE_MOUSE_MOVE
Definition window.h:19
@ EVENT_TYPE_MOUSE_WHEEL
Definition window.h:21
@ EVENT_TYPE_TOUCH_END
Definition window.h:25
@ EVENT_TYPE_KEY_DOWN
Definition window.h:15
@ EVENT_TYPE_KEY_UP
Definition window.h:16
@ EVENT_TYPE_TOUCH_MOVE
Definition window.h:24
@ EVENT_TYPE_MOUSE_DOWN
Definition window.h:18
int window_is_active(struct window_t *w)
Definition vsf_xboot.c:210
@ MOUSE_BUTTON_LEFT
Definition window.h:9
@ MOUSE_BUTTON_RIGHT
Definition window.h:10
@ MOUSE_BUTTON_MIDDLE
Definition window.h:11
int window_pump_event(struct window_t *w, struct event_t *e)
Definition vsf_xboot.c:291
void window_present(struct window_t *w, struct color_t *c, void *o, void(*draw)(struct window_t *, void *))
Definition vsf_xboot.c:240