manpagez: man pages & more
html files: gdata
Home | html | info | man

GData Types

GData Types — miscellaneous data types

Stability Level

Stable, unless otherwise indicated

Types and Values

Object Hierarchy

    GBoxed
    ╰── GDataColor

Includes

#include <gdata/gdata-types.h>

Description

The structures here are used haphazardly across the library, describing various small data types.

Functions

gdata_color_from_hexadecimal ()

gboolean
gdata_color_from_hexadecimal (const gchar *hexadecimal,
                              GDataColor *color);

Parses hexadecimal and returns a GDataColor describing it in color .

hexadecimal should be in the form #rrggbb, where rr is a two-digit hexadecimal red intensity value, gg is green and bb is blue. The hash is optional.

Parameters

hexadecimal

a hexadecimal color string

 

color

a GDataColor.

[out caller-allocates]

Returns

TRUE on success, FALSE otherwise


gdata_color_to_hexadecimal ()

gchar *
gdata_color_to_hexadecimal (const GDataColor *color);

Returns a string describing color in hexadecimal form; in the form #rrgg bb, where rr is a two-digit hexadecimal red intensity value, gg is green and bb is blue. The hash is always present.

Parameters

color

a GDataColor

 

Returns

the color string; free with g_free()

Since: 0.3.0

Types and Values

GDataColor

typedef struct {
	guint16 red;
	guint16 green;
	guint16 blue;
} GDataColor;

Describes a color, such as used in the Google Calendar interface to differentiate calendars.

Members

guint16 red;

red color intensity, from 0–255

 

guint16 green;

green color intensity, from 0–255

 

guint16 blue;

blue color intensity, from 0–255

 
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.