ui.gestures: fix gesture docs, #1509
							parent
							
								
									763b892a1d
								
							
						
					
					
						commit
						43f2592d1b
					
				| 
						 | 
					@ -32,10 +32,27 @@ IN: ui.backend.gtk.tests
 | 
				
			||||||
       { is_modifier 0 }
 | 
					       { is_modifier 0 }
 | 
				
			||||||
    } ;
 | 
					    } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: gdk-space-key-press-event ( -- event )
 | 
				
			||||||
 | 
					    S{ GdkEventKey
 | 
				
			||||||
 | 
					       { type 8 }
 | 
				
			||||||
 | 
					       { window ALIEN: 1b66360 }
 | 
				
			||||||
 | 
					       { send_event 0 }
 | 
				
			||||||
 | 
					       { time 28246628 }
 | 
				
			||||||
 | 
					       { state 0 }
 | 
				
			||||||
 | 
					       { keyval 32 }
 | 
				
			||||||
 | 
					       { length 0 }
 | 
				
			||||||
 | 
					       { string ALIEN: 20233b0 }
 | 
				
			||||||
 | 
					       { hardware_keycode 64 }
 | 
				
			||||||
 | 
					       { group 0 }
 | 
				
			||||||
 | 
					       { is_modifier 1 }
 | 
				
			||||||
 | 
					    } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    T{ key-down f f "F2" }
 | 
					    T{ key-down f f "F2" }
 | 
				
			||||||
    T{ key-up f f "H" }
 | 
					    T{ key-up f f "H" }
 | 
				
			||||||
 | 
					    T{ key-down f f " " }
 | 
				
			||||||
} [
 | 
					} [
 | 
				
			||||||
    gdk-key-press-event key-event>gesture
 | 
					    gdk-key-press-event key-event>gesture
 | 
				
			||||||
    gdk-key-release-event key-event>gesture
 | 
					    gdk-key-release-event key-event>gesture
 | 
				
			||||||
 | 
					    gdk-space-key-press-event key-event>gesture
 | 
				
			||||||
] unit-test
 | 
					] unit-test
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
USING: ui.gadgets help.markup help.syntax
 | 
					USING: hashtables help.markup help.syntax kernel strings system
 | 
				
			||||||
hashtables strings kernel system ;
 | 
					ui.gadgets ui.gadgets.worlds ;
 | 
				
			||||||
IN: ui.gestures
 | 
					IN: ui.gestures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HELP: set-gestures
 | 
					HELP: set-gestures
 | 
				
			||||||
| 
						 | 
					@ -234,6 +234,10 @@ HELP: up-action
 | 
				
			||||||
HELP: down-action
 | 
					HELP: down-action
 | 
				
			||||||
{ $class-description "Gesture sent when the user performs a multi-touch three-finger swipe down." } ;
 | 
					{ $class-description "Gesture sent when the user performs a multi-touch three-finger swipe down." } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HELP: world-focus
 | 
				
			||||||
 | 
					{ $values { "world" world } { "gadget" gadget } }
 | 
				
			||||||
 | 
					{ $description "Gets the gadget that is in focus for the world." } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HELP: zoom-in-action
 | 
					HELP: zoom-in-action
 | 
				
			||||||
{ $class-description "Gesture sent when the user performs a multi-touch two-finger pinch in." } ;
 | 
					{ $class-description "Gesture sent when the user performs a multi-touch two-finger pinch in." } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -347,7 +351,7 @@ ARTICLE: "keyboard-gestures" "Keyboard gestures"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
"The " { $link S+ } " modifier is only ever used with the above action keys; alphanumeric input input with the shift key is delivered without the " { $link S+ } " modifier set, instead the input itself is upper case. For example, the gesture corresponding to " { $snippet "s" } " with the Control and Shift keys pressed is presented as "
 | 
					"The " { $link S+ } " modifier is only ever used with the above action keys; alphanumeric input input with the shift key is delivered without the " { $link S+ } " modifier set, instead the input itself is upper case. For example, the gesture corresponding to " { $snippet "s" } " with the Control and Shift keys pressed is presented as "
 | 
				
			||||||
{ $code "T{ key-down f { C+ } \"S\" }" }
 | 
					{ $code "T{ key-down f { C+ } \"S\" }" }
 | 
				
			||||||
"The " { $snippet "RET" } ", " { $snippet "TAB" } " and " { $snippet "SPACE" } " keys are never delivered in their literal form (" { $snippet "\"\\n\"" } ", " { $snippet "\"\\t\"" } " or "  { $snippet "\" \"" } ")." ;
 | 
					"The " { $snippet "RET" } " and " { $snippet "TAB" } " keys are never delivered in their literal form (" { $snippet "\"\\n\"" } " and " { $snippet "\"\\t\"" } ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARTICLE: "ui-user-input" "Free-form keyboard input"
 | 
					ARTICLE: "ui-user-input" "Free-form keyboard input"
 | 
				
			||||||
"Whereas keyboard gestures are intended to be used for keyboard shortcuts, certain gadgets such as text fields need to accept free-form keyboard input. This can be done by implementing a generic word:"
 | 
					"Whereas keyboard gestures are intended to be used for keyboard shortcuts, certain gadgets such as text fields need to accept free-form keyboard input. This can be done by implementing a generic word:"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue