From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../reference/interface/nsidevicemotion/index.html | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 files/pt-br/mozilla/tech/xpcom/reference/interface/nsidevicemotion/index.html (limited to 'files/pt-br/mozilla/tech/xpcom/reference/interface/nsidevicemotion/index.html') diff --git a/files/pt-br/mozilla/tech/xpcom/reference/interface/nsidevicemotion/index.html b/files/pt-br/mozilla/tech/xpcom/reference/interface/nsidevicemotion/index.html new file mode 100644 index 0000000000..4eef5f2942 --- /dev/null +++ b/files/pt-br/mozilla/tech/xpcom/reference/interface/nsidevicemotion/index.html @@ -0,0 +1,129 @@ +--- +title: nsIDeviceMotion +slug: Mozilla/Tech/XPCOM/Reference/Interface/nsIDeviceMotion +translation_of: Mozilla/Tech/XPCOM/Reference/Interface/nsIDeviceMotion +--- +

+
xpcom/system/nsIDeviceMotion.idlScriptable
+ + +Essa interface é usada para implementar o suporte acelerômetro. + + +
+ +
1.0
+ +
66
+ +
+ +
+ +
Introduced
+
Gecko 1.9.2
+ +
+ +
+ +
+Inherits from: nsISupports +Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3)
+

+ +
Note: This interface was named nsIDeviceMotion prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3).
+ +

Visão Geral

+ + + + + + + + + + + + + + + + +
void addListener(in nsIDeviceMotionListener aListener);
void addWindowListener(in nsIDOMWindow aWindow); Native code only!
void removeListener(in nsIDeviceMotionListener aListener);
void removeWindowListener(in nsIDOMWindow aWindow); Native code only!
+ +

Métodos

+ +

addListener()

+ +

Quando chamado, a implementação do suporte acelerômetro deve começar a notificar o que foi especificado nsIDeviceMotionListener chamando seu nsIDeviceMotionListener.onAccelerationChange() método apropriado para compartilhar dados de aceleração atualizados.

+ +
void addListener(
+  in nsIDeviceMotionListener aListener
+);
+
+ +
Parâmetro
+ +
+
aListener
+
O nsIDeviceMotionListener objeto cujo nsIDeviceMotionListener.onAccelerationChange() método deve ser chamado com dados de aceleração atualizados.
+
+ +

Native code only!

addWindowListener

+ +

Definir o nsIAccelerometer da raiz para MozOrientation eventos sobre um específico DOM window.

+ +
void addWindowListener(
+  in nsIDOMWindow aWindow
+);
+
+ +
Parâmetro
+ +
+
aWindow
+
A janela de DOM que o acelerômetro deverá começar a enviar para o evento MozOrientation.
+
+ +

removeListener()

+ +

Diz ao acelerômetro para parar de enviar atualizações para o quem foi especificado nsIDeviceMotionListener.

+ +
void removeListener(
+  in nsIDeviceMotionListener aListener
+);
+
+ +
Parâmetro
+ +
+
aListener
+
O nsIDeviceMotionListener objeto para o qual não há mais atualizações para serem enviadas.
+
+ +

Native code only!

removeWindowListener

+ +

Remover o nsIAccelerometer como fonte para o evento MozOrientation de um DOM especificado window.

+ +
void removeWindowListener(
+  in nsIDOMWindow aWindow
+);
+
+ +
Parâmetro
+ +
+
aWindow
+
A janela de DOM que o acelerômetro deve parar de enviar para o evento MozOrientation.
+
+ +

Veja também

+ + -- cgit v1.2.3-54-g00ecf