Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert a js function into a structure? #174

Open
steady-join opened this issue Jul 18, 2024 · 0 comments
Open

How to convert a js function into a structure? #174

steady-join opened this issue Jul 18, 2024 · 0 comments

Comments

@steady-join
Copy link

// 1. Define the following structures
const cb = lib.func('BJCastCreateControlManagerIntf', 'int', [
        'pointer',
        'int',
        'string',
])
// 2. Define listener object
const listener = {
  onSuccess(res){
    console.log(res)
  },
  onFailed(){
   // ...
  }
}
// 3. How to use cb and pass listener as the first parameter
cb(listener,1,'test')  // ??? listener to struct 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant