Skip to content

Commit

Permalink
Merge pull request #605 from b-aaz/master
Browse files Browse the repository at this point in the history
Added missing includes to the platform headers .
  • Loading branch information
RobLoach authored Jan 22, 2024
2 parents f7fedf0 + fb47487 commit e410e39
Show file tree
Hide file tree
Showing 24 changed files with 52 additions and 6 deletions.
1 change: 1 addition & 0 deletions demo/allegro5/nuklear_allegro5.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ NK_API void nk_allegro5_font_set_font(NkAllegro5Font *font);
* ===============================================================
*/
#ifdef NK_ALLEGRO5_IMPLEMENTATION
#include <stdio.h>

#ifndef NK_ALLEGRO5_TEXT_MAX
#define NK_ALLEGRO5_TEXT_MAX 256
Expand Down
1 change: 1 addition & 0 deletions demo/d3d11/nuklear_d3d11.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ NK_API void nk_d3d11_shutdown(void);
#define COBJMACROS
#include <d3d11.h>

#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <float.h>
Expand Down
1 change: 1 addition & 0 deletions demo/d3d12/nuklear_d3d12.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ NK_API void nk_d3d12_shutdown(void);
#define COBJMACROS
#include <d3d12.h>

#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <float.h>
Expand Down
1 change: 1 addition & 0 deletions demo/d3d9/nuklear_d3d9.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ NK_API void nk_d3d9_shutdown(void);
#define COBJMACROS
#include <d3d9.h>

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

Expand Down
2 changes: 1 addition & 1 deletion demo/gdi/nuklear_gdi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NK_API void nk_gdi_set_font(GdiFont *font);
* ===============================================================
*/
#ifdef NK_GDI_IMPLEMENTATION

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

Expand Down
2 changes: 1 addition & 1 deletion demo/gdi_native_nuklear/nuklear_gdi.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ NK_API void nk_gdi_set_font(nk_gdi_ctx gdi, GdiFont* font);
* ===============================================================
*/
#ifdef NK_GDI_IMPLEMENTATION

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

Expand Down
2 changes: 2 additions & 0 deletions demo/glfw_opengl2/nuklear_glfw_gl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ NK_API void nk_gflw3_scroll_callback(GLFWwindow *win, double xof
* ===============================================================
*/
#ifdef NK_GLFW_GL2_IMPLEMENTATION
#include <string.h>
#include <stdlib.h>

#ifndef NK_GLFW_TEXT_MAX
#define NK_GLFW_TEXT_MAX 256
Expand Down
3 changes: 3 additions & 0 deletions demo/glfw_opengl3/nuklear_glfw_gl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ NK_API void nk_glfw3_mouse_button_callback(GLFWwindow *win, int
* ===============================================================
*/
#ifdef NK_GLFW_GL3_IMPLEMENTATION
#include <string.h>
#include <stdlib.h>
#include <assert.h>

#ifndef NK_GLFW_DOUBLE_CLICK_LO
#define NK_GLFW_DOUBLE_CLICK_LO 0.02
Expand Down
3 changes: 3 additions & 0 deletions demo/glfw_opengl4/nuklear_glfw_gl4.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ NK_API void nk_glfw3_destroy_texture(int tex_index);
*/
#ifdef NK_GLFW_GL4_IMPLEMENTATION
#undef NK_GLFW_GL4_IMPLEMENTATION
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

#ifndef NK_GLFW_TEXT_MAX
#define NK_GLFW_TEXT_MAX 256
Expand Down
2 changes: 2 additions & 0 deletions demo/glfw_vulkan/nuklear_glfw_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ unsigned char nuklearshaders_nuklear_frag_spv[] = {
};
unsigned int nuklearshaders_nuklear_frag_spv_len = 860;

#include <assert.h>
#include <stddef.h>
#include <string.h>
#define GLFW_INCLUDE_VULKAN
Expand Down Expand Up @@ -294,6 +295,7 @@ NK_API void nk_glfw3_mouse_button_callback(GLFWwindow *win, int button,
*/
#ifdef NK_GLFW_VULKAN_IMPLEMENTATION
#undef NK_GLFW_VULKAN_IMPLEMENTATION
#include <stdlib.h>

#ifndef NK_GLFW_TEXT_MAX
#define NK_GLFW_TEXT_MAX 256
Expand Down
2 changes: 2 additions & 0 deletions demo/glfw_vulkan/src/nuklear_glfw_vulkan.in.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ NK_API void nk_glfw3_mouse_button_callback(GLFWwindow *win, int button,
*/
#ifdef NK_GLFW_VULKAN_IMPLEMENTATION
#undef NK_GLFW_VULKAN_IMPLEMENTATION
#include <assert.h>
#include <stdlib.h>

#ifndef NK_GLFW_TEXT_MAX
#define NK_GLFW_TEXT_MAX 256
Expand Down
4 changes: 4 additions & 0 deletions demo/sdl2surface_rawfb/sdl2surface_rawfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ void nk_sdlsurface_shutdown(struct sdlsurface_context *sdlsurfa
* ===============================================================
*/
#ifdef NK_SDLSURFACE_IMPLEMENTATION
#include <string.h>
#include <stdlib.h>
#include <assert.h>

struct sdlsurface_context {
struct nk_context ctx;
struct nk_rect scissors;
Expand Down
2 changes: 2 additions & 0 deletions demo/sdl_opengl2/nuklear_sdl_gl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ NK_API void nk_sdl_shutdown(void);
* ===============================================================
*/
#ifdef NK_SDL_GL2_IMPLEMENTATION
#include <string.h>
#include <stdlib.h>

struct nk_sdl_device {
struct nk_buffer cmds;
Expand Down
2 changes: 2 additions & 0 deletions demo/sdl_opengl3/nuklear_sdl_gl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ NK_API void nk_sdl_device_create(void);
*/
#ifdef NK_SDL_GL3_IMPLEMENTATION

#include <stdlib.h>
#include <assert.h>
#include <string.h>

struct nk_sdl_device {
Expand Down
3 changes: 2 additions & 1 deletion demo/sdl_opengles2/nuklear_sdl_gles2.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ NK_API void nk_sdl_device_create(void);
* ===============================================================
*/
#ifdef NK_SDL_GLES2_IMPLEMENTATION

#include <stdlib.h>
#include <assert.h>
#include <string.h>

struct nk_sdl_device {
Expand Down
4 changes: 2 additions & 2 deletions demo/sdl_renderer/nuklear_sdl_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ NK_API void nk_sdl_shutdown(void);
* ===============================================================
*/
#ifdef NK_SDL_RENDERER_IMPLEMENTATION

#include <strings.h>
#include <string.h>
#include <stdlib.h>

struct nk_sdl_device {
struct nk_buffer cmds;
Expand Down
2 changes: 2 additions & 0 deletions demo/sfml_opengl2/nuklear_sfml_gl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ NK_API void nk_sfml_shutdown(void);
* ===============================================================
*/
#ifdef NK_SFML_GL2_IMPLEMENTATION
#include <cstdlib>
#include <cstring>

struct nk_sfml_device {
struct nk_buffer cmds;
Expand Down
3 changes: 2 additions & 1 deletion demo/sfml_opengl3/nuklear_sfml_gl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ NK_API void nk_sfml_device_destroy(void);
* ===============================================================
*/
#ifdef NK_SFML_GL3_IMPLEMENTATION

#include <cstring>
#include <assert.h>
#include <string>

struct nk_sfml_device {
Expand Down
4 changes: 4 additions & 0 deletions demo/wayland_rawfb/nuklear_raw_wayland.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef NK_RAW_WAYLAND_H_
#define NK_RAW_WAYLAND_H_

#include <assert.h>
#include <stdio.h>
#include <string.h>

#define WIDTH 800
#define HEIGHT 600

Expand Down
3 changes: 3 additions & 0 deletions demo/x11/nuklear_xlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ NK_API void nk_xfont_del(Display *dpy, XFont *font);
* ===============================================================
*/
#ifdef NK_XLIB_IMPLEMENTATION
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
Expand Down
1 change: 1 addition & 0 deletions demo/x11_opengl3/nuklear_xlib_gl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ NK_API void nk_x11_device_destroy(void);
* ===============================================================
*/
#ifdef NK_XLIB_GL3_IMPLEMENTATION
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
4 changes: 4 additions & 0 deletions demo/x11_rawfb/nuklear_rawfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ NK_API void nk_rawfb_resize_fb(struct rawfb_context *rawfb, voi
* ===============================================================
*/
#ifdef NK_RAWFB_IMPLEMENTATION
#include <string.h>
#include <stdlib.h>
#include <assert.h>

struct rawfb_image {
void *pixels;
int w, h, pitch;
Expand Down
3 changes: 3 additions & 0 deletions demo/x11_rawfb/nuklear_xlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ NK_API void nk_xlib_shutdown(void);
* ===============================================================
*/
#ifdef NK_XLIBSHM_IMPLEMENTATION
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
Expand Down
3 changes: 3 additions & 0 deletions demo/x11_xft/nuklear_xlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ NK_API void nk_xfont_del(Display *dpy, XFont *font);
* ===============================================================
*/
#ifdef NK_XLIB_IMPLEMENTATION
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
Expand Down

0 comments on commit e410e39

Please sign in to comment.