forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeclarations.android.d.ts
94 lines (81 loc) · 3.42 KB
/
declarations.android.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
/* tslint:disable:no-unused-variable */
// Android specific TypeScript declarations
declare var app;
declare var telerik;
declare var gc: () => void;
interface ArrayConstructor {
create(type: any, count: number): any;
}
declare module android {
module support {
module v4 {
module widget {
class DrawerLayout {
constructor(context: android.content.Context);
}
module DrawerLayout {
class DrawerListener implements IDrawerListener {
constructor(implementation: IDrawerListener);
onDrawerClosed(drawerView: android.view.View): void;
onDrawerOpened(drawerView: android.view.View): void;
onDrawerSlide(drawerView: android.view.View, offset: number): void;
onDrawerStateChanged(newState: number): void;
}
class LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
constructor(width: number, height: number, gravity?: number);
gravity: number;
}
interface IDrawerListener {
onDrawerClosed(drawerView: android.view.View): void;
onDrawerOpened(drawerView: android.view.View): void;
onDrawerSlide(drawerView: android.view.View, offset: number): void;
onDrawerStateChanged(newState: number): void;
}
}
}
module app {
class ActionBarDrawerToggle {
constructor(activity: android.app.Activity, layout: widget.DrawerLayout, imageResId: number, openResId: number, closeResId: number);
}
}
}
}
}
declare module com {
export module tns {
export module Async {
export class CompleteCallback {
constructor(implementation: ICompleteCallback);
onComplete(result: Object, context: Object): void;
}
export interface ICompleteCallback {
onComplete(result: Object, context: Object): void;
}
export module Http {
export class KeyValuePair {
public key: string;
public value: string;
constructor(key: string, value: string);
}
export class RequestOptions {
public url: string;
public method: string;
public headers: java.util.ArrayList<KeyValuePair>;
public content: string;
public timeout: number;
public screenWidth: number;
public screenHeight: number;
}
export class RequestResult {
public raw: java.io.ByteArrayOutputStream;
public headers: java.util.ArrayList<KeyValuePair>;
public statusCode: number;
public responseAsString: string;
public responseAsImage: android.graphics.Bitmap;
public error: java.lang.Exception;
}
export function MakeRequest(options: RequestOptions, callback: CompleteCallback, context: any);
}
}
}
}