Editres.h File Reference

#include <X11/Xfuncproto.h>

Include dependency graph for Editres.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

_XFUNCPROTOBEGIN void _XEditResCheckMessages (Widget w, XtPointer data, XEvent *event, Boolean *cont)


Function Documentation

void _XEditResCheckMessages ( Widget  w,
XtPointer  data,
XEvent *  event,
Boolean cont 
)

Definition at line 202 of file EditresCom.c.

References _XEditResPut8(), _XEditResResetStream(), client_value, CURRENT_PROTOCOL_VERSION, dpy, EDITRES_CLIENT_VALUE, EDITRES_COMMAND_ATOM, EDITRES_NAME, EDITRES_PROTOCOL_ATOM, EDITRES_SEND_EVENT_FORMAT, GetCommand(), globals, LoadResources(), names, ProtocolMismatch, res_editor_command, res_editor_protocol, SendCommand(), and _Globals::stream.

Referenced by XawVendorShellInitialize().

00203 {
00204     Time time;
00205     ResIdent ident;
00206   static Boolean first_time = False;
00207     static Atom res_editor, res_comm;
00208   Display *dpy;
00209 
00210   if (event->type == ClientMessage)
00211     {
00212       XClientMessageEvent * c_event = (XClientMessageEvent *)event;
00213         dpy = XtDisplay(w);
00214 
00215       if (!first_time)
00216         {
00217             Atom atoms[4];
00218           static char *names[] = {
00219                 EDITRES_NAME, EDITRES_COMMAND_ATOM,
00220             EDITRES_PROTOCOL_ATOM, EDITRES_CLIENT_VALUE
00221           };
00222                 
00223           first_time = True;
00224           XInternAtoms(dpy, names, 4, False, atoms);
00225             res_editor = atoms[0];
00226             res_editor_command = atoms[1];
00227             res_editor_protocol = atoms[2];
00228           /* Used in later procedures */
00229             client_value = atoms[3];
00230             LoadResources(w);
00231         }
00232 
00233       if ((c_event->message_type != res_editor)
00234           || (c_event->format != EDITRES_SEND_EVENT_FORMAT))
00235             return;
00236 
00237         time = c_event->data.l[0];
00238         res_comm = c_event->data.l[1];
00239         ident = (ResIdent) c_event->data.l[2];
00240       if (c_event->data.l[3] != CURRENT_PROTOCOL_VERSION)
00241         {
00242             _XEditResResetStream(&globals.stream);
00243             _XEditResPut8(&globals.stream, (unsigned int) CURRENT_PROTOCOL_VERSION);
00244             SendCommand(w, res_comm, ident, ProtocolMismatch, &globals.stream);
00245             return;
00246         }
00247 
00248         XtGetSelectionValue(w, res_comm, res_editor_command,
00249                           GetCommand, (XtPointer)(long)ident, time);
00250     }
00251 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sun Mar 4 16:03:51 2007 for Scilab [trunk] by  doxygen 1.5.1