go-color-group

## go-color-group go-color-group |

## Synopsis

    #define             GO_COLOR_GROUP_HISTORY_SIZE
                        GOColorGroup;
    #define             GO_TYPE_COLOR_GROUP
    #define             GO_COLOR_GROUP                      (obj)
    #define             GO_IS_COLOR_GROUP                   (obj)
    GType               go_color_group_get_type             (void);
    GOColorGroup *      go_color_group_find                 (char const *name,
                                                             gpointer context);
    GOColorGroup *      go_color_group_fetch                (char const *name,
                                                             gpointer context);
    void                go_color_group_add_color            (GOColorGroup *cg,
                                                             GOColor c);

## Object Hierarchy

      GObject
       +----GOColorGroup

## Signals

      "history-changed"                                : Run Last

## Description

## Details

### GO_COLOR_GROUP_HISTORY_SIZE

    #define GO_COLOR_GROUP_HISTORY_SIZE 8

### GOColorGroup

    typedef struct _GOColorGroup GOColorGroup;

### GO_TYPE_COLOR_GROUP

    #define GO_TYPE_COLOR_GROUP     (go_color_group_get_type ())

### GO_COLOR_GROUP()

    #define GO_COLOR_GROUP(obj)     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GO_TYPE_COLOR_GROUP, GOColorGroup))

`obj` : |

### GO_IS_COLOR_GROUP()

    #define GO_IS_COLOR_GROUP(obj)  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GO_TYPE_COLOR_GROUP))

`obj` : |

### go_color_group_get_type ()

    GType               go_color_group_get_type             (void);

Returns : |

### go_color_group_find ()

    GOColorGroup *      go_color_group_find                 (char const *name,
                                                             gpointer context);

No reference is added if it is found.

`name` : | target name
`context` : | an arbitrary id to identify what context to search in
Returns : | Look up the name/context specific color-group. `NULL` if it is not found.

### go_color_group_fetch ()

    GOColorGroup *      go_color_group_fetch                (char const *name,
                                                             gpointer context);

if name is NULL or a name not currently in use by another group then a new group is created and returned. If name was NULL then the new group is given a unique name prefixed by "__cg_autogen_name__" (thereby insuring namespace separation). If name was already used by a group then the reference count is incremented and a pointer to the group is returned.

`name` : | target name
`context` : | identifying context
Returns : | A GOColorGroup

### go_color_group_add_color ()

    void                go_color_group_add_color            (GOColorGroup *cg,
                                                             GOColor c);

Potentially slide the history to add the new colour. If it was already in the history reorder.

`cg` : | GOColorGroup
`c` : | the color

## Signal Details

### The `"history-changed"` signal

    void                user_function                      (GOColorGroup *gocolorgroup,
                                                            gpointer      user_data)         : Run Last

`gocolorgroup` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.