1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* 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.
*
* RCS: @(#) $Id: tkUnix.c,v 1.3 1999/03/10 07:04:45 stanton Exp $
*/
#include <tkInt.h>
/*
*----------------------------------------------------------------------
*
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* 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.
*
* RCS: @(#) $Id: tkUnix.c,v 1.4 1999/04/16 01:51:45 stanton Exp $
*/
#include <tkInt.h>
/*
*----------------------------------------------------------------------
*
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
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);
}
|
>
|
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
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[8 + TCL_INTEGER_SPACE * 2];
char buffer2[TCL_INTEGER_SPACE];
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);
}
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
char *screenName; /* Screen name from command line, or NULL. */
{
if ((screenName == NULL) || (screenName[0] == '\0')) {
screenName = Tcl_GetVar2(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY);
}
return screenName;
}
/*
*----------------------------------------------------------------------
*
* Tk_UpdatePointer --
*
* Unused function in UNIX
|
<
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
char *screenName; /* Screen name from command line, or NULL. */
{
if ((screenName == NULL) || (screenName[0] == '\0')) {
screenName = Tcl_GetVar2(interp, "env", "DISPLAY", TCL_GLOBAL_ONLY);
}
return screenName;
}
/*
*----------------------------------------------------------------------
*
* Tk_UpdatePointer --
*
* Unused function in UNIX
|