Re: [Vala] True vala introspection



[re-transmission as the last message seemed to include the whole of button.html somehow - weird cut-n-paste bug]

Florian Brosch wrote:
> https://launchpad.net/valadoc
>
>
That is impressive.
I got it to run;
./valadoc --pkg gtk+-2.0 --pkg gmodule-2.0 --pkg glib-2.0 -o /tmp/xp --protected --private ../../phoneui2/src/dialer.vala

It generates good documentation for vala files.

I managed to get it to spit out docmentation for GTK vapi files by using --inherited, but it took about 5 minutes.

Is there a shortcut so I can just give it a vapi file, or even just a classname? (For now I could fake the vala file to have the right class references I guess)

However, in trying to find the signal handler signatures for Gtk.Button, I found just:

   public    signal void               activate                  (  )  ;
   public    signal void               clicked                   (  )  ;
   public    signal void               enter                     (  )  ;
   public    signal void               leave                     (  )  ;
   public    signal void               pressed                   (  )  ;
   public    signal void               released                  (  )  ;

- no arguments, which is about a much sense as I got from the vapi file, but we know from the glade example that the click signal handlers do take arguments:
http://live.gnome.org/Vala/GladeSample

   [CCode (instance_pos = -1)]
   public void on_bHelloWorld_clicked (Gtk.Widget widget) {
       stdout.printf ("Hello World!\n");
   }

Something funny is going on as by the time the handler sees the event both the event-generating object and the handling object are being passed on the stack.

Also; (ever so sweetly) is it possible for valadoc to track the [CCode] and other method attributes so that readers will be able to use the generated documents to discover the proper function definitions? However I suspect in this case you won't be able to as it is probably related to the trickery.

I'll be happy to add xml output to valadoc to support introspection from a vala perspective.

Sam

>
> 2008/6/28 Sam Liddicott <sam liddicott com>:
>
> Such files would also be the basis for automaticly generating vala api documentation.
>
>





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