2017-01-29 00:03:23 +00:00
|
|
|
/*
|
|
|
|
4coder_default_bidings.cpp - Supplies the default bindings used for default 4coder behavior.
|
|
|
|
*/
|
2016-03-15 14:12:06 +00:00
|
|
|
|
2016-03-21 22:27:27 +00:00
|
|
|
// TOP
|
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
#if !defined(FCODER_DEFAULT_BINDINGS_CPP)
|
|
|
|
#define FCODER_DEFAULT_BINDINGS_CPP
|
2016-06-28 22:58:50 +00:00
|
|
|
|
2016-05-06 16:45:50 +00:00
|
|
|
#include "4coder_default_include.cpp"
|
2020-01-15 18:14:17 +00:00
|
|
|
|
|
|
|
// NOTE(allen): Users can declare their own managed IDs here.
|
|
|
|
|
2020-05-01 12:26:22 +00:00
|
|
|
#if !defined(META_PASS)
|
2020-01-15 18:14:17 +00:00
|
|
|
#include "generated/managed_id_metadata.cpp"
|
2020-05-01 12:26:22 +00:00
|
|
|
#endif
|
2019-10-14 22:57:47 +00:00
|
|
|
|
2019-10-10 22:57:02 +00:00
|
|
|
void
|
|
|
|
custom_layer_init(Application_Links *app){
|
|
|
|
Thread_Context *tctx = get_thread_context(app);
|
2019-12-03 19:35:41 +00:00
|
|
|
|
|
|
|
// NOTE(allen): setup for default framework
|
2020-02-15 20:33:18 +00:00
|
|
|
default_framework_init(app);
|
2019-12-03 19:35:41 +00:00
|
|
|
|
|
|
|
// NOTE(allen): default hooks and command maps
|
|
|
|
set_all_default_hooks(app);
|
|
|
|
mapping_init(tctx, &framework_mapping);
|
2020-10-23 02:36:17 +00:00
|
|
|
String_ID global_map_id = vars_save_string_lit("keys_global");
|
|
|
|
String_ID file_map_id = vars_save_string_lit("keys_file");
|
|
|
|
String_ID code_map_id = vars_save_string_lit("keys_code");
|
2020-05-02 01:31:28 +00:00
|
|
|
#if OS_MAC
|
2020-10-23 02:36:17 +00:00
|
|
|
setup_mac_mapping(&framework_mapping, global_map_id, file_map_id, code_map_id);
|
2020-05-02 01:31:28 +00:00
|
|
|
#else
|
2020-10-23 02:36:17 +00:00
|
|
|
setup_default_mapping(&framework_mapping, global_map_id, file_map_id, code_map_id);
|
2020-05-02 01:31:28 +00:00
|
|
|
#endif
|
2020-10-23 02:36:17 +00:00
|
|
|
setup_essential_mapping(&framework_mapping, global_map_id, file_map_id, code_map_id);
|
2016-03-15 14:12:06 +00:00
|
|
|
}
|
2019-10-14 22:57:47 +00:00
|
|
|
|
2016-06-28 22:58:50 +00:00
|
|
|
#endif //FCODER_DEFAULT_BINDINGS
|
2016-05-12 02:15:54 +00:00
|
|
|
|
2016-03-21 22:27:27 +00:00
|
|
|
// BOTTOM
|
2017-01-29 00:03:23 +00:00
|
|
|
|