File: plugin-proxy-process.xml

package info (click to toggle)
gwyddion 2.52-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 46,588 kB
  • sloc: ansic: 367,740; python: 7,788; sh: 5,245; makefile: 4,317; xml: 3,631; cpp: 2,550; pascal: 418; perl: 154; ruby: 130
file content (78 lines) | stat: -rw-r--r-- 3,091 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="plugin-proxy-process" revision="$Id: plugin-proxy-process.xml 20682 2017-12-18 18:39:00Z yeti-dn $">
  <refmeta>
    <refentrytitle>Data Process Plug-ins</refentrytitle>
    <manvolnum>3</manvolnum>
    <refmiscinfo>Gwyddion</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>Data Process Plug-ins</refname>
    <refpurpose>
      Data processing by external programs
    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Registration</title>
    <para>
      When the plug-in is called with <literal>register</literal> as
      its first argument it should dump following information about self to
      standard output (each on a separate line) and terminate:
    <itemizedlist>
      <listitem>plug-in name</listitem>
      <listitem>menu path</listitem>
      <listitem>run modes</listitem>
    </itemizedlist>
    </para>
    <para>
      This information correspond to similar
      <link linkend="libgwymodule-gwymodule-process">data process module</link>
      information.  All fields are case-sensitive.  The run modes line
      consists of a space-separated sublist of:
      <simplelist>
        <member><literal>interactive</literal></member>
        <member><literal>noninteractive</literal></member>
        <member><literal>modal</literal></member>
        <member><literal>with_defaults</literal></member>
      </simplelist>
      Note however, truly interactive plug-ins are not supported (and maybe
      they never will, because it is hard to do this without making plug-ins
      derived works of <application>Gwyddion</application>), only modal ones.
    </para>
    <para>
      So the output of plugin <command>my_plugin</command> when run as
      <command>my_plugin register</command> could look:
    </para>
    <informalexample><programlisting><![CDATA[
my_plugin
/_Plug-ins/My Plug-in
noninteractive with_defaults
]]></programlisting></informalexample>
  </refsect1>
  <refsect1>
    <title>Data Processing</title>
    <para>
      When the plug-in is called with <literal>run</literal> as its first
      argument then the second argument is equal to actual run mode (one of
      those it printed during registration) and the third one is the name
      of a <link linkend="plugin-proxy-dump">dump file</link> to process.
    </para>
    <para>
      The plug-in reads the data from dump file, mangles them at its pleasure
      and then overwrite the very same file with the result (do not forget to
      use <function>ftruncate()</function> first or its Win32 equivalent to
      avoid surprises).
    </para>
    <para>
      The plug-in does not need to write back fields it didn't modify,
      values from the original data are used then.
      E.g., when the resolution does not change, it is enough to dump the
      data alone.  This also means it can safely ignore anything it does
      not understand in the dump file.
    </para>
  </refsect1>
</refentry>