![]() |
![]() |
![]() |
libxfce4mcs Reference Manual | ![]() |
---|---|---|---|---|
McsClient; enum McsAction; void (*McsNotifyFunc) (const gchar *name, const gchar *channel_name, McsAction action, McsSetting *setting, void *cb_data); void (*McsWatchFunc) (Window window, gboolean is_start, long mask , void *cb_data); McsClient* mcs_client_new (Display *display, int screen, McsNotifyFunc notify, McsWatchFunc watch, void *cb_data); void mcs_client_destroy (McsClient *client); gboolean mcs_client_process_event (McsClient *client, XEvent *xev); McsChannel* mcs_client_add_channel (McsClient *client, const gchar *channel_name); void mcs_client_delete_channel (McsClient *client, const gchar *channel_name); McsResult mcs_client_get_setting (McsClient *client, const gchar *name, const gchar *channel_name, McsSetting **setting); void mcs_client_show (Display *display, int screen, const gchar *message); gboolean mcs_client_check_manager (Display *display, int screen, const gchar *manager_command);
The MCS client functions are intended to be called by applications that store settings via the MCS manager. The client functions are limited to querying and watching settings data; MCS clients are not capable of changing any settings.
typedef enum { MCS_ACTION_NEW, MCS_ACTION_CHANGED, MCS_ACTION_DELETED } McsAction;
A type used in the McsNotifyFunc to describe a settings event.
void (*McsNotifyFunc) (const gchar *name, const gchar *channel_name, McsAction action, McsSetting *setting, void *cb_data);
A function of this type, passed to mcs_client_new()
will be called when changes
occur in channels that the MCS client is watching.
|
The name of the setting that is affected. |
|
The channel to which the setting belongs. |
|
An McsAction describing the event. |
|
A pointer to the McsSetting that is affected. |
|
Callback data passed to mcs_client_new() .
|
void (*McsWatchFunc) (Window window, gboolean is_start, long mask , void *cb_data);
|
The X window on which an event occurred. |
|
|
|
|
|
Callback data passed to mcs_client_new() .
|
McsClient* mcs_client_new (Display *display, int screen, McsNotifyFunc notify, McsWatchFunc watch, void *cb_data);
Creates a new client connection to the MCS manager running on display
and
screen
.
|
The X display on which the MCS manager is running. |
|
The X screen on which the MCS manager is running. |
|
A McsNotifyFunc to call when changes occur in MCS channels. |
|
A McsWatchFunc to call when (something happens). |
|
A pointer to data to pass to the notify and watch functions.
|
Returns : |
A new McsClient. |
void mcs_client_destroy (McsClient *client);
Frees all resources associated with client
.
|
An McsClient. |
gboolean mcs_client_process_event (McsClient *client, XEvent *xev);
FIXME: Fill me in!
McsChannel* mcs_client_add_channel (McsClient *client, const gchar *channel_name);
Adds a channel to be monitored by client
. This must be called before any
settings changes in that channel will cause the McsNotifyFunc (passed to
mcs_client_new()
) to be called.
|
An McsClient. |
|
The name of the channel to add. |
Returns : |
A pointer to the McsChannel referenced. |
void mcs_client_delete_channel (McsClient *client, const gchar *channel_name);
Removes channel_name
from the list of channels that client
is watching.
The client
will no longer receive notifications of settings changes in this
channel.
|
An McsClient. |
|
The name of a channel this McsClient is watching. |
McsResult mcs_client_get_setting (McsClient *client, const gchar *name, const gchar *channel_name, McsSetting **setting);
Retrieves setting name
from channel channel
name. The result is placed in
setting
and should be freed with mcs_setting_free()
.
|
An McsClient. |
|
The name of a setting. |
|
The name of the channel in which to look for name .
|
|
A pointer to a McsSetting structure. |
Returns : |
MCS_SUCCESS on success, or another McsResult representing an
error that occurred.
|
void mcs_client_show (Display *display, int screen, const gchar *message);
Instructs the MCS manager to show the settings dialog for the module
specified in message
.
|
The X display on which the MCS manager is running. |
|
The X screen on which the MCS manager is running. |
|
The module to show. |