4coder/platform_mac/mac_4ed.cpp

93 lines
1.4 KiB
C++
Raw Normal View History

2017-06-30 01:13:20 +00:00
/*
* Mr. 4th Dimention - Allen Webster
*
2017-06-30 22:09:18 +00:00
* 28.06.2017
2017-06-30 01:13:20 +00:00
*
* Mac C++ layer for 4coder
*
*/
// TOP
2017-06-30 21:28:09 +00:00
#define IS_PLAT_LAYER
#include "4ed_defines.h"
2017-06-30 01:13:20 +00:00
#include "4coder_API/version.h"
2017-06-30 21:36:55 +00:00
#include "4coder_lib/4coder_utf8.h"
#if defined(FRED_SUPER)
# include "4coder_API/keycodes.h"
# include "4coder_API/style.h"
# define FSTRING_IMPLEMENTATION
# define FSTRING_C
# include "4coder_lib/4coder_string.h"
# include "4coder_lib/4coder_mem.h"
# include "4coder_API/types.h"
# include "4ed_os_custom_api.h"
#else
# include "4coder_default_bindings.cpp"
#endif
#include "4ed_math.h"
#include "4ed_system.h"
#include "4ed_log.h"
#include "4ed_rendering.h"
#include "4ed.h"
2017-06-30 22:09:18 +00:00
#include "4ed_file_track.h"
#include "4ed_font_interface_to_os.h"
#include "4ed_system_shared.h"
2017-07-01 01:36:51 +00:00
#include <sys/syslimits.h>
2017-06-30 21:33:30 +00:00
#include "unix_4ed_functions.cpp"
2017-06-30 01:13:20 +00:00
#include "osx_objective_c_to_cpp_links.h"
OSX_Vars osx;
2017-06-30 01:28:34 +00:00
external void*
2017-06-30 01:13:20 +00:00
osx_allocate(umem size){
2017-06-30 22:29:34 +00:00
void *result = system_memory_allocate(size);
2017-06-30 01:13:20 +00:00
return(result);
}
2017-06-30 01:28:34 +00:00
external void
2017-06-30 01:13:20 +00:00
osx_resize(int width, int height){
osx.width = width;
osx.height = height;
// TODO
}
2017-06-30 01:28:34 +00:00
external void
2017-06-30 01:13:20 +00:00
osx_character_input(u32 code, OSX_Keyboard_Modifiers modifier_flags){
// TODO
}
2017-06-30 01:28:34 +00:00
external void
2017-06-30 01:13:20 +00:00
osx_mouse(i32 mx, i32 my, u32 type){
// TODO
}
2017-06-30 01:28:34 +00:00
external void
2017-06-30 01:13:20 +00:00
osx_mouse_wheel(float dx, float dy){
// TODO
}
2017-06-30 01:28:34 +00:00
external void
2017-06-30 01:13:20 +00:00
osx_step(){
// TODO
}
2017-06-30 01:28:34 +00:00
external void
2017-06-30 01:13:20 +00:00
osx_init(){
// TODO
}
// BOTTOM