summaryrefslogtreecommitdiff
path: root/include/glamac_events.h
blob: c4145c062d0a166770e48d61b0eb301e5f876d55 (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
27
/**
 * glamac_events.h - header file from glamac_events.c.
 */
#ifndef GLAMAC_EVENTS_H
#define GLAMAC_EVENTS_H

#include <SDL3/SDL.h>
#include "glamacdef.h"
#include "glamac_view.h"

// Process key event
b32 process_key_event(SDL_KeyboardEvent *key, ViewState *view, SDL_Window *window, b32 *quit);

// Process mouse button event
b32 process_mouse_button(SDL_MouseButtonEvent *button, ViewState *view, i32 *lastMouseX, i32 *lastMouseY, b32 *dragging);

// Process mouse motion event
b32 process_mouse_motion(SDL_MouseMotionEvent *motion, ViewState *view, i32 *lastMouseX, i32 *lastMouseY, b32 dragging);

// Process window event
b32 process_window_event(SDL_WindowEvent *window_event, ViewState *view);

// Process all events on queue
b32 process_events(SDL_Event *event, ViewState *view, SDL_Window *window, 
                  i32 *lastMouseX, i32 *lastMouseY, b32 *dragging, b32 *quit);

#endif /* GLAMAC_EVENTS_H */
Back to https://optics-design.com