change IAL engine of evdev to libinput

This commit is contained in:
Vincent Wei
2019-06-11 18:39:26 +08:00
parent e7913edc7e
commit 8c81845eba
6 changed files with 42 additions and 33 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ MSTAR_SRCS = mstarial.h mstarial.c
DFB_SRCS = dfb.h dfb.c
USVFB_SRCS = usvfbinput.c usvfbinput.h
EVDEV_SRCS = evdev.c evdev.h
LIBINPUT_SRCS = libinput.c libinput.h
if MGIAL_CONSOLE
native_libial_la_LIBADD = native/libnative.la
@@ -76,4 +76,4 @@ libial_la_SOURCES = $(COMMON_SRCS) $(DUMMY_SRCS) $(JZ4740_SRCS) \
$(COMMINPUT_SRCS) $(QVFB_SRCS) $(WVFB_SRCS) \
$(QEMU_SRCS) $(IPAQ_H3600_SRCS) $(IPAQ_H5400_SRCS) \
$(TSLIB_SRCS) $(SHANDONG_LIDE_SRCS) $(CISCO_TOUCHPAD_SRCS) \
$(MSTAR_SRCS) $(DFB_SRCS) $(USVFB_SRCS) $(EVDEV_SRCS)
$(MSTAR_SRCS) $(DFB_SRCS) $(USVFB_SRCS) $(LIBINPUT_SRCS)
+4 -4
View File
@@ -117,8 +117,8 @@
#ifdef _MGIAL_USVFB
#include "usvfbinput.h"
#endif
#ifdef _MGIAL_EVDEV
#include "evdev.h"
#ifdef _MGIAL_LIBINPUT
#include "libinput.h"
#endif
#define LEN_ENGINE_NAME 16
@@ -199,8 +199,8 @@ static INPUT inputs [] =
#ifdef _MGIAL_USVFB
{"usvfb", InitUSVFBInput, TermUSVFBInput},
#endif
#ifdef _MGIAL_EVDEV
{"evdev", InitEvdevInput, TermEvdevInput},
#ifdef _MGIAL_LIBINPUT
{"libinput", InitLibInput, TermLibInput},
#endif
/* ... end of general IAL engines */
};
+6 -6
View File
@@ -32,7 +32,7 @@
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
/*
** evdev.c: The implementation of EvDev IAL engine.
** libinput.c: The implementation of the IAL engine based on libinput.
**
** Created by Wei Yongming, 2019/06/10
*/
@@ -43,11 +43,11 @@
#include "common.h"
#ifdef _MGIAL_EVDEV
#ifdef _MGIAL_LIBINPUT
#include "misc.h"
#include "ial.h"
#include "evdev.h"
#include "libinput.h"
static int mouse_x, mouse_y, mouse_button;
@@ -114,7 +114,7 @@ static int wait_event (int which, int maxfd, fd_set *in, fd_set *out, fd_set *ex
return 0;
}
BOOL InitEvdevInput (INPUT* input, const char* mdev, const char* mtype)
BOOL InitLibInput (INPUT* input, const char* mdev, const char* mtype)
{
input->update_mouse = mouse_update;
input->get_mouse_xy = mouse_getxy;
@@ -133,9 +133,9 @@ BOOL InitEvdevInput (INPUT* input, const char* mdev, const char* mtype)
return TRUE;
}
void TermEvdevInput (void)
void TermLibInput (void)
{
}
#endif /* _MGIAL_EVDEV */
#endif /* _MGIAL_LIBINPUT */
+6 -6
View File
@@ -32,25 +32,25 @@
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
/*
** evdev.h: the head file of EVDev IAL Engine.
** libinput.h: the head file of the IAL engine based on libinput.
**
** Created by Wei YongMing, 2019/06/10
*/
#ifndef GUI_IAL_EVDEV_H
#define GUI_IAL_EVDEV_H
#ifndef GUI_IAL_LIBINPUT_H
#define GUI_IAL_LIBINPUT_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
BOOL InitEvdevInput (INPUT* input, const char* mdev, const char* mtype);
void TermEvdevInput (void);
BOOL InitLibInput (INPUT* input, const char* mdev, const char* mtype);
void TermLibInput (void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* GUI_IAL_EVDEV_H */
#endif /* GUI_IAL_LIBINPUT_H */