NS_IMETHODIMP KeyboardEvent::GetMetaKey(bool* aIsDown) { NS_ENSURE_ARG_POINTER(aIsDown); *aIsDown = MetaKey(); return NS_OK; }
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; }
// // 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; }
// // 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; }
// // MetaTable::getInt // // Overload for raw key strings. // int MetaTable::getInt(const char *key, int defValue) { return getInt(MetaKey(key).index, defValue); }
// // 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; }
// // MetaTable::setConstString // // Overload for raw string keys. // void MetaTable::setConstString(const char *key, const char *newValue) { setConstString(MetaKey(key).index, newValue); }
// // MetaTable::setInt // // Overload for raw key strings. // void MetaTable::setInt(const char *key, int newValue) { setInt(MetaKey(key).index, newValue); }
// // Overload for raw key strings. // void MetaTable::setMetaTable(const char *key, MetaTable *newValue) { setMetaTable(MetaKey(key).index, newValue); }
void MetaTable::removeStringNR(const char *key) { removeStringNR(MetaKey(key).index); }
// // Overload for raw key strings. // const char *MetaTable::getString(const char *key, const char *defValue) const { return getString(MetaKey(key).index, defValue); }
double MetaTable::getDouble(const char *key, double defValue) const { return getDouble(MetaKey(key).index, defValue); }