Hi, Please refer to the link as below which location tried to initialize a dom event for light. http://mxr.mozilla.org/mozilla-central/source/dom/system/nsDeviceSensors.cpp#239
Then refer to "objdir-gonk/dom/bindings/DeviceLightEvent.cpp" to know what it's constructor function did. Sincerely yours. ----- Original Message ----- From: [email protected] To: [email protected] Sent: Wednesday, October 23, 2013 5:40:21 AM Subject: Re: [b2g] DeviceLightEvent.webidl from xpcom to sensor app [email protected]於 2013年10月23日星期三UTC+8上午4時42分29秒寫道: > In the sensor system (such as light sensor for example), there is a webidl > file called DeviceLightEvent.webidl in gecko/dom/webidl/. > > > > From what I have known, the nsDeviceSensor (which is a xpcom component) will > send the light value to this dom event and then to sensor app. > > > > Here are my questions: > > > > 1. how does DeviceLightEvent.webidl receive light value from nsDeviceSensor? > > I know gecko tool generates DeviceLightEventBinding.cpp automatically from > > webidl. Does this play a role for receiving sensor data come from > nsDeviceSensor? > > > > > > 2. how does DeviceLightEvent.webidl play a role as a dom event to send the > sensor data to sensor app? how does this talk to sensor app? > > > > > > Thanks for any reply. I have been searching around the answer for the questions as I posted above. However, there is no clear reply yet. Any feedback will be very welcome. Thanks. _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
