Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX)
 {
     return default(Touch);
 }
Ejemplo n.º 4
0
 public static Touch CreateTouch(WindowInstance view)
 {
     return default(Touch);
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 10
0
 public void InitCompositionEvent(string typeArg, bool canBubbleArg, bool cancelableArg, WindowInstance viewArg, string dataArg, string localeArg)
 {
 }
Ejemplo n.º 11
0
 public void InitUIEvent(string aType, bool aCanBubble, bool aCancelable, WindowInstance aView, int aDetail)
 {
 }
Ejemplo n.º 12
0
 public void InitUIEvent(string aType, bool aCanBubble, bool aCancelable, WindowInstance aView, int aDetail)
 {
 }
Ejemplo n.º 13
0
 public void InitTimeEvent(string aType, WindowInstance aView, int aDetail)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 15
0
 public void InitCompositionEvent(string typeArg, bool canBubbleArg, bool cancelableArg, WindowInstance viewArg, string dataArg, string localeArg)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 17
0
 public void InitKeyEvent(string type, bool canBubble, bool cancelable, WindowInstance view, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int keyCode, int charCode)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 19
0
 public void InitTimeEvent(string aType, WindowInstance aView, int aDetail)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 23
0
 public void InitUIEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail)
 {
 }
Ejemplo n.º 24
0
 public void InitUIEvent(string eventType, bool canBubble, bool canCancel, WindowInstance view, string detail)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 28
0
 public static Touch CreateTouch(WindowInstance view)
 {
     return(default(Touch));
 }
Ejemplo n.º 29
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target)
 {
     return default(Touch);
 }
Ejemplo n.º 30
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target)
 {
     return(default(Touch));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 32
0
 public static Touch CreateTouch(WindowInstance view, EventTarget target, int identifier, int pageX)
 {
     return(default(Touch));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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)
 {
 }