denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Scripting in Denemo


From: Richard Shann
Subject: Re: [Denemo-devel] Scripting in Denemo
Date: Fri, 01 Aug 2008 14:45:47 +0100

On Mon, 2008-07-28 at 17:30 +0100, Richard Shann wrote:
> I am only urging that no-one
> undertakes such a project thinking it is just a matter of writing an
> interface to some functions in Denemo.  
I've been doing some more thinking about this. It occurs to me that it
would be quite quick (~1hr) to write interface code for each GtkAction
callback function that exists in Denemo. With the appropriate language
binding gizmos you could then have a scripted interface to anything that
you can currently do with the menu items. Since it is our intention that
nothing you do clicking on menu items should ever crash Denemo, this
should be a reliable target for scripts.

How useful this could be I am not entirely clear: the callbacks could
check if they were being called from a script by using GTK_IS_ACTION()
on the first argument, and so could avoid throwing up dialogs. They
could also accept and return values, although the scripter might then be
able to crash Denemo. (Some things would be safe: for example NextStaff
could return TRUE if it succeeded etc).

If this idea appeals, I could write the interface code from a loop
inside Denemo, going through the actions (this would be using my
upcoming 0.7.10 code which has just one set of actions per Denemo
invocation). 
I would need a template for the interface code required, though. 
(This would, (I'm guessing), be some sort of C array of string/callback
function pairs, associating names with callback functions together with
the same name strings and parameter type information in some interface
language format - your adnote.i thing?)

Then it would just be a question of linking in a library that accessed
the array generated and linked to the interpreter of your choice.

Richard






reply via email to

[Prev in Thread] Current Thread [Next in Thread]