Mercurial > dwindows
comparison gtk/dw.c @ 199:b955228477b3
Removed the window parameter to dw_timer_connect() it was no needed.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 20 Jan 2003 20:21:06 +0000 |
parents | 11b5da6196c2 |
children | 9f87ad1572eb |
comparison
equal
deleted
inserted
replaced
198:11b5da6196c2 | 199:b955228477b3 |
---|---|
7065 * sigfunc: The pointer to the function to be used as the callback. | 7065 * sigfunc: The pointer to the function to be used as the callback. |
7066 * data: User data to be passed to the handler function. | 7066 * data: User data to be passed to the handler function. |
7067 * Returns: | 7067 * Returns: |
7068 * Timer ID for use with dw_timer_disconnect(), 0 on error. | 7068 * Timer ID for use with dw_timer_disconnect(), 0 on error. |
7069 */ | 7069 */ |
7070 int API dw_timer_connect(HWND window, int interval, void *sigfunc, void *data) | 7070 int API dw_timer_connect(int interval, void *sigfunc, void *data) |
7071 { | 7071 { |
7072 int tag, _locked_by_me = FALSE; | 7072 int tag, _locked_by_me = FALSE; |
7073 char buf[100]; | |
7074 | |
7075 if(!window) | |
7076 return 0; | |
7077 | 7073 |
7078 DW_MUTEX_LOCK; | 7074 DW_MUTEX_LOCK; |
7079 tag = gtk_timeout_add(interval, (GtkFunction)sigfunc, data); | 7075 tag = gtk_timeout_add(interval, (GtkFunction)sigfunc, data); |
7080 sprintf(buf, "_dw_timer%d", tag); | |
7081 gtk_object_set_data(GTK_OBJECT(window), buf, (gpointer)tag); | |
7082 DW_MUTEX_UNLOCK; | 7076 DW_MUTEX_UNLOCK; |
7083 return tag; | 7077 return tag; |
7084 } | 7078 } |
7085 | 7079 |
7086 /* | 7080 /* |