summaryrefslogtreecommitdiffhomepage
path: root/sample.config.rb
blob: 91d883b3bd20b9220b2be3d2320c7e2b25e90648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'felbind'

FelBind::Config.set('Raylib') do |config|
  # what namespace to make the bindings under
  config.namespace = 'Raylib'

  config.func('DrawLineV') << {
    # use vars inside of the struc as params rather then the struct
    # as a param and place them into a struct later when passing into func
    # this avoids using mruby struct wrapping
    dont_wrap: ['color'],

    # default setting, converts functions names to snakecase
    ruby_name_conversion: true
  }

  config.func('DrawText') << {
    # will be under Raylib::String because of namespace
    define_under_module: 'String',

    # default(because of ruby_name_conversion)
    override_func_name: 'draw_text' 
  }

  config.func('DrawRectangleRec') << {
    # define as a function used by Rectangle objects
    define_under_obj: 'Raylib::Rectangle',

    # Unwrap "self" rather then accept a parameter
    use_self_for: 'rec'
  }

  # do not bind these at all
  config.func_ignore << [
    'TextCopy',
    'TextIsEqual',
    'TextLength'
  ]

  config.struct_ignore << [
    'Vector3'
  ]
end