BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Defines | Enumerations | Functions
bstusermessage.hh File Reference
#include "bstutils.hh"

Go to the source code of this file.

Classes

struct  BstMsgBit
struct  BstMessage
struct  BstMsgID

Defines

#define bst_msg_bit_printf(msg_part_id,...)
#define bst_msg_dialog(level,...)
#define BST_MSG_TEXT0(...)
#define BST_MSG_TEXT1(...)
#define BST_MSG_TEXT2(...)
#define BST_MSG_TEXT3(...)
#define BST_MSG_CHECK(...)
#define BST_MSG_TITLE
#define BST_MSG_PRIMARY
#define BST_MSG_SECONDARY
#define BST_MSG_DETAIL
#define BST_MSG_CHOICE(id, name, stock_icon)
#define BST_MSG_CHOICE_D(id, name, stock_icon)
#define BST_MSG_CHOICE_S(id, name, sticn, sens)
#define BST_MSG_DIALOG(lvl,...)

Enumerations

enum  BstMsgType {
  BST_MSG_ERROR, BST_MSG_WARNING, BST_MSG_INFO, BST_MSG_DEBUG,
  BST_MSG_SCRIPT
}

Functions

const charbst_msg_type_ident (BstMsgType)
void bst_message_connect_to_server (void)
void bst_message_dialogs_popdown (void)
guint bst_message_handler (const BstMessage *message)
guint bst_message_dialog_display (const char *log_domain, BstMsgType type, guint n_bits, BstMsgBit **bits)
 bst_message_dialog_display
void bst_msg_bit_free (BstMsgBit *mbit)
BstMsgBitbst_msg_bit_create (guint8 msg_part_id, const std::string &text)
BstMsgBitbst_msg_bit_create_choice (guint id, const gchar *name, const gchar *stock_icon, const gchar *options)

Detailed Description


Function Documentation

guint bst_message_dialog_display ( const char log_domain,
BstMsgType  mtype,
guint  n_bits,
BstMsgBit **  bits 
)

bst_message_dialog_display

Parameters:
log_domainlog domain
mtypeone of BST_MSG_ERROR, BST_MSG_WARNING, BST_MSG_INFO, BST_MSG_DIAG
n_bitsnumber of message bits
bitsmessage bits from bst_msg_bit_printf

Present a message dialog to the user. The current value of errno is preserved around calls to this function. Usually this function isn't used directly, but bst_msg_dialog() is called instead which does not require NULL termination of its argument list and automates the log_domain argument. The log_domain indicates the calling module and relates to G_LOG_DOMAIN as used by g_log(). The msg bit arguments passed in form various parts of the log message, the following macro set is provided to construct the parts from printf-style argument lists:

  • BST_MSG_TITLE(): format message title
  • BST_MSG_TEXT1(): format primary message (also BST_MSG_PRIMARY())
  • BST_MSG_TEXT2(): format secondary message, optional (also BST_MSG_SECONDARY())
  • BST_MSG_TEXT3(): format details of the message, optional (also BST_MSG_DETAIL())
  • BST_MSG_CHECK(): format configuration check statement to enable/disable log messages of this type.
  • BST_MSG_CHOICE(): add buttons other than cancel to the message dialog
  • BST_MSG_CHOICE_D(): same as BST_MSG_CHOICE(), for default buttons
  • BST_MSG_CHOICE_S(): same as BST_MSG_CHOICE(), for insensitive buttons This function is MT-safe and may be called from any thread.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines