mirror of https://github.com/adamdruppe/arsd.git
Replaced typedefs with alias, removed return in void function displayImage, changed GET_X_PARAM and GET_Y_PARAM to HIWORD and LOWORD
This commit is contained in:
parent
3649029cf6
commit
1ddfe2d669
|
@ -173,7 +173,7 @@ void displayImage(Image image, SimpleWindow win = null) {
|
|||
auto p = win.draw;
|
||||
p.drawImage(Point(0, 0), image);
|
||||
}
|
||||
return win.eventLoop(0,
|
||||
win.eventLoop(0,
|
||||
(int) {
|
||||
win.close();
|
||||
} );
|
||||
|
@ -725,8 +725,8 @@ version(Windows) {
|
|||
case WM_MBUTTONUP:
|
||||
case WM_MBUTTONDBLCLK:
|
||||
mouse.type = 0;
|
||||
mouse.x = GET_X_LPARAM(lParam);
|
||||
mouse.y = GET_Y_LPARAM(lParam);
|
||||
mouse.x = LOWORD(lParam);
|
||||
mouse.y = HIWORD(lParam);
|
||||
mouse.buttonFlags = wParam;
|
||||
|
||||
if(handleMouseEvent)
|
||||
|
@ -1409,18 +1409,23 @@ enum ColorMapNotification:int
|
|||
|
||||
struct _XPrivate {}
|
||||
struct _XrmHashBucketRec {}
|
||||
typedef void* XPointer;
|
||||
typedef void* XExtData;
|
||||
|
||||
alias void* XPointer;
|
||||
alias void* XExtData;
|
||||
|
||||
alias uint XID;
|
||||
typedef XID Window;
|
||||
typedef XID Drawable;
|
||||
typedef XID Pixmap;
|
||||
|
||||
alias XID Window;
|
||||
alias XID Drawable;
|
||||
alias XID Pixmap;
|
||||
|
||||
alias uint Atom;
|
||||
alias bool Bool;
|
||||
alias Display XDisplay;
|
||||
typedef int ByteOrder;
|
||||
typedef uint Time;
|
||||
typedef void ScreenFormat;
|
||||
|
||||
alias int ByteOrder;
|
||||
alias uint Time;
|
||||
alias void ScreenFormat;
|
||||
|
||||
struct XImage {
|
||||
int width, height; /* size of image */
|
||||
|
@ -1479,8 +1484,8 @@ struct XKeyEvent
|
|||
uint keycode; /* detail */
|
||||
Bool same_screen; /* same screen flag */
|
||||
}
|
||||
typedef XKeyEvent XKeyPressedEvent;
|
||||
typedef XKeyEvent XKeyReleasedEvent;
|
||||
alias XKeyEvent XKeyPressedEvent;
|
||||
alias XKeyEvent XKeyReleasedEvent;
|
||||
|
||||
struct XButtonEvent
|
||||
{
|
||||
|
@ -1498,8 +1503,8 @@ struct XButtonEvent
|
|||
uint button; /* detail */
|
||||
Bool same_screen; /* same screen flag */
|
||||
}
|
||||
typedef XButtonEvent XButtonPressedEvent;
|
||||
typedef XButtonEvent XButtonReleasedEvent;
|
||||
alias XButtonEvent XButtonPressedEvent;
|
||||
alias XButtonEvent XButtonReleasedEvent;
|
||||
|
||||
struct XMotionEvent{
|
||||
int type; /* of event */
|
||||
|
@ -1516,7 +1521,7 @@ struct XMotionEvent{
|
|||
byte is_hint; /* detail */
|
||||
Bool same_screen; /* same screen flag */
|
||||
}
|
||||
typedef XMotionEvent XPointerMovedEvent;
|
||||
alias XMotionEvent XPointerMovedEvent;
|
||||
|
||||
struct XCrossingEvent{
|
||||
int type; /* of event */
|
||||
|
@ -1539,8 +1544,8 @@ struct XCrossingEvent{
|
|||
Bool focus; /* Boolean focus */
|
||||
KeyOrButtonMask state; /* key or button mask */
|
||||
}
|
||||
typedef XCrossingEvent XEnterWindowEvent;
|
||||
typedef XCrossingEvent XLeaveWindowEvent;
|
||||
alias XCrossingEvent XEnterWindowEvent;
|
||||
alias XCrossingEvent XLeaveWindowEvent;
|
||||
|
||||
struct XFocusChangeEvent{
|
||||
int type; /* FocusIn or FocusOut */
|
||||
|
@ -1557,8 +1562,8 @@ struct XFocusChangeEvent{
|
|||
* NotifyPointerRoot, NotifyDetailNone
|
||||
*/
|
||||
}
|
||||
typedef XFocusChangeEvent XFocusInEvent;
|
||||
typedef XFocusChangeEvent XFocusOutEvent;
|
||||
alias XFocusChangeEvent XFocusInEvent;
|
||||
alias XFocusChangeEvent XFocusOutEvent;
|
||||
Window XCreateSimpleWindow(
|
||||
Display* /* display */,
|
||||
Window /* parent */,
|
||||
|
@ -1590,7 +1595,7 @@ Atom XInternAtom(
|
|||
Bool /* only_if_exists */
|
||||
);
|
||||
|
||||
typedef int Status;
|
||||
alias int Status;
|
||||
|
||||
|
||||
enum EventMask:int
|
||||
|
@ -2104,10 +2109,10 @@ struct Depth
|
|||
Visual *visuals; /* list of visuals possible at this depth */
|
||||
}
|
||||
|
||||
typedef void* GC;
|
||||
alias void* GC;
|
||||
alias int VisualID;
|
||||
typedef XID Colormap;
|
||||
typedef XID KeySym;
|
||||
alias XID Colormap;
|
||||
alias XID KeySym;
|
||||
alias uint KeyCode;
|
||||
|
||||
struct Screen{
|
||||
|
|
Loading…
Reference in New Issue