1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
/*
* $Id: xlib.trm,v 1.13 2003/11/24 17:04:29 mikulik Exp $
*/
/* GNUPLOT - xlib.trm */
/*
* xlib.trm - inboard terminal driver for X11 (dumps gnuplot_x11 commands)
*
* New implementation November 2003
* Xlib_init() sets up the output channels, but otherwise all work is done
* by the main x11.trm driver routines.
* Ethan A Merritt <merritt@u.washington.edu>
*/
#include "driver.h"
#ifdef TERM_REGISTER
register_term(xlib)
#endif
#ifdef TERM_PROTO
TERM_PUBLIC void Xlib_init __PROTO((void));
TERM_PUBLIC void Xlib_text __PROTO((void));
#define GOT_XLIB_PROTO
#endif
#ifndef TERM_PROTO_ONLY
#ifdef TERM_BODY
TERM_PUBLIC void
Xlib_init()
{
/* x11.trm thinks it is writing to a private pipe, but here we */
/* set it to use the channel opened by 'set output <file>' */
X11_ipc = gpoutfile;
#ifdef PIPE_IPC
/* There is, of course, no mouse feedback */
ipc_back_fd = IPC_BACK_UNUSABLE;
#endif
}
TERM_PUBLIC void
Xlib_text()
{
PRINT0("E\n");
FFLUSH();
X11_ipc = 0;
#ifdef PIPE_IPC
ipc_back_fd = IPC_BACK_CLOSED;
#endif
}
#endif
#ifdef TERM_TABLE
TERM_TABLE_START(xlib_driver)
"xlib", "X11 Window System (gnulib_x11 dump)",
X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR,
X11_VTIC, X11_HTIC, X11_options, Xlib_init, X11_reset,
Xlib_text, null_scale, X11_graphics, X11_move, X11_vector,
X11_linetype, X11_put_text, X11_text_angle,
X11_justify_text, X11_point, do_arrow, X11_set_font,
X11_pointsize, TERM_CAN_MULTIPLOT|TERM_INIT_ON_REPLOT,
X11_text /* suspend can use same routine */ , 0 /* resume */ ,
X11_fillbox, X11_linewidth
#ifdef USE_MOUSE
, X11_waitforinput, X11_put_tmptext, X11_set_ruler, X11_set_cursor, X11_set_clipboard
#endif
#ifdef PM3D
, X11_make_palette, 0 /* X11_previous_palette */ ,
X11_set_color, X11_filled_polygon
#endif
TERM_TABLE_END(xlib_driver)
#undef LAST_TERM
#define LAST_TERM xlib_driver
#endif /* TERM_TABLE */
#endif /* TERM_PROTO_ONLY */
#ifdef TERM_HELP
START_HELP(xlib)
"1 xlib",
"?commands set terminal xlib",
"?set terminal xlib",
"?set term xlib",
"?terminal xlib",
"?term xlib",
"?xlib",
" The `xlib` terminal driver supports the X11 Windows System. It generates",
" gnuplot_x11 commands, but sends them to the output file specified by",
" `set output '<filename>'`. `set term x11` is equivalent to",
" `set terminal xlib; set output \"|gnuplot_x11 -noevents\"`.",
" `xlib` takes the same set of options as `x11`."
END_HELP(xlib)
#endif
|