|  |  |  | gedit Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#include <gedit/gedit-message.h> struct GeditMessage; void gedit_message_get (GeditMessage *message,...); void gedit_message_get_valist (GeditMessage *message,va_list var_args); void gedit_message_get_value (GeditMessage *message,const gchar *key,GValue *value); void gedit_message_set (GeditMessage *message,...); void gedit_message_set_valist (GeditMessage *message,va_list var_args); void gedit_message_set_value (GeditMessage *message,const gchar *key,GValue *value); void gedit_message_set_valuesv (GeditMessage *message,const gchar **keys,GValue *values,gint n_values); const gchar * gedit_message_get_object_path (GeditMessage *message); const gchar * gedit_message_get_method (GeditMessage *message); gboolean gedit_message_has_key (GeditMessage *message,const gchar *key); GType gedit_message_get_key_type (GeditMessage *message,const gchar *key); gboolean gedit_message_validate (GeditMessage *message);
"method" gchar* : Read "object-path" gchar* : Read "type" GeditMessageType* : Read / Write / Construct Only
Communication on a GeditMessageBus is done through messages. Messages are sent over the bus and received by connecting callbacks on the message bus. A GeditMessage is an instantiation of a GeditMessageType, containing values for the arguments as specified in the message type.
A message can be seen as a method call, or signal emission depending on who is the sender and who is the receiver. There is no explicit distinction between methods and signals.
void gedit_message_get (GeditMessage *message,...);
Get values of message arguments. The supplied var_args should contain
pairs of keys and pointers to variables which are set to the argument
value for the specified key.
| 
 | the GeditMessage | 
| 
 | a NULLvariable argument list of key/value container pairs | 
void gedit_message_get_valist (GeditMessage *message,va_list var_args);
Get values of message arguments. The supplied var_args should contain
pairs of keys and pointers to variables which are set to the argument
value for the specified key.
| 
 | the GeditMessage | 
| 
 | a NULLvariable argument list of key/value container pairs | 
void gedit_message_get_value (GeditMessage *message,const gchar *key,GValue *value);
Get the value of a specific message argument. value will be initialized
with the correct type.
| 
 | the GeditMessage | 
| 
 | the argument key | 
| 
 | value return container. [out] | 
void gedit_message_set (GeditMessage *message,...);
Set values of message arguments. The supplied var_args should contain
pairs of keys and argument values.
| 
 | the GeditMessage | 
| 
 | a NULLterminated variable list of key/value pairs | 
void gedit_message_set_valist (GeditMessage *message,va_list var_args);
Set values of message arguments. The supplied var_args should contain
pairs of keys and argument values.
| 
 | the GeditMessage | 
| 
 | a NULLterminated variable list of key/value pairs | 
void gedit_message_set_value (GeditMessage *message,const gchar *key,GValue *value);
Set value of message argument key to value.
| 
 | the GeditMessage | 
| 
 | the argument key | 
| 
 | the argument value. [out] | 
void gedit_message_set_valuesv (GeditMessage *message,const gchar **keys,GValue *values,gint n_values);
Set message argument values.
| 
 | the GeditMessage | 
| 
 | keys to set values for. [array length=n_values] | 
| 
 | values to set. [array length=n_values] | 
| 
 | number of arguments to set values for | 
const gchar *       gedit_message_get_object_path       (GeditMessage *message);
Get the message object path.
| 
 | the GeditMessage | 
| Returns : | the message object path | 
const gchar *       gedit_message_get_method            (GeditMessage *message);
Get the message method.
| 
 | the GeditMessage | 
| Returns : | the message method | 
gboolean gedit_message_has_key (GeditMessage *message,const gchar *key);
Check whether the message has a specific key.
| 
 | the GeditMessage | 
| 
 | the argument key | 
| Returns : | TRUEifmessagehas argumentkey | 
GType gedit_message_get_key_type (GeditMessage *message,const gchar *key);
Get the type of a message argument.
| 
 | the GeditMessage | 
| 
 | the argument key | 
| Returns : | the type of key | 
gboolean            gedit_message_validate              (GeditMessage *message);
Validates the message arguments according to the message type.
| 
 | the GeditMessage | 
| Returns : | TRUEif the message is valid |