Renaming fixes in sdl.nim

This commit is contained in:
patrick dw 2015-06-06 09:09:48 -05:00
commit a511562822

View file

@ -775,7 +775,7 @@ type
Arg*{.final.} = object Arg*{.final.} = object
buf*: array[0..ERR_MAX_STRLEN - 1, int8] buf*: array[0..ERR_MAX_STRLEN - 1, int8]
Perror* = ptr Terror Perror* = ptr Error
Error*{.final.} = object # This is a numeric value corresponding to the current error Error*{.final.} = object # This is a numeric value corresponding to the current error
# SDL_rwops.h types # SDL_rwops.h types
# This is the read/write operation structure -- very basic # This is the read/write operation structure -- very basic
@ -814,7 +814,7 @@ type
theType*: cint theType*: cint
mem*: Mem mem*: Mem
RWops* = RWops # SDL_timer.h types # SDL_timer.h types
# Function prototype for the timer callback function # Function prototype for the timer callback function
TimerCallback* = proc (interval: int32): int32{.cdecl.} TimerCallback* = proc (interval: int32): int32{.cdecl.}
NewTimerCallback* = proc (interval: int32, param: pointer): int32{.cdecl.} NewTimerCallback* = proc (interval: int32, param: pointer): int32{.cdecl.}
@ -950,8 +950,8 @@ type
EventAction* = enum # Application visibility event structure EventAction* = enum # Application visibility event structure
ADDEVENT, PEEKEVENT, GETEVENT ADDEVENT, PEEKEVENT, GETEVENT
PActiveEvent* = ptr ActiveEvent PActiveEvent* = ptr TActiveEvent
ActiveEvent*{.final.} = object # SDL_ACTIVEEVENT TActiveEvent*{.final.} = object # SDL_ACTIVEEVENT
# Keyboard event structure # Keyboard event structure
kind*: EventKind kind*: EventKind
gain*: byte # Whether given states were gained or lost (1/0) gain*: byte # Whether given states were gained or lost (1/0)
@ -1032,8 +1032,8 @@ type
w*: cint # New width w*: cint # New width
h*: cint # New height h*: cint # New height
PUserEvent* = ptr UserEvent PUserEvent* = ptr TUserEvent
UserEvent*{.final.} = object # SDL_USEREVENT through SDL_NUMEVENTS-1 TUserEvent*{.final.} = object # SDL_USEREVENT through SDL_NUMEVENTS-1
kind*: EventKind kind*: EventKind
code*: cint # User defined event code code*: cint # User defined event code
data1*: pointer # User defined data pointer data1*: pointer # User defined data pointer
@ -1044,7 +1044,7 @@ type
TWrite: Write, TBool: Bool, TUInt8Array: UInt8Array, TWrite: Write, TBool: Bool, TUInt8Array: UInt8Array,
TGrabMode: GrabMode, Terrorcode: Errorcode, TStdio: Stdio, TGrabMode: GrabMode, Terrorcode: Errorcode, TStdio: Stdio,
TMem: Mem, TSeek: Seek, TRead: Read, TClose: Close, TMem: Mem, TSeek: Seek, TRead: Read, TClose: Close,
TTimerCallback: TimerCallback, TNewTimerCallback: NewTimerCallabck, TTimerCallback: TimerCallback, TNewTimerCallback: NewTimerCallback,
TTimerID: TimerID, TAudioSpecCallback: AudioSpecCallback, TTimerID: TimerID, TAudioSpecCallback: AudioSpecCallback,
TAudioSpec: AudioSpec, TAudioCVTFilter: AudioCVTFilter, TAudioSpec: AudioSpec, TAudioCVTFilter: AudioCVTFilter,
TAudioCVTFilterArray: AudioCVTFilterArray, TAudioCVT: AudioCVT, TAudioCVTFilterArray: AudioCVTFilterArray, TAudioCVT: AudioCVT,
@ -1053,9 +1053,12 @@ type
TJoystick: Joystick, TJoyAxisEvent: JoyAxisEvent, TRWops: RWops, TJoystick: Joystick, TJoyAxisEvent: JoyAxisEvent, TRWops: RWops,
TJoyBallEvent: JoyBallEvent, TJoyHatEvent: JoyHatEvent, TJoyBallEvent: JoyBallEvent, TJoyHatEvent: JoyHatEvent,
TJoyButtonEvent: JoyButtonEvent, TBallDelta: BallDelta, TJoyButtonEvent: JoyButtonEvent, TBallDelta: BallDelta,
Tversion: Version, TMod: Mod, TActiveEvent: ActiveEvent, Tversion: Version, TMod: Mod,
# TActiveEvent: ActiveEvent, # Naming conflict when we drop the `T`
TMouseMotionEvent: MouseMotionEvent, TMouseButtonEvent: MouseButtonEvent, TMouseMotionEvent: MouseMotionEvent, TMouseButtonEvent: MouseButtonEvent,
TResizeEvent: ResizeEvent, TUserEvent: UserEvent].} TResizeEvent: ResizeEvent,
# TUserEvent: UserEvent # Naming conflict when we drop the `T`
].}
when defined(Unix): when defined(Unix):
type #These are the various supported subsystems under UNIX type #These are the various supported subsystems under UNIX
@ -1136,8 +1139,8 @@ else:
{.deprecated: [TSysWMinfo: SysWMinfo].} {.deprecated: [TSysWMinfo: SysWMinfo].}
type type
PSysWMEvent* = ptr SysWMEvent PSysWMEvent* = ptr TSysWMEvent
SysWMEvent*{.final.} = object TSysWMEvent*{.final.} = object
kind*: EventKind kind*: EventKind
msg*: PSysWMmsg msg*: PSysWMmsg
@ -1172,12 +1175,12 @@ type
PColorArray* = ptr ColorArray PColorArray* = ptr ColorArray
ColorArray* = array[0..65000, Color] ColorArray* = array[0..65000, Color]
PPalette* = ptr TPalette PPalette* = ptr Palette
Palette*{.final.} = object # Everything in the pixel format structure is read-only Palette*{.final.} = object # Everything in the pixel format structure is read-only
ncolors*: int ncolors*: int
colors*: PColorArray colors*: PColorArray
PPixelFormat* = ptr TPixelFormat PPixelFormat* = ptr PixelFormat
PixelFormat*{.final.} = object # The structure passed to the low level blit functions PixelFormat*{.final.} = object # The structure passed to the low level blit functions
palette*: PPalette palette*: PPalette
bitsPerPixel*: byte bitsPerPixel*: byte
@ -1269,7 +1272,8 @@ type
wmCursor*: pointer # Window-manager cursor wmCursor*: pointer # Window-manager cursor
{.deprecated: [TRect: Rect, TSurface: Surface, TEvent: Event, TColor: Color, {.deprecated: [TRect: Rect, TSurface: Surface, TEvent: Event, TColor: Color,
TEventFilter: EventFilter, TColorArray: ColorArray, TEventFilter: EventFilter, TColorArray: ColorArray,
TSysWMEvent: SysWMEvent, TExposeEvent: ExposeEvent, # TSysWMEvent: SysWMEvent, # Naming conflict when we drop the `T`
TExposeEvent: ExposeEvent,
TQuitEvent: QuitEvent, TPalette: Palette, TPixelFormat: PixelFormat, TQuitEvent: QuitEvent, TPalette: Palette, TPixelFormat: PixelFormat,
TBlitInfo: BlitInfo, TBlit: Blit, TVideoInfo: VideoInfo, TBlitInfo: BlitInfo, TBlit: Blit, TVideoInfo: VideoInfo,
TOverlay: Overlay, TGLAttr: GLAttr, TCursor: Cursor].} TOverlay: Overlay, TGLAttr: GLAttr, TCursor: Cursor].}
@ -1300,7 +1304,7 @@ type # This is the system-independent thread info struc
threadid*: int32 threadid*: int32
handle*: SYS_ThreadHandle handle*: SYS_ThreadHandle
status*: int status*: int
errbuf*: Terror errbuf*: Error
data*: pointer data*: pointer
PKeyStateArr* = ptr KeyStateArr PKeyStateArr* = ptr KeyStateArr