技术领域technical field
本发明大体上涉及用户接口处理,包括但不限于,识别触摸输入的装置和方法。The present invention generally relates to user interface processing, including, but not limited to, apparatus and methods for recognizing touch input.
背景技术Background technique
电子设备通常包括用于与计算设备交互的用户接口。用户接口可以包括显示器和/或诸如键盘、鼠标和触摸敏感表面的输入设备,用于与用户接口的各种方面交互。在具有触摸敏感表面作为输入设备的一些设备中,在特定的上下文中(例如,在第一应用程序的特定模式中),第一组基于触摸的姿态(例如,两次或更多次的:轻敲、双击、水平挥击、垂直挥击、捏(pinch)、散开(depinch)、两指挥击)被识别为适合的输入,在其他上下文中(例如,不同的应用程序和/或第一应用程序内的不同模式或上下文),其他不同组的基于触摸的姿态被识别为适合的输入。结果是,识别和响应于基于触摸的姿态所需的软件和逻辑可能变得复杂,并且在每次更新应用程序或者向计算设备添加新的应用程序时可能需要修正。这些以及类似的问题可能出现在使用除基于触摸的姿态外的输入源的用户接口中。Electronic devices often include a user interface for interacting with the computing device. A user interface may include a display and/or input devices such as a keyboard, mouse, and touch-sensitive surfaces for interacting with various aspects of the user interface. In some devices with a touch-sensitive surface as an input device, in a specific context (eg, in a specific mode of a first application), a first set of touch-based gestures (eg, two or more of: tap, double-tap, horizontal swipe, vertical swipe, pinch, depinch, two-finger swipe) are recognized as appropriate inputs, in other contexts (e.g., different applications and/or second different modes or contexts within an application), other different sets of touch-based gestures are recognized as suitable inputs. As a result, the software and logic required to recognize and respond to touch-based gestures can become complex and may require revisions each time applications are updated or new applications are added to the computing device. These and similar problems may arise in user interfaces that use input sources other than touch-based gestures.
因此,期望具有用于识别基于触摸的姿态和事件以及来自其他输入源的姿态和事件的综合框架或机制,其易于适用于计算设备上的所有应用程序的几乎所有上下文或模式。Accordingly, it would be desirable to have a comprehensive framework or mechanism for recognizing touch-based gestures and events as well as gestures and events from other input sources that is readily applicable to nearly any context or mode of all applications on a computing device.
发明内容Contents of the invention
为了解决前述的缺点,一些实施例提供了在具有触摸敏感显示器的电子设备中执行的方法。所述电子设备被配置成至少执行第一软件应用程序和第二软件应用程序。所述第一软件应用程序包括第一组一个或多个姿态识别器,并且所述第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有对应的姿态处理器。所述方法包括至少显示所述第二软件应用程序的一个或多个视图的子集,并且当至少显示所述第二软件应用程序的一个或多个视图的子集时,检测所述触摸敏感显示器上的触摸输入序列。所述触摸输入序列包括一个或多个触摸输入的第一部分以及所述第一部分之后的一个或多个触摸输入的第二部分。所述方法还包括:在检测所述触摸输入序列的第一阶段期间,传送一个或多个触摸输入的所述第一部分到所述第一软件应用程序和所述第二软件应用程序,从所述第一组中的姿态识别器中认定识别一个或多个触摸输入的所述第一部分的一个或多个匹配的姿态识别器;以及使用对应于所述一个或多个匹配的姿态识别器的一个或多个姿态处理器来处理一个或多个触摸输入的所述第一部分。To address the aforementioned shortcomings, some embodiments provide methods performed in electronic devices with touch-sensitive displays. The electronic device is configured to execute at least a first software application and a second software application. The first software application includes a first set of one or more gesture recognizers, and the second software application includes one or more views and a second set of one or more gesture recognizers. Respective gesture recognizers have corresponding gesture processors. The method includes displaying at least a subset of the one or more views of the second software application, and when at least the subset of the one or more views of the second software application is displayed, detecting the touch sensitive A sequence of touch inputs on a display. The sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion. The method also includes transmitting the first portion of one or more touch inputs to the first software application and the second software application during the first phase of detecting the sequence of touch inputs, from which identifying one or more matching gesture recognizers among the gesture recognizers in the first set that recognize said first portion of one or more touch inputs; and using One or more gesture processors to process the first portion of the one or more touch inputs.
根据一些实施例,提供了在具有触摸敏感显示器的电子设备中执行的方法。所述电子设备被配置成至少执行第一软件应用程序和第二软件应用程序。所述第一软件应用程序包括第一组一个或多个姿态识别器,并且所述第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有对应的姿态处理器。所述方法包括显示第一组一个或多个视图。所述第一组一个或多个视图至少包括所述第二软件应用程序的一个或多个视图的子集。所述方法还包括:当显示所述第一组一个或多个视图时,检测所述触摸敏感显示器上的触摸输入序列。所述触摸输入序列包括一个或多个触摸输入的第一部分以及所述第一部分之后的一个或多个触摸输入的第二部分。所述方法包括:确定所述第一组一个或多个姿态识别器中的至少一个姿态识别器是否识别一个或多个触摸输入的所述第一部分。所述方法还包括:根据关于所述第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的所述第一部分的确定,传送所述触摸输入序列到所述第一软件应用程序,而不将所述触摸输入序列传送到所述第二软件应用程序,并确定所述第一组一个或多个姿态识别器中的至少一个姿态识别器是否识别所述触摸输入序列。所述方法进一步包括:根据关于所述第一组一个或多个姿态识别器中的至少一个姿态识别器识别所述触摸输入序列的确定,使用所述第一组一个或多个姿态识别器中的识别所述触摸输入序列的所述至少一个姿态识别器来处理所述触摸输入序列。所述方法还包括:根据关于所述第一组一个或多个姿态识别器中没有姿态识别器识别一个或多个触摸输入的所述第一部分的确定,传送所述触摸输入序列到所述第二软件应用程序,并确定所述第二组一个或多个姿态识别器中的至少一个姿态识别器是否识别所述触摸输入序列。所述方法进一步包括:根据关于所述第二组一个或多个姿态识别器中的至少一个姿态识别器识别所述触摸输入序列的确定,使用所述第二组一个或多个姿态识别器中的识别所述触摸输入序列的所述至少一个姿态识别器来处理所述触摸输入序列。According to some embodiments, a method performed in an electronic device with a touch-sensitive display is provided. The electronic device is configured to execute at least a first software application and a second software application. The first software application includes a first set of one or more gesture recognizers, and the second software application includes one or more views and a second set of one or more gesture recognizers. Respective gesture recognizers have corresponding gesture processors. The method includes displaying a first set of one or more views. The first set of one or more views includes at least a subset of the one or more views of the second software application. The method also includes detecting a sequence of touch inputs on the touch-sensitive display while the first set of one or more views is displayed. The sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion. The method includes determining whether at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the first portion of one or more touch inputs. The method also includes transmitting the sequence of touch inputs to the first set of one or more gesture recognizers based on a determination that at least one gesture recognizer of the first set of one or more gesture recognizers recognized the first portion of one or more touch inputs. the first software application without transmitting the sequence of touch inputs to the second software application, and determine whether at least one gesture recognizer in the first set of one or more gesture recognizers recognizes the Touch to enter the sequence. The method further includes, based on a determination that at least one gesture recognizer of the first set of one or more gesture recognizers recognized the touch input sequence, using processing the sequence of touch inputs by the at least one gesture recognizer that recognizes the sequence of touch inputs. The method further includes transmitting the sequence of touch inputs to the first set of one or more gesture recognizers based on a determination that none of the gesture recognizers of the first set of one or more gesture recognizers recognized the first portion of the one or more touch inputs. and a software application, and determining whether at least one gesture recognizer of the second set of one or more gesture recognizers recognizes the sequence of touch inputs. The method further includes, based on a determination that at least one gesture recognizer of the second set of one or more gesture recognizers recognizes the touch input sequence, using a gesture recognizer from the second set of one or more gesture recognizers processing the sequence of touch inputs by the at least one gesture recognizer that recognizes the sequence of touch inputs.
根据一些实施例,提供了在具有内部状态的电子设备中执行的方法。所述电子设备被配置成执行包括具有多个视图的视图层次结构的软件。所述方法包括:显示所述视图层次结构中的一个或多个视图,并且执行一个或多个软件元素。每个软件元素与特定的视图相关联,并且每个特定视图包括一个或多个事件识别器。每个事件识别器具有基于一个或多个子事件的一个或多个事件定义以及事件处理器,该事件处理器指定对目标的动作并被配置成响应于所述事件识别器检测到与所述一个或多个事件定义中的特定事件定义相对应的事件,而发送所述动作到所述目标。所述方法还包括:检测一个或多个子事件的序列,并识别所述视图层次结构的视图中的一个作为点击视图(hitview)。所述点击视图确立视图层次结构中的哪些视图是有效涉及的视图(activelyinvolvedview)。所述方法进一步包括:传送各自的子事件到用于所述视图层次结构中每个有效涉及的视图的事件识别器。用于所述视图层次结构中有效涉及的视图的至少一个事件识别器具有多个事件定义,并根据所述电子设备的内部状态选择所述多个事件定义中的一个。根据所选事件定义,在处理所述子事件序列中的下一个子事件之前,所述至少一个事件识别器处理所述各自的子事件。According to some embodiments, a method performed in an electronic device having an internal state is provided. The electronic device is configured to execute software including a view hierarchy having a plurality of views. The method includes displaying one or more views in the view hierarchy and executing one or more software elements. Each software element is associated with a specific view, and each specific view includes one or more event recognizers. Each event recognizer has one or more event definitions based on one or more sub-events and an event handler that specifies an action on a target and is configured to respond to said event recognizer detecting an event associated with said one or a plurality of event definitions corresponding to a particular event definition, and the action is sent to the target. The method also includes detecting a sequence of one or more sub-events and identifying one of the views of the view hierarchy as a hitview. The click view establishes which views in the view hierarchy are actively involved views. The method further includes passing a respective sub-event to an event recognizer for each actively involved view in the view hierarchy. At least one event recognizer for an actively involved view in the view hierarchy has a plurality of event definitions and selects one of the plurality of event definitions based on an internal state of the electronic device. According to the selected event definition, said at least one event recognizer processes said respective sub-event before processing a next sub-event in said sequence of sub-events.
根据一些实施例,非暂态计算机可读存储介质存储由电子设备的多个处理器中的一个执行的一个或多个程序。所述一个或多个程序包括当由所述电子设备执行时使得所述电子设备执行上述任何方法的一个或多个指令。According to some embodiments, a non-transitory computer-readable storage medium stores one or more programs executed by one of a plurality of processors of an electronic device. The one or more programs include one or more instructions that, when executed by the electronic device, cause the electronic device to perform any of the methods described above.
根据一些实施例,一种具有触摸敏感显示器的电子设备包括一个或多个处理器和存储用于由所述一个或多个处理器执行的一个或多个程序的存储器。所述一个或多个程序包括用于实现上述任何方法的指令。According to some embodiments, an electronic device with a touch-sensitive display includes one or more processors and memory storing one or more programs for execution by the one or more processors. The one or more programs include instructions for implementing any of the methods described above.
根据一些实施例,一种具有触摸敏感显示器的电子设备包括用于实现任何上述任何方法的装置。According to some embodiments, an electronic device with a touch sensitive display comprises means for implementing any of the methods described above.
根据一些实施例,一种具有触摸敏感显示器的多功能设备中的信息处理装置包括用于实现上述任何方法的装置。According to some embodiments, an information processing device in a multi-function device with a touch-sensitive display includes means for implementing any of the methods described above.
根据一些实施例,一种电子设备包括配置成接收触摸输入的触摸敏感显示单元和耦接到该触摸敏感显示单元的处理单元。该处理单元配置成至少执行第一软件应用程序和第二软件应用程序。所述第一软件应用程序包括第一组一个或多个姿态识别器,并且所述第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有对应的姿态处理器。所述处理单元配置成:使得能够至少显示所述第二软件应用程序的所述一个或多个视图的子集;当至少显示所述第二软件应用程序的一个或多个视图的子集时,检测所述触摸敏感显示单元上的触摸输入序列。所述触摸输入序列包括一个或多个触摸输入的第一部分以及所述第一部分之后的一个或多个触摸输入的第二部分。所述处理单元配置成,在检测所述触摸输入序列的第一阶段期间:传送一个或多个触摸输入的所述第一部分到所述第一软件应用程序和所述第二软件应用程序;从所述第一组中的姿态识别器认定识别一个或多个触摸输入的所述第一部分的一个或多个匹配的姿态识别器;以及用对应于所述一个或多个匹配的姿态识别器的一个或多个姿态处理器来处理一个或多个触摸输入的所述第一部分。According to some embodiments, an electronic device includes a touch-sensitive display unit configured to receive touch input and a processing unit coupled to the touch-sensitive display unit. The processing unit is configured to execute at least a first software application and a second software application. The first software application includes a first set of one or more gesture recognizers, and the second software application includes one or more views and a second set of one or more gesture recognizers. Respective gesture recognizers have corresponding gesture processors. The processing unit is configured to: enable display of at least a subset of the one or more views of the second software application; when displaying at least a subset of the one or more views of the second software application , detecting a touch input sequence on the touch-sensitive display unit. The sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion. The processing unit is configured to, during a first phase of detecting the sequence of touch inputs: transmit the first portion of one or more touch inputs to the first software application and the second software application; The gesture recognizers in the first set identify one or more matching gesture recognizers that recognize the first portion of one or more touch inputs; and One or more gesture processors to process the first portion of the one or more touch inputs.
根据一些实施例,一种电子设备包括配置成接收触摸输入的触摸敏感显示单元和耦接到所述触摸敏感显示单元的处理单元。所述处理单元配置成至少执行第一软件应用程序和第二软件应用程序。所述第一软件应用程序包括第一组一个或多个姿态识别器,并且所述第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有对应的姿态处理器。所述处理单元配置成使得能够显示第一组一个或多个视图。所述第一组一个或多个视图至少包括所述第二软件应用程序的一个或多个视图的子集。所述处理单元配置成,当显示所述第一组一个或多个视图时:检测所述触摸敏感显示单元上的触摸输入序列(所述触摸输入序列包括一个或多个触摸输入的第一部分以及所述第一部分之后的一个或多个触摸输入的第二部分);并确定所述第一组一个或多个姿态识别器中的至少一个姿态识别器是否识别一个或多个触摸输入的所述第一部分。所述处理单元配置成,根据关于所述第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的所述第一部分的确定:传送所述触摸输入序列到所述第一软件应用程序,而不将所述触摸输入序列传送到所述第二软件应用程序;并确定所述第一组一个或多个姿态识别器中的至少一个姿态识别器是否识别所述触摸输入序列。所述处理单元配置成,根据关于所述第一组一个或多个姿态识别器中的至少一个姿态识别器识别所述触摸输入序列的确定,使用所述第一组一个或多个姿态识别器中的识别所述触摸输入序列的所述至少一个姿态识别器来处理所述触摸输入序列。所述处理单元配置成,根据关于所述第一组一个或多个姿态识别器中没有姿态识别器识别一个或多个触摸输入的所述第一部分的确定,传送所述触摸输入序列到所述第二软件应用程序,确定所述第二组一个或多个姿态识别器中的至少一个姿态识别器是否识别所述触摸输入序列;并根据关于所述第二组一个或多个姿态识别器中的至少一个姿态识别器识别所述触摸输入序列的确定,使用所述第二组一个或多个姿态识别器中的识别所述触摸输入序列的所述至少一个姿态识别器来处理所述触摸输入序列。According to some embodiments, an electronic device includes a touch-sensitive display unit configured to receive touch input and a processing unit coupled to the touch-sensitive display unit. The processing unit is configured to execute at least a first software application and a second software application. The first software application includes a first set of one or more gesture recognizers, and the second software application includes one or more views and a second set of one or more gesture recognizers. Respective gesture recognizers have corresponding gesture processors. The processing unit is configured to enable display of a first set of one or more views. The first set of one or more views includes at least a subset of the one or more views of the second software application. The processing unit is configured, when the first set of one or more views is displayed: to detect a sequence of touch inputs on the touch-sensitive display unit (the sequence of touch inputs comprising a first portion of one or more touch inputs and a second portion of the one or more touch inputs following the first portion); and determining whether at least one gesture recognizer in the first set of one or more gesture recognizers recognizes the one or more touch inputs for the first part. The processing unit is configured to, based on a determination that at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the first portion of one or more touch inputs: transmit the sequence of touch inputs to the first software application without communicating the sequence of touch inputs to the second software application; and determining whether at least one gesture recognizer in the first set of one or more gesture recognizers recognizes the The touch input sequence described above. The processing unit is configured to use the first set of one or more gesture recognizers based on a determination that at least one gesture recognizer of the first set of one or more gesture recognizers recognized the touch input sequence processing the sequence of touch inputs by the at least one gesture recognizer that recognizes the sequence of touch inputs. The processing unit is configured to transmit the sequence of touch inputs to the A second software application that determines whether at least one gesture recognizer in the second set of one or more gesture recognizers recognizes the touch input sequence; and based on information about the second set of one or more gesture recognizers determining that at least one gesture recognizer of the second set of one or more gesture recognizers recognizes the sequence of touch inputs, processing the touch input using the at least one gesture recognizer of the second set of one or more gesture recognizers that recognizes the sequence of touch inputs sequence.
根据一些实施例,一种电子设备包括:显示单元,配置成显示一个或多个视图;存储器单元,配置成存储内部状态;以及处理单元,耦接到所述显示单元和所述存储器单元。所述处理单元配置成:执行包括具有多个视图的视图层次结构的软件;使得能够显示所述视图层次结构的一个或多个视图;并执行一个或多个软件元素。每个软件元素与特定的视图相关联,并且每个特定视图包括一个或多个事件识别器。每个事件识别器具有:基于一个或多个子事件的一个或多个事件定义以及事件处理器。所述事件处理器指定对目标的动作,并被配置成响应于所述事件识别器检测到与所述一个或多个事件定义中的特定事件定义相对应的事件,而发送所述动作到所述目标。所述处理单元配置成:检测一个或多个子事件的序列;并识别所述视图层次结构的视图中的一个视图作为点击视图。所述点击视图确立所述视图层次结构中哪些视图是有效涉及的视图。所述处理单元配置成,传送各自的子事件到用于所述视图层次结构中每个有效涉及的视图的事件识别器。用于所述视图层次结构中有效涉及的视图的至少一个事件识别器具有多个事件定义,所述多个事件定义中的一个是根据所述电子设备的内部状态来选择的,并且根据所选事件定义,在处理所述子事件序列中的下一个子事件之前,所述至少一个事件识别器处理各自的子事件。According to some embodiments, an electronic device includes: a display unit configured to display one or more views; a memory unit configured to store an internal state; and a processing unit coupled to the display unit and the memory unit. The processing unit is configured to: execute software including a view hierarchy having a plurality of views; enable display of one or more views of the view hierarchy; and execute one or more software elements. Each software element is associated with a specific view, and each specific view includes one or more event recognizers. Each event recognizer has one or more event definitions based on one or more sub-events and an event handler. The event handler specifies an action on a target and is configured to send the action to the event recognizer in response to the event recognizer detecting an event corresponding to a particular one of the one or more event definitions. stated goals. The processing unit is configured to: detect a sequence of one or more sub-events; and identify one of the views of the view hierarchy as a tapped view. The click view establishes which views in the view hierarchy are effectively involved views. The processing unit is configured to transmit a respective sub-event to an event recognizer for each actively involved view in the view hierarchy. at least one event recognizer for a view actively involved in said view hierarchy has a plurality of event definitions, one of said plurality of event definitions is selected based on an internal state of said electronic device, and based on a selected An event definition, said at least one event recognizer processes a respective sub-event before processing a next sub-event in said sequence of sub-events.
附图说明Description of drawings
图1A-1C是例示了根据一些实施例的电子设备的框图。1A-1C are block diagrams illustrating electronic devices according to some embodiments.
图2是根据一些实施例的示例电子设备的输入/输出处理栈的图。2 is a diagram of an input/output processing stack of an example electronic device, according to some embodiments.
图3A例示了根据一些实施例的示例视图层次结构。Figure 3A illustrates an example view hierarchy, according to some embodiments.
图3B和3C是例示了根据一些实施例的示例事件识别器方法和数据结构的框图。3B and 3C are block diagrams illustrating example event recognizer methods and data structures according to some embodiments.
图3D是例示了根据一些实施例的用于事件处理的示例部件的框图。Figure 3D is a block diagram illustrating example components for event handling according to some embodiments.
图3E是例示了根据一些实施例的姿态识别器的示例类和实例的框图。Figure 3E is a block diagram illustrating example classes and instances of a gesture recognizer according to some embodiments.
图3F是例示了根据一些实施例的事件信息流的框图。Figure 3F is a block diagram illustrating event information flow according to some embodiments.
图4A和4B是例示了根据一些实施例的示例状态机的流程图。4A and 4B are flowcharts illustrating example state machines according to some embodiments.
图4C例示了根据一些实施例的图4A和4B的示例状态机到示例的子事件组。FIG. 4C illustrates the example state machine of FIGS. 4A and 4B into an example group of sub-events, according to some embodiments.
图5A-5C根据一些实施例以示例事件识别器状态机例示示例子事件序列。5A-5C illustrate example sub-event sequences with an example event recognizer state machine, according to some embodiments.
图6A和6B是根据一些实施例的事件识别方法流程图。6A and 6B are flowcharts of a method of event identification according to some embodiments.
图7A-7S例示了根据一些实施例的为了导航通过同时打开的应用程序而由事件识别器识别的示例用户界面和用户输入。7A-7S illustrate example user interfaces and user inputs recognized by event recognizers for navigating through concurrently open applications, according to some embodiments.
图8A和8B是例示了根据一些实施例的事件识别方法的流程图。8A and 8B are flowcharts illustrating event identification methods according to some embodiments.
图9A-9C是例示了根据一些实施例的事件识别方法的流程图。9A-9C are flowcharts illustrating methods of event identification according to some embodiments.
图10A和10B是例示了根据一些实施例的事件识别方法的流程图。10A and 10B are flowcharts illustrating event recognition methods according to some embodiments.
图11是根据一些实施例的电子设备的功能框图。Figure 11 is a functional block diagram of an electronic device according to some embodiments.
图12是根据一些实施例的电子设备的功能框图。Figure 12 is a functional block diagram of an electronic device according to some embodiments.
图13是根据一些实施例的电子设备的功能框图。Figure 13 is a functional block diagram of an electronic device according to some embodiments.
贯穿整个附图,类似的附图标记指代相应的部分。Like reference numerals designate corresponding parts throughout the drawings.
具体实施方式detailed description
具有小屏幕的电子设备(例如,智能电话和平板计算机)通常一次显示单个应用程序,即使在该设备上可能正在运行多个应用程序。许多这些设备具有配置成接收作为触摸输入的姿态的触摸敏感显示器。针对这样的设备,用户可能想要执行由隐藏的应用程序(例如,在后台运行的并且不同时显示在电子设备的显示器上的应用程序,诸如在后台运行的应用程序启动器软件应用程序)提供的操作。用于执行由隐藏的应用程序提供的操作的现有方法通常需要,首先显示隐藏的应用程序,然后将触摸输入提供到目前所显示的应用程序。因此,现有方法需要额外的步骤。进一步地,用户可能不想看见隐藏的应用程序,但仍然想执行由隐藏的应用程序提供的操作。在下面描述的实施例中,通过发送触摸输入到隐藏的应用程序,并使用隐藏的应用程序处理触摸输入而并不显示隐藏的应用程序,实现了用于与隐藏的应用程序交互的改进的方法。因此,这些方法简化(streamline)了与隐藏的应用程序的交互,从而消除了对显示隐藏的应用程序的额外的、单独的步骤的需要,同时提供了基于姿态输入与隐藏的应用程序交互和控制的能力。Electronic devices with small screens (eg, smartphones and tablet computers) typically display a single application at a time, even though multiple applications may be running on the device. Many of these devices have touch-sensitive displays configured to receive gestures as touch input. For such devices, a user may want to execute applications provided by hidden applications (e.g., applications that run in the background and are not simultaneously displayed on the display of the electronic device, such as an application launcher software application that runs in the background). operation. Existing methods for performing operations provided by hidden applications typically require first displaying the hidden application and then providing touch input to the currently displayed application. Therefore, existing methods require additional steps. Further, a user may not want to see a hidden application, but still want to perform operations provided by the hidden application. In the embodiments described below, an improved method for interacting with a hidden application is implemented by sending touch input to the hidden application, and using the hidden application to process the touch input without displaying the hidden application . Thus, these methods streamline interaction with hidden applications, thereby eliminating the need for an additional, separate step of displaying hidden applications, while providing gesture-based input-based interaction and control of hidden applications. Ability.
另外,在一些实施例中,这些电子设备具有至少一个带多个姿态定义的姿态识别器。这有助于姿态识别器在截然不同的操作模式下工作。例如,设备可以具有正常操作模式和辅助(accessiblity)操作模式(例如,对于视力受限的人)。在正常操作模式中,下一个应用程序姿态用于在应用程序之间移动,并且该下一个应用程序姿态定义为三指左挥击姿态。在辅助操作模式下,三指左挥击姿态用于执行不同的功能。由此,在辅助操作模式下需要不同于三指左挥击的姿态以对应于下一个应用程序姿态(例如,在辅助操作模式下的四指左挥击姿态)。通过使多个姿态定义关联到下一个应用程序姿态,设备可以依赖于当前的操作模式为下一个应用程序姿态来选择一个姿态定义。这提供了在不同的操作模式下使用姿态识别器的灵活性。在一些实施例中,带多个姿态定义的多个姿态识别器依赖于操作模式被调节(例如,在正常操作模式下由三指执行的姿态在辅助操作模式下由四指执行)。Additionally, in some embodiments, the electronic devices have at least one gesture recognizer with multiple gesture definitions. This helps gesture recognizers work in distinct modes of operation. For example, a device may have a normal mode of operation and an accessibility mode of operation (eg, for people with limited vision). In the normal mode of operation, the next application gesture is used to move between applications, and this next application gesture is defined as a three-finger left swipe gesture. In assisted operation mode, the three-finger left swipe gesture is used to perform different functions. Thus, a gesture other than the three-finger left swipe is required in the assisted operation mode to correspond to the next application gesture (eg, the four-fingered left swipe gesture in the assisted operation mode). By having multiple gesture definitions associated to the next application gesture, the device can select a gesture definition for the next application gesture depending on the current mode of operation. This provides the flexibility to use the gesture recognizer in different modes of operation. In some embodiments, multiple gesture recognizers with multiple gesture definitions are adjusted depending on the mode of operation (eg, a gesture performed with three fingers in the normal mode of operation is performed with four fingers in the assisted mode of operation).
下面,图1A-1C和图2提供了示例设备的描述。图3A-3F描述了用于事件处理的部件以及这种部件的操作(例如,事件信息流)。图4A-4C和图5A-5C更详细地描述了事件识别器的操作。图6A-6B是例示事件识别方法的流程图。图7A-7S是例示使用图8A-8B、9A-9C和图10中的事件识别方法的操作的示例用户界面。图8A-8B是例示使用隐藏的打开的应用程序的姿态处理器来处理事件信息的事件识别方法的流程图。图9A-9C是例示使用隐藏的打开的应用程序或所显示的应用程序的姿态识别器来有条件地处理事件信息的事件识别方法的流程图。图10是例示为单个事件识别器从多个事件定义中选择一个事件定义的事件识别方法的流程图。Below, Figures 1A-1C and Figure 2 provide a description of example devices. 3A-3F describe components for event handling and the operation of such components (eg, event information flow). 4A-4C and 5A-5C describe the operation of the event recognizer in more detail. 6A-6B are flowcharts illustrating methods of event identification. 7A-7S are example user interfaces illustrating operation of using the event identification method in FIGS. 8A-8B , 9A-9C and FIG. 10 . 8A-8B are flowcharts illustrating an event recognition method for processing event information using a gesture handler of a hidden open application. 9A-9C are flowcharts illustrating an event recognition method for conditionally processing event information using a gesture recognizer of a hidden open application or a displayed application. 10 is a flowchart illustrating an event recognition method for selecting an event definition from a plurality of event definitions for a single event recognizer.
现将详细地参考实施例,其示例在附图中例示。在下面的详细描述中,为提供对于本发明的彻底的了解而阐述了大量的具体细节。然而,本领域技术人员应当清楚,本发明可在没有这些具体细节的情况下被实现。在其他实例中,为了不不必要地使实施例的方面难以理解,没有详细地描述公知的方法、程序、部件、电路和网络。Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components, circuits, and networks have not been described in detail in order not to unnecessarily obscure aspects of the embodiments.
还应当理解,尽管术语第一、第二等等可以用在本文用于表示各种元素,但这些元素不受这些术语的限制。这些术语只用于将元素彼此进行区别。例如,在不脱离本发明的范围的情况下,第一接触可以称为第二接触,并且类似地,第二接触可以称为第一接触。第一接触和第二接触都是接触,但是它们不是同一接触。It should also be understood that, although the terms first, second, etc. may be used herein to refer to various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first contact could be termed a second contact, and, similarly, a second contact could be termed a first contact, without departing from the scope of the present invention. Both first contact and second contact are contacts, but they are not the same contact.
本发明说明书中使用的术语仅用于描述特定实施例,而并不旨在限制本发明。正如本发明说明书和所附权利要求中使用的,单数形式“一”、“一个”和“所述”旨在也包括复数形式,除非上下文清楚地指示其他含义。还应当理解,如本文所使用的术语“和/或”指代和包含所关联列出项中的一个或多个的任意和所有可能组合。进一步应当理解,本说明书中使用术语“包括“说明所述特征、整体、步骤、操作、元素和/或部件的存在,但是不排除一个或多个其他特征、整体、步骤、操作、元素、部件和/或其分组的存在或添加。The terms used in the description of the present invention are for describing specific embodiments only, and are not intended to limit the present invention. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It should be further understood that the use of the term "comprising" in this specification indicates the existence of stated features, integers, steps, operations, elements and/or components, but does not exclude one or more other features, integers, steps, operations, elements, components and/or the presence or addition of subgroups thereof.
正如本文使用的,术语“如果”可以根据上下文解释为“当......时”或“一......就”或“响应于确定”或“响应于检测”。类似地,短语“如果确定”或“如果检测到[声明的条件或事件]”可以根据上下文解释为“一确定......就”或“响应于确定”或“一检测到(声明的条件或事件)就”或者“响应于检测到(声明的条件或事件)”。As used herein, the term "if" can be interpreted as "when" or "on" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if detected [the stated condition or event]" may be construed, depending on the context, as "once determined" or "in response to the determination" or "once detected (statement condition or event) on” or “in response to detection of (condition or event stated)”.
正如本文使用的,术语“事件”指的是由设备的一个或多个传感器检测到的输入。特别地,术语“事件”包括在触摸敏感表面上的触摸。一个事件包括一个或多个子事件。子事件通常是指对事件的变化(例如,触摸放下、触摸移动、触摸抬离可以是子事件)。一个或多个子事件的序列中的子事件可以包括许多形式,包括但不限于,按下键、按键保持、释放按键、按下按钮、按下按钮保持、释放按钮、操纵杆移动、鼠标移动、按下鼠标按钮、释放鼠标按钮、触笔触摸、触笔移动、触笔释放、口头指令、检测到的眼睛移动、生物计量输入、检测到的用户生理变化以及其他。由于一个事件可能包括单个子事件(例如,设备的短横向运动),所以本文使用的术语“子事件”也指事件。As used herein, the term "event" refers to an input detected by one or more sensors of a device. In particular, the term "event" includes a touch on a touch-sensitive surface. An event consists of one or more sub-events. Sub-events generally refer to changes to an event (eg, touch down, touch move, touch up can be sub-events). A subevent in a sequence of one or more subevents can include many forms, including but not limited to, key pressed, key held, key released, button pressed, button held held, button released, joystick move, mouse move, Mouse button presses, mouse button releases, stylus touches, stylus movements, stylus releases, verbal commands, detected eye movements, biometric inputs, detected physiological changes in the user, and others. Since an event may include a single sub-event (eg, a short lateral motion of the device), the term "sub-event" is used herein to also refer to an event.
正如本文使用的,术语“事件识别器”和“姿态识别器”可交换地用于指代可以识别姿态或其他事件(例如,设备的运动)的识别器。正如本文使用的,术语“事件处理器”和“姿态处理器”可交换地用于指代响应于对事件/子事件或姿态的识别而执行预定的一组操作(例如,更新数据、更新对象和/或更新显示)的处理器。As used herein, the terms "event recognizer" and "gesture recognizer" are used interchangeably to refer to a recognizer that can recognize gestures or other events (eg, motion of a device). As used herein, the terms "event handler" and "gesture handler" are used interchangeably to refer to performing a predetermined set of operations (e.g., updating data, updating objects) in response to recognition of an event/sub-event or gesture. and/or update the display) processor.
如上所述,在具有触摸敏感表面作为输入设备的一些设备中,第一组基于触摸的姿态(例如,两个或更多个:轻敲、双敲、水平挥击、垂直挥击)在特定的上下文中(例如,在第一应用程序的特定模式中)被识别为适合的输入,并且其他不同的基于触摸的姿态的组在其他上下文中(例如,不同的应用程序和/或第一应用程序内的不同模式或下上文)被识别为适合的输入。结果是,用于识别和响应于基于触摸的姿态所需的软件和逻辑可能变得复杂,并且在每次更新应用程序或者向计算设备添加新的应用程序时可能需要修正。本文描述的实施例通过提供用于处理事件和/或姿态输入的综合框架来解决这些问题。As mentioned above, in some devices with touch-sensitive surfaces as input devices, a first set of touch-based gestures (e.g., two or more: tap, double tap, horizontal swipe, vertical swipe) in the context of the first application (e.g., in a particular mode of the first application) and other different sets of touch-based gestures in other contexts (e.g., different applications and/or the first application Various patterns or contexts within the program) are recognized as suitable inputs. As a result, the software and logic required to recognize and respond to touch-based gestures can become complex and may require revision each time an application is updated or a new application is added to the computing device. Embodiments described herein address these issues by providing a comprehensive framework for processing event and/or gesture input.
在下面描述的实施例中,基于触摸的姿态是事件。一识别到预定义的事件,例如与应用程序的当前上下文中的适合输入相对应的事件,就发送涉及该事件的信息到应用程序。进一步地,每个各自事件被定义为子事件序列。在具有多点触摸显示设备(本文通常称为“屏幕”)或其他多点触摸敏感表面并接受基于多点触摸的姿态的设备中,定义基于多点触摸事件的子事件可以包括多点触摸子事件(需要两个或更多个手指同时接触设备的触摸敏感表面)。例如,在具有多点触摸敏感显示器的设备中,当用户的手指首次触摸屏幕时可以开始各自子事件的多点触摸序列。当一个或多个另外的手指顺序地或同时地触摸屏幕时可以发生另外的子事件,而当触摸屏幕的所有手指跨屏幕移动时可以发生其他子事件。当用户的最后一个手指从屏幕抬离时序列结束。In the embodiments described below, touch-based gestures are events. Upon recognition of a predefined event, such as an event corresponding to an appropriate input in the current context of the application, information relating to the event is sent to the application. Further, each respective event is defined as a sequence of sub-events. In devices with multi-touch display devices (generally referred to herein as "screens") or other multi-touch sensitive surfaces that accept multi-touch-based gestures, defining sub-events based on multi-touch events may include multi-touch sub-events event (requires two or more fingers to touch the device's touch-sensitive surface simultaneously). For example, in a device with a multi-touch sensitive display, a multi-touch sequence of respective sub-events may start when a user's finger touches the screen for the first time. Additional sub-events may occur when one or more additional fingers touch the screen sequentially or simultaneously, and other sub-events may occur when all fingers touching the screen move across the screen. The sequence ends when the user lifts the last finger off the screen.
当使用基于触摸的姿态来控制运行在具有触摸敏感表面的设备中的应用程序时,触摸具有时间和空间两方面。时间方面,称为阶段,指示何时触摸开始、触摸是移动的还是静止的、以及何时触摸结束(即,何时手指从屏幕抬离)。触摸的空间方面是其上发生触摸的视图或用户界面窗口的集合。在其中检测到触摸的视图或窗口可以对应于程序或视图层次结构内的程序级别。例如,在其中检测到触摸的最低级别的视图可以称为点击视图,并且识别为适合输入的事件组可以至少部分地基于开始基于触摸的姿态的初始接触的点击视图而确定。可替代地或附加地,至少部分地基于程序层次结构中的一个或多个软件程序(即,软件应用程序)将事件识别为适合的输入。例如,五指捏姿态在具有五指捏姿态识别器的应用程序启动器中被识别为适合的输入,但是在不具有五指捏姿态识别器的网页浏览器应用程序中不能被识别为适当的输入。When using touch-based gestures to control applications running on devices with touch-sensitive surfaces, touch has both temporal and spatial aspects. The temporal aspect, called the phase, indicates when the touch started, whether the touch was moving or stationary, and when the touch ended (ie, when the finger was lifted off the screen). The spatial aspect of a touch is the collection of views or user interface windows over which the touch occurs. The view or window in which the touch is detected may correspond to a program or a program level within the view hierarchy. For example, the lowest-level view in which a touch is detected may be referred to as a tap view, and the set of events identified as suitable for input may be determined based at least in part on the tap view beginning initial contact of a touch-based gesture. Alternatively or additionally, the event is identified as a suitable input based at least in part on one or more software programs (ie, software applications) in the program hierarchy. For example, a pinch gesture is recognized as an appropriate input in an application launcher with a pinch gesture recognizer, but not recognized as an appropriate input in a web browser application without a pinch gesture recognizer.
图1A-1C是例示了根据一些实施例的电子设备102的不同实施例的框图。电子设备102可以是任何电子设备,包括但不限于,台式机计算机系统、膝上型计算机系统、移动电话、智能电话、个人数字助理或者导航系统。电子设备102也可以是具有配置成给出用户界面的触摸屏显示器(例如,触摸敏感显示器156,图1B)的便携式电子设备、具有配置成给出用户界面的触摸屏显示器的计算机、具有配置成给出用户界面的触摸敏感表面和显示器的计算机以及任何其他形式的计算设备,包括但不限于,消费者电子设备、移动电话、视频游戏系统、电子音乐播放器、平板PC、电子书阅读系统、电子书、PDA、电子组织器、电子邮件设备、膝上型或其他计算机、计算机站(kioskcomputer)、贩卖机、智能器件等等。电子设备102包括用户接口113。1A-1C are block diagrams illustrating different embodiments of an electronic device 102 according to some embodiments. Electronic device 102 may be any electronic device including, but not limited to, a desktop computer system, laptop computer system, mobile phone, smart phone, personal digital assistant, or navigation system. Electronic device 102 may also be a portable electronic device with a touch screen display configured to present a user interface (e.g., touch sensitive display 156, FIG. 1B ), a computer with a touch screen display configured to present a user interface, a computer with a touch screen display configured to present a Touch-sensitive surfaces and displays for user interfaces of computers and any other form of computing equipment, including, but not limited to, consumer electronics, mobile phones, video game systems, electronic music players, tablet PCs, e-book reading systems, e-book , PDAs, electronic organizers, e-mail devices, laptop or other computers, kioskcomputers, vending machines, smart devices, and the like. The electronic device 102 includes a user interface 113 .
在一些实施例中,电子设备102包括触摸敏感显示器156(图1B)。在这些实施例中,用户接口113可以包括屏幕上键盘(未示出),用于由用户与电子设备102交互。在一些实施例中,电子设备102还包括一个或多个输入设备128(例如,键盘、鼠标、轨迹球、麦克风、物理按钮、触摸板等等)。在一些实施例中,触摸敏感显示器156能够检测两个或更多个不同的、同时的(或部分同时的)触摸,并且在这些实施例中,显示器156在本文中有时称为多点触摸显示器或多点触摸敏感显示器。在一些实施例中,一个或多个输入设备128的键盘可以与电子设备102分开且不同。例如,键盘可以是耦接到电子设备102的有线或者无线键盘。In some embodiments, electronic device 102 includes touch-sensitive display 156 (FIG. 1B). In these embodiments, user interface 113 may include an on-screen keyboard (not shown) for interaction with electronic device 102 by a user. In some embodiments, electronic device 102 also includes one or more input devices 128 (eg, keyboard, mouse, trackball, microphone, physical buttons, touch pad, etc.). In some embodiments, touch-sensitive display 156 is capable of detecting two or more distinct, simultaneous (or partially simultaneous) touches, and in these embodiments, display 156 is sometimes referred to herein as a multi-touch display or a multi-touch sensitive display. In some embodiments, the keyboard(s) of the one or more input devices 128 may be separate and distinct from the electronic device 102 . For example, the keyboard may be a wired or wireless keyboard coupled to the electronic device 102 .
在一些实施例中,电子设备102包括耦接到电子设备102的显示器126和一个或多个输入设备128(例如,键盘、鼠标、轨迹球、麦克风、物理按钮、触摸板、轨迹板等等)。在这些实施例中,输入设备128中的一个或多个可以可选择地与电子设备102分开且不同。例如,一个或多个输入设备可以包括以下项中的一个或多个:键盘、鼠标、轨迹板、轨迹球和电子笔,以上任意项可以可选择地与电子设备分开。可选择地,设备102可以包括一个或多个传感器116,例如,一个或多个加速计、陀螺仪、GPS系统、扬声器、红外(IR)传感器、生物计量传感器、照相机等等。应当注意,对作为输入设备128或作为传感器116的各种示例设备的以上描述对于本文描述的实施例的操作没有实质影响。并且本文中作为输入设备描述的任何输入或传感器设备可以很好地等同地作为传感器描述,反之亦然。在一些实施例中,由一个或多个传感器116产生的信号用作用于检测事件的输入源。In some embodiments, the electronic device 102 includes a display 126 and one or more input devices 128 (eg, keyboard, mouse, trackball, microphone, physical buttons, touchpad, trackpad, etc.) coupled to the electronic device 102 . In these embodiments, one or more of the input devices 128 may optionally be separate and distinct from the electronic device 102 . For example, the one or more input devices may include one or more of the following: keyboard, mouse, trackpad, trackball, and electronic pen, any of which may optionally be separate from the electronic device. Optionally, device 102 may include one or more sensors 116, such as one or more accelerometers, gyroscopes, GPS systems, speakers, infrared (IR) sensors, biometric sensors, cameras, and the like. It should be noted that the above description of the various example devices as input device 128 or as sensor 116 has no material impact on the operation of the embodiments described herein. And any input or sensor device described herein as an input device may equally well be described as a sensor, and vice versa. In some embodiments, signals generated by one or more sensors 116 are used as input sources for detecting events.
在一些实施例中,电子设备102包括耦接到电子设备102的触摸敏感显示器156(即,具有触摸敏感表面的显示器)和一个或多个输入设备128(图1B)。在一些实施例中,触摸敏感显示器156能够检测两个或更多个不同的同时的(或部分同时的)触摸,并且在这些实施例中,显示器156在本文中有时称为多点触摸显示器或多点触摸敏感显示器。In some embodiments, the electronic device 102 includes a touch-sensitive display 156 (ie, a display having a touch-sensitive surface) and one or more input devices 128 ( FIG. 1B ) coupled to the electronic device 102 . In some embodiments, touch-sensitive display 156 is capable of detecting two or more distinct simultaneous (or partially simultaneous) touches, and in these embodiments, display 156 is sometimes referred to herein as a multi-touch display or Multi-touch sensitive display.
在本文讨论的电子设备102的一些实施例中,输入设备128设置在电子设备102中。在其他实施例中,输入设备128中的一个或多个与电子设备102分开且不同。例如,输入设备128中的一个或多个可以通过线缆(例如,USB线缆)或无线连接(例如,蓝牙连接)耦接到电子设备102。In some embodiments of the electronic device 102 discussed herein, the input device 128 is disposed in the electronic device 102 . In other embodiments, one or more of the input devices 128 are separate and distinct from the electronic device 102 . For example, one or more of the input devices 128 may be coupled to the electronic device 102 via a cable (eg, a USB cable) or a wireless connection (eg, a Bluetooth connection).
当使用输入设备128时,或者当在电子设备102的触摸敏感显示器156上执行基于触摸的姿态时,用户产生由电子设备102的一个或多个CPU110处理的子事件序列。在一些实施例中,电子设备102的一个或多个CPU110处理子事件序列以识别事件。When using input device 128 , or when performing a touch-based gesture on touch-sensitive display 156 of electronic device 102 , the user generates a sequence of sub-events that are processed by one or more CPUs 110 of electronic device 102 . In some embodiments, one or more CPUs 110 of electronic device 102 process the sequence of sub-events to identify the event.
电子设备102通常包括一个或多个单核或多核处理单元(一个CPU或多个CPU)110以及一个或多个网络或其他通信接口112。电子设备102包括存储器111和用于在互连这些部件的一个或多个通信总线115。通信总线115可以包括互连和控制系统部件(本文未示出)之间的通信的电路(有时称为芯片组)。如上所述,电子设备102包括包含显示器(例如,显示器126或触摸敏感显示器156)的用户接口113。进一步地,电子设备102通常包括输入设备128(例如,键盘、鼠标、触摸敏感表面、键板等等)。在一些实施例中,输入设备128包括屏幕上输入设备(例如,显示器设备的触摸敏感表面)。存储器111可以包括高速随机存取存储器,诸如DRAM、SRAM、DDRRAM或其他随机存取固态存储器设备;并且可以包括非易失性存储器,诸如一个或多个磁盘存储设备、光盘存储设备、闪速存储器设备或其他非易失固态存储设备。存储器111可以可选地包括与CPU110远程放置的一个或多个存储设备。存储器111或者是作为替代的存储器111中的非易失性存储器设备包括计算机可读存储介质。在一些实施例中,存储器111或者在存储器111中的非易失性存储器设备包括非暂态计算机可读存储介质。在一些实施例中,(电子设备102的)存储器111或者存储器111的计算机可读存储介质存储了以下的程序、模块和数据结构或其子集:Electronic device 102 typically includes one or more single-core or multi-core processing units (a CPU or multiple CPUs) 110 and one or more network or other communication interfaces 112 . Electronic device 102 includes memory 111 and one or more communication buses 115 for interconnecting these components. Communication bus 115 may include circuitry (sometimes referred to as a chipset) that interconnects and controls communications between system components (not shown herein). As noted above, electronic device 102 includes user interface 113 including a display (eg, display 126 or touch-sensitive display 156 ). Further, the electronic device 102 typically includes an input device 128 (eg, keyboard, mouse, touch-sensitive surface, keypad, etc.). In some embodiments, input device 128 includes an on-screen input device (eg, a touch-sensitive surface of a display device). Memory 111 may include high-speed random access memory, such as DRAM, SRAM, DDRRAM, or other random access solid-state memory devices; and may include non-volatile memory, such as one or more magnetic disk storage devices, optical disk storage devices, flash memory devices or other non-volatile solid-state storage devices. Memory 111 may optionally include one or more storage devices located remotely from CPU 110 . Memory 111, or alternatively a non-volatile memory device in memory 111, includes computer readable storage media. In some embodiments, memory 111 or a non-volatile memory device within memory 111 includes non-transitory computer-readable storage media. In some embodiments, the memory 111 (of the electronic device 102) or the computer-readable storage medium of the memory 111 stores the following programs, modules and data structures or a subset thereof:
·操作系统118,包括用于处理备种基本系统服务和用于执行硬件依赖任务的过程;· Operating system 118, including processes for handling various basic system services and for performing hardware dependent tasks;
·辅助模块127(图1C),用于修改在应用程序软件124中的一个或多个软件应用程序的行为,或者修改来自触摸敏感显示器156或者输入设备128的数据,以改进应用程序软件124中的一个或多个软件应用程序的易用性或其中所显示内容(例如,网页)的易用性(例如,对于视力受损的人或者行动能力受限的人);Auxiliary module 127 (FIG. 1C) for modifying the behavior of one or more software applications in application software 124, or modifying data from touch-sensitive display 156 or input device 128 to improve the behavior of one or more software applications in application software 124 the ease of use of one or more software applications or the content (such as web pages) displayed therein (for example, for visually impaired persons or persons with limited mobility);
·通信模块120,用于经一个或多个各自的通信接口112(有线或无线的)和诸如因特网、其他广域网、局域网、城域网等的一个或多个通信网络,连接电子设备102到其他设备;A communication module 120 for connecting the electronic device 102 to other equipment;
·用户界面模块123(图1C),用于显示包括在显示器126或触摸敏感显示器156上的用户界面对象的用户界面;User interface module 123 (FIG. 1C) for displaying a user interface comprising user interface objects on display 126 or touch-sensitive display 156;
·控制应用程序132(图1C),用于控制进程(例如,点击视图确定、线程管理和/或事件监控等等);在一些实施例中,控制应用程序132包括正在运行的应用程序;在其他实施例中,正在运行的应用程序包括控制应用程序132;Control application 132 (FIG. 1C) for controlling processes (e.g., click view determination, thread management, and/or event monitoring, etc.); in some embodiments, control application 132 includes a running application; in In other embodiments, the running application program includes the control application program 132;
·事件传送系统122,可以在操作系统118中或在应用程序软件124中以各种可替换的实施例实现;然而在一些实施例中,事件传送系统122的一些方面可以在操作系统118中实现,而其他方面在应用程序软件124中实现;The event delivery system 122, which can be implemented in various alternative embodiments in the operating system 118 or in the application software 124; however, in some embodiments, some aspects of the event delivery system 122 can be implemented in the operating system 118 , while other aspects are implemented in the application software 124;
·应用程序软件124,包括一个或多个软件应用程序(例如,图1C中的应用程序133-1、133-2和133-3,其中的每个可以是以下之一:电子邮件应用程序、网页浏览器应用程序、记事本应用程序、文本消息通讯应用程序等等);各自的软件应用程序至少在执行期间通常具有指示各自软件应用程序及其部件(例如,姿态识别器)的状态的应用程序状态;参见下面描述的应用程序内部状态321(图3D);以及Application software 124, including one or more software applications (e.g., applications 133-1, 133-2, and 133-3 in FIG. 1C, each of which may be one of: an email application, web browser application, notepad application, text messaging application, etc.); the respective software application typically has an application indicating the status of the respective software application and its components (e.g., a gesture recognizer), at least during execution program state; see application internal state 321 (FIG. 3D) described below; and
·设备/全局内部状态134(图1C),包括以下项中的一个或多个:应用程序状态,指示软件应用程序及其部件(例如姿态识别器和代表)的状态;显示器状态,指示占用触摸敏感显示器156或显示器126的各个区域的是什么应用程序、视图或其他信息;传感器状态,包括从没备的各个传感器116、输入设备128和/或触摸敏感显示器156获得的信息;位置信息,涉及设备的位置和/或方位;以及其他状态。Device/global internal state 134 (FIG. 1C), including one or more of the following: application state, indicating the state of the software application and its components (e.g., gesture recognizers and delegates); display state, indicating occupied touch What application, view, or other information is on sensitive display 156 or various areas of display 126; sensor status, including information obtained from each sensor 116, input device 128, and/or touch-sensitive display 156 that is equipped; location information, related to the location and/or orientation of the device; and other status.
正如在说明书和权利要求书中使用的,术语“打开的应用程序”是指具有保留的状态信息(例如,作为设备/全局内部状态134和/或应用程序内部状态321(图3D)的一部分)的软件应用程序。一个打开的应用程序是以下类型的应用程序之一:As used in the specification and claims, the term "open application" refers to an application that has retained state information (e.g., as part of device/global internal state 134 and/or application internal state 321 (FIG. 3D)) software application. An open application is one of the following types of applications:
·活动应用程序,其当前显示在显示器126或触摸敏感显示器156上(或者对应的应用程序视图当前显示在显示器上);an active application, which is currently displayed on display 126 or touch-sensitive display 156 (or a corresponding application view is currently displayed on the display);
·后台应用程序(或后台进程),其当前不显示在显示器126或触摸敏感显示器156上,但是用于对应应用程序的一个或多个应用程序进程(例如,指令)正在由一个或多个处理器110进行处理(例如,运行);a background application (or background process), which is not currently displayed on display 126 or touch-sensitive display 156, but one or more application processes (e.g., instructions) for the corresponding application are being processed by one or more Processor 110 processes (e.g., runs);
·挂起的应用程序,其当前没有在运行,并且该应用程序存储在易失性存储器(例如,DRAM、SRAM、DDRRAM或存储器111的其他易失性随机存取固态存储器设备)中;以及A suspended application, which is not currently running, and which is stored in volatile memory (eg, DRAM, SRAM, DDRRAM, or other volatile random access solid-state memory device of memory 111); and
·休眠的应用程序,其当前没有在运行,并且该应用程序存储在非易失性存储器中(例如,一个或多个磁盘存储设备、光盘存储设备、闪速存储器设备或存储器111的其他非易失性固态存储设备)。A hibernating application, which is not currently running and which is stored in non-volatile memory (e.g., one or more magnetic disk storage devices, optical disk storage devices, flash memory devices, or other non-volatile memory devices of memory 111 volatile solid-state storage devices).
正如本文使用的,术语“关闭的应用程序”是指不具有保留的状态信息的软件应用程序(例如,关闭的应用程序的状态信息没有存储在设备的存储器中)。相应地,关闭应用程序包括停止和/或移除应用程序的应用程序进程以及将应用程序的状态信息从设备的存储器移除。一般来说,当处于第一应用程序中时打开第二应用程序不会关闭第一应用程序。当第一应用程序停止显示而第二应用程序显示的时候,曾在显示时为活动应用程序的第一应用程序可以变成后台应用程序、挂起的应用程序或者休眠的应用程序,但是当由设备保留其状态信息时,第一应用程序仍然是打开的应用程序。As used herein, the term "closed application" refers to a software application that does not have retained state information (eg, closed application state information is not stored in the device's memory). Correspondingly, closing the application includes stopping and/or removing the application process of the application and removing state information of the application from the memory of the device. In general, opening a second application while in the first application does not close the first application. When the first application stops being displayed and the second application is displayed, the first application that was active when displayed may become a background application, a suspended application, or a hibernating application, but when displayed by The first application remains the open application while the device retains its state information.
上述所认定元素中的每个都可以存储在前面提到的存储器设备中的一个或多个中。上述所认定模块、应用程序或系统元素中的每一个对应于一组用于执行本文所述功能的指令。该组指令可以由一个或多个处理器(例如,一个或多个CPU110)执行。上述所认定模块或程序(即,指令组)不需要作为单独的软件程序、过程或模块来实现,于是在各个实施例中,各种这些模块的子集可以组合或者以其他方式重新排列。在一些实施例中,存储器111可以存储以上认定的模块和数据结构的子集。进一步地,存储器111可以存储上面没有描述的另外的模块和数据结构。Each of the elements identified above may be stored in one or more of the aforementioned memory devices. Each of the above-identified modules, applications or system elements corresponds to a set of instructions for performing the functions described herein. The set of instructions may be executed by one or more processors (eg, one or more CPUs 110). The above-identified modules or programs (ie, groups of instructions) need not be implemented as separate software programs, procedures or modules, and thus, in various embodiments, various subsets of these modules may be combined or otherwise rearranged. In some embodiments, memory 111 may store a subset of the modules and data structures identified above. Further, memory 111 may store additional modules and data structures not described above.
图2是根据本发明一些实施例的示例电子设备或装置(例如,设备102)的输入/输出处理栈200的图。设备的硬件(例如,电子电路)212在输入/输出处理栈200的基础层。硬件212可以包括各种硬件接口部件,诸如在图1A和/或1B中描述的部件。硬件212还可以包括上述传感器116中的一个或多个。输入/输出处理栈200的其他元素(202-210)中的至少一些是软件过程或部分的软件过程,其处理从硬件212接收的输入并生成通过硬件用户接口(例如,显示器、扬声器、设备振动致动器等中的一个或多个)给出的各种输出。FIG. 2 is a diagram of an input/output processing stack 200 of an example electronic device or apparatus (eg, device 102 ), according to some embodiments of the invention. The device's hardware (eg, electronic circuitry) 212 is at the base level of the input/output processing stack 200 . Hardware 212 may include various hardware interface components, such as those described in FIGS. 1A and/or 1B. Hardware 212 may also include one or more of sensors 116 described above. At least some of the other elements (202-210) of the input/output processing stack 200 are software processes or portions of software processes that process input received from the hardware 212 and generate Various outputs given by one or more of actuators, etc.).
一个驱动器或一组驱动器210与硬件212通信。驱动器210可以接收和处理从硬件212接收的输入数据。核心操作系统(OS)208可以和驱动器210通信。核心OS208可以处理从驱动器210接收的原始输入数据。在一些实施例中,驱动器210可以看作是核心OS208的一部分。A driver or set of drivers 210 communicates with hardware 212 . Driver 210 may receive and process input data received from hardware 212 . A core operating system (OS) 208 may communicate with drivers 210 . Kernel OS 208 may process raw input data received from driver 210 . In some embodiments, driver 210 may be considered part of kernel OS 208 .
一组OS应用程序编程接口(“OSAPI”)206是与核心OS208通信的软件过程。在一些实施例中,API206包括在设备的操作系统中,但是处于核心OS208以上的层。API206为由本文讨论的在电子设备或装置上运行的应用程序使用而设计。用户界面(UI)API204可以使用OSAPI206。设备上运行的应用程序软件(“应用程序”)202可以使用UIAPI204以便和用户通信。UIAPI204可以继而和更低层的元素通信,从而最终和各种用户接口硬件(例如,多点触摸显示器156)通信。在一些实施例中,应用程序软件202包括在应用程序软件124(图1A)中的应用程序。A set of OS application programming interfaces (“OSAPI”) 206 are software processes that communicate with the core OS 208 . In some embodiments, API 206 is included in the device's operating system, but at a layer above core OS 208 . API 206 is designed for use by applications running on electronic devices or devices discussed herein. User Interface (UI) API 204 can use OSAPI 206 . Application software ("app") 202 running on the device can use UI API 204 to communicate with the user. UIAPI 204 may in turn communicate with lower layer elements, and ultimately various user interface hardware (eg, multi-touch display 156 ). In some embodiments, application software 202 includes applications in application software 124 (FIG. 1A).
尽管输入/输出处理栈200的每个层都可以使用其下面一层,但却不总是需要的。例如,在一些实施例中,应用程序202可以直接地与OSAPI206通信。一般地,在OSAPI层206处或之上的层不可以直接地访问核心OS208、驱动器210或硬件212,因为这些层被看成是私有的。在层202和UIAPI204中的应用程序通常直接调用OSAPI206,OSAPI206继而访问核心OS208、驱动器210和硬件212这些层。Although each layer of the I/O processing stack 200 can use the layer below it, it is not always required. For example, in some embodiments, applications 202 may communicate directly with OSAPI 206 . In general, layers at or above OSAPI layer 206 may not directly access core OS 208, drivers 210, or hardware 212 because these layers are considered private. Applications in layers 202 and UIAPI 204 typically call OSAPI 206 directly, which in turn accesses the core OS 208 , driver 210 and hardware 212 layers.
换句话说,电子设备102的一个或更多个硬件元素212和在该设备上动行的软件,检测在一个或多个输入设备128和/或触摸敏感显示器156处的输入事件(该输入事件可以对应于姿态中的子事件),并生成或更新(存储在设备102的存储器111中的)各种数据结构,该数据结构由当前的活动事件识别器组使用以确定该输入事件是否以及何时对应于要被发送到应用程序124的事件。下面将更详细地描述事件识别方法、装置和计算机程序产品的实施例。In other words, one or more hardware elements 212 of electronic device 102 and software running on the device detect input events at one or more input devices 128 and/or touch-sensitive display 156 (the input events may correspond to sub-events in gestures), and generate or update various data structures (stored in memory 111 of device 102) that are used by the current set of active event recognizers to determine whether and how the input event The times correspond to events to be sent to the application 124. Embodiments of the event recognition method, apparatus and computer program product will be described in more detail below.
图3A描述了示例视图层次结构300,该视图层次结构300在这个例子中是显示在最外视图302中的搜索程序。最外视图302一般包括用户可以直接与之交互的整个用户界面,并且包括从属视图,例如,FIG. 3A depicts an example view hierarchy 300 , which in this example is a search program displayed in an outermost view 302 . The outermost view 302 generally includes the entire user interface with which the user can directly interact, and includes dependent views such as,
·搜索结果面板304,其将搜索结果分组并可以垂直滚动;· Search results panel 304, which groups search results and is vertically scrollable;
·搜索字段306,其接受文本输入;以及• Search field 306, which accepts text input; and
·始位行310,其将应用程序分组以便快速访问。• Home row 310, which groups applications for quick access.
在这个例子中,每个从属视图包括更低级别的从属视图。在其他例子中,在层次结构300中的视图级别的数目在层次结构的不同分支可以不同,其中一个或多个从属视图具有更低级别的从属视图以及一个或多个其他从属视图不具有任何这样的更低级别的从属视图。继续图3A中所示的例子,对于每个搜索结果,搜索结果面板304包含单独的从属视图305(从属于面板304)。在此,该示例示出在称为地图视图305的从属视图中的一个搜索结果。搜索字段306包括本文称为清除内容图标视图307的从属视图,当用户在视图307中的清除内容图标上执行特定动作(例如,单点触摸或者轻敲姿态)时,视图307清除搜索字段的内容。始位行310包括从属视图310-1、310-2、310-3和3104,这些从属视图分别对应于联系人应用程序、电子邮件应用程序、网页浏览器和iPod音乐接口。In this example, each subordinate view includes lower-level subordinate views. In other examples, the number of view levels in hierarchy 300 may be different in different branches of the hierarchy, where one or more dependent views have lower-level dependent views and one or more other dependent views do not have any such A lower-level subordinate view of . Continuing with the example shown in FIG. 3A , the search results panel 304 contains a separate subordinate view 305 (dependent on the panel 304 ) for each search result. Here, the example shows one search result in a subordinate view called map view 305 . The search field 306 includes a subordinate view referred to herein as the clear content icon view 307, which clears the content of the search field when the user performs a specific action (e.g., a single touch or tap gesture) on the clear content icon in the view 307 . Home row 310 includes dependent views 310-1, 310-2, 310-3, and 3104, which correspond to contacts application, email application, web browser, and iPod music interface, respectively.
触摸子事件301-1在最外视图302中表示。给定触摸子事件301-1位于搜索结果面板304和地图视图305两者之上,触摸子事件也会在搜索结果面板304和地图视图305之上分别表示为301-2和301-3。触摸子事件的有效涉及的视图包括视图搜索结果面板304、地图视图305和最外视图302。下面将参考图3B和3C提供关于子事件传送和有效涉及的视图的附加信息。Touch sub-event 301 - 1 is represented in outermost view 302 . Given that the touch sub-event 301-1 is located over both the search results panel 304 and the map view 305, the touch sub-event is also represented as 301-2 and 301-3 over the search results panel 304 and the map view 305, respectively. Effectively involved views for a touch sub-event include view search results panel 304 , map view 305 , and outermost view 302 . Additional information regarding sub-event delivery and effectively involved views is provided below with reference to Figures 3B and 3C.
视图(以及对应的程序级别)可以嵌套。换句话,一个视图可以包括其他视图。因此,与第一视图相关联的软件元素(例如,事件识别器)可以包括或链接到与第一视图中的视图相关联的一个或多个软件元素。尽管一些视图可以与应用程序相关联,但另一些视图可以与高级别OS元素(例如,图形用户界面、窗口管理器等等)相关联。在一些实施例中,一些视图与其他OS元素相关联。在一些实施例中,视图层次结构包括来自多个软件应用程序的视图。例如,视图层次结构可以包括来自应用程序启动器的视图(例如,始位画面)和来自网页浏览器应用程序的视图(例如,包括网页内容的视图)。Views (and corresponding program levels) can be nested. In other words, a view can contain other views. Accordingly, a software element (eg, an event recognizer) associated with the first view may include or be linked to one or more software elements associated with views in the first view. While some views may be associated with applications, other views may be associated with high-level OS elements (eg, graphical user interface, window manager, etc.). In some embodiments, some views are associated with other OS elements. In some embodiments, the view hierarchy includes views from multiple software applications. For example, a view hierarchy may include views from an application launcher (eg, a home screen) and views from a web browser application (eg, views that include web content).
程序层次结构包括层次结构中的一个或多个软件元素或软件应用程序。为了简化随后的讨论,一般地将仅仅提及视图和视图层次结构,但是必须理解,在一些实施例中,该方法可以用具有多个程序层的程序层次结构和/或视图层次结构来工作。A program hierarchy includes one or more software elements or software applications in the hierarchy. To simplify the ensuing discussion, only views and view hierarchies will generally be mentioned, but it must be understood that in some embodiments, the method may work with program hierarchies and/or view hierarchies having multiple program layers.
图3B和3C描述了与事件识别器相关的示例方法和结构。图3B描述了当事件处理器与视图层次结构中的特定视图关联时事件处理的方法和数据结构。图3C描述了当事件处理器关联到与程序级别的层次结构中的特定级别时用于事件处理的方法和数据结构。事件识别器全局方法312和350分别包括点击视图和点击级别确定模块314和352、活动事件识别器确定模块316和354以及子事件传送模块318和356。3B and 3C describe example methods and structures related to event recognizers. Figure 3B depicts the methods and data structures for event handling when an event handler is associated with a particular view in the view hierarchy. Figure 3C depicts methods and data structures for event handling when an event handler is associated to a particular level in the hierarchy of program levels. Event recognizer global methods 312 and 350 include click view and click level determination modules 314 and 352 , active event recognizer determination modules 316 and 354 , and subevent delivery modules 318 and 356 , respectively.
在一些实施例中,电子设备102包括以下中的一个或多个:事件识别器全局方法312和350。在一些实施例中,电子设备102包括以下中的一个或多个:点击视图确定模块314和点击级别确定模块352。在一些实施例中,电子设备102包括以下中的一个或多个:活动事件识别器确定模块316和354。在一些实施例中,电子设备102包括以下中的一个或多个:子事件传送模块318和356。在一些实施例中,这些方法或模块中的一个或多个包括在更少或更多的方法或模块中。例如,在一些实施例中,电子设备102包括的点击视图/级别确定模块包含了点击视图确定模块314和点击级别确定模块352的功能性。在一些实施例中,电子设备102包括的活动事件识别器确定模块包括了活动事件识别器确定模块316和354的功能性。In some embodiments, electronic device 102 includes one or more of: event recognizer global methods 312 and 350 . In some embodiments, electronic device 102 includes one or more of: click view determination module 314 and click level determination module 352 . In some embodiments, electronic device 102 includes one or more of: active event recognizer determination modules 316 and 354 . In some embodiments, electronic device 102 includes one or more of: sub-event delivery modules 318 and 356 . In some embodiments, one or more of these methods or modules are included in fewer or more methods or modules. For example, in some embodiments, the electronic device 102 includes a click view/level determination module that incorporates the functionality of the click view determination module 314 and the click level determination module 352 . In some embodiments, the electronic device 102 includes an active event recognizer determination module that includes the functionality of the active event recognizer determination modules 316 and 354 .
点击视图和点击级别确定模块314和352分别提供软件程序,用于在一个或多个视图(例如,图3A中描述的具有3个主分支的示例视图层次结构300)和/或与子事件对应的程序层次结构中一个或多个软件元素(例如,图1C中的应用程序133中的一个或多个)中,确定哪里发生了子事件。Click view and click level determination modules 314 and 352, respectively, provide software routines for viewing one or more views (e.g., the example view hierarchy 300 depicted in FIG. 3A with 3 main branches) and/or corresponding to sub-events. In one or more software elements in the program hierarchy (eg, one or more of the application programs 133 in FIG. 1C ), determine where a sub-event has occurred.
图3B中的点击视图确定模块314接收与子事件(例如,在最外视图302上表示为301-1、在搜索结果(地图视图305)上、在搜索结果面板304上的用户触摸)相关的信息。点击视图确定模块314认定点击视图为应该处理该子事件的层次结构中的最低视图。大多数情况下,点击视图是发生初始子事件(即,形成事件或潜在事件的子事件序列中的第一个子事件)的最低级别视图。在一些实施例中,一旦认定了点击视图,该点击视图将接收与点击视图认定的相同触摸或输入源相关的所有子事件。在一些实施例中,一个或多个其他视图(例如,默认或预定义视图)至少接收该点击视图接收的子事件中的一些子事件。Click view determination module 314 in FIG. 3B receives information related to sub-events (e.g., user touch on outermost view 302, denoted 301-1, on search results (map view 305), on search results panel 304). information. The click view determination module 314 identifies the click view as the lowest view in the hierarchy that should handle this sub-event. In most cases, the click view is the lowest-level view where the initial subevent (that is, the first subevent in a sequence of subevents forming an event or potential event) occurs. In some embodiments, once a tap view is asserted, that tap view will receive all sub-events related to the same touch or input source that the tap view asserted. In some embodiments, one or more other views (eg, default or predefined views) receive at least some of the sub-events that the tap view receives.
在一些实施例中,图3C的点击级别确认模块352可以使用类似的处理。例如,在一些实施例中,点击级别确认模块352识别点击级别为应该处理该子事件的程序层次结构的最低级别(或程序层次结构中最低程序级别中的软件应用程序)。在一些实施例中,一旦认定了点击级别,该点击级别或者该点击级别中的软件应用程序将接收与点击级别认定的相同触摸或输入源相关的所有子事件。在一些实施例中,一个或多个其他级别或软件应用程序(例如,默认或预定义软件应用程序)至少接收该点击视图接收的子事件中的一些子事件。In some embodiments, the click level confirmation module 352 of FIG. 3C may use a similar process. For example, in some embodiments, click-level confirmation module 352 identifies the click-level as the lowest level of the program hierarchy (or a software application in the lowest program level in the program hierarchy) that should handle the sub-event. In some embodiments, once a tap class is identified, that tap class, or a software application within that tap class, will receive all sub-events related to the same touch or input source identified by the tap class. In some embodiments, one or more other levels or software applications (eg, default or predefined software applications) receive at least some of the sub-events that the tap view receives.
事件识别器全局方法312和350的活动事件识别器确定模块316和354,分别确定在视图层次结构和/或程序层次结构中的哪个或哪些视图应该接收特定的子事件序列。图3A描述了接收子事件301的一组示例活动视图302、304和305。在图3A的例子中,活动事件识别器确定模块316将确定最外视图302、搜索结果面板304和地图视图305是有效涉及的视图,因为这些视图包括了由子事件301代表的触摸的物理位置。应当注意,即使触摸子事件301全部限制在与地图视图305相关联的区域内,搜索结果面板304和最外视图302将仍然保持为有效涉及的视图,因为搜索结果面板304和最外视图302是地图视图305的先辈。Active event recognizer determination modules 316 and 354 of event recognizer global methods 312 and 350, respectively, determine which view(s) in the view hierarchy and/or program hierarchy should receive a particular sequence of sub-events. FIG. 3A depicts a set of example activity views 302 , 304 , and 305 that receive a sub-event 301 . In the example of FIG. 3A , active event recognizer determination module 316 will determine that outermost view 302 , search results panel 304 , and map view 305 are validly involved views because these views include the physical location of the touch represented by sub-event 301 . It should be noted that even though touch sub-event 301 is entirely confined within the area associated with map view 305, search results panel 304 and outermost view 302 will still remain effectively involved views because search results panel 304 and outermost view 302 are A predecessor of map view 305 .
在一些实施例中,活动事件识别器确定模块316和354使用类似的处理。在图3A的例子中,活动事件识别器确定模块350将确定地图应用程序是有效涉及的,因为地图应用程序的视图被显示并且/或者地图应用程序的视图包括了由子事件301代表的触摸的物理位置。应当注意,即使触摸子事件301全部限制在与地图应用程序相关联的区域内,程序层次结构中的其他应用程序将仍然保持为有效涉及的应用程序(或有效涉及的程序级别中的应用程序)。In some embodiments, active event recognizer determination modules 316 and 354 use a similar process. In the example of FIG. 3A , the active event recognizer determination module 350 will determine that the map application is effectively involved because the view of the map application is displayed and/or the view of the map application includes the physical event of the touch represented by sub-event 301. Location. It should be noted that even if the touch sub-event 301 is all confined within the area associated with the map application, other applications in the program hierarchy will still remain as actively involved applications (or applications in the effectively involved program level) .
子事件传送模块318传送子事件到用于有效涉及的视图的事件识别器。使用图3A中的例子,一个用户的触摸在层次结构的不同视图中由触摸标记301-1、301-2和301-3表示。在一些实施例中,表示这种用户的触摸的子事件数据由子事件传送模块318传送到在有效涉及的视图处的事件识别器,即,顶级视图302、搜索结果面板304和地图视图305。进一步地,视图的事件识别器可以接收在该视图中开始的事件的子事件序列(例如,当在视图中发生初始子事件时)。换句话说,视图可以接收在该视图中开始的与用户交互相关联的子事件,即使它在该视图的外部继续。The sub-event delivery module 318 delivers the sub-event to the event recognizer for the actively involved view. Using the example in FIG. 3A, one user's touches are represented by touch indicia 301-1, 301-2, and 301-3 in different views of the hierarchy. In some embodiments, sub-event data representing such a user's touch is communicated by sub-event delivery module 318 to event recognizers at the actively involved views, ie, top-level view 302 , search results panel 304 , and map view 305 . Further, a view's event recognizer may receive a sequence of sub-events of an event that begins in the view (eg, when the initial sub-event occurs in the view). In other words, a view can receive a subevent associated with a user interaction that started within that view even if it continued outside of that view.
在一些实施例中,子事件传送模块356在类似于由子事件传送模块318使用的处理中传送子事件到用于有效涉及的程序级别的事件识别器。例如,子事件传送模块356传送子事件到用于有效涉及的应用程序的事件识别器。使用图3A的例子,用户的触摸301由子事件传送模块356传送到在有效涉及的视图(例如,地图应用程序和程序层次结构中的任何其他有效涉及的应用程序)处的事件识别器。在一些实施例中,程序层次结构中默认包括了默认或预定义软件应用程序。In some embodiments, the sub-event delivery module 356 delivers the sub-event to the program-level event recognizer for active involvement in a process similar to that used by the sub-event delivery module 318 . For example, sub-event delivery module 356 delivers sub-events to event recognizers for actively involved applications. Using the example of FIG. 3A , a user's touch 301 is communicated by sub-event delivery module 356 to event recognizers at actively involved views (eg, the map application and any other actively involved applications in the program hierarchy). In some embodiments, default or predefined software applications are included by default in the program hierarchy.
在一些实施例中,对于每个有效涉及的事件识别器,单独的事件识别器结构320或360产生并存储在设备的存储器中。事件识别器结构320和360通常分别包括事件识别器状态334、374(下面参考图4A和4B更详细地讨论),和分别具有状态机340、380的事件识别器特定码338、378。事件识别器结构320还包括视图层次结构参考336,而事件识别器结构360包括程序层次结构参考376。特定事件识别器的每个实例恰好参考了一个视图或程序级别。视图层次结构参考336或程序层次结构参考376(对于一个特定事件识别器)用于确立哪个视图或程序级别逻辑地耦合到各自的事件识别器。In some embodiments, for each actively involved event recognizer, a separate event recognizer structure 320 or 360 is generated and stored in the memory of the device. Event recognizer structures 320 and 360 generally include event recognizer states 334, 374, respectively (discussed in more detail below with reference to FIGS. 4A and 4B ), and event recognizer specific code 338, 378 with state machines 340, 380, respectively. Event recognizer structure 320 also includes view hierarchy reference 336 , while event recognizer structure 360 includes program hierarchy reference 376 . Each instance of a particular event recognizer references exactly one view or program level. View hierarchy reference 336 or program hierarchy reference 376 (for a particular event recognizer) is used to establish which view or program level is logically coupled to the respective event recognizer.
视图元数据341和级别元数据381可以分别包括关于视图或级别的数据。视图或级别元数据可以至少包括以下可能影响到事件识别器的子事件传送的特性:View metadata 341 and level metadata 381 may include data about views or levels, respectively. View or level metadata may include at least the following properties that may affect subevent delivery to event recognizers:
·停止特性342、382,其在被设置用于视图或程序级别时,阻止子事件传送到与该视图或程序级别以及视图或程序层次结构中的该视图或程序级别的先辈相关联的事件识别器。• Stop feature 342, 382, which, when set for a view or program level, prevents sub-events from passing to event recognition associated with that view or program level and the view or program level's ancestors in the view or program level device.
·跳过特性343、383,其在被设置用于视图或程序级别时,阻止子事件传送到与该视图或程序级别相关联的事件识别器,但是允许子事件传送到视图或程序层次结构中的该视图或程序级别的先辈。• Skip properties 343, 383 which, when set for a view or program level, prevent sub-events from being passed to event recognizers associated with that view or program level, but allow sub-events to be passed into the view or program hierarchy The ancestors of this view or program level.
·非点击跳过特性344、384,其在被设置用于视图时,阻止子事件传送到与该视图相关联的事件识别器,除非该视图是点击视图。如上所述,点击视图确定模块314认定点击视图(或在点击级别确定模块352的情况下是点击级别)为应该处理子事件的层次结构中的最低视图。• A non-click skip property 344, 384 which, when set for a view, prevents sub-events from being delivered to event recognizers associated with that view unless the view is a clicked view. As noted above, click view determination module 314 considers a click view (or click level in the case of click level determination module 352 ) to be the lowest view in the hierarchy that should handle sub-events.
事件识别器结构320和360可以分别包括元数据322、362。在一些实施例中,元数据322、362包括指示事件传送系统应该如何执行到有效涉及的事件识别器的子事件传送的可配置的特性、标志和列表。在一些实施例中,元数据322、362可以包括指示事件识别器如何可以彼此交互的可配置的特性、标志和列表。在一些实施例中,元数据322、362可以包括指示子事件是否传送到视图或程序层次结构中的变化的级别的可配置的特性、标志和列表。在一些实施例中,事件识别器元数据322、362的组合以及视图或级别元数据(分别是341、381)二者都用于配置事件传送系统以:a)执行到有效涉及的事件识别器的子事件传送,b)指示事件识别器可以如何彼此交互,以及c)指示子事件是否以及何时传送到视图或程序层次结构的不同级别。Event recognizer structures 320 and 360 may include metadata 322, 362, respectively. In some embodiments, metadata 322, 362 includes configurable properties, flags, and lists that indicate how the event delivery system should perform delivery of sub-events to effectively involved event recognizers. In some embodiments, metadata 322, 362 may include configurable properties, flags, and lists that indicate how event recognizers may interact with each other. In some embodiments, the metadata 322, 362 may include configurable properties, flags, and lists that indicate whether sub-events are passed to varying levels in the view or program hierarchy. In some embodiments, the combination of event recognizer metadata 322, 362 and view or level metadata (341, 381 respectively) are both used to configure the event delivery system to: a) execute to effectively involved event recognizers The subevent delivery of the , b) indicates how event recognizers can interact with each other, and c) indicates whether and when subevents are delivered to different levels of the view or program hierarchy.
应当注意,在一些实施例中,按照事件识别器的结构320、360的字段所规定的,各自的事件识别器发送事件识别动作333、373到其各自的目标335、375。发送动作到目标与发送(以及延迟发送)子事件到各自的点击视图或级别是不同的。It should be noted that in some embodiments, a respective event recognizer sends an event recognition action 333, 373 to its respective target 335, 375, as specified by the fields of the structure 320, 360 of the event recognizer. Sending an action to a target is not the same as sending (and delaying sending) a child event to the respective clicked view or level.
存储在对应的事件识别器的各自事件识别器结构320、360中的元数据特性包括以下中的一个或多个:The metadata properties stored in the respective event recognizer structures 320, 360 of the corresponding event recognizers include one or more of the following:
·排他标志324、364,其在被设置用于事件识别器时,指示一旦由事件识别器识别到一个事件,事件传送系统应该停止传送子事件到有效涉及的视图或程序级别的任何其他事件识别器(例外的是在例外列表326、366中列出的任何其他事件识别器)。当子事件的接收引起特定事件识别器进入如由其对应的排他标志324或364所指示的排他状态时,接下来的子事件仅仅被传送到在排他状态中的事件识别器(以及在例外列表326、366中列出的任何其他事件识别器)。Exclusive flags 324, 364 which, when set for an event recognizer, indicate that once an event is recognized by the event recognizer, the event delivery system should stop delivering sub-events to any other event recognitions at the view or program level effectively involved event recognizers (with the exception of any other event recognizers listed in the exception lists 326, 366). When the receipt of a sub-event causes a particular event recognizer to enter the exclusive state as indicated by its corresponding exclusive flag 324 or 364, the following sub-event is only passed to the event recognizer in the exclusive state (and the event recognizer in the exception list 326, any other event recognizer listed in 366).
·一些事件识别器结构320、360,其可以包括排他例外列表326、366。当被包括在事件识别器结构320、360中用于各自的事件识别器时,如果有事件识别器组的话,列表326、366指示事件识别器组即使在各自的事件识别器已经进入排他状态之后也继续接收子事件。例如,如果单敲事件的事件识别器进入排他状态,并且目前涉及的视图包括双敲事件的事件识别器,那么列表320、360将列出双敲事件识别器,以便即使在检测到单敲事件之后仍可识别双敲事件。相应地,排他例外列表326、366允许事件识别器识别共享共用的子事件序列的不同的事件,例如,单敲事件识别不排除随后由其他事件识别器识别的双敲或三次轻敲事件。• Some event recognizer structure 320,360, which may include an exclusive exception list 326,366. When included in an event recognizer structure 320, 360 for a respective event recognizer, the list 326, 366 indicates the event recognizer group, if any, even after the respective event recognizer has entered the exclusive state Also continue to receive sub-events. For example, if an event recognizer for a single tap event enters an exclusive state, and the currently involved view includes an event recognizer for a double tap event, the lists 320, 360 will list the double tap event recognizer so that even if a single tap event is detected Double-knock events are still recognized afterwards. Accordingly, the exclusive exception lists 326, 366 allow an event recognizer to recognize different events that share a common sequence of sub-events, eg, single-tap event recognition does not exclude double-tap or triple-tap events subsequently recognized by other event recognizers.
·一些事件识别器结构320、360,其可以包括等待列表327、367。其在被包括在事件识别器结构320、360中用于各自的事件识别器时,如果有事件识别器组的话,这种列表327、367指示事件识别器组必须在各自的事件识别器可以识别各自的事件之前进入事件不可能或事件取消状态。实际上,所列出的事件识别器比具有等特列表327、367的事件识别器具有用于识别事件的更高优先级。• Some event recognizer structure 320,360, which may include a wait list 327,367. Such lists 327, 367, when included in the event recognizer structure 320, 360 for the respective event recognizer, indicate that the event recognizer group, if any, must be identified in the respective event recognizer Enter the event impossible or event cancel state before the respective event. In fact, the event recognizers listed have higher priority for recognizing events than the event recognizers with the privilege list 327,367.
·延迟触摸开始标志328、368,其在被设置用于事件识别器时,引起该事件识别器延迟发送子事件(包括触摸开始或手指放下子事件以及随后的事件)到事件识别器的各自点击视图或级别,直到已经确定该子事件序列不对应于这个事件识别器的事件类型。这个标志可以用于在姿态被识别的情况下使点击视图或级别在任何时候都不会看见任何子事件。当事件识别器识别事件失败时,触摸开始子事件(以及随后的触摸结束子事件)可以被传送到点击视图或级别。在一个例子中,传送这样的子事件到点击视图或级别使得用户界面简明地突出显示一个对象,而不调用与该对象相关联的动作Delayed touch start flags 328, 368 which, when set for an event recognizer, cause the event recognizer to delay sending sub-events (including touch start or finger down sub-events and subsequent events) to the respective click of the event recognizer view or level until it has been determined that the subevent sequence does not correspond to an event type for this event recognizer. This flag can be used to make clicking on a view or level not see any sub-events at any time while the gesture is recognized. When the event recognizer fails to recognize the event, the touch-on sub-event (and subsequently the touch-end sub-event) can be passed to the click view or level. In one example, passing such a subevent to a click on a view or level causes the user interface to concisely highlight an object without invoking the action associated with the object
·延迟触摸结束标志330、370,其在被设置用于事件识别器时,引起事件识别器延迟发送子事件(例如,触摸结束子事件)到事件识别器的各自点击视图或级别,直到已经确定该子事件序列不对应于这个事件识别器的事件类型。这可以用于在姿态稍后被识别的情况下阻止点击视图或级别根据触摸结束子事件而进行动作。只更触摸结束子事件没有发送,触摸取消就可以发送到点击视图或级别。如果识别了事件,则对应的动作由应用程序执行,并且触摸结束子事件传送到点击视图或级别。· Delay touch end flag 330, 370, which, when set for an event recognizer, causes the event recognizer to delay sending sub-events (e.g., touch end sub-events) to the respective click view or level of the event recognizer until it has been determined The sub-event sequence does not correspond to the event type of this event recognizer. This can be used to prevent the click view or level from acting on the touch end subevent if the gesture is recognized later. Only the touch end sub-event is not sent, and the touch cancel can be sent to the click view or level. If an event is recognized, the corresponding action is performed by the application, and the touch end sub-event is passed to the tap view or level.
·触摸取消标志332、372,其在被设置用于事件识别器时,如果已经确定子事件序列不对应于这个事件识别器的事件类型,则引起事件识别器发送触摸或输入取消到事件识别器的各自点击视图或级别。发送到点击视图或级别的触摸或输入取消指示先有的子事件(例如,触摸开始子事件)已经被取消。触摸或输入取消可以引起输入源处理器的状态(见图4B)进入辅入序列取消状态460(下面所讨论的)。A touch cancel flag 332, 372 which, when set for an event recognizer, causes the event recognizer to send a touch or input cancel to the event recognizer if it has determined that the sequence of sub-events does not correspond to this event recognizer's event type of the respective click view or level. A touch or input cancellation sent to a click view or level indicates that a pre-existing sub-event (eg, a touch-start sub-event) has been cancelled. A touch or input cancel may cause the state of the input source processor (see FIG. 4B ) to enter the input sequence cancel state 460 (discussed below).
在一些实施例中,例外列表326、366还可以由非排他事件识别器使用。尤其是,当非排他事件识别器识别事件时,随后的子事件不被发送到与当前活动视图相关联的排他事件识别器,在识别该事件的事件识别器的例外列表326、366中所列出的那些排他事件识别器除外。In some embodiments, exception lists 326, 366 may also be used by non-exclusive event recognizers. In particular, when an event is recognized by a non-exclusive event recognizer, subsequent sub-events are not sent to the exclusive event recognizer associated with the currently active view, listed in the exception list 326, 366 of the event recognizer that recognized the event Except for those exclusive event recognizers listed.
在一些实施例中,事件识别器可以配置成,结合延迟触摸结束标志使用触摸取消标志以阻止不想要的子事件传送到点击视图。例如,单敲姿态的定义和双敲姿态的前半部分的定义是同样的。一旦单敲事件识别器成功地识别了单敲,一个不想要的动作就可能发生。如果设置了延迟触摸结束标志,单敲事件识别器被阻止发送子事件到点击视图,直到识别了一个单敲事件。另外,单敲事件识别器的等待列表可以认定双敲事件识别器,从而阻止单敲事件识别器识别单敲,直到双敲事件识别器已经进入事件不可能状态。等待列表的使用避免了当执行双敲姿态时与单敲相关联的动作的执行。替代地,响应于对双敲事件的识别,只有与双敲相关联的动作才将被执行。In some embodiments, the event recognizer may be configured to use a touch cancel flag in conjunction with a delayed touch end flag to prevent unwanted sub-events from being delivered to the tap view. For example, the definition of the single-tap gesture is the same as the definition of the first half of the double-tap gesture. Once a single-knock is successfully identified by the single-knock event recognizer, an unwanted action may occur. If the delayed touch end flag is set, the single-tap event recognizer is blocked from sending sub-events to the tap view until a single-tap event is recognized. Additionally, the waitlist for the single-knock event recognizer may assert the double-knock event recognizer, thereby preventing the single-knock event recognizer from recognizing a single-knock until the double-knock event recognizer has entered the event impossibility state. The use of the wait list avoids the performance of actions associated with single taps when performing double tap gestures. Instead, only the actions associated with the double-knock will be performed in response to recognition of the double-knock event.
转而具体说到在触摸敏感表面上的用户触摸的形式,如上所述,触摸和用户姿态可以包括不必是瞬间的动作,例如,触摸可以包括在一段时间内在显示器上移动或保持手指的动作。然而,触摸数据结构定义了在特定时间的触摸的状态(或者,更一般地,任何输入源的状态)。因此,存储在触摸数据结构中的值在单点触摸的过程中可能改变,从而在不同的时间点使得能够将单点触摸的状态传输到应用程序。Turning specifically to the form of user touch on a touch-sensitive surface, as described above, touch and user gestures may include actions that are not necessarily instantaneous, for example, touch may include the action of moving or holding a finger on the display over a period of time. However, the touch data structure defines the state of a touch (or, more generally, the state of any input source) at a particular time. Therefore, the values stored in the touch data structure may change during the course of a single touch, thereby enabling the state of the single touch to be communicated to the application at different points in time.
每个触摸数据结构可以包括不同的字段。在一些实施例中,触摸数据结构可以包括对应于至少图3B中的触摸特定字段339或图3C中的输入源特定字段379的数据。Each touch data structure can include different fields. In some embodiments, the touch data structure may include data corresponding to at least touch-specific field 339 in FIG. 3B or input source-specific field 379 in FIG. 3C .
例如,图3B中的“用于视图的第一触摸”字段345(图3C中的“用于级别的第一触摸”字段385)可以指示触摸数据结构是否定义了用于特定视图的第一触摸(由于实现视图的软件元素是实例化的)。“时间戳”字段346、386可以指示触摸数据结构相关的具体时间。For example, the "First Touch for View" field 345 in FIG. 3B (the "First Touch for Level" field 385 in FIG. 3C ) may indicate whether the touch data structure defines a first touch for a particular view. (Since the software element implementing the view is instantiated). The "timestamp" field 346, 386 may indicate a specific time the touch data structure is associated with.
可选地,“信息”字段347、387可以用于指示触摸是否是基本姿态。例如,“信息”字段347、387可以指示触摸是否是挥击,并且如果是,挥击朝向哪个方向。挥击是一个或多个手指沿直线方向的快速拖拽。API实现(下面讨论)可以确定触摸是否是挥击并通过“信息”字段347、387传递该信息到应用程序,从而在触摸是挥击的情况下可以减轻原本必要的应用程序的一些数据处理。Optionally, an "info" field 347, 387 may be used to indicate whether the touch is a basic gesture. For example, the "Information" field 347, 387 may indicate whether the touch was a swipe, and if so, which direction the swipe was in. A swipe is a quick drag of one or more fingers in a straight line. An API implementation (discussed below) can determine whether the touch is a swipe and pass that information to the application via the "info" fields 347, 387, thereby relieving the application of some data processing that would otherwise be necessary if the touch was a swipe.
可选地,图3B中的“轻敲计数”字段348(图3C中的“事件计数”字段388)可以指示在初始触摸的位置有多少轻敲已经连续地执行。一个轻敲可以定义为在特定位置在触摸敏感面板上快速按下并抬离手指。如果手指以快速的相继方式又在该面板的相同位置按下并释放,则可以发生多个连续的轻敲。事件传送系统122可以对轻敲进行计数,并且通过“轻敲计数”字段348转送这个信息到应用程序。在相同位置的多次轻敲有时被认为是有用且容易的,以记录用于触摸使能接口的命令。于是,通过对轻敲进行计数,事件传送系统122又可以减轻来自应用程序的一些数据处理。Alternatively, the "Tap Count" field 348 in FIG. 3B (the "Event Count" field 388 in FIG. 3C ) may indicate how many taps have been performed consecutively at the location of the initial touch. A tap can be defined as a quick press and lift of the finger at a specific location on the touch-sensitive panel. Multiple consecutive taps can occur if the finger is pressed and released again at the same location on the panel in rapid succession. The event delivery system 122 can count the taps and forward this information to the application via the “Tap Count” field 348 . Multiple taps at the same location are sometimes considered useful and easy to record commands for a touch-enabled interface. Then, by counting the taps, the event delivery system 122 in turn can offload some data processing from the application.
“阶段”字段349、389可以指示基于触摸的姿态当前处于的特定阶段。阶段字段349、389可以具有各种值,诸如“触摸阶段开始”指示触摸数据结构定义了先前的触摸数据结构尚未参考过的新的触摸。“触摸阶段移动”值可以指示正在被定义的触摸从先前的位置已经进行了移动。“触摸阶段静止”值可以指示触摸已经停留在相同的位置。“触摸阶段结束”值可以指示触摸已经结束(例如,用户已经从多点触摸显示器的表面抬离了他/她的手指)。“触摸阶段取消”值可以指示该触摸已经被设备取消。取消的触摸可以是不必由用户结束但是设备已经决定要忽略的触摸。例如,设备可以确定该触摸是无心产生的(即,作为将便携式多点触摸使能设备放置在某人的口袋里的结果),并因此而忽略该触摸。“阶段”字段349、389的每个值都可以是一个整数。The "Stage" field 349, 389 may indicate the particular stage the touch-based gesture is currently in. The phase fields 349, 389 may have various values, such as "Touch Phase Start" indicating that the touch data structure defines a new touch that has not been referenced by previous touch data structures. A "touch phase movement" value may indicate that the touch being defined has moved from a previous location. A "touch phase stationary" value may indicate that the touch has stayed at the same location. The "touch phase end" value may indicate that the touch has ended (eg, the user has lifted his/her finger off the surface of the multi-touch display). A "touch phase canceled" value may indicate that the touch has been canceled by the device. A canceled touch may be a touch that does not have to be terminated by the user, but that the device has decided to ignore. For example, the device may determine that the touch was made inadvertently (ie, as a result of placing the portable multi-touch enabled device in someone's pocket), and ignore the touch accordingly. Each value of the "Stage" field 349, 389 may be an integer.
因此,每个触摸数据结构可以定义在具体的时间对于各自的触摸(或其他输入源)正在发生什么(例如,该触摸是否静止、正在被移动等等)以及与该触摸相关联的其他信息(比如位置)。相应地,每个触摸数据结构可以定义在特定时间点的特定触摸的状态。参考相同时间的一个或多个触摸数据结构可以加入到可以定义特定视图在一个时刻接收的所有触摸的状态的触摸事件数据结构中(如上所述,一些触摸数据结构还可以参考已经结束且不再被接收的触摸)。随时间推移,为了给软件提供描述视图中正在发生的触摸的连续信息,多点触摸事件数据结构可以发送到实现视图的软件。Therefore, each touch data structure can define what is happening to the respective touch (or other input source) at a specific time (for example, whether the touch is still, is being moved, etc.) and other information associated with the touch ( such as location). Accordingly, each touch data structure may define the state of a particular touch at a particular point in time. One or more touch data structures that reference the same time can be added to a touch event data structure that can define the state of all touches that a particular view has received at a time (as mentioned above, some touch data structures can also reference touches that have ended and are no longer received touch). Over time, in order to provide software with continuous information describing the touches that are occurring in the view, the multi-touch event data structure can be sent to the software implementing the view.
图3D是例示了根据一些实施例的用于事件处理的示例部件(例如,事件处理部件390)的框图。在一些实施例中,存储器111(图1A)包括事件识别器全局方法312和一个或多个应用程序(例如,133-1到133-3)。Figure 3D is a block diagram illustrating example components (eg, event processing component 390) for event handling in accordance with some embodiments. In some embodiments, memory 111 (FIG. 1A) includes event recognizer global method 312 and one or more application programs (eg, 133-1 through 133-3).
在一些实施例中,事件识别器全局方法312包括事件监控器311、点击视图确定模块314、活动事件识别器确定模块316和事件调度模块315。在一些实施例中,事件识别器全局方法312位于事件传送系统122(图1A)中。在一些实施例中,事件识别器全局方法312在操作系统118(图1A)中实现。作为替代,事件识别器全局方法312在各自的应用程序133-1中实现。在还有另一个实施例中,事件识别器全局方法312作为单立模块实现,或者作为存储在存储器111中的另一个模块(例如,接触/运动模块(未示出))的一部分实现。In some embodiments, event recognizer global method 312 includes event monitor 311 , click view determination module 314 , active event recognizer determination module 316 , and event dispatch module 315 . In some embodiments, event recognizer global method 312 resides in event delivery system 122 (FIG. 1A). In some embodiments, event recognizer global method 312 is implemented in operating system 118 (FIG. 1A). Instead, event recognizer global methods 312 are implemented in respective application programs 133-1. In yet another embodiment, event recognizer global method 312 is implemented as a stand-alone module, or as part of another module stored in memory 111 (eg, a contact/motion module (not shown)).
事件监控器311接收来自一个或多个传感器116、触摸敏感显示器156和/或一个或多个输入设备128的事件信息。事件信息包括关于事件(例如,在触摸敏感显示器156上的用户触摸,作为多点触摸姿态或设备102的运动的一部分)和/或子事件(例如,跨触摸敏感显示器156的触摸的移动)的信息。例如,触摸事件的事件信息包括以下中的一个或多个:触摸的位置和时间戳。类似地,挥击事件的事件信息包括以下中的两个或更多个:挥击的位置、时间戳、方向和速度。传感器116、触摸敏感显示器156和输入设备128直接地或通过检索和存储事件信息的外围设备接口发送信息事件和子事件信息到事件监控器311。传感器116包括以下中的一个或多个:接近传感器、加速计、陀螺仪、麦克风和摄影机。在一些实施例中,传感器116还包括输入设备128和/或触摸敏感显示器156。Event monitor 311 receives event information from one or more sensors 116 , touch-sensitive display 156 , and/or one or more input devices 128 . Event information includes information about events (e.g., a user touch on touch-sensitive display 156 as part of a multi-touch gesture or motion of device 102) and/or sub-events (e.g., movement of a touch across touch-sensitive display 156). information. For example, the event information of a touch event includes one or more of the following: a touched location and a time stamp. Similarly, the event information for a swipe event includes two or more of: the location of the swipe, the timestamp, the direction, and the speed. Sensors 116, touch-sensitive display 156, and input devices 128 send informational event and sub-event information to event monitor 311 either directly or through peripheral interfaces that retrieve and store event information. Sensors 116 include one or more of the following: proximity sensors, accelerometers, gyroscopes, microphones, and cameras. In some embodiments, sensor 116 also includes input device 128 and/or touch-sensitive display 156 .
在一些实施例中,事件监控器311以预定的间隔发送请求到传感器116和/或外围设备接口。作为响应,传感器116和/或外围设备接口发送事件信息。在其他实施例中,仅仅在有重大事件时(例如,接收的输入超出了预定噪音阈值和/或超出预定持续时间),传感器116和/或外围设备接口才发送事件信息。In some embodiments, event monitor 311 sends requests to sensor 116 and/or peripheral device interface at predetermined intervals. In response, the sensor 116 and/or the peripheral device interface sends event information. In other embodiments, the sensor 116 and/or the peripheral device interface transmit event information only when there is a significant event (eg, received input exceeds a predetermined noise threshold and/or exceeds a predetermined duration).
事件监控器311接收事件信息并转发事件信息到事件调度器模块315。在一些实施例中,事件监控器311确定事件信息要传送到的一个或多个各自的应用程序(例如,133-1)。在一些实施例中,事件监控器311还确定事件信息要传送到的一个或多个各自的应用程序的一个或多个各自的应用程序视图317。The event monitor 311 receives event information and forwards the event information to the event scheduler module 315 . In some embodiments, event monitor 311 determines one or more respective applications (eg, 133 - 1 ) to which event information is communicated. In some embodiments, event monitor 311 also determines one or more respective application views 317 of one or more respective applications to which event information is to be communicated.
在一些应用程序中,事件识别器全局方法312还包括点击视图确定模块314和/或活动事件识别器确定模块316。In some applications, the event recognizer global method 312 also includes a click view determination module 314 and/or an activity event recognizer determination module 316 .
如果存在点击视图确定模块314,则当触摸敏感显示器156显示多于一个视图时,点击视图确定模块314提供用于在一个或多个视图中确定哪里发生了事件或子事件的软件程序。视图由用户可以在显示器上看见的控件或其它元素组成。If present, click view determination module 314 provides a software routine for determining where an event or sub-event has occurred in one or more views when touch sensitive display 156 displays more than one view. A view consists of controls or other elements that a user can see on a display.
与各自的应用程序(例如,133-1)相关联的用户界面的另一方面是一组视图317,本文中有时称为应用程序视图或用户界面窗口,在其中显示信息并发生基于触摸的姿态。在其中检测到触摸的(各自的应用程序的)应用程序视图可以对应于该应用程序的视图层次结构中的特定的视图。例如,在其中检测到触摸的最低级视图可以称为点击视图,并且识别为适合的输入的事件钮可以至少部分地基于开始基于触摸的姿态的初始触摸的点击视图确定。Another aspect of the user interface associated with the respective application (e.g., 133-1) is a set of views 317, sometimes referred to herein as application views or user interface windows, in which information is displayed and touch-based gestures occur . The application view (of the respective application) in which the touch is detected may correspond to a particular view in the application's view hierarchy. For example, the lowest-level view in which a touch is detected may be referred to as a tap view, and event buttons identified as suitable inputs may be determined based at least in part on the tap view that initiated the initial touch of the touch-based gesture.
点击视图确定模块314接收与事件和/或子事件相关的信息。当应用程序具有在层次结构中组织的多个视图时,点击视图确定模块314认定点击视图为应该处理该事件或子事件的层次结构中的最低视图。在大多数情况下,点击视图是其中发生了初始事件或子事件(即,形成姿态的事件和/或子事件的序列中的第一事件或子事件)的最低级视图。一旦由点击视图确定模块认定了点击视图,则该点击视图通常接收与被认定为点击视图的相同触摸或输入源相关的所有事件和/或子事件。然而,点击视图不总是接收与被认定为点击视图的相同触摸或输入源相关的所有事件和/或子事件的唯一视图。换句话说,在一些实施例中,另一个应用程序(例如,133-2)或者相同应用程序的另一个视图也至少接收与该相同触摸或输入源相关的事件和/或子事件的子集,而不考虑对于该触摸或输入源是否已经确定了点击视图。Click view determination module 314 receives information related to events and/or sub-events. When an application has multiple views organized in a hierarchy, the click view determination module 314 considers the click view to be the lowest view in the hierarchy that should handle the event or sub-event. In most cases, the click view is the lowest-level view in which an initial event or sub-event (ie, the first event or sub-event in a sequence of gesturing events and/or sub-events) occurred. Once a tap view is asserted by the tap view determination module, the tap view typically receives all events and/or sub-events related to the same touch or input source that is asserted as the tap view. However, a tap view is not always the only view that receives all events and/or sub-events related to the same touch or input source identified as the tap view. In other words, in some embodiments, another application (e.g., 133-2) or another view of the same application also receives at least a subset of events and/or sub-events related to the same touch or input source , regardless of whether a click view has already been determined for that touch or input source.
活动事件识别器确定模块316在视图层次结构中确定哪个或哪些视图应该接收特定的事件和/或子事件序列。在一些应用程序上下文中,活动事件识别器确定模块316确定只有点击视图应该接收特定的事件和/或子事件序列。在其他应用程序上下文中,活动事件识别器确定模块316确定包括事件或子事件物理位置的所有视图都是有效涉及的视图,并因此确定所有有效涉及的视图应该接收特定的事件和/或子事件序列。在其他应用程序上下文中,即使触摸事件和/或子事件全部限制在与一个特定视图相关联的区域内,层次结构中的更高级别的视图也仍然保持为有效涉及的视图,因此层次结构中的更高级别的视图应该接收特定的事件和/或子事件序列。附加地或作为替代地,活动事件识别器确定模块316在程序层次结构中确定哪个或哪些应用程序应该接收特定的事件和/或子事件序列。因此,在一些实施例中,活动事件识别器确定模块316确定只有程序层次结构中的各自的应用程序才应该接收特定的事件和/或子事件序列。在一些实施例中,活动事件识别器确定模块316确定程序层次结构中的多个应用程序应该接收特定的事件和/或子事件序列。The active event recognizer determination module 316 determines which view or views in the view hierarchy should receive a particular sequence of events and/or sub-events. In some application contexts, the active event recognizer determination module 316 determines that only clicked views should receive a particular sequence of events and/or sub-events. In other application contexts, the active event recognizer determination module 316 determines that all views that include the physical location of an event or sub-event are actively involved views, and therefore determines that all actively involved views should receive a particular event and/or sub-event sequence. In other application contexts, even if touch events and/or subevents are all confined to the area associated with a particular view, views higher in the hierarchy remain effectively involved views, so the The higher-level views should receive specific sequences of events and/or subevents. Additionally or alternatively, active event recognizer determination module 316 determines which application(s) in the program hierarchy should receive a particular sequence of events and/or sub-events. Accordingly, in some embodiments, active event recognizer determination module 316 determines that only respective application programs in the program hierarchy should receive a particular sequence of events and/or sub-events. In some embodiments, the active event recognizer determination module 316 determines that multiple application programs in the program hierarchy should receive a particular sequence of events and/or sub-events.
事件调度器模块315调度事件信息到事件识别器(本文中也称为“姿态识别器”)(例如,事件识别器325-1)。在包括活动事件识别器确定模块316的实施例中,事件调度器模块315传送事件信息到由活动事件识别器确定模块316确定的事件识别器。在一些实施例中,事件调度器模块315将由各自的事件识别器325(或者由在各自的事件识别器325中的事件接收器3031)检索的事件信息存储在事件队列中。Event dispatcher module 315 dispatches event information to event recognizers (also referred to herein as "gesture recognizers") (eg, event recognizer 325-1). In embodiments that include active event recognizer determination module 316 , event scheduler module 315 transmits event information to the event recognizers determined by active event recognizer determination module 316 . In some embodiments, the event scheduler module 315 stores event information retrieved by the respective event recognizer 325 (or by the event receiver 3031 in the respective event recognizer 325) in an event queue.
在一些实施例中,各自的应用程序(例如,133-1)包括应用程序内部状态321,其中应用程序内部状态321指示在应用程序是活动的或正在执行时显示在触摸敏感显示器156上的当前应用程序视图。在一些实施例中,设备/全局内部状态134(图1C)由事件识别器全局方法312用于确定当前哪个或哪些应用程序是活动的,并且应用程序内部状态321由事件识别器全局方法312用于确定事件信息要传送到的应用程序视图317。In some embodiments, a respective application (e.g., 133-1) includes an application internal state 321, wherein the application internal state 321 indicates the current Application view. In some embodiments, device/global internal state 134 (FIG. 1C) is used by event recognizer global method 312 to determine which application or applications are currently active, and application internal state 321 is used by event recognizer global method 312. is used to determine the application view 317 to which event information is to be delivered.
在一些实施例中,应用程序内部状态321包括附加信息,例如以下中的一个或多个:当应用程序133-1恢复执行时要使用的恢复信息;用户界面状态信息,其指示由应用程序133-1正在显示或准备显示的信息;状态队列,用于使得用户能够回退到应用程序133-1的先前状态或视图;以及由用户执行的先前动作的重做/撤销队列。在一些实施例中,应用程序内部状态321进一步包括上下文信息/文本和元数据323。In some embodiments, application internal state 321 includes additional information, such as one or more of: resume information to be used when application 133-1 resumes execution; user interface state information indicating - 1 information being displayed or about to be displayed; a state queue to enable the user to fall back to a previous state or view of the application 133-1; and a redo/undo queue of previous actions performed by the user. In some embodiments, application internal state 321 further includes contextual information/text and metadata 323 .
在一些实施例中,应用程序133-1包括一个或多个应用程序视图317,其中的每个都具有对应的指令用于处理发生在应用程序的用户界面的特定视图内的触摸事件(例如,对应的事件处理器319)。应用程序133-1的至少一个应用程序视图317包括一个或多个事件识别器325。通常,各自的应用程序视图317包括多个事件识别器325。在其他实施例中,事件识别器325中的一个或多个是单独模块的一部分,诸如用户界面套件(未示出)或更高级对象,其中应用程序133-1从其继承了方法或其它特性。在一些实施例中,各自的应用程序视图317还包括以下中的一个或多个:数据更新器、对象更新器、GU1更新器和/或接收的事件数据。In some embodiments, application 133-1 includes one or more application views 317, each of which has corresponding instructions for handling touch events that occur within a particular view of the application's user interface (e.g., corresponding event handler 319). At least one application view 317 of application 133 - 1 includes one or more event recognizers 325 . Typically, a respective application view 317 includes a plurality of event recognizers 325 . In other embodiments, one or more of event recognizers 325 are part of a separate module, such as a user interface suite (not shown) or a higher level object from which application 133-1 inherits methods or other properties . In some embodiments, the respective application view 317 also includes one or more of: a data updater, an object updater, a GUI updater, and/or received event data.
各自的应用程序(例如,133-1)还包括一个或多个事件处理器319。通常,各自的应用程序(例如,133-1)包括多个事件处理器319。The respective application (eg, 133 - 1 ) also includes one or more event handlers 319 . Typically, a respective application (eg, 133 - 1 ) includes a plurality of event handlers 319 .
各自的事件识别器325-1接收来自事件调度器模块315(直接地或间接地通过应用程序133-1)的事件信息并从事件信息识别事件。事件识别器325-1包括事件接收器3031和事件比较器3033。The respective event recognizers 325-1 receive event information from the event scheduler module 315 (either directly or indirectly through the application program 133-1) and identify events from the event information. The event recognizer 325 - 1 includes an event receiver 3031 and an event comparator 3033 .
事件信息包括关于事件(例如,触摸)或子事件(例如,触摸移动)的信息。根据事件或子事件,事件信息还包括附加信息,诸如事件或子事件的位置。当事件或子事件涉及触摸的运动时,事件信息还可以包括子事件的速度和方向。在一些实施例中,事件包括设备从一个朝向到另一个的旋转(例如,从纵向朝向到横向朝向,或反过来),并且事件信息包括关于设备的当前朝向(也称为设备方位)的对应信息。The event information includes information on an event (eg, touch) or sub-event (eg, touch movement). Depending on the event or sub-event, the event information also includes additional information, such as the location of the event or sub-event. When the event or sub-event involves the motion of a touch, the event information may also include the speed and direction of the sub-event. In some embodiments, the event includes a rotation of the device from one orientation to another (eg, from a portrait orientation to a landscape orientation, or vice versa), and the event information includes corresponding information.
事件比较器3033将事件信息和一个或多个预定义的姿态定义(本文中也称为“事件定义”)比较,并且基于该比较确定事件或子事件,或者确定或更新事件或子事件的状态。在一些实施例中,事件比较器3033包括一个或多个姿态定义3035(如上所述,本文中也称为“事件定义”)。姿态定义3035包含姿态的定义(例如,预定义的事件和/或子事件序列),例如,姿态1(3037-1)、姿态2(3037-2)以及其他。在一些实施例中,姿态定义3035中的子事件包括,例如,触摸开始、触摸结束、触摸移动、触摸取消以及多点触摸。在一个示例中,姿态1(3037-1)的定义是在显示的对象上双敲。例如,双敲包括在该姿态的预定阶段内在显示的对象上的第一触摸(触摸开始)、在该姿态的下一个预定阶段内的第一抬离(触摸结束)、在该姿态的随后的预定阶段内在显示的对象上的第二触摸(触摸开始)以及在该姿态的最终预定阶段内的第二抬离(触摸结束)。在另一个示例中,姿态2(3037-2)的定义包括在显示的对象上的拖拽。例如,拖拽包括在显示的对象上触摸(或接触)、跨触摸敏感显示器156的触摸的移动以及触摸的抬离(触摸结束)。Event comparator 3033 compares the event information to one or more predefined gesture definitions (also referred to herein as "event definitions"), and based on the comparison determines an event or sub-event, or determines or updates the status of an event or sub-event . In some embodiments, event comparator 3033 includes one or more gesture definitions 3035 (also referred to herein as "event definitions," as described above). Gesture definitions 3035 contain definitions of gestures (eg, predefined sequences of events and/or sub-events), eg, gesture 1 (3037-1), gesture 2 (3037-2), and others. In some embodiments, sub-events in gesture definition 3035 include, for example, touch start, touch end, touch move, touch cancel, and multi-touch. In one example, Gesture 1 (3037-1) is defined as a double tap on the displayed object. For example, a double tap includes a first touch (touch start) on a displayed object within a predetermined stage of the gesture, a first lift off (touch end) within the next predetermined stage of the gesture, a subsequent A second touch (touch start) on the displayed object within a predetermined period and a second lift off (touch end) within a final predetermined period of the gesture. In another example, the definition of Gesture 2 (3037-2) includes a drag on the displayed object. For example, dragging includes touching (or contacting) on a displayed object, movement of a touch across touch-sensitive display 156, and lift-off of a touch (touch-off).
在一些实施例中,事件识别器325-1还包括用于事件传送3039的信息。用于事件传送3039的信息包括对对应的事件处理器319的参考。可选地,用于事件传送3039的信息包括动作-目标对。在一些实施例中,响应于识别姿态(或姿态的一部分),事件信息(例如,动作消息)被发送到由动作-目标对认定的一个或多个目标。在其他实施例中,响应于识别姿态(或姿态的一部分),激活动作-目标对。In some embodiments, event recognizer 325-1 also includes information for event delivery 3039. Information for event delivery 3039 includes references to corresponding event handlers 319 . Optionally, the information used for event delivery 3039 includes action-target pairs. In some embodiments, in response to recognizing a gesture (or a portion of a gesture), event information (eg, an action message) is sent to one or more targets identified by the action-target pair. In other embodiments, an action-target pair is activated in response to recognizing a gesture (or a portion of a gesture).
在一些实施例中,姿态定义3035包括对于各自的用户界面对象的姿态的定义。在一些实施例中,事件比较器3033执行点击测试以确定哪一个用户界面对象与子事件相关联。例如,在触摸敏感显示器156上显示了三个用户界面对象的应用程序视图中,当在触摸敏感显示器156上检测到触摸时,事件比较器3033执行点击测试,以确定如果有的话则三个用户界面对象中的哪个与该触摸(事件)相关联。如果每个显示的对象都与各自的事件处理器319相关联,那么事件比较器3033使用点击测试的结果来确定哪个事件处理器319应该被激活。例如,事件比较器3033选择与该事件以及触发点击测试的对象相关联的事件处理器319。In some embodiments, gesture definitions 3035 include definitions of gestures for respective user interface objects. In some embodiments, event comparator 3033 performs hit testing to determine which user interface object is associated with the sub-event. For example, in an application view that displays three user interface objects on the touch-sensitive display 156, when a touch is detected on the touch-sensitive display 156, the event comparator 3033 performs a hit test to determine the three, if any, Which of the UI objects is associated with that touch (event). If each displayed object is associated with a respective event handler 319, the event comparator 3033 uses the result of the hit test to determine which event handler 319 should be activated. For example, the event comparator 3033 selects the event handler 319 associated with the event and the object that triggered the hit test.
在一些实施例中,对于各自的姿态的各自的姿态定义3037还包括延迟的动作,该延迟的动作延迟事件信息的传送直到已经确定事件和/或子事件序列对应于或不对应于事件识别器的事件类型。In some embodiments, the respective gesture definition 3037 for the respective gesture also includes a delayed action that delays the transmission of event information until it has been determined that the event and/or sequence of sub-events does or does not correspond to the event recognizer event type.
当各自的事件识别器325-1确定事件和/或子事件序列不匹配于姿态定义3035中的任何事件时,各自的事件识别器325-1进入事件失败状态,在此之后各自的事件识别器325-1不考虑基于触摸的姿态的随后的事件和/或子事件。在这种情况下,如果有的话,对于点击视图保持活动的其他事件识别器继续跟踪和处理正在进行的基于触摸的姿态的事件和/或子事件。When the respective event recognizer 325-1 determines that the event and/or sequence of subevents does not match any event in the gesture definition 3035, the respective event recognizer 325-1 enters an event fail state, after which the respective event recognizer 325-1 Disregards subsequent events and/or sub-events of the touch-based gesture. In this case, other event recognizers that remain active for the tap view continue to track and handle ongoing touch-based gesture events and/or sub-events, if any.
在一些实施例中,当对于点击视图没有事件识别器保留时,事件信息发送到视图层次结构中的更高的视图中的一个或多个事件识别器。作为代替地,当对于点击视图没有事件识别器保留时,忽略该事件信息。在一些实施例中,当对于视图层次结构中的视图没有事件识别器保留时,事件信息发送到程序层次结构中的更高的程序级别中的一个或多个事件识别器。作为代替地,当对于视图层次结构中的视图没有事件识别器保留时,忽略该事件信息。In some embodiments, when no event recognizers remain for a clicked view, the event information is sent to one or more event recognizers in views higher in the view hierarchy. Instead, when no event recognizer remains for the tap view, the event message is ignored. In some embodiments, when no event recognizers remain for a view in the view hierarchy, the event information is sent to one or more event recognizers in a higher program level in the program hierarchy. Instead, the event information is ignored when no event recognizer remains for a view in the view hierarchy.
在一些实施例中,各自的事件识别器325-1包括事件识别器状态334。事件识别器状态334包括各自的事件识别器325-1的状态。事件识别器状态的例子下面将参考图4A-4B以及5A-5C更详细地描述。In some embodiments, a respective event recognizer 325 - 1 includes an event recognizer state 334 . Event recognizer state 334 includes the state of the respective event recognizer 325-1. Examples of event recognizer states are described in more detail below with reference to FIGS. 4A-4B and 5A-5C.
在一些实施例中,事件识别器状态334包括识别器元数据和特性3043。在一些实施例中,识别器元数据和特性3043包括以下中的一个或多个:A)指示事件传送系统应该如何执行到有效涉及的事件识别器的事件和/或子事件的传送的可配置的特性、标志和/或列表;B)指示事件识别器如何彼此交互的可配置的特性、标志和/或列表;C)指示事件识别器如何接收事件信息的可配置的特性、标志和/或列表;D)指示事件识别器如何可以识别姿态的可配置的特性、标志和/或列表;E)指示事件和/或子事件是否传送到视图层次结构中的变化的级别的可配置的特性、标志和/或列表;以及F)对对应的事件处理器319的参考。In some embodiments, event recognizer state 334 includes recognizer metadata and properties 3043 . In some embodiments, recognizer metadata and properties 3043 include one or more of the following: A) configurable parameters indicating how the event delivery system should perform delivery of events and/or sub-events to effectively involved event recognizers B) configurable properties, flags and/or lists indicating how event recognizers interact with each other; C) configurable properties, flags and/or lists indicating how event recognizers receive event information list; D) a configurable property, flag, and/or list indicating how the event recognizer can recognize gestures; E) a configurable property indicating whether events and/or sub-events are passed to varying levels in the view hierarchy, flags and/or lists; and F) references to corresponding event handlers 319.
在一些实施例中,事件识别器状态334包括事件/触摸元数据3045。事件/触摸元数据3045包括关于已经检测到的且对应于姿态定义3035的各自的姿态定义3037的各自的事件/触摸的事件/触摸信息。事件/触摸信息包括以下中的一个或多个:各自的事件/触摸的位置、时间戳、速度、方向、距离、范围(或范围变化)以及角度(或角度变化)。In some embodiments, event recognizer state 334 includes event/touch metadata 3045 . Event/touch metadata 3045 includes event/touch information about respective events/touches that have been detected and that correspond to respective gesture definitions 3037 of gesture definitions 3035 . The event/touch information includes one or more of: location, timestamp, velocity, direction, distance, range (or range change), and angle (or angle change) of the respective event/touch.
在一些实施例中,当识别了姿态的一个或多个特定事件和/或子事件时,各自的事件识别器325激活与各自的事件识别器325相关联的事件处理器319。在一些实施例中,各自的事件识别器325传送与事件相关联的事件信息到事件处理器319。In some embodiments, the respective event recognizer 325 activates the event handler 319 associated with the respective event recognizer 325 when one or more particular events and/or sub-events of the gesture are recognized. In some embodiments, the respective event recognizer 325 transmits event information associated with the event to the event handler 319 .
事件处理器319在被激活时执行以下中的一个或多个:创建和/或更新数据、创建和更新对象、以及准备显示信息并发送该显示信息用以在显示器126或触摸敏感显示器156上显示。Event handler 319, when activated, performs one or more of: creating and/or updating data, creating and updating objects, and preparing and sending display information for display on display 126 or touch-sensitive display 156 .
在一些实施例中,各自的应用程序视图317-2包括视图元数据341。如以上关于图3B所描述的,视图元数据341包括关于视图的数据。可选地,视图元数据341包括以下中的一个或多个:停止特性342、跳过特性343、非点击跳过特性344以及其他视图元数据329。In some embodiments, a respective application view 317 - 2 includes view metadata 341 . As described above with respect to FIG. 3B , view metadata 341 includes data about a view. Optionally, the view metadata 341 includes one or more of the following: a stop characteristic 342 , a skip characteristic 343 , a non-click to skip characteristic 344 , and other view metadata 329 .
在一些实施例中,视图层次结构中的第一有效涉及的视图可以配置成阻止传送相应的子事件到与该第一有效涉及的视图相关联的事件识别器。该行为可以实现跳过特性343。当跳过特性被设置用于应用程序视图时,仍然针对与视图层次结构中的其他有效涉及的视图相关联的事件识别器执行相应的子事件的传送。In some embodiments, a first actively involved view in the view hierarchy may be configured to prevent delivery of a corresponding sub-event to an event recognizer associated with the first actively involved view. This behavior can implement the skip feature 343 . When the skip attribute is set for an application view, delivery of the corresponding sub-event is still performed for event recognizers associated with other actively involved views in the view hierarchy.
作为代替,视图层次结构中的第一有效涉及的视图可以配置成阻止传送相应的子事件到与该第一有效涉及的视图相关联的事件识别器,除非该第一有效涉及的视图是点击视图。这种行为可以实现条件性的非点击跳过特性344。Instead, the first actively involved view in the view hierarchy may be configured to prevent delivery of the corresponding child event to the event recognizer associated with the first actively involved view unless the first actively involved view is a click view . This behavior enables a conditional no-click-skip feature 344 .
在一些实施例中,视图层次结构中的第二有效涉及的视图配置成阻止传送相应的子事件到与该第二有效涉及的视图相关联的事件识别器以及到与第二有效涉及的视图的先辈相关联的事件识别器。这种行为可以实现停止特性342。In some embodiments, a second actively involved view in the view hierarchy is configured to prevent delivery of the corresponding sub-event to the event recognizer associated with the second actively involved view and to the An ancestor associated event recognizer. This behavior can implement the stopping feature 342 .
图3E是例示了根据一些实施例的姿态识别器的示例类和实例(例如,事件处理部件390)的框图。Figure 3E is a block diagram illustrating example classes and instances (eg, event handling component 390) of a gesture recognizer in accordance with some embodiments.
软件应用程序(例如,应用程序133-1)具有一个或多个事件识别器3040。在一些实施例中,各自的事件识别器(例如,3040-2)是事件识别器类。该各自的事件识别器(例如,3040-2)包括事件识别器特定码338(例如,定义事件识别器的操作的一组指令)和状态机340。A software application (eg, application 133 - 1 ) has one or more event recognizers 3040 . In some embodiments, a respective event recognizer (eg, 3040-2) is an event recognizer class. The respective event recognizer (eg, 3040 - 2 ) includes event recognizer specific code 338 (eg, a set of instructions defining the operation of the event recognizer) and a state machine 340 .
在一些实施例中,软件应用程序(例如,应用程序133-1)的应用程序状态321包括事件识别器的实例。事件识别器的每个实例是具有状态(例如,事件识别器状态334)的对象。各自的事件识别器实例的“执行”是通过执行对应的事件识别器特定码(例如,338)和更新或保持事件识别器实例3047的状态334来实现。事件识别器实例3047的状态334包括事件识别器实例的状态机340的状态3038。In some embodiments, the application state 321 of a software application (eg, application 133-1 ) includes an instance of an event recognizer. Each instance of an event recognizer is an object with a state (eg, event recognizer state 334 ). "Execution" of a respective event recognizer instance is accomplished by executing corresponding event recognizer specific code (eg, 338 ) and updating or maintaining state 334 of event recognizer instance 3047 . State 334 of event recognizer instance 3047 includes state 3038 of state machine 340 of the event recognizer instance.
在一些实施例中,应用程序状态321包括多个事件识别器实例3047。各自的事件识别器实例3047通常对应于已经绑定到(也称为“附属于”)应用程序的视图的事件识别器。在一些实施例中,一个或多个事件识别器实例3047绑定到程序层次结构中的各自的应用程序,而不参考该各自的应用程序的任何特定视图。在一些实施例中,应用程序状态321包括各自的事件识别器(例如,3040-2)的多个实例(例如,3047-1到3047-L)。在一些实施例中,应用程序状态321包括多个事件识别器(例如,3040-1到3040-R)的实例3047。In some embodiments, application state 321 includes multiple event recognizer instances 3047 . A respective event recognizer instance 3047 generally corresponds to an event recognizer that has been bound to (also referred to as "attached to") an application's view. In some embodiments, one or more event recognizer instances 3047 are bound to a respective application in the program hierarchy without reference to any particular view of the respective application. In some embodiments, application state 321 includes multiple instances (eg, 3047-1 through 3047-L) of respective event recognizers (eg, 3040-2). In some embodiments, application state 321 includes multiple instances 3047 of event recognizers (eg, 3040-1 through 3040-R).
在一些实施例中,姿态识别器3040的各自的实例3047-2包括事件识别器状态334。正如上面讨论的,在一些实施例中,事件识别器状态334包括识别器元数据和特性3043以及事件/触摸元数据3045。在一些实施例中,事件识别器状态334还包括视图层次结构参考336,用以指示姿态识别器3040-2的各自的实例3047-2附属于哪个视图。In some embodiments, a respective instance 3047 - 2 of gesture recognizer 3040 includes event recognizer state 334 . As discussed above, in some embodiments event recognizer state 334 includes recognizer metadata and properties 3043 and event/touch metadata 3045 . In some embodiments, the event recognizer state 334 also includes a view hierarchy reference 336 to indicate which view the respective instance 3047-2 of the gesture recognizer 3040-2 is attached to.
在一些实施例中,识别器元数据和特性3043包括以下或者其子集或超集:In some embodiments, identifier metadata and properties 3043 include the following or a subset or superset thereof:
·排他标志324;Exclusive flag 324;
·排他例外列表326;Exclusive exception list 326;
·等待列表327;· waiting list 327;
·延迟触摸开始标志328;Delayed touch start flag 328;
·延迟触摸结束标志330;以及Delayed touch end flag 330; and
·触摸取消标志332。• Touch the Cancel icon 332 .
在一些实施例中,一个或多个事件识别器可以被适于延迟子事件序列中的一个或多个子事件的传送直到事件识别器识别事件之后。这种行为反映了延迟的事件。例如,考虑视图中的单敲姿态,对于其多次轻敲姿态也是可能的。在这种情况下,轻敲事件变成“轻敲+延迟”识别器。实质上,当事件识别器实现这种行为时,事件识别器将延迟事件识别,直到它确认子事件序列事实上确实对应于其事件定义。当接收视图不能适当地响应于取消的事件时,这种行为可能是适合的。在一些实施例中,事件识别器将延迟更新其事件识别状态到其各自的有效涉及的视图,直到事件识别器确认子事件序列不对应于其事件定义。提供延迟触摸开始标志328、延迟触摸结束标志330、以及触摸取消标志332,以使子事件传送技术以及事件识别器和视图状态信息更新适合于具体需要。In some embodiments, one or more event recognizers may be adapted to delay transmission of one or more sub-events in the sequence of sub-events until after the event recognizer recognizes the event. This behavior reflects delayed events. For example, consider a single tap gesture in a view, for which multiple tap gestures are also possible. In this case, the tap event becomes a "tap+delay" recognizer. Essentially, when an event recognizer implements this behavior, the event recognizer will delay event recognition until it confirms that the sequence of subevents does in fact correspond to its event definition. This behavior may be appropriate when the receiving view cannot respond appropriately to canceled events. In some embodiments, an event recognizer will delay updating its event recognition state to its respective effectively involved view until the event recognizer confirms that the sequence of sub-events does not correspond to its event definition. A delayed touch start flag 328, a delayed touch end flag 330, and a touch cancel flag 332 are provided to tailor sub-event delivery techniques and event recognizers and view state information updates to specific needs.
在一些实施例中,识别器元数据和特性3043包括以下或者其子集或超集:In some embodiments, identifier metadata and properties 3043 include the following or a subset or superset thereof:
·状态机状态/阶段3038,其对于各自的事件识别器实例(例如,3047-2)指示状态机(例如340)的状态;状态机状态/阶段3038可以具有各种状态值,诸如“事件可能”、“事件识别出”、“事件失败”以及其他,如下所述;替代地或附加地,状态机状态/阶段3038可以具有各种阶段值,诸如“触摸阶段开始”可以指示触摸数据结构定义了先前的触摸数据结构还没有参考过的新的触摸;“触摸阶段移动”值可以指示正在被定义的触摸从先前的位置已经进行了移动;“触摸阶段静止”值可以指示触摸已经停留在相同的位置;“触摸阶段结束”值可以指示触摸已经结束(例如,用户已经从多点触摸显示器的表面抬离他/她的手指);“触摸阶段取消”值可以指示该触摸已经被该设备取消;取消的触摸可以是不必由用户结束而是设备已经确定要忽略的触摸;例如,设备可以确定该触摸是无心产生的(即,作为将便携式多点触摸使能设备放置在某人的口袋里的结果)并因此而忽略该触摸;状态机状态/阶段3038的每个值都可以是一个整数(本文中称为“姿态识别器状态值”);State Machine State/Stage 3038, which indicates the state of the state machine (e.g., 340) for a respective Event Recognizer instance (e.g., 3047-2); State Machine State/Stage 3038 may have various state values, such as "event may ", "Event Recognized", "Event Failed" and others, as described below; alternatively or additionally, the state machine state/phase 3038 may have various phase values, such as "Touch Phase Start" may indicate a touch data structure definition A new touch that has not been referenced by a previous touch data structure; a "touch phase move" value can indicate that the touch being defined has moved from a previous position; a "touch phase rest" value can indicate that a touch has stayed at the same The "touch phase end" value may indicate that the touch has ended (for example, the user has lifted his/her finger from the surface of the multi-touch display); the "touch phase cancel" value may indicate that the touch has been canceled by the device ; a canceled touch may be one that does not have to be terminated by the user, but that the device has determined to ignore; result) and thus ignore the touch; each value of state machine state/stage 3038 may be an integer (referred to herein as a "gesture recognizer state value");
·动作-目标对3051,其中响应于将事件或触摸识别为姿态或姿态的一部分,每个对认定一个目标,各自的事件识别器实例发送认定的动作消息到该目标;Action-target pairs 3051, where each pair identifies a target to which the respective event recognizer instance sends the identified action message in response to recognizing an event or touch as a gesture or part of a gesture;
·代表3053,当一个代表被分配给各自的事件识别器实例时,该代表是到对应代表的参考;当一个代表不被分配给各自的事件识别器实例时,代表346包含空值;以及Representation 3053, which is a reference to a corresponding representative when a representative is assigned to the respective event recognizer instance; representative 346 which contains a null value when a representative is not assigned to the respective event recognizer instance; and
·启用特性3055,其指示各自的事件识别器实例是否启用;在一些实施例中,当各自的事件识别器实例没有启用(例如,禁用)时,各自的事件识别器实例不处理事件或触摸。• Enabled property 3055, which indicates whether the respective event recognizer instance is enabled; in some embodiments, when the respective event recognizer instance is not enabled (eg, disabled), the respective event recognizer instance does not process events or touches.
在一些实施例中,例外列表326还可以由非排他事件识别器使用。特别是,当非排他事件识别器识别事件或子事件时,随后的事件和/或子事件不被传送到与当前活动视图相关联的排他事件识别器,在曾识别出该事件或子事件的事件识别器的例外列表326中所列出的那些排他事件识别器除外。In some embodiments, exception list 326 may also be used by non-exclusive event recognizers. In particular, when an event or sub-event is recognized by a non-exclusive event recognizer, subsequent events and/or sub-events are not passed to the exclusive event recognizer associated with the currently active view in which the event or sub-event was previously recognized The exceptions are those exclusive event recognizers listed in the exception list of event recognizers 326 .
在一些实施例中,事件识别器可以被配置成结合延迟触摸结束标志330使用触摸取消标志332,以阻止不想要的事件和/或子事件发送到点击视图。例如,单敲姿态和双敲姿态的前半部分的定义是一样的。一旦单敲事件识别器成功地识别了单敲,不想要的动作就可能发生。如果设置了延迟触摸结束标志,单敲事件识别器被阻止发送子事件到点击视图,直到识别了单敲事件。另外,单敲事件识别器的等待列表可以认定双敲事件识别器,从而阻止单敲事件识别器识别单敲,直到双敲事件识别器已经进入事件不可能状态。等待列表的使用避免了当执行双敲姿态时执行与单敲相关联的动作。作为代替,响应于双敲事件的识别,只有与双敲相关联的动作才将被执行。In some embodiments, the event recognizer may be configured to use the touch cancel flag 332 in conjunction with the delayed touch end flag 330 to prevent unwanted events and/or sub-events from being sent to the click view. For example, the definition of the first half of a single-tap gesture is the same as that of a double-tap gesture. Once a single-knock is successfully identified by the single-knock event recognizer, unwanted actions may occur. If the delayed touch end flag is set, the single tap event recognizer is blocked from sending sub-events to the tap view until a single tap event is recognized. Additionally, the waitlist for the single-knock event recognizer may assert the double-knock event recognizer, thereby preventing the single-knock event recognizer from recognizing a single-knock until the double-knock event recognizer has entered the event impossibility state. The use of a wait list avoids performing actions associated with a single tap when performing a double tap gesture. Instead, only the actions associated with the double-knock will be performed in response to recognition of the double-knock event.
转而具体说到在触摸敏感表面上的用户触摸的形式,如上所述,触摸和用户姿态可以包括不必是瞬间的动作,例如,触摸可以包括在一段时间内在显示器上移动或保持手指的动作。然而,触摸数据结构定义了在特定时间的触摸的状态(或者,更一般地,任何输入源的状态)。因此,触模数据结构中存储的值可以在单点触摸的过程中改变,使得单点触摸的状态能够在不同的时间点被转送到应用程序。Turning specifically to the form of user touch on a touch-sensitive surface, as described above, touch and user gestures may include actions that are not necessarily instantaneous, for example, touch may include the action of moving or holding a finger on the display over a period of time. However, the touch data structure defines the state of a touch (or, more generally, the state of any input source) at a particular time. Therefore, the value stored in the touch data structure can change during a single touch, so that the state of the single touch can be forwarded to the application at different points in time.
每个触摸数据结构可以包括各种条目。在一些实施例中,触摸数据结构可以包括至少对应于事件/触摸元数据3045中的触摸特定条目的数据,诸如以下或者其子集或超集:Each touch data structure can include various entries. In some embodiments, a touch data structure may include data corresponding to at least a touch-specific entry in event/touch metadata 3045, such as the following or a subset or superset thereof:
·“用于视图的第一触摸”条目345;• "First touch for view" entry 345;
·“每触摸信息”条目3051,包括指示该触摸数据结构相关的特定时间(例如,触摸的时间)的“时间戳”信息;可选地,“每触摸信息”条目3051包括诸如对应触摸的位置的其他信息;以及"Per touch information" entry 3051, including "time stamp" information indicating the specific time (e.g., the time of the touch) that the touch data structure is related to; optionally, the "Per touch information" entry 3051 includes information such as the location of the corresponding touch other information from ; and
·可选“轻敲计数”条目348。• Optional "Tap Count" entry 348 .
因而,每个触摸数据结构可以定义在特定的时间对于各自的触摸(或其他输入源)正在发生什么(例如,该触摸是否静止、正在被移动等等)以及与该触摸相关联的其他信息(比如位置)。相应地,每个触摸数据结构可以定义在特定时刻的特定触摸的状态。参考相同时间的一个或多个触摸数据结构能够加入到可以定义特定视图在某个时刻正在接收的所有触摸的状态的触摸事件数据结构中(如上所述,一些触摸数据结构还可以参考已经结束且不再被接收的触摸)。随时间推移,为了给软件提供描述视图中正在发生的触摸的连续信息,多点触摸事件数据结构可以发送到实现视图的软件。Thus, each touch data structure can define what is happening to the respective touch (or other input source) at a particular time (e.g., whether the touch is stationary, is being moved, etc.) and other information associated with the touch ( such as location). Accordingly, each touch data structure may define the state of a particular touch at a particular moment. One or more touch data structures that reference the same time can be added to a touch event data structure that can define the state of all touches that a particular view is receiving at a certain moment (as mentioned above, some touch data structures can also reference touches that are no longer received). Over time, in order to provide software with continuous information describing the touches that are occurring in the view, the multi-touch event data structure can be sent to the software implementing the view.
处理可选地包括多点触摸姿态的复杂的基于触摸的姿态的能力可以增加各种软件应用程序的复杂性。在一些情况下,这种增加的复杂性对于实现高级的和期望的界面特征可能是必要的。例如,一个游戏可以需要处理在不同视图中发生的多点同时触摸的能力,因为游戏经常需要同时按下多个按钮,或者将加速计数据与触摸敏感表面上的触摸结合。然而,一些更简单的应用程序和/或视图不需要高级的界面特征。例如,一个简单的软按钮(即,触摸敏感显示器上显示的按钮)可以满意地以单点触摸而不是多点触摸功能工作。在这些情况下,下层的OS可以发送不必要的或过多的触摸数据(例如,多点触摸数据)到与旨在仅由单点触摸(例如,在软按钮上的单次触摸或轻敲)进行操作的视图相关联的软件部件。因为软件部件可能需更处理这种数据,所以可能需要表征处理多点触摸的软件应用程序的所有复杂性,即使它关联到的视图仅仅与单点触摸相关。这会增加用于设备的软件开发成本,因为已经传统地易于在鼠标界面环境下(即,各种按钮等等)编程的软件部件在多点触摸环境下可能复杂得多。The ability to handle complex touch-based gestures, optionally including multi-touch gestures, can add complexity to various software applications. In some cases, this added complexity may be necessary to achieve advanced and desired interface features. For example, a game may require the ability to handle multiple simultaneous touches occurring in different views, as games often require pressing multiple buttons simultaneously, or combining accelerometer data with touches on touch-sensitive surfaces. However, some simpler applications and/or views do not require advanced interface features. For example, a simple soft button (ie, a button displayed on a touch-sensitive display) may work satisfactorily with single-touch but not multi-touch functionality. In these cases, the underlying OS may send unnecessary or excessive touch data (e.g., multi-touch data) to the ) The software component associated with the view on which the operation is performed. Because software components may need to process this data, it may be necessary to represent all the complexity of a software application that handles multi-touch even if it is associated with a view that is only relevant to a single touch. This can increase software development costs for the device because software components that have traditionally been easy to program in a mouse interface environment (ie, various buttons, etc.) can be much more complex in a multi-touch environment.
为了降低识别复杂的基于触摸的姿态的复杂性,根据一些实施例,代表可以用于控制事件识别器的行为。如下所述,例如,代表可以确定对应的事件识别器(或姿态识别器)是否可以接收事件(例如,触摸)信息;对应的事件识别器(或姿态识别器)是否可以从状态机的初始状态(例如,事件可能状态)转换到另一个状态;和/或对应的事件识别器(或姿态识别器)是否可以同时地识别事件(例如,触摸)为对应的姿态,而不会阻碍其他事件识别器(或姿态识别器)识别事件或者被识别该事件的其他事件识别器(或姿态识别器)阻碍。To reduce the complexity of recognizing complex touch-based gestures, according to some embodiments, delegates can be used to control the behavior of event recognizers. As described below, for example, a delegate can determine whether a corresponding event recognizer (or gesture recognizer) can receive event (e.g., touch) information; whether a corresponding event recognizer (or gesture recognizer) can (e.g., an event may state) transition to another state; and/or whether the corresponding event recognizer (or gesture recognizer) can simultaneously recognize an event (e.g., a touch) as a corresponding gesture without hindering other event recognition sensor (or gesture recognizer) recognizes the event or is blocked by other event recognizers (or gesture recognizers) that recognize the event.
然而,应当理解,前面关于评估和处理触摸敏感表面上的用户触摸的复杂性的讨论也适用于用以利用输入设备128操作电子设备102的所有形式的用户输入,其中不是所有的用户输入都在触摸屏上开始,例如,协调鼠标移动和鼠标按钮按下与或不与单个或多个键盘按下或保持、设备旋转或其他移动、用户在触摸板上的诸如轻敲、拖拽、滚动等等的移动、触笔输入、口头指示、检测到的眼睛运动、生物计量输入、检测到的用户生理变化、和/或它们的任何组合,它们可以用作对应于定义将要识别的事件的事件和/或子事件的输入。It should be understood, however, that the foregoing discussion regarding the complexities of evaluating and processing user touches on touch-sensitive surfaces also applies to all forms of user input used to operate electronic device 102 with input device 128, not all of which are in the Initiation on a touchscreen, for example, coordinating mouse movements and mouse button presses with or without single or multiple keyboard presses or holds, device rotation or other movement, user actions on a touchpad such as tapping, dragging, scrolling, etc. movement of the stylus, stylus input, verbal indication, detected eye movement, biometric input, detected physiological changes in the user, and/or any combination thereof, which can be used as an event corresponding to the event defining the event to be recognized and/or or the input of sub-events.
转向事件信息流,图3F是例示了根据一些实施例的事件信息流的框图。事件调度器模块315(例如,在操作系统118或应用程序软件124中)接收事件信息,并发送该事件信息到一个或多个应用程序(例如,133-1和133-2)。在一些实施例中,应用程序133-1包括视图层次结构506中的多个视图(例如,对应于图3D中的视图317的508、510和512)以及该多个视图中的多个姿态识别器(516-1到516-3)。应用程序133-1还包括对应于目标-动作对(例如,552-1和552-2)中的目标值的一个或多个姿态处理器550。在一些实施例中,事件调度器模块315从点击视图确定模块314接收点击视图信息,并发送事件信息到点击视图(例如,512)或附属于该点击视图的事件识别器(例如,516-1和516-2)。附加地或替代地,事件调度器模块315从点击级别确定模块352接收点击级别信息,并发送事件信息到该点击级别中的应用程序(例如,133-1和133-2)或该点击级别应用程序中的一个或多个事件识别器(例如,516-4)。在一些实施例中,接收该事件信息的应用程序中的一个是默从的应用程序(例如,133-2可以是默认应用程序)。在一些实施例中,只有在每个接收应用程序中的姿态识别器的子集被允许(或配置成)接收该事件信息。例如,应用程序133-1中的姿态识别器516-3不接收事件信息。接收事件信息的姿态识别器本文中称为接收姿态识别器。在图3F中,接收姿态识别器516-1、516-2和5164接收事件信息,并将接收的事件信息与接收姿态识别器中的各自的姿态定义3037(图3D)比较。在图3F中,姿态识别器516-1和5164具有匹配所接收的事件信息的各自的姿态定义,并发送各自的动作消息(例如,518-1和518-2)到对应的姿态处理器(例如,552-1和552-3)。Turning to event information flow, Figure 3F is a block diagram illustrating event information flow in accordance with some embodiments. Event scheduler module 315 (eg, in operating system 118 or application software 124) receives event information and sends the event information to one or more applications (eg, 133-1 and 133-2). In some embodiments, application 133-1 includes a plurality of views in view hierarchy 506 (e.g., 508, 510, and 512 corresponding to view 317 in FIG. 3D ) and a plurality of gesture recognition in the plurality of views. devices (516-1 to 516-3). Application 133-1 also includes one or more gesture processors 550 corresponding to target values in target-action pairs (eg, 552-1 and 552-2). In some embodiments, the event dispatcher module 315 receives click view information from the click view determination module 314 and sends the event information to the click view (eg, 512) or an event recognizer attached to the click view (eg, 516-1 and 516-2). Additionally or alternatively, the event dispatcher module 315 receives click level information from the click level determination module 352, and sends event information to applications in the click level (for example, 133-1 and 133-2) or the click level application One or more event recognizers (eg, 516-4) in the program. In some embodiments, one of the applications receiving the event information is a silent application (eg, 133-2 may be a default application). In some embodiments, only a subset of the gesture recognizers in each receiving application are enabled (or configured) to receive the event information. For example, gesture recognizer 516-3 in application 133-1 does not receive event information. A gesture recognizer that receives event information is referred to herein as a receiving gesture recognizer. In FIG. 3F, received gesture recognizers 516-1, 516-2, and 5164 receive event information and compare the received event information to respective gesture definitions 3037 (FIG. 3D) in the received gesture recognizers. In FIG. 3F, gesture recognizers 516-1 and 5164 have respective gesture definitions that match received event information, and send respective action messages (e.g., 518-1 and 518-2) to corresponding gesture handlers ( For example, 552-1 and 552-3).
图4A描述了包括四个状态的事件识别器状态机400。通过基于接收子事件管理事件识别器状态机400中的状态转换,事件识别器有效地表达了事件定义。例如,轻敲姿态可以由两个或可选地由三个子事件的序列有效地定义。首先,触摸应该被检测到,并且这将是子事件1。例如,触摸子事件可以是用户的手指触摸包括具有状态机400的事件识别器的视图中的触摸敏感表面。其次是,在触摸没有沿任何给定方向实质移动的情况下(例如,触摸位置的任何移动小于预定的阈值,该阈值可以在显示器上被测量为距离(例如,5mm)或像素数目(例如,5个像素))的可选的测得的延迟将用作子事件2,其中该延迟足够短。最后,触摸的终止(例如,用户的手指抬离触摸敏感表面)将用作子事件3。通过编码事件识别器状态机400以基于正在接收这些子事件而在状态之间转换,事件识别器状态机400有效地表达了轻敲姿态事件定义。然而,应该注意到,图4A中示出的状态是示例性的状态,且事件识别器状态机400可以包含更多或更少的状态,和/或事件识别器状态机400中的每个状态可以对应于示出的状态或者任何其他状态中的一个。FIG. 4A depicts an event recognizer state machine 400 that includes four states. By managing state transitions in the event recognizer state machine 400 based on receiving sub-events, the event recognizer efficiently expresses event definitions. For example, a tap gesture may be effectively defined by a sequence of two or, alternatively, three sub-events. First, the touch should be detected, and this will be subevent 1. For example, a touch sub-event may be a user's finger touching a touch-sensitive surface in a view including an event recognizer with state machine 400 . Second, in the event that the touch does not move substantially in any given direction (e.g., any movement of the touch location is less than a predetermined threshold, which can be measured on the display as a distance (e.g., 5 mm) or as a number of pixels (e.g., An optional measured delay of 5 pixels)) will be used as sub-event 2, where this delay is sufficiently short. Finally, the termination of the touch (eg, the user's finger is lifted off the touch-sensitive surface) will be used as sub-event 3. Event recognizer state machine 400 effectively expresses a tap gesture event definition by coding event recognizer state machine 400 to transition between states based on these sub-events being received. However, it should be noted that the states shown in FIG. 4A are exemplary states, and that event recognizer state machine 400 may contain more or fewer states, and/or each state in event recognizer state machine 400 May correspond to one of the states shown or any other states.
在一些实施例中,不考虑事件类型,事件识别器状态机400在事件识别开始状态405开始,并可以根据接收了什么子事件而进行到任意剩余的状态。为了方便讨论事件识别器状态机400,将讨论从事件识别开始状态405到事件识别出状态415、事件可能状态410和事件不可能状态420的直接路径,接着是对从事件可能状态410引出的路径的描述。In some embodiments, regardless of the event type, the event recognizer state machine 400 begins at the event recognize start state 405 and may proceed to any remaining states depending on what sub-events are received. For the convenience of discussing the event recognizer state machine 400, the direct path from the event recognize start state 405 to the event recognize state 415, the event possible state 410, and the event impossible state 420 will be discussed, followed by the path leading out from the event possible state 410 description of.
从事件识别开始状态405开始,如果接收的子事件自身包含对于事件的事件定义,则事件识别器状态机400将转换到事件识别出状态415。From the Event Recognized Start state 405, the event recognizer state machine 400 will transition to the Event Recognized state 415 if the received sub-event itself contains an event definition for the event.
从事件识别开始状态405开始,如果接收的子事件不是事件定义的第一个子事件,则事件识别器状态机400将转换到事件不可能状态420。From event recognition start state 405, event recognizer state machine 400 will transition to event impossible state 420 if the received sub-event is not the first sub-event defined by the event.
从事件识别开始状态405开始,如果接收的子事件是给定事件定义的第一个子事件而不是最后的子事件,则事件识别器状态机400将转换到事件可能状态410。如果接收的下一个子事件是给定事件定义的第二个子事件而不是最后的子事件,则事件识别器状态机400将保持在事件可能状态410。只要接收的子事件序列继续是事件定义的一部分,事件识别器状态机400就可以保持在事件可能状态410。如果在事件识别器状态机400处于事件可能状态410的任何时刻,事件识别器状态机400接收到不是事件定义的一部分的子事件,那么它将转换到事件不可能状态420,从而确定当前事件(如果有的话)不是对应于这个事件识别器(即,对应于状态400的事件识别器)的事件类型。另一方面,如果事件识别器状态机400处于事件可能状态410,并且事件识别器状态机400接收到事件定义中的最后的子事件,则它将转换到事件识别出状态415,从而完成成功的事件识别。From event recognize start state 405 , event recognizer state machine 400 will transition to event possible state 410 if the received sub-event is the first sub-event defined by a given event rather than the last. Event recognizer state machine 400 will remain in event possible state 410 if the next sub-event received is the second sub-event defined by a given event rather than the last sub-event. Event recognizer state machine 400 may remain in event possible state 410 as long as the received sequence of sub-events continues to be part of the event definition. If at any time while event recognizer state machine 400 is in event possible state 410, event recognizer state machine 400 receives a sub-event that is not part of the event definition, it will transition to event impossible state 420, thereby determining the current event ( if any) is not the event type corresponding to this event recognizer (ie, the event recognizer corresponding to state 400). On the other hand, if the event recognizer state machine 400 is in the event possible state 410, and the event recognizer state machine 400 receives the last sub-event in the event definition, it will transition to the event recognizer state 415, thereby completing a successful Event recognition.
图4B描述了输入源处理过程440的实施例,该实施例具有表示视图如何接收关于各自的输入的信息的有限状态机。应当注意,当设备的触摸敏感表面上存在多个触摸时,触摸中的每个都是具有其自己的有限状态机的单独输入源。在这个实施例中,输入源处理过程440包括四个状态:输入序列开始445、输入序列继续450、输入序列结束455以及输入序列取消460。输入源处理过程440可以由各自的事件识别器使用,例如,当输入将要传送到应用程序时,但是只在检测到输入序列完成之后。输入源处理过程440可以与不能取消或撤销响应于传送到该应用程序的输入序列而做的改变的应用程序一起使用。应该注意到,图4B中示出的状态是示例性状态,输入源处理过程440可以包含更多或更少的状态,和/或输入源处理过程440中的每个状态可以对应于示出的状态或者任何其他状态中的一个。FIG. 4B depicts an embodiment of input source processing 440 with a finite state machine representing how views receive information about respective inputs. It should be noted that when there are multiple touches on the touch-sensitive surface of the device, each of the touches is a separate input source with its own finite state machine. In this embodiment, input source processing 440 includes four states: input sequence start 445 , input sequence continue 450 , input sequence end 455 , and input sequence cancel 460 . Input source processing 440 may be used by respective event recognizers, for example, when input is about to be delivered to the application, but only after completion of the input sequence is detected. Input source processing 440 may be used with applications that cannot undo or undo changes made in response to a sequence of inputs passed to the application. It should be noted that the states shown in FIG. 4B are exemplary states, and that the input source processing 440 may contain more or fewer states, and/or each state in the input source processing 440 may correspond to the illustrated state or any other state.
从输入序列开始445开始,如果接收的输入自己完成一个输入序列,则输入源处理过程440将转换到输入序列结束455。Starting at Input Sequence Begin 445 , Input Source Processing 440 will transition to Input Sequence End 455 if the received input completes an input sequence by itself.
从输入序列开始445开始,如果接收的输入指示输入序列终止,则输入源处理过程440将转换到输入序列取消460。Beginning with input sequence start 445 , input source processing 440 will transition to input sequence cancel 460 if an input received indicates an input sequence termination.
从输入序列开始445开始,如果接收的输入是输入序列中的第一个而不是最后一个输入,那么输入源处理过程440将转换到输入序列继续状态450。如果接收的下一个输入是输入序列中的第二个输入,则输入源处理过程440将保持在输入序列继续状态450。只要正被传送的子事件序列继续是给定输入序列的一部分,输入源处理过程440就可以保持在输入序列继续状态450。如果在输入源处理过程440处于输入序列继续状态450中的任何时刻,且输入源处理过程440接收到不是输入序列的一部分的输入,那么它将转换到输入序列取消状态460。另一方面,如果输入源处理过程440处于输入序列继续450中,且输入源处理过程440接收到给定输入定义中的最后的输入,它将转换到输入序列结束455,从而成功地接收一组子事件。Beginning with input sequence start 445 , if the received input is the first input in the input sequence rather than the last input, input source processing 440 will transition to input sequence continuation state 450 . If the next input received is the second input in the input sequence, the input source processing 440 will remain in the input sequence continuation state 450 . Input source processing 440 may remain in input sequence continuation state 450 as long as the sequence of subevents being passed continues to be part of a given input sequence. If at any time the input source processing 440 is in the input sequence continuation state 450 , and the input source processing 440 receives an input that is not part of the input sequence, it will transition to the input sequence cancel state 460 . On the other hand, if input source processing 440 is in input sequence continuation 450, and input source processing 440 receives the last input in a given input definition, it transitions to input sequence end 455, thus successfully receiving a set of sub event.
在一些实施例中,对于特定视图或程序级别可以实现输入源处理过程440。在该情况下,某些子事件序列可以导致转换到输入取消状态460。In some embodiments, input source processing 440 may be implemented for a particular view or program level. In this case, certain sequences of sub-events may result in a transition to input cancel state 460 .
作为例子,考虑图4C,图4C假设一个有效涉及的视图,该视图仅仅由有效涉及视图输入源处理器480(此后称为“视图480”)表示。视图480包括垂直挥击事件识别器,该事件识别器仅仅由垂直挥击事件识别器468(此后称为“识别器468”)作为其事件识别器之一来表示。在该情况下,识别器468可以需要作为其定义的一部分来检测:1)手指放下465-1;2)可选的短延迟465-2;3)至少N个像素的垂直挥击465-3;以及4)手指抬离465-4。As an example, consider FIG. 4C, which assumes an actively involved view represented only by the actively involved view input source processor 480 (hereinafter "view 480"). View 480 includes vertical swipe event recognizers represented only by vertical swipe event recognizer 468 (hereinafter "recognizer 468") as one of its event recognizers. In this case, the recognizer 468 may need to detect as part of its definition: 1) a finger down 465-1; 2) an optional short delay 465-2; 3) a vertical swipe of at least N pixels 465-3 and 4) finger lift off 465-4.
对于这个例子,识别器468还设置它的延迟触摸开始标志328和触摸取消标志332。现在考虑以下子事件序列到识别器468以及视图480的传送:For this example, recognizer 468 also sets its delayed touch start flag 328 and touch cancel flag 332 . Now consider the delivery of the following sequence of sub-events to recognizer 468 and view 480:
·子事件序列465-1:检测手指放下,该手指放下对应于识别器468的事件定义Sub-Event Sequence 465-1: Detect finger down which corresponds to the event definition for recognizer 468
·子事件序列465-2:测量延迟,该延迟对应于识别器468的事件定义• Sub-Event Sequence 465-2: Measure the delay corresponding to the event definition of the recognizer 468
·子事件序列465-3:手指执行垂直挥击运动,该垂直挥击运动可与垂直滚动兼容,但是少于N个像素,因此并不对应于识别器468的事件定义Sub-Event Sequence 465-3: The finger performs a vertical swipe motion, which is compatible with vertical scrolling, but is less than N pixels and therefore does not correspond to the event definition of recognizer 468
·子事件序列465-4:检测手指抬离,该手指抬离对应于识别器468的事件定义• Sub-Event Sequence 465-4: Detect Finger Lift, which corresponds to the Event Definition for Recognizer 468
在这里,识别器468将成功地识别子事件1和2作为它的事件定义的一部分,相应地,将除在子事件3的传送之前处于事件可能状态472。由于识别器468设置了它的延迟触摸开始标志328,因此初始的触摸子事件不发送到点击视图。相应地,视图480的输入源处理过程440恰在子事件3的传送之前将仍然处于输入序列开始状态。Here, recognizer 468 will successfully recognize sub-events 1 and 2 as part of its event definition and, accordingly, will be in event-possible state 472 except prior to the delivery of sub-event 3. Since the recognizer 468 has its delayed touch start flag 328 set, the initial touch sub-event is not sent to the tap view. Accordingly, the input source handler 440 of the view 480 will remain in the input sequence start state just before the delivery of sub-event 3 .
一旦完成了子事件3到识别器468的传送,识别器468的状态转换到事件可能476,并且重要的是,识别器468现在已经确定子事件序列不对应于它的特定的垂直挥击姿态事件类型(即,它已经决定该事件不是垂直挥击。换句话说,在这个例子中,作为垂直挥击的识别474没有发生)。用于视图输入源处理器480的输入源处理系统440也将更新其状态。在一些实施例中,当事件识别器发送指示已经它已经开始识别事件的状态信息时,视图输入源处理器480的状态将从输入序列开始状态482进行到输入序列继续状态484。当触摸或输入结束且由于已经设置了事件识别器的触摸取消标志322而没有被识别的事件时,视图输入源处理器480进行到输入序列取消状态488。作为替代,如果没有设置事件识别器的触摸取消标志322,则当触摸或输入结束时,视图输入源处理器480进行到输入序列结束状态486。Once the transfer of sub-event 3 to recognizer 468 is complete, the state of recognizer 468 transitions to event possible 476, and importantly, recognizer 468 has now determined that the sequence of sub-events does not correspond to its specific vertical swipe gesture event Type (ie, it has decided that the event is not a vertical swipe. In other words, in this example, recognition 474 as a vertical swipe did not occur). The input source processing system 440 for the view input source processor 480 will also update its state. In some embodiments, the state of view input source processor 480 will proceed from input sequence start state 482 to input sequence continuation state 484 when the event recognizer sends state information indicating that it has begun recognizing events. View input source handler 480 proceeds to input sequence cancel state 488 when a touch or input ends without an event being recognized because the event recognizer's touch cancel flag 322 has been set. Alternatively, if the event recognizer's touch cancel flag 322 is not set, then the view input source handler 480 proceeds to the input sequence end state 486 when the touch or input ends.
由于设置了事件识别器468的触摸取消标志332,所以当事件识别器468转换到事件不可能状态476时,该识别器将发送触摸取消子事件或消息到对应于该事件识别器的点击视图。结果是,视图输入源处理器480将转换到输入序列取消状态488。Since the touch cancel flag 332 of the event recognizer 468 is set, when the event recognizer 468 transitions to the event impossible state 476, the recognizer will send a touch cancel sub-event or message to the click view corresponding to the event recognizer. As a result, view input source handler 480 will transition to input sequence cancel state 488 .
在一些实施例中,子事件465-4的传送与由识别器468做出的事件识别决定没有密切的关系,尽管视图输入源处理器480的其他事件识别器(如果有的话)可以继续分析该子事件序列。In some embodiments, the delivery of sub-event 465-4 is not closely related to the event recognition decision made by recognizer 468, although other event recognizers (if any) of view input source processor 480 may continue to analyze The sequence of subevents.
下面的表格以概括列表的形式给出了与上述的事件识别器468的状态相关的该示例子事件序列465的处理,以及视图输入源处理器480的状态。在该例中,由于设置了识别器468的触摸取消标志332,所以视图输入源处理器480的状态从输入序列开始445进行到输入序列取消488:The table below presents the processing of this example sub-event sequence 465 in relation to the state of the event recognizer 468 described above, and the state of the view input source processor 480 in a summarized list form. In this example, since the touch cancel flag 332 of recognizer 468 is set, the state of the view input source handler 480 proceeds from input sequence start 445 to input sequence cancel 488:
子事件序列465状态:识别器468状态:视图480Subevent Sequence 465 State: Recognizer 468 State: View 480
传送开始前事件识别开始470Event Recognition Begins 470 Before Transmission Begins
检测手指放下465-1事件可能472输入序列开始482Detect finger down 465-1 event possible 472 input sequence start 482
测量延迟465-2事件可能472输入序列继续484measure delay 465-2 event possible 472 input sequence continue 484
检测手指垂直挥击465-3事件不可能476输入序列继续484Detect Finger Swipe Vertically 465-3 Event Impossible 476 Input Sequence Continue 484
检测手指抬离465-4事件不可能476输入序列取消488Detect Finger Lift 465-4 Event Impossible 476 Input Sequence Canceled 488
转到图5A,注意力转到子事件序列520的例子,子事件序列520被包括多个事件识别器的视图接收。对于这个例子,在图5A中示出了两个事件识别器,即滚动事件识别器580和轻敲事件识别器590。出于例示的目的,图3A中的视图搜索结果面板304将与子事件序列520的接收相关,并且滚动事件识别器580和轻敲事件识别器590中的状态发生转换。注意到在该例中,子事件序列520定义了在触摸敏感显示器或轨迹板上的轻敲手指姿态,但是同样的事件识别技术可以适用于大量的上下文(例如,检测鼠标按钮按下)中和/或使用程序级别的程序层次结构的实施例中。Turning to FIG. 5A , attention turns to an example of a sequence of sub-events 520 received by a view that includes multiple event recognizers. For this example, two event recognizers are shown in FIG. 5A , scroll event recognizer 580 and tap event recognizer 590 . For purposes of illustration, view search results panel 304 in FIG. 3A will be associated with receipt of sub-event sequence 520 and state transitions in scroll event recognizer 580 and tap event recognizer 590 . Note that in this example, the sequence of sub-events 520 defines a finger-tapping gesture on a touch-sensitive display or trackpad, but the same event recognition techniques can be applied in a wide variety of contexts (e.g., detecting mouse button presses) and and/or in an embodiment using a program hierarchy at the program level.
在第一个子事件传送到视图搜索结果面板304之前,事件识别器580和590分别处于事件识别开始状态582和592。接着触摸301作为检测手指放下子事件521-1被传送到用于视图搜索结果面板304的有效涉及的事件识别器作为触摸子事件301-2(以及传送到用于地图视图305的有效涉及的事件识别器作为触摸子事件301-3),滚动事件识别器580转换到事件可能状态584,类似地,轻敲事件识别器590转换到事件可能状态594。这是因为轻敲和滚动的事件定义都是以触摸(例如,在触摸敏感表面上检测手指放下)开始的。Before the first sub-event is passed to view search results panel 304, event recognizers 580 and 590 are in event recognize start states 582 and 592, respectively. Then the touch 301 is passed to the active involved event recognizer for the view search results panel 304 as the touch sub-event 301-2 (and to the active involved event for the map view 305) as a detect finger down sub-event 521-1 recognizer as touch sub-event 301-3), scroll event recognizer 580 transitions to event possible state 584, and tap event recognizer 590 transitions to event possible state 594 similarly. This is because the event definitions for both taps and scrolls begin with a touch (eg, detecting a finger down on a touch-sensitive surface).
轻敲和滚动姿态的一些定义可能可选地包括在初始触摸和在事件定义中的任何下一步之间的延迟。在此讨论的所有例子中,用于轻敲和滚动姿态二者的示例事件定义识别第一触摸子事件(检测手指放下)之后的延迟子事件。Some definitions of tap and scroll gestures may optionally include a delay between the initial touch and any next step in the event definition. In all examples discussed here, the example events for both tap and scroll gestures define a delayed sub-event after the first touch sub-event (detection of finger down) is recognized.
相应地,当测量延迟子事件521-2传送到事件识别器580和590时,二者分别保持在事件可能状态584和594。Accordingly, when measured delay sub-event 521-2 is passed to event recognizers 580 and 590, both remain in event possible states 584 and 594, respectively.
最后,检测手指抬离子事件521-3传送到事件识别器580和590。在该情况下,用于事件识别器580和590的状态转换是不同的,因为用于轻敲和滚动的事件定义不同。在滚动事件识别器580的情况下,保持在事件可能状态中的下一个子事件将是检测移动。然而,由于传送的子事件是检测手指抬离521-3,所以滚动事件识别器580转换到事件不可能状态588。而轻敲事件定义以手指抬离子事件结束。因此,在传送检测手指抬离子事件521-3之后,轻敲事件识别器590转换到事件识别出状态596。Finally, the detected finger lift event 521 - 3 is passed to event recognizers 580 and 590 . In this case, the state transitions for event recognizers 580 and 590 are different because the event definitions for taps and scrolls are different. In the case of the scroll event recognizer 580, the next sub-event to remain in the event possible state would be to detect movement. However, scroll event recognizer 580 transitions to event impossible state 588 because the sub-event passed was detection of finger lift 521 - 3 . The tap event definition ends with a finger lift event. Accordingly, tap event recognizer 590 transitions to event recognized state 596 after transmitting detect finger lift event 521 - 3 .
注意,在一些实施例中,正如上面关于图4B和4C讨论的,图4B中讨论的输入源处理过程440可出于各种目的而用在视图级别处。下面的表格以概括列表的形式给出事件识别器580、590相关的子事件序列520的传送以及输入源处理过程440:Note that in some embodiments, the input source processing 440 discussed in FIG. 4B may be used at the view level for various purposes, as discussed above with respect to FIGS. 4B and 4C. The following table presents the delivery of sub-event sequences 520 associated with event recognizers 580, 590 and input source processing 440 in a summarized list:
转到图5B,注意力转到另一个示例子事件序列530,子事件序列530被包括多个事件识别器的视图接收。对于这个例子,在图5B中示出了两个事件识别器,即滚动事件识别器580和轻敲事件识别器590。出于例示的目的,图3A中的视图搜索结果面板304将与子事件序列530的接收相关,并且滚动事件识别器580和轻敲事件识别器590的状态发生转换。注意到在该例中,子事件序列530定义了在触摸敏感显示器上的滚动手指姿态,但是同样的事件定义技术可以适用于大量的上下文(例如,检测鼠标按钮按下、鼠标移动和鼠标按钮释放)中和/或使用程序级别的程序层次结构的实施例中。Turning to FIG. 5B , attention turns to another example sequence of sub-events 530 received by a view that includes multiple event recognizers. For this example, two event recognizers, a scroll event recognizer 580 and a tap event recognizer 590, are shown in FIG. 5B. For purposes of illustration, view search results panel 304 in FIG. 3A will be associated with receipt of sub-event sequence 530 and state transition of scroll event recognizer 580 and tap event recognizer 590 . Note that in this example, subevent sequence 530 defines a scrolling finger gesture on a touch-sensitive display, but the same event definition technique can be applied to a wide variety of contexts (e.g., detecting mouse button presses, mouse movements, and mouse button releases) ) and/or in embodiments using a program-level program hierarchy.
在第一个子事件传送到用于视图搜索结果面板304的有效涉及的事件识别器之前,事件识别器580和590分别处于事件识别开始状态582和592。接着对应于触摸301的子事件的发送(如上面讨论的),滚动事件识别器580转换到事件可能状态584,类似地,轻敲事件识别器590转换到事件可能状态594。Before the first sub-event is passed to the active involved event recognizer for view search results panel 304, event recognizers 580 and 590 are in event recognition start states 582 and 592, respectively. Then corresponding to the sending of the sub-event of touch 301 (as discussed above), scroll event recognizer 580 transitions to event possible state 584 and similarly, tap event recognizer 590 transitions to event possible state 594 .
当测量延迟子事件531-2传送到事件识别器580和590时,二者分别转换到事件可能状态584和594。When measured delay sub-event 531-2 is passed to event recognizers 580 and 590, both transition to event possible states 584 and 594, respectively.
接下来,检测手指移动子事件531-3传送到事件识别器580和590。在该情况下,用于事件识别器580和590的状态转换是不同的,因为用于轻敲和滚动的事件定义不同。在滚动事件识别器580的情况下,保持在事件可能状态中的下一个子事件是检测移动,所以当滚动事件识别器580接收到检测手指移动子事件531-3时滚动事件识别器580保持在事件可能状态584中。然而,如上面讨论的,用于轻敲的定义以手指抬离子事件结束,所以轻敲事件识别器590转换到事件不可能状态598。Next, the detected finger movement sub-event 531 - 3 is passed to event recognizers 580 and 590 . In this case, the state transitions for event recognizers 580 and 590 are different because the event definitions for taps and scrolls are different. In the case of scroll event recognizer 580, the next sub-event to remain in the event-possible state is detect movement, so scroll event recognizer 580 remains in The event may be in state 584. However, as discussed above, the definition for a tap ends with a finger lift event, so tap event recognizer 590 transitions to event impossible state 598 .
最后,检测手指抬离子事件531-4传送到事件识别器580和590。轻敲事件识别器已经处于事件不可能状态598,故而没有状态转换发生。滚动事件识别器580的事件定义以检测手指抬离结束。由于传送的子事件是检测手指抬离531-4,所以滚动事件识别器580转换到事件识别出状态586。注意到触摸敏感表面上的手指移动可能产生多个移动子事件,因此滚动可能在抬离前被识别出来或者继续识别直到抬离。Finally, the detected finger lift event 531 - 4 is passed to event recognizers 580 and 590 . The tap event recognizer is already in event impossible state 598, so no state transition occurs. The event definition of the scroll event recognizer 580 ends with detection of finger lift. Scroll event recognizer 580 transitions to event recognized state 586 since the sub-event passed was detection of finger lift 531 - 4 . Note that finger movement on a touch-sensitive surface may generate multiple movement sub-events, so scrolling may be recognized before lift-off or continue to be recognized until lift-off.
下面的表格以概括列表的形式给出与事件识别器580、590相关的子事件序列530的传送以及输入源处理过程440:The following table presents the delivery of sub-event sequences 530 and input source processing 440 in relation to event recognizers 580, 590 in summarized list form:
转到图5C,注意力转到又一个示例子事件序列540,子事件序列540正被包括多个事件识别器的视图接收。对于这个例子,在图5C中示出了两个事件识别器,即双敲事件识别器570和轻敲事件识别器590。出于例示的目的,图3A中的地图视图305将与子事件序列540的接收相关,并且双敲事件识别器570和轻敲事件识别器590中的状态发生转换。注意到在该例中,子事件序列540定义了在触摸敏感显示器上的双敲姿态,但是同样的事件识别技术可以适用于大量的上下文(例如,检测鼠标双击)中和/或使用程序级别的程序层次结构的实施例中。Turning to FIG. 5C , attention turns to yet another example sequence of sub-events 540 being received by a view that includes multiple event recognizers. For this example, two event recognizers, double tap event recognizer 570 and tap event recognizer 590 are shown in FIG. 5C . For purposes of illustration, map view 305 in FIG. 3A will be associated with receipt of sub-event sequence 540 and state transitions in double tap event recognizer 570 and tap event recognizer 590 . Note that in this example, subevent sequence 540 defines a double-tap gesture on a touch-sensitive display, but the same event recognition technique can be applied in a wide variety of contexts (e.g., detecting a mouse double-click) and/or using program-level Example of program hierarchy.
在第一个子事件传送到用于地图视图305的有效涉及的事件识别器之前,事件识别器570和590分别处于事件识别开始状态572和592。接着将与触摸子事件301相关的子事件传送到地图视图304(如上所述),双敲事件识别器570和轻敲事件识别器590分别转换到事件可能状态574和594。这是因为轻敲和双敲的事件定义都是以触摸(例如,在触摸敏感表面上检测手指放下541-1)开始的。Before the first sub-event is passed to the active involved event recognizer for map view 305, event recognizers 570 and 590 are in event recognition start states 572 and 592, respectively. Sub-events associated with touch sub-event 301 are then passed to map view 304 (as described above), and double tap event recognizer 570 and tap event recognizer 590 transition to event possible states 574 and 594, respectively. This is because both tap and double tap event definitions begin with a touch (eg, detection of finger down 541-1 on a touch sensitive surface).
当测量延迟子事件541-2传送到事件识别器570和590时,二者分别转换到事件可能状态574和594。When measured delay sub-event 541-2 is passed to event recognizers 570 and 590, both transition to event possible states 574 and 594, respectively.
接下来,检测手指抬离子事件541-3传送到事件识别器570和590。在该情况下,事件识别器580和590的状态转换是不同的,因为用于轻敲和双敲的示例性事件定义不同。在轻敲事件识别器590的情况下,事件定义中的最后一个子事件是要检测手指抬离,所以轻敲事件识别器590转换到事件识别出状态596。Next, a detected finger lift event 541 - 3 is passed to event recognizers 570 and 590 . In this case, the state transitions of event recognizers 580 and 590 are different because the exemplary event definitions for taps and double taps are different. In the case of tap event recognizer 590 , the last sub-event in the event definition is to detect finger lift, so tap event recognizer 590 transitions to event recognized state 596 .
然而,无论用户最终可能做什么,由于已经开始了一个延迟,所以双敲事件识别器570保持在事件可能状态574。不过用于双敲的完整事件识别定义需要另一个延迟,其后跟着完整的轻敲子事件序列。这造成了已经处于事件识别出状态576的轻敲事件识别器590与仍处于事件可能状态574的双敲事件识别器570之间的模糊情况。However, no matter what the user may eventually do, since a delay has been initiated, the double tap event recognizer 570 remains in the event possible state 574. However, the full event recognition definition for a double tap requires another delay followed by the full sequence of tap sub-events. This creates an ambiguity between the tap event recognizer 590 that is already in the event recognized state 576 and the double tap event recognizer 570 that is still in the event possible state 574 .
相应地,在一些实施例中,正如上面关于图3B和3C讨论的,事件识别器可以实现排他标志以及排他例外列表。这里,将设置用于轻敲事件识别器590的排他标志324,另外,将用于轻敲事件识别器590的排他例外列表326配置成在轻敲事件识别器590进入事件识别出状态596之后继续允许子事件传送到一些事件识别器(例如,双敲事件识别器570)。Accordingly, in some embodiments, the event recognizer may implement an exclusive flag and an exclusive exception list, as discussed above with respect to FIGS. 3B and 3C. Here, the exclusive flag 324 for the tap event recognizer 590 will be set, and in addition, the exclusive exception list 326 for the tap event recognizer 590 will be configured to continue after the tap event recognizer 590 enters the event recognition state 596 Allows sub-events to be passed to some event recognizers (eg, double-knock event recognizer 570).
当轻敲事件识别器590保持在事件识别出状态596时,子事件序列540继续传送到双敲事件识别器570,其中测量延迟子事件541-4、检测手指放下子事件541-5和测量延迟子事件541-6保持双敲事件识别器570处于事件可能状态574;序列540的最后子事件即检测手指抬离541-7的传送将双敲事件识别器570转换到事件识别出状态576。When the tap event recognizer 590 remains in the event recognized state 596, the sequence of sub-events 540 continues to the double-tap event recognizer 570 with the measurement delay sub-event 541-4, the detection finger down sub-event 541-5, and the measurement delay Sub-event 541-6 keeps double-tap event recognizer 570 in event-possible state 574; the final sub-event of sequence 540, transmission of detected finger-off 541-7 transitions double-tap event recognizer 570 to event-recognized state 576.
此时,地图视图305获取由事件识别器570识别的双敲事件,而不是轻敲事件识别器590识别的单敲事件。根据被设置的轻敲事件识别器590的排他标志324、轻敲事件识别器590的包括双敲事件的排他例外列表326、以及轻敲事件识别器590和双敲事件识别器570两者都成功地识别了其各自的事件类型的事实,作出了该获取双敲事件的决定。At this point, the map view 305 captures the double tap event recognized by the event recognizer 570 instead of the single tap event recognized by the tap event recognizer 590 . According to the exclusive flag 324 of the tap event recognizer 590 being set, the exclusive exception list 326 of the tap event recognizer 590 including the double tap event, and both the tap event recognizer 590 and the double tap event recognizer 570 succeed The decision to get the double-knock event was made based on the fact that it correctly identified its respective event type.
下面的表格以概括列表的形式给出与事件识别器570和590相关的子事件序列540的传送以及子事件处理过程440:The following table presents the delivery of the sub-event sequence 540 and the sub-event handling process 440 in relation to the event recognizers 570 and 590 in the form of a summary list:
在另一个实施例中,在图5C的事件场景中,单敲姿态没有被识别,因为单敲事件识别器具有认定双敲事件识别器的等待列表。结果是,单敲姿态不会被识别直到(如果可能出现)双敲事件识别器进入事件不可能状态。在该例中,识别了双敲姿态,单敲事件识别器将继续处于事件可能状态直到识别出双敲姿态,此时单敲事件识别器将转换到事件不可能状态。In another embodiment, in the event scenario of FIG. 5C , the single tap gesture is not recognized because the single tap event recognizer has a waiting list for the double tap event recognizer. As a result, the single tap gesture will not be recognized until (if possible) the double tap event recognizer enters the event impossible state. In this example, a double tap gesture is recognized, and the single tap event recognizer will continue to be in the event possible state until the double tap gesture is recognized, at which point the single tap event recognizer will transition to the event impossible state.
现在关注图6A和6B,图6A和6B是例示了根据一些实施例的事件识别方法的流程图。该方法600在电子设备中执行,如上面讨论的,在一些实施例中,该电子设备可以是电子设备102。在一些实施例中,该电子设备可以包括配置成检测多点触摸姿态的触摸敏感表面。作为替代,该电子设备可以包括配置成检测多点触摸姿态的触摸屏。Attention is now directed to FIGS. 6A and 6B , which are flowcharts illustrating a method of event identification according to some embodiments. The method 600 is performed in an electronic device, which may be the electronic device 102 in some embodiments, as discussed above. In some embodiments, the electronic device may include a touch-sensitive surface configured to detect multi-touch gestures. Alternatively, the electronic device may include a touch screen configured to detect multi-touch gestures.
方法600配置成执行包括具有多个视图的视图层次结构的软件。方法600显示608视图层次结构中的一个或多个视图,并执行610一个或多个软件元素。每个软件元素与一个特定视图相关联,每个特定视图包括一个或多个事件识别器,诸如那些分别在图3B和3C中描述为事件识别器结构320和360的事件识别器。Method 600 is configured to execute software including a view hierarchy having a plurality of views. Method 600 displays 608 one or more views in the view hierarchy and executes 610 one or more software elements. Each software element is associated with a particular view, and each particular view includes one or more event recognizers, such as those depicted as event recognizer structures 320 and 360 in FIGS. 3B and 3C , respectively.
每个事件识别器一般包括基于一个或多个子事件的事件定义,其中事件定义可以作为状态机实现,例如参见图3B中的状态机340。事件识别器一般还包括事件处理器,其中事件处理器指定对目标的动作,并被配置成响应于事件识别器检测到与事件定义对应的事件而发送动作到目标。Each event recognizer generally includes an event definition based on one or more sub-events, where the event definition can be implemented as a state machine, see, for example, state machine 340 in FIG. 3B . The event recognizer generally also includes an event handler, wherein the event handler specifies an action on the target and is configured to send the action to the target in response to the event recognizer detecting an event corresponding to the event definition.
在一些实施例中,如图6A的步骤612所指示的,多个事件识别器中的至少一个是具有姿态定义和姿态处理器的姿态识别器。In some embodiments, at least one of the plurality of event recognizers is a gesture recognizer having a gesture definition and a gesture handler, as indicated at step 612 of FIG. 6A .
在一些实施例中,如图6A的步骤614所指示的,事件定义定义了用户姿态。In some embodiments, an event definition defines a user gesture, as indicated at step 614 of Figure 6A.
作为替代,事件识别器具有一组事件识别状态616。这些事件识别状态可以至少包括事件可能状态、事件不可能状态和事件识别出状态。Instead, the event recognizer has a set of event recognition states 616 . These event recognition states may at least include an event possible state, an event impossible state and an event recognized state.
在一些实施例中,如果事件识别器进入事件可能状态,则事件处理器开始其用于传送到目标的对应动作的准备618。正如上面关于图4A和图5A-5C中的例子所讨论的,为每个事件识别器实现的状态机一般包括初始状态,例如,事件识别开始状态405。接收形成事件定义的初始部分的子事件触发状态变化到事件可能状态410。相应地,在一些实施例中,随着事件识别器从事件识别开始状态405转换到事件可能状态410,事件识别器的事件处理器可以在事件被成功地识别出之后开始准备它的特定动作用以传送到事件识别器的目标。In some embodiments, if the event recognizer enters the event possible state, the event handler begins its preparation 618 for delivery of the corresponding action to the target. As discussed above with respect to the examples in FIGS. 4A and 5A-5C , the state machine implemented for each event recognizer generally includes an initial state, eg, event recognition start state 405 . Receiving a sub-event forming an initial part of the event definition triggers a state change to the event-possible state 410 . Accordingly, in some embodiments, as the event recognizer transitions from the event recognizer start state 405 to the event possible state 410, the event handler of the event recognizer may begin preparing its specific action after the event is successfully recognized. to pass to the target of the event recognizer.
另一方面,在一些实施例中,如果事件识别器进入事件不可能状态420,则事件处理器可以终止其对应动作的准备620。在一些实施例中,终止对应的动作包括取消该事件处理器的对应动作的任何准备。On the other hand, in some embodiments, if the event recognizer enters the event impossible state 420, the event handler may terminate the preparation 620 of its corresponding action. In some embodiments, terminating the corresponding action includes canceling any preparations for the event handler's corresponding action.
图5B的例子为该实施例提供了信息,因为轻敲事件识别器590可能已经开始了对其动作的准备618,但是然后,一旦检测手指移动子事件531-3传送到轻敲事件识别器590,识别器590就将转换到事件不可能状态598、578。此时,轻敲事件识别器590可以终止对已经开始准备618的动作的准备620。The example of FIG. 5B provides information for this embodiment, because tap event recognizer 590 may have started preparation 618 for its action, but then, upon detection of finger movement sub-event 531-3 is passed to tap event recognizer 590 , the recognizer 590 will transition to the event impossible state 598,578. At this point, the tap event recognizer 590 may terminate the preparation 620 for the action that the preparation 618 has begun.
在一些实施例中,如果事件识别器进入事件识别出状态,那么事件处理器完成其用于传送到目标的对应动作的准备622。图5C的例子例示了该实施例,因为用于地图视图305的由有效涉及的事件识别器识别了双敲,在一些实施例中,这将是绑定到选择和/或执行由地图视图305示出的搜索结果的事件。这里,在双敲事件识别器570成功地识别出由子事件序列540构成的双敲事件之后,地图视图305的事件处理器完成对其动作的准备622,即指示它已经接收到了激活命令。In some embodiments, if the event recognizer enters the event recognized state, the event handler finishes preparing 622 its corresponding action for delivery to the target. The example of FIG. 5C illustrates this embodiment, because the event recognizer for the map view 305 is effectively involved in identifying a double tap, which in some embodiments will be bound to the selection and/or execution by the map view 305 Events showing search results. Here, after the double-knock event recognizer 570 successfully recognizes the double-knock event composed of the sequence of sub-events 540, the event handler of the map view 305 completes preparation 622 for its action, indicating that it has received an activation command.
在一些实施例中,事件处理器传送624其对应动作到与事件识别器相关联的目标。继续图5C的例子,准备的动作,即地图视图305的激活命令,将传送到与地图视图305相关联的特定目标,该特定目标可以是任何适合的程序方法或对象。In some embodiments, the event handler communicates 624 its corresponding action to the target associated with the event recognizer. Continuing with the example of FIG. 5C , the prepared action, ie, the activation command of the map view 305 , would be communicated to a specific target associated with the map view 305 , which could be any suitable program method or object.
作为替代,多个事件识别器可以并行地独立地处理626一个或多个子事件的序列。Alternatively, multiple event recognizers may independently process 626 the sequence of one or more sub-events in parallel.
在一些实施例中,一个或多个事件识别器可以被配置为排他事件识别器628,正如上面关于图3B和3C分别讨论的排他标志324和364。当事件识别器被配置为排他事件识别器时,事件传送系统阻止视图层次结构中用于有效涉及的视图的任何其他事件识别器(除了那些在识别该事件的事件识别器的例外列表326、366中列出的)在排他事件识别器识别出事件之后接收(同一子事件序列的)随后的子事件。进一步地,当非排他事件识别器识别出事件时,事件传送系统阻止视图层次结构中用于有效涉及的视图的任何排他事件识别器接收随后的子事件,那些(如果有的话)在识别该事件的事件识别器的例外列表326、366中列出的除外。In some embodiments, one or more event recognizers may be configured as exclusive event recognizers 628, as with exclusive flags 324 and 364 discussed above with respect to FIGS. 3B and 3C, respectively. When an event recognizer is configured as an exclusive event recognizer, the event delivery system blocks any other event recognizers in the view hierarchy for actively involved views (except those in the exception list 326, 366 of event recognizers that recognize the event Listed in ) receive subsequent sub-events (of the same sub-event sequence) after the event is recognized by the exclusive event recognizer. Further, when an event is recognized by a non-exclusive event recognizer, the event delivery system prevents any exclusive event recognizers in the view hierarchy for actively involved views from receiving subsequent sub-events, those (if any) that recognized the event Except those listed in the event recognizer's exception list 326, 366 for the event.
在一些实施例中,排他事件识别器可以包括630事件例外列表,正如上面关于图3B和3C分别讨论的排他例外列表326和366。注意如图5C的上述讨论,事件识别器的排他例外列表可以用于即使当构成其各自事件定义的子事件序列交叠时,也允许事件识别器继续进行事件识别。相应地,在一些实施例中,事件例外列表包括其对应的事件定义具有重复的子事件的事件632,例如图5C的单敲/双敲事件示例。In some embodiments, the exclusive event recognizer may include 630 an event exception list, such as the exclusive exception lists 326 and 366 discussed above with respect to FIGS. 3B and 3C , respectively. Note that as discussed above in Figure 5C, an event recognizer's exclusive exception list can be used to allow event recognizers to proceed with event recognition even when the sequences of sub-events that make up their respective event definitions overlap. Accordingly, in some embodiments, the event exception list includes events 632 whose corresponding event definitions have repeated sub-events, such as the single-knock/double-knock event example of FIG. 5C .
作为替代,事件定义可以定义用户输入操作634。Alternatively, an event definition may define a user input operation 634 .
在一些实施例中,一个或多个事件识别器可以适用于延迟子事件序列中的每个子事件的传送直到事件被识别之后。In some embodiments, the one or more event recognizers may be adapted to delay transmission of each sub-event in the sequence of sub-events until after the event is recognized.
方法600检测636一个或多个子事件的序列,在一些实施例中,一个或多个子事件的序列可以包括本原(primitive)触摸事件638。本原触摸事件可以包括但不限于触摸敏感表面上基于触摸的姿态的基本部件,例如与初始的手指或触笔触摸放下相关的数据、与多指或触笔开始跨触摸敏感表面移动相关的数据、双指反向移动、从触摸敏感表面抬离触笔,等等。Method 600 detects 636 a sequence of one or more sub-events, which in some embodiments may include a primitive touch event 638 . Primitive touch events may include, but are not limited to, the basic components of a touch-based gesture on a touch-sensitive surface, such as data associated with an initial finger or stylus touchdown, data associated with multiple fingers or stylus beginning to move across a touch-sensitive surface , move two fingers in reverse, lift the stylus off the touch-sensitive surface, and so on.
一个或多个子事件的序列中的子事件可以包括多种形式,包括但不限于,键按下、键按下保持、键释放、按钮按下、按钮按下保持、按钮按下释放、操纵杆移动、鼠标移动、鼠标按钮按下、鼠标按钮释放、触笔触摸、触笔移动、触笔释放、口头指示、检测到的眼睛运动、生物计量输入、检测到的用户生理变化以及其他。A sub-event in a sequence of one or more sub-events can include a variety of forms, including but not limited to, key down, key down and hold, key release, button down, button down and hold, button down and release, joystick Movement, mouse movement, mouse button press, mouse button release, stylus touch, stylus move, stylus release, verbal pointers, detected eye movements, biometric input, detected physiological changes in the user, and others.
方法600认定640视图层次结构的视图中的一个作为点击视图。点击视图确立视图层次结构中的哪些视图是有效涉及的视图。图3A中示出了例子,其中有效涉及的视图303包括搜索结果面板304和地图视图305,因为触摸子事件301接触与地图视图305相关联的区域。Method 600 identifies 640 one of the views of the view hierarchy as the clickable view. Clicking on a view establishes which views in the view hierarchy are effectively referenced views. An example is shown in FIG. 3A , where actively involved views 303 include search results panel 304 and map view 305 because touch sub-event 301 contacts an area associated with map view 305 .
在一些实施例中,视图层次结构中的第一有效涉及的视图可以配置成642阻止各自的子事件传送到与第一有效涉及的视图相关联的事件识别器。该行为可以实现上面关于图3B和3C讨论的跳过特性(分别是330和370)。当针对事件识别器设置了跳过特性时,对于与视图层次结构中与其他有效涉及的视图相关联的事件识别器,仍然执行备自的子事件的传送。In some embodiments, the first actively involved view in the view hierarchy may be configured 642 to prevent the respective sub-event from being passed to the event recognizer associated with the first actively involved view. This behavior can implement the skip feature discussed above with respect to Figures 3B and 3C (330 and 370, respectively). When the skip attribute is set for an event recognizer, the delivery of the subevents it prepares for is still performed for event recognizers associated with other actively involved views in the view hierarchy.
作为替代,视图层次结构中的第一有效涉及的视图可以配置成644阻止各自的子事件传送到与第一有效涉及的视图相关联的事件识别器,除非第一有效涉及的视图是点击视图。该行为可以实现上面关于图3B和3C讨论的条件性跳过特性(分别是332和372)。Alternatively, the first actively involved view in the view hierarchy may be configured 644 to prevent the respective sub-event from being passed to the event recognizer associated with the first actively involved view unless the first actively involved view is a click view. This behavior can implement the conditional skip feature discussed above with respect to Figures 3B and 3C (332 and 372, respectively).
在一些实施例中,视图层次结构中的第二有效涉及的视图配置成646阻止各自的子事件传送到与第二有效涉及的视图相关联的事件识别器以及与第二有效涉及的视图的先辈相关联的事件识别器。该行为可以实现上面关于图3B和3C讨论的停止特性(分别是328和368)。In some embodiments, the second actively involved view in the view hierarchy is configured 646 to prevent the respective sub-event from being passed to the event recognizer associated with the second actively involved view and to the ancestors of the second actively involved view The associated event recognizer. This behavior can implement the stopping feature discussed above with respect to Figures 3B and 3C (328 and 368, respectively).
方法600传送648各自的子事件到用于视图层次结构中每个有效涉及的视图的事件识别器。在一些实施例中,用于视图层次结构中有效涉及的视图的事件识别器在处理子事件序列中的下一个子事件之前处理各自的子事件。作为替代,用于视图层次结构中有效涉及的视图的事件识别器在处理各自的子事件时做出它们的子事件识别决定。Method 600 transmits 648 a respective sub-event to an event recognizer for each actively involved view in the view hierarchy. In some embodiments, event recognizers for actively involved views in the view hierarchy process respective sub-events before processing the next sub-event in the sequence of sub-events. Instead, event recognizers for views actively involved in the view hierarchy make their sub-event recognition decisions as they process the respective sub-events.
在一些实施例中,用于视图层次结构中有效涉及的视图的事件识别器可以同时处理一个或多个子事件的序列650;作为替代,用于视图层次结构中有效涉及的视图的事件识别器可以并行地处理一个或多个子事件的序列。In some embodiments, an event recognizer for an actively involved view in the view hierarchy may process the sequence 650 of one or more sub-events concurrently; instead, an event recognizer for an actively involved view in the view hierarchy may Process a sequence of one or more subevents in parallel.
在一些实施例中,一个或多个事件识别器可以被适用于延迟传送652子事件序列的一个或多个子事件直到事件识别器识别出事件之后。该行为反映了延迟的事件。例如,考虑视图中的单敲姿态,对于其多次轻敲姿态也是可能的。在这种情况下,轻敲事件变成“轻敲+延迟”识别器。实质上,当事件识别器实现该行为时,事件识别器将延迟事件识别直到它确认子事件序列事实上确实对应于其事件定义。当接收视图不能适当地响应于取消的事件时该行为可以是适合的。在一些实施例中,事件识别器将延迟更新它的事件识别状态到它的各自的有效涉及的视图,直到事件识别器确认子事件序列不对应于其事件定义。如上面关于图3B和3C讨论的,提供延迟触摸开始标志328、368,延迟触摸结束标志330、370,以及触摸取消标志332、372使子事件传送技术以及事件识别器和视图状态信息更新适合于具体需要。In some embodiments, one or more event recognizers may be adapted to delay delivery 652 of one or more sub-events of a sequence of sub-events until after the event recognizer recognizes the event. This behavior reflects delayed events. For example, consider a single tap gesture in a view, for which multiple tap gestures are also possible. In this case, the tap event becomes a "tap+delay" recognizer. Essentially, when an event recognizer implements this behavior, the event recognizer will delay event recognition until it confirms that the sequence of sub-events does in fact correspond to its event definition. This behavior may be appropriate when the receiving view cannot respond appropriately to canceled events. In some embodiments, an event recognizer will delay updating its event recognition state to its respective view of active references until the event recognizer confirms that the sequence of sub-events does not correspond to its event definition. As discussed above with respect to FIGS. 3B and 3C , providing delayed touch start flags 328 , 368 , delayed touch end flags 330 , 370 , and touch cancel flags 332 , 372 makes sub-event delivery techniques and event recognizers and view state information updates suitable for Specific needs.
图7A-7S例示了根据一些实施例的为了导航通过同时打开的应用程序而由事件识别器识别的示例用户界面和用户输入。这些图中的用户界面用于例示下述过程,包括图8A-8B、图9A-9C以及图10A-10B中的过程。7A-7S illustrate example user interfaces and user inputs recognized by event recognizers for navigating through concurrently open applications, according to some embodiments. The user interfaces in these figures are used to illustrate the processes described below, including those in Figures 8A-8B, Figures 9A-9C, and Figures 10A-10B.
尽管下面的许多例子将参考触摸屏显示器156(其中结合了触摸敏感表面和显示器)上的输入给出,但是在一些实施例中,设备检测独立于显示器的触摸敏感表面(例如,触摸板或轨迹板)上的输入。在一些实施例中,触摸敏感表面的主轴对应于显示器上的主轴。根据这些实施例,设备在对应于显示器上的各自位置的位置处检测与触摸敏感表面的接触。这样,当触摸敏感表面和显示器分开时,由设备在触摸敏感表面上检测到的用户输入由设备用于操纵电子设备的显示器上的用户界面。应该理解,类似的方法可以用于本文描述的其他用户界面。Although many of the examples below will be given with reference to input on touchscreen display 156 (in which a touch-sensitive surface and display are combined), in some embodiments, the device detects a touch-sensitive surface (e.g., a touchpad or trackpad) independently of the display. ) on the input. In some embodiments, the main axis of the touch-sensitive surface corresponds to the main axis on the display. According to these embodiments, the device detects contact with the touch-sensitive surface at locations corresponding to respective locations on the display. In this way, when the touch-sensitive surface and display are separated, user input detected by the device on the touch-sensitive surface is used by the device to manipulate a user interface on the display of the electronic device. It should be understood that similar approaches can be used for other user interfaces described herein.
图7A例示了根据一些实施例的电子设备102上的示例用户界面(“始位画面”708)。类似的用户界面可以在电子设备102上实现。在一些实施例中,始位画面708由应用程序启动器软件应用程序显示,有时称为出发点(springboard)。在一些实施例中,触摸屏156上的用户界面包括以下元素或者其子集或超集:FIG. 7A illustrates an example user interface ("home screen" 708) on electronic device 102 in accordance with some embodiments. A similar user interface can be implemented on electronic device 102 . In some embodiments, the home screen 708 is displayed by an application launcher software application, sometimes referred to as a springboard. In some embodiments, the user interface on touch screen 156 includes the following elements, or a subset or superset thereof:
·无线通信的信号强度指示器702,诸如蜂窝和Wi-Fi信号;· Signal strength indicators 702 for wireless communications, such as cellular and Wi-Fi signals;
·时间704;以及· time 704; and
·电池状态指示器706。• Battery status indicator 706 .
示例的用户界面包括多个应用程序图标5002(例如,5002-25到5002-38)。从始位画面708,手指姿态可以用于启动应用程序。例如,在对应于应用程序图标5002-36的位置处的轻敲手指姿态701开始启动电子邮件应用程序。The example user interface includes a plurality of application icons 5002 (eg, 5002-25 through 5002-38). From the home screen 708, a finger gesture can be used to launch an application. For example, a tap finger gesture 701 at a location corresponding to application icon 5002-36 begins launching an email application.
在图7B,响应于在应用程序图标5002-36上检测到手指姿态701,启动电子邮件应用程序并在触摸屏156上显示电子邮件应用程序视图712-1。用户可以以类似的方式启动其他应用程序。例如,用户可以按下始位按钮710而从任何应用程序视图712返回到始位画面708(图7A),并在始位画面708上的各自的应用程序图标5002上使用手指姿态启动其他应用程序。In FIG. 7B , in response to detecting finger gesture 701 on application icon 5002 - 36 , an email application is launched and email application view 712 - 1 is displayed on touch screen 156 . Users can start other applications in a similar manner. For example, a user may press the home button 710 to return to the home screen 708 (FIG. 7A) from any application view 712 and launch other applications using a finger gesture on the respective application icon 5002 on the home screen 708. .
图7C-7G例示了响应于在与始位画面708上各自的应用程序图标5002相对应的位置处检测到各自的手指姿态而顺序地启动各自的应用程序,以及依次显示各自的用户界面(即,各自的应用程序视图)。特别地,图7C例示了响应于应用程序图标5002-32上的手指姿态,显示媒体库应用程序视图712-2。在图7D中,响应于应用程序图标5002-30上的手指姿态,显示记事本应用程序视图712-3。图7E例示了响应于应用程序图标5002-27上的手指姿态,显示地图应用程序视图712-4。在图7F中,响应于应用程序图标5002-28上的手指姿态,显示天气应用程序视图712-5。图7G例示了响应于应用程序图标5002-37上的手指姿态,显示网页浏览器应用程序视图712-6。在一些实施例中,打开的应用程序的序列对应于电子邮件应用程序、媒体库应用程序、记事本应用程序、地图应用程序、天气应用程序以及网页浏览器应用程序的启动。FIGS. 7C-7G illustrate sequentially launching respective applications and sequentially displaying respective user interfaces (i.e. , respective application views). In particular, FIG. 7C illustrates media library application view 712-2 being displayed in response to a finger gesture on application icon 5002-32. In FIG. 7D, in response to a finger gesture on application icon 5002-30, notepad application view 712-3 is displayed. FIG. 7E illustrates displaying map application view 712-4 in response to a finger gesture on application icon 5002-27. In FIG. 7F, weather application view 712-5 is displayed in response to a finger gesture on application icon 5002-28. FIG. 7G illustrates displaying web browser application view 712-6 in response to a finger gesture on application icon 5002-37. In some embodiments, the sequence of open applications corresponds to the launch of an email application, a media library application, a notepad application, a maps application, a weather application, and a web browser application.
图7G还例示了在用户界面对象(例如,书签图标)上的手指姿态703(例如,轻敲姿态)。在一些实施例中,响应于在书签图标上检测到手指姿态703,网页浏览器应用程序在触摸屏156上显示书签列表。类似地,用户可以用其他姿态(例如,在地址用户界面对象上的轻敲姿态,其允许用户通常使用屏幕上键盘来输入新地址或修改显示的地址;在显示的网页中的任何链接上的轻敲姿态,其开始导航至与所选链接对应的网页;等等)与显示的应用程序(例如,网页浏览器应用程序)交互。FIG. 7G also illustrates a finger gesture 703 (eg, a tap gesture) on a user interface object (eg, a bookmark icon). In some embodiments, in response to detecting the finger gesture 703 on the bookmark icon, the web browser application displays a list of bookmarks on the touchscreen 156 . Similarly, the user can use other gestures (for example, a tap gesture on an address user interface object, which allows the user to enter a new address or modify a displayed address, typically using an on-screen keyboard; a tap gesture on any link in a displayed web page; A tap gesture, which initiates navigation to a web page corresponding to a selected link; etc.) interacts with a displayed application (eg, a web browser application).
在图7G中,检测到第一预定输入(例如,在始位按钮710上的双击705)。作为替代,在触摸屏156上检测到多指挥击姿态(例如,三指向上挥击姿态,如利用手指接触707、709和711的移动所例示的)。In FIG. 7G, a first predetermined input (eg, double click 705 on home button 710) is detected. Instead, a multi-finger swipe gesture (eg, a three-finger upward swipe gesture, as illustrated by movement of finger contacts 707 , 709 , and 711 ) is detected on touchscreen 156 .
图7H例示了响应于检测到第一预定输入(例如,双击705或者包括手指接触707、709和711的多指挥击姿态),同时显示网页浏览器应用程序视图712-6的一部分以及应用程序图标区域716。在一些实施例中,响应于检测到第一预定输入,设备进入应用程序视图选择模式,用于选择同时打开的应用程序中的一个,并且网页浏览器应用程序视图712-6的那部分以及应用程序图标区域716同时显示为应用程序视图选择模式的一部分。应用程序图标区域716包括至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标。在该例中,便携式电子设备具有同时打开的多个应用程序(例如,电子邮件应用程序、媒体库应用程序、记事本应用程序、地图应用程序、天气应用程序以及网页浏览器应用程序),尽管它们不都同时显示。如图7H中例示的,应用程序图标区域716包括用于天气应用程序、地图应用程序、记事本应用程序和媒体库应用程序(即,在打开的应用程序的序列中,紧接着当前显示的应用程序即网页浏览器应用程序的四个应用程序)的应用程序图标(例如,5004-2、5004-4、5004-6以及5004-8)。在一些实施例中,在应用程序图标区域716中显示的打开的应用程序图标的序列或顺序对应于在预定序列中的打开的应用程序的序列(例如,天气、地图、记事本和媒体库应用程序)。FIG. 7H illustrates simultaneous display of a portion of web browser application view 712-6 along with the application icon in response to detection of a first predetermined input (e.g., double tap 705 or multi-finger swipe gesture including finger contacts 707, 709, and 711). Area 716. In some embodiments, in response to detecting the first predetermined input, the device enters an application view selection mode for selecting one of the concurrently open applications, and that portion of the web browser application view 712-6 and the application The program icon area 716 is also displayed as part of the application view selection mode. Application icon area 716 includes a set of open application icons corresponding to at least some of the plurality of concurrently open applications. In this example, the portable electronic device has multiple applications (e.g., an email application, a media library application, a notepad application, a maps application, a weather application, and a web browser application) open simultaneously, although They are not all displayed at the same time. As illustrated in FIG. 7H , the application icon area 716 includes icons for the weather application, the map application, the notepad application, and the media library application (i.e., in the sequence of open applications, next to the currently displayed application). program, ie four applications of the web browser application) (eg, 5004-2, 5004-4, 5004-6, and 5004-8). In some embodiments, the sequence or order of open application icons displayed in application icon area 716 corresponds to the sequence of open applications in a predetermined sequence (e.g., weather, maps, notepad, and media library applications). program).
图7H还例示了在打开的应用程序图标5004-8上检测到姿态713(例如,轻敲姿态)。在一些实施例中,响应于检测到姿态713,显示对应的应用程序视图(例如,媒体库应用程序视图712-2,图7C)。FIG. 7H also illustrates that a gesture 713 (eg, a tap gesture) is detected on the open application icon 5004-8. In some embodiments, in response to detecting gesture 713, a corresponding application view (eg, media library application view 712-2, Figure 7C) is displayed.
图7H例示了在对应于应用程序图标区域716的位置处检测到左挥击姿态715。在图7I中,响应于检测到左挥击姿态715,滚动应用程序图标区域716中的应用程序图标(例如,5004-2、5004-4、5004-6以及5004-8)。滚动的结果是,用于电子邮件应用程序的应用程序图标5004-12代替先前显示的应用程序图标(例如,5004-2、5004-4、5004-6以及5004-8)显示在应用程序图标区域506中。FIG. 7H illustrates detection of left swipe gesture 715 at a location corresponding to application icon area 716 . In FIG. 7I, in response to detecting left swipe gesture 715, the application icons (eg, 5004-2, 5004-4, 5004-6, and 5004-8) in application icon area 716 are scrolled. As a result of the scrolling, an application icon 5004-12 for the email application is displayed in the application icon area in place of previously displayed application icons (eg, 5004-2, 5004-4, 5004-6, and 5004-8) 506 in.
在图7J中,在网页浏览器应用程序视图712-6上检测到第一类型的姿态(例如,包括手指接触717、719和721的移动的多指左挥击姿态)。图7K例示了响应于检测到第一类型的姿态,天气应用程序视图712-5显示在触摸屏156上。应该注意,天气应用程序在打开的应用程序的序列中紧接在网页浏览器应用程序之后。In FIG. 7J, a first type of gesture (eg, a multi-fingered left swipe gesture including movement of finger contacts 717, 719, and 721) is detected on web browser application view 712-6. FIG. 7K illustrates that weather application view 712-5 is displayed on touch screen 156 in response to detecting the first type of gesture. It should be noted that the weather application follows the web browser application in the sequence of open applications.
图7K还例示了在天气应用程序视图712-5上检测到第一类型的第二姿态(例如,包括手指接触723、725和727的移动的多指左挥击姿态)。图7L例示了响应于检测到第一类型的第二姿态,地图应用程序视图712-4显示在触摸屏156上。应该注意,地图应用程序在打开的应用程序的序列中紧接在天气应用程序之后。7K also illustrates that a second gesture of the first type (eg, a multi-fingered left swipe gesture including movement of finger contacts 723, 725, and 727) is detected on weather application view 712-5. FIG. 7L illustrates that map application view 712-4 is displayed on touch screen 156 in response to detecting a second gesture of the first type. It should be noted that the Maps application comes immediately after the Weather application in the sequence of open applications.
图7L还例示了在地图应用程序视图712-4上检测到第一类型的第三姿态(例如,包括手指接触729、731和733的移动的多指左挥击姿态)。图7M例示了响应于检测到第一类型的第三姿态,记事本应用程序视图712-3显示在触摸屏156上。应该注意,记事本应用程序在打开的应用程序的序列中紧接在地图应用程序之后。7L also illustrates that a third gesture of the first type (eg, a multi-fingered left swipe gesture including movement of finger contacts 729, 731, and 733) is detected on map application view 712-4. FIG. 7M illustrates that notes application view 712-3 is displayed on touch screen 156 in response to detecting a third gesture of the first type. It should be noted that the Notepad application follows the Maps application in the sequence of open applications.
图7M还例示了在记事本应用程序视图712-3上检测到第一类型的第四姿态(例如,包括手指接触735、737和739的移动的多指左挥击姿态)。图7N例示了响应于检测到第一类型的第四姿态,媒体库应用程序视图712-2显示在触摸屏156上。应该注意,媒体库应用程序在打开的应用程序的序列中紧接在记事本应用程序之后。7M also illustrates that a fourth gesture of the first type (eg, a multi-fingered left swipe gesture including movement of finger contacts 735, 737, and 739) is detected on notes application view 712-3. 7N illustrates that media library application view 712-2 is displayed on touch screen 156 in response to detecting a fourth gesture of the first type. It should be noted that the Media Library application follows the Notepad application in the sequence of open applications.
图7N还例示了在媒体库应用程序视图712-2上检测到第一类型的第五姿态(例如,包括手指接触741、743和745的移动的多指左挥击姿态)。图7O例示了响应于检测到第一类型的第五姿态,电子邮件应用程序视图712-1显示在触摸屏156上。应该注意,电子邮件应用程序在打开的应用程序的序列中紧接在媒体库应用程序之后。7N also illustrates that a fifth gesture of the first type (eg, a multi-fingered left swipe gesture including movement of finger contacts 741, 743, and 745) is detected on media library application view 712-2. 70 illustrates that email application view 712-1 is displayed on touch screen 156 in response to detecting a fifth gesture of the first type. It should be noted that the email application follows the media library application in the sequence of open applications.
图7O还例示了在电子邮件应用程序视图712-1上检测到第一类型的第六姿态(例如,包括手指接触747、749和751的移动的多指左挥击姿态)。图7P描述了响应于检测到第一类型的第六姿态,网页浏览器应用程序视图712-6显示在触摸屏156上。应该注意,网页浏览器应用程序在打开的应用程序的序列的一端,而电子邮件应用程序在打开的应用程序的序列的另一端。70 also illustrates that a sixth gesture of the first type (eg, a multi-fingered left swipe gesture including movement of finger contacts 747, 749, and 751) is detected on email application view 712-1. 7P depicts web browser application view 712-6 being displayed on touch screen 156 in response to detecting a sixth gesture of the first type. It should be noted that the web browser application is at one end of the sequence of open applications and the email application is at the other end of the sequence of open applications.
图7P还例示了在网页浏览器应用程序视图712-6上检测到第二类型的姿态(例如,包括手指接触753、755和757的移动的多指右挥击姿态)。图7Q例示了,在一些实施例中,响应于检测到第二类型的姿态,电子邮件应用程序视图712-1显示在触摸屏156上。7P also illustrates that a second type of gesture (eg, a multi-fingered right swipe gesture including movement of finger contacts 753, 755, and 757) is detected on web browser application view 712-6. Figure 7Q illustrates that, in some embodiments, email application view 712-1 is displayed on touch screen 156 in response to detecting the second type of gesture.
参考图7R,在网页浏览器应用程序视图712-6上检测到多指姿态(例如,包括手指接触759、761、763、765和767的移动的五指捏姿态)。图7S例示了当在触摸屏156上检测到多指姿态时,网页浏览器应用程序视图712-6和至少一部分始位画面708同时显示。如所例示的,网页浏览器应用程序视图712-6以缩小比例显示。当在触摸屏156上检测到多指姿态时,根据该多指姿态调整缩小比例。例如,缩小比例随着手指接触759、761、763、765和767的进一步抓捏而减小(即,网页浏览器应用程序视图712-6以更小的比例显示)。作为代替,缩小比例随着手指接触759、761、763、765和767的散开而增大(即,网页浏览器应用程序视图712-6以比之前更大的比例显示)。Referring to FIG. 7R, a multi-finger gesture (eg, a five-finger pinch gesture including movement of finger contacts 759, 761, 763, 765, and 767) is detected on web browser application view 712-6. FIG. 7S illustrates that web browser application view 712 - 6 and at least a portion of home screen 708 are simultaneously displayed when a multi-finger gesture is detected on touch screen 156 . As illustrated, the web browser application view 712-6 is displayed at a reduced scale. When a multi-finger gesture is detected on the touch screen 156, the reduction scale is adjusted according to the multi-finger gesture. For example, the zoom-out scale decreases with further pinches of finger contacts 759, 761, 763, 765, and 767 (ie, web browser application view 712-6 is displayed at a smaller scale). Instead, the zoom out scale increases as finger contacts 759, 761, 763, 765, and 767 spread out (ie, web browser application view 712-6 is displayed at a larger scale than before).
在一些实施例中,当停止检测到多指姿态时,停止显示网页浏览器应用程序视图712-6并显示整个始位画面708。作为代替,当停止检测到多指姿态时,确定是否要以满屏比例显示始位画面708或者网页浏览器应用程序视图712-6。在一些实施例中,当停止显示多指姿态时,基于缩小比例作出确定(例如,如果当停止检测到多指姿态时应用程序视图以小于预定阈值的比例显示,则显示整个始位画面708;如果当停止检测到多指姿态时应用程序视图以大于预定阈值的比例显示,则以满屏比例显示应用程序视图而不显示始位画面708)。在一些实施例中,确定还基于多指姿态的速度作出。In some embodiments, when the multi-finger gesture ceases to be detected, the web browser application view 712-6 ceases to be displayed and the entire home screen 708 is displayed. Instead, when the multi-finger gesture ceases to be detected, it is determined whether to display the home screen 708 or the web browser application view 712-6 at full screen scale. In some embodiments, when ceasing to display a multi-finger gesture, the determination is made based on a zoom out (eg, if the application view is displayed at a scale smaller than a predetermined threshold when ceasing to detect a multi-finger gesture, display the entire home screen 708; If the application view is displayed at a scale greater than the predetermined threshold when the multi-finger gesture ceases to be detected, the application view is displayed at full screen scale without displaying the home screen 708). In some embodiments, the determination is also made based on the velocity of the multi-finger gesture.
图8A和8B是例示了根据一些实施例的事件识别方法800的流程图。方法800在具有触摸敏感显示器的电子设备(例如,设备102,图1B)中执行(802)。该电子设备配置成至少执行第一软件应用程序和第二软件应用程序。第一软件应用程序包括第一组一个或多个姿态识别器,第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器(例如,应用程序133-2具有姿态识别器516-4,以及应用程序133-1具有姿态识别器516-1到516-3以及视图508、510和512,图3F)。各自的姿态识别器具有相对应的姿态处理器(例如,姿态处理器552-1对应于姿态识别器516-1,而姿态处理器552-3对应于姿态识别器516-4)。第一组一个或多个姿态识别器通常不同于第二组一个或多个姿态识别器。8A and 8B are flowcharts illustrating an event identification method 800 according to some embodiments. Method 800 is performed ( 802 ) in an electronic device (eg, device 102 , FIG. 1B ) having a touch-sensitive display. The electronic device is configured to execute at least a first software application and a second software application. A first software application includes a first set of one or more gesture recognizers, a second software application includes one or more views and a second set of one or more gesture recognizers (e.g., application 133-2 has a gesture recognizer 516-4, and application 133-1 has gesture recognizers 516-1 to 516-3 and views 508, 510, and 512, FIG. 3F). Respective gesture recognizers have corresponding gesture processors (eg, gesture processor 552-1 corresponds to gesture recognizer 516-1, and gesture processor 552-3 corresponds to gesture recognizer 516-4). The first set of one or more gesture recognizers is typically different than the second set of one or more gesture recognizers.
方法800允许用户使用姿态控制当前没有在电子设备的显示器上显示的隐藏打开的应用程序(例如,第一软件应用程序),例如后台应用程序、挂起的应用程序或者休眠的应用程序。因此,用户可以执行不是由当前显示在电子设备的显示器上的应用程序(例如,第二软件应用程序)提供的而是由当前打开的应用程序中的一个提供的操作(例如,对于隐藏的应用程序启动器软件应用程序使用姿态来显示始位画面或切换到下一个软件应用程序)。Method 800 allows a user to use gestures to control a hidden open application (eg, a first software application) that is not currently displayed on a display of the electronic device, such as a background application, a suspended application, or a dormant application. Thus, the user can perform an operation not provided by the application currently displayed on the display of the electronic device (e.g., the second software application) but by one of the currently open applications (e.g., for a hidden application The program launcher software application uses gestures to display a home screen or switch to the next software application).
在一些实施例中,第一软件应用程序(804)是应用程序启动器(例如,出发点)。例如,如图7A中所示出的,应用程序启动器显示对应于多个应用程序的多个应用程序图标5002。应用程序启动器接收对应用程序图标5002的用户选择(例如,基于触摸屏156上的手指姿态),并响应于接收到该用户选择,启动对应于选择的应用程序图标5002的应用程序。In some embodiments, the first software application (804) is an application launcher (eg, a launcher). For example, as shown in FIG. 7A, the application launcher displays multiple application icons 5002 corresponding to multiple applications. The application launcher receives a user selection of an application icon 5002 (eg, based on a finger gesture on the touchscreen 156 ), and in response to receiving the user selection, launches an application corresponding to the selected application icon 5002 .
第二软件应用程序通常是由应用程序启动器启动的软件应用程序。如图7A和7B中所例示的,应用程序启动器接收关于电子邮件应用程序图标5002-36上的轻敲姿态701的信息并启动电子邮件应用程序。作为响应,电子邮件应用程序在触摸屏156上显示电子邮件应用程序视图712-1。第二软件应用程序可以是对应于应用程序图标5002(图7A)的任何应用程序,或者可以由应用程序启动器启动的任何其他应用程序(例如,媒体库应用程序,图7C;记事本应用程序,图7D;地图应用程序,图7E;天气应用程序,图7F;网页浏览器应用程序,图7G;等等)。在方法800的以下描述中,应用程序启动器用作示例性的第一软件应用程序,并且网页浏览器应用程序用作示例性的第二软件应用程序。The second software application is typically a software application launched by an application launcher. As illustrated in Figures 7A and 7B, the application launcher receives information about the tap gesture 701 on the email application icon 5002-36 and launches the email application. In response, the email application displays an email application view 712 - 1 on the touch screen 156 . The second software application can be any application corresponding to application icon 5002 (FIG. 7A), or any other application that can be launched by an application launcher (e.g., a media library application, FIG. 7C; a notepad application , FIG. 7D; map application, FIG. 7E; weather application, FIG. 7F; web browser application, FIG. 7G; etc.). In the following description of method 800, an application launcher is used as an exemplary first software application and a web browser application is used as an exemplary second software application.
在一些实施例中,电子设备具有程序层次结构中的仅两个软件应用程序:应用程序启动器和一个其他软件应用程序(通常是对应于显示在电子设备102的触摸屏156上的一个或多个视图的软件应用程序)。In some embodiments, the electronic device has only two software applications in the program hierarchy: an application launcher and one other software application (typically corresponding to one or more software applications displayed on the touch screen 156 of the electronic device 102 view software application).
在一些实施例中,第一软件应用程序(806)是操作系统应用程序。本文所使用的操作系统应用程序涉及集成了操作系统118的应用程序(图1A-1C)。操作系统应用程序通常驻留在图2中的核心OS层208或者操作系统API软件206中。操作系统应用程序通常不能由用户移除,然而其他应用程序通常可以由用户安装或移除。在一些实施例中,操作系统应用程序包括应用程序启动器。在一些实施例中,操作系统应用程序包括设置应用程序(例如,用于显示/修改系统设置或设备/全局内部状态134的一个或多个值的应用程序,图1C)。在一些实施例中,操作系统应用程序包括辅助模块127。在一些实施例中,电子设备具有程序层次结构中的仅三个软件应用程序:应用程序启动器、设置应用程序和一个其他应用程序(通常是对应于在电子设备102的触摸屏156上显示的一个或多个视图的软件应用程序)。In some embodiments, the first software application (806) is an operating system application. Operating system applications, as used herein, refer to applications integrated with the operating system 118 (FIGS. 1A-1C). Operating system applications typically reside in core OS layer 208 or operating system API software 206 in FIG. 2 . Operating system applications generally cannot be removed by the user, whereas other applications can generally be installed or removed by the user. In some embodiments, the operating system application includes an application launcher. In some embodiments, the operating system applications include a settings application (eg, an application for displaying/modifying system settings or one or more values of device/global internal state 134, FIG. 1C). In some embodiments, operating system applications include auxiliary modules 127 . In some embodiments, the electronic device has only three software applications in the program hierarchy: an application launcher, a settings application, and one other application (typically the one corresponding to the one displayed on the touch screen 156 of the electronic device 102). or multiple view software applications).
电子设备至少显示(808)第二软件应用程序的一个或多个视图的子集(例如,网页浏览器应用程序视图712-6,图7G)。The electronic device displays (808) at least a subset of the one or more views of the second software application (eg, web browser application view 712-6, FIG. 7G).
在一些实施例中,显示包括(810)至少显示第二软件应用程序的一个或多个视图的子集,而不显示第一软件应用程序的任何视图。例如,在图7G中,不显示应用程序启动器的视图(例如,始位画面708)。In some embodiments, displaying includes (810) displaying at least a subset of the one or more views of the second software application without displaying any views of the first software application. For example, in FIG. 7G, the application launcher's view (eg, home screen 708) is not displayed.
根据一些实施例,显示包括(812)至少显示第二软件应用程序的一个或多个视图的子集,而不显示任何其他应用程序的视图。例如,在图7G中,只显示网页浏览器应用程序的一个或多个视图。According to some embodiments, displaying includes (812) displaying at least a subset of the one or more views of the second software application without displaying views of any other applications. For example, in Figure 7G, only one or more views of the web browser application are displayed.
在至少显示第二软件应用程序的一个或多个视图的子集时,电子设备检测(814)触摸敏感显示器上的触摸输入序列(例如,姿态703,其包括触摸放下事件和触摸提起(touch-up)事件;或另一个姿态,其包括手指接触707、709和711的触摸放下、手指接触707、709和711跨触摸屏156的移动以及手指接触707、709和711的抬离)。触摸输入序列包括一个或多个触摸输入的第一部分以及第一部分之后的一个或多个触摸输入的第二部分。如本文使用的,术语“序列”是指其中发生一个或多个触摸事件的排序。例如,在包括手指接触707、709和711的触摸输入序列中,第一部分可以包括手指接触707、709和711的触摸放下,而第二部分可以包括手指接触707、709和711的移动以及手指接触707、709和711的抬离。While displaying at least a subset of the one or more views of the second software application, the electronic device detects (814) a sequence of touch inputs (e.g., gesture 703, which includes a touch-down event and a touch-up (touch- up) event; or another gesture that includes a touch-down of finger contacts 707, 709, and 711, movement of finger contacts 707, 709, and 711 across touchscreen 156, and lift-off of finger contacts 707, 709, and 711). The sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion. As used herein, the term "sequence" refers to an ordering in which one or more touch events occur. For example, in a touch input sequence that includes finger contacts 707, 709, and 711, a first portion may include a touch down of finger contacts 707, 709, and 711, while a second portion may include movement of finger contacts 707, 709, and 711 and finger contact Lift off of 707, 709 and 711.
在一些实施例中,检测发生(816)在当一个或多个触摸输入的第一部分中的触摸输入至少部分地交叠于第二软件应用程序的显示的视图中的至少一个时。在一些实施例中,尽管触摸输入至少部分地交叠于第二软件应用程序的显示的视图中的至少一个,但第一软件应用程序仍接收一个或多个触摸输入的第一部分。例如,应用程序启动器接收网页浏览器的显示的视图上的触摸输入的第一部分(图7G),尽管应用程序启动器没有被显示。In some embodiments, detecting occurs (816) when a touch input in the first portion of the one or more touch inputs at least partially overlaps at least one of the displayed views of the second software application. In some embodiments, the first software application receives the first portion of the one or more touch inputs despite the touch input at least partially overlapping at least one of the displayed views of the second software application. For example, the application launcher receives the first portion of the touch input on the displayed view of the web browser (FIG. 7G), even though the application launcher is not being displayed.
在检测触摸输入序列的第一阶段期间(818),电子设备传送(820)一个或多个触摸输入的第一部分到第一软件应用程序和第二软件应用程序(例如,使用事件调度器模块315,图3D),从第一组中的姿态识别器中认定(822)识别一个或多个触摸输入的第一部分的一个或多个匹配的姿态识别器(例如,使用第一组中的每个姿态识别器(通常是,每个接收姿态识别器)中的事件比较器3033,图3D),以及用对应于一个或多个匹配的姿态识别器的一个或多个姿态处理器来处理(824)一个或多个触摸输入的第一部分(例如,激活对应的事件处理器319,图3D)。During the first phase (818) of the sequence of detecting touch inputs, the electronic device transmits (820) a first portion of one or more touch inputs to the first software application and the second software application (e.g., using the event dispatcher module 315 , FIG. 3D ), from the gesture recognizers in the first set, identify (822) one or more matching gesture recognizers that recognize the first portion of the one or more touch inputs (e.g., using each A gesture recognizer (typically, an event comparator 3033 in each receiving gesture recognizer, FIG. 3D ), and one or more gesture processors corresponding to one or more matching gesture recognizers (824 ) a first portion of one or more touch inputs (eg, activating a corresponding event handler 319, FIG. 3D).
在一些实施例中,检测触摸输入序列的第一阶段是检测一个或多个触摸输入的第一部分的阶段。In some embodiments, the first stage of detecting a sequence of touch inputs is the stage of detecting a first portion of one or more touch inputs.
关于传送操作(820),在一些实施例中,第一软件应用程序在接收到一个或多个触摸输入的第一部分之后,传送一个或多个触摸输入的第一部分到至少第一组中的姿态识别器的子集,并且第二软件应用程序在接收到一个或多个触摸输入的第一部分之后,传送一个或多个触摸输入的第一部分到至少第二组中的姿态识别器的子集。在一些实施例中,电子设备或电子设备中的事件调度器模块(例如315,图3D)传送一个或多个触摸输入的第一部分到至少第一组和第二组中的姿态识别器的子集(例如,事件调度器模块315传送一个或多个触摸输入的第一部分到姿态识别器516-1、516-2和516-4,图3F)。With respect to the transfer operation (820), in some embodiments, the first software application, after receiving the first portion of the one or more touch inputs, transfers the first portion of the one or more touch inputs to at least a first set of gestures the subset of recognizers, and the second software application, after receiving the first portion of the one or more touch inputs, transmits the first portion of the one or more touch inputs to at least the subset of gesture recognizers in the second set. In some embodiments, the electronic device or an event dispatcher module (e.g., 315, FIG. 3D ) in the electronic device transmits the first portion of the one or more touch inputs to at least one subset of the gesture recognizers in the first and second groups. set (eg, event dispatcher module 315 transmits a first portion of one or more touch inputs to gesture recognizers 516-1, 516-2, and 516-4, FIG. 3F).
例如,当在触摸屏156上检测到包括手指接触707、709和711的手指姿态时(图7G),传送触摸放下事件到应用程序启动器的一个或多个姿态识别器以及网页浏览器应用程序的一个或多个姿态识别器。在另一个例子中,轻敲姿态703的触摸放下事件(图7G)传送到应用程序启动器的一个或多个姿态识别器以及网页浏览器应用程序的一个或多个姿态识别器。For example, when a finger gesture including finger contacts 707, 709, and 711 is detected on touch screen 156 (FIG. 7G), a touch-down event is sent to one or more gesture recognizers of the application launcher and the web browser application's One or more pose recognizers. In another example, a touch-down event (FIG. 7G) of tap gesture 703 is communicated to one or more gesture recognizers of the application launcher and one or more gesture recognizers of the web browser application.
在一些实施例中,当第一组中没有姿态识别器识别一个或多个触摸输入的第一部分时(例如,检测到的事件和姿态定义之间不匹配或者姿态没有完成),处理一个或多个触摸输入的第一部分包括执行空操作(例如,设备不更新显示的用户界面)。In some embodiments, when none of the gesture recognizers in the first set recognize the first portion of the one or more touch inputs (eg, there is a mismatch between the detected event and the gesture The first part of a touch input involves performing a no-op (eg, the device does not update the displayed user interface).
在一些实施例中,电子设备从第二组中的姿态识别器中认定识别一个或多个触摸输入的第一部分的一个或多个匹配的姿态识别器。电子设备使用对应于一个或多个匹配的姿态识别器的一个或多个姿态处理器来处理一个或多个触摸输入的第一部分。例如,响应于传送到网页浏览器应用程序的一个或多个姿态识别器的轻敲姿态703(图7G),网页浏览器应用程序中的匹配的姿态识别器(例如,识别书签图标上的轻敲姿态的姿态识别器,图7G)通过在触摸屏156上显示书签列表而处理轻敲姿态703。In some embodiments, the electronic device identifies one or more matching gesture recognizers from the gesture recognizers in the second set that recognize the first portion of the one or more touch inputs. The electronic device processes a first portion of the one or more touch inputs using one or more gesture processors corresponding to the one or more matching gesture recognizers. For example, in response to a tap gesture 703 ( FIG. 7G ) communicated to one or more gesture recognizers of the web browser application, a matching gesture recognizer in the web browser application (e.g., recognizes a tap on a bookmark icon). Gesture Recognizer for Tap Gestures, FIG. 7G ) processes the tap gesture 703 by displaying a list of bookmarks on the touch screen 156 .
在一些实施例中,在第一阶段之后,在检测触摸输入序列的第二阶段期间,电子设备传送(826,图8B)一个或多个触摸输入的第二部分到第一软件应用程序,而不传送一个或多个触摸输入的第二部分到第二软件应用程序(例如,使用事件调度器模块315,图3D);从一个或多个匹配的姿态识别器中认定识别触摸输入序列的第二匹配的姿态识别器(例如,使用每个匹配的姿态识别器中的事件比较器3033,图3D);以及使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列。在一些实施例中,检测触摸输入序列的第二阶段是检测一个或多个触摸输入的第二部分的阶段。In some embodiments, after the first stage, during a second stage of the sequence of detecting touch inputs, the electronic device transmits (826, FIG. 8B ) a second portion of the one or more touch inputs to the first software application, and Do not transmit the second portion of the one or more touch inputs to the second software application (e.g., using event dispatcher module 315, FIG. 3D ); identify the first portion of the sequence of recognized touch inputs from one or more matching gesture recognizers two matching gesture recognizers (eg, using event comparator 3033 in each matching gesture recognizer, FIG. 3D ); and processing the sequence of touch inputs using a gesture handler corresponding to the respective matching gesture recognizer. In some embodiments, the second stage of detecting a sequence of touch inputs is a stage of detecting a second portion of one or more touch inputs.
例如,当在触摸屏156上检测到包括手指接触707、709和711的手指姿态时(图7G),传送触摸移动和抬离事件到应用程序启动器的一个或多个姿态识别器,而不传送该触摸事件到网页浏览器应用程序。电子设备认定应用程序启动器的匹配的姿态识别器(例如,三指上挥击姿态识别器),并使用对应于三指上挥击姿态识别器的姿态处理器来处理该触摸输入序列。For example, when a finger gesture including finger contacts 707, 709, and 711 is detected on touch screen 156 (FIG. 7G), touch move and lift off events are sent to one or more gesture recognizers of the application launcher, but not The touch events to the web browser application. The electronic device identifies a matching gesture recognizer for the application launcher (eg, a three-finger swipe up gesture recognizer) and processes the sequence of touch inputs using a gesture processor corresponding to the three-finger swipe up gesture recognizer.
在第二阶段期间,第二软件应用程序没有接收到一个或多个触摸输入的第二部分,这通常是因为第一软件应用程序具有超过第二软件应用程序的优先权(例如,在程序层次结构中)。因此,在一些实施例中,当第一软件应用程序中的姿态识别器识别一个或多个触摸输入的第一部分时,第一软件应用程序中的一个或多个姿态识别器排他地接收一个或多个触摸输入的第二后续部分。另外,在第二阶段期间,第二软件应用程序可以不接收一个或多个触摸输入的第二部分,因为第二软件应用程序中没有姿态识别器匹配一个或多个触摸输入的第一部分。During the second phase, the second part of the one or more touch inputs is not received by the second software application, typically because the first software application has priority over the second software application (e.g., at the program level structure). Thus, in some embodiments, when the gesture recognizer in the first software application recognizes a first portion of one or more touch inputs, the one or more gesture recognizers in the first software application exclusively receive one or more touch inputs. Second continuation of multiple touch inputs. Additionally, during the second phase, the second software application may not receive the second portion of the one or more touch inputs because no gesture recognizer in the second software application matches the first portion of the one or more touch inputs.
在一些实施例中,使用对应于各自匹配的姿态识别器的姿态处理器处理触摸输入序列包括(834)在触摸敏感显示器的第一预定区域中显示至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标,以及同时至少显示第二软件应用程序的一个或多个视图的子集。例如,图7H中,预定区域716中的应用程序图标5004对应于电子设备的同时打开的应用程序。在一些实施例中,根据打开的应用程序的序列,显示预定区域716中的应用程序图标5004。在图7H中,电子设备同时显示预定区域716和网页浏览器应用程序视图712-6的子集。In some embodiments, processing the sequence of touch inputs using gesture processors corresponding to respective matching gesture recognizers includes (834) displaying in a first predetermined area of the touch-sensitive display corresponding to at least one of the plurality of simultaneously open applications. A set of open application icons and at least a subset of the one or more views of the second software application are simultaneously displayed. For example, in FIG. 7H , application icons 5004 in predetermined area 716 correspond to concurrently open applications of the electronic device. In some embodiments, the application icons 5004 in the predetermined area 716 are displayed according to the sequence of open applications. In FIG. 7H, the electronic device simultaneously displays a predetermined area 716 and a subset of the web browser application view 712-6.
在一些实施例中,使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列包括(828)显示第一软件应用程序的一个或多个视图。例如,响应于多指捏姿态(图7R),电子设备显示始位画面708(图7A)。在一些实施例中,显示第一软件应用程序的一个或多个视图包括显示第一软件应用程序的一个或多个视图,而不同时显示对应于其他任何软件应用程序的视图(例如,图7A)。In some embodiments, processing the sequence of touch inputs using gesture processors corresponding to respective matching gesture recognizers includes (828) displaying one or more views of the first software application. For example, in response to the multi-pinch gesture (FIG. 7R), the electronic device displays a home screen 708 (FIG. 7A). In some embodiments, displaying one or more views of the first software application includes displaying one or more views of the first software application without simultaneously displaying views corresponding to any other software applications (e.g., FIG. 7A ).
在一些实施例中,使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列包括(830)将第二软件应用程序的一个或多个视图的显示替换为第一软件应用程序的一个或多个视图的显示(例如,显示始位画面708,图7A)。因此,在显示第一软件应用程序的一个或多个视图之后,停止显示第二软件应用程序的一个或多个视图。在一些实施例中,将第二软件应用程序的一个或多个视图的显示替换为第一软件应用程序的一个或多个视图的显示包括,显示第一软件应用程序的一个或多个视图,而不同时显示对应于其他任何软件应用程序的视图(图7A)。In some embodiments, processing the sequence of touch inputs using gesture processors corresponding to respective matching gesture recognizers includes (830) replacing display of one or more views of the second software application with those of the first software application. Display of one or more views (eg, display home screen 708, FIG. 7A). Thus, after displaying the one or more views of the first software application, the display of the one or more views of the second software application ceases. In some embodiments, replacing the display of the one or more views of the second software application with the display of the one or more views of the first software application includes displaying the one or more views of the first software application, without simultaneously displaying a view corresponding to any other software application (FIG. 7A).
在一些实施例中,电子设备同时执行(832)第一软件应用程序、第二软件应用程序以及第三软件应用程序。在一些实施例中,使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列包括,将第二软件应用程序的一个或多个显示的视图替换为第三软件应用程序的一个或多个视图。例如,响应于多指挥击姿态,电子设备将网页浏览器应用程序视图712-6的显示替换为天气应用程序视图712-5的显示(图7J-7K)。在一些应用程序中,将第二软件应用程序的一个或多个显示的视图替换为第三软件应用程序的一个或多个视图包括,显示第三软件应用程序的一个或多个视图,而不同时显示对应于其他任何软件应用程序的视图。在一些实施例中,第三软件应用程序在打开的应用程序的序列中紧接在第二软件应用程序之后。In some embodiments, the electronic device executes (832) the first software application, the second software application, and the third software application concurrently. In some embodiments, processing the sequence of touch inputs using gesture handlers corresponding to respective matching gesture recognizers includes replacing one or more displayed views of the second software application with one or more of the third software application. Multiple views. For example, in response to a multi-finger gesture, the electronic device replaces display of web browser application view 712-6 with display of weather application view 712-5 (FIGS. 7J-7K). In some applications, replacing one or more displayed views of the second software application with one or more views of the third software application includes displaying the one or more views of the third software application without Also displays the view corresponding to any other software application. In some embodiments, the third software application immediately follows the second software application in the sequence of open applications.
在一些实施例中,使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列包括启动设置应用程序。例如,响应于十指轻敲姿态,电子设备启动设置应用程序。In some embodiments, processing the sequence of touch inputs using the gesture handlers corresponding to the respective matched gesture recognizers includes launching a settings application. For example, in response to a ten-finger tap gesture, the electronic device launches a settings application.
注意,关于方法800的上述过程的细节也以类似的方式适用于下面描述的方法900。为了简洁,下面将不再重复这些细节。Note that the details of the above process with respect to method 800 also apply in a similar manner to method 900 described below. For brevity, these details will not be repeated below.
图9A-9C是例示了根据一些实施例的事件识别方法900的流程图。方法900在具有触摸敏感显示器的电子设备中执行(902)。所述电子设备配置成至少执行第一软件应用程序和第二软件应用程序。第一软件应用程序包括第一组一个或多个姿态识别器,第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有相对应的姿态处理器。在一些实施例中,第一组一个或多个姿态识别器不同于第二组一个或多个姿态识别器。9A-9C are flowcharts illustrating a method 900 of event identification according to some embodiments. Method 900 is performed in an electronic device with a touch-sensitive display (902). The electronic device is configured to execute at least a first software application and a second software application. The first software application includes a first set of one or more gesture recognizers and the second software application includes one or more views and a second set of one or more gesture recognizers. Each gesture recognizer has a corresponding gesture processor. In some embodiments, the first set of one or more gesture recognizers is different from the second set of one or more gesture recognizers.
方法900允许用户使用姿态来控制当前没有在电子设备的显示器上显示的隐藏的打开的应用程序(例如,第一软件应用程序),诸如后台应用程序、挂起的应用程序或者休眠的应用程序。因此,用户可以执行不是由当前显示在电子设备的显示器上的应用程序(例如,第二软件应用程序)提供的而是由当前打开的应用程序中的一个提供的操作(例如,对于隐藏的应用程序启动器软件应用程序使用姿态来显示始位画面或切换到下一个软件应用程序)。Method 900 allows a user to use gestures to control a hidden open application (eg, a first software application) that is not currently displayed on a display of the electronic device, such as a background application, a suspended application, or a dormant application. Thus, the user can perform an operation not provided by the application currently displayed on the display of the electronic device (e.g., the second software application) but by one of the currently open applications (e.g., for a hidden application The program launcher software application uses gestures to display a home screen or switch to the next software application).
在一些实施例中,第一软件应用程序(904)是应用程序启动器(例如,出发点)。在一些实施例中,第一软件应用程序是(906)操作系统应用程序。在方法900的以下描述中,应用程序启动器用作示例性的第一软件应用程序,而网页浏览器应用程序用作示例性的第二软件应用程序。In some embodiments, the first software application (904) is an application launcher (eg, a launcher). In some embodiments, the first software application is (906) an operating system application. In the following description of method 900, an application launcher is used as an exemplary first software application and a web browser application is used as an exemplary second software application.
电子设备显示(908)第一组一个或多个视图(例如,网页浏览器应用程序视图712-6,图7G)。第一组一个或多个视图至少包括第二软件应用程序的一个或多个视图的子集。例如,第二软件应用程序可以具有多个应用程序视图(例如,应用程序133-1的应用程序视图317,图3D),并且电子设备显示多个应用程序视图中的至少一个视图。在一些实施例中,子集包括第二软件应用程序的全部一个或多个视图。The electronic device displays (908) a first set of one or more views (eg, web browser application view 712-6, Figure 7G). The first set of one or more views includes at least a subset of the one or more views of the second software application. For example, the second software application may have multiple application views (eg, application view 317 of application 133-1, FIG. 3D ), and the electronic device displays at least one of the multiple application views. In some embodiments, the subset includes all of the one or more views of the second software application.
在一些实施例中,显示第一组一个或多个视图包括(910)显示第一组一个或多个视图而不显示第一软件应用程序的任何视图(例如,网页浏览器应用程序视图712-6,图7G)。In some embodiments, displaying the first set of one or more views includes (910) displaying the first set of one or more views without displaying any views of the first software application (eg, web browser application view 712- 6, Figure 7G).
根据一些实施例,显示第一组一个或多个视图包括(912)显示第一组一个或多个视图而不显示任何其他软件应用程序的视图。例如,在图7G中,只显示网页浏览器应用程序的一个或多个视图。According to some embodiments, displaying the first set of one or more views includes (912) displaying the first set of one or more views without displaying views of any other software applications. For example, in Figure 7G, only one or more views of the web browser application are displayed.
在显示第一组一个或多个视图时,电子设备检测(914)触摸敏感显示器上的触摸输入序列,并确定(920)是否第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的第一部分。例如,在显示网页浏览器应用程序视图712-6时(图7G),设备确定用于应用程序启动器的姿态识别器是否识别触摸输入的第一部分。触摸输入序列包括一个或多个触摸输入的第一部分以及第一部分之后的一个或多个触摸输入的第二部分(即,第二部分在第一部分之后)。While displaying the first set of one or more views, the electronic device detects (914) a sequence of touch inputs on the touch-sensitive display and determines (920) whether at least one gesture recognizer in the first set of one or more gesture recognizers Identify the first part of one or more touch inputs. For example, while displaying web browser application view 712-6 (FIG. 7G), the device determines whether the gesture recognizer for the application launcher recognizes the first portion of the touch input. A sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion (ie, the second portion following the first portion).
在一些实施例中,触摸输入序列至少部分地交叠(916)于第二软件应用程序的一个或多个显示的视图中的至少一个。例如,应用程序启动器接收网页浏览器应用程序视图712-6(图7G)上的触摸输入的第一部分,尽管应用程序启动器没有被显示。In some embodiments, the sequence of touch inputs at least partially overlaps (916) at least one of the one or more displayed views of the second software application. For example, an application launcher receives the first portion of a touch input on web browser application view 712-6 (FIG. 7G), even though the application launcher is not displayed.
在一些实施例中,在确定第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的第一部分之前,电子设备同时传送(918)一个或多个触摸输入的第一部分到第一软件应用程序和第二软件应用程序。例如,在确定应用程序启动器中的至少一个姿态识别器识别触摸放下事件之前,应用程序启动器和网页浏览器应用程序二者都接收手指接触707、709和711的触摸放下事件(图7G)。In some embodiments, the electronic device simultaneously transmits (918) the one or more touch inputs prior to determining that at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the first portion of the one or more touch inputs The first part to the first software application and the second software application. For example, both the application launcher and the web browser application receive touch-down events of finger contacts 707, 709, and 711 before determining that at least one gesture recognizer in the application launcher recognizes a touch-down event (FIG. 7G) .
根据关于第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的第一部分的确定(922,图9B),电子设备传送(924)触摸输入序列到第一软件应用程序而不传送触摸输入序列到第二软件应用程序,确定(926)是否第一组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列,并根据关于第一组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列的确定,使用第一组一个或多个姿态识别器中的识别触摸输入序列的至少一个姿态识别器来处理(928)触摸输入序列。Based on a determination (922, FIG. 9B ) that at least one gesture recognizer of the first set of one or more gesture recognizers recognized a first portion of one or more touch inputs, the electronic device transmits (924) a sequence of touch inputs to the first The software application, rather than transmitting the touch input sequence to the second software application, determines (926) whether at least one gesture recognizer in the first set of one or more gesture recognizers recognizes the touch input sequence, and based on information about the first set of one or more gesture recognizers The determination that at least one gesture recognizer of the or plurality of gesture recognizers recognizes the touch input sequence is processed (928) using the at least one gesture recognizer of the first set of one or more gesture recognizers that recognizes the touch input sequence sequence.
例如,当在触摸屏156上检测到三个手指接触707、709和711的触摸放下和触摸移动(图7G)时,电子设备认定至少应用程序启动器的三指上挥击姿态识别器识别触摸输入。此后,电子设备传送随后的触摸事件(例如,手指接触707、709和711的抬离)到应用程序启动器,而不传送随后的触摸事件到网页浏览器应用程序。电子设备进一步认定三指上挥击姿态识别器识别触摸输入序列,并使用对应于三指上挥击姿态识别器的姿态处理器来处理触摸输入序列。For example, when a touch down and a touch move (FIG. 7G) of three finger contacts 707, 709, and 711 are detected on the touch screen 156, the electronic device assumes that at least the three-finger swipe up gesture recognizer of the application program launcher recognizes the touch input . Thereafter, the electronic device transmits subsequent touch events (eg, lift-off of finger contacts 707 , 709 , and 711 ) to the application launcher without transmitting subsequent touch events to the web browser application. The electronic device further determines that the three-finger swipe up gesture recognizer recognizes the touch input sequence, and uses a gesture processor corresponding to the three-finger swipe up gesture recognizer to process the touch input sequence.
在一些实施例中,使用第一组一个或多个姿态识别器中的至少一个姿态识别器来处理触摸输入序列包括(930)显示第一软件应用程序的一个或多个视图。例如,响应于检测到多指捏姿态(图7R),电子设备显示始位画面708(图7A)。In some embodiments, processing the sequence of touch inputs using at least one gesture recognizer of the first set of one or more gesture recognizers includes (930) displaying one or more views of the first software application. For example, in response to detecting a multi-finger pinch gesture (FIG. 7R), the electronic device displays a home screen 708 (FIG. 7A).
在一些实施例中,使用第一组一个或多个姿态识别器中的至少一个姿态识别器来处理触摸输入序列包括(932)将第一组一个或多个视图的显示替换为第一软件应用程序的一个或多个视图的显示(例如,显示始位画面708,图7A,始位画面708是应用程序启动器软件应用程序的一部分)。In some embodiments, processing the sequence of touch inputs using at least one gesture recognizer of the first set of one or more gesture recognizers includes (932) replacing display of the first set of one or more views with the first software application Display of one or more views of the program (eg, display of home screen 708, FIG. 7A, home screen 708 being part of the application launcher software application).
在一些实施例中,电子设备同时执行第一软件应用程序、第二软件应用程序以及第三软件应用程序;并且使用第一组一个或多个姿态识别器中的至少一个姿态识别器来处理触摸输入序列包括(934)将第一组一个或多个视图替换为第三软件应用程序的一个或多个视图。在一些实施例中,将第一组一个或多个视图替换为第三软件应用程序的一个或多个视图包括,显示第三软件应用程序的一个或多个视图,而不同时显示对应于其他任何软件应用程序的视图。例如,响应于多指挥击姿态,电子设备将网页浏览器应用程序视图712-6的显示替换为天气应用程序视图712-5的显示(图7J-7K)。In some embodiments, the electronic device concurrently executes the first software application, the second software application, and the third software application; and processes the touch using at least one gesture recognizer from the first set of one or more gesture recognizers The input sequence includes (934) replacing the first set of one or more views with the one or more views of the third software application. In some embodiments, replacing the first set of one or more views with one or more views of the third software application includes displaying the one or more views of the third software application without simultaneously displaying the views corresponding to the other view of any software application. For example, in response to a multi-finger gesture, the electronic device replaces display of web browser application view 712-6 with display of weather application view 712-5 (FIGS. 7J-7K).
在一些实施例中,使用第一组一个或多个姿态识别器中的至少一个姿态识别器来处理触摸输入序列包括(936),在触摸敏感显示器的第一预定区域中显示至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标,以及同时至少显示第一组一个或多个视图的子集。例如,在图7H中,预定区域716中的应用程序图标5004对应于电子设备的同时打开的应用程序。在一些实施例中,根据打开的应用程序的序列,显示预定区域716中的应用程序图标5004。在图7H中,电子设备同时显示预定区域716和网页浏览器应用程序视图712-6的子集。In some embodiments, processing the sequence of touch inputs using at least one gesture recognizer of the first set of one or more gesture recognizers includes (936), displaying in a first predetermined area of the touch-sensitive display corresponding to at least a plurality of gesture recognizers. A set of open application icons for some of the concurrently open applications, and at least a subset of the first set of one or more views are simultaneously displayed. For example, in FIG. 7H , application icons 5004 in predetermined area 716 correspond to concurrently open applications of the electronic device. In some embodiments, the application icons 5004 in the predetermined area 716 are displayed according to the sequence of open applications. In FIG. 7H, the electronic device simultaneously displays a predetermined area 716 and a subset of the web browser application view 712-6.
根据关于第一组一个或多个姿态识别器中没有姿态识别器识别一个或多个触摸输入的第一部分的确定(938,图9C),电子设备传送(940)触摸输入序列到第二软件应用程序,确定(942)是否第二组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列,并且根据关于第二组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列的确定,使用第二组一个或多个姿态识别器中的识别触摸输入序列的至少一个姿态识别器来处理(944)触摸输入序列。Based on the determination (938, FIG. 9C ) that none of the gesture recognizers of the first set of one or more gesture recognizers recognized the first portion of the one or more touch inputs, the electronic device transmits (940) the sequence of touch inputs to the second software application A procedure for determining (942) whether at least one gesture recognizer of the second set of one or more gesture recognizers recognizes the sequence of touch inputs, and based on information about at least one gesture recognizer of the second set of one or more gesture recognizers Determining the sequence of touch inputs, the sequence of touch inputs is processed ( 944 ) using at least one gesture recognizer of the second set of one or more gesture recognizers that recognizes the sequence of touch inputs.
例如,当一个或多个触摸输入的第一部分是轻敲姿态(例如,703,图7G),并且应用程序启动器中没有姿态识别器识别该轻敲姿态时,电子设备传送所述轻敲姿态到网页浏览器应用程序,并确定是否网页浏览器应用程序的至少一个姿态识别器识别该轻敲姿态。当网页浏览器应用程序(或网页浏览器应用程序的姿态识别器)识别书签图标上的轻敲姿态703时,电子设备使用对应的姿态处理器来处理轻敲姿态703。For example, when the first part of one or more touch inputs is a tap gesture (e.g., 703, FIG. 7G ), and no gesture recognizer in the application launcher recognizes the tap gesture, the electronic device transmits the tap gesture to the web browser application and determine whether at least one gesture recognizer of the web browser application recognizes the tap gesture. When the web browser application (or the gesture recognizer of the web browser application) recognizes the tap gesture 703 on the bookmark icon, the electronic device processes the tap gesture 703 using a corresponding gesture processor.
图10A-10B是例示了根据一些实施例的事件识别方法的流程图。注意,关于方法600、800和900的上述过程的细节也以类似的方式适用于下面描述的方法1000。为了简洁,下面将不再重复这些细节。10A-10B are flowcharts illustrating methods of event identification according to some embodiments. Note that the details of the above process with respect to methods 600, 800, and 900 also apply in a similar manner to method 1000 described below. For brevity, these details will not be repeated below.
方法1000在具有内部状态(例如,设备/全局内部状态134,图1C)的电子设备中执行(1002)。电子设备配置成执行包括具有多个视图的视图层次结构的软件。Method 1000 is performed ( 1002 ) in an electronic device having an internal state (eg, device/global internal state 134 , FIG. 1C ). An electronic device is configured to execute software including a view hierarchy having a plurality of views.
在方法1000中,至少一个姿态识别器具有多个姿态定义。这有助于姿态识别器在截然不同的操作模式下工作。例如,设备可以具有正常操作模式和辅助操作模式。在正常操作模式下,下一个应用程序姿态用于在应用程序之间移动,并且该下一个应用程序姿态定义为三指左挥击姿态。在辅助操作模式下,三指左挥击姿态用于执行不同的功能。由此,在辅助操作模式下需要一个不同于三指左挥击的姿态以对应于下一个应用程序姿态(例如,在辅助操作模式下的四指左挥击姿态)。通过使多个姿态定义关联到下一个应用程序姿态,设备能够基于当前的操作模式为下一个应用程序姿态选择姿态定义中的一个。这提供了在不同的操作模式下使用姿态识别器的灵活性。在一些实施例中,带多个姿态定义的多个姿态识别器基于操作模式被调节(例如,在正常操作模式下由三个手指执行的姿态在辅助操作模式下由四个手指执行)。In method 1000, at least one gesture recognizer has multiple gesture definitions. This helps gesture recognizers work in distinct modes of operation. For example, a device may have a normal mode of operation and a secondary mode of operation. In the normal mode of operation, the next application gesture is used to move between applications, and this next application gesture is defined as a three-finger left swipe gesture. In assisted operation mode, the three-finger left swipe gesture is used to perform different functions. Therefore, a gesture other than the three-finger left swipe is required in the assisted operation mode to correspond to the next application gesture (eg, the four-fingered left swipe gesture in the assisted operation mode). By having multiple gesture definitions associated to the next application gesture, the device can select one of the gesture definitions for the next application gesture based on the current mode of operation. This provides the flexibility to use the gesture recognizer in different modes of operation. In some embodiments, multiple gesture recognizers with multiple gesture definitions are adjusted based on the mode of operation (eg, a gesture performed by three fingers in the normal mode of operation is performed by four fingers in the assisted mode of operation).
在一些实施例中,内部状态包括(1016)用于辅助操作模式的一个或多个设置(例如,该内部状态指示设备是否运行于辅助操作模式下)。In some embodiments, the internal state includes (1016) one or more settings for the secondary mode of operation (eg, the internal state indicates whether the device is operating in the secondary mode of operation).
在一些实施例中,软件是(1018)或者包括应用程序启动器(例如,出发点)。In some embodiments, the software is (1018) or includes an application launcher (eg, a launcher).
在一些实施例中,软件是(1020)或者包括操作系统应用程序(例如,设备的集成了操作系统的应用程序)。In some embodiments, the software is (1020) or includes an operating system application (eg, an operating system integrated application of the device).
电子设备显示(1004)视图层次结构中的一个或多个视图。The electronic device displays (1004) one or more views in the view hierarchy.
电子设备执行(1006)一个或多个软件元素。每个软件元素与特定的视图相关联(例如,应用程序133-1具有一个或多个应用程序视图317,图3D),且每个特定视图包括一个或多个事件识别器(例如,事件识别器325,图3D)。每个事件识别器具有基于一个或多个子事件的一个或多个事件定义以及事件处理器(例如,姿态定义3035,和对事件传送信息3039中对应事件处理器的参考,图3D)。事件处理器指定对目标的动作,并被配置成响应于事件识别器检测到与一个或多个事件定义中的特定事件定义相对应的事件而发送动作到目标(例如,当事件识别器具有多个事件定义时,从一个或多个事件定义中选择出的事件定义,或者当事件识别器仅仅具有一个事件定义时的唯一事件定义)。The electronic device executes (1006) the one or more software elements. Each software element is associated with a particular view (e.g., application 133-1 has one or more application views 317, FIG. 3D ), and each particular view includes one or more event recognizers (e.g., event recognizer device 325, Figure 3D). Each event recognizer has one or more event definitions based on one or more sub-events and event handlers (eg, gesture definitions 3035, and references to corresponding event handlers in event delivery information 3039, FIG. 3D). The event handler specifies an action on the target and is configured to send an action to the target in response to the event recognizer detecting an event corresponding to a particular event definition in the one or more event definitions (e.g., when the event recognizer has multiple event definition, an event definition selected from one or more event definitions, or a unique event definition when the event recognizer has only one event definition).
电子设备检测(1008)一个或多个子事件序列。The electronic device detects (1008) one or more sequences of sub-events.
电子设备认定(1010)视图层次结构的视图中的一个作为点击视图。该点击视图确立视图层次结构中的哪些视图是有效涉及的视图。The electronic device identifies (1010) one of the views of the view hierarchy as a clickable view. The click view establishes which views in the view hierarchy are effectively involved views.
电子设备传送(1012)各自的子事件到用于视图层次结构中每一个有效涉及的视图的事件识别器。在一些实施例中,视图层次结构中的一个或多个有效涉及的视图包括点击视图。在一些实施例中,视图层次结构中的一个或多个有效涉及的视图包括默认视图(例如,应用程序启动器的始位画面708)。The electronic device transmits (1012) the respective sub-event to the event recognizer for each actively involved view in the view hierarchy. In some embodiments, one or more actively involved views in the view hierarchy include a click view. In some embodiments, one or more actively referenced views in the view hierarchy include a default view (eg, the home screen 708 of the application launcher).
用于视图层次结构中有效涉及的视图的至少一个事件识别器具有(1014)多个事件定义,并根据电子设备的内部状态选择出该多个事件定义中的一个。例如,事件识别器325-1具有多个姿态定义(例如,3037-1和3037-2,图3D)。在一些实施例中,事件识别器325-1基于设备/全局内部状态134(图1C)中的一个或多个值,选择事件识别器325-1中的多个姿态定义中的一个。然后,根据所选择的事件定义,在处理子事件序列中下一个子事件之前,至少一个事件识别器处理各自的子事件。在一些实施例中,用于视图层次结构中有效涉及的视图的两个或更多个事件识别器中的每一个具有多个事件定义,并根据电子设备的内部状态选择出该多个事件定义中的一个。在这样的实施例中,根据所选择的事件定义,在处理子事件序列中下一个子事件之前,两个或更多个事件识别器中的至少一个处理各自的子事件。At least one event recognizer for a view actively involved in the view hierarchy has (1014) a plurality of event definitions and selects one of the plurality of event definitions based on an internal state of the electronic device. For example, event recognizer 325-1 has multiple pose definitions (eg, 3037-1 and 3037-2, Figure 3D). In some embodiments, event recognizer 325-1 selects one of multiple pose definitions in event recognizer 325-1 based on one or more values in device/global internal state 134 (FIG. 1C). Then, according to the selected event definition, at least one event recognizer processes the respective sub-event before processing the next sub-event in the sequence of sub-events. In some embodiments, each of the two or more event recognizers for actively involved views in the view hierarchy has multiple event definitions, and the multiple event definitions are selected based on the internal state of the electronic device one of the. In such embodiments, at least one of the two or more event recognizers processes the respective sub-event before processing the next sub-event in the sequence of sub-events, according to the selected event definition.
例如,图7J-7K例示了开始显示下一个应用程序的应用程序视图的下一个应用程序姿态。在一些实施例中,应用程序启动器包括下一个应用程序姿态识别器,该下一个应用程序姿态识别器包括匹配三指左挥击姿态的姿态定义。出于该例的目的,假设该下一个应用程序姿态识别器还包括列应于四指左挥击姿态的姿态定义。当设备/全局内部状态134中的一个或多个值被设置为默认值时,该下一个应用程序姿态识别器使用三指左挥击姿态定义,而不使用四指左挥击姿态定义。当设备/全局内部状态134中的一个或多个值被修改(例如,通过使用辅助模块127,图1C)时,该下一个应用程序姿态识别器使用四指左挥击姿态定义,而不使用三指左挥击姿态定义。因此,在该例中,当设备/全局内部状态134中的一个或多个值被修改时,四指左挥击姿态开始显示下一个应用程序的应用程序视图。For example, FIGS. 7J-7K illustrate a next application gesture that begins displaying the application view of the next application. In some embodiments, the application launcher includes a next application gesture recognizer that includes a gesture definition that matches a three-finger left swipe gesture. For the purposes of this example, assume that the next application gesture recognizer also includes a gesture definition that corresponds to a four-finger left swipe gesture. When one or more values in the device/global internal state 134 are set to default values, the next application gesture recognizer uses the three-finger left swipe gesture definition instead of the four-finger left swipe gesture definition. When one or more values in device/global internal state 134 are modified (e.g., by using auxiliary module 127, FIG. 1C ), the next application gesture recognizer uses the four-finger left swipe gesture definition instead of Three-finger left swipe gesture definition. Thus, in this example, when one or more values in device/global internal state 134 are modified, a four-finger left swipe gesture begins displaying the application view of the next application.
类似地,图7R-7S例示了,响应于检测到五指捏姿态,始位画面姿态开始以缩小比例显示网页浏览器应用程序视图712-6以及至少显示始位画面708的一部分。基于设备/全局内部状态134和始位画面姿态识别器中的姿态定义,四指捏姿态、三指捏姿态或任何其他适合的姿态可以用于开始以缩小比例显示网页浏览器应用程序视图712-6以及至少显示始位画面708的一部分。Similarly, FIGS. 7R-7S illustrate that, in response to detecting the five-finger pinch gesture, the home screen gesture begins displaying web browser application view 712-6 and at least a portion of home screen 708 at a reduced scale. Based on the device/global internal state 134 and the gesture definitions in the home screen gesture recognizer, a four-finger pinch gesture, a three-finger pinch gesture, or any other suitable gesture can be used to initiate a reduced scale display of the web browser application view 712- 6 and at least a portion of the home screen 708 is displayed.
在一些实施例中,多个事件定义包括(1020)对应于具有第一手指个数的第一挥击姿态的第一事件定义以及对应于具有与第一手指个数不同的第二手指个数的第二挥击姿态的第二事件定义。例如,各自姿态识别器的多个事件定义可以包括三指挥击姿态和四指挥击姿态。In some embodiments, the plurality of event definitions includes (1020) a first event definition corresponding to a first swipe gesture having a first number of fingers and a first event definition corresponding to a second number of fingers different from the first number of fingers. The second event definition for the second swipe gesture. For example, multiple event definitions for respective gesture recognizers may include three-finger tap gestures and four-finger tap gestures.
在一些实施例中,多个事件定义包括与具有第一手指个数的第一类型的第一姿态相对应的第一事件定义以及与具有和第一手指个数不同的第二手指个数的第一类型的第二姿态相对应的第二事件定义(例如,一个手指的轻敲姿态和两个手指的轻敲姿态、两个手指的捏姿态和三个手指的捏姿态等等)。In some embodiments, the plurality of event definitions includes a first event definition corresponding to a first type of first gesture having a first number of fingers and a first event definition corresponding to a second number of fingers different from the first number of fingers A second event definition corresponding to a second gesture of the first type (eg, one-finger tap gesture vs. two-finger tap gesture, two-finger pinch gesture vs. three-finger pinch gesture, etc.).
在一些实施例中,多个事件定义包括对应于第一姿态的第一事件定义以及对应于和第一姿态不同的第二姿态的第二事件定义(例如,挥击姿态和捏姿态、挥击姿态和轻敲姿态等等)。In some embodiments, the plurality of event definitions includes a first event definition corresponding to a first gesture and a second event definition corresponding to a second gesture different from the first gesture (e.g., a swipe gesture and a pinch gesture, a swipe Gesture and Tap Gesture, etc.).
在一些实施例中,根据电子设备的内部状态以及(由电子设备作出的)关于各自的事件定义不对应于除了各自的事件识别器之外的用于有效涉及的视图的任何事件识别器的事件定义的确定,针对各自的事件识别器选择(1022)多个事件定义中的各自的定义。In some embodiments, an event that does not correspond to any event recognizer for an actively involved view other than the respective event recognizer is defined according to the internal state of the electronic device and (by the electronic device) with respect to the respective event Determination of definitions selects (1022) respective ones of the plurality of event definitions for respective event recognizers.
例如,各自的姿态识别器可以具有两个事件定义:与通常用于正常操作模式的三指左挥击姿态相对应的第一事件定义,以及与通常用于辅助操作模式的四指左挥击姿态相对应的第二事件定义。当以使该电子设备运行在辅助模式下的方式设置电子设备的内部状态时,电子装备确定用于第二事件定义的四指左挥击姿态是否被用于有效涉及的视图的任何其他事件识别器使用。如果用于有效涉及的视图的任何其他事件识别器没有使用四指左挥击姿态,那么为辅助操作模式下的各自的姿态识别器选择该四指左挥击姿态。另一方面,如果用于有效涉及的视图的任何其他事件识别器使用了四指左挥击姿态,那么即使在辅助操作模式中也使用三指左挥击姿态用于各自的姿态识别器。这样防止了两个或更多个姿态识别器不期望地响应于同一个姿态。For example, a respective gesture recognizer may have two event definitions: a first event definition corresponding to a three-finger left swipe gesture typically used in normal mode of operation, and a first event definition corresponding to a four-finger left swipe gesture typically used in assisted mode of operation. The second event definition corresponding to the gesture. When the internal state of the electronic device is set in such a way as to cause the electronic device to operate in an assist mode, the electronic equipment determines whether the four-finger left swipe gesture defined for the second event is recognized for any other event for the view effectively involved device use. If no other event recognizer for the actively involved view is using the four-finger left-swipe gesture, then that four-finger left-swipe gesture is selected for the respective gesture recognizer in Assisted Operations mode. On the other hand, if any other event recognizer for the actively involved view uses the four-finger left-swipe gesture, then the three-finger left-swipe gesture is used for the respective gesture recognizer even in Assisted Operations mode. This prevents two or more gesture recognizers from undesirably responding to the same gesture.
在一些实施例中,根据电子设备的内部状态以及(由电子设备作出的)关于各自的事件定义不对应于除了各自的事件识别器之外的任何事件识别器(包括用于有效涉及的视图以及任何其他视图的事件识别器)的事件定义的确定,针对一个各自的事件识别器选择多个事件定义中的一个各自的事件定义。In some embodiments, the event definition does not correspond to any event recognizer other than the respective event recognizer (including views for active reference and event recognizer of any other view), selecting a respective one of the plurality of event definitions for a respective event recognizer.
在一些实施例中,用于视图层次结构中有效涉及的视图的两个或更多个事件识别器中的每一个都具有(1024)各自的多个事件定义,根据电子设备的内部状态以及(由电子设备作出的)关于各自的事件定义不对应于针对除了各自的事件识别器之外的具有两个或更多个事件定义的任何事件识别器选择的任何事件定义的确定,针对一个各自的事件识别器选择各自的多个事件定义中的一个各自的事件定义。In some embodiments, each of the two or more event recognizers for the views actively involved in the view hierarchy has (1024) a respective plurality of event definitions, according to the internal state of the electronic device and ( A determination made by the electronic device that the respective event definitions do not correspond to any event definition selected for any event recognizer having two or more event definitions other than the respective event recognizer, for a respective The event recognizer selects a respective one of the respective plurality of event definitions.
例如,有效涉及的视图可以具有第一姿态识别器和第二姿态识别器。在该例中,第一姿态识别器具有:与通常用于正常操作模式的三指左挥击姿态相对应的第一事件定义,以及与通常用于辅助操作模式的四指左挥击姿态相对应的第二事件定义。第二姿态识别器具有:与通常用于正常操作模式的两指左挥击姿态相对应的第三事件定义,以及与通常用于辅助操作模式的四指左挥击姿态相对应的第四事件定义。当以使该电子设备运行在辅助模式下的方式设置电子设备的内部状态时,电子设备确定是否针对具有两个或更多个事件定义的任何其他事件识别器(例如,第二事件姿态识别器)选择满足第二事件定义的四指左挥击姿态。如果没有针对具有两个或更多个事件定义的任何其他事件识别器选择四指左挥击姿态,那么针对辅助操作模式下的第一姿态识别器选择该四指左挥击姿态。结果是,没有针对第二姿态识别器选择四指左挥击姿态,因为已经针对第一姿态识别器选择了四指左挥击姿态。代替地,针对第二姿态识别器选择两指左挥击姿态,因为没有针对包括第一姿态识别器在内的具有两个或更多个事件定义的任何其他姿态识别器选择两指左挥击姿态。在另一个例子中,有效涉及的视图具有第一姿态识别器和第三姿态识别器而不具有第二姿态识别器。第三姿态识别器具有通常用于正常操作模式的第三事件定义(对应于两指左挥击姿态)以及对应于通常用于辅助操作模式的三指左挥击姿态的第五事件定义。在辅助操作模式下,可针对第三姿态识别器选择三指左挥击姿态,因为三指左挥击姿态并没有针时具有两个或更多个事件定义的其它任何姿态识别器选择。For example, an actively involved view may have a first gesture recognizer and a second gesture recognizer. In this example, the first gesture recognizer has a first event definition corresponding to the three-finger left swipe gesture typically used in the normal mode of operation, and a first event definition corresponding to the four-finger left swipe gesture typically used in the assisted mode of operation. The corresponding second event definition. The second gesture recognizer has a third event definition corresponding to the two-finger left swipe gesture typically used in the normal operating mode, and a fourth event corresponding to the four-finger left swipe gesture typically used in the assisted operating mode definition. When the internal state of the electronic device is set in such a way as to cause the electronic device to operate in an auxiliary mode, the electronic device determines whether to ) selects a four-finger left swipe gesture satisfying the second event definition. If the four-finger left-swipe gesture is not selected for any other event recognizer with two or more event definitions, then the four-finger left-swipe gesture is selected for the first gesture recognizer in the assisted mode of operation. As a result, the four-finger left swipe gesture is not selected for the second gesture recognizer because the four-finger left swipe gesture was already selected for the first gesture recognizer. Instead, the two-finger left-swipe gesture is selected for the second gesture recognizer because two-finger left-swipe is not selected for any other gesture recognizer including the first gesture recognizer with two or more event definitions attitude. In another example, the actively involved view has the first gesture recognizer and the third gesture recognizer but does not have the second gesture recognizer. The third gesture recognizer has a third event definition (corresponding to the two-finger left swipe gesture) typically used for the normal mode of operation and a fifth event definition corresponding to the three-finger left swipe gesture typically used for the assisted mode of operation. In assisted operation mode, the three-finger left swipe gesture may be selected for the third gesture recognizer, since the three-finger left swipe gesture does not have any other gesture recognizer selections with two or more event definitions when the pin is present.
尽管上述例子是关于多指左挥击姿态描述的,但是上述方法适用于任何方向的挥击姿态(例如,右挥击姿态、上挥击姿态、下挥击姿态和/或任何斜挥击姿态)或者任何其他种类的姿态(例如,轻敲姿态、捏姿态、散开姿态等等)。Although the above examples are described with respect to a multi-finger left swipe gesture, the above method is applicable to swipe gestures in any direction (e.g., a right swipe gesture, an up swipe gesture, a down swipe gesture, and/or any diagonal swipe gesture ) or any other kind of gesture (eg, tap gesture, pinch gesture, spread gesture, etc.).
在一些实施例中,根据所选择的事件定义处理各自的子事件包括(1026)显示与包括视图层次结构的软件不同的第一软件应用程序的一个或多个视图(例如,同时至少显示包括软件的一个或多个视图的用户界面712-6的一部分以及始位画面708的一部分,图7S)。In some embodiments, processing the respective sub-events according to the selected event definition includes (1026) displaying one or more views of the first software application different from the software comprising the view hierarchy (e.g., simultaneously displaying at least one view comprising the software A portion of the user interface 712-6 of one or more views of 1 and a portion of the home screen 708, FIG. 7S).
在一些实施例中,至少一个事件识别器通过将视图层次结构的一个或多个视图的显示替换为与包括视图层次结构的软件不同的第一软件应用程序的一个或多个视图(例如,始位画面708,图7A)的显示而处理(1028)各自的子事件。In some embodiments, at least one event recognizer operates by replacing the display of one or more views of the view hierarchy with one or more views of the first software application that are different from the software that includes the view hierarchy (e.g., always The respective sub-events are processed (1028) for the display of the bit picture 708, FIG. 7A).
在一些实施例中,至少一个事件识别器通过以下操作处理(1030)各自的子事件:在电子设备中的显示器的第一预定区域中显示至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标;以及同时至少显示视图层次结构的一个或多个视图的子集(例如,打开的应用程序图标5004和用户界面712-6的至少一部分,图7H)。例如,响应于正常操作模式下的三指上挥击姿态和辅助操作模式下的四指上挥击姿态,电子设备同时显示该组打开的应用程序图标以及至少视图层次结构的一个或多个视图的子集。In some embodiments, at least one event recognizer processes (1030) a respective sub-event by displaying in a first predetermined area of a display in the electronic device an a set of open application icons; and simultaneously displaying at least a subset of the one or more views of the view hierarchy (eg, open application icons 5004 and at least a portion of user interface 712-6, FIG. 7H ). For example, in response to a three-finger swipe up gesture in the normal operating mode and a four-finger swipe up gesture in the assisted operating mode, the electronic device simultaneously displays the set of open application icons and at least one or more views of the view hierarchy subset of .
根据一些实施例,图11显示了根据上述的发明原理配置的电子设备1100的功能框图。设备的功能块可以由硬件、软件或软件和硬件的结合来实现,用以执行本发明的原理。本领域技术人员理解,图11中描述的功能块可以合并或划分成子模块,用以实现上述的本发明的原理。因此,本文的描述可以支持本文描述的功能块的任何可能的合并、划分或进一步定义。According to some embodiments, Fig. 11 shows a functional block diagram of an electronic device 1100 configured according to the inventive principles described above. The functional blocks of the device may be realized by hardware, software or a combination of software and hardware to carry out the principles of the present invention. Those skilled in the art understand that the functional blocks described in FIG. 11 can be combined or divided into sub-modules to realize the above-mentioned principles of the present invention. Therefore, the description herein may support any possible combination, division or further definition of the functional blocks described herein.
如图11所示,电子设备1100包括配置接收触摸输入的触摸敏感显示单元1102;以及耦接到触摸敏感显示单元1102的处理单元1106。在一些实施例中,处理单元1106包括执行单元1108、显示使能单元1110、检测单元1112、传送单元1114、认定单元1116以及触摸输入处理单元1118。As shown in FIG. 11 , the electronic device 1100 includes a touch-sensitive display unit 1102 configured to receive touch input; and a processing unit 1106 coupled to the touch-sensitive display unit 1102 . In some embodiments, the processing unit 1106 includes an execution unit 1108 , a display enabling unit 1110 , a detection unit 1112 , a transmission unit 1114 , a determination unit 1116 and a touch input processing unit 1118 .
处理单元1106配置成:至少执行第一软件应用程序和第二软件应用程序(例如,使用执行单元1108)。第一软件应用程序包括第一组一个或多个姿态识别器,且第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有相对应的姿态处理器。处理单元1106配置成使得能够至少显示第二软件应用程序的一个或多个视图的子集(例如,使用显示使能单元1110,在触摸敏感显示单元1102上)。处理单元1106配置成:当至少显示第二软件应用程序的一个或多个视图的子集时:检测触摸敏感显示单元1102上的触摸输入序列(例如,使用检测单元1112)。触摸输入序列包括一个或多个触摸输入的第一部分以及第一部分之后的一个或多个触摸输入的第二部分。处理单元1106配置成,在检测触摸输入序列的第一阶段期间:传送一个或多个触摸输入的第一部分到第一软件应用程序和第二软件应用程序(例如,使用传送单元1114);从第一组中的姿态识别器中认定识别一个或多个触摸输入的第一部分的一个或多个匹配的姿态识别器(例如,使用认定单元1116);以及用对应于一个或多个匹配的姿态识别器的一个或多个姿态处理器来处理一个或多个触摸输入的第一部分(例如,使用触摸输入处理单元1118)。Processing unit 1106 is configured to execute at least a first software application and a second software application (eg, using execution unit 1108 ). The first software application includes a first set of one or more gesture recognizers, and the second software application includes one or more views and a second set of one or more gesture recognizers. Each gesture recognizer has a corresponding gesture processor. Processing unit 1106 is configured to enable display of at least a subset of the one or more views of the second software application (eg, on touch-sensitive display unit 1102 using display enabling unit 1110 ). Processing unit 1106 is configured to: when displaying at least a subset of the one or more views of the second software application: detect a sequence of touch inputs on touch-sensitive display unit 1102 (eg, using detection unit 1112 ). The sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion. The processing unit 1106 is configured to, during the first phase of the sequence of detecting touch inputs: transmit a first portion of the one or more touch inputs to the first software application and the second software application (e.g., using the transmit unit 1114); identifying one or more matching gesture recognizers among the gesture recognizers in the set that recognize the first portion of the one or more touch inputs (e.g., using identifying unit 1116); One or more gesture processors of the controller to process the first portion of the one or more touch inputs (eg, using touch input processing unit 1118).
在一些实施例中,处理单元1106配置成,当一个或多个触摸输入的第一部分中的触摸输入至少部分地交叠于第二软件应用程序的显示的视图中的至少一个时,检测触摸输入序列(例如,使用检测单元1112)。In some embodiments, the processing unit 1106 is configured to detect a touch input when the touch input in the first portion of the one or more touch inputs at least partially overlaps at least one of the displayed views of the second software application sequence (eg, using detection unit 1112).
在一些实施例中,处理单元1106配置成,使得能够至少显示第二软件应用程序的一个或多个视图的子集,而不显示第一软件应用程序的任何视图(例如,使用显示使能单元1110,在触摸敏感显示单元1102上)。In some embodiments, the processing unit 1106 is configured to enable display of at least a subset of the one or more views of the second software application without displaying any views of the first software application (e.g., using a display enabling unit 1110, on the touch-sensitive display unit 1102).
在一些实施例中,处理单元1106配置成,使得能够至少显示第二软件应用程序的一个或多个视图的子集,而不显示任何其他应用程序的视图(例如,使用显示使能单元1110,在触摸敏感显示单元1102上)。In some embodiments, processing unit 1106 is configured to enable display of at least a subset of the one or more views of the second software application without displaying any other application's views (e.g., using display enabling unit 1110, on the touch-sensitive display unit 1102).
在一些实施例中,处理单元1106配置成,在第一阶段之后,在检测触摸输入序列的第二阶段期间:传送一个或多个触摸输入的第二部分到第一软件应用程序,而不传送一个或多个触摸输入的第二部分到第二软件应用程序(例如,使用传送单元1114);从一个或多个匹配的姿态识别器中认定识别触摸输入序列的第二匹配的姿态识别器(例如,使用认定单元1116);以及使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列(例如,使用触摸输入处理单元1118)。In some embodiments, the processing unit 1106 is configured, after the first phase, during the second phase of the sequence of detecting touch inputs to: transmit a second portion of the one or more touch inputs to the first software application without transmitting A second portion of the one or more touch inputs to a second software application (e.g., using the transfer unit 1114); identifying a second matching gesture recognizer that recognizes the sequence of touch inputs from among the one or more matching gesture recognizers ( For example, using identification unit 1116); and processing the sequence of touch inputs using gesture processors corresponding to respective matching gesture recognizers (eg, using touch input processing unit 1118).
在一些实施例中,处理单元1106配置成,通过使得能够显示第一软件应用程序的一个或多个视图(例如,使用显示使能单元1110,在触摸敏感显示单元1102上)而使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列。In some embodiments, processing unit 1106 is configured to display one or more views of the first software application (eg, using display enabling unit 1110 on touch-sensitive display unit 1102) using the Match the gesture recognizer to the gesture handler to process touch input sequences.
在一些实施例中,处理单元1106配置成,通过将第二软件应用程序的一个或多个视图的显示替换为第一软件应用程序的一个或多个视图的显示(例如,使用显示使能单元1110,在触摸敏感显示单元1102上)而使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列。In some embodiments, the processing unit 1106 is configured to replace the display of the one or more views of the second software application with the display of the one or more views of the first software application (e.g., using a display enabling unit 1110, on the touch-sensitive display unit 1102) to process the touch input sequence using gesture processors corresponding to respective matching gesture recognizers.
在一些实施例中,处理单元1106配置成:同时执行第一软件应用程序、第二软件应用程序以及第三软件应用程序(例如,使用执行单元1108);以及通过将第二软件应用程序的一个或多个显示的视图替换为第三软件应用程序的一个或多个视图(例如,使用显示使能单元1110,在触摸敏感显示单元1102上)而使用对应于各自匹配的姿态识别器的姿态处理器来处理触摸输入序列。In some embodiments, processing unit 1106 is configured to: simultaneously execute the first software application, the second software application, and the third software application (e.g., using execution unit 1108); One or more displayed views are replaced with one or more views of a third software application (e.g., using display enabling unit 1110, on touch-sensitive display unit 1102) using gesture processing corresponding to a respective matching gesture recognizer controller to handle touch input sequences.
在一些实施例中,处理单元1106配置成:使得能够在触摸敏感显示单元1102的第一预定区域中显示至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标(例如,使用显示使能单元1110);并使得能够至少显示第二软件应用程序的一个或多个视图的子集(例如,使用显示使能单元1110)。In some embodiments, the processing unit 1106 is configured to enable display in a first predetermined area of the touch-sensitive display unit 1102 a set of open application icons corresponding to at least some of the plurality of simultaneously open application programs (e.g. , using the display enabling unit 1110); and enabling display of at least a subset of the one or more views of the second software application (eg, using the display enabling unit 1110).
在一些实施例中,第一软件应用程序是应用程序启动器。In some embodiments, the first software application is an application launcher.
在一些实施例中,第一软件应用程序是操作系统应用程序。In some embodiments, the first software application is an operating system application.
根据一些实施例,图12显示了根据上述的本发明的原理配置的电子设备1200的功能框图。设备的功能块可以由硬件、软件或软件和硬件的结合来实现,用以执行本发明的原理。本领域技术人员理解,图12中描述的功能块可以合并或划分成子模块,用以实现上述的本发明的原理。因此,本文的描述可以支持本文描述的功能块的任何可能的合并、划分或进一步定义。According to some embodiments, Figure 12 shows a functional block diagram of an electronic device 1200 configured in accordance with the principles of the invention described above. The functional blocks of the device may be realized by hardware, software or a combination of software and hardware to carry out the principles of the present invention. Those skilled in the art understand that the functional blocks described in FIG. 12 can be combined or divided into sub-modules to realize the above-mentioned principles of the present invention. Therefore, the description herein may support any possible combination, division or further definition of the functional blocks described herein.
如图12所示,电子设备1200包括配置成接收触摸输入的触摸敏感显示单元1202;以及耦接到触摸敏感显示单元1202的处理单元1206。在一些实施例中,处理单元1206包括执行单元1208、显示使能单元1210、检测单元1212、确定单元1214、传送单元1216以及触摸输入处理单元1218。As shown in FIG. 12 , the electronic device 1200 includes a touch-sensitive display unit 1202 configured to receive touch input; and a processing unit 1206 coupled to the touch-sensitive display unit 1202 . In some embodiments, the processing unit 1206 includes an execution unit 1208 , a display enabling unit 1210 , a detection unit 1212 , a determination unit 1214 , a transmission unit 1216 and a touch input processing unit 1218 .
处理单元1206配置成,至少执行第一软件应用程序和第二软件应用程序(例如,使用执行单元1208)。第一软件应用程序包括第一组一个或多个姿态识别器,且第二软件应用程序包括一个或多个视图以及第二组一个或多个姿态识别器。各自的姿态识别器具有相对应的姿态处理器。处理单元1206配置成使得能够显示第一组一个或多个视图(例如,使用显示使能单元1210)。第一组一个或多个视图至少包括第二软件应用程序的一个或多个视图的子集。处理单元1206配置成,当显示第一组一个或多个视图时,检测触摸敏感显示单元上的触摸输入序列(例如,使用检测单元1212)。触摸输入序列包括一个或多个触摸输入的第一部分以及第一部分之后的一个或多个触摸输入的第二部分。处理单元1206配置成,确定是否第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的第一部分(例如,使用确定单元1214)。处理单元1206配置成,根据关于第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的第一部分的确定:传送触摸输入序列到第一软件应用程序,而不传送触摸输入序列到第二软件应用程序(例如,使用传送单元1216);确定是否第一组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列(例如,使用确定单元1214)。处理单元1206配置成,根据关于第一组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列的确定,使用第一组一个或多个姿态识别器中的识别触摸输入序列的至少一个姿态识别器来处理触摸输入序列(例如,使用触摸输入处理单元1218)。处理单元1206配置成,根据关于第一组一个或多个姿态识别器中没有姿态识别器识别一个或多个触摸输入的第一部分的确定:传送触摸输入序列到第二软件应用程序(例如,使用传送单元1216);并确定是否第二组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列(例如,使用确定单元1214)。处理单元1206配置成,根据关于第二组一个或多个姿态识别器中的至少一个姿态识别器识别触摸输入序列的确定,使用第二组一个或多个姿态识别器中的识别触摸输入序列的至少一个姿态识别器来处理触摸输入序列(例如,使用触摸输入处理单元1218)。Processing unit 1206 is configured to execute at least a first software application and a second software application (eg, using execution unit 1208 ). The first software application includes a first set of one or more gesture recognizers, and the second software application includes one or more views and a second set of one or more gesture recognizers. Each gesture recognizer has a corresponding gesture processor. The processing unit 1206 is configured to enable display of the first set of one or more views (eg, using the display enabling unit 1210). The first set of one or more views includes at least a subset of the one or more views of the second software application. The processing unit 1206 is configured to detect a sequence of touch inputs on the touch-sensitive display unit (eg, using the detection unit 1212 ) while displaying the first set of one or more views. The sequence of touch inputs includes a first portion of one or more touch inputs followed by a second portion of one or more touch inputs following the first portion. The processing unit 1206 is configured to determine whether at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the first portion of the one or more touch inputs (eg, using the determining unit 1214 ). The processing unit 1206 is configured to, based on a determination that at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the first portion of the one or more touch inputs: transmit the sequence of touch inputs to the first software application, and not transmitting the touch input sequence to the second software application (e.g., using transmit unit 1216); determining whether at least one gesture recognizer in the first set of one or more gesture recognizers recognizes the touch input sequence (e.g., using determining unit 1214 ). The processing unit 1206 is configured to, based on a determination that at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the sequence of touch inputs, use a sequence of recognized touch inputs from the first set of one or more gesture recognizers At least one gesture recognizer to process the sequence of touch inputs (eg, using touch input processing unit 1218). The processing unit 1206 is configured to, based on a determination that none of the gesture recognizers of the first set of one or more gesture recognizers recognize the first portion of the one or more touch inputs: transmit the sequence of touch inputs to a second software application (e.g., using transmitting unit 1216); and determining whether at least one gesture recognizer of the second set of one or more gesture recognizers recognizes the touch input sequence (eg, using determining unit 1214). The processing unit 1206 is configured to, based on a determination that at least one gesture recognizer of the second set of one or more gesture recognizers recognizes the sequence of touch inputs, use the gesture recognizer in the second set of one or more gesture recognizers to recognize the sequence of touch inputs. At least one gesture recognizer to process the sequence of touch inputs (eg, using touch input processing unit 1218).
在一些实施例中,触摸输入序列至少部分地交叠于第二软件应用程序的一个或多个显示的视图中的至少一个。In some embodiments, the sequence of touch inputs at least partially overlaps at least one of the one or more displayed views of the second software application.
在一些实施例中,处理单元1206配置成,使得能够显示第一组一个或多个视图,而不显示第一软件应用程序的任何视图(例如,使用显示使能单元1210,在触摸敏感显示单元1202上)。In some embodiments, processing unit 1206 is configured to enable display of the first set of one or more views without displaying any views of the first software application (e.g., using display enabling unit 1210 on a touch-sensitive display unit 1202).
在一些实施例中,处理单元1206配置成,使得能够显示第一组一个或多个视图,而不显示任何其他软件应用程序的视图(例如,使用显示使能单元1210,在触摸敏感显示单元1202上)。In some embodiments, processing unit 1206 is configured to enable display of a first set of one or more views without displaying views of any other software applications (e.g., using display enabling unit 1210 on touch-sensitive display unit 1202 superior).
在一些实施例中,在确定第一组一个或多个姿态识别器中的至少一个姿态识别器识别一个或多个触摸输入的第一部分之前,处理单元1206配置成,同时传送一个或多个触摸输入的第一部分到第一软件应用程序和第二软件应用程序(例如,使用传送单元1216)。In some embodiments, prior to determining that at least one gesture recognizer of the first set of one or more gesture recognizers recognizes the first portion of the one or more touch inputs, the processing unit 1206 is configured to simultaneously transmit the one or more touch The first portion of the input is to a first software application and a second software application (eg, using transfer unit 1216).
在一些实施例中,第一软件应用程序是应用程序启动器。In some embodiments, the first software application is an application launcher.
在一些实施例中,第一软件应用程序是操作系统应用程序。In some embodiments, the first software application is an operating system application.
在一些实施例中,处理单元1206配置成,通过使得能够显示第一软件应用程序的一个或多个视图(例如,使用显示使能单元1208,在触摸敏感显示单元1202上),而使用第一组一个或多个姿态识别器中的至少一个姿态识别器,来处理触摸输入序列。In some embodiments, the processing unit 1206 is configured to use the first software application by enabling the display of one or more views of the first software application (e.g., using the display At least one gesture recognizer of the one or more gesture recognizers is configured to process the sequence of touch inputs.
在一些实施例中,处理单元1206配置成,通过将第一组一个或多个视图的显示替换为第一软件应用程序的一个或多个视图的显示(例如,使用显示使能单元1208,在触摸敏感显示单元1202上),而使用第一组一个或多个姿态识别器中的至少一个姿态识别器,来处理触摸输入序列。In some embodiments, the processing unit 1206 is configured to replace the display of the first set of one or more views with the display of the one or more views of the first software application (e.g., using the display enabling unit 1208, at touch-sensitive display unit 1202), while processing the sequence of touch inputs using at least one gesture recognizer in the first set of one or more gesture recognizers.
在一些实施例中,处理单元1206配置成,同时执行第一软件应用程序、第二软件应用程序以及第三软件应用程序(例如,使用执行单元1208)。处理单元1206配置成,通过将第一组一个或多个视图替换为第三软件应用程序的一个或多个视图(例如,使用显示使能单元1210,在触摸敏感显示单元1202上)而使用第一组一个或多个姿态识别器中的至少一个姿态识别器来处理触摸输入序列。In some embodiments, processing unit 1206 is configured to simultaneously execute the first software application, the second software application, and the third software application (eg, using execution unit 1208 ). The processing unit 1206 is configured to use the first set of one or more views by replacing the first set of one or more views with one or more views of the third software application (e.g., using the display enabling unit 1210 on the touch-sensitive display unit 1202). At least one gesture recognizer of the set of one or more gesture recognizers processes the sequence of touch inputs.
在一些实施例中,处理单元1206配置成:使得能够在触摸敏感显示单元1202的第一预定区域中显示至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标(例如,使用显示使能单元1210);并同时至少显示第一组一个或多个视图的子集(例如,使用显示使能单元1210)。In some embodiments, the processing unit 1206 is configured to enable display in a first predetermined area of the touch-sensitive display unit 1202 a set of open application icons corresponding to at least some of the plurality of simultaneously open application programs (e.g. , using display enabling unit 1210); and simultaneously displaying at least a subset of the first set of one or more views (eg, using display enabling unit 1210).
根据一些实施例,图13显示了根据上述的本发明原理配置的电子设备1300的功能框图。设备的功能块可以由硬件、软件或软件和硬件的结合来实现,用以执行本发明的原理。本领域技术人员理解,图13中描述的功能块可以合并或划分成子模块,用以实现上述的本发明的原理。因此,本文的描述可以支持本文描述的功能块的任何可能的合并、划分或进一步定义。According to some embodiments, Figure 13 shows a functional block diagram of an electronic device 1300 configured in accordance with the principles of the invention described above. The functional blocks of the device may be realized by hardware, software or a combination of software and hardware to carry out the principles of the present invention. Those skilled in the art understand that the functional blocks described in FIG. 13 can be combined or divided into sub-modules to realize the above-mentioned principles of the present invention. Therefore, the description herein may support any possible combination, division or further definition of the functional blocks described herein.
如图13所示,电子设备1300包括配置成显示一个或多个视图的显示单元1302;配置成存储内部状态的存储器单元1304;以及耦接到显示单元1302和存储器单元1304的处理单元1306。在一些实施例中,处理单元1306包括执行单元1308、显示使能单元1310、检测单元1312、认定单元1314、传送单元1316以及事件/子事件处理单元1318。在一些实施例中,处理单元1306包括存储器单元1304。As shown in FIG. 13 , electronic device 1300 includes a display unit 1302 configured to display one or more views; a memory unit 1304 configured to store an internal state; and a processing unit 1306 coupled to display unit 1302 and memory unit 1304 . In some embodiments, the processing unit 1306 includes an execution unit 1308 , a display enabling unit 1310 , a detection unit 1312 , an assertion unit 1314 , a transmission unit 1316 , and an event/sub-event processing unit 1318 . In some embodiments, processing unit 1306 includes memory unit 1304 .
处理单元1306配置成:执行包括具有多个视图的视图层次结构的软件(例如,使用执行单元1308);使得能够显示视图层次结构中的一个或多个视图(例如,使用显示使能单元1310,在显示单元1302上);以及执行一个或多个软件元素(例如,使用执行单元1308)。每个软件元素与特定的视图相关联,且每个特定视图包括一个或多个事件识别器。每个事件识别器具有:基于一个或多个子事件的一个或多个事件定义,以及事件处理器。事件处理器指定对目标的动作,并被配置成响应于事件识别器检测到与一个或多个事件定义中的特定事件定义相对应的事件而发送动作到目标。处理单元1306配置成:检测一个或多个子事件的序列(例如,使用检测单元1312);以及认定视图层次结构中的一个视图作为点击视图(例如,使用认定单元1314)。点击视图确立视图层次结构中的哪些视图是有效涉及的视图。处理单元1306配置成,传送各自的子事件到用于视图层次结构中的每个有效涉及的视图,的事件识别器(例如,使用传送单元1316)。用于视图层次结构中有效涉及的视图的至少一个事件识别器具有多个事件定义,并根据电子设备的内部状态选择该多个事件定义中的一个,并且根据所选择的事件定义,在处理子事件序列中的下一个子事件之前,至少一个事件识别器处理各自的子事件(例如,使用事件/子事件处理单元1318)。The processing unit 1306 is configured to: execute software comprising a view hierarchy having a plurality of views (e.g., using the execution unit 1308); enable display of one or more views in the view hierarchy (e.g., using the display enabling unit 1310, on display unit 1302); and execute one or more software elements (eg, using execution unit 1308). Each software element is associated with a specific view, and each specific view includes one or more event recognizers. Each event recognizer has: one or more event definitions based on one or more sub-events, and an event handler. The event handler specifies an action on the target and is configured to send the action to the target in response to the event recognizer detecting an event corresponding to a particular event definition of the one or more event definitions. The processing unit 1306 is configured to: detect the sequence of one or more sub-events (eg, using the detecting unit 1312 ); and identify a view in the view hierarchy as the clicked view (eg, using the identifying unit 1314 ). Clicking on a view establishes which views in the view hierarchy are effectively referenced views. Processing unit 1306 is configured to transmit a respective sub-event to an event recognizer for each actively involved view in the view hierarchy (eg, using transmit unit 1316 ). at least one event recognizer for a view actively involved in the view hierarchy has a plurality of event definitions, and selects one of the plurality of event definitions according to the internal state of the electronic device, and according to the selected event definition, in the processing child Prior to the next sub-event in the sequence of events, at least one event recognizer processes the respective sub-event (eg, using event/sub-event processing unit 1318).
在一些实施例中,多个事件定义包括与具有第一手指个数的第一挥击姿态相对应的第一事件定义,以及与具有和第一手指个数不同的第二手指个数的第二挥击姿态相对应的第二事件定义。In some embodiments, the plurality of event definitions includes a first event definition corresponding to a first swipe gesture having a first number of fingers, and a first event definition corresponding to a second number of fingers different from the first number of fingers. The second event definition corresponding to the second swipe gesture.
在一些实施例中,内部状态包括用于辅助操作模式的一个或多个设置。In some embodiments, the internal state includes one or more settings for the secondary mode of operation.
在一些实施例中,根据电子设备的内部状态以及关于各自的事件定义不对应于除了各自的事件识别器之外的用于有效涉及的视图的任何事件识别器的事件定义的确定,针对一个各自的事件识别器选择多个事件定义中的一个各自的事件定义。In some embodiments, a respective The event recognizer of selects a respective event definition among a plurality of event definitions.
在一些实施例中,用于视图层次结构中有效涉及的视图的两个或更多个事件识别器中的每一个都具有各自的多个事件定义,根据电子设备的内部状态以及关于各自的事件定义不对应于针对除了各自的事件识别器之外的具有两个或更多个事件定义的任何事件识别器选择的任何事件定义的确定,针对一个各自的事件识别器选择各自的多个事件定义中的一个各自的事件定义。In some embodiments, each of the two or more event recognizers for the views actively involved in the view hierarchy has its own plurality of event definitions, based on the internal state of the electronic device and on the respective event definition does not correspond to a determination of any event definition selected for any event recognizer with two or more event definitions other than the respective event recognizer for which the respective multiple event definitions are selected A respective event definition in .
在一些实施例中,处理单元1306配置成,通过使得能够显示与包括视图层次结构的软件不同的第一软件应用程序的一个或多个视图(例如,使用显示使能单元1310,在显示单元1302上),根据所选择的事件定义来处理各自的子事件。In some embodiments, processing unit 1306 is configured to display one or more views of the first software application differently than the software comprising the view hierarchy (e.g., using display enabling unit 1310 at display unit 1302 above), the respective sub-events are processed according to the selected event definition.
在一些实施例中,处理单元1306配置成,通过将视图层次结构的一个或多个视图的显示替换为与包括视图层次结构的软件不同的第一软件应用程序的一个或多个视图的显示(例如,使用显示使能单元1310,在显示单元1302上),来处理各自的子事件。In some embodiments, the processing unit 1306 is configured by replacing the display of the one or more views of the view hierarchy with the display of the one or more views of the first software application different from the software comprising the view hierarchy ( For example, using the display enable unit 1310, on the display unit 1302), to process the respective sub-events.
在一些实施例中,处理单元1306配置成通过以下操作来处理各自的子事件:使得能够在显示单元1302的第一预定区域中显示至少对应于多个同时打开的应用程序中的一些的一组打开的应用程序图标(例如,使用显示使能单元1310);以及使得能够同时至少显示视图层次结构中的一个或多个视图的子集(例如,使用显示使能单元1310)。In some embodiments, the processing unit 1306 is configured to process the respective sub-events by enabling display in the first predetermined area of the display unit 1302 at least a set of sub-events corresponding to at least some of the plurality of simultaneously open application programs open application icons (eg, using display-enabling unit 1310 ); and enabling simultaneous display of at least a subset of one or more views in the view hierarchy (eg, using display-enabling unit 1310 ).
在一些实施例中,软件是应用程序启动器。In some embodiments, the software is an application launcher.
在一些实施例中,软件是操作系统应用程序。In some embodiments, the software is an operating system application.
出于解释目的,关于具体实施例给出了上面的描述。然而,上述例示性的讨论并不旨在穷举,或要将本发明局限于所公开的确切形式。根据上述教导,许多修改和变体都是可能的。所选择与所描述的实施例是为了最佳地说明本发明的原理及其实际应用,由此能使本领域技术人员最佳地使用本发明,以及使用具有与所设想的实际运用相适合的各种修改的不同实施例。The foregoing descriptions, for purposes of explanation, have been presented in terms of specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching. The embodiment was chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to make the best use of the invention and the use of the present invention with the characteristics appropriate to the practice contemplated. Different embodiments with various modifications.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610383388.7ACN106095418B (en) | 2010-12-20 | 2011-12-20 | Event recognition |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US201061425222P | 2010-12-20 | 2010-12-20 | |
| US61/425,222 | 2010-12-20 | ||
| US13/077,524 | 2011-03-31 | ||
| US13/077,927US8566045B2 (en) | 2009-03-16 | 2011-03-31 | Event recognition |
| US13/077,931 | 2011-03-31 | ||
| US13/077,927 | 2011-03-31 | ||
| US13/077,931US9311112B2 (en) | 2009-03-16 | 2011-03-31 | Event recognition |
| US13/077,524US9244606B2 (en) | 2010-12-20 | 2011-03-31 | Device, method, and graphical user interface for navigation of concurrently open software applications |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610383388.7ADivisionCN106095418B (en) | 2010-12-20 | 2011-12-20 | Event recognition |
| Publication Number | Publication Date |
|---|---|
| CN102768608A CN102768608A (en) | 2012-11-07 |
| CN102768608Btrue CN102768608B (en) | 2016-05-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011205800185UExpired - LifetimeCN203287883U (en) | 2010-12-20 | 2011-12-20 | Electronic equipment and information processing device thereof |
| CN201110463262.8AActiveCN102768608B (en) | 2010-12-20 | 2011-12-20 | event recognition |
| CN201610383388.7AActiveCN106095418B (en) | 2010-12-20 | 2011-12-20 | Event recognition |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011205800185UExpired - LifetimeCN203287883U (en) | 2010-12-20 | 2011-12-20 | Electronic equipment and information processing device thereof |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610383388.7AActiveCN106095418B (en) | 2010-12-20 | 2011-12-20 | Event recognition |
| Country | Link |
|---|---|
| CN (3) | CN203287883U (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080168478A1 (en) | 2007-01-07 | 2008-07-10 | Andrew Platzer | Application Programming Interfaces for Scrolling |
| US20080168402A1 (en) | 2007-01-07 | 2008-07-10 | Christopher Blumenberg | Application Programming Interfaces for Gesture Operations |
| US8645827B2 (en) | 2008-03-04 | 2014-02-04 | Apple Inc. | Touch event model |
| US9684521B2 (en) | 2010-01-26 | 2017-06-20 | Apple Inc. | Systems having discrete and continuous gesture recognizers |
| US8566045B2 (en) | 2009-03-16 | 2013-10-22 | Apple Inc. | Event recognition |
| US10216408B2 (en) | 2010-06-14 | 2019-02-26 | Apple Inc. | Devices and methods for identifying user interface objects based on view hierarchy |
| US10558352B2 (en) | 2012-06-22 | 2020-02-11 | Sony Corporation | Detection device for detection of operation based on contact with operation surface |
| US9733716B2 (en) | 2013-06-09 | 2017-08-15 | Apple Inc. | Proxy gesture recognizer |
| CN105700784A (en)* | 2014-11-28 | 2016-06-22 | 神讯电脑(昆山)有限公司 | Touch input method and electronic apparatus |
| JP2017149225A (en)* | 2016-02-23 | 2017-08-31 | 京セラ株式会社 | Vehicle control unit |
| CN107566879A (en)* | 2017-08-08 | 2018-01-09 | 武汉斗鱼网络科技有限公司 | A kind of management method, device and the electronic equipment of application view frame |
| CN108388393B (en) | 2018-01-02 | 2020-08-28 | 阿里巴巴集团控股有限公司 | Identification method and device for mobile terminal click event |
| CN110196743A (en)* | 2018-12-17 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Method, apparatus, storage medium and the electronic device of event triggering |
| CN113326352B (en)* | 2021-06-18 | 2022-05-24 | 哈尔滨工业大学 | A Sub-Event Relationship Recognition Method Based on Heterogeneous Event Graph |
| CN119828907A (en)* | 2023-10-12 | 2025-04-15 | 海信视像科技股份有限公司 | Display equipment and multi-screen display method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060077183A1 (en)* | 2004-10-08 | 2006-04-13 | Studt Peter C | Methods and systems for converting touchscreen events into application formatted data |
| CN1967458A (en)* | 2005-11-16 | 2007-05-23 | 联发科技股份有限公司 | Method and device for controlling touch screen user interface |
| US20070177803A1 (en)* | 2006-01-30 | 2007-08-02 | Apple Computer, Inc | Multi-touch gesture dictionary |
| CN101410781A (en)* | 2006-01-30 | 2009-04-15 | 苹果公司 | Gesture operations with multipoint sensing devices |
| CN101526880A (en)* | 2008-03-04 | 2009-09-09 | 苹果公司 | Touch event model |
| US20100235118A1 (en)* | 2009-03-16 | 2010-09-16 | Bradford Allen Moore | Event Recognition |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9292111B2 (en)* | 1998-01-26 | 2016-03-22 | Apple Inc. | Gesturing with a multipoint sensing device |
| US20020171675A1 (en)* | 2001-05-15 | 2002-11-21 | International Business Machines Corporation | Method and system for graphical user interface (GUI) widget having user-selectable mass |
| US8261190B2 (en)* | 2008-04-24 | 2012-09-04 | Burlington Education Ltd. | Displaying help sensitive areas of a computer application |
| CN101853105A (en)* | 2010-06-02 | 2010-10-06 | 友达光电股份有限公司 | Computer with touch screen and operation method thereof |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060077183A1 (en)* | 2004-10-08 | 2006-04-13 | Studt Peter C | Methods and systems for converting touchscreen events into application formatted data |
| CN1967458A (en)* | 2005-11-16 | 2007-05-23 | 联发科技股份有限公司 | Method and device for controlling touch screen user interface |
| US20070177803A1 (en)* | 2006-01-30 | 2007-08-02 | Apple Computer, Inc | Multi-touch gesture dictionary |
| CN101410781A (en)* | 2006-01-30 | 2009-04-15 | 苹果公司 | Gesture operations with multipoint sensing devices |
| CN101526880A (en)* | 2008-03-04 | 2009-09-09 | 苹果公司 | Touch event model |
| US20100235118A1 (en)* | 2009-03-16 | 2010-09-16 | Bradford Allen Moore | Event Recognition |
| Publication number | Publication date |
|---|---|
| CN106095418B (en) | 2019-09-13 |
| CN106095418A (en) | 2016-11-09 |
| CN102768608A (en) | 2012-11-07 |
| HK1177519A1 (en) | 2013-08-23 |
| CN203287883U (en) | 2013-11-13 |
| Publication | Publication Date | Title |
|---|---|---|
| US12265704B2 (en) | Event recognition | |
| US12379783B2 (en) | Proxy gesture recognizer | |
| CN102768608B (en) | event recognition | |
| EP2656192B1 (en) | Event recognition | |
| US8566044B2 (en) | Event recognition | |
| US9311112B2 (en) | Event recognition | |
| AU2021290380B2 (en) | Event recognition | |
| HK1177519B (en) | Event recognition | |
| HK1191118A (en) | Event recognition | |
| HK1191118B (en) | Event recognition |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| REG | Reference to a national code | Ref country code:HK Ref legal event code:DE Ref document number:1177519 Country of ref document:HK | |
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| REG | Reference to a national code | Ref country code:HK Ref legal event code:GR Ref document number:1177519 Country of ref document:HK |