diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2004-10-25 12:42:29 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-25 12:42:29 +0800 |
commit | 47f9f8c3e78916409320a7fcdd0fe05ab83bd352 (patch) | |
tree | 5cd46e9502280fb445bb39cb2235604988f0dbfd /doc/devel | |
parent | 20502ed6dc8e987691afce39157df3be152fd3fa (diff) | |
download | gsoc2013-evolution-47f9f8c3e78916409320a7fcdd0fe05ab83bd352.tar.gz gsoc2013-evolution-47f9f8c3e78916409320a7fcdd0fe05ab83bd352.tar.zst gsoc2013-evolution-47f9f8c3e78916409320a7fcdd0fe05ab83bd352.zip |
Various updates, some more work on auto-generated stuff.
svn path=/trunk/; revision=27711
Diffstat (limited to 'doc/devel')
-rwxr-xr-x | doc/devel/build-eplugin-manual.pl | 109 | ||||
-rw-r--r-- | doc/devel/evolution-plugin-manual.xml | 31 |
2 files changed, 137 insertions, 3 deletions
diff --git a/doc/devel/build-eplugin-manual.pl b/doc/devel/build-eplugin-manual.pl index 6608c876e5..f7e5569b63 100755 --- a/doc/devel/build-eplugin-manual.pl +++ b/doc/devel/build-eplugin-manual.pl @@ -122,3 +122,112 @@ END } +# +# Generic table builder, still experimental. +# + +sub buildxml { + my $type = $_[0]; + my $out = $_[1]; + my %data = %{$_[2]}; + my @files, $module; + + print "generating doc $out for $type\n"; + @files = @{$data{'files'}}; + $module = $data{'module'}; + open OUT,">$out"; + foreach $file (@files) { + open IN,"<../../$module/$file"; + while (<IN>) { + if (m/\/\*\* \@$type: (.*)/) { + my $key = ""; + my $val = ""; + my $desc = 0; + my $title = $1; + my %blob = { }; + my @blobs = (); + + while (<IN>) { + if (m/\@(.*): (.*)/) { + if ($val ne "") { + $blob{$key} = $val; + } + $key = $1; + $val = $2; + push @blobs, $key; + } elsif (m/\* (.+)/) { + $val .= $1."\n"; + } else { + if ($desc == 0) { + if ($val ne "") { + $blob{$key} = $val; + } + $val = ""; + $key = ""; + } else { + $val .= "\n"; + } + if (m/\*\s*$/) { + $desc = 1; + } + } + last if (m/\*\//); + } + print OUT<<END; + <sect2> + <title>$title</title> + <informaltable> + <tgroup cols="2"> + <colspec colnum="1" colname="field" colwidth="1*"/> + <colspec colnum="2" colname="value" colwidth="4*"/> + <tbody valign="top"> +END + + foreach $key (@blobs) { + print OUT <<END; + <row> + <entry>$key</entry> + <entry>$blob{$key}</entry> + </row> +END +} + print OUT <<END; + </tbody> + </tgroup> + </informaltable> +END + if ($val ne "") { + $val =~ s/[\n]+$//gos; + $val =~ s/\n\n/\<\/simpara\>\n\<simpara\>/g; + print OUT "<simpara>$val</simpara>\n"; + } + print OUT "</sect2>\n"; + } + } + close IN; + } + close OUT; +} + + +%hooks = ( 'es-hooks.xml' => + { 'type' => 'HookClass', + 'files' => [ 'es-menu.c', 'es-event.c' ], + 'module' => 'shell' }, + 'es-menus.xml' => + { 'type' => 'HookPoint', + 'files' => [ 'e-shell-window.c' ], + 'module' => 'shell' }, + 'es-events.xml' => + { 'type' => 'Event', + 'files' => [ 'e-shell.c' ], + 'module' => 'shell' }, + ); + +foreach $out (keys %hooks) { + %data = %{$hooks{$out}}; + + &buildxml($data{'type'}, $out, \%data); +} + + diff --git a/doc/devel/evolution-plugin-manual.xml b/doc/devel/evolution-plugin-manual.xml index dbac234ca4..ad84699172 100644 --- a/doc/devel/evolution-plugin-manual.xml +++ b/doc/devel/evolution-plugin-manual.xml @@ -18,6 +18,9 @@ <!ENTITY em-events SYSTEM "em-events.xml"> +<!ENTITY es-events SYSTEM "es-events.xml"> +<!ENTITY es-menus SYSTEM "es-menus.xml"> + ]> <?xml-stylesheet href="sdocbook.css" type="text/css"?> @@ -2872,9 +2875,31 @@ <title> Shell Hooks </title> - <para> - None defined. - </para> + + <sect1 id="shell-hooks-menu"> + <title>Main menus</title> + + <para> + The mail menu class is + <interfacename>org.gnome.evolution.shell.bonobomenu:1.0</interfacename>. + </para> + <para> + The plugin callback data will be the target matching the plugin + menu itself, and the callback returns no value. + </para> + &es-menus; + </sect1> + <sect1 id="shell-hooks-event"> + <title>Events</title> + + <para> + The shell event class is + <interfacename>org.gnome.evolution.shell.events:1.0</interfacename>. + </para> + + &es-events; + </sect1> + </chapter> </part> |