Skip to content

Commit

Permalink
more default fields values
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Feb 3, 2024
1 parent e5a7ebd commit 348dd50
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 199 deletions.
40 changes: 20 additions & 20 deletions src/sokol/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ struct Event {
}
extern(C)
struct Range {
const(void)* ptr;
const(void)* ptr = null;
size_t size = 0;
}
extern(C)
Expand All @@ -223,9 +223,9 @@ struct IconDesc {
}
extern(C)
struct Allocator {
extern(C) void* function(size_t, void*) alloc_fn;
extern(C) void function(void*, void*) free_fn;
void* user_data;
extern(C) void* function(size_t, void*) alloc_fn = null;
extern(C) void function(void*, void*) free_fn = null;
void* user_data = null;
}
enum LogItem {
Ok,
Expand Down Expand Up @@ -329,28 +329,28 @@ enum LogItem {
}
extern(C)
struct Logger {
extern(C) void function(scope const(char)*, uint, uint, scope const(char)*, uint, scope const(char)*, void*) func;
void* user_data;
extern(C) void function(scope const(char)*, uint, uint, scope const(char)*, uint, scope const(char)*, void*) func = null;
void* user_data = null;
}
extern(C)
struct Desc {
extern(C) void function() init_cb;
extern(C) void function() frame_cb;
extern(C) void function() cleanup_cb;
extern(C) void function(const Event *) event_cb;
void* user_data;
extern(C) void function(void*) init_userdata_cb;
extern(C) void function(void*) frame_userdata_cb;
extern(C) void function(void*) cleanup_userdata_cb;
extern(C) void function(const Event *, void*) event_userdata_cb;
extern(C) void function() init_cb = null;
extern(C) void function() frame_cb = null;
extern(C) void function() cleanup_cb = null;
extern(C) void function(const Event *) event_cb = null;
void* user_data = null;
extern(C) void function(void*) init_userdata_cb = null;
extern(C) void function(void*) frame_userdata_cb = null;
extern(C) void function(void*) cleanup_userdata_cb = null;
extern(C) void function(const Event *, void*) event_userdata_cb = null;
int width = 0;
int height = 0;
int sample_count = 0;
int swap_interval = 0;
bool high_dpi = false;
bool fullscreen = false;
bool alpha = false;
const(char)* window_title;
const(char)* window_title = null;
bool enable_clipboard = false;
int clipboard_size = 0;
bool enable_dragndrop = false;
Expand All @@ -364,7 +364,7 @@ struct Desc {
bool win32_console_utf8 = false;
bool win32_console_create = false;
bool win32_console_attach = false;
const(char)* html5_canvas_name;
const(char)* html5_canvas_name = null;
bool html5_canvas_resize = false;
bool html5_preserve_drawing_buffer = false;
bool html5_premultiplied_alpha = false;
Expand All @@ -388,14 +388,14 @@ struct Html5FetchResponse {
int file_index = 0;
Range data;
Range buffer;
void* user_data;
void* user_data = null;
}
extern(C)
struct Html5FetchRequest {
int dropped_file_index = 0;
extern(C) void function(const Html5FetchResponse *) callback;
extern(C) void function(const Html5FetchResponse *) callback = null;
Range buffer;
void* user_data;
void* user_data = null;
}
enum MouseCursor {
Default = 0,
Expand Down
16 changes: 8 additions & 8 deletions src/sokol/audio.d
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ enum LogItem {
}
extern(C)
struct Logger {
extern(C) void function(scope const(char)*, uint, uint, scope const(char)*, uint, scope const(char)*, void*) func;
void* user_data;
extern(C) void function(scope const(char)*, uint, uint, scope const(char)*, uint, scope const(char)*, void*) func = null;
void* user_data = null;
}
extern(C)
struct Allocator {
extern(C) void* function(size_t, void*) alloc_fn;
extern(C) void function(void*, void*) free_fn;
void* user_data;
extern(C) void* function(size_t, void*) alloc_fn = null;
extern(C) void function(void*, void*) free_fn = null;
void* user_data = null;
}
extern(C)
struct Desc {
Expand All @@ -58,9 +58,9 @@ struct Desc {
int buffer_frames = 0;
int packet_frames = 0;
int num_packets = 0;
extern(C) void function(float *, int, int) stream_cb;
extern(C) void function(float *, int, int, void*) stream_userdata_cb;
void* user_data;
extern(C) void function(float *, int, int) stream_cb = null;
extern(C) void function(float *, int, int, void*) stream_userdata_cb = null;
void* user_data = null;
Allocator allocator;
Logger logger;
}
Expand Down
12 changes: 6 additions & 6 deletions src/sokol/debugtext.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ enum LogItem {
}
extern(C)
struct Logger {
extern(C) void function(scope const(char)*, uint, uint, scope const(char)*, uint, scope const(char)*, void*) func;
void* user_data;
extern(C) void function(scope const(char)*, uint, uint, scope const(char)*, uint, scope const(char)*, void*) func = null;
void* user_data = null;
}
extern(C)
struct Context {
uint id = 0;
}
extern(C)
struct Range {
const(void)* ptr;
const(void)* ptr = null;
size_t size = 0;
}
extern(C)
Expand All @@ -44,9 +44,9 @@ struct ContextDesc {
}
extern(C)
struct Allocator {
extern(C) void* function(size_t, void*) alloc_fn;
extern(C) void function(void*, void*) free_fn;
void* user_data;
extern(C) void* function(size_t, void*) alloc_fn = null;
extern(C) void function(void*, void*) free_fn = null;
void* user_data = null;
}
extern(C)
struct Desc {
Expand Down
Loading

0 comments on commit 348dd50

Please sign in to comment.