Esempio n. 1
0
NS_IMETHODIMP
KeyboardEvent::GetMetaKey(bool* aIsDown)
{
  NS_ENSURE_ARG_POINTER(aIsDown);
  *aIsDown = MetaKey();
  return NS_OK;
}
Esempio n. 2
0
void KeyboardEvent::GetInitDict(KeyboardEventInit& aParam)
{
  GetKey(aParam.mKey);
  GetCode(aParam.mCode);
  aParam.mLocation = Location();
  aParam.mRepeat = Repeat();
  aParam.mIsComposing = IsComposing();

  // legacy attributes
  aParam.mKeyCode = KeyCode();
  aParam.mCharCode = CharCode();
  aParam.mWhich = Which();

  // modifiers from EventModifierInit
  aParam.mCtrlKey = CtrlKey();
  aParam.mShiftKey = ShiftKey();
  aParam.mAltKey = AltKey();
  aParam.mMetaKey = MetaKey();

  WidgetKeyboardEvent* internalEvent = mEvent->AsKeyboardEvent();
  aParam.mModifierAltGraph = internalEvent->IsAltGraph();
  aParam.mModifierCapsLock = internalEvent->IsCapsLocked();
  aParam.mModifierFn = internalEvent->IsFn();
  aParam.mModifierFnLock = internalEvent->IsFnLocked();
  aParam.mModifierNumLock = internalEvent->IsNumLocked();
  aParam.mModifierOS = internalEvent->IsOS();
  aParam.mModifierScrollLock = internalEvent->IsScrollLocked();
  aParam.mModifierSymbol = internalEvent->IsSymbol();
  aParam.mModifierSymbolLock = internalEvent->IsSymbolLocked();

  // EventInit
  aParam.mBubbles =  internalEvent->mFlags.mBubbles;
  aParam.mCancelable = internalEvent->mFlags.mCancelable;
}
Esempio n. 3
0
//
// MetaObject(const char *pKey)
//
// Constructor for MetaObject when key is known.
//
MetaObject::MetaObject(const char *pKey) 
   : Super(), links(), typelinks(), type()
{
   metakey_t &keyObj = MetaKey(pKey);

   key    = keyObj.key;
   keyIdx = keyObj.index;
}
Esempio n. 4
0
//
// MetaObject Default Constructor
//
// Not recommended for use. This exists because use of DECLARE_RTTI_OBJECT
// requires it.
//
MetaObject::MetaObject()
   : Super(), links(), typelinks(), type()
{
   metakey_t &keyObj = MetaKey("default"); // TODO: GUID?

   key    = keyObj.key;
   keyIdx = keyObj.index;
}
Esempio n. 5
0
//
// MetaTable::getInt
//
// Overload for raw key strings.
//
int MetaTable::getInt(const char *key, int defValue)
{
   return getInt(MetaKey(key).index, defValue);
}
Esempio n. 6
0
//
// MetaTable::IndexForKey
//
// This will intern the passed-in key string if it has not been interned
// already (consider it pre-caching, if you will). The index of that
// interned string will be returned.
//
size_t MetaTable::IndexForKey(const char *key)
{
   return MetaKey(key).index;
}
Esempio n. 7
0
//
// MetaTable::setConstString
//
// Overload for raw string keys.
//
void MetaTable::setConstString(const char *key, const char *newValue)
{
   setConstString(MetaKey(key).index, newValue);
}
Esempio n. 8
0
//
// MetaTable::setInt
//
// Overload for raw key strings.
//
void MetaTable::setInt(const char *key, int newValue)
{
   setInt(MetaKey(key).index, newValue);
}
Esempio n. 9
0
//
// Overload for raw key strings.
//
void MetaTable::setMetaTable(const char *key, MetaTable *newValue)
{
   setMetaTable(MetaKey(key).index, newValue);
}
Esempio n. 10
0
void MetaTable::removeStringNR(const char *key)
{
   removeStringNR(MetaKey(key).index);
}
Esempio n. 11
0
//
// Overload for raw key strings.
//
const char *MetaTable::getString(const char *key, const char *defValue) const
{
   return getString(MetaKey(key).index, defValue);
}
Esempio n. 12
0
double MetaTable::getDouble(const char *key, double defValue) const
{
   return getDouble(MetaKey(key).index, defValue);
}