diff options
author | Nicholas Rishel <nicholas_rishel> | 2021-07-05 20:10:20 +0300 |
---|---|---|
committer | Nicholas Rishel <rishel.nick@gmail.com> | 2021-07-05 21:00:45 +0300 |
commit | f3ec0d8e58595ef5fae3e2e9c541150db3bd3f1e (patch) | |
tree | bd9d60ecdae0c3963983ceae9cc1a703d5393103 /intern/ghost/intern/GHOST_Window.h | |
parent | b66c21f8b0a73c9ad58eb3295b29fe4fadfc4bc8 (diff) |
Replace Ghost integrals with stdint fixed width integers.
Also replace integer with bool in Ghost API when only used as boolean,
and uint8* with char* in Ghost API when variable is a string.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D11617
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
Diffstat (limited to 'intern/ghost/intern/GHOST_Window.h')
-rw-r--r-- | intern/ghost/intern/GHOST_Window.h | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 3542c6f2bcf..f061e07b3c8 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -48,8 +48,8 @@ class GHOST_Window : public GHOST_IWindow { * \param stereoVisual: Stereo visual for quad buffered stereo. * \param exclusive: Use to show the window ontop and ignore others (used full-screen). */ - GHOST_Window(GHOST_TUns32 width, - GHOST_TUns32 height, + GHOST_Window(uint32_t width, + uint32_t height, GHOST_TWindowState state, const bool wantStereoVisual = false, const bool exclusive = false); @@ -62,13 +62,13 @@ class GHOST_Window : public GHOST_IWindow { * virtual std::string getTitle() const = 0; * virtual void getWindowBounds(GHOST_Rect& bounds) const = 0; * virtual void getClientBounds(GHOST_Rect& bounds) const = 0; - * virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width) = 0; - * virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height) = 0; - * virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) = 0; + * virtual GHOST_TSuccess setClientWidth(uint32_t width) = 0; + * virtual GHOST_TSuccess setClientHeight(uint32_t height) = 0; + * virtual GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) = 0; * virtual void screenToClient( - * GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; + * int32_t inX, int32_t inY, int32_t& outX, int32_t& outY) const = 0; * virtual void clientToScreen( - * GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const = 0; + * int32_t inX, int32_t inY, int32_t& outX, int32_t& outY) const = 0; * virtual GHOST_TWindowState getState() const = 0; * virtual GHOST_TSuccess setState(GHOST_TWindowState state) = 0; * virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order) = 0; @@ -126,8 +126,8 @@ class GHOST_Window : public GHOST_IWindow { * \param hotY: The Y coordinate of the cursor hot-spot. * \return Indication of success. */ - GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, + GHOST_TSuccess setCustomCursorShape(uint8_t *bitmap, + uint8_t *mask, int sizex, int sizey, int hotX, @@ -142,9 +142,9 @@ class GHOST_Window : public GHOST_IWindow { inline GHOST_TGrabCursorMode getCursorGrabMode() const; inline bool getCursorGrabModeIsWarp() const; inline GHOST_TAxisFlag getCursorGrabAxis() const; - inline void getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const; - inline void getCursorGrabAccum(GHOST_TInt32 &x, GHOST_TInt32 &y) const; - inline void setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y); + inline void getCursorGrabInitPos(int32_t &x, int32_t &y) const; + inline void getCursorGrabAccum(int32_t &x, int32_t &y) const; + inline void setCursorGrabAccum(int32_t x, int32_t y); /** * Shows or hides the cursor. @@ -161,7 +161,7 @@ class GHOST_Window : public GHOST_IWindow { GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_TAxisFlag wrap_axis, GHOST_Rect *bounds, - GHOST_TInt32 mouse_ungrab_xy[2]); + int32_t mouse_ungrab_xy[2]); /** * Gets the cursor grab region, if unset the window is used. @@ -292,14 +292,13 @@ class GHOST_Window : public GHOST_IWindow { * Returns the recommended DPI for this window. * \return The recommended DPI for this window. */ - virtual inline GHOST_TUns16 getDPIHint() + virtual inline uint16_t getDPIHint() { return 96; } #ifdef WITH_INPUT_IME - virtual void beginIME( - GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 w, GHOST_TInt32 h, int completed) + virtual void beginIME(int32_t x, int32_t y, int32_t w, int32_t h, bool completed) { /* do nothing temporarily if not in windows */ } @@ -343,8 +342,8 @@ class GHOST_Window : public GHOST_IWindow { * Sets the cursor shape on the window using * native window system calls. */ - virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, - GHOST_TUns8 *mask, + virtual GHOST_TSuccess setWindowCustomCursorShape(uint8_t *bitmap, + uint8_t *mask, int szx, int szy, int hotX, @@ -369,10 +368,10 @@ class GHOST_Window : public GHOST_IWindow { GHOST_TAxisFlag m_cursorGrabAxis; /** Initial grab location. */ - GHOST_TInt32 m_cursorGrabInitPos[2]; + int32_t m_cursorGrabInitPos[2]; /** Accumulated offset from m_cursorGrabInitPos. */ - GHOST_TInt32 m_cursorGrabAccumPos[2]; + int32_t m_cursorGrabAccumPos[2]; /** Wrap the cursor within this region. */ GHOST_Rect m_cursorGrabBounds; @@ -396,9 +395,9 @@ class GHOST_Window : public GHOST_IWindow { bool m_wantStereoVisual; /** Full-screen width */ - GHOST_TUns32 m_fullScreenWidth; + uint32_t m_fullScreenWidth; /** Full-screen height */ - GHOST_TUns32 m_fullScreenHeight; + uint32_t m_fullScreenHeight; /* OSX only, retina screens */ float m_nativePixelSize; @@ -432,19 +431,19 @@ inline GHOST_TAxisFlag GHOST_Window::getCursorGrabAxis() const return m_cursorGrabAxis; } -inline void GHOST_Window::getCursorGrabInitPos(GHOST_TInt32 &x, GHOST_TInt32 &y) const +inline void GHOST_Window::getCursorGrabInitPos(int32_t &x, int32_t &y) const { x = m_cursorGrabInitPos[0]; y = m_cursorGrabInitPos[1]; } -inline void GHOST_Window::getCursorGrabAccum(GHOST_TInt32 &x, GHOST_TInt32 &y) const +inline void GHOST_Window::getCursorGrabAccum(int32_t &x, int32_t &y) const { x = m_cursorGrabAccumPos[0]; y = m_cursorGrabAccumPos[1]; } -inline void GHOST_Window::setCursorGrabAccum(GHOST_TInt32 x, GHOST_TInt32 y) +inline void GHOST_Window::setCursorGrabAccum(int32_t x, int32_t y) { m_cursorGrabAccumPos[0] = x; m_cursorGrabAccumPos[1] = y; |