class

OpenGLBindingGenerator::Crystal::Function

Inherits OpenGLBindingGenerator::Crystalize < OpenGLBindingGenerator::Crystal::LibDefinition < Reference < Object

A C function that can be called in Crystal.

Constructors

new(name : String, type : Type, parameters : Enumerable(Parameter) = [] of Parameter, comment : String | Nil = nil)

Creates the C function definition. The c_name is the name of the function as it appears in C. A crystal_name can be specified to provide a friendlier name.

Source

Instance methods

comment

Optional comment.

Source
comment?

Optional comment.

Source
crystalize(namespace = nil)

Default casing is underscore-case.

Source
name

Name of the function as it appears in C.

Source
parameters

Parameter list.

Source
to_s(__io__ : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
type

Return type.

Source