/* * Author: William Chia-Wei Cheng (william@cs.ucla.edu) * * @(#)$Header: /mm/src/tgif/v4/export-filters/RCS/README,v 4.1 1999/01/11 13:35:53 william Exp $ */ This is the README file for tgif's export-filters samples. A copy of this file is at: ftp://bourbon.cs.umd.edu/pub/tgif/misc/export-filters/README Tgif's export-filters samples can be found in: ftp://bourbon.cs.umd.edu/pub/tgif/misc/export-filters/export-filters.tar.gz Please put export-filters.tar.gz in tgif's source directory (for example, /home/you/tgif-4.0.1) and do: gunzip -c export-filters.tar.gz | tar xvf - This will create , e.g., /home/you/tgif-4.0.1/export-filters /home/you/tgif-4.0.1/export-filters/foo /home/you/tgif-4.0.1/export-filters/bar By default, "export-filters/Export.tmpl" is a symbolic link to "export-filters/Export.tmpl-linux". If you are not using Linux, you should create a symbolic link to the correct file. For example, if you are using Solaris, do: cd export-filters rm Export.tmpl ln -s Export.tmpl-solaris Export.tmpl cd .. Now do: 1) cd export-filters xmkmf make Makefile make Makefiles make depend make all 2) this will create: /home/you/tgif-4.0.1/export-filters/foo/libfoo.so.1 /home/you/tgif-4.0.1/export-filters/bar/libbar.so.1 3) Add the following lines to your X resource file: Tgif.MaxExportFilters: 2 Tgif.ExportFilter0: /home/you/tgif-4.0.1/export-filters/foo/libfoo.so.1 Tgif.ExportFilter1: /home/you/tgif-4.0.1/export-filters/bar/libbar.so.1 4) When you start tgif the next time, you should see the following: a) The following will be printed in the console when libfoo.so.1 initializes: FOO: Got TGEF_MSG_INIT. FOO: Got TGEF_MSG_GET_PROTOCOL_VERSION. FOO: Got TGEF_MSG_LOAD. b) libfoo.so.1 calls Dialog() to ask you to "Input something". At this time you can type "Hello", the libfoo.so.1 will call MsgBox() to display "Hello". c) The following will be printed in the console when libbar.so.1 initializes: BAR: Got TGEF_MSG_INIT. BAR: Got TGEF_MSG_GET_PROTOCOL_VERSION. BAR: Got TGEF_MSG_LOAD. d) libbar.so.1 calls Dialog() to ask you to "Input something". At this time you can type "Bye", the libbar.so.1 will call MsgBox() to display "Bye". e) After tgif comes up, go into text mode and enter: Hello World Bye Now Save the file into, for example, hello.obj. Select FOO from the Print/ExportFormat Submenu of the File Menu and select Print() from the File Menu. The following will be printed in the console: FOO: Got TGEF_MSG_DO_EXPORT. A file named "hello.cfo" will be generated and it's should be empty because libfoo.so.1 is a dummy and doesn't really export anything. Select BAR from the Print/ExportFormat Submenu of the File Menu and select Print() from the File Menu. The following will be printed in the console: BAR: Got TGEF_MSG_DO_EXPORT. A file named "hello.cba" will be generated and it's should contain the text you entered. f) When you exit tgif, the following will be printed in the console during unloading and cleaning up: FOO: Got TGEF_MSG_UNLOAD. FOO: Got TGEF_MSG_CLEANUP. BAR: Got TGEF_MSG_UNLOAD. BAR: Got TGEF_MSG_CLEANUP.