replaced all tabs with 4 spaces

replaced all // with /* */ block
fixed freeglut_gx.cpp file with #if TARGET_HOST_WINCE


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@488 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
drgoldie 2004-03-16 08:38:28 +00:00
parent c233e0f5db
commit 041d8017dc
8 changed files with 68 additions and 30 deletions

View File

@ -210,8 +210,19 @@ DEP_CPP_FREEGLUT_GL=\
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
@ -240,6 +251,7 @@ SOURCE=.\src\freeglut_joystick.c
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"\

View File

@ -113,7 +113,7 @@ static struct name_address_pair glut_functions[] =
{ "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 },
@ -160,7 +160,7 @@ static struct name_address_pair glut_functions[] =
{ "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 },

View File

@ -26,6 +26,15 @@
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "freeglut_internal.h"
#if TARGET_HOST_WINCE
#include <windows.h>
#include <gx.h>
@ -40,13 +49,16 @@ extern "C"
void wince_GetDefaultKeys(void* nData, int iOptions)
{
*(GXKeyList*)nData = GXGetDefaultKeys(iOptions);
*(GXKeyList*)nData = GXGetDefaultKeys(iOptions);
};
void wince_OpenInput()
{
GXOpenInput();
GXOpenInput();
}
}
#endif

View File

@ -213,7 +213,7 @@ void fgInitialize( const char* displayName )
#if !TARGET_HOST_WINCE
fgJoystickInit( 0 );
fgJoystickInit( 1 );
#endif //!TARGET_HOST_WINCE
#endif /* !TARGET_HOST_WINCE */
fgState.Initialised = GL_TRUE;
}
@ -259,7 +259,7 @@ void fgDeinitialize( void )
#if !TARGET_HOST_WINCE
fgJoystickClose( );
#endif //!TARGET_HOST_WINCE
#endif /* !TARGET_HOST_WINCE */
fgState.Initialised = GL_FALSE;
@ -623,7 +623,7 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
}
}
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
/*
* Have the display created now. If there wasn't a "-display"

View File

@ -62,8 +62,22 @@ struct GXKeyList {
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
@ -157,7 +171,7 @@ static void fghReshapeWindowByHandle ( SFG_WindowHandleType handle,
SWP_NOZORDER
);
}
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
/*
* XXX Should update {window->State.OldWidth, window->State.OldHeight}
@ -290,7 +304,7 @@ static void fghcbCheckJoystickPolls( SFG_Window *window,
{
#if !TARGET_HOST_WINCE
fgJoystickPollWindow( window );
#endif //!TARGET_HOST_WINCE
#endif /* !TARGET_HOST_WINCE */
window->State.JoystickLastPoll = checkTime;
}
@ -1287,7 +1301,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
#if TARGET_HOST_WINCE
// Take over button handling
wince_OpenInput();
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
break;
case WM_SIZE:
@ -1305,7 +1319,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
#else
window->State.Width = LOWORD(lParam);
window->State.Height = HIWORD(lParam);
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
}
break;
@ -1405,7 +1419,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
#else
window->State.MouseX = LOWORD( lParam );
window->State.MouseY = HIWORD( lParam );
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
if ( window->ActiveMenu )
{
@ -1445,7 +1459,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
#else
window->State.MouseX = LOWORD( lParam );
window->State.MouseY = HIWORD( lParam );
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
switch( uMsg )
{
@ -1488,7 +1502,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
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 );
@ -1650,7 +1664,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
{
#if TARGET_HOST_WINCE
struct GXKeyList gxKeyList;
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
int keypress = -1;
POINT mouse_pos ;
@ -1812,7 +1826,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
( (char)wParam,
window->State.MouseX, window->State.MouseY )
);
#endif //!TARGET_HOST_WINCE
#endif /* !TARGET_HOST_WINCE */
}
}
@ -1952,7 +1966,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
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 );

View File

@ -142,7 +142,7 @@ void FGAPIENTRY glutForceJoystickFunc( void )
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 */
}
/*

View File

@ -386,7 +386,7 @@ int FGAPIENTRY glutGet( GLenum eWhat )
winRect.top += GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION );
winRect.bottom -= GetSystemMetrics( SM_CYSIZEFRAME );
}
#endif //TARGET_HOST_WINCE
#endif /* !TARGET_HOST_WINCE */
switch( eWhat )
{
@ -403,14 +403,14 @@ int FGAPIENTRY glutGet( GLenum 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
@ -418,14 +418,14 @@ int FGAPIENTRY glutGet( GLenum eWhat )
#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
@ -538,7 +538,7 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
return 1;
#else
return GetSystemMetrics( SM_CMOUSEBUTTONS );
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
#endif

View File

@ -47,7 +47,7 @@ wchar_t* wstr_from_str(const char* str)
}
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
/*
* TODO BEFORE THE STABLE RELEASE:
@ -231,7 +231,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly,
if( checkOnly )
return GL_TRUE;
return SetPixelFormat( window->Window.Device, pixelformat, ppfd );
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
}
#endif
@ -456,7 +456,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
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;
@ -521,7 +521,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
h += (GetSystemMetrics( SM_CYSIZEFRAME ) )*2 +
GetSystemMetrics( SM_CYCAPTION );
}
#endif //TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
if( ! fgState.Position.Use )
{
@ -589,7 +589,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
fgDisplay.Instance,
(LPVOID) window
);
#endif TARGET_HOST_WINCE
#endif /* TARGET_HOST_WINCE */
if( !( window->Window.Handle ) )
fgError( "Failed to create a window (%s)!", title );
@ -599,7 +599,7 @@ void fgOpenWindow( SFG_Window* window, const char* 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"! */