danyalzia / DIrrlicht

D Bindings of Irrlicht Engine
Other
7 stars 1 forks source link

Use extern (C++) for pure virtual classes like IEventReceiver #4

Open danyalzia opened 10 years ago

danyalzia commented 10 years ago

As D has capabilities to interface directly with C++ virtual classes, it makes sense to use it for those classes that doesn't expose pointer to it through other class such as IEventReceiver. We need to create a class in D that inherit from exten (C++) IEventReceiver and then make it a base class for EventReceiver. That's the only way to support GUI events. As using DSFML/SDL events through postEventFromUser for GUI is ugly.