|
| |||||||||||||
#include "mit-copyright.h"#include <X11/Xlib.h>#include <X11/Xproto.h>#include <X11/Xatom.h>#include "new_string.h"#include "xselect.h"Go to the source code of this file.
Data Structures | |
| struct | _JAtom |
Defines | |
| #define | NumJAtoms (sizeof(JAtom)/sizeof(struct _JAtom)) |
| #define | NumRequestAtoms (sizeof(RequestAtoms)/sizeof(Atom)) |
| #define | PROP(prop, targ) ((prop)!=None?(prop):(targ)) |
| #define | ChangeProp(type, format, data, size) |
Functions | |
| char * | getSelectedText () |
| void | xicccmInitAtoms (Display *dpy) |
| int | xselGetOwnership (Display *dpy, Window w, Time time) |
| int | xselProcessSelection (Display *dpy, Window w, XEvent *event) |
| void | xselOwnershipLost (Time time) |
| void | xselGiveUpOwnership (Display *dpy, Window w) |
Variables | |
| Atom | XA_WM_PROTOCOLS |
| Atom | XA_WM_DELETE_WINDOW |
|
|
Value: XChangeProperty(dpy,w,PROP(property,target),(type),(format), \ PropModeReplace, (unsigned char *) (data),(size)) |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 41 of file xcut.c. 00042 {
00043 return (selected_text);
00044 }
|
|
|
Definition at line 146 of file xselect.c. References dpy. 00148 {
00149 int i;
00150
00151 for (i = 0; i < NumJAtoms; i++)
00152 *(JAtom[i].patom) = XInternAtom(dpy, JAtom[i].name, False);
00153 for (i = 0; i < NumRequestAtoms; i++)
00154 if (pRequestAtoms[i])
00155 RequestAtoms[i] = *(pRequestAtoms[i]);
00156 }
|
|
||||||||||||||||
|
Definition at line 159 of file xselect.c. References dpy. 00163 {
00164 int temp;
00165
00166 XSetSelectionOwner(dpy, XA_PRIMARY, w, time);
00167 temp = (w == XGetSelectionOwner(dpy, XA_PRIMARY));
00168
00169 if (temp)
00170 ownership_start = time;
00171
00172 return (temp);
00173 }
|
|
||||||||||||
|
Definition at line 207 of file xselect.c. References dpy. 00210 {
00211 XSetSelectionOwner(dpy, XA_PRIMARY, None, ownership_start);
00212
00213 ownership_end = ownership_start; /* Is this right? what
00214 * should I use? */
00215 }
|
|
|
Definition at line 199 of file xselect.c. 00201 {
00202 ownership_end = time;
00203 }
|
|
||||||||||||||||
|
Definition at line 177 of file xselect.c. References dpy. 00181 {
00182 XSelectionRequestEvent *selreq = &(event->xselectionrequest);
00183
00184 if ((ownership_start == CurrentTime) ||
00185 (((selreq->time != CurrentTime) &&
00186 (selreq->time < ownership_start)) ||
00187 ((ownership_end != CurrentTime) &&
00188 (ownership_end > ownership_start) &&
00189 (selreq->time > ownership_end))))
00190 xselNotify(dpy, selreq, None);
00191 else
00192 xselSetProperties(dpy, selreq->requestor, selreq->property, selreq->target,
00193 selreq);
00194
00195 return (1);
00196 }
|
|
|
Definition at line 26 of file xselect.c. Referenced by x_set_icccm_hints(). |
|
|
|
| Last updated at Tue Dec 18 21:07:42 PST 2007. | This site and project hosted by... |