SOURCE=.\src\freeglut_gx.cpp
DEP_CPP_FREEGLUT_GX=\
+ ".\src\freeglut_internal.h"\
{$(INCLUDE)}"gx.h"\
+NODEP_CPP_FREEGLUT_GX=\
+ ".\src\config.h"\
+
+
+!IF "$(CFG)" == "freeglut - Win32 (WCE ARMV4) Release"
+
+!ELSEIF "$(CFG)" == "freeglut - Win32 (WCE ARMV4) Debug"
+
+!ENDIF
+
# End Source File
# Begin Source File
SOURCE=.\src\freeglut_main.c
DEP_CPP_FREEGLUT_M=\
".\src\freeglut_internal.h"\
+ ".\src\my_gx.h"\
{$(INCLUDE)}"GL\freeglut.h"\
{$(INCLUDE)}"GL\freeglut_ext.h"\
{$(INCLUDE)}"GL\freeglut_std.h"\
{ "glutSpecialUpFunc", (void *) glutSpecialUpFunc },
#if !TARGET_HOST_WINCE
{ "glutJoystickFunc", (void *) glutJoystickFunc },
-#endif //TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
{ "glutSetColor", (void *) glutSetColor },
{ "glutGetColor", (void *) glutGetColor },
{ "glutCopyColormap", (void *) glutCopyColormap },
{ "glutEnterGameMode", (void *) glutEnterGameMode },
{ "glutLeaveGameMode", (void *) glutLeaveGameMode },
{ "glutGameModeGet", (void *) glutGameModeGet },
-#endif //TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
/* freeglut extensions */
{ "glutMainLoopEvent", (void *) glutMainLoopEvent },
{ "glutLeaveMainLoop", (void *) glutLeaveMainLoop },
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "freeglut_internal.h"
+
+#if TARGET_HOST_WINCE
+
+
#include <windows.h>
#include <gx.h>
void wince_GetDefaultKeys(void* nData, int iOptions)
{
- *(GXKeyList*)nData = GXGetDefaultKeys(iOptions);
+ *(GXKeyList*)nData = GXGetDefaultKeys(iOptions);
};
void wince_OpenInput()
{
- GXOpenInput();
+ GXOpenInput();
}
}
+
+
+#endif
#if !TARGET_HOST_WINCE
fgJoystickInit( 0 );
fgJoystickInit( 1 );
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
fgState.Initialised = GL_TRUE;
}
#if !TARGET_HOST_WINCE
fgJoystickClose( );
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
fgState.Initialised = GL_FALSE;
}
}
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
/*
* Have the display created now. If there wasn't a "-display"
short vkStart;
POINT ptStart;
};
+/*__declspec(dllimport) struct GXKeyList GXGetDefaultKeys(int iOptions);
+__declspec(dllimport) int GXOpenInput();
+#include "my_gx.h"*/
+
extern void wince_GetDefaultKeys(void* nData, int iOptions);
extern void wince_OpenInput();
+
+/*void wince_GetDefaultKeys(void* nData, int iOptions)
+{
+ *(struct GXKeyList*)nData = GXGetDefaultKeys(iOptions);
+}
+void wince_OpenInput()
+{
+ GXOpenInput();
+}*/
+
#endif
#ifndef MAX
SWP_NOZORDER
);
}
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
/*
* XXX Should update {window->State.OldWidth, window->State.OldHeight}
{
#if !TARGET_HOST_WINCE
fgJoystickPollWindow( window );
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
window->State.JoystickLastPoll = checkTime;
}
#if TARGET_HOST_WINCE
// Take over button handling
wince_OpenInput();
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
break;
case WM_SIZE:
#else
window->State.Width = LOWORD(lParam);
window->State.Height = HIWORD(lParam);
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
}
break;
#else
window->State.MouseX = LOWORD( lParam );
window->State.MouseY = HIWORD( lParam );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
if ( window->ActiveMenu )
{
#else
window->State.MouseX = LOWORD( lParam );
window->State.MouseY = HIWORD( lParam );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
switch( uMsg )
{
if( button == GLUT_RIGHT_BUTTON )
button = GLUT_LEFT_BUTTON;
}
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
if( button == -1 )
return DefWindowProc( hWnd, uMsg, lParam, wParam );
{
#if TARGET_HOST_WINCE
struct GXKeyList gxKeyList;
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
int keypress = -1;
POINT mouse_pos ;
( (char)wParam,
window->State.MouseX, window->State.MouseY )
);
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
}
}
break ;
}
}
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
/* We need to pass the message on to the operating system as well */
lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
freeglut_return_if_fail( fgStructure.Window != NULL );
freeglut_return_if_fail( FETCH_WCB( *( fgStructure.Window ), Joystick ) );
fgJoystickPollWindow( fgStructure.Window );
-#endif //!TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
}
/*
winRect.top += GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION );
winRect.bottom -= GetSystemMetrics( SM_CYSIZEFRAME );
}
-#endif //TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
switch( eWhat )
{
return 0;
#else
return GetSystemMetrics( SM_CXSIZEFRAME );
-#endif //TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
case GLUT_WINDOW_HEADER_HEIGHT :
#if TARGET_HOST_WINCE
return 0;
#else
return GetSystemMetrics( SM_CYCAPTION );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
case GLUT_DISPLAY_MODE_POSSIBLE:
#if TARGET_HOST_WINCE
#else
return fgSetupPixelFormat( fgStructure.Window, GL_TRUE,
PFD_MAIN_PLANE );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
case GLUT_WINDOW_FORMAT_ID:
#if !TARGET_HOST_WINCE
if( fgStructure.Window != NULL )
return GetPixelFormat( fgStructure.Window->Window.Device );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
return 0;
#endif
return 1;
#else
return GetSystemMetrics( SM_CMOUSEBUTTONS );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
#endif
}
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
/*
* TODO BEFORE THE STABLE RELEASE:
if( checkOnly )
return GL_TRUE;
return SetPixelFormat( window->Window.Device, pixelformat, ppfd );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
}
#endif
sizeHints.y = y;
sizeHints.width = w;
sizeHints.height = h;
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
wmHints.flags = StateHint;
wmHints.initial_state = fgState.ForceIconic ? IconicState : NormalState;
h += (GetSystemMetrics( SM_CYSIZEFRAME ) )*2 +
GetSystemMetrics( SM_CYCAPTION );
}
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
if( ! fgState.Position.Use )
{
fgDisplay.Instance,
(LPVOID) window
);
-#endif TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
if( !( window->Window.Handle ) )
fgError( "Failed to create a window (%s)!", title );
#else
ShowWindow( window->Window.Handle,
fgState.ForceIconic ? SW_SHOWMINIMIZED : SW_SHOW );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
UpdateWindow( window->Window.Handle );
ShowCursor( TRUE ); /* XXX Old comments say "hide cusror"! */