summaryrefslogtreecommitdiff
path: root/streamdeck.h
blob: c95508ffe411bc27a0faca4be6f174c48adba352 (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
28
29
30
31
32
33
34
35
36
37
#include "devdetails.h"
#include "functions.h"
#include <pthread.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>
#include <libusb-1.0/libusb.h>
// #include <stdlib.h>
// #include <stdio.h>
#include <hidapi/hidapi.h>
#include <pthread.h>

#include "util.h"

#define IMAGE_REPORT_LENGTH 8191
/* may or may not use these. Might use enumerations */
// #define STREAMDECK_ORIG 1 
// #define STREAMDECK_MINI 2

typedef struct Image image;
typedef struct Key key;
typedef struct Screen screen; 
typedef struct Streamdeck streamdeck;
typedef struct Handler handler;


streamdeck* connect();
int reset(handler* deck);
int resetkeystream(handler* deck);
int callback(handler* deck, void* key, void* state);
int readhandler(handler* deck);
int set_key_image(streamdeck* deck, int key, image* img);
int init ();
void destroy_streamdeck (streamdeck* target);
handler* create_hid_handler ();
// handler* create_hid_handler ();