1Tk_CreateClientMessageHandler(T3k)Library ProceduTrke_sCreateClientMessageHandler(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_CreateClientMessageHandler,  Tk_DeleteClientMessageHandler  -  asso‐
9       ciate procedure callback with ClientMessage type X events
10

SYNOPSIS

12       #include <tk.h>
13
14       Tk_CreateClientMessageHandler(proc)
15
16       Tk_DeleteClientMessageHandler(proc)
17

ARGUMENTS

19       Tk_ClientMessageProc            *proc(in) Procedure to invoke  whenever
20                                                 a   ClientMessage   X   event
21                                                 occurs on any display.
22_________________________________________________________________
23
24

DESCRIPTION

26       Tk_CreateClientMessageHandler arranges for proc to be  invoked  in  the
27       future  whenever  a  ClientMessage X event occurs that isn't handled by
28       WM_PROTOCOL.  Tk_CreateClientMessageHandler  is  intended  for  use  by
29       applications  which  need to watch X ClientMessage events, such as drag
30       and drop applications.
31
32       The callback to proc will be made  by  Tk_HandleEvent;  this  mechanism
33       only  works in programs that dispatch events through Tk_HandleEvent (or
34       through  other  Tk  procedures  that  call  Tk_HandleEvent,   such   as
35       Tk_DoOneEvent or Tk_MainLoop).
36
37       Proc should have arguments and result that match the type Tk_ClientMes‐
38       sageProc:
39              typedef int Tk_ClientMessageProc(
40                Tk_Window tkwin,
41                XEvent *eventPtr);
42       The tkwin parameter to proc is the Tk window which is  associated  with
43       this event.  EventPtr is a pointer to the X event.
44
45       Whenever  an  X ClientMessage event is processed by Tk_HandleEvent, the
46       proc is called if it wasn't handled as a WM_PROTOCOL.  The return value
47       from  proc  is  normally 0.  A non-zero return value indicates that the
48       event is not to be handled further; that is, proc has done all process‐
49       ing that is to be allowed for the event.
50
51       If  there are multiple ClientMessage event handlers, each one is called
52       for each event, in the order in which they were established.
53
54       Tk_DeleteClientMessageHandler may be called to delete a previously-cre‐
55       ated ClientMessage event handler: it deletes each handler it finds that
56       matches the proc argument.  If no such handler exists, then  Tk_Delete‐
57       ClientMessageHandler  returns without doing anything.  Although Tk sup‐
58       ports it, it's probably a bad idea to have more than one callback  with
59       the same proc argument.
60
61

KEYWORDS

63       bind, callback, event, handler
64
65
66
67Tk                                    8.4     Tk_CreateClientMessageHandler(3)
Impressum