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,16 +1053,19 @@ 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
SysWm* = enum SysWm* = enum
SYSWM_X11 SYSWM_X11
{.deprecated: [TSysWm: SysWm].} {.deprecated: [TSysWm: SysWm].}
when defined(WINDOWS): when defined(WINDOWS):
type type
PSysWMmsg* = ptr SysWMmsg PSysWMmsg* = ptr SysWMmsg
SysWMmsg*{.final.} = object SysWMmsg*{.final.} = object
@ -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
@ -1254,10 +1257,10 @@ type
hwOverlay*: int32 # This will be set to 1 if the overlay is hardware accelerated. hwOverlay*: int32 # This will be set to 1 if the overlay is hardware accelerated.
GLAttr* = enum GLAttr* = enum
GL_RED_SIZE, GL_GREEN_SIZE, GL_BLUE_SIZE, GL_ALPHA_SIZE, GL_BUFFER_SIZE, GL_RED_SIZE, GL_GREEN_SIZE, GL_BLUE_SIZE, GL_ALPHA_SIZE, GL_BUFFER_SIZE,
GL_DOUBLEBUFFER, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE, GL_DOUBLEBUFFER, GL_DEPTH_SIZE, GL_STENCIL_SIZE, GL_ACCUM_RED_SIZE,
GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, GL_STEREO, GL_ACCUM_GREEN_SIZE, GL_ACCUM_BLUE_SIZE, GL_ACCUM_ALPHA_SIZE, GL_STEREO,
GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_ACCELERATED_VISUAL, GL_MULTISAMPLEBUFFERS, GL_MULTISAMPLESAMPLES, GL_ACCELERATED_VISUAL,
GL_SWAP_CONTROL GL_SWAP_CONTROL
PCursor* = ptr Cursor PCursor* = ptr Cursor
Cursor*{.final.} = object # SDL_mutex.h types Cursor*{.final.} = object # SDL_mutex.h types
@ -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].}
@ -1285,11 +1289,11 @@ type
Cond*{.final.} = object # SDL_thread.h types Cond*{.final.} = object # SDL_thread.h types
{.deprecated: [TCond: Cond, TSem: Sem, TMutex: Mutex, Tsemaphore: Semaphore].} {.deprecated: [TCond: Cond, TSem: Sem, TMutex: Mutex, Tsemaphore: Semaphore].}
when defined(WINDOWS): when defined(WINDOWS):
type type
SYS_ThreadHandle* = Handle SYS_ThreadHandle* = Handle
{.deprecated: [TSYS_ThreadHandle: SYS_ThreadHandle].} {.deprecated: [TSYS_ThreadHandle: SYS_ThreadHandle].}
when defined(Unix): when defined(Unix):
type type
SYS_ThreadHandle* = pointer SYS_ThreadHandle* = pointer
{.deprecated: [TSYS_ThreadHandle: SYS_ThreadHandle].} {.deprecated: [TSYS_ThreadHandle: SYS_ThreadHandle].}
@ -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