All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jogamp.newt.driver.android.event.AndroidNewtEventTranslator Maven / Gradle / Ivy

There is a newer version: 2.3.2
Show newest version
package jogamp.newt.driver.android.event;

import jogamp.newt.driver.android.WindowDriver;
import android.view.View;

public class AndroidNewtEventTranslator implements View.OnKeyListener, View.OnTouchListener, View.OnFocusChangeListener, View.OnGenericMotionListener {
        private final WindowDriver newtWindow;
        private final AndroidNewtEventFactory factory;
        
        public AndroidNewtEventTranslator(WindowDriver newtWindow, android.content.Context context, android.os.Handler handler) {
            this.newtWindow = newtWindow;
            this.factory = new AndroidNewtEventFactory(context, handler); 
        }
        
        private final boolean processTouchMotionEvents(View v, android.view.MotionEvent event, boolean isOnTouchEvent) {
            final com.jogamp.newt.event.MouseEvent[] newtEvents = factory.createMouseEvents(isOnTouchEvent, event, newtWindow);
            if(null != newtEvents) {
                newtWindow.focusChanged(false, true);
                for(int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy