onscreen: Make the resize callback work the same as the frame callback

When adding the frame callback API in 70040166 we decided on a common
idiom for adding callbacks which would return an opaque pointer
representing the closure for the callback. This pointer can then be
used to later remove the callback. The closure can also contain an
optional callback to invoke when the user data parameter is destroyed.
The resize callback didn't work this way and instead had an integer
handle to identify the closure. This patch changes it to work the same
way as the frame callback.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 33164c4b04d253ebe0ff41b12c1e90232c519274)
This commit is contained in:
Neil Roberts
2013-04-04 20:25:42 +01:00
committed by Robert Bragg
parent b01e0e6a48
commit 816a5bc437
5 changed files with 81 additions and 69 deletions

View File

@ -609,6 +609,12 @@ CoglFrameClosure
cogl_onscreen_add_frame_callback
cogl_onscreen_remove_frame_callback
<SUBSECTION>
CoglOnscreenResizeCallback
CoglOnscreenResizeClosure
cogl_onscreen_add_resize_callback
cogl_onscreen_remove_resize_callback
<SUBSECTION>
cogl_onscreen_swap_buffers
cogl_onscreen_swap_region