mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-07 11:01:57 +08:00
change IAL engine of evdev to libinput
This commit is contained in:
26
configure.ac
26
configure.ac
@@ -118,7 +118,7 @@ build_random_ial_engine="no"
|
||||
build_net_ial_engine="no"
|
||||
|
||||
dnl common IAL engines
|
||||
build_evdev_ial_engine="yes"
|
||||
build_libinput_ial_engine="yes"
|
||||
build_console_ial_engine="no"
|
||||
build_console_ps2="no"
|
||||
build_console_imps2="no"
|
||||
@@ -468,9 +468,9 @@ AC_ARG_ENABLE(dfbial,
|
||||
[ --enable-dfbial build the DFB IAL engine <default=no>],
|
||||
build_dfb_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(evdevial,
|
||||
[ --enable-evdevial build the Linux EVDev IAL engine <default=yes>],
|
||||
build_evdev_ial_engine=$enableval)
|
||||
AC_ARG_ENABLE(libinputial,
|
||||
[ --enable-libinputial build the IAL engine based on libinput <default=yes>],
|
||||
build_libinput_ial_engine=$enableval)
|
||||
|
||||
AC_ARG_ENABLE(consoleial,
|
||||
[ --enable-consoleial build the console (Linux console) IAL engine <default=no>],
|
||||
@@ -1917,15 +1917,15 @@ if test "x$build_tslib_ial_engine" = "xyes"; then
|
||||
DEP_LIBS="$DEP_LIBS -lts"
|
||||
fi
|
||||
|
||||
if test "x$build_evdev_ial_engine" = "xyes"; then
|
||||
PKG_CHECK_MODULES(UDEV, [libudev >= 200], ,
|
||||
build_evdev_ial_engine="no; Linux EVDev IAL engine requires libudev")
|
||||
if test "x$build_evdev_ial_engine" = "xyes"; then
|
||||
AC_DEFINE(_MGIAL_EVDEV, 1,
|
||||
[Define if include Linux EVDev IAL engine])
|
||||
if test "x$build_libinput_ial_engine" = "xyes"; then
|
||||
PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.10.0], ,
|
||||
build_libinput_ial_engine="no; the IAL engine requires libinput 1.13.0 or later")
|
||||
if test "x$build_libinput_ial_engine" = "xyes"; then
|
||||
AC_DEFINE(_MGIAL_LIBINPUT, 1,
|
||||
[Define if include Linux libinput IAL engine])
|
||||
need_udev="yes"
|
||||
else
|
||||
AC_MSG_WARN([$build_evdev_ial_engine])
|
||||
AC_MSG_WARN([$build_libinput_ial_engine])
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -2576,7 +2576,7 @@ AC_SUBST(MINIGUI_RUNMODE)
|
||||
|
||||
AM_CONDITIONAL(MGRM_PROCESSES, test "x$runtime_mode" = "xprocs")
|
||||
AM_CONDITIONAL(MGRM_STANDALONE, test "x$runtime_mode" = "xsa")
|
||||
AM_CONDITIONAL(MGIAL_EVDEV, test "x$build_evdev_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_LIBINPUT, test "x$build_libinput_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_CONSOLE, test "x$build_console_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_NEXUS, test "x$build_nexus_ial_engine" = "xyes")
|
||||
AM_CONDITIONAL(MGIAL_DLCUSTOM, test "x$build_dlcustom_ial_engine" = "xyes")
|
||||
@@ -2685,7 +2685,7 @@ AC_MSG_NOTICE([
|
||||
* dummy: ${build_dummy_ial_engine}
|
||||
* pc_xvfb: ${enable_video_pc_xvfb}
|
||||
* usvfb: ${enable_video_usvfb}
|
||||
* evdev: ${build_evdev_ial_engine}
|
||||
* libinput: ${build_libinput_ial_engine}
|
||||
* console: ${build_console_ial_engine}
|
||||
* comm: ${build_comm_ial_engine}
|
||||
|
||||
|
||||
@@ -30,9 +30,10 @@ ial_engine=pc_xvfb
|
||||
mdev=/dev/input/mice
|
||||
mtype=IMPS2
|
||||
|
||||
# Linux EVDev IAL engine
|
||||
# ial_engine=evdev
|
||||
# Linux IAL engine based on libinput
|
||||
# ial_engine=libinut
|
||||
|
||||
#{{ifdef _MGGAL_DRM
|
||||
[drm]
|
||||
defaultmode=1024x768-16bpp
|
||||
device=/dev/dri/card0
|
||||
@@ -40,10 +41,18 @@ device=/dev/dri/card0
|
||||
# It is defined in dots (physical pixels) per inch
|
||||
# The default value is 96.
|
||||
dpi=96
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGIAL_LIBINPUT
|
||||
[libinput]
|
||||
seat=seat0
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGGAL_FBCON
|
||||
[fbcon]
|
||||
defaultmode=1024x768-16bpp
|
||||
dpi=96
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGGAL_PCXVFB
|
||||
[pc_xvfb]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user