UNPKG

react-native-orientation-turbo

Version:
59 lines 2.04 kB
import { LandscapeDirection, PortraitDirection, Orientation } from './constants'; import type { LockOrientationSubscription, OrientationSubscription, DeviceAutoRotateStatus } from './types'; /** * Starts orientation tracking * @platform iOS and Android */ export declare const startOrientationTracking: () => void; /** * Stops orientation tracking * @platform iOS and Android */ export declare const stopOrientationTracking: () => void; /** * Locks to portrait * @platform iOS and Android */ export declare const lockToPortrait: (direction?: PortraitDirection) => void; /** * Locks to landscape * @platform iOS and Android */ export declare const lockToLandscape: (direction: LandscapeDirection) => void; /** * Unlocks all orientations * @platform iOS and Android */ export declare const unlockAllOrientations: () => void; /** * Gets current orientation * @platform iOS and Android * @returns Orientation */ export declare const getCurrentOrientation: () => Orientation; /** * Checks if orientation is locked * @platform iOS and Android * @returns boolean */ export declare const isLocked: () => boolean; /** * Gets device auto-rotate status * @platform Android only * @returns DeviceAutoRotateStatus on Android, null on iOS */ export declare const getDeviceAutoRotateStatus: () => DeviceAutoRotateStatus | null; /** * Subscribes to lock orientation change * @platform iOS and Android * @returns EventSubscription */ export declare const onLockOrientationChange: (callback: (subscription: LockOrientationSubscription) => void) => import("react-native").EventSubscription; /** * Subscribes to orientation change * @platform iOS and Android * @returns EventSubscription */ export declare const onOrientationChange: (callback: (subscription: OrientationSubscription) => void) => import("react-native").EventSubscription; export { LandscapeDirection, PortraitDirection, Orientation, type LockOrientationSubscription, type OrientationSubscription, type DeviceAutoRotateStatus, }; //# sourceMappingURL=index.d.ts.map