mlx_new_window.3
1 .TH MiniLibX 3 "September 19, 2002" 2 .SH NAME 3 MiniLibX - Managing windows 4 .SH SYNOPSYS 5 6 .nf 7 .I void * 8 .fi 9 .B mlx_new_window 10 ( 11 .I void *mlx_ptr, int size_x, int size_y, char *title 12 ); 13 14 .nf 15 .I int 16 .fi 17 .B mlx_clear_window 18 ( 19 .I void *mlx_ptr, void *win_ptr 20 ); 21 22 .nf 23 .I int 24 .fi 25 .B mlx_destroy_window 26 ( 27 .I void *mlx_ptr, void *win_ptr 28 ); 29 30 31 .SH DESCRIPTION 32 The 33 .B mlx_new_window 34 () function creates a new window on the screen, using the 35 .I size_x 36 and 37 .I size_y 38 parameters to determine its size, and 39 .I title 40 as the text that should be displayed in the window's title bar. 41 The 42 .I mlx_ptr 43 parameter is the connection identifier returned by 44 .B mlx_init 45 () (see the 46 .B mlx 47 man page). 48 .B mlx_new_window 49 () returns a 50 .I void * 51 window identifier that can be used by other MiniLibX calls. 52 Note that the MiniLibX 53 can handle an arbitrary number of separate windows. 54 55 .B mlx_clear_window 56 () and 57 .B mlx_destroy_window 58 () respectively clear (in black) and destroy the given window. They both have 59 the same parameters: 60 .I mlx_ptr 61 is the screen connection identifier, and 62 .I win_ptr 63 is a window identifier. 64 65 .SH RETURN VALUES 66 If 67 .B mlx_new_window() 68 fails to create a new window (for wathever reason), it will return NULL, 69 otherwise a non-null pointer is returned as a window identifier. 70 .B mlx_clear_window 71 and 72 .B mlx_destroy_window 73 right now return nothing. 74 75 .SH SEE ALSO 76 mlx(3), mlx_pixel_put(3), mlx_new_image(3), mlx_loop(3) 77 78 .SH AUTHOR 79 Copyright ol@ - 2002-2019 - Olivier Crouzet