Author: post
Date: 2010-08-25 18:52:46 +0200 (Wed, 25 Aug 2010)
New Revision: 3513
Modified:
trunk/librawstudio/rs-color-space.c
trunk/librawstudio/rs-color-space.h
Log:
Add functions for retrieve name and description of a colorspace.
Modified: trunk/librawstudio/rs-color-space.c
===================================================================
--- trunk/librawstudio/rs-color-space.c 2010-08-25 16:50:57 UTC (rev 3512)
+++ trunk/librawstudio/rs-color-space.c 2010-08-25 16:52:46 UTC (rev 3513)
@@ -150,3 +150,29 @@
else
return rs_1d_function_new_singleton();
}
+
+/**
+ * Get the name of the colorspace
+ * @param color_space A RSColorSpace
+ * @return A string containing the name of the colorspace
+ */
+const char *
+rs_color_space_get_name(const RSColorSpace *color_space)
+{
+ RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space);
+ return klass->name;
+}
+
+/**
+ * Get a description of the colorspace
+ * @param color_space A RSColorSpace
+ * @return A string containing a description of the colorspace
+ */
+const char *
+rs_color_space_get_description(const RSColorSpace *color_space)
+{
+ RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space);
+ return klass->description;
+}
+
+G_END_DECLS
\ No newline at end of file
Modified: trunk/librawstudio/rs-color-space.h
===================================================================
--- trunk/librawstudio/rs-color-space.h 2010-08-25 16:50:57 UTC (rev 3512)
+++ trunk/librawstudio/rs-color-space.h 2010-08-25 16:52:46 UTC (rev 3513)
@@ -139,6 +139,22 @@
const RS1dFunction *
rs_color_space_get_gamma_function(const RSColorSpace *color_space);
+/**
+ * Get the name of the colorspace
+ * @param color_space A RSColorSpace
+ * @return A string containing the name of the colorspace
+ */
+const char *
+rs_color_space_get_name(const RSColorSpace *color_space);
+
+/**
+ * Get a description of the colorspace
+ * @param color_space A RSColorSpace
+ * @return A string containing a description of the colorspace
+ */
+const char *
+rs_color_space_get_description(const RSColorSpace *color_space);
+
G_END_DECLS
#endif /* RS_COLOR_SPACE_H */
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit