Blender V2.61 - r43446
|
#include <GHOST_WindowX11.h>
X11 implementation of GHOST_IWindow. Dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
Definition at line 56 of file GHOST_WindowX11.h.
GHOST_WindowX11::GHOST_WindowX11 | ( | GHOST_SystemX11 * | system, |
Display * | display, | ||
const STR_String & | title, | ||
GHOST_TInt32 | left, | ||
GHOST_TInt32 | top, | ||
GHOST_TUns32 | width, | ||
GHOST_TUns32 | height, | ||
GHOST_TWindowState | state, | ||
const GHOST_TEmbedderWindowID | parentWindow, | ||
GHOST_TDrawingContextType | type = GHOST_kDrawingContextTypeNone , |
||
const bool | stereoVisual = false , |
||
const GHOST_TUns16 | numOfAASamples = 0 |
||
) |
Constructor. Creates a new window and opens it. To check if the window was created properly, use the getValid() method.
title | The text shown in the title bar of the window. |
left | The coordinate of the left edge of the window. |
top | The coordinate of the top edge of the window. |
width | The width the window. |
height | The height the window. |
state | The state the window is initially opened with. |
parentWindow | Parent (embedder) window |
type | The type of drawing context installed in this window. |
stereoVisual | Stereo visual for quad buffered stereo. |
numOfAASamples | Number of samples used for AA (zero if no AA) |
Definition at line 152 of file GHOST_WindowX11.cpp.
References BLENDER_ICON_48x48x24, BLENDER_ICON_HEIGHT, BLENDER_ICON_WIDTH, addon::engine::free(), GHOST_kSuccess, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_PRINT, i, installDrawingContext(), left(), len(), STR_String::Length(), GHOST_SystemX11::m_delete_window_atom, GHOST_Window::m_numOfAASamples, m_post_init, m_post_state, GHOST_Window::m_stereoVisual, GHOST_SystemX11::m_wm_protocols, GHOST_SystemX11::m_wm_take_focus, None, NULL, setTitle(), and state.
GHOST_WindowX11::~GHOST_WindowX11 | ( | ) |
Destructor. Closes the window and disposes resources allocated.
Definition at line 1272 of file GHOST_WindowX11.cpp.
References None, and s_firstContext.
GHOST_TSuccess GHOST_WindowX11::activateDrawingContext | ( | ) | [virtual] |
Activates the drawing context of this window.
Implements GHOST_IWindow.
Definition at line 1218 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, and NULL.
void GHOST_WindowX11::clientToScreen | ( | GHOST_TInt32 | inX, |
GHOST_TInt32 | inY, | ||
GHOST_TInt32 & | outX, | ||
GHOST_TInt32 & | outY | ||
) | const [virtual] |
Converts a point in screen coordinates to client rectangle coordinates
inX | The x-coordinate in the client rectangle. |
inY | The y-coordinate in the client rectangle. |
outX | The x-coordinate on the screen. |
outY | The y-coordinate on the screen. |
Implements GHOST_IWindow.
Definition at line 821 of file GHOST_WindowX11.cpp.
Referenced by getClientBounds().
void GHOST_WindowX11::getClientBounds | ( | GHOST_Rect & | bounds | ) | const [virtual] |
Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.
bounds | The bounding rectangle of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 731 of file GHOST_WindowX11.cpp.
References clientToScreen(), GHOST_Rect::m_b, GHOST_Rect::m_l, GHOST_Rect::m_r, and GHOST_Rect::m_t.
Referenced by getWindowBounds().
GHOST_TWindowState GHOST_WindowX11::getState | ( | ) | const [virtual] |
Returns the state of the window (normal, minimized, maximized).
Implements GHOST_IWindow.
Definition at line 1035 of file GHOST_WindowX11.cpp.
References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
Referenced by setState().
const GHOST_TabletData* GHOST_WindowX11::GetTabletData | ( | ) | [inline, virtual] |
Returns the tablet data (pressure etc).
Implements GHOST_IWindow.
Definition at line 219 of file GHOST_WindowX11.h.
References NULL.
void GHOST_WindowX11::getTitle | ( | STR_String & | title | ) | const [virtual] |
Returns the title displayed in the title bar.
title | The title displayed in the title bar. |
Implements GHOST_IWindow.
Definition at line 709 of file GHOST_WindowX11.cpp.
References NULL.
bool GHOST_WindowX11::getValid | ( | ) | const [virtual] |
Returns indication as to whether the window is valid.
Implements GHOST_IWindow.
Definition at line 683 of file GHOST_WindowX11.cpp.
Referenced by GHOST_SystemX11::createWindow().
void GHOST_WindowX11::getWindowBounds | ( | GHOST_Rect & | bounds | ) | const [virtual] |
Returns the window rectangle dimensions. These are screen coordinates.
bounds | The bounding rectangle of the window. |
Implements GHOST_IWindow.
Definition at line 721 of file GHOST_WindowX11.cpp.
References getClientBounds().
GHOST_TGrabCursorMode GHOST_WindowX11::getWindowCursorGrab | ( | ) | const [protected] |
Window GHOST_WindowX11::getXWindow | ( | ) |
Return a handle to the x11 window type.
Definition at line 676 of file GHOST_WindowX11.cpp.
Referenced by GHOST_SystemX11::getClipboard(), GHOST_SystemX11::getClipboard_xcout(), and GHOST_SystemX11::putClipboard().
GHOST_TSuccess GHOST_WindowX11::installDrawingContext | ( | GHOST_TDrawingContextType | type | ) | [protected, virtual] |
Tries to install a rendering context in this window.
type | The type of rendering context installed. |
Implements GHOST_Window.
Definition at line 1336 of file GHOST_WindowX11.cpp.
References GHOST_kDrawingContextTypeNone, GHOST_kDrawingContextTypeOpenGL, GHOST_kFailure, GHOST_kSuccess, NULL, and s_firstContext.
Referenced by GHOST_WindowX11().
GHOST_TSuccess GHOST_WindowX11::invalidate | ( | ) | [virtual] |
Invalidates the contents of this window.
Implements GHOST_IWindow.
Definition at line 1229 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::removeDrawingContext | ( | ) | [protected, virtual] |
Removes the current drawing context.
Implements GHOST_Window.
Definition at line 1376 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, and NULL.
void GHOST_WindowX11::screenToClient | ( | GHOST_TInt32 | inX, |
GHOST_TInt32 | inY, | ||
GHOST_TInt32 & | outX, | ||
GHOST_TInt32 & | outY | ||
) | const [virtual] |
Converts a point in screen coordinates to client rectangle coordinates
inX | The x-coordinate on the screen. |
inY | The y-coordinate on the screen. |
outX | The x-coordinate in the client rectangle. |
outY | The y-coordinate in the client rectangle. |
Implements GHOST_IWindow.
Definition at line 794 of file GHOST_WindowX11.cpp.
GHOST_TSuccess GHOST_WindowX11::setClientHeight | ( | GHOST_TUns32 | height | ) | [virtual] |
Resizes client rectangle height.
height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 766 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::setClientSize | ( | GHOST_TUns32 | width, |
GHOST_TUns32 | height | ||
) | [virtual] |
Resizes client rectangle.
width | The new width of the client area of the window. |
height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 779 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::setClientWidth | ( | GHOST_TUns32 | width | ) | [virtual] |
Resizes client rectangle width.
width | The new width of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 753 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::setOrder | ( | GHOST_TWindowOrder | order | ) | [virtual] |
Sets the order of the window (bottom, top).
order | The order of the window. |
Implements GHOST_IWindow.
Definition at line 1148 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowOrderBottom, GHOST_kWindowOrderTop, None, and MakeCursor::root.
GHOST_TSuccess GHOST_WindowX11::setState | ( | GHOST_TWindowState | state | ) | [virtual] |
Sets the state of the window (normal, minimized, maximized).
state | The state of the window. |
Implements GHOST_IWindow.
Definition at line 1057 of file GHOST_WindowX11.cpp.
References getState(), GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, and GHOST_kWindowStateNormal.
void GHOST_WindowX11::setTitle | ( | const STR_String & | title | ) | [virtual] |
Sets the title displayed in the title bar.
title | The title to display in the title bar. |
Implements GHOST_IWindow.
Definition at line 690 of file GHOST_WindowX11.cpp.
References STR_String::Length(), and STR_String::ReadPtr().
Referenced by GHOST_WindowX11().
GHOST_TSuccess GHOST_WindowX11::setWindowCursorGrab | ( | GHOST_TGrabCursorMode | mode | ) | [protected, virtual] |
Sets the cursor grab on the window using native window system calls.
warp | Only used when grab is enabled, hides the mouse and allows gragging outside the screen. |
Reimplemented from GHOST_Window.
Definition at line 1485 of file GHOST_WindowX11.cpp.
References GHOST_kGrabDisable, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kSuccess, and None.
GHOST_TSuccess GHOST_WindowX11::setWindowCursorShape | ( | GHOST_TStandardCursor | shape | ) | [protected, virtual] |
Sets the cursor shape on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1530 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::setWindowCursorVisibility | ( | bool | visible | ) | [protected, virtual] |
Sets the cursor visibility on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1466 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::setWindowCustomCursorShape | ( | GHOST_TUns8 | bitmap[16][2], |
GHOST_TUns8 | mask[16][2], | ||
int | hotX, | ||
int | hotY | ||
) | [protected, virtual] |
Sets the cursor shape on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1543 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
GHOST_TSuccess GHOST_WindowX11::setWindowCustomCursorShape | ( | GHOST_TUns8 * | bitmap, |
GHOST_TUns8 * | mask, | ||
int | sizex, | ||
int | sizey, | ||
int | hotX, | ||
int | hotY, | ||
int | fg_color, | ||
int | bg_color | ||
) | [protected, virtual] |
Sets the cursor shape on the window using native window system calls (Arbitrary size/color).
Implements GHOST_Window.
Definition at line 1557 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, and L.
GHOST_TSuccess GHOST_WindowX11::swapBuffers | ( | ) | [virtual] |
Swaps front and back buffers of a window.
Implements GHOST_IWindow.
Definition at line 1206 of file GHOST_WindowX11.cpp.
References GHOST_kDrawingContextTypeOpenGL, GHOST_kFailure, and GHOST_kSuccess.
void GHOST_WindowX11::validate | ( | ) |
The reverse of invalidate! Tells this window that all events for it have been pushed into the GHOST event queue.
called by the X11 system implementation when expose events for the window have been pushed onto the GHOST queue
Definition at line 1260 of file GHOST_WindowX11.cpp.
Definition at line 232 of file GHOST_WindowX11.h.
Referenced by GHOST_WindowX11().
Definition at line 233 of file GHOST_WindowX11.h.
Referenced by GHOST_WindowX11().