-
Notifications
You must be signed in to change notification settings - Fork 193
Closed as not planned
Description
//import type from '@txikijs/types';
const sopath = './libcfltk.so';
import FFI from 'tjs:ffi';
const testlib = new FFI.Lib(sopath);
const cfltk ={
Fl_Window_new: new FFI.CFunction(testlib.symbol('Fl_Window_new'), FFI.types.pointer, [FFI.types.sint,FFI.types.sint,FFI.types.sint,FFI.types.sint,FFI.types.string]),
Fl_Window_end: new FFI.CFunction(testlib.symbol('Fl_Window_end'), FFI.types.void, [FFI.types.pointer]),
Fl_Window_show: new FFI.CFunction(testlib.symbol('Fl_Window_show'), FFI.types.void, [FFI.types.pointer]),
Fl_run: new FFI.CFunction(testlib.symbol('Fl_run'),FFI.types.void, [])
}
const handle = cfltk.Fl_Window_new.call(0, 0, 300, 400, "AAAAA");
cfltk.Fl_Window_end.call(handle);
cfltk.Fl_Window_show.call(handle);
cfltk.Fl_run.call();The window should show "AAAAA" as title. The same (adapted) code run in Bun results in the expected behaviour.
According to code I have seen in test this should be valid.
I attached the library in case you want to try it youself. It is derived from https://github.com/MoAlyousef/cfltk for linux amd64.
libcfltk.so.gz
Metadata
Metadata
Assignees
Labels
No labels