Added pointer and keyboard handlers
This commit is contained in:
@ -1,28 +0,0 @@
|
||||
#ifndef PUZZLE_H
|
||||
#define PUZZLE_H
|
||||
|
||||
enum colors
|
||||
{
|
||||
NONE = 0,
|
||||
EL = 1,
|
||||
T = 2,
|
||||
POLE = 3,
|
||||
SQUARE = 4,
|
||||
LZIG = 5,
|
||||
RZIG = 6,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @struct puzzle
|
||||
* Represents a puzzle in the Tetris game.
|
||||
*/
|
||||
struct puzzle {
|
||||
int with; // The width of the puzzle
|
||||
int height; // The height of the puzzle
|
||||
unsigned char *data; // The data of the puzzle
|
||||
enum colors type; // The type of the puzzle
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,9 +1,12 @@
|
||||
#ifndef TKEYBOARD_H
|
||||
#define TKEYBOARD_H
|
||||
|
||||
//#include <wayland-client-protocol.h>
|
||||
#include <wayland-client.h>
|
||||
|
||||
struct keyboard_data {
|
||||
struct wl_keyboard *keyboard;
|
||||
};
|
||||
|
||||
extern const struct wl_keyboard_listener keyboard_listener;
|
||||
|
||||
#endif
|
||||
|
21
include/tpointer.h
Normal file
21
include/tpointer.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef TPOINTER_H_
|
||||
#define TPOINTER_H_
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <wayland-cursor.h>
|
||||
|
||||
|
||||
struct pointer_data {
|
||||
struct wl_cursor_theme *cursor_theme;
|
||||
struct wl_pointer *pointer;
|
||||
struct wl_surface *cursor_surface;
|
||||
struct wl_cursor *cursor;
|
||||
struct wl_cursor_image *cursor_image;
|
||||
struct wl_buffer *cursor_buffer;
|
||||
};
|
||||
|
||||
extern const struct wl_pointer_listener pointer_listener;
|
||||
|
||||
void pointer_init_cursor(struct pointer_data *pointer_data, struct wl_compositor *compositor, struct wl_shm *shm);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user