Skip to content

Commit

Permalink
Move GLFW to the top level package
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Dec 3, 2014
1 parent 3da42a9 commit e942a77
Show file tree
Hide file tree
Showing 24 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion config/Templates.ktm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fun project() {
//for ( source in listFiles("src/templates/org/lwjgl/opencl", FILTER_RECURSIVE) ) sources += source
for ( source in listFiles("src/templates/org/lwjgl/opengl", FILTER_FILES_ONLY) ) sources += source
//for ( source in listFiles("src/templates/org/lwjgl/opengl", FILTER_RECURSIVE) ) sources += source
for ( source in listFiles("src/templates/org/lwjgl/system/glfw", FILTER_RECURSIVE) ) sources += source
for ( source in listFiles("src/templates/org/lwjgl/glfw", FILTER_RECURSIVE) ) sources += source
//for ( source in listFiles("src/templates/org/lwjgl/system/windows", FILTER_RECURSIVE) ) sources += source
for ( source in listFiles("src/templates/org/lwjgl/system/linux", FILTER_RECURSIVE) ) sources += source
*/
Expand Down
6 changes: 3 additions & 3 deletions config/linux/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<arg value="-I${src.native.abs}/system"/>
<arg value="-I${src.native.abs}/system/linux"/>
<arg value="-I${src.native.abs}/system/libffi"/>
<arg value="-I${src.native.abs}/system/glfw"/>
<arg value="-I${src.native.abs}/glfw"/>
<arg value="-I${src.native.abs}/openal"/>
<arg value="-I${src.native.abs}/opencl"/>
<arg value="-I${src.native.abs}/opengl"/>
Expand All @@ -45,13 +45,13 @@
<fileset dir="${src.native}/system" includes="*.c"/>
<fileset dir="${src.native}/system/linux" includes="*.c"/>
<fileset dir="${src.native}/system/libffi" includes="*.c"/>
<fileset dir="${src.native}/system/glfw" includes="*.c"/>
<fileset dir="${src.native}/glfw" includes="*.c"/>
<fileset dir="${src.native}/opencl" includes="*.c"/>
<fileset dir="${src.native}/opengl" includes="*.c"/>
<fileset dir="${generated.native}/system" includes="*.c"/>
<fileset dir="${generated.native}/system/linux" includes="*.c"/>
<fileset dir="${generated.native}/system/libffi" includes="*.c"/>
<fileset dir="${generated.native}/system/glfw" includes="*.c"/>
<fileset dir="${generated.native}/glfw" includes="*.c"/>
<fileset dir="${generated.native}/openal" includes="*.c"/>
<fileset dir="${generated.native}/opencl" includes="*.c"/>
<fileset dir="${generated.native}/opengl" includes="*.c"/>
Expand Down
6 changes: 3 additions & 3 deletions config/macosx/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<arg value="-I${src.native.abs}/system"/>
<arg value="-I${src.native.abs}/system/macosx"/>
<arg value="-I${src.native.abs}/system/libffi"/>
<arg value="-I${src.native.abs}/system/glfw"/>
<arg value="-I${src.native.abs}/glfw"/>
<arg value="-I${src.native.abs}/openal"/>
<arg value="-I${src.native.abs}/opencl"/>
<arg value="-I${src.native.abs}/opengl"/>
Expand All @@ -64,14 +64,14 @@
<fileset dir="${src.native}/system/macosx" includes="*.c"/>
<fileset dir="${src.native}/system/macosx" includes="*.m"/>
<fileset dir="${src.native}/system/libffi" includes="*.c"/>
<fileset dir="${src.native}/system/glfw" includes="*.c"/>
<fileset dir="${src.native}/glfw" includes="*.c"/>
<fileset dir="${src.native}/opencl" includes="*.c"/>
<fileset dir="${src.native}/opengl" includes="*.c"/>
<fileset dir="${generated.native}/system" includes="*.c"/>
<fileset dir="${generated.native}/system/macosx" includes="*.c"/>
<fileset dir="${generated.native}/system/macosx" includes="*.m"/>
<fileset dir="${generated.native}/system/libffi" includes="*.c"/>
<fileset dir="${generated.native}/system/glfw" includes="*.c"/>
<fileset dir="${generated.native}/glfw" includes="*.c"/>
<fileset dir="${generated.native}/openal" includes="*.c"/>
<fileset dir="${generated.native}/opencl" includes="*.c" excludes="*CL20.c"/>
<fileset dir="${generated.native}/opengl" includes="*.c"/>
Expand Down
6 changes: 3 additions & 3 deletions config/windows/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<arg value="/I${src.native.abs}\system"/>
<arg value="/I${src.native.abs}\system\windows"/>
<arg value="/I${src.native.abs}\system\libffi"/>
<arg value="/I${src.native.abs}\system\glfw"/>
<arg value="/I${src.native.abs}\glfw"/>
<arg value="/I${src.native.abs}\openal"/>
<arg value="/I${src.native.abs}\opencl"/>
<arg value="/I${src.native.abs}\opengl"/>
Expand All @@ -30,13 +30,13 @@
<fileset dir="${src.native}/system" includes="*.c"/>
<fileset dir="${src.native}/system/windows" includes="*.c"/>
<fileset dir="${src.native}/system/libffi" includes="*.c"/>
<fileset dir="${src.native}/system/glfw" includes="*.c"/>
<fileset dir="${src.native}/glfw" includes="*.c"/>
<fileset dir="${src.native}/opencl" includes="*.c"/>
<fileset dir="${src.native}/opengl" includes="*.c"/>
<fileset dir="${generated.native}/system" includes="*.c"/>
<fileset dir="${generated.native}/system/windows" includes="*.c"/>
<fileset dir="${generated.native}/system/libffi" includes="*.c"/>
<fileset dir="${generated.native}/system/glfw" includes="*.c"/>
<fileset dir="${generated.native}/glfw" includes="*.c"/>
<fileset dir="${generated.native}/openal" includes="*.c"/>
<fileset dir="${generated.native}/opencl" includes="*.c"/>
<fileset dir="${generated.native}/opengl" includes="*.c"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright LWJGL. All rights reserved.
* License terms: http://lwjgl.org/license.php
*/
package org.lwjgl.system.glfw;
package org.lwjgl.glfw;

import org.lwjgl.LWJGLUtil;
import org.lwjgl.LWJGLUtil.TokenFilter;
Expand All @@ -15,7 +15,7 @@

import static org.lwjgl.Pointer.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.GLFW.*;
import static org.lwjgl.glfw.GLFW.*;

/**
* Utility class for GLFW callbacks.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/templates/org/lwjgl/generator/Generator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ fun main(args: Array<String>) {
// org.lwjgl.opengl -> org.lwjgl.opengl.OpenglPackage (the first letter is capitalized)

// TODO: Move these to args[2] or a file in /config to enable build customization
generate("org.lwjgl.glfw")
generate("org.lwjgl.openal")
generate("org.lwjgl.opencl")
generate("org.lwjgl.opengl")
generate("org.lwjgl.system.libffi")
generate("org.lwjgl.system.linux")
generate("org.lwjgl.system.macosx")
generate("org.lwjgl.system.windows")
generate("org.lwjgl.system.glfw")

// Generate utility classes. These are auto-registered during the process above.
generate("struct", Generator.structs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright LWJGL. All rights reserved.
* License terms: http://lwjgl.org/license.php
*/
package org.lwjgl.system.glfw
package org.lwjgl.glfw

import org.lwjgl.generator.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Copyright LWJGL. All rights reserved.
* License terms: http://lwjgl.org/license.php
*/
package org.lwjgl.system.glfw.templates
package org.lwjgl.glfw.templates

import org.lwjgl.generator.*
import org.lwjgl.system.glfw.*
import org.lwjgl.glfw.*
import org.lwjgl.opengl.*

val GLFW = "GLFW".nativeClass(packageName = GLFW_PACKAGE, prefix = "GLFW") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package org.lwjgl.system.linux.templates

import org.lwjgl.generator.*
import org.lwjgl.opengl.*
import org.lwjgl.system.glfw.*
import org.lwjgl.glfw.*
import org.lwjgl.system.linux.*
import org.lwjgl.system.windows.WCHAR_p

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package org.lwjgl.system.macosx.templates

import org.lwjgl.generator.*
import org.lwjgl.system.glfw.*
import org.lwjgl.glfw.*
import org.lwjgl.system.macosx.*

val GLFWMacOSX = "GLFWMacOSX".nativeClass(packageName = MACOSX_PACKAGE, prefix = "GLFW") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package org.lwjgl.system.windows.templates

import org.lwjgl.generator.*
import org.lwjgl.system.glfw.*
import org.lwjgl.glfw.*
import org.lwjgl.system.windows.*

val GLFWWin32 = "GLFWWin32".nativeClass(packageName = WINDOWS_PACKAGE, prefix = "GLFW") {
Expand Down
6 changes: 3 additions & 3 deletions src/tests/org/lwjgl/demo/glfw/Events.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
import org.lwjgl.LWJGLUtil.Platform;
import org.lwjgl.LWJGLUtil.TokenFilter;
import org.lwjgl.demo.util.ClosureGC;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.*;

import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.util.Map;

import static org.lwjgl.demo.util.IOUtil.*;
import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.Callbacks.*;
import static org.lwjgl.system.glfw.GLFW.*;

/** GLFW events demo. */
public final class Events {
Expand Down
10 changes: 5 additions & 5 deletions src/tests/org/lwjgl/demo/glfw/Gears.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
package org.lwjgl.demo.glfw;

import org.lwjgl.demo.opengl.AbstractGears;
import org.lwjgl.glfw.GLFWerrorfun;
import org.lwjgl.glfw.GLFWkeyfun;
import org.lwjgl.glfw.GLFWvidmode;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.GLFWerrorfun;
import org.lwjgl.system.glfw.GLFWkeyfun;
import org.lwjgl.system.glfw.GLFWvidmode;
import org.lwjgl.system.libffi.Closure;

import java.nio.ByteBuffer;

import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.Callbacks.*;
import static org.lwjgl.system.glfw.GLFW.*;

/** The Gears demo implemented using GLFW. */
public class Gears extends AbstractGears {
Expand Down
10 changes: 5 additions & 5 deletions src/tests/org/lwjgl/demo/glfw/MultipleWindows.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
*/
package org.lwjgl.demo.glfw;

import org.lwjgl.glfw.GLFWcursorenterfun;
import org.lwjgl.glfw.GLFWerrorfun;
import org.lwjgl.glfw.GLFWkeyfun;
import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.GLFWcursorenterfun;
import org.lwjgl.system.glfw.GLFWerrorfun;
import org.lwjgl.system.glfw.GLFWkeyfun;

import java.util.concurrent.atomic.AtomicInteger;

import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.Callbacks.*;
import static org.lwjgl.system.glfw.GLFW.*;

/** GLFW demo that showcases rendering to multiple windows from a single thread. */
public final class MultipleWindows {
Expand Down
8 changes: 4 additions & 4 deletions src/tests/org/lwjgl/demo/glfw/Threads.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
*/
package org.lwjgl.demo.glfw;

import org.lwjgl.glfw.GLFWerrorfun;
import org.lwjgl.glfw.GLFWkeyfun;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.GLFWerrorfun;
import org.lwjgl.system.glfw.GLFWkeyfun;

import java.util.concurrent.CountDownLatch;

import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.Callbacks.*;
import static org.lwjgl.system.glfw.GLFW.*;

/**
* GLFW demo that showcases rendering to multiple windows from multiple threads. Ported from the GLFW
Expand Down
10 changes: 5 additions & 5 deletions src/tests/org/lwjgl/demo/glfw/WGLInterop.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
package org.lwjgl.demo.glfw;

import org.lwjgl.BufferUtils;
import org.lwjgl.glfw.GLFWerrorfun;
import org.lwjgl.glfw.GLFWkeyfun;
import org.lwjgl.glfw.GLFWwindowsizefun;
import org.lwjgl.opengl.ContextCapabilities;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.GLFWerrorfun;
import org.lwjgl.system.glfw.GLFWkeyfun;
import org.lwjgl.system.glfw.GLFWwindowsizefun;
import org.lwjgl.system.libffi.Closure;

import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.concurrent.atomic.AtomicInteger;

import static java.lang.Math.*;
import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.WGLAMDGPUAssociation.*;
import static org.lwjgl.opengl.WGLARBBufferRegion.*;
import static org.lwjgl.opengl.WGLEXTSwapControl.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.Callbacks.*;
import static org.lwjgl.system.glfw.GLFW.*;
import static org.lwjgl.system.windows.GLFWWin32.*;
import static org.lwjgl.system.windows.WGL.*;
import static org.lwjgl.system.windows.WinGDI.*;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/org/lwjgl/demo/openal/ALCDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.openal.ALC;
import org.lwjgl.openal.ALCCapabilities;
import org.lwjgl.openal.ALDevice;
import org.lwjgl.openal.ALContext;
import org.lwjgl.openal.ALDevice;

import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
Expand Down
1 change: 1 addition & 0 deletions src/tests/org/lwjgl/demo/openal/EFXTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.sun.media.sound.WaveFileReader;

import static org.lwjgl.openal.AL10.*;
import static org.lwjgl.openal.AL10.alSourcei;
import static org.lwjgl.openal.AL11.*;
import static org.lwjgl.openal.ALC10.*;
import static org.lwjgl.openal.EXTEfx.*;
Expand Down
6 changes: 3 additions & 3 deletions src/tests/org/lwjgl/demo/opencl/CLGLInteropDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@

import org.lwjgl.LWJGLUtil;
import org.lwjgl.LWJGLUtil.Platform;
import org.lwjgl.glfw.*;
import org.lwjgl.opencl.CL;
import org.lwjgl.opencl.CLCapabilities;
import org.lwjgl.opencl.CLDevice;
import org.lwjgl.opencl.CLPlatform;
import org.lwjgl.opencl.CLPlatform.Filter;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.*;

import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;

import static org.lwjgl.glfw.Callbacks.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opencl.CL10.*;
import static org.lwjgl.opencl.Info.*;
import static org.lwjgl.opencl.KHRICD.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.Callbacks.*;
import static org.lwjgl.system.glfw.GLFW.*;

/*
THIS DEMO USES CODE PORTED FROM JogAmp.org
Expand Down
4 changes: 2 additions & 2 deletions src/tests/org/lwjgl/demo/opencl/Mandelbrot.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLUtil;
import org.lwjgl.PointerBuffer;
import org.lwjgl.glfw.*;
import org.lwjgl.opencl.*;
import org.lwjgl.opencl.CLPlatform.Filter;
import org.lwjgl.opengl.ContextCapabilities;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.system.glfw.*;
import org.lwjgl.system.libffi.Closure;

import java.io.IOException;
Expand All @@ -25,6 +25,7 @@

import static org.lwjgl.demo.opencl.CLGLInteropDemo.*;
import static org.lwjgl.demo.util.IOUtil.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opencl.CL10.*;
import static org.lwjgl.opencl.CL10GL.*;
import static org.lwjgl.opencl.CLUtil.*;
Expand All @@ -37,7 +38,6 @@
import static org.lwjgl.opengl.GL30.*;
import static org.lwjgl.opengl.GL32.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.GLFW.*;
import static org.lwjgl.system.linux.GLFWLinux.*;
import static org.lwjgl.system.macosx.CGL.*;
import static org.lwjgl.system.windows.WGL.*;
Expand Down
6 changes: 3 additions & 3 deletions src/tests/org/lwjgl/system/libffi/LibFFITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import java.nio.ByteBuffer;

import static org.lwjgl.Pointer.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.glfw.GLFW.*;
import static org.lwjgl.system.libffi.LibFFI.*;
import static org.testng.Assert.*;

Expand Down Expand Up @@ -123,9 +123,9 @@ private static long createGLFWWindow(int width, int height) {
private static long glfwGetWindowSizeAddress() {
DynamicLinkLibrary lib = LWJGLUtil.loadLibraryNative("lwjgl");

long glfwGetWindowSize = lib.getFunctionAddress("Java_org_lwjgl_system_glfw_GLFW_nglfwGetWindowSize");
long glfwGetWindowSize = lib.getFunctionAddress("Java_org_lwjgl_glfw_GLFW_nglfwGetWindowSize");
if ( glfwGetWindowSize == NULL )
glfwGetWindowSize = lib.getFunctionAddress("_Java_org_lwjgl_system_glfw_GLFW_nglfwGetWindowSize@32"); // __stdcall (Win32)
glfwGetWindowSize = lib.getFunctionAddress("_Java_org_lwjgl_glfw_GLFW_nglfwGetWindowSize@32"); // __stdcall (Win32)

assertTrue(glfwGetWindowSize != NULL);

Expand Down
Loading

0 comments on commit e942a77

Please sign in to comment.