Code: Select all
#inclib "stdc++"
#inclib "fltk"
#inclib "fltk_forms"
extern "c++"
type Fl extends object
declare static function run_ alias "run"() as double
end type
type Fl_Group extends object
dummy(1000) as byte
declare sub end_ __thiscall alias "end" ()
end type
type Fl_Window extends Fl_Group
declare constructor __thiscall(w as long, h as long, title as const zstring ptr)
declare virtual destructor __thiscall
declare sub show __thiscall(argc as long, argv as zstring ptr ptr)
end type
end extern
dim w as Fl_Window = Fl_Window(940,380,"test")
w.end_()
w.show(0,0)
fl.run_()
Now, I have a question: do I have to add "thiscall" to every single line, at this point, or is there a simpler solution? Like, a setting to specify that "thiscall" has to be the default calling convention?