2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
6 Move a window around on the screen.
9 #include "intuition_intern.h"
10 #include "inputhandler_actions.h"
12 struct MoveWindowActionMsg
14 struct IntuiActionMsg msg
;
15 struct Window
*window
;
20 static VOID
int_movewindow(struct MoveWindowActionMsg
*msg
,
21 struct IntuitionBase
*IntuitionBase
);
24 /*****************************************************************************
27 #include <proto/intuition.h>
29 AROS_LH3(void, MoveWindow
,
32 AROS_LHA(struct Window
*, window
, A0
),
33 AROS_LHA(LONG
, dx
, D0
),
34 AROS_LHA(LONG
, dy
, D1
),
37 struct IntuitionBase
*, IntuitionBase
, 28, Intuition
)
40 Change the position of a window on the screen.
43 window - Move this window
44 dx, dy - Move it that many pixels along the axis (right, down)
47 The window will move when the next input event will be received.
62 *****************************************************************************/
69 if (window
&& (dx
|| dy
))
71 struct MoveWindowActionMsg msg
;
77 DoASyncAction((APTR
)int_movewindow
, &msg
.msg
, sizeof(msg
), IntuitionBase
);
78 //DoSyncAction((APTR)int_movewindow, &msg.msg, IntuitionBase);
84 static VOID
int_movewindow(struct MoveWindowActionMsg
*msg
,
85 struct IntuitionBase
*IntuitionBase
)
87 struct Window
*window
= msg
->window
;
89 if (!ResourceExisting(window
, RESOURCE_WINDOW
, IntuitionBase
)) return;
91 DoMoveSizeWindow(window
,
92 window
->LeftEdge
+ msg
->dx
, window
->TopEdge
+ msg
->dy
,
93 window
->Width
, window
->Height
, FALSE
, IntuitionBase
);