WindowProperties

class WindowProperties

A container for the various kinds of properties we might ask to have on a graphics window before we open it. This also serves to hold the current properties for a window after it has been opened.

Inheritance diagram

Inheritance diagram of WindowProperties

enum MouseMode
enumerator M_absolute = 0
enumerator M_relative = 1
enumerator M_confined = 2
enum ZOrder
enumerator Z_bottom = 0
enumerator Z_normal = 1
enumerator Z_top = 2
WindowProperties.__eq__()
WindowProperties.__getstate__()
WindowProperties.__init__()
WindowProperties.__ne__()
WindowProperties.__setstate__()
WindowProperties.add_properties()

Sets any properties that are explicitly specified in other on this object. Leaves other properties unchanged.

WindowProperties.assign()
WindowProperties.clear()

Unsets all properties that have been specified so far, and resets the WindowProperties structure to its initial empty state.

WindowProperties.clear_cursor_filename()

Removes the cursor_filename specification from the properties.

WindowProperties.clear_cursor_hidden()

Removes the cursor_hidden specification from the properties.

static WindowProperties.clear_default()

Returns the “default” WindowProperties to whatever is specified in the user’s config file.

WindowProperties.clear_fixed_size()

Removes the fixed_size specification from the properties.

WindowProperties.clear_foreground()

Removes the foreground specification from the properties.

WindowProperties.clear_fullscreen()

Removes the fullscreen specification from the properties.

WindowProperties.clear_icon_filename()

Removes the icon_filename specification from the properties.

WindowProperties.clear_maximized()

Removes the maximized specification from the properties.

WindowProperties.clear_minimized()

Removes the minimized specification from the properties.

WindowProperties.clear_mouse_mode()

Removes the mouse_mode specification from the properties.

WindowProperties.clear_open()

Removes the open specification from the properties.

WindowProperties.clear_origin()

Removes the origin specification from the properties.

WindowProperties.clear_parent_window()

Removes the S_parent_window specification from the properties.

WindowProperties.clear_raw_mice()

Removes the raw_mice specification from the properties.

WindowProperties.clear_size()

Removes the size specification from the properties.

WindowProperties.clear_title()

Removes the title specification from the properties.

WindowProperties.clear_undecorated()

Removes the undecorated specification from the properties.

WindowProperties.clear_z_order()

Removes the z_order specification from the properties.

static WindowProperties.get_config_properties()

Returns a WindowProperties structure with all of the default values filled in according to the user’s config file.

WindowProperties.get_cursor_filename()

Returns the icon filename associated with the mouse cursor.

WindowProperties.get_cursor_hidden()

Returns true if the mouse cursor is invisible.

static WindowProperties.get_default()

Returns the “default” WindowProperties. If set_default() has been called, this returns that WindowProperties structure; otherwise, this returns get_config_properties().

WindowProperties.get_fixed_size()

Returns true if the window cannot be resized by the user, false otherwise.

WindowProperties.get_foreground()

Returns true if the window is in the foreground.

WindowProperties.get_fullscreen()

Returns true if the window is in fullscreen mode.

WindowProperties.get_icon_filename()

Returns the icon filename associated with the window.

WindowProperties.get_maximized()

Returns true if the window is maximized.

WindowProperties.get_minimized()

Returns true if the window is minimized.

WindowProperties.get_mouse_mode()

See set_mouse_mode().

WindowProperties.get_open()

Returns true if the window is open.

WindowProperties.get_origin()

Returns the coordinates of the window’s top-left corner, not including decorations.

WindowProperties.get_parent_window()

Returns the parent window specification, or NULL if there is no parent window specified.

WindowProperties.get_raw_mice()

Returns true if the window reads the raw mice.

WindowProperties.get_size()

Returns size in pixels of the useful part of the window, not including decorations.

WindowProperties.get_title()

Returns the window’s title.

WindowProperties.get_undecorated()

Returns true if the window has no border.

WindowProperties.get_x_origin()

Returns the x coordinate of the window’s top-left corner, not including decorations.

WindowProperties.get_x_size()

Returns size in pixels in the x dimension of the useful part of the window, not including decorations. That is, this is the window’s width.

WindowProperties.get_y_origin()

Returns the y coordinate of the window’s top-left corner, not including decorations.

WindowProperties.get_y_size()

Returns size in pixels in the y dimension of the useful part of the window, not including decorations. That is, this is the window’s height.

WindowProperties.get_z_order()

Returns the window’s z_order.

WindowProperties.has_cursor_filename()

Returns true if set_cursor_filename() has been specified.

WindowProperties.has_cursor_hidden()

Returns true if set_cursor_hidden() has been specified.

WindowProperties.has_fixed_size()

Returns true if set_fixed_size() has been specified.

WindowProperties.has_foreground()

Returns true if set_foreground() has been specified.

WindowProperties.has_fullscreen()

Returns true if set_fullscreen() has been specified.

WindowProperties.has_icon_filename()

Returns true if set_icon_filename() has been specified.

WindowProperties.has_maximized()

Returns true if set_maximized() has been specified.

WindowProperties.has_minimized()

Returns true if set_minimized() has been specified.

WindowProperties.has_mouse_mode()
WindowProperties.has_open()

Returns true if set_open() has been specified.

WindowProperties.has_origin()

Returns true if the window origin has been specified, false otherwise.

WindowProperties.has_parent_window()

Checks the S_parent_window specification from the properties.

WindowProperties.has_raw_mice()

Returns true if set_raw_mice() has been specified.

WindowProperties.has_size()

Returns true if the window size has been specified, false otherwise.

WindowProperties.has_title()

Returns true if the window title has been specified, false otherwise.

WindowProperties.has_undecorated()

Returns true if set_undecorated() has been specified.

WindowProperties.has_z_order()

Returns true if the window z_order has been specified, false otherwise.

WindowProperties.is_any_specified()

Returns true if any properties have been specified, false otherwise.

WindowProperties.output()

Sets any properties that are explicitly specified in other on this object. Leaves other properties unchanged.

WindowProperties.set_cursor_filename()

Specifies the file that contains the icon to associate with the mouse cursor when it is within the window (and visible).

WindowProperties.set_cursor_hidden()

Specifies whether the mouse cursor should be visible.

static WindowProperties.set_default()

Replaces the “default” WindowProperties with the specified structure. The specified WindowProperties will be returned by future calls to get_default(), until clear_default() is called.

Note that this completely replaces the default properties; it is not additive.

WindowProperties.set_fixed_size()

Specifies whether the window should be resizable by the user.

WindowProperties.set_foreground()

Specifies whether the window should be opened in the foreground (true), or left in the background (false).

WindowProperties.set_fullscreen()

Specifies whether the window should be opened in fullscreen mode (true) or normal windowed mode (false, the default).

WindowProperties.set_icon_filename()

Specifies the file that contains the icon to associate with the window when it is minimized.

WindowProperties.set_maximized()

Specifies whether the window should be created maximized (true), or normal (false).

WindowProperties.set_minimized()

Specifies whether the window should be created minimized (true), or normal (false).

WindowProperties.set_mouse_mode()

Specifies the mode in which the window is to operate its mouse pointer.

M_absolute: the normal mode in which a mouse pointer operates, where the mouse can move outside the window and the mouse coordinates are relative to its position in the window.

M_confined: this mode reports absolute mouse positions, but confines the mouse pointer to the window boundary. The reported mouse positions will never be outside of the window boundary.

M_relative: a mode where only relative movements are reported; particularly useful for FPS-style mouse movements where you have hidden the mouse pointer and are are more interested in how fast the mouse is moving, rather than precisely where the pointer is hovering. The reported positions still appear to be absolute, but they can go toward negative or positive infinity without being constrained by the window (or screen) dimensions. Since the position of the mouse cursor becomes meaningless in this mode, it is recommended to combine this with the cursor_hidden flag.

WindowProperties.set_open()

Specifies whether the window should be open. It is legal to create a GraphicsWindow in the closed state, and later request it to open by changing this flag.

WindowProperties.set_origin()

Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window should appear. This is the origin of the top- left corner of the useful part of the window, not including decorations.

Specifies the origin on the screen (in pixels, relative to the top-left corner) at which the window should appear. This is the origin of the top- left corner of the useful part of the window, not including decorations.

WindowProperties.set_parent_window()

Specifies the window that this window should be attached to. If this is NULL or unspecified, the window will be created as a toplevel window on the desktop; if this is non-NULL, the window will be bound as a child window to the indicated parent window.

You should use GraphicsPipe::make_window_handle() to create an instance of a WindowHandle object given an appropriate OS-specific window handle representation. Each OS-specific GraphicsPipe class defines a make_window_handle() method that returns an appropriate WindowHandle object to wrap the particular OS-specific representation.

Specifies the window that this window should be attached to.

This is a deprecated variant on this method, and exists only for backward compatibility. Future code should use the version of set_parent_window() below that receives a WindowHandle object; that interface is much more robust.

In this deprecated variant, the actual value for “parent” is platform- specific. On Windows, it is the HWND of the parent window, cast to an unsigned integer. On X11, it is the Window pointer of the parent window, similarly cast. On OSX, this is the NSWindow pointer, which doesn’t appear to work at all.

WindowProperties.set_raw_mice()

Specifies whether the window should read the raw mouse devices.

WindowProperties.set_size()

Specifies the requested size of the window, in pixels. This is the size of the useful part of the window, not including decorations.

Specifies the requested size of the window, in pixels. This is the size of the useful part of the window, not including decorations.

WindowProperties.set_title()

Specifies the title that should be assigned to the window.

WindowProperties.set_undecorated()

Specifies whether the window should be created with a visible title and border (false, the default) or not (true).

WindowProperties.set_z_order()

Specifies the relative ordering of the window with respect to other windows. If the z_order is Z_top, the window will always be on top of other windows; if it is Z_bottom, it will always be below other windows. Most windows will want to be Z_normal, which allows the user to control the order.

static WindowProperties.size()

Returns a WindowProperties structure with only the size specified. The size is the only property that matters to buffers.

Deprecated: in the Python API, use WindowProperties(size=(x, y)) instead.