[go: up one dir, main page]

HK1212061B - Method, system and touch sensitive device for processing touch events - Google Patents

Method, system and touch sensitive device for processing touch events Download PDF

Info

Publication number
HK1212061B
HK1212061B HK15112844.6A HK15112844A HK1212061B HK 1212061 B HK1212061 B HK 1212061B HK 15112844 A HK15112844 A HK 15112844A HK 1212061 B HK1212061 B HK 1212061B
Authority
HK
Hong Kong
Prior art keywords
touch
event
web page
events
gesture
Prior art date
Application number
HK15112844.6A
Other languages
Chinese (zh)
Other versions
HK1212061A1 (en
Inventor
G‧D‧博尔辛加
T‧奥默尼克
R‧威廉姆森
Original Assignee
苹果公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US12/042,237 external-priority patent/US8174502B2/en
Application filed by 苹果公司 filed Critical 苹果公司
Publication of HK1212061A1 publication Critical patent/HK1212061A1/en
Publication of HK1212061B publication Critical patent/HK1212061B/en

Links

Description

一种用于处理触摸事件的方法、系统、触摸敏感设备Method, system, and touch-sensitive device for processing touch events

相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS

本申请是国际申请号为PCT/US2009/035858、国际申请日为2009 年03月03日、中国国家申请号为200980000015.5的发明专利申请的分案申请。This application is a divisional application of invention patent application with international application number PCT/US2009/035858, international application date March 3, 2009, and Chinese national application number 200980000015.5.

技术领域Technical Field

本主题主要涉及web浏览(web browsing,网页浏览)服务。This topic mainly involves web browsing services.

背景技术Background Art

web页面(web page,网页)是用标记语言创建的,该标记语言提供了这样一种手段,即用于描述文档中基于文本的信息的结构并为该文本增补交互表单、嵌入图像及其他对象。一种流行的标记语言是超文本标记语言(HTML),该语言是用被尖括号(anglebracket)包围的标记的形式编写的。HTML可以描述web页面的外观和语义,并且可以包括嵌入式脚本语言代码(例如),该代码可以影响web浏览器及其他HTML处理器的行为。为开发人员提供了在web页面中添加鼠标事件处理机(handler)或事件监听器 (listener)的能力。这些鼠标事件处理机可以被指定到web页面中的特定区域,并且可以被配置成接收这些区域中的鼠标事件,例如鼠标释放(mouse up)事件或鼠标按下(mouse down)事件。Web pages are created using a markup language that provides a means for describing the structure of text-based information in a document and supplementing the text with interactive forms, embedded images, and other objects. A popular markup language is Hypertext Markup Language (HTML), which is written in the form of tags surrounded by angle brackets. HTML can describe the appearance and semantics of a web page and can include embedded scripting language code (for example) that can affect the behavior of a web browser and other HTML processors. Developers are provided with the ability to add mouse event handlers or event listeners to web pages. These mouse event handlers can be assigned to specific areas in a web page and can be configured to receive mouse events in these areas, such as mouse release (mouse up) events or mouse press (mouse down) events.

相比之下,对使用触摸敏感设备导航的web页面来说,这些web 页面通常需要对由用户使用一个或多个手指触摸web页面以及做出手势所产生的触摸事件做出响应。常规的鼠标事件处理机不能正确解释这些触摸事件。由此,这些触摸事件需要一种不同的触摸事件模型来正确解释触摸事件并且允许开发人员充分利用触摸敏感显示器或设备的能力。In contrast, web pages navigated using touch-sensitive devices typically need to respond to touch events generated by users touching the web page with one or more fingers and performing gestures. Conventional mouse event handlers cannot correctly interpret these touch events. Therefore, these touch events require a different touch event model to correctly interpret the touch events and allow developers to fully utilize the capabilities of touch-sensitive displays or devices.

发明内容Summary of the Invention

从触摸敏感设备中可以获取一个或多个触摸输入信号。如果触摸输入信号与触摸敏感设备上显示的web页面中的一个或多个区域相关联,那么与web页面的区域相关联的触摸事件将会由web页面进行处理。如果触摸输入信号不与web页面中的区域相关联,那么与触摸敏感设备相关联的应用处理触摸输入信号。One or more touch input signals may be obtained from a touch-sensitive device. If the touch input signals are associated with one or more regions of a web page displayed on the touch-sensitive device, touch events associated with the regions of the web page may be processed by the web page. If the touch input signals are not associated with regions of the web page, an application associated with the touch-sensitive device may process the touch input signals.

在某些实施方式中,一种方法包括:接收触摸输入信号;确定触摸输入信号是否与触摸敏感设备上显示的web页面中的一个或多个区域相关联;以及如果触摸输入信号与web页面的一个或多个区域相关联,则将触摸事件转发到web页面,以便进行处理。In some embodiments, a method includes receiving a touch input signal; determining whether the touch input signal is associated with one or more areas of a web page displayed on a touch-sensitive device; and forwarding the touch event to the web page for processing if the touch input signal is associated with the one or more areas of the web page.

在这里还公开了涉及系统、方法和计算机可读介质的其他实施方式。Other embodiments related to systems, methods, and computer-readable media are also disclosed herein.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1示出的是例示web页面文档。FIG. 1 shows an example web page document.

图2示出的是例示的具有多点触摸能力的设备的处理堆栈。FIG. 2 illustrates a processing stack for an exemplary multi-touch capable device.

图3是用于处理触摸事件的例示处理的流程图。3 is a flow chart of an example process for handling touch events.

图4示出的是例示的具有多点触摸能力的设备。FIG. 4 illustrates an exemplary multi-touch capable device.

图5是用于图4中具有多点触摸能力的设备的例示网络操作环境的框图。5 is a block diagram of an example network operating environment for the multi-touch capable device of FIG. 4 .

图6是图4中具有多点触摸能力的设备的例示实施方式的框图。6 is a block diagram of an example implementation of the multi-touch capable device of FIG. 4 .

具体实施方式DETAILED DESCRIPTION

例示的web页面结构和DOMExample web page structure and DOM

图1A显示的是可以在浏览器上显示的例示web页面100。该浏览器可以主存在便携式设备上,诸如图4中具有多点触摸能力的设备 400上。在web页面100上可以显示一个或多个单元,即单元102(“单元1”)、单元104(“单元2”)以及单元106(“单元3”)。这些单元 102、104、106可以与用户可选的web页面100中的各区域相对应,并且在这里还可以提供附加功能作为选择结果。举例来说,这些单元可以对应于web页面100上的按钮。此外,这些单元还可以嵌套,以使一个单元包含另一个单元。例如,单元104包含了单元108。在所显示的示例中,举例来说,单元108是一个嵌套在单元104内部的擦除器控制(scrubber control),而单元104则例如可以是媒体播放器的用户界面。FIG1A shows an example web page 100 that can be displayed on a browser. The browser can be hosted on a portable device, such as the multi-touch capable device 400 in FIG4 . One or more cells can be displayed on the web page 100, namely cell 102 (“cell 1”), cell 104 (“cell 2”), and cell 106 (“cell 3”). These cells 102, 104, 106 can correspond to user-selectable areas on the web page 100 and can provide additional functionality as a result of the selection. For example, these cells can correspond to buttons on the web page 100. Furthermore, these cells can be nested so that one cell contains another cell. For example, cell 104 contains cell 108. In the example shown, cell 108 is, for example, a scrubber control nested within cell 104, which can be, for example, a user interface for a media player.

在某些实施方式中,用户可以使用手指而不是鼠标以结合web页面100上的单元执行各种功能。例如,用户可以使用图4所示的触摸敏感显示器402来触摸web页面100的单元。在一个示例中,用户可以通过用一个或多个手指触摸该单元和/或通过做出像轻扫(swipe)、合拢(pinch)或旋转(rotate)运动之类的手势来选择某个单元。为了识别触摸输入信号,web页面100的某些区域可以与触摸事件处理机相关联。如将要参考图1B所描述的那样,这种处理可以用DOM以及嵌入式脚本语言来实现。In some embodiments, a user can use a finger instead of a mouse to perform various functions in conjunction with the elements on the web page 100. For example, a user can use the touch-sensitive display 402 shown in Figure 4 to touch the elements of the web page 100. In one example, a user can select a certain element by touching the element with one or more fingers and/or by making gestures such as swiping, pinching, or rotating. In order to recognize touch input signals, certain areas of the web page 100 can be associated with a touch event handler. As will be described with reference to Figure 1B, this processing can be implemented with a DOM and an embedded scripting language.

图1B是与web页面100相关联的例示性DOM 150。DOM 150 提供了web页面100的结构表示,并且将web页面内容描述成是一组可以被脚本语言(例如)解释的对象。在某些实施方式中, DOM 150通过将web页面100中的单元102、104、106、108映射到树的各独立节点来提供对web页面结构的访问。例如,单元102对应于节点154。单元104对应于节点156。单元106对应于节点158。单元108对应于节点160。根节点152对应于整个web页面100。FIG1B is an illustrative DOM 150 associated with a web page 100. DOM 150 provides a structural representation of the web page 100 and describes the web page content as a set of objects that can be interpreted by a scripting language (e.g., DOM 150). In some embodiments, DOM 150 provides access to the web page structure by mapping the elements 102, 104, 106, and 108 in the web page 100 to individual nodes of a tree. For example, element 102 corresponds to node 154. Element 104 corresponds to node 156. Element 106 corresponds to node 158. Element 108 corresponds to node 160. Root node 152 corresponds to the entire web page 100.

在某些实施方式中,通过将DOM 150中的相应节点与触摸事件处理机相关联,可以将web页面100中的一个或多个单元102、104、 106、108与一个或多个相应的触摸事件处理机相关联。触摸事件处理机可以被插入到web页面100的HTML标签中,并且该触摸事件处理机可以在例如用户在web页面100上的某个单元内部进行触摸或做出手势时运行脚本语言来执行动作。举例来说,可以与DOM 150一起工作,以便将动作附着于不同的触摸事件。In some embodiments, one or more elements 102, 104, 106, and 108 in the web page 100 can be associated with one or more corresponding touch event handlers by associating corresponding nodes in the DOM 150 with touch event handlers. The touch event handler can be inserted into the HTML tags of the web page 100 and can run a scripting language to perform an action when, for example, a user touches or makes a gesture within a certain element on the web page 100. For example, the touch event handler can work with the DOM 150 to attach actions to different touch events.

在某些实施方式中,一个或多个单元102、104、106、108可以接收由事件处理机或监听器检测到的触摸输入。如参考图2所描述的那样,该触摸输入可以由触摸事件模型检测并处理成触摸事件,其中该触摸事件模型可以在软件堆栈的一个或多个层中实施。触摸事件可以由web页面100进一步处理。触摸事件可以采用与触摸敏感设备产生的原始触摸输入信号相比更易于在应用中使用的格式(例如属性)。举例来说,每一个触摸事件都可以包括一组当前正在发生的触摸所在的坐标。In some embodiments, one or more of units 102, 104, 106, and 108 can receive touch input detected by an event handler or listener. As described with reference to FIG2 , the touch input can be detected and processed into touch events by a touch event model, which can be implemented in one or more layers of a software stack. The touch events can be further processed by web page 100. The touch events can be in a format (e.g., attributes) that is easier to use in applications than the raw touch input signals generated by a touch-sensitive device. For example, each touch event can include a set of coordinates where the touch is currently occurring.

web页面100中的每一个单元及其关联事件处理机都可以接收、处理和操作触摸事件。举个例子,如果驱动器202(图2)感测到与单元102相关联的触摸点110或是与单元104相关联的触摸点112,那么与单元102或104相关联的事件处理机就可以接收指示该单元已被触摸的独立的触摸事件,并且可以可选地将触摸事件发送到web页面 100以供进一步处理。在某些实施方式中,如果被触摸的web页面100 的区域不与事件处理机相对应,那么所述输入可由应用层214中的浏览器处理,而非web页面100来处理。Each element in web page 100 and its associated event handler can receive, process, and act on touch events. For example, if driver 202 ( FIG. 2 ) senses touch point 110 associated with element 102 or touch point 112 associated with element 104, the event handler associated with element 102 or 104 can receive a separate touch event indicating that the element has been touched and can optionally send the touch event to web page 100 for further processing. In some embodiments, if the area of web page 100 that is touched does not correspond to an event handler, the input can be processed by the browser in application layer 214 rather than by web page 100.

在某些实施方式中,应用层214中的浏览器可以接收所有触摸输入。该浏览器可以确定触摸输入是否与包含触摸处理机的web页面 100的区域相关联。如果触摸输入与包含触摸处理机的web页面100 的区域相关联,那么触摸事件模型可以产生触摸事件,并且将该触摸事件发送到web页面100以供处理。如果触摸输入并非web页面100 的区域,那么浏览器可以处理该触摸输入。In some embodiments, a browser in the application layer 214 can receive all touch inputs. The browser can determine whether the touch input is associated with an area of the web page 100 that includes a touch handler. If the touch input is associated with an area of the web page 100 that includes a touch handler, the touch event model can generate a touch event and send the touch event to the web page 100 for processing. If the touch input is not associated with an area of the web page 100, the browser can process the touch input.

参考图1的示例,用户可以在不释放第一触摸的同时(例如在保持手指按住第一触摸点的同时),在第二位置触摸web页面100。举例来说,用户可以使用第一手指来对触摸点110进行触摸,并且在不从触摸点110释放开第一手指的情况下使用第二手指来对第二触摸点 112进行触摸。由此,第二触摸点112上的第二触摸可以与触摸点110 上的触摸同时发生。在本示例中,浏览器确定触摸点110和112是包含触摸处理机的web页面100的区域。于是,触摸事件模型分别为触摸点110和112上的触摸输入产生第一触摸事件和第二触摸事件,并且将第一和第二触摸事件发送到web页面100以供处理。Referring to the example of FIG1 , a user can touch a second location on web page 100 without releasing the first touch (e.g., while keeping the finger pressed on the first touch point). For example, the user can touch touch point 110 with a first finger and, without releasing the first finger from touch point 110, touch a second touch point 112 with a second finger. Thus, the second touch on second touch point 112 can occur simultaneously with the touch on touch point 110. In this example, the browser determines that touch points 110 and 112 are areas of web page 100 that include a touch handler. The touch event model then generates a first touch event and a second touch event for the touch inputs on touch points 110 and 112, respectively, and sends the first and second touch events to web page 100 for processing.

但是,存在用户在第三位置(例如触摸点114)触摸web页面100 的情况。这时,浏览器将会确定该触摸不与关联于触摸处理机的web 页面100的区域相关联。在这种情况下,浏览器不会向web页面100 发送任何触摸事件以供处理。相反,浏览器会自己处理该事件。However, there are cases where a user touches web page 100 at a third location (e.g., touch point 114). In this case, the browser will determine that the touch is not associated with the area of web page 100 associated with the touch handler. In this case, the browser will not send any touch events to web page 100 for processing. Instead, the browser will handle the event itself.

在某些实施方式中,如果浏览器与触摸处理机相关联,那么浏览器可以根据与该浏览器相关联的触摸处理机来处理输入。例如,浏览器可以与允许用户缩放浏览器显示的触摸处理机相关联。In some embodiments, if the browser is associated with a touch handler, the browser can process input according to the touch handler associated with the browser. For example, the browser can be associated with a touch handler that allows the user to zoom the browser display.

在某些实施方式中,在DOM 150中可以逐手指逐节点地检测触摸事件。例如,用户可在基本上相同的时间在触摸点110和触摸点112 处触摸该触摸敏感显示器402,并且触摸事件模型可以检测到两个独立的触摸事件。由于DOM 150中的每一个节点102和104都与独立的触摸事件处理机相关联,因此,可以为触摸点110和触摸点112检测到独立触摸事件。In some embodiments, touch events can be detected on a finger-by-finger and node-by-node basis in DOM 150. For example, a user can touch touch-sensitive display 402 at touch point 110 and touch point 112 at substantially the same time, and the touch event model can detect two separate touch events. Because each node 102 and 104 in DOM 150 is associated with a separate touch event handler, separate touch events can be detected for touch point 110 and touch point 112.

在某些实施方式中,触摸事件可以作为EventTarget(事件目标) 而被递送到web页面100。触摸事件的某些示例可以包括触摸开始 (touchstart),触摸移动(touchmove),触摸结束(touchend)以及触摸取消(touchcancel)。此外,其他触摸事件也是可能的。触摸开始是当用户首次将手指放在触摸敏感显示器402上且位于web页面 100中与事件处理机相关联的一区域内时检测到的触摸事件。当用户在web页面100上四处移动其手指时,则可以检测到一个或多个触摸移动事件。当用户将其手指抬离web页面100时,则会检测到触摸结束事件。当系统中断常规事件处理时,则可检测到触摸取消。例如,触摸取消事件可以在为防止无意触摸而锁定触摸敏感显示器402时发生。In some embodiments, touch events can be delivered to web page 100 as EventTargets. Some examples of touch events may include touchstart, touchmove, touchend, and touchcancel. Other touch events are also possible. A touchstart is a touch event detected when a user first places a finger on touch-sensitive display 402 within an area of web page 100 associated with an event handler. As the user moves their finger around on web page 100, one or more touchmove events may be detected. When the user lifts their finger off web page 100, a touchend event may be detected. A touchcancel may be detected when the system interrupts regular event processing. For example, a touchcancel event may occur when touch-sensitive display 402 is locked to prevent inadvertent touches.

在某些实施方式中,手势事件还可以通过组合两个或多个触摸事件而被检测。与触摸事件相似,手势事件(GestureEvent)同样可以作为事件目标(EventTarget)而被递送到web页面100。手势事件的某些示例可以是手势开始(gesturestart),手势改变(gesturechange)和手势结束(gestureend)。手势事件可以包括缩放和/或旋转信息。旋转信息可以包括旋转值,该旋转值是一个以度数为单位的相对增量。web 页面100上的单元可以根据该旋转值而被动态旋转。缩放信息可以包括一个缩放值,该缩放值是以文档像素为单位的相对增量。对与手势事件相关联的web页面100上的单元来说,其大小可以根据该缩放值而被动态调整。此外,其他手势事件也是可能的。In some embodiments, gesture events can also be detected by combining two or more touch events. Similar to touch events, gesture events (GestureEvent) can also be delivered to the web page 100 as event targets (EventTarget). Some examples of gesture events may be gesture start (gesturestart), gesture change (gesturechange) and gesture end (gestureend). Gesture events may include scaling and/or rotation information. Rotation information may include a rotation value, which is a relative increment in degrees. The unit on the web page 100 can be dynamically rotated based on the rotation value. Scaling information may include a scaling value, which is a relative increment in document pixels. For the unit on the web page 100 associated with the gesture event, its size can be dynamically adjusted based on the scaling value. In addition, other gesture events are also possible.

在某些实施方式中,可以接收一个包含了用于标识web页面100 上的一个或多个触摸的触摸事件数据的触摸列表。触摸事件数据可以包括触摸标识符以及至少一组触摸位置坐标。此外,该触摸列表还可以包括涉及与每一个触摸相关联的触摸事件目标的触摸事件数据。在某些实施方式中,这样一个触摸位置坐标组可以包括客户机坐标、页面坐标和屏幕坐标。在某些实施方式中,触摸事件数据可以标识一个或多个有改变的触摸。In some embodiments, a touch list containing touch event data identifying one or more touches on a web page 100 may be received. The touch event data may include a touch identifier and at least one set of touch location coordinates. Furthermore, the touch list may include touch event data related to a touch event target associated with each touch. In some embodiments, such a set of touch location coordinates may include client coordinates, page coordinates, and screen coordinates. In some embodiments, the touch event data may identify one or more touches that have changed.

在某些实施方式中,GestureEvent可以在TouchEvent之前被发送到web页面100。举个例子,如果用户将手指放在触摸点110和触摸点112上,然后使用这些手指在触摸敏感显示器上做出顺时针或逆时针旋转手势,那么触摸事件模型将会检测到这些多个触摸事件,并且会将这些触摸事件组合成一个手势事件。然后,该手势事件可以被发送到web页面100,其后跟随的是经组合形成该手势事件的各触摸事件。这样一来,开发人员可以访问手势事件以及该手势事件中的各个单独的触摸事件,由此就能在开发web应用时,为开发人员提供更大的灵活性。In some embodiments, a GestureEvent can be sent to the web page 100 before a TouchEvent. For example, if a user places a finger on touch point 110 and touch point 112, and then uses those fingers to perform a clockwise or counterclockwise rotation gesture on the touch-sensitive display, the touch event model will detect these multiple touch events and combine them into a single gesture event. The gesture event can then be sent to the web page 100, followed by the individual touch events that were combined to form the gesture event. This allows developers to access both the gesture event and the individual touch events within the gesture event, providing them with greater flexibility when developing web applications.

在某些实施方式中,触摸事件是依照如下顺序接收的:触摸开始事件、一个或多个触摸移动事件、以及触摸结束或触摸取消事件。通过使用图1A的示例,当用户接触触摸点110时,与单元102相关联的第一触摸事件处理机将会检测到第一触摸开始事件。当用户接触触摸点112时,与单元104相关联的第二触摸事件处理机将会检测到第二触摸开始事件。当用户旋转其手指而没有抬起其手指时,第一和第二触摸事件处理机将会检测到触摸移动事件,并且该触摸移动事件可以被触摸事件模型解释成是旋转手势事件。当用户结束旋转并且将其手指抬离web页面100时,第一和第二触摸事件处理机将会检测到触摸结束事件。所有或某些触摸事件可以通过触摸事件应用编程接口 (API)而对开发人员可用。触摸API可以作为软件开发工具包(SDK) 或是作为应用的一部分(例如作为浏览器工具包的一部分)而对开发人员可用。该触摸事件API可以依靠其他服务、框架和操作系统来执行其各种功能。如参考图2所述,在触摸事件与那些可以插入文档用以在应用中定义事件动作的属性相关联的情况下,这些服务、框架和操作系统可以是软件或处理堆栈的一部分。In some embodiments, touch events are received in the following order: a touch-start event, one or more touch-move events, and a touch-end or touch-cancel event. Using the example of FIG. 1A , when a user touches touch point 110, a first touch-start event is detected by a first touch-event handler associated with element 102. When the user touches touch point 112, a second touch-start event is detected by a second touch-event handler associated with element 104. When the user rotates their finger without lifting it, the first and second touch-event handlers detect touch-move events, which can be interpreted as rotation gesture events by the touch event model. When the user ends the rotation and lifts their finger off web page 100, the first and second touch-event handlers detect touch-end events. All or some touch events can be made available to developers via a touch event application programming interface (API). The touch API can be made available to developers as a software development kit (SDK) or as part of an application (e.g., as part of a browser toolkit). The touch event API can rely on other services, frameworks, and operating systems to perform its various functions. As described with reference to FIG. 2 , these services, frameworks, and operating systems may be part of a software or processing stack where touch events are associated with properties that can be inserted into a document to define event actions in an application.

例示的IDLExample IDL

现在将用接口描述语言(IDL)描述例示的触摸事件模型。IDL 的功能和数据结构可以由web设计人员或应用开发人员通过API来访问。对触摸事件和/或手势事件的访问可以与那些可插入标记语言文档 (例如HTML,XML)用以在应用中定义事件动作的属性相关联。例如,这些属性可以插入到HTML文档的一个或多个HTML标签中,用以产生在触摸敏感显示器402上显示的web页面。该事件动作可以包括运行一个嵌入式脚本(例如)。The exemplary touch event model will now be described using an interface description language (IDL). The functionality and data structures of the IDL can be accessed by web designers or application developers through an API. Access to touch events and/or gesture events can be associated with attributes that can be inserted into a markup language document (e.g., HTML, XML) to define event actions within an application. For example, these attributes can be inserted into one or more HTML tags within an HTML document to generate a web page displayed on touch-sensitive display 402. The event action can include running an embedded script (e.g.,

以下是通过使用如上的例示IDL来处理触摸事件的HTML代码片段的示例。举例来说,以下HTML显示的是用HTML代码添加到单元中的触摸事件监听器TouchStart和GestureStart:The following is an example of an HTML code snippet that handles touch events using the example IDL above. For example, the following HTML shows the touch event listeners TouchStart and GestureStart added to a cell using HTML code:

this.element.addEventListener(′touchstart′,function(e){returnself.onTouchBegin(e)}, false);this.element.addEventListener('touchstart', function(e){returnself.onTouchBegin(e)}, false);

this.element.addEventListener(′gesturestart′,function(e){returnself.onGestureStart(e)}, false);this.element.addEventListener(′gesturestart′, function(e){returnself.onGestureStart(e)}, false);

与以上IDL相对应的HTML代码可以如下:The HTML code corresponding to the above IDL can be as follows:

用于多点触摸设备的例示处理堆栈Instantiation processing stack for multi-touch devices

图2是例示的具有多点触摸能力的设备的处理堆栈的图示。如上所述的触摸事件模型可以在处理堆栈及堆栈中的用户各类资源的一个或多个区域中实施。硬件200的层可以包括各种硬件接口元件,例如触摸敏感或启用的设备或是触摸敏感显示器。该触摸敏感设备可以包括显示器以及用于同时感测多个触摸的面板。该硬件层200还可以包括用于检测触摸敏感显示器或设备的定向(例如纵向,横向)的加速度计。由此,用于指示定向的信号可由触摸事件模型用来缩放web页面以进行最优显示。FIG2 is a diagram of a processing stack for an illustrative device with multi-touch capabilities. The touch event model described above can be implemented in one or more areas of the processing stack and various user resources in the stack. The layers of hardware 200 may include various hardware interface elements, such as touch-sensitive or enabled devices or touch-sensitive displays. The touch-sensitive device may include a display and a panel for sensing multiple touches simultaneously. The hardware layer 200 may also include an accelerometer for detecting the orientation (e.g., portrait, landscape) of the touch-sensitive display or device. Thus, the signal indicating the orientation can be used by the touch event model to scale the web page for optimal display.

驱动器层202中的一个或多个驱动器可以与硬件200进行通信。例如,这些驱动器可以接收和处理由硬件层200中的触摸敏感显示器或设备产生的触摸输入信号。核心操作系统(OS)204可以与一个或多个驱动器进行通信。核心OS 204可以处理从一个或多个驱动器接收的原始输入数据。在某些实施例中,这些驱动器可以被认为是核心OS 204的一部分。One or more drivers in driver layer 202 can communicate with hardware 200. For example, these drivers can receive and process touch input signals generated by a touch-sensitive display or device in hardware layer 200. Core operating system (OS) 204 can communicate with one or more drivers. Core OS 204 can process raw input data received from one or more drivers. In some embodiments, these drivers can be considered part of core OS 204.

一组OS应用编程接口(API)206可以与核心OS 204进行通信。这些API可以是一组通常与操作系统包含在一起的API(例如Linux 或UNIX API)。其中一组核心基础API 208可以使用OS API 206,而一组基础API 210则可以使用核心基础API 208。A set of OS application programming interfaces (APIs) 206 can communicate with the core OS 204. These APIs can be a set of APIs typically included with the operating system (e.g., Linux or UNIX APIs). A set of core base APIs 208 can use the OS APIs 206, while a set of base APIs 210 can use the core base APIs 208.

Web页面软件开发工具包(SDK)210可以包括一组被设计成供在设备上运行的应用使用的API。而触摸事件API则例如可被包含在 web页面SDK 210中。Web页面SDK 210的API可以利用基础API 208。 Web页面SDK 210例如可以包括由APPLE提供的Web KIT(Web工具包)。Web页面SDK 210可以作为API提供,或者也可以通过应用,例如,通过诸如由APPLE提供的之类的浏览器来访问。A web page software development kit (SDK) 210 may include a set of APIs designed for use by applications running on the device. A touch event API, for example, may be included in the web page SDK 210. The APIs of the web page SDK 210 may utilize the base API 208. The web page SDK 210 may include, for example, a Web KIT provided by Apple. The web page SDK 210 may be provided as an API or may be accessed through an application, for example, through a browser such as that provided by Apple.

在设备上运行的应用214可以利用Web页面SDK 210的API来创建web页面。Web页面SDK 210的API则又可以与各下层单元进行通信,由此最终与触摸敏感显示器或设备以及各种其他用户接口硬件进行通信。虽然每一层都可以利用其下方的层,但这并不总是需要的。例如在某些实施例中,应用214可以不定期地与OS API 206通信。Applications 214 running on the device can create web pages using the APIs of the web page SDK 210. The APIs of the web page SDK 210 can then communicate with various underlying components, ultimately communicating with the touch-sensitive display or device and various other user interface hardware. While each layer can utilize the layers below it, this is not always necessary. For example, in some embodiments, applications 214 may occasionally communicate with the OS API 206.

例示的触摸事件优化处理Example touch event optimization processing

图3是用于优化触摸事件处理的处理300的流程图。该处理300 是以接收来自触摸敏感设备的触摸输入信号为开始的(302)。将会对触摸输入信号是否与触摸敏感显示设备上显示的web页面的一个或多个区域相关联做出判定(304)。所述web页面的一个或多个页面可以与触摸事件相关联。举例来说,该判定可由与触摸敏感设备相关联的应用(例如浏览器)来做出。如果触摸信号与web页面的一个或多个区域相关联,那么与web页面的一个或多个区域相关联的触摸事件可以由web页面进行处理(306)。如果触摸信号不与web页面的一个或多个区域相关联,那么该应用可以处理该触摸信号。FIG3 is a flow diagram of a process 300 for optimizing touch event processing. The process 300 begins by receiving a touch input signal from a touch-sensitive device (302). A determination is made as to whether the touch input signal is associated with one or more regions of a web page displayed on a touch-sensitive display device (304). One or more of the web pages may be associated with a touch event. For example, the determination may be made by an application (e.g., a browser) associated with the touch-sensitive device. If the touch signal is associated with one or more regions of the web page, then the touch event associated with the one or more regions of the web page may be processed by the web page (306). If the touch signal is not associated with one or more regions of the web page, then the application may process the touch signal.

移动设备综述Mobile Devices Overview

图4是例示的具有多点触摸能力的设备400的框图。在某些实施方式中,具有多点触摸能力的设备400包括触摸敏感显示器402。触摸敏感显示器402可以实施液晶显示器(LCD)技术,发光聚合物显示器(LPD)技术或是某些其他显示器技术。触摸敏感显示器402可以对触觉(haptic)和/或与用户的触知(tactile)接触敏感。FIG4 is a block diagram of an exemplary multi-touch capable device 400. In some embodiments, multi-touch capable device 400 includes a touch-sensitive display 402. Touch-sensitive display 402 can implement liquid crystal display (LCD) technology, light emitting polymer display (LPD) technology, or some other display technology. Touch-sensitive display 402 can be sensitive to haptic and/or tactile contact with a user.

在某些实施方式中,触摸敏感显示器402可以包括多点触摸敏感显示器402。举例来说,触摸敏感显示器402可以处理多个同时的触摸点,这其中包括处理与每一个触摸点的压力、角度和/或位置相关的数据。此类处理使用多个手指、和弦(chording)及其他交互来方便手势和交互。此外,也可以使用其他触摸敏感显示器技术,例如使用指示笔或其他指示设备来进行接触的显示器。关于多点触摸敏感显示器技术的某些示例在美国专利No.6,323,846、No.6,570,557、No.6,677,932 以及美国专利公开2002/0015024A1中有所描述,这其中的每一份文献全都在这里全部引入作为参考。在某些实施方式中,具有多点触摸能力的设备400可以在触摸敏感显示器402上显示一个或多个图形用户界面,以便为用户提供对各种系统对象的访问以及向用户传达信息。In some embodiments, the touch-sensitive display 402 may include a multi-touch-sensitive display 402. For example, the touch-sensitive display 402 may process multiple simultaneous touch points, including processing data related to the pressure, angle, and/or position of each touch point. Such processing facilitates gestures and interactions using multiple fingers, chording, and other interactions. In addition, other touch-sensitive display technologies may be used, such as displays that are contacted using a stylus or other pointing device. Some examples of multi-touch-sensitive display technology are described in U.S. Patent Nos. 6,323,846, 6,570,557, 6,677,932, and U.S. Patent Publication 2002/0015024A1, each of which is incorporated herein by reference in its entirety. In some embodiments, the multi-touch-capable device 400 may display one or more graphical user interfaces on the touch-sensitive display 402 to provide the user with access to various system objects and to convey information to the user.

例示的具有多点触摸能力的设备的功能Functionality of an exemplary multi-touch capable device

在某些实施方式中,具有多点触摸能力的设备400可以实施多种设备的功能,例如电话设备、电子邮件设备、网络数据通信设备、Wi-Fi 基站设备以及媒体处理设备。在某些实施方式中,具有多点触摸能力的设备400可以包括用于显示web页面(例如web页面100)的web 浏览器404。触摸敏感显示器402可以接收在web页面100上产生的触摸输入信号,并且如上所述的触摸模型可以用于根据触摸输入信号来确定触摸和/或手势事件。在某些实施方式中,具有多点触摸能力的设备400可以实施网络分布功能。在某些实施方式中,在具有多点触摸能力的设备400接近用户耳朵时,可以锁操作(lockdown)触摸敏感显示器402。这种锁操作将会导致产生如参考图1B所描述的触摸取消事件。In some embodiments, the multi-touch capable device 400 can implement the functionality of multiple devices, such as a telephone device, an email device, a network data communication device, a Wi-Fi base station device, and a media processing device. In some embodiments, the multi-touch capable device 400 can include a web browser 404 for displaying a web page (e.g., web page 100). The touch-sensitive display 402 can receive touch input signals generated on the web page 100, and the touch model described above can be used to determine touch and/or gesture events based on the touch input signals. In some embodiments, the multi-touch capable device 400 can implement network distribution functions. In some embodiments, the touch-sensitive display 402 can be locked when the multi-touch capable device 400 is close to the user's ear. This lock operation will result in the generation of a touch cancellation event as described with reference to FIG. 1B.

在某些实施方式中,如指向箭头474所示,加速度计472可以用于检测具有多点触摸能力的设备400的移动。相应地,显示对象和/或媒体可以根据检测到的定向,例如,纵向或横向来呈现。在某些实施方式中,具有多点触摸能力的设备400可以包括用于支持位置确定能力的电路和传感器,其中举例来说,该能力可以是由全球定位系统 (GPS)或其他定位系统(例如使用Wi-Fi接入点的系统、电视信号、蜂窝网格、统一资源定位符(URL))提供的。在某些实施方式中,定位系统(例如GPS接收机)既可以集成到具有多点触摸能力的设备400中,也可以作为能通过接口来与具有多点触摸能力的设备400耦合的独立设备来提供,以便提供对基于位置的服务的访问。这种具有多点触摸能力的设备400还可以包括一个或多个无线通信子系统。In some embodiments, as indicated by directional arrow 474, accelerometer 472 can be used to detect movement of multi-touch capable device 400. Accordingly, display objects and/or media can be presented based on the detected orientation, for example, portrait or landscape. In some embodiments, multi-touch capable device 400 can include circuitry and sensors for supporting location determination capabilities, where, for example, this capability can be provided by a global positioning system (GPS) or other positioning system (e.g., a system using Wi-Fi access points, television signals, cellular grids, uniform resource locators (URLs)). In some embodiments, a positioning system (e.g., a GPS receiver) can be integrated into multi-touch capable device 400 or provided as a separate device that can be coupled to multi-touch capable device 400 via an interface to provide access to location-based services. Such multi-touch capable device 400 can also include one or more wireless communication subsystems.

在某些实施方式中,可以包括诸如通用串行总线(USB)端口或对接端口(dockingport)之类的端口设备,或是某些其他有线端口连接。端口设备,例如可用于与其他计算设备建立有线连接,所述其他计算设备例如可以是其他具有多点触摸能力的设备400、网络接入设备、个人计算机、打印机或是能够接收和/或发射数据的其他处理设备。在某些实施方式中,端口设备允许具有多点触摸能力的设备400使用一种或多种协议来与主机设备同步,诸如可以使用TCP/IP、HTTP、 UDP以及其他任何已知协议。In some embodiments, a port device such as a universal serial bus (USB) port or a docking port, or some other wired port connection, may be included. The port device, for example, may be used to establish a wired connection with another computing device, such as another multi-touch capable device 400, a network access device, a personal computer, a printer, or other processing device capable of receiving and/or transmitting data. In some embodiments, the port device allows the multi-touch capable device 400 to synchronize with a host device using one or more protocols, such as TCP/IP, HTTP, UDP, or any other known protocols.

网络操作环境Network operating environment

图5是用于图4中具有多点触摸能力的设备400的例示网络操作环境600的框图。举例来说,图4中具有多点触摸能力的设备400可以在数据通信中经一个或多个有线和/或无线网络510进行通信。例如,无线网络512可以是例如蜂窝网络,它可以通过使用网关516来与诸如因特网之类的广域网(WAN)514进行通信。同样,接入点518可以是诸如802.11g无线接入点,它可以提供对广域网514的通信访问。在某些实施方式中,语音和数据通信可以经由无线网络512和接入点 518来建立。例如,具有多点触摸能力的设备400a可以经由无线网络 512、网关516以及广域网514(例如使用TCP/IP或UDP协议)来发出和接收电话呼叫(例如使用VoIP协议),发送和接收电子邮件消息 (例如使用POP3协议),以及检索电子文档和/或流,例如web页面、照片和视频。同样,具有多点触摸能力的设备400b可以经由接入点 518和广域网514来发出和接收电话呼叫,发送和接收电子邮件消息,以及检索电子文档。在某些实施方式中,具有多点触摸能力的设备400 可以使用一条或多条电缆与接入点518物理连接,并且接入点518可以是个人计算机。在这种配置中,具有多点触摸能力的设备400可以被称为“带缆(tethered)”设备。FIG5 is a block diagram of an exemplary network operating environment 600 for the multi-touch capable device 400 of FIG4 . For example, the multi-touch capable device 400 of FIG4 can communicate via one or more wired and/or wireless networks 510 in data communications. For example, wireless network 512 can be, for example, a cellular network that can communicate with a wide area network (WAN) 514, such as the Internet, using a gateway 516. Similarly, access point 518 can be, for example, an 802.11g wireless access point that can provide communication access to the WAN 514. In some embodiments, voice and data communications can be established via wireless network 512 and access point 518. For example, multi-touch capable device 400a can make and receive phone calls (e.g., using VoIP), send and receive email messages (e.g., using POP3), and retrieve electronic documents and/or streams, such as web pages, photos, and videos, via wireless network 512, gateway 516, and WAN 514 (e.g., using TCP/IP or UDP). Similarly, multi-touch enabled device 400b can make and receive phone calls, send and receive email messages, and retrieve electronic documents via access point 518 and wide area network 514. In some embodiments, multi-touch enabled device 400b can be physically connected to access point 518 using one or more cables, and access point 518 can be a personal computer. In this configuration, multi-touch enabled device 400b can be referred to as a "tethered" device.

具有多点触摸能力的设备400a和400b还可以借助其他手段来建立通信。例如,具有多点触摸能力的设备400a可以经由无线网络512 而与其他无线设备,例如与其他具有多点触摸能力的设备400、蜂窝电话等等进行通信。同样,具有多点触摸能力的设备400a和400b可以通过使用一个或多个通信子系统来建立诸如个人局域网之类的点对点通信520,其中所述通信子系统可以是图4所示的BluetoothTM通信设备488。此外,也可以实施其他的通信协议和拓扑结构。Multi-touch enabled devices 400a and 400b may also establish communication via other means. For example, multi-touch enabled device 400a may communicate with other wireless devices, such as other multi-touch enabled devices 400, cellular phones, etc., via wireless network 512. Similarly, multi-touch enabled devices 400a and 400b may establish point-to-point communication 520, such as a personal area network, by utilizing one or more communication subsystems, such as Bluetooth communication device 488 shown in FIG. Other communication protocols and topologies may also be implemented.

举例来说,具有多点触摸能力的设备400可以经由一个或多个有线和/或无线网络510而与网络资源530进行通信。例如,该网络资源可以如参考图1~2所述,是用于递送那些能够经由触摸模型而被触摸的web页面的web服务器。For example, the multi-touch capable device 400 can communicate with a network resource 530 via one or more wired and/or wireless networks 510. For example, the network resource can be a web server that delivers web pages that can be touched via the touch model, as described with reference to Figures 1-2.

还可以提供包括软件更新服务的其他服务,其中所述软件更新服务自动确定是否存在用于具有多点触摸能力的设备400上的软件的软件更新,随后则将该软件更新下载到具有多点触摸能力的设备400,在设备400上软件可以被手动或自动解包和/或安装。Other services may also be provided, including a software update service that automatically determines whether a software update exists for software on the multi-touch capable device 400 and then downloads the software update to the multi-touch capable device 400, where the software may be manually or automatically unpacked and/or installed.

例示的移动设备架构Example mobile device architecture

图6是图4中具有多点触摸能力的设备400的例示实施方式的框图600。具有多点触摸能力的设备400可以包括存储器接口602、一个或多个数据处理器、图像处理器和/或中央处理单元604、以及外围接口606。存储器接口602、一个或多个处理器604和/或外围接口606既可以是分立元件,也可以集成在一个或多个集成电路中。在具有多点触摸能力的设备400中,各种元件可以通过一条或多条通信总线或信号线来耦合。FIG6 is a block diagram 600 of an exemplary embodiment of the multi-touch capable device 400 of FIG4 . The multi-touch capable device 400 may include a memory interface 602 , one or more data processors, an image processor, and/or a central processing unit 604 , and a peripheral interface 606 . The memory interface 602 , the one or more processors 604 , and/or the peripheral interface 606 may be discrete components or integrated into one or more integrated circuits. In the multi-touch capable device 400 , the various components may be coupled via one or more communication buses or signal lines.

传感器、设备和子系统可以耦合到外围接口606,以便帮助实现多种功能。例如,运动传感器610、光传感器612和接近度传感器614 可以耦合到外围接口606,以方便有关图4所述的定向、照明和接近度功能。其他传感器616同样可以与外围接口606相连,例如定位系统(例如GPS接收机)、温度传感器、生物测定传感器或其他感测设备,由此可以帮助实施相关的功能。Sensors, devices, and subsystems can be coupled to peripheral interface 606 to facilitate various functions. For example, motion sensor 610, light sensor 612, and proximity sensor 614 can be coupled to peripheral interface 606 to facilitate the orientation, lighting, and proximity functions described with respect to FIG. 4. Other sensors 616 can also be connected to peripheral interface 606, such as a positioning system (e.g., a GPS receiver), a temperature sensor, a biometric sensor, or other sensing device, to facilitate related functions.

相机子系统620和光学传感器622可以用于方便诸如记录照片和视频剪辑的相机功能的实现,其中所述相机子系统和光学传感器例如可以是电荷耦合器件(CCD)或互补金属氧化物半导体(CMOS)光学传感器。The camera subsystem 620 and optical sensor 622 , which may be, for example, a charge coupled device (CCD) or complementary metal oxide semiconductor (CMOS) optical sensor, may be used to facilitate camera functions such as recording photos and video clips.

可以通过一个或多个无线通信子系统624来帮助实现通信功能,其中所述无线通信子系统可以包括射频接收机和发射机和/或光(例如红外)接收机和发射机。通信子系统624的特定设计和实施方式可以取决于具有多点触摸能力的设备400打算在经其工作的一个或多个通信网络。例如,具有多点触摸能力的设备400可以包括被设计成经GSM 网络、GPRS网络、EDGE网络、Wi-Fi或WiMax网络以及BlueboothTM网络上工作的通信子系统624。特别地,无线通信子系统624可以包括主机协议,以使设备500可被配置成用于其他无线设备的基站。Communication functionality may be facilitated by one or more wireless communication subsystems 624, which may include radio frequency receivers and transmitters and/or optical (e.g., infrared) receivers and transmitters. The specific design and implementation of the communication subsystem 624 may depend on the communication network or networks over which the multi-touch capable device 400 is intended to operate. For example, the multi-touch capable device 400 may include a communication subsystem 624 designed to operate over a GSM network, a GPRS network, an EDGE network, a Wi-Fi or WiMax network, and a Bluebooth network. In particular, the wireless communication subsystem 624 may include a host protocol so that the device 500 can be configured as a base station for other wireless devices.

音频子系统626可以与扬声器628以及麦克风630相耦合,以便帮助实施启用语音的功能,例如语音识别、语音复制、数字记录和电话功能。Audio subsystem 626 may be coupled to speaker 628 and microphone 630 to facilitate voice-enabled functions such as voice recognition, voice replication, digital recording, and telephony.

I/O子系统640可以包括触摸屏控制器642和/或一个或多个其他输入控制器644。触摸屏控制器642可以耦合到触摸屏646。举例来说,该触摸屏646和触摸屏控制器642可以使用多种触摸感测技术中的任何一种来检测与之进行的接触和移动或是暂停,其中感测技术包括但不局限于电容性、电阻性、红外和表面声波技术,以及其他的接近度传感器阵列或其他用于确定与触摸屏646的一个或多个接触点的部件。The I/O subsystem 640 may include a touch screen controller 642 and/or one or more other input controllers 644. The touch screen controller 642 may be coupled to a touch screen 646. For example, the touch screen 646 and touch screen controller 642 may detect contact and movement or pause therewith using any of a variety of touch sensing technologies, including but not limited to capacitive, resistive, infrared, and surface acoustic wave technologies, as well as other proximity sensor arrays or other means for determining one or more points of contact with the touch screen 646.

一个或多个其他输入控制器644可以耦合到其他输入/控制设备 648,例如一个或多个按钮、摇杆开关、拇指旋轮、红外端口、USB 端口、和/或指示笔之类的指针设备。所述一个或多个按钮(未显示) 可以包括用于控制扬声器628和/或麦克风630音量的向上/向下按钮。One or more other input controllers 644 can be coupled to other input/control devices 648, such as one or more buttons, rocker switches, thumb wheels, infrared ports, USB ports, and/or pointer devices such as styluses. The one or more buttons (not shown) can include up/down buttons for controlling the volume of the speaker 628 and/or microphone 630.

在一个实施方式中,可以通过按住按钮持续第一持续时间来解除触摸屏646的锁定;并且如果按住按钮持续第二持续时间,其中第二持续时间长于第一持续时间,那么可以接通或切断具有多点触摸能力的设备400的电源。用户能够定制一个或多个按钮的功能。此外,举例来说,触摸屏646也可以用于实施虚拟或软按钮和/或数字键盘或键盘。In one embodiment, the touch screen 646 can be unlocked by pressing and holding a button for a first duration; and if the button is pressed and held for a second duration, where the second duration is longer than the first duration, the multi-touch capable device 400 can be powered on or off. The user can customize the function of one or more buttons. In addition, for example, the touch screen 646 can also be used to implement virtual or soft buttons and/or a numeric keypad or keyboard.

在某些实施方式中,具有多点触摸能力的设备400可以呈现已记录的音频和/或视频文件,例如MP3、AAC和MPEG文件。在某些实施方式中,具有多点触摸能力的设备400可以包括MP3播放器的功能,例如iPodTM。由此,具有多点触摸能力的设备400可以包括一个与iPod兼容的32引脚连接器。此外还可以使用其他的输入/输出和控制设备。In some embodiments, the multi-touch device 400 can present recorded audio and/or video files, such as MP3, AAC, and MPEG files. In some embodiments, the multi-touch device 400 can include the functionality of an MP3 player, such as an iPod . Thus, the multi-touch device 400 can include a 32-pin connector compatible with an iPod. Other input/output and control devices may also be used.

存储器接口602可以与存储器650相耦合。该存储器650可以包括高速随机存取存储器和/或非易失性存储器,例如一个或多个磁盘存储设备、一个或多个光学存储设备、和/或闪存存储器(例如NAND, NOR)。存储器650可以存储操作系统652,例如Darwin、RTXC、LINUX、UNIX、OS X、WINDOWS,或是VxWorks之类的嵌入式操作系统。该操作系统652可以包括用于处理基本系统服务以及执行依赖于硬件的任务的指令。The memory interface 602 can be coupled to a memory 650. The memory 650 can include high-speed random access memory and/or non-volatile memory, such as one or more magnetic disk storage devices, one or more optical storage devices, and/or flash memory (e.g., NAND, NOR). The memory 650 can store an operating system 652, such as Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, or an embedded operating system such as VxWorks. The operating system 652 can include instructions for handling basic system services and performing hardware-dependent tasks.

存储器650还可以存储通信指令654,以便帮助实施与一个或多个附加设备、一个或多个计算机和/或一个或多个服务器的通信。该存储器650可以包括用于帮助实施图形用户界面处理的图形用户界面指令656;用于帮助实施与传感器相关的处理和功能的传感器处理指令 658;用于帮助实施与电话相关的处理和功能的电话指令660;用于帮助实施与电子消息收发相关的处理和功能的电子消息收发指令662;用于帮助实施与web浏览相关的处理和功能的web浏览指令664;用于帮助实施与媒体处理相关的处理和功能的媒体处理指令666;用于帮助实施与GPS和导航相关的处理和功能的GPS/导航指令668;用于帮助实施与相机相关的处理和功能的相机指令670;和/或其他那些用于帮助实施如参考图1~5描述的处理和功能的其他消息收发指令672。The memory 650 may also store communication instructions 654 to facilitate communication with one or more additional devices, one or more computers, and/or one or more servers. The memory 650 may include graphical user interface instructions 656 to facilitate graphical user interface processing; sensor processing instructions 658 to facilitate sensor-related processing and functionality; telephony instructions 660 to facilitate telephony-related processing and functionality; electronic messaging instructions 662 to facilitate electronic messaging-related processing and functionality; web browsing instructions 664 to facilitate web browsing-related processing and functionality; media processing instructions 666 to facilitate media processing-related processing and functionality; GPS/navigation instructions 668 to facilitate GPS and navigation-related processing and functionality; camera instructions 670 to facilitate camera-related processing and functionality; and/or other messaging instructions 672 to facilitate processing and functionality as described with reference to FIGURES 1-5.

以上标识的每个指令和应用都可以与用于执行上述一个或多个功能的一组指令相对应。这些指令没有必要实现为独立的软件程序、过程或模块。存储器650可以包括附加的指令或更少的指令。此外,具有多点触摸能力的设备400的各种功能可以在硬件和/或软件中实施,包括在一个或多个信号处理和/或专用集成电路中实施。Each of the instructions and applications identified above may correspond to a set of instructions for performing one or more of the functions described above. These instructions do not necessarily have to be implemented as separate software programs, processes, or modules. The memory 650 may include additional instructions or fewer instructions. Furthermore, the various functions of the device 400 with multi-touch capabilities may be implemented in hardware and/or software, including in one or more signal processing and/or application specific integrated circuits.

所描述的特征既可以在数字电子电路中实施,也可以在计算机硬件、固件、软件或其组合中实施。这些特征可以在计算机程序产品中实施,其中该产品有形包含在机器可读存储设备或传播信号之类的信息载体中,以便由可编程处理器加以执行;此外,方法步骤可以由可编程处理器来执行,其中该处理器将会执行指令程序,以便通过对输入数据执行操作并产生输出来执行所描述的实施方式的功能。The described features can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or a combination thereof. These features can be embodied in a computer program product tangibly embodied in an information carrier such as a machine-readable storage device or a propagated signal for execution by a programmable processor; furthermore, method steps can be performed by a programmable processor executing a program of instructions to perform functions of the described embodiments by operating on input data and generating output.

有利的是,所描述的特征可以在一个或多个计算机程序中实施,其中所述计算机程序可以在可编程系统上运行,该可编程系统包括至少一个可编程处理器,所述至少一个可编程处理器被耦合以从数据存储系统、至少一个输入设备以及至少一个输出设备中接收数据和指令并向其传送数据和指令。计算机程序是一组可以直接或间接在计算机中使用,以便执行某些活动或是带来某种结果的指令。计算机程序可以用包括编译或解释性语言在内任何形式的编程语言来编写(例如 Objective-C、Java),此外,它也可以采用任何形式来部署,包括独立程序或是模块、元件、子例程,或是适合在计算环境中使用的其他单元。Advantageously, the described features can be implemented in one or more computer programs, wherein the computer programs are executable on a programmable system comprising at least one programmable processor coupled to receive data and instructions from and transmit data and instructions to a data storage system, at least one input device, and at least one output device. A computer program is a set of instructions that can be used, directly or indirectly, in a computer to perform some activity or bring about some result. A computer program can be written in any programming language, including compiled or interpreted languages (e.g., Objective-C, Java), and can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

作为例示,适于执行指令程序的处理器包括任何类型的计算机中的通用和专用微处理器,以及唯一处理器或是多处理器或核之一。通常,处理器会接收来自只读存储器、随机存取存储器或是这二者的指令和数据。计算机的基本部件是用于执行指令的处理器以及一个或多个用于存储指令和数据的存储器。通常,计算机还包括一个或多个用于存储数据文件的大容量存储设备或者以可操作的方式耦合成与至所述一个或多个用于存储数据文件的大容量存储设备进行通信;此类设备包括磁盘,例如内部硬盘和可移除盘;磁光盘;以及光盘。适合有形包含计算机程序指令和数据的存储设备包括任何形式的非易失性存储器,其示例包括:半导体存储器设备,如EPROM、EEPROM以及闪存设备;磁盘,例如内部硬盘和可移除盘;磁光盘;以及CD-ROM 和DVD-ROM盘。处理器和存储器可以由ASIC(专用集成电路)补充或可被引入其内。By way of example, processors suitable for executing a program of instructions include general-purpose and special-purpose microprocessors, as well as the sole processor or one of multiple processors or cores in any type of computer. Typically, a processor receives instructions and data from read-only memory, random access memory, or both. The essential components of a computer are a processor for executing instructions and one or more memories for storing instructions and data. Typically, a computer also includes, or is operatively coupled to communicate with, one or more mass storage devices for storing data files; such devices include magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices suitable for tangibly containing computer program instructions and data include any form of non-volatile memory, examples of which include: semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and memory may be supplemented by or incorporated into an ASIC (application-specific integrated circuit).

为了提供与用户的交互,这些特征可以在计算机上实施,其中该计算机具有CRT(阴极射线管)或LCD(液晶显示器)监视器之类的显示设备用于向用户显示信息,并且还具有键盘以及鼠标或轨迹球之类的指示设备以供用户向计算机提供输入。To provide for interaction with a user, these features may be implemented on a computer having a display device such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor for displaying information to the user, and a keyboard and pointing device such as a mouse or trackball for the user to provide input to the computer.

这些特征可以在计算机系统中实施,其中该计算机系统包括诸如数据服务器之类的后端元件,或者包括诸如应用服务器或因特网服务器之类的中间件元件,或者可以包括诸如具有图形用户界面或因特网浏览器的客户计算机之类的前端元件或其任意组合。系统元件可以借助诸如通信网络之类的任何形式的数字数据通信介质来连接。通信网络的示例包括LAN、WAN以及构成因特网的计算机和网络。These features can be implemented in a computer system that includes back-end components such as a data server, or middleware components such as an application server or an Internet server, or front-end components such as a client computer with a graphical user interface or an Internet browser, or any combination thereof. The system components can be connected via any form of digital data communication medium, such as a communication network. Examples of communication networks include LANs, WANs, and the computers and networks that make up the Internet.

计算机系统可以包括客户机和服务器。客户机和服务器通常彼此远离,并且通常是通过网络来交互的。客户机与服务器的关系是借助运行在相应计算机上并且彼此具有客户机-服务器关系的计算机程序来产生的。A computer system may include clients and servers. The client and server are generally remote from each other and typically interact through a network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

在这里已经描述了多种实施方式。但是应该理解,各种修改都是可行的。例如,通过组合、删除、修改或补充一个或多个实施方式的要素,就可以构成更多的实施方式。另举一例,图中描述的逻辑流程无需按照显示的特定次序或顺序来实现预期结果。此外,可以提供其他步骤,也可以从所描述的流程中删除步骤,并且可以向所描述的系统添加或从中移除其他元件。因此,其他实施方式处于所附权利要求的范围内。A variety of embodiments have been described herein. However, it should be understood that various modifications are possible. For example, further embodiments may be constructed by combining, deleting, modifying, or supplementing elements of one or more embodiments. As another example, the logic flows depicted in the figures do not need to be in the specific order or sequence shown to achieve the desired results. Furthermore, additional steps may be provided, steps may be deleted from the described flows, and other elements may be added to or removed from the described systems. Therefore, other embodiments are within the scope of the appended claims.

Claims (22)

1.一种用于处理触摸事件的方法,包括:1. A method for handling touch events, comprising: 接收在触摸敏感设备上显示的web页面的一个或多个单元上的多个同时的手指触摸相关联的触摸输入信号,所述web页面包括用于处理一个或多个触摸事件的指令和用于处理一个或多个手势事件的指令,所述一个或多个手势事件不同于所述一个或多个触摸事件;Receives touch input signals associated with multiple simultaneous finger touches on one or more units of a web page displayed on a touch-sensitive device, the web page including instructions for processing one or more touch events and instructions for processing one or more gesture events, the one or more gesture events being different from the one or more touch events; 确定与所述多个同时的手指触摸相关联的所述触摸输入信号是否与相对于所述web页面的一个或多个单元做出的触摸手势相关联;Determine whether the touch input signal associated with the plurality of simultaneous finger touches is associated with a touch gesture made relative to one or more units of the web page; 将与所述多个同时的手指触摸相关联的触摸事件组合成手势事件;The touch events associated with the multiple simultaneous finger touches are combined into a gesture event; 如果所述触摸输入信号与所述触摸手势相关联,则通过执行存储在web页面中的指令将所述手势事件转发至所述web页面以供处理;以及If the touch input signal is associated with the touch gesture, the gesture event is forwarded to the web page for processing by executing instructions stored in the web page; and 接收与所述web页面的所述一个或多个单元不相关联的触摸输入信号,以及用浏览器应用程序处理与所述web页面的所述一个或多个单元不相关联的所述触摸输入信号。Receive touch input signals that are not associated with one or more units of the web page, and process the touch input signals that are not associated with one or more units of the web page using a browser application. 2.根据权利要求1所述的方法,其中web页面具有与文档对象模型DOM中的节点相关联的区域,并且所述节点位于所述DOM的相同或不同层组上。2. The method of claim 1, wherein the web page has regions associated with nodes in the Document Object Model (DOM), and the nodes are located on the same or different layers of the DOM. 3.根据权利要求1所述的方法,其中所述触摸事件来自于由触摸开始事件、触摸移动事件、触摸结束事件或触摸取消事件组成的一组触摸事件。3. The method according to claim 1, wherein the touch event comes from a set of touch events consisting of a touch start event, a touch move event, a touch end event, or a touch cancel event. 4.根据权利要求1所述的方法,其中所述触摸事件与能被插入文档以在web页面中定义事件动作的属性相关联。4. The method of claim 1, wherein the touch event is associated with an attribute that can be inserted into a document to define an event action in a web page. 5.根据权利要求4所述的方法,其中所述属性被插入HTML文档中的一个或多个HTML标签内,用以生成在触摸敏感设备上显示的所述web页面。5. The method of claim 4, wherein the attribute is inserted into one or more HTML tags in an HTML document to generate the web page displayed on a touch-sensitive device. 6.根据权利要求5所述的方法,包括基于与所述web页面的所述一个或多个单元相关联的所述HTML标签来处理所述触摸事件。6. The method of claim 5, further comprising processing the touch event based on the HTML tag associated with the one or more units of the web page. 7.根据权利要求1所述的方法,其中一系列触摸事件被确定为包括触摸开始事件、一个或多个触摸移动事件以及触摸结束或者触摸取消事件。7. The method of claim 1, wherein the series of touch events is determined to include a touch start event, one or more touch movement events, and a touch end or touch cancel event. 8.一种触摸敏感设备,包括:8. A touch-sensitive device, comprising: 触摸敏感显示器,用于显示web页面的一个或多个区域,并接收与在触摸敏感设备上显示的web页面的一个或多个单元上的多个同时的手指触摸相关联的触摸输入信号,所述web页面包括用于处理一个或多个触摸事件的指令和用于处理一个或多个手势事件的指令,所述一个或多个手势事件不同于所述一个或多个触摸事件;以及A touch-sensitive display for displaying one or more areas of a web page and receiving touch input signals associated with multiple simultaneous finger touches on one or more units of the web page displayed on a touch-sensitive device, the web page including instructions for processing one or more touch events and instructions for processing one or more gesture events, the one or more gesture events being different from the one or more touch events; and 处理器,用于确定与所述多个同时的手指触摸相关联的所述触摸输入信号是否与相对于所述web页面的一个或多个单元做出的接触手势相关联,用于将与所述多个同时的手指触摸相关联的触摸事件组合成手势事件;并且用于如果所述触摸输入信号与所述接触手势相关联,则通过执行存储在所述web页面中的指令将所述手势事件转发至所述web页面以供处理,所述处理器还被配置用于接收与所述web页面的所述一个或多个单元不相关联的触摸输入信号,以及用浏览器应用程序处理与所述web页面的所述一个或多个单元不相关联的所述触摸输入信号。A processor is configured to determine whether a touch input signal associated with the plurality of simultaneous finger touches is associated with a touch gesture made relative to one or more units of the web page; to combine touch events associated with the plurality of simultaneous finger touches into a gesture event; and to forward the gesture event to the web page for processing by executing instructions stored in the web page if the touch input signal is associated with the touch gesture. The processor is also configured to receive touch input signals not associated with the one or more units of the web page, and to process the touch input signals not associated with the one or more units of the web page using a browser application. 9.根据权利要求8所述的触摸敏感设备,其中web页面具有与文档对象模型DOM中的节点相关联的区域,并且所述节点位于所述DOM的相同或不同层组上。9. The touch-sensitive device of claim 8, wherein the web page has regions associated with nodes in the Document Object Model (DOM), and the nodes are located on the same or different layers of the DOM. 10.根据权利要求8所述的触摸敏感设备,其中所述触摸事件来自于由触摸开始事件、触摸移动事件、触摸结束事件或触摸取消事件组成的一组触摸事件。10. The touch-sensitive device according to claim 8, wherein the touch event originates from a set of touch events consisting of a touch start event, a touch move event, a touch end event, or a touch cancel event. 11.根据权利要求8所述的触摸敏感设备,其中所述触摸事件与能被插入文档以在web页面中定义事件动作的属性相关联。11. The touch-sensitive device of claim 8, wherein the touch event is associated with an attribute that can be inserted into a document to define an event action in a web page. 12.根据权利要求11所述的触摸敏感设备,其中所述属性被插入HTML文档中的一个或多个HTML标签内,用以生成在触摸敏感设备上显示的所述web页面。12. The touch-sensitive device of claim 11, wherein the attribute is inserted into one or more HTML tags in an HTML document to generate the web page displayed on the touch-sensitive device. 13.根据权利要求12所述的触摸敏感设备,其中处理器被进一步配置用于基于与所述web页面的一个或多个单元相关联的所述HTML标签来处理所述触摸事件。13. The touch-sensitive device of claim 12, wherein the processor is further configured to process the touch event based on the HTML tag associated with one or more units of the web page. 14.根据权利要求8所述的触摸敏感设备,其中一系列触摸事件被确定为包括触摸开始事件、一个或多个触摸移动事件以及触摸结束或者触摸取消事件。14. The touch-sensitive device of claim 8, wherein a series of touch events is defined as including a touch start event, one or more touch movement events, and a touch end or touch cancel event. 15.一种用于处理触摸事件的系统,包括:15. A system for processing touch events, comprising: 用于显示web页面的一个或多个区域以及接收在所述web页面的一个或多个单元上的多个同时的手指触摸相关联的触摸输入信号的触摸敏感显示装置,所述web页面包括用于处理一个或多个触摸事件的指令和用于处理一个或多个手势事件的指令,所述一个或多个手势事件不同于所述触摸事件;A touch-sensitive display device for displaying one or more areas of a web page and receiving touch input signals associated with multiple simultaneous finger touches on one or more units of the web page, the web page including instructions for processing one or more touch events and instructions for processing one or more gesture events, the one or more gesture events being different from the touch events; 用于处理所述触摸输入信号的装置,包括用于确定与所述多个同时的手指触摸相关联的所述触摸输入信号是否与相对于所述web页面的一个或多个区域做出的触摸手势相关联的装置;The means for processing the touch input signal includes means for determining whether the touch input signal associated with the plurality of simultaneous finger touches is associated with a touch gesture made relative to one or more areas of the web page; 将与所述多个同时的手指触摸相关联的触摸事件组合成手势事件的装置;以及A means for combining touch events associated with the plurality of simultaneous finger touches into a gesture event; and 用于如果所述触摸输入信号与所述触摸手势相关联,则通过执行存储在所述web页面中的指令将所述手势事件转发至所述web页面以供处理的装置;A means for forwarding a gesture event to the web page for processing by executing instructions stored in the web page if the touch input signal is associated with the touch gesture; 其中用于处理所述触摸输入信号的装置还包括:用于接收与所述web页面的所述一个或多个区域不相关联的触摸输入信号,以及用浏览器应用程序处理与所述web页面的所述一个或多个单元不相关联的所述触摸输入信号的装置。The means for processing the touch input signal further includes: means for receiving touch input signals that are not associated with the one or more areas of the web page, and means for processing the touch input signals that are not associated with the one or more units of the web page using a browser application. 16.根据权利要求15所述的系统,其中所述web页面的所述一个或多个区域与文档对象模型DOM中的节点相关联,并且所述节点位于所述DOM的相同或不同层级上。16. The system of claim 15, wherein the one or more regions of the web page are associated with nodes in the Document Object Model (DOM), and the nodes are located at the same or different levels of the DOM. 17.根据权利要求15所述的系统,其中所述触摸事件来自于由触摸开始事件、触摸移动事件、触摸结束事件或触摸取消事件组成的一组触摸事件。17. The system of claim 15, wherein the touch event originates from a set of touch events comprising a touch start event, a touch move event, a touch end event, or a touch cancel event. 18.根据权利要求15所述的系统,其中所述触摸事件与能被插入文档以在web页面中定义事件动作的属性相关联。18. The system of claim 15, wherein the touch event is associated with an attribute that can be inserted into a document to define an event action in a web page. 19.根据权利要求18所述的系统,其中所述属性被插入HTML文档中的一个或多个HTML标签内,用以生成在触摸敏感设备上显示的所述web页面。19. The system of claim 18, wherein the attribute is inserted into one or more HTML tags in an HTML document to generate the web page displayed on a touch-sensitive device. 20.根据权利要求19所述的系统,其中用于处理触摸输入信号的装置还包括:用于基于所述一个或多个HTML标签来处理所述触摸事件的装置。20. The system of claim 19, wherein the means for processing the touch input signal further comprises: means for processing the touch event based on the one or more HTML tags. 21.根据权利要求15所述的系统,其中一系列触摸事件被确定为包括触摸开始事件、一个或多个触摸移动事件以及触摸结束或者触摸取消事件。21. The system of claim 15, wherein a series of touch events is determined to include a touch start event, one or more touch movement events, and a touch end or touch cancel event. 22.一种方法,包括:22. A method comprising: 接收与网页的相应区域相关联的触摸输入信号,其中所述网页的所述相应区域与多个事件处理机或者事件监听器相关联,所述多个事件处理机或者事件监听器包括用于触摸事件的事件处理机或者监听器以及用于手势事件的事件处理机或者监听器,所述手势事件不同于所述触摸事件;以及Receive a touch input signal associated with a corresponding area of a webpage, wherein the corresponding area of the webpage is associated with a plurality of event handlers or event listeners, the plurality of event handlers or event listeners including event handlers or listeners for touch events and event handlers or listeners for gesture events, the gesture events being different from the touch events; and 响应于接收到所述触摸输入信号:In response to receiving the touch input signal: 将与所述多个同时的手指触摸相关联的触摸事件组合成手势事件的装置;所述多个同时的手指触摸对应于所述触摸输入信号;A device for combining touch events associated with the plurality of simultaneous finger touches into a gesture event; the plurality of simultaneous finger touches correspond to the touch input signal; 向所述网页发送所述手势事件;Send the gesture event to the webpage; 基于与所述手势事件相关联的缩放信息,利用用于所述手势事件的所述事件处理机或者监听器,对与所述网页的所述相应区域相关联的元素动态调整大小;以及Based on scaling information associated with the gesture event, the size of elements associated with the corresponding area of the webpage is dynamically adjusted using the event handler or listener for the gesture event; and 向所述网页发送所述触摸事件以供进一步处理。The touch event is sent to the webpage for further processing.
HK15112844.6A 2008-03-04 2015-12-30 Method, system and touch sensitive device for processing touch events HK1212061B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US12/042,237 2008-03-04
US12/042,237 US8174502B2 (en) 2008-03-04 2008-03-04 Touch event processing for web pages

Publications (2)

Publication Number Publication Date
HK1212061A1 HK1212061A1 (en) 2016-06-03
HK1212061B true HK1212061B (en) 2020-12-31

Family

ID=

Similar Documents

Publication Publication Date Title
JP7369833B2 (en) Touch event model programming interface
CN104794105B (en) It is a kind of for handling the method, system, touch-sensitive device of touch event
JP5638584B2 (en) Touch event model for web pages
HK1212061B (en) Method, system and touch sensitive device for processing touch events
HK1212062B (en) Touch event processing for web pages
HK1186264B (en) Touch event model for web pages
HK1196684B (en) Touch event model programming interface
HK1197943A (en) Touch event model programming interface
HK1197943B (en) Touch event model programming interface
HK1186264A (en) Touch event model for web pages
HK1196684A (en) Touch event model programming interface