Merge branch 'master' of https://bitbucket.org/4coder/4coder
This commit is contained in:
commit
362d1ce70c
|
@ -76,7 +76,7 @@ HOOK_SIG(my_file_settings){
|
||||||
|
|
||||||
push_parameter(app, cmd_context, par_lex_as_cpp_file, treat_as_code);
|
push_parameter(app, cmd_context, par_lex_as_cpp_file, treat_as_code);
|
||||||
push_parameter(app, cmd_context, par_wrap_lines, !treat_as_code);
|
push_parameter(app, cmd_context, par_wrap_lines, !treat_as_code);
|
||||||
push_parameter(app, cmd_context, par_key_mapid, (treat_as_code)?(my_code_map):(mapid_file));
|
push_parameter(app, cmd_context, par_key_mapid, (treat_as_code)?((int)my_code_map):((int)mapid_file));
|
||||||
exec_command(cmd_context, cmdid_set_settings);
|
exec_command(cmd_context, cmdid_set_settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
#include "4ed_keyboard.cpp"
|
#include "4ed_keyboard.cpp"
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
keycode_init(Display* dpy, Key_Codes *codes){
|
keycode_init(Display* dpy){
|
||||||
set_dynamic_key_names(codes);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// NOTE(inso): these are for XInput, currently not used.
|
// NOTE(inso): these are for XInput, currently not used.
|
||||||
|
|
||||||
|
@ -46,18 +44,18 @@ keycode_init(Display* dpy, Key_Codes *codes){
|
||||||
KeySym sym;
|
KeySym sym;
|
||||||
Code code;
|
Code code;
|
||||||
} sym_table[] = {
|
} sym_table[] = {
|
||||||
{ XK_BackSpace, codes->back },
|
{ XK_BackSpace, key_back },
|
||||||
{ XK_Delete, codes->del },
|
{ XK_Delete, key_del },
|
||||||
{ XK_Up, codes->up },
|
{ XK_Up, key_up },
|
||||||
{ XK_Down, codes->down },
|
{ XK_Down, key_down },
|
||||||
{ XK_Left, codes->left },
|
{ XK_Left, key_left },
|
||||||
{ XK_Right, codes->right },
|
{ XK_Right, key_right },
|
||||||
{ XK_Insert, codes->insert },
|
{ XK_Insert, key_insert },
|
||||||
{ XK_Home, codes->home },
|
{ XK_Home, key_home },
|
||||||
{ XK_End, codes->end },
|
{ XK_End, key_end },
|
||||||
{ XK_Page_Up, codes->page_up },
|
{ XK_Page_Up, key_page_up },
|
||||||
{ XK_Page_Down, codes->page_down },
|
{ XK_Page_Down, key_page_down },
|
||||||
{ XK_Escape, codes->esc }
|
{ XK_Escape, key_esc }
|
||||||
};
|
};
|
||||||
|
|
||||||
const int table_size = sizeof(sym_table) / sizeof(struct SymMapping);
|
const int table_size = sizeof(sym_table) / sizeof(struct SymMapping);
|
||||||
|
|
|
@ -22,7 +22,12 @@
|
||||||
#include "4ed_mem.cpp"
|
#include "4ed_mem.cpp"
|
||||||
#include "4ed_math.cpp"
|
#include "4ed_math.cpp"
|
||||||
|
|
||||||
#include "4coder_custom.h"
|
#include "4coder_custom.cpp"
|
||||||
|
|
||||||
|
#undef exec_command
|
||||||
|
#undef exec_command_keep_stack
|
||||||
|
#undef clear_parameters
|
||||||
|
|
||||||
#include "4ed_system.h"
|
#include "4ed_system.h"
|
||||||
#include "4ed_rendering.h"
|
#include "4ed_rendering.h"
|
||||||
#include "4ed.h"
|
#include "4ed.h"
|
||||||
|
@ -101,7 +106,6 @@ struct Linux_Vars{
|
||||||
XIM input_method;
|
XIM input_method;
|
||||||
XIMStyle input_style;
|
XIMStyle input_style;
|
||||||
XIC input_context;
|
XIC input_context;
|
||||||
Key_Codes key_codes;
|
|
||||||
|
|
||||||
Key_Input_Data key_data;
|
Key_Input_Data key_data;
|
||||||
Mouse_State mouse_data;
|
Mouse_State mouse_data;
|
||||||
|
@ -1630,7 +1634,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
linuxvars.XDisplay = XOpenDisplay(0);
|
linuxvars.XDisplay = XOpenDisplay(0);
|
||||||
|
|
||||||
keycode_init(linuxvars.XDisplay, &linuxvars.key_codes);
|
keycode_init(linuxvars.XDisplay);
|
||||||
|
|
||||||
#ifdef FRED_SUPER
|
#ifdef FRED_SUPER
|
||||||
char *custom_file_default = "4coder_custom.so";
|
char *custom_file_default = "4coder_custom.so";
|
||||||
|
@ -1651,6 +1655,10 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (linuxvars.custom_api.get_bindings == 0){
|
||||||
|
linuxvars.custom_api.get_bindings = get_bindings;
|
||||||
|
}
|
||||||
|
|
||||||
Thread_Context background[4] = {};
|
Thread_Context background[4] = {};
|
||||||
linuxvars.groups[BACKGROUND_THREADS].threads = background;
|
linuxvars.groups[BACKGROUND_THREADS].threads = background;
|
||||||
linuxvars.groups[BACKGROUND_THREADS].count = ArrayCount(background);
|
linuxvars.groups[BACKGROUND_THREADS].count = ArrayCount(background);
|
||||||
|
@ -1796,8 +1804,7 @@ main(int argc, char **argv)
|
||||||
XSetWMProtocols(linuxvars.XDisplay, linuxvars.XWindow, &WM_DELETE_WINDOW, 1);
|
XSetWMProtocols(linuxvars.XDisplay, linuxvars.XWindow, &WM_DELETE_WINDOW, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
linuxvars.app.init(linuxvars.system, &linuxvars.target,
|
linuxvars.app.init(linuxvars.system, &linuxvars.target, &memory_vars, &exchange_vars,
|
||||||
&memory_vars, &exchange_vars, &linuxvars.key_codes,
|
|
||||||
linuxvars.clipboard_contents, current_directory,
|
linuxvars.clipboard_contents, current_directory,
|
||||||
linuxvars.custom_api);
|
linuxvars.custom_api);
|
||||||
|
|
||||||
|
@ -1929,7 +1936,7 @@ main(int argc, char **argv)
|
||||||
case MappingNotify: {
|
case MappingNotify: {
|
||||||
if(Event.xmapping.request == MappingModifier || Event.xmapping.request == MappingKeyboard){
|
if(Event.xmapping.request == MappingModifier || Event.xmapping.request == MappingKeyboard){
|
||||||
XRefreshKeyboardMapping(&Event.xmapping);
|
XRefreshKeyboardMapping(&Event.xmapping);
|
||||||
keycode_init(linuxvars.XDisplay, &linuxvars.key_codes);
|
keycode_init(linuxvars.XDisplay);
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
|
||||||
|
@ -2057,7 +2064,6 @@ main(int argc, char **argv)
|
||||||
u64 start_time = system_time();
|
u64 start_time = system_time();
|
||||||
|
|
||||||
linuxvars.app.step(linuxvars.system,
|
linuxvars.app.step(linuxvars.system,
|
||||||
&linuxvars.key_codes,
|
|
||||||
&input_data,
|
&input_data,
|
||||||
&mouse,
|
&mouse,
|
||||||
&linuxvars.target,
|
&linuxvars.target,
|
||||||
|
|
Loading…
Reference in New Issue