You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
src/libandroid/input.c: add initial stubs
This commit is contained in:
@@ -71,10 +71,11 @@ executable('android-translation-layer', [
|
||||
shared_library('android', [
|
||||
'src/libandroid/asset_manager.c',
|
||||
'src/libandroid/configuration.c',
|
||||
'src/libandroid/input.c',
|
||||
'src/libandroid/looper.c',
|
||||
'src/libandroid/media.c',
|
||||
'src/libandroid/native_window.c',
|
||||
'src/libandroid/sensor.c',
|
||||
'src/libandroid/looper.c'
|
||||
],
|
||||
install: true,
|
||||
soversion: 0,
|
||||
|
||||
48
src/libandroid/input.c
Normal file
48
src/libandroid/input.c
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct AInputEvent;
|
||||
struct AInputQueue;
|
||||
|
||||
struct ALooper;
|
||||
typedef void * ALooper_callbackFunc;
|
||||
|
||||
int32_t AInputEvent_getType(const struct AInputEvent* event)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
float AMotionEvent_getX(const struct AInputEvent* motion_event, size_t pointer_index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
float AMotionEvent_getY(const struct AInputEvent* motion_event, size_t pointer_index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AInputQueue_detachLooper(struct AInputQueue* queue)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void AInputQueue_attachLooper(struct AInputQueue* queue, struct ALooper* looper, int ident, ALooper_callbackFunc callback, void* data)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t AInputQueue_getEvent(struct AInputQueue* queue, struct AInputEvent** outEvent)
|
||||
{
|
||||
return -1; // no events or error
|
||||
}
|
||||
|
||||
int32_t AInputQueue_preDispatchEvent(struct AInputQueue* queue, struct AInputEvent* event)
|
||||
{
|
||||
return -1; // not sure what is best suited for a stub
|
||||
}
|
||||
|
||||
void AInputQueue_finishEvent(struct AInputQueue* queue, struct AInputEvent* event, int handled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user