Added UIManipulationRequestEvent interface for moverequest, panrequest, rotationrequest, and zoomrequest. The new interface replaces previous subset interfaces UIPanRequestEvent and UIZoomRequestEvent, and completes ACTION-27 and ACTION-33
authorJames Craig <jcraig@apple.com>
Sat, 01 Dec 2012 22:28:07 -0800
changeset 36b25c2ee0e568
parent 35 ae3ef5676003
child 37 a481c2bd974f
Added UIManipulationRequestEvent interface for moverequest, panrequest, rotationrequest, and zoomrequest. The new interface replaces previous subset interfaces UIPanRequestEvent and UIZoomRequestEvent, and completes ACTION-27 and ACTION-33
src/indie-ui-context.html
src/indie-ui-events.html
     1.1 --- a/src/indie-ui-context.html	Sat Dec 01 19:51:14 2012 -0800
     1.2 +++ b/src/indie-ui-context.html	Sat Dec 01 22:28:07 2012 -0800
     1.3 @@ -86,7 +86,7 @@
     1.4  	<body>
     1.5  		
     1.6  		<section id="abstract">
     1.7 -			<p class="placeholder">Placeholder abstract.</p>
     1.8 +			<p>This specification, in conjunction with the <a href="./indie-ui-events.html">Events Module</a>, is intended address the problem of device-, <abbr title="operating system">OS</abbr>-, and localization-independent control of web content. See the <a href="#intro">introduction</a> for background and usage examples.</p>
     1.9  		</section>
    1.10  
    1.11  		<section id="sotd">
    1.12 @@ -95,7 +95,6 @@
    1.13  		<!-- :::::::::::::::::::: INTRO :::::::::::::::::::: -->
    1.14  		<section id="intro" class="introductory informative">
    1.15  			<h2>Introduction</h2>
    1.16 -			<p>This specification, in conjunction with the <a href="./indie-ui-events.html">Events Module</a>, is intended address the problem of device-, <abbr title="operating system">OS</abbr>-, and localization-independent control of web content. </p>
    1.17  			<p class="placeholder">Placeholder for remaining intro and background.</p>
    1.18  		</section>
    1.19  		<!-- :::::::::::::::::::: END INTRO :::::::::::::::::::: -->
     2.1 --- a/src/indie-ui-events.html	Sat Dec 01 19:51:14 2012 -0800
     2.2 +++ b/src/indie-ui-events.html	Sat Dec 01 22:28:07 2012 -0800
     2.3 @@ -86,7 +86,7 @@
     2.4  	<body>
     2.5  
     2.6  		<section id="abstract">
     2.7 -			<p class="placeholder">Placeholder abstract.</p>
     2.8 +			<p>This specification, in conjunction with the <a href="./indie-ui-context.html">User Context Module</a>, is intended address the problem of device-, <abbr title="operating system">OS</abbr>-, and localization-independent control of web content. See the <a href="#intro">introduction</a> for background and usage examples.</p>
     2.9  		</section>
    2.10  
    2.11  		<section id="sotd">
    2.12 @@ -95,7 +95,6 @@
    2.13  		<!-- :::::::::::::::::::: INTRO :::::::::::::::::::: -->
    2.14  		<section id="intro" class="introductory informative">
    2.15  			<h2>Introduction</h2>
    2.16 -			<p>This specification, in conjunction with the <a href="./indie-ui-context.html">User Context Module</a>, is intended address the problem of device-, <abbr title="operating system">OS</abbr>-, and localization-independent control of web content.</p>
    2.17  			<p class="placeholder">placeholder for remaining intro explaining background, event registration (addEventListener) versus origination (event.target defined via ~@ui-actions)</p>
    2.18  		</section>
    2.19  		
    2.20 @@ -106,7 +105,7 @@
    2.21  		
    2.22  		<!-- :::::::::::::::::::: UI Request Event Interfaces :::::::::::::::::::: -->
    2.23  		<section id="RequestEvents">
    2.24 -			<h2><abbr title="User Interface">UI</abbr> Change Request Events</h2>
    2.25 +			<h2><abbr title="User Interface">UI</abbr> Request Events</h2>
    2.26  			<p>The core principle behind <abbr title="User Interface">UI</abbr> Change Request Events is that they operate on a completely backwards-compatible, opt-in basis. In other words, the web application author has to be aware of these events and register event listeners, or the user agent and assistive technology behave as they normally would.</p>
    2.27  			<p><strong>Change request events do not cause any direct manipulation or mutation of the DOM.</strong> Instead, the event object conveys the user's intent to the web application, and allows the web application to make the appropriate changes to the DOM, on behalf of the user agent. If a web application is authored to understand the change request event, it can cancel the event using <code>preventDefault()</code>, which informs the user agent that the event has been captured and understood. If a web application does not cancel any change request event, the user agent can then attempt fallback behavior or communicate to the user that the input has not been recognized.</p>
    2.28  			<p class="ednote">There is purposefully no request event for activating the default action. Authors are encouraged to use a standard <code>click</code> event for default actions.</p>
    2.29 @@ -204,21 +203,14 @@
    2.30  			</section>
    2.31  			<!-- :::::::::::::::::::: END UIRequestEvent :::::::::::::::::::: -->
    2.32  
    2.33 -			<!-- :::::::::::::::::::: UIPanRequestEvent :::::::::::::::::::: -->
    2.34 -			<section id="UIPanRequestEvent">
    2.35 -				<h3>Interface UIPanRequestEvent</h3>
    2.36 -				<dl title="[Constructor] interface UIPanRequestEvent : UIRequestEvent" class="idl">
    2.37 +			<!-- :::::::::::::::::::: UIManipulationRequestEvent :::::::::::::::::::: -->
    2.38 +			<section id="UIManipulationRequestEvent">
    2.39 +				<h3>Interface UIManipulationRequestEvent</h3>
    2.40  
    2.41 -					<!-- for panning views (e.g. maps or zoomed graphical views... not intended for standard scroll views) -->
    2.42 -
    2.43 -					<dt>attribute unsigned long deltaX</dt>
    2.44 -					<dd>The cartesian X coordinate delta, in CSS pixels.</dd>
    2.45 -
    2.46 -					<dt>attribute unsigned long deltaY</dt>
    2.47 -					<dd>The cartesian Y coordinate delta, in CSS pixels.</dd>
    2.48 +				<dl title="[Constructor] interface UIManipulationRequestEvent : UIRequestEvent" class="idl">
    2.49  
    2.50  					<dt>readonly attribute DOMString typeArg</dt>
    2.51 -					<dd>The type of event (<code>panrequest</code>).</dd>
    2.52 +					<dd>The type of event. Either one of the simple, discrete types (<code>panrequest</code>, <code>zoomrequest</code>, etc) or the superset, continuous manipulation events (<code>manipulationrequest</code>) which may need to be split into start, change, end, and cancel events to allow applications to respond.</dd>
    2.53  
    2.54  					<dt>readonly attribute boolean canBubbleArg</dt>
    2.55  					<dd></dd>
    2.56 @@ -226,36 +218,124 @@
    2.57  					<dt>readonly attribute boolean cancelableArg</dt>
    2.58  					<dd></dd>
    2.59  
    2.60 -					<dt>void initUIPanRequestEvent(
    2.61 -						DOMString typeArg,
    2.62 -						boolean canBubbleArg,
    2.63 -						boolean cancelableArg,
    2.64 -						views::AbstractView viewArg,
    2.65 -						long detailArg,
    2.66 -						unsigned long deltaX,
    2.67 -						unsigned long deltaY)</dt>
    2.68 -					<dd></dd>
    2.69 +					<dt>void initUIManipulationRequestEvent()</dt>
    2.70 +					<dd>
    2.71 +						
    2.72 +						<dl class="parameters">
    2.73 +							
    2.74 +							<dt>DOMString typeArg</dt><dd></dd>
    2.75 +							<dt>boolean canBubbleArg</dt><dd></dd>
    2.76 +							<dt>boolean cancelableArg</dt><dd></dd>
    2.77 +							<dt>views::AbstractView viewArg</dt><dd></dd>
    2.78 +							<dt>long detailArg</dt><dd></dd>
    2.79 +							
    2.80 +							<dt>optional float originX</dt>
    2.81 +							<dd>The cartesian X coordinate origin point, measured in CSS pixels from the left edge of element box for the <a href="#def_request_event_receiver">receiver element</a>.</dd>
    2.82 +							<dt>optional float originY</dt>
    2.83 +							<dd>The cartesian Y coordinate origin point, measured in CSS pixels from the top edge of element box for the <a href="#def_request_event_receiver">receiver element</a>.</dd>
    2.84 +
    2.85 +							<dt>optional float deltaX</dt>
    2.86 +							<dd>The cartesian X coordinate delta, in CSS pixels.</dd>
    2.87 +							<dt>optional float deltaY</dt>
    2.88 +							<dd>The cartesian Y coordinate delta, in CSS pixels.</dd>
    2.89 +
    2.90 +							<dt>optional float scaleFactor</dt>
    2.91 +							<dd>Scale factor, used in zoom manipulations, where 1.0 is the original scale factor. For example, a value of 2.0 or 3.0 indicates the element should enlarge to 2 or 3 times its original scale, respectively. A value of 0.5 indicates the element should decrease to one-half its original scale.</dd>
    2.92 +
    2.93 +							<dt>optional float rotation</dt>
    2.94 +							<dd>Rotation value, in degrees from 0. Positive values indicate a counter-clockwise rotation. Negative values indicate a clockwise rotation.</dd>
    2.95 +							
    2.96 +						</dl>
    2.97 +					</dd>
    2.98  
    2.99  				</dl>
   2.100  
   2.101 -				<section id="UIPanRequestEvents">
   2.102 -					<h4>UIPanRequestEvent Types</h4>
   2.103 -					<p>The single type of UIPanRequestEvent that can occur is:</p>
   2.104 +				<section id="DiscreteUIManipulationRequestEvents">
   2.105 +					<h4>Discrete UIManipulationRequestEvent Types</h4>
   2.106 +					<p>The <em>discrete</em> types of UIManipulationRequestEvents that can occur are:</p>
   2.107  					<dl>
   2.108 -						<dt id="panrequest">Pan Request <code class="event">panrequest</code></dt>
   2.109 +						<dt id="moverequest">Move Request <code class="event">moverequest</code></dt>
   2.110  						<dd>
   2.111 -							<p>Initiated when the user agent sends a pan request to the web application with accompanying x/y delta values.</p>
   2.112 +							<p>Initiated when the user agent sends a move request to the web application with accompanying x/y delta values. This is used, for example, when moving an object to a new location on a layout canvas.</p>
   2.113  							<ul>
   2.114  								<li>Bubbles: Yes</li>
   2.115  								<li>Cancelable: Yes</li>
   2.116  								<li>Context Info: <code>deltaX</code>, <code>deltaY</code></li>
   2.117  							</ul>
   2.118 -							<p class="ednote">Yet to be determined if this event should remain as a discrete event, or be split into start, move, and end request events for panning.</p>
   2.119 +						</dd>
   2.120 +						<dt id="panrequest">Pan Request <code class="event">panrequest</code></dt>
   2.121 +						<dd>
   2.122 +							<p>Initiated when the user agent sends a pan request to the web application with accompanying x/y delta values. This is used, for example, when changing the center point while panning a map or another custom image viewer.</p>
   2.123 +							<ul>
   2.124 +								<li>Bubbles: Yes</li>
   2.125 +								<li>Cancelable: Yes</li>
   2.126 +								<li>Context Info: <code>deltaX</code>, <code>deltaY</code></li>
   2.127 +							</ul>
   2.128 +						</dd>
   2.129 +						<dt id="rotationrequest">Rotation Request <code class="event">rotationrequest</code></dt>
   2.130 +						<dd>
   2.131 +							<p>Initiated when the user agent sends a rotation request to the web application with accompanying origin x/y values and a rotation value in degrees.</p>
   2.132 +							<ul>
   2.133 +								<li>Bubbles: Yes</li>
   2.134 +								<li>Cancelable: Yes</li>
   2.135 +								<li>Context Info: <code>originX</code>, <code>originY</code>, and <code>rotation</code></li>
   2.136 +							</ul>
   2.137 +						</dd>
   2.138 +						<!-- zoom changes (e.g. maps or custom layout views) -->
   2.139 +						<dt id="zoomrequest">Zoom Request <code class="event">zoomrequest</code></dt>
   2.140 +						<dd>
   2.141 +							<p>Initiated when the user agent sends a zoom request to the web application with accompanying origin x/y values and the zoom scale factor.</p>
   2.142 +							<ul>
   2.143 +								<li>Bubbles: Yes</li>
   2.144 +								<li>Cancelable: Yes</li>
   2.145 +								<li>Context Info: <code>originX</code>, <code>originY</code>, and <code>scaleFactor</code></li>
   2.146 +							</ul>
   2.147  						</dd>
   2.148  					</dl>
   2.149  				</section>
   2.150 +
   2.151 +				<section id="ContinuousUIManipulationRequestEvents">
   2.152 +					<h4>Continuous UIManipulationRequestEvent Types</h4>
   2.153 +					<p>The <em>continuous</em> types of UIManipulationRequestEvents that can occur are:</p>
   2.154 +					<dl>
   2.155 +						<dt id="manipulationstartrequest">Manipulation Start Request <code class="event">manipulationstartrequest</code></dt>
   2.156 +						<dd>
   2.157 +							<ul>
   2.158 +								<li>Bubbles: Yes</li>
   2.159 +								<li>Cancelable: Yes</li>
   2.160 +								<li>Context Info: TBD</li>
   2.161 +							</ul>
   2.162 +						</dd>
   2.163 +						<dt id="manipulationchangerequest">Manipulation Start Request <code class="event">manipulationchangerequest</code></dt>
   2.164 +						<dd>
   2.165 +							<ul>
   2.166 +								<li>Bubbles: Yes</li>
   2.167 +								<li>Cancelable: Yes</li>
   2.168 +								<li>Context Info: TBD</li>
   2.169 +							</ul>
   2.170 +						</dd>
   2.171 +						<dt id="manipulationendrequest">Manipulation Start Request <code class="event">manipulationendrequest</code></dt>
   2.172 +						<dd>
   2.173 +							<ul>
   2.174 +								<li>Bubbles: Yes</li>
   2.175 +								<li>Cancelable: Yes</li>
   2.176 +								<li>Context Info: TBD</li>
   2.177 +							</ul>
   2.178 +						</dd>
   2.179 +						<dt id="manipulationcancelrequest">Manipulation Start Request <code class="event">manipulationcancelrequest</code></dt>
   2.180 +						<dd>
   2.181 +							<ul>
   2.182 +								<li>Bubbles: Yes</li>
   2.183 +								<li>Cancelable: Yes</li>
   2.184 +								<li>Context Info: TBD</li>
   2.185 +							</ul>
   2.186 +						</dd>
   2.187 +					</dl>
   2.188 +				</section>
   2.189 +				
   2.190 +				
   2.191  			</section>
   2.192 -			<!-- :::::::::::::::::::: END UIPanRequestEvent :::::::::::::::::::: -->
   2.193 +			<!-- :::::::::::::::::::: END UIManipulationRequestEvent :::::::::::::::::::: -->
   2.194  
   2.195  			<!-- :::::::::::::::::::: UIScrollRequestEvent :::::::::::::::::::: -->
   2.196  			<section id="UIScrollRequestEvent">
   2.197 @@ -376,72 +456,6 @@
   2.198  			</section>
   2.199  			<!-- :::::::::::::::::::: END UIValueChangeRequestEvent :::::::::::::::::::: -->
   2.200  
   2.201 -			<!-- :::::::::::::::::::: UIZoomRequestEvent :::::::::::::::::::: -->
   2.202 -			<section id="UIZoomRequestEvent">
   2.203 -				<h3>Interface UIZoomRequestEvent</h3>
   2.204 -				<p>Zoom changes to a map or custom image viewer.</p>
   2.205 -				<p class="ednote">This may need to be split into zoomstartrequest, zoomchangerequest, and zoomendrequest events, with an optional scale attribute.</p>
   2.206 -				<p class="ednote">Definitely needs specific an [optional] zoomRatio in addition to discrete in/out requests.</p>
   2.207 -				
   2.208 -				<dl title="[Constructor] interface UIZoomRequestEvent : UIRequestEvent" class="idl">
   2.209 -					
   2.210 -					<!-- zoom changes (e.g. maps or custom layout views) -->
   2.211 -					<!-- Definitely needs specific an [optional] zoomRatio in addition to discrete in/out requests. -->
   2.212 -					
   2.213 -					<dt>const unsigned short IN  = TBD</dt><dd></dd>
   2.214 -					<dt>const unsigned short OUT = TBD</dt><dd></dd>
   2.215 -					<dt>const unsigned short MIN = TBD</dt><dd></dd>
   2.216 -					<dt>const unsigned short MAX = TBD</dt><dd></dd>
   2.217 -					
   2.218 -					<dt>readonly attribute DOMString typeArg</dt>
   2.219 -					<dd>The type of event (<code>zoomrequest</code>).</dd>
   2.220 -					
   2.221 -					<dt>readonly attribute boolean canBubbleArg</dt>
   2.222 -					<dd></dd>
   2.223 -					
   2.224 -					<dt>readonly attribute boolean cancelableArg</dt>
   2.225 -					<dd></dd>
   2.226 -					
   2.227 -					<dt>readonly attribute unsigned short zoomType</dt>
   2.228 -					<dd>Type of zoom requested, as defined in the interface constants.</dd>
   2.229 -					
   2.230 -					<dt>readonly attribute unsigned long originX</dt>
   2.231 -					<dd></dd>
   2.232 -					
   2.233 -					<dt>readonly attribute unsigned long originY</dt>
   2.234 -					<dd></dd>
   2.235 -					
   2.236 -					<dt>void initUIZoomRequestEvent(
   2.237 -						DOMString typeArg,
   2.238 -						boolean canBubbleArg,
   2.239 -						boolean cancelableArg,
   2.240 -						views::AbstractView viewArg, 
   2.241 -						long detailArg, 
   2.242 -						unsigned short zoomTypeArg, 
   2.243 -						unsigned long originX, 
   2.244 -						unsigned long originY)</dt>
   2.245 -					<dd></dd>
   2.246 -					
   2.247 -				</dl>
   2.248 -
   2.249 -				<section id="UIZoomRequestEvents">
   2.250 -					<h4>UIZoomRequestEvent Types</h4>
   2.251 -					<p>The single type of UIZoomRequestEvent that can occur is:</p>
   2.252 -					<dl>
   2.253 -						<dt id="zoomrequest">Zoom Request <code class="event">zoomrequest</code></dt>
   2.254 -						<dd>
   2.255 -							<p>Initiated when the user agent sends a zoom request to the web application.</p>
   2.256 -							<ul>
   2.257 -								<li>Bubbles: Yes</li>
   2.258 -								<li>Cancelable: Yes</li>
   2.259 -								<li>Context Info: <code>zoomType</code>, <code>originX</code>, and <code>originY</code></li>
   2.260 -							</ul>
   2.261 -						</dd>
   2.262 -					</dl>
   2.263 -				</section>
   2.264 -			</section>
   2.265 -			<!-- :::::::::::::::::::: END UIZoomRequestEvent :::::::::::::::::::: -->
   2.266 -
   2.267  		</section>
   2.268  		<!-- :::::::::::::::::::: END UI Request Event Interfaces :::::::::::::::::::: -->
   2.269  
   2.270 @@ -482,7 +496,7 @@
   2.271  					<h4>AccessibilityEvent Types</h4>
   2.272  					<p>The different types of AccessibilityEvents that can occur are:</p>
   2.273  					<dl>
   2.274 -						<dt>Assistive Technology Focus <code class="event">ATFocus</code></dt>
   2.275 +						<dt id="ATFocus">Assistive Technology Focus <code class="event">ATFocus</code></dt>
   2.276  						<dd>
   2.277  							<p>Initiated when the assistive technology cursor or point-of-regard moves to a particular DOM node.</p>
   2.278  							<ul>
   2.279 @@ -490,7 +504,7 @@
   2.280  								<li>Cancelable: No</li>
   2.281  							</ul>
   2.282  						</dd>
   2.283 -						<dt>Assistive Technology Blur <code class="event">ATBlur</code></dt>
   2.284 +						<dt id="ATBlur">Assistive Technology Blur <code class="event">ATBlur</code></dt>
   2.285  						<dd>
   2.286  							<p>Initiated when the assistive technology cursor or point-of-regard leaves a particular DOM node.</p>
   2.287  							<ul>
   2.288 @@ -513,13 +527,18 @@
   2.289  				<h3>Important Terms</h3>
   2.290  				<dl>
   2.291  					
   2.292 -					<dt id="def_assistivetechnology">Assistive Technology</dt>
   2.293 +					<dt id="def_assistive_technology">Assistive Technology</dt>
   2.294  					<dd class="placeholder">TBD</dd>
   2.295  					
   2.296 -					<dt id="def_pointofregard">Point-of-Regard</dt>
   2.297 +					<dt id="def_point_of_regard">Point-of-Regard</dt>
   2.298  					<dd class="placeholder">TBD</dd>
   2.299  					
   2.300 -					<dt id="def_useragent">User Agent</dt>
   2.301 +					<dt id="def_request_event_receiver">Request Event Receiver</dt>
   2.302 +					<dd>
   2.303 +						<p class="ednote">TBD: need to explain difference between the event.target, the element handler the event (addEventListener), and the "receiver" of the UIRequestEvent. The event "receiver" will be author-defined with an attribute (potentially @actions or @ui-actions) that describe the type of UI actions that can be performed on the element (the UIRequestEvent "receiver") as is a contract declaration of the types of UIRequestEvents that will be received and handled by the web application.</p>
   2.304 +					</dd>
   2.305 +					
   2.306 +					<dt id="def_user_agent">User Agent</dt>
   2.307  					<dd class="placeholder">TBD</dd>
   2.308  					
   2.309  				</dl>