Nuklear+
 All Classes Files Functions Enumerations Enumerator Macros Groups Pages
Classes | Macros | Enumerations | Functions
nuklear_cross.h File Reference

Nuklear+ (read as "Nuklear cross") is a front-end overlay for Nuklear GUI library. More...

#include "nuklear.h"
#include <stdio.h>
#include <string.h>
#include "nkc_frontend/nkc_sdl.h"
#include "nkc_frontend/helpers/nkc_file.h"

Go to the source code of this file.

Classes

struct  nkc_window_event
 
struct  nkc_key_event
 
union  nkc_event
 

Macros

#define NKC_SDL   1
 
#define NKC_GLFW   2
 
#define NKC_XLIB   3
 
#define NKC_GDIP   4
 
#define NGL_ES2   20
 
#define NK_INCLUDE_FIXED_TYPES
 
#define NK_INCLUDE_DEFAULT_ALLOCATOR
 
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
 
#define NK_INCLUDE_FONT_BAKING
 
#define NK_INCLUDE_STANDARD_IO
 
#define NK_INCLUDE_DEFAULT_FONT
 
#define NKC_INITED
 
#define MAX_VERTEX_MEMORY
 
#define MAX_ELEMENT_MEMORY
 
#define NKC_OPENGL_VERSION   2
 

Enumerations

enum  nkc_window_mode {
  NKC_WIN_NORMAL = 'w', NKC_WIN_MAXIMIZED = 'm', NKC_WIN_FIXED = 'x', NKC_WIN_FULLSCREEN = 'f',
  NKC_WIN_FULLSCREEN_DESKTOP = 'd'
}
 Window mode constants, passed to initialization. More...
 
enum  nkc_event_type { NKC_ENONE, NKC_EWINDOW, NKC_EKEY, NKC_EQUIT }
 

Functions

NK_API void * nkc_rdie (const char *fmt,...)
 Fatal error. Application exit. Die with message. Printf-like. More...
 
NK_API struct nk_context * nkc_init (struct nkc *nkcHandle, const char *title, int width, int height, enum nkc_window_mode windowMode)
 Initialize the library, create the operation system window. More...
 
NK_API union nkc_event nkc_poll_events (struct nkc *nkcHandle)
 Poll window's events in a loop. More...
 
NK_API struct nk_context * nkc_get_ctx (struct nkc *nkcHandle)
 
NK_API void nkc_shutdown (struct nkc *nkcHandle)
 Finalizing.
 
NK_API void nkc_render_bg (struct nkc *nkcHandle, struct nk_color bgColor)
 
NK_API void nkc_render_gui (struct nkc *nkcHandle)
 
NK_API void nkc_render (struct nkc *nkcHandle, struct nk_color bgColor)
 
NK_API void nkc_style_set_font (struct nkc *nkcHandle, const struct nk_user_font *font)
 
NK_API struct nk_user_font * nkc_load_font_file (struct nkc *nkcHandle, const char *filename, float size, const nk_rune *symbolsRange)
 Load font from TTF-file from disk. More...
 
NK_API struct nk_user_font * nkc_load_font_memory (struct nkc *nkcHandle, const void *membuf, int membufSize, float size, const nk_rune *symbolsRange)
 
NK_API char nkc_get_key_char (int code)
 Converts keyboard code to it's latin character (if have) More...
 
NK_API struct nk_image nkc_load_image_file (struct nkc *nkcHandle, const char *filename)
 
NK_API struct nk_image nkc_load_image_memory (struct nkc *nkcHandle, const void *membuf, int membufSize)
 
NK_API void nkc_image_free (struct nk_image *img)
 
NK_API int nkc_get_desktop_size (struct nkc *nkcHandle, int *width, int *height)
 Gets the desktop size in pixels. In browsers - draw area. More...
 
NK_API void nkc_set_main_loop (struct nkc *nkcHandle, void(*mainLoopFunc)(void *loopArg), void *loopArg)
 Starts the 'infinite' main loop. Required for Emscipten only. More...
 
NK_API void nkc_stop_main_loop (struct nkc *nkcHandle)
 
int nkc_file_exists (const char *filename)
 
size_t nkc_file_size (const char *filename)
 
size_t nkc_stdfile_size (FILE *f)
 Returns file size in bytes. More...
 
void nkc_mount_write (const char *folder)
 Mounts local storage folder for writing. Useful for Emscripten only. More...
 
void nkc_file_pre_read ()
 
void nkc_file_post_write ()
 

Detailed Description

Nuklear+ (read as "Nuklear cross") is a front-end overlay for Nuklear GUI library.

Version
0.70
Author
Dmitry Hrabrov a.k.a. DeXPeriX
Date
2016-2017

Macro Definition Documentation

#define MAX_ELEMENT_MEMORY

Internal used constant, OpenGL render

#define MAX_VERTEX_MEMORY

Internal used constant, OpenGL render

#define NKC_INITED

Internal used constant

Enumeration Type Documentation

Enumerator
NKC_ENONE 

No event

NKC_EWINDOW 

Window event

NKC_EKEY 

Keyboard events

NKC_EQUIT 

Quit from app event

Window mode constants, passed to initialization.

Enumerator
NKC_WIN_NORMAL 

normal window mode, user can resize/maximize

NKC_WIN_MAXIMIZED 

like normal, but starts maximized

NKC_WIN_FIXED 

fixed size mode. User can't resize/maximize

NKC_WIN_FULLSCREEN 

real fullscreen. In almost all frontends changes the screen's resolution

NKC_WIN_FULLSCREEN_DESKTOP 

"virtual" fullscreen. Removes windows decorations, expands window to full size, changes window size