diff options
author | Mattias Andrée <maandree@kth.se> | 2024-07-17 23:35:32 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-07-17 23:35:32 +0200 |
commit | 11d850fb5faa6fd130912dfea9eef4336acc7649 (patch) | |
tree | e0e9adfbbaefbbca7ad4cf3dfa6e49fab2e1e5c0 /libgamma/AdjustmentMethod.java | |
parent | Empty signed commit (diff) | |
download | jlibgamma-11d850fb5faa6fd130912dfea9eef4336acc7649.tar.gz jlibgamma-11d850fb5faa6fd130912dfea9eef4336acc7649.tar.bz2 jlibgamma-11d850fb5faa6fd130912dfea9eef4336acc7649.tar.xz |
Update for libgamma 0.7.4 and fix bugs
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libgamma/AdjustmentMethod.java')
-rw-r--r-- | libgamma/AdjustmentMethod.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libgamma/AdjustmentMethod.java b/libgamma/AdjustmentMethod.java index 7d53090..4c87658 100644 --- a/libgamma/AdjustmentMethod.java +++ b/libgamma/AdjustmentMethod.java @@ -147,9 +147,12 @@ public enum AdjustmentMethod * * @return The capabilities of the adjustment method */ - public AdjustmentMethodCapabilities get_capabilities() + public AdjustmentMethodCapabilities get_capabilities() throws LibgammaException { - return new AdjustmentMethodCapabilities(libgamma_method_capabilities(this.value)); + long[] r = libgamma_method_capabilities(this.value); + if (r[1] != 0) + throw new LibgammaException((int)(r[1])); + return new AdjustmentMethodCapabilities(r[0]); } @@ -202,9 +205,10 @@ public enum AdjustmentMethod * Return the capabilities of an adjustment method * * @param method The adjustment method (display server and protocol) - * @return Input parameter to the constructor of {@link AdjustmentMethodCapabilities} + * @return Element 0: Input parameter to the constructor of {@link AdjustmentMethodCapabilities} + * Eleemnt 1: Error code, zero on success */ - private static native long libgamma_method_capabilities(int method); + private static native long[] libgamma_method_capabilities(int method); /** * Return the default site for an adjustment method |