示例#1
0
J4statusColour
j4status_colour_parse(const gchar *string)
{
    J4statusColour ret = { FALSE, 0, 0, 0 };
    NkColour colour_;

    if ( nk_colour_parse(string, &colour_) )
    {
        ret.set   = TRUE;
        ret.red   = colour_.red;
        ret.green = colour_.green;
        ret.blue  = colour_.blue;
    }

    return ret;
}
示例#2
0
J4STATUS_EXPORT J4statusColour
j4status_colour_parse(const gchar *string)
{
    J4statusColour ret = { FALSE, 0, 0, 0, 0xff };
    NkColour colour_;

    if ( nk_colour_parse(string, &colour_) )
    {
        ret.set   = TRUE;
        ret.red   = colour_.red    * 255;
        ret.green = colour_.green  * 255;
        ret.blue  = colour_.blue   * 255;
        ret.alpha  = colour_.alpha * 255;
    }

    return ret;
}