Commit Graph

28 Commits

Author SHA1 Message Date
Adam
c233ba4049 *: use posix ipc even on windows
So it turns out Windows supports AF_UNIX sockets via the afunix.h
header, as a somewhat drop-in solution for IPC. Some messing around was
required to get it to compile against winsock functions and Ws2_32.lib,
and it still doesn't actually do anything, but the IPC portion seems to
be working perfectly.
2024-08-05 16:59:46 +01:00
Adam
28fdd97965 library: implement api_time for windows 2024-06-24 21:33:56 +01:00
Adam
d4093ec1d5 library: use correct event details for scroll-down 2024-06-22 18:02:52 +01:00
Adam
6e125124b3 library: remove unused windowlightmeta 2024-06-22 17:54:44 +01:00
Adam
157b089fa8 library: use full userdata instead of light
Due to a Lua ""feature"", light userdatas all share the same metatable,
so setting individual ones for each event wasn't working very well. The
solution instead is to replace the light userdata pointer with a full
userdata with the event struct copied into it. This also means we can't
have window objects being presented in callbacks, but that's okay, I
think plugins should be using upvalues for that anyway.
2024-06-22 17:43:07 +01:00
Adam
0f331d241b library: better and fuller mouse event system 2024-06-22 17:16:22 +01:00
Adam
e1bb14f7e7 library: correct type of scroll direction 2024-06-22 00:23:56 +01:00
Adam
a6839aa126 library: generalise plugin_process_windows 2024-06-21 22:54:43 +01:00
Adam
7a60c61170 library: mouse motion and button events
also started adding window's metatable to it in the event callbacks
2024-06-21 20:37:43 +01:00
Adam
b953c29568 library: rough window-event system 2024-06-16 18:44:16 +01:00
Adam
26d7bfe402 library: basic concept for embedded windows
No focusing system (do we actually need one?), no event system at all,
and no support for inputs via wayland
2024-06-01 15:53:25 +01:00
Adam
463c2817b8 library: fix game crash on plugin crash 2024-05-26 17:10:25 +01:00
Adam
a23324e462 library: fix copy-paste error 2024-05-19 19:53:56 +01:00
Adam
86ed7ea1aa library: new time API functions
Added the following functions:
- datetime
- weekday
2024-05-11 01:40:43 +01:00
Adam
527ae38c2e library: use static as appropriate 2024-05-11 00:56:53 +01:00
Adam
fb1b464027 library: complete surfaces API
Added the following functions:
- createsurfacefromrgba
- createsurfacefrompng
- surface_drawtosurface
2024-05-11 00:44:01 +01:00
Adam
e039174e04 library: allow require() for secondary files 2024-05-04 00:30:04 +01:00
Adam
599ff83b51 library: funny hack to avoid using strlen
Calculating strlen of a hard-coded stringat runtime, by iterating
through it until finding a 0 byte, is nothing but a waste of CPU cycles.
We already know the length, so let's just use it directly.
2024-05-03 22:37:20 +01:00
Adam
62908af138 library: one lua stack per plugin
It's more resource-intensive, but all the plugins sharing one stack was
causing so many problems that I'm not sure it was even possible to do
correctly; Lua stacks are aggressively global, and all the plugins
sharing one set of global state was causing so many bugs, not to mention
safety issues of plugins potentially having access to each other, that
it's simply not worth the trouble.
2024-05-03 20:52:45 +01:00
Adam
5e1468883c library: define & handle IPC_MSG_STARTPLUGINS 2024-04-29 05:22:08 +01:00
Adam
8e85b160a6 repo: BoltIPCMessage->BoltIPCMessageToHost 2024-04-28 16:29:18 +01:00
Adam
eb48600cef library: remove unused IPC_MSG_NEWPLUGINS 2024-04-23 15:51:26 +01:00
Adam
74c0911928 library: add identify msg 2024-04-23 01:36:55 +01:00
Adam
68ec2eb6bb client,library: IPC format for plugin metadata 2024-04-01 23:28:09 +01:00
Adam
d7a0295b2d library: generalise send and receive functions 2024-03-24 12:53:54 +00:00
Adam
347625ced7 plugin: use IPC API with message types 2024-03-24 11:29:49 +00:00
Adam
405ea71bf5 library: add basic IPC API 2024-03-22 20:14:50 +00:00
Adam
e54a38f3f5 library: move plugin files to subdirectory 2024-03-22 18:36:48 +00:00