Skip to content

Commit

Permalink
Update type
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Feb 7, 2025
1 parent 4488f81 commit 4909a7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ContextType } from '../../../ets/common/Constants';
import resourceManager from '@ohos.resourceManager';

interface context {
export interface context {
onPageShow: () => void;
onPageHide: () => void;
workerInit: () => void;
Expand All @@ -21,11 +22,10 @@ interface context {
onDestroy: () => void;
onShow: () => void;
onHide: () => void;
resourceManagerInit: (resourceManager: any) => void;
resourceManagerInit: (resourceManager: resourceManager.ResourceManager) => void;
writablePathInit: (cacheDir: string) => void;
onVideoEvent: (param: string) => void;
registerFunction: (name:string ,fun:Function) => void;
}

export const getContext: (type: ContextType) => context;
export const evalString: (value: string) => any;
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import UIAbility from '@ohos.app.ability.UIAbility';
import cocos from 'libcocos.so';
import cocos, { context } from 'libcocos.so';
import { ContextType } from '../common/Constants';
import window from '@ohos.window';
import { BusinessError } from '@kit.BasicServicesKit';
import { AbilityConstant, Want } from '@kit.AbilityKit';

const nativeContext = cocos.getContext(ContextType.ENGINE_UTILS);
const nativeAppLifecycle = cocos.getContext(ContextType.APP_LIFECYCLE);
const nativeContext: context = cocos.getContext(ContextType.ENGINE_UTILS);
const nativeAppLifecycle: context = cocos.getContext(ContextType.APP_LIFECYCLE);
enum windowStageType {
hide,
show
Expand Down

0 comments on commit 4909a7f

Please sign in to comment.