SDL/src/events
Ryan C. Gordon 84a236c92e hashtable: Redesign the hashtable API.
This was intended to make the API public, so SDL_hashtable.h got an extreme
documentation makeover, but for now this remains a private header.

This makes several significant interface changes to SDL_HashTable, and
improves code that makes use of it in various ways.

- The ability to make "stackable" tables is removed. Apparently this still
  worked with the current implementation, but I could see a future
  implementation struggle mightily to support this. It'll be better for
  something external to build on top of the table if it needs it, inserting a
  linked list of stacked items as the hash values and managing them separately.
  There was only one place in SDL using this, unnecessarily, and that has also
  been cleaned up to not need it.
- You no longer specify "buckets" when creating a table, but rather an
  estimated number of items the table is meant to hold. The bucket count was
  crucial to our classic hashtable implementation, but meant less once we
  moved to an Open Addressing implementation anyhow, since the bucket count
  isn't static (and they aren't really "buckets" anymore either). Now you
  can just report how many items you think the hash will hold and SDL will
  allocate a reasonable default for you...or 0 to not guess, and SDL will
  start small and grow as necessary, which is often the correct thing to do.
- There's no more SDL_IterateHashTableKey because there's no more "stackable"
  hash tables.
- SDL_IterateHashTable() now uses a callback, which matches other parts of SDL,
  and also lets us hold the read-lock for the entire iteration and get rid of
  the goofy iterator state variable.
- SDL_InsertIntoHashTable() now lets you specify whether to replace existing
  keys or fail if the key already exists.
- Callbacks now use SDL conventions (userdata as the first param).
- Other naming convention fixes.

I discovered we use a lot of hash tables in SDL3 internally. :) So the bulk
of this work is fixing up that code to use the new interfaces, and simplifying
things (like checking for an item to remove it if it already exists before
inserting a replacement...just do the insert atomically, it'll do all that
for you!).
2025-02-15 18:52:56 -05:00
..
blank_cursor.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
default_cursor.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
imKStoUCS.c Fix uses of undefined macro identifiers (-Wundef) 2023-03-29 21:49:01 +00:00
imKStoUCS.h Remove stray  2023-09-20 08:32:53 -07:00
scancodes_darwin.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
scancodes_linux.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
scancodes_windows.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
scancodes_xfree86.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_categories.c Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_categories_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_clipboardevents.c Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_clipboardevents_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_displayevents.c Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_displayevents_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_dropevents.c Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_dropevents_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_events.c Copy SDL2_SYSWMEVENT data into temporary memory for the event 2025-02-11 15:11:33 -08:00
SDL_events_c.h Update joysticks and so forth during live resize 2025-01-20 10:11:31 -08:00
SDL_keyboard.c Remove newlines from log messages 2025-01-22 20:25:04 -08:00
SDL_keyboard_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_keymap.c hashtable: Redesign the hashtable API. 2025-02-15 18:52:56 -05:00
SDL_keymap_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_keysym_to_keycode.c keyboard: Add some SDL keycodes for common Xkb keys 2025-01-09 17:26:41 -05:00
SDL_keysym_to_keycode_c.h keyboard: Add some SDL keycodes for common Xkb keys 2025-01-09 17:26:41 -05:00
SDL_keysym_to_scancode.c keyboard: Add some SDL keycodes for common Xkb keys 2025-01-09 17:26:41 -05:00
SDL_keysym_to_scancode_c.h events: Remove unused function declaration 2025-01-10 11:23:54 -05:00
SDL_mouse.c SDL_GetRelativeMouseState(): Get relative mouse position also when relative mouse mode is disabled 2025-02-13 11:34:24 -08:00
SDL_mouse_c.h mouse: Clean up virtual touch devices as appropriate. 2025-01-15 02:19:59 -05:00
SDL_pen.c Fixed memory leak at shutdown 2025-01-26 19:30:29 -08:00
SDL_pen_c.h pen: Send virtual mouse and touch events for pen input. 2025-01-15 02:19:59 -05:00
SDL_quit.c Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_scancode_tables.c Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_scancode_tables_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_touch.c Vita: Fix off-by-one error for synthetic mouse events 2025-01-16 11:58:01 -08:00
SDL_touch_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00
SDL_windowevents.c Fixed creating a window with both software and hardware renderer attached 2025-02-06 15:35:38 -08:00
SDL_windowevents_c.h Updated copyright for 2025 2025-01-01 07:45:52 -08:00