dtk_hwnd dtk_create_window(unsigned int width, unsigned int height,
unsigned int x, unsigned int y,
unsigned int bpp, const char *caption);
void dtk_close(const dtk_hwnd wnd);
dtk_create_window() creates a window of size (width,height) to be used later as the target of next drawings. If width or height is zero, then the created window will be full screen. Arguments x and y have currently no effect. bpp specifies the number of "bits per pixel" the underlying OpenGL framebuffer should support. caption specifies the name of the window that the window manager should display.
The inner frame size for drawings depends on the aspect ratio of the window. The origin (0,0) of the frame is always the the center of the window. The smallest dimension of the window is equal to 2 in the drawing coordinates, so that a draw made in the box between (-1,-1) and (1,1) always fits in the window.
dtk_close() destroys an unused window.
dtk_create_window() returns an handle to the created window. On error, this function returns NULL.
dtk_close() returns no value.
For the moment only one window can be created. Any subsequent call to dtk_create_window() will fail. This is due to the underlying SDL version used which supports only one window.
dtk_make_current_window(3), dtk_update_screen(3), dtk_process_events(3)
dtk_destroy_texture(3), dtk_make_current_window(3), dtk_window_getsize(3).
The man page dtk_close(3) is an alias of dtk_create_window(3).