Author: abrander
Date: 2009-12-31 02:25:52 +0100 (Thu, 31 Dec 2009)
New Revision: 2936

Modified:
   branches/rawstudio-ng-color/src/application.h
   branches/rawstudio-ng-color/src/rs-photo.c
   branches/rawstudio-ng-color/src/rs-photo.h
Log:
Added dcp property to RS_PHOTO.

Modified: branches/rawstudio-ng-color/src/application.h
===================================================================
--- branches/rawstudio-ng-color/src/application.h       2009-12-31 01:21:59 UTC 
(rev 2935)
+++ branches/rawstudio-ng-color/src/application.h       2009-12-31 01:25:52 UTC 
(rev 2936)
@@ -50,6 +50,7 @@
        RS_RECT *crop;
        gdouble angle;
        gboolean exported;
+       RSDcpFile *dcp;
        gboolean dispose_has_run;
 } RS_PHOTO;
 

Modified: branches/rawstudio-ng-color/src/rs-photo.c
===================================================================
--- branches/rawstudio-ng-color/src/rs-photo.c  2009-12-31 01:21:59 UTC (rev 
2935)
+++ branches/rawstudio-ng-color/src/rs-photo.c  2009-12-31 01:25:52 UTC (rev 
2936)
@@ -28,6 +28,7 @@
 enum {
        SPATIAL_CHANGED,
        SETTINGS_CHANGED,
+       PROFILE_CHANGED,
        LAST_SIGNAL
 };
 
@@ -99,6 +100,14 @@
                NULL,
                g_cclosure_marshal_VOID__VOID,
                G_TYPE_NONE, 0);
+       signals[PROFILE_CHANGED] = g_signal_new ("profile-changed",
+               G_TYPE_FROM_CLASS (klass),
+               G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+               0, /* Is this right? */
+               NULL,
+               NULL,
+               g_cclosure_marshal_VOID__OBJECT,
+               G_TYPE_NONE, 0);
 
        parent_class = g_type_class_peek_parent (klass);
 }
@@ -358,6 +367,28 @@
 }
 
 /**
+ * Assign a DCP profile to a photo
+ * @param photo A RS_PHOTO
+ * @param dcp A DCP profile
+ */
+void
+rs_photo_set_dcp_profile(RS_PHOTO *photo, RSDcpFile *dcp)
+{
+       g_assert(RS_IS_PHOTO(photo));
+
+       photo->dcp = dcp;
+
+       g_signal_emit(photo, signals[PROFILE_CHANGED], 0, photo->dcp);
+}
+
+/**
+ * Get the assigned DCP profile for a RS_PHOTO
+ * @param photo A RS_PHOTO
+ * @return A DCP profile or NULL
+ */
+extern void rs_photo_get_dcp_profile(RS_PHOTO *photo);
+
+/**
  * Sets the white balance of a RS_PHOTO using warmth and tint variables
  * @param photo A RS_PHOTO
  * @param snapshot Which snapshot to affect

Modified: branches/rawstudio-ng-color/src/rs-photo.h
===================================================================
--- branches/rawstudio-ng-color/src/rs-photo.h  2009-12-31 01:21:59 UTC (rev 
2935)
+++ branches/rawstudio-ng-color/src/rs-photo.h  2009-12-31 01:25:52 UTC (rev 
2936)
@@ -225,6 +225,20 @@
 extern void rs_photo_mirror(RS_PHOTO *photo);
 
 /**
+ * Assign a DCP profile to a photo
+ * @param photo A RS_PHOTO
+ * @param dcp A DCP profile
+ */
+extern void rs_photo_set_dcp_profile(RS_PHOTO *photo, RSDcpFile *dcp);
+
+/**
+ * Get the assigned DCP profile for a RS_PHOTO
+ * @param photo A RS_PHOTO
+ * @return A DCP profile or NULL
+ */
+extern void rs_photo_get_dcp_profile(RS_PHOTO *photo);
+
+/**
  * Sets the white balance of a RS_PHOTO using warmth and tint variables
  * @param photo A RS_PHOTO
  * @param snapshot Which snapshot to affect


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to