mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 06:18:39 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -386,7 +386,8 @@ load_from_file :: proc(filename: string, options := DEFAULT_OPTIONS, error_handl
|
||||
return parse_bytes(data, options, filename, error_handler, allocator)
|
||||
}
|
||||
|
||||
destroy :: proc(doc: ^Document) {
|
||||
destroy :: proc(doc: ^Document, allocator := context.allocator) {
|
||||
context.allocator = allocator
|
||||
if doc == nil { return }
|
||||
|
||||
for el in doc.elements {
|
||||
|
||||
134
vendor/sdl3/image/LICENSE.libpng.txt
vendored
Normal file
134
vendor/sdl3/image/LICENSE.libpng.txt
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
||||
=========================================
|
||||
|
||||
PNG Reference Library License version 2
|
||||
---------------------------------------
|
||||
|
||||
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
|
||||
* Copyright (c) 2018-2025 Cosmin Truta.
|
||||
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
||||
* Copyright (c) 1996-1997 Andreas Dilger.
|
||||
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
||||
The software is supplied "as is", without warranty of any kind,
|
||||
express or implied, including, without limitation, the warranties
|
||||
of merchantability, fitness for a particular purpose, title, and
|
||||
non-infringement. In no event shall the Copyright owners, or
|
||||
anyone distributing the software, be liable for any damages or
|
||||
other liability, whether in contract, tort or otherwise, arising
|
||||
from, out of, or in connection with the software, or the use or
|
||||
other dealings in the software, even if advised of the possibility
|
||||
of such damage.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute
|
||||
this software, or portions hereof, for any purpose, without fee,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you
|
||||
must not claim that you wrote the original software. If you
|
||||
use this software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated, but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
3. This Copyright notice may not be removed or altered from any
|
||||
source or altered source distribution.
|
||||
|
||||
|
||||
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
|
||||
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
||||
derived from libpng-1.0.6, and are distributed according to the same
|
||||
disclaimer and license as libpng-1.0.6 with the following individuals
|
||||
added to the list of Contributing Authors:
|
||||
|
||||
Simon-Pierre Cadieux
|
||||
Eric S. Raymond
|
||||
Mans Rullgard
|
||||
Cosmin Truta
|
||||
Gilles Vollant
|
||||
James Yu
|
||||
Mandar Sahastrabuddhe
|
||||
Google Inc.
|
||||
Vadim Barkov
|
||||
|
||||
and with the following additions to the disclaimer:
|
||||
|
||||
There is no warranty against interference with your enjoyment of
|
||||
the library or against infringement. There is no warranty that our
|
||||
efforts or the library will fulfill any of your particular purposes
|
||||
or needs. This library is provided with all faults, and the entire
|
||||
risk of satisfactory quality, performance, accuracy, and effort is
|
||||
with the user.
|
||||
|
||||
Some files in the "contrib" directory and some configure-generated
|
||||
files that are distributed with libpng have other copyright owners, and
|
||||
are released under other open source licenses.
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
||||
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
|
||||
libpng-0.96, and are distributed according to the same disclaimer and
|
||||
license as libpng-0.96, with the following individuals added to the
|
||||
list of Contributing Authors:
|
||||
|
||||
Tom Lane
|
||||
Glenn Randers-Pehrson
|
||||
Willem van Schaik
|
||||
|
||||
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
||||
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
|
||||
and are distributed according to the same disclaimer and license as
|
||||
libpng-0.88, with the following individuals added to the list of
|
||||
Contributing Authors:
|
||||
|
||||
John Bowler
|
||||
Kevin Bracey
|
||||
Sam Bushell
|
||||
Magnus Holmgren
|
||||
Greg Roelofs
|
||||
Tom Tanner
|
||||
|
||||
Some files in the "scripts" directory have other copyright owners,
|
||||
but are released under this license.
|
||||
|
||||
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
|
||||
For the purposes of this copyright and license, "Contributing Authors"
|
||||
is defined as the following set of individuals:
|
||||
|
||||
Andreas Dilger
|
||||
Dave Martindale
|
||||
Guy Eric Schalnat
|
||||
Paul Schmidt
|
||||
Tim Wegner
|
||||
|
||||
The PNG Reference Library is supplied "AS IS". The Contributing
|
||||
Authors and Group 42, Inc. disclaim all warranties, expressed or
|
||||
implied, including, without limitation, the warranties of
|
||||
merchantability and of fitness for any purpose. The Contributing
|
||||
Authors and Group 42, Inc. assume no liability for direct, indirect,
|
||||
incidental, special, exemplary, or consequential damages, which may
|
||||
result from the use of the PNG Reference Library, even if advised of
|
||||
the possibility of such damage.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
source code, or portions hereof, for any purpose, without fee, subject
|
||||
to the following restrictions:
|
||||
|
||||
1. The origin of this source code must not be misrepresented.
|
||||
|
||||
2. Altered versions must be plainly marked as such and must not
|
||||
be misrepresented as being the original source.
|
||||
|
||||
3. This Copyright notice may not be removed or altered from any
|
||||
source or altered source distribution.
|
||||
|
||||
The Contributing Authors and Group 42, Inc. specifically permit,
|
||||
without fee, and encourage the use of this source code as a component
|
||||
to supporting the PNG file format in commercial products. If you use
|
||||
this source code in a product, acknowledgment is not required but would
|
||||
be appreciated.
|
||||
2
vendor/sdl3/image/LICENSE.txt
vendored
2
vendor/sdl3/image/LICENSE.txt
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
||||
BIN
vendor/sdl3/image/SDL3_image.dll
vendored
BIN
vendor/sdl3/image/SDL3_image.dll
vendored
Binary file not shown.
BIN
vendor/sdl3/image/SDL3_image.lib
vendored
BIN
vendor/sdl3/image/SDL3_image.lib
vendored
Binary file not shown.
2572
vendor/sdl3/image/include/SDL_image.h
vendored
2572
vendor/sdl3/image/include/SDL_image.h
vendored
File diff suppressed because it is too large
Load Diff
BIN
vendor/sdl3/image/libavif-16.dll
vendored
BIN
vendor/sdl3/image/libavif-16.dll
vendored
Binary file not shown.
BIN
vendor/sdl3/image/libpng16-16.dll
vendored
Normal file
BIN
vendor/sdl3/image/libpng16-16.dll
vendored
Normal file
Binary file not shown.
BIN
vendor/sdl3/image/libtiff-6.dll
vendored
BIN
vendor/sdl3/image/libtiff-6.dll
vendored
Binary file not shown.
BIN
vendor/sdl3/image/libwebpmux-3.dll
vendored
Normal file
BIN
vendor/sdl3/image/libwebpmux-3.dll
vendored
Normal file
Binary file not shown.
114
vendor/sdl3/image/sdl_image.odin
vendored
114
vendor/sdl3/image/sdl_image.odin
vendored
@@ -11,8 +11,8 @@ when ODIN_OS == .Windows {
|
||||
}
|
||||
|
||||
MAJOR_VERSION :: 3
|
||||
MINOR_VERSION :: 2
|
||||
PATCHLEVEL :: 4
|
||||
MINOR_VERSION :: 4
|
||||
PATCHLEVEL :: 0
|
||||
|
||||
Animation :: struct {
|
||||
w, h: c.int,
|
||||
@@ -21,6 +21,51 @@ Animation :: struct {
|
||||
delays: [^]c.int,
|
||||
}
|
||||
|
||||
AnimationEncoder :: struct {}
|
||||
|
||||
PROP_ANIMATION_ENCODER_CREATE_FILENAME_STRING :: "SDL_image.animation_encoder.create.filename"
|
||||
PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_POINTER :: "SDL_image.animation_encoder.create.iostream"
|
||||
PROP_ANIMATION_ENCODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN :: "SDL_image.animation_encoder.create.iostream.autoclose"
|
||||
PROP_ANIMATION_ENCODER_CREATE_TYPE_STRING :: "SDL_image.animation_encoder.create.type"
|
||||
PROP_ANIMATION_ENCODER_CREATE_QUALITY_NUMBER :: "SDL_image.animation_encoder.create.quality"
|
||||
PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_NUMERATOR_NUMBER :: "SDL_image.animation_encoder.create.timebase.numerator"
|
||||
PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER :: "SDL_image.animation_encoder.create.timebase.denominator"
|
||||
|
||||
PROP_ANIMATION_ENCODER_CREATE_AVIF_MAX_THREADS_NUMBER :: "SDL_image.animation_encoder.create.avif.max_threads"
|
||||
PROP_ANIMATION_ENCODER_CREATE_AVIF_KEYFRAME_INTERVAL_NUMBER :: "SDL_image.animation_encoder.create.avif.keyframe_interval"
|
||||
PROP_ANIMATION_ENCODER_CREATE_GIF_USE_LUT_BOOLEAN :: "SDL_image.animation_encoder.create.gif.use_lut"
|
||||
|
||||
AnimationDecoderStatus :: enum c.int {
|
||||
INVALID = -1,
|
||||
OK,
|
||||
FAILED,
|
||||
COMPLETE,
|
||||
}
|
||||
|
||||
AnimationDecoder :: struct {}
|
||||
|
||||
PROP_ANIMATION_DECODER_CREATE_FILENAME_STRING :: "SDL_image.animation_decoder.create.filename"
|
||||
PROP_ANIMATION_DECODER_CREATE_IOSTREAM_POINTER :: "SDL_image.animation_decoder.create.iostream"
|
||||
PROP_ANIMATION_DECODER_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN :: "SDL_image.animation_decoder.create.iostream.autoclose"
|
||||
PROP_ANIMATION_DECODER_CREATE_TYPE_STRING :: "SDL_image.animation_decoder.create.type"
|
||||
PROP_ANIMATION_DECODER_CREATE_TIMEBASE_NUMERATOR_NUMBER :: "SDL_image.animation_decoder.create.timebase.numerator"
|
||||
PROP_ANIMATION_DECODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER :: "SDL_image.animation_decoder.create.timebase.denominator"
|
||||
|
||||
PROP_ANIMATION_DECODER_CREATE_AVIF_MAX_THREADS_NUMBER :: "SDL_image.animation_decoder.create.avif.max_threads"
|
||||
PROP_ANIMATION_DECODER_CREATE_AVIF_ALLOW_INCREMENTAL_BOOLEAN :: "SDL_image.animation_decoder.create.avif.allow_incremental"
|
||||
PROP_ANIMATION_DECODER_CREATE_AVIF_ALLOW_PROGRESSIVE_BOOLEAN :: "SDL_image.animation_decoder.create.avif.allow_progressive"
|
||||
PROP_ANIMATION_DECODER_CREATE_GIF_TRANSPARENT_COLOR_INDEX_NUMBER :: "SDL_image.animation_encoder.create.gif.transparent_color_index"
|
||||
PROP_ANIMATION_DECODER_CREATE_GIF_NUM_COLORS_NUMBER :: "SDL_image.animation_encoder.create.gif.num_colors"
|
||||
|
||||
PROP_METADATA_IGNORE_PROPS_BOOLEAN :: "SDL_image.metadata.ignore_props"
|
||||
PROP_METADATA_DESCRIPTION_STRING :: "SDL_image.metadata.description"
|
||||
PROP_METADATA_COPYRIGHT_STRING :: "SDL_image.metadata.copyright"
|
||||
PROP_METADATA_TITLE_STRING :: "SDL_image.metadata.title"
|
||||
PROP_METADATA_AUTHOR_STRING :: "SDL_image.metadata.author"
|
||||
PROP_METADATA_CREATION_TIME_STRING :: "SDL_image.metadata.creation_time"
|
||||
PROP_METADATA_FRAME_COUNT_NUMBER :: "SDL_image.metadata.frame_count"
|
||||
PROP_METADATA_LOOP_COUNT_NUMBER :: "SDL_image.metadata.loop_count"
|
||||
|
||||
@(default_calling_convention="c", link_prefix="IMG_")
|
||||
foreign lib {
|
||||
Version :: proc() -> c.int ---
|
||||
@@ -43,7 +88,16 @@ foreign lib {
|
||||
LoadTexture_IO :: proc(renderer: ^SDL.Renderer, src: ^SDL.IOStream, closeio: bool) -> ^SDL.Texture ---
|
||||
LoadTextureTyped_IO :: proc(renderer: ^SDL.Renderer, src: ^SDL.IOStream, closeio: bool, type: cstring) -> ^SDL.Texture ---
|
||||
|
||||
/* Load an image directly into a GPU texture. */
|
||||
LoadGPUTexture :: proc(device: ^SDL.GPUDevice, copy_pass: ^SDL.GPUCopyPass, file: cstring, width: ^c.int, height: ^c.int) -> ^SDL.GPUTexture ---
|
||||
LoadGPUTexture_IO :: proc(device: ^SDL.GPUDevice, copy_pass: ^SDL.GPUCopyPass, src: ^SDL.IOStream, closeio: bool, width: ^c.int, height: ^c.int) -> ^SDL.GPUTexture ---
|
||||
LoadGPUTextureTyped_IO :: proc(device: ^SDL.GPUDevice, copy_pass: ^SDL.GPUCopyPass, src: ^SDL.IOStream, closeio: bool, type: cstring, width: ^c.int, height: ^c.int) -> ^SDL.GPUTexture ---
|
||||
|
||||
/* Get the image currently in the clipboard. */
|
||||
GetClipboardImage :: proc() -> ^SDL.Surface ---
|
||||
|
||||
/* Functions to detect a file type, given a seekable source */
|
||||
isANI :: proc(src: ^SDL.IOStream) -> bool ---
|
||||
isAVIF :: proc(src: ^SDL.IOStream) -> bool ---
|
||||
isICO :: proc(src: ^SDL.IOStream) -> bool ---
|
||||
isCUR :: proc(src: ^SDL.IOStream) -> bool ---
|
||||
@@ -90,19 +144,63 @@ foreign lib {
|
||||
ReadXPMFromArrayToRGB888 :: proc(xpm: [^]cstring) -> ^SDL.Surface ---
|
||||
|
||||
/* Individual saving functions */
|
||||
SaveAVIF :: proc(surface: ^SDL.Surface, file: cstring, quality: c.int) -> c.bool ---
|
||||
SaveAVIF_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool, quality: c.int) -> c.bool ---
|
||||
SavePNG :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SavePNG_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveJPG :: proc(surface: ^SDL.Surface, file: cstring, quality: c.int) -> c.bool ---
|
||||
SaveJPG_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool, quality: c.int) -> c.bool ---
|
||||
Save :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SaveTyped_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool, type: cstring) -> c.bool ---
|
||||
SaveAVIF :: proc(surface: ^SDL.Surface, file: cstring, quality: c.int) -> c.bool ---
|
||||
SaveAVIF_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool, quality: c.int) -> c.bool ---
|
||||
SaveBMP :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SaveBMP_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveCUR :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SaveCUR_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveGIF :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SaveGIF_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveICO :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SaveICO_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveJPG :: proc(surface: ^SDL.Surface, file: cstring, quality: c.int) -> c.bool ---
|
||||
SaveJPG_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool, quality: c.int) -> c.bool ---
|
||||
SavePNG :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SavePNG_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveTGA :: proc(surface: ^SDL.Surface, file: cstring) -> c.bool ---
|
||||
SaveTGA_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveWEBP :: proc(surface: ^SDL.Surface, file: cstring, quality: f32) -> c.bool ---
|
||||
SaveWEBP_IO :: proc(surface: ^SDL.Surface, dst: ^SDL.IOStream, closeio: bool, quality: f32) -> c.bool ---
|
||||
|
||||
LoadAnimation :: proc(file: cstring) -> ^Animation ---
|
||||
LoadAnimation_IO :: proc(src: ^SDL.IOStream, closeio: bool) -> ^Animation ---
|
||||
LoadAnimationTyped_IO :: proc(src: ^SDL.IOStream, closeio: bool, type: cstring) -> ^Animation ---
|
||||
SaveAnimation :: proc(anim: ^Animation, file: cstring) -> c.bool ---
|
||||
SaveAnimationTyped_IO :: proc(anim: ^Animation, dst: ^SDL.IOStream, closeio: bool, type: cstring) -> c.bool ---
|
||||
CreateAnimatedCursor :: proc(anim: ^Animation, hot_x: c.int, hot_y: c.int) -> ^SDL.Cursor ---
|
||||
FreeAnimation :: proc(anim: ^Animation) ---
|
||||
|
||||
/* Animation encoder functions */
|
||||
CreateAnimationEncoder :: proc(file: cstring) -> ^AnimationEncoder ---
|
||||
CreateAnimationEncoder_IO :: proc(dst: ^SDL.IOStream, closeio: bool, type: cstring) -> ^AnimationEncoder ---
|
||||
CreateAnimationEncoderWithProperties :: proc(props: SDL.PropertiesID) -> ^AnimationEncoder ---
|
||||
AddAnimationEncoderFrame :: proc(encoder: ^AnimationEncoder, surface: ^SDL.Surface, duration: u64) -> c.bool ---
|
||||
CloseAnimationEncoder :: proc(encoder: ^AnimationEncoder) -> c.bool ---
|
||||
|
||||
/* Animation decoder functions */
|
||||
CreateAnimationDecoder :: proc(file: cstring) -> ^AnimationDecoder ---
|
||||
CreateAnimationDecoder_IO :: proc(src: ^SDL.IOStream, closeio: bool, type: cstring) -> ^AnimationDecoder ---
|
||||
CreateAnimationDecoderWithProperties :: proc(props: SDL.PropertiesID) -> ^AnimationDecoder ---
|
||||
GetAnimationDecoderProperties :: proc(decoder: ^AnimationDecoder) -> SDL.PropertiesID ---
|
||||
GetAnimationDecoderFrame :: proc(decoder: ^AnimationDecoder, frame: ^^SDL.Surface, duration: ^u64) -> c.bool ---
|
||||
GetAnimationDecoderStatus :: proc(decoder: ^AnimationDecoder) -> AnimationDecoderStatus ---
|
||||
ResetAnimationDecoder :: proc(decoder: ^AnimationDecoder) -> c.bool ---
|
||||
CloseAnimationDecoder :: proc(decoder: ^AnimationDecoder) -> c.bool ---
|
||||
|
||||
/* Individual loading functions */
|
||||
LoadANIAnimation_IO :: proc(src: ^SDL.IOStream) -> ^Animation ---
|
||||
LoadAPNGAnimation_IO :: proc(src: ^SDL.IOStream) -> ^Animation ---
|
||||
LoadAVIFAnimation_IO :: proc(src: ^SDL.IOStream) -> ^Animation ---
|
||||
LoadGIFAnimation_IO :: proc(src: ^SDL.IOStream) -> ^Animation ---
|
||||
LoadWEBPAnimation_IO :: proc(src: ^SDL.IOStream) -> ^Animation ---
|
||||
|
||||
/* Individual saving functions */
|
||||
SaveANIAnimation_IO :: proc(anim: ^Animation, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveAPNGAnimation_IO :: proc(anim: ^Animation, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveAVIFAnimation_IO :: proc(anim: ^Animation, dst: ^SDL.IOStream, closeio: bool, quality: c.int) -> c.bool ---
|
||||
SaveGIFAnimation_IO :: proc(anim: ^Animation, dst: ^SDL.IOStream, closeio: bool) -> c.bool ---
|
||||
SaveWEBPAnimation_IO :: proc(anim: ^Animation, dst: ^SDL.IOStream, closeio: bool, quality: c.int) -> c.bool ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user