@@ -43,43 +43,17 @@ export interface IMouseStateService {
|
||||
addProtocol(name: string, protocol: ICoreMouseProtocol): void;
|
||||
addEncoding(name: string, encoding: CoreMouseEncoding): void;
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Triggers a mouse event to be sent.
|
||||
*
|
||||
* Returns true if the event passed all protocol restrictions and a report
|
||||
* was sent, otherwise false. The return value may be used to decide whether
|
||||
* the default event action in the bowser component should be omitted.
|
||||
*
|
||||
* Note: The method will change values of the given event object
|
||||
* to fullfill protocol and encoding restrictions.
|
||||
*/
|
||||
triggerMouseEvent(event: ICoreMouseEvent): boolean;
|
||||
setCustomWheelEventHandler(customWheelEventHandler: ((event: WheelEvent) => boolean) | undefined): void;
|
||||
allowCustomWheelEvent(ev: WheelEvent): boolean;
|
||||
|
||||
/**
|
||||
* Event to announce changes in mouse tracking.
|
||||
*/
|
||||
onProtocolChange: IEvent<CoreMouseEventType>;
|
||||
|
||||
/**
|
||||
* Human readable version of mouse events.
|
||||
*/
|
||||
explainEvents(events: CoreMouseEventType): { [event: string]: boolean };
|
||||
|
||||
/**
|
||||
* Process wheel event taking partial scroll into account.
|
||||
*/
|
||||
consumeWheelEvent(ev: WheelEvent, cellHeight?: number, dpr?: number): number;
|
||||
|
||||
/**
|
||||
* Sets a custom wheel event handler that can veto wheel processing.
|
||||
*/
|
||||
setCustomWheelEventHandler(customWheelEventHandler: ((event: WheelEvent) => boolean) | undefined): void;
|
||||
|
||||
/**
|
||||
* Checks whether a wheel event should be processed.
|
||||
*/
|
||||
allowCustomWheelEvent(ev: WheelEvent): boolean;
|
||||
restrictMouseEvent(event: ICoreMouseEvent): boolean;
|
||||
encodeMouseEvent(event: ICoreMouseEvent): string;
|
||||
readonly isDefaultEncoding: boolean;
|
||||
readonly isPixelEncoding: boolean;
|
||||
}
|
||||
|
||||
export const ICoreService = createDecorator<ICoreService>('CoreService');
|
||||
|
||||
Reference in New Issue
Block a user