bVNC单点触控分析
来源:互联网 发布:mp3播放软件 安卓 编辑:程序博客网 时间:2024/05/22 11:57
- //触屏模式
- SimulatedTouchpadInputHandler.onScroll {
- RemotePointer p = canvas.getPointer();
- final int action = e2.getActionMasked();
- final int meta = e2.getMetaState();
-
- // TODO: This is a workaround for Android 4.2
- //多手指检测
- boolean twoFingers = false;
- if (e1 != null)
- twoFingers = (e1.getPointerCount() > 1);
- if (e2 != null)
- twoFingers = twoFingers || (e2.getPointerCount() > 1);
- // onScroll called while scaling/swiping gesture is in effect. We ignore the event and pretend it was
- // consumed. This prevents the mouse pointer from flailing around while we are scaling.
- // Also, if one releases one finger slightly earlier than the other when scaling, it causes Android
- // to stick a spiteful onScroll with a MASSIVE delta here.
- // This would cause the mouse pointer to jump to another place suddenly.
- // Hence, we ignore onScroll after scaling until we lift all pointers up.
- // 多手指,滑动模式,缩放模式,缩放模式结束
- if (twoFingers||inSwiping||inScaling||scalingJustFinished)
- return true;
- activity.showZoomer(true);
- // If the gesture has just began, then don't allow a big delta to prevent
- // pointer jumps at the start of scrolling.
- if (!inScrolling) {
- inScrolling = true;
- distanceX = sign(distanceX);
- distanceY = sign(distanceY);
- } else {
- // Make distanceX/Y display density independent.
- distanceX = sensitivity * distanceX / displayDensity;
- distanceY = sensitivity * distanceY / displayDensity;
- }
-
- // Compute the absolute new mouse position on the remote site.
- int newRemoteX = (int) (p.getX() + getDelta(-distanceX));
- int newRemoteY = (int) (p.getY() + getDelta(-distanceY));
- p.processPointerEvent(newRemoteX, newRemoteY, action, meta, false, false, false, false, 0);
- canvas.panToMouse();
- return true;
- }
- //SimulatedTouchpadInputHandler.onScale(IBCScaleGestureDetector) line: 1
- //ScaleGestureDetector.onTouchEvent(MotionEvent) line: 258
- SimulatedTouchpadInputHandler(AbstractGestureInputHandler).onTouchEvent(MotionEvent)
- line: 460 {
- //多点触控手势
- scaleGestures.onTouchEvent(e);
- //单点手势
- return gestures.onTouchEvent(e);
- }
- //SimulatedTouchpadInputHandler.onTouchEvent(MotionEvent) line: 1
- RemoteCanvasActivity.onTouchEvent(MotionEvent) line: 1217 {
- try {
- //activity检测到TouchEvent
- return inputHandler.onTouchEvent(event);
- } catch (NullPointerException e) { }
- return false;
- }
0
上一篇:bVNC多点触控分析
下一篇:linux rdp 共享剪贴板
相关热门文章
- Android之开发环境搭建
- Android自定义View的实现...
- AndroidManifest.xml配置文件...
- Android相对布局+圆角按钮+Sha...
- 查看Android应用包名package和...
- linux dhcp peizhi roc
- 关于Unix文件的软链接
- 求教这个命令什么意思,我是新...
- sed -e "/grep/d" 是什么意思...
- 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
评论热议
0 0
- bVNC单点触控分析
- bVNC多点触控分析
- bvnc
- bVNC 客户端源码分析(android)
- 单点触控事件、
- 单点触控
- 单点触控
- 单点触控
- cocos2dx单点触控
- 单点触控
- 单点登录 CAS分析
- 单点登录 Ucenter 分析
- 单点登录 UCenter 分析
- 单点登录 Ucenter 分析
- 单点登录 Ucenter 分析
- 单点登录 Ucenter 分析
- 单点登录 Ucenter 分析
- 自定义View(单点触控)
- 【ExpandableListView】ExpandableListView互斥展开效果
- android项目增加v7.appcompat
- dpkg 查询一个软件包的安装文件
- JAVA基础再回首(二十五)——Lock锁的使用、死锁问题、多线程生产者和消费者、线程池、匿名内部类使用多线程、定时器、面试题
- bVNC多点触控分析
- bVNC单点触控分析
- 私网地址(PrivateAddress)
- linux rdp 共享剪贴板
- 显示最近30秒内所上传的信息
- android开发中关于写入IMEI号问题总结
- OpenGL ES 三种类型修饰 uniform attribute varying
- ubuntu 计算器xcalc
- #include sys/xxx.h头文件 UNIX头文件
- Andriod JNI编程之C++回调Java函数
原创粉丝点击
热门IT博客
热门问题
老师的惩罚
人脸识别
我在镇武司摸鱼那些年
重生之率土为王
我在大康的咸鱼生活
盘龙之生命进化
天生仙种
凡人之先天五行
春回大明朝
姑娘不必设防,我是瞎子
哈弗 h1
哈弗1.5t
哈弗 h3
哈弗4
哈弗四驱
哈弗轿车
长城 哈弗
哈弗 h2
哈弗好不好
哈弗加长版
哈弗品牌
哈弗风骏5
新款哈弗h2
哈弗经销商
哈弗商学院
全新哈弗h5
哈弗9
小哈弗
哈弗公司
哈弗系统
天津哈弗
长成哈弗
哈弗投诉
哈弗h92020款
哈弗里切克去世
哈弗h8报价及图片
哈弗车怎么样
哈弗新车上市
哈弗是国产车吗
哈弗是哪里产的
哈弗是合资车吗
哈弗汽车怎么样
哈弗h5和h6哪个好
哈弗汽车报价
长城哈弗4s店
哈弗车多少钱
哈弗轿车价格
哈弗汽车图片
哈弗h3柴油版
哈佛皮卡
哈佛柴油版