18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without
58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions
68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met:
78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 1. Redistributions of source code must retain the above copyright
88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *    notice, this list of conditions and the following disclaimer.
98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 2. Redistributions in binary form must reproduce the above copyright
108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *    notice, this list of conditions and the following disclaimer in the
118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *    documentation and/or other materials provided with the distribution.
128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */
258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef DO_NO_IMPORTS
278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectimport "oaidl.idl";
288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectimport "ocidl.idl";
298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectimport "DOMCore.idl";
308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif
318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectinterface IDOMElement;
338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projecttypedef struct WebFontDescription WebFontDescription;
358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project[
378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    object,
388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    oleautomation,
398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    uuid(7FF28EC8-6DA1-498d-9A43-7E67C2D3128F),
408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    pointer_default(unique)
418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project]
428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectinterface IDOMElementPrivate : IUnknown
438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{
448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    [local] HRESULT coreElement(void** element);
458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT isEqual([in] IDOMElement* other, [out, retval] BOOL* result);
468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT isFocused([out, retval] BOOL* result);
478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT innerText([out, retval] BSTR* result);
488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    [local] HRESULT font(WebFontDescription* webFontDescription);
49635860845790a19bf50bbc51ba8fb66a96dde068The Android Open Source Project    HRESULT renderedImage([out, retval] HBITMAP* image);
508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}
518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    All the methods in this category are used by Safari forms autofill and should not be used for any other purpose.
54643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    Each one should eventually be replaced by public DOM API, and when that happens Safari will switch to implementations
55643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    using that public API, and these will be deleted.
568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    @interface DOMHTMLInputElement(FormsAutoFillTransition)
588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project*/
598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project[
608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    object,
618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    oleautomation,
628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    uuid(2DF339BC-B48E-4d35-B93A-299756ED0B4B),
638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    pointer_default(unique)
648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project]
658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectinterface IFormsAutoFillTransition : IUnknown
668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{
678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (BOOL)_isTextField;
698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT isTextField([out, retval] BOOL* result);
718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (NSRect)_rectOnScreen; // bounding box of the text field, in screen coordinates
748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT rectOnScreen([out, retval] LPRECT rect);
768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
788e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (void)_replaceCharactersInRange:(NSRange)targetRange withString:(NSString *)replacementString selectingFromIndex:(int)index;
798e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
808e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT replaceCharactersInRange([in] int startTarget, [in] int endTarget, [in] BSTR replacementString, [in] int index);
818e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (NSRange)_selectedRange;
848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT selectedRange([out] int* start, [out] int* end);
868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (void)_setAutofilled:(BOOL)filled;
898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT setAutofilled([in] BOOL filled);
91643ca7872b450ea4efacab6188849e5aac2ba161Steve Block
92643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    /*
93643ca7872b450ea4efacab6188849e5aac2ba161Steve Block        - (BOOL)_isAutofilled;
94643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    */
95643ca7872b450ea4efacab6188849e5aac2ba161Steve Block    HRESULT isAutofilled([out, retval] BOOL* result);
968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}
978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    // These changes are necessary to detect whether a form input was modified by a user
1008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    // or javascript
1018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    @interface DOMHTMLInputElement (FormPromptAdditions)
1028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
1038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    @interface DOMHTMLTextAreaElement (FormPromptAdditions)
1048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project*/
1058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project[
1068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    object,
1078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    oleautomation,
1088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    uuid(C8C5F0CD-07B0-4a32-BFA8-AE465E80DD3C),
1098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    pointer_default(unique)
1108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project]
1118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectinterface IFormPromptAdditions : IUnknown
1128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{
1138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
1148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (BOOL)_isUserEdited;
1158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
1168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT isUserEdited([out, retval] BOOL* result);
1178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}
1188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
1198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
1208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    All the methods in this category are used by Safari forms autofill and should not be used for any other purpose.
1218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    They are stopgap measures until we finish transitioning form controls to not use NSView. Each one should become
1228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    replaceable by public DOM API, and when that happens Safari will switch to implementations using that public API,
1238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    and these will be deleted.
1248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
1258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    @interface DOMHTMLSelectElement(FormsAutoFillTransition)
1268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project*/
1278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project[
1288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    object,
1298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    oleautomation,
1308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    uuid(6959F712-1563-4661-8D8C-F4C739C55839),
1318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    pointer_default(unique)
1328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project]
1338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectinterface IFormsAutoFillTransitionSelect : IUnknown
1348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{
1358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    /*
1368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project        - (void)_activateItemAtIndex:(int)index;
1378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    */
1388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project    HRESULT activateItemAtIndex([in] int index);
1398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}
140