misha-ruby-sdl-ffi 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/ChangeLog.txt +2441 -0
- data/NEWS.rdoc +77 -0
- data/README.rdoc +84 -0
- data/lib/ruby-sdl-ffi.rb +56 -0
- data/lib/ruby-sdl-ffi/gfx.rb +56 -0
- data/lib/ruby-sdl-ffi/gfx/blitfunc.rb +56 -0
- data/lib/ruby-sdl-ffi/gfx/framerate.rb +51 -0
- data/lib/ruby-sdl-ffi/gfx/imagefilter.rb +176 -0
- data/lib/ruby-sdl-ffi/gfx/primitives.rb +251 -0
- data/lib/ruby-sdl-ffi/gfx/rotozoom.rb +108 -0
- data/lib/ruby-sdl-ffi/image.rb +90 -0
- data/lib/ruby-sdl-ffi/mixer.rb +215 -0
- data/lib/ruby-sdl-ffi/sdl.rb +81 -0
- data/lib/ruby-sdl-ffi/sdl/audio.rb +139 -0
- data/lib/ruby-sdl-ffi/sdl/cdrom.rb +87 -0
- data/lib/ruby-sdl-ffi/sdl/core.rb +129 -0
- data/lib/ruby-sdl-ffi/sdl/event.rb +375 -0
- data/lib/ruby-sdl-ffi/sdl/joystick.rb +73 -0
- data/lib/ruby-sdl-ffi/sdl/keyboard.rb +76 -0
- data/lib/ruby-sdl-ffi/sdl/keysyms.rb +282 -0
- data/lib/ruby-sdl-ffi/sdl/mac.rb +446 -0
- data/lib/ruby-sdl-ffi/sdl/mouse.rb +106 -0
- data/lib/ruby-sdl-ffi/sdl/mutex.rb +57 -0
- data/lib/ruby-sdl-ffi/sdl/rwops.rb +137 -0
- data/lib/ruby-sdl-ffi/sdl/timer.rb +47 -0
- data/lib/ruby-sdl-ffi/sdl/video.rb +513 -0
- data/lib/ruby-sdl-ffi/ttf.rb +257 -0
- metadata +96 -0
data/NEWS.rdoc
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
= NEWS
|
2
|
+
|
3
|
+
== Ruby-SDL-FFI 0.4
|
4
|
+
|
5
|
+
* Fixed the display window not gaining focus on Mac OS X 10.6.
|
6
|
+
Thanks to Bart Leusink for fixing this.
|
7
|
+
|
8
|
+
* Added SDL::SaveBMP and SDL::LoadBMP methods. These were convenience
|
9
|
+
macros defined in the SDL headers. They have been reimplemented as
|
10
|
+
Ruby methods by Bart Leusink.
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
== Ruby-SDL-FFI 0.3
|
15
|
+
|
16
|
+
* Ruby-SDL-FFI can now work on Mac OS X without the need for a special
|
17
|
+
interpreter (i.e. rsdl). If this causes issues for you, you can
|
18
|
+
disable it by setting the RUBYSDLFFI_NOCOCOA environment variable to
|
19
|
+
"true".
|
20
|
+
|
21
|
+
* Added the SDL::set_app_name() method. This sets the application name
|
22
|
+
in a platform-appropriate way, or does nothing if the platform is
|
23
|
+
not supported. On Mac OS X, it changes the text in the menu bar.
|
24
|
+
Support for other platforms may be added in the future.
|
25
|
+
|
26
|
+
* Ruby-SDL-FFI now reads the RUBYSDLFFI_PATH environment variable for
|
27
|
+
additional library load paths. It should be a colon-separated
|
28
|
+
(Linux/Mac) or semicolon-separated (Windows) list of directories to
|
29
|
+
search for libraries.
|
30
|
+
|
31
|
+
* The SDL::Palette class is now Enumerable. You can iterate over it
|
32
|
+
with #each, #collect, etc. You can also read a specific index using
|
33
|
+
#at (but not #[], which is reserved for struct access).
|
34
|
+
|
35
|
+
* SDL.GL_GetAttribute() now returns an integer, like it should.
|
36
|
+
Before, it would return an FFI::Buffer.
|
37
|
+
|
38
|
+
* SDL.GetKeyRepeat() is now easier to use. It returns an Array of two
|
39
|
+
integers: [delay, interval]. Before, you had to pass two output
|
40
|
+
buffers, then extract the integers afterwards.
|
41
|
+
|
42
|
+
* Fixed a NoMethodError in SDL.WaitEvent().
|
43
|
+
|
44
|
+
* Ruby-SDL-FFI now uses FFI::Buffer instead of FFI::MemoryPointer in
|
45
|
+
many places. This should give a slight performance boost on JRuby,
|
46
|
+
and potentially other platforms.
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
== Ruby-SDL-FFI 0.2
|
51
|
+
|
52
|
+
* The values of SDL::AUDIO_U16SYS and SDL::AUDIO_S16SYS are now
|
53
|
+
correct on both big-endian and little-endian systems.
|
54
|
+
|
55
|
+
* SDL::Gfx::arcRGBA is now considered optional (as it should have been
|
56
|
+
in version 0.1). Loading will continue even if it is not available,
|
57
|
+
such as when using older versions of SDL_gfx.
|
58
|
+
|
59
|
+
* The minimum supported version of SDL_gfx is now 2.0.13. It was
|
60
|
+
2.0.17 before.
|
61
|
+
|
62
|
+
* SDL::Gfx::rotozoomSurfaceXY and SDL::Gfx::rotozoomSurfaceSizeXY are
|
63
|
+
no longer considered optional, because they are available in all
|
64
|
+
supported versions of SDL_gfx (2.0.13 and higher).
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
== Ruby-SDL-FFI 0.1
|
69
|
+
|
70
|
+
* Initial release of Ruby-SDL-FFI. Bindings are provided for these
|
71
|
+
libraries (older versions may work, but haven't been tested):
|
72
|
+
|
73
|
+
* SDL >= 1.2.13
|
74
|
+
* SDL_gfx >= 2.0.17
|
75
|
+
* SDL_image >= 1.2.7
|
76
|
+
* SDL_mixer >= 1.2.8
|
77
|
+
* SDL_ttf >= 2.0.9
|
data/README.rdoc
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
|
2
|
+
= Ruby-SDL-FFI
|
3
|
+
|
4
|
+
Version:: 0.4
|
5
|
+
Date:: 2011-03-06
|
6
|
+
|
7
|
+
Homepage:: http://github.com/rubygame/ruby-sdl-ffi/
|
8
|
+
Author:: John Croisant <jacius@gmail.com>
|
9
|
+
Copyright:: 2009-2011 John Croisant
|
10
|
+
|
11
|
+
|
12
|
+
== Description
|
13
|
+
|
14
|
+
Ruby-SDL-FFI is a low-level binding to SDL [1] and related
|
15
|
+
libraries using Ruby-FFI [2] or compatible FFI APIs, such as
|
16
|
+
JRuby's. It provides very basic access to SDL from Ruby [3]
|
17
|
+
without the need for a compiled C wrapper. It aims to be
|
18
|
+
platform and Ruby implementation independent.
|
19
|
+
|
20
|
+
Ruby-SDL-FFI does not attempt to provide any high-level
|
21
|
+
functionality, only to mirror the standard SDL interface.
|
22
|
+
For higher-level functionality, you should use other
|
23
|
+
libraries (Rubygame [4], Gosu [5], etc.).
|
24
|
+
|
25
|
+
1. SDL: http://www.libsdl.org/
|
26
|
+
2. Ruby-FFI: http://github.com/ffi/ffi
|
27
|
+
3. Ruby: http://www.ruby-lang.org/en/
|
28
|
+
4. Rubygame: http://rubygame.org/
|
29
|
+
5. Gosu: http://www.libgosu.org/
|
30
|
+
|
31
|
+
|
32
|
+
== Caveats
|
33
|
+
|
34
|
+
Ruby-SDL-FFI is still in EARLY DEVELOPMENT STAGES. That means:
|
35
|
+
|
36
|
+
* It may not work correctly (or at all).
|
37
|
+
* It may not be complete.
|
38
|
+
* It may change drastically with no advanced notice.
|
39
|
+
|
40
|
+
As such, this library is currently FOR THE ADVENTUROUS ONLY.
|
41
|
+
If you are not willing to continuously update your code to
|
42
|
+
match the new API, then you should wait until Ruby-SDL-FFI is
|
43
|
+
more mature and stable (i.e. version 1.0+).
|
44
|
+
|
45
|
+
|
46
|
+
== Requirements
|
47
|
+
|
48
|
+
* SDL >= 1.2.13
|
49
|
+
* Nice-FFI >= 0.2.0
|
50
|
+
|
51
|
+
Optional:
|
52
|
+
|
53
|
+
* SDL_image >= 1.2.7
|
54
|
+
* SDL_gfx >= 2.0.13
|
55
|
+
* SDL_mixer >= 1.2.8
|
56
|
+
* SDL_ttf >= 2.0.9
|
57
|
+
|
58
|
+
Ruby-SDL-FFI may work with older versions, but hasn't been tried on them.
|
59
|
+
|
60
|
+
|
61
|
+
== License
|
62
|
+
|
63
|
+
Ruby-SDL-FFI is licensed under the following terms (the "MIT License"):
|
64
|
+
|
65
|
+
Copyright (c) 2009-2011 John Croisant
|
66
|
+
|
67
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
68
|
+
a copy of this software and associated documentation files (the
|
69
|
+
"Software"), to deal in the Software without restriction, including
|
70
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
71
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
72
|
+
permit persons to whom the Software is furnished to do so, subject to
|
73
|
+
the following conditions:
|
74
|
+
|
75
|
+
The above copyright notice and this permission notice shall be
|
76
|
+
included in all copies or substantial portions of the Software.
|
77
|
+
|
78
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
79
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
80
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
81
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
82
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
83
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
84
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/ruby-sdl-ffi.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
#--
|
2
|
+
#
|
3
|
+
# This file is one part of:
|
4
|
+
#
|
5
|
+
# Ruby-SDL-FFI - Ruby-FFI bindings to SDL
|
6
|
+
#
|
7
|
+
# Copyright (c) 2009, 2010 John Croisant
|
8
|
+
#
|
9
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
10
|
+
# a copy of this software and associated documentation files (the
|
11
|
+
# "Software"), to deal in the Software without restriction, including
|
12
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
13
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
15
|
+
# the following conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be
|
18
|
+
# included in all copies or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
23
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
24
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
25
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
26
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
|
+
#
|
28
|
+
#++
|
29
|
+
|
30
|
+
|
31
|
+
this_dir = File.expand_path( File.dirname(__FILE__) )
|
32
|
+
|
33
|
+
|
34
|
+
# sdl.rb is absolutely required. If it fails, don't catch the error.
|
35
|
+
require File.join( this_dir, 'ruby-sdl-ffi', 'sdl' )
|
36
|
+
|
37
|
+
|
38
|
+
# The others are "optional", so just give a warning if they fail.
|
39
|
+
# Users who really need them should load them directly, with
|
40
|
+
# e.g. 'require "ruby-sdl-ffi/gfx"'.
|
41
|
+
%w{
|
42
|
+
|
43
|
+
image
|
44
|
+
ttf
|
45
|
+
mixer
|
46
|
+
gfx
|
47
|
+
|
48
|
+
}.each do |f|
|
49
|
+
|
50
|
+
begin
|
51
|
+
require File.join( this_dir, 'ruby-sdl-ffi', f )
|
52
|
+
rescue LoadError => e
|
53
|
+
warn "Warning: " + e.message
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#--
|
2
|
+
#
|
3
|
+
# This file is one part of:
|
4
|
+
#
|
5
|
+
# Ruby-SDL-FFI - Ruby-FFI bindings to SDL
|
6
|
+
#
|
7
|
+
# Copyright (c) 2009 John Croisant
|
8
|
+
#
|
9
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
10
|
+
# a copy of this software and associated documentation files (the
|
11
|
+
# "Software"), to deal in the Software without restriction, including
|
12
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
13
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
15
|
+
# the following conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be
|
18
|
+
# included in all copies or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
23
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
24
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
25
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
26
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
|
+
#
|
28
|
+
#++
|
29
|
+
|
30
|
+
|
31
|
+
this_dir = File.expand_path( File.dirname(__FILE__) )
|
32
|
+
|
33
|
+
|
34
|
+
require File.join( this_dir, "sdl" )
|
35
|
+
|
36
|
+
|
37
|
+
module SDL
|
38
|
+
module Gfx
|
39
|
+
extend NiceFFI::Library
|
40
|
+
load_library "SDL_gfx", SDL::LOAD_PATHS
|
41
|
+
|
42
|
+
def self.sdl_func( name, args, ret )
|
43
|
+
func name, "SDL_#{name}", args, ret
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
%w{
|
49
|
+
framerate
|
50
|
+
blitfunc
|
51
|
+
primitives
|
52
|
+
imagefilter
|
53
|
+
rotozoom
|
54
|
+
}.each do |f|
|
55
|
+
require File.join( this_dir, "gfx", f )
|
56
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#--
|
2
|
+
#
|
3
|
+
# This file is one part of:
|
4
|
+
#
|
5
|
+
# Ruby-SDL-FFI - Ruby-FFI bindings to SDL
|
6
|
+
#
|
7
|
+
# Copyright (c) 2009 John Croisant
|
8
|
+
#
|
9
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
10
|
+
# a copy of this software and associated documentation files (the
|
11
|
+
# "Software"), to deal in the Software without restriction, including
|
12
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
13
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
15
|
+
# the following conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be
|
18
|
+
# included in all copies or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
23
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
24
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
25
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
26
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
|
+
#
|
28
|
+
#++
|
29
|
+
|
30
|
+
|
31
|
+
module SDL
|
32
|
+
module Gfx
|
33
|
+
|
34
|
+
optfunc :BlitRGBA, "SDL_gfxBlitRGBA",
|
35
|
+
[ :pointer, :pointer, :pointer, :pointer ], :int
|
36
|
+
|
37
|
+
optfunc :SetAlpha, "SDL_gfxSetAlpha", [ :pointer, :uint8 ], :int
|
38
|
+
|
39
|
+
|
40
|
+
class BlitInfo < NiceFFI::Struct
|
41
|
+
layout( :s_pixels, :pointer,
|
42
|
+
:s_width, :int,
|
43
|
+
:s_height, :int,
|
44
|
+
:s_skip, :int,
|
45
|
+
:d_pixels, :pointer,
|
46
|
+
:d_width, :int,
|
47
|
+
:d_height, :int,
|
48
|
+
:d_skip, :int,
|
49
|
+
:aux_data, :pointer,
|
50
|
+
:src, SDL::PixelFormat.typed_pointer,
|
51
|
+
:table, :pointer,
|
52
|
+
:dst, SDL::PixelFormat.typed_pointer )
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#--
|
2
|
+
#
|
3
|
+
# This file is one part of:
|
4
|
+
#
|
5
|
+
# Ruby-SDL-FFI - Ruby-FFI bindings to SDL
|
6
|
+
#
|
7
|
+
# Copyright (c) 2009 John Croisant
|
8
|
+
#
|
9
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
10
|
+
# a copy of this software and associated documentation files (the
|
11
|
+
# "Software"), to deal in the Software without restriction, including
|
12
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
13
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
15
|
+
# the following conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be
|
18
|
+
# included in all copies or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
23
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
24
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
25
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
26
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
|
+
#
|
28
|
+
#++
|
29
|
+
|
30
|
+
|
31
|
+
module SDL
|
32
|
+
module Gfx
|
33
|
+
|
34
|
+
FPS_UPPER_LIMIT = 200
|
35
|
+
FPS_LOWER_LIMIT = 1
|
36
|
+
FPS_DEFAULT = 30
|
37
|
+
|
38
|
+
class FPSmanager < NiceFFI::Struct
|
39
|
+
layout( :framecount, :uint32,
|
40
|
+
:rateticks, :float,
|
41
|
+
:lastticks, :uint32,
|
42
|
+
:rate, :uint32 )
|
43
|
+
end
|
44
|
+
|
45
|
+
sdl_func :initFramerate, [ :pointer ], :void
|
46
|
+
sdl_func :setFramerate, [ :pointer, :int ], :int
|
47
|
+
sdl_func :getFramerate, [ :pointer ], :int
|
48
|
+
sdl_func :framerateDelay, [ :pointer ], :void
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,176 @@
|
|
1
|
+
#--
|
2
|
+
#
|
3
|
+
# This file is one part of:
|
4
|
+
#
|
5
|
+
# Ruby-SDL-FFI - Ruby-FFI bindings to SDL
|
6
|
+
#
|
7
|
+
# Copyright (c) 2009 John Croisant
|
8
|
+
#
|
9
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
10
|
+
# a copy of this software and associated documentation files (the
|
11
|
+
# "Software"), to deal in the Software without restriction, including
|
12
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
13
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
15
|
+
# the following conditions:
|
16
|
+
#
|
17
|
+
# The above copyright notice and this permission notice shall be
|
18
|
+
# included in all copies or substantial portions of the Software.
|
19
|
+
#
|
20
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
23
|
+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
24
|
+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
25
|
+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
26
|
+
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27
|
+
#
|
28
|
+
#++
|
29
|
+
|
30
|
+
|
31
|
+
module SDL
|
32
|
+
module Gfx
|
33
|
+
|
34
|
+
sdl_func :imageFilterMMXdetect, [ ], :int
|
35
|
+
sdl_func :imageFilterMMXoff, [ ], :void
|
36
|
+
sdl_func :imageFilterMMXon, [ ], :void
|
37
|
+
|
38
|
+
|
39
|
+
sdl_func :imageFilterAdd,
|
40
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
41
|
+
|
42
|
+
sdl_func :imageFilterMean,
|
43
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
44
|
+
|
45
|
+
sdl_func :imageFilterSub,
|
46
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
47
|
+
|
48
|
+
sdl_func :imageFilterAbsDiff,
|
49
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
50
|
+
|
51
|
+
sdl_func :imageFilterMult,
|
52
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
53
|
+
|
54
|
+
sdl_func :imageFilterMultNor,
|
55
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
56
|
+
|
57
|
+
sdl_func :imageFilterMultDivby2,
|
58
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
59
|
+
|
60
|
+
sdl_func :imageFilterMultDivby4,
|
61
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
62
|
+
|
63
|
+
sdl_func :imageFilterBitAnd,
|
64
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
65
|
+
|
66
|
+
sdl_func :imageFilterBitOr,
|
67
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
68
|
+
|
69
|
+
sdl_func :imageFilterDiv,
|
70
|
+
[ :pointer, :pointer, :pointer, :int ], :int
|
71
|
+
|
72
|
+
sdl_func :imageFilterBitNegation,
|
73
|
+
[ :pointer, :pointer, :int ], :int
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
sdl_func :imageFilterAddByte,
|
78
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
79
|
+
|
80
|
+
sdl_func :imageFilterAddUint,
|
81
|
+
[ :pointer, :pointer, :int, :uint ], :int
|
82
|
+
|
83
|
+
sdl_func :imageFilterAddByteToHalf,
|
84
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
85
|
+
|
86
|
+
|
87
|
+
sdl_func :imageFilterSubByte,
|
88
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
89
|
+
|
90
|
+
sdl_func :imageFilterSubUint,
|
91
|
+
[ :pointer, :pointer, :int, :uint ], :int
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
sdl_func :imageFilterShiftRight,
|
96
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
97
|
+
|
98
|
+
sdl_func :imageFilterShiftRightUint,
|
99
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
sdl_func :imageFilterMultByByte,
|
104
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
105
|
+
|
106
|
+
sdl_func :imageFilterShiftRightAndMultByByte,
|
107
|
+
[ :pointer, :pointer, :int, :uchar, :uchar ], :int
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
sdl_func :imageFilterShiftLeftByte,
|
112
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
113
|
+
|
114
|
+
sdl_func :imageFilterShiftLeftUint,
|
115
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
116
|
+
|
117
|
+
sdl_func :imageFilterShiftLeft,
|
118
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
sdl_func :imageFilterBinarizeUsingThreshold,
|
123
|
+
[ :pointer, :pointer, :int, :uchar ], :int
|
124
|
+
|
125
|
+
|
126
|
+
sdl_func :imageFilterClipToRange,
|
127
|
+
[ :pointer, :pointer, :int, :uchar, :uchar ], :int
|
128
|
+
|
129
|
+
|
130
|
+
sdl_func :imageFilterNormalizeLinear,
|
131
|
+
[ :pointer, :pointer, :int, :int, :int, :int, :int ], :int
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
sdl_func :imageFilterConvolveKernel3x3Divide,
|
136
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
137
|
+
|
138
|
+
sdl_func :imageFilterConvolveKernel5x5Divide,
|
139
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
140
|
+
|
141
|
+
sdl_func :imageFilterConvolveKernel7x7Divide,
|
142
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
143
|
+
|
144
|
+
sdl_func :imageFilterConvolveKernel9x9Divide,
|
145
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
sdl_func :imageFilterConvolveKernel3x3ShiftRight,
|
150
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
151
|
+
|
152
|
+
sdl_func :imageFilterConvolveKernel5x5ShiftRight,
|
153
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
154
|
+
|
155
|
+
sdl_func :imageFilterConvolveKernel7x7ShiftRight,
|
156
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
157
|
+
|
158
|
+
sdl_func :imageFilterConvolveKernel9x9ShiftRight,
|
159
|
+
[ :pointer, :pointer, :int, :int, :pointer, :uchar ], :int
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
sdl_func :imageFilterSobelX,
|
164
|
+
[ :pointer, :pointer, :int, :int ], :int
|
165
|
+
|
166
|
+
sdl_func :imageFilterSobelXShiftRight,
|
167
|
+
[ :pointer, :pointer, :int, :int, :uchar ], :int
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
sdl_func :imageFilterAlignStack, [ ], :void
|
172
|
+
sdl_func :imageFilterRestoreStack, [ ], :void
|
173
|
+
|
174
|
+
|
175
|
+
end
|
176
|
+
end
|