pancurses
pancurses copied to clipboard
Added pad support
There is no pad type currently in pancurses, but there is in ncurses. Some applications may need to use this type (in fact, I'm writing one that uses it, and that's why I created this pull request). I added a few methods/functions to provide support for it.
What would be great is if the compiler already told us when we're trying to call the wrong functions, that would require a bit more renovation to the types though so it's outside of the scope of this pull request.
Could you add some logging to the cases where the wrong functions are called? It should emit a warning that the call will have no effect so that developers would catch that problem faster.
I'll certainly add logging in the new functions, that is one thing I haven't thought about :-).
I thought about the type problem before, but I haven't really understand how pads work and how they are related to normal windows. I saw that in ncurses the newpad function and the newwin function both return the WINDOW struct, so I thought that it might be more appropriate to just merge them. But I'll try to think about it.