Common Desktop Environment: ToolTalk Messaging Overview

Telling Your Application About ToolTalk Functionality

Before your application can utilize the interoperability functionality provided by the ToolTalk service and the Messaging Toolkit, it needs to know where the ToolTalk libraries and toolkit reside.

Using the Messaging Toolkit and Including ToolTalk Commands

To use the ToolTalk service, an application calls ToolTalk functions from the ToolTalk API. The Messaging Toolkit provides functions such as functions to register with the ToolTalk service, to create message patterns, to send messages, to receive messages, and to examine message information. To modify your application to use the ToolTalk service and toolkit, you must include the appropriate header files in your application's .h file.

#include <Tt/tt_c.h>        // ToolTalk Header File 
#include <Tt/tttk.h>        // Messaging Toolkit Header file

Your application also needs to know about the new ToolTalk commands that are in its .c file. Place this information in your application's .h file, too.

Example 2-1 shows how the header file information is included in the CoEditor.h file.

Example 2-1 Including Messaging Information

#ifndef CoEditor_h 
#define CoEditor_h  

#include <X11/Intrinsic.h> 
#include <Tt/tt_c.h>             // ToolTalk Header 
#include <Tt/tttk.h>             // Messaging Toolkit Header

Using the ToolTalk Libraries

You need to change the makefile of your application so that it uses the ToolTalk libraries. To do this, add the -ltt option as follows: