home *** CD-ROM | disk | FTP | other *** search
- /*
- * tkUnix.c --
- *
- * This file contains procedures that are UNIX/X-specific, and
- * will probably have to be written differently for Windows or
- * Macintosh platforms.
- *
- * Copyright (c) 1995 Sun Microsystems, Inc.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
- static char sccsid[] = "%Z% %M% %I% %E% %U%";
-
- #include <tkInt.h>
-
- /*
- *----------------------------------------------------------------------
- *
- * TkGetServerInfo --
- *
- * Given a window, this procedure returns information about
- * the window server for that window. This procedure provides
- * the guts of the "winfo server" command.
- *
- * Results:
- * None.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
- void
- TkGetServerInfo(interp, tkwin)
- Tcl_Interp *interp; /* The server information is returned in
- * this interpreter's result. */
- Tk_Window tkwin; /* Token for window; this selects a
- * particular display and server. */
- {
- char buffer[50], buffer2[50];
-
- sprintf(buffer, "X%dR%d ", ProtocolVersion(Tk_Display(tkwin)),
- ProtocolRevision(Tk_Display(tkwin)));
- sprintf(buffer2, " %d", VendorRelease(Tk_Display(tkwin)));
- Tcl_AppendResult(interp, buffer, ServerVendor(Tk_Display(tkwin)),
- buffer2, (char *) NULL);
- }
-