Color Combinate Widget Reference Manual | ||||
---|---|---|---|---|
enum CcCombineType; enum CcVariationType; CcColorcombinateDialog;GtkWidget * cc_colorcombinate_dialog_new (void);gboolean cc_load_palette (CcColorcombinateDialog *dlg,gchar *file,GError **error);gboolean cc_get_palette_file_is_loaded (CcColorcombinateDialog *dlg);gchar * cc_get_palette_name (CcColorcombinateDialog *dlg);gchar * cc_get_palette_filename (CcColorcombinateDialog *dlg);gint cc_get_palette_columns (CcColorcombinateDialog *dlg); CcCombineType cc_get_combination_type (CcColorcombinateDialog *dlg); CcVariationType cc_get_variation_type (CcColorcombinateDialog *dlg);gchar * cc_get_palette_as_string (CcColorcombinateDialog *dlg);GList * cc_get_combination_colors (CcColorcombinateDialog *dlg);GList * cc_get_variation_colors (CcColorcombinateDialog *dlg);GList * cc_get_palette_colors (CcColorcombinateDialog *dlg);void cc_color_list_free (GList *colors_list);void cc_add_tool_button (CcColorcombinateDialog *dlg,GtkToolItem *item,gint pos);
CcColorcombinateDialog is a
typedef enum _cc_combine_type { CC_MONOCHROMATIC, CC_ANALOGOUS, CC_COMPLEMENTARY, CC_SPLIT_COMPLEMENTARY, CC_TRIADIC, CC_TETRADIC } CcCombineType;
The type of combination selected by the user
typedef enum _cc_variation_type { CC_LIGHTNESS, CC_SATURATION, CC_TINT, CC_SHADE } CcVariationType;
The type of variation selected by the user
typedef struct { GtkDialog parent_instance; GtkColorSelection *colorselection; } CcColorcombinateDialog;
This structure implements a ColorCombinate dialog widget.
parent_instance ; |
The parent |
colorselection ; |
The gtk color selection widget used on the dialog. |
GtkWidget * cc_colorcombinate_dialog_new (void);
Creates a CcColorcombinateDialog widget.
Returns : | A new CcColorcombinateDialog |
gboolean cc_load_palette (CcColorcombinateDialog *dlg,gchar *file,GError **error);
Loads a Gimp palette on the dialog's palette view.
dlg : |
The CcColorcombinateDialog |
file : |
The palette file |
error : |
A return value for the error if any |
Returns : | A boolean indicating success or failure loading the file. |
gboolean cc_get_palette_file_is_loaded (CcColorcombinateDialog *dlg);
Returns whether a palette file is loaded or nt in the dialog.
dlg : |
The CcColorcombinateDialog |
Returns : | A boolean indicating whether a palette file is loaded or not |
gchar * cc_get_palette_name (CcColorcombinateDialog *dlg);
Returns the palette name, if any.
dlg : |
The CcColorcombinateDialog |
Returns : | A newly allocated string with the palette name or NULL if the palette have no name. The caller must free the returned string when no longer needed. |
gchar * cc_get_palette_filename (CcColorcombinateDialog *dlg);
Returns the palette file name (path), if any.
dlg : |
The CcColorcombinateDialog |
Returns : | A newly allocated string with the palette file name or NULL if the palette have no name. The caller must free the returned string when no longer needed. |
gint cc_get_palette_columns (CcColorcombinateDialog *dlg);
Returns the number of columns in the palette. It have a meaning for other Gimp palette supporting applications - such as Gimp and Inkscape - but not for the dialog itself.
dlg : |
The CcColorcombinateDialog |
Returns : | The number of columns on the palette. |
CcCombineType cc_get_combination_type (CcColorcombinateDialog *dlg);
Returns the CcCombineType indicating the type of combination being used.
dlg : |
The CcColorcombinateDialog. |
Returns : | A CcCombineType value. |
CcVariationType cc_get_variation_type (CcColorcombinateDialog *dlg);
Returns the CcVariationType indicating the type of variation being used.
dlg : |
The CcColorcombinateDialog. |
Returns : | A CcVariationType value. |
gchar * cc_get_palette_as_string (CcColorcombinateDialog *dlg);
This function generates a newly allocated string in Gimp palette format with current colors and settings. This string is suited to be saved as a Gimp palette file. The caller must free the string when no longer needed.
dlg : |
The CcColorcombinateDialog. |
Returns : | A newly allocated UTF-8 string in Gimp palette format. |
GList * cc_get_combination_colors (CcColorcombinateDialog *dlg);
This function generates a GList of pointers to GdkColor structures, with the current combination colors. All colors should be free with gtk_color_free or using the function cc_color_list_free to free the whole list.
dlg : |
The CcColorcombinateDialog. |
Returns : | A GList* of GdkColor pointers. |
GList * cc_get_variation_colors (CcColorcombinateDialog *dlg);
This function generates a GList of pointers to GdkColor structures, with the current variation colors. All colors should be free with gtk_color_free or using the function cc_color_list_free to free the whole list.
dlg : |
The CcColorcombinateDialog. |
Returns : | A GList* of GdkColor pointers. |
GList * cc_get_palette_colors (CcColorcombinateDialog *dlg);
This function generates a GList of pointers to GdkColor structures, with the colors on the palette view. All colors should be free with gtk_color_free or using the function cc_color_list_free to free the whole list.
dlg : |
The CcColorcombinateDialog. |
Returns : | A GList* of GdkColor pointers. |
void cc_color_list_free (GList *colors_list);
Frees a GList* of allocated GdkColor* as those returned by cc_get_combination_colors cc_get_variation_colors and cc_get_palette_colors
colors_list : |
A GList* of allocated GdkColor pointers. |
void cc_add_tool_button (CcColorcombinateDialog *dlg,GtkToolItem *item,gint pos);
Adds a button in the actions tool bar.
dlg : |
The CcColorcombinateDialog. |
item : |
A |
pos : |
The position on the tool bar. |