⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crtgenhdlr.3

📁 linux系统下的音频通信
💻 3
字号:
'\"'\" Copyright (c) 1992-1994 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) CrtGenHdlr.3 1.9 96/03/26 18:06:21'\" .so man.macros.TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures".BS.SH NAMETk_CreateGenericHandler, Tk_DeleteGenericHandler \- associate procedure callback with all X events.SH SYNOPSIS.nf\fB#include <tk.h>\fR.sp\fBTk_CreateGenericHandler\fR(\fIproc, clientData\fR).sp\fBTk_DeleteGenericHandler\fR(\fIproc, clientData\fR).SH ARGUMENTS.AS "Tk_GenericProc" clientData.AP Tk_GenericProc *proc inProcedure to invoke whenever any X event occurs on any display..AP ClientData clientData inArbitrary one-word value to pass to \fIproc\fR..BE.SH DESCRIPTION.PP\fBTk_CreateGenericHandler\fR arranges for \fIproc\fR to beinvoked in the future whenever any X event occurs.  This mechanism is\fInot\fR intended for dispatching X events on windows managed by Tk(you should use \fBTk_CreateEventHandler\fR for this purpose).\fBTk_CreateGenericHandler\fR is intended for other purposes, suchas tracing X events, monitoring events on windows not owned by Tk,accessing X-related libraries that were not originally designed foruse with Tk, and so on..PPThe callback to \fIproc\fR will be made by \fBTk_HandleEvent\fR;this mechanism only works in programs that dispatch eventsthrough \fBTk_HandleEvent\fR (or through other Tk procedures thatcall \fBTk_HandleEvent\fR, such as \fBTk_DoOneEvent\fR or\fBTk_MainLoop\fR)..PP\fIProc\fR should have arguments and result that match thetype \fBTk_GenericProc\fR:.CStypedef int Tk_GenericProc(	ClientData \fIclientData\fR,	XEvent *\fIeventPtr\fR);.CEThe \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fRargument given to \fBTk_CreateGenericHandler\fR when the callbackwas created.  Typically, \fIclientData\fR points to a datastructure containing application-specific information abouthow to handle events.\fIEventPtr\fR is a pointer to the X event..PPWhenever an X event is processed by \fBTk_HandleEvent\fR, \fIproc\fRis called.  The return value from \fIproc\fR is normally 0.A non-zero return value indicates that the event is not to be handledfurther; that is, \fIproc\fR has done all processing that is to beallowed for the event..PPIf there are multiple generic event handlers, each one is calledfor each event, in the order in which they were established..PP\fBTk_DeleteGenericHandler\fR may be called to delete apreviously-created generic event handler:  it deletes each handlerit finds that matches the \fIproc\fR and \fIclientData\fR arguments.  Ifno such handler exists, then \fBTk_DeleteGenericHandler\fR returnswithout doing anything.  Although Tk supports it, it's probablya bad idea to have more than one callback with the same\fIproc\fR and \fIclientData\fR arguments..PPEstablishing a generic event handler does nothing to ensure that theprocess will actually receive the X events that the handler wants toprocess.For example, it is the caller's responsibility to invoke\fBXSelectInput\fR to select the desired events, if that is necessary..SH KEYWORDSbind, callback, event, handler

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -