Просмотр исходного кода

Merge branch 'master' of https://github.com/vurtun/gui

vurtun 9 лет назад
Родитель
Сommit
a2aaedbed0
3 измененных файлов с 23 добавлено и 0 удалено
  1. 7 0
      demo/d3d11/main.c
  2. 8 0
      demo/gdi/main.c
  3. 8 0
      demo/gdip/main.c

+ 7 - 0
demo/d3d11/main.c

@@ -5,6 +5,8 @@
 #include <d3d11.h>
 #include <stdio.h>
 #include <string.h>
+#include <limits.h>
+#include <time.h>
 
 #define WINDOW_WIDTH 800
 #define WINDOW_HEIGHT 600
@@ -32,6 +34,11 @@
 /* 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. */
+ #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])
+
 /*#include "../style.c"*/
 /*#include "../calculator.c"*/
 /*#include "../overview.c"*/

+ 8 - 0
demo/gdi/main.c

@@ -3,11 +3,14 @@
 #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_DEFAULT_ALLOCATOR
 #include "nuklear_gdi.h"
 #include "nuklear_gdi.c"
@@ -20,6 +23,11 @@
 /* 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. */
+#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])
+
 /*#include "../style.c"*/
 /*#include "../calculator.c"*/
 /*#include "../overview.c"*/

+ 8 - 0
demo/gdip/main.c

@@ -3,11 +3,14 @@
 #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_DEFAULT_ALLOCATOR
 #include "nuklear_gdip.h"
 #include "nuklear_gdip.c"
@@ -20,6 +23,11 @@
 /* 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. */
+ #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])
+
 /*#include "../style.c"*/
 /*#include "../calculator.c"*/
 /*#include "../overview.c"*/