diff options
Diffstat (limited to 'doc/EventHndlr.3')
-rw-r--r-- | doc/EventHndlr.3 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/EventHndlr.3 b/doc/EventHndlr.3 index a2cbf8d..128f8ee 100644 --- a/doc/EventHndlr.3 +++ b/doc/EventHndlr.3 @@ -9,7 +9,7 @@ .so man.macros .BS .SH NAME -Tk_CreateEventHandler, Tk_DeleteEventHandler \- associate procedure callback with an X event +Tk_CreateEventHandler, Tk_DeleteEventHandler, Tk_GetButtonMask, Tk_SendVirtualEvent \- associate procedure callback with an X event .SH SYNOPSIS .nf \fB#include <tk.h>\fR @@ -17,8 +17,18 @@ Tk_CreateEventHandler, Tk_DeleteEventHandler \- associate procedure callback wit \fBTk_CreateEventHandler\fR(\fItkwin, mask, proc, clientData\fR) .sp \fBTk_DeleteEventHandler\fR(\fItkwin, mask, proc, clientData\fR) +.sp +\fBTk_GetButtonMask\fR(\fIbutton\fR) +.sp +\fBTk_SendVirtualEvent\fR(\fItkwin, eventName, detail\fR) .SH ARGUMENTS .AS "unsigned long" clientData +.AP unsigned button in +Button number. +.AP "const char" *eventName in +The name of the virtual event. +.AP Tcl_Obj *detail in +Detail information for the virtual event. .AP Tk_Window tkwin in Token for window in which events may occur. .AP "unsigned long" mask in @@ -27,7 +37,7 @@ for which \fIproc\fR should be called. .AP Tk_EventProc *proc in Procedure to invoke whenever an event in \fImask\fR occurs in the window given by \fItkwin\fR. -.AP ClientData clientData in +.AP void *clientData in Arbitrary one-word value to pass to \fIproc\fR. .BE .SH DESCRIPTION @@ -45,7 +55,7 @@ call \fBTk_HandleEvent\fR, such as \fBTcl_DoOneEvent\fR or type \fBTk_EventProc\fR: .CS typedef void \fBTk_EventProc\fR( - ClientData \fIclientData\fR, + void *\fIclientData\fR, XEvent *\fIeventPtr\fR); .CE The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR @@ -71,5 +81,10 @@ automatically; in this case there is no need to call If multiple handlers are declared for the same type of X event on the same window, then the handlers will be invoked in the order they were created. +.PP +\fBTk_GetButtonMask\fR returns the button mask corresponding to +the button. E.g it will return \fIButton1Mask\fR for button \fIButton1\fR. +.PP +\fBTk_SendVirtualEvent\fR sends a virtual event to Tk's event queue. .SH KEYWORDS bind, callback, event, handler |