Skip to content

Commit 52a9841

Browse files
committed
events: update comments
1 parent e06702b commit 52a9841

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

events.c.v

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ module sdl
3333
// can guarantee that these events have a type that isn't in use by other
3434
// parts of the system.
3535

36+
// General keyboard/mouse/pen state definitions
37+
38+
// The types of events that can be delivered.
39+
//
40+
// NOTE: This enum is available since SDL 3.2.0.
41+
//
3642
// EventType is C.SDL_EventType
3743
pub enum EventType {
3844
first = C.SDL_EVENT_FIRST // 0, Unused (do not remove)
@@ -70,9 +76,9 @@ pub enum EventType {
7076
display_desktop_mode_changed = C.SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED // `display_desktop_mode_changed` Display has changed desktop mode
7177
display_current_mode_changed = C.SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED // `display_current_mode_changed` Display has changed current mode
7278
display_content_scale_changed = C.SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED // `display_content_scale_changed` Display has changed content scale
73-
// TODO: these trigger C compile errors: `error: duplicate case value`
74-
// display_first = C.SDL_EVENT_DISPLAY_FIRST // SDL_EVENT_DISPLAY_ORIENTATION,
75-
// display_last = C.SDL_EVENT_DISPLAY_LAST // SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
79+
// TODO: `display_first`, `display_last` trigger C compile errors: `error: duplicate case value` even if `@[_allow_multiple_values]` is used.
80+
// display_first = C.SDL_EVENT_DISPLAY_FIRST // SDL_EVENT_DISPLAY_ORIENTATION,
81+
// display_last = C.SDL_EVENT_DISPLAY_LAST // SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED,
7682
window_shown = C.SDL_EVENT_WINDOW_SHOWN // 0x202, Window has been shown
7783
window_hidden = C.SDL_EVENT_WINDOW_HIDDEN // `window_hidden` Window has been hidden
7884
window_exposed = C.SDL_EVENT_WINDOW_EXPOSED // `window_exposed` Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event
@@ -101,9 +107,9 @@ pub enum EventType {
101107
// associated with the window. Otherwise, the handle has already been destroyed and all resources
102108
// associated with it are invalid
103109
window_hdr_state_changed = C.SDL_EVENT_WINDOW_HDR_STATE_CHANGED // `window_hdr_state_changed` Window HDR properties have changed
104-
// TODO: these trigger C compile errors: `error: duplicate case value`
105-
// window_first = C.SDL_EVENT_WINDOW_FIRST // SDL_EVENT_WINDOW_SHOWN,
106-
// window_last = C.SDL_EVENT_WINDOW_LAST // SDL_EVENT_WINDOW_HDR_STATE_CHANGED,
110+
// TODO: `window_first`, `window_last` trigger C compile errors: `error: duplicate case value` even if `@[_allow_multiple_values]` is used.
111+
// window_first = C.SDL_EVENT_WINDOW_FIRST // SDL_EVENT_WINDOW_SHOWN,
112+
// window_last = C.SDL_EVENT_WINDOW_LAST // SDL_EVENT_WINDOW_HDR_STATE_CHANGED,
107113
key_down = C.SDL_EVENT_KEY_DOWN // 0x300, Key pressed
108114
key_up = C.SDL_EVENT_KEY_UP // `key_up` Key released
109115
text_editing = C.SDL_EVENT_TEXT_EDITING // `text_editing` Keyboard text editing (composition)

0 commit comments

Comments
 (0)