Created Donnerstag 12 März 2009

draft about the future of scripting bindings, object tree ...

needs renaming some funcs in c++

The listed funcs and meths are not complete, yet.


* filter/parameter:


put all Objects into global space or put them into a Freej Object like this:

freej = new Freej()
movie = new freej.MovieLayer('lol') // or = new MovieLayer(...) ?!




in spidermonkey no real differences between props and meths, props can be c++ funcs, too.

currval = // we can define a watcher
                       // in js and/or c (!)
currval =

oldval =

reason for making funcs instead of props, it's easier to script a "toggle", e.g. toggle active:

state =!state)

rule of thumb: we use props for r/o values only

the tree


* obj
+ meth
> callback
- prop (r/o, usually?!)

note: this wiki parser makes it difficult to keep a correct indent ...
every script object is a 'baseObj',
every Layer/Controller/Filter is an Entry

        + label() [for display, short e.g. LAY, MOV, CAM1, WII2]
        - name/id [device name/id]
        - filename [url, set via open()]

                - layers [linklist]
                - controllers [linklist]
                - output [linklist, encoders, viewports, audio[alsa,jack...], to another freej/layer?]
                - ...
                + reset(new file) / run_js(file) => or a js-script object, see below
                + resize(w,h)
                - width, heigth

                + add=push, pop, shift, unshift, remove(n, obj), insert(pos) [e.g. arrange Layer stack]
                - n, length [no of entries]
                > pre_add [can deny add to list e.g. type check]
                > post_add [e.g. autostart movie]

                + move: up, down, top, bottom
                + remove
                - first, last, next, prev [Entry]
                - list [it's [[LinkList]] or NULL]
                + active()
                + open, close
                > eof [end of movie, device disconnect]

                        + x,y,zoom,resize,blit, **crop**, ...
                        - width, heigth
                        - filter [linklist, frei0r]
                        +- audio (?!)
                        + set Limits(mem and/or size)
                        * CamLayer [add camctrl ?!]
                        * Flash
                        * Geo [sdl gfx, how about other like cairo? gl?]
                        * Image
                        * MovieLayer
                                add eof callback to Entry ?
                        * Particle
                        * Text
                        * xgrap [make desktop movie, vnc]

                new context for live scripting or running content from web
                in a different context (->security !)
                yes, u can spawn a seperate script context which _may_ share Objects
                reload a modified script at runtime! (perl never reparses a module twice, python?)

                + open, parse, run
                + init_std_classes, init_freej_classes <<< remember the .exec() !!!


* JSThread
+ start, stop, set_fps, get_fps

ScriptTree (last edited 2009-03-22 13:47:20 by anonymous)