1DTK_CREATE_WINDOW(3)          Draw Toolkit manual         DTK_CREATE_WINDOW(3)
2
3
4

NAME

6       dtk_create_window, dtk_close - Create and destroy a window
7

SYNOPSIS

9       #include <drawtk.h>
10
11       dtk_hwnd dtk_create_window(unsigned int width, unsigned int height,
12                     unsigned int x, unsigned int y,
13                     unsigned int bpp, const char *caption);
14       void dtk_close(const dtk_hwnd wnd);
15

DESCRIPTION

17       dtk_create_window()  creates a window of size (width,height) to be used
18       later as the target of next drawings. If width or height is zero,  then
19       the  created  window  will  be full screen. Arguments x and y have cur‐
20       rently no effect. bpp specifies the number  of  "bits  per  pixel"  the
21       underlying  OpenGL  framebuffer  should  support. caption specifies the
22       name of the window that the window manager should display.
23
24       The inner frame size for drawings depends on the aspect  ratio  of  the
25       window.   The origin (0,0) of the frame is always the the center of the
26       window. The smallest dimension of the window is equal to 2 in the draw‐
27       ing  coordinates,  so  that  a draw made in the box between (-1,-1) and
28       (1,1) always fits in the window.
29
30       dtk_close() destroys an unused window.
31

RETURN VALUE

33       dtk_create_window() returns an handle to the created window. On  error,
34       this function returns NULL.
35
36       dtk_close() returns no value.
37

LIMITATIONS

39       For  the  moment only one window can be created. Any subsequent call to
40       dtk_create_window() will fail. This is due to the underlying  SDL  ver‐
41       sion used which supports only one window.
42

SEE ALSO

44       dtk_make_current_window(3), dtk_update_screen(3), dtk_process_events(3)
45
46
47
48
49
50EPFL                                 2010                 DTK_CREATE_WINDOW(3)
Impressum