mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Break up interfaces in core/i_accessibility.js into separate files
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview AST Node and keyboard navigation interfaces.
|
||||
* @author samelh@google.com (Sam El-Husseini)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IASTNodeLocation');
|
||||
goog.provide('Blockly.IASTNodeLocationSvg');
|
||||
goog.provide('Blockly.IASTNodeLocationWithBlock');
|
||||
goog.provide('Blockly.IKeyboardAccessible');
|
||||
|
||||
goog.requireType('Blockly.Block');
|
||||
goog.requireType('Blockly.ShortcutRegistry');
|
||||
|
||||
|
||||
/**
|
||||
* An AST node location interface.
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IASTNodeLocation = function() {};
|
||||
|
||||
/**
|
||||
* An AST node location SVG interface.
|
||||
* @interface
|
||||
* @extends {Blockly.IASTNodeLocation}
|
||||
*/
|
||||
Blockly.IASTNodeLocationSvg = function() {};
|
||||
|
||||
/**
|
||||
* Add the marker SVG to this node's SVG group.
|
||||
* @param {SVGElement} markerSvg The SVG root of the marker to be added to the
|
||||
* SVG group.
|
||||
*/
|
||||
Blockly.IASTNodeLocationSvg.prototype.setMarkerSvg;
|
||||
|
||||
/**
|
||||
* Add the cursor SVG to this node's SVG group.
|
||||
* @param {SVGElement} cursorSvg The SVG root of the cursor to be added to the
|
||||
* SVG group.
|
||||
*/
|
||||
Blockly.IASTNodeLocationSvg.prototype.setCursorSvg;
|
||||
|
||||
/**
|
||||
* An AST node location that has an associated block.
|
||||
* @interface
|
||||
* @extends {Blockly.IASTNodeLocation}
|
||||
*/
|
||||
Blockly.IASTNodeLocationWithBlock = function() {};
|
||||
|
||||
/**
|
||||
* Get the source block associated with this node.
|
||||
* @return {Blockly.Block} The source block.
|
||||
*/
|
||||
Blockly.IASTNodeLocationWithBlock.prototype.getSourceBlock;
|
||||
|
||||
|
||||
/**
|
||||
* An interface for an object that handles keyboard shortcuts.
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IKeyboardAccessible = function() {};
|
||||
|
||||
/**
|
||||
* Handles the given keyboard shortcut.
|
||||
* @param {!Blockly.ShortcutRegistry.KeyboardShortcut} shortcut The shortcut to be handled.
|
||||
* @return {boolean} True if the shortcut has been handled, false otherwise.
|
||||
*/
|
||||
Blockly.IKeyboardAccessible.prototype.onShortcut;
|
||||
20
core/interfaces/i_ast_node_location.js
Normal file
20
core/interfaces/i_ast_node_location.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview The interface for an AST node location.
|
||||
* @author samelh@google.com (Sam El-Husseini)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IASTNodeLocation');
|
||||
|
||||
/**
|
||||
* An AST node location interface.
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IASTNodeLocation = function() {};
|
||||
38
core/interfaces/i_ast_node_location_svg.js
Normal file
38
core/interfaces/i_ast_node_location_svg.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview The interface for an AST node location SVG.
|
||||
* @author samelh@google.com (Sam El-Husseini)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IASTNodeLocationSvg');
|
||||
|
||||
goog.require('Blockly.IASTNodeLocation');
|
||||
|
||||
|
||||
/**
|
||||
* An AST node location SVG interface.
|
||||
* @interface
|
||||
* @extends {Blockly.IASTNodeLocation}
|
||||
*/
|
||||
Blockly.IASTNodeLocationSvg = function() {};
|
||||
|
||||
/**
|
||||
* Add the marker SVG to this node's SVG group.
|
||||
* @param {SVGElement} markerSvg The SVG root of the marker to be added to the
|
||||
* SVG group.
|
||||
*/
|
||||
Blockly.IASTNodeLocationSvg.prototype.setMarkerSvg;
|
||||
|
||||
/**
|
||||
* Add the cursor SVG to this node's SVG group.
|
||||
* @param {SVGElement} cursorSvg The SVG root of the cursor to be added to the
|
||||
* SVG group.
|
||||
*/
|
||||
Blockly.IASTNodeLocationSvg.prototype.setCursorSvg;
|
||||
32
core/interfaces/i_ast_node_location_with_block.js
Normal file
32
core/interfaces/i_ast_node_location_with_block.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview The interface for an AST node location that has an associated
|
||||
* block.
|
||||
* @author samelh@google.com (Sam El-Husseini)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IASTNodeLocationWithBlock');
|
||||
|
||||
goog.require('Blockly.IASTNodeLocation');
|
||||
goog.requireType('Blockly.Block');
|
||||
|
||||
|
||||
/**
|
||||
* An AST node location that has an associated block.
|
||||
* @interface
|
||||
* @extends {Blockly.IASTNodeLocation}
|
||||
*/
|
||||
Blockly.IASTNodeLocationWithBlock = function() {};
|
||||
|
||||
/**
|
||||
* Get the source block associated with this node.
|
||||
* @return {Blockly.Block} The source block.
|
||||
*/
|
||||
Blockly.IASTNodeLocationWithBlock.prototype.getSourceBlock;
|
||||
30
core/interfaces/i_keyboard_accessible.js
Normal file
30
core/interfaces/i_keyboard_accessible.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2020 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview The interface for objects that handle keyboard shortcuts.
|
||||
* @author samelh@google.com (Sam El-Husseini)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.IKeyboardAccessible');
|
||||
|
||||
goog.requireType('Blockly.ShortcutRegistry');
|
||||
|
||||
|
||||
/**
|
||||
* An interface for an object that handles keyboard shortcuts.
|
||||
* @interface
|
||||
*/
|
||||
Blockly.IKeyboardAccessible = function() {};
|
||||
|
||||
/**
|
||||
* Handles the given keyboard shortcut.
|
||||
* @param {!Blockly.ShortcutRegistry.KeyboardShortcut} shortcut The shortcut to be handled.
|
||||
* @return {boolean} True if the shortcut has been handled, false otherwise.
|
||||
*/
|
||||
Blockly.IKeyboardAccessible.prototype.onShortcut;
|
||||
Reference in New Issue
Block a user