JackUtils 0.5
Provides simplified Jack API for clients :)
|
GUI and window creation extension for JackUtils :) All other GUI functions are provided by nuklear API. More...
Functions | |
JG_API jg_ctx_t * | jg_init (const char *title, int w, int h) |
Initializes GUI context. More... | |
JG_API void | jg_uninit (jg_ctx_t *u) |
Destroys GUI context. More... | |
JG_API int | jg_begin (jg_ctx_t *u, int fullscreen) |
Starts GUI objects enumeration. More... | |
JG_API void | jg_end (jg_ctx_t *u, int mul) |
Ends GUI objects enumeration. More... | |
JG_API void | jg_sync_visibility (jg_ctx_t *gui, ju_ctx_t *ctx) |
Synchronize window visibility with Session Manager (if has one, else do nothing). More... | |
JG_API void | jg_request_redraw (jg_ctx_t *u) |
Sends redraw event to internal event pool. More... | |
JG_API void | jg_show_message (jg_ctx_t *u, ju_cstr_t msg) |
Notifies user with message. More... | |
JG_API void | jg_show_about (jg_ctx_t *u) |
Shows about subwindow with information about your program. More... | |
GUI and window creation extension for JackUtils :) All other GUI functions are provided by nuklear API.
:) nuklear
JG_API int jg_begin | ( | jg_ctx_t * | u, |
int | fullscreen | ||
) |
Starts GUI objects enumeration.
You must call jg_end() when you done
You can use OpenG commands here ONLY before drawing any GUI element (for future compability).
u | GUI context |
fullscreen | draw window on fullscreen? (if your program does not draw anything using OpenGL on the background...) |
JG_API void jg_end | ( | jg_ctx_t * | u, |
int | mul | ||
) |
Ends GUI objects enumeration.
It combines GUI verticies and send them to OpenGL. Also pulls GLFW Window events, switches buffers, etc.
u | GUI Context |
mul | For ABI compability! Set always to zero! |
JG_API jg_ctx_t * jg_init | ( | const char * | title, |
int | w, | ||
int | h | ||
) |
Initializes GUI context.
title | window title |
w | default width of the window |
h | default height of the window |
References jg_image_load_from_memory().
JG_API void jg_request_redraw | ( | jg_ctx_t * | u | ) |
Sends redraw event to internal event pool.
Window context redraws only user interacts with windowby default (when any event extst). This may be not enough for you, and in this case you can call this function to make redraw window again at next tick.
u | GUI context |
JG_API void jg_show_about | ( | jg_ctx_t * | u | ) |
Shows about subwindow with information about your program.
u | GUI Context |
JG_API void jg_show_message | ( | jg_ctx_t * | u, |
ju_cstr_t | msg | ||
) |
Notifies user with message.
You need to call it ONCE! If you call it not once, old message will be concated with new. Message will be cleared when user will close it.
u | GUI context |
msg | Message to show. |
JG_API void jg_sync_visibility | ( | jg_ctx_t * | gui, |
ju_ctx_t * | ctx | ||
) |
Synchronize window visibility with Session Manager (if has one, else do nothing).
gui | GUI context |
ctx | JackUtils context |
References ju_need_gui(), and ju_set_gui().
JG_API void jg_uninit | ( | jg_ctx_t * | u | ) |