void HbGridViewItemPrivate::init() { if (isPrototype()) { HbEffect::add("gridviewitem-focus", "gridviewitem_press", "pressed"); HbEffect::add("gridviewitem-focus", "gridviewitem_release", "released"); mSharedData->mItemType = "gridviewitem"; HbEffect::add("gridviewitem", "gridviewitem_appear", "appear"); HbEffect::add("gridviewitem", "gridviewitem_disappear", "disappear"); } mContentChangedSupported = true; mItemsChanged = false; }
Structure* PrototypeMap::emptyObjectStructureForPrototype(JSObject* prototype, unsigned inlineCapacity) { StructureMap::AddResult addResult = m_structures.add(std::make_pair(prototype, inlineCapacity), nullptr); if (!addResult.isNewEntry) { ASSERT(isPrototype(prototype)); return addResult.iterator->value.get(); } addPrototype(prototype); Structure* structure = JSFinalObject::createStructure( prototype->globalObject()->vm(), prototype->globalObject(), prototype, inlineCapacity); addResult.iterator->value = Weak<Structure>(structure); return structure; }
Structure* PrototypeMap::emptyObjectStructureForPrototype(JSObject* prototype, unsigned inlineCapacity) { auto key = std::make_pair(prototype, inlineCapacity); if (Structure* structure = m_structures.get(key)) { ASSERT(isPrototype(prototype)); return structure; } addPrototype(prototype); Structure* structure = JSFinalObject::createStructure( prototype->globalObject()->vm(), prototype->globalObject(), prototype, inlineCapacity); m_structures.set(key, Weak<Structure>(structure)); return structure; }
inline Structure* PrototypeMap::createEmptyStructure(JSGlobalObject* globalObject, JSObject* prototype, const TypeInfo& typeInfo, const ClassInfo* classInfo, IndexingType indexingType, unsigned inlineCapacity) { auto key = std::make_tuple(prototype, inlineCapacity, classInfo, globalObject); if (Structure* structure = m_structures.get(key)) { ASSERT(isPrototype(prototype)); return structure; } addPrototype(prototype); Structure* structure = Structure::create( globalObject->vm(), globalObject, prototype, typeInfo, classInfo, indexingType, inlineCapacity); m_structures.set(key, Weak<Structure>(structure)); return structure; }
void HbAbstractViewItemPrivate::init() { Q_Q(HbAbstractViewItem); q->setProperty("state", "normal"); if (isPrototype()) { q->setFocusPolicy(Qt::ClickFocus); } else { q->grabGesture(Qt::TapGesture); QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); itemFlags |= QGraphicsItem::ItemIsFocusable; q->setFlags(itemFlags); q->setFocusPolicy(mSharedData->mPrototype->focusPolicy()); mSharedData->mCloneItems.append(q); } }
static void findTag (tokenInfo *const token) { verbose ("Checking token %s of kind %d\n", vStringValue (token->name), token->kind); if (currentContext->kind != K_UNDEFINED) { /* Drop context, but only if an end token is found */ dropContext (token); } if (token->kind == K_CONSTANT && vStringItem (token->name, 0) == '`') { /* Bug #961001: Verilog compiler directives are line-based. */ int c = skipWhite (vGetc ()); readIdentifier (token, c); createTag (token); /* Skip the rest of the line. */ do { c = vGetc(); } while (c != EOF && c != '\n'); vUngetc (c); } else if (token->kind == K_BLOCK) { /* Process begin..end blocks */ processBlock (token); } else if (token->kind == K_FUNCTION || token->kind == K_TASK) { /* Functions are treated differently because they may also include the * type of the return value. * Tasks are treated in the same way, although not having a return * value.*/ processFunction (token); } else if (token->kind == K_ASSERTION) { if (vStringLength (currentContext->blockName) > 0) { vStringCopy (token->name, currentContext->blockName); createTag (token); skipToSemiColon (); } } else if (token->kind == K_TYPEDEF) { processTypedef (token); } else if (token->kind == K_CLASS) { processClass (token); } else if (token->kind == K_IGNORE && isPrototype (token)) { currentContext->prototype = TRUE; } else if (isVariable (token)) { int c = skipWhite (vGetc ()); tagNameList (token, c); } else if (token->kind != K_UNDEFINED && token->kind != K_IGNORE) { int c = skipWhite (vGetc ()); if (isIdentifierCharacter (c)) { readIdentifier (token, c); while (getKind (token) == K_IGNORE) { c = skipWhite (vGetc ()); readIdentifier (token, c); } createTag (token); /* Get port list if required */ c = skipWhite (vGetc ()); if (c == '(' && hasSimplePortList (token)) { processPortList (c); } else { vUngetc (c); } } } }