comparison nodejs/mbapp.js @ 724:503f3d18248e

Add symbolic name of event types.
author wycc
date Mon, 16 Aug 2010 07:32:56 +0800
parents 01d02382dea7
children 299ed9319dc6
comparison
equal deleted inserted replaced
722:f95d58a8edd1 724:503f3d18248e
22 return this.mb_rt.mbnames[name]; 22 return this.mb_rt.mbnames[name];
23 } 23 }
24 app.prototype.addKeyboardListener=function(type,f) { 24 app.prototype.addKeyboardListener=function(type,f) {
25 return this.mb_rt.kbevents.add_event_observer(type,f); 25 return this.mb_rt.kbevents.add_event_observer(type,f);
26 } 26 }
27 app.prototype.refresh=function() {
28 this.mb_rt.redraw_all();
29 this.mb_rt.flush();
30 }
27 31
28 exports.app=app; 32 exports.app=app;
29 33
30 // Put all key definition here 34 // Put all key definition here
31 exports.KEY_UP=111; 35 exports.KEY_UP = 111;
32 exports.KEY_DOWN=116; 36 exports.KEY_DOWN=116;
37 exports.EVT_ANY=0;
38 exports.EVT_MOUSE_OVER=1;
39 exports.EVT_MOUSE_OUT=2;
40 exports.EVT_MOUSE_MOVE=3;
41 exports.EVT_MOUSE_BUT_PRESS4;
42 exports.EVT_MOUSE_BUT_RELEASE=5
43 exports.EVT_KB_PRESS=6;
44 exports.EVT_KB_RELEASE=7;
45 exports.EVT_PROGM_COMPLETE=8;
46 exports.EVT_RDMAN_REDRAW=9;
47 exports.EVT_MONITOR_ADD=10;
48 exports.EVT_MONITOR_REMOVE=11;
49 exports.EVT_MONITOR_FREE=12;
50 exports.EVT_MOUSE_MOVE_RAW=13;