mav_gfxWindowOpen(3)

NAME
mav_gfxWindowOpen - Open a window.

LEVEL
Maverik Level 3

SYNTAX
void mav_gfxWindowOpen(int id, int x, int y, int w, int h, char *name, char *disp, int wmp, int sb, int qb, int ms, int ab, int stenb, int desta, int *wret, int *hret);

ARGUMENTS

int id
    A unique handle to identify the window in subsequent calls.

int x,
    (x,y) position of window.

int w,
    Width and height of window.

char *name
    Name to place on titlebar.

char *disp
    Name of X display on which to open window.

int wmp
    Requests window manager positioning of window.

int sb
    Requests a single buffered graphics context.

int qb
    Requests a quad buffered graphics context.

int ms
    Requests a multisampled graphics context.

int ab
    Requests an accumulation buffered graphics context.

int stenb
    Requests a stencil buffered graphics context.

int desta
    Requests a destination alpha buffered graphics context.

int *wret,
    Returns the actual width and height of the window opened.

DESCRIPTION
This function asks the window manager on the X display specified by disp to open a window and create an associated graphics context. This window is identified in subsequent mav_gfx* calls by the unique integer id. If disp is set to NULL, then the display defined by the DISPLAY environment variable is used.

Graphics contexts are, by default, double buffered and have the maximum colour and depth bits allowed by the hardware. The parameters sb, qb, ms, ab, stenb and desta (1 = TRUE, 0 = FALSE) control the creation of the graphics context. If a particular configuration is not supported by the hardware an error message is written to the shell window and execution halts. By default, multiple graphical contexts are "shared" with the first context opened (ie. contexts share a common set of display lists, textures etc).

Windows are of X resource class "MaverikApp". This allows the potential, depending on your window manager, for controlling window attributes via the .Xdefaults file. For example, adding the line "4Dwm*MaverikApp*clientDecoration: none" to your .Xdefault would cause Maverik windows to have no decoration on SGI's default window manager 4Dwm.

The window manager may not honour your requested size or position. The actual size of the window is returned in wret and hret. Setting wmp to TRUE lets the window manager place the window.