Full Code of vurtun/nuklear for AI

master 6b9f937475db cached
134 files
3.1 MB
808.2k tokens
5013 symbols
1 requests
Download .txt
Showing preview only (3,230K chars total). Download the full file or copy to clipboard to get everything.
Repository: vurtun/nuklear
Branch: master
Commit: 6b9f937475db
Files: 134
Total size: 3.1 MB

Directory structure:
gitextract_hks9o4hv/

├── .gitattributes
├── .gitignore
├── .gitmodules
├── .travis.yml
├── Readme.md
├── demo/
│   ├── allegro5/
│   │   ├── KeyboardHandleriOS.h
│   │   ├── KeyboardHandleriOS.m
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.c
│   │   └── nuklear_allegro5.h
│   ├── calculator.c
│   ├── d3d11/
│   │   ├── build.bat
│   │   ├── main.c
│   │   ├── nuklear_d3d11.h
│   │   ├── nuklear_d3d11.hlsl
│   │   ├── nuklear_d3d11_pixel_shader.h
│   │   └── nuklear_d3d11_vertex_shader.h
│   ├── d3d9/
│   │   ├── build.bat
│   │   ├── main.c
│   │   └── nuklear_d3d9.h
│   ├── gdi/
│   │   ├── build.bat
│   │   ├── main.c
│   │   └── nuklear_gdi.h
│   ├── gdip/
│   │   ├── build.bat
│   │   ├── main.c
│   │   └── nuklear_gdip.h
│   ├── glfw_opengl2/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_glfw_gl2.h
│   ├── glfw_opengl3/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_glfw_gl3.h
│   ├── glfw_opengl4/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_glfw_gl4.h
│   ├── node_editor.c
│   ├── overview.c
│   ├── sdl_opengl2/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_sdl_gl2.h
│   ├── sdl_opengl3/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_sdl_gl3.h
│   ├── sdl_opengles2/
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.c
│   │   └── nuklear_sdl_gles2.h
│   ├── sfml_opengl2/
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.cpp
│   │   └── nuklear_sfml_gl2.h
│   ├── sfml_opengl3/
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.cpp
│   │   └── nuklear_sfml_gl3.h
│   ├── style.c
│   ├── x11/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_xlib.h
│   ├── x11_opengl2/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_xlib_gl2.h
│   ├── x11_opengl3/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_xlib_gl3.h
│   ├── x11_rawfb/
│   │   ├── Makefile
│   │   ├── main.c
│   │   ├── nuklear_rawfb.h
│   │   └── nuklear_xlib.h
│   └── x11_xft/
│       ├── Makefile
│       ├── main.c
│       └── nuklear_xlib.h
├── doc/
│   ├── Makefile
│   ├── build.sh
│   ├── nuklear.html
│   └── stddoc.c
├── example/
│   ├── Makefile
│   ├── canvas.c
│   ├── extended.c
│   ├── file_browser.c
│   ├── skinning.c
│   └── stb_image.h
├── nuklear.h
├── package.json
└── src/
    ├── CHANGELOG
    ├── CREDITS
    ├── HEADER
    ├── LICENSE
    ├── Readme.md
    ├── build.py
    ├── nuklear.h
    ├── nuklear_buffer.c
    ├── nuklear_button.c
    ├── nuklear_chart.c
    ├── nuklear_color.c
    ├── nuklear_color_picker.c
    ├── nuklear_combo.c
    ├── nuklear_context.c
    ├── nuklear_contextual.c
    ├── nuklear_draw.c
    ├── nuklear_edit.c
    ├── nuklear_font.c
    ├── nuklear_group.c
    ├── nuklear_image.c
    ├── nuklear_input.c
    ├── nuklear_internal.h
    ├── nuklear_layout.c
    ├── nuklear_list_view.c
    ├── nuklear_math.c
    ├── nuklear_menu.c
    ├── nuklear_page_element.c
    ├── nuklear_panel.c
    ├── nuklear_pool.c
    ├── nuklear_popup.c
    ├── nuklear_progress.c
    ├── nuklear_property.c
    ├── nuklear_scrollbar.c
    ├── nuklear_selectable.c
    ├── nuklear_slider.c
    ├── nuklear_string.c
    ├── nuklear_style.c
    ├── nuklear_table.c
    ├── nuklear_text.c
    ├── nuklear_text_editor.c
    ├── nuklear_toggle.c
    ├── nuklear_tooltip.c
    ├── nuklear_tree.c
    ├── nuklear_utf8.c
    ├── nuklear_util.c
    ├── nuklear_vertex.c
    ├── nuklear_widget.c
    ├── nuklear_window.c
    └── paq.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Github language settings
*.h linguist-language=c
*.c linguist-language=c


================================================
FILE: .gitignore
================================================
demo/*/*.exe
demo/*/*.obj
demo/*/bin/*
example/bin/*
docs/xml
docs/build
docs/src
*.tmp


================================================
FILE: .gitmodules
================================================


================================================
FILE: .travis.yml
================================================
language: c
sudo: required
dist: xenial

os:
  - linux

compiler:
  - gcc
  - clang

before_install:
  - if [ $TRAVIS_OS_NAME == linux ]; then 
      sudo apt-get update -qq;
      sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libglew-dev;
    fi

script:
  - make -C demo/glfw_opengl2
  - make -C demo/glfw_opengl3
  - make -C example


================================================
FILE: Readme.md
================================================
# Nuklear

## ALL DEVELOPMENT MOVED ELSEWHERE

Dear visitor,

this repository, issue tracker, etc. is abandoned in favor of https://github.com/Immediate-Mode-UI/Nuklear . Any activity in this issue tracker, any pull requests, etc. will be ignored.

Looking forward to hearing from you in https://github.com/Immediate-Mode-UI/Nuklear

*Nuklear community*

[![Build Status](https://travis-ci.org/vurtun/nuklear.svg)](https://travis-ci.org/vurtun/nuklear)

This is a minimal state immediate mode graphical user interface toolkit
written in ANSI C and licensed under public domain. It was designed as a simple
embeddable user interface for application and does not have any dependencies,
a default render backend or OS window and input handling but instead provides a very modular
library approach by using simple input state for input and draw
commands describing primitive shapes as output. So instead of providing a
layered library that tries to abstract over a number of platform and
render backends it only focuses on the actual UI.

## Features

- Immediate mode graphical user interface toolkit
- Single header library
- Written in C89 (ANSI C)
- Small codebase (~18kLOC)
- Focus on portability, efficiency and simplicity
- No dependencies (not even the standard library if not wanted)
- Fully skinnable and customizable
- Low memory footprint with total memory control if needed or wanted
- UTF-8 support
- No global or hidden state
- Customizable library modules (you can compile and use only what you need)
- Optional font baker and vertex buffer output
- [Documentation](https://cdn.statically.io/gh/vurtun/nuklear/master/doc/nuklear.html)

## Building

This library is self contained in one single header file and can be used either
in header only mode or in implementation mode. The header only mode is used
by default when included and allows including this header in other headers
and does not contain the actual implementation.

The implementation mode requires to define  the preprocessor macro
`NK_IMPLEMENTATION` in *one* .c/.cpp file before `#include`ing this file, e.g.:
```c
#define NK_IMPLEMENTATION
#include "nuklear.h"
```
IMPORTANT: Every time you include "nuklear.h" you have to define the same optional flags.
This is very important not doing it either leads to compiler errors or even worse stack corruptions.

## Gallery

![screenshot](https://cloud.githubusercontent.com/assets/8057201/11761525/ae06f0ca-a0c6-11e5-819d-5610b25f6ef4.gif)
![screen](https://cloud.githubusercontent.com/assets/8057201/13538240/acd96876-e249-11e5-9547-5ac0b19667a0.png)
![screen2](https://cloud.githubusercontent.com/assets/8057201/13538243/b04acd4c-e249-11e5-8fd2-ad7744a5b446.png)
![node](https://cloud.githubusercontent.com/assets/8057201/9976995/e81ac04a-5ef7-11e5-872b-acd54fbeee03.gif)
![skinning](https://cloud.githubusercontent.com/assets/8057201/15991632/76494854-30b8-11e6-9555-a69840d0d50b.png)
![gamepad](https://cloud.githubusercontent.com/assets/8057201/14902576/339926a8-0d9c-11e6-9fee-a8b73af04473.png)

## Example

```c
/* init gui state */
struct nk_context ctx;
nk_init_fixed(&ctx, calloc(1, MAX_MEMORY), MAX_MEMORY, &font);

enum {EASY, HARD};
static int op = EASY;
static float value = 0.6f;
static int i =  20;

if (nk_begin(&ctx, "Show", nk_rect(50, 50, 220, 220),
    NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_CLOSABLE)) {
    /* fixed widget pixel width */
    nk_layout_row_static(&ctx, 30, 80, 1);
    if (nk_button_label(&ctx, "button")) {
        /* event handling */
    }

    /* fixed widget window ratio width */
    nk_layout_row_dynamic(&ctx, 30, 2);
    if (nk_option_label(&ctx, "easy", op == EASY)) op = EASY;
    if (nk_option_label(&ctx, "hard", op == HARD)) op = HARD;

    /* custom widget pixel width */
    nk_layout_row_begin(&ctx, NK_STATIC, 30, 2);
    {
        nk_layout_row_push(&ctx, 50);
        nk_label(&ctx, "Volume:", NK_TEXT_LEFT);
        nk_layout_row_push(&ctx, 110);
        nk_slider_float(&ctx, 0, &value, 1.0f, 0.1f);
    }
    nk_layout_row_end(&ctx);
}
nk_end(&ctx);
```
![example](https://cloud.githubusercontent.com/assets/8057201/10187981/584ecd68-675c-11e5-897c-822ef534a876.png)

## Bindings
There are a number of nuklear bindings for different languges created by other authors.
I cannot atest for their quality since I am not necessarily proficient in either of these
languages. Furthermore there are no guarantee that all bindings will always be kept up to date:

- [Java](https://github.com/glegris/nuklear4j) by Guillaume Legris
- [D](https://github.com/Timu5/bindbc-nuklear) by Mateusz Muszyński
- [Golang](https://github.com/golang-ui/nuklear) by golang-ui@github.com
- [Rust](https://github.com/snuk182/nuklear-rust) by snuk182@github.com
- [Chicken](https://github.com/wasamasa/nuklear) by wasamasa@github.com
- [Nim](https://github.com/zacharycarter/nuklear-nim) by zacharycarter@github.com
- Lua
  - [LÖVE-Nuklear](https://github.com/keharriso/love-nuklear) by Kevin Harrison
  - [MoonNuklear](https://github.com/stetre/moonnuklear) by Stefano Trettel
- Python
  - [pyNuklear](https://github.com/billsix/pyNuklear) by William Emerison Six (ctypes-based wrapper)
  - [pynk](https://github.com/nathanrw/nuklear-cffi) by nathanrw@github.com (cffi binding)
- [CSharp/.NET](https://github.com/cartman300/NuklearDotNet) by cartman300@github.com

## Credits
Developed by Micha Mettke and every direct or indirect contributor to the GitHub.


Embeds `stb_texedit`, `stb_truetype` and `stb_rectpack` by Sean Barrett (public domain)
Embeds `ProggyClean.ttf` font by Tristan Grimmer (MIT license).


Big thank you to Omar Cornut (ocornut@github) for his [imgui](https://github.com/ocornut/imgui) library and
giving me the inspiration for this library, Casey Muratori for handmade hero
and his original immediate mode graphical user interface idea and Sean
Barrett for his amazing single header [libraries](https://github.com/nothings/stb) which restored my faith
in libraries and brought me to create some of my own. Finally Apoorva Joshi for his singe-header [file packer](http://apoorvaj.io/single-header-packer.html).

## License
```
------------------------------------------------------------------------------
This software is available under 2 licenses -- choose whichever you prefer.
------------------------------------------------------------------------------
ALTERNATIVE A - MIT License
Copyright (c) 2017 Micha Mettke
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------
ALTERNATIVE B - Public Domain (www.unlicense.org)
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----------------------------------------------------------------------------
```


================================================
FILE: demo/allegro5/KeyboardHandleriOS.h
================================================
#import <UIKit/UIKit.h>

#include <allegro5/allegro.h>

@interface KeyboardHandleriOS : UIView <UIKeyInput>
-(void)setCustomKeyboardEventSource:(ALLEGRO_EVENT_SOURCE*)ev_src;
-(void)show;
-(void)hide;
@end



================================================
FILE: demo/allegro5/KeyboardHandleriOS.m
================================================
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "KeyboardHandleriOS.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_iphone_objc.h>
@interface KeyboardHandleriOS()
{
    ALLEGRO_EVENT_SOURCE *event_source;
    ALLEGRO_DISPLAY *current_display;
}
@end
@implementation KeyboardHandleriOS
- (id)init {
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil];
    self = [self initWithFrame:CGRectMake(-100, -100, 0, 0)];
    event_source = NULL;
    current_display = al_get_current_display();
    UIView* v = al_iphone_get_view(current_display);
    [v addSubview:self];
    return self;
}

- (void)setCustomKeyboardEventSource:(ALLEGRO_EVENT_SOURCE *)ev_src {
    event_source = ev_src;
}

- (UIKeyboardType) keyboardType
{
    return UIKeyboardTypeASCIICapable;
}

- (UITextAutocorrectionType) autocorrectionType
{
    return UITextAutocorrectionTypeNo;
}

-(BOOL)canBecomeFirstResponder {
    return YES;
}

- (void)deleteBackward {
    
    if (!event_source) {
        NSLog(@"deleteBackward(): No event source found, not sending events");
        return;
    }
    
    ALLEGRO_EVENT *event_down = (ALLEGRO_EVENT*)calloc(1, sizeof(ALLEGRO_EVENT));
    ALLEGRO_EVENT *event_up = (ALLEGRO_EVENT*)calloc(1, sizeof(ALLEGRO_EVENT));
    
    event_down->type = ALLEGRO_EVENT_KEY_DOWN;
    event_down->keyboard.display = current_display;
    event_down->keyboard.keycode = ALLEGRO_KEY_BACKSPACE;
    event_up->type = ALLEGRO_EVENT_KEY_UP;
    event_up->keyboard.display = current_display;
    event_up->keyboard.keycode = ALLEGRO_KEY_BACKSPACE;
    al_emit_user_event(event_source, event_down, NULL);
    al_emit_user_event(event_source, event_up, NULL);
    
    free(event_down);
    free(event_up);
}

- (BOOL)hasText {
    return YES;
}

- (void)insertText:(NSString *)text
{
    if (!event_source) {
        NSLog(@"insertText(): No event source found, not sending events");
        return;
    }
    
    ALLEGRO_EVENT *event_down = (ALLEGRO_EVENT*)calloc(1, sizeof(ALLEGRO_EVENT));
    ALLEGRO_EVENT *event_up = (ALLEGRO_EVENT*)calloc(1, sizeof(ALLEGRO_EVENT));
    
    if([text isEqualToString:@"\n"])
    {
        event_down->type = ALLEGRO_EVENT_KEY_DOWN;
        event_down->keyboard.display = current_display;
        event_down->keyboard.keycode = ALLEGRO_KEY_ENTER;
        event_up->type = ALLEGRO_EVENT_KEY_UP;
        event_up->keyboard.display = current_display;
        event_up->keyboard.keycode = ALLEGRO_KEY_ENTER;
        al_emit_user_event(event_source, event_down, NULL);
        al_emit_user_event(event_source, event_up, NULL);
        [self hide];
        //m_kb->setDonePressed();
    }
    else {
        event_down->type = ALLEGRO_EVENT_KEY_CHAR;
        event_down->keyboard.display = current_display;
        event_down->keyboard.unichar = [text characterAtIndex:0];
        // doesn't matter what keycode is, nuklear backend ignores it as long as it
        // isn't a special key
        event_down->keyboard.keycode = ALLEGRO_KEY_A;
        al_emit_user_event(event_source, event_down, NULL);
    }
    free(event_down);
    free(event_up);
}

-(void)show {
    NSLog(@"Should be showing!");
 [self performSelectorOnMainThread:@selector(becomeFirstResponder) withObject:nil waitUntilDone:YES];
}
-(void)hide {
    NSLog(@"Should be hiding!");
    [self performSelectorOnMainThread:@selector(resignFirstResponder) withObject:nil waitUntilDone:YES];
}
- (void)keyboardDidHide:(NSNotification *)notification {
    NSLog(@"keyboardDidHide called");
}

-(void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardDidHideNotification object:nil];
}
@end


================================================
FILE: demo/allegro5/Makefile
================================================
# Install
BIN = demo

# Flags
CFLAGS += -std=c99 -pedantic -O2

SRC = main.c
OBJ = $(SRC:.c=.o)

# TODO: Handle Windows build
#ifeq ($(OS),Windows_NT)
#BIN := $(BIN).exe
#LIBS = -lglfw3 -lopengl32 -lm -lGLU32 -lGLEW32
#else
LIBS = -lallegro -lallegro_main -lallegro_image -lallegro_font \
	-lallegro_ttf -lallegro_primitives -lm
#endif

$(BIN):
	@mkdir -p bin
	rm -f bin/$(BIN) $(OBJS)
	$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) $(LIBS)


================================================
FILE: demo/allegro5/Readme.md
================================================
# Allegro v5 nuklear backend

This backend provides support for [Allegro version 5](http://liballeg.org/). It works on on all supported platforms with an OpenGL backend, including iOS and Android.

Touch support is provided by handling the first touch (ignoring any extra simultaneous touches) and emitting nuklear mouse events. nuklear will handle only the first touch like a single left-mouse click. Dragging the touch screen emits mouse-move events.

## Compiling
You must link with image, font, ttf, and primitives Allegro addons. See the `Makefile`.

## Resolutions

Like every nuklear backend, handling many different resolutions and resolution densities can be tricky. 14px font on a desktop may be perfect, but extremely small on a retina iPad. I recommend writing a middleware that will detect what kind of screen is being used, and modify the sizes of widgets accordingly.

## Soft Keyboard for Touch Screen Devices

Information on how to implement soft keyboard callbacks for Android can be on the Allegro community wiki: https://wiki.allegro.cc/index.php?title=Running_Allegro_applications_on_Android#Displaying_the_Android_keyboard

To display a soft keyboard on iOS, you must create a `UIView` subclass that implements the `UIKeyInput` interface. See `KeyboardHandleriOS.h` and `KeyboardHandleriOS.m` Objective-C source code files for an example on how to do this. As the Allegro keyboard driver does not currently listen for iOS events, we use a custom event emitter to emit keyboard events, which is passed in after initialization with `(void)setCustomKeyboardEventSource:(ALLEGRO_EVENT_SOURCE *)ev_src`. This causes normal keyboard events to be emitted and properly caught by the nuklear backend. The provided `main.c` demo file does not implement this, but with the provided source code files it is not difficult to do. See this Allegro community forum thread for more information: https://www.allegro.cc/forums/thread/616672

To know when nuklear wants to open and close the keyboard, you can check edit widget flags:

```
nk_flags ed_flags = nk_edit_string(ctx, NK_EDIT_FIELD, field_buffer, &field_len, 64, nk_filter_default);
if (ed_flags & NK_EDIT_ACTIVATED)
    open_ios_soft_keyboard();
if (ed_flags &  NK_EDIT_DEACTIVATED)
    close_ios_soft_keyboard();
```

### Manual Soft Keyboard Dismissal
As the user can dismiss a keyboard manually, nuklear will not be aware when this occurs, and the text edit cursor will think the entry field is still active. I recommend catching the dismiss event, then emitting `ALLEGRO_EVENT_TOUCH_BEGIN` and `ALLEGRO_EVENT_TOUCH_END` events in an unused portion of the screen (like the bottom-right corner). This will simulate the user touching outside of the text entry widget, which will make the edit field inactive.

### The Keyboard Covers Widgets

If you have a widget near the bottom of the screen, the keyboard opening woll cover it, and the user won't see what they are entering. One way to handle this is to make all text edit widgets view-only, and when tapped you dynamically create a new widget above the keyboard that receives all the key strokes. When the user dismisses the keyboard, copy the result from the new widget into the existing read-only text view and destroy the dynamic one.

================================================
FILE: demo/allegro5/main.c
================================================
/* nuklear - 1.32.0 - public domain */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <limits.h>
#include <time.h>

#include <allegro5/allegro.h>

#define WINDOW_WIDTH 1200
#define WINDOW_HEIGHT 800

#define NK_INCLUDE_FIXED_TYPES
#define NK_INCLUDE_STANDARD_IO
#define NK_INCLUDE_STANDARD_VARARGS
#define NK_INCLUDE_DEFAULT_ALLOCATOR
#define NK_IMPLEMENTATION
#define NK_ALLEGRO5_IMPLEMENTATION
#include "../../nuklear.h"
#include "nuklear_allegro5.h"


#define UNUSED(a) (void)a
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) < (b) ? (b) : (a))
#define LEN(a) (sizeof(a)/sizeof(a)[0])

/* ===============================================================
 *
 *                          EXAMPLE
 *
 * ===============================================================*/
/* This are some code examples to provide a small overview of what can be
 * done with this library. To try out an example uncomment the include
 * and the corresponding function. */
/*#include "../style.c"*/
/*#include "../calculator.c"*/
#include "../overview.c"
/*#include "../node_editor.c"*/

/* ===============================================================
 *
 *                          DEMO
 *
 * ===============================================================*/
static void error_callback(int e, const char *d)
{printf("Error %d: %s\n", e, d);}

int main(void)
{
    /* Platform */
    ALLEGRO_DISPLAY *display = NULL;
    ALLEGRO_EVENT_QUEUE *event_queue = NULL;

    if (!al_init()) {
        fprintf(stdout, "failed to initialize allegro5!\n");
        exit(1);
    }

    al_install_mouse();
    al_set_mouse_wheel_precision(150);
    al_install_keyboard();

    al_set_new_display_flags(ALLEGRO_WINDOWED|ALLEGRO_RESIZABLE|ALLEGRO_OPENGL);
    al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_SUGGEST);
    al_set_new_display_option(ALLEGRO_SAMPLES, 8, ALLEGRO_SUGGEST);
    display = al_create_display(WINDOW_WIDTH, WINDOW_HEIGHT);
    if (!display) {
        fprintf(stdout, "failed to create display!\n");
        exit(1);
    }

    event_queue = al_create_event_queue();
    if (!event_queue) {
        fprintf(stdout, "failed to create event_queue!\n");
        al_destroy_display(display);
        exit(1);
    }

    al_register_event_source(event_queue, al_get_display_event_source(display));
    al_register_event_source(event_queue, al_get_mouse_event_source());
    al_register_event_source(event_queue, al_get_keyboard_event_source());

    NkAllegro5Font *font;
    font = nk_allegro5_font_create_from_file("../../../extra_font/Roboto-Regular.ttf", 12, 0);
    struct nk_context *ctx;

    ctx = nk_allegro5_init(font, display, WINDOW_WIDTH, WINDOW_HEIGHT);

    /* style.c */
    /*set_style(ctx, THEME_WHITE);*/
    /*set_style(ctx, THEME_RED);*/
    /*set_style(ctx, THEME_BLUE);*/
    /*set_style(ctx, THEME_DARK);*/

    while(1)
    {
        ALLEGRO_EVENT ev;
        ALLEGRO_TIMEOUT timeout;
        al_init_timeout(&timeout, 0.06);

        bool get_event = al_wait_for_event_until(event_queue, &ev, &timeout);

        if (get_event && ev.type == ALLEGRO_EVENT_DISPLAY_CLOSE) {
            break;
        }

        /* Very Important: Always do nk_input_begin / nk_input_end even if
           there are no events, otherwise internal nuklear state gets messed up */
        nk_input_begin(ctx);
        if (get_event) {
            while (get_event) {
                nk_allegro5_handle_event(&ev);
                get_event = al_get_next_event(event_queue, &ev);
            }
        }
        nk_input_end(ctx);

        /* GUI */
        if (nk_begin(ctx, "Demo", nk_rect(50, 50, 200, 200),
            NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
            NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE))
        {
            enum {EASY, HARD};
            static int op = EASY;
            static int property = 20;

            nk_layout_row_static(ctx, 30, 80, 1);
            if (nk_button_label(ctx, "button"))
                fprintf(stdout, "button pressed\n");
            nk_layout_row_dynamic(ctx, 30, 2);
            if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
            if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
            nk_layout_row_dynamic(ctx, 22, 1);
            nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
        }
        nk_end(ctx);

        /* -------------- EXAMPLES ---------------- */
        /*calculator(ctx);*/
        overview(ctx);
        /*node_editor(ctx);*/
        /* ----------------------------------------- */

        /* Draw */
        al_clear_to_color(al_map_rgb(19, 43, 81));
        /* IMPORTANT: `nk_allegro5_render` changes the target backbuffer
        to the display set at initialization and does not restore it.
        Change it if you want to draw somewhere else. */
        nk_allegro5_render();
        al_flip_display();
    }

    nk_allegro5_font_del(font);
    nk_allegro5_shutdown();
    al_destroy_display(display);
    al_destroy_event_queue(event_queue);
    return 0;
}



================================================
FILE: demo/allegro5/nuklear_allegro5.h
================================================
/*
 * Nuklear - 1.32.0 - public domain
 * no warrenty implied; use at your own risk.
 * authored from 2015-2016 by Micha Mettke
 */
/*
 * ==============================================================
 *
 *                              API
 *
 * ===============================================================
 */
#ifndef NK_ALLEGRO5_H_
#define NK_ALLEGRO5_H_

#include <string.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>

typedef struct NkAllegro5Font NkAllegro5Font;
NK_API struct nk_context*     nk_allegro5_init(NkAllegro5Font *font, ALLEGRO_DISPLAY *dsp,
                                  unsigned int width, unsigned int height);
NK_API void                   nk_allegro5_handle_event(ALLEGRO_EVENT *ev);
NK_API void                   nk_allegro5_shutdown(void);
NK_API void                   nk_allegro5_render(void);

/* Fonts. We wrap normal allegro fonts in some nuklear book keeping */
NK_API NkAllegro5Font*        nk_allegro5_font_create_from_file(const char *file_name, int font_size, int flags);
NK_API void                   nk_allegro5_font_del(NkAllegro5Font *font);
NK_API void                   nk_allegro5_font_set_font(NkAllegro5Font *font);

#endif
/*
 * ==============================================================
 *
 *                          IMPLEMENTATION
 *
 * ===============================================================
 */
#ifdef NK_ALLEGRO5_IMPLEMENTATION

#ifndef NK_ALLEGRO5_TEXT_MAX
#define NK_ALLEGRO5_TEXT_MAX 256
#endif


struct NkAllegro5Font {
    struct nk_user_font nk;
    int height;
    ALLEGRO_FONT *font;
};

static struct nk_allegro5 {
    ALLEGRO_DISPLAY *dsp;
    unsigned int width;
    unsigned int height;
    int is_touch_down;
    int touch_down_id;
    struct nk_context ctx;
    struct nk_buffer cmds;
} allegro5;


/* Flags are identical to al_load_font() flags argument */
NK_API NkAllegro5Font*
nk_allegro5_font_create_from_file(const char *file_name, int font_size, int flags)
{
    if (!al_init_image_addon()) {
        fprintf(stdout, "Unable to initialize required allegro5 image addon\n");
        exit(1);
    }
    if (!al_init_font_addon()) {
        fprintf(stdout, "Unable to initialize required allegro5 font addon\n");
        exit(1);
    }
    if (!al_init_ttf_addon()) {
        fprintf(stdout, "Unable to initialize required allegro5 TTF font addon\n");
        exit(1);
    }
    NkAllegro5Font *font = (NkAllegro5Font*)calloc(1, sizeof(NkAllegro5Font));

    font->font = al_load_font(file_name, font_size, flags);
    if (font->font == NULL) {
        fprintf(stdout, "Unable to load font file: %s\n", file_name);
        return NULL;
    }
    font->height = al_get_font_line_height(font->font);
    return font;
}

static float
nk_allegro5_font_get_text_width(nk_handle handle, float height, const char *text, int len)
{
    NkAllegro5Font *font = (NkAllegro5Font*)handle.ptr;
    if (!font || !text) {
        return 0;
    }
    /* We must copy into a new buffer with exact length null-terminated
       as nuklear uses variable size buffers and al_get_text_width doesn't
       accept a length, it infers length from null-termination
       (which is unsafe API design by allegro devs!) */
    char strcpy[len+1];
    strncpy((char*)&strcpy, text, len);
    strcpy[len] = '\0';
    return al_get_text_width(font->font, strcpy);
}

NK_API void
nk_allegro5_font_set_font(NkAllegro5Font *allegro5font)
{
    struct nk_user_font *font = &allegro5font->nk;
    font->userdata = nk_handle_ptr(allegro5font);
    font->height = (float)allegro5font->height;
    font->width = nk_allegro5_font_get_text_width;
    nk_style_set_font(&allegro5.ctx, font);
}

NK_API void
nk_allegro5_font_del(NkAllegro5Font *font)
{
    if(!font) return;
    al_destroy_font(font->font);
    free(font);
}

static ALLEGRO_COLOR
nk_color_to_allegro_color(struct nk_color color)
{
    return al_map_rgba((unsigned char)color.r, (unsigned char)color.g,
                (unsigned char)color.b, (unsigned char)color.a);
}

NK_API void
nk_allegro5_render()
{
    const struct nk_command *cmd;

    al_set_target_backbuffer(allegro5.dsp);

    nk_foreach(cmd, &allegro5.ctx)
    {
        ALLEGRO_COLOR color;
        switch (cmd->type) {
        case NK_COMMAND_NOP: break;
        case NK_COMMAND_SCISSOR: {
            const struct nk_command_scissor *s =(const struct nk_command_scissor*)cmd;
            al_set_clipping_rectangle((int)s->x, (int)s->y, (int)s->w, (int)s->h);
        } break;
        case NK_COMMAND_LINE: {
            const struct nk_command_line *l = (const struct nk_command_line *)cmd;
            color = nk_color_to_allegro_color(l->color);
            al_draw_line((float)l->begin.x, (float)l->begin.y, (float)l->end.x,
                (float)l->end.y, color, (float)l->line_thickness);
        } break;
        case NK_COMMAND_RECT: {
            const struct nk_command_rect *r = (const struct nk_command_rect *)cmd;
            color = nk_color_to_allegro_color(r->color);
            al_draw_rounded_rectangle((float)r->x, (float)r->y, (float)(r->x + r->w),
                (float)(r->y + r->h), (float)r->rounding, (float)r->rounding, color,
                (float)r->line_thickness);
        } break;
        case NK_COMMAND_RECT_FILLED: {
            const struct nk_command_rect_filled *r = (const struct nk_command_rect_filled *)cmd;
            color = nk_color_to_allegro_color(r->color);
            al_draw_filled_rounded_rectangle((float)r->x, (float)r->y,
                (float)(r->x + r->w), (float)(r->y + r->h), (float)r->rounding,
                (float)r->rounding, color);
        } break;
        case NK_COMMAND_CIRCLE: {
            const struct nk_command_circle *c = (const struct nk_command_circle *)cmd;
            color = nk_color_to_allegro_color(c->color);
            float xr, yr;
            xr = (float)c->w/2;
            yr = (float)c->h/2;
            al_draw_ellipse(((float)(c->x)) + xr, ((float)c->y) + yr,
                xr, yr, color, (float)c->line_thickness);
        } break;
        case NK_COMMAND_CIRCLE_FILLED: {
            const struct nk_command_circle_filled *c = (const struct nk_command_circle_filled *)cmd;
            color = nk_color_to_allegro_color(c->color);
            float xr, yr;
            xr = (float)c->w/2;
            yr = (float)c->h/2;
            al_draw_filled_ellipse(((float)(c->x)) + xr, ((float)c->y) + yr,
                xr, yr, color);
        } break;
        case NK_COMMAND_TRIANGLE: {
            const struct nk_command_triangle*t = (const struct nk_command_triangle*)cmd;
            color = nk_color_to_allegro_color(t->color);
            al_draw_triangle((float)t->a.x, (float)t->a.y, (float)t->b.x, (float)t->b.y,
                (float)t->c.x, (float)t->c.y, color, (float)t->line_thickness);
        } break;
        case NK_COMMAND_TRIANGLE_FILLED: {
            const struct nk_command_triangle_filled *t = (const struct nk_command_triangle_filled *)cmd;
            color = nk_color_to_allegro_color(t->color);
            al_draw_filled_triangle((float)t->a.x, (float)t->a.y, (float)t->b.x,
                (float)t->b.y, (float)t->c.x, (float)t->c.y, color);
        } break;
        case NK_COMMAND_POLYGON: {
            const struct nk_command_polygon *p = (const struct nk_command_polygon*)cmd;
            color = nk_color_to_allegro_color(p->color);
            int i;
            float vertices[p->point_count * 2];
            for (i = 0; i < p->point_count; i++) {
                vertices[i*2] = p->points[i].x;
                vertices[(i*2) + 1] = p->points[i].y;
            }
            al_draw_polyline((const float*)&vertices, (2 * sizeof(float)),
                (int)p->point_count, ALLEGRO_LINE_JOIN_ROUND, ALLEGRO_LINE_CAP_CLOSED,
                color, (float)p->line_thickness, 0.0);
        } break;
        case NK_COMMAND_POLYGON_FILLED: {
            const struct nk_command_polygon_filled *p = (const struct nk_command_polygon_filled *)cmd;
            color = nk_color_to_allegro_color(p->color);
            int i;
            float vertices[p->point_count * 2];
            for (i = 0; i < p->point_count; i++) {
                vertices[i*2] = p->points[i].x;
                vertices[(i*2) + 1] = p->points[i].y;
            }
            al_draw_filled_polygon((const float*)&vertices, (int)p->point_count, color);
        } break;
        case NK_COMMAND_POLYLINE: {
            const struct nk_command_polyline *p = (const struct nk_command_polyline *)cmd;
            color = nk_color_to_allegro_color(p->color);
            int i;
            float vertices[p->point_count * 2];
            for (i = 0; i < p->point_count; i++) {
                vertices[i*2] = p->points[i].x;
                vertices[(i*2) + 1] = p->points[i].y;
            }
            al_draw_polyline((const float*)&vertices, (2 * sizeof(float)),
                (int)p->point_count, ALLEGRO_LINE_JOIN_ROUND, ALLEGRO_LINE_CAP_ROUND,
                color, (float)p->line_thickness, 0.0);
        } break;
        case NK_COMMAND_TEXT: {
            const struct nk_command_text *t = (const struct nk_command_text*)cmd;
            color = nk_color_to_allegro_color(t->foreground);
            NkAllegro5Font *font = (NkAllegro5Font*)t->font->userdata.ptr;
            al_draw_text(font->font,
                color, (float)t->x, (float)t->y, 0,
                (const char*)t->string);
        } break;
        case NK_COMMAND_CURVE: {
            const struct nk_command_curve *q = (const struct nk_command_curve *)cmd;
            color = nk_color_to_allegro_color(q->color);
            float points[8];
            points[0] = (float)q->begin.x;
            points[1] = (float)q->begin.y;
            points[2] = (float)q->ctrl[0].x;
            points[3] = (float)q->ctrl[0].y;
            points[4] = (float)q->ctrl[1].x;
            points[5] = (float)q->ctrl[1].y;
            points[6] = (float)q->end.x;
            points[7] = (float)q->end.y;
            al_draw_spline(points, color, (float)q->line_thickness);
        } break;
        case NK_COMMAND_ARC: {
            const struct nk_command_arc *a = (const struct nk_command_arc *)cmd;
            color = nk_color_to_allegro_color(a->color);
            al_draw_arc((float)a->cx, (float)a->cy, (float)a->r, a->a[0],
                a->a[1], color, (float)a->line_thickness);
        } break;
        case NK_COMMAND_RECT_MULTI_COLOR:
        case NK_COMMAND_IMAGE:
        case NK_COMMAND_ARC_FILLED:
        default: break;
        }
    }
    nk_clear(&allegro5.ctx);
}

NK_API void
nk_allegro5_handle_event(ALLEGRO_EVENT *ev)
{
    struct nk_context *ctx = &allegro5.ctx;
    switch (ev->type) {
        case ALLEGRO_EVENT_DISPLAY_RESIZE: {
            allegro5.width = (unsigned int)ev->display.width;
            allegro5.height = (unsigned int)ev->display.height;
            al_acknowledge_resize(ev->display.source);
        } break;
        case ALLEGRO_EVENT_MOUSE_AXES: {
            nk_input_motion(ctx, ev->mouse.x, ev->mouse.y);
            if (ev->mouse.dz != 0) {
                nk_input_scroll(ctx, nk_vec2(0,(float)ev->mouse.dz / al_get_mouse_wheel_precision()));
            }
        } break;
        case ALLEGRO_EVENT_MOUSE_BUTTON_DOWN:
        case ALLEGRO_EVENT_MOUSE_BUTTON_UP: {
            int button = NK_BUTTON_LEFT;
            if (ev->mouse.button == 2) {
                button = NK_BUTTON_RIGHT;
            }
            else if (ev->mouse.button == 3) {
                button = NK_BUTTON_MIDDLE;
            }
            nk_input_button(ctx, button, ev->mouse.x, ev->mouse.y, ev->type == ALLEGRO_EVENT_MOUSE_BUTTON_DOWN);
        } break;
        /* This essentially converts touch events to mouse events */
        case ALLEGRO_EVENT_TOUCH_BEGIN:
        case ALLEGRO_EVENT_TOUCH_END: {
            /* We only acknowledge one touch at a time. Otherwise, each touch
               would be manipulating multiple nuklear elements, as if there
               were multiple mouse cursors */
            if (allegro5.is_touch_down && allegro5.touch_down_id != ev->touch.id) {
                return;
            }
            if (ev->type == ALLEGRO_EVENT_TOUCH_BEGIN) {
                allegro5.is_touch_down = 1;
                allegro5.touch_down_id = ev->touch.id;
                /* FIXME: This is a hack to properly simulate
                   touches as a mouse with nuklear. If you instantly jump
                   from one place to another without an nk_input_end(), it
                   confuses the nuklear state. nuklear expects smooth mouse
                   movements, which is unlike a touch screen */
                nk_input_motion(ctx, (int)ev->touch.x, (int)ev->touch.y);
                nk_input_end(ctx);
                nk_input_begin(ctx);
            }
            else {
                allegro5.is_touch_down = 0;
                allegro5.touch_down_id = -1;
            }
            nk_input_button(ctx, NK_BUTTON_LEFT, (int)ev->touch.x, (int)ev->touch.y, ev->type == ALLEGRO_EVENT_TOUCH_BEGIN);
        } break;
        case ALLEGRO_EVENT_TOUCH_MOVE: {
            /* Only acknowledge movements of a single touch, we are
               simulating a mouse cursor */
            if (!allegro5.is_touch_down || allegro5.touch_down_id != ev->touch.id) {
                return;
            }
            nk_input_motion(ctx, (int)ev->touch.x, (int)ev->touch.y);
        } break;
        case ALLEGRO_EVENT_KEY_DOWN:
        case ALLEGRO_EVENT_KEY_UP: {
            int kc = ev->keyboard.keycode;
            int down = ev->type == ALLEGRO_EVENT_KEY_DOWN;

            if (kc == ALLEGRO_KEY_LSHIFT || kc == ALLEGRO_KEY_RSHIFT) nk_input_key(ctx, NK_KEY_SHIFT, down);
            else if (kc == ALLEGRO_KEY_DELETE)    nk_input_key(ctx, NK_KEY_DEL, down);
            else if (kc == ALLEGRO_KEY_ENTER)     nk_input_key(ctx, NK_KEY_ENTER, down);
            else if (kc == ALLEGRO_KEY_TAB)       nk_input_key(ctx, NK_KEY_TAB, down);
            else if (kc == ALLEGRO_KEY_LEFT)      nk_input_key(ctx, NK_KEY_LEFT, down);
            else if (kc == ALLEGRO_KEY_RIGHT)     nk_input_key(ctx, NK_KEY_RIGHT, down);
            else if (kc == ALLEGRO_KEY_UP)        nk_input_key(ctx, NK_KEY_UP, down);
            else if (kc == ALLEGRO_KEY_DOWN)      nk_input_key(ctx, NK_KEY_DOWN, down);
            else if (kc == ALLEGRO_KEY_BACKSPACE) nk_input_key(ctx, NK_KEY_BACKSPACE, down);
            else if (kc == ALLEGRO_KEY_ESCAPE)    nk_input_key(ctx, NK_KEY_TEXT_RESET_MODE, down);
            else if (kc == ALLEGRO_KEY_PGUP)      nk_input_key(ctx, NK_KEY_SCROLL_UP, down);
            else if (kc == ALLEGRO_KEY_PGDN)      nk_input_key(ctx, NK_KEY_SCROLL_DOWN, down);
            else if (kc == ALLEGRO_KEY_HOME) {
                nk_input_key(ctx, NK_KEY_TEXT_START, down);
                nk_input_key(ctx, NK_KEY_SCROLL_START, down);
            } else if (kc == ALLEGRO_KEY_END) {
                nk_input_key(ctx, NK_KEY_TEXT_END, down);
                nk_input_key(ctx, NK_KEY_SCROLL_END, down);
            }
        } break;
        case ALLEGRO_EVENT_KEY_CHAR: {
            int kc = ev->keyboard.keycode;
            int control_mask = (ev->keyboard.modifiers & ALLEGRO_KEYMOD_CTRL) ||
                               (ev->keyboard.modifiers & ALLEGRO_KEYMOD_COMMAND);

            if (kc == ALLEGRO_KEY_C && control_mask) {
                nk_input_key(ctx, NK_KEY_COPY, 1);
            } else if (kc == ALLEGRO_KEY_V && control_mask) {
                nk_input_key(ctx, NK_KEY_PASTE, 1);
            } else if (kc == ALLEGRO_KEY_X && control_mask) {
                nk_input_key(ctx, NK_KEY_CUT, 1);
            } else if (kc == ALLEGRO_KEY_Z && control_mask) {
                nk_input_key(ctx, NK_KEY_TEXT_UNDO, 1);
            } else if (kc == ALLEGRO_KEY_R && control_mask) {
                nk_input_key(ctx, NK_KEY_TEXT_REDO, 1);
            } else if (kc == ALLEGRO_KEY_A && control_mask) {
                nk_input_key(ctx, NK_KEY_TEXT_SELECT_ALL, 1);
            } else {
                if (kc != ALLEGRO_KEY_BACKSPACE &&
                    kc != ALLEGRO_KEY_LEFT &&
                    kc != ALLEGRO_KEY_RIGHT &&
                    kc != ALLEGRO_KEY_UP &&
                    kc != ALLEGRO_KEY_DOWN &&
                    kc != ALLEGRO_KEY_HOME &&
                    kc != ALLEGRO_KEY_DELETE &&
                    kc != ALLEGRO_KEY_ENTER &&
                    kc != ALLEGRO_KEY_END &&
                    kc != ALLEGRO_KEY_ESCAPE &&
                    kc != ALLEGRO_KEY_PGDN &&
                    kc != ALLEGRO_KEY_PGUP) {
                    nk_input_unicode(ctx, ev->keyboard.unichar);
                }
            }
        } break;
        default: break;
    }
}

NK_INTERN void
nk_allegro5_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
    char *text = al_get_clipboard_text(allegro5.dsp);
    if (text) nk_textedit_paste(edit, text, nk_strlen(text));
    (void)usr;
    al_free(text);
}

NK_INTERN void
nk_allegro5_clipboard_copy(nk_handle usr, const char *text, int len)
{
    char *str = 0;
    (void)usr;
    if (!len) return;
    str = (char*)malloc((size_t)len+1);
    if (!str) return;
    memcpy(str, text, (size_t)len);
    str[len] = '\0';
    al_set_clipboard_text(allegro5.dsp, str);
    free(str);
}

NK_API struct nk_context*
nk_allegro5_init(NkAllegro5Font *allegro5font, ALLEGRO_DISPLAY *dsp,
    unsigned int width, unsigned int height)
{
    if (!al_init_primitives_addon()) {
        fprintf(stdout, "Unable to initialize required allegro5 primitives addon\n");
        exit(1);
    }

    struct nk_user_font *font = &allegro5font->nk;
    font->userdata = nk_handle_ptr(allegro5font);
    font->height = (float)allegro5font->height;
    font->width = nk_allegro5_font_get_text_width;

    allegro5.dsp = dsp;
    allegro5.width = width;
    allegro5.height = height;
    allegro5.is_touch_down = 0;
    allegro5.touch_down_id = -1;

    nk_init_default(&allegro5.ctx, font);
    allegro5.ctx.clip.copy = nk_allegro5_clipboard_copy;
    allegro5.ctx.clip.paste = nk_allegro5_clipboard_paste;
    allegro5.ctx.clip.userdata = nk_handle_ptr(0);
    return &allegro5.ctx;
}

NK_API
void nk_allegro5_shutdown(void)
{
    nk_free(&allegro5.ctx);
    memset(&allegro5, 0, sizeof(allegro5));
}

#endif /* NK_ALLEGRO5_IMPLEMENTATION */



================================================
FILE: demo/calculator.c
================================================
/* nuklear - v1.00 - public domain */
static void
calculator(struct nk_context *ctx)
{
    if (nk_begin(ctx, "Calculator", nk_rect(10, 10, 180, 250),
        NK_WINDOW_BORDER|NK_WINDOW_NO_SCROLLBAR|NK_WINDOW_MOVABLE))
    {
        static int set = 0, prev = 0, op = 0;
        static const char numbers[] = "789456123";
        static const char ops[] = "+-*/";
        static double a = 0, b = 0;
        static double *current = &a;

        size_t i = 0;
        int solve = 0;
        {int len; char buffer[256];
        nk_layout_row_dynamic(ctx, 35, 1);
        len = snprintf(buffer, 256, "%.2f", *current);
        nk_edit_string(ctx, NK_EDIT_SIMPLE, buffer, &len, 255, nk_filter_float);
        buffer[len] = 0;
        *current = atof(buffer);}

        nk_layout_row_dynamic(ctx, 35, 4);
        for (i = 0; i < 16; ++i) {
            if (i >= 12 && i < 15) {
                if (i > 12) continue;
                if (nk_button_label(ctx, "C")) {
                    a = b = op = 0; current = &a; set = 0;
                } if (nk_button_label(ctx, "0")) {
                    *current = *current*10.0f; set = 0;
                } if (nk_button_label(ctx, "=")) {
                    solve = 1; prev = op; op = 0;
                }
            } else if (((i+1) % 4)) {
                if (nk_button_text(ctx, &numbers[(i/4)*3+i%4], 1)) {
                    *current = *current * 10.0f + numbers[(i/4)*3+i%4] - '0';
                    set = 0;
                }
            } else if (nk_button_text(ctx, &ops[i/4], 1)) {
                if (!set) {
                    if (current != &b) {
                        current = &b;
                    } else {
                        prev = op;
                        solve = 1;
                    }
                }
                op = ops[i/4];
                set = 1;
            }
        }
        if (solve) {
            if (prev == '+') a = a + b;
            if (prev == '-') a = a - b;
            if (prev == '*') a = a * b;
            if (prev == '/') a = a / b;
            current = &a;
            if (set) current = &b;
            b = 0; set = 0;
        }
    }
    nk_end(ctx);
}



================================================
FILE: demo/d3d11/build.bat
================================================
@echo off

rem This will use VS2015 for compiler
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

fxc.exe /nologo /T vs_4_0_level_9_0 /E vs /O3 /Zpc /Ges /Fh nuklear_d3d11_vertex_shader.h /Vn nk_d3d11_vertex_shader /Qstrip_reflect /Qstrip_debug /Qstrip_priv nuklear_d3d11.hlsl
fxc.exe /nologo /T ps_4_0_level_9_0 /E ps /O3 /Zpc /Ges /Fh nuklear_d3d11_pixel_shader.h /Vn nk_d3d11_pixel_shader /Qstrip_reflect /Qstrip_debug /Qstrip_priv nuklear_d3d11.hlsl

cl /D_CRT_SECURE_NO_DEPRECATE /nologo /W3 /O2 /fp:fast /Gm- /Fedemo.exe main.c user32.lib dxguid.lib d3d11.lib /link /incremental:no


================================================
FILE: demo/d3d11/main.c
================================================
/* nuklear - 1.32.0 - public domain */
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d11.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <time.h>

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600

#define MAX_VERTEX_BUFFER 512 * 1024
#define MAX_INDEX_BUFFER 128 * 1024

#define NK_INCLUDE_FIXED_TYPES
#define NK_INCLUDE_STANDARD_IO
#define NK_INCLUDE_STANDARD_VARARGS
#define NK_INCLUDE_DEFAULT_ALLOCATOR
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
#define NK_INCLUDE_FONT_BAKING
#define NK_INCLUDE_DEFAULT_FONT
#define NK_IMPLEMENTATION
#define NK_D3D11_IMPLEMENTATION
#include "../../nuklear.h"
#include "nuklear_d3d11.h"

/* ===============================================================
 *
 *                          EXAMPLE
 *
 * ===============================================================*/
/* This are some code examples to provide a small overview of what can be
 * done with this library. To try out an example uncomment the defines */
/*#define INCLUDE_ALL */
/*#define INCLUDE_STYLE */
/*#define INCLUDE_CALCULATOR */
/*#define INCLUDE_OVERVIEW */
/*#define INCLUDE_NODE_EDITOR */

#ifdef INCLUDE_ALL
  #define INCLUDE_STYLE
  #define INCLUDE_CALCULATOR
  #define INCLUDE_OVERVIEW
  #define INCLUDE_NODE_EDITOR
#endif

#ifdef INCLUDE_STYLE
  #include "../style.c"
#endif
#ifdef INCLUDE_CALCULATOR
  #include "../calculator.c"
#endif
#ifdef INCLUDE_OVERVIEW
  #include "../overview.c"
#endif
#ifdef INCLUDE_NODE_EDITOR
  #include "../node_editor.c"
#endif

/* ===============================================================
 *
 *                          DEMO
 *
 * ===============================================================*/
static IDXGISwapChain *swap_chain;
static ID3D11Device *device;
static ID3D11DeviceContext *context;
static ID3D11RenderTargetView* rt_view;

static void
set_swap_chain_size(int width, int height)
{
    ID3D11Texture2D *back_buffer;
    D3D11_RENDER_TARGET_VIEW_DESC desc;
    HRESULT hr;

    if (rt_view)
        ID3D11RenderTargetView_Release(rt_view);

    ID3D11DeviceContext_OMSetRenderTargets(context, 0, NULL, NULL);

    hr = IDXGISwapChain_ResizeBuffers(swap_chain, 0, width, height, DXGI_FORMAT_UNKNOWN, 0);
    if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET || hr == DXGI_ERROR_DRIVER_INTERNAL_ERROR)
    {
        /* to recover from this, you'll need to recreate device and all the resources */
        MessageBoxW(NULL, L"DXGI device is removed or reset!", L"Error", 0);
        exit(0);
    }
    assert(SUCCEEDED(hr));

    memset(&desc, 0, sizeof(desc));
    desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;

    hr = IDXGISwapChain_GetBuffer(swap_chain, 0, &IID_ID3D11Texture2D, (void **)&back_buffer);
    assert(SUCCEEDED(hr));

    hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)back_buffer, &desc, &rt_view);
    assert(SUCCEEDED(hr));

    ID3D11Texture2D_Release(back_buffer);
}

static LRESULT CALLBACK
WindowProc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_DESTROY:
        PostQuitMessage(0);
        return 0;

    case WM_SIZE:
        if (swap_chain)
        {
            int width = LOWORD(lparam);
            int height = HIWORD(lparam);
            set_swap_chain_size(width, height);
            nk_d3d11_resize(context, width, height);
        }
        break;
    }

    if (nk_d3d11_handle_event(wnd, msg, wparam, lparam))
        return 0;

    return DefWindowProcW(wnd, msg, wparam, lparam);
}

int main(void)
{
    struct nk_context *ctx;
    struct nk_colorf bg;

    WNDCLASSW wc;
    RECT rect = { 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT };
    DWORD style = WS_OVERLAPPEDWINDOW;
    DWORD exstyle = WS_EX_APPWINDOW;
    HWND wnd;
    int running = 1;
    HRESULT hr;
    D3D_FEATURE_LEVEL feature_level;
    DXGI_SWAP_CHAIN_DESC swap_chain_desc;

    /* Win32 */
    memset(&wc, 0, sizeof(wc));
    wc.style = CS_DBLCLKS;
    wc.lpfnWndProc = WindowProc;
    wc.hInstance = GetModuleHandleW(0);
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.lpszClassName = L"NuklearWindowClass";
    RegisterClassW(&wc);

    AdjustWindowRectEx(&rect, style, FALSE, exstyle);

    wnd = CreateWindowExW(exstyle, wc.lpszClassName, L"Nuklear Demo",
        style | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT,
        rect.right - rect.left, rect.bottom - rect.top,
        NULL, NULL, wc.hInstance, NULL);

    /* D3D11 setup */
    memset(&swap_chain_desc, 0, sizeof(swap_chain_desc));
    swap_chain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    swap_chain_desc.BufferDesc.RefreshRate.Numerator = 60;
    swap_chain_desc.BufferDesc.RefreshRate.Denominator = 1;
    swap_chain_desc.SampleDesc.Count = 1;
    swap_chain_desc.SampleDesc.Quality = 0;
    swap_chain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
    swap_chain_desc.BufferCount = 1;
    swap_chain_desc.OutputWindow = wnd;
    swap_chain_desc.Windowed = TRUE;
    swap_chain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
    swap_chain_desc.Flags = 0;
    if (FAILED(D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE,
        NULL, 0, NULL, 0, D3D11_SDK_VERSION, &swap_chain_desc,
        &swap_chain, &device, &feature_level, &context)))
    {
        /* if hardware device fails, then try WARP high-performance
           software rasterizer, this is useful for RDP sessions */
        hr = D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_WARP,
            NULL, 0, NULL, 0, D3D11_SDK_VERSION, &swap_chain_desc,
            &swap_chain, &device, &feature_level, &context);
        assert(SUCCEEDED(hr));
    }
    set_swap_chain_size(WINDOW_WIDTH, WINDOW_HEIGHT);

    /* GUI */
    ctx = nk_d3d11_init(device, WINDOW_WIDTH, WINDOW_HEIGHT, MAX_VERTEX_BUFFER, MAX_INDEX_BUFFER);
    /* Load Fonts: if none of these are loaded a default font will be used  */
    /* Load Cursor: if you uncomment cursor loading please hide the cursor */
    {struct nk_font_atlas *atlas;
    nk_d3d11_font_stash_begin(&atlas);
    /*struct nk_font *droid = nk_font_atlas_add_from_file(atlas, "../../extra_font/DroidSans.ttf", 14, 0);*/
    /*struct nk_font *robot = nk_font_atlas_add_from_file(atlas, "../../extra_font/Roboto-Regular.ttf", 14, 0);*/
    /*struct nk_font *future = nk_font_atlas_add_from_file(atlas, "../../extra_font/kenvector_future_thin.ttf", 13, 0);*/
    /*struct nk_font *clean = nk_font_atlas_add_from_file(atlas, "../../extra_font/ProggyClean.ttf", 12, 0);*/
    /*struct nk_font *tiny = nk_font_atlas_add_from_file(atlas, "../../extra_font/ProggyTiny.ttf", 10, 0);*/
    /*struct nk_font *cousine = nk_font_atlas_add_from_file(atlas, "../../extra_font/Cousine-Regular.ttf", 13, 0);*/
    nk_d3d11_font_stash_end();
    /*nk_style_load_all_cursors(ctx, atlas->cursors);*/
    /*nk_style_set_font(ctx, &droid->handle)*/;}

    /* style.c */
    #ifdef INCLUDE_STYLE
    /*set_style(ctx, THEME_WHITE);*/
    /*set_style(ctx, THEME_RED);*/
    /*set_style(ctx, THEME_BLUE);*/
    /*set_style(ctx, THEME_DARK);*/
    #endif

    bg.r = 0.10f, bg.g = 0.18f, bg.b = 0.24f, bg.a = 1.0f;
    while (running)
    {
        /* Input */
        MSG msg;
        nk_input_begin(ctx);
        while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
        {
            if (msg.message == WM_QUIT)
                running = 0;
            TranslateMessage(&msg);
            DispatchMessageW(&msg);
        }
        nk_input_end(ctx);

        /* GUI */
        if (nk_begin(ctx, "Demo", nk_rect(50, 50, 230, 250),
            NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
            NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE))
        {
            enum {EASY, HARD};
            static int op = EASY;
            static int property = 20;

            nk_layout_row_static(ctx, 30, 80, 1);
            if (nk_button_label(ctx, "button"))
                fprintf(stdout, "button pressed\n");
            nk_layout_row_dynamic(ctx, 30, 2);
            if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
            if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
            nk_layout_row_dynamic(ctx, 22, 1);
            nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

            nk_layout_row_dynamic(ctx, 20, 1);
            nk_label(ctx, "background:", NK_TEXT_LEFT);
            nk_layout_row_dynamic(ctx, 25, 1);
            if (nk_combo_begin_color(ctx, nk_rgb_cf(bg), nk_vec2(nk_widget_width(ctx),400))) {
                nk_layout_row_dynamic(ctx, 120, 1);
                bg = nk_color_picker(ctx, bg, NK_RGBA);
                nk_layout_row_dynamic(ctx, 25, 1);
                bg.r = nk_propertyf(ctx, "#R:", 0, bg.r, 1.0f, 0.01f,0.005f);
                bg.g = nk_propertyf(ctx, "#G:", 0, bg.g, 1.0f, 0.01f,0.005f);
                bg.b = nk_propertyf(ctx, "#B:", 0, bg.b, 1.0f, 0.01f,0.005f);
                bg.a = nk_propertyf(ctx, "#A:", 0, bg.a, 1.0f, 0.01f,0.005f);
                nk_combo_end(ctx);
            }
        }
        nk_end(ctx);

        /* -------------- EXAMPLES ---------------- */
        #ifdef INCLUDE_CALCULATOR
          calculator(ctx);
        #endif
        #ifdef INCLUDE_OVERVIEW
          overview(ctx);
        #endif
        #ifdef INCLUDE_NODE_EDITOR
          node_editor(ctx);
        #endif
        /* ----------------------------------------- */

        /* Draw */
        ID3D11DeviceContext_ClearRenderTargetView(context, rt_view, &bg.r);
        ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rt_view, NULL);
        nk_d3d11_render(context, NK_ANTI_ALIASING_ON);
        hr = IDXGISwapChain_Present(swap_chain, 1, 0);
        if (hr == DXGI_ERROR_DEVICE_RESET || hr == DXGI_ERROR_DEVICE_REMOVED) {
            /* to recover from this, you'll need to recreate device and all the resources */
            MessageBoxW(NULL, L"D3D11 device is lost or removed!", L"Error", 0);
            break;
        } else if (hr == DXGI_STATUS_OCCLUDED) {
            /* window is not visible, so vsync won't work. Let's sleep a bit to reduce CPU usage */
            Sleep(10);
        }
        assert(SUCCEEDED(hr));
    }

    ID3D11DeviceContext_ClearState(context);
    nk_d3d11_shutdown();
    ID3D11RenderTargetView_Release(rt_view);
    ID3D11DeviceContext_Release(context);
    ID3D11Device_Release(device);
    IDXGISwapChain_Release(swap_chain);
    UnregisterClassW(wc.lpszClassName, wc.hInstance);
    return 0;
}


================================================
FILE: demo/d3d11/nuklear_d3d11.h
================================================
/*
 * Nuklear - 1.32.0 - public domain
 * no warrenty implied; use at your own risk.
 * authored from 2015-2016 by Micha Mettke
 */
/*
 * ==============================================================
 *
 *                              API
 *
 * ===============================================================
 */
#ifndef NK_D3D11_H_
#define NK_D3D11_H_

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

typedef struct ID3D11Device ID3D11Device;
typedef struct ID3D11DeviceContext ID3D11DeviceContext;

NK_API struct nk_context *nk_d3d11_init(ID3D11Device *device, int width, int height, unsigned int max_vertex_buffer, unsigned int max_index_buffer);
NK_API void nk_d3d11_font_stash_begin(struct nk_font_atlas **atlas);
NK_API void nk_d3d11_font_stash_end(void);
NK_API int nk_d3d11_handle_event(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
NK_API void nk_d3d11_render(ID3D11DeviceContext *context, enum nk_anti_aliasing);
NK_API void nk_d3d11_resize(ID3D11DeviceContext *context, int width, int height);
NK_API void nk_d3d11_shutdown(void);

#endif
/*
 * ==============================================================
 *
 *                          IMPLEMENTATION
 *
 * ===============================================================
 */
#ifdef NK_D3D11_IMPLEMENTATION

#define WIN32_LEAN_AND_MEAN
#define COBJMACROS
#include <d3d11.h>

#include <stddef.h>
#include <string.h>
#include <float.h>
#include <assert.h>

#include "nuklear_d3d11_vertex_shader.h"
#include "nuklear_d3d11_pixel_shader.h"

struct nk_d3d11_vertex {
    float position[2];
    float uv[2];
    nk_byte col[4];
};

static struct
{
    struct nk_context ctx;
    struct nk_font_atlas atlas;
    struct nk_buffer cmds;

    struct nk_draw_null_texture null;
    unsigned int max_vertex_buffer;
    unsigned int max_index_buffer;

    D3D11_VIEWPORT viewport;
    ID3D11Device *device;
    ID3D11RasterizerState *rasterizer_state;
    ID3D11VertexShader *vertex_shader;
    ID3D11InputLayout *input_layout;
    ID3D11Buffer *const_buffer;
    ID3D11PixelShader *pixel_shader;
    ID3D11BlendState *blend_state;
    ID3D11Buffer *index_buffer;
    ID3D11Buffer *vertex_buffer;
    ID3D11ShaderResourceView *font_texture_view;
    ID3D11SamplerState *sampler_state;
} d3d11;

NK_API void
nk_d3d11_render(ID3D11DeviceContext *context, enum nk_anti_aliasing AA)
{
    const float blend_factor[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
    const UINT stride = sizeof(struct nk_d3d11_vertex);
    const UINT offset = 0;

    ID3D11DeviceContext_IASetInputLayout(context, d3d11.input_layout);
    ID3D11DeviceContext_IASetVertexBuffers(context, 0, 1, &d3d11.vertex_buffer, &stride, &offset);
    ID3D11DeviceContext_IASetIndexBuffer(context, d3d11.index_buffer, DXGI_FORMAT_R16_UINT, 0);
    ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);

    ID3D11DeviceContext_VSSetShader(context, d3d11.vertex_shader, NULL, 0);
    ID3D11DeviceContext_VSSetConstantBuffers(context, 0, 1, &d3d11.const_buffer);

    ID3D11DeviceContext_PSSetShader(context, d3d11.pixel_shader, NULL, 0);
    ID3D11DeviceContext_PSSetSamplers(context, 0, 1, &d3d11.sampler_state);

    ID3D11DeviceContext_OMSetBlendState(context, d3d11.blend_state, blend_factor, 0xffffffff);
    ID3D11DeviceContext_RSSetState(context, d3d11.rasterizer_state);
    ID3D11DeviceContext_RSSetViewports(context, 1, &d3d11.viewport);

    /* Convert from command queue into draw list and draw to screen */
    {/* load draw vertices & elements directly into vertex + element buffer */
    D3D11_MAPPED_SUBRESOURCE vertices;
    D3D11_MAPPED_SUBRESOURCE indices;
    const struct nk_draw_command *cmd;
    UINT offset = 0;
    HRESULT hr;

    hr = ID3D11DeviceContext_Map(context, (ID3D11Resource *)d3d11.vertex_buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &vertices);
    NK_ASSERT(SUCCEEDED(hr));
    hr = ID3D11DeviceContext_Map(context, (ID3D11Resource *)d3d11.index_buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &indices);
    NK_ASSERT(SUCCEEDED(hr));

    {/* fill converting configuration */
        struct nk_convert_config config;
        NK_STORAGE const struct nk_draw_vertex_layout_element vertex_layout[] = {
            {NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_d3d11_vertex, position)},
            {NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_d3d11_vertex, uv)},
            {NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct nk_d3d11_vertex, col)},
            {NK_VERTEX_LAYOUT_END}
        };
        memset(&config, 0, sizeof(config));
        config.vertex_layout = vertex_layout;
        config.vertex_size = sizeof(struct nk_d3d11_vertex);
        config.vertex_alignment = NK_ALIGNOF(struct nk_d3d11_vertex);
        config.global_alpha = 1.0f;
        config.shape_AA = AA;
        config.line_AA = AA;
        config.circle_segment_count = 22;
        config.curve_segment_count = 22;
        config.arc_segment_count = 22;
        config.null = d3d11.null;

        {/* setup buffers to load vertices and elements */
        struct nk_buffer vbuf, ibuf;
        nk_buffer_init_fixed(&vbuf, vertices.pData, (size_t)d3d11.max_vertex_buffer);
        nk_buffer_init_fixed(&ibuf, indices.pData, (size_t)d3d11.max_index_buffer);
        nk_convert(&d3d11.ctx, &d3d11.cmds, &vbuf, &ibuf, &config);}
    }

    ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)d3d11.vertex_buffer, 0);
    ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)d3d11.index_buffer, 0);

    /* iterate over and execute each draw command */
    nk_draw_foreach(cmd, &d3d11.ctx, &d3d11.cmds)
    {
        D3D11_RECT scissor;
        ID3D11ShaderResourceView *texture_view = (ID3D11ShaderResourceView *)cmd->texture.ptr;
        if (!cmd->elem_count) continue;

        scissor.left = (LONG)cmd->clip_rect.x;
        scissor.right = (LONG)(cmd->clip_rect.x + cmd->clip_rect.w);
        scissor.top = (LONG)cmd->clip_rect.y;
        scissor.bottom = (LONG)(cmd->clip_rect.y + cmd->clip_rect.h);

        ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &texture_view);
        ID3D11DeviceContext_RSSetScissorRects(context, 1, &scissor);
        ID3D11DeviceContext_DrawIndexed(context, (UINT)cmd->elem_count, offset, 0);
        offset += cmd->elem_count;
    }
    nk_clear(&d3d11.ctx);}
}

static void
nk_d3d11_get_projection_matrix(int width, int height, float *result)
{
    const float L = 0.0f;
    const float R = (float)width;
    const float T = 0.0f;
    const float B = (float)height;
    float matrix[4][4] =
    {
        {    2.0f / (R - L),              0.0f, 0.0f, 0.0f },
        {              0.0f,    2.0f / (T - B), 0.0f, 0.0f },
        {              0.0f,              0.0f, 0.5f, 0.0f },
        { (R + L) / (L - R), (T + B) / (B - T), 0.5f, 1.0f },
    };
    memcpy(result, matrix, sizeof(matrix));
}

NK_API void
nk_d3d11_resize(ID3D11DeviceContext *context, int width, int height)
{
    D3D11_MAPPED_SUBRESOURCE mapped;
    if (SUCCEEDED(ID3D11DeviceContext_Map(context, (ID3D11Resource *)d3d11.const_buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped)))
    {
        nk_d3d11_get_projection_matrix(width, height, (float *)mapped.pData);
        ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)d3d11.const_buffer, 0);

        d3d11.viewport.Width = (float)width;
        d3d11.viewport.Height = (float)height;
    }
}

NK_API int
nk_d3d11_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_KEYDOWN:
    case WM_KEYUP:
    case WM_SYSKEYDOWN:
    case WM_SYSKEYUP:
    {
        int down = !((lparam >> 31) & 1);
        int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);

        switch (wparam)
        {
        case VK_SHIFT:
        case VK_LSHIFT:
        case VK_RSHIFT:
            nk_input_key(&d3d11.ctx, NK_KEY_SHIFT, down);
            return 1;

        case VK_DELETE:
            nk_input_key(&d3d11.ctx, NK_KEY_DEL, down);
            return 1;

        case VK_RETURN:
            nk_input_key(&d3d11.ctx, NK_KEY_ENTER, down);
            return 1;

        case VK_TAB:
            nk_input_key(&d3d11.ctx, NK_KEY_TAB, down);
            return 1;

        case VK_LEFT:
            if (ctrl)
                nk_input_key(&d3d11.ctx, NK_KEY_TEXT_WORD_LEFT, down);
            else
                nk_input_key(&d3d11.ctx, NK_KEY_LEFT, down);
            return 1;

        case VK_RIGHT:
            if (ctrl)
                nk_input_key(&d3d11.ctx, NK_KEY_TEXT_WORD_RIGHT, down);
            else
                nk_input_key(&d3d11.ctx, NK_KEY_RIGHT, down);
            return 1;

        case VK_BACK:
            nk_input_key(&d3d11.ctx, NK_KEY_BACKSPACE, down);
            return 1;

        case VK_HOME:
            nk_input_key(&d3d11.ctx, NK_KEY_TEXT_START, down);
            nk_input_key(&d3d11.ctx, NK_KEY_SCROLL_START, down);
            return 1;

        case VK_END:
            nk_input_key(&d3d11.ctx, NK_KEY_TEXT_END, down);
            nk_input_key(&d3d11.ctx, NK_KEY_SCROLL_END, down);
            return 1;

        case VK_NEXT:
            nk_input_key(&d3d11.ctx, NK_KEY_SCROLL_DOWN, down);
            return 1;

        case VK_PRIOR:
            nk_input_key(&d3d11.ctx, NK_KEY_SCROLL_UP, down);
            return 1;

        case 'C':
            if (ctrl) {
                nk_input_key(&d3d11.ctx, NK_KEY_COPY, down);
                return 1;
            }
            break;

        case 'V':
            if (ctrl) {
                nk_input_key(&d3d11.ctx, NK_KEY_PASTE, down);
                return 1;
            }
            break;

        case 'X':
            if (ctrl) {
                nk_input_key(&d3d11.ctx, NK_KEY_CUT, down);
                return 1;
            }
            break;

        case 'Z':
            if (ctrl) {
                nk_input_key(&d3d11.ctx, NK_KEY_TEXT_UNDO, down);
                return 1;
            }
            break;

        case 'R':
            if (ctrl) {
                nk_input_key(&d3d11.ctx, NK_KEY_TEXT_REDO, down);
                return 1;
            }
            break;
        }
        return 0;
    }

    case WM_CHAR:
        if (wparam >= 32)
        {
            nk_input_unicode(&d3d11.ctx, (nk_rune)wparam);
            return 1;
        }
        break;

    case WM_LBUTTONDOWN:
        nk_input_button(&d3d11.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_LBUTTONUP:
        nk_input_button(&d3d11.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        nk_input_button(&d3d11.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_RBUTTONDOWN:
        nk_input_button(&d3d11.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_RBUTTONUP:
        nk_input_button(&d3d11.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MBUTTONDOWN:
        nk_input_button(&d3d11.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_MBUTTONUP:
        nk_input_button(&d3d11.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MOUSEWHEEL:
        nk_input_scroll(&d3d11.ctx, nk_vec2(0,(float)(short)HIWORD(wparam) / WHEEL_DELTA));
        return 1;

    case WM_MOUSEMOVE:
        nk_input_motion(&d3d11.ctx, (short)LOWORD(lparam), (short)HIWORD(lparam));
        return 1;

    case WM_LBUTTONDBLCLK:
        nk_input_button(&d3d11.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        return 1;
    }

    return 0;
}

static void
nk_d3d11_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
    (void)usr;
    if (IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL))
    {
        HGLOBAL mem = GetClipboardData(CF_UNICODETEXT); 
        if (mem)
        {
            SIZE_T size = GlobalSize(mem) - 1;
            if (size)
            {
                LPCWSTR wstr = (LPCWSTR)GlobalLock(mem);
                if (wstr)
                {
                    int utf8size = WideCharToMultiByte(CP_UTF8, 0, wstr, size / sizeof(wchar_t), NULL, 0, NULL, NULL);
                    if (utf8size)
                    {
                        char* utf8 = (char*)malloc(utf8size);
                        if (utf8)
                        {
                            WideCharToMultiByte(CP_UTF8, 0, wstr, size / sizeof(wchar_t), utf8, utf8size, NULL, NULL);
                            nk_textedit_paste(edit, utf8, utf8size);
                            free(utf8);
                        }
                    }
                    GlobalUnlock(mem); 
                }
            }
        }
        CloseClipboard();
    }
}

static void
nk_d3d11_clipboard_copy(nk_handle usr, const char *text, int len)
{
    (void)usr;
    if (OpenClipboard(NULL))
    {
        int wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
        if (wsize)
        {
            HGLOBAL mem = GlobalAlloc(GMEM_MOVEABLE, (wsize + 1) * sizeof(wchar_t));
            if (mem)
            {
                wchar_t* wstr = (wchar_t*)GlobalLock(mem);
                if (wstr)
                {
                    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
                    wstr[wsize] = 0;
                    GlobalUnlock(mem);
                    SetClipboardData(CF_UNICODETEXT, mem); 
                }
            }
        }
        CloseClipboard();
    }
}

NK_API struct nk_context*
nk_d3d11_init(ID3D11Device *device, int width, int height, unsigned int max_vertex_buffer, unsigned int max_index_buffer)
{
    HRESULT hr;
    d3d11.max_vertex_buffer = max_vertex_buffer;
    d3d11.max_index_buffer = max_index_buffer;
    d3d11.device = device;
    ID3D11Device_AddRef(device);

    nk_init_default(&d3d11.ctx, 0);
    d3d11.ctx.clip.copy = nk_d3d11_clipboard_copy;
    d3d11.ctx.clip.paste = nk_d3d11_clipboard_paste;
    d3d11.ctx.clip.userdata = nk_handle_ptr(0);

    nk_buffer_init_default(&d3d11.cmds);

    {/* rasterizer state */
    D3D11_RASTERIZER_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.FillMode = D3D11_FILL_SOLID;
    desc.CullMode = D3D11_CULL_NONE;
    desc.FrontCounterClockwise = FALSE;
    desc.DepthBias = 0;
    desc.DepthBiasClamp = 0;
    desc.SlopeScaledDepthBias = 0.0f;
    desc.DepthClipEnable = TRUE;
    desc.ScissorEnable = TRUE;
    desc.MultisampleEnable = FALSE;
    desc.AntialiasedLineEnable = FALSE;
    hr = ID3D11Device_CreateRasterizerState(device,&desc, &d3d11.rasterizer_state);
    NK_ASSERT(SUCCEEDED(hr));}

    /* vertex shader */
    {hr = ID3D11Device_CreateVertexShader(device,nk_d3d11_vertex_shader, sizeof(nk_d3d11_vertex_shader), NULL, &d3d11.vertex_shader);
    NK_ASSERT(SUCCEEDED(hr));}

    /* input layout */
    {const D3D11_INPUT_ELEMENT_DESC layout[] = {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, offsetof(struct nk_d3d11_vertex, position), D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT,       0, offsetof(struct nk_d3d11_vertex, uv),       D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "COLOR",    0, DXGI_FORMAT_R8G8B8A8_UNORM,     0, offsetof(struct nk_d3d11_vertex, col),      D3D11_INPUT_PER_VERTEX_DATA, 0 },
    };
    hr = ID3D11Device_CreateInputLayout(device,layout, ARRAYSIZE(layout), nk_d3d11_vertex_shader, sizeof(nk_d3d11_vertex_shader), &d3d11.input_layout);
    NK_ASSERT(SUCCEEDED(hr));}

    /* constant buffer */
    {float matrix[4*4];
    D3D11_BUFFER_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.ByteWidth = sizeof(matrix);
    desc.Usage = D3D11_USAGE_DYNAMIC;
    desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
    desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
    desc.MiscFlags = 0;

    {D3D11_SUBRESOURCE_DATA data;
    data.pSysMem = matrix;
    data.SysMemPitch = 0;
    data.SysMemSlicePitch = 0;

    nk_d3d11_get_projection_matrix(width, height, matrix);
    hr = ID3D11Device_CreateBuffer(device, &desc, &data, &d3d11.const_buffer);
    NK_ASSERT(SUCCEEDED(hr));}}

    /* pixel shader */
    {hr = ID3D11Device_CreatePixelShader(device, nk_d3d11_pixel_shader, sizeof(nk_d3d11_pixel_shader), NULL, &d3d11.pixel_shader);
    NK_ASSERT(SUCCEEDED(hr));}

    {/* blend state */
    D3D11_BLEND_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.AlphaToCoverageEnable = FALSE;
    desc.RenderTarget[0].BlendEnable = TRUE;
    desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
    desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
    desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
    desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
    desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
    desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
    desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
    hr = ID3D11Device_CreateBlendState(device, &desc, &d3d11.blend_state);
    NK_ASSERT(SUCCEEDED(hr));}

    /* vertex buffer */
    {D3D11_BUFFER_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.Usage = D3D11_USAGE_DYNAMIC;
    desc.ByteWidth = max_vertex_buffer;
    desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
    desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
    desc.MiscFlags = 0;
    hr = ID3D11Device_CreateBuffer(device, &desc, NULL, &d3d11.vertex_buffer);
    NK_ASSERT(SUCCEEDED(hr));}

    /* index buffer */
    {D3D11_BUFFER_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.Usage = D3D11_USAGE_DYNAMIC;
    desc.ByteWidth = max_index_buffer;
    desc.BindFlags = D3D11_BIND_INDEX_BUFFER;
    desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
    hr = ID3D11Device_CreateBuffer(device, &desc, NULL, &d3d11.index_buffer);
    NK_ASSERT(SUCCEEDED(hr));}

    /* sampler state */
    {D3D11_SAMPLER_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
    desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
    desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
    desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
    desc.MipLODBias = 0.0f;
    desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
    desc.MinLOD = 0.0f;
    desc.MaxLOD = FLT_MAX;
    hr = ID3D11Device_CreateSamplerState(device, &desc, &d3d11.sampler_state);
    NK_ASSERT(SUCCEEDED(hr));}

    /* viewport */
    {d3d11.viewport.TopLeftX = 0.0f;
    d3d11.viewport.TopLeftY = 0.0f;
    d3d11.viewport.Width = (float)width;
    d3d11.viewport.Height = (float)height;
    d3d11.viewport.MinDepth = 0.0f;
    d3d11.viewport.MaxDepth = 1.0f;}
    return &d3d11.ctx;
}

NK_API void
nk_d3d11_font_stash_begin(struct nk_font_atlas **atlas)
{
    nk_font_atlas_init_default(&d3d11.atlas);
    nk_font_atlas_begin(&d3d11.atlas);
    *atlas = &d3d11.atlas;
}

NK_API void
nk_d3d11_font_stash_end(void)
{
    const void *image; int w, h;
    image = nk_font_atlas_bake(&d3d11.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);

    /* upload font to texture and create texture view */
    {ID3D11Texture2D *font_texture;
    HRESULT hr;

    D3D11_TEXTURE2D_DESC desc;
    memset(&desc, 0, sizeof(desc));
    desc.Width = (UINT)w;
    desc.Height = (UINT)h;
    desc.MipLevels = 1;
    desc.ArraySize = 1;
    desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    desc.SampleDesc.Count = 1;
    desc.SampleDesc.Quality = 0;
    desc.Usage = D3D11_USAGE_DEFAULT;
    desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
    desc.CPUAccessFlags = 0;

    {D3D11_SUBRESOURCE_DATA data;
    data.pSysMem = image;
    data.SysMemPitch = (UINT)(w * 4);
    data.SysMemSlicePitch = 0;
    hr = ID3D11Device_CreateTexture2D(d3d11.device, &desc, &data, &font_texture);
    assert(SUCCEEDED(hr));}

    {D3D11_SHADER_RESOURCE_VIEW_DESC srv;
    memset(&srv, 0, sizeof(srv));
    srv.Format = desc.Format;
    srv.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
    srv.Texture2D.MipLevels = 1;
    srv.Texture2D.MostDetailedMip = 0;
    hr = ID3D11Device_CreateShaderResourceView(d3d11.device, (ID3D11Resource *)font_texture, &srv, &d3d11.font_texture_view);
    assert(SUCCEEDED(hr));}
    ID3D11Texture2D_Release(font_texture);}

    nk_font_atlas_end(&d3d11.atlas, nk_handle_ptr(d3d11.font_texture_view), &d3d11.null);
    if (d3d11.atlas.default_font)
        nk_style_set_font(&d3d11.ctx, &d3d11.atlas.default_font->handle);
}

NK_API
void nk_d3d11_shutdown(void)
{
    nk_font_atlas_clear(&d3d11.atlas);
    nk_buffer_free(&d3d11.cmds);
    nk_free(&d3d11.ctx);

    ID3D11SamplerState_Release(d3d11.sampler_state);
    ID3D11ShaderResourceView_Release(d3d11.font_texture_view);
    ID3D11Buffer_Release(d3d11.vertex_buffer);
    ID3D11Buffer_Release(d3d11.index_buffer);
    ID3D11BlendState_Release(d3d11.blend_state);
    ID3D11PixelShader_Release(d3d11.pixel_shader);
    ID3D11Buffer_Release(d3d11.const_buffer);
    ID3D11VertexShader_Release(d3d11.vertex_shader);
    ID3D11InputLayout_Release(d3d11.input_layout);
    ID3D11RasterizerState_Release(d3d11.rasterizer_state);
    ID3D11Device_Release(d3d11.device);
}

#endif



================================================
FILE: demo/d3d11/nuklear_d3d11.hlsl
================================================
//
cbuffer buffer0 : register(b0)
{
  float4x4 ProjectionMatrix;
};

sampler sampler0 : register(s0);
Texture2D<float4> texture0 : register(t0);

struct VS_INPUT
{
  float2 pos : POSITION;
  float4 col : COLOR0;
  float2 uv  : TEXCOORD0;
};

struct PS_INPUT
{
  float4 pos : SV_POSITION;
  float4 col : COLOR0;
  float2 uv  : TEXCOORD0;
};

PS_INPUT vs(VS_INPUT input)
{
  PS_INPUT output;
  output.pos = mul(ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));
  output.col = input.col;
  output.uv  = input.uv;
  return output;
}

float4 ps(PS_INPUT input) : SV_Target
{
  return input.col * texture0.Sample(sampler0, input.uv);
}


================================================
FILE: demo/d3d11/nuklear_d3d11_pixel_shader.h
================================================
#if 0
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
//
// Sampler/Resource to DX9 shader sampler mappings:
//
// Target Sampler Source Sampler  Source Resource
// -------------- --------------- ----------------
// s0             s0              t0               
//
//
// Level9 shader bytecode:
//
    ps_2_0
    dcl t0
    dcl t1.xy
    dcl_2d s0
    texld r0, t1, s0
    mul r0, r0, t0
    mov oC0, r0

// approximately 3 instruction slots used (1 texture, 2 arithmetic)
//
// Sampler/Resource to DX9 shader sampler mappings:
//
// Target Sampler Source Sampler  Source Resource
// -------------- --------------- ----------------
// s0             s0              t0               
//
//
// XNA shader bytecode:
//
    ps_2_0
    dcl t0
    dcl t1.xy
    dcl_2d s0
    texld r0, r2, s0
    mul oC0, r0, r1

// approximately 2 instruction slots used (1 texture, 1 arithmetic)
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v2.xyxx, t0.xyzw, s0
mul o0.xyzw, r0.xyzw, v1.xyzw
ret 
// Approximately 0 instruction slots used
#endif

const BYTE nk_d3d11_pixel_shader[] =
{
     68,  88,  66,  67, 249,  46, 
     26,  75, 111, 182, 161, 241, 
    199, 179, 191,  89,  44, 229, 
    245, 103,   1,   0,   0,   0, 
    124,   2,   0,   0,   5,   0, 
      0,   0,  52,   0,   0,   0, 
    176,   0,   0,   0,  56,   1, 
      0,   0, 212,   1,   0,   0, 
     72,   2,   0,   0,  88,  78, 
     65,  83, 116,   0,   0,   0, 
    116,   0,   0,   0,   0,   2, 
    255, 255,  76,   0,   0,   0, 
     40,   0,   0,   0,   0,   0, 
     40,   0,   0,   0,  40,   0, 
      0,   0,  40,   0,   1,   0, 
     36,   0,   0,   0,  40,   0, 
      0,   0,   0,   0,   0,   2, 
    255, 255,  31,   0,   0,   2, 
      0,   0,   0, 128,   0,   0, 
     15, 176,  31,   0,   0,   2, 
      0,   0,   0, 128,   1,   0, 
      3, 176,  31,   0,   0,   2, 
      0,   0,   0, 144,   0,   8, 
     15, 160,  66,   0,   0,   3, 
      0,   0,  15, 128,   2,   0, 
    228, 128,   0,   8, 228, 160, 
      5,   0,   0,   3,   0,   8, 
     15, 128,   0,   0, 228, 128, 
      1,   0, 228, 128, 255, 255, 
      0,   0,  65, 111, 110,  57, 
    128,   0,   0,   0, 128,   0, 
      0,   0,   0,   2, 255, 255, 
     88,   0,   0,   0,  40,   0, 
      0,   0,   0,   0,  40,   0, 
      0,   0,  40,   0,   0,   0, 
     40,   0,   1,   0,  36,   0, 
      0,   0,  40,   0,   0,   0, 
      0,   0,   0,   2, 255, 255, 
     31,   0,   0,   2,   0,   0, 
      0, 128,   0,   0,  15, 176, 
     31,   0,   0,   2,   0,   0, 
      0, 128,   1,   0,   3, 176, 
     31,   0,   0,   2,   0,   0, 
      0, 144,   0,   8,  15, 160, 
     66,   0,   0,   3,   0,   0, 
     15, 128,   1,   0, 228, 176, 
      0,   8, 228, 160,   5,   0, 
      0,   3,   0,   0,  15, 128, 
      0,   0, 228, 128,   0,   0, 
    228, 176,   1,   0,   0,   2, 
      0,   8,  15, 128,   0,   0, 
    228, 128, 255, 255,   0,   0, 
     83,  72,  68,  82, 148,   0, 
      0,   0,  64,   0,   0,   0, 
     37,   0,   0,   0,  90,   0, 
      0,   3,   0,  96,  16,   0, 
      0,   0,   0,   0,  88,  24, 
      0,   4,   0, 112,  16,   0, 
      0,   0,   0,   0,  85,  85, 
      0,   0,  98,  16,   0,   3, 
    242,  16,  16,   0,   1,   0, 
      0,   0,  98,  16,   0,   3, 
     50,  16,  16,   0,   2,   0, 
      0,   0, 101,   0,   0,   3, 
    242,  32,  16,   0,   0,   0, 
      0,   0, 104,   0,   0,   2, 
      1,   0,   0,   0,  69,   0, 
      0,   9, 242,   0,  16,   0, 
      0,   0,   0,   0,  70,  16, 
     16,   0,   2,   0,   0,   0, 
     70, 126,  16,   0,   0,   0, 
      0,   0,   0,  96,  16,   0, 
      0,   0,   0,   0,  56,   0, 
      0,   7, 242,  32,  16,   0, 
      0,   0,   0,   0,  70,  14, 
     16,   0,   0,   0,   0,   0, 
     70,  30,  16,   0,   1,   0, 
      0,   0,  62,   0,   0,   1, 
     73,  83,  71,  78, 108,   0, 
      0,   0,   3,   0,   0,   0, 
      8,   0,   0,   0,  80,   0, 
      0,   0,   0,   0,   0,   0, 
      1,   0,   0,   0,   3,   0, 
      0,   0,   0,   0,   0,   0, 
     15,   0,   0,   0,  92,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   3,   0, 
      0,   0,   1,   0,   0,   0, 
     15,  15,   0,   0,  98,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   3,   0, 
      0,   0,   2,   0,   0,   0, 
      3,   3,   0,   0,  83,  86, 
     95,  80,  79,  83,  73,  84, 
     73,  79,  78,   0,  67,  79, 
     76,  79,  82,   0,  84,  69, 
     88,  67,  79,  79,  82,  68, 
      0, 171,  79,  83,  71,  78, 
     44,   0,   0,   0,   1,   0, 
      0,   0,   8,   0,   0,   0, 
     32,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
      3,   0,   0,   0,   0,   0, 
      0,   0,  15,   0,   0,   0, 
     83,  86,  95,  84,  97, 114, 
    103, 101, 116,   0, 171, 171
};


================================================
FILE: demo/d3d11/nuklear_d3d11_vertex_shader.h
================================================
#if 0
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE   float   xy  
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy  
//
//
// Constant buffer to DX9 shader constant mappings:
//
// Target Reg Buffer  Start Reg # of Regs        Data Conversion
// ---------- ------- --------- --------- ----------------------
// c1         cb0             0         4  ( FLT, FLT, FLT, FLT)
//
//
// Runtime generated constant mappings:
//
// Target Reg                               Constant Description
// ---------- --------------------------------------------------
// c0                              Vertex Shader position offset
//
//
// Level9 shader bytecode:
//
    vs_2_0
    def c5, 0, 1, 0, 0
    dcl_texcoord v0
    dcl_texcoord1 v1
    dcl_texcoord2 v2
    mul r0, v0.x, c1
    mad r0, c2, v0.y, r0
    mov r1.xy, c5
    mad r0, c3, r1.x, r0
    mad r0, c4, r1.y, r0
    mul r1.xy, r0.w, c0
    add oPos.xy, r0, r1
    mov oPos.zw, r0
    mov oT0, v1
    mov oT1.xy, v2

// approximately 10 instruction slots used
//
// Constant buffer to DX9 shader constant mappings:
//
// Target Reg Buffer  Start Reg # of Regs        Data Conversion
// ---------- ------- --------- --------- ----------------------
// c0         cb0             0         4  ( FLT, FLT, FLT, FLT)
//
//
// XNA Prepass shader bytecode:
//
    vs_2_0
    def c4, 0, 1, 0, 0
    dcl_texcoord v0
    mul r1, r0.x, c0
    mad r0, c1, r0.y, r1
    mov r1.xy, c4
    mad r0, c2, r1.x, r0
    mad r0, c3, r1.y, r0
    mov oPos, r0

// approximately 6 instruction slots used
//
// Constant buffer to DX9 shader constant mappings:
//
// Target Reg Buffer  Start Reg # of Regs        Data Conversion
// ---------- ------- --------- --------- ----------------------
// c0         cb0             0         4  ( FLT, FLT, FLT, FLT)
//
//
// XNA shader bytecode:
//
    vs_2_0
    def c4, 0, 1, 0, 0
    dcl_texcoord v0
    dcl_texcoord1 v1
    dcl_texcoord2 v2
    mov oT0, r1
    mov oT1.xy, r2
    mul r1, r0.x, c0
    mad r0, c1, r0.y, r1
    mov r1.xy, c4
    mad r0, c2, r1.x, r0
    mad r0, c3, r1.y, r0
    mov oPos, r0

// approximately 8 instruction slots used
vs_4_0
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xy
dcl_input v1.xyzw
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_temps 1
mul r0.xyzw, v0.xxxx, cb0[0].xyzw
mad r0.xyzw, cb0[1].xyzw, v0.yyyy, r0.xyzw
mad r0.xyzw, cb0[2].xyzw, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzw
mad o0.xyzw, cb0[3].xyzw, l(1.000000, 1.000000, 1.000000, 1.000000), r0.xyzw
mov o1.xyzw, v1.xyzw
mov o2.xy, v2.xyxx
ret 
// Approximately 0 instruction slots used
#endif

const BYTE nk_d3d11_vertex_shader[] =
{
     68,  88,  66,  67, 215, 245, 
     86, 155, 188, 117,  37, 118, 
    193, 207, 209,  90, 160, 153, 
    246, 188,   1,   0,   0,   0, 
     72,   5,   0,   0,   6,   0, 
      0,   0,  56,   0,   0,   0, 
     48,   1,   0,   0, 248,   1, 
      0,   0,  20,   3,   0,   0, 
    100,   4,   0,   0, 212,   4, 
      0,   0,  88,  78,  65,  83, 
    240,   0,   0,   0, 240,   0, 
      0,   0,   0,   2, 254, 255, 
    192,   0,   0,   0,  48,   0, 
      0,   0,   1,   0,  36,   0, 
      0,   0,  48,   0,   0,   0, 
     48,   0,   0,   0,  36,   0, 
      0,   0,  48,   0,   0,   0, 
      0,   0,   4,   0,   0,   0, 
      0,   0,   0,   0,   0,   2, 
    254, 255,  81,   0,   0,   5, 
      4,   0,  15, 160,   0,   0, 
      0,   0,   0,   0, 128,  63, 
      0,   0,   0,   0,   0,   0, 
      0,   0,  31,   0,   0,   2, 
      5,   0,   0, 128,   0,   0, 
     15, 144,  31,   0,   0,   2, 
      5,   0,   1, 128,   1,   0, 
     15, 144,  31,   0,   0,   2, 
      5,   0,   2, 128,   2,   0, 
     15, 144,   1,   0,   0,   2, 
      0,   0,  15, 224,   1,   0, 
    228, 128,   1,   0,   0,   2, 
      1,   0,   3, 224,   2,   0, 
    228, 128,   5,   0,   0,   3, 
      1,   0,  15, 128,   0,   0, 
      0, 128,   0,   0, 228, 160, 
      4,   0,   0,   4,   0,   0, 
     15, 128,   1,   0, 228, 160, 
      0,   0,  85, 128,   1,   0, 
    228, 128,   1,   0,   0,   2, 
      1,   0,   3, 128,   4,   0, 
    228, 160,   4,   0,   0,   4, 
      0,   0,  15, 128,   2,   0, 
    228, 160,   1,   0,   0, 128, 
      0,   0, 228, 128,   4,   0, 
      0,   4,   0,   0,  15, 128, 
      3,   0, 228, 160,   1,   0, 
     85, 128,   0,   0, 228, 128, 
      1,   0,   0,   2,   0,   0, 
     15, 192,   0,   0, 228, 128, 
    255, 255,   0,   0,  88,  78, 
     65,  80, 192,   0,   0,   0, 
    192,   0,   0,   0,   0,   2, 
    254, 255, 144,   0,   0,   0, 
     48,   0,   0,   0,   1,   0, 
     36,   0,   0,   0,  48,   0, 
      0,   0,  48,   0,   0,   0, 
     36,   0,   0,   0,  48,   0, 
      0,   0,   0,   0,   4,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   2, 254, 255,  81,   0, 
      0,   5,   4,   0,  15, 160, 
      0,   0,   0,   0,   0,   0, 
    128,  63,   0,   0,   0,   0, 
      0,   0,   0,   0,  31,   0, 
      0,   2,   5,   0,   0, 128, 
      0,   0,  15, 144,   5,   0, 
      0,   3,   1,   0,  15, 128, 
      0,   0,   0, 128,   0,   0, 
    228, 160,   4,   0,   0,   4, 
      0,   0,  15, 128,   1,   0, 
    228, 160,   0,   0,  85, 128, 
      1,   0, 228, 128,   1,   0, 
      0,   2,   1,   0,   3, 128, 
      4,   0, 228, 160,   4,   0, 
      0,   4,   0,   0,  15, 128, 
      2,   0, 228, 160,   1,   0, 
      0, 128,   0,   0, 228, 128, 
      4,   0,   0,   4,   0,   0, 
     15, 128,   3,   0, 228, 160, 
      1,   0,  85, 128,   0,   0, 
    228, 128,   1,   0,   0,   2, 
      0,   0,  15, 192,   0,   0, 
    228, 128, 255, 255,   0,   0, 
     65, 111, 110,  57,  20,   1, 
      0,   0,  20,   1,   0,   0, 
      0,   2, 254, 255, 224,   0, 
      0,   0,  52,   0,   0,   0, 
      1,   0,  36,   0,   0,   0, 
     48,   0,   0,   0,  48,   0, 
      0,   0,  36,   0,   1,   0, 
     48,   0,   0,   0,   0,   0, 
      4,   0,   1,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   2, 254, 255,  81,   0, 
      0,   5,   5,   0,  15, 160, 
      0,   0,   0,   0,   0,   0, 
    128,  63,   0,   0,   0,   0, 
      0,   0,   0,   0,  31,   0, 
      0,   2,   5,   0,   0, 128, 
      0,   0,  15, 144,  31,   0, 
      0,   2,   5,   0,   1, 128, 
      1,   0,  15, 144,  31,   0, 
      0,   2,   5,   0,   2, 128, 
      2,   0,  15, 144,   5,   0, 
      0,   3,   0,   0,  15, 128, 
      0,   0,   0, 144,   1,   0, 
    228, 160,   4,   0,   0,   4, 
      0,   0,  15, 128,   2,   0, 
    228, 160,   0,   0,  85, 144, 
      0,   0, 228, 128,   1,   0, 
      0,   2,   1,   0,   3, 128, 
      5,   0, 228, 160,   4,   0, 
      0,   4,   0,   0,  15, 128, 
      3,   0, 228, 160,   1,   0, 
      0, 128,   0,   0, 228, 128, 
      4,   0,   0,   4,   0,   0, 
     15, 128,   4,   0, 228, 160, 
      1,   0,  85, 128,   0,   0, 
    228, 128,   5,   0,   0,   3, 
      1,   0,   3, 128,   0,   0, 
    255, 128,   0,   0, 228, 160, 
      2,   0,   0,   3,   0,   0, 
      3, 192,   0,   0, 228, 128, 
      1,   0, 228, 128,   1,   0, 
      0,   2,   0,   0,  12, 192, 
      0,   0, 228, 128,   1,   0, 
      0,   2,   0,   0,  15, 224, 
      1,   0, 228, 144,   1,   0, 
      0,   2,   1,   0,   3, 224, 
      2,   0, 228, 144, 255, 255, 
      0,   0,  83,  72,  68,  82, 
     72,   1,   0,   0,  64,   0, 
      1,   0,  82,   0,   0,   0, 
     89,   0,   0,   4,  70, 142, 
     32,   0,   0,   0,   0,   0, 
      4,   0,   0,   0,  95,   0, 
      0,   3,  50,  16,  16,   0, 
      0,   0,   0,   0,  95,   0, 
      0,   3, 242,  16,  16,   0, 
      1,   0,   0,   0,  95,   0, 
      0,   3,  50,  16,  16,   0, 
      2,   0,   0,   0, 103,   0, 
      0,   4, 242,  32,  16,   0, 
      0,   0,   0,   0,   1,   0, 
      0,   0, 101,   0,   0,   3, 
    242,  32,  16,   0,   1,   0, 
      0,   0, 101,   0,   0,   3, 
     50,  32,  16,   0,   2,   0, 
      0,   0, 104,   0,   0,   2, 
      1,   0,   0,   0,  56,   0, 
      0,   8, 242,   0,  16,   0, 
      0,   0,   0,   0,   6,  16, 
     16,   0,   0,   0,   0,   0, 
     70, 142,  32,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
     50,   0,   0,  10, 242,   0, 
     16,   0,   0,   0,   0,   0, 
     70, 142,  32,   0,   0,   0, 
      0,   0,   1,   0,   0,   0, 
     86,  21,  16,   0,   0,   0, 
      0,   0,  70,  14,  16,   0, 
      0,   0,   0,   0,  50,   0, 
      0,  13, 242,   0,  16,   0, 
      0,   0,   0,   0,  70, 142, 
     32,   0,   0,   0,   0,   0, 
      2,   0,   0,   0,   2,  64, 
      0,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
     70,  14,  16,   0,   0,   0, 
      0,   0,  50,   0,   0,  13, 
    242,  32,  16,   0,   0,   0, 
      0,   0,  70, 142,  32,   0, 
      0,   0,   0,   0,   3,   0, 
      0,   0,   2,  64,   0,   0, 
      0,   0, 128,  63,   0,   0, 
    128,  63,   0,   0, 128,  63, 
      0,   0, 128,  63,  70,  14, 
     16,   0,   0,   0,   0,   0, 
     54,   0,   0,   5, 242,  32, 
     16,   0,   1,   0,   0,   0, 
     70,  30,  16,   0,   1,   0, 
      0,   0,  54,   0,   0,   5, 
     50,  32,  16,   0,   2,   0, 
      0,   0,  70,  16,  16,   0, 
      2,   0,   0,   0,  62,   0, 
      0,   1,  73,  83,  71,  78, 
    104,   0,   0,   0,   3,   0, 
      0,   0,   8,   0,   0,   0, 
     80,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
      3,   0,   0,   0,   0,   0, 
      0,   0,   3,   3,   0,   0, 
     89,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
      3,   0,   0,   0,   1,   0, 
      0,   0,  15,  15,   0,   0, 
     95,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   0,   0, 
      3,   0,   0,   0,   2,   0, 
      0,   0,   3,   3,   0,   0, 
     80,  79,  83,  73,  84,  73, 
     79,  78,   0,  67,  79,  76, 
     79,  82,   0,  84,  69,  88, 
     67,  79,  79,  82,  68,   0, 
     79,  83,  71,  78, 108,   0, 
      0,   0,   3,   0,   0,   0, 
      8,   0,   0,   0,  80,   0, 
      0,   0,   0,   0,   0,   0, 
      1,   0,   0,   0,   3,   0, 
      0,   0,   0,   0,   0,   0, 
     15,   0,   0,   0,  92,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   3,   0, 
      0,   0,   1,   0,   0,   0, 
     15,   0,   0,   0,  98,   0, 
      0,   0,   0,   0,   0,   0, 
      0,   0,   0,   0,   3,   0, 
      0,   0,   2,   0,   0,   0, 
      3,  12,   0,   0,  83,  86, 
     95,  80,  79,  83,  73,  84, 
     73,  79,  78,   0,  67,  79, 
     76,  79,  82,   0,  84,  69, 
     88,  67,  79,  79,  82,  68, 
      0, 171
};


================================================
FILE: demo/d3d9/build.bat
================================================
@echo off

rem This will use VS2015 for compiler
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

cl /D_CRT_SECURE_NO_DEPRECATE /nologo /W3 /O2 /fp:fast /Gm- /Fedemo.exe main.c user32.lib d3d9.lib /link /incremental:no


================================================
FILE: demo/d3d9/main.c
================================================
/* nuklear - 1.32.0 - public domain */
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d9.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <time.h>

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600

#define NK_INCLUDE_FIXED_TYPES
#define NK_INCLUDE_STANDARD_IO
#define NK_INCLUDE_STANDARD_VARARGS
#define NK_INCLUDE_DEFAULT_ALLOCATOR
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
#define NK_INCLUDE_FONT_BAKING
#define NK_INCLUDE_DEFAULT_FONT
#define NK_IMPLEMENTATION
#define NK_D3D9_IMPLEMENTATION
#include "../../nuklear.h"
#include "nuklear_d3d9.h"

/* ===============================================================
 *
 *                          EXAMPLE
 *
 * ===============================================================*/
/* This are some code examples to provide a small overview of what can be
 * done with this library. To try out an example uncomment the defines */
/*#define INCLUDE_ALL */
/*#define INCLUDE_STYLE */
/*#define INCLUDE_CALCULATOR */
/*#define INCLUDE_OVERVIEW */
/*#define INCLUDE_NODE_EDITOR */

#ifdef INCLUDE_ALL
  #define INCLUDE_STYLE
  #define INCLUDE_CALCULATOR
  #define INCLUDE_OVERVIEW
  #define INCLUDE_NODE_EDITOR
#endif

#ifdef INCLUDE_STYLE
  #include "../style.c"
#endif
#ifdef INCLUDE_CALCULATOR
  #include "../calculator.c"
#endif
#ifdef INCLUDE_OVERVIEW
  #include "../overview.c"
#endif
#ifdef INCLUDE_NODE_EDITOR
  #include "../node_editor.c"
#endif

/* ===============================================================
 *
 *                          DEMO
 *
 * ===============================================================*/
static IDirect3DDevice9 *device;
static IDirect3DDevice9Ex *deviceEx;
static D3DPRESENT_PARAMETERS present;

static LRESULT CALLBACK
WindowProc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_DESTROY:
        PostQuitMessage(0);
        return 0;

    case WM_SIZE:
        if (device)
        {
            UINT width = LOWORD(lparam);
            UINT height = HIWORD(lparam);
            if (width != 0 && height != 0 &&
                (width != present.BackBufferWidth || height != present.BackBufferHeight))
            {
                nk_d3d9_release();
                present.BackBufferWidth = width;
                present.BackBufferHeight = height;
                HRESULT hr = IDirect3DDevice9_Reset(device, &present);
                NK_ASSERT(SUCCEEDED(hr));
                nk_d3d9_resize(width, height);
            }
        }
        break;
    }

    if (nk_d3d9_handle_event(wnd, msg, wparam, lparam))
        return 0;

    return DefWindowProcW(wnd, msg, wparam, lparam);
}

static void create_d3d9_device(HWND wnd)
{
    HRESULT hr;

    present.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
    present.BackBufferWidth = WINDOW_WIDTH;
    present.BackBufferHeight = WINDOW_HEIGHT;
    present.BackBufferFormat = D3DFMT_X8R8G8B8;
    present.BackBufferCount = 1;
    present.MultiSampleType = D3DMULTISAMPLE_NONE;
    present.SwapEffect = D3DSWAPEFFECT_DISCARD;
    present.hDeviceWindow = wnd;
    present.EnableAutoDepthStencil = TRUE;
    present.AutoDepthStencilFormat = D3DFMT_D24S8;
    present.Flags = D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL;
    present.Windowed = TRUE;

    {/* first try to create Direct3D9Ex device if possible (on Windows 7+) */
        typedef HRESULT WINAPI Direct3DCreate9ExPtr(UINT, IDirect3D9Ex**);
        Direct3DCreate9ExPtr *Direct3DCreate9Ex = (void *)GetProcAddress(GetModuleHandleA("d3d9.dll"), "Direct3DCreate9Ex");
        if (Direct3DCreate9Ex) {
            IDirect3D9Ex *d3d9ex;
            if (SUCCEEDED(Direct3DCreate9Ex(D3D_SDK_VERSION, &d3d9ex))) {
                hr = IDirect3D9Ex_CreateDeviceEx(d3d9ex, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd,
                    D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE | D3DCREATE_FPU_PRESERVE,
                    &present, NULL, &deviceEx);
                if (SUCCEEDED(hr)) {
                    device = (IDirect3DDevice9 *)deviceEx;
                } else {
                    /* hardware vertex processing not supported, no big deal
                    retry with software vertex processing */
                    hr = IDirect3D9Ex_CreateDeviceEx(d3d9ex, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd,
                        D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE | D3DCREATE_FPU_PRESERVE,
                        &present, NULL, &deviceEx);
                    if (SUCCEEDED(hr)) {
                        device = (IDirect3DDevice9 *)deviceEx;
                    }
                }
                IDirect3D9Ex_Release(d3d9ex);
            }
        }
    }

    if (!device) {
        /* otherwise do regular D3D9 setup */
        IDirect3D9 *d3d9 = Direct3DCreate9(D3D_SDK_VERSION);

        hr = IDirect3D9_CreateDevice(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd,
            D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE | D3DCREATE_FPU_PRESERVE,
            &present, &device);
        if (FAILED(hr)) {
            /* hardware vertex processing not supported, no big deal
            retry with software vertex processing */
            hr = IDirect3D9_CreateDevice(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd,
                D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE | D3DCREATE_FPU_PRESERVE,
                &present, &device);
            NK_ASSERT(SUCCEEDED(hr));
        }
        IDirect3D9_Release(d3d9);
    }
}

int main(void)
{
    struct nk_context *ctx;
    struct nk_colorf bg;

    WNDCLASSW wc;
    RECT rect = { 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT };
    DWORD style = WS_OVERLAPPEDWINDOW;
    DWORD exstyle = WS_EX_APPWINDOW;
    HWND wnd;
    int running = 1;

    /* Win32 */
    memset(&wc, 0, sizeof(wc));
    wc.style = CS_DBLCLKS;
    wc.lpfnWndProc = WindowProc;
    wc.hInstance = GetModuleHandleW(0);
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.lpszClassName = L"NuklearWindowClass";
    RegisterClassW(&wc);

    AdjustWindowRectEx(&rect, style, FALSE, exstyle);

    wnd = CreateWindowExW(exstyle, wc.lpszClassName, L"Nuklear Demo",
        style | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT,
        rect.right - rect.left, rect.bottom - rect.top,
        NULL, NULL, wc.hInstance, NULL);

    create_d3d9_device(wnd);

    /* GUI */
    ctx = nk_d3d9_init(device, WINDOW_WIDTH, WINDOW_HEIGHT);
    /* Load Fonts: if none of these are loaded a default font will be used  */
    /* Load Cursor: if you uncomment cursor loading please hide the cursor */
    {struct nk_font_atlas *atlas;
    nk_d3d9_font_stash_begin(&atlas);
    /*struct nk_font *droid = nk_font_atlas_add_from_file(atlas, "../../extra_font/DroidSans.ttf", 14, 0);*/
    /*struct nk_font *robot = nk_font_atlas_add_from_file(atlas, "../../extra_font/Roboto-Regular.ttf", 14, 0);*/
    /*struct nk_font *future = nk_font_atlas_add_from_file(atlas, "../../extra_font/kenvector_future_thin.ttf", 13, 0);*/
    /*struct nk_font *clean = nk_font_atlas_add_from_file(atlas, "../../extra_font/ProggyClean.ttf", 12, 0);*/
    /*struct nk_font *tiny = nk_font_atlas_add_from_file(atlas, "../../extra_font/ProggyTiny.ttf", 10, 0);*/
    /*struct nk_font *cousine = nk_font_atlas_add_from_file(atlas, "../../extra_font/Cousine-Regular.ttf", 13, 0);*/
    nk_d3d9_font_stash_end();
    /*nk_style_load_all_cursors(ctx, atlas->cursors);*/
    /*nk_style_set_font(ctx, &droid->handle)*/;}

    /* style.c */
    #ifdef INCLUDE_STYLE
    /*set_style(ctx, THEME_WHITE);*/
    /*set_style(ctx, THEME_RED);*/
    /*set_style(ctx, THEME_BLUE);*/
    /*set_style(ctx, THEME_DARK);*/
    #endif

    bg.r = 0.10f, bg.g = 0.18f, bg.b = 0.24f, bg.a = 1.0f;
    while (running)
    {
        /* Input */
        MSG msg;
        nk_input_begin(ctx);
        while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) {
            if (msg.message == WM_QUIT)
                running = 0;
            TranslateMessage(&msg);
            DispatchMessageW(&msg);
        }
        nk_input_end(ctx);

        /* GUI */
        if (nk_begin(ctx, "Demo", nk_rect(50, 50, 230, 250),
            NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
            NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE))
        {
            enum {EASY, HARD};
            static int op = EASY;
            static int property = 20;

            nk_layout_row_static(ctx, 30, 80, 1);
            if (nk_button_label(ctx, "button"))
                fprintf(stdout, "button pressed\n");
            nk_layout_row_dynamic(ctx, 30, 2);
            if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
            if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
            nk_layout_row_dynamic(ctx, 22, 1);
            nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);

            nk_layout_row_dynamic(ctx, 20, 1);
            nk_label(ctx, "background:", NK_TEXT_LEFT);
            nk_layout_row_dynamic(ctx, 25, 1);
            if (nk_combo_begin_color(ctx, nk_rgb_cf(bg), nk_vec2(nk_widget_width(ctx),400))) {
                nk_layout_row_dynamic(ctx, 120, 1);
                bg = nk_color_picker(ctx, bg, NK_RGBA);
                nk_layout_row_dynamic(ctx, 25, 1);
                bg.r = nk_propertyf(ctx, "#R:", 0, bg.r, 1.0f, 0.01f,0.005f);
                bg.g = nk_propertyf(ctx, "#G:", 0, bg.g, 1.0f, 0.01f,0.005f);
                bg.b = nk_propertyf(ctx, "#B:", 0, bg.b, 1.0f, 0.01f,0.005f);
                bg.a = nk_propertyf(ctx, "#A:", 0, bg.a, 1.0f, 0.01f,0.005f);
                nk_combo_end(ctx);
            }
        }
        nk_end(ctx);

        /* -------------- EXAMPLES ---------------- */
        #ifdef INCLUDE_CALCULATOR
          calculator(ctx);
        #endif
        #ifdef INCLUDE_OVERVIEW
          overview(ctx);
        #endif
        #ifdef INCLUDE_NODE_EDITOR
          node_editor(ctx);
        #endif
        /* ----------------------------------------- */

        /* Draw */
        {
            HRESULT hr;
            hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER | D3DCLEAR_STENCIL,
                D3DCOLOR_COLORVALUE(bg.r, bg.g, bg.b, bg.a), 0.0f, 0);
            NK_ASSERT(SUCCEEDED(hr));

            hr = IDirect3DDevice9_BeginScene(device);
            NK_ASSERT(SUCCEEDED(hr));
            nk_d3d9_render(NK_ANTI_ALIASING_ON);
            hr = IDirect3DDevice9_EndScene(device);
            NK_ASSERT(SUCCEEDED(hr));

            if (deviceEx) {
                hr = IDirect3DDevice9Ex_PresentEx(deviceEx, NULL, NULL, NULL, NULL, 0);
            } else {
                hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
            }
            if (hr == D3DERR_DEVICELOST || hr == D3DERR_DEVICEHUNG || hr == D3DERR_DEVICEREMOVED) {
                /* to recover from this, you'll need to recreate device and all the resources */
                MessageBoxW(NULL, L"D3D9 device is lost or removed!", L"Error", 0);
                break;
            } else if (hr == S_PRESENT_OCCLUDED) {
                /* window is not visible, so vsync won't work. Let's sleep a bit to reduce CPU usage */
                Sleep(10);
            }
            NK_ASSERT(SUCCEEDED(hr));
        }
    }
    nk_d3d9_shutdown();
    if (deviceEx)IDirect3DDevice9Ex_Release(deviceEx);
    else IDirect3DDevice9_Release(device);
    UnregisterClassW(wc.lpszClassName, wc.hInstance);
    return 0;
}


================================================
FILE: demo/d3d9/nuklear_d3d9.h
================================================
/*
 * Nuklear - 1.32.0 - public domain
 * no warrenty implied; use at your own risk.
 * authored from 2015-2016 by Micha Mettke
 */
/*
 * ==============================================================
 *
 *                              API
 *
 * ===============================================================
 */
#ifndef NK_D3D9_H_
#define NK_D3D9_H_

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

typedef struct IDirect3DDevice9 IDirect3DDevice9;

NK_API struct nk_context *nk_d3d9_init(IDirect3DDevice9 *device, int width, int height);
NK_API void nk_d3d9_font_stash_begin(struct nk_font_atlas **atlas);
NK_API void nk_d3d9_font_stash_end(void);
NK_API int nk_d3d9_handle_event(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
NK_API void nk_d3d9_render(enum nk_anti_aliasing);
NK_API void nk_d3d9_release(void);
NK_API void nk_d3d9_resize(int width, int height);
NK_API void nk_d3d9_shutdown(void);

#endif
/*
 * ==============================================================
 *
 *                          IMPLEMENTATION
 *
 * ===============================================================
 */
#ifdef NK_D3D9_IMPLEMENTATION

#define WIN32_LEAN_AND_MEAN
#define COBJMACROS
#include <d3d9.h>

#include <stddef.h>
#include <string.h>

struct nk_d3d9_vertex {
    /* D3d9 FFP requires three coordinate position, but nuklear writes only 2 elements
       projection matrix doesn't use z coordinate => so it can be any value.
       Member order here is important! Do not rearrange them! */
    float position[3];
    nk_uchar col[4];
    float uv[2];
};

static struct {
    struct nk_context ctx;
    struct nk_font_atlas atlas;
    struct nk_buffer cmds;

    struct nk_draw_null_texture null;

    D3DVIEWPORT9 viewport;
    D3DMATRIX projection;
    IDirect3DDevice9 *device;
    IDirect3DTexture9 *texture;
    IDirect3DStateBlock9 *state;
} d3d9;

NK_API void
nk_d3d9_create_state()
{
    HRESULT hr;

    hr = IDirect3DDevice9_BeginStateBlock(d3d9.device);
    NK_ASSERT(SUCCEEDED(hr));

    /* vertex format */
    IDirect3DDevice9_SetFVF(d3d9.device, D3DFVF_XYZ + D3DFVF_DIFFUSE + D3DFVF_TEX1);

    /* blend state */
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_ALPHABLENDENABLE, TRUE);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_BLENDOP, D3DBLENDOP_ADD);

    /* render state */
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_LIGHTING, FALSE);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_ZENABLE, FALSE);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_ZWRITEENABLE, FALSE);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_CULLMODE, D3DCULL_NONE);
    IDirect3DDevice9_SetRenderState(d3d9.device, D3DRS_SCISSORTESTENABLE, TRUE);

    /* sampler state */
    IDirect3DDevice9_SetSamplerState(d3d9.device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
    IDirect3DDevice9_SetSamplerState(d3d9.device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
    IDirect3DDevice9_SetSamplerState(d3d9.device, 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
    IDirect3DDevice9_SetSamplerState(d3d9.device, 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);

    /* texture stage state */
    IDirect3DDevice9_SetTextureStageState(d3d9.device, 0, D3DTSS_COLOROP, D3DTOP_MODULATE);
    IDirect3DDevice9_SetTextureStageState(d3d9.device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
    IDirect3DDevice9_SetTextureStageState(d3d9.device, 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
    IDirect3DDevice9_SetTextureStageState(d3d9.device, 0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
    IDirect3DDevice9_SetTextureStageState(d3d9.device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    IDirect3DDevice9_SetTextureStageState(d3d9.device, 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);

    hr = IDirect3DDevice9_EndStateBlock(d3d9.device, &d3d9.state);
    NK_ASSERT(SUCCEEDED(hr));
}

NK_API void
nk_d3d9_render(enum nk_anti_aliasing AA)
{
    HRESULT hr;

    nk_d3d9_create_state();

    hr = IDirect3DStateBlock9_Apply(d3d9.state);
    NK_ASSERT(SUCCEEDED(hr));

    /* projection matrix */
    IDirect3DDevice9_SetTransform(d3d9.device, D3DTS_PROJECTION, &d3d9.projection);

    /* viewport */
    IDirect3DDevice9_SetViewport(d3d9.device, &d3d9.viewport);

    /* convert from command queue into draw list and draw to screen */
    {
        struct nk_buffer vbuf, ebuf;
        const struct nk_draw_command *cmd;
        const nk_draw_index *offset = NULL;
        UINT vertex_count;

        /* fill converting configuration */
        struct nk_convert_config config;
        NK_STORAGE const struct nk_draw_vertex_layout_element vertex_layout[] = {
            {NK_VERTEX_POSITION, NK_FORMAT_FLOAT,    NK_OFFSETOF(struct nk_d3d9_vertex, position)},
            {NK_VERTEX_COLOR,    NK_FORMAT_B8G8R8A8, NK_OFFSETOF(struct nk_d3d9_vertex, col)},
            {NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT,    NK_OFFSETOF(struct nk_d3d9_vertex, uv)},
            {NK_VERTEX_LAYOUT_END}
        };
        memset(&config, 0, sizeof(config));
        config.vertex_layout = vertex_layout;
        config.vertex_size = sizeof(struct nk_d3d9_vertex);
        config.vertex_alignment = NK_ALIGNOF(struct nk_d3d9_vertex);
        config.global_alpha = 1.0f;
        config.shape_AA = AA;
        config.line_AA = AA;
        config.circle_segment_count = 22;
        config.curve_segment_count = 22;
        config.arc_segment_count = 22;
        config.null = d3d9.null;

        /* convert shapes into vertexes */
        nk_buffer_init_default(&vbuf);
        nk_buffer_init_default(&ebuf);
        nk_convert(&d3d9.ctx, &d3d9.cmds, &vbuf, &ebuf, &config);

        /* iterate over and execute each draw command */
        offset = (const nk_draw_index *)nk_buffer_memory_const(&ebuf);
        vertex_count = (UINT)vbuf.needed / sizeof(struct nk_d3d9_vertex);

        nk_draw_foreach(cmd, &d3d9.ctx, &d3d9.cmds)
        {
            RECT scissor;
            if (!cmd->elem_count) continue;

            hr = IDirect3DDevice9_SetTexture(d3d9.device, 0, (IDirect3DBaseTexture9 *)cmd->texture.ptr);
            NK_ASSERT(SUCCEEDED(hr));

            scissor.left = (LONG)cmd->clip_rect.x;
            scissor.right = (LONG)(cmd->clip_rect.x + cmd->clip_rect.w);
            scissor.top = (LONG)cmd->clip_rect.y;
            scissor.bottom = (LONG)(cmd->clip_rect.y + cmd->clip_rect.h);

            hr = IDirect3DDevice9_SetScissorRect(d3d9.device, &scissor);
            NK_ASSERT(SUCCEEDED(hr));

            NK_ASSERT(sizeof(nk_draw_index) == sizeof(NK_UINT16));
            hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(d3d9.device, D3DPT_TRIANGLELIST,
                0, vertex_count, cmd->elem_count/3, offset, D3DFMT_INDEX16,
                nk_buffer_memory_const(&vbuf), sizeof(struct nk_d3d9_vertex));
            NK_ASSERT(SUCCEEDED(hr));
            offset += cmd->elem_count;
        }

        nk_buffer_free(&vbuf);
        nk_buffer_free(&ebuf);
    }

    nk_clear(&d3d9.ctx);

    IDirect3DStateBlock9_Apply(d3d9.state);
    IDirect3DStateBlock9_Release(d3d9.state);
}

static void
nk_d3d9_get_projection_matrix(int width, int height, float *result)
{
    const float L = 0.5f;
    const float R = (float)width + 0.5f;
    const float T = 0.5f;
    const float B = (float)height + 0.5f;
    float matrix[4][4] = {
        {    2.0f / (R - L),              0.0f, 0.0f, 0.0f },
        {              0.0f,    2.0f / (T - B), 0.0f, 0.0f },
        {              0.0f,              0.0f, 0.0f, 0.0f },
        { (R + L) / (L - R), (T + B) / (B - T), 0.0f, 1.0f },
    };
    memcpy(result, matrix, sizeof(matrix));
}

NK_API void
nk_d3d9_release(void)
{
    IDirect3DTexture9_Release(d3d9.texture);
}

static void
nk_d3d9_create_font_texture()
{
    int w, h, y;
    const void *image;

    HRESULT hr;
    D3DLOCKED_RECT locked;

    image = nk_font_atlas_bake(&d3d9.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);

    hr = IDirect3DDevice9_CreateTexture(d3d9.device, w, h, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &d3d9.texture, NULL);
    NK_ASSERT(SUCCEEDED(hr));

    hr = IDirect3DTexture9_LockRect(d3d9.texture, 0, &locked, NULL, 0);
    NK_ASSERT(SUCCEEDED(hr));

    for (y = 0; y < h; y++) {
        void *src = (char *)image + y * w * 4;
        void *dst = (char *)locked.pBits + y * locked.Pitch;
        memcpy(dst, src, w * 4);
    }

    hr = IDirect3DTexture9_UnlockRect(d3d9.texture, 0);
    NK_ASSERT(SUCCEEDED(hr));

    nk_font_atlas_end(&d3d9.atlas, nk_handle_ptr(d3d9.texture), &d3d9.null);
}

NK_API void
nk_d3d9_resize(int width, int height)
{
    if (d3d9.texture) {
        nk_d3d9_create_font_texture();
    }

    nk_d3d9_create_state();

    nk_d3d9_get_projection_matrix(width, height, &d3d9.projection.m[0][0]);
    d3d9.viewport.Width = width;
    d3d9.viewport.Height = height;
}

NK_API int
nk_d3d9_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_KEYDOWN:
    case WM_KEYUP:
    case WM_SYSKEYDOWN:
    case WM_SYSKEYUP:
    {
        int down = !((lparam >> 31) & 1);
        int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);

        switch (wparam)
        {
        case VK_SHIFT:
        case VK_LSHIFT:
        case VK_RSHIFT:
            nk_input_key(&d3d9.ctx, NK_KEY_SHIFT, down);
            return 1;

        case VK_DELETE:
            nk_input_key(&d3d9.ctx, NK_KEY_DEL, down);
            return 1;

        case VK_RETURN:
            nk_input_key(&d3d9.ctx, NK_KEY_ENTER, down);
            return 1;

        case VK_TAB:
            nk_input_key(&d3d9.ctx, NK_KEY_TAB, down);
            return 1;

        case VK_LEFT:
            if (ctrl)
                nk_input_key(&d3d9.ctx, NK_KEY_TEXT_WORD_LEFT, down);
            else
                nk_input_key(&d3d9.ctx, NK_KEY_LEFT, down);
            return 1;

        case VK_RIGHT:
            if (ctrl)
                nk_input_key(&d3d9.ctx, NK_KEY_TEXT_WORD_RIGHT, down);
            else
                nk_input_key(&d3d9.ctx, NK_KEY_RIGHT, down);
            return 1;

        case VK_BACK:
            nk_input_key(&d3d9.ctx, NK_KEY_BACKSPACE, down);
            return 1;

        case VK_HOME:
            nk_input_key(&d3d9.ctx, NK_KEY_TEXT_START, down);
            nk_input_key(&d3d9.ctx, NK_KEY_SCROLL_START, down);
            return 1;

        case VK_END:
            nk_input_key(&d3d9.ctx, NK_KEY_TEXT_END, down);
            nk_input_key(&d3d9.ctx, NK_KEY_SCROLL_END, down);
            return 1;

        case VK_NEXT:
            nk_input_key(&d3d9.ctx, NK_KEY_SCROLL_DOWN, down);
            return 1;

        case VK_PRIOR:
            nk_input_key(&d3d9.ctx, NK_KEY_SCROLL_UP, down);
            return 1;

        case 'C':
            if (ctrl) {
                nk_input_key(&d3d9.ctx, NK_KEY_COPY, down);
                return 1;
            }
            break;

        case 'V':
            if (ctrl) {
                nk_input_key(&d3d9.ctx, NK_KEY_PASTE, down);
                return 1;
            }
            break;

        case 'X':
            if (ctrl) {
                nk_input_key(&d3d9.ctx, NK_KEY_CUT, down);
                return 1;
            }
            break;

        case 'Z':
            if (ctrl) {
                nk_input_key(&d3d9.ctx, NK_KEY_TEXT_UNDO, down);
                return 1;
            }
            break;

        case 'R':
            if (ctrl) {
                nk_input_key(&d3d9.ctx, NK_KEY_TEXT_REDO, down);
                return 1;
            }
            break;
        }
        return 0;
    }

    case WM_CHAR:
        if (wparam >= 32)
        {
            nk_input_unicode(&d3d9.ctx, (nk_rune)wparam);
            return 1;
        }
        break;

    case WM_LBUTTONDOWN:
        nk_input_button(&d3d9.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_LBUTTONUP:
        nk_input_button(&d3d9.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        nk_input_button(&d3d9.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_RBUTTONDOWN:
        nk_input_button(&d3d9.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_RBUTTONUP:
        nk_input_button(&d3d9.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MBUTTONDOWN:
        nk_input_button(&d3d9.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_MBUTTONUP:
        nk_input_button(&d3d9.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MOUSEWHEEL:
        nk_input_scroll(&d3d9.ctx, nk_vec2(0,(float)(short)HIWORD(wparam) / WHEEL_DELTA));
        return 1;

    case WM_MOUSEMOVE:
        nk_input_motion(&d3d9.ctx, (short)LOWORD(lparam), (short)HIWORD(lparam));
        return 1;

    case WM_LBUTTONDBLCLK:
        nk_input_button(&d3d9.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        return 1;
    }

    return 0;
}

static void
nk_d3d9_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
    (void)usr;
    if (!IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL)) {
        return;
    }

    HGLOBAL mem = GetClipboardData(CF_UNICODETEXT);
    if (!mem) {
        CloseClipboard();
        return;
    }

    SIZE_T size = GlobalSize(mem) - 1;
    if (!size) {
        CloseClipboard();
        return;
    }

    LPCWSTR wstr = (LPCWSTR)GlobalLock(mem);
    if (!wstr) {
        CloseClipboard();
        return;
    }

    int utf8size = WideCharToMultiByte(CP_UTF8, 0, wstr, (int)size / sizeof(wchar_t), NULL, 0, NULL, NULL);
    if (utf8size) {
        char *utf8 = (char *)malloc(utf8size);
        if (utf8) {
            WideCharToMultiByte(CP_UTF8, 0, wstr, (int)size / sizeof(wchar_t), utf8, utf8size, NULL, NULL);
            nk_textedit_paste(edit, utf8, utf8size);
            free(utf8);
        }
    }

    GlobalUnlock(mem); 
    CloseClipboard();
}

static void
nk_d3d9_clipboard_copy(nk_handle usr, const char *text, int len)
{
    (void)usr;
    if (!OpenClipboard(NULL)) {
        return;
    }

    int wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
    if (wsize) {
        HGLOBAL mem = GlobalAlloc(GMEM_MOVEABLE, (wsize + 1) * sizeof(wchar_t));
        if (mem) {
            wchar_t *wstr = (wchar_t*)GlobalLock(mem);
            if (wstr) {
                MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
                wstr[wsize] = 0;
                GlobalUnlock(mem);
                SetClipboardData(CF_UNICODETEXT, mem); 
            }
        }
    }

    CloseClipboard();
}

NK_API struct nk_context*
nk_d3d9_init(IDirect3DDevice9 *device, int width, int height)
{
    d3d9.device = device;
    IDirect3DDevice9_AddRef(device);

    nk_init_default(&d3d9.ctx, 0);
    d3d9.state = NULL;
    d3d9.texture = NULL;
    d3d9.ctx.clip.copy = nk_d3d9_clipboard_copy;
    d3d9.ctx.clip.paste = nk_d3d9_clipboard_paste;
    d3d9.ctx.clip.userdata = nk_handle_ptr(0);

    nk_buffer_init_default(&d3d9.cmds);

    /* viewport */
    d3d9.viewport.X = 0;
    d3d9.viewport.Y = 0;
    d3d9.viewport.MinZ = 0.0f;
    d3d9.viewport.MaxZ = 1.0f;

    nk_d3d9_resize(width, height);

    return &d3d9.ctx;
}

NK_API void
nk_d3d9_font_stash_begin(struct nk_font_atlas **atlas)
{
    nk_font_atlas_init_default(&d3d9.atlas);
    nk_font_atlas_begin(&d3d9.atlas);
    *atlas = &d3d9.atlas;
}

NK_API void
nk_d3d9_font_stash_end(void)
{
    nk_d3d9_create_font_texture();

    if (d3d9.atlas.default_font)
        nk_style_set_font(&d3d9.ctx, &d3d9.atlas.default_font->handle);
}

NK_API
void nk_d3d9_shutdown(void)
{
    nk_d3d9_release();

    nk_font_atlas_clear(&d3d9.atlas);
    nk_buffer_free(&d3d9.cmds);
    nk_free(&d3d9.ctx);
}

#endif


================================================
FILE: demo/gdi/build.bat
================================================
@echo off

rem This will use VS2015 for compiler
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

cl /nologo /W3 /O2 /fp:fast /Gm- /Fedemo.exe main.c user32.lib gdi32.lib Msimg32.lib /link /incremental:no


================================================
FILE: demo/gdi/main.c
================================================
/* nuklear - 1.32.0 - public domain */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <limits.h>

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600

#define NK_INCLUDE_FIXED_TYPES
#define NK_INCLUDE_STANDARD_IO
#define NK_INCLUDE_STANDARD_VARARGS
#define NK_INCLUDE_DEFAULT_ALLOCATOR
#define NK_IMPLEMENTATION
#define NK_GDI_IMPLEMENTATION
#include "../../nuklear.h"
#include "nuklear_gdi.h"

/* ===============================================================
 *
 *                          EXAMPLE
 *
 * ===============================================================*/
/* This are some code examples to provide a small overview of what can be
 * done with this library. To try out an example uncomment the defines */
/*#define INCLUDE_ALL */
/*#define INCLUDE_STYLE */
/*#define INCLUDE_CALCULATOR */
/*#define INCLUDE_OVERVIEW */
/*#define INCLUDE_NODE_EDITOR */

#ifdef INCLUDE_ALL
  #define INCLUDE_STYLE
  #define INCLUDE_CALCULATOR
  #define INCLUDE_OVERVIEW
  #define INCLUDE_NODE_EDITOR
#endif

#ifdef INCLUDE_STYLE
  #include "../style.c"
#endif
#ifdef INCLUDE_CALCULATOR
  #include "../calculator.c"
#endif
#ifdef INCLUDE_OVERVIEW
  #include "../overview.c"
#endif
#ifdef INCLUDE_NODE_EDITOR
  #include "../node_editor.c"
#endif

/* ===============================================================
 *
 *                          DEMO
 *
 * ===============================================================*/
static LRESULT CALLBACK
WindowProc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_DESTROY:
        PostQuitMessage(0);
        return 0;
    }

    if (nk_gdi_handle_event(wnd, msg, wparam, lparam))
        return 0;

    return DefWindowProcW(wnd, msg, wparam, lparam);
}

int main(void)
{
    GdiFont* font;
    struct nk_context *ctx;

    WNDCLASSW wc;
    ATOM atom;
    RECT rect = { 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT };
    DWORD style = WS_OVERLAPPEDWINDOW;
    DWORD exstyle = WS_EX_APPWINDOW;
    HWND wnd;
    HDC dc;
    int running = 1;
    int needs_refresh = 1;

    /* Win32 */
    memset(&wc, 0, sizeof(wc));
    wc.style = CS_DBLCLKS;
    wc.lpfnWndProc = WindowProc;
    wc.hInstance = GetModuleHandleW(0);
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.lpszClassName = L"NuklearWindowClass";
    atom = RegisterClassW(&wc);

    AdjustWindowRectEx(&rect, style, FALSE, exstyle);
    wnd = CreateWindowExW(exstyle, wc.lpszClassName, L"Nuklear Demo",
        style | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT,
        rect.right - rect.left, rect.bottom - rect.top,
        NULL, NULL, wc.hInstance, NULL);
    dc = GetDC(wnd);

    /* GUI */
    font = nk_gdifont_create("Arial", 14);
    ctx = nk_gdi_init(font, dc, WINDOW_WIDTH, WINDOW_HEIGHT);

    /* style.c */
    #ifdef INCLUDE_STYLE
    /*set_style(ctx, THEME_WHITE);*/
    /*set_style(ctx, THEME_RED);*/
    /*set_style(ctx, THEME_BLUE);*/
    /*set_style(ctx, THEME_DARK);*/
    #endif

    while (running)
    {
        /* Input */
        MSG msg;
        nk_input_begin(ctx);
        if (needs_refresh == 0) {
            if (GetMessageW(&msg, NULL, 0, 0) <= 0)
                running = 0;
            else {
                TranslateMessage(&msg);
                DispatchMessageW(&msg);
            }
            needs_refresh = 1;
        } else needs_refresh = 0;

        while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) {
            if (msg.message == WM_QUIT)
                running = 0;
            TranslateMessage(&msg);
            DispatchMessageW(&msg);
            needs_refresh = 1;
        }
        nk_input_end(ctx);

        /* GUI */
        if (nk_begin(ctx, "Demo", nk_rect(50, 50, 200, 200),
            NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
            NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE))
        {
            enum {EASY, HARD};
            static int op = EASY;
            static int property = 20;

            nk_layout_row_static(ctx, 30, 80, 1);
            if (nk_button_label(ctx, "button"))
                fprintf(stdout, "button pressed\n");
            nk_layout_row_dynamic(ctx, 30, 2);
            if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
            if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
            nk_layout_row_dynamic(ctx, 22, 1);
            nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
        }
        nk_end(ctx);

        /* -------------- EXAMPLES ---------------- */
        #ifdef INCLUDE_CALCULATOR
          calculator(ctx);
        #endif
        #ifdef INCLUDE_OVERVIEW
          overview(ctx);
        #endif
        #ifdef INCLUDE_NODE_EDITOR
          node_editor(ctx);
        #endif
        /* ----------------------------------------- */

        /* Draw */
        nk_gdi_render(nk_rgb(30,30,30));
    }

    nk_gdifont_del(font);
    ReleaseDC(wnd, dc);
    UnregisterClassW(wc.lpszClassName, wc.hInstance);
    return 0;
}



================================================
FILE: demo/gdi/nuklear_gdi.h
================================================
/*
 * Nuklear - 1.32.0 - public domain
 * no warrenty implied; use at your own risk.
 * authored from 2015-2016 by Micha Mettke
 */
/*
 * ==============================================================
 *
 *                              API
 *
 * ===============================================================
 */
#ifndef NK_GDI_H_
#define NK_GDI_H_

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

typedef struct GdiFont GdiFont;
NK_API struct nk_context* nk_gdi_init(GdiFont *font, HDC window_dc, unsigned int width, unsigned int height);
NK_API int nk_gdi_handle_event(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
NK_API void nk_gdi_render(struct nk_color clear);
NK_API void nk_gdi_shutdown(void);

/* font */
NK_API GdiFont* nk_gdifont_create(const char *name, int size);
NK_API void nk_gdifont_del(GdiFont *font);
NK_API void nk_gdi_set_font(GdiFont *font);

#endif

/*
 * ==============================================================
 *
 *                          IMPLEMENTATION
 *
 * ===============================================================
 */
#ifdef NK_GDI_IMPLEMENTATION

#include <stdlib.h>
#include <malloc.h>

struct GdiFont {
    struct nk_user_font nk;
    int height;
    HFONT handle;
    HDC dc;
};

static struct {
    HBITMAP bitmap;
    HDC window_dc;
    HDC memory_dc;
    unsigned int width;
    unsigned int height;
    struct nk_context ctx;
} gdi;

static void
nk_create_image(struct nk_image * image, const char * frame_buffer, const int width, const int height)
{
    if (image && frame_buffer && (width > 0) && (height > 0))
    {
        image->w = width;
        image->h = height;
        image->region[0] = 0;
        image->region[1] = 0;
        image->region[2] = width;
        image->region[3] = height;
        
        INT row = ((width * 3 + 3) & ~3);
        BITMAPINFO bi = { 0 };
        bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
        bi.bmiHeader.biWidth = width;
        bi.bmiHeader.biHeight = height;
        bi.bmiHeader.biPlanes = 1;
        bi.bmiHeader.biBitCount = 24;
        bi.bmiHeader.biCompression = BI_RGB;
        bi.bmiHeader.biSizeImage = row * height;
        
        LPBYTE lpBuf, pb = NULL;
        HBITMAP hbm = CreateDIBSection(NULL, &bi, DIB_RGB_COLORS, (void**)&lpBuf, NULL, 0);
        
        pb = lpBuf + row * height;
        unsigned char * src = (unsigned char *)frame_buffer;
        for (int v = 0; v<height; v++)
        {
            pb -= row;
            for (int i = 0; i < row; i += 3)
            {
                pb[i + 0] = src[0];
                pb[i + 1] = src[1];
                pb[i + 2] = src[2];
                src += 3;
            }
        }        
        SetDIBits(NULL, hbm, 0, height, lpBuf, &bi, DIB_RGB_COLORS);
        image->handle.ptr = hbm;
    }
}

static void
nk_delete_image(struct nk_image * image)
{
    if (image && image->handle.id != 0)
    {
        HBITMAP hbm = (HBITMAP)image->handle.ptr;
        DeleteObject(hbm);
        memset(image, 0, sizeof(struct nk_image));
    }
}

static void
nk_gdi_draw_image(short x, short y, unsigned short w, unsigned short h,
    struct nk_image img, struct nk_color col)
{
    HBITMAP hbm = (HBITMAP)img.handle.ptr;
    HDC     hDCBits;
    BITMAP  bitmap;
    
    if (!gdi.memory_dc || !hbm)
        return;
    
    hDCBits = CreateCompatibleDC(gdi.memory_dc);
    GetObject(hbm, sizeof(BITMAP), (LPSTR)&bitmap);
    SelectObject(hDCBits, hbm);
    StretchBlt(gdi.memory_dc, x, y, w, h, hDCBits, 0, 0, bitmap.bmWidth, bitmap.bmHeight, SRCCOPY);
    DeleteDC(hDCBits);
}

static COLORREF
convert_color(struct nk_color c)
{
    return c.r | (c.g << 8) | (c.b << 16);
}

static void
nk_gdi_scissor(HDC dc, float x, float y, float w, float h)
{
    SelectClipRgn(dc, NULL);
    IntersectClipRect(dc, (int)x, (int)y, (int)(x + w + 1), (int)(y + h + 1));
}

static void
nk_gdi_stroke_line(HDC dc, short x0, short y0, short x1,
    short y1, unsigned int line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);

    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    MoveToEx(dc, x0, y0, NULL);
    LineTo(dc, x1, y1);

    if (pen) {
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_stroke_rect(HDC dc, short x, short y, unsigned short w,
    unsigned short h, unsigned short r, unsigned short line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);

    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    HGDIOBJ br = SelectObject(dc, GetStockObject(NULL_BRUSH));
    if (r == 0) {
        Rectangle(dc, x, y, x + w, y + h);
    } else {
        RoundRect(dc, x, y, x + w, y + h, r, r);
    }
    SelectObject(dc, br);

    if (pen) { 
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_fill_rect(HDC dc, short x, short y, unsigned short w,
    unsigned short h, unsigned short r, struct nk_color col)
{
    COLORREF color = convert_color(col);

    if (r == 0) {
        RECT rect = { x, y, x + w, y + h };
        SetBkColor(dc, color);
        ExtTextOutW(dc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
    } else {
        SetDCPenColor(dc, color);
        SetDCBrushColor(dc, color);
        RoundRect(dc, x, y, x + w, y + h, r, r);
    }
}
static void
nk_gdi_set_vertexColor(PTRIVERTEX tri, struct nk_color col)
{
    tri->Red   = col.r << 8;
    tri->Green = col.g << 8;
    tri->Blue  = col.b << 8;
    tri->Alpha = 0xff << 8;
}

static void
nk_gdi_rect_multi_color(HDC dc, short x, short y, unsigned short w,
    unsigned short h, struct nk_color left, struct nk_color top,
    struct nk_color right, struct nk_color bottom)
{
    BLENDFUNCTION alphaFunction;
    GRADIENT_RECT gRect;
    GRADIENT_TRIANGLE gTri[2];
    TRIVERTEX vt[4];
    alphaFunction.BlendOp = AC_SRC_OVER;
    alphaFunction.BlendFlags = 0;
    alphaFunction.SourceConstantAlpha = 0;
    alphaFunction.AlphaFormat = AC_SRC_ALPHA;

    /* TODO: This Case Needs Repair.*/
    /* Top Left Corner */
    vt[0].x     = x;
    vt[0].y     = y;
    nk_gdi_set_vertexColor(&vt[0], left);
    /* Top Right Corner */
    vt[1].x     = x+w;
    vt[1].y     = y;
    nk_gdi_set_vertexColor(&vt[1], top);
    /* Bottom Left Corner */
    vt[2].x     = x;
    vt[2].y     = y+h;
    nk_gdi_set_vertexColor(&vt[2], right);

    /* Bottom Right Corner */
    vt[3].x     = x+w;
    vt[3].y     = y+h;
    nk_gdi_set_vertexColor(&vt[3], bottom);

    gTri[0].Vertex1 = 0;
    gTri[0].Vertex2 = 1;
    gTri[0].Vertex3 = 2;
    gTri[1].Vertex1 = 2;
    gTri[1].Vertex2 = 1;
    gTri[1].Vertex3 = 3;
    GdiGradientFill(dc, vt, 4, gTri, 2 , GRADIENT_FILL_TRIANGLE);
    AlphaBlend(gdi.window_dc,  x, y, x+w, y+h,gdi.memory_dc, x, y, x+w, y+h,alphaFunction);

}

static void
nk_gdi_fill_triangle(HDC dc, short x0, short y0, short x1,
    short y1, short x2, short y2, struct nk_color col)
{
    COLORREF color = convert_color(col);
    POINT points[] = {
        { x0, y0 },
        { x1, y1 },
        { x2, y2 },
    };

    SetDCPenColor(dc, color);
    SetDCBrushColor(dc, color);
    Polygon(dc, points, 3);
}

static void
nk_gdi_stroke_triangle(HDC dc, short x0, short y0, short x1,
    short y1, short x2, short y2, unsigned short line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);
    POINT points[] = {
        { x0, y0 },
        { x1, y1 },
        { x2, y2 },
        { x0, y0 },
    };

    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    Polyline(dc, points, 4);

    if (pen) {
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_fill_polygon(HDC dc, const struct nk_vec2i *pnts, int count, struct nk_color col)
{
    int i = 0;
    #define MAX_POINTS 64
    POINT points[MAX_POINTS];
    COLORREF color = convert_color(col);
    SetDCBrushColor(dc, color);
    SetDCPenColor(dc, color);
    for (i = 0; i < count && i < MAX_POINTS; ++i) {
        points[i].x = pnts[i].x;
        points[i].y = pnts[i].y;
    }
    Polygon(dc, points, i);
    #undef MAX_POINTS
}

static void
nk_gdi_stroke_polygon(HDC dc, const struct nk_vec2i *pnts, int count,
    unsigned short line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);
    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    if (count > 0) {
        int i;
        MoveToEx(dc, pnts[0].x, pnts[0].y, NULL);
        for (i = 1; i < count; ++i)
            LineTo(dc, pnts[i].x, pnts[i].y);
        LineTo(dc, pnts[0].x, pnts[0].y);
    }

    if (pen) {
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_stroke_polyline(HDC dc, const struct nk_vec2i *pnts,
    int count, unsigned short line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);
    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    if (count > 0) {
        int i;
        MoveToEx(dc, pnts[0].x, pnts[0].y, NULL);
        for (i = 1; i < count; ++i)
            LineTo(dc, pnts[i].x, pnts[i].y);
    }

    if (pen) {
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_fill_circle(HDC dc, short x, short y, unsigned short w,
    unsigned short h, struct nk_color col)
{
    COLORREF color = convert_color(col);
    SetDCBrushColor(dc, color);
    SetDCPenColor(dc, color);
    Ellipse(dc, x, y, x + w, y + h);
}

static void
nk_gdi_stroke_circle(HDC dc, short x, short y, unsigned short w,
    unsigned short h, unsigned short line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);
    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    SetDCBrushColor(dc, OPAQUE);
    Ellipse(dc, x, y, x + w, y + h);

    if (pen) {
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_stroke_curve(HDC dc, struct nk_vec2i p1,
    struct nk_vec2i p2, struct nk_vec2i p3, struct nk_vec2i p4,
    unsigned short line_thickness, struct nk_color col)
{
    COLORREF color = convert_color(col);
    POINT p[] = {
        { p1.x, p1.y },
        { p2.x, p2.y },
        { p3.x, p3.y },
        { p4.x, p4.y },
    };

    HPEN pen = NULL;
    if (line_thickness == 1) {
        SetDCPenColor(dc, color);
    } else {
        pen = CreatePen(PS_SOLID, line_thickness, color);
        SelectObject(dc, pen);
    }

    SetDCBrushColor(dc, OPAQUE);
    PolyBezier(dc, p, 4);

    if (pen) {
        SelectObject(dc, GetStockObject(DC_PEN));
        DeleteObject(pen);
    }
}

static void
nk_gdi_draw_text(HDC dc, short x, short y, unsigned short w, unsigned short h,
    const char *text, int len, GdiFont *font, struct nk_color cbg, struct nk_color cfg)
{
    int wsize;
    WCHAR* wstr;

    if(!text || !font || !len) return;

    wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
    wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);

    SetBkColor(dc, convert_color(cbg));
    SetTextColor(dc, convert_color(cfg));

    SelectObject(dc, font->handle);
    ExtTextOutW(dc, x, y, ETO_OPAQUE, NULL, wstr, wsize, NULL);
}

static void
nk_gdi_clear(HDC dc, struct nk_color col)
{
    COLORREF color = convert_color(col);
    RECT rect = { 0, 0, gdi.width, gdi.height };
    SetBkColor(dc, color);

    ExtTextOutW(dc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, NULL);
}

static void
nk_gdi_blit(HDC dc)
{
    BitBlt(dc, 0, 0, gdi.width, gdi.height, gdi.memory_dc, 0, 0, SRCCOPY);

}

GdiFont*
nk_gdifont_create(const char *name, int size)
{
    TEXTMETRICW metric;
    GdiFont *font = (GdiFont*)calloc(1, sizeof(GdiFont));
    if (!font)
        return NULL;
    font->dc = CreateCompatibleDC(0);
    font->handle = CreateFontA(size, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, DEFAULT_PITCH | FF_DONTCARE, name);
    SelectObject(font->dc, font->handle);
    GetTextMetricsW(font->dc, &metric);
    font->height = metric.tmHeight;
    return font;
}

static float
nk_gdifont_get_text_width(nk_handle handle, float height, const char *text, int len)
{
    GdiFont *font = (GdiFont*)handle.ptr;
    SIZE size;
    int wsize;
    WCHAR* wstr;
    if (!font || !text)
        return 0;

    wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
    wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
    if (GetTextExtentPoint32W(font->dc, wstr, wsize, &size))
        return (float)size.cx;
    return -1.0f;
}

void
nk_gdifont_del(GdiFont *font)
{
    if(!font) return;
    DeleteObject(font->handle);
    DeleteDC(font->dc);
    free(font);
}

static void
nk_gdi_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
    (void)usr;
    if (IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL))
    {
        HGLOBAL mem = GetClipboardData(CF_UNICODETEXT); 
        if (mem)
        {
            SIZE_T size = GlobalSize(mem) - 1;
            if (size)
            {
                LPCWSTR wstr = (LPCWSTR)GlobalLock(mem);
                if (wstr) 
                {
                    int utf8size = WideCharToMultiByte(CP_UTF8, 0, wstr, (int)(size / sizeof(wchar_t)), NULL, 0, NULL, NULL);
                    if (utf8size)
                    {
                        char* utf8 = (char*)malloc(utf8size);
                        if (utf8)
                        {
                            WideCharToMultiByte(CP_UTF8, 0, wstr, (int)(size / sizeof(wchar_t)), utf8, utf8size, NULL, NULL);
                            nk_textedit_paste(edit, utf8, utf8size);
                            free(utf8);
                        }
                    }
                    GlobalUnlock(mem); 
                }
            }
        }
        CloseClipboard();
    }
}

static void
nk_gdi_clipboard_copy(nk_handle usr, const char *text, int len)
{
    if (OpenClipboard(NULL))
    {
        int wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
        if (wsize)
        {
            HGLOBAL mem = (HGLOBAL)GlobalAlloc(GMEM_MOVEABLE, (wsize + 1) * sizeof(wchar_t));
            if (mem)
            {
                wchar_t* wstr = (wchar_t*)GlobalLock(mem);
                if (wstr)
                {
                    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
                    wstr[wsize] = 0;
                    GlobalUnlock(mem); 

                    SetClipboardData(CF_UNICODETEXT, mem); 
                }
            }
        }
        CloseClipboard();
    }
}

NK_API struct nk_context*
nk_gdi_init(GdiFont *gdifont, HDC window_dc, unsigned int width, unsigned int height)
{
    struct nk_user_font *font = &gdifont->nk;
    font->userdata = nk_handle_ptr(gdifont);
    font->height = (float)gdifont->height;
    font->width = nk_gdifont_get_text_width;

    gdi.bitmap = CreateCompatibleBitmap(window_dc, width, height);
    gdi.window_dc = window_dc;
    gdi.memory_dc = CreateCompatibleDC(window_dc);
    gdi.width = width;
    gdi.height = height;
    SelectObject(gdi.memory_dc, gdi.bitmap);

    nk_init_default(&gdi.ctx, font);
    gdi.ctx.clip.copy = nk_gdi_clipboard_copy;
    gdi.ctx.clip.paste = nk_gdi_clipboard_paste;
    return &gdi.ctx;
}

NK_API void
nk_gdi_set_font(GdiFont *gdifont)
{
    struct nk_user_font *font = &gdifont->nk;
    font->userdata = nk_handle_ptr(gdifont);
    font->height = (float)gdifont->height;
    font->width = nk_gdifont_get_text_width;
    nk_style_set_font(&gdi.ctx, font);
}

NK_API int
nk_gdi_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_SIZE:
    {
        unsigned width = LOWORD(lparam);
        unsigned height = HIWORD(lparam);
        if (width != gdi.width || height != gdi.height)
        {
            DeleteObject(gdi.bitmap);
            gdi.bitmap = CreateCompatibleBitmap(gdi.window_dc, width, height);
            gdi.width = width;
            gdi.height = height;
            SelectObject(gdi.memory_dc, gdi.bitmap);
        }
        break;
    }

    case WM_PAINT:
    {
        PAINTSTRUCT paint;
        HDC dc = BeginPaint(wnd, &paint);
        nk_gdi_blit(dc);
        EndPaint(wnd, &paint);
        return 1;
    }

    case WM_KEYDOWN:
    case WM_KEYUP:
    case WM_SYSKEYDOWN:
    case WM_SYSKEYUP:
    {
        int down = !((lparam >> 31) & 1);
        int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);

        switch (wparam)
        {
        case VK_SHIFT:
        case VK_LSHIFT:
        case VK_RSHIFT:
            nk_input_key(&gdi.ctx, NK_KEY_SHIFT, down);
            return 1;

        case VK_DELETE:
            nk_input_key(&gdi.ctx, NK_KEY_DEL, down);
            return 1;

        case VK_RETURN:
            nk_input_key(&gdi.ctx, NK_KEY_ENTER, down);
            return 1;

        case VK_TAB:
            nk_input_key(&gdi.ctx, NK_KEY_TAB, down);
            return 1;

        case VK_LEFT:
            if (ctrl)
                nk_input_key(&gdi.ctx, NK_KEY_TEXT_WORD_LEFT, down);
            else
                nk_input_key(&gdi.ctx, NK_KEY_LEFT, down);
            return 1;

        case VK_RIGHT:
            if (ctrl)
                nk_input_key(&gdi.ctx, NK_KEY_TEXT_WORD_RIGHT, down);
            else
                nk_input_key(&gdi.ctx, NK_KEY_RIGHT, down);
            return 1;

        case VK_BACK:
            nk_input_key(&gdi.ctx, NK_KEY_BACKSPACE, down);
            return 1;

        case VK_HOME:
            nk_input_key(&gdi.ctx, NK_KEY_TEXT_START, down);
            nk_input_key(&gdi.ctx, NK_KEY_SCROLL_START, down);
            return 1;

        case VK_END:
            nk_input_key(&gdi.ctx, NK_KEY_TEXT_END, down);
            nk_input_key(&gdi.ctx, NK_KEY_SCROLL_END, down);
            return 1;

        case VK_NEXT:
            nk_input_key(&gdi.ctx, NK_KEY_SCROLL_DOWN, down);
            return 1;

        case VK_PRIOR:
            nk_input_key(&gdi.ctx, NK_KEY_SCROLL_UP, down);
            return 1;

        case 'C':
            if (ctrl) {
                nk_input_key(&gdi.ctx, NK_KEY_COPY, down);
                return 1;
            }
            break;

        case 'V':
            if (ctrl) {
                nk_input_key(&gdi.ctx, NK_KEY_PASTE, down);
                return 1;
            }
            break;

        case 'X':
            if (ctrl) {
                nk_input_key(&gdi.ctx, NK_KEY_CUT, down);
                return 1;
            }
            break;

        case 'Z':
            if (ctrl) {
                nk_input_key(&gdi.ctx, NK_KEY_TEXT_UNDO, down);
                return 1;
            }
            break;

        case 'R':
            if (ctrl) {
                nk_input_key(&gdi.ctx, NK_KEY_TEXT_REDO, down);
                return 1;
            }
            break;
        }
        return 0;
    }

    case WM_CHAR:
        if (wparam >= 32)
        {
            nk_input_unicode(&gdi.ctx, (nk_rune)wparam);
            return 1;
        }
        break;

    case WM_LBUTTONDOWN:
        nk_input_button(&gdi.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_LBUTTONUP:
        nk_input_button(&gdi.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        nk_input_button(&gdi.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_RBUTTONDOWN:
        nk_input_button(&gdi.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_RBUTTONUP:
        nk_input_button(&gdi.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MBUTTONDOWN:
        nk_input_button(&gdi.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_MBUTTONUP:
        nk_input_button(&gdi.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MOUSEWHEEL:
        nk_input_scroll(&gdi.ctx, nk_vec2(0,(float)(short)HIWORD(wparam) / WHEEL_DELTA));
        return 1;

    case WM_MOUSEMOVE:
        nk_input_motion(&gdi.ctx, (short)LOWORD(lparam), (short)HIWORD(lparam));
        return 1;

    case WM_LBUTTONDBLCLK:
        nk_input_button(&gdi.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        return 1;
    }

    return 0;
}

NK_API void
nk_gdi_shutdown(void)
{
    DeleteObject(gdi.memory_dc);
    DeleteObject(gdi.bitmap);
    nk_free(&gdi.ctx);
}

NK_API void
nk_gdi_render(struct nk_color clear)
{
    const struct nk_command *cmd;

    HDC memory_dc = gdi.memory_dc;
    SelectObject(memory_dc, GetStockObject(DC_PEN));
    SelectObject(memory_dc, GetStockObject(DC_BRUSH));
    nk_gdi_clear(memory_dc, clear);

    nk_foreach(cmd, &gdi.ctx)
    {
        switch (cmd->type) {
        case NK_COMMAND_NOP: break;
        case NK_COMMAND_SCISSOR: {
            const struct nk_command_scissor *s =(const struct nk_command_scissor*)cmd;
            nk_gdi_scissor(memory_dc, s->x, s->y, s->w, s->h);
        } break;
        case NK_COMMAND_LINE: {
            const struct nk_command_line *l = (const struct nk_command_line *)cmd;
            nk_gdi_stroke_line(memory_dc, l->begin.x, l->begin.y, l->end.x,
                l->end.y, l->line_thickness, l->color);
        } break;
        case NK_COMMAND_RECT: {
            const struct nk_command_rect *r = (const struct nk_command_rect *)cmd;
            nk_gdi_stroke_rect(memory_dc, r->x, r->y, r->w, r->h,
                (unsigned short)r->rounding, r->line_thickness, r->color);
        } break;
        case NK_COMMAND_RECT_FILLED: {
            const struct nk_command_rect_filled *r = (const struct nk_command_rect_filled *)cmd;
            nk_gdi_fill_rect(memory_dc, r->x, r->y, r->w, r->h,
                (unsigned short)r->rounding, r->color);
        } break;
        case NK_COMMAND_CIRCLE: {
            const struct nk_command_circle *c = (const struct nk_command_circle *)cmd;
            nk_gdi_stroke_circle(memory_dc, c->x, c->y, c->w, c->h, c->line_thickness, c->color);
        } break;
        case NK_COMMAND_CIRCLE_FILLED: {
            const struct nk_command_circle_filled *c = (const struct nk_command_circle_filled *)cmd;
            nk_gdi_fill_circle(memory_dc, c->x, c->y, c->w, c->h, c->color);
        } break;
        case NK_COMMAND_TRIANGLE: {
            const struct nk_command_triangle*t = (const struct nk_command_triangle*)cmd;
            nk_gdi_stroke_triangle(memory_dc, t->a.x, t->a.y, t->b.x, t->b.y,
                t->c.x, t->c.y, t->line_thickness, t->color);
        } break;
        case NK_COMMAND_TRIANGLE_FILLED: {
            const struct nk_command_triangle_filled *t = (const struct nk_command_triangle_filled *)cmd;
            nk_gdi_fill_triangle(memory_dc, t->a.x, t->a.y, t->b.x, t->b.y,
                t->c.x, t->c.y, t->color);
        } break;
        case NK_COMMAND_POLYGON: {
            const struct nk_command_polygon *p =(const struct nk_command_polygon*)cmd;
            nk_gdi_stroke_polygon(memory_dc, p->points, p->point_count, p->line_thickness,p->color);
        } break;
        case NK_COMMAND_POLYGON_FILLED: {
            const struct nk_command_polygon_filled *p = (const struct nk_command_polygon_filled *)cmd;
            nk_gdi_fill_polygon(memory_dc, p->points, p->point_count, p->color);
        } break;
        case NK_COMMAND_POLYLINE: {
            const struct nk_command_polyline *p = (const struct nk_command_polyline *)cmd;
            nk_gdi_stroke_polyline(memory_dc, p->points, p->point_count, p->line_thickness, p->color);
        } break;
        case NK_COMMAND_TEXT: {
            const struct nk_command_text *t = (const struct nk_command_text*)cmd;
            nk_gdi_draw_text(memory_dc, t->x, t->y, t->w, t->h,
                (const char*)t->string, t->length,
                (GdiFont*)t->font->userdata.ptr,
                t->background, t->foreground);
        } break;
        case NK_COMMAND_CURVE: {
            const struct nk_command_curve *q = (const struct nk_command_curve *)cmd;
            nk_gdi_stroke_curve(memory_dc, q->begin, q->ctrl[0], q->ctrl[1],
                q->end, q->line_thickness, q->color);
        } break;
        case NK_COMMAND_RECT_MULTI_COLOR: {
            const struct nk_command_rect_multi_color *r = (const struct nk_command_rect_multi_color *)cmd;
            nk_gdi_rect_multi_color(memory_dc, r->x, r->y,r->w, r->h, r->left, r->top, r->right, r->bottom);
        } break;
        case NK_COMMAND_IMAGE: {
            const struct nk_command_image *i = (const struct nk_command_image *)cmd;
            nk_gdi_draw_image(i->x, i->y, i->w, i->h, i->img, i->col);
        } break;
        case NK_COMMAND_ARC:
        case NK_COMMAND_ARC_FILLED:
        default: break;
        }
    }
    nk_gdi_blit(gdi.window_dc);
    nk_clear(&gdi.ctx);
}

#endif



================================================
FILE: demo/gdip/build.bat
================================================
@echo off

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86

cl /nologo /W3 /O2 /fp:fast /Gm- /Fedemo.exe /D_CRT_SECURE_NO_DEPRECATE main.c user32.lib gdiplus.lib shlwapi.lib /link /incremental:no


================================================
FILE: demo/gdip/main.c
================================================
/* nuklear - 1.32.0 - public domain */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <time.h>

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600

#define NK_INCLUDE_FIXED_TYPES
#define NK_INCLUDE_STANDARD_IO
#define NK_INCLUDE_STANDARD_VARARGS
#define NK_INCLUDE_DEFAULT_ALLOCATOR
#define NK_IMPLEMENTATION
#define NK_GDIP_IMPLEMENTATION
#include "../../nuklear.h"
#include "nuklear_gdip.h"

/* ===============================================================
 *
 *                          EXAMPLE
 *
 * ===============================================================*/
/* This are some code examples to provide a small overview of what can be
 * done with this library. To try out an example uncomment the defines */
/*#define INCLUDE_ALL */
/*#define INCLUDE_STYLE */
/*#define INCLUDE_CALCULATOR */
/*#define INCLUDE_OVERVIEW */
/*#define INCLUDE_NODE_EDITOR */

#ifdef INCLUDE_ALL
  #define INCLUDE_STYLE
  #define INCLUDE_CALCULATOR
  #define INCLUDE_OVERVIEW
  #define INCLUDE_NODE_EDITOR
#endif

#ifdef INCLUDE_STYLE
  #include "../style.c"
#endif
#ifdef INCLUDE_CALCULATOR
  #include "../calculator.c"
#endif
#ifdef INCLUDE_OVERVIEW
  #include "../overview.c"
#endif
#ifdef INCLUDE_NODE_EDITOR
  #include "../node_editor.c"
#endif

/* ===============================================================
 *
 *                          DEMO
 *
 * ===============================================================*/
static LRESULT CALLBACK
WindowProc(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg) {
    case WM_DESTROY:
        PostQuitMessage(0);
        return 0;
    }
    if (nk_gdip_handle_event(wnd, msg, wparam, lparam))
        return 0;
    return DefWindowProcW(wnd, msg, wparam, lparam);
}

int main(void)
{
    GdipFont* font;
    struct nk_context *ctx;

    WNDCLASSW wc;
    RECT rect = { 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT };
    DWORD style = WS_OVERLAPPEDWINDOW;
    DWORD exstyle = WS_EX_APPWINDOW;
    HWND wnd;
    int running = 1;
    int needs_refresh = 1;

    /* Win32 */
    memset(&wc, 0, sizeof(wc));
    wc.style = CS_DBLCLKS;
    wc.lpfnWndProc = WindowProc;
    wc.hInstance = GetModuleHandleW(0);
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.lpszClassName = L"NuklearWindowClass";
    RegisterClassW(&wc);

    AdjustWindowRectEx(&rect, style, FALSE, exstyle);

    wnd = CreateWindowExW(exstyle, wc.lpszClassName, L"Nuklear Demo",
        style | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT,
        rect.right - rect.left, rect.bottom - rect.top,
        NULL, NULL, wc.hInstance, NULL);

    /* GUI */
    ctx = nk_gdip_init(wnd, WINDOW_WIDTH, WINDOW_HEIGHT);
    font = nk_gdipfont_create("Arial", 12);
    nk_gdip_set_font(font);

    /* style.c */
    #ifdef INCLUDE_STYLE
    /*set_style(ctx, THEME_WHITE);*/
    /*set_style(ctx, THEME_RED);*/
    /*set_style(ctx, THEME_BLUE);*/
    /*set_style(ctx, THEME_DARK);*/
    #endif

    while (running)
    {
        /* Input */
        MSG msg;
        nk_input_begin(ctx);
        if (needs_refresh == 0) {
            if (GetMessageW(&msg, NULL, 0, 0) <= 0)
                running = 0;
            else {
                TranslateMessage(&msg);
                DispatchMessageW(&msg);
            }
            needs_refresh = 1;
        } else needs_refresh = 0;
        while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) {
            if (msg.message == WM_QUIT)
                running = 0;
            TranslateMessage(&msg);
            DispatchMessageW(&msg);
            needs_refresh = 1;
        }
        nk_input_end(ctx);

        /* GUI */
        if (nk_begin(ctx, "Demo", nk_rect(50, 50, 200, 200),
            NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
            NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE))
        {
            enum {EASY, HARD};
            static int op = EASY;
            static int property = 20;

            nk_layout_row_static(ctx, 30, 80, 1);
            if (nk_button_label(ctx, "button"))
                fprintf(stdout, "button pressed\n");
            nk_layout_row_dynamic(ctx, 30, 2);
            if (nk_option_label(ctx, "easy", op == EASY)) op = EASY;
            if (nk_option_label(ctx, "hard", op == HARD)) op = HARD;
            nk_layout_row_dynamic(ctx, 22, 1);
            nk_property_int(ctx, "Compression:", 0, &property, 100, 10, 1);
        }
        nk_end(ctx);

        /* -------------- EXAMPLES ---------------- */
        #ifdef INCLUDE_CALCULATOR
          calculator(ctx);
        #endif
        #ifdef INCLUDE_OVERVIEW
          overview(ctx);
        #endif
        #ifdef INCLUDE_NODE_EDITOR
          node_editor(ctx);
        #endif
        /* ----------------------------------------- */

        /* Draw */
        nk_gdip_render(NK_ANTI_ALIASING_ON, nk_rgb(30,30,30));
    }

    nk_gdipfont_del(font);
    nk_gdip_shutdown();
    UnregisterClassW(wc.lpszClassName, wc.hInstance);
    return 0;
}


================================================
FILE: demo/gdip/nuklear_gdip.h
================================================
/*
 * Nuklear - 1.40.8 - public domain
 * no warrenty implied; use at your own risk.
 * authored from 2015-2017 by Micha Mettke
 */
/*
 * ==============================================================
 *
 *                              API
 *
 * ===============================================================
 */
#ifndef NK_GDIP_H_
#define NK_GDIP_H_

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlwapi.h>

/* font */
typedef struct GdipFont GdipFont;
NK_API GdipFont* nk_gdipfont_create(const char *name, int size);
NK_API GdipFont* nk_gdipfont_create_from_file(const WCHAR* filename, int size);
NK_API GdipFont* nk_gdipfont_create_from_memory(const void* membuf, int membufSize, int size);
NK_API void nk_gdipfont_del(GdipFont *font);

NK_API struct nk_context* nk_gdip_init(HWND hwnd, unsigned int width, unsigned int height);
NK_API void nk_gdip_set_font(GdipFont *font);
NK_API int nk_gdip_handle_event(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
NK_API void nk_gdip_render(enum nk_anti_aliasing AA, struct nk_color clear);
NK_API void nk_gdip_shutdown(void);

/* image */
NK_API struct nk_image nk_gdip_load_image_from_file(const WCHAR* filename);
NK_API struct nk_image nk_gdip_load_image_from_memory(const void* membuf, nk_uint membufSize);
NK_API void nk_gdip_image_free(struct nk_image image);

#endif
/*
 * ==============================================================
 *
 *                          IMPLEMENTATION
 *
 * ===============================================================
 */
#ifdef NK_GDIP_IMPLEMENTATION

#include <stdlib.h>
#include <malloc.h>

/* manually declare everything GDI+ needs, because
   GDI+ headers are not usable from C */
#define WINGDIPAPI __stdcall
#define GDIPCONST const

typedef struct GpGraphics GpGraphics;
typedef struct GpImage GpImage;
typedef struct GpPen GpPen;
typedef struct GpBrush GpBrush;
typedef struct GpStringFormat GpStringFormat;
typedef struct GpFont GpFont;
typedef struct GpFontFamily GpFontFamily;
typedef struct GpFontCollection GpFontCollection;

typedef GpImage GpBitmap;
typedef GpBrush GpSolidFill;

typedef int Status;
typedef Status GpStatus;

typedef float REAL;
typedef DWORD ARGB;
typedef POINT GpPoint;

typedef enum {
    TextRenderingHintSystemDefault = 0,
    TextRenderingHintSingleBitPerPixelGridFit = 1,
    TextRenderingHintSingleBitPerPixel = 2,
    TextRenderingHintAntiAliasGridFit = 3,
    TextRenderingHintAntiAlias = 4,
    TextRenderingHintClearTypeGridFit = 5
} TextRenderingHint;

typedef enum {
    StringFormatFlagsDirectionRightToLeft    = 0x00000001,
    StringFormatFlagsDirectionVertical       = 0x00000002,
    StringFormatFlagsNoFitBlackBox           = 0x00000004,
    StringFormatFlagsDisplayFormatControl    = 0x00000020,
    StringFormatFlagsNoFontFallback          = 0x00000400,
    StringFormatFlagsMeasureTrailingSpaces   = 0x00000800,
    StringFormatFlagsNoWrap                  = 0x00001000,
    StringFormatFlagsLineLimit               = 0x00002000,
    StringFormatFlagsNoClip                  = 0x00004000 
} StringFormatFlags;

typedef enum
{
    QualityModeInvalid   = -1,
    QualityModeDefault   = 0,
    QualityModeLow       = 1,
    QualityModeHigh      = 2
} QualityMode;

typedef enum
{
    SmoothingModeInvalid     = QualityModeInvalid,
    SmoothingModeDefault     = QualityModeDefault,
    SmoothingModeHighSpeed   = QualityModeLow,
    SmoothingModeHighQuality = QualityModeHigh,
    SmoothingModeNone,
    SmoothingModeAntiAlias,
    SmoothingModeAntiAlias8x4 = SmoothingModeAntiAlias,
    SmoothingModeAntiAlias8x8
} SmoothingMode;

typedef enum
{
    FontStyleRegular    = 0,
    FontStyleBold       = 1,
    FontStyleItalic     = 2,
    FontStyleBoldItalic = 3,
    FontStyleUnderline  = 4,
    FontStyleStrikeout  = 8
} FontStyle;

typedef enum {
    FillModeAlternate,
    FillModeWinding
} FillMode;

typedef enum {
    CombineModeReplace,
    CombineModeIntersect,
    CombineModeUnion,
    CombineModeXor,
    CombineModeExclude,
    CombineModeComplement
} CombineMode;

typedef enum {
    UnitWorld,
    UnitDisplay,
    UnitPixel,
    UnitPoint,
    UnitInch,
    UnitDocument,
    UnitMillimeter
} Unit;

typedef struct {
    FLOAT X;
    FLOAT Y;
    FLOAT Width;
    FLOAT Height;
} RectF;

typedef enum {
    DebugEventLevelFatal,
    DebugEventLevelWarning
} DebugEventLevel;

typedef VOID (WINAPI *DebugEventProc)(DebugEventLevel level, CHAR *message);

typedef struct {
    UINT32 GdiplusVersion;
    DebugEventProc DebugEventCallback;
    BOOL SuppressBackgroundThread;
    BOOL SuppressExternalCodecs;
} GdiplusStartupInput;

typedef Status (WINAPI *NotificationHookProc)(OUT ULONG_PTR *token);
typedef VOID (WINAPI *NotificationUnhookProc)(ULONG_PTR token);

typedef struct {
    NotificationHookProc NotificationHook;
    NotificationUnhookProc NotificationUnhook;
} GdiplusStartupOutput;

/* startup & shutdown */

Status WINAPI GdiplusStartup(
    OUT ULONG_PTR *token,
    const GdiplusStartupInput *input,
    OUT GdiplusStartupOutput *output);

VOID WINAPI GdiplusShutdown(ULONG_PTR token);

/* image */

GpStatus WINGDIPAPI
GdipCreateBitmapFromGraphics(INT width,
                             INT height,
                             GpGraphics* target,
                             GpBitmap** bitmap);

GpStatus WINGDIPAPI
GdipDisposeImage(GpImage *image);

GpStatus WINGDIPAPI
GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics);

GpStatus WINGDIPAPI
GdipGetImageWidth(GpImage *image, UINT *width);

GpStatus WINGDIPAPI
GdipGetImageHeight(GpImage *image, UINT *height);

GpStatus WINGDIPAPI
GdipLoadImageFromFile(GDIPCONST WCHAR* filename, GpImage **image);

GpStatus WINGDIPAPI
GdipLoadImageFromStream(IStream* stream, GpImage **image);

/* pen */

GpStatus WINGDIPAPI
GdipCreatePen1(ARGB color, REAL width, Unit unit, GpPen **pen);

GpStatus WINGDIPAPI
GdipDeletePen(GpPen *pen);

GpStatus WINGDIPAPI
GdipSetPenWidth(GpPen *pen, REAL width);

GpStatus WINGDIPAPI
GdipSetPenColor(GpPen *pen, ARGB argb);

/* brush */

GpStatus WINGDIPAPI
GdipCreateSolidFill(ARGB color, GpSolidFill **brush);

GpStatus WINGDIPAPI
GdipDeleteBrush(GpBrush *brush);

GpStatus WINGDIPAPI
GdipSetSolidFillColor(GpSolidFill *brush, ARGB color);

/* font */

GpStatus WINGDIPAPI
GdipCreateFont(
    GDIPCONST GpFontFamily  *fontFamily,
    REAL                 emSize,
    INT                  style,
    Unit                 unit,
    GpFont             **font
);

GpStatus WINGDIPAPI
GdipDeleteFont(GpFont* font);

GpStatus WINGDIPAPI
GdipGetFontSize(GpFont *font, REAL *size);

GpStatus WINGDIPAPI
GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
                             GpFontCollection *fontCollection,
                             GpFontFamily **fontFamily);

GpStatus WINGDIPAPI
GdipDeleteFontFamily(GpFontFamily *fontFamily);

GpStatus WINGDIPAPI
GdipStringFormatGetGenericTypographic(GpStringFormat **format);

GpStatus WINGDIPAPI
GdipSetStringFormatFlags(GpStringFormat *format, INT flags);

GpStatus WINGDIPAPI
GdipDeleteStringFormat(GpStringFormat *format);

GpStatus WINGDIPAPI 
GdipPrivateAddMemoryFont(GpFontCollection* fontCollection, 
                         GDIPCONST void* memory, INT length);

GpStatus WINGDIPAPI 
GdipPrivateAddFontFile(GpFontCollection* fontCollection, 
                       GDIPCONST WCHAR* filename);

GpStatus WINGDIPAPI 
GdipNewPrivateFontCollection(GpFontCollection** fontCollection);

GpStatus WINGDIPAPI 
GdipDeletePrivateFontCollection(GpFontCollection** fontCollection);

GpStatus WINGDIPAPI 
GdipGetFontCollectionFamilyList(GpFontCollection* fontCollection, 
                        INT numSought, GpFontFamily* gpfamilies[], INT* numFound);

GpStatus WINGDIPAPI 
GdipGetFontCollectionFamilyCount(GpFontCollection* fontCollection, INT* numFound);


/* graphics */


GpStatus WINGDIPAPI
GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics);

GpStatus WINGDIPAPI
GdipCreateFromHDC(HDC hdc, GpGraphics **graphics);

GpStatus WINGDIPAPI
GdipDeleteGraphics(GpGraphics *graphics);

GpStatus WINGDIPAPI
GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode smoothingMode);

GpStatus WINGDIPAPI
GdipSetClipRectI(GpGraphics *graphics, INT x, INT y,
    INT width, INT height, CombineMode combineMode);

GpStatus WINGDIPAPI
GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
                      INT x2, INT y2);

GpStatus WINGDIPAPI
GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
    INT width, INT height, REAL startAngle, REAL sweepAngle);

GpStatus WINGDIPAPI
GdipFillPieI(GpGraphics *graphics, GpBrush *brush, INT x, INT y,
    INT width, INT height, REAL startAngle, REAL sweepAngle);

GpStatus WINGDIPAPI
GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
                   INT width, INT height);

GpStatus WINGDIPAPI
GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush, INT x, INT y,
                   INT width, INT height);

GpStatus WINGDIPAPI
GdipFillPolygonI(GpGraphics *graphics, GpBrush *brush,
                 GDIPCONST GpPoint *points, INT count, FillMode fillMode);

GpStatus WINGDIPAPI
GdipDrawPolygonI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points,
                         INT count);

GpStatus WINGDIPAPI
GdipFillEllipseI(GpGraphics *graphics, GpBrush *brush, INT x, INT y,
                 INT width, INT height);

GpStatus WINGDIPAPI
GdipDrawEllipseI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
                         INT width, INT height);

GpStatus WINGDIPAPI
GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
                        INT x2, INT y2, INT x3, INT y3, INT x4, INT y4);

GpStatus WINGDIPAPI
GdipDrawString(
    GpGraphics               *graphics,
    GDIPCONST WCHAR          *string,
    INT                       length,
    GDIPCONST GpFont         *font,
    GDIPCONST RectF          *layoutRect,
    GDIPCONST GpStringFormat *stringFormat,
    GDIPCONST GpBrush        *brush
);

GpStatus WINGDIPAPI
GdipGraphicsClear(GpGraphics *graphics, ARGB color);

GpStatus WINGDIPAPI
GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x, INT y);

GpStatus WINGDIPAPI 
GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, INT x, INT y, 
                   INT width, INT height);

GpStatus WINGDIPAPI
GdipMeasureString(
    GpGraphics               *graphics,
    GDIPCONST WCHAR          *string,
    INT                       length,
    GDIPCONST GpFont         *font,
    GDIPCONST RectF          *layoutRect,
    GDIPCONST GpStringFormat *stringFormat,
    RectF                    *boundingBox,
    INT                      *codepointsFitted,
    INT                      *linesFilled
);

GpStatus WINGDIPAPI
GdipSetTextRenderingHint(GpGraphics *graphics, TextRenderingHint mode);

LWSTDAPI_(IStream *) SHCreateMemStream(const BYTE *pInit, _In_ UINT cbInit);

struct GdipFont
{
    struct nk_user_font nk;
    GpFont* handle;
};

static struct {
    ULONG_PTR token;

    GpGraphics *window;
    GpGraphics *memory;
    GpImage *bitmap;
    GpPen *pen;
    GpSolidFill *brush;
    GpStringFormat *format;
    GpFontCollection *fontCollection[10];
    INT curFontCollection;

    struct nk_context ctx;
} gdip;

static ARGB convert_color(struct nk_color c)
{
    return (c.a << 24) | (c.r << 16) | (c.g << 8) | c.b;
}

static void
nk_gdip_scissor(float x, float y, float w, float h)
{
    GdipSetClipRectI(gdip.memory, (INT)x, (INT)y, (INT)(w + 1), (INT)(h + 1), CombineModeReplace);
}

static void
nk_gdip_stroke_line(short x0, short y0, short x1,
    short y1, unsigned int line_thickness, struct nk_color col)
{
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    GdipDrawLineI(gdip.memory, gdip.pen, x0, y0, x1, y1);
}

static void
nk_gdip_stroke_rect(short x, short y, unsigned short w,
    unsigned short h, unsigned short r, unsigned short line_thickness, struct nk_color col)
{
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    if (r == 0) {
        GdipDrawRectangleI(gdip.memory, gdip.pen, x, y, w, h);
    } else {
        INT d = 2 * r;
        GdipDrawArcI(gdip.memory, gdip.pen, x, y, d, d, 180, 90);
        GdipDrawLineI(gdip.memory, gdip.pen, x + r, y, x + w - r, y);
        GdipDrawArcI(gdip.memory, gdip.pen, x + w - d, y, d, d, 270, 90);
        GdipDrawLineI(gdip.memory, gdip.pen, x + w, y + r, x + w, y + h - r);
        GdipDrawArcI(gdip.memory, gdip.pen, x + w - d, y + h - d, d, d, 0, 90);
        GdipDrawLineI(gdip.memory, gdip.pen, x, y + r, x, y + h - r);
        GdipDrawArcI(gdip.memory, gdip.pen, x, y + h - d, d, d, 90, 90);
        GdipDrawLineI(gdip.memory, gdip.pen, x + r, y + h, x + w - r, y + h);
    }
}

static void
nk_gdip_fill_rect(short x, short y, unsigned short w,
    unsigned short h, unsigned short r, struct nk_color col)
{
    GdipSetSolidFillColor(gdip.brush, convert_color(col));
    if (r == 0) {
        GdipFillRectangleI(gdip.memory, gdip.brush, x, y, w, h);
    } else {
        INT d = 2 * r;
        GdipFillRectangleI(gdip.memory, gdip.brush, x + r, y, w - d, h);
        GdipFillRectangleI(gdip.memory, gdip.brush, x, y + r, r, h - d);
        GdipFillRectangleI(gdip.memory, gdip.brush, x + w - r, y + r, r, h - d);
        GdipFillPieI(gdip.memory, gdip.brush, x, y, d, d, 180, 90);
        GdipFillPieI(gdip.memory, gdip.brush, x + w - d, y, d, d, 270, 90);
        GdipFillPieI(gdip.memory, gdip.brush, x + w - d, y + h - d, d, d, 0, 90);
        GdipFillPieI(gdip.memory, gdip.brush, x, y + h - d, d, d, 90, 90);
    }
}

static void
nk_gdip_fill_triangle(short x0, short y0, short x1,
    short y1, short x2, short y2, struct nk_color col)
{
    POINT points[] = {
        { x0, y0 },
        { x1, y1 },
        { x2, y2 },
    };

    GdipSetSolidFillColor(gdip.brush, convert_color(col));
    GdipFillPolygonI(gdip.memory, gdip.brush, points, 3, FillModeAlternate);
}

static void
nk_gdip_stroke_triangle(short x0, short y0, short x1,
    short y1, short x2, short y2, unsigned short line_thickness, struct nk_color col)
{
    POINT points[] = {
        { x0, y0 },
        { x1, y1 },
        { x2, y2 },
        { x0, y0 },
    };
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    GdipDrawPolygonI(gdip.memory, gdip.pen, points, 4);
}

static void
nk_gdip_fill_polygon(const struct nk_vec2i *pnts, int count, struct nk_color col)
{
    int i = 0;
    #define MAX_POINTS 64
    POINT points[MAX_POINTS];
    GdipSetSolidFillColor(gdip.brush, convert_color(col));
    for (i = 0; i < count && i < MAX_POINTS; ++i) {
        points[i].x = pnts[i].x;
        points[i].y = pnts[i].y;
    }
    GdipFillPolygonI(gdip.memory, gdip.brush, points, i, FillModeAlternate);
    #undef MAX_POINTS
}

static void
nk_gdip_stroke_polygon(const struct nk_vec2i *pnts, int count,
    unsigned short line_thickness, struct nk_color col)
{
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    if (count > 0) {
        int i;
        for (i = 1; i < count; ++i)
            GdipDrawLineI(gdip.memory, gdip.pen, pnts[i-1].x, pnts[i-1].y, pnts[i].x, pnts[i].y);
        GdipDrawLineI(gdip.memory, gdip.pen, pnts[count-1].x, pnts[count-1].y, pnts[0].x, pnts[0].y);
    }
}

static void
nk_gdip_stroke_polyline(const struct nk_vec2i *pnts,
    int count, unsigned short line_thickness, struct nk_color col)
{
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    if (count > 0) {
        int i;
        for (i = 1; i < count; ++i)
            GdipDrawLineI(gdip.memory, gdip.pen, pnts[i-1].x, pnts[i-1].y, pnts[i].x, pnts[i].y);
    }
}

static void
nk_gdip_fill_circle(short x, short y, unsigned short w,
    unsigned short h, struct nk_color col)
{
    GdipSetSolidFillColor(gdip.brush, convert_color(col));
    GdipFillEllipseI(gdip.memory, gdip.brush, x, y, w, h);
}

static void
nk_gdip_stroke_circle(short x, short y, unsigned short w,
    unsigned short h, unsigned short line_thickness, struct nk_color col)
{
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    GdipDrawEllipseI(gdip.memory, gdip.pen, x, y, w, h);
}

static void
nk_gdip_stroke_curve(struct nk_vec2i p1,
    struct nk_vec2i p2, struct nk_vec2i p3, struct nk_vec2i p4,
    unsigned short line_thickness, struct nk_color col)
{
    GdipSetPenWidth(gdip.pen, (REAL)line_thickness);
    GdipSetPenColor(gdip.pen, convert_color(col));
    GdipDrawBezierI(gdip.memory, gdip.pen, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);
}

static void
nk_gdip_draw_text(short x, short y, unsigned short w, unsigned short h,
    const char *text, int len, GdipFont *font, struct nk_color cbg, struct nk_color cfg)
{
    int wsize;
    WCHAR* wstr;
    RectF layout = { (FLOAT)x, (FLOAT)y, (FLOAT)w, (FLOAT)h };

    if(!text || !font || !len) return;

    wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
    wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);

    GdipSetSolidFillColor(gdip.brush, convert_color(cfg));
    GdipDrawString(gdip.memory, wstr, wsize, font->handle, &layout, gdip.format, gdip.brush);
}

static void
nk_gdip_draw_image(short x, short y, unsigned short w, unsigned short h,
    struct nk_image img, struct nk_color col)
{
    GpImage *image = img.handle.ptr;
    GdipDrawImageRectI(gdip.memory, image, x, y, w, h);
}

static void
nk_gdip_clear(struct nk_color col)
{
    GdipGraphicsClear(gdip.memory, convert_color(col));
}

static void
nk_gdip_blit(GpGraphics *graphics)
{
    GdipDrawImageI(graphics, gdip.bitmap, 0, 0);
}

static struct nk_image
nk_gdip_image_to_nk(GpImage *image) {
    struct nk_image img;
    UINT uwidth, uheight;
    img = nk_image_ptr( (void*)image );
    GdipGetImageHeight(image, &uheight);
    GdipGetImageWidth(image, &uwidth);
    img.h = uheight;
    img.w = uwidth;
    return img;
}

struct nk_image
nk_gdip_load_image_from_file(const WCHAR *filename)
{
    GpImage *image;
    if (GdipLoadImageFromFile(filename, &image))
        return nk_image_id(0);
    return nk_gdip_image_to_nk(image);
}

struct nk_image
nk_gdip_load_image_from_memory(const void *membuf, nk_uint membufSize)
{
    GpImage* image;
    GpStatus status;
    IStream *stream = SHCreateMemStream((const BYTE*)membuf, membufSize);
    if (!stream)
        return nk_image_id(0);
    
    status = GdipLoadImageFromStream(stream, &image);
    stream->lpVtbl->Release(stream);

    if (status)
        return nk_image_id(0);

    return nk_gdip_image_to_nk(image);
}

void
nk_gdip_image_free(struct nk_image image)
{
    if (!image.handle.ptr)
        return;
    GdipDisposeImage(image.handle.ptr);
}

GdipFont*
nk_gdipfont_create(const char *name, int size)
{
    GdipFont *font = (GdipFont*)calloc(1, sizeof(GdipFont));
    GpFontFamily *family;

    int wsize = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
    WCHAR* wname = (WCHAR*)_alloca((wsize + 1) * sizeof(wchar_t));
    MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, wsize);
    wname[wsize] = 0;

    GdipCreateFontFamilyFromName(wname, NULL, &family);
    GdipCreateFont(family, (REAL)size, FontStyleRegular, UnitPixel, &font->handle);
    GdipDeleteFontFamily(family);

    return font;
}

GpFontCollection* 
nk_gdip_getCurFontCollection(){
    return gdip.fontCollection[gdip.curFontCollection];
}

GdipFont*
nk_gdipfont_create_from_collection(int size){
    GpFontFamily **families;
    INT count;
    GdipFont *font = (GdipFont*)calloc(1, sizeof(GdipFont));
    if( GdipGetFontCollectionFamilyCount(nk_gdip_getCurFontCollection(), &count) ) return NULL;
    families = (GpFontFamily**)calloc(1, sizeof(GpFontFamily*));
    if( !families ) return NULL;
    if( GdipGetFontCollectionFamilyList(nk_gdip_getCurFontCollection(), count, families, &count) ) return NULL;
    if( count < 1 ) return NULL;
    if( GdipCreateFont(families[count-1], (REAL)size, FontStyleRegular, UnitPixel, &font->handle) ) return NULL;
    free(families);
    gdip.curFontCollection++;
    return font;
}

GdipFont*
nk_gdipfont_create_from_memory(const void* membuf, int membufSize, int size)
{
    if( !nk_gdip_getCurFontCollection() )
        if( GdipNewPrivateFontCollection(&gdip.fontCollection[gdip.curFontCollection]) ) return NULL;
    if( GdipPrivateAddMemoryFont(nk_gdip_getCurFontCollection(), membuf, membufSize) ) return NULL;
    return nk_gdipfont_create_from_collection(size);
}

GdipFont*
nk_gdipfont_create_from_file(const WCHAR* filename, int size)
{
    if( !nk_gdip_getCurFontCollection() )
        if( GdipNewPrivateFontCollection(&gdip.fontCollection[gdip.curFontCollection]) ) return NULL;
    if( GdipPrivateAddFontFile(nk_gdip_getCurFontCollection(), filename) ) return NULL;    
    return nk_gdipfont_create_from_collection(size);
}

static float
nk_gdipfont_get_text_width(nk_handle handle, float height, const char *text, int len)
{
    GdipFont *font = (GdipFont *)handle.ptr;
    RectF layout = { 0.0f, 0.0f, 65536.0f, 65536.0f };
    RectF bbox;
    int wsize;
    WCHAR* wstr;
    if (!font || !text)
        return 0;

    (void)height;
    wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
    wstr = (WCHAR*)_alloca(wsize * sizeof(wchar_t));
    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);

    GdipMeasureString(gdip.memory, wstr, wsize, font->handle, &layout, gdip.format, &bbox, NULL, NULL);
    return bbox.Width;
}

void
nk_gdipfont_del(GdipFont *font)
{
    if(!font) return;
    GdipDeleteFont(font->handle);
    free(font);
}

static void
nk_gdip_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
    HGLOBAL mem;
    SIZE_T size;
    LPCWSTR wstr;
    int utf8size;
    char* utf8;
    (void)usr;

    if (!IsClipboardFormatAvailable(CF_UNICODETEXT) && OpenClipboard(NULL))
        return;

    mem = (HGLOBAL)GetClipboardData(CF_UNICODETEXT);
    if (!mem) {
        CloseClipboard();
        return;
    }

    size = GlobalSize(mem) - 1;
    if (!size) {
        CloseClipboard();
        return;
    }

    wstr = (LPCWSTR)GlobalLock(mem);
    if (!wstr) {
        CloseClipboard();
        return;
    }

    utf8size = WideCharToMultiByte(CP_UTF8, 0, wstr, (int)(size / sizeof(wchar_t)), NULL, 0, NULL, NULL);
    if (!utf8size) {
        GlobalUnlock(mem);
        CloseClipboard();
        return;
    }

    utf8 = (char*)malloc(utf8size);
    if (!utf8) {
        GlobalUnlock(mem);
        CloseClipboard();
        return;
    }

    WideCharToMultiByte(CP_UTF8, 0, wstr, (int)(size / sizeof(wchar_t)), utf8, utf8size, NULL, NULL);
    nk_textedit_paste(edit, utf8, utf8size);
    free(utf8);
    GlobalUnlock(mem);
    CloseClipboard();
}

static void
nk_gdip_clipboard_copy(nk_handle usr, const char *text, int len)
{
    HGLOBAL mem;
    wchar_t* wstr;
    int wsize;
    (void)usr;

    if (!OpenClipboard(NULL))
        return;

    wsize = MultiByteToWideChar(CP_UTF8, 0, text, len, NULL, 0);
    if (!wsize) {
        CloseClipboard();
        return;
    }

    mem = (HGLOBAL)GlobalAlloc(GMEM_MOVEABLE, (wsize + 1) * sizeof(wchar_t));
    if (!mem) {
        CloseClipboard();
        return;
    }

    wstr = (wchar_t*)GlobalLock(mem);
    if (!wstr) {
        GlobalFree(mem);
        CloseClipboard();
        return;
    }

    MultiByteToWideChar(CP_UTF8, 0, text, len, wstr, wsize);
    wstr[wsize] = 0;
    GlobalUnlock(mem);
    if (!SetClipboardData(CF_UNICODETEXT, mem))
        GlobalFree(mem);
    CloseClipboard();
}

NK_API struct nk_context*
nk_gdip_init(HWND hwnd, unsigned int width, unsigned int height)
{
    int i;
    GdiplusStartupInput startup = { 1, NULL, FALSE, TRUE };
    GdiplusStartup(&gdip.token, &startup, NULL);

    GdipCreateFromHWND(hwnd, &gdip.window);
    GdipCreateBitmapFromGraphics(width, height, gdip.window, &gdip.bitmap);
    GdipGetImageGraphicsContext(gdip.bitmap, &gdip.memory);
    GdipCreatePen1(0, 1.0f, UnitPixel, &gdip.pen);
    GdipCreateSolidFill(0, &gdip.brush);
    GdipStringFormatGetGenericTypographic(&gdip.format);
    GdipSetStringFormatFlags(gdip.format, StringFormatFlagsNoFitBlackBox | 
        StringFormatFlagsMeasureTrailingSpaces | StringFormatFlagsNoWrap |
        StringFormatFlagsNoClip);

    for(i=0; i< sizeof(gdip.fontCollection)/sizeof(gdip.fontCollection[0]); i++)
        gdip.fontCollection[i] = NULL;
    nk_init_default(&gdip.ctx, NULL);
    gdip.ctx.clip.copy = nk_gdip_clipboard_copy;
    gdip.ctx.clip.paste = nk_gdip_clipboard_paste;
    gdip.curFontCollection = 0;
    return &gdip.ctx;
}

NK_API void
nk_gdip_set_font(GdipFont *gdipfont)
{
    struct nk_user_font *font = &gdipfont->nk;
    font->userdata = nk_handle_ptr(gdipfont);
    GdipGetFontSize(gdipfont->handle, &font->height);
    font->width = nk_gdipfont_get_text_width;
    nk_style_set_font(&gdip.ctx, font);
}

NK_API int
nk_gdip_handle_event(HWND wnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
    switch (msg)
    {
    case WM_SIZE:
        if (gdip.window)
        {
            unsigned int width = LOWORD(lparam);
            unsigned int height = HIWORD(lparam);
            GdipDeleteGraphics(gdip.window);
            GdipDeleteGraphics(gdip.memory);
            GdipDisposeImage(gdip.bitmap);
            GdipCreateFromHWND(wnd, &gdip.window);
            GdipCreateBitmapFromGraphics(width, height, gdip.window, &gdip.bitmap);
            GdipGetImageGraphicsContext(gdip.bitmap, &gdip.memory);
        }
        break;

    case WM_PAINT:
    {
        PAINTSTRUCT paint;
        HDC dc = BeginPaint(wnd, &paint);
        GpGraphics *graphics;
        GdipCreateFromHDC(dc, &graphics);
        nk_gdip_blit(graphics);
        GdipDeleteGraphics(graphics);
        EndPaint(wnd, &paint);
        return 1;
    }

    case WM_KEYDOWN:
    case WM_KEYUP:
    case WM_SYSKEYDOWN:
    case WM_SYSKEYUP:
    {
        int down = !((lparam >> 31) & 1);
        int ctrl = GetKeyState(VK_CONTROL) & (1 << 15);

        switch (wparam)
        {
        case VK_SHIFT:
        case VK_LSHIFT:
        case VK_RSHIFT:
            nk_input_key(&gdip.ctx, NK_KEY_SHIFT, down);
            return 1;

        case VK_DELETE:
            nk_input_key(&gdip.ctx, NK_KEY_DEL, down);
            return 1;

        case VK_RETURN:
            nk_input_key(&gdip.ctx, NK_KEY_ENTER, down);
            return 1;

        case VK_TAB:
            nk_input_key(&gdip.ctx, NK_KEY_TAB, down);
            return 1;

        case VK_LEFT:
            if (ctrl)
                nk_input_key(&gdip.ctx, NK_KEY_TEXT_WORD_LEFT, down);
            else
                nk_input_key(&gdip.ctx, NK_KEY_LEFT, down);
            return 1;

        case VK_RIGHT:
            if (ctrl)
                nk_input_key(&gdip.ctx, NK_KEY_TEXT_WORD_RIGHT, down);
            else
                nk_input_key(&gdip.ctx, NK_KEY_RIGHT, down);
            return 1;

        case VK_BACK:
            nk_input_key(&gdip.ctx, NK_KEY_BACKSPACE, down);
            return 1;

        case VK_HOME:
            nk_input_key(&gdip.ctx, NK_KEY_TEXT_START, down);
            nk_input_key(&gdip.ctx, NK_KEY_SCROLL_START, down);
            return 1;

        case VK_END:
            nk_input_key(&gdip.ctx, NK_KEY_TEXT_END, down);
            nk_input_key(&gdip.ctx, NK_KEY_SCROLL_END, down);
            return 1;

        case VK_NEXT:
            nk_input_key(&gdip.ctx, NK_KEY_SCROLL_DOWN, down);
            return 1;

        case VK_PRIOR:
            nk_input_key(&gdip.ctx, NK_KEY_SCROLL_UP, down);
            return 1;

        case 'C':
            if (ctrl) {
                nk_input_key(&gdip.ctx, NK_KEY_COPY, down);
                return 1;
            }
            break;

        case 'V':
            if (ctrl) {
                nk_input_key(&gdip.ctx, NK_KEY_PASTE, down);
                return 1;
            }
            break;

        case 'X':
            if (ctrl) {
                nk_input_key(&gdip.ctx, NK_KEY_CUT, down);
                return 1;
            }
            break;

        case 'Z':
            if (ctrl) {
                nk_input_key(&gdip.ctx, NK_KEY_TEXT_UNDO, down);
                return 1;
            }
            break;

        case 'R':
            if (ctrl) {
                nk_input_key(&gdip.ctx, NK_KEY_TEXT_REDO, down);
                return 1;
            }
            break;
        }
        return 0;
    }

    case WM_CHAR:
        if (wparam >= 32)
        {
            nk_input_unicode(&gdip.ctx, (nk_rune)wparam);
            return 1;
        }
        break;

    case WM_LBUTTONDOWN:
        nk_input_button(&gdip.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_LBUTTONUP:
        nk_input_button(&gdip.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        nk_input_button(&gdip.ctx, NK_BUTTON_LEFT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_RBUTTONDOWN:
        nk_input_button(&gdip.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_RBUTTONUP:
        nk_input_button(&gdip.ctx, NK_BUTTON_RIGHT, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MBUTTONDOWN:
        nk_input_button(&gdip.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        SetCapture(wnd);
        return 1;

    case WM_MBUTTONUP:
        nk_input_button(&gdip.ctx, NK_BUTTON_MIDDLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 0);
        ReleaseCapture();
        return 1;

    case WM_MOUSEWHEEL:
        nk_input_scroll(&gdip.ctx, nk_vec2(0,(float)(short)HIWORD(wparam) / WHEEL_DELTA));
        return 1;

    case WM_MOUSEMOVE:
        nk_input_motion(&gdip.ctx, (short)LOWORD(lparam), (short)HIWORD(lparam));
        return 1;

    case WM_LBUTTONDBLCLK:
        nk_input_button(&gdip.ctx, NK_BUTTON_DOUBLE, (short)LOWORD(lparam), (short)HIWORD(lparam), 1);
        return 1;
    }

    return 0;
}

NK_API void
nk_gdip_shutdown(void)
{
    int i;
    for(i=0; i< gdip.curFontCollection; i++)
        GdipDeletePrivateFontCollection( &gdip.fontCollection[i] );
    GdipDeleteGraphics(gdip.window);
    GdipDeleteGraphics(gdip.memory);
    GdipDisposeImage(gdip.bitmap);
    GdipDeletePen(gdip.pen);
    GdipDeleteBrush(gdip.brush);
    GdipDeleteStringFormat(gdip.format);
    GdiplusShutdown(gdip.token);

    nk_free(&gdip.ctx);
}

NK_API void
nk_gdip_prerender_gui(enum nk_anti_aliasing AA)
{
    const struct nk_command *cmd;

    GdipSetTextRenderingHint(gdip.memory, AA != NK_ANTI_ALIASING_OFF ?
        TextRenderingHintClearTypeGridFit : TextRenderingHintSingleBitPerPixelGridFit);
    GdipSetSmoothingMode(gdip.memory, AA != NK_ANTI_ALIASING_OFF ?
        SmoothingModeHighQuality : SmoothingModeNone);

    nk_foreach(cmd, &gdip.ctx)
    {
        switch (cmd->type) {
        case NK_COMMAND_NOP: break;
        case NK_COMMAND_SCISSOR: {
            const struct nk_command_scissor *s =(const struct nk_command_scissor*)cmd;
            nk_gdip_scissor(s->x, s->y, s->w, s->h);
        } break;
        case NK_COMMAND_LINE: {
            const struct nk_command_line *l = (const struct nk_command_line *)cmd;
            nk_gdip_stroke_line(l->begin.x, l->begin.y, l->end.x,
                l->end.y, l->line_thickness, l->color);
        } break;
        case NK_COMMAND_RECT: {
            const struct nk_command_rect *r = (const struct nk_command_rect *)cmd;
            nk_gdip_stroke_rect(r->x, r->y, r->w, r->h,
                (unsigned short)r->rounding, r->line_thickness, r->color);
        } break;
        case NK_COMMAND_RECT_FILLED: {
            const struct nk_command_rect_filled *r = (const struct nk_command_rect_filled *)cmd;
            nk_gdip_fill_rect(r->x, r->y, r->w, r->h,
                (unsigned short)r->rounding, r->color);
        } break;
        case NK_COMMAND_CIRCLE: {
            const struct nk_command_circle *c = (const struct nk_command_circle *)cmd;
            nk_gdip_stroke_circle(c->x, c->y, c->w, c->h, c->line_thickness, c->color);
        } break;
        case NK_COMMAND_CIRCLE_FILLED: {
            const struct nk_command_circle_filled *c = (const struct nk_command_circle_filled *)cmd;
            nk_gdip_fill_circle(c->x, c->y, c->w, c->h, c->color);
        } break;
        case NK_COMMAND_TRIANGLE: {
            const struct nk_command_triangle*t = (const struct nk_command_triangle*)cmd;
            nk_gdip_stroke_triangle(t->a.x, t->a.y, t->b.x, t->b.y,
                t->c.x, t->c.y, t->line_thickness, t->color);
        } break;
        case NK_COMMAND_TRIANGLE_FILLED: {
            const struct nk_command_triangle_filled *t = (const struct nk_command_triangle_filled *)cmd;
            nk_gdip_fill_triangle(t->a.x, t->a.y, t->b.x, t->b.y,
                t->c.x, t->c.y, t->color);
        } break;
        case NK_COMMAND_POLYGON: {
            const struct nk_command_polygon *p =(const struct nk_command_polygon*)cmd;
            nk_gdip_stroke_polygon(p->points, p->point_count, p->line_thickness,p->color);
        } break;
        case NK_COMMAND_POLYGON_FILLED: {
            const struct nk_command_polygon_filled *p = (const struct nk_command_polygon_filled *)cmd;
            nk_gdip_fill_polygon(p->points, p->point_count, p->color);
        } break;
        case NK_COMMAND_POLYLINE: {
            const struct nk_command_polyline *p = (const struct nk_command_polyline *)cmd;
            nk_gdip_stroke_polyline(p->points, p->point_count, p->line_thickness, p->color);
        } break;
        case NK_COMMAND_TEXT: {
            const struct nk_command_text *t = (const struct nk_command_text*)cmd;
            nk_gdip_draw_text(t->x, t->y, t->w, t->h,
                (const char*)t->string, t->length,
                (GdipFont*)t->font->userdata.ptr,
                t->background, t->foreground);
        } break;
        case NK_COMMAND_CURVE: {
            const struct nk_command_curve *q = (const struct nk_command_curve *)cmd;
            nk_gdip_stroke_curve(q->begin, q->ctrl[0], q->ctrl[1],
                q->end, q->line_thickness, q->color);
        } break;
        case NK_COMMAND_IMAGE: {
            const struct nk_command_image *i = (const struct nk_command_image *)cmd;
            nk_gdip_draw_image(i->x, i->y, i->w, i->h, i->img, i->col);
        } break;
        case NK_COMMAND_RECT_MULTI_COLOR:
        case NK_COMMAND_ARC:
        case NK_COMMAND_ARC_FILLED:
        default: break;
        }
    }
}

NK_API void
nk_gdip_render_gui(enum nk_anti_aliasing AA)
{
    nk_gdip_prerender_gui(AA);
    nk_gdip_blit(gdip.window);
    nk_clear(&gdip.ctx);
}

NK_API void
nk_gdip_render(enum nk_anti_aliasing AA, struct nk_color clear)
{
    nk_gdip_clear(clear);
    nk_gdip_render_gui(AA);
}

#endif


================================================
FILE: demo/glfw_opengl2/Makefile
================================================
# Install
BIN = demo

# Flags
CFLAGS += -std=c99 -pedantic -O2

SRC = main.c
OBJ = $(SRC:.c=.o)

ifeq ($(OS),Windows_NT)
BIN := $(BIN).exe
LIBS = -lglfw3 -lopengl32 -lm -lGLU32
else
	UNAME_S := $(shell uname -s)
	ifeq ($(UNAME_S),Darwin)
		LIBS := -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
	else
		LIBS = -lglfw -lGL -lm -lGLU
	endif
endif

$(BIN):
	@mkdir -p bin
	rm -f bin/$(BIN) $(OBJS)
	$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) $(LIBS)


================================================
FILE: demo/glfw_opengl2/main.c
================================================
/* nuklear - v1.32.0 - public domain */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <math.h>
#include <limits.h>
#include <time.h>

#include <GLFW/glfw3.h>

#define NK_INCLUDE_FIXED_TYPES
#define NK_INCLUDE_STANDARD_IO
#define NK_INCLUDE_STANDARD_VARARGS
#define NK_INCLUDE_DEFAULT_ALLOCATOR
#define NK_INCLUDE_VERTEX_BUFFER_OUTPUT
#define NK_INCLUDE_FONT_BAKING
#define NK_INCLUDE_DEFAULT_FONT
#define NK_IMPLEMENTATION
#define NK_GLFW_GL2_IMPLEMENTATION
#define NK_KEYSTATE_BASED_INPUT
#include "../../nuklear.h"
#include "nuklear_glfw_gl2.h"

#define WINDOW_WIDTH 1200
#define WINDOW_HEIGHT 800

/* ===============================================================
 *
 *                          EXAMPLE
 *
 * ===============================================================*/
/* This are some code examples to provide a small overview of what can be
 * done with this library. To try out an example uncomment the defines */
/*#define INCLUDE_ALL */
/*#define INCLUDE_STYLE */
/*#define INCLUDE_CALCULATOR */
#define INCLUDE_OVERVIEW
/*#define INCLUDE_NODE_EDITOR */

#ifdef INCLUDE_ALL
  #define INCLUDE_STYLE
  #define INCLUDE_CALCULATOR
  #define INCLUDE_OVERVIEW
  #define INCLUDE_NODE_EDITOR
#endif

#ifdef INCLUDE_STYLE
  #include "../style.c"
#endif
#ifdef INCLUDE_CALCULATOR
  #include "../calculator.c"
#endif
#ifdef INCLUDE_OVERVIEW
  #include "../overview.c"
#endif
#ifdef INCLUDE_NODE_EDITOR
  #include "../node_editor.c"
#endif

/* ===============================================================
 *
 *                          DEMO
 *
 * ===============================================================*/
static void error_callback(int e, const char *d)
{printf("Error %d: %s\n", e, d);}

int main(void)
{
    /* Platform */
    static GLFWwindow *win;
    int width = 0, height = 0;
    struct nk_context *ctx;
    struct nk_colorf bg;

    /* GLFW */
    glfwSetErrorCallback(error_callback);
    if (!glfwInit()) {
        fprintf(stdout, "[GFLW] failed to init!\n");
        exit(1);
    }
    win = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Demo", NULL, NULL);
    glfwMakeContextCurrent(win);
    glfwGetWindowSize(win, &width, &height);

    /* GUI */
    ctx = nk_glfw3_init(win, NK_GLFW3_INSTALL_CALLBACKS);
    /* Load Fonts: if none of these are loaded a default font will be used  */
    /* Load Cursor: if you uncomment cursor loading please hide the cursor */
    {struct nk_font_atlas *atlas;
    nk_glfw3_font_stash_begin(&atlas);
    /*struct nk_font *droid = nk_font_atlas_add_from_file(atlas, "../../../extra_font/DroidSans.ttf", 14, 0);*/
    /*struct nk_font *roboto = nk_font_atlas_add_from_file(atlas, "../../../extra_font/Roboto-Regular.ttf", 14, 0);*/
    /*struct nk_font *future = nk_font_atlas_add_from_file(atlas, "../../../extra_font/kenvector_future_thin.ttf", 13, 0);*/
    /*struct nk_font *clean = nk_font_atlas_add_from_file(atlas, "../../../extra_font/ProggyClean.ttf", 12, 0);*/
    /*struct nk_font *tiny = nk_font_atlas_add_from_file(atlas, "../../../extra_font/ProggyTiny.ttf", 10, 0);*/
    /*struct nk_font *cousine = nk_font_atlas_add_from_file(atlas, "../../../extra_font/Cousine-Regular.ttf", 13, 0);*/
    nk_glfw3_font_stash_end();
    /*nk_style_load_all_cursors(ctx, atlas->cursors);*/
    /*nk_style_set_font(ctx, &droid->handle);*/}

    #ifdef INCLUDE_STYLE
    /*set_style(ctx, THEME_WHITE);*/
    /*set_style(ctx, THEME_RED);*/
    /*set_style(ctx, THEME_BLUE);*/
    /*set_style(ctx, THEME_DARK);*/
    #endif

    bg.r = 0.10f, bg.g = 0.18f, bg.b = 0.24f, bg.a = 1.0f;
    while (!glfwWindowShouldClose(win))
    {
        /* Input */
        glfwPollEvents();
        nk_glfw3_new_frame();

        /* GUI */
        if (nk_begin(ctx, "Demo", nk_rect(50, 50, 230, 250),
            NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_SCALABLE|
 
Download .txt
gitextract_hks9o4hv/

├── .gitattributes
├── .gitignore
├── .gitmodules
├── .travis.yml
├── Readme.md
├── demo/
│   ├── allegro5/
│   │   ├── KeyboardHandleriOS.h
│   │   ├── KeyboardHandleriOS.m
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.c
│   │   └── nuklear_allegro5.h
│   ├── calculator.c
│   ├── d3d11/
│   │   ├── build.bat
│   │   ├── main.c
│   │   ├── nuklear_d3d11.h
│   │   ├── nuklear_d3d11.hlsl
│   │   ├── nuklear_d3d11_pixel_shader.h
│   │   └── nuklear_d3d11_vertex_shader.h
│   ├── d3d9/
│   │   ├── build.bat
│   │   ├── main.c
│   │   └── nuklear_d3d9.h
│   ├── gdi/
│   │   ├── build.bat
│   │   ├── main.c
│   │   └── nuklear_gdi.h
│   ├── gdip/
│   │   ├── build.bat
│   │   ├── main.c
│   │   └── nuklear_gdip.h
│   ├── glfw_opengl2/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_glfw_gl2.h
│   ├── glfw_opengl3/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_glfw_gl3.h
│   ├── glfw_opengl4/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_glfw_gl4.h
│   ├── node_editor.c
│   ├── overview.c
│   ├── sdl_opengl2/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_sdl_gl2.h
│   ├── sdl_opengl3/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_sdl_gl3.h
│   ├── sdl_opengles2/
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.c
│   │   └── nuklear_sdl_gles2.h
│   ├── sfml_opengl2/
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.cpp
│   │   └── nuklear_sfml_gl2.h
│   ├── sfml_opengl3/
│   │   ├── Makefile
│   │   ├── Readme.md
│   │   ├── main.cpp
│   │   └── nuklear_sfml_gl3.h
│   ├── style.c
│   ├── x11/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_xlib.h
│   ├── x11_opengl2/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_xlib_gl2.h
│   ├── x11_opengl3/
│   │   ├── Makefile
│   │   ├── main.c
│   │   └── nuklear_xlib_gl3.h
│   ├── x11_rawfb/
│   │   ├── Makefile
│   │   ├── main.c
│   │   ├── nuklear_rawfb.h
│   │   └── nuklear_xlib.h
│   └── x11_xft/
│       ├── Makefile
│       ├── main.c
│       └── nuklear_xlib.h
├── doc/
│   ├── Makefile
│   ├── build.sh
│   ├── nuklear.html
│   └── stddoc.c
├── example/
│   ├── Makefile
│   ├── canvas.c
│   ├── extended.c
│   ├── file_browser.c
│   ├── skinning.c
│   └── stb_image.h
├── nuklear.h
├── package.json
└── src/
    ├── CHANGELOG
    ├── CREDITS
    ├── HEADER
    ├── LICENSE
    ├── Readme.md
    ├── build.py
    ├── nuklear.h
    ├── nuklear_buffer.c
    ├── nuklear_button.c
    ├── nuklear_chart.c
    ├── nuklear_color.c
    ├── nuklear_color_picker.c
    ├── nuklear_combo.c
    ├── nuklear_context.c
    ├── nuklear_contextual.c
    ├── nuklear_draw.c
    ├── nuklear_edit.c
    ├── nuklear_font.c
    ├── nuklear_group.c
    ├── nuklear_image.c
    ├── nuklear_input.c
    ├── nuklear_internal.h
    ├── nuklear_layout.c
    ├── nuklear_list_view.c
    ├── nuklear_math.c
    ├── nuklear_menu.c
    ├── nuklear_page_element.c
    ├── nuklear_panel.c
    ├── nuklear_pool.c
    ├── nuklear_popup.c
    ├── nuklear_progress.c
    ├── nuklear_property.c
    ├── nuklear_scrollbar.c
    ├── nuklear_selectable.c
    ├── nuklear_slider.c
    ├── nuklear_string.c
    ├── nuklear_style.c
    ├── nuklear_table.c
    ├── nuklear_text.c
    ├── nuklear_text_editor.c
    ├── nuklear_toggle.c
    ├── nuklear_tooltip.c
    ├── nuklear_tree.c
    ├── nuklear_utf8.c
    ├── nuklear_util.c
    ├── nuklear_vertex.c
    ├── nuklear_widget.c
    ├── nuklear_window.c
    └── paq.sh
Download .txt
Showing preview only (267K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5013 symbols across 91 files)

FILE: demo/allegro5/main.c
  function error_callback (line 50) | static void error_callback(int e, const char *d)
  function main (line 53) | int main(void)

FILE: demo/allegro5/nuklear_allegro5.h
  type NkAllegro5Font (line 23) | typedef struct NkAllegro5Font NkAllegro5Font;
  type NkAllegro5Font (line 50) | struct NkAllegro5Font {
  type nk_allegro5 (line 56) | struct nk_allegro5 {
  function NK_API (line 68) | NK_API NkAllegro5Font*
  function nk_allegro5_font_get_text_width (line 94) | static float
  function NK_API (line 111) | NK_API void
  function NK_API (line 121) | NK_API void
  function ALLEGRO_COLOR (line 129) | static ALLEGRO_COLOR
  function NK_API (line 136) | NK_API void
  function NK_API (line 276) | NK_API void
  function NK_INTERN (line 401) | NK_INTERN void
  function NK_INTERN (line 410) | NK_INTERN void
  function nk_context (line 424) | nk_context*
  function NK_API (line 451) | NK_API

FILE: demo/calculator.c
  function calculator (line 2) | static void

FILE: demo/d3d11/main.c
  function set_swap_chain_size (line 72) | static void
  function LRESULT (line 106) | static LRESULT CALLBACK
  function main (line 132) | int main(void)

FILE: demo/d3d11/nuklear_d3d11.h
  type ID3D11Device (line 19) | typedef struct ID3D11Device ID3D11Device;
  type ID3D11DeviceContext (line 20) | typedef struct ID3D11DeviceContext ID3D11DeviceContext;
  type nk_font_atlas (line 23) | struct nk_font_atlas
  type nk_anti_aliasing (line 26) | enum nk_anti_aliasing
  type nk_d3d11_vertex (line 52) | struct nk_d3d11_vertex {
  type nk_context (line 60) | struct nk_context
  type nk_font_atlas (line 61) | struct nk_font_atlas
  type nk_buffer (line 62) | struct nk_buffer
  type nk_draw_null_texture (line 64) | struct nk_draw_null_texture
  function NK_API (line 82) | NK_API void
  function nk_d3d11_get_projection_matrix (line 167) | static void
  function NK_API (line 184) | NK_API void
  function NK_API (line 198) | NK_API int
  function nk_d3d11_clipboard_paste (line 360) | static void
  function nk_d3d11_clipboard_copy (line 394) | static void
  function nk_context (line 420) | nk_context*
  function NK_API (line 548) | NK_API void
  function NK_API (line 556) | NK_API void
  function NK_API (line 601) | NK_API

FILE: demo/d3d9/main.c
  function LRESULT (line 68) | static LRESULT CALLBACK
  function create_d3d9_device (line 102) | static void create_d3d9_device(HWND wnd)
  function main (line 164) | int main(void)

FILE: demo/d3d9/nuklear_d3d9.h
  type IDirect3DDevice9 (line 19) | typedef struct IDirect3DDevice9 IDirect3DDevice9;
  type nk_font_atlas (line 22) | struct nk_font_atlas
  type nk_anti_aliasing (line 25) | enum nk_anti_aliasing
  type nk_d3d9_vertex (line 47) | struct nk_d3d9_vertex {
  type nk_context (line 57) | struct nk_context
  type nk_font_atlas (line 58) | struct nk_font_atlas
  type nk_buffer (line 59) | struct nk_buffer
  type nk_draw_null_texture (line 61) | struct nk_draw_null_texture
  function NK_API (line 70) | NK_API void
  function NK_API (line 112) | NK_API void
  function nk_d3d9_get_projection_matrix (line 198) | static void
  function NK_API (line 214) | NK_API void
  function nk_d3d9_create_font_texture (line 220) | static void
  function NK_API (line 249) | NK_API void
  function NK_API (line 263) | NK_API int
  function nk_d3d9_clipboard_paste (line 425) | static void
  function nk_d3d9_clipboard_copy (line 465) | static void
  function nk_context (line 490) | nk_context*
  function NK_API (line 516) | NK_API void
  function NK_API (line 524) | NK_API void
  function NK_API (line 533) | NK_API

FILE: demo/gdi/main.c
  function LRESULT (line 59) | static LRESULT CALLBACK
  function main (line 75) | int main(void)

FILE: demo/gdi/nuklear_gdi.h
  type GdiFont (line 19) | typedef struct GdiFont GdiFont;
  type nk_color (line 22) | struct nk_color
  type GdiFont (line 44) | struct GdiFont {
  type nk_context (line 57) | struct nk_context
  function nk_create_image (line 60) | static void
  function nk_delete_image (line 103) | static void
  function nk_gdi_draw_image (line 114) | static void
  function COLORREF (line 132) | static COLORREF
  function nk_gdi_scissor (line 138) | static void
  function nk_gdi_stroke_line (line 145) | static void
  function nk_gdi_stroke_rect (line 168) | static void
  function nk_gdi_fill_rect (line 196) | static void
  function nk_gdi_set_vertexColor (line 212) | static void
  function nk_gdi_rect_multi_color (line 221) | static void
  function nk_gdi_fill_triangle (line 265) | static void
  function nk_gdi_stroke_triangle (line 281) | static void
  function nk_gdi_fill_polygon (line 309) | static void
  function nk_gdi_stroke_polygon (line 326) | static void
  function nk_gdi_stroke_polyline (line 353) | static void
  function nk_gdi_fill_circle (line 379) | static void
  function nk_gdi_stroke_circle (line 389) | static void
  function nk_gdi_stroke_curve (line 411) | static void
  function nk_gdi_draw_text (line 441) | static void
  function nk_gdi_clear (line 461) | static void
  function nk_gdi_blit (line 471) | static void
  function GdiFont (line 478) | GdiFont*
  function nk_gdifont_get_text_width (line 493) | static float
  function nk_gdifont_del (line 511) | void
  function nk_gdi_clipboard_paste (line 520) | static void
  function nk_gdi_clipboard_copy (line 554) | static void
  function nk_context (line 580) | nk_context*
  function NK_API (line 601) | NK_API void
  function NK_API (line 611) | NK_API int
  function NK_API (line 797) | NK_API void
  function NK_API (line 805) | NK_API void

FILE: demo/gdip/main.c
  function LRESULT (line 59) | static LRESULT CALLBACK
  function main (line 72) | int main(void)

FILE: demo/gdip/nuklear_gdip.h
  type GdipFont (line 21) | typedef struct GdipFont GdipFont;
  type nk_anti_aliasing (line 30) | enum nk_anti_aliasing
  type nk_color (line 30) | struct nk_color
  type nk_image (line 36) | struct nk_image
  type GpGraphics (line 56) | typedef struct GpGraphics GpGraphics;
  type GpImage (line 57) | typedef struct GpImage GpImage;
  type GpPen (line 58) | typedef struct GpPen GpPen;
  type GpBrush (line 59) | typedef struct GpBrush GpBrush;
  type GpStringFormat (line 60) | typedef struct GpStringFormat GpStringFormat;
  type GpFont (line 61) | typedef struct GpFont GpFont;
  type GpFontFamily (line 62) | typedef struct GpFontFamily GpFontFamily;
  type GpFontCollection (line 63) | typedef struct GpFontCollection GpFontCollection;
  type GpImage (line 65) | typedef GpImage GpBitmap;
  type GpBrush (line 66) | typedef GpBrush GpSolidFill;
  type Status (line 68) | typedef int Status;
  type Status (line 69) | typedef Status GpStatus;
  type REAL (line 71) | typedef float REAL;
  type DWORD (line 72) | typedef DWORD ARGB;
  type POINT (line 73) | typedef POINT GpPoint;
  type TextRenderingHint (line 75) | typedef enum {
  type StringFormatFlags (line 84) | typedef enum {
  type QualityMode (line 96) | typedef enum
  type SmoothingMode (line 104) | typedef enum
  type FontStyle (line 116) | typedef enum
  type FillMode (line 126) | typedef enum {
  type CombineMode (line 131) | typedef enum {
  type Unit (line 140) | typedef enum {
  type RectF (line 150) | typedef struct {
  type DebugEventLevel (line 157) | typedef enum {
  type GdiplusStartupInput (line 164) | typedef struct {
  type GdiplusStartupOutput (line 174) | typedef struct {
  type GdipFont (line 393) | struct GdipFont
  type nk_context (line 411) | struct nk_context
  function ARGB (line 414) | static ARGB convert_color(struct nk_color c)
  function nk_gdip_scissor (line 419) | static void
  function nk_gdip_stroke_line (line 425) | static void
  function nk_gdip_stroke_rect (line 434) | static void
  function nk_gdip_fill_rect (line 455) | static void
  function nk_gdip_fill_triangle (line 474) | static void
  function nk_gdip_stroke_triangle (line 488) | static void
  function nk_gdip_fill_polygon (line 503) | static void
  function nk_gdip_stroke_polygon (line 518) | static void
  function nk_gdip_stroke_polyline (line 532) | static void
  function nk_gdip_fill_circle (line 545) | static void
  function nk_gdip_stroke_circle (line 553) | static void
  function nk_gdip_stroke_curve (line 562) | static void
  function nk_gdip_draw_text (line 572) | static void
  function nk_gdip_draw_image (line 590) | static void
  function nk_gdip_clear (line 598) | static void
  function nk_gdip_blit (line 604) | static void
  function nk_gdip_image_to_nk (line 610) | static struct nk_image
  function nk_gdip_load_image_from_file (line 622) | struct nk_image
  function nk_gdip_load_image_from_memory (line 631) | struct nk_image
  function nk_gdip_image_free (line 649) | void
  function GdipFont (line 657) | GdipFont*
  function GpFontCollection (line 675) | GpFontCollection*
  function GdipFont (line 680) | GdipFont*
  function GdipFont (line 696) | GdipFont*
  function GdipFont (line 705) | GdipFont*
  function nk_gdipfont_get_text_width (line 714) | static float
  function nk_gdipfont_del (line 734) | void
  function nk_gdip_clipboard_paste (line 742) | static void
  function nk_gdip_clipboard_copy (line 794) | static void
  function nk_context (line 832) | nk_context*
  function NK_API (line 858) | NK_API void
  function NK_API (line 868) | NK_API int
  function NK_API (line 1056) | NK_API void
  function NK_API (line 1073) | NK_API void
  function NK_API (line 1160) | NK_API void
  function NK_API (line 1168) | NK_API void

FILE: demo/glfw_opengl2/main.c
  function error_callback (line 69) | static void error_callback(int e, const char *d)
  function main (line 72) | int main(void)

FILE: demo/glfw_opengl2/nuklear_glfw_gl2.h
  type nk_glfw_init_state (line 18) | enum nk_glfw_init_state{
  type nk_glfw_init_state (line 22) | enum nk_glfw_init_state
  type nk_font_atlas (line 23) | struct nk_font_atlas
  type nk_anti_aliasing (line 27) | enum nk_anti_aliasing
  type nk_glfw_device (line 54) | struct nk_glfw_device {
  type nk_glfw_vertex (line 60) | struct nk_glfw_vertex {
  type nk_glfw (line 66) | struct nk_glfw {
  function NK_INTERN (line 82) | NK_INTERN void
  function NK_API (line 94) | NK_API void
  function NK_API (line 200) | NK_API void
  function NK_API (line 208) | NK_API void
  function NK_API (line 216) | NK_API void
  function NK_INTERN (line 232) | NK_INTERN void
  function NK_INTERN (line 240) | NK_INTERN void
  function nk_context (line 254) | nk_context*
  function NK_API (line 275) | NK_API void
  function NK_API (line 283) | NK_API void
  function NK_API (line 294) | NK_API void
  function NK_API (line 370) | NK_API

FILE: demo/glfw_opengl3/main.c
  function error_callback (line 73) | static void error_callback(int e, const char *d)
  function main (line 76) | int main(void)

FILE: demo/glfw_opengl3/nuklear_glfw_gl3.h
  type nk_glfw_init_state (line 18) | enum nk_glfw_init_state{
  type nk_glfw_init_state (line 23) | enum nk_glfw_init_state
  type nk_font_atlas (line 25) | struct nk_font_atlas
  type nk_anti_aliasing (line 28) | enum nk_anti_aliasing
  type nk_glfw_device (line 57) | struct nk_glfw_device {
  type nk_glfw_vertex (line 72) | struct nk_glfw_vertex {
  type nk_glfw (line 78) | struct nk_glfw {
  function NK_API (line 100) | NK_API void
  function NK_INTERN (line 183) | NK_INTERN void
  function NK_API (line 195) | NK_API void
  function NK_API (line 210) | NK_API void
  function NK_API (line 309) | NK_API void
  function NK_API (line 317) | NK_API void
  function NK_API (line 325) | NK_API void
  function NK_INTERN (line 341) | NK_INTERN void
  function NK_INTERN (line 349) | NK_INTERN void
  function nk_context (line 363) | nk_context*
  function NK_API (line 385) | NK_API void
  function NK_API (line 393) | NK_API void
  function NK_API (line 404) | NK_API void
  function NK_API (line 483) | NK_API

FILE: demo/glfw_opengl4/main.c
  function error_callback (line 73) | static void error_callback(int e, const char *d)
  function main (line 76) | int main(void)

FILE: demo/glfw_opengl4/nuklear_glfw_gl4.h
  type nk_glfw_init_state (line 19) | enum nk_glfw_init_state{
  type nk_glfw_init_state (line 24) | enum nk_glfw_init_state
  type nk_font_atlas (line 26) | struct nk_font_atlas
  type nk_anti_aliasing (line 29) | enum nk_anti_aliasing
  type nk_glfw_vertex (line 67) | struct nk_glfw_vertex {
  type nk_glfw_device (line 73) | struct nk_glfw_device {
  type nk_glfw (line 95) | struct nk_glfw {
  function NK_API (line 115) | NK_API void
  function NK_INTERN (line 235) | NK_INTERN int
  function NK_API (line 247) | NK_API GLuint
  function NK_API (line 255) | NK_API GLuint64
  function NK_API (line 263) | NK_API int
  function NK_API (line 292) | NK_API void
  function NK_INTERN (line 306) | NK_INTERN void
  function NK_API (line 313) | NK_API void
  function NK_INTERN (line 335) | NK_INTERN void
  function NK_INTERN (line 349) | NK_INTERN void
  function NK_API (line 357) | NK_API void
  function NK_API (line 459) | NK_API void
  function NK_API (line 467) | NK_API void
  function NK_API (line 475) | NK_API void
  function NK_INTERN (line 491) | NK_INTERN void
  function NK_INTERN (line 499) | NK_INTERN void
  function nk_context (line 513) | nk_context*
  function NK_API (line 540) | NK_API void
  function NK_API (line 548) | NK_API void
  function NK_API (line 559) | NK_API void
  function NK_API (line 638) | NK_API

FILE: demo/node_editor.c
  type node (line 13) | struct node {
  type node_link (line 25) | struct node_link {
  type node_linking (line 34) | struct node_linking {
  type node_editor (line 41) | struct node_editor {
  type node_editor (line 55) | struct node_editor
  function node_editor_push (line 57) | static void
  function node_editor_pop (line 74) | static void
  type node (line 89) | struct node
  type node_editor (line 90) | struct node_editor
  type node (line 92) | struct node
  function node_editor_add (line 101) | static void
  function node_editor_link (line 120) | static void
  function node_editor_init (line 133) | static void
  function node_editor (line 147) | static int

FILE: demo/overview.c
  function overview (line 1) | static int

FILE: demo/sdl_opengl2/main.c
  function main (line 69) | int

FILE: demo/sdl_opengl2/nuklear_sdl_gl2.h
  type nk_font_atlas (line 18) | struct nk_font_atlas
  type nk_anti_aliasing (line 21) | enum nk_anti_aliasing
  type nk_sdl_device (line 34) | struct nk_sdl_device {
  type nk_sdl_vertex (line 40) | struct nk_sdl_vertex {
  type nk_sdl (line 46) | struct nk_sdl {
  function NK_INTERN (line 53) | NK_INTERN void
  function NK_API (line 65) | NK_API void
  function nk_sdl_clipboard_paste (line 180) | static void
  function nk_sdl_clipboard_copy (line 188) | static void
  function nk_context (line 202) | nk_context*
  function NK_API (line 214) | NK_API void
  function NK_API (line 222) | NK_API void
  function NK_API (line 233) | NK_API int
  function NK_API (line 335) | NK_API

FILE: demo/sdl_opengl3/main.c
  function main (line 73) | int main(void)

FILE: demo/sdl_opengl3/nuklear_sdl_gl3.h
  type nk_font_atlas (line 20) | struct nk_font_atlas
  type nk_anti_aliasing (line 23) | enum nk_anti_aliasing
  type nk_sdl_device (line 41) | struct nk_sdl_device {
  type nk_sdl_vertex (line 56) | struct nk_sdl_vertex {
  type nk_sdl (line 62) | struct nk_sdl {
  function NK_API (line 74) | NK_API void
  function NK_INTERN (line 157) | NK_INTERN void
  function NK_API (line 169) | NK_API void
  function NK_API (line 184) | NK_API void
  function nk_sdl_clipboard_paste (line 288) | static void
  function nk_sdl_clipboard_copy (line 296) | static void
  function nk_context (line 310) | nk_context*
  function NK_API (line 322) | NK_API void
  function NK_API (line 330) | NK_API void
  function NK_API (line 342) | NK_API int
  function NK_API (line 433) | NK_API

FILE: demo/sdl_opengles2/main.c
  function MainLoop (line 60) | static void
  function main (line 136) | int main(int argc, char* argv[])

FILE: demo/sdl_opengles2/nuklear_sdl_gles2.h
  type nk_font_atlas (line 23) | struct nk_font_atlas
  type nk_anti_aliasing (line 26) | enum nk_anti_aliasing
  type nk_sdl_device (line 44) | struct nk_sdl_device {
  type nk_sdl_vertex (line 61) | struct nk_sdl_vertex {
  type nk_sdl (line 67) | struct nk_sdl {
  function NK_API (line 78) | NK_API void
  function NK_INTERN (line 146) | NK_INTERN void
  function NK_API (line 158) | NK_API void
  function NK_API (line 173) | NK_API void
  function nk_sdl_clipboard_paste (line 289) | static void
  function nk_sdl_clipboard_copy (line 297) | static void
  function nk_context (line 311) | nk_context*
  function NK_API (line 323) | NK_API void
  function NK_API (line 331) | NK_API void
  function NK_API (line 343) | NK_API int
  function NK_API (line 434) | NK_API

FILE: demo/sfml_opengl2/main.cpp
  function main (line 69) | int main(void)

FILE: demo/sfml_opengl2/nuklear_sfml_gl2.h
  type nk_font_atlas (line 19) | struct nk_font_atlas
  type nk_anti_aliasing (line 22) | enum nk_anti_aliasing
  type nk_sfml_device (line 35) | struct nk_sfml_device {
  type nk_sfml_vertex (line 41) | struct nk_sfml_vertex {
  type nk_sfml (line 47) | struct nk_sfml {
  function NK_INTERN (line 54) | NK_INTERN void
  function NK_API (line 66) | NK_API void
  function nk_sfml_clipboard_paste (line 180) | static void
  function nk_sfml_clipboard_copy (line 194) | static void
  function NK_API (line 225) | NK_API void
  function NK_API (line 233) | NK_API void
  function NK_API (line 245) | NK_API int
  function NK_API (line 348) | NK_API

FILE: demo/sfml_opengl3/main.cpp
  function main (line 71) | int main(void)

FILE: demo/sfml_opengl3/nuklear_sfml_gl3.h
  type nk_font_atlas (line 23) | struct nk_font_atlas
  type nk_anti_aliasing (line 26) | enum nk_anti_aliasing
  type nk_sfml_device (line 44) | struct nk_sfml_device {
  type nk_sfml_vertex (line 58) | struct nk_sfml_vertex {
  type nk_sfml (line 63) | struct nk_sfml {
  function NK_API (line 76) | NK_API void
  function NK_API (line 163) | NK_API void
  function NK_INTERN (line 179) | NK_INTERN void
  function NK_API (line 191) | NK_API void
  function nk_sfml_clipboard_paste (line 291) | static void
  function nk_sfml_clipboard_copy (line 302) | static void
  function NK_API (line 333) | NK_API void
  function NK_API (line 341) | NK_API void
  function NK_API (line 353) | NK_API int
  function NK_API (line 454) | NK_API

FILE: demo/style.c
  type theme (line 1) | enum theme {THEME_BLACK, THEME_WHITE, THEME_RED, THEME_BLUE, THEME_DARK}
  function set_style (line 3) | static void

FILE: demo/x11/main.c
  type XWindow (line 26) | typedef struct XWindow XWindow;
  type XWindow (line 27) | struct XWindow {
  function die (line 42) | static void
  function timestamp (line 53) | static long
  function sleep_for (line 61) | static void
  function main (line 110) | int

FILE: demo/x11/nuklear_xlib.h
  type XFont (line 18) | typedef struct XFont XFont;
  type nk_color (line 21) | struct nk_color
  type nk_text_edit (line 25) | struct nk_text_edit
  type XSurface (line 74) | typedef struct XSurface XSurface;
  type XImageWithAlpha (line 75) | typedef struct XImageWithAlpha XImageWithAlpha;
  type XFont (line 76) | struct XFont {
  type XSurface (line 84) | struct XSurface {
  type XImageWithAlpha (line 92) | struct XImageWithAlpha {
  type nk_text_edit (line 100) | struct nk_text_edit
  type nk_context (line 107) | struct nk_context
  type XSurface (line 108) | struct XSurface
  function nk_timestamp (line 115) | NK_INTERN long
  function nk_color_from_byte (line 123) | NK_INTERN unsigned long
  function NK_INTERN (line 133) | NK_INTERN XSurface*
  function NK_INTERN (line 149) | NK_INTERN void
  function NK_INTERN (line 160) | NK_INTERN void
  function NK_INTERN (line 171) | NK_INTERN void
  function NK_INTERN (line 182) | NK_INTERN void
  function NK_INTERN (line 212) | NK_INTERN void
  function NK_INTERN (line 265) | NK_INTERN void
  function NK_INTERN (line 281) | NK_INTERN void
  function NK_INTERN (line 294) | NK_INTERN void
  function NK_INTERN (line 311) | NK_INTERN void
  function NK_INTERN (line 325) | NK_INTERN void
  function NK_INTERN (line 338) | NK_INTERN void
  function NK_INTERN (line 348) | NK_INTERN void
  function NK_INTERN (line 360) | NK_INTERN void
  function NK_INTERN (line 387) | NK_INTERN void
  function nk_image (line 409) | nk_image
  function nk_image (line 476) | nk_image
  function nk_image (line 485) | nk_image
  function NK_INTERN (line 495) | NK_INTERN void
  function nk_xsurf_image_free (line 510) | void
  function NK_INTERN (line 523) | NK_INTERN void
  function NK_INTERN (line 530) | NK_INTERN void
  function NK_INTERN (line 536) | NK_INTERN void
  function NK_API (line 544) | NK_API XFont*
  function NK_INTERN (line 579) | NK_INTERN float
  function NK_API (line 596) | NK_API void
  function nk_context (line 607) | nk_context*
  function NK_API (line 639) | NK_API void
  function NK_API (line 649) | NK_API void
  function NK_API (line 659) | NK_API void
  function NK_API (line 670) | NK_API void
  function NK_API (line 685) | NK_API int
  function NK_API (line 861) | NK_API void
  function NK_API (line 870) | NK_API void

FILE: demo/x11_opengl2/main.c
  type XWindow (line 72) | struct XWindow {
  function gl_error_handler (line 84) | static int gl_error_handler(Display *dpy, XErrorEvent *ev)
  function die (line 87) | static void
  function has_extension (line 98) | static int
  function main (line 119) | int main(void)

FILE: demo/x11_opengl2/nuklear_xlib_gl2.h
  type nk_font_atlas (line 18) | struct nk_font_atlas
  type nk_anti_aliasing (line 21) | enum nk_anti_aliasing
  type nk_x11_vertex (line 55) | struct nk_x11_vertex {
  type nk_x11_device (line 61) | struct nk_x11_device {
  type nk_x11 (line 67) | struct nk_x11 {
  function nk_timestamp (line 77) | NK_INTERN long
  function NK_INTERN (line 85) | NK_INTERN void
  function NK_API (line 97) | NK_API void
  function NK_API (line 211) | NK_API void
  function NK_API (line 219) | NK_API void
  function NK_API (line 230) | NK_API int
  function nk_context (line 343) | nk_context*
  function NK_API (line 365) | NK_API void

FILE: demo/x11_opengl3/main.c
  type XWindow (line 70) | struct XWindow {
  function gl_error_handler (line 82) | static int gl_error_handler(Display *dpy, XErrorEvent *ev)
  function die (line 85) | static void
  function has_extension (line 96) | static int
  function main (line 117) | int main(void)

FILE: demo/x11_opengl3/nuklear_xlib_gl3.h
  type nk_font_atlas (line 18) | struct nk_font_atlas
  type nk_anti_aliasing (line 21) | enum nk_anti_aliasing
  type GLboolean (line 67) | typedef GLboolean(*nkglUnmapBuffer)(GLenum);
  type GLuint (line 80) | typedef GLuint(*nkglCreateShader)(GLenum);
  type GLuint (line 86) | typedef GLuint(*nkglCreateProgram)(void);
  type GLint (line 94) | typedef GLint(*nkglGetUniformLocation)(GLuint, const GLchar*);
  type GLint (line 95) | typedef GLint(*nkglGetAttribLocation)(GLuint, const GLchar*);
  type graphics_card_vendors (line 136) | enum graphics_card_vendors {
  type opengl_info (line 143) | struct opengl_info {
  type nk_x11_vertex (line 165) | struct nk_x11_vertex {
  type nk_x11_device (line 171) | struct nk_x11_device {
  type nk_x11 (line 189) | struct nk_x11 {
  function nk_timestamp (line 208) | NK_INTERN long
  function NK_INTERN (line 216) | NK_INTERN int
  function NK_INTERN (line 226) | NK_INTERN int
  function NK_INTERN (line 248) | NK_INTERN __GLXextFuncPtr
  function NK_INTERN (line 260) | NK_INTERN int
  function NK_API (line 360) | NK_API int
  function NK_INTERN (line 448) | NK_INTERN void
  function NK_API (line 460) | NK_API void
  function NK_API (line 475) | NK_API void
  function NK_API (line 580) | NK_API void
  function NK_API (line 588) | NK_API void
  function NK_API (line 599) | NK_API int
  function nk_context (line 712) | nk_context*
  function NK_API (line 734) | NK_API void

FILE: demo/x11_rawfb/main.c
  type XWindow (line 62) | typedef struct XWindow XWindow;
  type XWindow (line 63) | struct XWindow {
  function die (line 76) | static void
  function timestamp (line 87) | static long
  function sleep_for (line 95) | static void
  function main (line 144) | int

FILE: demo/x11_rawfb/nuklear_rawfb.h
  type rawfb_context (line 34) | struct rawfb_context
  type rawfb_pl (line 36) | typedef enum rawfb_pixel_layout {
  type rawfb_context (line 45) | struct rawfb_context
  type nk_color (line 45) | struct nk_color
  type rawfb_context (line 46) | struct rawfb_context
  type rawfb_context (line 47) | struct rawfb_context
  type rawfb_image (line 58) | struct rawfb_image {
  type rawfb_context (line 64) | struct rawfb_context {
  function nk_rawfb_color2int (line 79) | static unsigned int
  function nk_rawfb_int2color (line 105) | static struct nk_color
  function nk_rawfb_ctx_setpixel (line 131) | static void
  function nk_rawfb_line_horizontal (line 147) | static void
  function nk_rawfb_img_setpixel (line 173) | static void
  function nk_rawfb_img_getpixel (line 193) | static struct nk_color
  function nk_rawfb_img_blendpixel (line 212) | static void
  function nk_rawfb_scissor (line 229) | static void
  function nk_rawfb_stroke_line (line 242) | static void
  function nk_rawfb_fill_polygon (line 310) | static void
  function nk_rawfb_stroke_arc (line 373) | static void
  function nk_rawfb_fill_arc (line 425) | static void
  function nk_rawfb_stroke_rect (line 489) | static void
  function nk_rawfb_fill_rect (line 521) | static void
  function NK_API (line 578) | NK_API void
  function nk_rawfb_fill_triangle (line 653) | static void
  function nk_rawfb_stroke_triangle (line 668) | static void
  function nk_rawfb_stroke_polygon (line 679) | static void
  function nk_rawfb_stroke_polyline (line 692) | static void
  function nk_rawfb_fill_circle (line 703) | static void
  function nk_rawfb_stroke_circle (line 739) | static void
  function nk_rawfb_stroke_curve (line 780) | static void
  function nk_rawfb_clear (line 808) | static void
  function rawfb_context (line 814) | rawfb_context*
  function nk_rawfb_stretch_image (line 875) | static void
  function nk_rawfb_font_query_font_glyph (line 912) | static void
  function NK_API (line 939) | NK_API void
  function NK_API (line 993) | NK_API void
  function NK_API (line 1013) | NK_API void
  function NK_API (line 1023) | NK_API void
  function NK_API (line 1038) | NK_API void

FILE: demo/x11_rawfb/nuklear_xlib.h
  type rawfb_context (line 39) | struct rawfb_context
  type nk_context (line 61) | struct nk_context
  type XSurface (line 62) | struct XSurface
  function NK_API (line 72) | NK_API int
  function NK_API (line 158) | NK_API int
  function NK_API (line 278) | NK_API void
  function NK_API (line 293) | NK_API void

FILE: demo/x11_xft/main.c
  type XWindow (line 26) | typedef struct XWindow XWindow;
  type XWindow (line 27) | struct XWindow {
  function die (line 42) | static void
  function timestamp (line 53) | static long
  function sleep_for (line 61) | static void
  function main (line 110) | int

FILE: demo/x11_xft/nuklear_xlib.h
  type XFont (line 18) | typedef struct XFont XFont;
  type nk_color (line 25) | struct nk_color
  type nk_text_edit (line 29) | struct nk_text_edit
  type XSurface (line 82) | typedef struct XSurface XSurface;
  type XImageWithAlpha (line 83) | typedef struct XImageWithAlpha XImageWithAlpha;
  type XFont (line 84) | struct XFont {
  type XSurface (line 96) | struct XSurface {
  type XImageWithAlpha (line 107) | struct XImageWithAlpha {
  type nk_text_edit (line 115) | struct nk_text_edit
  type nk_context (line 122) | struct nk_context
  type XSurface (line 123) | struct XSurface
  function nk_timestamp (line 134) | NK_INTERN long
  function nk_color_from_byte (line 142) | NK_INTERN unsigned long
  function NK_INTERN (line 152) | NK_INTERN XSurface*
  function NK_INTERN (line 172) | NK_INTERN void
  function NK_INTERN (line 187) | NK_INTERN void
  function NK_INTERN (line 203) | NK_INTERN void
  function NK_INTERN (line 214) | NK_INTERN void
  function NK_INTERN (line 244) | NK_INTERN void
  function NK_INTERN (line 297) | NK_INTERN void
  function NK_INTERN (line 313) | NK_INTERN void
  function NK_INTERN (line 326) | NK_INTERN void
  function NK_INTERN (line 343) | NK_INTERN void
  function NK_INTERN (line 357) | NK_INTERN void
  function NK_INTERN (line 370) | NK_INTERN void
  function NK_INTERN (line 380) | NK_INTERN void
  function NK_INTERN (line 392) | NK_INTERN void
  function NK_INTERN (line 419) | NK_INTERN void
  function nk_image (line 453) | nk_image
  function nk_image (line 520) | nk_image
  function nk_image (line 529) | nk_image
  function NK_INTERN (line 539) | NK_INTERN void
  function nk_xsurf_image_free (line 554) | void
  function NK_INTERN (line 567) | NK_INTERN void
  function NK_INTERN (line 574) | NK_INTERN void
  function NK_INTERN (line 580) | NK_INTERN void
  function NK_API (line 591) | NK_API XFont*
  function NK_INTERN (line 638) | NK_INTERN float
  function NK_API (line 664) | NK_API void
  function nk_context (line 679) | nk_context*
  function NK_API (line 717) | NK_API void
  function NK_API (line 727) | NK_API void
  function NK_API (line 737) | NK_API void
  function NK_API (line 748) | NK_API void
  function NK_API (line 763) | NK_API int
  function NK_API (line 939) | NK_API void
  function NK_API (line 948) | NK_API void

FILE: doc/stddoc.c
  function main (line 29) | int main() {

FILE: example/canvas.c
  type nk_glfw_vertex (line 48) | struct nk_glfw_vertex {
  type device (line 54) | struct device {
  function die (line 69) | static void
  function device_init (line 103) | static void
  function device_upload_atlas (line 185) | static void
  function device_shutdown (line 196) | static void
  function device_draw (line 210) | static void
  function error_callback (line 309) | static void error_callback(int e, const char *d){printf("Error %d: %s\n"...
  function text_input (line 310) | static void text_input(GLFWwindow *win, unsigned int codepoint)
  function scroll_input (line 312) | static void scroll_input(GLFWwindow *win, double _, double yoff)
  function pump_input (line 315) | static void
  type nk_canvas (line 353) | struct nk_canvas {
  function canvas_begin (line 360) | static void
  function canvas_end (line 387) | static void
  function main (line 396) | int main(int argc, char *argv[])

FILE: example/extended.c
  type media (line 46) | struct media {
  function ui_piemenu (line 77) | static int
  function grid_demo (line 181) | static void
  function ui_header (line 224) | static void
  function ui_widget (line 232) | static void
  function ui_widget_centered (line 241) | static void
  function button_demo (line 250) | static void
  function basic_demo (line 360) | static void
  type nk_glfw_vertex (line 475) | struct nk_glfw_vertex {
  type device (line 481) | struct device {
  function die (line 496) | static void
  function icon_load (line 507) | static struct nk_image
  function device_init (line 527) | static void
  function device_upload_atlas (line 609) | static void
  function device_shutdown (line 620) | static void
  function device_draw (line 634) | static void
  function error_callback (line 733) | static void error_callback(int e, const char *d){printf("Error %d: %s\n"...
  function text_input (line 734) | static void text_input(GLFWwindow *win, unsigned int codepoint)
  function scroll_input (line 736) | static void scroll_input(GLFWwindow *win, double _, double yoff)
  function main (line 739) | int main(int argc, char *argv[])

FILE: example/file_browser.c
  type icons (line 53) | struct icons {
  type file_groups (line 67) | enum file_groups {
  type file_types (line 77) | enum file_types {
  type file_group (line 97) | struct file_group {
  type file (line 103) | struct file {
  type media (line 109) | struct media {
  type file_browser (line 118) | struct file_browser {
  function die (line 142) | static void
  function dir_free_list (line 181) | static void
  type dirent (line 214) | struct dirent
  function FILE_GROUP (line 251) | static struct file_group
  function FILE_DEF (line 261) | static struct file
  type nk_image (line 271) | struct nk_image
  type media (line 272) | struct media
  type file (line 296) | struct file
  function media_init (line 312) | static void
  function file_browser_reload_directory_content (line 343) | static void
  function file_browser_init (line 353) | static void
  function file_browser_free (line 384) | static void
  function file_browser_run (line 396) | static int
  type nk_glfw_vertex (line 518) | struct nk_glfw_vertex {
  type device (line 524) | struct device {
  function icon_load (line 538) | static struct nk_image
  function device_init (line 558) | static void
  function device_upload_atlas (line 640) | static void
  function device_shutdown (line 651) | static void
  function device_draw (line 665) | static void
  function error_callback (line 764) | static void error_callback(int e, const char *d){printf("Error %d: %s\n"...
  function text_input (line 765) | static void text_input(GLFWwindow *win, unsigned int codepoint)
  function scroll_input (line 767) | static void scroll_input(GLFWwindow *win, double _, double yoff)
  function main (line 770) | int main(int argc, char *argv[])

FILE: example/skinning.c
  type media (line 46) | struct media {
  type nk_glfw_vertex (line 75) | struct nk_glfw_vertex {
  type device (line 81) | struct device {
  function die (line 96) | static void
  function GLuint (line 107) | static GLuint
  function device_init (line 127) | static void
  function device_upload_atlas (line 209) | static void
  function device_shutdown (line 220) | static void
  function device_draw (line 234) | static void
  function error_callback (line 333) | static void error_callback(int e, const char *d){printf("Error %d: %s\n"...
  function text_input (line 334) | static void text_input(GLFWwindow *win, unsigned int codepoint)
  function scroll_input (line 336) | static void scroll_input(GLFWwindow *win, double _, double yoff)
  function main (line 339) | int main(int argc, char *argv[])

FILE: example/stb_image.h
  type stbi_uc (line 414) | typedef unsigned char stbi_uc;
  type stbi_io_callbacks (line 435) | typedef struct
  type stbi__uint16 (line 602) | typedef unsigned short stbi__uint16;
  type stbi__int16 (line 603) | typedef   signed short stbi__int16;
  type stbi__uint32 (line 604) | typedef unsigned int   stbi__uint32;
  type stbi__int32 (line 605) | typedef   signed int   stbi__int32;
  type stbi__uint16 (line 608) | typedef uint16_t stbi__uint16;
  type stbi__int16 (line 609) | typedef int16_t  stbi__int16;
  type stbi__uint32 (line 610) | typedef uint32_t stbi__uint32;
  type stbi__int32 (line 611) | typedef int32_t  stbi__int32;
  function stbi__cpuid3 (line 686) | static int stbi__cpuid3(void)
  function stbi__sse2_available (line 707) | static int stbi__sse2_available()
  function stbi__sse2_available (line 715) | static int stbi__sse2_available()
  type stbi__context (line 750) | typedef struct
  function stbi__start_mem (line 770) | static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int...
  function stbi__start_callbacks (line 779) | static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c...
  function stbi__stdio_read (line 792) | static int stbi__stdio_read(void *user, char *data, int size)
  function stbi__stdio_skip (line 797) | static void stbi__stdio_skip(void *user, int n)
  function stbi__stdio_eof (line 802) | static int stbi__stdio_eof(void *user)
  function stbi__start_file (line 814) | static void stbi__start_file(stbi__context *s, FILE *f)
  function stbi__rewind (line 823) | static void stbi__rewind(stbi__context *s)
  function STBIDEF (line 889) | STBIDEF const char *stbi_failure_reason(void)
  function stbi__err (line 894) | static int stbi__err(const char *str)
  function STBIDEF (line 920) | STBIDEF void stbi_image_free(void *retval_from_stbi_load)
  function STBIDEF (line 935) | STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip)
  function stbi__float_postprocess (line 1006) | static void stbi__float_postprocess(float *result, int *x, int *y, int *...
  function FILE (line 1030) | static FILE *stbi__fopen(char const *filename, char const *mode)
  function STBIDEF (line 1043) | STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *co...
  function STBIDEF (line 1053) | STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp,...
  function STBIDEF (line 1067) | STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, i...
  function STBIDEF (line 1074) | STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk,...
  function STBIDEF (line 1099) | STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, in...
  function STBIDEF (line 1106) | STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, ...
  function STBIDEF (line 1114) | STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *com...
  function STBIDEF (line 1124) | STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, ...
  function STBIDEF (line 1138) | STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
  function STBIDEF (line 1152) | STBIDEF int      stbi_is_hdr          (char const *filename)
  function STBIDEF (line 1163) | STBIDEF int      stbi_is_hdr_from_file(FILE *f)
  function STBIDEF (line 1176) | STBIDEF int      stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clb...
  function STBIDEF (line 1193) | STBIDEF void   stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = ga...
  function STBIDEF (line 1194) | STBIDEF void   stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = sc...
  function STBIDEF (line 1197) | STBIDEF void   stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = ...
  function STBIDEF (line 1198) | STBIDEF void   stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = ...
  function stbi__refill_buffer (line 1213) | static void stbi__refill_buffer(stbi__context *s)
  function stbi_inline (line 1229) | stbi_inline static stbi_uc stbi__get8(stbi__context *s)
  function stbi_inline (line 1240) | stbi_inline static int stbi__at_eof(stbi__context *s)
  function stbi__skip (line 1252) | static void stbi__skip(stbi__context *s, int n)
  function stbi__getn (line 1269) | static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n)
  function stbi__get16be (line 1293) | static int stbi__get16be(stbi__context *s)
  function stbi__uint32 (line 1299) | static stbi__uint32 stbi__get32be(stbi__context *s)
  function stbi__get16le (line 1308) | static int stbi__get16le(stbi__context *s)
  function stbi__uint32 (line 1316) | static stbi__uint32 stbi__get32le(stbi__context *s)
  function stbi_uc (line 1337) | static stbi_uc stbi__compute_y(int r, int g, int b)
  function stbi_uc (line 1407) | static stbi_uc *stbi__hdr_to_ldr(float   *data, int x, int y, int comp)
  type stbi__huffman (line 1459) | typedef struct
  type stbi__jpeg (line 1470) | typedef struct
  function stbi__build_huffman (line 1521) | static int stbi__build_huffman(stbi__huffman *h, int *count)
  function stbi__build_fast_ac (line 1564) | static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h)
  function stbi__grow_buffer_unsafe (line 1589) | static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
  function stbi_inline (line 1610) | stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffm...
  function stbi_inline (line 1664) | stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
  function stbi_inline (line 1680) | stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
  function stbi_inline (line 1691) | stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
  function stbi__jpeg_decode_block (line 1719) | static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__...
  function stbi__jpeg_decode_block_prog_dc (line 1771) | static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64]...
  function stbi__jpeg_decode_block_prog_ac (line 1798) | static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64]...
  function stbi_inline (line 1918) | stbi_inline static stbi_uc stbi__clamp(int x)
  function stbi__idct_block (line 1969) | static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64])
  function stbi__idct_simd (line 2032) | static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
  function stbi__idct_simd (line 2213) | static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
  function stbi_uc (line 2421) | static stbi_uc stbi__get_marker(stbi__jpeg *j)
  function stbi__jpeg_reset (line 2438) | static void stbi__jpeg_reset(stbi__jpeg *j)
  function stbi__parse_entropy_coded_data (line 2451) | static int stbi__parse_entropy_coded_data(stbi__jpeg *z)
  function stbi__jpeg_dequantize (line 2575) | static void stbi__jpeg_dequantize(short *data, stbi_uc *dequant)
  function stbi__jpeg_finish (line 2582) | static void stbi__jpeg_finish(stbi__jpeg *z)
  function stbi__process_marker (line 2601) | static int stbi__process_marker(stbi__jpeg *z, int m)
  function stbi__process_scan_header (line 2665) | static int stbi__process_scan_header(stbi__jpeg *z)
  function stbi__process_frame_header (line 2704) | static int stbi__process_frame_header(stbi__jpeg *z, int scan)
  function stbi__decode_jpeg_header (line 2795) | static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
  function stbi__decode_jpeg_image (line 2818) | static int stbi__decode_jpeg_image(stbi__jpeg *j)
  type stbi_uc (line 2857) | typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_u...
  function stbi_uc (line 2862) | static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *...
  function stbi_uc (line 2871) | static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, s...
  function stbi_uc (line 2881) | static stbi_uc*  stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, ...
  function stbi_uc (line 2911) | static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, ...
  function stbi_uc (line 2936) | static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_n...
  function stbi_uc (line 3052) | static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_nea...
  function stbi__YCbCr_to_RGB_row (line 3067) | static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const...
  function stbi__YCbCr_to_RGB_row (line 3095) | static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const...
  function stbi__YCbCr_to_RGB_simd (line 3122) | static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi...
  function stbi__setup_jpeg (line 3257) | static void stbi__setup_jpeg(stbi__jpeg *j)
  function stbi__cleanup_jpeg (line 3283) | static void stbi__cleanup_jpeg(stbi__jpeg *j)
  type stbi__resample (line 3304) | typedef struct
  function stbi_uc (line 3314) | static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, i...
  function stbi__jpeg_test (line 3419) | static int stbi__jpeg_test(stbi__context *s)
  function stbi__jpeg_info_raw (line 3430) | static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp)
  function stbi__jpeg_info (line 3442) | static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
  type stbi__zhuffman (line 3465) | typedef struct
  function stbi_inline (line 3475) | stbi_inline static int stbi__bitreverse16(int n)
  function stbi_inline (line 3484) | stbi_inline static int stbi__bit_reverse(int v, int bits)
  function stbi__zbuild_huffman (line 3492) | static int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, in...
  type stbi__zbuf (line 3545) | typedef struct
  function stbi_inline (line 3559) | stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z)
  function stbi__fill_bits (line 3565) | static void stbi__fill_bits(stbi__zbuf *z)
  function stbi__zreceive (line 3574) | int stbi__zreceive(stbi__zbuf *z, int n)
  function stbi__zhuffman_decode_slowpath (line 3584) | static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z)
  function stbi_inline (line 3602) | stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffm...
  function stbi__zexpand (line 3616) | static int stbi__zexpand(stbi__zbuf *z, char *zout, int n)  // need to m...
  function stbi__parse_huffman_block (line 3648) | static int stbi__parse_huffman_block(stbi__zbuf *a)
  function stbi__compute_huffman_codes (line 3690) | static int stbi__compute_huffman_codes(stbi__zbuf *a)
  function stbi__parse_uncomperssed_block (line 3736) | static int stbi__parse_uncomperssed_block(stbi__zbuf *a)
  function stbi__parse_zlib_header (line 3765) | static int stbi__parse_zlib_header(stbi__zbuf *a)
  function stbi__init_zdefaults (line 3780) | static void stbi__init_zdefaults(void)
  function stbi__parse_zlib (line 3791) | static int stbi__parse_zlib(stbi__zbuf *a, int parse_header)
  function stbi__do_zlib (line 3820) | static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, i...
  function STBIDEF (line 3830) | STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int ...
  function STBIDEF (line 3846) | STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *...
  function STBIDEF (line 3851) | STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *b...
  function STBIDEF (line 3867) | STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const ...
  function STBIDEF (line 3878) | STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int l...
  function STBIDEF (line 3894) | STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, co...
  type stbi__pngchunk (line 3917) | typedef struct
  function stbi__pngchunk (line 3923) | static stbi__pngchunk stbi__get_chunk_header(stbi__context *s)
  function stbi__check_png_header (line 3931) | static int stbi__check_png_header(stbi__context *s)
  type stbi__png (line 3940) | typedef struct
  function stbi__paeth (line 3967) | static int stbi__paeth(int a, int b, int c)
  function stbi__create_png_image_raw (line 3981) | static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__...
  function stbi__create_png_image (line 4159) | static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stb...
  function stbi__compute_transparency (line 4201) | static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int o...
  function stbi__expand_png_palette (line 4226) | static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int ...
  function STBIDEF (line 4266) | STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpr...
  function STBIDEF (line 4271) | STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_conv...
  function stbi__de_iphone (line 4276) | static void stbi__de_iphone(stbi__png *z)
  function stbi__parse_png_file (line 4320) | static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
  function stbi__png_test (line 4507) | static int stbi__png_test(stbi__context *s)
  function stbi__png_info_raw (line 4515) | static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp)
  function stbi__png_info (line 4527) | static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__bmp_test_raw (line 4538) | static int stbi__bmp_test_raw(stbi__context *s)
  function stbi__bmp_test (line 4553) | static int stbi__bmp_test(stbi__context *s)
  function stbi__high_bit (line 4562) | static int stbi__high_bit(unsigned int z)
  function stbi__bitcount (line 4574) | static int stbi__bitcount(unsigned int a)
  function stbi__shiftsigned (line 4584) | static int stbi__shiftsigned(int v, int shift, int bits)
  function stbi_uc (line 4601) | static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *co...
  function stbi__tga_info (line 4814) | static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__tga_test (line 4851) | static int stbi__tga_test(stbi__context *s)
  function stbi_uc (line 4876) | static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *co...
  function stbi__psd_test (line 5075) | static int stbi__psd_test(stbi__context *s)
  function stbi_uc (line 5082) | static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *co...
  function stbi__pic_is4 (line 5259) | static int stbi__pic_is4(stbi__context *s,const char *str)
  function stbi__pic_test_core (line 5269) | static int stbi__pic_test_core(stbi__context *s)
  type stbi__pic_packet (line 5285) | typedef struct
  function stbi_uc (line 5290) | static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest)
  function stbi__copyval (line 5304) | static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src)
  function stbi_uc (line 5313) | static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int heigh...
  function stbi_uc (line 5423) | static stbi_uc *stbi__pic_load(stbi__context *s,int *px,int *py,int *com...
  function stbi__pic_test (line 5456) | static int stbi__pic_test(stbi__context *s)
  type stbi__gif_lzw (line 5468) | typedef struct
  type stbi__gif (line 5475) | typedef struct
  function stbi__gif_test_raw (line 5492) | static int stbi__gif_test_raw(stbi__context *s)
  function stbi__gif_test (line 5502) | static int stbi__gif_test(stbi__context *s)
  function stbi__gif_parse_colortable (line 5509) | static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256...
  function stbi__gif_header (line 5520) | static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, i...
  function stbi__gif_info_raw (line 5548) | static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp)
  function stbi__out_gif_code (line 5560) | static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
  function stbi_uc (line 5594) | static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g)
  function stbi__fill_gif_background (line 5674) | static void stbi__fill_gif_background(stbi__gif *g, int x0, int y0, int ...
  function stbi_uc (line 5690) | static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int ...
  function stbi_uc (line 5806) | static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *co...
  function stbi__gif_info (line 5826) | static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__hdr_test_core (line 5836) | static int stbi__hdr_test_core(stbi__context *s)
  function stbi__hdr_test (line 5846) | static int stbi__hdr_test(stbi__context* s)
  function stbi__hdr_convert (line 5876) | static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp)
  function stbi__hdr_info (line 6014) | static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__bmp_info (line 6055) | static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__psd_info (line 6085) | static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__pic_info (line 6118) | static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__pnm_test (line 6186) | static int      stbi__pnm_test(stbi__context *s)
  function stbi_uc (line 6198) | static stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *co...
  function stbi__pnm_isspace (line 6218) | static int      stbi__pnm_isspace(char c)
  function stbi__pnm_skip_whitespace (line 6223) | static void     stbi__pnm_skip_whitespace(stbi__context *s, char *c)
  function stbi__pnm_isdigit (line 6229) | static int      stbi__pnm_isdigit(char c)
  function stbi__pnm_getinteger (line 6234) | static int      stbi__pnm_getinteger(stbi__context *s, char *c)
  function stbi__pnm_info (line 6246) | static int      stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
  function stbi__info_main (line 6281) | static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp)
  function STBIDEF (line 6324) | STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp)
  function STBIDEF (line 6334) | STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
  function STBIDEF (line 6346) | STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x...
  function STBIDEF (line 6353) | STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *u...

FILE: nuklear.h
  type NK_INT8 (line 398) | typedef NK_INT8 nk_char;
  type NK_UINT8 (line 399) | typedef NK_UINT8 nk_uchar;
  type NK_UINT8 (line 400) | typedef NK_UINT8 nk_byte;
  type NK_INT16 (line 401) | typedef NK_INT16 nk_short;
  type NK_UINT16 (line 402) | typedef NK_UINT16 nk_ushort;
  type NK_INT32 (line 403) | typedef NK_INT32 nk_int;
  type NK_UINT32 (line 404) | typedef NK_UINT32 nk_uint;
  type NK_SIZE_TYPE (line 405) | typedef NK_SIZE_TYPE nk_size;
  type NK_POINTER_TYPE (line 406) | typedef NK_POINTER_TYPE nk_ptr;
  type nk_uint (line 408) | typedef nk_uint nk_hash;
  type nk_uint (line 409) | typedef nk_uint nk_flags;
  type nk_uint (line 410) | typedef nk_uint nk_rune;
  type nk_buffer (line 430) | struct nk_buffer
  type nk_allocator (line 431) | struct nk_allocator
  type nk_command_buffer (line 432) | struct nk_command_buffer
  type nk_draw_command (line 433) | struct nk_draw_command
  type nk_convert_config (line 434) | struct nk_convert_config
  type nk_style_item (line 435) | struct nk_style_item
  type nk_text_edit (line 436) | struct nk_text_edit
  type nk_draw_list (line 437) | struct nk_draw_list
  type nk_user_font (line 438) | struct nk_user_font
  type nk_panel (line 439) | struct nk_panel
  type nk_context (line 440) | struct nk_context
  type nk_draw_vertex_layout_element (line 441) | struct nk_draw_vertex_layout_element
  type nk_style_button (line 442) | struct nk_style_button
  type nk_style_toggle (line 443) | struct nk_style_toggle
  type nk_style_selectable (line 444) | struct nk_style_selectable
  type nk_style_slide (line 445) | struct nk_style_slide
  type nk_style_progress (line 446) | struct nk_style_progress
  type nk_style_scrollbar (line 447) | struct nk_style_scrollbar
  type nk_style_edit (line 448) | struct nk_style_edit
  type nk_style_property (line 449) | struct nk_style_property
  type nk_style_chart (line 450) | struct nk_style_chart
  type nk_style_combo (line 451) | struct nk_style_combo
  type nk_style_tab (line 452) | struct nk_style_tab
  type nk_style_window_header (line 453) | struct nk_style_window_header
  type nk_style_window (line 454) | struct nk_style_window
  type nk_color (line 457) | struct nk_color {nk_byte r,g,b,a;}
  type nk_colorf (line 458) | struct nk_colorf {float r,g,b,a;}
  type nk_vec2 (line 459) | struct nk_vec2 {float x,y;}
  type nk_vec2i (line 460) | struct nk_vec2i {short x, y;}
  type nk_rect (line 461) | struct nk_rect {float x,y,w,h;}
  type nk_recti (line 462) | struct nk_recti {short x,y,w,h;}
  type nk_handle (line 464) | typedef union {void *ptr; int id;} nk_handle;
  type nk_image (line 465) | struct nk_image {nk_handle handle;unsigned short w,h;unsigned short regi...
  type nk_cursor (line 466) | struct nk_cursor {struct nk_image img; struct nk_vec2 size, offset;}
  type nk_scroll (line 467) | struct nk_scroll {nk_uint x, y;}
  type nk_heading (line 469) | enum nk_heading         {NK_UP, NK_RIGHT, NK_DOWN, NK_LEFT}
  type nk_button_behavior (line 470) | enum nk_button_behavior {NK_BUTTON_DEFAULT, NK_BUTTON_REPEATER}
  type nk_modify (line 471) | enum nk_modify          {NK_FIXED = nk_false, NK_MODIFIABLE = nk_true}
  type nk_orientation (line 472) | enum nk_orientation     {NK_VERTICAL, NK_HORIZONTAL}
  type nk_collapse_states (line 473) | enum nk_collapse_states {NK_MINIMIZED = nk_false, NK_MAXIMIZED = nk_true}
  type nk_show_states (line 474) | enum nk_show_states     {NK_HIDDEN = nk_false, NK_SHOWN = nk_true}
  type nk_chart_type (line 475) | enum nk_chart_type      {NK_CHART_LINES, NK_CHART_COLUMN, NK_CHART_MAX}
  type nk_chart_event (line 476) | enum nk_chart_event     {NK_CHART_HOVERING = 0x01, NK_CHART_CLICKED = 0x02}
  type nk_color_format (line 477) | enum nk_color_format    {NK_RGB, NK_RGBA}
  type nk_popup_type (line 478) | enum nk_popup_type      {NK_POPUP_STATIC, NK_POPUP_DYNAMIC}
  type nk_layout_format (line 479) | enum nk_layout_format   {NK_DYNAMIC, NK_STATIC}
  type nk_tree_type (line 480) | enum nk_tree_type       {NK_TREE_NODE, NK_TREE_TAB}
  type nk_text_edit (line 484) | struct nk_text_edit
  type nk_text_edit (line 485) | struct nk_text_edit
  type nk_allocator (line 488) | struct nk_allocator {
  type nk_symbol_type (line 493) | enum nk_symbol_type {
  type nk_context (line 564) | struct nk_context
  type nk_user_font (line 564) | struct nk_user_font
  type nk_context (line 589) | struct nk_context
  type nk_user_font (line 589) | struct nk_user_font
  type nk_context (line 607) | struct nk_context
  type nk_allocator (line 607) | struct nk_allocator
  type nk_user_font (line 607) | struct nk_user_font
  type nk_context (line 626) | struct nk_context
  type nk_buffer (line 626) | struct nk_buffer
  type nk_buffer (line 626) | struct nk_buffer
  type nk_user_font (line 626) | struct nk_user_font
  type nk_context (line 640) | struct nk_context
  type nk_context (line 653) | struct nk_context
  type nk_context (line 667) | struct nk_context
  type nk_keys (line 735) | enum nk_keys {
  type nk_buttons (line 770) | enum nk_buttons {
  type nk_context (line 789) | struct nk_context
  type nk_context (line 803) | struct nk_context
  type nk_context (line 817) | struct nk_context
  type nk_keys (line 817) | enum nk_keys
  type nk_context (line 833) | struct nk_context
  type nk_buttons (line 833) | enum nk_buttons
  type nk_context (line 848) | struct nk_context
  type nk_vec2 (line 848) | struct nk_vec2
  type nk_context (line 866) | struct nk_context
  type nk_context (line 883) | struct nk_context
  type nk_context (line 899) | struct nk_context
  type nk_context (line 912) | struct nk_context
  type nk_anti_aliasing (line 1142) | enum nk_anti_aliasing {NK_ANTI_ALIASING_OFF, NK_ANTI_ALIASING_ON}
  type nk_convert_result (line 1143) | enum nk_convert_result {
  type nk_draw_null_texture (line 1150) | struct nk_draw_null_texture {
  type nk_convert_config (line 1154) | struct nk_convert_config {
  type nk_context (line 1180) | struct nk_context
  type nk_context (line 1195) | struct nk_context
  type nk_command (line 1195) | struct nk_command
  type nk_context (line 1241) | struct nk_context
  type nk_buffer (line 1241) | struct nk_buffer
  type nk_buffer (line 1241) | struct nk_buffer
  type nk_buffer (line 1241) | struct nk_buffer
  type nk_convert_config (line 1241) | struct nk_convert_config
  type nk_context (line 1256) | struct nk_context
  type nk_buffer (line 1256) | struct nk_buffer
  type nk_context (line 1271) | struct nk_context
  type nk_buffer (line 1271) | struct nk_buffer
  type nk_draw_command (line 1287) | struct nk_draw_command
  type nk_buffer (line 1287) | struct nk_buffer
  type nk_context (line 1287) | struct nk_context
  type nk_panel_flags (line 1450) | enum nk_panel_flags {
  type nk_context (line 1481) | struct nk_context
  type nk_rect (line 1481) | struct nk_rect
  type nk_context (line 1501) | struct nk_context
  type nk_rect (line 1501) | struct nk_rect
  type nk_context (line 1514) | struct nk_context
  type nk_context (line 1530) | struct nk_context
  type nk_context (line 1546) | struct nk_context
  type nk_context (line 1562) | struct nk_context
  type nk_context (line 1578) | struct nk_context
  type nk_context (line 1594) | struct nk_context
  type nk_context (line 1610) | struct nk_context
  type nk_context (line 1628) | struct nk_context
  type nk_context (line 1647) | struct nk_context
  type nk_context (line 1666) | struct nk_context
  type nk_context (line 1685) | struct nk_context
  type nk_context (line 1703) | struct nk_context
  type nk_context (line 1722) | struct nk_context
  type nk_context (line 1738) | struct nk_context
  type nk_context (line 1753) | struct nk_context
  type nk_context (line 1768) | struct nk_context
  type nk_context (line 1783) | struct nk_context
  type nk_context (line 1797) | struct nk_context
  type nk_context (line 1811) | struct nk_context
  type nk_context (line 1825) | struct nk_context
  type nk_context (line 1838) | struct nk_context
  type nk_context (line 1853) | struct nk_context
  type nk_context (line 1866) | struct nk_context
  type nk_rect (line 1866) | struct nk_rect
  type nk_context (line 1879) | struct nk_context
  type nk_vec2 (line 1879) | struct nk_vec2
  type nk_context (line 1892) | struct nk_context
  type nk_vec2 (line 1892) | struct nk_vec2
  type nk_context (line 1904) | struct nk_context
  type nk_context (line 1920) | struct nk_context
  type nk_context (line 1932) | struct nk_context
  type nk_context (line 1945) | struct nk_context
  type nk_collapse_states (line 1945) | enum nk_collapse_states
  type nk_context (line 1959) | struct nk_context
  type nk_collapse_states (line 1959) | enum nk_collapse_states
  type nk_context (line 1972) | struct nk_context
  type nk_show_states (line 1972) | enum nk_show_states
  type nk_context (line 1986) | struct nk_context
  type nk_show_states (line 1986) | enum nk_show_states
  type nk_context (line 2275) | struct nk_context
  type nk_context (line 2286) | struct nk_context
  type nk_context (line 2299) | struct nk_context
  type nk_context (line 2313) | struct nk_context
  type nk_context (line 2328) | struct nk_context
  type nk_context (line 2344) | struct nk_context
  type nk_context (line 2358) | struct nk_context
  type nk_layout_format (line 2358) | enum nk_layout_format
  type nk_context (line 2370) | struct nk_context
  type nk_context (line 2381) | struct nk_context
  type nk_context (line 2395) | struct nk_context
  type nk_layout_format (line 2395) | enum nk_layout_format
  type nk_context (line 2407) | struct nk_context
  type nk_context (line 2419) | struct nk_context
  type nk_context (line 2431) | struct nk_context
  type nk_context (line 2443) | struct nk_context
  type nk_context (line 2454) | struct nk_context
  type nk_context (line 2468) | struct nk_context
  type nk_layout_format (line 2468) | enum nk_layout_format
  type nk_context (line 2480) | struct nk_context
  type nk_rect (line 2480) | struct nk_rect
  type nk_context (line 2491) | struct nk_context
  type nk_context (line 2504) | struct nk_context
  type nk_context (line 2518) | struct nk_context
  type nk_vec2 (line 2518) | struct nk_vec2
  type nk_context (line 2532) | struct nk_context
  type nk_vec2 (line 2532) | struct nk_vec2
  type nk_context (line 2546) | struct nk_context
  type nk_rect (line 2546) | struct nk_rect
  type nk_context (line 2560) | struct nk_context
  type nk_rect (line 2560) | struct nk_rect
  type nk_context (line 2663) | struct nk_context
  type nk_context (line 2679) | struct nk_context
  type nk_context (line 2690) | struct nk_context
  type nk_context (line 2708) | struct nk_context
  type nk_context (line 2725) | struct nk_context
  type nk_scroll (line 2725) | struct nk_scroll
  type nk_context (line 2736) | struct nk_context
  type nk_context (line 2750) | struct nk_context
  type nk_context (line 2764) | struct nk_context
  type nk_context (line 2893) | struct nk_context
  type nk_tree_type (line 2893) | enum nk_tree_type
  type nk_collapse_states (line 2893) | enum nk_collapse_states
  type nk_context (line 2957) | struct nk_context
  type nk_tree_type (line 2957) | enum nk_tree_type
  type nk_image (line 2957) | struct nk_image
  type nk_collapse_states (line 2957) | enum nk_collapse_states
  type nk_context (line 2968) | struct nk_context
  type nk_context (line 2984) | struct nk_context
  type nk_tree_type (line 2984) | enum nk_tree_type
  type nk_collapse_states (line 2984) | enum nk_collapse_states
  type nk_context (line 3001) | struct nk_context
  type nk_tree_type (line 3001) | enum nk_tree_type
  type nk_image (line 3001) | struct nk_image
  type nk_collapse_states (line 3001) | enum nk_collapse_states
  type nk_context (line 3012) | struct nk_context
  type nk_context (line 3016) | struct nk_context
  type nk_tree_type (line 3016) | enum nk_tree_type
  type nk_collapse_states (line 3016) | enum nk_collapse_states
  type nk_context (line 3017) | struct nk_context
  type nk_tree_type (line 3017) | enum nk_tree_type
  type nk_image (line 3017) | struct nk_image
  type nk_collapse_states (line 3017) | enum nk_collapse_states
  type nk_context (line 3018) | struct nk_context
  type nk_list_view (line 3025) | struct nk_list_view {
  type nk_context (line 3034) | struct nk_context
  type nk_list_view (line 3034) | struct nk_list_view
  type nk_list_view (line 3035) | struct nk_list_view
  type nk_widget_layout_states (line 3041) | enum nk_widget_layout_states {
  type nk_widget_states (line 3046) | enum nk_widget_states {
  type nk_rect (line 3056) | struct nk_rect
  type nk_context (line 3056) | struct nk_context
  type nk_rect (line 3057) | struct nk_rect
  type nk_context (line 3057) | struct nk_context
  type nk_vec2 (line 3057) | struct nk_vec2
  type nk_context (line 3058) | struct nk_context
  type nk_context (line 3059) | struct nk_context
  type nk_context (line 3060) | struct nk_context
  type nk_context (line 3061) | struct nk_context
  type nk_context (line 3062) | struct nk_context
  type nk_context (line 3063) | struct nk_context
  type nk_context (line 3064) | struct nk_context
  type nk_buttons (line 3064) | enum nk_buttons
  type nk_context (line 3065) | struct nk_context
  type nk_buttons (line 3065) | enum nk_buttons
  type nk_context (line 3066) | struct nk_context
  type nk_text_align (line 3072) | enum nk_text_align {
  type nk_text_alignment (line 3080) | enum nk_text_alignment {
  type nk_context (line 3085) | struct nk_context
  type nk_context (line 3086) | struct nk_context
  type nk_color (line 3086) | struct nk_color
  type nk_context (line 3087) | struct nk_context
  type nk_context (line 3088) | struct nk_context
  type nk_color (line 3088) | struct nk_color
  type nk_context (line 3089) | struct nk_context
  type nk_context (line 3090) | struct nk_context
  type nk_color (line 3090) | struct nk_color
  type nk_context (line 3091) | struct nk_context
  type nk_context (line 3092) | struct nk_context
  type nk_color (line 3092) | struct nk_color
  type nk_context (line 3093) | struct nk_context
  type nk_image (line 3093) | struct nk_image
  type nk_context (line 3094) | struct nk_context
  type nk_image (line 3094) | struct nk_image
  type nk_color (line 3094) | struct nk_color
  type nk_context (line 3096) | struct nk_context
  type nk_context (line 3097) | struct nk_context
  type nk_color (line 3097) | struct nk_color
  type nk_context (line 3098) | struct nk_context
  type nk_context (line 3099) | struct nk_context
  type nk_color (line 3099) | struct nk_color
  type nk_context (line 3100) | struct nk_context
  type nk_context (line 3101) | struct nk_context
  type nk_color (line 3101) | struct nk_color
  type nk_context (line 3102) | struct nk_context
  type nk_context (line 3103) | struct nk_context
  type nk_color (line 3103) | struct nk_color
  type nk_context (line 3104) | struct nk_context
  type nk_context (line 3105) | struct nk_context
  type nk_context (line 3106) | struct nk_context
  type nk_context (line 3107) | struct nk_context
  type nk_context (line 3108) | struct nk_context
  type nk_color (line 3108) | struct nk_color
  type nk_context (line 3109) | struct nk_context
  type nk_color (line 3109) | struct nk_color
  type nk_context (line 3110) | struct nk_context
  type nk_color (line 3110) | struct nk_color
  type nk_context (line 3117) | struct nk_context
  type nk_context (line 3118) | struct nk_context
  type nk_context (line 3119) | struct nk_context
  type nk_color (line 3119) | struct nk_color
  type nk_context (line 3120) | struct nk_context
  type nk_symbol_type (line 3120) | enum nk_symbol_type
  type nk_context (line 3121) | struct nk_context
  type nk_image (line 3121) | struct nk_image
  type nk_context (line 3122) | struct nk_context
  type nk_symbol_type (line 3122) | enum nk_symbol_type
  type nk_context (line 3123) | struct nk_context
  type nk_symbol_type (line 3123) | enum nk_symbol_type
  type nk_context (line 3124) | struct nk_context
  type nk_image (line 3124) | struct nk_image
  type nk_context (line 3125) | struct nk_context
  type nk_image (line 3125) | struct nk_image
  type nk_context (line 3126) | struct nk_context
  type nk_style_button (line 3126) | struct nk_style_button
  type nk_context (line 3127) | struct nk_context
  type nk_style_button (line 3127) | struct nk_style_button
  type nk_context (line 3128) | struct nk_context
  type nk_style_button (line 3128) | struct nk_style_button
  type nk_symbol_type (line 3128) | enum nk_symbol_type
  type nk_context (line 3129) | struct nk_context
  type nk_style_button (line 3129) | struct nk_style_button
  type nk_image (line 3129) | struct nk_image
  type nk_context (line 3130) | struct nk_context
  type nk_style_button (line 3130) | struct nk_style_button
  type nk_symbol_type (line 3130) | enum nk_symbol_type
  type nk_context (line 3131) | struct nk_context
  type nk_style_button (line 3131) | struct nk_style_button
  type nk_symbol_type (line 3131) | enum nk_symbol_type
  type nk_context (line 3132) | struct nk_context
  type nk_style_button (line 3132) | struct nk_style_button
  type nk_image (line 3132) | struct nk_image
  type nk_context (line 3133) | struct nk_context
  type nk_style_button (line 3133) | struct nk_style_button
  type nk_image (line 3133) | struct nk_image
  type nk_context (line 3134) | struct nk_context
  type nk_button_behavior (line 3134) | enum nk_button_behavior
  type nk_context (line 3135) | struct nk_context
  type nk_button_behavior (line 3135) | enum nk_button_behavior
  type nk_context (line 3136) | struct nk_context
  type nk_context (line 3142) | struct nk_context
  type nk_context (line 3143) | struct nk_context
  type nk_context (line 3144) | struct nk_context
  type nk_context (line 3145) | struct nk_context
  type nk_context (line 3146) | struct nk_context
  type nk_context (line 3147) | struct nk_context
  type nk_context (line 3148) | struct nk_context
  type nk_context (line 3149) | struct nk_context
  type nk_context (line 3155) | struct nk_context
  type nk_context (line 3156) | struct nk_context
  type nk_context (line 3157) | struct nk_context
  type nk_context (line 3158) | struct nk_context
  type nk_context (line 3164) | struct nk_context
  type nk_context (line 3165) | struct nk_context
  type nk_context (line 3166) | struct nk_context
  type nk_image (line 3166) | struct nk_image
  type nk_context (line 3167) | struct nk_context
  type nk_image (line 3167) | struct nk_image
  type nk_context (line 3168) | struct nk_context
  type nk_symbol_type (line 3168) | enum nk_symbol_type
  type nk_context (line 3169) | struct nk_context
  type nk_symbol_type (line 3169) | enum nk_symbol_type
  type nk_context (line 3171) | struct nk_context
  type nk_context (line 3172) | struct nk_context
  type nk_context (line 3173) | struct nk_context
  type nk_image (line 3173) | struct nk_image
  type nk_context (line 3174) | struct nk_context
  type nk_image (line 3174) | struct nk_image
  type nk_context (line 3175) | struct nk_context
  type nk_symbol_type (line 3175) | enum nk_symbol_type
  type nk_context (line 3176) | struct nk_context
  type nk_symbol_type (line 3176) | enum nk_symbol_type
  type nk_context (line 3183) | struct nk_context
  type nk_context (line 3184) | struct nk_context
  type nk_context (line 3185) | struct nk_context
  type nk_context (line 3186) | struct nk_context
  type nk_context (line 3192) | struct nk_context
  type nk_context (line 3193) | struct nk_context
  type nk_context (line 3200) | struct nk_context
  type nk_colorf (line 3200) | struct nk_colorf
  type nk_color_format (line 3200) | enum nk_color_format
  type nk_context (line 3201) | struct nk_context
  type nk_colorf (line 3201) | struct nk_colorf
  type nk_color_format (line 3201) | enum nk_color_format
  type nk_context (line 3298) | struct nk_context
  type nk_context (line 3319) | struct nk_context
  type nk_context (line 3340) | struct nk_context
  type nk_context (line 3363) | struct nk_context
  type nk_context (line 3386) | struct nk_context
  type nk_context (line 3409) | struct nk_context
  type nk_edit_flags (line 3415) | enum nk_edit_flags {
  type nk_edit_types (line 3430) | enum nk_edit_types {
  type nk_edit_events (line 3436) | enum nk_edit_events {
  type nk_context (line 3443) | struct nk_context
  type nk_context (line 3444) | struct nk_context
  type nk_context (line 3445) | struct nk_context
  type nk_text_edit (line 3445) | struct nk_text_edit
  type nk_context (line 3446) | struct nk_context
  type nk_context (line 3447) | struct nk_context
  type nk_context (line 3453) | struct nk_context
  type nk_chart_type (line 3453) | enum nk_chart_type
  type nk_context (line 3454) | struct nk_context
  type nk_chart_type (line 3454) | enum nk_chart_type
  type nk_color (line 3454) | struct nk_color
  type nk_color (line 3454) | struct nk_color
  type nk_context (line 3455) | struct nk_context
  type nk_chart_type (line 3455) | enum nk_chart_type
  type nk_context (line 3456) | struct nk_context
  type nk_chart_type (line 3456) | enum nk_chart_type
  type nk_color (line 3456) | struct nk_color
  type nk_color (line 3456) | struct nk_color
  type nk_context (line 3457) | struct nk_context
  type nk_context (line 3458) | struct nk_context
  type nk_context (line 3459) | struct nk_context
  type nk_context (line 3460) | struct nk_context
  type nk_chart_type (line 3460) | enum nk_chart_type
  type nk_context (line 3461) | struct nk_context
  type nk_chart_type (line 3461) | enum nk_chart_type
  type nk_context (line 3467) | struct nk_context
  type nk_popup_type (line 3467) | enum nk_popup_type
  type nk_rect (line 3467) | struct nk_rect
  type nk_context (line 3468) | struct nk_context
  type nk_context (line 3469) | struct nk_context
  type nk_context (line 3470) | struct nk_context
  type nk_context (line 3471) | struct nk_context
  type nk_context (line 3477) | struct nk_context
  type nk_vec2 (line 3477) | struct nk_vec2
  type nk_context (line 3478) | struct nk_context
  type nk_vec2 (line 3478) | struct nk_vec2
  type nk_context (line 3479) | struct nk_context
  type nk_vec2 (line 3479) | struct nk_vec2
  type nk_context (line 3480) | struct nk_context
  type nk_vec2 (line 3480) | struct nk_vec2
  type nk_context (line 3481) | struct nk_context
  type nk_vec2 (line 3481) | struct nk_vec2
  type nk_context (line 3482) | struct nk_context
  type nk_vec2 (line 3482) | struct nk_vec2
  type nk_context (line 3483) | struct nk_context
  type nk_vec2 (line 3483) | struct nk_vec2
  type nk_context (line 3484) | struct nk_context
  type nk_vec2 (line 3484) | struct nk_vec2
  type nk_context (line 3490) | struct nk_context
  type nk_vec2 (line 3490) | struct nk_vec2
  type nk_context (line 3491) | struct nk_context
  type nk_vec2 (line 3491) | struct nk_vec2
  type nk_context (line 3492) | struct nk_context
  type nk_color (line 3492) | struct nk_color
  type nk_vec2 (line 3492) | struct nk_vec2
  type nk_context (line 3493) | struct nk_context
  type nk_symbol_type (line 3493) | enum nk_symbol_type
  type nk_vec2 (line 3493) | struct nk_vec2
  type nk_context (line 3494) | struct nk_context
  type nk_symbol_type (line 3494) | enum nk_symbol_type
  type nk_vec2 (line 3494) | struct nk_vec2
  type nk_context (line 3495) | struct nk_context
  type nk_symbol_type (line 3495) | enum nk_symbol_type
  type nk_vec2 (line 3495) | struct nk_vec2
  type nk_context (line 3496) | struct nk_context
  type nk_image (line 3496) | struct nk_image
  type nk_vec2 (line 3496) | struct nk_vec2
  type nk_context (line 3497) | struct nk_context
  type nk_image (line 3497) | struct nk_image
  type nk_vec2 (line 3497) | struct nk_vec2
  type nk_context (line 3498) | struct nk_context
  type nk_image (line 3498) | struct nk_image
  type nk_vec2 (line 3498) | struct nk_vec2
  type nk_context (line 3499) | struct nk_context
  type nk_context (line 3500) | struct nk_context
  type nk_context (line 3501) | struct nk_context
  type nk_image (line 3501) | struct nk_image
  type nk_context (line 3502) | struct nk_context
  type nk_image (line 3502) | struct nk_image
  type nk_context (line 3503) | struct nk_context
  type nk_symbol_type (line 3503) | enum nk_symbol_type
  type nk_context (line 3504) | struct nk_context
  type nk_symbol_type (line 3504) | enum nk_symbol_type
  type nk_context (line 3505) | struct nk_context
  type nk_context (line 3506) | struct nk_context
  type nk_context (line 3512) | struct nk_context
  type nk_vec2 (line 3512) | struct nk_vec2
  type nk_rect (line 3512) | struct nk_rect
  type nk_context (line 3513) | struct nk_context
  type nk_context (line 3514) | struct nk_context
  type nk_context (line 3515) | struct nk_context
  type nk_image (line 3515) | struct nk_image
  type nk_context (line 3516) | struct nk_context
  type nk_image (line 3516) | struct nk_image
  type nk_context (line 3517) | struct nk_context
  type nk_symbol_type (line 3517) | enum nk_symbol_type
  type nk_context (line 3518) | struct nk_context
  type nk_symbol_type (line 3518) | enum nk_symbol_type
  type nk_context (line 3519) | struct nk_context
  type nk_context (line 3520) | struct nk_context
  type nk_context (line 3526) | struct nk_context
  type nk_context (line 3528) | struct nk_context
  type nk_context (line 3529) | struct nk_context
  type nk_context (line 3531) | struct nk_context
  type nk_context (line 3532) | struct nk_context
  type nk_context (line 3538) | struct nk_context
  type nk_context (line 3539) | struct nk_context
  type nk_context (line 3540) | struct nk_context
  type nk_vec2 (line 3540) | struct nk_vec2
  type nk_context (line 3541) | struct nk_context
  type nk_vec2 (line 3541) | struct nk_vec2
  type nk_context (line 3542) | struct nk_context
  type nk_image (line 3542) | struct nk_image
  type nk_vec2 (line 3542) | struct nk_vec2
  type nk_context (line 3543) | struct nk_context
  type nk_image (line 3543) | struct nk_image
  type nk_vec2 (line 3543) | struct nk_vec2
  type nk_context (line 3544) | struct nk_context
  type nk_image (line 3544) | struct nk_image
  type nk_vec2 (line 3544) | struct nk_vec2
  type nk_context (line 3545) | struct nk_context
  type nk_symbol_type (line 3545) | enum nk_symbol_type
  type nk_vec2 (line 3545) | struct nk_vec2
  type nk_context (line 3546) | struct nk_context
  type nk_symbol_type (line 3546) | enum nk_symbol_type
  type nk_vec2 (line 3546) | struct nk_vec2
  type nk_context (line 3547) | struct nk_context
  type nk_symbol_type (line 3547) | enum nk_symbol_type
  type nk_vec2 (line 3547) | struct nk_vec2
  type nk_context (line 3548) | struct nk_context
  type nk_context (line 3549) | struct nk_context
  type nk_context (line 3550) | struct nk_context
  type nk_image (line 3550) | struct nk_image
  type nk_context (line 3551) | struct nk_context
  type nk_image (line 3551) | struct nk_image
  type nk_context (line 3552) | struct nk_context
  type nk_symbol_type (line 3552) | enum nk_symbol_type
  type nk_context (line 3553) | struct nk_context
  type nk_symbol_type (line 3553) | enum nk_symbol_type
  type nk_context (line 3554) | struct nk_context
  type nk_context (line 3555) | struct nk_context
  type nk_style_colors (line 3561) | enum nk_style_colors {
  type nk_style_cursor (line 3592) | enum nk_style_cursor {
  type nk_context (line 3602) | struct nk_context
  type nk_context (line 3603) | struct nk_context
  type nk_color (line 3603) | struct nk_color
  type nk_context (line 3604) | struct nk_context
  type nk_style_cursor (line 3604) | enum nk_style_cursor
  type nk_cursor (line 3604) | struct nk_cursor
  type nk_context (line 3605) | struct nk_context
  type nk_cursor (line 3605) | struct nk_cursor
  type nk_style_colors (line 3606) | enum nk_style_colors
  type nk_context (line 3607) | struct nk_context
  type nk_user_font (line 3607) | struct nk_user_font
  type nk_context (line 3608) | struct nk_context
  type nk_style_cursor (line 3608) | enum nk_style_cursor
  type nk_context (line 3609) | struct nk_context
  type nk_context (line 3610) | struct nk_context
  type nk_context (line 3612) | struct nk_context
  type nk_user_font (line 3612) | struct nk_user_font
  type nk_context (line 3613) | struct nk_context
  type nk_context (line 3614) | struct nk_context
  type nk_vec2 (line 3614) | struct nk_vec2
  type nk_vec2 (line 3614) | struct nk_vec2
  type nk_context (line 3615) | struct nk_context
  type nk_style_item (line 3615) | struct nk_style_item
  type nk_style_item (line 3615) | struct nk_style_item
  type nk_context (line 3616) | struct nk_context
  type nk_context (line 3617) | struct nk_context
  type nk_color (line 3617) | struct nk_color
  type nk_color (line 3617) | struct nk_color
  type nk_context (line 3619) | struct nk_context
  type nk_context (line 3620) | struct nk_context
  type nk_context (line 3621) | struct nk_context
  type nk_context (line 3622) | struct nk_context
  type nk_context (line 3623) | struct nk_context
  type nk_context (line 3624) | struct nk_context
  type nk_colorf (line 3635) | struct nk_colorf
  type nk_colorf (line 3644) | struct nk_colorf
  type nk_colorf (line 3649) | struct nk_colorf
  type nk_colorf (line 3650) | struct nk_colorf
  type nk_color (line 3665) | struct nk_color
  type nk_color (line 3666) | struct nk_color
  type nk_color (line 3667) | struct nk_color
  type nk_color (line 3668) | struct nk_color
  type nk_color (line 3669) | struct nk_color
  type nk_color (line 3671) | struct nk_color
  type nk_color (line 3672) | struct nk_color
  type nk_color (line 3673) | struct nk_color
  type nk_color (line 3675) | struct nk_color
  type nk_color (line 3676) | struct nk_color
  type nk_color (line 3677) | struct nk_color
  type nk_color (line 3678) | struct nk_color
  type nk_color (line 3679) | struct nk_color
  type nk_color (line 3680) | struct nk_color
  type nk_color (line 3682) | struct nk_color
  type nk_color (line 3683) | struct nk_color
  type nk_color (line 3684) | struct nk_color
  type nk_color (line 3685) | struct nk_color
  type nk_color (line 3686) | struct nk_color
  type nk_color (line 3687) | struct nk_color
  type nk_image (line 3698) | struct nk_image
  type nk_rect (line 3699) | struct nk_rect
  type nk_rect (line 3700) | struct nk_rect
  type nk_rect (line 3701) | struct nk_rect
  type nk_vec2 (line 3708) | struct nk_vec2
  type nk_rect (line 3708) | struct nk_rect
  type nk_heading (line 3708) | enum nk_heading
  type nk_vec2 (line 3718) | struct nk_vec2
  type nk_vec2 (line 3718) | struct nk_vec2
  type nk_rect (line 3721) | struct nk_rect
  type nk_rect (line 3722) | struct nk_rect
  type nk_user_font_glyph (line 3895) | struct nk_user_font_glyph
  type nk_user_font_glyph (line 3898) | struct nk_user_font_glyph
  type nk_user_font_glyph (line 3902) | struct nk_user_font_glyph {
  type nk_user_font (line 3914) | struct nk_user_font {
  type nk_font_coord_type (line 3930) | enum nk_font_coord_type {
  type nk_font (line 3935) | struct nk_font
  type nk_baked_font (line 3936) | struct nk_baked_font {
  type nk_font_config (line 3949) | struct nk_font_config {
  type nk_font_glyph (line 3985) | struct nk_font_glyph {
  type nk_font (line 3992) | struct nk_font {
  type nk_font_atlas_format (line 4004) | enum nk_font_atlas_format {
  type nk_font_atlas (line 4009) | struct nk_font_atlas {
  type nk_font_atlas (line 4035) | struct nk_font_atlas
  type nk_font_atlas (line 4037) | struct nk_font_atlas
  type nk_allocator (line 4037) | struct nk_allocator
  type nk_font_atlas (line 4038) | struct nk_font_atlas
  type nk_allocator (line 4038) | struct nk_allocator
  type nk_allocator (line 4038) | struct nk_allocator
  type nk_font_atlas (line 4039) | struct nk_font_atlas
  type nk_font_atlas (line 4041) | struct nk_font_atlas
  type nk_font_config (line 4041) | struct nk_font_config
  type nk_font_atlas (line 4043) | struct nk_font_atlas
  type nk_font_config (line 4043) | struct nk_font_config
  type nk_font_atlas (line 4045) | struct nk_font_atlas
  type nk_font_config (line 4045) | struct nk_font_config
  type nk_font_atlas (line 4047) | struct nk_font_atlas
  type nk_font_config (line 4047) | struct nk_font_config
  type nk_font_atlas (line 4049) | struct nk_font_atlas
  type nk_font_config (line 4049) | struct nk_font_config
  type nk_font_atlas (line 4050) | struct nk_font_atlas
  type nk_font_config (line 4050) | struct nk_font_config
  type nk_font_atlas (line 4051) | struct nk_font_atlas
  type nk_font_atlas_format (line 4051) | enum nk_font_atlas_format
  type nk_font_atlas (line 4052) | struct nk_font_atlas
  type nk_draw_null_texture (line 4052) | struct nk_draw_null_texture
  type nk_font (line 4053) | struct nk_font
  type nk_font_atlas (line 4054) | struct nk_font_atlas
  type nk_font_atlas (line 4055) | struct nk_font_atlas
  type nk_memory_status (line 4092) | struct nk_memory_status {
  type nk_allocation_type (line 4101) | enum nk_allocation_type {
  type nk_buffer_allocation_type (line 4106) | enum nk_buffer_allocation_type {
  type nk_buffer_marker (line 4112) | struct nk_buffer_marker {
  type nk_memory (line 4117) | struct nk_memory {void *ptr;nk_size size;}
  type nk_buffer (line 4118) | struct nk_buffer {
  type nk_buffer (line 4140) | struct nk_buffer
  type nk_buffer (line 4142) | struct nk_buffer
  type nk_allocator (line 4142) | struct nk_allocator
  type nk_buffer (line 4143) | struct nk_buffer
  type nk_memory_status (line 4144) | struct nk_memory_status
  type nk_buffer (line 4144) | struct nk_buffer
  type nk_buffer (line 4145) | struct nk_buffer
  type nk_buffer_allocation_type (line 4145) | enum nk_buffer_allocation_type
  type nk_buffer (line 4146) | struct nk_buffer
  type nk_buffer_allocation_type (line 4146) | enum nk_buffer_allocation_type
  type nk_buffer (line 4147) | struct nk_buffer
  type nk_buffer_allocation_type (line 4147) | enum nk_buffer_allocation_type
  type nk_buffer (line 4148) | struct nk_buffer
  type nk_buffer (line 4149) | struct nk_buffer
  type nk_buffer (line 4150) | struct nk_buffer
  type nk_buffer (line 4151) | struct nk_buffer
  type nk_buffer (line 4152) | struct nk_buffer
  type nk_str (line 4164) | struct nk_str {
  type nk_str (line 4170) | struct nk_str
  type nk_str (line 4172) | struct nk_str
  type nk_allocator (line 4172) | struct nk_allocator
  type nk_str (line 4173) | struct nk_str
  type nk_str (line 4174) | struct nk_str
  type nk_str (line 4175) | struct nk_str
  type nk_str (line 4177) | struct nk_str
  type nk_str (line 4178) | struct nk_str
  type nk_str (line 4179) | struct nk_str
  type nk_str (line 4180) | struct nk_str
  type nk_str (line 4181) | struct nk_str
  type nk_str (line 4182) | struct nk_str
  type nk_str (line 4184) | struct nk_str
  type nk_str (line 4185) | struct nk_str
  type nk_str (line 4187) | struct nk_str
  type nk_str (line 4188) | struct nk_str
  type nk_str (line 4189) | struct nk_str
  type nk_str (line 4190) | struct nk_str
  type nk_str (line 4191) | struct nk_str
  type nk_str (line 4192) | struct nk_str
  type nk_str (line 4194) | struct nk_str
  type nk_str (line 4195) | struct nk_str
  type nk_str (line 4196) | struct nk_str
  type nk_str (line 4197) | struct nk_str
  type nk_str (line 4199) | struct nk_str
  type nk_str (line 4200) | struct nk_str
  type nk_str (line 4201) | struct nk_str
  type nk_str (line 4202) | struct nk_str
  type nk_str (line 4203) | struct nk_str
  type nk_str (line 4205) | struct nk_str
  type nk_str (line 4206) | struct nk_str
  type nk_str (line 4207) | struct nk_str
  type nk_str (line 4208) | struct nk_str
  type nk_text_edit (line 4246) | struct nk_text_edit
  type nk_clipboard (line 4247) | struct nk_clipboard {
  type nk_text_undo_record (line 4253) | struct nk_text_undo_record {
  type nk_text_undo_state (line 4260) | struct nk_text_undo_state {
  type nk_text_edit_type (line 4269) | enum nk_text_edit_type {
  type nk_text_edit_mode (line 4274) | enum nk_text_edit_mode {
  type nk_text_edit (line 4280) | struct nk_text_edit {
  type nk_text_edit (line 4301) | struct nk_text_edit
  type nk_text_edit (line 4302) | struct nk_text_edit
  type nk_text_edit (line 4303) | struct nk_text_edit
  type nk_text_edit (line 4304) | struct nk_text_edit
  type nk_text_edit (line 4305) | struct nk_text_edit
  type nk_text_edit (line 4306) | struct nk_text_edit
  type nk_text_edit (line 4307) | struct nk_text_edit
  type nk_text_edit (line 4311) | struct nk_text_edit
  type nk_text_edit (line 4313) | struct nk_text_edit
  type nk_allocator (line 4313) | struct nk_allocator
  type nk_text_edit (line 4314) | struct nk_text_edit
  type nk_text_edit (line 4315) | struct nk_text_edit
  type nk_text_edit (line 4316) | struct nk_text_edit
  type nk_text_edit (line 4317) | struct nk_text_edit
  type nk_text_edit (line 4318) | struct nk_text_edit
  type nk_text_edit (line 4319) | struct nk_text_edit
  type nk_text_edit (line 4320) | struct nk_text_edit
  type nk_text_edit (line 4321) | struct nk_text_edit
  type nk_text_edit (line 4322) | struct nk_text_edit
  type nk_text_edit (line 4323) | struct nk_text_edit
  type nk_command_type (line 4374) | enum nk_command_type {
  type nk_command (line 4397) | struct nk_command {
  type nk_command_scissor (line 4405) | struct nk_command_scissor {
  type nk_command_line (line 4411) | struct nk_command_line {
  type nk_command_curve (line 4419) | struct nk_command_curve {
  type nk_command_rect (line 4428) | struct nk_command_rect {
  type nk_command_rect_filled (line 4437) | struct nk_command_rect_filled {
  type nk_command_rect_multi_color (line 4445) | struct nk_command_rect_multi_color {
  type nk_command_triangle (line 4455) | struct nk_command_triangle {
  type nk_command_triangle_filled (line 4464) | struct nk_command_triangle_filled {
  type nk_command_circle (line 4472) | struct nk_command_circle {
  type nk_command_circle_filled (line 4480) | struct nk_command_circle_filled {
  type nk_command_arc (line 4487) | struct nk_command_arc {
  type nk_command_arc_filled (line 4496) | struct nk_command_arc_filled {
  type nk_command_polygon (line 4504) | struct nk_command_polygon {
  type nk_command_polygon_filled (line 4512) | struct nk_command_polygon_filled {
  type nk_command_polyline (line 4519) | struct nk_command_polyline {
  type nk_command_image (line 4527) | struct nk_command_image {
  type nk_command_custom (line 4537) | struct nk_command_custom {
  type nk_command_text (line 4545) | struct nk_command_text {
  type nk_command_clipping (line 4557) | enum nk_command_clipping {
  type nk_command_buffer (line 4562) | struct nk_command_buffer {
  type nk_command_buffer (line 4571) | struct nk_command_buffer
  type nk_color (line 4571) | struct nk_color
  type nk_command_buffer (line 4572) | struct nk_command_buffer
  type nk_color (line 4572) | struct nk_color
  type nk_command_buffer (line 4573) | struct nk_command_buffer
  type nk_rect (line 4573) | struct nk_rect
  type nk_color (line 4573) | struct nk_color
  type nk_command_buffer (line 4574) | struct nk_command_buffer
  type nk_rect (line 4574) | struct nk_rect
  type nk_color (line 4574) | struct nk_color
  type nk_command_buffer (line 4575) | struct nk_command_buffer
  type nk_color (line 4575) | struct nk_color
  type nk_command_buffer (line 4576) | struct nk_command_buffer
  type nk_color (line 4576) | struct nk_color
  type nk_command_buffer (line 4577) | struct nk_command_buffer
  type nk_color (line 4577) | struct nk_color
  type nk_command_buffer (line 4578) | struct nk_command_buffer
  type nk_color (line 4578) | struct nk_color
  type nk_command_buffer (line 4581) | struct nk_command_buffer
  type nk_rect (line 4581) | struct nk_rect
  type nk_color (line 4581) | struct nk_color
  type nk_command_buffer (line 4582) | struct nk_command_buffer
  type nk_rect (line 4582) | struct nk_rect
  type nk_color (line 4582) | struct nk_color
  type nk_color (line 4582) | struct nk_color
  type nk_color (line 4582) | struct nk_color
  type nk_color (line 4582) | struct nk_color
  type nk_command_buffer (line 4583) | struct nk_command_buffer
  type nk_rect (line 4583) | struct nk_rect
  type nk_color (line 4583) | struct nk_color
  type nk_command_buffer (line 4584) | struct nk_command_buffer
  type nk_color (line 4584) | struct nk_color
  type nk_command_buffer (line 4585) | struct nk_command_buffer
  type nk_color (line 4585) | struct nk_color
  type nk_command_buffer (line 4586) | struct nk_command_buffer
  type nk_color (line 4586) | struct nk_color
  type nk_command_buffer (line 4589) | struct nk_command_buffer
  type nk_rect (line 4589) | struct nk_rect
  type nk_image (line 4589) | struct nk_image
  type nk_color (line 4589) | struct nk_color
  type nk_command_buffer (line 4590) | struct nk_command_buffer
  type nk_rect (line 4590) | struct nk_rect
  type nk_user_font (line 4590) | struct nk_user_font
  type nk_color (line 4590) | struct nk_color
  type nk_color (line 4590) | struct nk_color
  type nk_command_buffer (line 4591) | struct nk_command_buffer
  type nk_rect (line 4591) | struct nk_rect
  type nk_command_buffer (line 4592) | struct nk_command_buffer
  type nk_rect (line 4592) | struct nk_rect
  type nk_mouse_button (line 4599) | struct nk_mouse_button {
  type nk_mouse (line 4604) | struct nk_mouse {
  type nk_key (line 4615) | struct nk_key {
  type nk_keyboard (line 4619) | struct nk_keyboard {
  type nk_input (line 4625) | struct nk_input {
  type nk_input (line 4630) | struct nk_input
  type nk_buttons (line 4630) | enum nk_buttons
  type nk_input (line 4631) | struct nk_input
  type nk_buttons (line 4631) | enum nk_buttons
  type nk_rect (line 4631) | struct nk_rect
  type nk_input (line 4632) | struct nk_input
  type nk_buttons (line 4632) | enum nk_buttons
  type nk_rect (line 4632) | struct nk_rect
  type nk_input (line 4633) | struct nk_input
  type nk_buttons (line 4633) | enum nk_buttons
  type nk_rect (line 4633) | struct nk_rect
  type nk_input (line 4634) | struct nk_input
  type nk_buttons (line 4634) | enum nk_buttons
  type nk_rect (line 4634) | struct nk_rect
  type nk_input (line 4635) | struct nk_input
  type nk_rect (line 4635) | struct nk_rect
  type nk_input (line 4636) | struct nk_input
  type nk_rect (line 4636) | struct nk_rect
  type nk_input (line 4637) | struct nk_input
  type nk_rect (line 4637) | struct nk_rect
  type nk_input (line 4638) | struct nk_input
  type nk_buttons (line 4638) | enum nk_buttons
  type nk_rect (line 4638) | struct nk_rect
  type nk_input (line 4639) | struct nk_input
  type nk_buttons (line 4639) | enum nk_buttons
  type nk_input (line 4640) | struct nk_input
  type nk_buttons (line 4640) | enum nk_buttons
  type nk_input (line 4641) | struct nk_input
  type nk_buttons (line 4641) | enum nk_buttons
  type nk_input (line 4642) | struct nk_input
  type nk_keys (line 4642) | enum nk_keys
  type nk_input (line 4643) | struct nk_input
  type nk_keys (line 4643) | enum nk_keys
  type nk_input (line 4644) | struct nk_input
  type nk_keys (line 4644) | enum nk_keys
  type nk_uint (line 4666) | typedef nk_uint nk_draw_index;
  type nk_ushort (line 4668) | typedef nk_ushort nk_draw_index;
  type nk_draw_list_stroke (line 4670) | enum nk_draw_list_stroke {
  type nk_draw_vertex_layout_attribute (line 4677) | enum nk_draw_vertex_layout_attribute {
  type nk_draw_vertex_layout_format (line 4684) | enum nk_draw_vertex_layout_format {
  type nk_draw_vertex_layout_element (line 4713) | struct nk_draw_vertex_layout_element {
  type nk_draw_command (line 4719) | struct nk_draw_command {
  type nk_draw_list (line 4731) | struct nk_draw_list {
  type nk_draw_list (line 4757) | struct nk_draw_list
  type nk_draw_list (line 4758) | struct nk_draw_list
  type nk_convert_config (line 4758) | struct nk_convert_config
  type nk_buffer (line 4758) | struct nk_buffer
  type nk_buffer (line 4758) | struct nk_buffer
  type nk_buffer (line 4758) | struct nk_buffer
  type nk_anti_aliasing (line 4758) | enum nk_anti_aliasing
  type nk_anti_aliasing (line 4758) | enum nk_anti_aliasing
  type nk_draw_list (line 4762) | struct nk_draw_list
  type nk_buffer (line 4762) | struct nk_buffer
  type nk_draw_command (line 4763) | struct nk_draw_command
  type nk_buffer (line 4763) | struct nk_buffer
  type nk_draw_list (line 4763) | struct nk_draw_list
  type nk_draw_list (line 4764) | struct nk_draw_list
  type nk_buffer (line 4764) | struct nk_buffer
  type nk_draw_list (line 4767) | struct nk_draw_list
  type nk_draw_list (line 4768) | struct nk_draw_list
  type nk_vec2 (line 4768) | struct nk_vec2
  type nk_draw_list (line 4769) | struct nk_draw_list
  type nk_vec2 (line 4769) | struct nk_vec2
  type nk_draw_list (line 4770) | struct nk_draw_list
  type nk_vec2 (line 4770) | struct nk_vec2
  type nk_draw_list (line 4771) | struct nk_draw_list
  type nk_vec2 (line 4771) | struct nk_vec2
  type nk_vec2 (line 4771) | struct nk_vec2
  type nk_draw_list (line 4772) | struct nk_draw_list
  type nk_vec2 (line 4772) | struct nk_vec2
  type nk_vec2 (line 4772) | struct nk_vec2
  type nk_vec2 (line 4772) | struct nk_vec2
  type nk_draw_list (line 4773) | struct nk_draw_list
  type nk_color (line 4773) | struct nk_color
  type nk_draw_list (line 4774) | struct nk_draw_list
  type nk_color (line 4774) | struct nk_color
  type nk_draw_list_stroke (line 4774) | enum nk_draw_list_stroke
  type nk_draw_list (line 4777) | struct nk_draw_list
  type nk_vec2 (line 4777) | struct nk_vec2
  type nk_vec2 (line 4777) | struct nk_vec2
  type nk_color (line 4777) | struct nk_color
  type nk_draw_list (line 4778) | struct nk_draw_list
  type nk_rect (line 4778) | struct nk_rect
  type nk_color (line 4778) | struct nk_color
  type nk_draw_list (line 4779) | struct nk_draw_list
  type nk_vec2 (line 4779) | struct nk_vec2
  type nk_vec2 (line 4779) | struct nk_vec2
  type nk_vec2 (line 4779) | struct nk_vec2
  type nk_color (line 4779) | struct nk_color
  type nk_draw_list (line 4780) | struct nk_draw_list
  type nk_vec2 (line 4780) | struct nk_vec2
  type nk_color (line 4780) | struct nk_color
  type nk_draw_list (line 4781) | struct nk_draw_list
  type nk_vec2 (line 4781) | struct nk_vec2
  type nk_vec2 (line 4781) | struct nk_vec2
  type nk_vec2 (line 4781) | struct nk_vec2
  type nk_vec2 (line 4781) | struct nk_vec2
  type nk_color (line 4781) | struct nk_color
  type nk_draw_list (line 4782) | struct nk_draw_list
  type nk_vec2 (line 4782) | struct nk_vec2
  type nk_color (line 4782) | struct nk_color
  type nk_draw_list_stroke (line 4782) | enum nk_draw_list_stroke
  type nk_anti_aliasing (line 4782) | enum nk_anti_aliasing
  type nk_draw_list (line 4785) | struct nk_draw_list
  type nk_rect (line 4785) | struct nk_rect
  type nk_color (line 4785) | struct nk_color
  type nk_draw_list (line 4786) | struct nk_draw_list
  type nk_rect (line 4786) | struct nk_rect
  type nk_color (line 4786) | struct nk_color
  type nk_color (line 4786) | struct nk_color
  type nk_color (line 4786) | struct nk_color
  type nk_color (line 4786) | struct nk_color
  type nk_draw_list (line 4787) | struct nk_draw_list
  type nk_vec2 (line 4787) | struct nk_vec2
  type nk_vec2 (line 4787) | struct nk_vec2
  type nk_vec2 (line 4787) | struct nk_vec2
  type nk_color (line 4787) | struct nk_color
  type nk_draw_list (line 4788) | struct nk_draw_list
  type nk_vec2 (line 4788) | struct nk_vec2
  type nk_color (line 4788) | struct nk_color
  type nk_draw_list (line 4789) | struct nk_draw_list
  type nk_vec2 (line 4789) | struct nk_vec2
  type nk_color (line 4789) | struct nk_color
  type nk_anti_aliasing (line 4789) | enum nk_anti_aliasing
  type nk_draw_list (line 4792) | struct nk_draw_list
  type nk_image (line 4792) | struct nk_image
  type nk_rect (line 4792) | struct nk_rect
  type nk_color (line 4792) | struct nk_color
  type nk_draw_list (line 4793) | struct nk_draw_list
  type nk_user_font (line 4793) | struct nk_user_font
  type nk_rect (line 4793) | struct nk_rect
  type nk_color (line 4793) | struct nk_color
  type nk_draw_list (line 4795) | struct nk_draw_list
  type nk_style_item_type (line 4805) | enum nk_style_item_type {
  type nk_image (line 4811) | struct nk_image
  type nk_color (line 4812) | struct nk_color
  type nk_style_item (line 4815) | struct nk_style_item {
  type nk_style_text (line 4820) | struct nk_style_text {
  type nk_style_button (line 4825) | struct nk_style_button {
  type nk_style_toggle (line 4852) | struct nk_style_toggle {
  type nk_style_selectable (line 4882) | struct nk_style_selectable {
  type nk_style_slider (line 4917) | struct nk_style_slider {
  type nk_style_progress (line 4956) | struct nk_style_progress {
  type nk_style_scrollbar (line 4982) | struct nk_style_scrollbar {
  type nk_style_edit (line 5015) | struct nk_style_edit {
  type nk_style_property (line 5049) | struct nk_style_property {
  type nk_style_chart (line 5080) | struct nk_style_chart {
  type nk_style_combo (line 5093) | struct nk_style_combo {
  type nk_style_tab (line 5124) | struct nk_style_tab {
  type nk_style_header_align (line 5146) | enum nk_style_header_align {
  type nk_style_window_header (line 5150) | struct nk_style_window_header {
  type nk_style_window (line 5175) | struct nk_style_window {
  type nk_style (line 5212) | struct nk_style {
  type nk_image (line 5238) | struct nk_image
  type nk_color (line 5239) | struct nk_color
  type nk_panel_type (line 5252) | enum nk_panel_type {
  type nk_panel_set (line 5262) | enum nk_panel_set {
  type nk_chart_slot (line 5268) | struct nk_chart_slot {
  type nk_chart (line 5278) | struct nk_chart {
  type nk_panel_row_layout_type (line 5284) | enum nk_panel_row_layout_type {
  type nk_row_layout (line 5296) | struct nk_row_layout {
  type nk_popup_buffer (line 5312) | struct nk_popup_buffer {
  type nk_menu_state (line 5320) | struct nk_menu_state {
  type nk_panel (line 5325) | struct nk_panel {
  type nk_table (line 5351) | struct nk_table
  type nk_window_flags (line 5352) | enum nk_window_flags {
  type nk_popup_state (line 5370) | struct nk_popup_state {
  type nk_edit_state (line 5382) | struct nk_edit_state {
  type nk_property_state (line 5395) | struct nk_property_state {
  type nk_window (line 5408) | struct nk_window {
  type nk (line 5500) | struct nk
  type nk (line 5502) | struct nk
  type nk (line 5504) | struct nk
  type nk (line 5505) | struct nk
  type nk (line 5506) | enum nk
  type nk_configuration_stacks (line 5516) | struct nk_configuration_stacks {
  type nk_table (line 5532) | struct nk_table {
  type nk_table (line 5541) | struct nk_table
  type nk_panel (line 5542) | struct nk_panel
  type nk_window (line 5543) | struct nk_window
  type nk_page_element (line 5546) | struct nk_page_element {
  type nk_page (line 5552) | struct nk_page {
  type nk_pool (line 5558) | struct nk_pool {
  type nk_context (line 5569) | struct nk_context {
  type Big (line 5673) | struct Big {T x; char c;}
  type nk_rect (line 5804) | struct nk_rect
  type nk_rect (line 5805) | struct nk_rect
  type nk_vec2 (line 5805) | struct nk_vec2
  type nk_rect (line 5806) | struct nk_rect
  type nk_rect (line 5806) | struct nk_rect
  type nk_user_font (line 5825) | struct nk_user_font
  type nk_user_font (line 5826) | struct nk_user_font
  type nk_vec2 (line 5826) | struct nk_vec2
  type nk_allocator (line 5831) | struct nk_allocator
  type nk_buffer_allocation_type (line 5839) | enum nk_buffer_allocation_type
  type nk_buffer (line 5840) | struct nk_buffer
  type nk_buffer_allocation_type (line 5840) | enum nk_buffer_allocation_type
  type nk_buffer (line 5841) | struct nk_buffer
  type nk_command_buffer (line 5844) | struct nk_command_buffer
  type nk_buffer (line 5844) | struct nk_buffer
  type nk_command_clipping (line 5844) | enum nk_command_clipping
  type nk_command_buffer (line 5845) | struct nk_command_buffer
  type nk_command_buffer (line 5846) | struct nk_command_buffer
  type nk_command_type (line 5846) | enum nk_command_type
  type nk_command_buffer (line 5847) | struct nk_command_buffer
  type nk_symbol_type (line 5847) | enum nk_symbol_type
  type nk_rect (line 5847) | struct nk_rect
  type nk_color (line 5847) | struct nk_color
  type nk_color (line 5847) | struct nk_color
  type nk_user_font (line 5847) | struct nk_user_font
  type nk_context (line 5850) | struct nk_context
  type nk_command_buffer (line 5850) | struct nk_command_buffer
  type nk_context (line 5851) | struct nk_context
  type nk_window (line 5851) | struct nk_window
  type nk_context (line 5852) | struct nk_context
  type nk_window (line 5852) | struct nk_window
  type nk_context (line 5853) | struct nk_context
  type nk_window (line 5853) | struct nk_window
  type nk_context (line 5854) | struct nk_context
  type nk_command_buffer (line 5854) | struct nk_command_buffer
  type nk_context (line 5855) | struct nk_context
  type nk_window (line 5855) | struct nk_window
  type nk_context (line 5856) | struct nk_context
  type nk_text_edit (line 5859) | struct nk_text_edit
  type nk_text_edit_type (line 5859) | enum nk_text_edit_type
  type nk_text_edit (line 5860) | struct nk_text_edit
  type nk_user_font (line 5860) | struct nk_user_font
  type nk_text_edit (line 5861) | struct nk_text_edit
  type nk_user_font (line 5861) | struct nk_user_font
  type nk_text_edit (line 5862) | struct nk_text_edit
  type nk_keys (line 5862) | enum nk_keys
  type nk_user_font (line 5862) | struct nk_user_font
  type nk_window_insert_location (line 5865) | enum nk_window_insert_location {
  type nk_context (line 5869) | struct nk_context
  type nk_context (line 5870) | struct nk_context
  type nk_window (line 5870) | struct nk_window
  type nk_context (line 5871) | struct nk_context
  type nk_window (line 5871) | struct nk_window
  type nk_context (line 5872) | struct nk_context
  type nk_context (line 5873) | struct nk_context
  type nk_window (line 5873) | struct nk_window
  type nk_window_insert_location (line 5873) | enum nk_window_insert_location
  type nk_pool (line 5876) | struct nk_pool
  type nk_allocator (line 5876) | struct nk_allocator
  type nk_pool (line 5877) | struct nk_pool
  type nk_pool (line 5878) | struct nk_pool
  type nk_pool (line 5879) | struct nk_pool
  type nk_context (line 5882) | struct nk_context
  type nk_context (line 5883) | struct nk_context
  type nk_page_element (line 5883) | struct nk_page_element
  type nk_context (line 5884) | struct nk_context
  type nk_page_element (line 5884) | struct nk_page_element
  type nk_context (line 5887) | struct nk_context
  type nk_window (line 5888) | struct nk_window
  type nk_table (line 5888) | struct nk_table
  type nk_context (line 5889) | struct nk_context
  type nk_table (line 5889) | struct nk_table
  type nk_window (line 5890) | struct nk_window
  type nk_table (line 5890) | struct nk_table
  type nk_context (line 5891) | struct nk_context
  type nk_window (line 5891) | struct nk_window
  type nk_window (line 5892) | struct nk_window
  type nk_context (line 5895) | struct nk_context
  type nk_context (line 5896) | struct nk_context
  type nk_panel (line 5896) | struct nk_panel
  type nk_style (line 5898) | struct nk_style
  type nk_panel_type (line 5898) | enum nk_panel_type
  type nk_style (line 5899) | struct nk_style
  type nk_panel_type (line 5899) | enum nk_panel_type
  type nk_style (line 5900) | struct nk_style
  type nk_panel_type (line 5900) | enum nk_panel_type
  type nk_panel_type (line 5901) | enum nk_panel_type
  type nk_panel_type (line 5902) | enum nk_panel_type
  type nk_context (line 5903) | struct nk_context
  type nk_panel_type (line 5903) | enum nk_panel_type
  type nk_context (line 5904) | struct nk_context
  type nk_style (line 5907) | struct nk_style
  type nk_panel_type (line 5907) | enum nk_panel_type
  type nk_context (line 5908) | struct nk_context
  type nk_window (line 5908) | struct nk_window
  type nk_context (line 5909) | struct nk_context
  type nk_layout_format (line 5909) | enum nk_layout_format
  type nk_context (line 5910) | struct nk_context
  type nk_window (line 5910) | struct nk_window
  type nk_rect (line 5911) | struct nk_rect
  type nk_context (line 5911) | struct nk_context
  type nk_window (line 5911) | struct nk_window
  type nk_rect (line 5912) | struct nk_rect
  type nk_context (line 5912) | struct nk_context
  type nk_rect (line 5913) | struct nk_rect
  type nk_context (line 5913) | struct nk_context
  type nk_context (line 5916) | struct nk_context
  type nk_rect (line 5916) | struct nk_rect
  type nk_rect (line 5916) | struct nk_rect
  type nk_panel_type (line 5916) | enum nk_panel_type
  type nk_text (line 5919) | struct nk_text {
  type nk_command_buffer (line 5924) | struct nk_command_buffer
  type nk_rect (line 5924) | struct nk_rect
  type nk_text (line 5924) | struct nk_text
  type nk_user_font (line 5924) | struct nk_user_font
  type nk_command_buffer (line 5925) | struct nk_command_buffer
  type nk_rect (line 5925) | struct nk_rect
  type nk_text (line 5925) | struct nk_text
  type nk_user_font (line 5925) | struct nk_user_font
  type nk_rect (line 5928) | struct nk_rect
  type nk_input (line 5928) | struct nk_input
  type nk_button_behavior (line 5928) | enum nk_button_behavior
  type nk_command_buffer (line 5929) | struct nk_command_buffer
  type nk_rect (line 5929) | struct nk_rect
  type nk_style_button (line 5929) | struct nk_style_button
  type nk_command_buffer (line 5930) | struct nk_command_buffer
  type nk_rect (line 5930) | struct nk_rect
  type nk_style_button (line 5930) | struct nk_style_button
  type nk_input (line 5930) | struct nk_input
  type nk_button_behavior (line 5930) | enum nk_button_behavior
  type nk_rect (line 5930) | struct nk_rect
  type nk_command_buffer (line 5931) | struct nk_command_buffer
  type nk_rect (line 5931) | struct nk_rect
  type nk_rect (line 5931) | struct nk_rect
  type nk_style_button (line 5931) | struct nk_style_button
  type nk_user_font (line 5931) | struct nk_user_font
  type nk_command_buffer (line 5932) | struct nk_command_buffer
  type nk_rect (line 5932) | struct nk_rect
  type nk_button_behavior (line 5932) | enum nk_button_behavior
  type nk_style_button (line 5932) | struct nk_style_button
  type nk_input (line 5932) | struct nk_input
  type nk_user_font (line 5932) | struct nk_user_font
  type nk_command_buffer (line 5933) | struct nk_command_buffer
  type nk_rect (line 5933) | struct nk_rect
  type nk_rect (line 5933) | struct nk_rect
  type nk_style_button (line 5933) | struct nk_style_button
  type nk_symbol_type (line 5933) | enum nk_symbol_type
  type nk_user_font (line 5933) | struct nk_user_font
  type nk_command_buffer (line 5934) | struct nk_command_buffer
  type nk_rect (line 5934) | struct nk_rect
  type nk_symbol_type (line 5934) | enum nk_symbol_type
  type nk_button_behavior (line 5934) | enum nk_button_behavior
  type nk_style_button (line 5934) | struct nk_style_button
  type nk_input (line 5934) | struct nk_input
  type nk_user_font (line 5934) | struct nk_user_font
  type nk_command_buffer (line 5935) | struct nk_command_buffer
  type nk_rect (line 5935) | struct nk_rect
  type nk_rect (line 5935) | struct nk_rect
  type nk_style_button (line 5935) | struct nk_style_button
  type nk_image (line 5935) | struct nk_image
  type nk_command_buffer (line 5936) | struct nk_command_buffer
  type nk_rect (line 5936) | struct nk_rect
  type nk_image (line 5936) | struct nk_image
  type nk_button_behavior (line 5936) | enum nk_button_behavior
  type nk_style_button (line 5936) | struct nk_style_button
  type nk_input (line 5936) | struct nk_input
  type nk_command_buffer (line 5937) | struct nk_command_buffer
  type nk_rect (line 5937) | struct nk_rect
  type nk_rect (line 5937) | struct nk_rect
  type nk_rect (line 5937) | struct nk_rect
  type nk_style_button (line 5937) | struct nk_style_button
  type nk_symbol_type (line 5937) | enum nk_symbol_type
  type nk_user_font (line 5937) | struct nk_user_font
  type nk_command_buffer (line 5938) | struct nk_command_buffer
  type nk_rect (line 5938) | struct nk_rect
  type nk_symbol_type (line 5938) | enum nk_symbol_type
  type nk_button_behavior (line 5938) | enum nk_button_behavior
  type nk_style_button (line 5938) | struct nk_style_button
  type nk_user_font (line 5938) | struct nk_user_font
  type nk_input (line 5938) | struct nk_input
  type nk_command_buffer (line 5939) | struct nk_command_buffer
  type nk_rect (line 5939) | struct nk_rect
  type nk_rect (line 5939) | struct nk_rect
  type nk_rect (line 5939) | struct nk_rect
  type nk_style_button (line 5939) | struct nk_style_button
  type nk_user_font (line 5939) | struct nk_user_font
  type nk_image (line 5939) | struct nk_image
  type nk_command_buffer (line 5940) | struct nk_command_buffer
  type nk_rect (line 5940) | struct nk_rect
  type nk_image (line 5940) | struct nk_image
  type nk_button_behavior (line 5940) | enum nk_button_behavior
  type nk_style_button (line 5940) | struct nk_style_button
  type nk_user_font (line 5940) | struct nk_user_font
  type nk_input (line 5940) | struct nk_input
  type nk_toggle_type (line 5943) | enum nk_toggle_type {
  type nk_input (line 5947) | struct nk_input
  type nk_rect (line 5947) | struct nk_rect
  type nk_command_buffer (line 5948) | struct nk_command_buffer
  type nk_style_toggle (line 5948) | struct nk_style_toggle
  type nk_rect (line 5948) | struct nk_rect
  type nk_rect (line 5948) | struct nk_rect
  type nk_rect (line 5948) | struct nk_rect
  type nk_user_font (line 5948) | struct nk_user_font
  type nk_command_buffer (line 5949) | struct nk_command_buffer
  type nk_style_toggle (line 5949) | struct nk_style_toggle
  type nk_rect (line 5949) | struct nk_rect
  type nk_rect (line 5949) | struct nk_rect
  type nk_rect (line 5949) | struct nk_rect
  type nk_user_font (line 5949) | struct nk_user_font
  type nk_command_buffer (line 5950) | struct nk_command_buffer
  type nk_rect (line 5950) | struct nk_rect
  type nk_toggle_type (line 5950) | enum nk_toggle_type
  type nk_style_toggle (line 5950) | struct nk_style_toggle
  type nk_input (line 5950) | struct nk_input
  type nk_user_font (line 5950) | struct nk_user_font
  type nk_input (line 5953) | struct nk_input
  type nk_rect (line 5953) | struct nk_rect
  type nk_rect (line 5953) | struct nk_rect
  type nk_command_buffer (line 5954) | struct nk_command_buffer
  type nk_style_progress (line 5954) | struct nk_style_progress
  type nk_rect (line 5954) | struct nk_rect
  type nk_rect (line 5954) | struct nk_rect
  type nk_command_buffer (line 5955) | struct nk_command_buffer
  type nk_rect (line 5955) | struct nk_rect
  type nk_style_progress (line 5955) | struct nk_style_progress
  type nk_input (line 5955) | struct nk_input
  type nk_rect (line 5958) | struct nk_rect
  type nk_rect (line 5958) | struct nk_rect
  type nk_input (line 5958) | struct nk_input
  type nk_rect (line 5958) | struct nk_rect
  type nk_command_buffer (line 5959) | struct nk_command_buffer
  type nk_style_slider (line 5959) | struct nk_style_slider
  type nk_rect (line 5959) | struct nk_rect
  type nk_rect (line 5959) | struct nk_rect
  type nk_command_buffer (line 5960) | struct nk_command_buffer
  type nk_rect (line 5960) | struct nk_rect
  type nk_style_slider (line 5960) | struct nk_style_slider
  type nk_input (line 5960) | struct nk_input
  type nk_user_font (line 5960) | struct nk_user_font
  type nk_input (line 5963) | struct nk_input
  type nk_rect (line 5963) | struct nk_rect
  type nk_rect (line 5963) | struct nk_rect
  type nk_rect (line 5963) | struct nk_rect
  type nk_rect (line 5963) | struct nk_rect
  type nk_orientation (line 5963) | enum nk_orientation
  type nk_command_buffer (line 5964) | struct nk_command_buffer
  type nk_style_scrollbar (line 5964) | struct nk_style_scrollbar
  type nk_rect (line 5964) | struct nk_rect
  type nk_rect (line 5964) | struct nk_rect
  type nk_command_buffer (line 5965) | struct nk_command_buffer
  type nk_rect (line 5965) | struct nk_rect
  type nk_style_scrollbar (line 5965) | struct nk_style_scrollbar
  type nk_input (line 5965) | struct nk_input
  type nk_user_font (line 5965) | struct nk_user_font
  type nk_command_buffer (line 5966) | struct nk_command_buffer
  type nk_rect (line 5966) | struct nk_rect
  type nk_style_scrollbar (line 5966) | struct nk_style_scrollbar
  type nk_input (line 5966) | struct nk_input
  type nk_user_font (line 5966) | struct nk_user_font
  type nk_command_buffer (line 5969) | struct nk_command_buffer
  type nk_style_selectable (line 5969) | struct nk_style_selectable
  type nk_rect (line 5969) | struct nk_rect
  type nk_rect (line 5969) | struct nk_rect
  type nk_image (line 5969) | struct nk_image
  type nk_symbol_type (line 5969) | enum nk_symbol_type
  type nk_user_font (line 5969) | struct nk_user_font
  type nk_command_buffer (line 5970) | struct nk_command_buffer
  type nk_rect (line 5970) | struct nk_rect
  type nk_style_selectable (line 5970) | struct nk_style_selectable
  type nk_input (line 5970) | struct nk_input
  type nk_user_font (line 5970) | struct nk_user_font
  type nk_command_buffer (line 5971) | struct nk_command_buffer
  type nk_rect (line 5971) | struct nk_rect
  type nk_image (line 5971) | struct nk_image
  type nk_style_selectable (line 5971) | struct nk_style_selectable
  type nk_input (line 5971) | struct nk_input
  type nk_user_font (line 5971) | struct nk_user_font
  type nk_command_buffer (line 5974) | struct nk_command_buffer
  type nk_style_edit (line 5974) | struct nk_style_edit
  type nk_user_font (line 5974) | struct nk_user_font
  type nk_color (line 5974) | struct nk_color
  type nk_color (line 5974) | struct nk_color
  type nk_command_buffer (line 5975) | struct nk_command_buffer
  type nk_rect (line 5975) | struct nk_rect
  type nk_text_edit (line 5975) | struct nk_text_edit
  type nk_style_edit (line 5975) | struct nk_style_edit
  type nk_input (line 5975) | struct nk_input
  type nk_user_font (line 5975) | struct nk_user_font
  type nk_rect (line 5978) | struct nk_rect
  type nk_rect (line 5978) | struct nk_rect
  type nk_rect (line 5978) | struct nk_rect
  type nk_rect (line 5978) | struct nk_rect
  type nk_colorf (line 5978) | struct nk_colorf
  type nk_input (line 5978) | struct nk_input
  type nk_command_buffer (line 5979) | struct nk_command_buffer
  type nk_rect (line 5979) | struct nk_rect
  type nk_rect (line 5979) | struct nk_rect
  type nk_rect (line 5979) | struct nk_rect
  type nk_colorf (line 5979) | struct nk_colorf
  type nk_command_buffer (line 5980) | struct nk_command_buffer
  type nk_colorf (line 5980) | struct nk_colorf
  type nk_color_format (line 5980) | enum nk_color_format
  type nk_rect (line 5980) | struct nk_rect
  type nk_vec2 (line 5980) | struct nk_vec2
  type nk_input (line 5980) | struct nk_input
  type nk_user_font (line 5980) | struct nk_user_font
  type nk_property_status (line 5983) | enum nk_property_status {
  type nk_property_filter (line 5988) | enum nk_property_filter {
  type nk_property_kind (line 5992) | enum nk_property_kind {
  type nk_property_variant (line 6002) | struct nk_property_variant {
  type nk_input (line 6013) | struct nk_input
  type nk_rect (line 6013) | struct nk_rect
  type nk_property_variant (line 6013) | struct nk_property_variant
  type nk_input (line 6014) | struct nk_input
  type nk_rect (line 6014) | struct nk_rect
  type nk_rect (line 6014) | struct nk_rect
  type nk_rect (line 6014) | struct nk_rect
  type nk_rect (line 6014) | struct nk_rect
  type nk_property_variant (line 6014) | struct nk_property_variant
  type nk_command_buffer (line 6015) | struct nk_command_buffer
  type nk_style_property (line 6015) | struct nk_style_property
  type nk_rect (line 6015) | struct nk_rect
  type nk_rect (line 6015) | struct nk_rect
  type nk_user_font (line 6015) | struct nk_user_font
  type nk_command_buffer (line 6016) | struct nk_command_buffer
  type nk_rect (line 6016) | struct nk_rect
  type nk_property_variant (line 6016) | struct nk_property_variant
  type nk_style_property (line 6016) | struct nk_style_property
  type nk_property_filter (line 6016) | enum nk_property_filter
  type nk_input (line 6016) | struct nk_input
  type nk_user_font (line 6016) | struct nk_user_font
  type nk_text_edit (line 6016) | struct nk_text_edit
  type nk_button_behavior (line 6016) | enum nk_button_behavior
  type nk_context (line 6017) | struct nk_context
  type nk_property_variant (line 6017) | struct nk_property_variant
  type nk_property_filter (line 6017) | enum nk_property_filter
  function NK_LIB (line 6057) | NK_LIB float
  function NK_LIB (line 6069) | NK_LIB float
  function NK_LIB (line 6074) | NK_LIB float
  function NK_LIB (line 6087) | NK_LIB float
  function NK_LIB (line 6103) | NK_LIB nk_uint
  function NK_LIB (line 6115) | NK_LIB double
  function NK_LIB (line 6130) | NK_LIB int
  function NK_LIB (line 6136) | NK_LIB int
  function NK_LIB (line 6142) | NK_LIB int
  function NK_LIB (line 6154) | NK_LIB int
  function nk_rect (line 6170) | nk_rect
  function nk_rect (line 6175) | nk_rect
  function nk_rect (line 6183) | nk_rect
  function nk_rect (line 6193) | nk_rect
  function nk_rect (line 6198) | nk_rect
  function nk_rect (line 6203) | nk_rect
  function nk_vec2 (line 6208) | nk_vec2
  function nk_vec2 (line 6215) | nk_vec2
  function nk_rect (line 6222) | nk_rect
  function nk_rect (line 6234) | nk_rect
  function nk_vec2 (line 6244) | nk_vec2
  function nk_vec2 (line 6251) | nk_vec2
  function nk_vec2 (line 6259) | nk_vec2
  function nk_vec2 (line 6264) | nk_vec2
  function NK_LIB (line 6269) | NK_LIB void
  function NK_API (line 6283) | NK_API void
  function NK_LIB (line 6331) | NK_LIB int nk_is_lower(int c) {return (c >= 'a' && c <= 'z') || (c >= 0x...
  function NK_LIB (line 6332) | NK_LIB int nk_is_upper(int c){return (c >= 'A' && c <= 'Z') || (c >= 0xC...
  function NK_LIB (line 6333) | NK_LIB int nk_to_upper(int c) {return (c >= 'a' && c <= 'z') ? (c - ('a'...
  function NK_LIB (line 6334) | NK_LIB int nk_to_lower(int c) {return (c >= 'A' && c <= 'Z') ? (c - ('a'...
  function NK_LIB (line 6336) | NK_LIB void*
  function NK_LIB (line 6392) | NK_LIB void
  function NK_LIB (line 6443) | NK_LIB void
  function NK_API (line 6449) | NK_API int
  function NK_API (line 6457) | NK_API int
  function NK_API (line 6481) | NK_API double
  function NK_API (line 6538) | NK_API float
  function NK_API (line 6547) | NK_API int
  function NK_API (line 6569) | NK_API int
  function NK_INTERN (line 6594) | NK_INTERN int
  function NK_INTERN (line 6607) | NK_INTERN int
  function NK_API (line 6616) | NK_API int
  function NK_API (line 6633) | NK_API int
  function NK_API (line 6754) | NK_API int
  function NK_LIB (line 6759) | NK_LIB int
  function NK_INTERN (line 6779) | NK_INTERN void
  function NK_LIB (line 6792) | NK_LIB char*
  function NK_LIB (line 6816) | NK_LIB char*
  function NK_INTERN (line 6896) | NK_INTERN int
  function NK_LIB (line 7215) | NK_LIB int
  function NK_API (line 7232) | NK_API nk_hash
  function NK_LIB (line 7297) | NK_LIB char*
  function NK_LIB (line 7331) | NK_LIB int
  function nk_vec2 (line 7379) | nk_vec2
  function NK_INTERN (line 7449) | NK_INTERN int
  function nk_color (line 7465) | nk_color
  function nk_color (line 7475) | nk_color
  function nk_color (line 7487) | nk_color
  function NK_API (line 7499) | NK_API void
  function NK_API (line 7514) | NK_API void
  function nk_color (line 7527) | nk_color
  function nk_color (line 7532) | nk_color
  function nk_color (line 7537) | nk_color
  function nk_color (line 7547) | nk_color
  function nk_color (line 7552) | nk_color
  function nk_color (line 7557) | nk_color
  function nk_color (line 7567) | nk_color
  function nk_color (line 7577) | nk_color
  function nk_color (line 7582) | nk_color
  function nk_color (line 7587) | nk_color
  function nk_color (line 7597) | nk_color
  function nk_color (line 7602) | nk_color
  function nk_color (line 7607) | nk_color
  function nk_color (line 7612) | nk_color
  function nk_color (line 7617) | nk_color
  function nk_color (line 7622) | nk_color
  function nk_color (line 7627) | nk_color
  function nk_color (line 7632) | nk_color
  function nk_color (line 7641) | nk_color
  function nk_color (line 7646) | nk_color
  function nk_colorf (line 7651) | nk_colorf
  function nk_colorf (line 7678) | nk_colorf
  function nk_color (line 7683) | nk_color
  function nk_color (line 7689) | nk_color
  function NK_API (line 7694) | NK_API nk_uint
  function NK_API (line 7703) | NK_API void
  function NK_API (line 7712) | NK_API void
  function nk_colorf (line 7717) | nk_colorf
  function NK_API (line 7724) | NK_API void
  function NK_API (line 7733) | NK_API void
  function NK_API (line 7738) | NK_API void
  function NK_API (line 7744) | NK_API void
  function NK_API (line 7750) | NK_API void
  function NK_API (line 7771) | NK_API void
  function NK_API (line 7776) | NK_API void
  function NK_API (line 7784) | NK_API void
  function NK_API (line 7789) | NK_API void
  function NK_API (line 7800) | NK_API void
  function NK_API (line 7805) | NK_API void
  function NK_API (line 7815) | NK_API void
  function NK_API (line 7825) | NK_API void
  function NK_API (line 7831) | NK_API void
  function NK_API (line 7840) | NK_API void
  function NK_API (line 7845) | NK_API void
  function NK_INTERN (line 7869) | NK_INTERN int
  function NK_INTERN (line 7880) | NK_INTERN nk_rune
  function NK_API (line 7891) | NK_API int
  function NK_INTERN (line 7919) | NK_INTERN char
  function NK_API (line 7924) | NK_API int
  function NK_API (line 7939) | NK_API int
  function NK_API (line 7962) | NK_API const char*
  function NK_LIB (line 8010) | NK_LIB void*
  function NK_LIB (line 8017) | NK_LIB void
  function NK_API (line 8023) | NK_API void
  function NK_API (line 8034) | NK_API void
  function NK_API (line 8051) | NK_API void
  function NK_LIB (line 8065) | NK_LIB void*
  function NK_LIB (line 8095) | NK_LIB void*
  function NK_LIB (line 8133) | NK_LIB void*
  function NK_API (line 8185) | NK_API void
  function NK_API (line 8193) | NK_API void
  function NK_API (line 8203) | NK_API void
  function NK_API (line 8224) | NK_API void
  function NK_API (line 8234) | NK_API void
  function NK_API (line 8244) | NK_API void
  function NK_API (line 8256) | NK_API void*
  function NK_API (line 8263) | NK_API const void*
  function NK_API (line 8270) | NK_API nk_size
  function NK_API (line 8288) | NK_API void
  function NK_API (line 8300) | NK_API void
  function NK_API (line 8306) | NK_API void
  function NK_API (line 8312) | NK_API int
  function NK_API (line 8325) | NK_API int
  function NK_API (line 8330) | NK_API int
  function NK_API (line 8342) | NK_API int
  function NK_API (line 8361) | NK_API int
  function NK_API (line 8377) | NK_API int
  function NK_API (line 8392) | NK_API int
  function NK_API (line 8427) | NK_API int
  function NK_API (line 8446) | NK_API int
  function NK_API (line 8451) | NK_API int
  function NK_API (line 8456) | NK_API int
  function NK_API (line 8471) | NK_API int
  function NK_API (line 8490) | NK_API int
  function NK_API (line 8506) | NK_API int
  function NK_API (line 8521) | NK_API void
  function NK_API (line 8531) | NK_API void
  function NK_API (line 8552) | NK_API void
  function NK_API (line 8569) | NK_API void
  function NK_API (line 8593) | NK_API char*
  function NK_API (line 8600) | NK_API char*
  function NK_API (line 8636) | NK_API const char*
  function NK_API (line 8643) | NK_API const char*
  function NK_API (line 8679) | NK_API nk_rune
  function NK_API (line 8687) | NK_API char*
  function NK_API (line 8694) | NK_API const char*
  function NK_API (line 8701) | NK_API int
  function NK_API (line 8708) | NK_API int
  function NK_API (line 8715) | NK_API void
  function NK_API (line 8722) | NK_API void
  function NK_LIB (line 8739) | NK_LIB void
  function NK_LIB (line 8752) | NK_LIB void
  function NK_LIB (line 8765) | NK_LIB void*
  function NK_API (line 8798) | NK_API void
  function NK_API (line 8818) | NK_API void
  function NK_API (line 8835) | NK_API void
  function NK_API (line 8858) | NK_API void
  function NK_API (line 8881) | NK_API void
  function NK_API (line 8904) | NK_API void
  function NK_API (line 8930) | NK_API void
  function NK_API (line 8952) | NK_API void
  function NK_API (line 8973) | NK_API void
  function NK_API (line 8990) | NK_API void
  function NK_API (line 9007) | NK_API void
  function NK_API (line 9034) | NK_API void
  function NK_API (line 9061) | NK_API void
  function NK_API (line 9082) | NK_API void
  function NK_API (line 9103) | NK_API void
  function NK_API (line 9124) | NK_API void
  function NK_API (line 9147) | NK_API void
  function NK_API (line 9170) | NK_API void
  function NK_API (line 9222) | NK_API void
  function NK_API (line 9235) | NK_API void
  function nk_draw_command (line 9263) | nk_draw_command*
  function nk_draw_command (line 9279) | nk_draw_command*
  function nk_draw_command (line 9299) | nk_draw_command*
  function nk_vec2 (line 9313) | nk_vec2*
  function nk_vec2 (line 9331) | nk_vec2
  function nk_draw_command (line 9342) | nk_draw_command*
  function nk_draw_command (line 9373) | nk_draw_command*
  function NK_INTERN (line 9386) | NK_INTERN void
  function NK_INTERN (line 9400) | NK_INTERN void
  function NK_API (line 9422) | NK_API void
  function NK_INTERN (line 9428) | NK_INTERN void*
  function NK_INTERN (line 9452) | NK_INTERN nk_draw_index*
  function NK_INTERN (line 9470) | NK_INTERN int
  function NK_INTERN (line 9477) | NK_INTERN void
  function NK_INTERN (line 9552) | NK_INTERN void
  function NK_INTERN (line 9606) | NK_INTERN void*
  function NK_API (line 9625) | NK_API void
  function NK_API (line 9865) | NK_API void
  function NK_API (line 9989) | NK_API void
  function NK_API (line 9998) | NK_API void
  function NK_API (line 10016) | NK_API void
  function NK_API (line 10032) | NK_API void
  function NK_API (line 10077) | NK_API void
  function NK_API (line 10100) | NK_API void
  function NK_API (line 10127) | NK_API void
  function NK_API (line 10137) | NK_API void
  function NK_API (line 10149) | NK_API void
  function NK_API (line 10164) | NK_API void
  function NK_API (line 10179) | NK_API void
  function NK_API (line 10193) | NK_API void
  function NK_API (line 10227) | NK_API void
  function NK_API (line 10238) | NK_API void
  function NK_API (line 10249) | NK_API void
  function NK_API (line 10260) | NK_API void
  function NK_API (line 10271) | NK_API void
  function NK_INTERN (line 10282) | NK_INTERN void
  function NK_API (line 10319) | NK_API void
  function NK_API (line 10340) | NK_API void
  function NK_API (line 10390) | NK_API nk_flags
  function nk_draw_command (line 10532) | nk_draw_command*
  function nk_draw_command (line 10538) | nk_draw_command*
  function nk_draw_command (line 10543) | nk_draw_command*
  type nk_rp_coord (line 10564) | typedef unsigned short nk_rp_coord;
  type nk_rp_rect (line 10566) | struct nk_rp_rect {
  type nk_rp_node (line 10577) | struct nk_rp_node {
  type nk_rp_context (line 10582) | struct nk_rp_context {
  type nk_rp__findresult (line 10595) | struct nk_rp__findresult {
  type NK_RP_HEURISTIC (line 10600) | enum NK_RP_HEURISTIC {
  type NK_RP_INIT_STATE (line 10605) | enum NK_RP_INIT_STATE{NK_RP__INIT_skyline = 1}
  function NK_INTERN (line 10607) | NK_INTERN void
  function NK_INTERN (line 10626) | NK_INTERN void
  function NK_INTERN (line 10656) | NK_INTERN int
  function nk_rp__findresult (line 10699) | nk_rp__findresult
  function nk_rp__findresult (line 10794) | nk_rp__findresult
  function NK_INTERN (line 10846) | NK_INTERN int
  function NK_INTERN (line 10857) | NK_INTERN int
  function NK_INTERN (line 10864) | NK_INTERN void
  function NK_INTERN (line 10893) | NK_INTERN void
  type nk_tt_bakedchar (line 10934) | struct nk_tt_bakedchar {
  type nk_tt_aligned_quad (line 10940) | struct nk_tt_aligned_quad{
  type nk_tt_packedchar (line 10945) | struct nk_tt_packedchar {
  type nk_tt_pack_range (line 10952) | struct nk_tt_pack_range {
  type nk_tt_pack_context (line 10964) | struct nk_tt_pack_context {
  type nk_tt_fontinfo (line 10975) | struct nk_tt_fontinfo {
  type nk_tt_vertex (line 10990) | struct nk_tt_vertex {
  type nk_tt__bitmap (line 10995) | struct nk_tt__bitmap{
  type nk_tt__hheap_chunk (line 11000) | struct nk_tt__hheap_chunk {
  type nk_tt__hheap (line 11003) | struct nk_tt__hheap {
  type nk_tt__edge (line 11010) | struct nk_tt__edge {
  type nk_tt__active_edge (line 11015) | struct nk_tt__active_edge {
  type nk_tt__point (line 11022) | struct nk_tt__point {float x,y;}
  function nk_ushort (line 11089) | static nk_ushort nk_ttUSHORT(const nk_byte *p) { return (nk_ushort)(p[0]...
  function nk_short (line 11090) | static nk_short nk_ttSHORT(const nk_byte *p)   { return (nk_short)(p[0]*...
  function nk_uint (line 11091) | static nk_uint nk_ttULONG(const nk_byte *p)  { return (nk_uint)((p[0]<<2...
  type nk_tt_fontinfo (line 11098) | struct nk_tt_fontinfo
  type nk_allocator (line 11098) | struct nk_allocator
  type nk_tt_vertex (line 11099) | struct nk_tt_vertex
  function NK_INTERN (line 11101) | NK_INTERN nk_uint
  function NK_INTERN (line 11115) | NK_INTERN int
  function NK_INTERN (line 11171) | NK_INTERN int
  function NK_INTERN (line 11264) | NK_INTERN void
  function NK_INTERN (line 11273) | NK_INTERN int
  function NK_INTERN (line 11289) | NK_INTERN int
  function NK_INTERN (line 11302) | NK_INTERN int
  function NK_INTERN (line 11318) | NK_INTERN int
  function NK_INTERN (line 11541) | NK_INTERN void
  function NK_INTERN (line 11558) | NK_INTERN void
  function NK_INTERN (line 11566) | NK_INTERN float
  function NK_INTERN (line 11572) | NK_INTERN float
  function NK_INTERN (line 11582) | NK_INTERN void
  function NK_INTERN (line 11602) | NK_INTERN void
  function NK_INTERN (line 11612) | NK_INTERN void*
  function NK_INTERN (line 11634) | NK_INTERN void
  function NK_INTERN (line 11640) | NK_INTERN void
  function nk_tt__active_edge (line 11650) | nk_tt__active_edge*
  function NK_INTERN (line 11669) | NK_INTERN void
  function NK_INTERN (line 11702) | NK_INTERN void
  function NK_INTERN (line 11862) | NK_INTERN void
  function NK_INTERN (line 11953) | NK_INTERN void
  function NK_INTERN (line 11972) | NK_INTERN void
  function NK_INTERN (line 12039) | NK_INTERN void
  function NK_INTERN (line 12045) | NK_INTERN void
  function NK_INTERN (line 12100) | NK_INTERN void
  function NK_INTERN (line 12107) | NK_INTERN int
  function nk_tt__point (line 12135) | nk_tt__point*
  function NK_INTERN (line 12213) | NK_INTERN void
  function NK_INTERN (line 12232) | NK_INTERN void
  function NK_INTERN (line 12258) | NK_INTERN int
  function NK_INTERN (line 12289) | NK_INTERN void
  function NK_INTERN (line 12295) | NK_INTERN void
  function NK_INTERN (line 12306) | NK_INTERN void
  function NK_INTERN (line 12369) | NK_INTERN void
  function NK_INTERN (line 12432) | NK_INTERN float
  function NK_INTERN (line 12444) | NK_INTERN int
  function NK_INTERN (line 12475) | NK_INTERN int
  function NK_INTERN (line 12558) | NK_INTERN void
  type nk_font_bake_data (line 12594) | struct nk_font_bake_data {
  type nk_font_baker (line 12601) | struct nk_font_baker {
  function NK_INTERN (line 12616) | NK_INTERN int
  function NK_INTERN (line 12625) | NK_INTERN int
  function NK_API (line 12640) | NK_API const nk_rune*
  function NK_API (line 12646) | NK_API const nk_rune*
  function NK_API (line 12659) | NK_API const nk_rune*
  function NK_API (line 12671) | NK_API const nk_rune*
  function NK_INTERN (line 12682) | NK_INTERN void
  function nk_font_baker (line 12714) | nk_font_baker*
  function NK_INTERN (line 12728) | NK_INTERN int
  function NK_INTERN (line 12842) | NK_INTERN void
  function NK_INTERN (line 12955) | NK_INTERN void
  function NK_INTERN (line 12983) | NK_INTERN void
  function NK_INTERN (line 13008) | NK_INTERN float
  function NK_INTERN (line 13041) | NK_INTERN void
  function nk_font_glyph (line 13068) | nk_font_glyph*
  function NK_INTERN (line 13096) | NK_INTERN void
  function nk_decompress_length (line 13280) | NK_INTERN unsigned int
  function NK_INTERN (line 13285) | NK_INTERN void
  function NK_INTERN (line 13294) | NK_INTERN void
  function nk_adler32 (line 13324) | NK_INTERN unsigned int
  function nk_decompress (line 13354) | NK_INTERN unsigned int
  function nk_decode_85_byte (line 13388) | NK_INTERN unsigned int
  function NK_INTERN (line 13393) | NK_INTERN void
  function nk_font_config (line 13421) | nk_font_config
  function NK_API (line 13443) | NK_API void
  function NK_API (line 13457) | NK_API void
  function NK_API (line 13467) | NK_API void
  function NK_API (line 13479) | NK_API void
  function nk_font (line 13496) | nk_font*
  function nk_font (line 13583) | nk_font*
  function nk_font (line 13608) | nk_font*
  function nk_font (line 13634) | nk_font*
  function nk_font (line 13669) | nk_font*
  function nk_font (line 13700) | nk_font*
  function NK_API (line 13713) | NK_API const void*
  function NK_API (line 13837) | NK_API void
  function NK_API (line 13872) | NK_API void
  function NK_API (line 13894) | NK_API void
  function NK_API (line 13944) | NK_API void
  function NK_API (line 13964) | NK_API void
  function NK_API (line 13979) | NK_API void
  function NK_API (line 13991) | NK_API void
  function NK_API (line 14006) | NK_API void
  function NK_API (line 14022) | NK_API void
  function NK_API (line 14030) | NK_API void
  function NK_API (line 14048) | NK_API void
  function NK_API (line 14057) | NK_API void
  function NK_API (line 14066) | NK_API int
  function NK_API (line 14074) | NK_API int
  function NK_API (line 14085) | NK_API int
  function NK_API (line 14094) | NK_API int
  function NK_API (line 14104) | NK_API int
  function NK_API (line 14114) | NK_API int
  function NK_API (line 14122) | NK_API int
  function NK_API (line 14128) | NK_API int
  function NK_API (line 14134) | NK_API int
  function NK_API (line 14141) | NK_API int
  function NK_API (line 14147) | NK_API int
  function NK_API (line 14157) | NK_API int
  function NK_API (line 14163) | NK_API int
  function NK_API (line 14173) | NK_API int
  function NK_API (line 14183) | NK_API int
  function NK_API (line 14202) | NK_API void nk_style_default(struct nk_context *ctx){nk_style_from_table...
  function NK_API (line 14245) | NK_API const char*
  function nk_style_item (line 14250) | nk_style_item
  function nk_style_item (line 14258) | nk_style_item
  function nk_style_item (line 14266) | nk_style_item
  function NK_API (line 14274) | NK_API void
  function NK_API (line 14818) | NK_API void
  function NK_API (line 14831) | NK_API int
  function NK_API (line 14851) | NK_API int
  function NK_API (line 14901) | NK_API int NK_STYLE_PUSH_IMPLEMENATION(struct nk, style_item, style_items)
  function NK_API (line 14926) | NK_API void
  function NK_API (line 14931) | NK_API void
  function NK_API (line 14936) | NK_API void
  function NK_API (line 14946) | NK_API void
  function NK_INTERN (line 14968) | NK_INTERN void
  function NK_API (line 14982) | NK_API int
  function NK_API (line 14992) | NK_API int
  function NK_API (line 15003) | NK_API int
  function NK_API (line 15024) | NK_API int
  function NK_API (line 15037) | NK_API void
  function NK_API (line 15046) | NK_API void
  function NK_API (line 15068) | NK_API void
  function NK_LIB (line 15134) | NK_LIB void
  function NK_LIB (line 15145) | NK_LIB void
  function NK_LIB (line 15152) | NK_LIB void
  function NK_LIB (line 15168) | NK_LIB void
  function NK_LIB (line 15180) | NK_LIB void
  function NK_LIB (line 15188) | NK_LIB void
  function NK_LIB (line 15206) | NK_LIB void
  function nk_command (line 15268) | nk_command*
  function nk_command (line 15290) | nk_command*
  function NK_LIB (line 15313) | NK_LIB void
  function NK_LIB (line 15323) | NK_LIB void
  function NK_LIB (line 15335) | NK_LIB void
  function nk_page_element (line 15346) | nk_page_element*
  function nk_page_element (line 15377) | nk_page_element*
  function NK_LIB (line 15403) | NK_LIB void
  function NK_LIB (line 15415) | NK_LIB void
  function nk_table (line 15440) | nk_table*
  function NK_LIB (line 15449) | NK_LIB void
  function NK_LIB (line 15456) | NK_LIB void
  function NK_LIB (line 15474) | NK_LIB void
  function NK_LIB (line 15486) | NK_LIB nk_uint*
  function NK_LIB (line 15504) | NK_LIB nk_uint*
  function NK_LIB (line 15531) | NK_LIB void*
  function NK_LIB (line 15540) | NK_LIB void
  function NK_LIB (line 15547) | NK_LIB int
  function nk_vec2 (line 15556) | nk_vec2
  function NK_LIB (line 15569) | NK_LIB float
  function nk_color (line 15585) | nk_color
  function NK_LIB (line 15598) | NK_LIB int
  function NK_LIB (line 15603) | NK_LIB int
  function NK_LIB (line 15608) | NK_LIB int
  function NK_LIB (line 15831) | NK_LIB void
  function NK_LIB (line 16136) | NK_LIB void*
  function NK_LIB (line 16145) | NK_LIB void
  function nk_window (line 16172) | nk_window*
  function NK_LIB (line 16188) | NK_LIB void
  function NK_LIB (line 16233) | NK_LIB void
  function NK_API (line 16262) | NK_API int
  function NK_API (line 16268) | NK_API int
  function NK_API (line 16422) | NK_API void
  function nk_rect (line 16440) | nk_rect
  function nk_vec2 (line 16448) | nk_vec2
  function nk_vec2 (line 16456) | nk_vec2
  function NK_API (line 16464) | NK_API float
  function NK_API (line 16472) | NK_API float
  function nk_rect (line 16480) | nk_rect
  function nk_vec2 (line 16488) | nk_vec2
  function nk_vec2 (line 16497) | nk_vec2
  function nk_vec2 (line 16507) | nk_vec2
  function nk_command_buffer (line 16516) | nk_command_buffer*
  function nk_panel (line 16525) | nk_panel*
  function NK_API (line 16533) | NK_API void
  function NK_API (line 16547) | NK_API int
  function NK_API (line 16556) | NK_API int
  function NK_API (line 16566) | NK_API int
  function NK_API (line 16593) | NK_API int
  function NK_API (line 16600) | NK_API int
  function NK_API (line 16615) | NK_API int
  function NK_API (line 16630) | NK_API int
  function NK_API (line 16645) | NK_API int
  function nk_window (line 16660) | nk_window*
  function NK_API (line 16669) | NK_API void
  function NK_API (line 16682) | NK_API void
  function NK_API (line 16694) | NK_API void
  function NK_API (line 16703) | NK_API void
  function NK_API (line 16712) | NK_API void
  function NK_API (line 16724) | NK_API void
  function NK_API (line 16742) | NK_API void
  function NK_API (line 16750) | NK_API void
  function NK_API (line 16767) | NK_API void
  function NK_API (line 16776) | NK_API void
  function NK_API (line 16803) | NK_API int
  function NK_LIB (line 16899) | NK_LIB int
  function NK_API (line 16982) | NK_API void
  function NK_API (line 16994) | NK_API void
  function NK_API (line 17026) | NK_API void
  function NK_API (line 17043) | NK_API void
  function NK_API (line 17067) | NK_API int
  function NK_API (line 17126) | NK_API int
  function NK_API (line 17156) | NK_API int
  function NK_API (line 17161) | NK_API int
  function NK_API (line 17191) | NK_API int
  function NK_API (line 17197) | NK_API int
  function NK_API (line 17227) | NK_API int
  function NK_API (line 17233) | NK_API void
  function NK_API (line 17242) | NK_API void
  function NK_API (line 17289) | NK_API void
  function NK_API (line 17326) | NK_API void
  function NK_INTERN (line 17357) | NK_INTERN int
  function NK_API (line 17390) | NK_API int
  function NK_API (line 17415) | NK_API int nk_menu_begin_label(struct nk_context *ctx,
  function NK_API (line 17420) | NK_API int
  function NK_API (line 17445) | NK_API int
  function NK_API (line 17470) | NK_API int
  function NK_API (line 17496) | NK_API int
  function NK_API (line 17502) | NK_API int
  function NK_API (line 17528) | NK_API int
  function NK_API (line 17534) | NK_API int
  function NK_API (line 17539) | NK_API int
  function NK_API (line 17544) | NK_API int
  function NK_API (line 17550) | NK_API int
  function NK_API (line 17556) | NK_API int nk_menu_item_symbol_text(struct nk_context *ctx, enum nk_symb...
  function NK_API (line 17561) | NK_API int nk_menu_item_symbol_label(struct nk_context *ctx, enum nk_sym...
  function NK_API (line 17566) | NK_API void nk_menu_close(struct nk_context *ctx)
  function NK_API (line 17570) | NK_API void
  function NK_API (line 17585) | NK_API void
  function NK_API (line 17601) | NK_API void
  function NK_LIB (line 17619) | NK_LIB float
  function NK_LIB (line 17639) | NK_LIB void
  function NK_LIB (line 17691) | NK_LIB void
  function NK_API (line 17714) | NK_API float
  function NK_API (line 17724) | NK_API void
  function NK_API (line 17729) | NK_API void
  function NK_API (line 17734) | NK_API void
  function NK_API (line 17760) | NK_API void
  function NK_API (line 17786) | NK_API void
  function NK_API (line 17806) | NK_API void
  function NK_API (line 17845) | NK_API void
  function NK_API (line 17872) | NK_API void
  function NK_API (line 17892) | NK_API void
  function NK_API (line 17912) | NK_API void
  function NK_API (line 17932) | NK_API void
  function NK_API (line 17983) | NK_API void
  function NK_API (line 18008) | NK_API void
  function NK_API (line 18027) | NK_API void
  function nk_rect (line 18043) | nk_rect
  function nk_rect (line 18062) | nk_rect
  function nk_vec2 (line 18081) | nk_vec2
  function nk_vec2 (line 18097) | nk_vec2
  function nk_rect (line 18113) | nk_rect
  function nk_rect (line 18129) | nk_rect
  function NK_LIB (line 18145) | NK_LIB void
  function NK_LIB (line 18153) | NK_LIB void
  function NK_LIB (line 18290) | NK_LIB void
  function NK_LIB (line 18312) | NK_LIB void
  function NK_INTERN (line 18351) | NK_INTERN int
  function NK_INTERN (line 18459) | NK_INTERN int
  function NK_API (line 18481) | NK_API int
  function NK_API (line 18487) | NK_API int
  function NK_API (line 18493) | NK_API void
  function NK_API (line 18512) | NK_API int
  function NK_API (line 18519) | NK_API int
  function NK_API (line 18526) | NK_API void
  function NK_INTERN (line 18531) | NK_INTERN int
  function NK_INTERN (line 18642) | NK_INTERN int
  function NK_API (line 18664) | NK_API int
  function NK_API (line 18671) | NK_API int
  function NK_API (line 18678) | NK_API void
  function NK_API (line 18693) | NK_API int
  function NK_API (line 18742) | NK_API void
  function NK_API (line 18804) | NK_API int
  function NK_API (line 18810) | NK_API int
  function NK_API (line 18843) | NK_API int
  function NK_API (line 18848) | NK_API void
  function NK_API (line 18853) | NK_API void
  function NK_API (line 18888) | NK_API void
  function NK_API (line 18930) | NK_API int
  function NK_API (line 18984) | NK_API void
  function nk_rect (line 19013) | nk_rect
  function nk_vec2 (line 19024) | nk_vec2
  function nk_vec2 (line 19036) | nk_vec2
  function NK_API (line 19048) | NK_API float
  function NK_API (line 19060) | NK_API float
  function NK_API (line 19072) | NK_API int
  function NK_API (line 19094) | NK_API int
  function NK_API (line 19116) | NK_API int
  function nk_widget_layout_states (line 19138) | nk_widget_layout_states
  function nk_widget_layout_states (line 19186) | nk_widget_layout_states
  function NK_API (line 19219) | NK_API void
  function NK_LIB (line 19260) | NK_LIB void
  function NK_LIB (line 19305) | NK_LIB void
  function NK_API (line 19344) | NK_API void
  function NK_API (line 19371) | NK_API void
  function NK_API (line 19399) | NK_API void
  function NK_API (line 19408) | NK_API void
  function NK_API (line 19417) | NK_API void
  function NK_API (line 19425) | NK_API void
  function NK_API (line 19433) | NK_API void
  function NK_API (line 19442) | NK_API void
  function NK_API (line 19451) | NK_API void
  function NK_API (line 19459) | NK_API void
  function NK_API (line 19467) | NK_API void
  function NK_API (line 19472) | NK_API void
  function NK_API (line 19477) | NK_API void
  function NK_API (line 19482) | NK_API void
  function NK_API (line 19488) | NK_API void
  function NK_API (line 19493) | NK_API void
  function NK_API (line 19500) | NK_API void
  function NK_API (line 19508) | NK_API void
  function NK_API (line 19515) | NK_API void
  function NK_API (line 19522) | NK_API void
  function NK_API (line 19527) | NK_API void
  function NK_API (line 19533) | NK_API void
  function NK_API (line 19538) | NK_API void
  function NK_API (line 19553) | NK_API nk_handle
  function NK_API (line 19560) | NK_API nk_handle
  function nk_image (line 19568) | nk_image
  function nk_image (line 19581) | nk_image
  function nk_image (line 19594) | nk_image
  function nk_image (line 19608) | nk_image
  function nk_image (line 19621) | nk_image
  function nk_image (line 19635) | nk_image
  function NK_API (line 19648) | NK_API int
  function NK_API (line 19654) | NK_API void
  function NK_API (line 19669) | NK_API void
  function NK_LIB (line 19694) | NK_LIB void
  function NK_LIB (line 19747) | NK_LIB int
  function nk_style_item (line 19774) | nk_style_item*
  function NK_LIB (line 19794) | NK_LIB int
  function NK_LIB (line 19819) | NK_LIB void
  function NK_LIB (line 19842) | NK_LIB int
  function NK_LIB (line 19866) | NK_LIB void
  function NK_LIB (line 19888) | NK_LIB int
  function NK_LIB (line 19911) | NK_LIB void
  function NK_LIB (line 19919) | NK_LIB int
  function NK_LIB (line 19945) | NK_LIB void
  function NK_LIB (line 19978) | NK_LIB int
  function NK_LIB (line 20010) | NK_LIB void
  function NK_LIB (line 20035) | NK_LIB int
  function NK_API (line 20071) | NK_API void
  function NK_API (line 20078) | NK_API int
  function NK_API (line 20098) | NK_API int
  function NK_API (line 20116) | NK_API int
  function NK_API (line 20143) | NK_API int
  function NK_API (line 20150) | NK_API int nk_button_label_styled(struct nk_context *ctx,
  function NK_API (line 20155) | NK_API int nk_button_label(struct nk_context *ctx, const char *title)
  function NK_API (line 20159) | NK_API int
  function NK_API (line 20194) | NK_API int
  function NK_API (line 20219) | NK_API int
  function NK_API (line 20226) | NK_API int
  function NK_API (line 20252) | NK_API int
  function NK_API (line 20259) | NK_API int
  function NK_API (line 20287) | NK_API int
  function NK_API (line 20295) | NK_API int nk_button_symbol_label(struct nk_context *ctx, enum nk_symbol...
  function NK_API (line 20300) | NK_API int nk_button_symbol_label_styled(struct nk_context *ctx,
  function NK_API (line 20306) | NK_API int
  function NK_API (line 20334) | NK_API int
  function NK_API (line 20340) | NK_API int nk_button_image_label(struct nk_context *ctx, struct nk_image...
  function NK_API (line 20345) | NK_API int nk_button_image_label_styled(struct nk_context *ctx,
  function NK_LIB (line 20361) | NK_LIB int
  function NK_LIB (line 20376) | NK_LIB void
  function NK_LIB (line 20418) | NK_LIB void
  function NK_LIB (line 20460) | NK_LIB int
  function NK_API (line 20527) | NK_API int
  function nk_check_flags_text (line 20555) | NK_API unsigned int
  function NK_API (line 20569) | NK_API int
  function NK_API (line 20581) | NK_API int
  function NK_API (line 20599) | NK_API int nk_check_label(struct nk_context *ctx, const char *label, int...
  function nk_check_flags_label (line 20603) | NK_API unsigned int nk_check_flags_label(struct nk_context *ctx, const c...
  function NK_API (line 20608) | NK_API int nk_checkbox_label(struct nk_context *ctx, const char *label, ...
  function NK_API (line 20612) | NK_API int nk_checkbox_flags_label(struct nk_context *ctx, const char *l...
  function NK_API (line 20622) | NK_API int
  function NK_API (line 20650) | NK_API int
  function NK_API (line 20662) | NK_API int
  function NK_API (line 20667) | NK_API int
  function NK_LIB (line 20682) | NK_LIB void
  function NK_LIB (line 20731) | NK_LIB int
  function NK_LIB (line 20767) | NK_LIB int
  function NK_LIB (line 20814) | NK_LIB int
  function NK_API (line 20862) | NK_API int
  function NK_API (line 20891) | NK_API int
  function NK_API (line 20920) | NK_API int
  function NK_API (line 20949) | NK_API int
  function NK_API (line 20955) | NK_API int nk_select_text(struct nk_context *ctx, const char *str, int len,
  function NK_API (line 20960) | NK_API int nk_selectable_label(struct nk_context *ctx, const char *str, ...
  function NK_API (line 20964) | NK_API int nk_selectable_image_label(struct nk_context *ctx,struct nk_im...
  function NK_API (line 20969) | NK_API int nk_select_label(struct nk_context *ctx, const char *str, nk_f...
  function NK_API (line 20973) | NK_API int nk_select_image_label(struct nk_context *ctx, struct nk_image...
  function NK_API (line 20978) | NK_API int nk_select_image_text(struct nk_context *ctx, struct nk_image ...
  function NK_API (line 20983) | NK_API int
  function NK_API (line 20989) | NK_API int
  function NK_LIB (line 21005) | NK_LIB float
  function NK_LIB (line 21047) | NK_LIB void
  function NK_LIB (line 21106) | NK_LIB float
  function NK_API (line 21195) | NK_API int
  function NK_API (line 21229) | NK_API float
  function NK_API (line 21234) | NK_API int
  function NK_API (line 21241) | NK_API int
  function NK_LIB (line 21260) | NK_LIB nk_size
  function NK_LIB (line 21290) | NK_LIB void
  function NK_LIB (line 21325) | NK_LIB nk_size
  function NK_API (line 21356) | NK_API int
  function NK_API (line 21387) | NK_API nk_size
  function NK_LIB (line 21403) | NK_LIB float
  function NK_LIB (line 21479) | NK_LIB void
  function NK_LIB (line 21513) | NK_LIB float
  function NK_LIB (line 21602) | NK_LIB float
  type nk_text_find (line 21701) | struct nk_text_find {
  type nk_text_edit_row (line 21708) | struct nk_text_edit_row {
  type nk_text_edit (line 21719) | struct nk_text_edit
  type nk_text_edit (line 21720) | struct nk_text_edit
  type nk_text_edit (line 21721) | struct nk_text_edit
  function NK_INTERN (line 21724) | NK_INTERN float
  function NK_INTERN (line 21733) | NK_INTERN void
  function NK_INTERN (line 21754) | NK_INTERN int
  function NK_LIB (line 21814) | NK_LIB void
  function NK_LIB (line 21825) | NK_LIB void
  function NK_INTERN (line 21836) | NK_INTERN void
  function NK_INTERN (line 21893) | NK_INTERN void
  function NK_API (line 21907) | NK_API void
  function NK_API (line 21915) | NK_API void
  function NK_INTERN (line 21933) | NK_INTERN void
  function NK_INTERN (line 21943) | NK_INTERN void
  function NK_INTERN (line 21954) | NK_INTERN void
  function NK_INTERN (line 21966) | NK_INTERN int
  function NK_INTERN (line 21977) | NK_INTERN int
  function NK_INTERN (line 21989) | NK_INTERN int
  function NK_INTERN (line 22002) | NK_INTERN void
  function NK_API (line 22010) | NK_API int
  function NK_API (line 22023) | NK_API int
  function NK_API (line 22048) | NK_API void
  function NK_LIB (line 22097) | NK_LIB void
  function NK_INTERN (line 22407) | NK_INTERN void
  function NK_INTERN (line 22413) | NK_INTERN void
  function NK_INTERN (line 22436) | NK_INTERN void
  function nk_text_undo_record (line 22467) | nk_text_undo_record*
  function NK_INTERN (line 22492) | NK_INTERN nk_rune*
  function NK_API (line 22513) | NK_API void
  function NK_API (line 22580) | NK_API void
  function NK_INTERN (line 22629) | NK_INTERN void
  function NK_INTERN (line 22634) | NK_INTERN void
  function NK_INTERN (line 22644) | NK_INTERN void
  function NK_LIB (line 22655) | NK_LIB void
  function NK_API (line 22675) | NK_API void
  function NK_API (line 22685) | NK_API void
  function NK_API (line 22696) | NK_API void
  function NK_API (line 22706) | NK_API void
  function NK_API (line 22713) | NK_API void
  function NK_API (line 22730) | NK_API int
  function NK_API (line 22737) | NK_API int
  function NK_API (line 22744) | NK_API int
  function NK_API (line 22752) | NK_API int
  function NK_API (line 22760) | NK_API int
  function NK_API (line 22770) | NK_API int
  function NK_API (line 22778) | NK_API int
  function NK_LIB (line 22792) | NK_LIB void
  function NK_LIB (line 22872) | NK_LIB nk_flags
  function NK_API (line 23371) | NK_API void
  function NK_API (line 23388) | NK_API void
  function NK_API (line 23400) | NK_API nk_flags
  function NK_API (line 23456) | NK_API nk_flags
  function NK_API (line 23517) | NK_API nk_flags
  function NK_LIB (line 23537) | NK_LIB void
  function NK_LIB (line 23576) | NK_LIB void
  function NK_LIB (line 23595) | NK_LIB void
  function NK_LIB (line 23629) | NK_LIB void
  function nk_property_variant (line 23805) | nk_property_variant
  function nk_property_variant (line 23816) | nk_property_variant
  function nk_property_variant (line 23827) | nk_property_variant
  function NK_LIB (line 23839) | NK_LIB void
  function NK_API (line 23939) | NK_API void
  function NK_API (line 23953) | NK_API void
  function NK_API (line 23967) | NK_API void
  function NK_API (line 23981) | NK_API int
  function NK_API (line 23995) | NK_API float
  function NK_API (line 24009) | NK_API double
  function NK_API (line 24033) | NK_API int
  function NK_API (line 24092) | NK_API int
  function NK_API (line 24099) | NK_API void
  function NK_API (line 24122) | NK_API void
  function NK_INTERN (line 24129) | NK_INTERN nk_flags
  function NK_INTERN (line 24199) | NK_INTERN nk_flags
  function NK_API (line 24245) | NK_API nk_flags
  function NK_API (line 24271) | NK_API nk_flags
  function NK_API (line 24276) | NK_API void
  function NK_API (line 24292) | NK_API void
  function NK_API (line 24317) | NK_API void
  function NK_LIB (line 24352) | NK_LIB int
  function NK_LIB (line 24404) | NK_LIB void
  function NK_LIB (line 24463) | NK_LIB int
  function NK_API (line 24509) | NK_API int
  function nk_colorf (line 24537) | nk_colorf
  function NK_INTERN (line 24554) | NK_INTERN int
  function NK_API (line 24588) | NK_API int
  function NK_API (line 24677) | NK_API int
  function NK_API (line 24682) | NK_API int
  function NK_API (line 24759) | NK_API int
  function NK_API (line 24846) | NK_API int
  function NK_API (line 24942) | NK_API int
  function NK_API (line 25019) | NK_API int
  function NK_API (line 25110) | NK_API int
  function NK_API (line 25116) | NK_API int
  function NK_API (line 25122) | NK_API int
  function NK_API (line 25127) | NK_API int
  function NK_API (line 25132) | NK_API int
  function NK_API (line 25138) | NK_API int
  function NK_API (line 25144) | NK_API int
  function NK_API (line 25150) | NK_API int
  function NK_API (line 25156) | NK_API void nk_combo_end(struct nk_context *ctx)
  function NK_API (line 25160) | NK_API void nk_combo_close(struct nk_context *ctx)
  function NK_API (line 25164) | NK_API int
  function NK_API (line 25194) | NK_API int
  function NK_API (line 25243) | NK_API int
  function NK_API (line 25249) | NK_API int
  function NK_API (line 25282) | NK_API void
  function NK_API (line 25288) | NK_API void
  function NK_API (line 25294) | NK_API void
  function NK_API (line 25301) | NK_API void
  function NK_API (line 25318) | NK_API int
  function NK_API (line 25357) | NK_API void
  function NK_API (line 25367) | NK_API void
  function NK_API (line 25403) | NK_API void
  function NK_API (line 25411) | NK_API void

FILE: src/build.py
  function print_help (line 6) | def print_help():
  function parse_files (line 31) | def parse_files(arg):
  function omit_includes (line 65) | def omit_includes(str, files):

FILE: src/nuklear.h
  type NK_INT8 (line 179) | typedef NK_INT8 nk_char;
  type NK_UINT8 (line 180) | typedef NK_UINT8 nk_uchar;
  type NK_UINT8 (line 181) | typedef NK_UINT8 nk_byte;
  type NK_INT16 (line 182) | typedef NK_INT16 nk_short;
  type NK_UINT16 (line 183) | typedef NK_UINT16 nk_ushort;
  type NK_INT32 (line 184) | typedef NK_INT32 nk_int;
  type NK_UINT32 (line 185) | typedef NK_UINT32 nk_uint;
  type NK_SIZE_TYPE (line 186) | typedef NK_SIZE_TYPE nk_size;
  type NK_POINTER_TYPE (line 187) | typedef NK_POINTER_TYPE nk_ptr;
  type nk_uint (line 189) | typedef nk_uint nk_hash;
  type nk_uint (line 190) | typedef nk_uint nk_flags;
  type nk_uint (line 191) | typedef nk_uint nk_rune;
  type nk_buffer (line 211) | struct nk_buffer
  type nk_allocator (line 212) | struct nk_allocator
  type nk_command_buffer (line 213) | struct nk_command_buffer
  type nk_draw_command (line 214) | struct nk_draw_command
  type nk_convert_config (line 215) | struct nk_convert_config
  type nk_style_item (line 216) | struct nk_style_item
  type nk_text_edit (line 217) | struct nk_text_edit
  type nk_draw_list (line 218) | struct nk_draw_list
  type nk_user_font (line 219) | struct nk_user_font
  type nk_panel (line 220) | struct nk_panel
  type nk_context (line 221) | struct nk_context
  type nk_draw_vertex_layout_element (line 222) | struct nk_draw_vertex_layout_element
  type nk_style_button (line 223) | struct nk_style_button
  type nk_style_toggle (line 224) | struct nk_style_toggle
  type nk_style_selectable (line 225) | struct nk_style_selectable
  type nk_style_slide (line 226) | struct nk_style_slide
  type nk_style_progress (line 227) | struct nk_style_progress
  type nk_style_scrollbar (line 228) | struct nk_style_scrollbar
  type nk_style_edit (line 229) | struct nk_style_edit
  type nk_style_property (line 230) | struct nk_style_property
  type nk_style_chart (line 231) | struct nk_style_chart
  type nk_style_combo (line 232) | struct nk_style_combo
  type nk_style_tab (line 233) | struct nk_style_tab
  type nk_style_window_header (line 234) | struct nk_style_window_header
  type nk_style_window (line 235) | struct nk_style_window
  type nk_color (line 238) | struct nk_color {nk_byte r,g,b,a;}
  type nk_colorf (line 239) | struct nk_colorf {float r,g,b,a;}
  type nk_vec2 (line 240) | struct nk_vec2 {float x,y;}
  type nk_vec2i (line 241) | struct nk_vec2i {short x, y;}
  type nk_rect (line 242) | struct nk_rect {float x,y,w,h;}
  type nk_recti (line 243) | struct nk_recti {short x,y,w,h;}
  type nk_handle (line 245) | typedef union {void *ptr; int id;} nk_handle;
  type nk_image (line 246) | struct nk_image {nk_handle handle;unsigned short w,h;unsigned short regi...
  type nk_cursor (line 247) | struct nk_cursor {struct nk_image img; struct nk_vec2 size, offset;}
  type nk_scroll (line 248) | struct nk_scroll {nk_uint x, y;}
  type nk_heading (line 250) | enum nk_heading         {NK_UP, NK_RIGHT, NK_DOWN, NK_LEFT}
  type nk_button_behavior (line 251) | enum nk_button_behavior {NK_BUTTON_DEFAULT, NK_BUTTON_REPEATER}
  type nk_modify (line 252) | enum nk_modify          {NK_FIXED = nk_false, NK_MODIFIABLE = nk_true}
  type nk_orientation (line 253) | enum nk_orientation     {NK_VERTICAL, NK_HORIZONTAL}
  type nk_collapse_states (line 254) | enum nk_collapse_states {NK_MINIMIZED = nk_false, NK_MAXIMIZED = nk_true}
  type nk_show_states (line 255) | enum nk_show_states     {NK_HIDDEN = nk_false, NK_SHOWN = nk_true}
  type nk_chart_type (line 256) | enum nk_chart_type      {NK_CHART_LINES, NK_CHART_COLUMN, NK_CHART_MAX}
  type nk_chart_event (line 257) | enum nk_chart_event     {NK_CHART_HOVERING = 0x01, NK_CHART_CLICKED = 0x02}
  type nk_color_format (line 258) | enum nk_color_format    {NK_RGB, NK_RGBA}
  type nk_popup_type (line 259) | enum nk_popup_type      {NK_POPUP_STATIC, NK_POPUP_DYNAMIC}
  type nk_layout_format (line 260) | enum nk_layout_format   {NK_DYNAMIC, NK_STATIC}
  type nk_tree_type (line 261) | enum nk_tree_type       {NK_TREE_NODE, NK_TREE_TAB}
  type nk_text_edit (line 265) | struct nk_text_edit
  type nk_text_edit (line 266) | struct nk_text_edit
  type nk_allocator (line 269) | struct nk_allocator {
  type nk_symbol_type (line 274) | enum nk_symbol_type {
  type nk_context (line 345) | struct nk_context
  type nk_user_font (line 345) | struct nk_user_font
  type nk_context (line 370) | struct nk_context
  type nk_user_font (line 370) | struct nk_user_font
  type nk_context (line 388) | struct nk_context
  type nk_allocator (line 388) | struct nk_allocator
  type nk_user_font (line 388) | struct nk_user_font
  type nk_context (line 407) | struct nk_context
  type nk_buffer (line 407) | struct nk_buffer
  type nk_buffer (line 407) | struct nk_buffer
  type nk_user_font (line 407) | struct nk_user_font
  type nk_context (line 421) | struct nk_context
  type nk_context (line 434) | struct nk_context
  type nk_context (line 448) | struct nk_context
  type nk_keys (line 516) | enum nk_keys {
  type nk_buttons (line 551) | enum nk_buttons {
  type nk_context (line 570) | struct nk_context
  type nk_context (line 584) | struct nk_context
  type nk_context (line 598) | struct nk_context
  type nk_keys (line 598) | enum nk_keys
  type nk_context (line 614) | struct nk_context
  type nk_buttons (line 614) | enum nk_buttons
  type nk_context (line 629) | struct nk_context
  type nk_vec2 (line 629) | struct nk_vec2
  type nk_context (line 647) | struct nk_context
  type nk_context (line 664) | struct nk_context
  type nk_context (line 680) | struct nk_context
  type nk_context (line 693) | struct nk_context
  type nk_anti_aliasing (line 923) | enum nk_anti_aliasing {NK_ANTI_ALIASING_OFF, NK_ANTI_ALIASING_ON}
  type nk_convert_result (line 924) | enum nk_convert_result {
  type nk_draw_null_texture (line 931) | struct nk_draw_null_texture {
  type nk_convert_config (line 935) | struct nk_convert_config {
  type nk_context (line 961) | struct nk_context
  type nk_context (line 976) | struct nk_context
  type nk_command (line 976) | struct nk_command
  type nk_context (line 1022) | struct nk_context
  type nk_buffer (line 1022) | struct nk_buffer
  type nk_buffer (line 1022) | struct nk_buffer
  type nk_buffer (line 1022) | struct nk_buffer
  type nk_convert_config (line 1022) | struct nk_convert_config
  type nk_context (line 1037) | struct nk_context
  type nk_buffer (line 1037) | struct nk_buffer
  type nk_context (line 1052) | struct nk_context
  type nk_buffer (line 1052) | struct nk_buffer
  type nk_draw_command (line 1068) | struct nk_draw_command
  type nk_buffer (line 1068) | struct nk_buffer
  type nk_context (line 1068) | struct nk_context
  type nk_panel_flags (line 1231) | enum nk_panel_flags {
  type nk_context (line 1262) | struct nk_context
  type nk_rect (line 1262) | struct nk_rect
  type nk_context (line 1282) | struct nk_context
  type nk_rect (line 1282) | struct nk_rect
  type nk_context (line 1295) | struct nk_context
  type nk_context (line 1311) | struct nk_context
  type nk_context (line 1327) | struct nk_context
  type nk_context (line 1343) | struct nk_context
  type nk_context (line 1359) | struct nk_context
  type nk_context (line 1375) | struct nk_context
  type nk_context (line 1391) | struct nk_context
  type nk_context (line 1409) | struct nk_context
  type nk_context (line 1428) | struct nk_context
  type nk_context (line 1447) | struct nk_context
  type nk_context (line 1466) | struct nk_context
  type nk_context (line 1484) | struct nk_context
  type nk_context (line 1503) | struct nk_context
  type nk_context (line 1519) | struct nk_context
  type nk_context (line 1534) | struct nk_context
  type nk_context (line 1549) | struct nk_context
  type nk_context (line 1564) | struct nk_context
  type nk_context (line 1578) | struct nk_context
  type nk_context (line 1592) | struct nk_context
  type nk_context (line 1606) | struct nk_context
  type nk_context (line 1619) | struct nk_context
  type nk_context (line 1634) | struct nk_context
  type nk_context (line 1647) | struct nk_context
  type nk_rect (line 1647) | struct nk_rect
  type nk_context (line 1660) | struct nk_context
  type nk_vec2 (line 1660) | struct nk_vec2
  type nk_context (line 1673) | struct nk_context
  type nk_vec2 (line 1673) | struct nk_vec2
  type nk_context (line 1685) | struct nk_context
  type nk_context (line 1701) | struct nk_context
  type nk_context (line 1713) | struct nk_context
  type nk_context (line 1726) | struct nk_context
  type nk_collapse_states (line 1726) | enum nk_collapse_states
  type nk_context (line 1740) | struct nk_context
  type nk_collapse_states (line 1740) | enum nk_collapse_states
  type nk_context (line 1753) | struct nk_context
  type nk_show_states (line 1753) | enum nk_show_states
  type nk_context (line 1767) | struct nk_context
  type nk_show_states (line 1767) | enum nk_show_states
  type nk_context (line 2056) | struct nk_context
  type nk_context (line 2067) | struct nk_context
  type nk_context (line 2080) | struct nk_context
  type nk_context (line 2094) | struct nk_context
  type nk_context (line 2109) | struct nk_context
  type nk_context (line 2125) | struct nk_context
  type nk_context (line 2139) | struct nk_context
  type nk_layout_format (line 2139) | enum nk_layout_format
  type nk_context (line 2151) | struct nk_context
  type nk_context (line 2162) | struct nk_context
  type nk_context (line 2176) | struct nk_context
  type nk_layout_format (line 2176) | enum nk_layout_format
  type nk_context (line 2188) | struct nk_context
  type nk_context (line 2200) | struct nk_context
  type nk_context (line 2212) | struct nk_context
  type nk_context (line 2224) | struct nk_context
  type nk_context (line 2235) | struct nk_context
  type nk_context (line 2249) | struct nk_context
  type nk_layout_format (line 2249) | enum nk_layout_format
  type nk_context (line 2261) | struct nk_context
  type nk_rect (line 2261) | struct nk_rect
  type nk_context (line 2272) | struct nk_context
  type nk_context (line 2285) | struct nk_context
  type nk_context (line 2299) | struct nk_context
  type nk_vec2 (line 2299) | struct nk_vec2
  type nk_context (line 2313) | struct nk_context
  type nk_vec2 (line 2313) | struct nk_vec2
  type nk_context (line 2327) | struct nk_context
  type nk_rect (line 2327) | struct nk_rect
  type nk_context (line 2341) | struct nk_context
  type nk_rect (line 2341) | struct nk_rect
  type nk_context (line 2444) | struct nk_context
  type nk_context (line 2460) | struct nk_context
  type nk_context (line 2471) | struct nk_context
  type nk_context (line 2489) | struct nk_context
  type nk_context (line 2506) | struct nk_context
  type nk_scroll (line 2506) | struct nk_scroll
  type nk_context (line 2517) | struct nk_context
  type nk_context (line 2531) | struct nk_context
  type nk_context (line 2545) | struct nk_context
  type nk_context (line 2674) | struct nk_context
  type nk_tree_type (line 2674) | enum nk_tree_type
  type nk_collapse_states (line 2674) | enum nk_collapse_states
  type nk_context (line 2738) | struct nk_context
  type nk_tree_type (line 2738) | enum nk_tree_type
  type nk_image (line 2738) | struct nk_image
  type nk_collapse_states (line 2738) | enum nk_collapse_states
  type nk_context (line 2749) | struct nk_context
  type nk_context (line 2765) | struct nk_context
  type nk_tree_type (line 2765) | enum nk_tree_type
  type nk_collapse_states (line 2765) | enum nk_collapse_states
  type nk_context (line 2782) | struct nk_context
  type nk_tree_type (line 2782) | enum nk_tree_type
  type nk_image (line 2782) | struct nk_image
  type nk_collapse_states (line 2782) | enum nk_collapse_states
  type nk_context (line 2793) | struct nk_context
  type nk_context (line 2797) | struct nk_context
  type nk_tree_type (line 2797) | enum nk_tree_type
  type nk_collapse_states (line 2797) | enum nk_collapse_states
  type nk_context (line 2798) | struct nk_context
  type nk_tree_type (line 2798) | enum nk_tree_type
  type nk_image (line 2798) | struct nk_image
  type nk_collapse_states (line 2798) | enum nk_collapse_states
  type nk_context (line 2799) | struct nk_context
  type nk_list_view (line 2806) | struct nk_list_view {
  type nk_context (line 2815) | struct nk_context
  type nk_list_view (line 2815) | struct nk_list_view
  type nk_list_view (line 2816) | struct nk_list_view
  type nk_widget_layout_states (line 2822) | enum nk_widget_layout_states {
  type nk_widget_states (line 2827) | enum nk_widget_states {
  type nk_rect (line 2837) | struct nk_rect
  type nk_context (line 2837) | struct nk_context
  type nk_rect (line 2838) | struct nk_rect
  type nk_context (line 2838) | struct nk_context
  type nk_vec2 (line 2838) | struct nk_vec2
  type nk_context (line 2839) | struct nk_context
  type nk_context (line 2840) | struct nk_context
  type nk_context (line 2841) | struct nk_context
  type nk_context (line 2842) | struct nk_context
  type nk_context (line 2843) | struct nk_context
  type nk_context (line 2844) | struct nk_context
  type nk_context (line 2845) | struct nk_context
  type nk_buttons (line 2845) | enum nk_buttons
  type nk_context (line 2846) | struct nk_context
  type nk_buttons (line 2846) | enum nk_buttons
  type nk_context (line 2847) | struct nk_context
  type nk_text_align (line 2853) | enum nk_text_align {
  type nk_text_alignment (line 2861) | enum nk_text_alignment {
  type nk_context (line 2866) | struct nk_context
  type nk_context (line 2867) | struct nk_context
  type nk_color (line 2867) | struct nk_color
  type nk_context (line 2868) | struct nk_context
  type nk_context (line 2869) | struct nk_context
  type nk_color (line 2869) | struct nk_color
  type nk_context (line 2870) | struct nk_context
  type nk_context (line 2871) | struct nk_context
  type nk_color (line 2871) | struct nk_color
  type nk_context (line 2872) | struct nk_context
  type nk_context (line 2873) | struct nk_context
  type nk_color (line 2873) | struct nk_color
  type nk_context (line 2874) | struct nk_context
  type nk_image (line 2874) | struct nk_image
  type nk_context (line 2875) | struct nk_context
  type nk_image (line 2875) | struct nk_image
  type nk_color (line 2875) | struct nk_color
  type nk_context (line 2877) | struct nk_context
  type nk_context (line 2878) | struct nk_context
  type nk_color (line 2878) | struct nk_color
  type nk_context (line 2879) | struct nk_context
  type nk_context (line 2880) | struct nk_context
  type nk_color (line 2880) | struct nk_color
  type nk_context (line 2881) | struct nk_context
  type nk_context (line 2882) | struct nk_context
  type nk_color (line 2882) | struct nk_color
  type nk_context (line 2883) | struct nk_context
  type nk_context (line 2884) | struct nk_context
  type nk_color (line 2884) | struct nk_color
  type nk_context (line 2885) | struct nk_context
  type nk_context (line 2886) | struct nk_context
  type nk_context (line 2887) | struct nk_context
  type nk_context (line 2888) | struct nk_context
  type nk_context (line 2889) | struct nk_context
  type nk_color (line 2889) | struct nk_color
  type nk_context (line 2890) | struct nk_context
  type nk_color (line 2890) | struct nk_color
  type nk_context (line 2891) | struct nk_context
  type nk_color (line 2891) | struct nk_color
  type nk_context (line 2898) | struct nk_context
  type nk_context (line 2899) | struct nk_context
  type nk_context (line 2900) | struct nk_context
  type nk_color (line 2900) | struct nk_color
  type nk_context (line 2901) | struct nk_context
  type nk_symbol_type (line 2901) | enum nk_symbol_type
  type nk_context (line 2902) | struct nk_context
  type nk_image (line 2902) | struct nk_image
  type nk_context (line 2903) | struct nk_context
  type nk_symbol_type (line 2903) | enum nk_symbol_type
  type nk_context (line 2904) | struct nk_context
  type nk_symbol_type (line 2904) | enum nk_symbol_type
  type nk_context (line 2905) | struct nk_context
  type nk_image (line 2905) | struct nk_image
  type nk_context (line 2906) | struct nk_context
  type nk_image (line 2906) | struct nk_image
  type nk_context (line 2907) | struct nk_context
  type nk_style_button (line 2907) | struct nk_style_button
  type nk_context (line 2908) | struct nk_context
  type nk_style_button (line 2908) | struct nk_style_button
  type nk_context (line 2909) | struct nk_context
  type nk_style_button (line 2909) | struct nk_style_button
  type nk_symbol_type (line 2909) | enum nk_symbol_type
  type nk_context (line 2910) | struct nk_context
  type nk_style_button (line 2910) | struct nk_style_button
  type nk_image (line 2910) | struct nk_image
  type nk_context (line 2911) | struct nk_context
  type nk_style_button (line 2911) | struct nk_style_button
  type nk_symbol_type (line 2911) | enum nk_symbol_type
  type nk_context (line 2912) | struct nk_context
  type nk_style_button (line 2912) | struct nk_style_button
  type nk_symbol_type (line 2912) | enum nk_symbol_type
  type nk_context (line 2913) | struct nk_context
  type nk_style_button (line 2913) | struct nk_style_button
  type nk_image (line 2913) | struct nk_image
  type nk_context (line 2914) | struct nk_context
  type nk_style_button (line 2914) | struct nk_style_button
  type nk_image (line 2914) | struct nk_image
  type nk_context (line 2915) | struct nk_context
  type nk_button_behavior (line 2915) | enum nk_button_behavior
  type nk_context (line 2916) | struct nk_context
  type nk_button_behavior (line 2916) | enum nk_button_behavior
  type nk_context (line 2917) | struct nk_context
  type nk_context (line 2923) | struct nk_context
  type nk_context (line 2924) | struct nk_context
  type nk_context (line 2925) | struct nk_context
  type nk_context (line 2926) | struct nk_context
  type nk_context (line 2927) | struct nk_context
  type nk_context (line 2928) | struct nk_context
  type nk_context (line 2929) | struct nk_context
  type nk_context (line 2930) | struct nk_context
  type nk_context (line 2936) | struct nk_context
  type nk_context (line 2937) | struct nk_context
  type nk_context (line 2938) | struct nk_context
  type nk_context (line 2939) | struct nk_context
  type nk_context (line 2945) | struct nk_context
  type nk_context (line 2946) | struct nk_context
  type nk_context (line 2947) | struct nk_context
  type nk_image (line 2947) | struct nk_image
  type nk_context (line 2948) | struct nk_context
  type nk_image (line 2948) | struct nk_image
  type nk_context (line 2949) | struct nk_context
  type nk_symbol_type (line 2949) | enum nk_symbol_type
  type nk_context (line 2950) | struct nk_context
  type nk_symbol_type (line 2950) | enum nk_symbol_type
  type nk_context (line 2952) | struct nk_context
  type nk_context (line 2953) | struct nk_context
  type nk_context (line 2954) | struct nk_context
  type nk_image (line 2954) | struct nk_image
  type nk_context (line 2955) | struct nk_context
  type nk_image (line 2955) | struct nk_image
  type nk_context (line 2956) | struct nk_context
  type nk_symbol_type (line 2956) | enum nk_symbol_type
  type nk_context (line 2957) | struct nk_context
  type nk_symbol_type (line 2957) | enum nk_symbol_type
  type nk_context (line 2964) | struct nk_context
  type nk_context (line 2965) | struct nk_context
  type nk_context (line 2966) | struct nk_context
  type nk_context (line 2967) | struct nk_context
  type nk_context (line 2973) | struct nk_context
  type nk_context (line 2974) | struct nk_context
  type nk_context (line 2981) | struct nk_context
  type nk_colorf (line 2981) | struct nk_colorf
  type nk_color_format (line 2981) | enum nk_color_format
  type nk_context (line 2982) | struct nk_context
  type nk_colorf (line 2982) | struct nk_colorf
  type nk_color_format (line 2982) | enum nk_color_format
  type nk_context (line 3079) | struct nk_context
  type nk_context (line 3100) | struct nk_context
  type nk_context (line 3121) | struct nk_context
  type nk_context (line 3144) | struct nk_context
  type nk_context (line 3167) | struct nk_context
  type nk_context (line 3190) | struct nk_context
  type nk_edit_flags (line 3196) | enum nk_edit_flags {
  type nk_edit_types (line 3211) | enum nk_edit_types {
  type nk_edit_events (line 3217) | enum nk_edit_events {
  type nk_context (line 3224) | struct nk_context
  type nk_context (line 3225) | struct nk_context
  type nk_context (line 3226) | struct nk_context
  type nk_text_edit (line 3226) | struct nk_text_edit
  type nk_context (line 3227) | struct nk_context
  type nk_context (line 3228) | struct nk_context
  type nk_context (line 3234) | struct nk_context
  type nk_chart_type (line 3234) | enum nk_chart_type
  type nk_context (line 3235) | struct nk_context
  type nk_chart_type (line 3235) | enum nk_chart_type
  type nk_color (line 3235) | struct nk_color
  type nk_color (line 3235) | struct nk_color
  type nk_context (line 3236) | struct nk_context
  type nk_chart_type (line 3236) | enum nk_chart_type
  type nk_context (line 3237) | struct nk_context
  type nk_chart_type (line 3237) | enum nk_chart_type
  type nk_color (line 3237) | struct nk_color
  type nk_color (line 3237) | struct nk_color
  type nk_context (line 3238) | struct nk_context
  type nk_context (line 3239) | struct nk_context
  type nk_context (line 3240) | struct nk_context
  type nk_context (line 3241) | struct nk_context
  type nk_chart_type (line 3241) | enum nk_chart_type
  type nk_context (line 3242) | struct nk_context
  type nk_chart_type (line 3242) | enum nk_chart_type
  type nk_context (line 3248) | struct nk_context
  type nk_popup_type (line 3248) | enum nk_popup_type
  type nk_rect (line 3248) | struct nk_rect
  type nk_context (line 3249) | struct nk_context
  type nk_context (line 3250) | struct nk_context
  type nk_context (line 3251) | struct nk_context
  type nk_context (line 3252) | struct nk_context
  type nk_context (line 3258) | struct nk_context
  type nk_vec2 (line 3258) | struct nk_vec2
  type nk_context (line 3259) | struct nk_context
  type nk_vec2 (line 3259) | struct nk_vec2
  type nk_context (line 3260) | struct nk_context
  type nk_vec2 (line 3260) | struct nk_vec2
  type nk_context (line 3261) | struct nk_context
  type nk_vec2 (line 3261) | struct nk_vec2
  type nk_context (line 3262) | struct nk_context
  type nk_vec2 (line 3262) | struct nk_vec2
  type nk_context (line 3263) | struct nk_context
  type nk_vec2 (line 3263) | struct nk_vec2
  type nk_context (line 3264) | struct nk_context
  type nk_vec2 (line 3264) | struct nk_vec2
  type nk_context (line 3265) | struct nk_context
  type nk_vec2 (line 3265) | struct nk_vec2
  type nk_context (line 3271) | struct nk_context
  type nk_vec2 (line 3271) | struct nk_vec2
  type nk_context (line 3272) | struct nk_context
  type nk_vec2 (line 3272) | struct nk_vec2
  type nk_context (line 3273) | struct nk_context
  type nk_color (line 3273) | struct nk_color
  type nk_vec2 (line 3273) | struct nk_vec2
  type nk_context (line 3274) | struct nk_context
  type nk_symbol_type (line 3274) | enum nk_symbol_type
  type nk_vec2 (line 3274) | struct nk_vec2
  type nk_context (line 3275) | struct nk_context
  type nk_symbol_type (line 3275) | enum nk_symbol_type
  type nk_vec2 (line 3275) | struct nk_vec2
  type nk_context (line 3276) | struct nk_context
  type nk_symbol_type (line 3276) | enum nk_symbol_type
  type nk_vec2 (line 3276) | struct nk_vec2
  type nk_context (line 3277) | struct nk_context
  type nk_image (line 3277) | struct nk_image
  type nk_vec2 (line 3277) | struct nk_vec2
  type nk_context (line 3278) | struct nk_context
  type nk_image (line 3278) | struct nk_image
  type nk_vec2 (line 3278) | struct nk_vec2
  type nk_context (line 3279) | struct nk_context
  type nk_image (line 3279) | struct nk_image
  type nk_vec2 (line 3279) | struct nk_vec2
  type nk_context (line 3280) | struct nk_context
  type nk_context (line 3281) | struct nk_context
  type nk_context (line 3282) | struct nk_context
  type nk_image (line 3282) | struct nk_image
  type nk_context (line 3283) | struct nk_context
  type nk_image (line 3283) | struct nk_image
  type nk_context (line 3284) | struct nk_context
  type nk_symbol_type (line 3284) | enum nk_symbol_type
  type nk_context (line 3285) | struct nk_context
  type nk_symbol_type (line 3285) | enum nk_symbol_type
  type nk_context (line 3286) | struct nk_context
  type nk_context (line 3287) | struct nk_context
  type nk_context (line 3293) | struct nk_context
  type nk_vec2 (line 3293) | struct nk_vec2
  type nk_rect (line 3293) | struct nk_rect
  type nk_context (line 3294) | struct nk_context
  type nk_context (line 3295) | struct nk_context
  type nk_context (line 3296) | struct nk_context
  type nk_image (line 3296) | struct nk_image
  type nk_context (line 3297) | struct nk_context
  type nk_image (line 3297) | struct nk_image
  type nk_context (line 3298) | struct nk_context
  type nk_symbol_type (line 3298) | enum nk_symbol_type
  type nk_context (line 3299) | struct nk_context
  type nk_symbol_type (line 3299) | enum nk_symbol_type
  type nk_context (line 3300) | struct nk_context
  type nk_context (line 3301) | struct nk_context
  type nk_context (line 3307) | struct nk_context
  type nk_context (line 3309) | struct nk_context
  type nk_context (line 3310) | struct nk_context
  type nk_context (line 3312) | struct nk_context
  type nk_context (line 3313) | struct nk_context
  type nk_context (line 3319) | struct nk_context
  type nk_context (line 3320) | struct nk_context
  type nk_context (line 3321) | struct nk_context
  type nk_vec2 (line 3321) | struct nk_vec2
  type nk_context (line 3322) | struct nk_context
  type nk_vec2 (line 3322) | struct nk_vec2
  type nk_context (line 3323) | struct nk_context
  type nk_image (line 3323) | struct nk_image
  type nk_vec2 (line 3323) | struct nk_vec2
  type nk_context (line 3324) | struct nk_context
  type nk_image (line 3324) | struct nk_image
  type nk_vec2 (line 3324) | struct nk_vec2
  type nk_context (line 3325) | struct nk_context
  type nk_image (line 3325) | struct nk_image
  type nk_vec2 (line 3325) | struct nk_vec2
  type nk_context (line 3326) | struct nk_context
  type nk_symbol_type (line 3326) | enum nk_symbol_type
  type nk_vec2 (line 3326) | struct nk_vec2
  type nk_context (line 3327) | struct nk_context
  type nk_symbol_type (line 3327) | enum nk_symbol_type
  type nk_vec2 (line 3327) | struct nk_vec2
  type nk_context (line 3328) | struct nk_context
  type nk_symbol_type (line 3328) | enum nk_symbol_type
  type nk_vec2 (line 3328) | struct nk_vec2
  type nk_context (line 3329) | struct nk_context
  type nk_context (line 3330) | struct nk_context
  type nk_context (line 3331) | struct nk_context
  type nk_image (line 3331) | struct nk_image
  type nk_context (line 3332) | struct nk_context
  type nk_image (line 3332) | struct nk_image
  type nk_context (line 3333) | struct nk_context
  type nk_symbol_type (line 3333) | enum nk_symbol_type
  type nk_context (line 3334) | struct nk_context
  type nk_symbol_type (line 3334) | enum nk_symbol_type
  type nk_context (line 3335) | struct nk_context
  type nk_context (line 3336) | struct nk_context
  type nk_style_colors (line 3342) | enum nk_style_colors {
  type nk_style_cursor (line 3373) | enum nk_style_cursor {
  type nk_context (line 3383) | struct nk_context
  type nk_context (line 3384) | struct nk_context
  type nk_color (line 3384) | struct nk_color
  type nk_context (line 3385) | struct nk_context
  type nk_style_cursor (line 3385) | enum nk_style_cursor
  type nk_cursor (line 3385) | struct nk_cursor
  type nk_context (line 3386) | struct nk_context
  type nk_cursor (line 3386) | struct nk_cursor
  type nk_style_colors (line 3387) | enum nk_style_colors
  type nk_context (line 3388) | struct nk_context
  type nk_user_font (line 3388) | struct nk_user_font
  type nk_context (line 3389) | struct nk_context
  type nk_style_cursor (line 3389) | enum nk_style_cursor
  type nk_context (line 3390) | struct nk_context
  type nk_context (line 3391) | struct nk_context
  type nk_context (line 3393) | struct nk_context
  type nk_user_font (line 3393) | struct nk_user_font
  type nk_context (line 3394) | struct nk_context
  type nk_context (line 3395) | struct nk_context
  type nk_vec2 (line 3395) | struct nk_vec2
  type nk_vec2 (line 3395) | struct nk_vec2
  type nk_context (line 3396) | struct nk_context
  type nk_style_item (line 3396) | struct nk_style_item
  type nk_style_item (line 3396) | struct nk_style_item
  type nk_context (line 3397) | struct nk_context
  type nk_context (line 3398) | struct nk_context
  type nk_color (line 3398) | struct nk_color
  type nk_color (line 3398) | struct nk_color
  type nk_context (line 3400) | struct nk_context
  type nk_context (line 3401) | struct nk_context
  type nk_context (line 3402) | struct nk_context
  type nk_context (line 3403) | struct nk_context
  type nk_context (line 3404) | struct nk_context
  type nk_context (line 3405) | struct nk_context
  type nk_colorf (line 3416) | struct nk_colorf
  type nk_colorf (line 3425) | struct nk_colorf
  type nk_colorf (line 3430) | struct nk_colorf
  type nk_colorf (line 3431) | struct nk_colorf
  type nk_color (line 3446) | struct nk_color
  type nk_color (line 3447) | struct nk_color
  type nk_color (line 3448) | struct nk_color
  type nk_color (line 3449) | struct nk_color
  type nk_color (line 3450) | struct nk_color
  type nk_color (line 3452) | struct nk_color
  type nk_color (line 3453) | struct nk_color
  type nk_color (line 3454) | struct nk_color
  type nk_color (line 3456) | struct nk_color
  type nk_color (line 3457) | struct nk_color
  type nk_color (line 3458) | struct nk_color
  type nk_color (line 3459) | struct nk_color
  type nk_color (line 3460) | struct nk_color
  type nk_color (line 3461) | struct nk_color
  type nk_color (line 3463) | struct nk_color
  type nk_color (line 3464) | struct nk_color
  type nk_color (line 3465) | struct nk_color
  type nk_color (line 3466) | struct nk_color
  type nk_color (line 3467) | struct nk_color
  type nk_color (line 3468) | struct nk_color
  type nk_image (line 3479) | struct nk_image
  type nk_rect (line 3480) | struct nk_rect
  type nk_rect (line 3481) | struct nk_rect
  type nk_rect (line 3482) | struct nk_rect
  type nk_vec2 (line 3489) | struct nk_vec2
  type nk_rect (line 3489) | struct nk_rect
  type nk_heading (line 3489) | enum nk_heading
  type nk_vec2 (line 3499) | struct nk_vec2
  type nk_vec2 (line 3499) | struct nk_vec2
  type nk_rect (line 3502) | struct nk_rect
  type nk_rect (line 3503) | struct nk_rect
  type nk_user_font_glyph (line 3676) | struct nk_user_font_glyph
  type nk_user_font_glyph (line 3679) | struct nk_user_font_glyph
  type nk_user_font_glyph (line 3683) | struct nk_user_font_glyph {
  type nk_user_font (line 3695) | struct nk_user_font {
  type nk_font_coord_type (line 3711) | enum nk_font_coord_type {
  type nk_font (line 3716) | struct nk_font
  type nk_baked_font (line 3717) | struct nk_baked_font {
  type nk_font_config (line 3730) | struct nk_font_config {
  type nk_font_glyph (line 3766) | struct nk_font_glyph {
  type nk_font (line 3773) | struct nk_font {
  type nk_font_atlas_format (line 3785) | enum nk_font_atlas_format {
  type nk_font_atlas (line 3790) | struct nk_font_atlas {
  type nk_font_atlas (line 3816) | struct nk_font_atlas
  type nk_font_atlas (line 3818) | struct nk_font_atlas
  type nk_allocator (line 3818) | struct nk_allocator
  type nk_font_atlas (line 3819) | struct nk_font_atlas
  type nk_allocator (line 3819) | struct nk_allocator
  type nk_allocator (line 3819) | struct nk_allocator
  type nk_font_atlas (line 3820) | struct nk_font_atlas
  type nk_font_atlas (line 3822) | struct nk_font_atlas
  type nk_font_config (line 3822) | struct nk_font_config
  type nk_font_atlas (line 3824) | struct nk_font_atlas
  type nk_font_config (line 3824) | struct nk_font_config
  type nk_font_atlas (line 3826) | struct nk_font_atlas
  type nk_font_config (line 3826) | struct nk_font_config
  type nk_font_atlas (line 3828) | struct nk_font_atlas
  type nk_font_config (line 3828) | struct nk_font_config
  type nk_font_atlas (line 3830) | struct nk_font_atlas
  type nk_font_config (line 3830) | struct nk_font_config
  type nk_font_atlas (line 3831) | struct nk_font_atlas
  type nk_font_config (line 3831) | struct nk_font_config
  type nk_font_atlas (line 3832) | struct nk_font_atlas
  type nk_font_atlas_format (line 3832) | enum nk_font_atlas_format
  type nk_font_atlas (line 3833) | struct nk_font_atlas
  type nk_draw_null_texture (line 3833) | struct nk_draw_null_texture
  type nk_font (line 3834) | struct nk_font
  type nk_font_atlas (line 3835) | struct nk_font_atlas
  type nk_font_atlas (line 3836) | struct nk_font_atlas
  type nk_memory_status (line 3873) | struct nk_memory_status {
  type nk_allocation_type (line 3882) | enum nk_allocation_type {
  type nk_buffer_allocation_type (line 3887) | enum nk_buffer_allocation_type {
  type nk_buffer_marker (line 3893) | struct nk_buffer_marker {
  type nk_memory (line 3898) | struct nk_memory {void *ptr;nk_size size;}
  type nk_buffer (line 3899) | struct nk_buffer {
  type nk_buffer (line 3921) | struct nk_buffer
  type nk_buffer (line 3923) | struct nk_buffer
  type nk_allocator (line 3923) | struct nk_allocator
  type nk_buffer (line 3924) | struct nk_buffer
  type nk_memory_status (line 3925) | struct nk_memory_status
  type nk_buffer (line 3925) | struct nk_buffer
  type nk_buffer (line 3926) | struct nk_buffer
  type nk_buffer_allocation_type (line 3926) | enum nk_buffer_allocation_type
  type nk_buffer (line 3927) | struct nk_buffer
  type nk_buffer_allocation_type (line 3927) | enum nk_buffer_allocation_type
  type nk_buffer (line 3928) | struct nk_buffer
  type nk_buffer_allocation_type (line 3928) | enum nk_buffer_allocation_type
  type nk_buffer (line 3929) | struct nk_buffer
  type nk_buffer (line 3930) | struct nk_buffer
  type nk_buffer (line 3931) | struct nk_buffer
  type nk_buffer (line 3932) | struct nk_buffer
  type nk_buffer (line 3933) | struct nk_buffer
  type nk_str (line 3945) | struct nk_str {
  type nk_str (line 3951) | struct nk_str
  type nk_str (line 3953) | struct nk_str
  type nk_allocator (line 3953) | struct nk_allocator
  type nk_str (line 3954) | struct nk_str
  type nk_str (line 3955) | struct nk_str
  type nk_str (line 3956) | struct nk_str
  type nk_str (line 3958) | struct nk_str
  type nk_str (line 3959) | struct nk_str
  type nk_str (line 3960) | struct nk_str
  type nk_str (line 3961) | struct nk_str
  type nk_str (line 3962) | struct nk_str
  type nk_str (line 3963) | struct nk_str
  type nk_str (line 3965) | struct nk_str
  type nk_str (line 3966) | struct nk_str
  type nk_str (line 3968) | struct nk_str
  type nk_str (line 3969) | struct nk_str
  type nk_str (line 3970) | struct nk_str
  type nk_str (line 3971) | struct nk_str
  type nk_str (line 3972) | struct nk_str
  type nk_str (line 3973) | struct nk_str
  type nk_str (line 3975) | struct nk_str
  type nk_str (line 3976) | struct nk_str
  type nk_str (line 3977) | struct nk_str
  type nk_str (line 3978) | struct nk_str
  type nk_str (line 3980) | struct nk_str
  type nk_str (line 3981) | struct nk_str
  type nk_str (line 3982) | struct nk_str
  type nk_str (line 3983) | struct nk_str
  type nk_str (line 3984) | struct nk_str
  type nk_str (line 3986) | struct nk_str
  type nk_str (line 3987) | struct nk_str
  type nk_str (line 3988) | struct nk_str
  type nk_str (line 3989) | struct nk_str
  type nk_text_edit (line 4027) | struct nk_text_edit
  type nk_clipboard (line 4028) | struct nk_clipboard {
  type nk_text_undo_record (line 4034) | struct nk_text_undo_record {
  type nk_text_undo_state (line 4041) | struct nk_text_undo_state {
  type nk_text_edit_type (line 4050) | enum nk_text_edit_type {
  type nk_text_edit_mode (line 4055) | enum nk_text_edit_mode {
  type nk_text_edit (line 4061) | struct nk_text_edit {
  type nk_text_edit (line 4082) | struct nk_text_edit
  type nk_text_edit (line 4083) | struct nk_text_edit
  type nk_text_edit (line 4084) | struct nk_text_edit
  type nk_text_edit (line 4085) | struct nk_text_edit
  type nk_text_edit (line 4086) | struct nk_text_edit
  type nk_text_edit (line 4087) | struct nk_text_edit
  type nk_text_edit (line 4088) | struct nk_text_edit
  type nk_text_edit (line 4092) | struct nk_text_edit
  type nk_text_edit (line 4094) | struct nk_text_edit
  type nk_allocator (line 4094) | struct nk_allocator
  type nk_text_edit (line 4095) | struct nk_text_edit
  type nk_text_edit (line 4096) | struct nk_text_edit
  type nk_text_edit (line 4097) | struct nk_text_edit
  type nk_text_edit (line 4098) | struct nk_text_edit
  type nk_text_edit (line 4099) | struct nk_text_edit
  type nk_text_edit (line 4100) | struct nk_text_edit
  type nk_text_edit (line 4101) | struct nk_text_edit
  type nk_text_edit (line 4102) | struct nk_text_edit
  type nk_text_edit (line 4103) | struct nk_text_edit
  type nk_text_edit (line 4104) | struct nk_text_edit
  type nk_command_type (line 4155) | enum nk_command_type {
  type nk_command (line 4178) | struct nk_command {
  type nk_command_scissor (line 4186) | struct nk_command_scissor {
  type nk_command_line (line 4192) | struct nk_command_line {
  type nk_command_curve (line 4200) | struct nk_command_curve {
  type nk_command_rect (line 4209) | struct nk_command_rect {
  type nk_command_rect_filled (line 4218) | struct nk_command_rect_filled {
  type nk_command_rect_multi_color (line 4226) | struct nk_command_rect_multi_color {
  type nk_command_triangle (line 4236) | struct nk_command_triangle {
  type nk_command_triangle_filled (line 4245) | struct nk_command_triangle_filled {
  type nk_command_circle (line 4253) | struct nk_command_circle {
  type nk_command_circle_filled (line 4261) | struct nk_command_circle_filled {
  type nk_command_arc (line 4268) | struct nk_command_arc {
  type nk_command_arc_filled (line 4277) | struct nk_command_arc_filled {
  type nk_command_polygon (line 4285) | struct nk_command_polygon {
  type nk_command_polygon_filled (line 4293) | struct nk_command_polygon_filled {
  type nk_command_polyline (line 4300) | struct nk_command_polyline {
  type nk_command_image (line 4308) | struct nk_command_image {
  type nk_command_custom (line 4318) | struct nk_command_custom {
  type nk_command_text (line 4326) | struct nk_command_text {
  type nk_command_clipping (line 4338) | enum nk_command_clipping {
  type nk_command_buffer (line 4343) | struct nk_command_buffer {
  type nk_command_buffer (line 4352) | struct nk_command_buffer
  type nk_color (line 4352) | struct nk_color
  type nk_command_buffer (line 4353) | struct nk_command_buffer
  type nk_color (line 4353) | struct nk_color
  type nk_command_buffer (line 4354) | struct nk_command_buffer
  type nk_rect (line 4354) | struct nk_rect
  type nk_color (line 4354) | struct nk_color
  type nk_command_buffer (line 4355) | struct nk_command_buffer
  type nk_rect (line 4355) | struct nk_rect
  type nk_color (line 4355) | struct nk_color
  type nk_command_buffer (line 4356) | struct nk_command_buffer
  type nk_color (line 4356) | struct nk_color
  type nk_command_buffer (line 4357) | struct nk_command_buffer
  type nk_color (line 4357) | struct nk_color
  type nk_command_buffer (line 4358) | struct nk_command_buffer
  type nk_color (line 4358) | struct nk_color
  type nk_command_buffer (line 4359) | struct nk_command_buffer
  type nk_color (line 4359) | struct nk_color
  type nk_command_buffer (line 4362) | struct nk_command_buffer
  type nk_rect (line 4362) | struct nk_rect
  type nk_color (line 4362) | struct nk_color
  type nk_command_buffer (line 4363) | struct nk_command_buffer
  type nk_rect (line 4363) | struct nk_rect
  type nk_color (line 4363) | struct nk_color
  type nk_color (line 4363) | struct nk_color
  ty
Condensed preview — 134 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,305K chars).
[
  {
    "path": ".gitattributes",
    "chars": 75,
    "preview": "# Github language settings\n*.h linguist-language=c\n*.c linguist-language=c\n"
  },
  {
    "path": ".gitignore",
    "chars": 88,
    "preview": "demo/*/*.exe\ndemo/*/*.obj\ndemo/*/bin/*\nexample/bin/*\ndocs/xml\ndocs/build\ndocs/src\n*.tmp\n"
  },
  {
    "path": ".gitmodules",
    "chars": 0,
    "preview": ""
  },
  {
    "path": ".travis.yml",
    "chars": 360,
    "preview": "language: c\nsudo: required\ndist: xenial\n\nos:\n  - linux\n\ncompiler:\n  - gcc\n  - clang\n\nbefore_install:\n  - if [ $TRAVIS_OS"
  },
  {
    "path": "Readme.md",
    "chars": 8788,
    "preview": "# Nuklear\n\n## ALL DEVELOPMENT MOVED ELSEWHERE\n\nDear visitor,\n\nthis repository, issue tracker, etc. is abandoned in favor"
  },
  {
    "path": "demo/allegro5/KeyboardHandleriOS.h",
    "chars": 207,
    "preview": "#import <UIKit/UIKit.h>\n\n#include <allegro5/allegro.h>\n\n@interface KeyboardHandleriOS : UIView <UIKeyInput>\n-(void)setCu"
  },
  {
    "path": "demo/allegro5/KeyboardHandleriOS.m",
    "chars": 3723,
    "preview": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#endif\n#import \"KeyboardHandleriOS.h\"\n#include <allegro5/allegro.h>\n#include <al"
  },
  {
    "path": "demo/allegro5/Makefile",
    "chars": 432,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\n# TODO: Handle Windows "
  },
  {
    "path": "demo/allegro5/Readme.md",
    "chars": 3257,
    "preview": "# Allegro v5 nuklear backend\n\nThis backend provides support for [Allegro version 5](http://liballeg.org/). It works on o"
  },
  {
    "path": "demo/allegro5/main.c",
    "chars": 5149,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#i"
  },
  {
    "path": "demo/allegro5/nuklear_allegro5.h",
    "chars": 18458,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/calculator.c",
    "chars": 2168,
    "preview": "/* nuklear - v1.00 - public domain */\nstatic void\ncalculator(struct nk_context *ctx)\n{\n    if (nk_begin(ctx, \"Calculator"
  },
  {
    "path": "demo/d3d11/build.bat",
    "chars": 620,
    "preview": "@echo off\n\nrem This will use VS2015 for compiler\ncall \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall."
  },
  {
    "path": "demo/d3d11/main.c",
    "chars": 10516,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#define COBJMACROS\n#define WIN32_LEAN_AND_MEAN\n#include <windows.h>\n#include <d3d"
  },
  {
    "path": "demo/d3d11/nuklear_d3d11.h",
    "chars": 21192,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/d3d11/nuklear_d3d11.hlsl",
    "chars": 631,
    "preview": "//\ncbuffer buffer0 : register(b0)\n{\n  float4x4 ProjectionMatrix;\n};\n\nsampler sampler0 : register(s0);\nTexture2D<float4> "
  },
  {
    "path": "demo/d3d11/nuklear_d3d11_pixel_shader.h",
    "chars": 5556,
    "preview": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n// Input signature:\n//\n// Name                 Inde"
  },
  {
    "path": "demo/d3d11/nuklear_d3d11_vertex_shader.h",
    "chars": 11267,
    "preview": "#if 0\n//\n// Generated by Microsoft (R) D3D Shader Disassembler\n//\n//\n// Input signature:\n//\n// Name                 Inde"
  },
  {
    "path": "demo/d3d9/build.bat",
    "chars": 251,
    "preview": "@echo off\n\nrem This will use VS2015 for compiler\ncall \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall."
  },
  {
    "path": "demo/d3d9/main.c",
    "chars": 11473,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#define COBJMACROS\n#define WIN32_LEAN_AND_MEAN\n#include <windows.h>\n#include <d3d"
  },
  {
    "path": "demo/d3d9/nuklear_d3d9.h",
    "chars": 16130,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/gdi/build.bat",
    "chars": 237,
    "preview": "@echo off\n\nrem This will use VS2015 for compiler\ncall \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall."
  },
  {
    "path": "demo/gdi/main.c",
    "chars": 5048,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#define WIN32_LEAN_AND_MEAN\n#include <windows.h>\n#include <stdio.h>\n#include <str"
  },
  {
    "path": "demo/gdi/nuklear_gdi.h",
    "chars": 25956,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/gdip/build.bat",
    "chars": 228,
    "preview": "@echo off\n\ncall \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86\n\ncl /nologo /W3 /O2 /fp:fast "
  },
  {
    "path": "demo/gdip/main.c",
    "chars": 5038,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#define WIN32_LEAN_AND_MEAN\n#include <windows.h>\n#include <stdio.h>\n#include <str"
  },
  {
    "path": "demo/gdip/nuklear_gdip.h",
    "chars": 35003,
    "preview": "/*\n * Nuklear - 1.40.8 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Micha"
  },
  {
    "path": "demo/glfw_opengl2/Makefile",
    "chars": 503,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nifeq ($(OS),Windows_NT)"
  },
  {
    "path": "demo/glfw_opengl2/main.c",
    "chars": 6318,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/glfw_opengl2/nuklear_glfw_gl2.h",
    "chars": 14075,
    "preview": "/*\n * Nuklear - v1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Mich"
  },
  {
    "path": "demo/glfw_opengl3/Makefile",
    "chars": 565,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nifeq ($(OS),Windows_NT)"
  },
  {
    "path": "demo/glfw_opengl3/main.c",
    "chars": 6912,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#i"
  },
  {
    "path": "demo/glfw_opengl3/nuklear_glfw_gl3.h",
    "chars": 18188,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/glfw_opengl4/Makefile",
    "chars": 565,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nifeq ($(OS),Windows_NT)"
  },
  {
    "path": "demo/glfw_opengl4/main.c",
    "chars": 7834,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#i"
  },
  {
    "path": "demo/glfw_opengl4/nuklear_glfw_gl4.h",
    "chars": 23162,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/node_editor.c",
    "chars": 13927,
    "preview": "/* nuklear - v1.00 - public domain */\n/* This is a simple node editor just to show a simple implementation and that\n * i"
  },
  {
    "path": "demo/overview.c",
    "chars": 64827,
    "preview": "static int\noverview(struct nk_context *ctx)\n{\n    /* window flags */\n    static int show_menu = nk_true;\n    static int "
  },
  {
    "path": "demo/sdl_opengl2/Makefile",
    "chars": 442,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nifeq ($(OS),Windows_NT)"
  },
  {
    "path": "demo/sdl_opengl2/main.c",
    "chars": 6843,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#i"
  },
  {
    "path": "demo/sdl_opengl2/nuklear_sdl_gl2.h",
    "chars": 12413,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Micha"
  },
  {
    "path": "demo/sdl_opengl3/Makefile",
    "chars": 465,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nifeq ($(OS),Windows_NT)"
  },
  {
    "path": "demo/sdl_opengl3/main.c",
    "chars": 7281,
    "preview": "/* nuklear - 1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#i"
  },
  {
    "path": "demo/sdl_opengl3/nuklear_sdl_gl3.h",
    "chars": 15874,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/sdl_opengles2/Makefile",
    "chars": 590,
    "preview": "# Install\nBIN = demo\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nUNAME_S := $(shell unam"
  },
  {
    "path": "demo/sdl_opengles2/Readme.md",
    "chars": 1276,
    "preview": "OpenGL ES\n=========\n\nOpenGL ES (OpenGL for Embedded Systems) it is a subset of OpenGL aimed to be simple and fast. It is"
  },
  {
    "path": "demo/sdl_opengles2/main.c",
    "chars": 6850,
    "preview": "/* nuklear - 1.40.8 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#i"
  },
  {
    "path": "demo/sdl_opengles2/nuklear_sdl_gles2.h",
    "chars": 15895,
    "preview": "/*\n * Nuklear - 1.40.8 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Micha"
  },
  {
    "path": "demo/sfml_opengl2/Makefile",
    "chars": 817,
    "preview": "# Install\nCC = g++\nBIN = demo\n\n# Flags\nCFLAGS += -s -O2\n\nSRC = main.cpp\nOBJ = $(SRC:.cpp=.o)\n\nifeq ($(OS),Windows_NT)\n\t#"
  },
  {
    "path": "demo/sfml_opengl2/Readme.md",
    "chars": 476,
    "preview": "# SFML 2.4 nuklear backend\n\nThis backend provides support for [SFML 2.4](http://www.sfml-dev.org). It will work on all p"
  },
  {
    "path": "demo/sfml_opengl2/main.cpp",
    "chars": 6317,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/sfml_opengl2/nuklear_sfml_gl2.h",
    "chars": 13114,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/sfml_opengl3/Makefile",
    "chars": 1013,
    "preview": "# Install\nCC = g++\nBIN = demo\n\n# Flags\nCFLAGS += -s -O2\n\nSRC = main.cpp\nOBJ = $(SRC:.cpp=.o)\n\nifeq ($(OS),Windows_NT)\n\t#"
  },
  {
    "path": "demo/sfml_opengl3/Readme.md",
    "chars": 27723,
    "preview": "# SFML 2.4 nuklear backend\n\nThis backend provides support for [SFML 2.4](http://www.sfml-dev.org). It will work on all p"
  },
  {
    "path": "demo/sfml_opengl3/main.cpp",
    "chars": 6539,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/sfml_opengl3/nuklear_sfml_gl3.h",
    "chars": 16972,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/style.c",
    "chars": 7866,
    "preview": "enum theme {THEME_BLACK, THEME_WHITE, THEME_RED, THEME_BLUE, THEME_DARK};\n\nstatic void\nset_style(struct nk_context *ctx,"
  },
  {
    "path": "demo/x11/Makefile",
    "chars": 223,
    "preview": "# Install\nBIN = zahnrad\n\n# Flags\nCFLAGS += -std=c89 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\n$(BIN):\n\t@mkdir -p b"
  },
  {
    "path": "demo/x11/main.c",
    "chars": 6211,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <assert.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/x11/nuklear_xlib.h",
    "chars": 35343,
    "preview": "/*\n * Nuklear - v1.40.8 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Mich"
  },
  {
    "path": "demo/x11_opengl2/Makefile",
    "chars": 336,
    "preview": "# Install\nBIN = demo\n\n# Compiler\nCC = clang\nDCC = gcc\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SR"
  },
  {
    "path": "demo/x11_opengl2/main.c",
    "chars": 12779,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/x11_opengl2/nuklear_xlib_gl2.h",
    "chars": 13847,
    "preview": "/*\n * Nuklear - 1.32.0 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha"
  },
  {
    "path": "demo/x11_opengl3/Makefile",
    "chars": 336,
    "preview": "# Install\nBIN = demo\n\n# Compiler\nCC = clang\nDCC = gcc\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SR"
  },
  {
    "path": "demo/x11_opengl3/main.c",
    "chars": 12695,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/x11_opengl3/nuklear_xlib_gl3.h",
    "chars": 27779,
    "preview": "/*\n * Nuklear - v1.17 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2016 by Micha "
  },
  {
    "path": "demo/x11_rawfb/Makefile",
    "chars": 253,
    "preview": "# Install\nBIN = zahnrad\n\n# Flags\nCFLAGS += -std=c89 -pedantic -O2 -Wunused\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\n$(BIN):\n\t@m"
  },
  {
    "path": "demo/x11_rawfb/main.c",
    "chars": 7918,
    "preview": "/*\n * MIT License\n *\n * Copyright (c) 2016-2017 Patrick Rudolph <siro@das-labor.org>\n *\n * Permission is hereby granted,"
  },
  {
    "path": "demo/x11_rawfb/nuklear_rawfb.h",
    "chars": 37167,
    "preview": "/*\n * MIT License\n *\n * Copyright (c) 2016-2017 Patrick Rudolph <siro@das-labor.org>\n *\n * Permission is hereby granted,"
  },
  {
    "path": "demo/x11_rawfb/nuklear_xlib.h",
    "chars": 12235,
    "preview": "/*\n * MIT License\n *\n * Copyright (c) 2016-2017 Patrick Rudolph <siro@das-labor.org>\n *\n * Permission is hereby granted,"
  },
  {
    "path": "demo/x11_xft/Makefile",
    "chars": 398,
    "preview": "# Install\nBIN = zahnrad\n\n# Flags\nCFLAGS += -std=c89 -pedantic -O2\n\nSRC = main.c\nOBJ = $(SRC:.c=.o)\n\nLDFLAGS += -lX11 -lm"
  },
  {
    "path": "demo/x11_xft/main.c",
    "chars": 6298,
    "preview": "/* nuklear - v1.32.0 - public domain */\n#include <assert.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#"
  },
  {
    "path": "demo/x11_xft/nuklear_xlib.h",
    "chars": 37211,
    "preview": "/*\n * Nuklear - v1.40.8 - public domain\n * no warrenty implied; use at your own risk.\n * authored from 2015-2017 by Mich"
  },
  {
    "path": "doc/Makefile",
    "chars": 311,
    "preview": "# Install\nBIN = doc\n\n# Flags\nCFLAGS += -std=c99 -pedantic -O2\n\nSRC = stddoc.c\nOBJ = $(SRC:.c=.o)\n\nifeq ($(OS),Windows_NT"
  },
  {
    "path": "doc/build.sh",
    "chars": 50,
    "preview": "#!/bin/sh\ncat ../nuklear.h|./doc > nuklear.html\n\n\n"
  },
  {
    "path": "doc/nuklear.html",
    "chars": 157447,
    "preview": "<meta charset='utf-8' emacsmode='-*- markdown -*-'>\n<link rel='stylesheet' href='https://casual-effects.com/markdeep/lat"
  },
  {
    "path": "doc/stddoc.c",
    "chars": 4955,
    "preview": "/// ## About\n/// - _stddoc.c_ is a tiny documentation generator for 60 programming languages.\n/// - This page sample was"
  },
  {
    "path": "example/Makefile",
    "chars": 924,
    "preview": "# Flags\nCFLAGS += -std=c99 -pedantic -O2\nLIBS :=\n\nifeq ($(OS),Windows_NT)\nBIN := $(BIN).exe\n\tLIBS := -lglfw3 -lopengl32 "
  },
  {
    "path": "example/canvas.c",
    "chars": 18346,
    "preview": "/* nuklear - v1.05 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#in"
  },
  {
    "path": "example/extended.c",
    "chars": 34754,
    "preview": "/* nuklear - v1.05 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#in"
  },
  {
    "path": "example/file_browser.c",
    "chars": 31060,
    "preview": "/* nuklear - v1.05 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#in"
  },
  {
    "path": "example/skinning.c",
    "chars": 38109,
    "preview": "/* nuklear - v1.05 - public domain */\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <stdarg.h>\n#in"
  },
  {
    "path": "example/stb_image.h",
    "chars": 222898,
    "preview": "/* stb_image - v2.08 - public domain image loader - http://nothings.org/stb_image.h\n                                    "
  },
  {
    "path": "nuklear.h",
    "chars": 990738,
    "preview": "/*\n/// # Nuklear\n/// ![](https://cloud.githubusercontent.com/assets/8057201/11761525/ae06f0ca-a0c6-11e5-819d-5610b25f6ef"
  },
  {
    "path": "package.json",
    "chars": 185,
    "preview": "{\n  \"name\": \"nuklear\",\n  \"version\": \"4.01.3\",\n  \"repo\": \"vurtun/nuklear\",\n  \"description\": \"A small ANSI C gui toolkit\","
  },
  {
    "path": "src/CHANGELOG",
    "chars": 22596,
    "preview": "/// ## Changelog\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none\n/// [date][x.yy.zz]-[description]\n/// -[date]: date on which "
  },
  {
    "path": "src/CREDITS",
    "chars": 2403,
    "preview": "/// ## Gallery\n/// ![Figure [blue]: Feature overview with blue color styling](https://cloud.githubusercontent.com/assets"
  },
  {
    "path": "src/HEADER",
    "chars": 12513,
    "preview": "/// # Nuklear\n/// ![](https://cloud.githubusercontent.com/assets/8057201/11761525/ae06f0ca-a0c6-11e5-819d-5610b25f6ef4.g"
  },
  {
    "path": "src/LICENSE",
    "chars": 3042,
    "preview": "/// ## License\n/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~none\n///    --------------------------------------------------------"
  },
  {
    "path": "src/Readme.md",
    "chars": 3895,
    "preview": "File Packer:\n------------\n- [Click to generate nuklear.h](http://apoorvaj.io/single-header-packer.html?macro=NK&pre=http"
  },
  {
    "path": "src/build.py",
    "chars": 3852,
    "preview": "\nimport fnmatch\nimport os.path\nimport sys\n\ndef print_help():\n    print(\n\"\"\"usage: python single_header_packer.py --macro"
  },
  {
    "path": "src/nuklear.h",
    "chars": 253218,
    "preview": "#ifndef NK_NUKLEAR_H_\n#define NK_NUKLEAR_H_\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n/*\n * =============================="
  },
  {
    "path": "src/nuklear_buffer.c",
    "chars": 7875,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_button.c",
    "chars": 23295,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_chart.c",
    "chars": 10797,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_color.c",
    "chars": 10599,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_color_picker.c",
    "chars": 6830,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_combo.c",
    "chars": 28890,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_context.c",
    "chars": 10198,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_contextual.c",
    "chars": 7223,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_draw.c",
    "chars": 15545,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ==============================================================\n *"
  },
  {
    "path": "src/nuklear_edit.c",
    "chars": 30611,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_font.c",
    "chars": 135015,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n#ifdef NK_INCLUDE_FONT_BAKING\n/* -----------------------------------"
  },
  {
    "path": "src/nuklear_group.c",
    "chars": 7334,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_image.c",
    "chars": 3314,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_input.c",
    "chars": 7224,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_internal.h",
    "chars": 21722,
    "preview": "#ifndef NK_INTERNAL_H\n#define NK_INTERNAL_H\n\n#ifndef NK_POOL_DEFAULT_CAPACITY\n#define NK_POOL_DEFAULT_CAPACITY 16\n#endif"
  },
  {
    "path": "src/nuklear_layout.c",
    "chars": 24003,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_list_view.c",
    "chars": 2517,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_math.c",
    "chars": 7796,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_menu.c",
    "chars": 9847,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_page_element.c",
    "chars": 2026,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_panel.c",
    "chars": 25487,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_pool.c",
    "chars": 1987,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_popup.c",
    "chars": 7733,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_progress.c",
    "chars": 5145,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_property.c",
    "chars": 18343,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_scrollbar.c",
    "chars": 11559,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_selectable.c",
    "chars": 11358,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_slider.c",
    "chars": 8920,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_string.c",
    "chars": 12158,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_style.c",
    "chars": 31909,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_table.c",
    "chars": 2458,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_text.c",
    "chars": 8689,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_text_editor.c",
    "chars": 35361,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_toggle.c",
    "chars": 10743,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_tooltip.c",
    "chars": 2992,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_tree.c",
    "chars": 12513,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_utf8.c",
    "chars": 3560,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_util.c",
    "chars": 33023,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_vertex.c",
    "chars": 53460,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_widget.c",
    "chars": 7334,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/nuklear_window.c",
    "chars": 21358,
    "preview": "#include \"nuklear.h\"\n#include \"nuklear_internal.h\"\n\n/* ===============================================================\n "
  },
  {
    "path": "src/paq.sh",
    "chars": 816,
    "preview": "#!/bin/sh\npython build.py --macro NK --intro HEADER --pub nuklear.h --priv nuklear_internal.h,nuklear_math.c,nuklear_uti"
  }
]

About this extraction

This page contains the full source code of the vurtun/nuklear GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 134 files (3.1 MB), approximately 808.2k tokens, and a symbol index with 5013 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!