14#ifndef PYTHONCALLBACKOBJECT_H
15#define PYTHONCALLBACKOBJECT_H
30 PythonCallbackObject(PyObject *function = Py_None);
31 virtual ~PythonCallbackObject();
32 ALLOC_DELETED_CHAIN(PythonCallbackObject);
34 void set_function(PyObject *function);
35 PyObject *get_function();
37 MAKE_PROPERTY(function, get_function, set_function);
43 void do_python_callback(CallbackData *cbdata);
48 static TypeHandle get_class_type() {
51 static void init_type() {
52 CallbackObject::init_type();
54 CallbackObject::get_class_type());
56 virtual TypeHandle get_type()
const {
57 return get_class_type();
59 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
62 static TypeHandle _type_handle;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic object that can be assigned to a callback at various points in the rendering proces...
virtual void do_callback(CallbackData *cbdata)
This method called when the callback is triggered; it *replaces* the original function.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...