X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fblackberry%2Ffg_internal_blackberry.h;h=eae1bd9d68f33fc69e02ba2b02847a88fbbb05db;hb=af47c3f93c7834b4006c49ec9df6a6ffdd3025de;hp=d6b0e3c9e7a4a73cd247cc836ebe844d9681b026;hpb=68555565c99ea2c38d1741ce071e43ee56972e04;p=freeglut diff --git a/src/blackberry/fg_internal_blackberry.h b/src/blackberry/fg_internal_blackberry.h index d6b0e3c..eae1bd9 100644 --- a/src/blackberry/fg_internal_blackberry.h +++ b/src/blackberry/fg_internal_blackberry.h @@ -34,23 +34,24 @@ #include "egl/fg_internal_egl.h" #include #include +#include /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */ -/* The structure used by display initialization in freeglut_init.c */ +/* The structure used by display initialization in fg_init.c */ typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; struct tagSFG_PlatformDisplay { - struct tagSFG_PlatformDisplayEGL egl; - EGLNativeWindowType single_native_window; + struct tagSFG_PlatformDisplayEGL egl; + screen_context_t screenContext; + bps_event_t* event; + EGLNativeWindowType single_native_window; }; typedef struct tagSFG_PlatformContext SFG_PlatformContext; /* SFG_PlatformContext is used for SFG_Window.Window */ struct tagSFG_PlatformContext { - struct tagSFG_PlatformContextEGL egl; - screen_context_t screenContext; - bps_event_t* event; + struct tagSFG_PlatformContextEGL egl; }; @@ -69,48 +70,57 @@ struct touchscreen { bool in_mmotion; }; +/* -- INPUT DEFINITIONS ---------------------------------------------------- */ +#define WHEEL_DELTA 120 //This is taken from http://msdn.microsoft.com/en-us/library/windows/desktop/ms646254(v=vs.85).aspx + /* -- JOYSTICK-SPECIFIC STRUCTURES AND TYPES ------------------------------- */ /* - * Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c" + * Initial defines from "js.h" starting around line 33 with the existing "fg_joystick.c" * interspersed */ - /* - * We'll put these values in and that should - * allow the code to at least compile when there is - * no support. The JS open routine should error out - * and shut off all the code downstream anyway and if - * the application doesn't use a joystick we'll be fine. - */ +/* + * We'll put these values in and that should + * allow the code to at least compile when there is + * no support. The JS open routine should error out + * and shut off all the code downstream anyway and if + * the application doesn't use a joystick we'll be fine. + */ - struct JS_DATA_TYPE - { +struct JS_DATA_TYPE +{ int buttons; int x; int y; - }; +}; -# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) +#define JS_RETURN (sizeof(struct JS_DATA_TYPE)) /* XXX It might be better to poll the operating system for the numbers of buttons and * XXX axes and then dynamically allocate the arrays. */ -# define _JS_MAX_AXES 16 +#define _JS_MAX_AXES 16 typedef struct tagSFG_PlatformJoystick SFG_PlatformJoystick; struct tagSFG_PlatformJoystick { - struct JS_DATA_TYPE js; + struct JS_DATA_TYPE js; - char fname [ 128 ]; - int fd; + char fname [ 128 ]; + int fd; }; /* Window's state description. This structure should be kept portable. */ typedef struct tagSFG_PlatformWindowState SFG_PlatformWindowState; struct tagSFG_PlatformWindowState { - char unused; + int newWidth; + int newHeight; + int originalRotation; + navigator_window_state_t windowState; + GLboolean windowCovered; + int keyboardHeight; + GLboolean keyboardOpen; }; /* Menu font and color definitions */