Back to index

tetex-bin  3.0
selection.h File Reference
#include "xdvi-config.h"
#include "xdvi.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Boolean set_selection (const char *text, Widget w)
void unset_selection (Widget w)

Function Documentation

Boolean set_selection ( const char *  text,
Widget  w 

Definition at line 220 of file selection.c.

    /* caller should make sure that text is never longer than 4 * XMaxRequestSize(DISP) - 32 */
    if (m_selection_text == NULL) {
       m_selection_size = 4 * XMaxRequestSize(DISP);
       m_selection_text = xmalloc(m_selection_size);
       m_cvt_selection_text = xmalloc(m_selection_size);
    strncpy(m_selection_text, text, m_selection_size);
    m_selection_text[m_selection_size - 1] = '\0'; /* ensure termination */

    return XtOwnSelection(w, XA_PRIMARY, XtLastTimestampProcessed(XtDisplay(w)),

Here is the call graph for this function:

Here is the caller graph for this function:

void unset_selection ( Widget  w)

Definition at line 238 of file selection.c.

    XtDisownSelection(w, XA_PRIMARY, XtLastTimestampProcessed(XtDisplay(w)));

Here is the caller graph for this function: