-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawable.d.ts
More file actions
206 lines (206 loc) · 7.68 KB
/
Drawable.d.ts
File metadata and controls
206 lines (206 loc) · 7.68 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
declare namespace HashedDrawableMap {
let attachedViews: {};
let attachedAsImage: {};
let attachedAsBackground: {};
function isImageAttachedToView(view: any): boolean;
function isBackgroundAttachedToView(view: any): boolean;
function isAttachedToView(view: any): any;
function getDrawableAttachedToViewAsImage(view: any): any;
function getDrawableAttachedToViewAsBackground(view: any): any;
function getDrawablesAttachedToView(view: any): any[];
function getAttachedViewsInMap(map: any, drawable: any): any[];
function getAsImageAttachedViews(drawable: any): any[];
function getAsBackgroundAttachedViews(drawable: any): any[];
function getAttachedViews(drawable: any): any[];
function attachInMap(map: any, view: any, drawable: any): boolean;
function attachAsImage(view: any, drawable: any): boolean;
function attachAsBackground(view: any, drawable: any): boolean;
function deattachInMap(map: any, view: any): boolean;
function deattachAsImage(view: any): boolean;
function deattachAsBackground(view: any): boolean;
}
declare namespace DrawableFactory {
function setAlpha(drawable: any, alpha: any): void;
function setAntiAlias(drawable: any, enabled: any): void;
function setAutoMirrored(drawable: any, enabled: any): void;
function setFilterBitmap(drawable: any, enabled: any): void;
function setTintColor(drawable: any, color: any): void;
function setMipMap(drawable: any, enabled: any): void;
function setColorFilter(drawable: any, filter: any): void;
function setTileMode(drawable: any, modesOrX: any, y: any): void;
function setGravity(drawable: any, gravity: any): void;
function setLayoutDirection(drawable: any, direction: any): void;
function setXfermode(drawable: any, mode: any): void;
function setLevel(drawable: any, level: any): any;
function setState(drawable: any, states: any): any;
function setVisible(drawable: any, first: any, second: any): any;
}
declare namespace BitmapFactory {
function decodeBytes(bytes: any, options: any): android.graphics.Bitmap;
function decodeFile(path: any, options: any): android.graphics.Bitmap;
function decodeAsset(path: any, options: any): android.graphics.Bitmap;
function createScaled(bitmap: any, dx: any, dy: any): any;
}
declare namespace BitmapDrawableFactory {
let required: {};
let mapped: {};
function getMappedFileByKey(key: any): any;
function requireByKey(key: any, options: any): any;
function findMappedByTag(tag: any): string[];
function getRequiredCount(): number;
function isRequired(key: any): boolean;
function generateKeyFor(path: any, root: any): string;
function getMappedCount(): number;
function isMapped(key: any): boolean;
function map(file: any, root: any): any;
function mapAs(key: any, file: any): any;
let MIME_TYPES: string[];
function listFileNames(path: any, explore: any, root: any): any;
function mapDirectory(path: any, explore: any, root: any): any[];
function require(value: any, options: any): any;
function wrap(value: any, options: any): any;
function sameAs(from: any, to: any): boolean;
function recycle(key: any): boolean;
function recycleRequired(): void;
}
declare namespace AnimationDrawableFactory {
function setEnterFadeDuration(drawable: any, duration: any): void;
function setExitFadeDuration(drawable: any, duration: any): void;
function setOneShot(drawable: any, enabled: any): void;
}
declare class Drawable {
static applyDescribe(drawable: any, descriptor: any): void;
isAttachedAsImage(view: any): boolean;
isAttachedAsBackground(view: any): boolean;
isAttached(view: any): boolean;
toDrawable(): any;
attachAsImage(view: any, force: any): boolean;
deattachAsImage(view: any): boolean;
attachAsBackground(view: any, force: any): boolean;
deattachAsBackground(view: any): boolean;
requestDeattach(view: any): boolean;
reattachAsImage(view: any): boolean;
reattachAsBackground(view: any): boolean;
requestReattach(view: any): boolean;
toString(): string;
}
declare class CachedDrawable extends Drawable {
toDrawable(): android.graphics.drawable.Drawable;
source: android.graphics.drawable.Drawable;
isProcessed(): boolean;
/**
* @returns {android.graphics.drawable.Drawable}
*/
process(): android.graphics.drawable.Drawable;
getDescriptor(): any;
setDescriptor(descriptor: any): void;
descriptor: any;
describe(drawable: any): void;
requireDescribe(): void;
invalidate(): void;
}
declare class ColorDrawable extends Drawable {
static parseColor(value: any): any;
constructor(color: any);
toDrawable(): android.graphics.drawable.ColorDrawable;
getColor(): any;
setColor(color: any): void;
color: any;
}
declare class ScheduledDrawable extends CachedDrawable {
thread: java.lang.Thread;
toDrawableInThread(): android.graphics.drawable.Drawable;
getThread(): java.lang.Thread;
isProcessing(): boolean;
}
declare class LayerDrawable extends ScheduledDrawable {
constructor(layers: any);
process(): android.graphics.drawable.LayerDrawable;
clearLayers(): void;
layers: any;
getLayers(): any;
getLayerCount(): any;
indexOfLayer(layer: any): any;
getLayerAt(index: any): any;
addLayer(layer: any): void;
addLayers(layers: any): void;
hasLayer(layer: any): boolean;
removeLayer(layer: any): void;
}
declare class ClipDrawable extends ScheduledDrawable {
constructor(drawable: any, location: any, side: any);
process(): android.graphics.drawable.ClipDrawable;
getDrawable(): any;
setDrawable(drawable: any): void;
drawable: any;
getLocation(): number;
setLocation(location: any): void;
location: number;
getSide(): number;
setSide(side: any): void;
side: number;
}
declare namespace ClipDrawable {
namespace Side {
let HORIZONTAL: number;
let VERTICAL: number;
}
}
declare class BitmapDrawable extends ScheduledDrawable {
constructor(bitmap: any, options: any);
process(): android.graphics.drawable.BitmapDrawable;
wrapped: any;
describe(drawable: any, ...args: any[]): void;
getBitmap(): any;
setBitmap(bitmap: any): void;
bitmap: any;
getWrappedBitmap(): any;
getOptions(): any;
setOptions(options: any): void;
options: any;
getCorruptedThumbnail(): any;
setCorruptedThumbnail(bitmap: any): void;
corrupted: any;
recycle(): void;
}
declare class AnimationDrawable extends ScheduledDrawable {
constructor(frames: any);
process(): android.graphics.drawable.AnimationDrawable;
clearFrames(): void;
frames: any;
getFrames(): any;
getFrameCount(): any;
indexOfFrame(frame: any): any;
getFrameAt(index: any): any;
addFrame(frame: any, duration: any): void;
addFrames(frames: any, duration: any): void;
hasFrame(frame: any): boolean;
removeFrame(frame: any): void;
getCurrentIndex(): any;
setCurrentIndex(index: any): void;
isRunning(): any;
start(): boolean;
stop(): boolean;
getDefaultDuration(): number;
setDefaultDuration(duration: any): void;
duration: number;
isStartingWhenProcess(): boolean;
setIsStartingWhenProcess(enabled: any): void;
starting: boolean;
isStoppingWhenCompleted(): boolean;
setIsStoppingWhenCompleted(enabled: any): void;
stopping: boolean;
}
declare namespace AnimationDrawable {
export { Frame };
}
declare class Frame {
constructor(drawable: any, duration: any);
getDrawable(): any;
setDrawable(drawable: any): void;
drawable: any;
getDuration(): number;
setDuration(duration: any): void;
duration: number;
toString(): string;
}