home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcltk805.zip / tcl805s.zip / tk8.0.5 / os2 / tkOS2Send.c < prev    next >
C/C++ Source or Header  |  2000-01-01  |  3KB  |  87 lines

  1. /* 
  2.  * tkOS2Send.c --
  3.  *
  4.  *    This file provides procedures that implement the "send"
  5.  *    command, allowing commands to be passed from interpreter
  6.  *    to interpreter.
  7.  *
  8.  * Copyright (c) 1999-2000 by Illya Vaes
  9.  * Copyright (c) 1997 by Sun Microsystems, Inc.
  10.  *
  11.  * See the file "license.terms" for information on usage and redistribution
  12.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  13.  *
  14.  */
  15.  
  16. #include "tkPort.h"
  17. #include "tkInt.h"
  18.  
  19.  
  20. /*
  21.  *--------------------------------------------------------------
  22.  *
  23.  * Tk_SetAppName --
  24.  *
  25.  *    This procedure is called to associate an ASCII name with a Tk
  26.  *    application.  If the application has already been named, the
  27.  *    name replaces the old one.
  28.  *
  29.  * Results:
  30.  *    The return value is the name actually given to the application.
  31.  *    This will normally be the same as name, but if name was already
  32.  *    in use for an application then a name of the form "name #2" will
  33.  *    be chosen,  with a high enough number to make the name unique.
  34.  *
  35.  * Side effects:
  36.  *    Registration info is saved, thereby allowing the "send" command
  37.  *    to be used later to invoke commands in the application.  In
  38.  *    addition, the "send" command is created in the application's
  39.  *    interpreter.  The registration will be removed automatically
  40.  *    if the interpreter is deleted or the "send" command is removed.
  41.  *
  42.  *--------------------------------------------------------------
  43.  */
  44.  
  45. char *
  46. Tk_SetAppName(tkwin, name)
  47.     Tk_Window tkwin;        /* Token for any window in the application
  48.                  * to be named:  it is just used to identify
  49.                  * the application and the display.  */
  50.     char *name;            /* The name that will be used to
  51.                  * refer to the interpreter in later
  52.                  * "send" commands.  Must be globally
  53.                  * unique. */
  54. {
  55.     return name;
  56. }
  57.  
  58. /*
  59.  *----------------------------------------------------------------------
  60.  *
  61.  * TkGetInterpNames --
  62.  *
  63.  *    This procedure is invoked to fetch a list of all the
  64.  *    interpreter names currently registered for the display
  65.  *    of a particular window.
  66.  *
  67.  * Results:
  68.  *    A standard Tcl return value.  Interp->result will be set
  69.  *    to hold a list of all the interpreter names defined for
  70.  *    tkwin's display.  If an error occurs, then TCL_ERROR
  71.  *    is returned and interp->result will hold an error message.
  72.  *
  73.  * Side effects:
  74.  *    None.
  75.  *
  76.  *----------------------------------------------------------------------
  77.  */
  78.  
  79. int
  80. TkGetInterpNames(interp, tkwin)
  81.     Tcl_Interp *interp;        /* Interpreter for returning a result. */
  82.     Tk_Window tkwin;        /* Window whose display is to be used
  83.                  * for the lookup. */
  84. {
  85.     return TCL_OK;
  86. }
  87.