diff --git a/a_types.c.v b/a_types.c.v index dcd98466..c9861cf0 100644 --- a/a_types.c.v +++ b/a_types.c.v @@ -1,5 +1,5 @@ module sdl // va_list -[typedef] +@[typedef] pub struct C.va_list {} diff --git a/atomic.c.v b/atomic.c.v index 40dc602d..99cc216a 100644 --- a/atomic.c.v +++ b/atomic.c.v @@ -143,7 +143,7 @@ pub fn memory_barrier_acquire_function() { // AtomicT is a type representing an atomic integer value. It is a struct // so people don't accidentally use numeric operations on it. -[typedef] +@[typedef] pub struct C.SDL_atomic_t { pub: value int diff --git a/audio.c.v b/audio.c.v index e6c03669..531039cb 100644 --- a/audio.c.v +++ b/audio.c.v @@ -147,7 +147,7 @@ pub type AudioCallback = fn (userdata voidptr, stream &u8, len int) // 7: FL FR FC LFE BC SL SR (6.1 surround) // 8: FL FR FC LFE BL BR SL SR (7.1 surround) -[typedef] +@[typedef] pub struct C.SDL_AudioSpec { pub: freq int // DSP frequency -- samples per second @@ -204,7 +204,7 @@ pub type AudioCVTPackedSDLAudioCVT = C.SDL_AUDIOCVT_PACKEDSDL_AudioCVT // you to pass it aligned data, but can possibly run much faster if you // set both its (buf) field to a pointer that is aligned to 16 bytes, and its // (len) field to something that's a multiple of 16, if possible. -[typedef] +@[typedef] pub struct C.SDL_AudioCVT { pub: needed int // Set to 1 if conversion possible @@ -941,7 +941,7 @@ pub fn convert_audio(cvt &AudioCVT) int { // - You push data as you have it, and pull it when you need it // // this is opaque to the outside world. -[typedef] +@[typedef] pub struct C.SDL_AudioStream { } diff --git a/events.c.v b/events.c.v index 92f9965d..7b8fad24 100644 --- a/events.c.v +++ b/events.c.v @@ -136,7 +136,7 @@ pub enum EventType { } // CommonEvent is fields shared by every event -[typedef] +@[typedef] pub struct C.SDL_CommonEvent { pub: @type EventType @@ -147,7 +147,7 @@ pub type CommonEvent = C.SDL_CommonEvent // DisplayEvent is display state change event data (event.display.*) // DisplayEvent is C.SDL_DisplayEvent -[typedef] +@[typedef] pub struct C.SDL_DisplayEvent { pub: @type u32 // ::SDL_DISPLAYEVENT @@ -163,7 +163,7 @@ pub: pub type DisplayEvent = C.SDL_DisplayEvent // WindowEvent is window state change event data (event.window.*) -[typedef] +@[typedef] pub struct C.SDL_WindowEvent { pub: @type EventType // ::SDL_WINDOWEVENT @@ -180,7 +180,7 @@ pub: pub type WindowEvent = C.SDL_WindowEvent // KeyboardEvent is Keyboard button event structure (event.key.*) -[typedef] +@[typedef] pub struct C.SDL_KeyboardEvent { pub: @type EventType // ::SDL_KEYDOWN or ::SDL_KEYUP @@ -196,7 +196,7 @@ pub: pub type KeyboardEvent = C.SDL_KeyboardEvent // TextEditingEvent is keyboard text editing event structure (event.edit.*) -[typedef] +@[typedef] pub struct C.SDL_TextEditingEvent { pub: @type EventType // ::SDL_TEXTEDITING @@ -210,7 +210,7 @@ pub: pub type TextEditingEvent = C.SDL_TextEditingEvent // TextInputEvent is keyboard text input event structure (event.text.*) -[typedef] +@[typedef] pub struct C.SDL_TextInputEvent { pub: @type EventType // ::SDL_TEXTINPUT @@ -222,7 +222,7 @@ pub: pub type TextInputEvent = C.SDL_TextInputEvent // MouseMotionEvent is mouse motion event structure (event.motion.*) -[typedef] +@[typedef] pub struct C.SDL_MouseMotionEvent { pub: @type EventType // ::SDL_MOUSEMOTION @@ -239,7 +239,7 @@ pub: pub type MouseMotionEvent = C.SDL_MouseMotionEvent // MouseButtonEvent is mouse button event structure (event.button.*) -[typedef] +@[typedef] pub struct C.SDL_MouseButtonEvent { pub: @type EventType // ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP @@ -257,7 +257,7 @@ pub: pub type MouseButtonEvent = C.SDL_MouseButtonEvent // MouseWheelEvent is mouse wheel event structure (event.wheel.*) -[typedef] +@[typedef] pub struct C.SDL_MouseWheelEvent { pub: @type EventType // ::SDL_MOUSEWHEEL @@ -274,7 +274,7 @@ pub: pub type MouseWheelEvent = C.SDL_MouseWheelEvent // JoyAxisEvent is joystick axis motion event structure (event.jaxis.*) -[typedef] +@[typedef] pub struct C.SDL_JoyAxisEvent { pub: @type EventType // ::SDL_JOYAXISMOTION @@ -291,7 +291,7 @@ pub: pub type JoyAxisEvent = C.SDL_JoyAxisEvent // JoyBallEvent is joystick trackball motion event structure (event.jball.*) -[typedef] +@[typedef] pub struct C.SDL_JoyBallEvent { pub: @type EventType // ::SDL_JOYBALLMOTION @@ -308,7 +308,7 @@ pub: pub type JoyBallEvent = C.SDL_JoyBallEvent // JoyHatEvent is joystick hat position change event structure (event.jhat.*) -[typedef] +@[typedef] pub struct C.SDL_JoyHatEvent { pub: @type EventType // ::SDL_JOYHATMOTION @@ -327,7 +327,7 @@ pub: pub type JoyHatEvent = C.SDL_JoyHatEvent // JoyButtonEvent is joystick button event structure (event.jbutton.*) -[typedef] +@[typedef] pub struct C.SDL_JoyButtonEvent { pub: @type EventType // ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP @@ -342,7 +342,7 @@ pub: pub type JoyButtonEvent = C.SDL_JoyButtonEvent // JoyDeviceEvent is joystick device event structure (event.jdevice.*) -[typedef] +@[typedef] pub struct C.SDL_JoyDeviceEvent { pub: @type EventType // ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED @@ -353,7 +353,7 @@ pub: pub type JoyDeviceEvent = C.SDL_JoyDeviceEvent // ControllerAxisEvent is game controller axis motion event structure (event.caxis.*) -[typedef] +@[typedef] pub struct C.SDL_ControllerAxisEvent { pub: @type EventType // ::SDL_CONTROLLERAXISMOTION @@ -370,7 +370,7 @@ pub: pub type ControllerAxisEvent = C.SDL_ControllerAxisEvent // ControllerButtonEvent is game controller button event structure (event.cbutton.*) -[typedef] +@[typedef] pub struct C.SDL_ControllerButtonEvent { pub: @type EventType // ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP @@ -385,7 +385,7 @@ pub: pub type ControllerButtonEvent = C.SDL_ControllerButtonEvent // ControllerDeviceEvent is controller device event structure (event.cdevice.*) -[typedef] +@[typedef] pub struct C.SDL_ControllerDeviceEvent { pub: @type EventType // ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED @@ -396,7 +396,7 @@ pub: pub type ControllerDeviceEvent = C.SDL_ControllerDeviceEvent // ControllerTouchpadEvent is game controller touchpad event structure (event.ctouchpad.*) -[typedef] +@[typedef] pub struct C.SDL_ControllerTouchpadEvent { pub: @type u32 // ::SDL_CONTROLLERTOUCHPADDOWN or ::SDL_CONTROLLERTOUCHPADMOTION or ::SDL_CONTROLLERTOUCHPADUP @@ -411,7 +411,7 @@ pub: pub type ControllerTouchpadEvent = C.SDL_ControllerTouchpadEvent -[typedef] +@[typedef] pub struct C.SDL_ControllerSensorEvent { pub: @type u32 // ::SDL_CONTROLLERSENSORUPDATE @@ -424,7 +424,7 @@ pub: pub type ControllerSensorEvent = C.SDL_ControllerSensorEvent // AudioDeviceEvent is audio device event structure (event.adevice.*) -[typedef] +@[typedef] pub struct C.SDL_AudioDeviceEvent { pub: @type EventType // ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED @@ -439,7 +439,7 @@ pub: pub type AudioDeviceEvent = C.SDL_AudioDeviceEvent // TouchFingerEvent is touch finger event structure (event.tfinger.*) -[typedef] +@[typedef] pub struct C.SDL_TouchFingerEvent { pub: @type EventType // ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP @@ -457,7 +457,7 @@ pub: pub type TouchFingerEvent = C.SDL_TouchFingerEvent // MultiGestureEvent is Multiple Finger Gesture Event (event.mgesture.*) -[typedef] +@[typedef] pub struct C.SDL_MultiGestureEvent { pub: @type EventType // ::SDL_MULTIGESTURE @@ -474,7 +474,7 @@ pub: pub type MultiGestureEvent = C.SDL_MultiGestureEvent // DollarGestureEvent is Dollar Gesture Event (event.dgesture.*) -[typedef] +@[typedef] pub struct C.SDL_DollarGestureEvent { pub: @type EventType // ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD @@ -493,7 +493,7 @@ pub type DollarGestureEvent = C.SDL_DollarGestureEvent // This event is enabled by default, you can disable it with SDL_EventState(). // NOTE If this event is enabled, you must free the filename in the event. -[typedef] +@[typedef] pub struct C.SDL_DropEvent { pub: @type EventType // ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE @@ -506,7 +506,7 @@ pub type DropEvent = C.SDL_DropEvent // SensorEvent is sensor event structure (event.sensor.*) // SensorEvent is C.SDL_SensorEvent -[typedef] +@[typedef] pub struct C.SDL_SensorEvent { pub: @type u32 // ::SDL_SENSORUPDATE @@ -518,7 +518,7 @@ pub: pub type SensorEvent = C.SDL_SensorEvent // QuitEvent is the "quit requested" event -[typedef] +@[typedef] pub struct C.SDL_QuitEvent { pub: @type EventType // ::SDL_QUIT @@ -528,7 +528,7 @@ pub: pub type QuitEvent = C.SDL_QuitEvent // OSEvent is an OS Specific event -[typedef] +@[typedef] pub struct C.SDL_OSEvent { pub: @type EventType // ::SDL_QUIT @@ -538,7 +538,7 @@ pub: pub type OSEvent = C.SDL_OSEvent // UserEvent is an user-defined event type (event.user.*) -[typedef] +@[typedef] pub struct C.SDL_UserEvent { pub: @type EventType // ::SDL_USEREVENT through ::SDL_LASTEVENT-1 @@ -555,13 +555,13 @@ pub type UserEvent = C.SDL_UserEvent // This event is disabled by default, you can enable it with SDL_EventState() // // NOTE If you want to use this event, you should include SDL_syswm.h. -[typedef] +@[typedef] pub struct C.SDL_SysWMmsg { } pub type SysWMmsg = C.SDL_SysWMmsg -[typedef] +@[typedef] pub struct C.SDL_SysWMEvent { pub: @type EventType // ::SDL_SYSWMEVENT @@ -586,7 +586,7 @@ fn v_get_event_padding_size() int { */ // Event is a general event structure. -[typedef] +@[typedef] pub union C.SDL_Event { pub: @type EventType // Event type, shared with all events diff --git a/examples/basic_mixer/basic_mixer.v b/examples/basic_mixer/basic_mixer.v index 4572b436..3f39dc01 100644 --- a/examples/basic_mixer/basic_mixer.v +++ b/examples/basic_mixer/basic_mixer.v @@ -111,7 +111,7 @@ fn load_mus(path string) !&mixer.Music { // We output to terminal to prevent depending on e.g. sdl.tff, in case // it doesn't work or is broken - it then become easier to // diagnose any potential library problems a setup might have. -[console] +@[console] fn main() { println('Const version ${mixer.major_version}.${mixer.minor_version}.${mixer.patchlevel}') mut compiled_version := sdl.Version{} diff --git a/examples/sdl_opengl_and_sokol/main.v b/examples/sdl_opengl_and_sokol/main.v index 8a177a66..5a112b7e 100644 --- a/examples/sdl_opengl_and_sokol/main.v +++ b/examples/sdl_opengl_and_sokol/main.v @@ -25,7 +25,7 @@ struct Vertex_t { a f32 } -[console] +@[console] fn main() { sdl.init(sdl.init_video) diff --git a/examples/tvintris/tvintris.v b/examples/tvintris/tvintris.v index 24fd7133..a01dcba7 100644 --- a/examples/tvintris/tvintris.v +++ b/examples/tvintris/tvintris.v @@ -451,7 +451,7 @@ enum Action { fire } -[inline] +@[inline] fn (game &Game) fill_rect(s &sdl.Surface, r &sdl.Rect, c &sdl.Color) { sdl.fill_rect(s, r, sdl.map_rgba(game.sdl.screen.format, c.r, c.g, c.b, c.a)) } @@ -767,12 +767,12 @@ fn (g &Game) draw_text(x int, y int, text string, tcol sdl.Color) { sdl.free_surface(tsurf) } -[inline] +@[inline] fn (g &Game) draw_ptext(x int, y int, text string, tcol sdl.Color) { g.draw_text(g.ofs_x + x, y, text, tcol) } -[live] +@[live] fn (g &Game) draw_begin() { // println('about to clear') sdl.render_clear(g.sdl.renderer) diff --git a/gamecontroller.c.v b/gamecontroller.c.v index 21ebd44c..762510ac 100644 --- a/gamecontroller.c.v +++ b/gamecontroller.c.v @@ -17,7 +17,7 @@ module sdl // // GameController is the gamecontroller structure used to identify an SDL game controller -[typedef] +@[typedef] pub struct C.SDL_GameController { } @@ -57,7 +57,7 @@ pub: hat_mask int } -[typedef] +@[typedef] pub struct C.SDL_GameControllerButtonBind { pub: bindType GameControllerBindType // C.SDL_GameControllerBindType diff --git a/haptic.c.v b/haptic.c.v index ab63e102..36bc03fb 100644 --- a/haptic.c.v +++ b/haptic.c.v @@ -137,7 +137,7 @@ pub const ( haptic_infinity = C.SDL_HAPTIC_INFINITY // 4294967295U ) -[typedef] +@[typedef] pub struct C.SDL_Haptic { } @@ -242,7 +242,7 @@ direction.dir[0] = 9000; // Since we only have two axes we don't need more param // See also: SDL_HapticEffect // See also: SDL_HapticNumAxes -[typedef] +@[typedef] pub struct C.SDL_HapticDirection { pub mut: @type u8 // The type of encoding @@ -260,7 +260,7 @@ pub type HapticDirection = C.SDL_HapticDirection // // See also: SDL_HAPTIC_CONSTANT // See also: SDL_HapticEffect -[typedef] +@[typedef] pub struct C.SDL_HapticConstant { pub mut: @type u16 // ::SDL_HAPTIC_CONSTANT @@ -336,7 +336,7 @@ pub type HapticConstant = C.SDL_HapticConstant // See also: SDL_HAPTIC_SAWTOOTHDOWN // See also: SDL_HapticEffect -[typedef] +@[typedef] pub struct C.SDL_HapticPeriodic { pub mut: @type u16 // ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT, ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or ::SDL_HAPTIC_SAWTOOTHDOWN @@ -379,7 +379,7 @@ pub type HapticPeriodic = C.SDL_HapticPeriodic // See also: SDL_HAPTIC_INERTIA // See also: SDL_HAPTIC_FRICTION // See also: SDL_HapticEffect -[typedef] +@[typedef] pub struct C.SDL_HapticCondition { pub mut: @type u16 // ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER, ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION @@ -409,7 +409,7 @@ pub type HapticCondition = C.SDL_HapticCondition // // See also: SDL_HAPTIC_RAMP // See also: SDL_HapticEffect -[typedef] +@[typedef] pub struct C.SDL_HapticRamp { pub mut: @type u16 // ::SDL_HAPTIC_RAMP @@ -438,7 +438,7 @@ pub type HapticRamp = C.SDL_HapticRamp // // See also: SDL_HAPTIC_LEFTRIGHT // See also: SDL_HapticEffect -[typedef] +@[typedef] pub struct C.SDL_HapticLeftRight { pub mut: @type u16 // ::SDL_HAPTIC_LEFTRIGHT @@ -462,7 +462,7 @@ pub type HapticLeftRight = C.SDL_HapticLeftRight // // See also: SDL_HAPTIC_CUSTOM // See also: SDL_HapticEffect -[typedef] +@[typedef] pub struct C.SDL_HapticCustom { pub mut: @type u16 // ::SDL_HAPTIC_CUSTOM @@ -556,7 +556,7 @@ Uint16 fade_level; // Level at the end of the fade. // See also: SDL_HapticLeftRight // See also: SDL_HapticCustom -[typedef] +@[typedef] union C.SDL_HapticEffect { pub mut: // Common for all force feedback effects diff --git a/hidapi.c.v b/hidapi.c.v index d30190cd..179c1a94 100644 --- a/hidapi.c.v +++ b/hidapi.c.v @@ -7,7 +7,7 @@ module sdl // SDL_hidapi.h // -[typedef] +@[typedef] pub struct C.SDL_hid_device { } @@ -15,7 +15,7 @@ pub struct C.SDL_hid_device { // HidDevice is C.SDL_hid_device pub type HidDevice = C.SDL_hid_device -[typedef] +@[typedef] pub struct C.SDL_hid_device_info { // Platform-specific device path path &char diff --git a/joystick.c.v b/joystick.c.v index 26c083e9..1f8459b7 100644 --- a/joystick.c.v +++ b/joystick.c.v @@ -25,13 +25,13 @@ pub const ( hat_leftdown = C.SDL_HAT_LEFTDOWN // hat_left | hat_down ) -[typedef] +@[typedef] pub struct C.SDL_Joystick { } pub type Joystick = C.SDL_Joystick -[typedef] +@[typedef] pub struct C.SDL_JoystickGUID { pub: data [16]u8 diff --git a/keyboard.c.v b/keyboard.c.v index 950e942c..91de7b3c 100644 --- a/keyboard.c.v +++ b/keyboard.c.v @@ -10,7 +10,7 @@ module sdl // The SDL keysym structure, used in key events. // // NOTE If you are looking for translated character input, see the ::SDL_TEXTINPUT event. -[typedef] +@[typedef] pub struct C.SDL_Keysym { pub: scancode Scancode // C.SDL_Scancode // SDL physical key code - see ::SDL_Scancode for details diff --git a/locale.c.v b/locale.c.v index 4b350b83..02217aa1 100644 --- a/locale.c.v +++ b/locale.c.v @@ -7,7 +7,7 @@ module sdl // SDL_locale.h // -[typedef] +@[typedef] pub struct C.SDL_Locale { pub: language &char // const, A language name, like "en" for English. diff --git a/messagebox.c.v b/messagebox.c.v index 32d1e3f1..53066cd3 100644 --- a/messagebox.c.v +++ b/messagebox.c.v @@ -25,7 +25,7 @@ pub enum MessageBoxButtonFlags { } // MessageBoxButtonData is individual button data. -[typedef] +@[typedef] pub struct C.SDL_MessageBoxButtonData { pub: flags u32 // ::SDL_MessageBoxButtonFlags @@ -36,7 +36,7 @@ pub: pub type MessageBoxButtonData = C.SDL_MessageBoxButtonData // MessageBoxColor is a RGB value used in a message box color scheme -[typedef] +@[typedef] pub struct C.SDL_MessageBoxColor { pub: r u8 @@ -57,7 +57,7 @@ pub enum MessageBoxColorType { } // MessageBoxColorScheme is a set of colors to use for message box dialogs -[typedef] +@[typedef] pub struct C.SDL_MessageBoxColorScheme { pub: colors [6]MessageBoxColor @@ -66,7 +66,7 @@ pub: pub type MessageBoxColorScheme = C.SDL_MessageBoxColorScheme // MessageBoxData is a MessageBox structure containing title, text, window, etc. -[typedef] +@[typedef] pub struct C.SDL_MessageBoxData { pub: flags u32 // ::SDL_MessageBoxFlags diff --git a/mixer/mixer.c.v b/mixer/mixer.c.v index 63e1d919..cf6d7043 100644 --- a/mixer/mixer.c.v +++ b/mixer/mixer.c.v @@ -85,7 +85,7 @@ pub const ( pub const effectsmaxspeed = 'MIX_EFFECTSMAXSPEED' // Chunk is the internal format for an audio chunk -[typedef] +@[typedef] pub struct C.Mix_Chunk { pub: allocated int @@ -125,7 +125,7 @@ pub const ( ) // Music is the internal format for a music chunk interpreted via mikmod -[typedef] +@[typedef] pub struct C.Mix_Music { } diff --git a/mouse.c.v b/mouse.c.v index 506b8377..be75fb9b 100644 --- a/mouse.c.v +++ b/mouse.c.v @@ -6,7 +6,7 @@ module sdl // // SDL_mouse.h // -[typedef] +@[typedef] pub struct C.SDL_Cursor { } diff --git a/mutex.c.v b/mutex.c.v index 23a86918..dae2ba75 100644 --- a/mutex.c.v +++ b/mutex.c.v @@ -16,7 +16,7 @@ pub const mutex_maxwait = C.SDL_MUTEX_MAXWAIT // (~(Uint32)0) // Mutex is the SDL mutex structure, defined in SDL_sysmutex.c // Mutex is C.SDL_mutex -[typedef] +@[typedef] pub struct C.SDL_mutex { } @@ -135,7 +135,7 @@ pub fn destroy_mutex(mutex &Mutex) { // Sem is the SDL semaphore structure, defined in SDL_syssem.c // Sem is C.SDL_sem -[typedef] +@[typedef] pub struct C.SDL_sem { } @@ -306,7 +306,7 @@ pub fn sem_value(sem &Sem) u32 { // Cond is the SDL condition variable structure, defined in SDL_syscond.c // Cond is C.SDL_cond -[typedef] +@[typedef] pub struct C.SDL_cond { } diff --git a/pixels.c.v b/pixels.c.v index 7a46c042..a523f88d 100644 --- a/pixels.c.v +++ b/pixels.c.v @@ -133,7 +133,7 @@ pub enum Format { external_oes = C.SDL_PIXELFORMAT_EXTERNAL_OES // Android video texture format } -[typedef] +@[typedef] pub struct C.SDL_Color { pub mut: r u8 @@ -149,7 +149,7 @@ pub mut: // Color is C.SDL_Color pub type Color = C.SDL_Color -[typedef] +@[typedef] pub struct C.SDL_Palette { pub mut: ncolors int @@ -161,7 +161,7 @@ pub mut: pub type Palette = C.SDL_Palette // NOTE Everything in the pixel format structure is read-only. -[typedef] +@[typedef] pub struct C.SDL_PixelFormat { pub: format Format diff --git a/rect.c.v b/rect.c.v index 35355d44..d938faa5 100644 --- a/rect.c.v +++ b/rect.c.v @@ -12,7 +12,7 @@ module sdl // See also: SDL_EnclosePoints // See also: SDL_PointInRect // Point is C.SDL_Point -[typedef] +@[typedef] pub struct C.SDL_Point { pub mut: x int @@ -26,7 +26,7 @@ pub type Point = C.SDL_Point // See also: SDL_EnclosePoints // See also: SDL_PointInRect // FPoint is C.SDL_FPoint -[typedef] +@[typedef] pub struct C.SDL_FPoint { pub mut: x f32 @@ -44,7 +44,7 @@ pub type FPoint = C.SDL_FPoint // See also: SDL_UnionRect // See also: SDL_EnclosePoints // Rect is C.SDL_Rect -[typedef] +@[typedef] pub struct C.SDL_Rect { pub mut: x int @@ -57,7 +57,7 @@ pub type Rect = C.SDL_Rect // FRect is a rectangle, with the origin at the upper left (floating point). // FRect is C.SDL_FRect -[typedef] +@[typedef] pub struct C.SDL_FRect { pub mut: x f32 @@ -102,7 +102,7 @@ fn C.SDL_HasIntersection(const_a &C.SDL_Rect, const_b &C.SDL_Rect) bool // NOTE This function is available since SDL 2.0.0. // // See also: SDL_IntersectRect -[inline] +@[inline] pub fn has_intersection(const_a &Rect, const_b &Rect) bool { return C.SDL_HasIntersection(const_a, const_b) } diff --git a/render.c.v b/render.c.v index b550c81b..e41453ba 100644 --- a/render.c.v +++ b/render.c.v @@ -34,7 +34,7 @@ pub enum RendererFlags { targettexture = C.SDL_RENDERER_TARGETTEXTURE // 0x00000008 } -[typedef] +@[typedef] pub struct C.SDL_RendererInfo { pub: name &char // The name of the renderer @@ -47,7 +47,7 @@ pub: pub type RendererInfo = C.SDL_RendererInfo -[typedef] +@[typedef] pub struct C.SDL_Vertex { position FPoint // Vertex position, in SDL_Renderer coordinates color Color // Vertex color @@ -87,13 +87,13 @@ pub enum RendererFlip { vertical = C.SDL_FLIP_VERTICAL // 0x00000002 flip vertically } -[typedef] +@[typedef] pub struct C.SDL_Renderer { } pub type Renderer = C.SDL_Renderer -[typedef] +@[typedef] pub struct C.SDL_Texture { } diff --git a/rwops.c.v b/rwops.c.v index c7d12fe5..b9b926dd 100644 --- a/rwops.c.v +++ b/rwops.c.v @@ -206,7 +206,7 @@ pub fn rw_close(context &RWops) int { } // This is the read/write operation structure -- very basic. -[typedef] +@[typedef] pub struct C.SDL_RWops { pub: // Returns the size of the file in this rwops, or -1 if unknown diff --git a/sensor.c.v b/sensor.c.v index 090ec12c..0e9147c3 100644 --- a/sensor.c.v +++ b/sensor.c.v @@ -12,7 +12,7 @@ module sdl // for sensors, and load appropriate drivers. // // Sensor is C.SDL_Sensor -[typedef] +@[typedef] pub struct C.SDL_Sensor { } diff --git a/shape.c.v b/shape.c.v index 4a25d4b6..4ae0a449 100644 --- a/shape.c.v +++ b/shape.c.v @@ -71,7 +71,7 @@ pub fn shapemodealpha(mode WindowShapeModeFlag) bool { // WindowShapeParams is a union containing parameters for shaped windows. // WindowShapeParams is C.SDL_WindowShapeParams -[typedef] +@[typedef] union C.SDL_WindowShapeParams { pub mut: binarizationCutoff u8 // A cutoff alpha value for binarization of the window shape's alpha channel. @@ -83,7 +83,7 @@ pub type WindowShapeParams = C.SDL_WindowShapeParams // WindowShapeMode is a struct that tags the SDL_WindowShapeParams union with // an enum describing the type of its contents. // WindowShapeMode is C.SDL_WindowShapeMode -[typedef] +@[typedef] pub struct C.SDL_WindowShapeMode { pub: mode WindowShapeModeFlag // The mode of these window-shape parameters. diff --git a/stdinc.c.v b/stdinc.c.v index d6b4341b..644c54bc 100644 --- a/stdinc.c.v +++ b/stdinc.c.v @@ -738,7 +738,7 @@ pub const ( // SDL_iconv_* are now always real symbols/types, not macros or inlined. // typedef struct _SDL_iconv_t *SDL_iconv_t; -[typedef] +@[typedef] pub struct C.SDL_iconv_t { } diff --git a/surface.c.v b/surface.c.v index a5ad3227..6abbc736 100644 --- a/surface.c.v +++ b/surface.c.v @@ -12,7 +12,7 @@ module sdl // NOTE This structure should be treated as read-only, except for `pixels`, // which, if not NULL, contains the raw pixel data for the surface. // -[typedef] +@[typedef] pub struct C.SDL_Surface { pub: flags u32 // Read-only diff --git a/system_windows.c.v b/system_windows.c.v index fe8272a1..7bce87b4 100644 --- a/system_windows.c.v +++ b/system_windows.c.v @@ -38,7 +38,7 @@ pub fn direct_3d9_get_adapter_index(display_index int) int { return C.SDL_Direct3D9GetAdapterIndex(display_index) } -[typedef] +@[typedef] pub struct C.IDirect3DDevice9 { } @@ -60,7 +60,7 @@ pub fn render_get_d3d9_device(renderer &Renderer) &IDirect3DDevice9 { return C.SDL_RenderGetD3D9Device(renderer) } -[typedef] +@[typedef] pub struct C.ID3D11Device { } diff --git a/thread.c.v b/thread.c.v index 61343669..2d868353 100644 --- a/thread.c.v +++ b/thread.c.v @@ -7,7 +7,7 @@ module sdl // SDL_thread.h // -[typedef] +@[typedef] pub struct C.SDL_Thread { } diff --git a/touch.c.v b/touch.c.v index 7db06626..40cb6b86 100644 --- a/touch.c.v +++ b/touch.c.v @@ -28,7 +28,7 @@ pub enum TouchDeviceType { indirect_relative = C.SDL_TOUCH_DEVICE_INDIRECT_RELATIVE // trackpad with screen cursor-relative coordinates } -[typedef] +@[typedef] pub struct C.SDL_Finger { pub: id FingerID // C.SDL_FingerID diff --git a/ttf/ttf.c.v b/ttf/ttf.c.v index 8633521e..6c3c9aed 100644 --- a/ttf/ttf.c.v +++ b/ttf/ttf.c.v @@ -60,7 +60,7 @@ pub fn byte_swapped_unicode(swapped int) { // Font is the internal structure containing font information // Font is C.TTF_Font -[typedef] +@[typedef] pub struct C.TTF_Font { } diff --git a/version.c.v b/version.c.v index 92848e1c..3be68946 100644 --- a/version.c.v +++ b/version.c.v @@ -23,7 +23,7 @@ pub const ( // // See also: SDL_VERSION // See also: SDL_GetVersion -[typedef] +@[typedef] pub struct C.SDL_version { pub: major u8 // major version @@ -156,7 +156,7 @@ fn C.SDL_GetRevisionNumber() int // NOTE This function is available since SDL 2.0.0. // // See also SDL_GetRevision -[deprecated: 'Use SDL_GetRevision() instead; if SDL was carefully built, it will return a git hash.'] +@[deprecated: 'Use SDL_GetRevision() instead; if SDL was carefully built, it will return a git hash.'] pub fn get_revision_number() int { return C.SDL_GetRevisionNumber() } diff --git a/video.c.v b/video.c.v index c4457815..6d494efa 100644 --- a/video.c.v +++ b/video.c.v @@ -16,7 +16,7 @@ module sdl // See also: SDL_GetClosestDisplayMode() // See also: SDL_SetWindowDisplayMode() // See also: SDL_GetWindowDisplayMode() -[typedef] +@[typedef] pub struct C.SDL_DisplayMode { pub: format u32 // pixel format @@ -60,7 +60,7 @@ pub type DisplayMode = C.SDL_DisplayMode // See also: SDL_SetWindowTitle() // See also: SDL_ShowWindow() // -[typedef] +@[typedef] pub struct C.SDL_Window { }