public PresentationSource(UIElement rootElement, IHtmlValueConverter converter) { this.RootElement = rootElement; this.converter = converter; RootElement.IsRootElement = true; MouseDevice = new MouseDevice(this); KeyboardDevice = new KeyboardDevice(this); window = System.Html.Window.Instance; MouseDevice.CursorChanged += (sender, e) => System.Html.Window.Document.Body.Style.Cursor = converter.ToCursorString(MouseDevice.Cursor); System.Html.Window.Document.Body.Style.Cursor = converter.ToCursorString(MouseDevice.Cursor); System.Html.Window.OnKeydown = OnKeyDown; System.Html.Window.OnKeyup = OnKeyUp; System.Html.Window.OnKeypress = PreventKeyboardHandled; System.Html.Window.OnMousemove = OnMouseMove; System.Html.Window.OnMousedown = OnMouseDown; System.Html.Window.OnMouseup = OnMouseUp; System.Html.Window.OnScroll = OnMouseWheel; System.Html.Window.OnFocus = e => MouseDevice.Activate(); System.Html.Window.OnBlur = e => MouseDevice.Deactivate(); System.Html.Window.OnResize = e => SetRootElementSize(); System.Html.Window.OnClick = PreventMouseHandled; System.Html.Window.OnDblclick = PreventMouseHandled; System.Html.Window.OnContextmenu = PreventMouseHandled; System.Html.Window.AddEventListener("wheel", OnMouseWheel); SetRootElementSize(); System.Html.Window.Document.Body.Style.Overflow = "hidden"; System.Html.Window.Document.Body.AppendChild(((HtmlRenderElement)RootElement.GetRenderElement(HtmlRenderElementFactory.Default)).HtmlElement); MouseDevice.Activate(); KeyboardDevice.Activate(); }
public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX) { return default(Touch); }
public static Touch CreateTouch(WindowInstance view) { return default(Touch); }
public void InitTouchEvent(string type, bool canBubble, bool cancelable, WindowInstance view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, TouchList touches, TouchList targetTouches, TouchList changedTouches) { }
public void InitWheelEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, string button, Element relatedTarget, string modifiers, int deltaX, int deltaY, int deltaZ, int deltaMode) { }
public void InitMouseEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, string button, Element relatedTarget) { }
public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int clientX, int clientY, int radiusX, int radiusY, double rotationAngle, double force) { return(default(Touch)); }
public void InitCompositionEvent(string typeArg, bool canBubbleArg, bool cancelableArg, WindowInstance viewArg, string dataArg, string localeArg) { }
public void InitUIEvent(string aType, bool aCanBubble, bool aCancelable, WindowInstance aView, int aDetail) { }
public void InitTimeEvent(string aType, WindowInstance aView, int aDetail) { }
public void InitDragEvent(string type, bool canBubble, bool cancelable, WindowInstance aView, int aDetail, int aScreenX, int aScreenY, int aClientX, int aClientY, bool aCtrlKey, bool aAltKey, bool aShiftKey, bool aMetaKey, ushort aButton, EventTarget aRelatedTarget, DataTransfer aDataTransfer) { }
public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int clientX, int clientY, int radiusX, int radiusY, double rotationAngle, double force) { return default(Touch); }
public void InitKeyEvent(string type, bool canBubble, bool cancelable, WindowInstance view, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int keyCode, int charCode) { }
public void InitKeyboardEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail, string key, string location, string modifiers, int repeat, string locale) { }
public void InitUIEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail) { }
public void InitMouseEvent(string typeArg, bool canBubbleArg, bool cancelableArg, WindowInstance viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, short buttonArg, EventTarget relatedTargetArg) { }
public static Touch CreateTouch(WindowInstance view) { return(default(Touch)); }
public static Touch CreateTouch(WindowInstance view, EventTarget target) { return default(Touch); }
public static Touch CreateTouch(WindowInstance view, EventTarget target) { return(default(Touch)); }
public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int clientX, int clientY) { return default(Touch); }
public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX) { return(default(Touch)); }
public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int clientX, int clientY) { return(default(Touch)); }