initial import
[vuplus_webkit] / Source / WebCore / html / HTMLInputElement.idl
1 /*
2  * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
3  * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 module html {
22
23     interface HTMLInputElement : HTMLElement {
24         attribute [ConvertNullToNullString] DOMString defaultValue;
25         attribute [Reflect=checked] boolean defaultChecked;
26         readonly attribute HTMLFormElement form;
27         attribute [Reflect, URL] DOMString formAction;
28         attribute [Reflect] DOMString formEnctype;
29         attribute [Reflect] DOMString formMethod;
30         attribute [Reflect] boolean formNoValidate;
31         attribute [Reflect] DOMString formTarget;
32         readonly attribute ValidityState validity;
33         attribute [Reflect] DOMString accept;
34         attribute [Reflect] DOMString accessKey;
35         attribute [Reflect] DOMString align;
36         attribute [Reflect] DOMString alt;
37         attribute boolean checked;
38         attribute [Reflect] boolean disabled;
39         attribute [Reflect] boolean autofocus;
40         attribute [Reflect] DOMString autocomplete;
41         readonly attribute [Conditional=DATALIST] HTMLElement list;
42         attribute [Reflect] DOMString max;
43         attribute long maxLength setter raises(DOMException);
44         attribute [Reflect] DOMString min;
45         attribute [Reflect] boolean multiple;
46         attribute [Conditional=DIRECTORY_UPLOAD, Reflect] boolean webkitdirectory;
47         attribute [Reflect] DOMString name;
48         attribute [Reflect] DOMString pattern;
49         attribute [Reflect] DOMString placeholder;
50         attribute [Reflect] boolean readOnly;
51         attribute [Reflect] boolean required;
52 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
53         attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
54 #else
55         // FIXME: The spec says this should be a long, not an unsigned long.
56         attribute unsigned long size; // Changed string -> long as part of DOM level 2
57 #endif
58         attribute [Reflect, URL] DOMString src;
59         attribute [Reflect] DOMString step;
60         attribute [ConvertNullToNullString] DOMString type; // readonly dropped as part of DOM level 2
61         attribute [Reflect] DOMString useMap;
62         attribute [ConvertNullToNullString] DOMString value;
63 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
64         attribute Date valueAsDate setter raises(DOMException);
65 #endif
66         attribute double valueAsNumber setter raises(DOMException);
67         readonly attribute [Conditional=DATALIST] HTMLOptionElement selectedOption;
68         attribute [Reflect] boolean incremental;
69
70         void stepUp(in [Optional] long n) raises(DOMException);
71         void stepDown(in [Optional] long n) raises(DOMException);
72
73         readonly attribute boolean willValidate;
74         readonly attribute DOMString validationMessage;
75         boolean checkValidity();
76         void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
77         void select();
78         void click();
79
80 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
81         void setValueForUser(in [ConvertNullToNullString] DOMString value);
82 #endif
83
84         // WinIE extension:
85         attribute boolean indeterminate;
86
87         attribute [Custom] long selectionStart;
88         attribute [Custom] long selectionEnd;
89         attribute [Custom] DOMString selectionDirection;
90
91 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
92         [Custom] void setSelectionRange(in long start, in long end);
93 #else
94         [Custom] void setSelectionRange(in [Optional=CallWithDefaultValue] long start, 
95                                         in [Optional=CallWithDefaultValue] long end, 
96                                         in [Optional] DOMString direction);
97 #endif
98
99 #if defined(LANGUAGE_OBJECTIVE_C)
100         // Objective-C extension:
101         readonly attribute DOMString altDisplayString;
102         readonly attribute URL absoluteImageURL;
103 #endif
104
105         readonly attribute FileList files;
106         readonly attribute NodeList labels;
107
108         attribute [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] boolean webkitSpeech;
109         attribute [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] boolean webkitGrammar;
110         attribute [Conditional=INPUT_SPEECH, DontEnum] EventListener onwebkitspeechchange;
111     };
112
113 }