mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-15 07:31:26 -07:00
Split-up require_results foreign blocks
This commit is contained in:
Vendored
+1
-1
@@ -49,7 +49,7 @@ EnumerationResult :: enum c.int {
|
|||||||
EnumerateDirectoryCallback :: #type proc "c" (userdata: rawptr, dirname, fname: cstring) -> EnumerationResult
|
EnumerateDirectoryCallback :: #type proc "c" (userdata: rawptr, dirname, fname: cstring) -> EnumerationResult
|
||||||
|
|
||||||
|
|
||||||
@(default_calling_convention="c", link_prefix="SDL_")
|
@(default_calling_convention="c", link_prefix="SDL_", require_results)
|
||||||
foreign lib {
|
foreign lib {
|
||||||
GetBasePath :: proc() -> cstring ---
|
GetBasePath :: proc() -> cstring ---
|
||||||
GetPrefPath :: proc(org, app: cstring) -> [^]c.char ---
|
GetPrefPath :: proc(org, app: cstring) -> [^]c.char ---
|
||||||
|
|||||||
Vendored
+4
-4
@@ -117,10 +117,10 @@ HAT_UP :: 0x01
|
|||||||
HAT_RIGHT :: 0x02
|
HAT_RIGHT :: 0x02
|
||||||
HAT_DOWN :: 0x04
|
HAT_DOWN :: 0x04
|
||||||
HAT_LEFT :: 0x08
|
HAT_LEFT :: 0x08
|
||||||
HAT_RIGHTUP :: (HAT_RIGHT|HAT_UP)
|
HAT_RIGHTUP :: HAT_RIGHT|HAT_UP
|
||||||
HAT_RIGHTDOWN :: (HAT_RIGHT|HAT_DOWN)
|
HAT_RIGHTDOWN :: HAT_RIGHT|HAT_DOWN
|
||||||
HAT_LEFTUP :: (HAT_LEFT|HAT_UP)
|
HAT_LEFTUP :: HAT_LEFT|HAT_UP
|
||||||
HAT_LEFTDOWN :: (HAT_LEFT|HAT_DOWN)
|
HAT_LEFTDOWN :: HAT_LEFT|HAT_DOWN
|
||||||
|
|
||||||
@(default_calling_convention="c", link_prefix="SDL_")
|
@(default_calling_convention="c", link_prefix="SDL_")
|
||||||
foreign lib {
|
foreign lib {
|
||||||
|
|||||||
Vendored
+13
-9
@@ -132,7 +132,6 @@ DEBUG_TEXT_FONT_CHARACTER_SIZE :: 8
|
|||||||
foreign lib {
|
foreign lib {
|
||||||
GetNumRenderDrivers :: proc() -> c.int ---
|
GetNumRenderDrivers :: proc() -> c.int ---
|
||||||
GetRenderDriver :: proc(index: c.int) -> cstring ---
|
GetRenderDriver :: proc(index: c.int) -> cstring ---
|
||||||
CreateWindowAndRenderer :: proc(title: cstring, width, height: c.int, window_flags: WindowFlags, window: ^^Window, renderer: ^^Renderer) -> bool ---
|
|
||||||
CreateRenderer :: proc(window: ^Window, name: cstring) -> ^Renderer ---
|
CreateRenderer :: proc(window: ^Window, name: cstring) -> ^Renderer ---
|
||||||
CreateRendererWithProperties :: proc(props: PropertiesID) -> ^Renderer ---
|
CreateRendererWithProperties :: proc(props: PropertiesID) -> ^Renderer ---
|
||||||
CreateSoftwareRenderer :: proc(surface: ^Surface) -> ^Renderer ---
|
CreateSoftwareRenderer :: proc(surface: ^Surface) -> ^Renderer ---
|
||||||
@@ -140,13 +139,24 @@ foreign lib {
|
|||||||
GetRenderWindow :: proc(renderer: ^Renderer) -> ^Window ---
|
GetRenderWindow :: proc(renderer: ^Renderer) -> ^Window ---
|
||||||
GetRendererName :: proc(renderer: ^Renderer) -> cstring ---
|
GetRendererName :: proc(renderer: ^Renderer) -> cstring ---
|
||||||
GetRendererProperties :: proc(renderer: ^Renderer) -> PropertiesID ---
|
GetRendererProperties :: proc(renderer: ^Renderer) -> PropertiesID ---
|
||||||
GetRenderOutputSize :: proc(renderer: ^Renderer, w, h: ^c.int) -> bool ---
|
|
||||||
GetCurrentRenderOutputSize :: proc(renderer: ^Renderer, w, h: ^c.int) -> bool ---
|
|
||||||
CreateTexture :: proc(renderer: ^Renderer, format: PixelFormat, access: TextureAccess, w, h: c.int) -> ^Texture ---
|
CreateTexture :: proc(renderer: ^Renderer, format: PixelFormat, access: TextureAccess, w, h: c.int) -> ^Texture ---
|
||||||
CreateTextureFromSurface :: proc(renderer: ^Renderer, surface: ^Surface) -> ^Texture ---
|
CreateTextureFromSurface :: proc(renderer: ^Renderer, surface: ^Surface) -> ^Texture ---
|
||||||
CreateTextureWithProperties :: proc(renderer: ^Renderer, props: PropertiesID) -> ^Texture ---
|
CreateTextureWithProperties :: proc(renderer: ^Renderer, props: PropertiesID) -> ^Texture ---
|
||||||
GetTextureProperties :: proc(texture: ^Texture) -> PropertiesID ---
|
GetTextureProperties :: proc(texture: ^Texture) -> PropertiesID ---
|
||||||
GetRendererFromTexture :: proc(texture: ^Texture) -> ^Renderer ---
|
GetRendererFromTexture :: proc(texture: ^Texture) -> ^Renderer ---
|
||||||
|
GetRenderTarget :: proc(renderer: ^Renderer) -> ^Texture ---
|
||||||
|
RenderViewportSet :: proc(renderer: ^Renderer) -> bool ---
|
||||||
|
RenderClipEnabled :: proc(renderer: ^Renderer) -> bool ---
|
||||||
|
RenderReadPixels :: proc(renderer: ^Renderer, #by_ptr rect: Rect) -> ^Surface ---
|
||||||
|
GetRenderMetalLayer :: proc(renderer: ^Renderer) -> rawptr ---
|
||||||
|
GetRenderMetalCommandEncoder :: proc(renderer: ^Renderer) -> rawptr ---
|
||||||
|
}
|
||||||
|
|
||||||
|
@(default_calling_convention="c", link_prefix="SDL_")
|
||||||
|
foreign lib {
|
||||||
|
CreateWindowAndRenderer :: proc(title: cstring, width, height: c.int, window_flags: WindowFlags, window: ^^Window, renderer: ^^Renderer) -> bool ---
|
||||||
|
GetRenderOutputSize :: proc(renderer: ^Renderer, w, h: ^c.int) -> bool ---
|
||||||
|
GetCurrentRenderOutputSize :: proc(renderer: ^Renderer, w, h: ^c.int) -> bool ---
|
||||||
GetTextureSize :: proc(texture: ^Texture, w, h: ^f32) -> bool ---
|
GetTextureSize :: proc(texture: ^Texture, w, h: ^f32) -> bool ---
|
||||||
SetTextureColorMod :: proc(texture: ^Texture, r, g, b: Uint8) -> bool ---
|
SetTextureColorMod :: proc(texture: ^Texture, r, g, b: Uint8) -> bool ---
|
||||||
SetTextureColorModFloat :: proc(texture: ^Texture, r, g, b: f32) -> bool ---
|
SetTextureColorModFloat :: proc(texture: ^Texture, r, g, b: f32) -> bool ---
|
||||||
@@ -167,7 +177,6 @@ foreign lib {
|
|||||||
LockTextureToSurface :: proc(texture: ^Texture, #by_ptr rect: Rect, surface: ^^Surface) -> bool ---
|
LockTextureToSurface :: proc(texture: ^Texture, #by_ptr rect: Rect, surface: ^^Surface) -> bool ---
|
||||||
UnlockTexture :: proc(texture: ^Texture) ---
|
UnlockTexture :: proc(texture: ^Texture) ---
|
||||||
SetRenderTarget :: proc(renderer: ^Renderer, texture: ^Texture) -> bool ---
|
SetRenderTarget :: proc(renderer: ^Renderer, texture: ^Texture) -> bool ---
|
||||||
GetRenderTarget :: proc(renderer: ^Renderer) -> ^Texture ---
|
|
||||||
SetRenderLogicalPresentation :: proc(renderer: ^Renderer, w, h: c.int, mode: RendererLogicalPresentation) -> bool ---
|
SetRenderLogicalPresentation :: proc(renderer: ^Renderer, w, h: c.int, mode: RendererLogicalPresentation) -> bool ---
|
||||||
GetRenderLogicalPresentation :: proc(renderer: ^Renderer, w, h: ^c.int, mode: ^RendererLogicalPresentation) -> bool ---
|
GetRenderLogicalPresentation :: proc(renderer: ^Renderer, w, h: ^c.int, mode: ^RendererLogicalPresentation) -> bool ---
|
||||||
GetRenderLogicalPresentationRect :: proc(renderer: ^Renderer, rect: ^FRect) -> bool ---
|
GetRenderLogicalPresentationRect :: proc(renderer: ^Renderer, rect: ^FRect) -> bool ---
|
||||||
@@ -176,11 +185,9 @@ foreign lib {
|
|||||||
ConvertEventToRenderCoordinates :: proc(renderer: ^Renderer, event: ^Event) -> bool ---
|
ConvertEventToRenderCoordinates :: proc(renderer: ^Renderer, event: ^Event) -> bool ---
|
||||||
SetRenderViewport :: proc(renderer: ^Renderer, #by_ptr rect: Rect) -> bool ---
|
SetRenderViewport :: proc(renderer: ^Renderer, #by_ptr rect: Rect) -> bool ---
|
||||||
GetRenderViewport :: proc(renderer: ^Renderer, rect: ^Rect) -> bool ---
|
GetRenderViewport :: proc(renderer: ^Renderer, rect: ^Rect) -> bool ---
|
||||||
RenderViewportSet :: proc(renderer: ^Renderer) -> bool ---
|
|
||||||
GetRenderSafeArea :: proc(renderer: ^Renderer, rect: ^Rect) -> bool ---
|
GetRenderSafeArea :: proc(renderer: ^Renderer, rect: ^Rect) -> bool ---
|
||||||
SetRenderClipRect :: proc(renderer: ^Renderer, #by_ptr rect: Rect) -> bool ---
|
SetRenderClipRect :: proc(renderer: ^Renderer, #by_ptr rect: Rect) -> bool ---
|
||||||
GetRenderClipRect :: proc(renderer: ^Renderer, rect: ^Rect) -> bool ---
|
GetRenderClipRect :: proc(renderer: ^Renderer, rect: ^Rect) -> bool ---
|
||||||
RenderClipEnabled :: proc(renderer: ^Renderer) -> bool ---
|
|
||||||
SetRenderScale :: proc(renderer: ^Renderer, scaleX, scaleY: f32) -> bool ---
|
SetRenderScale :: proc(renderer: ^Renderer, scaleX, scaleY: f32) -> bool ---
|
||||||
GetRenderScale :: proc(renderer: ^Renderer, scaleX, scaleY: ^f32) -> bool ---
|
GetRenderScale :: proc(renderer: ^Renderer, scaleX, scaleY: ^f32) -> bool ---
|
||||||
SetRenderDrawColor :: proc(renderer: ^Renderer, r, g, b, a: Uint8) -> bool ---
|
SetRenderDrawColor :: proc(renderer: ^Renderer, r, g, b, a: Uint8) -> bool ---
|
||||||
@@ -207,13 +214,10 @@ foreign lib {
|
|||||||
RenderTexture9Grid :: proc(renderer: ^Renderer, texture: ^Texture, #by_ptr srcrect: FRect, left_width, right_width, top_height, bottom_height: f32, scale: f32, #by_ptr dstrect: FRect) -> bool ---
|
RenderTexture9Grid :: proc(renderer: ^Renderer, texture: ^Texture, #by_ptr srcrect: FRect, left_width, right_width, top_height, bottom_height: f32, scale: f32, #by_ptr dstrect: FRect) -> bool ---
|
||||||
RenderGeometry :: proc(renderer: ^Renderer, texture: ^Texture, vertices: [^]Vertex, num_vertices: c.int, indices: [^]c.int, num_indices: c.int) -> bool ---
|
RenderGeometry :: proc(renderer: ^Renderer, texture: ^Texture, vertices: [^]Vertex, num_vertices: c.int, indices: [^]c.int, num_indices: c.int) -> bool ---
|
||||||
RenderGeometryRaw :: proc(renderer: ^Renderer, texture: ^Texture, xy: [^]f32, xy_stride: c.int, color: [^]FColor, color_stride: c.int, uv: [^]f32, uv_stride: c.int, num_vertices: c.int, indices: rawptr, num_indices: c.int, size_indices: c.int) -> bool ---
|
RenderGeometryRaw :: proc(renderer: ^Renderer, texture: ^Texture, xy: [^]f32, xy_stride: c.int, color: [^]FColor, color_stride: c.int, uv: [^]f32, uv_stride: c.int, num_vertices: c.int, indices: rawptr, num_indices: c.int, size_indices: c.int) -> bool ---
|
||||||
RenderReadPixels :: proc(renderer: ^Renderer, #by_ptr rect: Rect) -> ^Surface ---
|
|
||||||
RenderPresent :: proc(renderer: ^Renderer) -> bool ---
|
RenderPresent :: proc(renderer: ^Renderer) -> bool ---
|
||||||
DestroyTexture :: proc(texture: ^Texture) ---
|
DestroyTexture :: proc(texture: ^Texture) ---
|
||||||
DestroyRenderer :: proc(renderer: ^Renderer) ---
|
DestroyRenderer :: proc(renderer: ^Renderer) ---
|
||||||
FlushRenderer :: proc(renderer: ^Renderer) -> bool ---
|
FlushRenderer :: proc(renderer: ^Renderer) -> bool ---
|
||||||
GetRenderMetalLayer :: proc(renderer: ^Renderer) -> rawptr ---
|
|
||||||
GetRenderMetalCommandEncoder :: proc(renderer: ^Renderer) -> rawptr ---
|
|
||||||
AddVulkanRenderSemaphores :: proc(renderer: ^Renderer, wait_stage_mask: Uint32 , wait_semaphore, signal_semaphore: Sint64) -> bool ---
|
AddVulkanRenderSemaphores :: proc(renderer: ^Renderer, wait_stage_mask: Uint32 , wait_semaphore, signal_semaphore: Sint64) -> bool ---
|
||||||
SetRenderVSync :: proc(renderer: ^Renderer, vsync: c.int) -> bool ---
|
SetRenderVSync :: proc(renderer: ^Renderer, vsync: c.int) -> bool ---
|
||||||
GetRenderVSync :: proc(renderer: ^Renderer, vsync: ^c.int) -> bool ---
|
GetRenderVSync :: proc(renderer: ^Renderer, vsync: ^c.int) -> bool ---
|
||||||
|
|||||||
Vendored
+1
-1
@@ -19,7 +19,7 @@ SensorType :: enum c.int {
|
|||||||
GYRO_R, /**< Gyroscope for right Joy-Con controller */
|
GYRO_R, /**< Gyroscope for right Joy-Con controller */
|
||||||
}
|
}
|
||||||
|
|
||||||
@(default_calling_convention="c", link_prefix="SDL_")
|
@(default_calling_convention="c", link_prefix="SDL_", require_results)
|
||||||
foreign lib {
|
foreign lib {
|
||||||
GetSensors :: proc(count: ^c.int) -> [^]SensorID ---
|
GetSensors :: proc(count: ^c.int) -> [^]SensorID ---
|
||||||
GetSensorNameForID :: proc(instance_id: SensorID) -> cstring ---
|
GetSensorNameForID :: proc(instance_id: SensorID) -> cstring ---
|
||||||
|
|||||||
Vendored
+10
-4
@@ -48,7 +48,7 @@ StorageInterface :: struct {
|
|||||||
Storage :: struct {}
|
Storage :: struct {}
|
||||||
|
|
||||||
|
|
||||||
@(default_calling_convention="c", link_prefix="SDL_")
|
@(default_calling_convention="c", link_prefix="SDL_", require_results)
|
||||||
foreign lib {
|
foreign lib {
|
||||||
OpenTitleStorage :: proc(override: cstring, props: PropertiesID) -> ^Storage ---
|
OpenTitleStorage :: proc(override: cstring, props: PropertiesID) -> ^Storage ---
|
||||||
OpenUserStorage :: proc(org, app: cstring, props: PropertiesID) -> ^Storage ---
|
OpenUserStorage :: proc(org, app: cstring, props: PropertiesID) -> ^Storage ---
|
||||||
@@ -57,14 +57,20 @@ foreign lib {
|
|||||||
CloseStorage :: proc(storage: ^Storage) -> bool ---
|
CloseStorage :: proc(storage: ^Storage) -> bool ---
|
||||||
StorageReady :: proc(storage: ^Storage) -> bool ---
|
StorageReady :: proc(storage: ^Storage) -> bool ---
|
||||||
GetStorageFileSize :: proc(storage: ^Storage, path: cstring, length: ^Uint64) -> bool ---
|
GetStorageFileSize :: proc(storage: ^Storage, path: cstring, length: ^Uint64) -> bool ---
|
||||||
|
|
||||||
|
CreateStorageDirectory :: proc(storage: ^Storage, path: cstring) -> bool ---
|
||||||
|
GetStorageSpaceRemaining :: proc(storage: ^Storage) -> Uint64 ---
|
||||||
|
GlobStorageDirectory :: proc(storage: ^Storage, path: cstring, pattern: cstring, flags: GlobFlags, count: ^c.int) -> [^][^]c.char ---
|
||||||
|
}
|
||||||
|
|
||||||
|
@(default_calling_convention="c", link_prefix="SDL_")
|
||||||
|
foreign lib {
|
||||||
ReadStorageFile :: proc(storage: ^Storage, path: cstring, destination: rawptr, length: Uint64) -> bool ---
|
ReadStorageFile :: proc(storage: ^Storage, path: cstring, destination: rawptr, length: Uint64) -> bool ---
|
||||||
WriteStorageFile :: proc(storage: ^Storage, path: cstring, source: rawptr, length: Uint64) -> bool ---
|
WriteStorageFile :: proc(storage: ^Storage, path: cstring, source: rawptr, length: Uint64) -> bool ---
|
||||||
CreateStorageDirectory :: proc(storage: ^Storage, path: cstring) -> bool ---
|
|
||||||
EnumerateStorageDirectory :: proc(storage: ^Storage, path: cstring, callback: EnumerateDirectoryCallback, userdata: rawptr) -> bool ---
|
EnumerateStorageDirectory :: proc(storage: ^Storage, path: cstring, callback: EnumerateDirectoryCallback, userdata: rawptr) -> bool ---
|
||||||
RemoveStoragePath :: proc(storage: ^Storage, path: cstring) -> bool ---
|
RemoveStoragePath :: proc(storage: ^Storage, path: cstring) -> bool ---
|
||||||
RenameStoragePath :: proc(storage: ^Storage, oldpath, newpath: cstring) -> bool ---
|
RenameStoragePath :: proc(storage: ^Storage, oldpath, newpath: cstring) -> bool ---
|
||||||
CopyStorageFile :: proc(storage: ^Storage, oldpath, newpath: cstring) -> bool ---
|
CopyStorageFile :: proc(storage: ^Storage, oldpath, newpath: cstring) -> bool ---
|
||||||
GetStoragePathInfo :: proc(storage: ^Storage, path: cstring, info: ^PathInfo) -> bool ---
|
GetStoragePathInfo :: proc(storage: ^Storage, path: cstring, info: ^PathInfo) -> bool ---
|
||||||
GetStorageSpaceRemaining :: proc(storage: ^Storage) -> Uint64 ---
|
|
||||||
GlobStorageDirectory :: proc(storage: ^Storage, path: cstring, pattern: cstring, flags: GlobFlags, count: ^c.int) -> [^][^]c.char ---
|
|
||||||
}
|
}
|
||||||
Vendored
+8
-4
@@ -75,16 +75,20 @@ EndThreadFunction :: proc "c" () -> FunctionPointer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@(default_calling_convention="c", link_prefix="SDL_")
|
@(default_calling_convention="c", link_prefix="SDL_", require_results)
|
||||||
foreign lib {
|
foreign lib {
|
||||||
GetThreadName :: proc(thread: ^Thread) -> cstring ---
|
GetThreadName :: proc(thread: ^Thread) -> cstring ---
|
||||||
GetCurrentThreadID :: proc() -> ThreadID ---
|
GetCurrentThreadID :: proc() -> ThreadID ---
|
||||||
GetThreadID :: proc(thread: ^Thread) -> ThreadID ---
|
GetThreadID :: proc(thread: ^Thread) -> ThreadID ---
|
||||||
SetCurrentThreadPriority :: proc(priority: ThreadPriority) -> bool ---
|
|
||||||
WaitThread :: proc(thread: ^Thread, status: ^c.int) ---
|
|
||||||
GetThreadState :: proc(thread: ^Thread) -> ThreadState ---
|
GetThreadState :: proc(thread: ^Thread) -> ThreadState ---
|
||||||
DetachThread :: proc(thread: ^Thread) ---
|
|
||||||
GetTLS :: proc(id: ^TLSID) -> rawptr ---
|
GetTLS :: proc(id: ^TLSID) -> rawptr ---
|
||||||
SetTLS :: proc(id: ^TLSID, value: rawptr, destructor: TLSDestructorCallback) -> bool ---
|
SetTLS :: proc(id: ^TLSID, value: rawptr, destructor: TLSDestructorCallback) -> bool ---
|
||||||
|
}
|
||||||
|
|
||||||
|
@(default_calling_convention="c", link_prefix="SDL_")
|
||||||
|
foreign lib {
|
||||||
|
SetCurrentThreadPriority :: proc(priority: ThreadPriority) -> bool ---
|
||||||
|
WaitThread :: proc(thread: ^Thread, status: ^c.int) ---
|
||||||
|
DetachThread :: proc(thread: ^Thread) ---
|
||||||
CleanupTLS :: proc() ---
|
CleanupTLS :: proc() ---
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user