30 #include <nsIVariant.h>
32 #include <sbIDevice.h>
33 #include "sbIDeviceEventTarget.h"
47 mWasDispatched(PR_FALSE),
62 PRUint32 aDeviceState,
63 PRUint32 aDeviceSubState)
75 NS_IMETHODIMP sbDeviceEvent::GetType(PRUint32 *aType)
77 NS_ENSURE_ARG_POINTER(aType);
83 NS_IMETHODIMP sbDeviceEvent::GetData(nsIVariant * *
aData)
85 NS_ENSURE_ARG_POINTER(aData);
86 NS_IF_ADDREF(*aData =
mData);
100 NS_ENSURE_ARG_POINTER(aTarget);
101 NS_IF_ADDREF(*aTarget =
mTarget);
106 NS_IMETHODIMP sbDeviceEvent::GetOrigin(
nsISupports * *aOrigin)
108 NS_ENSURE_ARG_POINTER(aOrigin);
109 NS_IF_ADDREF(*aOrigin =
mOrigin);
116 PRUint32 aDeviceState,
117 PRUint32 aDeviceSubState,
120 NS_ENSURE_ARG_POINTER(_retval);
122 NS_ENSURE_TRUE(
event, NS_ERROR_OUT_OF_MEMORY);
124 nsresult rv =
event->InitEvent(aType,
129 NS_ENSURE_SUCCESS(rv, rv);
130 return CallQueryInterface(
event, _retval);
133 NS_IMETHODIMP sbDeviceEvent::GetDeviceState(PRUint32 * aDeviceState)
135 NS_ENSURE_ARG_POINTER(aDeviceState);
141 NS_IMETHODIMP sbDeviceEvent::GetDeviceSubState(PRUint32 * aDeviceSubState)
143 NS_ENSURE_ARG_POINTER(aDeviceSubState);
nsCOMPtr< sbIDeviceEventTarget > mTarget
static sbDeviceEvent * CreateEvent()
NS_IMPL_THREADSAFE_ISUPPORTS2(sbDeviceEvent, sbDeviceEvent, sbIDeviceEvent) sbDeviceEvent *sbDeviceEvent
NS_DECL_ISUPPORTS NS_DECL_SBIDEVICEEVENT nsresult InitEvent(PRUint32 aType, nsIVariant *aData, nsISupports *aOrigin, PRUint32 aDeviceState, PRUint32 aDeviceSubState)
virtual nsresult SetTarget(sbIDeviceEventTarget *aTarget)
nsCOMPtr< nsISupports > mOrigin
nsCOMPtr< nsIVariant > mData
_updateTextAndScrollDataForFrame aData