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 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();
        }
Beispiel #3
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX)
 {
     return default(Touch);
 }
Beispiel #4
0
 public static Touch CreateTouch(WindowInstance view)
 {
     return default(Touch);
 }
Beispiel #5
0
 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)
 {
 }
Beispiel #6
0
 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)
 {
 }
Beispiel #7
0
 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)
 {
 }
Beispiel #8
0
 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)
 {
 }
Beispiel #9
0
 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)
 {
 }
Beispiel #11
0
 public void InitUIEvent(string aType, bool aCanBubble, bool aCancelable, WindowInstance aView, int aDetail)
 {
 }
Beispiel #12
0
 public void InitUIEvent(string aType, bool aCanBubble, bool aCancelable, WindowInstance aView, int aDetail)
 {
 }
Beispiel #13
0
 public void InitTimeEvent(string aType, WindowInstance aView, int aDetail)
 {
 }
Beispiel #14
0
 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)
 {
 }
Beispiel #15
0
 public void InitCompositionEvent(string typeArg, bool canBubbleArg, bool cancelableArg, WindowInstance viewArg, string dataArg, string localeArg)
 {
 }
Beispiel #16
0
 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)
 {
 }
Beispiel #18
0
 public void InitKeyEvent(string type, bool canBubble, bool cancelable, WindowInstance view, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int keyCode, int charCode)
 {
 }
Beispiel #19
0
 public void InitTimeEvent(string aType, WindowInstance aView, int aDetail)
 {
 }
Beispiel #20
0
 public void InitKeyboardEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail, string key, string location, string modifiers, int repeat, string locale)
 {
 }
Beispiel #21
0
 public void InitKeyboardEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail, string key, string location, string modifiers, int repeat, string locale)
 {
 }
Beispiel #22
0
 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)
 {
 }
Beispiel #23
0
 public void InitUIEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail)
 {
 }
Beispiel #24
0
 public void InitUIEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail)
 {
 }
Beispiel #25
0
 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)
 {
 }
Beispiel #26
0
 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)
 {
 }
Beispiel #27
0
 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)
 {
 }
Beispiel #28
0
 public static Touch CreateTouch(WindowInstance view)
 {
     return(default(Touch));
 }
Beispiel #29
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target)
 {
     return default(Touch);
 }
Beispiel #30
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target)
 {
     return(default(Touch));
 }
Beispiel #31
0
 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);
 }
Beispiel #32
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX)
 {
     return(default(Touch));
 }
Beispiel #33
0
 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));
 }
Beispiel #34
0
 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)
 {
 }