Blame


1 058b0118 2005-01-03 devnull .TH GETSNARF 3
2 058b0118 2005-01-03 devnull .SH NAME
3 058b0118 2005-01-03 devnull getsnarf, putsnarf \- window system snarf (cut and paste) buffer
4 058b0118 2005-01-03 devnull .SH SYNOPSIS
5 058b0118 2005-01-03 devnull .B #include <draw.h>
6 058b0118 2005-01-03 devnull .PP
7 058b0118 2005-01-03 devnull .B
8 058b0118 2005-01-03 devnull char *getsnarf(void)
9 058b0118 2005-01-03 devnull .PP
10 058b0118 2005-01-03 devnull .B
11 058b0118 2005-01-03 devnull void putsnarf(char *text)
12 058b0118 2005-01-03 devnull .SH DESCRIPTION
13 058b0118 2005-01-03 devnull .I Getsnarf
14 058b0118 2005-01-03 devnull and
15 058b0118 2005-01-03 devnull .I putsnarf
16 058b0118 2005-01-03 devnull access the window system's snarf (cut and paste) buffer.
17 058b0118 2005-01-03 devnull .PP
18 058b0118 2005-01-03 devnull .I Getsnarf
19 058b0118 2005-01-03 devnull returns a copy of the current buffer;
20 058b0118 2005-01-03 devnull the returned pointer should be freed with
21 058b0118 2005-01-03 devnull .I free
22 058b0118 2005-01-03 devnull (see
23 058b0118 2005-01-03 devnull .IR malloc (3))
24 058b0118 2005-01-03 devnull when no longer needed.
25 058b0118 2005-01-03 devnull .PP
26 058b0118 2005-01-03 devnull .I Putsnarf
27 058b0118 2005-01-03 devnull sets the buffer to the text string
28 058b0118 2005-01-03 devnull .IR text .
29 058b0118 2005-01-03 devnull .PP
30 058b0118 2005-01-03 devnull Callers should assume that the snarf buffer is UTF.
31 058b0118 2005-01-03 devnull If the window system does not keep the buffer in UTF,
32 058b0118 2005-01-03 devnull .I getsnarf
33 058b0118 2005-01-03 devnull and
34 058b0118 2005-01-03 devnull .I putsnarf
35 058b0118 2005-01-03 devnull will convert as necessary.
36 058b0118 2005-01-03 devnull .SH SOURCE
37 c3674de4 2005-01-11 devnull .B \*9/src/libdraw/x11-itrans.c
38 9c81b470 2006-02-28 devnull .SH SEE ALSO
39 9c81b470 2006-02-28 devnull .IR snarfer (1)
40 9c81b470 2006-02-28 devnull .SH BUGS
41 9c81b470 2006-02-28 devnull On OS X, there are two snarf buffers: the Carbon snarf buffer
42 9c81b470 2006-02-28 devnull used by native OS X applications, and the X11 snarf buffer,
43 9c81b470 2006-02-28 devnull used by X11 applications.
44 9c81b470 2006-02-28 devnull Whenever new text is written to the Carbon snarf buffer, the OS X X11
45 9c81b470 2006-02-28 devnull implementation automatically copies that text to the X11 snarf buffer.
46 9c81b470 2006-02-28 devnull The reverse is not done automatically, arguably a bug in the X11 server.
47 9c81b470 2006-02-28 devnull To work around this,
48 9c81b470 2006-02-28 devnull .I putsnarf
49 9c81b470 2006-02-28 devnull writes to both the Carbon snarf buffer and the X11 snarf buffer.
50 9c81b470 2006-02-28 devnull To work around this bug in remote or non-Plan 9 X11 clients, run
51 9c81b470 2006-02-28 devnull .IR snarfer (1).