summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Liu <joshua.liu@sourceobby.com>2025-06-19 22:41:43 -0400
committerJoshua Liu <joshua.liu@sourceobby.com>2025-06-19 22:41:43 -0400
commit99fa6fffec2266cf76e998f30b43cc585b9dce38 (patch)
treea3ad8df54fab9385ff655f55f7462645aff889af
parentd293955f4def6ac5f33dcf10552ce8d785106f0b (diff)
feat: moved imports from streamdeck.c into here, and added function declaration for init
-rw-r--r--streamdeck.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/streamdeck.h b/streamdeck.h
index 34b1e0a..07d6beb 100644
--- a/streamdeck.h
+++ b/streamdeck.h
@@ -1,14 +1,22 @@
+#include "devdetails.h"
+#include <pthread.h>
+#include <string.h>
#include <assert.h>
-// #include <string.h>
#include <stdbool.h>
#include <libusb-1.0/libusb.h>
// #include <stdlib.h>
// #include <stdio.h>
-// #include <hidapi/hidapi.h>
+#include <hidapi/hidapi.h>
+#include <pthread.h>
#include "util.h"
#define IMAGE_REPORT_LENGTH 8191
+#define VENDOR_INFO 0x0fd9
+#define MINIPRODUCTID 0x0063
+/* 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;
@@ -16,8 +24,14 @@ typedef struct Screen screen;
typedef struct Streamdeck streamdeck;
typedef struct Handler handler;
-streamdeck* connect(handler* deck);
+enum numkeys {STREAMDECK_ORIG = 12, STREAMDECK_MINI = 6};
+
+streamdeck* connect();
int close();
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 ();