aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libgamma/AdjustmentMethod.java10
-rw-r--r--src/libgamma/AdjustmentMethodCapabilities.java10
-rw-r--r--src/libgamma/CRTC.java10
-rw-r--r--src/libgamma/CRTCInformation.java10
-rw-r--r--src/libgamma/ConnectorType.java11
-rw-r--r--src/libgamma/GammaRamps.java10
-rw-r--r--src/libgamma/Libgamma.java45
-rw-r--r--src/libgamma/LibgammaException.java10
-rw-r--r--src/libgamma/Partition.java10
-rw-r--r--src/libgamma/Ramp.java10
-rw-r--r--src/libgamma/Ramp16.java10
-rw-r--r--src/libgamma/Rampd.java10
-rw-r--r--src/libgamma/Site.java10
-rw-r--r--src/libgamma/SubpixelOrder.java11
14 files changed, 177 insertions, 0 deletions
diff --git a/src/libgamma/AdjustmentMethod.java b/src/libgamma/AdjustmentMethod.java
index 7b98377..7805533 100644
--- a/src/libgamma/AdjustmentMethod.java
+++ b/src/libgamma/AdjustmentMethod.java
@@ -80,6 +80,16 @@ public enum AdjustmentMethod
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* The index of the last gamma method, neither it
* nor any index before it may actually be supported
* as it could have been disabled at compile-time
diff --git a/src/libgamma/AdjustmentMethodCapabilities.java b/src/libgamma/AdjustmentMethodCapabilities.java
index 167a081..4d8f353 100644
--- a/src/libgamma/AdjustmentMethodCapabilities.java
+++ b/src/libgamma/AdjustmentMethodCapabilities.java
@@ -24,6 +24,16 @@ package libgamma;
public class AdjustmentMethodCapabilities
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param data Low half: the value of {@link #crtc_information}.
diff --git a/src/libgamma/CRTC.java b/src/libgamma/CRTC.java
index 77d7014..8fc1ec9 100644
--- a/src/libgamma/CRTC.java
+++ b/src/libgamma/CRTC.java
@@ -28,6 +28,16 @@ package libgamma;
public class CRTC
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param partition The partition this CRTC belongs to.
diff --git a/src/libgamma/CRTCInformation.java b/src/libgamma/CRTCInformation.java
index 9da17f7..1093357 100644
--- a/src/libgamma/CRTCInformation.java
+++ b/src/libgamma/CRTCInformation.java
@@ -24,6 +24,16 @@ package libgamma;
public class CRTCInformation
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* For a {@link CRTCInformation} fill in the values for {@link #edid}
* and {@link #edid_length} and report errors to {@link #edid_error}.
*/
diff --git a/src/libgamma/ConnectorType.java b/src/libgamma/ConnectorType.java
index 29e2dc4..cdb737c 100644
--- a/src/libgamma/ConnectorType.java
+++ b/src/libgamma/ConnectorType.java
@@ -127,6 +127,17 @@ public enum ConnectorType
;
+
+ /**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
/**
* Subpixel orders by their numerical values.
*/
diff --git a/src/libgamma/GammaRamps.java b/src/libgamma/GammaRamps.java
index edbd490..895ea2e 100644
--- a/src/libgamma/GammaRamps.java
+++ b/src/libgamma/GammaRamps.java
@@ -35,6 +35,16 @@ package libgamma;
public class GammaRamps<T extends Ramp>
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param red_size The size of the encoding axis of the red gamma ramp.
diff --git a/src/libgamma/Libgamma.java b/src/libgamma/Libgamma.java
new file mode 100644
index 0000000..66e9999
--- /dev/null
+++ b/src/libgamma/Libgamma.java
@@ -0,0 +1,45 @@
+/**
+ * jlibgamma — Display server abstraction layer for gamma ramp and Java
+ * Copyright © 2014 Mattias Andrée (maandree@member.fsf.org)
+ *
+ * This library is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+package libgamma;
+
+
+/**
+ * Library initialisation class.
+ */
+class Libgamma
+{
+ /**
+ * Initialise the library.
+ */
+ static void initialise()
+ {
+ if (Libgamma.initialised)
+ return;
+ Libgamma.initialised = true;
+
+ /* TODO load the library */
+ }
+
+
+ /**
+ * Whether {@link #initialise} has been invoked.
+ */
+ private static boolean initialised = false;
+
+}
+
diff --git a/src/libgamma/LibgammaException.java b/src/libgamma/LibgammaException.java
index 8e623f2..79c41e8 100644
--- a/src/libgamma/LibgammaException.java
+++ b/src/libgamma/LibgammaException.java
@@ -32,6 +32,16 @@ package libgamma;
public class LibgammaException extends Exception
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* This error code is never used. It is only provided
* so you know its error code if you plan to iterate
* over all <tt>libgamma</tt> error codes.
diff --git a/src/libgamma/Partition.java b/src/libgamma/Partition.java
index 407c2d6..e5022a8 100644
--- a/src/libgamma/Partition.java
+++ b/src/libgamma/Partition.java
@@ -33,6 +33,16 @@ package libgamma;
public class Partition
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param site The site this partition belongs to.
diff --git a/src/libgamma/Ramp.java b/src/libgamma/Ramp.java
index a916e67..e3e7ec3 100644
--- a/src/libgamma/Ramp.java
+++ b/src/libgamma/Ramp.java
@@ -24,6 +24,16 @@ package libgamma;
public abstract class Ramp
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param address The address of the native object.
diff --git a/src/libgamma/Ramp16.java b/src/libgamma/Ramp16.java
index 9582286..cbf7ff0 100644
--- a/src/libgamma/Ramp16.java
+++ b/src/libgamma/Ramp16.java
@@ -24,6 +24,16 @@ package libgamma;
public class Ramp16 extends Ramp
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param address The address of the native object.
diff --git a/src/libgamma/Rampd.java b/src/libgamma/Rampd.java
index 9a7cf14..7f34eb4 100644
--- a/src/libgamma/Rampd.java
+++ b/src/libgamma/Rampd.java
@@ -24,6 +24,16 @@ package libgamma;
public class Rampd extends Ramp
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param address The address of the native object.
diff --git a/src/libgamma/Site.java b/src/libgamma/Site.java
index 9555656..7f52fa5 100644
--- a/src/libgamma/Site.java
+++ b/src/libgamma/Site.java
@@ -30,6 +30,16 @@ package libgamma;
public class Site
{
/**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
+ /**
* Constructor.
*
* @param method The adjustmet method.
diff --git a/src/libgamma/SubpixelOrder.java b/src/libgamma/SubpixelOrder.java
index 1a74db7..9cc9efd 100644
--- a/src/libgamma/SubpixelOrder.java
+++ b/src/libgamma/SubpixelOrder.java
@@ -57,6 +57,17 @@ public enum SubpixelOrder
;
+
+ /**
+ * Type initialiser.
+ */
+ static
+ {
+ Libgamma.initialise();
+ }
+
+
+
/**
* Subpixel orders by their numerical values.
*/