Mercurial > MadButterfly
diff nodejs/observer.cc @ 822:586e50f82c1f
Unify coding style tag for emacs and vim.
author | Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com> |
---|---|
date | Tue, 14 Sep 2010 01:08:39 +0800 |
parents | 7ec13634c97d |
children | 1993e5ae60aa |
line wrap: on
line diff
--- a/nodejs/observer.cc Tue Sep 14 00:25:44 2010 +0800 +++ b/nodejs/observer.cc Tue Sep 14 01:08:39 2010 +0800 @@ -1,3 +1,5 @@ +// -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- +// vim: sw=4:ts=8:sts=4 #include <v8.h> #include "mbfly_njs.h" @@ -30,7 +32,7 @@ xnjsmb_event_mod(Handle<Object> self, event_t *evt) { mouse_event_t *mevt; X_kb_event_t *xkbevt; - + switch(evt->type) { case EVT_ANY: case EVT_MOUSE_OVER: @@ -44,14 +46,14 @@ SET(self, "but_state", Integer::New(mevt->but_state)); SET(self, "button", Integer::New(mevt->button)); break; - + case EVT_KB_PRESS: case EVT_KB_RELEASE: xkbevt = (X_kb_event_t *)evt; SET(self, "keycode", Integer::New(xkbevt->keycode)); SET(self, "sym", Integer::New(xkbevt->sym)); break; - + case EVT_PROGM_COMPLETE: case EVT_RDMAN_REDRAW: case EVT_MONITOR_ADD: @@ -70,7 +72,7 @@ observer_t *observer; xnjsmb_observer_data *data; Handle<Context> ctx; - + data = new xnjsmb_observer_data; if(data == NULL) return NULL; @@ -96,7 +98,7 @@ static Handle<Value> xnjsmb_event_tgt_getter(Handle<Object> self, event_t *evt, const char **err) { Persistent<Object> *hdl; - + hdl = (Persistent<Object> *) mb_prop_get(&((mb_obj_t *)evt->tgt->obj)->props, PROP_JSOBJ); @@ -113,7 +115,7 @@ xnjsmb_event_cur_tgt_getter(Handle<Object> self, event_t *evt, const char **err) { Persistent<Object> *hdl; - + hdl = (Persistent<Object> *) mb_prop_get(&((mb_obj_t *)evt->cur_tgt->obj)->props, PROP_JSOBJ); @@ -152,7 +154,7 @@ Handle<Value> export_xnjsmb_auto_subject_new(subject_t *subject) { Handle<Value> val; - + val = xnjsmb_auto_subject_new(subject); return val; }