Programming Guide


Installs a callback function that executes on changes in warm link data

#include <smmwuser.h>
void sm_dde_install_notify(void (*callback)(char *, char *));

The name of the callback function to install.




sm_dde_install_notify installs a function that Panther calls when it gets notification from a server that warm link data has changed. If no callback function is installed, Panther uses its own callback function to notify the application. After the application is notified, it must explicitly request the data by calling sm_dde_client_request.

Panther supplies two arguments to a callback function: the name of the screen, and the name of the field that contains the link data.

Declare a callback function as follows:

void callback(char* screenname, char *fieldname);


/* Function to notify user of new data via a message and
a checkbox.*/
#include <smdefs.h>

void notify(s_name, f_name)
char *s_name;
char *f_name;
int g_occur; /* group occurrence number */
char *g_name; /* group name */
char buff[128];
sprintf(buff,"New data available for %s on %s",
f_name, s_name);
sm_d_msg_line(buff, 10);
  /* Locate next field, get group name, and use it to set a
checklist item indicating that new data is available.

g_name=sm_ftog(sm_e_fldno(f_name,0) + 1, &g_occur);
sm_select(g_name, g_occur);

See Also