GOPEN_WS(3NCARG)

πŸ’– GOPEN_WS πŸ’–

okay bestie, so this is a page from NCAR GRAPHICS β€” it's the manual for GOPEN_WS from the 3NCARG crew, and it's literally the function that opens you a GKS workstation. no cap, it's giving "let me in" energy. πŸšͺ✨


🌸 NAME 🌸

gopen_ws β€” opens a GKS workstation 🫢


✨ SYNOPSIS ✨

#include <ncarg/gks.h>

void gopen_ws(Gint ws_id, const char *conn_id, Gint ws_type);

πŸ’… DESCRIPTION πŸ’…

  • ws_id (Input) β€” a number you assign to a workstation, and it's the identifier used in every single later call to GKS functions that need a workstation identifier. In NCAR GKS, ws_id can be any non-negative integer. literally any of them. go off. πŸ”’
  • conn_id (Input) β€” a connection identifier, and bestie, its meaning changes depending on the workstation type (peep the USAGE section below, iykyk). πŸ”—
  • ws_type (Input) β€” an identifier saying which specific type of output device you're targeting. every GKS package has its own implementation-dependent set of workstation types it supports. the legal workstation types in NCAR GKS are, and I'm not skipping a single one:
    • 1 β€” NCGM
    • 3 β€” WISS
    • 7 β€” pre-existing X11 window.
    • 8 β€” non-existing X11 window.
    • 10 β€” text dump of graphics output.
    • 11 β€” PDF in portrait mode.
    • 12 β€” PDF in landscape mode.
    • 20 β€” color PostScript in portrait mode.
    • 21 β€” color Encapsulated PostScript (EPS) in portrait mode.
    • 22 β€” color Encapsulated PostScript Interchange format (EPSI) in portrait mode.
    • 23 β€” monochrome PostScript in portrait mode.
    • 24 β€” monochrome Encapsulated PostScript (EPS) in portrait mode.
    • 25 β€” monochrome Encapsulated PostScript Interchange format (EPSI) in portrait mode.
    • 26 β€” color PostScript in landscape mode.
    • 27 β€” color Encapsulated PostScript (EPS) in landscape mode.
    • 28 β€” color Encapsulated PostScript Interchange format (EPSI) in landscape mode.
    • 29 β€” monochrome PostScript in landscape mode.
    • 30 β€” monochrome Encapsulated PostScript (EPS) in landscape mode.
    • 31 β€” monochrome Encapsulated PostScript Interchange format (EPSI) in landscape mode.

🌈 USAGE 🌈

okay so here's the tea on how conn_id behaves per type:

  • for workstation types of 1 (CGM) the connection ID is the name of the CGM file. and listen β€” you can have at most one workstation of type 1 open at a time. one. that's it. 🚫
  • for workstations of type 3 (WISS) the connection ID is irrelevant. you can have at most one workstation of type 3 open. you can have workstations of types 1 and 3 open simultaneously, and they must have distinct connection IDs. and if you wanna use the GFLASH package or any GKS segmentation functions, WISS must be opened first. order matters, bestie. πŸ‘‘
  • for workstations of type 7 the connection ID is the X11 window ID for the existing window. this number should be passed as a string; for example, "3" for an X11 window ID of 3. yes, as a string. in quotes. do not fight it. πŸͺŸ
  • for workstations of type 8 an X11 window will be created at open workstation time. the connection ID is irrelevant for workstations of type 8. ✨
  • for workstations of type 10, the ASCII text is written to standard output and the connection ID is irrelevant. πŸ“
⚠️ heads up: there can be a maximum of fifteen simultaneously open workstations of all types. fifteen. not sixteen. don't push it. πŸ’€

πŸ”‘ ACCESS πŸ”‘

to use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. that's the whole vibe check. πŸ“š


πŸ¦‹ SEE ALSO πŸ¦‹

Online: gopen_gks(3NCARG), gactivate_ws(3NCARG), gdeactivate_ws(3NCARG), gclose_ws(3NCARG), gclose_gks(3NCARG), opngks(3NCARG), clsgks(3NCARG), gks(3NCARG), ncarg_gks_cbind(3NCARG)

Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.


and that's the whole page, bestie β€” love that for you πŸ’– this was the UNIX version, dated March 1993, filed under GOPEN_WS(3NCARG). go open a workstation and slay, periodt. βœ¨πŸŽ€πŸŒΈ