Merge pull request #1006 from NativeScript/dts-no-platformtypes

Don't expose platform types in public d.ts files.
This commit is contained in:
Hristo Deshev
2015-10-30 18:13:02 +02:00
34 changed files with 180 additions and 175 deletions

View File

@ -243,7 +243,7 @@ declare module "application" {
/** /**
* The activity. * The activity.
*/ */
activity: android.app.Activity; activity: any /* android.app.Activity */;
/** /**
* The name of the event. * The name of the event.
@ -263,7 +263,7 @@ declare module "application" {
/** /**
* The bundle. * The bundle.
*/ */
bundle: android.os.Bundle; bundle: any /* android.os.Bundle */;
} }
/** /**
@ -283,7 +283,7 @@ declare module "application" {
/** /**
* The intent. * The intent.
*/ */
intent: android.content.Intent; intent: any /* android.content.Intent */;
} }
/** /**
@ -303,27 +303,27 @@ declare module "application" {
/** /**
* The [android Application](http://developer.android.com/reference/android/app/Application.html) object instance provided to the init of the module. * The [android Application](http://developer.android.com/reference/android/app/Application.html) object instance provided to the init of the module.
*/ */
nativeApp: android.app.Application; nativeApp: any /* android.app.Application */;
/** /**
* The application's [android Context](http://developer.android.com/reference/android/content/Context.html) object instance. * The application's [android Context](http://developer.android.com/reference/android/content/Context.html) object instance.
*/ */
context: android.content.Context; context: any /* android.content.Context */;
/** /**
* The currently active (loaded) [android Activity](http://developer.android.com/reference/android/app/Activity.html). This property is automatically updated upon Activity events. * The currently active (loaded) [android Activity](http://developer.android.com/reference/android/app/Activity.html). This property is automatically updated upon Activity events.
*/ */
foregroundActivity: android.app.Activity; foregroundActivity: any /* android.app.Activity */;
/** /**
* The currently active (loaded) Context. This is typically the top-level Activity that is just created. * The currently active (loaded) Context. This is typically the top-level Activity that is just created.
*/ */
currentContext: android.content.Context; currentContext: any /* android.content.Context */;
/** /**
* The main (start) Activity for the application. * The main (start) Activity for the application.
*/ */
startActivity: android.app.Activity; startActivity: any /* android.app.Activity */;
/** /**
* The name of the application package. * The name of the application package.
@ -335,47 +335,47 @@ declare module "application" {
* @param intent - Native (android) intent used to create the activity. * @param intent - Native (android) intent used to create the activity.
* Returns com.tns.NativeScriptActivity.extend implementation. * Returns com.tns.NativeScriptActivity.extend implementation.
*/ */
getActivity(intent: android.content.Intent): any; getActivity(intent: any /* android.content.Intent */): any;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityCreated method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityCreated method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onActivityCreated: (activity: android.app.Activity, bundle: android.os.Bundle) => void; onActivityCreated: (activity: any /* android.app.Activity */, bundle: any /* android.os.Bundle */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityDestroyed method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityDestroyed method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onActivityDestroyed: (activity: android.app.Activity) => void; onActivityDestroyed: (activity: any /* android.app.Activity */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityDestroyed method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityDestroyed method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onActivityStarted: (activity: android.app.Activity) => void; onActivityStarted: (activity: any /* android.app.Activity */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityPaused method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityPaused method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onActivityPaused: (activity: android.app.Activity) => void; onActivityPaused: (activity: any /* android.app.Activity */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityResumed method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityResumed method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onActivityResumed: (activity: android.app.Activity) => void; onActivityResumed: (activity: any /* android.app.Activity */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityStopped method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivityStopped method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onActivityStopped: (activity: android.app.Activity) => void; onActivityStopped: (activity: any /* android.app.Activity */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the [onActivitySaveInstanceState method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html). * [Deprecated. Please use the respective event instead.] Direct handler of the [onActivitySaveInstanceState method](http://developer.android.com/reference/android/app/Application.ActivityLifecycleCallbacks.html).
*/ */
onSaveActivityState: (activity: android.app.Activity, bundle: android.os.Bundle) => void; onSaveActivityState: (activity: any /* android.app.Activity */, bundle: any /* android.os.Bundle */) => void;
/** /**
* [Deprecated. Please use the respective event instead.] Direct handler of the onActivityResult method. * [Deprecated. Please use the respective event instead.] Direct handler of the onActivityResult method.
*/ */
onActivityResult: (requestCode: number, resultCode: number, data: android.content.Intent) => void; onActivityResult: (requestCode: number, resultCode: number, data: any /* android.content.Intent */) => void;
/** /**
* A basic method signature to hook an event listener (shortcut alias to the addEventListener method). * A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
@ -481,7 +481,7 @@ declare module "application" {
* @param intentFilter A string containing the intent filter. * @param intentFilter A string containing the intent filter.
* @param onReceiveCallback A callback function that will be called each time the receiver receives a broadcast. * @param onReceiveCallback A callback function that will be called each time the receiver receives a broadcast.
*/ */
registerBroadcastReceiver(intentFilter: string, onReceiveCallback: (context: android.content.Context, intent: android.content.Intent) => void): void; registerBroadcastReceiver(intentFilter: string, onReceiveCallback: (context: any /* android.content.Context */, intent: any /* android.content.Intent */) => void): void;
/** /**
* Unregister a previously registered BroadcastReceiver. * Unregister a previously registered BroadcastReceiver.
@ -500,17 +500,17 @@ declare module "application" {
/** /**
* The root view controller for the application. * The root view controller for the application.
*/ */
rootController: UIViewController; rootController: any /* UIViewController */;
/** /**
* The [UIApplication](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/index.html). * The [UIApplication](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/index.html).
*/ */
nativeApp: UIApplication; nativeApp: any /* UIApplication */;
/** /**
* The [UIApplicationDelegate](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html) class. * The [UIApplicationDelegate](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html) class.
*/ */
delegate: typeof UIApplicationDelegate; delegate: any /* typeof UIApplicationDelegate */;
/** /**
* Adds an observer to the default notification center for the specified notification. * Adds an observer to the default notification center for the specified notification.
@ -518,7 +518,7 @@ declare module "application" {
* @param notificationName A string containing the name of the notification. * @param notificationName A string containing the name of the notification.
* @param onReceiveCallback A callback function that will be called each time the observer receives a notification. * @param onReceiveCallback A callback function that will be called each time the observer receives a notification.
*/ */
addNotificationObserver(notificationName: string, onReceiveCallback: (notification: NSNotification) => void): any; addNotificationObserver(notificationName: string, onReceiveCallback: (notification: any /* NSNotification */) => void): any;
/** /**
* Removes the observer for the specified notification from the default notification center. * Removes the observer for the specified notification from the default notification center.
@ -529,4 +529,4 @@ declare module "application" {
*/ */
removeNotificationObserver(observer: any, notificationName: string): void; removeNotificationObserver(observer: any, notificationName: string): void;
} }
} }

4
color/color.d.ts vendored
View File

@ -54,7 +54,7 @@ declare module "color" {
/** /**
* Gets the iOS-specific UIColor value representation. This is a read-only property. * Gets the iOS-specific UIColor value representation. This is a read-only property.
*/ */
ios: UIColor; ios: any /* UIColor */;
/** /**
* Specifies whether this Color is equal to the Color parameter. * Specifies whether this Color is equal to the Color parameter.
@ -75,4 +75,4 @@ declare module "color" {
*/ */
public static isValid(value: any): boolean; public static isValid(value: any): boolean;
} }
} }

View File

@ -25,7 +25,7 @@ module.exports = function(grunt) {
var contentAsObject = JSON.parse(content); var contentAsObject = JSON.parse(content);
update(contentAsObject); update(contentAsObject);
return JSON.stringify(contentAsObject, null, "\t"); return JSON.stringify(contentAsObject, null, "\t");
} };
var updateModulesPackageDef = function(content, srcPath) { var updateModulesPackageDef = function(content, srcPath) {
return updatePackageDef(content, function(contentAsObject) { return updatePackageDef(content, function(contentAsObject) {
@ -42,7 +42,7 @@ module.exports = function(grunt) {
contentAsObject.version = localCfg.packageVersion; contentAsObject.version = localCfg.packageVersion;
contentAsObject.author = "Telerik <support@telerik.com>"; contentAsObject.author = "Telerik <support@telerik.com>";
var specificKeywords = ["telerik", "mobile", "nativescript", "{N}", "tns", "appbuilder"]; var specificKeywords = ["telerik", "mobile", "nativescript", "{N}", "tns", "appbuilder"];
if (currentAppName.indexOf("template-") == 0) { if (currentAppName.indexOf("template-") === 0) {
var templateName = currentAppName.substring("template-".length); var templateName = currentAppName.substring("template-".length);
contentAsObject.name = "tns-" + currentAppName; contentAsObject.name = "tns-" + currentAppName;
contentAsObject.description = "Nativescript " + templateName + " project template"; contentAsObject.description = "Nativescript " + templateName + " project template";
@ -132,7 +132,7 @@ module.exports = function(grunt) {
} }
} }
return allDirs; return allDirs;
} };
var localCfg = { var localCfg = {
srcDir: ".", srcDir: ".",
@ -150,7 +150,7 @@ module.exports = function(grunt) {
}; };
var nodeTestEnv = JSON.parse(JSON.stringify(process.env)); var nodeTestEnv = JSON.parse(JSON.stringify(process.env));
nodeTestEnv['NODE_PATH'] = localCfg.outModulesDir; nodeTestEnv.NODE_PATH = localCfg.outModulesDir;
localCfg.nodeTestsDir = pathModule.join(localCfg.outModulesDir, 'node-tests'); localCfg.nodeTestsDir = pathModule.join(localCfg.outModulesDir, 'node-tests');
@ -177,6 +177,19 @@ module.exports = function(grunt) {
"!./libjs.d.ts" "!./libjs.d.ts"
]); ]);
var tsOptions = {
fast: 'never',
module: "commonjs",
target: "es5",
sourceMap: false,
declaration: false,
removeComments: !grunt.option('leavecomments') || '',
compiler: "node_modules/typescript/bin/tsc",
noEmitOnError: true,
experimentalDecorators: true,
noEmitHelpers: true
};
grunt.initConfig({ grunt.initConfig({
localCfg : localCfg, localCfg : localCfg,
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
@ -314,36 +327,31 @@ module.exports = function(grunt) {
build: { build: {
src: localCfg.typeScriptSrc, src: localCfg.typeScriptSrc,
outDir: localCfg.outModulesDir, outDir: localCfg.outModulesDir,
options: { options: tsOptions
fast: 'never',
module: "commonjs",
target: "es5",
sourceMap: false,
declaration: false,
removeComments: "<%= !grunt.option('leavecomments') || '' %>",
compiler: "node_modules/typescript/bin/tsc",
noEmitOnError: true,
experimentalDecorators: true,
noEmitHelpers: true
}
}, },
buildNodeTests: { buildNodeTests: {
src: [ src: [
'js-libs/easysax/**/*.ts', 'js-libs/easysax/**/*.ts',
'xml/**/*.ts', 'xml/**/*.ts',
'node-tests/**/*.ts', 'node-tests/**/*.ts',
'es-collections.d.ts',
], ],
outDir: localCfg.outModulesDir, outDir: localCfg.outModulesDir,
options: { options: tsOptions
fast: 'never', },
module: "commonjs", buildDts: {
target: "es5", src: [
sourceMap: false, '**/*.d.ts',
declaration: false, '!org.nativescript.widgets.d.ts',
removeComments: "<%= !grunt.option('leavecomments') || '' %>", '!**/*.android.d.ts',
compiler: "node_modules/typescript/bin/tsc", '!node_modules/**/*',
noEmitOnError: true '!bin/**/*',
} '!apps/**/*',
'!android17.d.ts',
'!ios.d.ts',
],
outDir: localCfg.outModulesDir,
options: tsOptions
} }
}, },
tslint: { tslint: {
@ -431,7 +439,7 @@ module.exports = function(grunt) {
clonedTasks.push({name: taskName, cfg: taskCfg}); clonedTasks.push({name: taskName, cfg: taskCfg});
} }
return clonedTasks; return clonedTasks;
} };
var enqueueTasks = function(tasks) { var enqueueTasks = function(tasks) {
for (var i=0; i<tasks.length; i++) { for (var i=0; i<tasks.length; i++) {
@ -439,7 +447,7 @@ module.exports = function(grunt) {
grunt.config(task.name, task.cfg); grunt.config(task.name, task.cfg);
grunt.task.run(task.name.join(":")); grunt.task.run(task.name.join(":"));
} }
} };
grunt.registerTask("processEachApp", function(outAppsDir, pkgAppNameSuffix){ grunt.registerTask("processEachApp", function(outAppsDir, pkgAppNameSuffix){
var allapps = getSubDirs(localCfg.srcAppsDir); var allapps = getSubDirs(localCfg.srcAppsDir);
@ -489,7 +497,10 @@ module.exports = function(grunt) {
"copy:license" "copy:license"
]); ]);
grunt.registerTask("compile-dts", ["ts:buildDts"]);
grunt.registerTask("compile-ts", [ grunt.registerTask("compile-ts", [
"compile-dts",
"ts:build", "ts:build",
"clean:typeScriptLeftovers", "clean:typeScriptLeftovers",
"copy:childPackageFiles" "copy:childPackageFiles"

View File

@ -20,12 +20,12 @@ declare module "image-source" {
/** /**
* The iOS-specific [UIImage](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/) instance. Will be undefined when running on Android. * The iOS-specific [UIImage](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImage_Class/) instance. Will be undefined when running on Android.
*/ */
ios: UIImage; ios: any /* UIImage */;
/** /**
* The Android-specific [image](http://developer.android.com/reference/android/graphics/Bitmap.html) instance. Will be undefined when running on iOS. * The Android-specific [image](http://developer.android.com/reference/android/graphics/Bitmap.html) instance. Will be undefined when running on iOS.
*/ */
android: android.graphics.Bitmap; android: any /* android.graphics.Bitmap */;
/** /**
* Loads this instance from the specified resource name. * Loads this instance from the specified resource name.
@ -122,4 +122,4 @@ declare module "image-source" {
* @param path The path. * @param path The path.
*/ */
export function isFileOrResourcePath(path: string): boolean export function isFileOrResourcePath(path: string): boolean
} }

View File

@ -57,12 +57,12 @@ declare module "location" {
/** /**
* The android-specific [location](http://developer.android.com/reference/android/location/Location.html) object. * The android-specific [location](http://developer.android.com/reference/android/location/Location.html) object.
*/ */
android: android.location.Location; android: any /* android.location.Location */;
/** /**
* The ios-specific [CLLocation](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/) object. * The ios-specific [CLLocation](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocation_Class/) object.
*/ */
ios: CLLocation; ios: any /* CLLocation */;
} }
/** /**
@ -162,7 +162,7 @@ declare module "location" {
/** /**
* The android-specific location manager [LocationManager](http://developer.android.com/reference/android/location/LocationManager.html) * The android-specific location manager [LocationManager](http://developer.android.com/reference/android/location/LocationManager.html)
*/ */
manager: android.location.LocationManager; manager: any /* android.location.LocationManager */;
/** /**
* The minimum time interval between subsequent location updates, in milliseconds. * The minimum time interval between subsequent location updates, in milliseconds.
@ -186,6 +186,6 @@ declare module "location" {
/** /**
* The ios-specific location manager [CLLocationManager](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/) * The ios-specific location manager [CLLocationManager](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/)
*/ */
manager: CLLocationManager; manager: any /* CLLocationManager */;
} }
} }

View File

@ -205,7 +205,7 @@ declare module "ui/action-bar" {
} }
//@private //@private
export function _setNavBarColor(navBar: UINavigationBar, color: UIColor); export function _setNavBarColor(navBar: any /* UINavigationBar */, color: any /* UIColor */);
export function _setNavBarBackgroundColor(navBar: UINavigationBar, color: UIColor); export function _setNavBarBackgroundColor(navBar: any /* UINavigationBar */, color: any /* UIColor */);
//@endprivate //@endprivate
} }

View File

@ -17,16 +17,16 @@ declare module "ui/activity-indicator" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/ProgressBar.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/ProgressBar.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.ProgressBar; android: any /* android.widget.ProgressBar */;
/** /**
* Gets the native iOS [UIActivityIndicatorView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivityIndicatorView_Class/index.html) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UIActivityIndicatorView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivityIndicatorView_Class/index.html) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIActivityIndicatorView; ios: any /* UIActivityIndicatorView */;
/** /**
* Gets or sets a value indicating whether the widget is currently displaying progress. * Gets or sets a value indicating whether the widget is currently displaying progress.
*/ */
busy: boolean; busy: boolean;
} }
} }

View File

@ -24,12 +24,12 @@ declare module "ui/button" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/Button.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/Button.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.Button; android: any /* android.widget.Button */;
/** /**
* Gets the native [UIButton](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIButton_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native [UIButton](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIButton_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIButton; ios: any /* UIButton */;
/** /**
* Gets or sets the text (label) displayed by this instance. * Gets or sets the text (label) displayed by this instance.
@ -62,4 +62,4 @@ declare module "ui/button" {
*/ */
_addChildFromBuilder(name: string, value: any): void; _addChildFromBuilder(name: string, value: any): void;
} }
} }

View File

@ -9,6 +9,6 @@
* @param control An instance of the UIControl which state will be watched. * @param control An instance of the UIControl which state will be watched.
* @param callback A callback called when a visual state of the UIControl is changed. * @param callback A callback called when a visual state of the UIControl is changed.
*/ */
constructor(control: UIControl, callback: (state: string) => void); constructor(control: any /* UIControl */, callback: (state: string) => void);
} }
} }

View File

@ -62,18 +62,6 @@ function onIsUserInteractionEnabledPropertyChanged(data: dependencyObservable.Pr
} }
(<proxy.PropertyMetadata>viewCommon.View.isUserInteractionEnabledProperty.metadata).onSetNativeValue = onIsUserInteractionEnabledPropertyChanged; (<proxy.PropertyMetadata>viewCommon.View.isUserInteractionEnabledProperty.metadata).onSetNativeValue = onIsUserInteractionEnabledPropertyChanged;
export var NativeViewGroup = (<any>android.view.ViewGroup).extend({
onMeasure: function (widthMeasureSpec, heightMeasureSpec) {
var owner: viewDefinition.View = this[OWNER];
owner.onMeasure(widthMeasureSpec, heightMeasureSpec);
this.setMeasuredDimension(owner.getMeasuredWidth(), owner.getMeasuredHeight());
},
onLayout: function (changed: boolean, left: number, top: number, right: number, bottom: number): void {
var owner: viewDefinition.View = this[OWNER];
owner.onLayout(left, top, right, bottom);
}
});
export class View extends viewCommon.View { export class View extends viewCommon.View {
private _disableUserInteractionListener: android.view.View.OnTouchListener = new android.view.View.OnTouchListener({ private _disableUserInteractionListener: android.view.View.OnTouchListener = new android.view.View.OnTouchListener({
onTouch: function (view: android.view.View, event: android.view.MotionEvent) { onTouch: function (view: android.view.View, event: android.view.MotionEvent) {

11
ui/core/view.d.ts vendored
View File

@ -452,7 +452,7 @@ declare module "ui/core/view" {
_propagateInheritableProperties(view: View) _propagateInheritableProperties(view: View)
_inheritProperties(parentView: View) _inheritProperties(parentView: View)
_removeView(view: View); _removeView(view: View);
_context: android.content.Context; _context: any /* android.content.Context */;
public _applyXmlAttribute(attribute: string, value: any): boolean; public _applyXmlAttribute(attribute: string, value: any): boolean;
@ -474,7 +474,7 @@ declare module "ui/core/view" {
_eachChildView(callback: (child: View) => boolean); _eachChildView(callback: (child: View) => boolean);
_childrenCount: number; _childrenCount: number;
_onAttached(context: android.content.Context): void; _onAttached(context: any /* android.content.Context */): void;
_onContextChanged(): void; _onContextChanged(): void;
_onDetached(force?: boolean): void; _onDetached(force?: boolean): void;
_createUI(): void; _createUI(): void;
@ -511,13 +511,6 @@ declare module "ui/core/view" {
export class CustomLayoutView extends View { export class CustomLayoutView extends View {
} }
//@private
export class NativeViewGroup extends android.view.ViewGroup {
constructor(context: android.content.Context);
public setOwner(view: View);
}
//@endprivate
/** /**
* Defines an interface for adding arrays declared in xml. * Defines an interface for adding arrays declared in xml.
*/ */

View File

@ -18,12 +18,12 @@ declare module "ui/date-picker" {
/** /**
* Gets the native [android.widget.DatePicker](http://developer.android.com/reference/android/widget/DatePicker.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android.widget.DatePicker](http://developer.android.com/reference/android/widget/DatePicker.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.DatePicker; android: any /* android.widget.DatePicker */;
/** /**
* Gets the native iOS [UIDatePicker](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UIDatePicker](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIDatePicker; ios: any /* UIDatePicker */;
/** /**
* Gets or sets the year. * Gets or sets the year.
@ -50,4 +50,4 @@ declare module "ui/date-picker" {
*/ */
minDate: Date; minDate: Date;
} }
} }

16
ui/frame/frame.d.ts vendored
View File

@ -176,7 +176,7 @@ declare module "ui/frame" {
/** /**
* Gets the Android-specific menu item that has been selected. * Gets the Android-specific menu item that has been selected.
*/ */
item: android.view.IMenuItem; item: any /* android.view.IMenuItem */;
/** /**
* True to mark the event as handled (that is to prevent the default processing). * True to mark the event as handled (that is to prevent the default processing).
@ -193,28 +193,28 @@ declare module "ui/frame" {
/** /**
* Gets the native [android ViewGroup](http://developer.android.com/reference/android/view/ViewGroup.html) instance that represents the root layout part of the Frame. * Gets the native [android ViewGroup](http://developer.android.com/reference/android/view/ViewGroup.html) instance that represents the root layout part of the Frame.
*/ */
rootViewGroup: android.view.ViewGroup; rootViewGroup: any /* android.view.ViewGroup */;
/** /**
* Gets the native [android Activity](http://developer.android.com/reference/android/app/Activity.html) instance associated with this Frame. In case of nested Frame objects, this property points to the activity of the root Frame. * Gets the native [android Activity](http://developer.android.com/reference/android/app/Activity.html) instance associated with this Frame. In case of nested Frame objects, this property points to the activity of the root Frame.
*/ */
activity: android.app.Activity; activity: any /* android.app.Activity */;
/** /**
* Gets the current (foreground) activity for the application. This property will recursively traverse all existing Frame objects and check for own Activity property. * Gets the current (foreground) activity for the application. This property will recursively traverse all existing Frame objects and check for own Activity property.
*/ */
currentActivity: android.app.Activity; currentActivity: any /* android.app.Activity */;
/** /**
* Gets the actionBar property of the currentActivity. * Gets the actionBar property of the currentActivity.
*/ */
actionBar: android.app.ActionBar; actionBar: any /* android.app.ActionBar */;
/** /**
* A function called by the Runtime whenever a new Activity is about to be opened. * A function called by the Runtime whenever a new Activity is about to be opened.
* @param intent The native [android Intent](http://developer.android.com/reference/android/content/Intent.html) object passed to the Activity's onCreate method. * @param intent The native [android Intent](http://developer.android.com/reference/android/content/Intent.html) object passed to the Activity's onCreate method.
*/ */
onActivityRequested(intent: android.content.Intent): Object; onActivityRequested(intent: any /* android.content.Intent */): Object;
/** /**
* Determines whether the Activity associated with this Frame will display an action bar or not. * Determines whether the Activity associated with this Frame will display an action bar or not.
@ -237,7 +237,7 @@ declare module "ui/frame" {
/** /**
* Gets the native [UINavigationController](https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UINavigationController_Class/index.html) instance associated with this Frame. * Gets the native [UINavigationController](https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UINavigationController_Class/index.html) instance associated with this Frame.
*/ */
controller: UINavigationController; controller: any /* UINavigationController */;
/** /**
* Gets or sets the visibility of navigationBar. * Gets or sets the visibility of navigationBar.
@ -245,4 +245,4 @@ declare module "ui/frame" {
*/ */
navBarVisibility: string; navBarVisibility: string;
} }
} }

View File

@ -76,7 +76,7 @@ declare module "ui/gestures" {
/** /**
* Gets the underlying native iOS specific [UIGestureRecognizer](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIGestureRecognizer_Class/). * Gets the underlying native iOS specific [UIGestureRecognizer](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIGestureRecognizer_Class/).
*/ */
ios: UIGestureRecognizer ios: any /* UIGestureRecognizer */;
/** /**
* Gets the underlying native android specific [gesture detector](http://developer.android.com/reference/android/view/GestureDetector.html). * Gets the underlying native android specific [gesture detector](http://developer.android.com/reference/android/view/GestureDetector.html).
*/ */
@ -151,7 +151,7 @@ declare module "ui/gestures" {
/** /**
* An internal Android specific method used to pass the motion event to the correct gesture observer. * An internal Android specific method used to pass the motion event to the correct gesture observer.
*/ */
androidOnTouchEvent: (motionEvent: android.view.MotionEvent) => void; androidOnTouchEvent: (motionEvent: any /* android.view.MotionEvent */) => void;
} }
/** /**
@ -174,4 +174,4 @@ declare module "ui/gestures" {
* @param type - A string representation of a gesture type (e.g. Tap). * @param type - A string representation of a gesture type (e.g. Tap).
*/ */
export function fromString(type: string): GestureTypes; export function fromString(type: string): GestureTypes;
} }

View File

@ -22,12 +22,12 @@ declare module "ui/html-view" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/TextView.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/TextView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.TextView; android: any /* android.widget.TextView */;
/** /**
* Gets the native [UILabel](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native [UILabel](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UILabel; ios: any /* UILabel */;
/** /**
* Gets or sets html string for the HtmlView. * Gets or sets html string for the HtmlView.
@ -44,4 +44,4 @@ declare module "ui/html-view" {
*/ */
html?: string; html?: string;
} }
} }

4
ui/image/image.d.ts vendored
View File

@ -18,12 +18,12 @@ declare module "ui/image" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/ImageView.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/ImageView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.ImageView; android: any /* android.widget.ImageView */;
/** /**
* Gets the native iOS [UIImageView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImageView_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UIImageView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImageView_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIImageView; ios: any /* UIImageView */;
/** /**
* Gets or sets the image source of the image. * Gets or sets the image source of the image.

6
ui/label/label.d.ts vendored
View File

@ -21,12 +21,12 @@ declare module "ui/label" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/TextView.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/TextView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.TextView; android: any /* android.widget.TextView */;
/** /**
* Gets the native [UILabel](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native [UILabel](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UILabel; ios: any /* UILabel */;
/** /**
* Gets or sets whether the Label wraps text or not. * Gets or sets whether the Label wraps text or not.
@ -48,4 +48,4 @@ declare module "ui/label" {
*/ */
textWrap?: boolean; textWrap?: boolean;
} }
} }

View File

@ -6,6 +6,18 @@ import utils = require("utils/utils");
var OWNER = "_owner"; var OWNER = "_owner";
var NativeViewGroup = (<any>android.view.ViewGroup).extend({
onMeasure: function (widthMeasureSpec, heightMeasureSpec) {
var owner: view.View = this[OWNER];
owner.onMeasure(widthMeasureSpec, heightMeasureSpec);
this.setMeasuredDimension(owner.getMeasuredWidth(), owner.getMeasuredHeight());
},
onLayout: function (changed: boolean, left: number, top: number, right: number, bottom: number): void {
var owner: view.View = this[OWNER];
owner.onLayout(left, top, right, bottom);
}
});
export class Layout extends layoutBase.LayoutBase implements definition.Layout { export class Layout extends layoutBase.LayoutBase implements definition.Layout {
private _viewGroup: android.view.ViewGroup; private _viewGroup: android.view.ViewGroup;
@ -18,7 +30,7 @@ export class Layout extends layoutBase.LayoutBase implements definition.Layout {
} }
public _createUI() { public _createUI() {
this._viewGroup = new view.NativeViewGroup(this._context); this._viewGroup = new NativeViewGroup(this._context);
this._viewGroup[OWNER] = this; this._viewGroup[OWNER] = this;
} }
@ -60,4 +72,4 @@ export class Layout extends layoutBase.LayoutBase implements definition.Layout {
public onLayout(left: number, top: number, right: number, bottom: number): void { public onLayout(left: number, top: number, right: number, bottom: number): void {
// Don't call super because it will trigger layout again. // Don't call super because it will trigger layout again.
} }
} }

View File

@ -17,12 +17,12 @@ declare module "ui/list-picker" {
/** /**
* Gets the native [android.widget.NumberPicker](http://developer.android.com/reference/android/widget/NumberPicker.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android.widget.NumberPicker](http://developer.android.com/reference/android/widget/NumberPicker.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.NumberPicker; android: any /* android.widget.NumberPicker */;
/** /**
* Gets the native iOS [UIPickerView](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UIPickerView](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIPickerView; ios: any /* UIPickerView */;
/** /**
* Gets or sets the selected index. * Gets or sets the selected index.
@ -35,4 +35,4 @@ declare module "ui/list-picker" {
*/ */
items: any; items: any;
} }
} }

View File

@ -52,12 +52,12 @@ declare module "ui/list-view" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/ListView.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/ListView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.ListView; android: any /* android.widget.ListView */;
/** /**
* Gets the native [iOS view](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableView_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native [iOS view](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableView_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UITableView; ios: any /* UITableView */;
/** /**
* Gets a value indicating whether the ListView is currently scrolling. * Gets a value indicating whether the ListView is currently scrolling.
@ -137,11 +137,11 @@ declare module "ui/list-view" {
/** /**
* Gets the native [iOS view](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableViewCell_Class/) that represents the user interface where the view is hosted. Valid only when running on iOS. * Gets the native [iOS view](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableViewCell_Class/) that represents the user interface where the view is hosted. Valid only when running on iOS.
*/ */
ios: UITableViewCell; ios: any /* UITableViewCell */;
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/view/ViewGroup.html) that represents the user interface where the view is hosted. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/view/ViewGroup.html) that represents the user interface where the view is hosted. Valid only when running on Android OS.
*/ */
android: android.view.ViewGroup; android: any /* android.view.ViewGroup */;
} }
} }

View File

@ -22,12 +22,12 @@ declare module "ui/progress" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/ProgressBar.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/ProgressBar.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.ProgressBar; android: any /* android.widget.ProgressBar */;
/** /**
* Gets the native iOS [UIProgressView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIProgressView_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UIProgressView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIProgressView_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIProgressView; ios: any /* UIProgressView */;
/** /**
* Gets or sets a progress current value. * Gets or sets a progress current value.
@ -39,4 +39,4 @@ declare module "ui/progress" {
*/ */
maxValue: number; maxValue: number;
} }
} }

View File

@ -34,12 +34,12 @@ declare module "ui/search-bar" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/SearchView.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/SearchView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.SearchView; android: any /* android.widget.SearchView */;
/** /**
* Gets the native iOS [UISearchBar](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISearchBar_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UISearchBar](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISearchBar_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UISearchBar; ios: any /* UISearchBar */;
/** /**
* Gets or sets a search bar text. * Gets or sets a search bar text.
@ -84,4 +84,4 @@ declare module "ui/search-bar" {
*/ */
dismissSoftInput(): void; dismissSoftInput(): void;
} }
} }

View File

@ -27,12 +27,12 @@ declare module "ui/slider" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/SeekBar.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/SeekBar.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.SeekBar; android: any /* android.widget.SeekBar */;
/** /**
* Gets the native iOS [UISlider](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISlider_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UISlider](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISlider_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UISlider; ios: any /* UISlider */;
/** /**
* Gets or sets a slider current value. The default value is 0. * Gets or sets a slider current value. The default value is 0.
@ -49,4 +49,4 @@ declare module "ui/slider" {
*/ */
maxValue: number; maxValue: number;
} }
} }

11
ui/styling/background.android.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
declare module "ui/styling/background" {
// We are using "ad" here to avoid namespace collision with the global android object
export module ad {
export class BorderDrawable extends android.graphics.drawable.ColorDrawable {
borderWidth: number;
cornerRadius: number;
borderColor: number;
background: Background;
}
}
}

View File

@ -44,16 +44,6 @@ declare module "ui/styling/background" {
} }
export module ios { export module ios {
export function createBackgroundUIColor(view: viewModule.View): UIColor; export function createBackgroundUIColor(view: viewModule.View): any /* UIColor */;
}
// We are using "ad" here to avoid namespace collision with the global android object
export module ad {
export class BorderDrawable extends android.graphics.drawable.ColorDrawable {
borderWidth: number;
cornerRadius: number;
borderColor: number;
background: Background;
}
} }
} }

View File

@ -12,8 +12,8 @@
constructor(family: string, size: number, style: string, weight: string); constructor(family: string, size: number, style: string, weight: string);
public getAndroidTypeface(): android.graphics.Typeface; public getAndroidTypeface(): any /* android.graphics.Typeface */;
public getUIFont(defaultFont: UIFont): UIFont; public getUIFont(defaultFont: any /* UIFont */): any /* UIFont */;
public withFontFamily(family: string): Font; public withFontFamily(family: string): Font;
public withFontStyle(style: string): Font; public withFontStyle(style: string): Font;
@ -27,4 +27,4 @@
export module ios { export module ios {
export function registerFont(fontFile: string); export function registerFont(fontFile: string);
} }
} }

View File

@ -18,16 +18,16 @@ declare module "ui/switch" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/Switch.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/Switch.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.Switch; android: any /* android.widget.Switch */;
/** /**
* Gets the native iOS [UISwitch](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISwitch_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UISwitch](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISwitch_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UISwitch; ios: any /* UISwitch */;
/** /**
* Gets or sets if a switch is checked or not. * Gets or sets if a switch is checked or not.
*/ */
checked: boolean; checked: boolean;
} }
} }

View File

@ -74,12 +74,12 @@ declare module "ui/tab-view" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/support/v4/view/ViewPager.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/support/v4/view/ViewPager.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.view.View;//android.support.v4.view.ViewPager; android: any /* android.view.View */;//android.support.v4.view.ViewPager;
/** /**
* Gets the native iOS [UITabBarController](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBarController_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UITabBarController](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBarController_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UITabBarController; ios: any /* UITabBarController */;
/** /**
* String value used when hooking to the selectedIndexChanged event. * String value used when hooking to the selectedIndexChanged event.
@ -100,8 +100,8 @@ declare module "ui/tab-view" {
on(event: "selectedIndexChanged", callback: (args: SelectedIndexChangedEventData) => void, thisArg?: any); on(event: "selectedIndexChanged", callback: (args: SelectedIndexChangedEventData) => void, thisArg?: any);
//@private //@private
_getAndroidTabView(): org.nativescript.widgets.TabLayout; _getAndroidTabView(): any /* org.nativescript.widgets.TabLayout */;
_updateIOSTabBarColors(): void; _updateIOSTabBarColors(): void;
//@endprivate //@endprivate
} }
} }

View File

@ -15,12 +15,12 @@ declare module "ui/text-field" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/EditText.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/EditText.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.EditText; android: any /* android.widget.EditText */;
/** /**
* Gets the native iOS [UITextField](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextField_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UITextField](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextField_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UITextField; ios: any /* UITextField */;
/** /**
* Gets or sets if a text field is for password entry. * Gets or sets if a text field is for password entry.
@ -37,4 +37,4 @@ declare module "ui/text-field" {
*/ */
secure?: boolean; secure?: boolean;
} }
} }

View File

@ -13,11 +13,11 @@ declare module "ui/text-view" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/widget/EditText.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/widget/EditText.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.EditText; android: any /* android.widget.EditText */;
/** /**
* Gets the native iOS [UITextView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextView_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UITextView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextView_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UITextView; ios: any /* UITextView */;
} }
} }

View File

@ -17,12 +17,12 @@ declare module "ui/time-picker" {
/** /**
* Gets the native [android.widget.TimePicker](http://developer.android.com/reference/android/widget/TimePicker.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android.widget.TimePicker](http://developer.android.com/reference/android/widget/TimePicker.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.widget.TimePicker; android: any /* android.widget.TimePicker */;
/** /**
* Gets the native iOS [UIDatePicker](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS. * Gets the native iOS [UIDatePicker](http://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIDatePicker; ios: any /* UIDatePicker */;
/** /**
* Gets or sets the time hour. * Gets or sets the time hour.
@ -34,4 +34,4 @@ declare module "ui/time-picker" {
*/ */
minute: number; minute: number;
} }
} }

4
ui/utils.d.ts vendored
View File

@ -5,9 +5,9 @@
* Gets actual height of a [UIView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/) widget. * Gets actual height of a [UIView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/) widget.
* @param uiView - An instance of UIView. * @param uiView - An instance of UIView.
*/ */
export function getActualHeight(uiView: UIView): number; export function getActualHeight(uiView: any /* UIView */): number;
export function _layoutRootView(rootView: view.View, parentBounds: CGRect): void; export function _layoutRootView(rootView: view.View, parentBounds: any /* CGRect */): void;
export function getStatusBarHeight(): number; export function getStatusBarHeight(): number;
} }

View File

@ -28,12 +28,12 @@ declare module "ui/web-view" {
/** /**
* Gets the native [android widget](http://developer.android.com/reference/android/webkit/WebView.html) that represents the user interface for this component. Valid only when running on Android OS. * Gets the native [android widget](http://developer.android.com/reference/android/webkit/WebView.html) that represents the user interface for this component. Valid only when running on Android OS.
*/ */
android: android.webkit.WebView; android: any /* android.webkit.WebView */;
/** /**
* Gets the native [UIWebView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/) that represents the user interface for this component. Valid only when running on iOS. * Gets the native [UIWebView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/) that represents the user interface for this component. Valid only when running on iOS.
*/ */
ios: UIWebView; ios: any /* UIWebView */;
/** /**
* [Obsolete. Please use src instead!] Gets or sets the url displayed by this instance. * [Obsolete. Please use src instead!] Gets or sets the url displayed by this instance.
@ -107,4 +107,4 @@ declare module "ui/web-view" {
*/ */
error: string; error: string;
} }
} }

14
utils/utils.d.ts vendored
View File

@ -59,27 +59,27 @@
/** /**
* Gets the native Android application instance. * Gets the native Android application instance.
*/ */
export function getApplication(): android.app.Application; export function getApplication(): any /* android.app.Application */;
/** /**
* Gets the Android application context. * Gets the Android application context.
*/ */
export function getApplicationContext(): android.content.Context; export function getApplicationContext(): any /* android.content.Context */;
/** /**
* Gets the native Android input method manager. * Gets the native Android input method manager.
*/ */
export function getInputMethodManager(): android.view.inputmethod.InputMethodManager; export function getInputMethodManager(): any /* android.view.inputmethod.InputMethodManager */;
/** /**
* Hides the soft input method, ususally a soft keyboard. * Hides the soft input method, ususally a soft keyboard.
*/ */
export function dismissSoftInput(nativeView: android.view.View): void; export function dismissSoftInput(nativeView: any /* android.view.View */): void;
/** /**
* Shows the soft input method, ususally a soft keyboard. * Shows the soft input method, ususally a soft keyboard.
*/ */
export function showSoftInput(nativeView: android.view.View): void; export function showSoftInput(nativeView: any /* android.view.View */): void;
/** /**
* Utility module dealing with some android collections. * Utility module dealing with some android collections.
@ -122,7 +122,7 @@
* Gets a color from the current theme. * Gets a color from the current theme.
* @param name - Name of the color resource. * @param name - Name of the color resource.
*/ */
export function getPalleteColor(name: string, context: android.content.Context): number; export function getPalleteColor(name: string, context: any /* android.content.Context */): number;
} }
} }
/** /**
@ -149,7 +149,7 @@
* Gets NativeScript color from [UIColor](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIColor_Class/). * Gets NativeScript color from [UIColor](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIColor_Class/).
* @param uiColor - UIColor instance used to create a NativeScript color. * @param uiColor - UIColor instance used to create a NativeScript color.
*/ */
export function getColor(uiColor: UIColor): colorModule.Color; export function getColor(uiColor: any /* UIColor */): colorModule.Color;
/** /**
* Gets an information about if current mode is Landscape. * Gets an information about if current mode is Landscape.
*/ */