Home
last modified time | relevance | path

Searched refs:JSValue (Results 1 – 25 of 50) sorted by relevance

12

/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/wrapper/
H A Djs.h27 typedef JSValue (*JSHandler)(const JSValue func, const JSValue ctx, const JSValue args[], JSSize ar…
41 static JSValue Call(JSValue func, JSValue context, JSValue args[], JSSize size);
48 static JSValue Keys(JSValue target);
49 static JSValue Get(JSValue target, JSValue key);
50 static JSValue Get(JSValue target, const char * const prop);
54 static void Set(JSValue target, const char * const prop, JSValue value);
60 static JSValue Call(JSValue target, const char * const prop, JSValue args[], JSSize size);
61 static JSValue Call(JSValue target, const char * const prop);
103 static JSValue Get(JSValue array, uint32_t index);
105 static JSValue Map(JSValue array, JSValue func);
[all …]
H A Djs.cpp94 JSValue JSFunction::Call(JSValue func, JSValue context, JSValue args[], JSSize size) in Call()
109 JSValue JSObject::Keys(JSValue target) in Keys()
114 JSValue JSObject::Get(JSValue target, JSValue key) in Get()
119 JSValue JSObject::Get(JSValue target, const char * const prop) in Get()
148 void JSObject::Set(JSValue target, const char * const prop, JSValue value) in Set()
206 JSValue JSObject::Call(JSValue target, const char * const prop, JSValue args[], JSSize size) in Call()
214 JSValue JSObject::Call(JSValue target, const char * const prop) in Call()
229 JSValue JSGlobal::Get() in Get()
317 JSValue JSArray::Get(JSValue array, uint32_t index) in Get()
329 JSValue JSArray::Map(JSValue array, JSValue func) in Map()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/directive/
H A Ddescriptor_utils.h36 static JSValue CreateIfDescriptor(JSValue getter, JSValue render);
44 static JSValue CreateForDescriptor(JSValue getter, JSValue render);
52 static JSValue CreateDescriptorWatcher(JSValue element, JSValue descriptor);
59 static bool IsIfDescriptor(JSValue descriptor);
66 static bool IsForDescriptor(JSValue descriptor);
73 static bool IsIfDescriptorShown(JSValue descriptor);
82 static JSValue RenderIfDescriptor(JSValue descriptor);
91 static JSValue RenderForDescriptor(JSValue descriptor);
98 static JSValue GetDescriptorRendered(JSValue descriptor);
140 static void ReleaseElement(JSValue element);
[all …]
H A Ddescriptor_utils.cpp31 JSValue DescriptorUtils::CreateIfDescriptor(JSValue getter, JSValue render) in CreateIfDescriptor()
36 JSValue DescriptorUtils::CreateForDescriptor(JSValue getter, JSValue render) in CreateForDescriptor()
41 JSValue DescriptorUtils::CreateDescriptorWatcher(JSValue element, JSValue descriptor) in CreateDescriptorWatcher()
44 JSValue options = JSObject::Create(); in CreateDescriptorWatcher()
77 JSValue DescriptorUtils::RenderIfDescriptor(JSValue descriptor) in RenderIfDescriptor()
86 JSValue DescriptorUtils::RenderForDescriptor(JSValue descriptor) in RenderForDescriptor()
100 JSValue rendered = JSArray::Map(array, render); in RenderForDescriptor()
107 JSValue DescriptorUtils::GetDescriptorRendered(JSValue descriptor) in GetDescriptorRendered()
208 JSValue DescriptorUtils::CreateDescriptor(const char * const type, JSValue getter, JSValue render) in CreateDescriptor()
225 JSValue descriptor = JSObject::Create(); in CreateDescriptor()
[all …]
H A Ddirective_watcher_callback.cpp23 JSValue DirectiveWatcherCallback::Handler(const JSValue func, in Handler()
24 const JSValue context, in Handler()
25 const JSValue args[], in Handler()
32 JSValue options = args[ARG_IDX_OPTIONS]; in Handler()
34 JSValue parentElement = JSObject::Get(options, DescriptorUtils::WATCHER_OPTION_ELEMENT); in Handler()
35 JSValue descriptor = JSObject::Get(options, DescriptorUtils::WATCHER_OPTION_DESCRIPTOR); in Handler()
H A Ddirective_watcher_callback.h42 …static JSValue Handler(const JSValue func, const JSValue context, const JSValue args[], const JSSi…
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/
H A Djsbundle_tdd_test.cpp62 JSValue tag = JSString::Create(TAG_DIV); in CreateElementAttributeLength001()
63 JSValue args[1] = {tag}; in CreateElementAttributeLength001()
84 JSValue options = JSObject::Create(); in CreateElementAttributeLength002()
85 JSValue attrs = JSObject::Create(); in CreateElementAttributeLength002()
204 JSValue tag = JSNumber::Create(1); in CreateElementTagValidation005()
205 JSValue args[1] = {tag}; in CreateElementTagValidation005()
219 JSValue args[1] = {tag}; in CreateElementTagValidation006()
233 JSValue args[1] = {tag}; in CreateElementTagValidation007()
262 JSValue options = JSObject::Create(); in CreateElement2ndAttributeValidation009()
263 JSValue attrs = JSObject::Create(); in CreateElement2ndAttributeValidation009()
[all …]
H A Dpercent_tdd_test.cpp60 void PercentTddTest::PrepareOptions(JSValue &options, JSValue &staticStyle) const in PrepareOptions()
372 JSValue textOption;
373 JSValue textStaticStyle;
382 JSValue divOption;
383 JSValue divStaticStyle;
422 JSValue textOption;
423 JSValue textStaticStyle;
432 JSValue stackOption;
433 JSValue stackStaticStyle;
473 JSValue labelOption;
[all …]
H A Dpercent_tdd_test.h58 void PrepareOptions(JSValue &option, JSValue &staticStyle) const;
60 void SetStyleWithValue(JSValue target, const char *key, const char *value) const;
61 …void ConfigStylesWithRect(JSValue staticStyle, const char *widthValue, const char *heightValue) co…
62 …void ConfigStylesWithPosition(JSValue staticStyle, const char *topValue, const char *leftValue) co…
63 void ConfigStylesWithMargin(JSValue staticStyle, const char *marginValue) const;
64 void ConfigStylesWithMargins(JSValue staticStyle,
69 void VerifyDimension(JSValue element, uint16_t keyID, int16_t targetPX) const;
70 void DumpJSObjectJson(JSValue value) const;
71 Component *BuildViewTree(JSValue component, int16_t parentWidth, int16_t parentHeight) const;
H A Dmarquee_event_tdd_test.cpp63 JSValue page = CreatePage(BUNDLE, strlen(BUNDLE)); in MarqueeEvent001()
66 JSValue value = JSObject::Get(page, "speed"); in MarqueeEvent001()
76 JSValue ret; in MarqueeEvent001()
122 void MarqueeEventTddTest::ClickAgain(JSValue& ret, JSValue& page, JSValue& value, double& speed) in ClickAgain()
H A Dinput_event_tdd_test.cpp848 JSValue refs = JSObject::Get(page, "$refs"); in GetComponent()
849 JSValue targetRef = JSObject::Get(refs, name); in GetComponent()
870 JSValue page = CreatePage(BUNDLE1, strlen(BUNDLE1));
945 JSValue page = CreatePage(BUNDLE2, strlen(BUNDLE2));
1002 JSValue page = CreatePage(BUNDLE3, strlen(BUNDLE3));
1044 JSValue page = CreatePage(BUNDLE4, strlen(BUNDLE4));
1099 JSValue page = CreatePage(BUNDLE5, strlen(BUNDLE5));
1136 JSValue page = CreatePage(BUNDLE6, strlen(BUNDLE6));
1217 JSValue page = CreatePage(BUNDLE7, strlen(BUNDLE7));
1287 JSValue page = CreatePage(BUNDLE8, strlen(BUNDLE8));
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/stylemgr/test/unittest/common/
H A Dstylemgr_tdd_test.cpp104 JSValue styleSheet = jerry_create_object(); in PrepareStyleSheet()
110 JSValue idSelectors = jerry_create_object(); in PrepareStyleSheet()
148 JSValue styleSheet = jerry_create_object(); in PrepareStyleSheetWithKeyValues()
190 JSValue styleOption = jerry_create_object(); in PrepareStyleOption()
196 JSValue styleObj = jerry_create_object(); in PrepareStyleOption()
223 JSValue option = jerry_create_object(); in PrepareAttrOption()
229 JSValue attrsObj = jerry_create_object(); in PrepareAttrOption()
251 JSValue attrsObj = jerry_create_object(); in AddValueToAttrOption()
289 JSValue undefined = jerry_create_undefined(); in ACELiteStyleManagerInlineStyle001()
318 JSValue styleSheet = jerry_create_object(); in ACELiteStyleManagerInlineStyle002()
[all …]
H A Dstylemgr_tdd_test.h53 JSValue PrepareStyleSheet(const char* selectors,
57 JSValue PrepareStyleSheetWithKeyValues(const char* selector,
58 JSValue selectorObj,
63 JSValue PreparePesudoObjects(uint16_t value) const;
65JSValue PrepareStyleOption(const char* styleType, const char* propName, uint16_t propValue) const;
66 JSValue PrepareAttrOption(const char* propName, const char* propValue) const;
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/base/
H A Devent_util.h26 JSValue vm;
27 JSValue fn;
28 JSValue arg;
38 static JSValue CreateEvent(const char *type, UIView &view, const Event &event);
44 static JSValue CreateSwipeEvent(UIView &view, const DragEvent &event);
50 static JSValue CreateTouchEvent(UIView &view, const DragEvent &event);
55 …static void InvokeCallback(JSValue vm, JSValue callback, JSValue event, const void *context = null…
69 static JSValue GetElementByUIView(UIView *view);
H A Devent_util.cpp54 JSValue args[argsLength] = {params->arg}; in CallbackExecutor()
61 JSValue EventUtil::CreateEvent(const char *type, UIView &view, const Event &event) in CreateEvent()
65 JSValue arg = JSObject::Create(); in CreateEvent()
84 JSValue EventUtil::CreateSwipeEvent(UIView &view, const DragEvent &event) in CreateSwipeEvent()
88 JSValue arg = EventUtil::CreateEvent(EVENT_SWIPE, view, event); in CreateSwipeEvent()
120 JSValue EventUtil::CreateTouchEvent(UIView &view, const DragEvent &event) in CreateTouchEvent()
124 JSValue arg = EventUtil::CreateEvent(EVENT_TOUCH, view, event); in CreateTouchEvent()
128 void EventUtil::InvokeCallback(JSValue vm, JSValue callback, JSValue event, const void *context) in InvokeCallback()
148 JSValue EventUtil::GetElementByUIView(UIView *view) in GetElementByUIView()
159 JSValue *elementPtr = reinterpret_cast<JSValue *>(extraMsg->elementPtr); in GetElementByUIView()
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/router/test/unittest/common/
H A Drouter_module_tdd_test.cpp100 JSValue routerParam = UNDEFINED;
147 JSValue extraParam = jerry_create_object();
173 JSValue jsResult = UNDEFINED; in PrepareRouterStateMachine()
193 JSValue result = UNDEFINED; in HookViewModel()
206 JSValue routerParam = UNDEFINED;
235 JSValue routerParam = UNDEFINED;
264 JSValue prameter = UNDEFINED;
293 JSValue prameterObject = UNDEFINED;
321 JSValue object = UNDEFINED;
349 JSValue object = UNDEFINED;
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/test/unittest/common/
H A Ddfx_tdd_test.cpp556 JSValue page = CreatePage(BUNDLE1, strlen(BUNDLE1)); in DfxTest001()
557 JSValue ret = JSObject::Call(page, FUNC_NAME); in DfxTest001()
583 JSValue value = JSObject::Get(page, "textValue"); in DfxTest001()
598 JSValue page = CreatePage(BUNDLE2, strlen(BUNDLE2)); in DfxTest002()
637 JSValue value = JSObject::Get(page, "textValue"); in DfxTest002()
653 JSValue ret = JSObject::Call(page, FUNC_NAME); in DfxTest003()
659 JSValue value = JSObject::Get(page, "textValue"); in DfxTest003()
675 JSValue ret = JSObject::Call(page, FUNC_NAME); in DfxTest004()
710 JSValue domId = JSObject::Get(page, "domId"); in DfxTest005()
736 JSValue msg = JSObject::Get(page, "msg"); in DfxTest006()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/components/
H A Dlist_adapter.h27 JSValue descriptorOrElement; // "For type" child or common child
28 JSValue getterRetList; // "For type" list-item list data
37 JSValue nativeElement;
48 bool Initialize(const JSValue descriptors);
75 bool GenerateListItems(const JSValue descriptors, int16_t size);
77 JSValue GetElement(int16_t listItemsIndex, int16_t index, bool &isFor) const;
78 bool AddForDescriptorToList(JSValue descriptorOrElement, int16_t listItemsIndex) const;
79 void InsertItem(JSValue nativeElement, UIView *uiView);
81 void BuildItemViewTree(const JSValue element) const;
H A Dlist_adapter.cpp72 bool ListAdapter::Initialize(const JSValue descriptors) in Initialize()
96 bool ListAdapter::GenerateListItems(const JSValue descriptors, int16_t size) in GenerateListItems()
103 JSValue descriptorOrElement = JSArray::Get(descriptors, index); in GenerateListItems()
154 JSValue getterRetList = CallJSFunctionOnRoot(getterPropValue, nullptr, 0); in AddForDescriptorToList()
216 JSValue element = GetElement(listItemsIndex, index, isFor); in GetView()
238 JSValue element = UNDEFINED; in GetElement()
240 JSValue getterRetList = listItems_[listItemsIndex].getterRetList; in GetElement()
251 JSValue itemIdx = jerry_create_number(index - startIndex); in GetElement()
253 JSValue args[argsLen] = {item, itemIdx}; in GetElement()
291 void ListAdapter::BuildItemViewTree(const JSValue element) const in BuildItemViewTree()
[all …]
H A Dlist_component.h29 ListComponent(JSValue options, JSValue children, AppStyleManager *styleManager);
37 …bool RegisterPrivateEventListener(uint16_t eventTypeId, JSValue funcValue, bool isStopPropagation)…
49 …static JSValue ListScrollTo(const JSValue func, const JSValue dom, const JSValue args[], const jer…
H A Dlist_component.cpp29 ListComponent::ListComponent(JSValue options, JSValue children, AppStyleManager *styleManager) in ListComponent()
88 bool ListComponent::RegisterPrivateEventListener(uint16_t eventTypeId, JSValue funcValue, bool isSt… in RegisterPrivateEventListener()
123 const JSValue descriptors = GetDescriptors(); in ProcessChildren()
158 const JSValue descriptors = GetDescriptors(); in UpdateForView()
181 JSValue ListComponent::ListScrollTo(const JSValue func, const JSValue dom, in ListScrollTo()
182 const JSValue args[], const jerry_length_t size) in ListScrollTo()
/ohos5.0/foundation/arkui/ace_engine_lite/test/moduletest/common/
H A Dbasic_tdd_test.h49 JSValue RunJS(const char *bundle, const uint32_t size) const;
50 JSValue CreatePage(const char *bundle, const uint32_t size);
51 void DestroyPage(JSValue page);
52 UIView *GetViewByRef(JSValue page, const char *ref) const;
53 void ClickByRef(JSValue page, const char *ref, uint8_t sleepTicks = 50) const;
54 void LongPressByRef(JSValue page, const char *ref, uint8_t sleepTicks = 200) const;
68 void CallLifecycle(JSValue page, const char *lifecycle) const;
H A Dbasic_tdd_test.cpp115 JSValue BasicTddTest::RunJS(const char *bundle, const uint32_t size) const in RunJS()
120 JSValue BasicTddTest::CreatePage(const char *bundle, const uint32_t size) in CreatePage()
122 JSValue page = RunJS(bundle, size); in CreatePage()
128 JSValue rootEl = JSObject::Call(page, "$render"); in CreatePage()
162 void BasicTddTest::DestroyPage(JSValue page) in DestroyPage()
176 UIView *BasicTddTest::GetViewByRef(JSValue page, const char *ref) const in GetViewByRef()
178 JSValue refs = JSObject::Get(page, "$refs"); in GetViewByRef()
183 JSValue dom = JSObject::Get(refs, ref); in GetViewByRef()
195 void BasicTddTest::ClickByRef(JSValue page, const char *ref, uint8_t sleepTicks) const in ClickByRef()
304 void BasicTddTest::CallLifecycle(JSValue page, const char *lifecycle) const in CallLifecycle()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/components/test/unittest/common/event_bubble/
H A Devent_bubble_tdd_test.cpp1003 JSValue page = CreatePage(BUNDLE_CLICK_BUBBBLE, strlen(BUNDLE_CLICK_BUBBBLE)); in EventBubbleTest001()
1005 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest001()
1032 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest002()
1057 JSValue page = CreatePage(BUNDLE_SWIPE_BUBBLE, strlen(BUNDLE_SWIPE_BUBBLE)); in EventBubbleTest003()
1059 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest003()
1089 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest004()
1112 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest005()
1136 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest006()
1163 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest007()
1187 JSValue logs = JSObject::Get(page, propLogs); in EventBubbleTest008()
[all …]
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/test/unittest/common/
H A Dtimer_module_tdd_test.cpp625 const JSValue page) const in TriggerTimer()
635 JSValue value = JSObject::Get(page, "value"); in TriggerTimer()
656 JSValue page = CreatePage(SET_TIMEOUT_001, strlen(SET_TIMEOUT_001));
685 JSValue page = CreatePage(INTERVAL_TEST_002, strlen(INTERVAL_TEST_002));
714 JSValue page = CreatePage(INTERVAL_TEST_003, strlen(INTERVAL_TEST_003));
743 JSValue page = CreatePage(TIME_OUT_004, strlen(TIME_OUT_004));
789 JSValue page = CreatePage(ARG_TEST_005, strlen(ARG_TEST_005));
835 JSValue page = CreatePage(CLEAR_TIME_OUT_006, strlen(CLEAR_TIME_OUT_006));
864 JSValue page = CreatePage(INTERVAL_TEST_007, strlen(INTERVAL_TEST_007));
931 JSValue page = CreatePage(BUNDLE_09, strlen(BUNDLE_09));
[all …]

12