Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk_setclassprocs(3) [suse man page]

Tk_SetClassProcs(3)					       Tk Library Procedures					       Tk_SetClassProcs(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_SetClassProcs - register widget specific procedures SYNOPSIS
#include <tk.h> Tk_SetClassProcs(tkwin, procs, instanceData) ARGUMENTS
Tk_Window tkwin (in) Token for window to modify. Tk_ClassProcs *procs (in) Pointer to data structure containing widget specific procedures. The data structure pointed to by procs must be static: Tk keeps a reference to it as long as the window exists. ClientData instanceData (in) Arbitrary one-word value to pass to widget callbacks. _________________________________________________________________ DESCRIPTION
Tk_SetClassProcs is called to register a set of procedures that are used as callbacks in different places. The structure pointed to by procs contains the following: typedef struct Tk_ClassProcs { unsigned int size; Tk_ClassWorldChangedProc *worldChangedProc; Tk_ClassCreateProc *createProc; Tk_ClassModalProc *modalProc; } Tk_ClassProcs; The size field is used to simplify future expansion of the structure. It should always be set to (literally) sizeof(Tk_ClassProcs). worldChangedProc is invoked when the system has altered in some way that requires some reaction from the widget. For example, when a font alias (see the font manual entry) is reconfigured, widgets configured to use that font alias must update their display accordingly. world- ChangedProc should have arguments and results that match the type Tk_ClassWorldChangedProc: typedef void Tk_ClassWorldChangedProc( ClientData instanceData); The instanceData parameter passed to the worldChangedProc will be identical to the instanceData parameter passed to Tk_SetClassProcs. createProc is used to create platform-dependant windows. It is invoked by Tk_MakeWindowExist. createProc should have arguments and results that match the type Tk_ClassCreateProc: typedef Window Tk_ClassCreateProc( Tk_Window tkwin, Window parent, ClientData instanceData); The tkwin and instanceData parameters will be identical to the tkwin and instanceData parameters passed to Tk_SetClassProcs. The parent parameter will be the parent of the window to be created. The createProc should return the created window. modalProc is invoked after all bindings on a widget have been triggered in order to handle a modal loop. modalProc should have arguments and results that match the type Tk_ClassModalProc: typedef void Tk_ClassModalProc( Tk_Window tkwin, XEvent *eventPtr); The tkwin parameter to modalProc will be identical to the tkwin parameter passed to Tk_SetClassProcs. The eventPtr parameter will be a pointer to an XEvent structure describing the event being processed. KEYWORDS
callback, class Tk 8.4 Tk_SetClassProcs(3)

Check Out this Related Man Page

Tk_ManageGeometry(3)					       Tk Library Procedures					      Tk_ManageGeometry(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_ManageGeometry - arrange to handle geometry requests for a window SYNOPSIS
#include <tk.h> Tk_ManageGeometry(tkwin, mgrPtr, clientData) ARGUMENTS
Tk_Window tkwin (in) Token for window to be managed. const Tk_GeomMgr *mgrPtr (in) Pointer to data structure containing information about the geometry manager, or NULL to indicate that tkwin's geometry should not be managed anymore. The data structure pointed to by mgrPtr must be static: Tk keeps a reference to it as long as the window is managed. ClientData clientData (in) Arbitrary one-word value to pass to geometry manager callbacks. _________________________________________________________________ DESCRIPTION
Tk_ManageGeometry arranges for a particular geometry manager, described by the mgrPtr argument, to control the geometry of a particular slave window, given by tkwin. If tkwin was previously managed by some other geometry manager, the previous manager loses control in favor of the new one. If mgrPtr is NULL, geometry management is cancelled for tkwin. The structure pointed to by mgrPtr contains information about the geometry manager: typedef struct { const char *name; Tk_GeomRequestProc *requestProc; Tk_GeomLostSlaveProc *lostSlaveProc; } Tk_GeomMgr; The name field is the textual name for the geometry manager, such as pack or place; this value will be returned by the command winfo man- ager. requestProc is a procedure in the geometry manager that will be invoked whenever Tk_GeometryRequest is called by the slave to change its desired geometry. requestProc should have arguments and results that match the type Tk_GeomRequestProc: typedef void Tk_GeomRequestProc( ClientData clientData, Tk_Window tkwin); The parameters to requestProc will be identical to the corresponding parameters passed to Tk_ManageGeometry. clientData usually points to a data structure containing application-specific information about how to manage tkwin's geometry. The lostSlaveProc field of mgrPtr points to another procedure in the geometry manager. Tk will invoke lostSlaveProc if some other manager calls Tk_ManageGeometry to claim tkwin away from the current geometry manager. lostSlaveProc is not invoked if Tk_ManageGeometry is called with a NULL value for mgrPtr (presumably the current geometry manager has made this call, so it already knows that the window is no longer managed), nor is it called if mgrPtr is the same as the window's current geometry manager. lostSlaveProc should have arguments and results that match the following prototype: typedef void Tk_GeomLostSlaveProc( ClientData clientData, Tk_Window tkwin); The parameters to lostSlaveProc will be identical to the corresponding parameters passed to Tk_ManageGeometry. KEYWORDS
callback, geometry, managed, request, unmanaged Tk 4.0 Tk_ManageGeometry(3)
Man Page