diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-11-15 15:18:38 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-11-15 15:18:38 +0100 |
| commit | a4fd7a681376899526cfe38c0449f90feb0f582e (patch) | |
| tree | 1cf4a074b36903a025652a6ef1ae55e280b6418c /miniLibX_man/man3/mlx.1 | |
| parent | 9e1f4605408821b74c9e74216fbf995d29a3921c (diff) | |
| download | cub3d-a4fd7a681376899526cfe38c0449f90feb0f582e.tar.gz cub3d-a4fd7a681376899526cfe38c0449f90feb0f582e.tar.bz2 cub3d-a4fd7a681376899526cfe38c0449f90feb0f582e.zip | |
Added miniLibX man pages
Diffstat (limited to 'miniLibX_man/man3/mlx.1')
| -rw-r--r-- | miniLibX_man/man3/mlx.1 | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/miniLibX_man/man3/mlx.1 b/miniLibX_man/man3/mlx.1 new file mode 100644 index 0000000..cfdac3d --- /dev/null +++ b/miniLibX_man/man3/mlx.1 @@ -0,0 +1,115 @@ +.TH MiniLibX 3 "September 19, 2002" +.SH NAME +MiniLibX - Simple Graphical Interface Library for students +.SH SYNOPSYS +#include <mlx.h> + +.nf +.I void * +.fi +.B mlx_init +(); + +.SH DESCRIPTION +MiniLibX is an easy way to create graphical software, +without any X-Window/Cocoa programming knowledge. It provides +simple window creation, a drawing tool, image and basic events +management. + +.SH BSD/LINUX X-WINDOW CONCEPT + +X-Window is a network-oriented graphical system for Unix. +It is based on two main parts: +.br +On one side, your software wants to draw something on the screen and/or +get keyboard & mouse entries. +.br +On the other side, the X-Server manages the screen, keyboard and mouse +(It is often refered to as a "display"). +.br +A network connection must be established between these two entities to send +drawing orders (from the software to the X-Server), and keyboard/mouse +events (from the X-Server to the software). + +.SH MACOSX CONCEPT + +The MacOSX operating system handle graphical access to the screen (or "display"). +.br +On one side, your software wants to draw something on the screen and/or +get keyboard & mouse entries. +.br +On the other side, the underlying MacOSX graphical framework that handles +the screen, the windowing system, keyboard and mouse. +.br +A connection between these two entities must be established. + +.SH INCLUDE FILE +.B mlx.h +should be included for a correct use of the MiniLibX API. +It only contains function prototypes, no structure is needed. + +.SH LIBRARY FUNCTIONS +.P +First of all, you need to initialize the connection +between your software and the display. +Once this connection is established, you'll be able to +use other MiniLibX functions to send the graphical orders, +like "I want to draw a yellow pixel in this window" or "did the +user hit a key?". +.P +The +.B mlx_init +function will create this connection. No parameters are needed, ant it will +return a +.I "void *" +identifier, used for further calls to the library routines. +.P +All other MiniLibX functions are described in the following man pages: + +.TP 20 +.B mlx_new_window +: manage windows +.TP 20 +.B mlx_pixel_put +: draw inside window +.TP 20 +.B mlx_new_image +: manipulate images +.TP 20 +.B mlx_loop +: handle keyboard or mouse events + +.SH LINKING MiniLibX on BSD/Linux and X-Window +To use MiniLibX functions, you'll need to link +your software with several libraries, including the MiniLibX library itself. +To do this, simply add the following arguments at linking time: + +.B -lmlx -lXext -lX11 + +You may also need to specify the path to these libraries, using +the +.B -L +flag. + +.SH LINKING MiniLibX on MACOSX +To use MiniLibX functions, you'll need to link your software with the +MiniLibX library, and several system frameworks: + +.B -lmlx -framework OpenGL -framework AppKit + +You may also need to specify the path to the MiniLibX library, using +the +.B -L +flag. + +.SH RETURN VALUES +If +.B mlx_init() +fails to set up the connection to the graphical system, it will return NULL, otherwise +a non-null pointer is returned as a connection identifier. + +.SH SEE ALSO +mlx_new_window(3), mlx_pixel_put(3), mlx_new_image(3), mlx_loop(3) + +.SH AUTHOR +Copyright ol@ - 2002-2015 - Olivier Crouzet |
