Commit Graph

611 Commits

Author SHA1 Message Date
Reuben Dunnington e85d774245 Bring over more math functions from musl
* asin
* asinf
* acosf
* tan
* tanf
* atan
* atan2
* atan2f
* atanf
* cbrt
* cbrtf
* log
* logf
* log2
* log2f
2023-09-18 10:21:49 +00:00
Martin Fouilleul 116e614ab6 Keep log format as "function() in file:line: msg", but pass the arguments in consistent order between the host and guest app. 2023-09-18 10:19:13 +00:00
Reuben Dunnington 44477782d8 logging: move parens to be in front of function 2023-09-18 10:19:13 +00:00
Ben Visness d2e8430c49 Check if the runtime is up to date on dev install 2023-09-18 10:04:59 +00:00
Ben Visness 45c615bfa9 Add cool image to README 2023-09-18 10:02:42 +00:00
Ben Visness 17beaef0e0 Slightly improve MSVC documentation and error messages 2023-09-18 10:01:44 +00:00
Reuben Dunnington 37655abbf5 wrap some paths to handle spaces on windows 2023-09-18 10:01:11 +00:00
Ben Visness a77d6a07cd Use the HTTPS URL in the docs
SSH doesn't work unless you have a public key on your Gitea account. Obviously we don't even expect most of our users to even create a Gitea account.
2023-09-17 10:41:40 -05:00
Ben Visness 0b273f1e43 Fix links in quick start 2023-09-16 17:53:49 -05:00
Ben Visness bd780b20f3 Print help when running `orca source` 2023-09-16 15:46:00 -05:00
Reuben Dunnington 5b7e27f9fd
running orca with no args should print help instead of throw an error 2023-09-16 10:00:07 -07:00
Martin Fouilleul 00555dc03f Fix mistake I did when resolving conflicts in dev.py between #79 and #89 2023-09-16 18:55:25 +02:00
martinfouilleul 4865e2142d scripts/bundle.py: fix ext path in windows_make_app 2023-09-16 18:05:18 +02:00
Ben Visness f05adac120 Update the README and quick start for launch 2023-09-16 15:56:48 +00:00
Ben Visness 29cb9f50e4 Add commands to deal with Orca source code:
- Add a vendor commands
- Add a command that helps you set up a C compiler
- Move ext into the src folder
- Update Mac build scripts for consistency
- Update Windows batch scripts
2023-09-16 17:54:56 +02:00
Ben Visness 731b1c7334 Add uninstall command 2023-09-16 15:46:43 +00:00
Martin Fouilleul 7d3f29e43b [ui layout]
- implement ui box min size, + small fixes in layout code of ui sample
- quick workaround for background showing on resize: clear to current theme's bg0 color
- precompute minsize based on children to avoid upward fixup step
- fix scrollable panel
- Simplify color overrides, override more things to counteract the light theme
- Change dragging to active for after #106 is merged
- when clamping box to minsize during shrinking, redistribute excess to siblings that still have some slack
- wrap demo in a scrollable panel

Co-authored-by: Ilia Demianenko <ilia.demianenko@gmail.com>
Co-authored-by: Martin Fouilleul <martinfouilleul@gmail.com>
2023-09-16 16:59:45 +02:00
Ilia Demianenko 33078fd9dc UI demo with styling 2023-09-16 16:59:45 +02:00
Martin Fouilleul 300d5aeab4 add a OC_UI_HOT style selector and use that to style radio buttons when the button's label is hovered 2023-09-16 16:33:08 +02:00
Martin Fouilleul d58643eb52 fix button & checkbox to return to normal styling when active but _not_ hovered 2023-09-16 16:18:23 +02:00
Ilia Demianenko efeac65a96 Only highlight the widgets on mouse down when they are also hovered 2023-09-15 15:00:33 -07:00
Martin Fouilleul 7ca40f8cac minor Readme.md additions 2023-09-14 17:42:01 +02:00
Martin Fouilleul 09cf30cf45 Consistency/intent
- pass arenas as first parameters (exception being texbox widget, where we always pass tag as first parameter)
- pass lists by value when there's no modification (eg oc_list_for etc...)
- fix sketches, use oc_arena_scope as value.
2023-09-14 11:54:38 +02:00
Martin Fouilleul 47dc052508 Minor consistency things:
- oc_window_style could be enum
- clikCount in oc_key_event to u8
- return of oc_input_key_press -> u8
- rename oc_key_pressed/released/repeated to oc_key_press/release/repeat_count to reflect meaning of return value
2023-09-14 10:47:10 +02:00
Martin Fouilleul 0e680c989b consistency: use _proc everywhere instead of _function or _callback in procedure typedefs. Also remove unused oc_live_resize_callback 2023-09-14 10:31:12 +02:00
Ilia Demianenko 73717b5dd8 Document palette colors 2023-09-14 07:42:09 +00:00
Ilia Demianenko d44ac5a1fb Use color + bgColor for selected radio instead of bgColor + borderColor 2023-09-13 14:02:50 -07:00
Ilia Demianenko 82aefaf758 Radio button group 2023-09-13 14:02:50 -07:00
Martin Fouilleul 8cd571f923 Remove oc_scratch()/oc_scratch_next() in favour of safer oc_scratch_begin()/oc_scratch_end() 2023-09-13 18:10:47 +02:00
Martin Fouilleul a0f9ab5f85 Allow building apps in C++ mode 2023-09-13 15:18:15 +00:00
Martin Fouilleul 0f3f7b5052 oc_runtime_clipboard_get_string() pushes to an arena, so to maintain oc_str8 conventions, we push an implicit null terminator after it 2023-09-13 17:05:15 +02:00
Ilia Demianenko a5567da82c Clipboard handling 2023-09-13 16:59:26 +02:00
Martin Fouilleul 7026919b38 pass both scancode and keycode to oc_on_key_up()/oc_on_key_down() 2023-09-13 16:33:28 +02:00
Martin Fouilleul a1ffcd3ddc [ui] macOS text edit shortcuts 2023-09-13 16:25:18 +02:00
Martin Fouilleul d53c688810 Keyboard layout support:
- Convey both fixed scancodes and keyboard-layout dependent keycodes in key events.
- Update scancode to keycode mapping when keyboard layout changes
- Allow querying key input state using either keycodes or scancodes
2023-09-13 16:22:33 +02:00
Martin Fouilleul db36158e7a check return pointer sizes in binding stubs 2023-09-12 17:06:01 +02:00
Martin Fouilleul d90c11db58 Save return pointer before calling native function in binding stubs 2023-09-12 15:03:56 +02:00
Martin Fouilleul b9232b796c Fix hang on quit. Closes #91 2023-09-12 09:36:32 +02:00
Martin Fouilleul ce752713f6 oc_matrix_push() -> oc_matrix_multiply_push(), and add oc_matrix_push() to push a matrix on the stack as is 2023-09-11 20:02:46 +02:00
Martin Fouilleul 313f2e0ad4 Fix quit by sending an event to wakeup the main loop when calling oc_request_quit() 2023-09-11 18:36:40 +02:00
martinfouilleul ab4abd28d7 Fix broken build on MSVC due to size_t being considered equivalent to u64 in _Generic associations 2023-09-11 18:09:47 +02:00
Martin Fouilleul 3e2f550b68 switch order of designated enums in strings, to make it easier to compile in c++ mode 2023-09-11 14:15:35 +02:00
Martin Fouilleul dc837a6a6d change len of strings to size_t 2023-09-11 12:53:15 +02:00
Martin Fouilleul 8d346eca90 flip order of len and ptr in oc_str8/16/32 structs, to make bindings easier 2023-09-11 12:53:15 +02:00
Ilia Demianenko afbb4329f5 Fix scrolling 2023-09-11 09:43:58 +00:00
Martin Fouilleul 06a7642055 Licensing and copyright information 2023-09-11 11:09:47 +02:00
Ilia Demianenko bb39bc7a13 Make arrow keys always move the cursor to the edge of the selection first 2023-09-11 09:08:47 +00:00
Ben Visness 748617d9b0 Remove unnecessary hr 2023-09-10 16:55:18 -05:00
Ben Visness 5394e8f301 Update README 2023-09-10 16:46:32 -05:00
Martin Fouilleul 5cdded57b3 Replace confusing oc_text_bounding_box() with oc_font_text_metrics(), which returns both the logical metrics and ink bounding box of text 2023-09-10 19:25:41 +02:00