void SendNumCommand ( int func, const char *name, const send_signed_data_type *func_val, const send_signed_data_type *unit_val, send_ID_type window) { if (IsValidFunc (func) && as_module_out_buffer.fd >= 0) { send_module_msg_header(window, 0); send_module_msg_function(func, (char*)name, NULL, func_val, unit_val); send_module_msg_tail (); } }
/* SendCommand - send a preparsed AfterStep command : */ void SendCommand (FunctionData * pfunc, send_ID_type window) { LOCAL_DEBUG_OUT ("sending command %p to the astep", pfunc); if (pfunc != NULL && as_module_out_buffer.fd >= 0) { send_module_msg_header (window, 0); send_module_msg_function (pfunc->func, pfunc->name, pfunc->text, pfunc->func_val, pfunc->unit_val); send_module_msg_tail (); } }
void SendTextCommand ( int func, const char *name, const char *text, send_ID_type window) { send_signed_data_type dummy_val[2] = { 0, 0 }; if (IsValidFunc (func) && as_module_out_buffer.fd >= 0 ) { send_module_msg_header(window, 0); send_module_msg_function(func, (char*)name, (char*)text, dummy_val, dummy_val); send_module_msg_tail (); } }
/*********************************************************************** * High level function for message delivery to AfterStep : ***********************************************************************/ void SendInfo (char *message, send_ID_type window) { if (as_module_out_buffer.fd >= 0) { size_t len; LOCAL_DEBUG_OUT ("message to afterstep:\"%s\"", message); if (message != NULL) { if ((len = strlen (message)) > 0) { send_module_msg_header (window, len); send_module_msg_raw (message, len); send_module_msg_tail (); } } } }