8 public ::alicorn::extension::testing::Proxy<AEventProxy>
11 MOCK_METHOD1(GetType, int32_t(
const AInputEvent *));
12 MOCK_METHOD1(GetAction, int32_t(
const AInputEvent *));
13 MOCK_METHOD2(GetX,
float(
const AInputEvent *,
size_t));
14 MOCK_METHOD2(GetY,
float(
const AInputEvent *,
size_t));
15 MOCK_METHOD1(GetKeyAction, int32_t(
const AInputEvent *));
16 MOCK_METHOD1(GetKeyCode, int32_t(
const AInputEvent *));
17 MOCK_METHOD3(PollAll,
int(
int,
int *,
int *));
18 MOCK_METHOD1(GetLanguage, ::std::string(AConfiguration *));
20 MOCK_METHOD1(Finish,
void(ANativeActivity *));
21 MOCK_METHOD2(HideSoftInput,
void(ANativeActivity *, uint32_t));
22 MOCK_METHOD3(OnCreate,
void(ANativeActivity *,
void *,
size_t));
23 MOCK_METHOD1(GetWidth, int32_t(ANativeWindow *));
24 MOCK_METHOD1(GetHeight, int32_t(ANativeWindow *));
27 void * m_pOutData =
nullptr;
32inline int32_t AInputEvent_getType(
const AInputEvent * _Event)
34 return ::mock::AEventProxy::GetInstance()->GetType(_Event);
37inline int32_t AMotionEvent_getAction(
const AInputEvent * _Event)
39 return ::mock::AEventProxy::GetInstance()->GetAction(_Event);
42inline float AMotionEvent_getX(
const AInputEvent * _Event,
size_t _PointerIndex)
44 return ::mock::AEventProxy::GetInstance()->GetX(_Event, _PointerIndex);
47inline float AMotionEvent_getY(
const AInputEvent * _Event,
size_t _PointerIndex)
49 return ::mock::AEventProxy::GetInstance()->GetY(_Event, _PointerIndex);
52inline int32_t AKeyEvent_getAction(
const AInputEvent * _Event)
54 return ::mock::AEventProxy::GetInstance()->GetKeyAction(_Event);
57inline int32_t AKeyEvent_getKeyCode(
const AInputEvent* _Event)
59 return ::mock::AEventProxy::GetInstance()->GetKeyCode(_Event);
62inline int ALooper_pollAll(
int _TimeoutMillis,
int * _pOutFd,
int * _pOutEvents,
65 auto pProxy = ::mock::AEventProxy::GetInstance();
67 *_ppOutData = pProxy->m_pOutData;
68 return pProxy->PollAll(_TimeoutMillis, _pOutFd, _pOutEvents);
71inline void AConfiguration_getLanguage(AConfiguration * _pConfig,
74 const auto Result = ::mock::AEventProxy::GetInstance()->GetLanguage(_pConfig);
75 memcpy(_pOutLanguage, Result.c_str(), Result.length());
80 ::mock::AEventProxy::GetInstance()->Process(_pApp, _pSource);
83inline void ANativeActivity_finish(ANativeActivity * _pActivity)
85 ::mock::AEventProxy::GetInstance()->Finish(_pActivity);
88inline void ANativeActivity_hideSoftInput(ANativeActivity * _pActivity,
91 ::mock::AEventProxy::GetInstance()->HideSoftInput(_pActivity, _Flags);
94inline void ANativeActivity_onCreate(ANativeActivity * _pActivity,
95 void * _pSavedState,
size_t _SavedStateSize)
97 ::mock::AEventProxy::GetInstance()->OnCreate(_pActivity, _pSavedState,
101inline int32_t ANativeWindow_getWidth(ANativeWindow * _pWindow)
103 return ::mock::AEventProxy::GetInstance()->GetWidth(_pWindow);
106inline int32_t ANativeWindow_getHeight(ANativeWindow * _pWindow)
108 return ::mock::AEventProxy::GetInstance()->GetHeight(_pWindow);
Definition android_native_app_glue.h:90
Definition android_native_app_glue.h:111