# Copyright (c) 1990-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. # # =head1 NAME Tk_ManageGeometry - arrange to handle geometry requests for a window =for category C Programming =head1 SYNOPSIS B<#include Etk.hE> B(I) =head1 ARGUMENTS =over 4 =item Tk_Window tkwin (in) Token for window to be managed. =item Tk_GeomMgr *mgrPtr (in) Pointer to data structure containing information about the geometry manager, or NULL to indicate that I's geometry shouldn't be managed anymore. The data structure pointed to by I must be static: Tk keeps a reference to it as long as the window is managed. =item ClientData clientData (in) Arbitrary one-word value to pass to geometry manager callbacks. =back =head1 DESCRIPTION B arranges for a particular geometry manager, described by the I argument, to control the geometry of a particular slave window, given by I. If I was previously managed by some other geometry manager, the previous manager loses control in favor of the new one. If I is NULL, geometry management is cancelled for I. The structure pointed to by I contains information about the geometry manager: typedef struct { char *name; Tk_GeomRequestProc *requestProc; Tk_GeomLostSlaveProc *lostSlaveProc; } Tk_GeomMgr; The I field is the textual name for the geometry manager, such as B or B; this value will be returned by the command B. I is a procedure in the geometry manager that will be invoked whenever B is called by the slave to change its desired geometry. I should have arguments and results that match the type B: typedef void Tk_GeomRequestProc( ClientData clientData, Tk_Window tkwin); The parameters to I will be identical to the corresponding parameters passed to B. I usually points to a data structure containing application-specific information about how to manage I's geometry. The I field of I points to another procedure in the geometry manager. Tk will invoke I if some other manager calls B to claim I away from the current geometry manager. I is not invoked if B is called with a NULL value for I (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 I is the same as the window's current geometry manager. I should have arguments and results that match the following prototype: typedef void Tk_GeomLostSlaveProc( ClientData clientData, Tk_Window tkwin); The parameters to I will be identical to the corresponding parameters passed to B. =head1 KEYWORDS callback, geometry, managed, request, unmanaged