Layer selector: Add prototype and empty function body for function that
fills all layers with colors from a given color palette.
This commit is contained in:
		@@ -33,6 +33,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <gtk/gtk.h>
 | 
					#include <gtk/gtk.h>
 | 
				
			||||||
#include <glib.h>
 | 
					#include <glib.h>
 | 
				
			||||||
 | 
					#include <gds-render/layer/color-palette.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_BEGIN_DECLS
 | 
					G_BEGIN_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -90,6 +91,14 @@ GList *layer_selector_export_rendered_layer_info(LayerSelector *selector);
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
void layer_selector_force_sort(LayerSelector *selector, enum layer_selector_sort_algo sort_function);
 | 
					void layer_selector_force_sort(LayerSelector *selector, enum layer_selector_sort_algo sort_function);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * @brief Apply colors from palette to all layers. Aditionally set alpha
 | 
				
			||||||
 | 
					 * @param layer_selector LayerSelector object
 | 
				
			||||||
 | 
					 * @param palette Color palette to use
 | 
				
			||||||
 | 
					 * @param global_alpha Additional alpha value that is applied to all layers
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					void layer_selector_auto_color_layers(LayerSelector *layer_selector, ColorPalette *palette, double global_alpha);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
G_END_DECLS
 | 
					G_END_DECLS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __LAYER_SELECTOR_H__ */
 | 
					#endif /* __LAYER_SELECTOR_H__ */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -781,4 +781,14 @@ void layer_selector_force_sort(LayerSelector *selector, enum layer_selector_sort
 | 
				
			|||||||
	gtk_list_box_set_sort_func(box, NULL, NULL, NULL);
 | 
						gtk_list_box_set_sort_func(box, NULL, NULL, NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void layer_selector_auto_color_layers(LayerSelector *layer_selector, ColorPalette *palette, double global_alpha)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (GDS_RENDER_IS_COLOR_PALETTE(palette) == FALSE || LAYER_IS_SELECTOR(layer_selector) == FALSE)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if (global_alpha <= 0)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** @} */
 | 
					/** @} */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user