-
Notifications
You must be signed in to change notification settings - Fork 182
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
Return previous callbacks #76
Conversation
Let me know when this is ready for review, there are still a few issues to be fixed:
$ go build
# github.com/go-gl/glfw3
./input.go:367: undefined: old
./input.go:387: cannot use w.fCharHolder (type func(*Window, rune)) as type CharacterCallback in assignment
./input.go:388: cannot use cbfun (type CharacterCallback) as type func(*Window, rune) in assignment
./input.go:394: undefined: old
./input.go:417: undefined: old
./input.go:438: undefined: old
./input.go:454: undefined: old
./input.go:469: undefined: old
./input.go:484: undefined: old Once all those things are done, ideally this PR can be squashed into one or two commits. Sorry about being very picky, this is one of my most favorite Go packages so I have really high standards for it. :D |
What do you mean by "func returns were removed"? |
👍 on the pickiness! |
I think I got everything. I can't build it because I'm on the old glfw so please let me know if there are any other problems. |
I did just force again to squash in the "Make consistent spacing" commit. |
We should also probably modify the documentation. Maybe we can add a line saying that it returns the previous callback func. @shurcooL I meant callback funcs |
@pwaller The latest version compiles successfully and I'm not seeing any remaining problems. Thanks! @tapir I'm not sure what you mean. In both 3.0.4 and latest master, glfw does return previous callback. See here. So I'm not seeing which callback funcs were removed? Or did you mean "not added to glfw3 the Go library"? |
And yes, adding something to the docs would be appropriate.
I'm not sure if the "or an error occurred" part applies from GLFW. |
@shurcooL My bad, I thought glfw changed it from 2.7 to 3.x but it was me who missed it. Nice catch. |
Other than docs, this has +1 from me to merge (and I'll mirror it at github.com/shurcooL/glfw3). |
Once the docs are there I think we can merge it. Looks good. |
Ubuntu, at this date, is still on GLFW 2.7, so I think we should not bother ourselves with it. GLFW is very easy to build from source. |
@pwaller That's pretty much it. |
I think let's get this one going. I'm planning to do a complete documentation sweep anyway. I can put it afterwards. |
Hm, I thought I had finished this one off. I think I must have left uncommitted or unpushed code on a machine I don't have access to for a bit. But it isn't a big deal, so if you would just do it in passing then that's fine. |
A second attempt of #75, but this time against the right branch.