[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 12. Language Filters

Please note: This chapter is probably completely outdated!

This chapter discusses the language filter support in Form Designer, targeted primarily to the developers of bindings to other language. As of this writing, the authors are aware of the following bindings

`ada95`

  by G. Vincent Castellano gvc@ocsystems.com

`perl`

  by Martin Bartlett martin@nitram.demon.co.uk

`Fortran`

  by G. Groten zdv017@zam212.zam.kfa-juelich.de and Anke Haeming A.Haeming@kfa-juelich.de

`pascal`

  by Michael Van Canneyt michael@tfdec1.fys.kuleuven.ac.be

`scm/guile`

  by Johannes Leveling Johannes.Leveling@Informatik.Uni-Oldenburg.DE

`python`

  by Roberto Alsina ralsina@ultra7.unl.edu.ar. It would appear that author of python binding is no longer working on it.

These bindings are of varying degree of beta-ness and support. It appears to the authors that the most convenient and flexible way of getting output in the targeted language is through external filters that are invoked transparently by fdesign. This way, developers of the binding would have complete control over the translation of the default output from the fdesign to the target language and at the same time have the translation done transparently.

## 12.1 External Filters

An external filter is a stand-alone program that works on the output of Form Designer and translates the output to the target language. The filter can elect to work on the `.fd` or the C output or both simultaneously. However, in non-testing situations, the c output from Form Designer probably should be deleted by the filter once the translation is complete.

By default, Form Designer only outputs the `.fd` and C files. If the presence of `-ada`, `-perl`, `-python`, `-fortran`, `-pascal` or `-scm` command line options to Form Designer is detected, then after emitting the default output, Form Designer invokes the the external filter with the root filename (without the `.fd` extension) as an argument, together with possible other flags, to the filter. Any runtime error messages are presented to the user in a browser. The filter name by default is `fd2xxxx` where `xxxx` is the language name (such as `fd2perl` etc.), which can be changed using the `-filter` command line option (or equivalent resources).

The resources that are relevant to the filter are listed below

Resource Type Default
language | string | C
filter | string | None

## 12.2 Command Line Arguments of the Filter

Form Designer passes along the options that affect the output format to the filter. These options may or may not apply to the filter, most likely not if the filter works on the C file. For those that do not apply, the filter can simply ignore them, but shouldn't stop running because of these options.

`-callback`

  callback stubs are generated

`-main`

  main stub is generated

`-altformat`

  output in alternate format

`-compensate`

  emit size compensation code

[ << ] | [ >> ] |  |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on January 5, 2026 using texi2html 1.82.