Ejemplo n.º 1
0
                //! \brief Update this object with the current state of the pointer.
                public void Update()
                {
                    uint buttons;
                    uint object_id;
                    uint cmp_id;

                    object_id = GetPointerInfo(out Pos.X, out Pos.Y, out buttons, out cmp_id);

                    Buttons = (ButtonState)buttons;

                    if (ToolboxWindow)
                    {
                        Window = CreateInstance <Window> (object_id);
                        Gadget = Window != null?Window.GetGadget(cmp_id) : null;

                        WindowHandle = 0;
                        IconHandle   = -1;
                    }
                    else
                    {
                        Window       = null;
                        Gadget       = null;
                        WindowHandle = object_id;
                        IconHandle   = (int)cmp_id;
                    }
                }
Ejemplo n.º 2
0
                /*! \brief Create the arguments for a DragEnd event from the raw event data.  */
                public DragEndEventArgs(IntPtr unmanagedEventBlock) : base(unmanagedEventBlock)
                {
                    uint flags     = Header.Flags;
                    uint window_id = (uint)Marshal.ReadInt32(RawEventData, EventOffset.Window);
                    int  icon_id   = Marshal.ReadInt32(RawEventData, EventOffset.Icon);

                    if ((flags & Flags.ToolboxIDs) != 0)
                    {
                        ToolboxWindow    = Object.CreateInstance <Window> (window_id);
                        ToolboxCmpID     = (uint)icon_id;
                        WimpWindowHandle = 0;
                        WimpIconHandle   = -1;
                    }
                    else
                    {
                        ToolboxWindow    = null;
                        ToolboxCmpID     = 0xffffffff;
                        WimpWindowHandle = window_id;
                        WimpIconHandle   = icon_id;
                    }

                    int x = Marshal.ReadInt32(RawEventData, EventOffset.MouseX);
                    int y = Marshal.ReadInt32(RawEventData, EventOffset.MouseY);

                    MousePosition = new OS.Coord(x, y);
                }
Ejemplo n.º 3
0
                public PointerEventArgs(IntPtr unmanagedEventData) : base(unmanagedEventData)
                {
                    uint cmp_id_not_required;

                    Window = WimpToToolbox(WindowHandle,
                                           -1,
                                           out cmp_id_not_required);
                }
Ejemplo n.º 4
0
                public CaretEventArgs(IntPtr unmanagedEventData) : base(unmanagedEventData)
                {
                    uint cmp_id;

                    Window = WimpToToolbox(WindowHandle,
                                           IconHandle,
                                           out cmp_id);
                    Gadget = (Window != null) ? Window.GetGadget(cmp_id) : null;
                }
Ejemplo n.º 5
0
                /*! \brief Update this object with the current state of the caret.  */
                public override void Update()
                {
                    base.Update();
                    uint cmp_id;

                    Window = WimpToToolbox(WindowHandle,
                                           IconHandle,
                                           out cmp_id);
                    Gadget = (Window != null) ? Window.GetGadget(cmp_id) : null;
                }