File: xkey.c

package info (click to toggle)
mpich 1.1.0-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 22,116 kB
  • ctags: 27,349
  • sloc: ansic: 193,435; sh: 11,172; fortran: 6,545; makefile: 5,801; cpp: 5,020; tcl: 3,548; asm: 3,536; csh: 1,079; java: 614; perl: 183; awk: 168; sed: 70; f90: 62
file content (44 lines) | stat: -rw-r--r-- 910 bytes parent folder | download | duplicates (3)
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
#include <math.h>
#include "mpetools.h"      /*I "mpetools.h" I*/
#include "basex11.h"    /*I "basex11.h" I*/

#ifdef MPE_NOMPI
#define MPI_MAX_PROCESSOR_NAME 256
#else
#include "mpi.h"
#endif

#define MPE_INTERNAL
#include "mpe.h"        /*I "mpe.h" I*/

int MPE_SetKeyCallback( graph, key, routine )
MPE_XGraph graph;
int        key;
int        (*routine)();
{
  if (graph->Cookie != MPE_G_COOKIE) {
    fprintf( stderr, "Handle argument is incorrect or corrupted\n" );
    return MPE_ERR_BAD_ARGS;
  }

  graph->input_mask |= KeyPressMask;
  /* Not quite correct.  we want to have a keypress routine that
     calls the given routine for the particular key.
     Might as well have a keypress vector for each keycode 
   */
  graph->event_routine = routine;

return MPE_SUCCESS;  
}

int MPE_ClrKeyCallback( graph, key )
MPE_XGraph graph;
int        key;
{

return MPE_SUCCESS;
}

/* XKeyEvent.keycode */