| libxfce4mcs Reference Manual | ||||
|---|---|---|---|---|
McsBuffer;
McsColor;
McsList;
McsChannel;
McsChannelList;
McsSetting;
enum McsType;
enum McsResult;
enum McsManagerCheck;
McsManagerCheck mcs_manager_check_running (Display *display,
int screen);
McsSetting* mcs_setting_copy (McsSetting *setting);
void mcs_setting_free (McsSetting *setting);
int mcs_setting_equal (McsSetting *setting_a,
McsSetting *setting_b);
void mcs_list_free (McsList *list);
McsList* mcs_list_copy (McsList *list);
McsResult mcs_list_insert (McsList **list,
McsSetting *setting);
McsSetting* mcs_list_lookup (McsList *list,
const gchar *name);
McsResult mcs_list_delete (McsList **list,
const gchar *name);
gchar mcs_byte_order (void);
#define MCS_PAD (n,m)
typedef struct {
gchar byte_order;
size_t len;
guchar *data;
guchar *pos;
} McsBuffer;
A data storage buffer.
typedef struct {
guint16 red, green, blue, alpha;
} McsColor;
A structure representing a color value.
typedef struct {
McsSetting *setting;
McsList *next;
} McsList;
A singly-linked list structure containing McsSetting structs.
McsSetting *setting; |
The McsSetting in this list node. |
McsList *next; |
A pointer to the next node in the list. |
typedef struct {
gchar *channel_name;
Atom channel_atom;
McsList *settings;
gboolean raw;
int ref_count;
} McsChannel;
A representation of a settings channel.
typedef struct {
McsChannel *channel;
McsChannelList *next;
} McsChannelList;
A singly-linked list structure containing McsChannel structs.
McsChannel *channel; |
The McsChannel in this list node. |
McsChannelList *next; |
A pointer to the next node in the list. |
typedef struct {
gchar *name;
gchar *channel_name;
McsType type;
union
{
int v_int;
gchar *v_string;
McsColor v_color;
} McsSetting;
A structure representing a setting controlled by the MCS manager.
typedef enum
{
MCS_TYPE_INT = 0,
MCS_TYPE_STRING = 1,
MCS_TYPE_COLOR = 2
}
McsType;
An enumerated type for MCS settings types.
MCS_TYPE_INT |
The setting is an integer value. |
MCS_TYPE_STRING |
The setting is a string value. |
MCS_TYPE_COLOR |
The setting is an McsColor value. |
typedef enum
{
MCS_SUCCESS,
MCS_NO_MEM,
MCS_ACCESS,
MCS_FAILED,
MCS_NO_ENTRY,
MCS_DUPLICATE_ENTRY,
MCS_NO_CHANNEL
}
McsResult;
An enumerated type for detailing error conditions from MCS functions.
typedef enum
{
MCS_MANAGER_NONE,
MCS_MANAGER_STD,
MCS_MANAGER_MULTI_CHANNEL,
MCS_MANAGER_BOTH
}
McsManagerCheck;
An enumerated type detailing what kind of MCS manager is running.
McsManagerCheck mcs_manager_check_running (Display *display, int screen);
Checks to see if there is an MCS manager running on display and screen.
display : |
The X display on which the MCS manager may be running. |
screen : |
The X screen on which the MCS manager may be running. |
| Returns : | An McsManagerCheck value describing what kind of MCS manager (if any) is running. |
McsSetting* mcs_setting_copy (McsSetting *setting);
Makes a copy of setting. You should free the result with mcs_setting_free()
when it is no longer needed.
setting : |
An existing McsSetting. |
| Returns : | A new McsSetting, initialised to the value of setting.
|
void mcs_setting_free (McsSetting *setting);
Frees all resources associated with setting.
setting : |
An McsSetting. |
int mcs_setting_equal (McsSetting *setting_a, McsSetting *setting_b);
Checks to see if setting_a and setting_b represent the same setting
data.
setting_a : |
An McsSetting. |
setting_b : |
An McsSetting. |
| Returns : | 1 if the two settings are the same, 0 otherwise.
|
void mcs_list_free (McsList *list);
Frees all memory associated with list.
list : |
An McsList. |
McsList* mcs_list_copy (McsList *list);
Makes a copy of list. You should free the result with mcs_list_free() when
it is no longer needed.
McsResult mcs_list_insert (McsList **list, McsSetting *setting);
Inserts setting into list, updating the list pointer if necessary.
list : |
A pointer to an existing McsList. |
setting : |
An McsSetting to insert into the list. |
| Returns : | MCS_SUCCESS if the item was successfully inserted.
|
McsSetting* mcs_list_lookup (McsList *list, const gchar *name);
Looks for a setting with name name in the McsList.
list : |
An McsList. |
name : |
The name of a setting. |
| Returns : | The corresponding McsSetting, or NULL if the setting was not
found.
|
McsResult mcs_list_delete (McsList **list, const gchar *name);
Deletes the McsSetting with name name from list, adjusting the list
pointer if necessary.
list : |
A pointer to an existing McsList. |
name : |
The name of the item to delete. |
| Returns : | MCS_SUCCESS on success.
|
gchar mcs_byte_order (void);
Gets the byte ordering for this system.
| Returns : | Either LSBFirst or MSBFirst.
|