tkWinSend.c
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:3k
源码类别:

通讯编程

开发平台:

Visual C++

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