forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reveal.d.ts
116 lines (99 loc) · 2.83 KB
/
reveal.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Type definitions for Reveal 3.3.0
// Project: https://github.com/hakimel/reveal.js/
// Definitions by: robertop87 <https://github.com/robertop87/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare var Reveal:RevealStatic;
interface RevealStatic {
initialize:(config:RevealOptions)=>void;
configure:(diff:RevealOptions)=>void;
// Navigation
slide(indexh:number, indexv?:number, f?:number, o?:number):void;
left():void;
right():void;
up():void;
down():void;
prev():void;
next():void;
prevFragment():boolean;
nextFragment():boolean;
// Randomize the order of slides
shuffle():void;
// Toogle presentation states
toggleOverview(override?:boolean):void;
togglePause(override?:boolean):void;
toggleAutoSlide(override?:boolean):void;
// Retrieves the previous and current slide elements
getPreviousSlide():Element;
getCurrentSlide():Element;
getIndices(slide?:Element):{h:number; v:number;};
getProgress():number;
getTotalSlides():number;
// Returns the speaker notes for the current slide
getSlideNotes(slide:any):string;
// States
addEventListener(type:string, listener:Function, useCapture?:boolean):void;
removeEventListener(type:string, listener:Function, useCapture?:boolean):void;
// State Checks
isFirstSlide():boolean;
isLastSlide():boolean;
isPaused():boolean;
isOverview():boolean;
isAutoSliding():boolean;
// undocumented method
layout():void;
addEventListeners():void;
removeEventListeners():void;
getSlide(x:number, y?:number):Element;
getScale():number;
getConfig():RevealOptions;
getQueryHash():any;
setState(state:any):void;
getState():any;
}
interface RevealOptions {
// Configuration
controls?:boolean;
progress?:boolean;
slideNumber?:boolean;
history?:boolean;
keyboard?:any;
overview?:boolean;
center?:boolean;
touch?:boolean;
loop?:boolean;
rtl?:boolean;
shuffle?:boolean;
fragments?:boolean;
embedded?:boolean;
help?:boolean;
showNotes?:boolean;
autoSlide?:number;
autoSlideStoppable?:boolean;
autoSlideMethod?:any;
mouseWheel?:boolean;
hideAddressBar?:boolean;
previewLinks?:boolean;
transition?:string;
transitionSpeed?:string;
backgroundTransition?:string;
viewDistance?:number;
parallaxBackgroundImage?:string;
parallaxBackgroundSize?:string;
parallaxBackgroundHorizontal?:any;
parallaxBackgroundVertical?:any;
rollingLinks?:boolean;
theme?:string;
// Presentation Size
width?:number;
height?:number;
margin?:number;
minScale?:number;
maxScale?:number;
// Dependencies
dependencies?:RevealDependency[];
}
interface RevealDependency {
src:string;
condition:()=>boolean;
async?:boolean;
}