diff options
-rw-r--r-- | pugl/pugl.h | 7 | ||||
-rw-r--r-- | pugl/pugl_internal.h | 6 | ||||
-rw-r--r-- | pugl/pugl_internal_types.h | 6 | ||||
-rw-r--r-- | pugl/pugl_osx.m | 8 | ||||
-rw-r--r-- | pugl/pugl_win.cpp | 4 | ||||
-rw-r--r-- | pugl/pugl_x11.c | 19 | ||||
-rw-r--r-- | pugl/pugl_x11.h | 5 | ||||
-rw-r--r-- | pugl/pugl_x11_cairo.c | 13 | ||||
-rw-r--r-- | pugl/pugl_x11_gl.c | 8 | ||||
-rw-r--r-- | pugl_cairo_test.c | 8 | ||||
-rw-r--r-- | pugl_test.c | 6 |
11 files changed, 44 insertions, 46 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h index 1cfe3c9..05366be 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -21,6 +21,7 @@ #ifndef PUGL_H_INCLUDED #define PUGL_H_INCLUDED +#include <stdbool.h> #include <stdint.h> #ifdef PUGL_SHARED @@ -42,8 +43,6 @@ #ifdef __cplusplus extern "C" { -#else -# include <stdbool.h> #endif /** @@ -82,8 +81,8 @@ typedef enum { Drawing context type. */ typedef enum { - PUGL_GL = 0x1, /**< OpenGL (3D) */ - PUGL_CAIRO = 0x2 /**< Cairo (2D) */ + PUGL_GL = 1 << 0, /**< OpenGL (3D) */ + PUGL_CAIRO = 1 << 1 /**< Cairo (2D) */ } PuglContextType; /** diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h index c3a342c..ce79d2a 100644 --- a/pugl/pugl_internal.h +++ b/pugl/pugl_internal.h @@ -28,12 +28,12 @@ PUGL_HAVE_GL: Include OpenGL support code. */ +#include "pugl/pugl.h" +#include "pugl/pugl_internal_types.h" + #include <stdlib.h> #include <string.h> -#include "pugl/pugl_internal_types.h" -#include "pugl/pugl.h" - PuglInternals* puglInitInternals(void); PuglView* diff --git a/pugl/pugl_internal_types.h b/pugl/pugl_internal_types.h index dce5429..63b81cd 100644 --- a/pugl/pugl_internal_types.h +++ b/pugl/pugl_internal_types.h @@ -21,10 +21,10 @@ #ifndef PUGL_INTERNAL_TYPES_H #define PUGL_INTERNAL_TYPES_H -#include "pugl/pugl.h" - -#include <stdint.h> #include <stdbool.h> +#include <stdint.h> + +#include "pugl/pugl.h" /** Platform-specific internals. */ typedef struct PuglInternalsImpl PuglInternals; diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index 71d98a1..712f5fc 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -19,14 +19,14 @@ @file pugl_osx.m OSX/Cocoa Pugl Implementation. */ -#include <stdlib.h> - -#import <Cocoa/Cocoa.h> - #include "pugl/cairo_gl.h" #include "pugl/gl.h" #include "pugl/pugl_internal.h" +#import <Cocoa/Cocoa.h> + +#include <stdlib.h> + @class PuglOpenGLView; struct PuglInternalsImpl { diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index 83d4474..fd14593 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -18,6 +18,8 @@ @file pugl_win.cpp Windows/WGL Pugl Implementation. */ +#include "pugl/pugl_internal.h" + #include <windows.h> #include <windowsx.h> #include <GL/gl.h> @@ -27,8 +29,6 @@ #include <string.h> #include <wctype.h> -#include "pugl/pugl_internal.h" - #ifndef WM_MOUSEWHEEL # define WM_MOUSEWHEEL 0x020A #endif diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c index 7a334e3..3a8cead 100644 --- a/pugl/pugl_x11.c +++ b/pugl/pugl_x11.c @@ -20,26 +20,25 @@ @file pugl_x11.c X11 Pugl Implementation. */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <X11/Xatom.h> -#include <X11/Xlib.h> -#include <X11/Xutil.h> -#include <X11/keysym.h> #include "pugl/pugl_internal.h" #include "pugl/pugl_x11.h" - #ifdef PUGL_HAVE_GL #include "pugl/pugl_x11_gl.h" #endif - #ifdef PUGL_HAVE_CAIRO #include "pugl/pugl_x11_cairo.h" #endif +#include <X11/Xatom.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/keysym.h> + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #ifndef MIN # define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif diff --git a/pugl/pugl_x11.h b/pugl/pugl_x11.h index a8c8c02..9c53c49 100644 --- a/pugl/pugl_x11.h +++ b/pugl/pugl_x11.h @@ -14,11 +14,12 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <X11/Xlib.h> - #include "pugl/pugl.h" #include "pugl/pugl_internal_types.h" +#include <X11/Xlib.h> +#include <X11/Xutil.h> + struct PuglInternalsImpl { Display* display; int screen; diff --git a/pugl/pugl_x11_cairo.c b/pugl/pugl_x11_cairo.c index 3614c4b..db2e262 100644 --- a/pugl/pugl_x11_cairo.c +++ b/pugl/pugl_x11_cairo.c @@ -14,17 +14,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <stdio.h> -#include <stdlib.h> +#include "pugl/pugl_internal_types.h" +#include "pugl/pugl_x11.h" +#include "pugl/pugl_x11_cairo.h" +#include <X11/Xutil.h> #include <cairo/cairo-xlib.h> #include <cairo/cairo.h> -#include <X11/Xutil.h> - -#include "pugl/pugl_internal_types.h" -#include "pugl/pugl_x11.h" -#include "pugl/pugl_x11_cairo.h" +#include <stdio.h> +#include <stdlib.h> typedef struct { cairo_surface_t* surface; diff --git a/pugl/pugl_x11_gl.c b/pugl/pugl_x11_gl.c index 809f4a3..d6242f2 100644 --- a/pugl/pugl_x11_gl.c +++ b/pugl/pugl_x11_gl.c @@ -14,14 +14,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <stdlib.h> +#include "pugl/pugl_internal_types.h" +#include "pugl/pugl_x11.h" +#include "pugl/pugl_x11_gl.h" #include <GL/gl.h> #include <GL/glx.h> -#include "pugl/pugl_x11.h" -#include "pugl/pugl_x11_gl.h" -#include "pugl/pugl_internal_types.h" +#include <stdlib.h> typedef struct { GLXContext ctx; diff --git a/pugl_cairo_test.c b/pugl_cairo_test.c index 78abcfa..9480560 100644 --- a/pugl_cairo_test.c +++ b/pugl_cairo_test.c @@ -18,13 +18,13 @@ @file pugl_cairo_test.c A simple Pugl test that creates a top-level window. */ -#include <stdint.h> -#include <stdio.h> -#include <string.h> +#include "pugl/pugl.h" #include <cairo/cairo.h> -#include "pugl/pugl.h" +#include <stdint.h> +#include <stdio.h> +#include <string.h> static int quit = 0; static bool entered = false; diff --git a/pugl_test.c b/pugl_test.c index fc3d921..0b5c916 100644 --- a/pugl_test.c +++ b/pugl_test.c @@ -18,14 +18,14 @@ @file pugl_test.c A simple Pugl test that creates a top-level window. */ +#include "pugl/gl.h" +#include "pugl/pugl.h" + #include <locale.h> #include <math.h> #include <stdio.h> #include <string.h> -#include "pugl/gl.h" -#include "pugl/pugl.h" - static int quit = 0; static float xAngle = 0.0f; static float yAngle = 0.0f; |