GDS-Render v1.2.1
color-palette.h File Reference

Class representing a color palette. More...

#include <glib.h>
#include <gtk/gtk.h>
Include dependency graph for color-palette.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TYPE_GDS_RENDER_COLOR_PALETTE   (color_palette_get_type())
 

Functions

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (ColorPalette, color_palette, GDS_RENDER, COLOR_PALETTE, GObject)
 
ColorPalette * color_palette_new_from_resource (char *resource_name)
 Create a new object with from a resource containing the html hex color scheme. More...
 
GdkRGBA * color_palette_get_color (ColorPalette *palette, GdkRGBA *color, unsigned int index)
 Get the n-th color in the palette identified by the index. More...
 
unsigned int color_palette_get_color_count (ColorPalette *palette)
 Return amount of stored colors in palette. More...
 

Detailed Description

Class representing a color palette.

Author
Mario Hüttel mario.nosp@m..hue.nosp@m.ttel@.nosp@m.gmx..nosp@m.net

Definition in file color-palette.h.

Macro Definition Documentation

◆ TYPE_GDS_RENDER_COLOR_PALETTE

#define TYPE_GDS_RENDER_COLOR_PALETTE   (color_palette_get_type())

Definition at line 36 of file color-palette.h.

Function Documentation

◆ color_palette_get_color()

GdkRGBA * color_palette_get_color ( ColorPalette *  palette,
GdkRGBA *  color,
unsigned int  index 
)

Get the n-th color in the palette identified by the index.

This function fills the nth color into the supplied color. color is returned.

If color is NULL, a new GdkRGBA is created and returned. This element must be freed afterwards.

Parameters
paletteColor palette
colorGdkRGBA struct to fill data in. May be NULL.
indexIndex of color. Starts at 0
Returns
GdkRGBA color. If color is NULL, the returned color must be freed afterwards

Definition at line 199 of file color-palette.c.

Here is the caller graph for this function:

◆ color_palette_get_color_count()

unsigned int color_palette_get_color_count ( ColorPalette *  palette)

Return amount of stored colors in palette.

Parameters
paletteColor palette
Returns
Count of colors

Definition at line 223 of file color-palette.c.

Here is the caller graph for this function:

◆ color_palette_new_from_resource()

ColorPalette * color_palette_new_from_resource ( char *  resource_name)

Create a new object with from a resource containing the html hex color scheme.

Parameters
resource_nameName of the resource
Returns
New object

Definition at line 188 of file color-palette.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE ( ColorPalette  ,
color_palette  ,
GDS_RENDER  ,
COLOR_PALETTE  ,
GObject   
)