bindings/python/my_extra_api_definitions.py
changeset 4654 2eaebe77d66b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/bindings/python/my_extra_api_definitions.py	Sat Jul 04 08:15:48 2009 +0200
     1.3 @@ -0,0 +1,13 @@
     1.4 +from pybindgen import Module, FileCodeSink, write_preamble, param, retval
     1.5 +
     1.6 +def register_types(module):
     1.7 +    module.add_class('MyClass')
     1.8 +    
     1.9 +def register_methods(root_module):
    1.10 +    MyClass = root_module['MyClass']
    1.11 +    MyClass.add_constructor([], visibility='public')
    1.12 +    MyClass.add_constructor([param('double', 's'), param('double', 'l'), param('double', 'mean')], visibility='public')
    1.13 +
    1.14 +def register_functions(module):
    1.15 +    module.add_function('SomeFunction', 'int', [param('int', 'xpto')])
    1.16 +