Home | History | Annotate | Download | only in Interfaces
      1 /*
      2  * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
      3  *
      4  * Redistribution and use in source and binary forms, with or without
      5  * modification, are permitted provided that the following conditions
      6  * are met:
      7  * 1. Redistributions of source code must retain the above copyright
      8  *    notice, this list of conditions and the following disclaimer.
      9  * 2. Redistributions in binary form must reproduce the above copyright
     10  *    notice, this list of conditions and the following disclaimer in the
     11  *    documentation and/or other materials provided with the distribution.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
     21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     24  */
     25 
     26 cpp_quote("#define WebPreferencesChangedNotification TEXT(\"WebPreferencesChangedNotification\")")
     27 cpp_quote("#define WebPreferencesRemovedNotification TEXT(\"WebPreferencesRemovedNotification\")")
     28 
     29 #ifndef DO_NO_IMPORTS
     30 import "oaidl.idl";
     31 import "ocidl.idl";
     32 #endif
     33 
     34 typedef enum FontSmoothingType {
     35     FontSmoothingTypeStandard=0,
     36     FontSmoothingTypeLight,
     37     FontSmoothingTypeMedium,
     38     FontSmoothingTypeStrong,
     39     FontSmoothingTypeWindows
     40 } FontSmoothingType;
     41 
     42 typedef enum WebKitEditableLinkBehavior {
     43     WebKitEditableLinkDefaultBehavior = 0,
     44     WebKitEditableLinkAlwaysLive,
     45     WebKitEditableLinkOnlyLiveWithShiftKey,
     46     WebKitEditableLinkLiveWhenNotFocused,
     47     WebKitEditableLinkNeverLive
     48 } WebKitEditableLinkBehavior;
     49 
     50 typedef enum WebKitEditingBehavior {
     51     WebKitEditingMacBehavior = 0,
     52     WebKitEditingWinBehavior,
     53     WebKitEditingUnixBehavior
     54 } WebKitEditingBehavior;
     55 
     56 
     57 typedef enum WebKitCookieStorageAcceptPolicy {
     58     WebKitCookieStorageAcceptPolicyAlways = 0,
     59     WebKitCookieStorageAcceptPolicyNever,
     60     WebKitCookieStorageAcceptPolicyOnlyFromMainDocumentDomain
     61 } WebKitCookieStorageAcceptPolicy;
     62 
     63 typedef enum WebCacheModel {
     64     WebCacheModelDocumentViewer = 0,
     65     WebCacheModelDocumentBrowser = 1,
     66     WebCacheModelPrimaryWebBrowser = 2
     67 } WebCacheModel;
     68 
     69 [
     70     object,
     71     oleautomation,
     72     hidden,
     73     uuid(0930D594-A5A3-46e1-858E-AB17A13CD28E),
     74     pointer_default(unique)
     75 ]
     76 interface IWebPreferences : IUnknown
     77 {
     78     HRESULT standardPreferences([out, retval] IWebPreferences** standardPreferences);
     79 
     80     HRESULT initWithIdentifier([in] BSTR anIdentifier, [out, retval] IWebPreferences** preferences);
     81     HRESULT identifier([out, retval] BSTR* ident);
     82 
     83     HRESULT standardFontFamily([out, retval] BSTR* family);
     84     HRESULT setStandardFontFamily([in] BSTR family);
     85 
     86     HRESULT fixedFontFamily([out, retval] BSTR* family);
     87     HRESULT setFixedFontFamily([in] BSTR family);
     88 
     89     HRESULT serifFontFamily([out, retval] BSTR* fontFamily);
     90     HRESULT setSerifFontFamily([in] BSTR family);
     91 
     92     HRESULT sansSerifFontFamily([out, retval] BSTR* family);
     93     HRESULT setSansSerifFontFamily([in] BSTR family);
     94 
     95     HRESULT cursiveFontFamily([out, retval] BSTR* family);
     96     HRESULT setCursiveFontFamily([in] BSTR family);
     97 
     98     HRESULT fantasyFontFamily([out, retval] BSTR* family);
     99     HRESULT setFantasyFontFamily([in] BSTR family);
    100 
    101     HRESULT defaultFontSize([out, retval] int* fontSize);
    102     HRESULT setDefaultFontSize([in] int fontSize);
    103 
    104     HRESULT defaultFixedFontSize([out, retval] int* fontSize);
    105     HRESULT setDefaultFixedFontSize([in] int fontSize);
    106 
    107     HRESULT minimumFontSize([out, retval] int* fontSize);
    108     HRESULT setMinimumFontSize([in] int fontSize);
    109 
    110     HRESULT minimumLogicalFontSize([out, retval] int* fontSize);
    111     HRESULT setMinimumLogicalFontSize([in] int fontSize);
    112 
    113     HRESULT defaultTextEncodingName([out, retval] BSTR* name);
    114     HRESULT setDefaultTextEncodingName([in] BSTR name);
    115 
    116     HRESULT userStyleSheetEnabled([out, retval] BOOL* enabled);
    117     HRESULT setUserStyleSheetEnabled([in] BOOL enabled);
    118 
    119     HRESULT userStyleSheetLocation([out, retval] BSTR* location);
    120     HRESULT setUserStyleSheetLocation([in] BSTR location);
    121 
    122     HRESULT isJavaEnabled([out, retval] BOOL* enabled);
    123     HRESULT setJavaEnabled([in] BOOL enabled);
    124 
    125     HRESULT isJavaScriptEnabled([out, retval] BOOL* enabled);
    126     HRESULT setJavaScriptEnabled([in] BOOL enabled);
    127 
    128     HRESULT javaScriptCanOpenWindowsAutomatically([out, retval] BOOL* enabled);
    129     HRESULT setJavaScriptCanOpenWindowsAutomatically([in] BOOL enabled);
    130 
    131     HRESULT arePlugInsEnabled([out, retval] BOOL* enabled);
    132     HRESULT setPlugInsEnabled([in] BOOL enabled);
    133 
    134     HRESULT allowsAnimatedImages([out, retval] BOOL* enabled);
    135     HRESULT setAllowsAnimatedImages([in] BOOL enabled);
    136     HRESULT allowAnimatedImageLooping([out, retval] BOOL* enabled);
    137     HRESULT setAllowAnimatedImageLooping([in] BOOL enabled);
    138 
    139     HRESULT setLoadsImagesAutomatically([in] BOOL enabled);
    140     HRESULT loadsImagesAutomatically([out, retval] BOOL* enabled);
    141 
    142     HRESULT setAutosaves([in] BOOL enabled);
    143     HRESULT autosaves([out, retval] BOOL* enabled);
    144 
    145     HRESULT setShouldPrintBackgrounds([in] BOOL enabled);
    146     HRESULT shouldPrintBackgrounds([out, retval] BOOL* enabled);
    147 
    148     HRESULT setPrivateBrowsingEnabled([in] BOOL enabled);
    149     HRESULT privateBrowsingEnabled([out, retval] BOOL* enabled);
    150 
    151     HRESULT setTabsToLinks([in] BOOL enabled);
    152     HRESULT tabsToLinks([out, retval] BOOL* enabled);
    153 
    154     HRESULT textAreasAreResizable([out, retval] BOOL* enabled);
    155     HRESULT setTextAreasAreResizable([in] BOOL enabled);
    156 
    157     HRESULT unused1();
    158     HRESULT unused2();
    159 
    160     HRESULT iconDatabaseLocation([out, retval] BSTR* location);
    161     HRESULT setIconDatabaseLocation([in] BSTR location);
    162 
    163     HRESULT iconDatabaseEnabled([out, retval] BOOL* enabled);
    164     HRESULT setIconDatabaseEnabled([in] BOOL enabled);
    165 
    166     HRESULT fontSmoothing([out, retval] FontSmoothingType* smoothingType);
    167     HRESULT setFontSmoothing([in] FontSmoothingType smoothingType);
    168 
    169     HRESULT editableLinkBehavior([out, retval] WebKitEditableLinkBehavior* editableLinkBehavior);
    170     HRESULT setEditableLinkBehavior([in] WebKitEditableLinkBehavior behavior);
    171 
    172     HRESULT cookieStorageAcceptPolicy([out, retval] WebKitCookieStorageAcceptPolicy* acceptPolicy);
    173     HRESULT setCookieStorageAcceptPolicy([in] WebKitCookieStorageAcceptPolicy acceptPolicy);
    174 
    175     HRESULT continuousSpellCheckingEnabled([out, retval] BOOL* enabled);
    176     HRESULT setContinuousSpellCheckingEnabled([in] BOOL enabled);
    177     HRESULT grammarCheckingEnabled([out, retval] BOOL* enabled);
    178     HRESULT setGrammarCheckingEnabled([in] BOOL enabled);
    179     HRESULT allowContinuousSpellChecking([out, retval] BOOL *allowed);
    180     HRESULT setAllowContinuousSpellChecking([in] BOOL allowed);
    181 
    182     HRESULT isDOMPasteAllowed([out, retval] BOOL *allowed);
    183     HRESULT setDOMPasteAllowed([in] BOOL allowed);
    184 
    185     HRESULT usesPageCache([out, retval] BOOL* usesPageCache);
    186     HRESULT setUsesPageCache([in] BOOL usesPageCache);
    187 
    188     HRESULT cacheModel([out, retval] WebCacheModel* cacheModel);
    189     HRESULT setCacheModel([in] WebCacheModel cacheModel);
    190 
    191     HRESULT setShouldPaintCustomScrollbars(BOOL shouldPaint);
    192     HRESULT shouldPaintCustomScrollbars(BOOL *shouldPaint);
    193 
    194     HRESULT setZoomsTextOnly(BOOL zoomsTextOnly);
    195     HRESULT zoomsTextOnly(BOOL *zoomsTextOnly);
    196 
    197     HRESULT setAcceleratedCompositingEnabled(BOOL acceleratedCompositingEnabled);
    198     HRESULT acceleratedCompositingEnabled(BOOL *acceleratedCompositingEnabled);
    199 
    200     HRESULT editingBehavior([out, retval] WebKitEditingBehavior* editingBehavior);
    201     HRESULT setEditingBehavior([in] WebKitEditingBehavior behavior);
    202 }
    203