comparison template/dw.c @ 2584:2acc7ba5dea0

Add HTIMER type and change dw_timer_() functions to use it. On existing platforms, HTIMER will be int for now allowing API backward compatibility. On new platforms, iOS and Android, these will be pointers to the timer objects. This allows simplifying the code paths on those platforms. May change it on other platforms such as Mac in a future major version.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 23 May 2021 21:39:25 +0000
parents 457c91634881
children 9be24001d288
comparison
equal deleted inserted replaced
2583:1d2f5c4eccc5 2584:2acc7ba5dea0
3128 * sigfunc: The pointer to the function to be used as the callback. 3128 * sigfunc: The pointer to the function to be used as the callback.
3129 * data: User data to be passed to the handler function. 3129 * data: User data to be passed to the handler function.
3130 * Returns: 3130 * Returns:
3131 * Timer ID for use with dw_timer_disconnect(), 0 on error. 3131 * Timer ID for use with dw_timer_disconnect(), 0 on error.
3132 */ 3132 */
3133 int API dw_timer_connect(int interval, void *sigfunc, void *data) 3133 HTIMER API dw_timer_connect(int interval, void *sigfunc, void *data)
3134 { 3134 {
3135 return 0; 3135 return 0;
3136 } 3136 }
3137 3137
3138 /* 3138 /*
3139 * Removes timer callback. 3139 * Removes timer callback.
3140 * Parameters: 3140 * Parameters:
3141 * id: Timer ID returned by dw_timer_connect(). 3141 * id: Timer ID returned by dw_timer_connect().
3142 */ 3142 */
3143 void API dw_timer_disconnect(int timerid) 3143 void API dw_timer_disconnect(HTIMER timerid)
3144 { 3144 {
3145 } 3145 }
3146 3146
3147 /* 3147 /*
3148 * Add a callback to a window event. 3148 * Add a callback to a window event.