Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pad support #42

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Added pad support #42

wants to merge 3 commits into from

Conversation

crides
Copy link

@crides crides commented Apr 10, 2018

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.

@ihalila
Copy link
Owner

ihalila commented Apr 15, 2018

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.

@crides
Copy link
Author

crides commented Apr 15, 2018

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.

When Calling the wrong function, like calling refresh() on a
pad or calling prefresh() on a window, a warning would be logged and
nothing would be done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants