summaryrefslogtreecommitdiff
path: root/src/photos/PhotoFileAdapter.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
commit8e1c5a834469d804d28ee8ab2cbe2da8e600a789 (patch)
treeb9771456583eaead893cfd8f02e680b58a3da970 /src/photos/PhotoFileAdapter.vala
parent80a5f2d8b095e895a5424f90b2ce4684d94c1a32 (diff)
parent3253d99365813f2d2ffd05e10cbb8c11f53d746e (diff)
Merge tag 'upstream/0.26.0'
Upstream version 0.26.0
Diffstat (limited to 'src/photos/PhotoFileAdapter.vala')
-rw-r--r--src/photos/PhotoFileAdapter.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/photos/PhotoFileAdapter.vala b/src/photos/PhotoFileAdapter.vala
index 644917c..df49edb 100644
--- a/src/photos/PhotoFileAdapter.vala
+++ b/src/photos/PhotoFileAdapter.vala
@@ -57,6 +57,13 @@ public abstract class PhotoFileAdapter {
//
public abstract class PhotoFileReader : PhotoFileAdapter {
+ public enum Role {
+ DEFAULT,
+ THUMBNAIL
+ }
+
+ PhotoFileReader.Role role = Role.DEFAULT;
+
protected PhotoFileReader(string filepath, PhotoFileFormat file_format) {
base (filepath, file_format);
}
@@ -76,6 +83,14 @@ public abstract class PhotoFileReader : PhotoFileAdapter {
public virtual Gdk.Pixbuf scaled_read(Dimensions full, Dimensions scaled) throws Error {
return resize_pixbuf(unscaled_read(), scaled, Gdk.InterpType.BILINEAR);
}
+
+ public void set_role (PhotoFileReader.Role role) {
+ this.role = role;
+ }
+
+ public PhotoFileReader.Role get_role () {
+ return this.role;
+ }
}
//