iNativeWindow Struct Reference
[2D]
This interface represents a native window. More...
#include <ivideo/natwin.h>
Public Types | |
enum | WindowDecoration { decoCaption, decoClientFrame } |
Window decorations that can be shown or hidden. More... | |
Public Member Functions | |
virtual bool | FitSizeToWorkingArea (int &desiredWidth, int &desiredHeight)=0 |
Take a desired window contents size and compute a contents size so the window would (in windowed mode) fit onto the current working area. | |
virtual bool | GetWindowDecoration (WindowDecoration decoration)=0 |
Return whether a decoration is visible. | |
virtual void | SetIcon (iImage *image)=0 |
Sets the icon of this window with the provided one. | |
virtual void | SetTitle (const wchar_t *title)=0 |
Set the title for this window. | |
virtual void | SetTitle (const char *title)=0 |
Set the title for this window. | |
virtual bool | SetWindowDecoration (WindowDecoration decoration, bool flag)=0 |
Show or hide a window decoration. | |
Window transparency | |
Window transparency allows windows to be transparent, that is, the background behind it shows through (desktop, other windows. ..) where the framebuffer alpha is not opaque. (Clearing the framebuffer leaves the alpha at zero - fully transparent - so not rendering every pixel would be enough to see something.) Note that window transparency is not available on all platforms or certain configurations:
| |
virtual bool | GetWindowTransparent ()=0 |
Query the window transparency state. | |
virtual bool | IsWindowTransparencyAvailable ()=0 |
Return whether window transparency is available. | |
virtual bool | SetWindowTransparent (bool transparent)=0 |
Set whether window transparency is desired. |
Detailed Description
This interface represents a native window.
Main ways to get pointers to this interface:
Definition at line 89 of file natwin.h.
Member Enumeration Documentation
Window decorations that can be shown or hidden.
- Enumerator:
Member Function Documentation
virtual bool iNativeWindow::FitSizeToWorkingArea | ( | int & | desiredWidth, | |
int & | desiredHeight | |||
) | [pure virtual] |
Take a desired window contents size and compute a contents size so the window would (in windowed mode) fit onto the current working area.
This functions computes a size so the window would fit into the current working area, taking window decorations and frame into account. The “working area” is the area on the screen where windows are typically placed, e.g. on Windows the desktop but without the task bar. On multi-monitor systems, the workspace size depends on the monitor the window is currently on (or would be created on).
Since this function works with “content sizes” the returned sizes are suitable for passing to iGraphics2D::Resize().
- Parameters:
-
desiredWidth The desired contents width, will be corrected to fit into the workspace width. desiredHeight The desired contents height, will be corrected to fit into the workspace height.
- Returns:
- Whether the corrected size could be computed: the function may not be supported on the current platform. In that case the desiredWidth and desiredHeight parameters will be left unchanged.
Implemented in csGraphics2D.
virtual bool iNativeWindow::GetWindowDecoration | ( | WindowDecoration | decoration | ) | [pure virtual] |
Return whether a decoration is visible.
Implemented in csGraphics2D.
virtual bool iNativeWindow::GetWindowTransparent | ( | ) | [pure virtual] |
Query the window transparency state.
- Returns:
- If the system is not open, returns the value of the "transparency desired" flag. If the system is open, returns whether the window is actually currently transparent (when transparency is desired and available),
Implemented in csGraphics2D.
virtual bool iNativeWindow::IsWindowTransparencyAvailable | ( | ) | [pure virtual] |
Return whether window transparency is available.
Returns true when the current platform and OS version generally support transparency and the user enabled it.
Implemented in csGraphics2D.
virtual void iNativeWindow::SetIcon | ( | iImage * | image | ) | [pure virtual] |
Sets the icon of this window with the provided one.
- Parameters:
-
image the iImage to set as the icon of this window.
Implemented in csGraphics2D.
virtual void iNativeWindow::SetTitle | ( | const wchar_t * | title | ) | [pure virtual] |
Set the title for this window.
Implemented in csGraphics2D.
virtual void iNativeWindow::SetTitle | ( | const char * | title | ) | [pure virtual] |
Set the title for this window.
- Remarks:
title
is expected to be UTF-8 encoded.
Implemented in csGraphics2D.
virtual bool iNativeWindow::SetWindowDecoration | ( | WindowDecoration | decoration, | |
bool | flag | |||
) | [pure virtual] |
Show or hide a window decoration.
- Parameters:
-
decoration Decoration to change flag Whether to show ( true
) or hide (false
) a decoration.
- Returns:
- Whether changing the visibility of the decoration was successful.
- Remarks:
- Always fails when in fullscreen mode.
Implemented in csGraphics2D.
virtual bool iNativeWindow::SetWindowTransparent | ( | bool | transparent | ) | [pure virtual] |
Set whether window transparency is desired.
- Parameters:
-
transparent "Transparency desired" flag.
- Returns:
- Whether the flag was successfully changed. If the system is not open, and compositing is not supported at all, returns false (the flag is not changed). If the system is not open, and compositing is generally supported, the flag is stored and the actual window transparency will be set when the system opens. Returns true in that case. If the system is open, returns whether the transparency could be changed.
Implemented in csGraphics2D.
The documentation for this struct was generated from the following file:
- ivideo/natwin.h
Generated for Crystal Space 2.0 by doxygen 1.6.1