4coder/4ed_system_api.cpp

295 lines
8.5 KiB
C++
Raw Normal View History

/*
* Mr. 4th Dimention - Allen Webster
*
* 02.10.2019
*
* System API definition program.
*
*/
// TOP
2019-10-03 23:00:31 +00:00
#include "4ed_api_definition_main.cpp"
function API_Definition*
define_api(Arena *arena){
API_Definition *api = begin_api(arena, "system");
{
API_Call *call = api_call(arena, api, "get_path", "String_Const_u8");
api_param(arena, call, "Arena*", "arena");
api_param(arena, call, "System_Path_Code", "path_code");
}
{
API_Call *call = api_call(arena, api, "get_canonical", "String_Const_u8");
api_param(arena, call, "Arena*", "arena");
api_param(arena, call, "String_Const_u8", "name");
}
{
API_Call *call = api_call(arena, api, "get_file_list", "File_List");
api_param(arena, call, "Arena*", "arena");
api_param(arena, call, "String_Const_u8", "directory");
}
{
API_Call *call = api_call(arena, api, "quick_file_attributes", "File_Attributes");
api_param(arena, call, "Arena*", "scratch");
api_param(arena, call, "String_Const_u8", "file_name");
}
{
API_Call *call = api_call(arena, api, "load_handle", "b32");
api_param(arena, call, "Arena*", "scratch");
api_param(arena, call, "char*", "file_name");
api_param(arena, call, "Plat_Handle*", "out");
}
{
API_Call *call = api_call(arena, api, "load_attributes", "File_Attributes");
api_param(arena, call, "Plat_Handle", "handle");
}
{
API_Call *call = api_call(arena, api, "load_file", "b32");
api_param(arena, call, "Plat_Handle", "handle");
api_param(arena, call, "char*", "buffer");
api_param(arena, call, "u32", "size");
}
{
API_Call *call = api_call(arena, api, "load_close", "b32");
api_param(arena, call, "Plat_Handle", "handle");
}
{
API_Call *call = api_call(arena, api, "save_file", "File_Attributes");
api_param(arena, call, "Arena*", "scratch");
api_param(arena, call, "char*", "file_name");
api_param(arena, call, "String_Const_u8", "data");
}
{
API_Call *call = api_call(arena, api, "load_library", "b32");
api_param(arena, call, "Arena*", "scratch");
api_param(arena, call, "String_Const_u8", "file_name");
api_param(arena, call, "System_Library*", "out");
}
{
API_Call *call = api_call(arena, api, "release_library", "b32");
api_param(arena, call, "System_Library", "handle");
}
{
API_Call *call = api_call(arena, api, "get_proc", "Void_Func*");
api_param(arena, call, "System_Library", "handle");
api_param(arena, call, "char*", "proc_name");
}
{
2019-12-13 00:03:21 +00:00
api_call(arena, api, "now_time", "u64");
}
{
2019-12-13 00:03:21 +00:00
api_call(arena, api, "wake_up_timer_create", "Plat_Handle");
}
{
API_Call *call = api_call(arena, api, "wake_up_timer_release", "void");
api_param(arena, call, "Plat_Handle", "handle");
}
{
API_Call *call = api_call(arena, api, "wake_up_timer_set", "void");
api_param(arena, call, "Plat_Handle", "handle");
api_param(arena, call, "u32", "time_milliseconds");
}
{
API_Call *call = api_call(arena, api, "signal_step", "void");
api_param(arena, call, "u32", "code");
}
{
API_Call *call = api_call(arena, api, "sleep", "void");
api_param(arena, call, "u64", "microseconds");
}
2020-02-08 00:50:35 +00:00
{
API_Call *call = api_call(arena, api, "get_clipboard", "String_Const_u8");
api_param(arena, call, "Arena*", "arena");
}
{
API_Call *call = api_call(arena, api, "post_clipboard", "void");
api_param(arena, call, "String_Const_u8", "str");
}
2020-02-08 00:50:35 +00:00
{
API_Call *call = api_call(arena, api, "set_clipboard_catch_all", "void");
api_param(arena, call, "b32", "enabled");
}
{
api_call(arena, api, "get_clipboard_catch_all", "b32");
}
{
API_Call *call = api_call(arena, api, "cli_call", "b32");
api_param(arena, call, "Arena*", "scratch");
api_param(arena, call, "char*", "path");
api_param(arena, call, "char*", "script");
api_param(arena, call, "CLI_Handles*", "cli_out");
}
{
API_Call *call = api_call(arena, api, "cli_begin_update", "void");
api_param(arena, call, "CLI_Handles*", "cli");
}
{
API_Call *call = api_call(arena, api, "cli_update_step", "b32");
api_param(arena, call, "CLI_Handles*", "cli");
api_param(arena, call, "char*", "dest");
api_param(arena, call, "u32", "max");
api_param(arena, call, "u32*", "amount");
}
{
API_Call *call = api_call(arena, api, "cli_end_update", "b32");
api_param(arena, call, "CLI_Handles*", "cli");
}
{
API_Call *call = api_call(arena, api, "open_color_picker", "void");
api_param(arena, call, "Color_Picker*", "picker");
}
{
2019-12-13 00:03:21 +00:00
api_call(arena, api, "get_screen_scale_factor", "f32");
}
{
API_Call *call = api_call(arena, api, "thread_launch", "System_Thread");
api_param(arena, call, "Thread_Function*", "proc");
api_param(arena, call, "void*", "ptr");
}
{
API_Call *call = api_call(arena, api, "thread_join", "void");
api_param(arena, call, "System_Thread", "thread");
}
{
API_Call *call = api_call(arena, api, "thread_free", "void");
api_param(arena, call, "System_Thread", "thread");
}
{
2020-02-08 00:50:35 +00:00
api_call(arena, api, "thread_get_id", "i32");
}
2019-10-21 02:02:58 +00:00
{
API_Call *call = api_call(arena, api, "acquire_global_frame_mutex", "void");
api_param(arena, call, "Thread_Context*", "tctx");
}
{
API_Call *call = api_call(arena, api, "release_global_frame_mutex", "void");
api_param(arena, call, "Thread_Context*", "tctx");
}
{
2020-02-08 00:50:35 +00:00
api_call(arena, api, "mutex_make", "System_Mutex");
}
{
API_Call *call = api_call(arena, api, "mutex_acquire", "void");
api_param(arena, call, "System_Mutex", "mutex");
}
{
API_Call *call = api_call(arena, api, "mutex_release", "void");
api_param(arena, call, "System_Mutex", "mutex");
}
{
API_Call *call = api_call(arena, api, "mutex_free", "void");
api_param(arena, call, "System_Mutex", "mutex");
}
{
2020-02-08 00:50:35 +00:00
api_call(arena, api, "condition_variable_make",
"System_Condition_Variable");
}
{
API_Call *call = api_call(arena, api, "condition_variable_wait", "void");
api_param(arena, call, "System_Condition_Variable", "cv");
api_param(arena, call, "System_Mutex", "mutex");
}
{
API_Call *call = api_call(arena, api, "condition_variable_signal", "void");
api_param(arena, call, "System_Condition_Variable", "cv");
}
{
API_Call *call = api_call(arena, api, "condition_variable_free", "void");
api_param(arena, call, "System_Condition_Variable", "cv");
}
{
API_Call *call = api_call(arena, api, "memory_allocate", "void*");
api_param(arena, call, "u64", "size");
api_param(arena, call, "String_Const_u8", "location");
}
{
API_Call *call = api_call(arena, api, "memory_set_protection", "b32");
api_param(arena, call, "void*", "ptr");
api_param(arena, call, "u64", "size");
api_param(arena, call, "u32", "flags");
}
{
API_Call *call = api_call(arena, api, "memory_free", "void");
api_param(arena, call, "void*", "ptr");
api_param(arena, call, "u64", "size");
}
{
API_Call *call = api_call(arena, api, "memory_annotation", "Memory_Annotation");
api_param(arena, call, "Arena*", "arena");
}
{
API_Call *call = api_call(arena, api, "show_mouse_cursor", "void");
api_param(arena, call, "i32", "show");
}
{
API_Call *call = api_call(arena, api, "set_fullscreen", "b32");
api_param(arena, call, "b32", "full_screen");
}
{
2020-02-08 00:50:35 +00:00
api_call(arena, api, "is_fullscreen", "b32");
}
{
API_Call *call = api_call(arena, api, "get_keyboard_modifiers", "Input_Modifier_Set");
api_param(arena, call, "Arena*", "arena");
}
return(api);
}
2019-10-08 01:11:40 +00:00
function Generated_Group
get_api_group(void){
return(GeneratedGroup_Custom);
}
// BOTTOM