|
| 1 | +/* |
| 2 | + * Copyright (C) 2019 Sony Interactive Entertainment Inc. |
| 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 INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | + * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | + */ |
| 25 | + |
| 26 | +#pragma once |
| 27 | + |
| 28 | +#include "UIScriptController.h" |
| 29 | + |
| 30 | +namespace WTR { |
| 31 | + |
| 32 | +class UIScriptControllerHaiku : public UIScriptController { |
| 33 | +public: |
| 34 | + explicit UIScriptControllerHaiku(UIScriptContext& context) |
| 35 | + : UIScriptController(context) |
| 36 | + { |
| 37 | + } |
| 38 | + |
| 39 | + void notImplemented() const { fprintf(stderr, "UIScriptControllerHaiku is not implemented\n"); } |
| 40 | + |
| 41 | + void doAsyncTask(JSValueRef) override; |
| 42 | + // Preferences |
| 43 | + |
| 44 | + virtual void overridePreference(JSStringRef preference, JSStringRef value) { notImplemented(); } |
| 45 | + |
| 46 | + // Zooming |
| 47 | + |
| 48 | + virtual void zoomToScale(double scale, JSValueRef callback) { notImplemented(); } |
| 49 | + virtual void immediateZoomToScale(double scale) { notImplemented(); } |
| 50 | + virtual void setViewScale(double) { notImplemented(); } |
| 51 | + virtual double zoomScale() const { notImplemented(); return 1; } |
| 52 | + virtual double minimumZoomScale() const { notImplemented(); return 1; } |
| 53 | + virtual double maximumZoomScale() const { notImplemented(); return 1; } |
| 54 | + |
| 55 | + // Viewports |
| 56 | + |
| 57 | + virtual void setMinimumEffectiveWidth(double) { notImplemented(); } |
| 58 | + virtual void setAllowsViewportShrinkToFit(bool) { notImplemented(); } |
| 59 | + |
| 60 | + virtual Optional<bool> stableStateOverride() const { notImplemented(); return WTF::nullopt; } |
| 61 | + virtual void setStableStateOverride(Optional<bool>) { notImplemented(); } |
| 62 | + |
| 63 | + virtual JSObjectRef contentVisibleRect() const { notImplemented(); return nullptr; } |
| 64 | + |
| 65 | + virtual void setSafeAreaInsets(double top, double right, double bottom, double left) { notImplemented(); } |
| 66 | + |
| 67 | + // View Parenting and Visibility |
| 68 | + |
| 69 | + virtual void becomeFirstResponder() { notImplemented(); } |
| 70 | + virtual void resignFirstResponder() { notImplemented(); } |
| 71 | + |
| 72 | + virtual void copyText(JSStringRef) { notImplemented(); } |
| 73 | + |
| 74 | + virtual void firstResponderSuppressionForWebView(bool) { notImplemented(); } |
| 75 | + virtual void makeWindowContentViewFirstResponder() { notImplemented(); } |
| 76 | + virtual bool isWindowContentViewFirstResponder() const { notImplemented(); return false; } |
| 77 | + |
| 78 | + virtual void removeViewFromWindow(JSValueRef) { notImplemented(); } |
| 79 | + virtual void addViewToWindow(JSValueRef) { notImplemented(); } |
| 80 | + |
| 81 | + // Compositing |
| 82 | + |
| 83 | + virtual JSObjectRef propertiesOfLayerWithID(uint64_t layerID) const { notImplemented(); return nullptr; } |
| 84 | + |
| 85 | + // Scrolling |
| 86 | + |
| 87 | + virtual bool scrollUpdatesDisabled() const { notImplemented(); return false; } |
| 88 | + virtual void setScrollUpdatesDisabled(bool) { notImplemented(); } |
| 89 | + |
| 90 | + virtual void scrollToOffset(long x, long y) { notImplemented(); } |
| 91 | + |
| 92 | + virtual void immediateScrollToOffset(long x, long y) { notImplemented(); } |
| 93 | + virtual void immediateScrollElementAtContentPointToOffset(long x, long y, long xScrollOffset, long yScrollOffset) { notImplemented(); } |
| 94 | + |
| 95 | + virtual double contentOffsetX() const { notImplemented(); return 0; } |
| 96 | + virtual double contentOffsetY() const { notImplemented(); return 0; } |
| 97 | + |
| 98 | + virtual JSRetainPtr<JSStringRef> scrollingTreeAsText() const { notImplemented(); return nullptr; } |
| 99 | + |
| 100 | + // Touches |
| 101 | + |
| 102 | + virtual void touchDownAtPoint(long x, long y, long touchCount, JSValueRef callback) { notImplemented(); } |
| 103 | + virtual void liftUpAtPoint(long x, long y, long touchCount, JSValueRef callback) { notImplemented(); } |
| 104 | + virtual void singleTapAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } |
| 105 | + virtual void singleTapAtPointWithModifiers(long x, long y, JSValueRef modifierArray, JSValueRef callback) { notImplemented(); } |
| 106 | + virtual void twoFingerSingleTapAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } |
| 107 | + virtual void doubleTapAtPoint(long x, long y, float delay, JSValueRef callback) { notImplemented(); } |
| 108 | + virtual void dragFromPointToPoint(long startX, long startY, long endX, long endY, double durationSeconds, JSValueRef callback) { notImplemented(); } |
| 109 | + virtual void longPressAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } |
| 110 | + |
| 111 | + virtual void activateAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } |
| 112 | + |
| 113 | + // Keyboard |
| 114 | + |
| 115 | + virtual void enterText(JSStringRef) { notImplemented(); } |
| 116 | + virtual void typeCharacterUsingHardwareKeyboard(JSStringRef character, JSValueRef callback) { notImplemented(); } |
| 117 | + |
| 118 | + virtual void keyDown(JSStringRef character, JSValueRef modifierArray) { notImplemented(); } |
| 119 | + virtual void toggleCapsLock(JSValueRef callback) { notImplemented(); } |
| 120 | + virtual void setContinuousSpellCheckingEnabled(bool) { notImplemented(); } |
| 121 | + |
| 122 | + virtual void rawKeyDown(JSStringRef) { notImplemented(); } |
| 123 | + virtual void rawKeyUp(JSStringRef) { notImplemented(); } |
| 124 | + |
| 125 | + virtual void keyboardAccessoryBarNext() { notImplemented(); } |
| 126 | + virtual void keyboardAccessoryBarPrevious() { notImplemented(); } |
| 127 | + |
| 128 | + virtual void applyAutocorrection(JSStringRef newString, JSStringRef oldString, JSValueRef callback) { notImplemented(); } |
| 129 | + |
| 130 | + virtual bool isShowingKeyboard() const { notImplemented(); return false; } |
| 131 | + virtual bool hasInputSession() const { notImplemented(); return false; } |
| 132 | + |
| 133 | + virtual void setKeyboardInputModeIdentifier(JSStringRef) { notImplemented(); } |
| 134 | + |
| 135 | + virtual void replaceTextAtRange(JSStringRef, int location, int length) { notImplemented(); } |
| 136 | + virtual void removeAllDynamicDictionaries() { notImplemented(); } |
| 137 | + |
| 138 | + // Stylus |
| 139 | + |
| 140 | + virtual void stylusDownAtPoint(long x, long y, float azimuthAngle, float altitudeAngle, float pressure, JSValueRef callback) { notImplemented(); } |
| 141 | + virtual void stylusMoveToPoint(long x, long y, float azimuthAngle, float altitudeAngle, float pressure, JSValueRef callback) { notImplemented(); } |
| 142 | + virtual void stylusUpAtPoint(long x, long y, JSValueRef callback) { notImplemented(); } |
| 143 | + virtual void stylusTapAtPoint(long x, long y, float azimuthAngle, float altitudeAngle, float pressure, JSValueRef callback) { notImplemented(); } |
| 144 | + virtual void stylusTapAtPointWithModifiers(long x, long y, float azimuthAngle, float altitudeAngle, float pressure, JSValueRef modifierArray, JSValueRef callback) { notImplemented(); } |
| 145 | + |
| 146 | + // Event Stream |
| 147 | + |
| 148 | + virtual void sendEventStream(JSStringRef eventsJSON, JSValueRef callback) { notImplemented(); } |
| 149 | + virtual void playBackEventStream(JSStringRef stream, JSValueRef callback) { notImplemented(); } |
| 150 | + |
| 151 | + // Form Controls |
| 152 | + |
| 153 | + virtual void dismissFilePicker(JSValueRef callback) { notImplemented(); } |
| 154 | + virtual void dismissFormAccessoryView() { notImplemented(); } |
| 155 | + virtual void selectFormAccessoryPickerRow(long) { notImplemented(); } |
| 156 | + virtual JSRetainPtr<JSStringRef> textContentType() const { notImplemented(); return nullptr; } |
| 157 | + virtual JSRetainPtr<JSStringRef> selectFormPopoverTitle() const { notImplemented(); return nullptr; } |
| 158 | + virtual JSRetainPtr<JSStringRef> formInputLabel() const { notImplemented(); return nullptr; } |
| 159 | + virtual void setTimePickerValue(long hour, long minute) { notImplemented(); } |
| 160 | + virtual bool isShowingDataListSuggestions() const { notImplemented(); return false; } |
| 161 | + virtual JSObjectRef calendarType() const { notImplemented(); return nullptr; } |
| 162 | + virtual void setDefaultCalendarType(JSStringRef calendarIdentifier, JSStringRef localeIdentifier) { notImplemented(); } |
| 163 | + virtual JSObjectRef inputViewBounds() const { notImplemented(); return nullptr; } |
| 164 | + virtual void activateDataListSuggestion(unsigned, JSValueRef) { notImplemented(); } |
| 165 | + |
| 166 | + // Share Sheet |
| 167 | + |
| 168 | + virtual void setShareSheetCompletesImmediatelyWithResolution(bool resolved) { notImplemented(); } |
| 169 | + |
| 170 | + // Find in Page |
| 171 | + |
| 172 | + virtual void findString(JSStringRef, unsigned long options, unsigned long maxCount) { notImplemented(); } |
| 173 | + |
| 174 | + // Accessibility |
| 175 | + |
| 176 | + virtual void simulateAccessibilitySettingsChangeNotification(JSValueRef callback) { notImplemented(); } |
| 177 | + virtual void retrieveSpeakSelectionContent(JSValueRef) { notImplemented(); } |
| 178 | + virtual JSRetainPtr<JSStringRef> accessibilitySpeakSelectionContent() const { notImplemented(); return nullptr; } |
| 179 | + virtual JSObjectRef contentsOfUserInterfaceItem(JSStringRef) const { notImplemented(); return nullptr; } |
| 180 | + |
| 181 | + // Swipe |
| 182 | + |
| 183 | + virtual void beginBackSwipe(JSValueRef callback) { notImplemented(); } |
| 184 | + virtual void completeBackSwipe(JSValueRef callback) { notImplemented(); } |
| 185 | + |
| 186 | + // Child View Controllers |
| 187 | + |
| 188 | + virtual bool isShowingPopover() const { notImplemented(); return false; } |
| 189 | + virtual bool isPresentingModally() const { notImplemented(); return false; } |
| 190 | + |
| 191 | + // Context Menus |
| 192 | + |
| 193 | + virtual bool isDismissingMenu() const { notImplemented(); return false; } |
| 194 | + virtual bool isShowingMenu() const { notImplemented(); return false; } |
| 195 | + virtual JSObjectRef rectForMenuAction(JSStringRef action) const { notImplemented(); return nullptr; } |
| 196 | + virtual JSObjectRef menuRect() const { notImplemented(); return nullptr; } |
| 197 | + |
| 198 | + // Selection |
| 199 | + |
| 200 | + virtual JSObjectRef textSelectionRangeRects() const { notImplemented(); return nullptr; } |
| 201 | + virtual JSObjectRef textSelectionCaretRect() const { notImplemented(); return nullptr; } |
| 202 | + virtual JSObjectRef selectionStartGrabberViewRect() const { notImplemented(); return nullptr; } |
| 203 | + virtual JSObjectRef selectionEndGrabberViewRect() const { notImplemented(); return nullptr; } |
| 204 | + virtual JSObjectRef selectionCaretViewRect() const { notImplemented(); return nullptr; } |
| 205 | + virtual JSObjectRef selectionRangeViewRects() const { notImplemented(); return nullptr; } |
| 206 | + |
| 207 | + // Rotation |
| 208 | + |
| 209 | + virtual void simulateRotation(DeviceOrientation*, JSValueRef) { notImplemented(); } |
| 210 | + virtual void simulateRotationLikeSafari(DeviceOrientation*, JSValueRef) { notImplemented(); } |
| 211 | + |
| 212 | + // Editable Images |
| 213 | + |
| 214 | + virtual void drawSquareInEditableImage() { notImplemented(); } |
| 215 | + virtual long numberOfStrokesInEditableImage() { notImplemented(); return 0; } |
| 216 | + |
| 217 | + // Undo/Redo |
| 218 | + |
| 219 | + virtual JSRetainPtr<JSStringRef> lastUndoLabel() const { notImplemented(); return nullptr; } |
| 220 | + virtual JSRetainPtr<JSStringRef> firstRedoLabel() const { notImplemented(); return nullptr; } |
| 221 | + |
| 222 | + // Attachment Elements |
| 223 | + |
| 224 | + virtual JSObjectRef attachmentInfo(JSStringRef attachmentIdentifier) { notImplemented(); return nullptr; } |
| 225 | + |
| 226 | +}; |
| 227 | + |
| 228 | +} |
0 commit comments