matrix-react-sdk
Version:
SDK for matrix.org using React
27 lines (26 loc) • 1.04 kB
TypeScript
export declare const enum Landmark {
ACTIVE_SPACE_BUTTON = 0,
ROOM_SEARCH = 1,
ROOM_LIST = 2,
MESSAGE_COMPOSER_OR_HOME = 3
}
/**
* The landmarks are cycled through in the following order:
* ACTIVE_SPACE_BUTTON <-> ROOM_SEARCH <-> ROOM_LIST <-> MESSAGE_COMPOSER/HOME <-> ACTIVE_SPACE_BUTTON
*/
export declare class LandmarkNavigation {
/**
* Get the next/previous landmark that must be focused from a given landmark
* @param currentLandmark The current landmark
* @param backwards If true, the landmark before currentLandmark in ORDERED_LANDMARKS is returned
* @returns The next landmark to focus
*/
private static getLandmark;
/**
* Focus the next landmark from a given landmark.
* This method will skip over any missing landmarks.
* @param currentLandmark The current landmark
* @param backwards If true, search the next landmark to the left in ORDERED_LANDMARKS
*/
static findAndFocusNextLandmark(currentLandmark: Landmark, backwards?: boolean): void;
}