Module: SDL2::Image

Extended by:
FFI::Library
Defined in:
lib/sdl2/image.rb,
lib/sdl2/image/sdl_image_module.rb

Constant Summary collapse

SDL_IMAGE_MODULE =
['libSDL2_image', '/usr/local/lib/libSDL2_image.so']

Class Method Summary collapse

Class Method Details

.api(func_name, args, type) ⇒ Object



13
14
15
16
17
18
# File 'lib/sdl2/image.rb', line 13

def self.api(func_name, args, type)
  camelCaseName = func_name.to_s.gsub('IMG_', '')
  methodName = ActiveSupport::Inflector.underscore(camelCaseName).to_sym
  self.attach_function methodName, func_name, args, type
  return methodName
end