X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e193f384f7b98daef459653ddb8485173fba8ba..7b65ea1af911e4ba65c47e2ed4f3138367b2bdbb:/include/wx/event.h diff --git a/include/wx/event.h b/include/wx/event.h index 66b6a3bf43..1e9f2df629 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -23,9 +23,7 @@ #include "wx/gdicmn.h" #endif -#if wxUSE_THREADS - #include "wx/thread.h" -#endif +#include "wx/thread.h" // ---------------------------------------------------------------------------- // forward declarations @@ -607,8 +605,15 @@ public: bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); } // Find the position of the event - void GetPosition(long *xpos, long *ypos) const { *xpos = m_x; *ypos = m_y; } - void Position(long *xpos, long *ypos) const { *xpos = m_x; *ypos = m_y; } + void GetPosition(long *xpos, long *ypos) const + { if (xpos) *xpos = m_x; + if (ypos) *ypos = m_y; } + void GetPosition(int *xpos, int *ypos) const + { if (xpos) *xpos = m_x; + if (ypos) *ypos = m_y; } + void Position(long *xpos, long *ypos) const + { if (xpos) *xpos = m_x; + if (ypos) *ypos = m_y; } // Find the position of the event wxPoint GetPosition() const { return wxPoint(m_x, m_y); } @@ -670,7 +675,11 @@ public: // Find the position of the event void GetPosition(long *xpos, long *ypos) const - { *xpos = m_x; *ypos = m_y; } + { if (xpos) *xpos = m_x; + if (ypos) *ypos = m_y; } + void GetPosition(int *xpos, int *ypos) const + { if (xpos) *xpos = m_x; + if (ypos) *ypos = m_y; } wxPoint GetPosition() const { return wxPoint(m_x, m_y); }