summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2020-04-12 23:57:34 -0500
committerepoch <epoch@thebackupbox.net>2020-04-12 23:57:34 -0500
commitebc7381301c06c31933d11ff3e2b68ca005aa3e7 (patch)
tree52b8db2971de6e8e92ae809be8a5ca4f0b5831a2
parent7c35a4ed6ec9ebb800c35872d83c105ac90b7891 (diff)
downloadhackvr-ebc7381301c06c31933d11ff3e2b68ca005aa3e7.tar.gz
hackvr-ebc7381301c06c31933d11ff3e2b68ca005aa3e7.zip
noticed I don't need input.o in the makefile anymore
-rw-r--r--src/Makefile5
-rw-r--r--src/input.c19
-rw-r--r--src/input.h14
3 files changed, 13 insertions, 25 deletions
diff --git a/src/Makefile b/src/Makefile
index 045f82c..6ed9c5d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -14,7 +14,7 @@ all: hackvr_xdie hackvr_headless hackvr_x11 slowcat nonblocktail
# hackvr_fb hackvr_freeglut slowcat
hackvr_xdie: override LDLIBS+=-lm -lidc -lX11 -lhashtable
-hackvr_xdie: hackvr_xdie.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_die.o keyboard_die.o input.o
+hackvr_xdie: hackvr_xdie.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_die.o keyboard_die.o
nonblocktail: override LDLIBS+=-lidc
nonblocktail: nonblocktail.c
@@ -23,7 +23,8 @@ hackvr_headless: override LDLIBS+=-lm -lidc -lhashtable
hackvr_headless: hackvr_headless.o math.o physics.o
hackvr_x11: override LDLIBS+=-lm -lidc -lX11 -lhashtable
-hackvr_x11: hackvr_x11.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_x11.o keyboard_x11.o input.o
+hackvr_x11: hackvr_x11.o graphics_c3.o graphics_c2.o graphics_cs_x11.o math.o physics.o keyboard.o mouse_x11.o keyboard_x11.o
+
#notice how all the targets have generic graphics objects up until a specific one.
hackvr_fb: override LDLIBS+=-lm -lidc -lhashtable
diff --git a/src/input.c b/src/input.c
deleted file mode 100644
index 8c1b99b..0000000
--- a/src/input.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <idc.h>
-#include "common.h"
-#include "graphics_x11.h"
-#include "keyboard_x11.h"
-#include "mouse_x11.h"
-#include "input.h"
-
-extern struct x11_global x11_global;
-
-int input_init() {
- return x11_global.fd;
-}
-
-void input_event_handler(struct shit *me,char *line) {
- if(keyboard_event_handler(me,line)) {
- }
- if(mouse_event_handler(me,line)) {
- }
-}
diff --git a/src/input.h b/src/input.h
index 15b28f4..0c878e6 100644
--- a/src/input.h
+++ b/src/input.h
@@ -1,11 +1,17 @@
#ifndef _HV_MOUSE_H_
#define _HV_MOUSE_H_
+//these might as well be in keyboard.h and mouse.h
+//but I don't have separate files for those yet.
+//all keyboard and mouse drivers will need to implement these functions
+
#include <idc.h>
-int input_init();
-void input_event_handler(struct shit *me,char *line);
-int mouse_event_handler();
-int keyboard_event_handler();
+//these *_init() will return the fd that will have the keyboard and mouse events
+int mouse_init();
+int keyboard_init();
+//these two functions are libidc handlers
+void mouse_event_handler(struct shit *,char *);
+void keyboard_event_handler(struct shit *,char *);
#endif