Skip to content

Commit d7c5be4

Browse files
committed
feat: add new project helper script
1 parent ca3d8a1 commit d7c5be4

14 files changed

Lines changed: 3674 additions & 100 deletions

extensions/pl_unity_ext.h

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
pl_unity_ext.h
3-
- allows core apis to be used with functions directly
43
*/
54

65
/*
@@ -45,92 +44,6 @@ extern "C" {
4544
PL_API void pl_load_ext (plApiRegistryI*, bool reload);
4645
PL_API void pl_unload_ext(plApiRegistryI*, bool reload);
4746

48-
//--------------------------------IO api---------------------------------------
49-
50-
51-
PL_API void pl_io_new_frame(void);
52-
PL_API plIO* pl_io_get_io(void);
53-
54-
// keyboard
55-
PL_API bool pl_io_is_key_down (plKey);
56-
PL_API bool pl_io_is_key_pressed (plKey, bool repeat);
57-
PL_API bool pl_io_is_key_released (plKey);
58-
PL_API int pl_io_get_key_pressed_amount(plKey, float repeatDelay, float rate);
59-
60-
// mouse
61-
PL_API bool pl_io_is_mouse_down (plMouseButton);
62-
PL_API bool pl_io_is_mouse_clicked (plMouseButton, bool repeat);
63-
PL_API bool pl_io_is_mouse_released (plMouseButton);
64-
PL_API bool pl_io_is_mouse_double_clicked(plMouseButton);
65-
PL_API bool pl_io_is_mouse_dragging (plMouseButton, float threshold);
66-
PL_API bool pl_io_is_mouse_hovering_rect (plVec2 minVec, plVec2 maxVec);
67-
PL_API void pl_io_reset_mouse_drag_delta (plMouseButton);
68-
PL_API plVec2 pl_io_get_mouse_drag_delta (plMouseButton, float threshold);
69-
PL_API plVec2 pl_io_get_mouse_pos (void);
70-
PL_API float pl_io_get_mouse_wheel (void);
71-
PL_API bool pl_io_is_mouse_pos_valid (plVec2);
72-
PL_API void pl_io_set_mouse_cursor (plMouseCursor);
73-
74-
// input functions (used by backends)
75-
PL_API void pl_io_add_key_event (plKey, bool down);
76-
PL_API void pl_io_add_text_event (uint32_t uChar);
77-
PL_API void pl_io_add_text_event_utf16 (uint16_t uChar);
78-
PL_API void pl_io_add_text_events_utf8 (const char* text);
79-
PL_API void pl_io_add_mouse_pos_event (float x, float y);
80-
PL_API void pl_io_add_mouse_button_event(int button, bool down);
81-
PL_API void pl_io_add_mouse_wheel_event (float horizontalDelta, float verticalDelta);
82-
PL_API void pl_io_clear_input_characters(void);
83-
84-
// misc.
85-
PL_API plVersion pl_io_get_version (void);
86-
PL_API const char* pl_io_get_version_string(void);
87-
88-
//---------------------------data registry api---------------------------------
89-
90-
PL_API void pl_data_registry_set_data(const char* name, void* data);
91-
PL_API void* pl_data_registry_get_data(const char* name);
92-
93-
//------------------------------memory api-------------------------------------
94-
95-
PL_API void* pl_memory_realloc (void*, size_t);
96-
PL_API void* pl_memory_tracked_realloc(void*, size_t, const char* file, int line);
97-
98-
//------------------------extension registry api-------------------------------
99-
100-
PL_API bool pl_extension_registry_load (const char* name, const char* loadFunc, const char* unloadFunc, bool reloadable);
101-
PL_API bool pl_extension_registry_unload (const char* name);
102-
PL_API void pl_extension_registry_add_path(const char* path);
103-
104-
//------------------------------library api------------------------------------
105-
106-
PL_API plLibraryResult pl_library_load (plLibraryDesc, plSharedLibrary** libraryPtrOut);
107-
PL_API bool pl_library_has_changed (plSharedLibrary*);
108-
PL_API void* pl_library_load_function(plSharedLibrary*, const char*);
109-
110-
//-------------------------------window api------------------------------------
111-
112-
// create/destroy
113-
PL_API plWindowResult pl_window_create (plWindowDesc, plWindow** windowPtrOut);
114-
PL_API void pl_window_destroy (plWindow*);
115-
PL_API void pl_window_show (plWindow*);
116-
PL_API const plWindowCapabilities* pl_window_get_capabilities(void);
117-
118-
// attributes
119-
PL_API bool pl_window_set_attribute (plWindow*, plWindowAttribute, const plWindowAttributeValue*);
120-
PL_API bool pl_window_get_attribute (plWindow*, plWindowAttribute, plWindowAttributeValue*);
121-
122-
// cursor modes
123-
PL_API bool pl_window_set_cursor_mode (plWindow*, plCursorMode);
124-
PL_API plCursorMode pl_window_get_cursor_mode (plWindow*);
125-
PL_API bool pl_window_set_raw_mouse_input (plWindow*, bool);
126-
127-
// full screen modes
128-
PL_API bool pl_window_set_fullscreen(plWindow*, const plFullScreenDesc*);
129-
130-
// future callback system
131-
PL_API void pl_window_set_callback(plWindow*, plWindowEventCallback, void* userData);
132-
PL_API plWindowEventCallback pl_window_get_callback(plWindow*);
133-
13447
#ifdef __cplusplus
13548
}
13649
#endif

0 commit comments

Comments
 (0)