nux-0.9.48
|
#include <NuxGraphics/GraphicsDisplayWin.h>
Data Structures | |
struct | _DndSourceFuncs |
Public Types | |
typedef void(* | GrabReleaseCallback )(bool replaced, void *user_data) |
typedef void(* | GrabReleaseCallback )(bool replaced, void *user_data) |
typedef struct nux::GraphicsDisplay::_DndSourceFuncs | DndSourceFuncs |
Public Member Functions | |
bool | IsGfxInterfaceCreated () |
bool | CreateOpenGLWindow (const TCHAR *WindowTitle, unsigned int WindowWidth, unsigned int WindowHeight, WindowStyle Style, const GraphicsDisplay *Parent, bool FullscreenFlag=false, bool create_rendering_data=true) |
Create a window with and OpenGL context. | |
bool | CreateFromOpenGLWindow (HWND WindowHandle, HDC WindowDCHandle, HGLRC OpenGLRenderingContext) |
Create a GLWindow from a window and device context. | |
void | DestroyOpenGLWindow () |
void | SetWindowTitle (const TCHAR *Title) |
void | SetWindowSize (int width, int height) |
void | SetViewPort (int x, int y, int width, int height) |
Point | GetMouseScreenCoord () |
Point | GetMouseWindowCoord () |
Point | GetWindowCoord () |
Rect | GetWindowGeometry () |
Rect | GetNCWindowGeometry () |
void | MakeGLContextCurrent (bool b=true) |
void | SwapBuffer (bool glswap=true) |
void | GetSystemEvent (IEvent *evt) |
IEvent & | GetCurrentEvent () |
bool | isWindowMinimized () const |
void | ShowWindow () |
void | HideWindow () |
bool | IsWindowVisible () |
void | EnterMaximizeWindow () |
void | ExitMaximizeWindow () |
HWND | GetWindowHandle () const |
HWND | GetParentWindowHandle () const |
HDC | GetWindowHDC () const |
bool | IsChildWindow () const |
bool | HasVSyncSwapControl () const |
void | EnableVSyncSwapControl () |
void | DisableVSyncSwapControl () |
float | GetFrameTime () const |
void | ResetFrameTime () |
GraphicsEngine * | GetGraphicsEngine () const |
GpuDevice * | GetGpuDevice () const |
bool | StartOpenFileDialog (FileDialogOption &fdo) |
bool | StartSaveFileDialog (FileDialogOption &fdo) |
bool | StartColorDialog (ColorDialogOption &cdo) |
void | GetWindowSize (int &w, int &h) |
int | GetWindowWidth () |
int | GetWindowHeight () |
void | ResetWindowSize () |
Get the window size and reset the GraphicsEngine and GpuDevice accordingly. | |
bool | HasFrameBufferSupport () |
void | SetWindowCursor (HCURSOR cursor) |
HCURSOR | GetWindowCursor () const |
void | ProcessForeignWin32Event (HWND hWnd, MSG msg, WPARAM wParam, LPARAM lParam, IEvent *event) |
LRESULT | ProcessWin32Event (HWND hWnd, t_u32 uMsg, WPARAM wParam, LPARAM lParam) |
void | PauseThreadGraphicsRendering () |
Pause graphics rendering. | |
bool | IsPauseThreadGraphicsRendering () const |
bool | GrabPointer (GrabReleaseCallback callback, void *data, bool replace_existing) |
bool | UngrabPointer (void *data) |
bool | PointerIsGrabbed () |
bool | GrabKeyboard (GrabReleaseCallback callback, void *data, bool replace_existing) |
bool | UngrabKeyboard (void *data) |
bool | KeyboardIsGrabbed () |
void * | KeyboardGrabData () |
void * | PointerGrabData () |
~GraphicsDisplay () | |
GLEWContext * | GetGLEWContext () |
WGLEWContext * | GetWGLEWContext () |
bool | HasXPendingEvent () const |
Display * | GetX11Display () |
bool | IsGfxInterfaceCreated () |
bool | CreateOpenGLWindow (const TCHAR *WindowTitle, unsigned int WindowWidth, unsigned int WindowHeight, WindowStyle Style, const GraphicsDisplay *Parent, bool FullscreenFlag=false, bool create_rendering_data=true) |
Create a window with and OpenGL context. | |
bool | CreateFromOpenGLWindow (Display *X11Display, Window X11Window, GLXContext OpenGLContext) |
Create a GLWindow from a display and window created externally. | |
void | DestroyOpenGLWindow () |
void | SetWindowTitle (const TCHAR *Title) |
void | SetWindowSize (int width, int height) |
Set the window size. | |
void | SetWindowPosition (int width, int height) |
Set the window position. | |
void | SetViewPort (int x, int y, int width, int height) |
Set the OpenGL Viewport. | |
Point | GetMouseScreenCoord () |
Point | GetMouseWindowCoord () |
Point | GetWindowCoord () |
Rect | GetWindowGeometry () |
Rect | GetNCWindowGeometry () |
void | MakeGLContextCurrent () |
void | SwapBuffer (bool glswap=true) |
void | GetSystemEvent (IEvent *evt) |
int | GetGlXMajor () const |
int | GetGlXMinor () const |
IEvent & | GetCurrentEvent () |
bool | isWindowMinimized () const |
void | ShowWindow () |
void | HideWindow () |
bool | IsWindowVisible () |
void | EnterMaximizeWindow () |
void | ExitMaximizeWindow () |
Window | GetWindowHandle () const |
bool | IsChildWindow () const |
bool | HasVSyncSwapControl () const |
void | EnableVSyncSwapControl () |
void | DisableVSyncSwapControl () |
float | GetFrameTime () const |
void | ResetFrameTime () |
GraphicsEngine * | GetGraphicsEngine () const |
GpuDevice * | GetGpuDevice () const |
void | GetDesktopSize (int &w, int &h) |
void | GetWindowSize (int &w, int &h) |
int | GetWindowWidth () |
int | GetWindowHeight () |
void | ResetWindowSize () |
Get the window size and reset the GraphicsEngine and GpuDevice accordingly. | |
bool | HasFrameBufferSupport () |
void | PauseThreadGraphicsRendering () |
Pause graphics rendering. | |
bool | IsPauseThreadGraphicsRendering () const |
void | ProcessForeignX11Event (XEvent *xevent, IEvent *nux_event) |
void | ProcessXEvent (XEvent xevent, bool foreign) |
void | RecalcXYPosition (Window TheMainWindow, XEvent xevent, int &x, int &y) |
void | RecalcXYPosition (int x_root, int y_root, int &x_recalc, int &y_recalc) |
void | SendDndStatus (bool accept, DndAction action, Rect region) |
void | SendDndFinished (bool accepted, DndAction performed_action) |
std::list< char * > | GetDndMimeTypes () |
char * | GetDndData (char *property) |
void | StartDndDrag (const DndSourceFuncs &funcs, void *user_data) |
bool | GrabPointer (GrabReleaseCallback callback, void *data, bool replace_existing) |
bool | UngrabPointer (void *data) |
bool | PointerIsGrabbed () |
bool | GrabKeyboard (GrabReleaseCallback callback, void *data, bool replace_existing) |
bool | UngrabKeyboard (void *data) |
bool | KeyboardIsGrabbed () |
void * | KeyboardGrabData () |
void * | PointerGrabData () |
~GraphicsDisplay () | |
GLEWContext * | GetGLEWContext () |
GLXEWContext * | GetGLXEWContext () |
NString | FindResourceLocation (const TCHAR *ResourceFileName, bool ErrorOnFail=false) |
NString | FindUITextureLocation (const TCHAR *ResourceFileName, bool ErrorOnFail=false) |
NString | FindShaderLocation (const TCHAR *ResourceFileName, bool ErrorOnFail=false) |
NString | FindFontLocation (const TCHAR *ResourceFileName, bool ErrorOnFail=false) |
const std::vector< NString > & | GetFontSearchPath () const |
const std::vector< NString > & | GetShaderSearchPath () const |
const std::vector< NString > & | GetUITextureSearchPath () const |
Data Fields | |
int | m_num_device_modes |
IEvent * | m_pEvent |
Friends | |
class | GraphicsEngine |
class | DisplayAccessController |
typedef void(* nux::GraphicsDisplay::GrabReleaseCallback)(bool replaced, void *user_data) |
typedef void(* nux::GraphicsDisplay::GrabReleaseCallback)(bool replaced, void *user_data) |
nux::GraphicsDisplay::~GraphicsDisplay | ( | ) |
nux::GraphicsDisplay::~GraphicsDisplay | ( | ) |
bool nux::GraphicsDisplay::CreateFromOpenGLWindow | ( | HWND | WindowHandle, |
HDC | WindowDCHandle, | ||
HGLRC | OpenGLRenderingContext | ||
) |
Create a GLWindow from a window and device context.
WindowHandle | Provided window. |
WindowDCHandle | Provided device context. |
OpenGLRenderingContext | And OpenGL rendering context. |
bool nux::GraphicsDisplay::CreateFromOpenGLWindow | ( | Display * | X11Display, |
Window | X11Window, | ||
GLXContext | OpenGLContext | ||
) |
Create a GLWindow from a display and window created externally.
X11Display | Provided display. |
X11Window | Provided window. |
bool nux::GraphicsDisplay::CreateOpenGLWindow | ( | const TCHAR * | WindowTitle, |
unsigned int | WindowWidth, | ||
unsigned int | WindowHeight, | ||
WindowStyle | Style, | ||
const GraphicsDisplay * | Parent, | ||
bool | FullscreenFlag = false , |
||
bool | create_rendering_data = true |
||
) |
Create a window with and OpenGL context.
WindowTitle | The window title. |
WindowWidth | Initial window width. |
WindowHeight | Initial window height. |
Style | The window style. |
ParentWindow | The parent window. |
FullscreenFlag | Full screen flag. |
bool nux::GraphicsDisplay::CreateOpenGLWindow | ( | const TCHAR * | WindowTitle, |
unsigned int | WindowWidth, | ||
unsigned int | WindowHeight, | ||
WindowStyle | Style, | ||
const GraphicsDisplay * | Parent, | ||
bool | FullscreenFlag = false , |
||
bool | create_rendering_data = true |
||
) |
Create a window with and OpenGL context.
WindowTitle | The window title. |
WindowWidth | Initial window width. |
WindowHeight | Initial window height. |
Style | The window style. |
ParentWindow | The parent window. |
FullscreenFlag | Full screen flag. |
void nux::GraphicsDisplay::DestroyOpenGLWindow | ( | ) |
void nux::GraphicsDisplay::DestroyOpenGLWindow | ( | ) |
void nux::GraphicsDisplay::DisableVSyncSwapControl | ( | ) |
void nux::GraphicsDisplay::DisableVSyncSwapControl | ( | ) |
void nux::GraphicsDisplay::EnableVSyncSwapControl | ( | ) |
void nux::GraphicsDisplay::EnableVSyncSwapControl | ( | ) |
void nux::GraphicsDisplay::EnterMaximizeWindow | ( | ) |
void nux::GraphicsDisplay::EnterMaximizeWindow | ( | ) |
void nux::GraphicsDisplay::ExitMaximizeWindow | ( | ) |
void nux::GraphicsDisplay::ExitMaximizeWindow | ( | ) |
NString nux::GraphicsDisplay::FindFontLocation | ( | const TCHAR * | ResourceFileName, |
bool | ErrorOnFail = false |
||
) |
NString nux::GraphicsDisplay::FindResourceLocation | ( | const TCHAR * | ResourceFileName, |
bool | ErrorOnFail = false |
||
) |
NString nux::GraphicsDisplay::FindShaderLocation | ( | const TCHAR * | ResourceFileName, |
bool | ErrorOnFail = false |
||
) |
NString nux::GraphicsDisplay::FindUITextureLocation | ( | const TCHAR * | ResourceFileName, |
bool | ErrorOnFail = false |
||
) |
IEvent& nux::GraphicsDisplay::GetCurrentEvent | ( | ) |
IEvent& nux::GraphicsDisplay::GetCurrentEvent | ( | ) |
void nux::GraphicsDisplay::GetDesktopSize | ( | int & | w, |
int & | h | ||
) |
char* nux::GraphicsDisplay::GetDndData | ( | char * | property | ) |
std::list<char *> nux::GraphicsDisplay::GetDndMimeTypes | ( | ) |
const std::vector<NString>& nux::GraphicsDisplay::GetFontSearchPath | ( | ) | const [inline] |
float nux::GraphicsDisplay::GetFrameTime | ( | ) | const |
float nux::GraphicsDisplay::GetFrameTime | ( | ) | const |
GLEWContext* nux::GraphicsDisplay::GetGLEWContext | ( | ) | [inline] |
GLEWContext* nux::GraphicsDisplay::GetGLEWContext | ( | ) | [inline] |
GLXEWContext* nux::GraphicsDisplay::GetGLXEWContext | ( | ) | [inline] |
int nux::GraphicsDisplay::GetGlXMajor | ( | ) | const |
int nux::GraphicsDisplay::GetGlXMinor | ( | ) | const |
GpuDevice* nux::GraphicsDisplay::GetGpuDevice | ( | ) | const [inline] |
GpuDevice* nux::GraphicsDisplay::GetGpuDevice | ( | ) | const [inline] |
GraphicsEngine* nux::GraphicsDisplay::GetGraphicsEngine | ( | ) | const [inline] |
Referenced by nux::WindowThread::GetGraphicsEngine().
GraphicsEngine* nux::GraphicsDisplay::GetGraphicsEngine | ( | ) | const [inline] |
Point nux::GraphicsDisplay::GetMouseScreenCoord | ( | ) |
Point nux::GraphicsDisplay::GetMouseScreenCoord | ( | ) |
Point nux::GraphicsDisplay::GetMouseWindowCoord | ( | ) |
Point nux::GraphicsDisplay::GetMouseWindowCoord | ( | ) |
Rect nux::GraphicsDisplay::GetNCWindowGeometry | ( | ) |
Rect nux::GraphicsDisplay::GetNCWindowGeometry | ( | ) |
HWND nux::GraphicsDisplay::GetParentWindowHandle | ( | ) | const [inline] |
const std::vector<NString>& nux::GraphicsDisplay::GetShaderSearchPath | ( | ) | const [inline] |
void nux::GraphicsDisplay::GetSystemEvent | ( | IEvent * | evt | ) |
void nux::GraphicsDisplay::GetSystemEvent | ( | IEvent * | evt | ) |
const std::vector<NString>& nux::GraphicsDisplay::GetUITextureSearchPath | ( | ) | const [inline] |
WGLEWContext* nux::GraphicsDisplay::GetWGLEWContext | ( | ) | [inline] |
Point nux::GraphicsDisplay::GetWindowCoord | ( | ) |
Point nux::GraphicsDisplay::GetWindowCoord | ( | ) |
HCURSOR nux::GraphicsDisplay::GetWindowCursor | ( | ) | const |
Rect nux::GraphicsDisplay::GetWindowGeometry | ( | ) |
Rect nux::GraphicsDisplay::GetWindowGeometry | ( | ) |
Window nux::GraphicsDisplay::GetWindowHandle | ( | ) | const [inline] |
HWND nux::GraphicsDisplay::GetWindowHandle | ( | ) | const [inline] |
HDC nux::GraphicsDisplay::GetWindowHDC | ( | ) | const [inline] |
int nux::GraphicsDisplay::GetWindowHeight | ( | ) |
int nux::GraphicsDisplay::GetWindowHeight | ( | ) |
void nux::GraphicsDisplay::GetWindowSize | ( | int & | w, |
int & | h | ||
) |
void nux::GraphicsDisplay::GetWindowSize | ( | int & | w, |
int & | h | ||
) |
int nux::GraphicsDisplay::GetWindowWidth | ( | ) |
int nux::GraphicsDisplay::GetWindowWidth | ( | ) |
Display* nux::GraphicsDisplay::GetX11Display | ( | ) | [inline] |
bool nux::GraphicsDisplay::GrabKeyboard | ( | GrabReleaseCallback | callback, |
void * | data, | ||
bool | replace_existing | ||
) |
bool nux::GraphicsDisplay::GrabKeyboard | ( | GrabReleaseCallback | callback, |
void * | data, | ||
bool | replace_existing | ||
) |
bool nux::GraphicsDisplay::GrabPointer | ( | GrabReleaseCallback | callback, |
void * | data, | ||
bool | replace_existing | ||
) |
bool nux::GraphicsDisplay::GrabPointer | ( | GrabReleaseCallback | callback, |
void * | data, | ||
bool | replace_existing | ||
) |
bool nux::GraphicsDisplay::HasFrameBufferSupport | ( | ) |
bool nux::GraphicsDisplay::HasFrameBufferSupport | ( | ) |
bool nux::GraphicsDisplay::HasVSyncSwapControl | ( | ) | const |
bool nux::GraphicsDisplay::HasVSyncSwapControl | ( | ) | const |
bool nux::GraphicsDisplay::HasXPendingEvent | ( | ) | const |
void nux::GraphicsDisplay::HideWindow | ( | ) |
void nux::GraphicsDisplay::HideWindow | ( | ) |
bool nux::GraphicsDisplay::IsChildWindow | ( | ) | const [inline] |
bool nux::GraphicsDisplay::IsChildWindow | ( | ) | const [inline] |
bool nux::GraphicsDisplay::IsGfxInterfaceCreated | ( | ) |
bool nux::GraphicsDisplay::IsGfxInterfaceCreated | ( | ) |
bool nux::GraphicsDisplay::IsPauseThreadGraphicsRendering | ( | ) | const |
bool nux::GraphicsDisplay::IsPauseThreadGraphicsRendering | ( | ) | const |
bool nux::GraphicsDisplay::isWindowMinimized | ( | ) | const [inline] |
bool nux::GraphicsDisplay::isWindowMinimized | ( | ) | const [inline] |
bool nux::GraphicsDisplay::IsWindowVisible | ( | ) |
bool nux::GraphicsDisplay::IsWindowVisible | ( | ) |
void* nux::GraphicsDisplay::KeyboardGrabData | ( | ) | [inline] |
void* nux::GraphicsDisplay::KeyboardGrabData | ( | ) | [inline] |
bool nux::GraphicsDisplay::KeyboardIsGrabbed | ( | ) |
bool nux::GraphicsDisplay::KeyboardIsGrabbed | ( | ) |
void nux::GraphicsDisplay::MakeGLContextCurrent | ( | ) |
void nux::GraphicsDisplay::MakeGLContextCurrent | ( | bool | b = true | ) |
void nux::GraphicsDisplay::PauseThreadGraphicsRendering | ( | ) |
Pause graphics rendering.
Pause graphics rendering. This function also sets the current openGL context to 0 for this window. This is useful while a child window is being created and is sharing openGL objects with this context. For wglShareLists to work, both OpenGL context must be set to 0 in their respective thread. Send NUX_THREADMSG_START_RENDERING (PostThreadMessage) to this window to reactivate rendering.
Never call this function while doing rendering. Call it only when processing events.
void nux::GraphicsDisplay::PauseThreadGraphicsRendering | ( | ) |
Pause graphics rendering.
Pause graphics rendering. This function also sets the current openGL context to 0 for this window. This is useful while a child window is being created and is sharing openGL objects with this context. For wglShareLists to work, both OpenGL context must be set to 0 in their respective thread. Send NUX_THREADMSG_START_RENDERING (PostThreadMessage) to this window to reactivate rendering.
Never call this function while doing rendering. Call it only when processing events.
void* nux::GraphicsDisplay::PointerGrabData | ( | ) | [inline] |
void* nux::GraphicsDisplay::PointerGrabData | ( | ) | [inline] |
bool nux::GraphicsDisplay::PointerIsGrabbed | ( | ) |
bool nux::GraphicsDisplay::PointerIsGrabbed | ( | ) |
void nux::GraphicsDisplay::ProcessForeignWin32Event | ( | HWND | hWnd, |
MSG | msg, | ||
WPARAM | wParam, | ||
LPARAM | lParam, | ||
IEvent * | event | ||
) |
void nux::GraphicsDisplay::ProcessForeignX11Event | ( | XEvent * | xevent, |
IEvent * | nux_event | ||
) |
LRESULT nux::GraphicsDisplay::ProcessWin32Event | ( | HWND | hWnd, |
t_u32 | uMsg, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) |
void nux::GraphicsDisplay::ProcessXEvent | ( | XEvent | xevent, |
bool | foreign | ||
) |
void nux::GraphicsDisplay::RecalcXYPosition | ( | Window | TheMainWindow, |
XEvent | xevent, | ||
int & | x, | ||
int & | y | ||
) |
void nux::GraphicsDisplay::RecalcXYPosition | ( | int | x_root, |
int | y_root, | ||
int & | x_recalc, | ||
int & | y_recalc | ||
) |
void nux::GraphicsDisplay::ResetFrameTime | ( | ) |
void nux::GraphicsDisplay::ResetFrameTime | ( | ) |
void nux::GraphicsDisplay::ResetWindowSize | ( | ) |
Get the window size and reset the GraphicsEngine and GpuDevice accordingly.
This is a passive way to set the window size through out the NuxGraphics system. This call gets the current window size and sets its accordingly to all sub-system.
void nux::GraphicsDisplay::ResetWindowSize | ( | ) |
Get the window size and reset the GraphicsEngine and GpuDevice accordingly.
This is a passive way to set the window size through out the NuxGraphics system. This call gets the current window size and sets its accordingly to all sub-system.
void nux::GraphicsDisplay::SendDndFinished | ( | bool | accepted, |
DndAction | performed_action | ||
) |
void nux::GraphicsDisplay::SetViewPort | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
void nux::GraphicsDisplay::SetViewPort | ( | int | x, |
int | y, | ||
int | width, | ||
int | height | ||
) |
Set the OpenGL Viewport.
void nux::GraphicsDisplay::SetWindowCursor | ( | HCURSOR | cursor | ) |
void nux::GraphicsDisplay::SetWindowPosition | ( | int | width, |
int | height | ||
) |
Set the window position.
void nux::GraphicsDisplay::SetWindowSize | ( | int | width, |
int | height | ||
) |
Set the window size.
Actively set the window size to the provided parameters.
void nux::GraphicsDisplay::SetWindowSize | ( | int | width, |
int | height | ||
) |
void nux::GraphicsDisplay::SetWindowTitle | ( | const TCHAR * | Title | ) |
void nux::GraphicsDisplay::SetWindowTitle | ( | const TCHAR * | Title | ) |
void nux::GraphicsDisplay::ShowWindow | ( | ) |
void nux::GraphicsDisplay::ShowWindow | ( | ) |
bool nux::GraphicsDisplay::StartColorDialog | ( | ColorDialogOption & | cdo | ) |
void nux::GraphicsDisplay::StartDndDrag | ( | const DndSourceFuncs & | funcs, |
void * | user_data | ||
) |
bool nux::GraphicsDisplay::StartOpenFileDialog | ( | FileDialogOption & | fdo | ) |
bool nux::GraphicsDisplay::StartSaveFileDialog | ( | FileDialogOption & | fdo | ) |
void nux::GraphicsDisplay::SwapBuffer | ( | bool | glswap = true | ) |
void nux::GraphicsDisplay::SwapBuffer | ( | bool | glswap = true | ) |
bool nux::GraphicsDisplay::UngrabKeyboard | ( | void * | data | ) |
bool nux::GraphicsDisplay::UngrabKeyboard | ( | void * | data | ) |
bool nux::GraphicsDisplay::UngrabPointer | ( | void * | data | ) |
bool nux::GraphicsDisplay::UngrabPointer | ( | void * | data | ) |
DisplayAccessController [friend] |
GraphicsEngine [friend] |