dlclose(p_library);
return NULL;
}
+
+extern void jni_getMouseCoordinates(int *, int *, int *, int *);
+
+void Manage(vout_display_t *vd)
+{
+ int x, y, button, action;
+ jni_getMouseCoordinates(&action, &button, &x, &y);
+ if (x >= 0 && y >= 0)
+ {
+ switch( action )
+ {
+ case AMOTION_EVENT_ACTION_DOWN:
+ vout_display_SendEventMouseMoved(vd, x, y);
+ vout_display_SendEventMousePressed(vd, button); break;
+ case AMOTION_EVENT_ACTION_UP:
+ vout_display_SendEventMouseMoved(vd, x, y);
+ vout_display_SendEventMouseReleased(vd, button); break;
+ case AMOTION_EVENT_ACTION_MOVE:
+ vout_display_SendEventMouseMoved(vd, x, y); break;
+ }
+ }
+}
+
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <android/native_window.h>
#include <jni.h>
#include <android/native_window_jni.h>
+#include <android/input.h>
+
+#include <vlc_vout_display.h>
typedef ANativeWindow* (*ptr_ANativeWindow_fromSurface)(JNIEnv*, jobject);
typedef void (*ptr_ANativeWindow_release)(ANativeWindow*);
/* Fill the structure passed as parameter and return a library handle
that should be destroyed with dlclose. */
void *LoadNativeWindowAPI(native_window_api_t *native);
+void Manage(vout_display_t *);