## Htt Server: X Auxiliary Object Sample Program

## Introduction

This directory contains sample programs which demonstrate how X auxiliary object can be implemented.

## Files

This directory contains the following files.

`readme.html`
  This file.
`aux_so.c`
  A source file of X auxiliary object.
`iiimpAux.h`
  A header file which contain definitions for X auxiliary objects.
`aux_ext.c`
  Stand alone Motif application which co-works with X auxiliary object.

## Compile

1. If `Makefile` does not exist, run configure script at src/server.

       $ cd /somewhere/src/server
       $ sh configure

   You can specify your favorite options if you want.
2. Run GNU version of make command.

       $ cd /somewhere/src/server/programs/language_engines/sampleja/xaux
       $ gmake CFLAGS='-g -DENABLE_TRACE'

   This example specifies CFLAGS option to enable some tracing feature.

   If everything goes well, the following two files will be created.

   `aux.so`
     sample X auxiliary object.
   `aux_ext`
     sample stand alone X program which co-works with sample X auxiliary object

## Run

1. Login in CDE/ja environment, and start three terminal emulators.
2. Stop htt_server if running.

       # pkill htt_server

3. Stop XIM service.
4. Start `htt_server` on a terminal emulator.

       $ /usr/lib/im/htt_server -if sampleja

   `htt_server` will write out activity information.
   If sampleja is not installed in the default directory, `-ifpath_name` option should be given to specify the path where `sampleja` object is placed. For detail of sampleja, refer to README of `sampleja`.
5. Start `htt_xbe` on the other terminal emulator.

       $ env TRACE_AUX_SO=DIMPSXs IIIM_AUX_SO_PATH=./aux.so /usr/lib/im/htt_xbe -if sampleja

   `htt_xbe` will write out trace information.
6. Focus on the other (third) terminal emulator.
   Status string of the window will change to ``[日本語オフ]''.
7. Type Control-Space.
   Status string of the window will change to ``[日本語オン]''.
8. Type Control-Q.
   `panel` window will start.
9. Enter characters in text field of `panel` window, then click [text] button.
   aux.so will receive them, and print trace messages.
10. Type Control-E.
    Text field will change to ``選択ウィンドウ''.
11. Type Control-W.
    `aux` window will start.
12. Type Control-W.
    Text field of `aux` window will change to ``9 寛司''.
13. Click on [quit] button, then `aux` window and htt_xbe stop.