FreeType 1.31.1
This commit is contained in:
106
contrib/win32/driver32.c
Normal file
106
contrib/win32/driver32.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "freetype.h"
|
||||
#include "gdriver.h"
|
||||
|
||||
HANDLE evgetevent,evdriverdisplaybitmap,this_wnd,main_thread,listbox,bitmap;
|
||||
TEvent evevent;
|
||||
char message_32[256];
|
||||
char *ev_buffer;
|
||||
jmp_buf Env;
|
||||
long TTMemory_Allocated = 0; // just to have a clean link with ftdump
|
||||
// save last rendered image Data
|
||||
int save_lines,save_cols,exit_code;
|
||||
char *save_buffer;
|
||||
extern int vio_Width,vio_Height,vio_ScanLineWidth;
|
||||
extern TT_Raster_Map Bit;
|
||||
HDC hdc,memdc;
|
||||
HBITMAP hbm,hbm1;
|
||||
|
||||
//________________________________________________________________________________
|
||||
void Get_Event(TEvent *event)
|
||||
{
|
||||
WaitForSingleObject(evgetevent,INFINITE); // wait for completion
|
||||
*event=evevent; //set by message handler before posting waited upon event
|
||||
return;
|
||||
}
|
||||
|
||||
int Driver_Set_Graphics( int mode )
|
||||
{ RECT rect;
|
||||
GetClientRect(bitmap,&rect);
|
||||
vio_Width=rect.right-rect.left;
|
||||
vio_Height = rect.bottom-rect.top;
|
||||
vio_ScanLineWidth=vio_Width;
|
||||
return 1;
|
||||
|
||||
}
|
||||
int Driver_Restore_Mode()
|
||||
{return 1;}
|
||||
|
||||
int Driver_Display_Bitmap( char* buffer, int lines, int cols )
|
||||
{
|
||||
long rc;
|
||||
int i;
|
||||
char *top,*bottom;
|
||||
HANDLE rgdi;
|
||||
RECT rect;
|
||||
char *w_buffer;
|
||||
// bitmap=listbox;
|
||||
hdc=GetDC(bitmap);
|
||||
memdc=CreateCompatibleDC(hdc);
|
||||
GetClientRect(bitmap,&rect);
|
||||
//hbm=CreateCompatibleBitmap(hdc,lines,cols);
|
||||
// need to set upside down bitmap .
|
||||
if (buffer != save_buffer) //new buffer
|
||||
{
|
||||
if (save_buffer!=NULL)
|
||||
free(save_buffer);
|
||||
save_buffer=(char *)malloc(Bit.size);
|
||||
memcpy(save_buffer,buffer,Bit.size);
|
||||
}
|
||||
w_buffer=malloc(Bit.size); // hope it succeeds
|
||||
top=buffer;
|
||||
bottom=w_buffer+Bit.size-cols;
|
||||
for(i=0;i<Bit.size;i+=cols)
|
||||
{
|
||||
memcpy(bottom,top,cols);
|
||||
top+=cols;
|
||||
bottom-=cols;
|
||||
};
|
||||
save_lines=lines;
|
||||
save_cols=cols;
|
||||
hbm=CreateBitmap(vio_Width,vio_Height,1,1,w_buffer);
|
||||
rgdi=SelectObject(memdc,hbm);
|
||||
// rc=SetBitmapBits(hbm,Bit.size,buffer); //redundant
|
||||
rc=StretchBlt(hdc,0,0,rect.right,rect.bottom,memdc,0,0,rect.right,rect.bottom,MERGECOPY);
|
||||
ReleaseDC(bitmap,hdc);
|
||||
DeleteObject(memdc);
|
||||
rc=UpdateWindow(bitmap);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int call_test_program(int (*program)(int,char**),int argc,char **argv)
|
||||
{int rc;
|
||||
// prepare return address ( for exit)
|
||||
if(0==setjmp(Env)) //env set : call prog
|
||||
rc=program(argc,argv);
|
||||
return rc;
|
||||
}
|
||||
|
||||
void force_exit(int code)
|
||||
{ char *p=NULL;
|
||||
longjmp(Env,code);
|
||||
//disable piping
|
||||
}
|
||||
8
contrib/win32/hack_common.c
Normal file
8
contrib/win32/hack_common.c
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
#define exit(code) force_exit(code)
|
||||
#include <common.c>
|
||||
9
contrib/win32/hack_ftdump.c
Normal file
9
contrib/win32/hack_ftdump.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
#define exit(code) force_exit(code)
|
||||
#define main(A,B) ftdump(A,B)
|
||||
#include <ftdump.c>
|
||||
9
contrib/win32/hack_ftlint.c
Normal file
9
contrib/win32/hack_ftlint.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
#define exit(code) force_exit(code)
|
||||
#define main(A,B) ftlint(A,B)
|
||||
#include <ftlint.c>
|
||||
9
contrib/win32/hack_ftstring.c
Normal file
9
contrib/win32/hack_ftstring.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
#define exit(code) force_exit(code)
|
||||
#define main(A,B) ftstring(A,B)
|
||||
#include <ftstring.c>
|
||||
9
contrib/win32/hack_fttimer.c
Normal file
9
contrib/win32/hack_fttimer.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
#define exit(code) force_exit(code)
|
||||
#define main(A,B) fttimer(A,B)
|
||||
#include <fttimer.c>
|
||||
9
contrib/win32/hack_ftview.c
Normal file
9
contrib/win32/hack_ftview.c
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
#define exit(code) force_exit(code)
|
||||
#define main(A,B) ftview(A,B)
|
||||
#include <ftview.c>
|
||||
19
contrib/win32/readme.txt
Normal file
19
contrib/win32/readme.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
The purpose of this application is to serve as a running environment for
|
||||
some of the freetype project test programs:
|
||||
currently available programa aree ftdump,ftlint,,ftstring,ftview;
|
||||
others may be convinced to run but you may need to change the source
|
||||
code to avoid duplicate problems with the linker.
|
||||
This work has been based on a large amount of guesswork
|
||||
and a small amount of my (little) spare time;
|
||||
however it seems to be working pretty well as far as I can tell
|
||||
( -g -r options are not working but I don't care 'bout them).
|
||||
It can be compiled both under MS VC++ Version 4.X and Version 5.
|
||||
and has been tested under Windows 95 & NT 4.0 .
|
||||
|
||||
Have Fun .
|
||||
Giancarlo Ramat
|
||||
(gcramat@radiostudio.it)
|
||||
|
||||
[Please note that all files are archived in Unix LF format (except
|
||||
testw32.mdp which is a binary file). If necessary, use e.g. unzip's `-a'
|
||||
flag to convert to MSDOS CR/LF convention.]
|
||||
BIN
contrib/win32/res/testw32.ico
Normal file
BIN
contrib/win32/res/testw32.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
13
contrib/win32/res/testw32.rc2
Normal file
13
contrib/win32/res/testw32.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// TESTW32.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
24
contrib/win32/resource.h
Normal file
24
contrib/win32/resource.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by testw32.rc
|
||||
//
|
||||
#define IDD_TESTW32_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_FONT_NAME 1000
|
||||
#define IDC_BITMAP 1001
|
||||
#define IDC_LIST_BOX 1002
|
||||
#define IDC_SELECT_ACTION 1003
|
||||
#define IDC_ACTION 1004
|
||||
#define IDC_TEST_PROGRAM 1005
|
||||
#define IDC_OPTIONS 1007
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1008
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
6
contrib/win32/stdafx.cpp
Normal file
6
contrib/win32/stdafx.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// testw32.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
25
contrib/win32/stdafx.h
Normal file
25
contrib/win32/stdafx.h
Normal file
@@ -0,0 +1,25 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__70F52CAD_06A4_11D2_9AC4_0060978849F3__INCLUDED_)
|
||||
#define AFX_STDAFX_H__70F52CAD_06A4_11D2_9AC4_0060978849F3__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__70F52CAD_06A4_11D2_9AC4_0060978849F3__INCLUDED_)
|
||||
79
contrib/win32/testw32.cpp
Normal file
79
contrib/win32/testw32.cpp
Normal file
@@ -0,0 +1,79 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
// testw32.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "testw32.h"
|
||||
#include "testw32dlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32App
|
||||
|
||||
BEGIN_MESSAGE_MAP(CTestw32App, CWinApp)
|
||||
//{{AFX_MSG_MAP(CTestw32App)
|
||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code!
|
||||
//}}AFX_MSG
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32App construction
|
||||
|
||||
CTestw32App::CTestw32App()
|
||||
{
|
||||
// TODO: add construction code here,
|
||||
// Place all significant initialization in InitInstance
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// The one and only CTestw32App object
|
||||
|
||||
CTestw32App theApp;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32App initialization
|
||||
|
||||
BOOL CTestw32App::InitInstance()
|
||||
{
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
// of your final executable, you should remove from the following
|
||||
// the specific initialization routines you do not need.
|
||||
|
||||
CTestw32Dlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
int nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with OK
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with Cancel
|
||||
}
|
||||
|
||||
// Since the dialog has been closed, return FALSE so that we exit the
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CTestw32App::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
|
||||
return CWinApp::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
|
||||
}
|
||||
190
contrib/win32/testw32.dsp
Normal file
190
contrib/win32/testw32.dsp
Normal file
@@ -0,0 +1,190 @@
|
||||
# Microsoft Developer Studio Project File - Name="testw32" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=testw32 - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "testw32.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "testw32.mak" CFG="testw32 - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "testw32 - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "testw32 - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 6
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 6
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 6
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 6
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /G5 /MDd /W3 /Gm /Zi /Od /I "../../../LIB" /I "../" /I "../../../lib/arch/win32" /I "../../" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "WIN32_GR_TEST" /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 freetype.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\lib\arch\win32\release" /libpath:"..\..\..\lib\arch\win32\debug" /FORCE:MULTIPLE /FORCE:UNRESOLVED
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "testw32 - Win32 Release"
|
||||
# Name "testw32 - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\display.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\driver32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gmain.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_common.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftdump.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftlint.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftstring.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_fttimer.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftview.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stdafx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32.rc
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32dlg.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32Dlg.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\testw32.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\res\testw32.rc2
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
29
contrib/win32/testw32.dsw
Normal file
29
contrib/win32/testw32.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "testw32"=.\testw32.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
50
contrib/win32/testw32.h
Normal file
50
contrib/win32/testw32.h
Normal file
@@ -0,0 +1,50 @@
|
||||
// testw32.h : main header file for the TESTW32 application
|
||||
//
|
||||
|
||||
#if !defined(AFX_TESTW32_H__70F52CA9_06A4_11D2_9AC4_0060978849F3__INCLUDED_)
|
||||
#define AFX_TESTW32_H__70F52CA9_06A4_11D2_9AC4_0060978849F3__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error include 'stdafx.h' before including this file for PCH
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32App:
|
||||
// See testw32.cpp for the implementation of this class
|
||||
//
|
||||
|
||||
class CTestw32App : public CWinApp
|
||||
{
|
||||
public:
|
||||
CTestw32App();
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CTestw32App)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
||||
//{{AFX_MSG(CTestw32App)
|
||||
// NOTE - the ClassWizard will add and remove member functions here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code !
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_TESTW32_H__70F52CA9_06A4_11D2_9AC4_0060978849F3__INCLUDED_)
|
||||
533
contrib/win32/testw32.mak
Normal file
533
contrib/win32/testw32.mak
Normal file
@@ -0,0 +1,533 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=testw32 - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to testw32 - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "testw32 - Win32 Release" && "$(CFG)" !=\
|
||||
"testw32 - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "testw32.mak" CFG="testw32 - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "testw32 - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "testw32 - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
################################################################################
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "testw32 - Win32 Debug"
|
||||
MTL=mktyplib.exe
|
||||
RSC=rc.exe
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 6
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 6
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "$(OUTDIR)\testw32.exe" "$(OUTDIR)\testw32.pch"
|
||||
|
||||
CLEAN :
|
||||
-@erase ".\Release\testw32.pch"
|
||||
-@erase ".\Release\testw32.exe"
|
||||
-@erase ".\Release\hack_ftview.obj"
|
||||
-@erase ".\Release\testw32.obj"
|
||||
-@erase ".\Release\hack_fttimer.obj"
|
||||
-@erase ".\Release\hack_common.obj"
|
||||
-@erase ".\Release\driver32.obj"
|
||||
-@erase ".\Release\stdafx.obj"
|
||||
-@erase ".\Release\hack_ftlint.obj"
|
||||
-@erase ".\Release\testw32dlg.obj"
|
||||
-@erase ".\Release\gmain.obj"
|
||||
-@erase ".\Release\hack_ftdump.obj"
|
||||
-@erase ".\Release\hack_ftstring.obj"
|
||||
-@erase ".\Release\display.obj"
|
||||
-@erase ".\Release\testw32.res"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\lib" /I "..\..\" /I "..\..\..\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /c
|
||||
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\..\lib" /I "..\..\" /I "..\..\..\"\
|
||||
/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS"\
|
||||
/Fp"$(INTDIR)/testw32.pch" /YX"stdafx.h" /Fo"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\Release/
|
||||
CPP_SBRS=
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /win32
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /win32
|
||||
# ADD BASE RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x410 /d "NDEBUG" /d "_AFXDLL"
|
||||
RSC_PROJ=/l 0x410 /fo"$(INTDIR)/testw32.res" /d "NDEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/testw32.bsc"
|
||||
BSC32_SBRS=
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 freetype.lib /nologo /subsystem:windows /machine:I386
|
||||
LINK32_FLAGS=freetype.lib /nologo /subsystem:windows /incremental:no\
|
||||
/pdb:"$(OUTDIR)/testw32.pdb" /machine:I386 /out:"$(OUTDIR)/testw32.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)/hack_ftview.obj" \
|
||||
"$(INTDIR)/testw32.obj" \
|
||||
"$(INTDIR)/hack_fttimer.obj" \
|
||||
"$(INTDIR)/hack_common.obj" \
|
||||
"$(INTDIR)/driver32.obj" \
|
||||
"$(INTDIR)/stdafx.obj" \
|
||||
"$(INTDIR)/hack_ftlint.obj" \
|
||||
"$(INTDIR)/testw32dlg.obj" \
|
||||
"$(INTDIR)/gmain.obj" \
|
||||
"$(INTDIR)/hack_ftdump.obj" \
|
||||
"$(INTDIR)/hack_ftstring.obj" \
|
||||
"$(INTDIR)/display.obj" \
|
||||
"$(INTDIR)/testw32.res"
|
||||
|
||||
"$(OUTDIR)\testw32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 6
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 6
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
|
||||
ALL : "$(OUTDIR)\testw32.exe" "$(OUTDIR)\testw32.pch"
|
||||
|
||||
CLEAN :
|
||||
-@erase ".\Debug\vc40.pdb"
|
||||
-@erase ".\Debug\vc40.idb"
|
||||
-@erase ".\Debug\testw32.pch"
|
||||
-@erase ".\Debug\testw32.exe"
|
||||
-@erase ".\Debug\stdafx.obj"
|
||||
-@erase ".\Debug\display.obj"
|
||||
-@erase ".\Debug\hack_ftlint.obj"
|
||||
-@erase ".\Debug\hack_fttimer.obj"
|
||||
-@erase ".\Debug\hack_ftdump.obj"
|
||||
-@erase ".\Debug\driver32.obj"
|
||||
-@erase ".\Debug\hack_ftview.obj"
|
||||
-@erase ".\Debug\testw32dlg.obj"
|
||||
-@erase ".\Debug\testw32.obj"
|
||||
-@erase ".\Debug\gmain.obj"
|
||||
-@erase ".\Debug\hack_ftstring.obj"
|
||||
-@erase ".\Debug\hack_common.obj"
|
||||
-@erase ".\Debug\testw32.res"
|
||||
-@erase ".\Debug\testw32.ilk"
|
||||
-@erase ".\Debug\testw32.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\winlib\freetype.orig\test" /I "..\..\..\lib" /I "..\..\..\lib\arch\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /c
|
||||
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\winlib\freetype.orig\test" /I\
|
||||
"..\..\..\lib" /I "..\..\..\lib\arch\win32" /D "WIN32" /D "_DEBUG" /D\
|
||||
"_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/testw32.pch" /YX"stdafx.h"\
|
||||
/Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
|
||||
CPP_OBJS=.\Debug/
|
||||
CPP_SBRS=
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /win32
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /win32
|
||||
# ADD BASE RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x410 /d "_DEBUG" /d "_AFXDLL"
|
||||
RSC_PROJ=/l 0x410 /fo"$(INTDIR)/testw32.res" /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)/testw32.bsc"
|
||||
BSC32_SBRS=
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 ..\..\..\lib\arch\win32\debug\freetype.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
LINK32_FLAGS=..\..\..\lib\arch\win32\debug\freetype.lib /nologo\
|
||||
/subsystem:windows /incremental:yes /pdb:"$(OUTDIR)/testw32.pdb" /debug\
|
||||
/machine:I386 /out:"$(OUTDIR)/testw32.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)/stdafx.obj" \
|
||||
"$(INTDIR)/display.obj" \
|
||||
"$(INTDIR)/hack_ftlint.obj" \
|
||||
"$(INTDIR)/hack_fttimer.obj" \
|
||||
"$(INTDIR)/hack_ftdump.obj" \
|
||||
"$(INTDIR)/driver32.obj" \
|
||||
"$(INTDIR)/hack_ftview.obj" \
|
||||
"$(INTDIR)/testw32dlg.obj" \
|
||||
"$(INTDIR)/testw32.obj" \
|
||||
"$(INTDIR)/gmain.obj" \
|
||||
"$(INTDIR)/hack_ftstring.obj" \
|
||||
"$(INTDIR)/hack_common.obj" \
|
||||
"$(INTDIR)/testw32.res"
|
||||
|
||||
"$(OUTDIR)\testw32.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.c{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cpp{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
.cxx{$(CPP_SBRS)}.sbr:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
################################################################################
|
||||
# Begin Target
|
||||
|
||||
# Name "testw32 - Win32 Release"
|
||||
# Name "testw32 - Win32 Debug"
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32.cpp
|
||||
DEP_CPP_TESTW=\
|
||||
".\stdafx.h"\
|
||||
".\testw32.h"\
|
||||
".\testw32dlg.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\testw32.obj" : $(SOURCE) $(DEP_CPP_TESTW) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32dlg.cpp
|
||||
DEP_CPP_TESTW3=\
|
||||
".\stdafx.h"\
|
||||
".\testw32.h"\
|
||||
".\testw32dlg.h"\
|
||||
".\..\..\gdriver.h"\
|
||||
".\..\..\gevents.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\testw32dlg.obj" : $(SOURCE) $(DEP_CPP_TESTW3) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\stdafx.cpp
|
||||
DEP_CPP_STDAF=\
|
||||
".\stdafx.h"\
|
||||
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
|
||||
BuildCmds= \
|
||||
$(CPP) /nologo /MD /W3 /GX /O2 /I "..\..\..\lib" /I "..\..\" /I "..\..\..\" /D\
|
||||
"WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS"\
|
||||
/Fp"$(INTDIR)/testw32.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/" /c $(SOURCE) \
|
||||
|
||||
|
||||
"$(INTDIR)\stdafx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(INTDIR)\testw32.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
|
||||
BuildCmds= \
|
||||
$(CPP) /nologo /MDd /W3 /Gm /GX /Zi /Od /I "c:\winlib\freetype.orig\test" /I\
|
||||
"..\..\..\lib" /I "..\..\..\lib\arch\win32" /D "WIN32" /D "_DEBUG" /D\
|
||||
"_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/testw32.pch" /Yc"stdafx.h"\
|
||||
/Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) \
|
||||
|
||||
|
||||
"$(INTDIR)\stdafx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
"$(INTDIR)\testw32.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
|
||||
$(BuildCmds)
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\testw32.rc
|
||||
DEP_RSC_TESTW32=\
|
||||
".\res\testw32.ico"\
|
||||
".\res\testw32.rc2"\
|
||||
|
||||
|
||||
"$(INTDIR)\testw32.res" : $(SOURCE) $(DEP_RSC_TESTW32) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftview.c
|
||||
DEP_CPP_HACK_=\
|
||||
".\..\..\ftview.c"\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
".\..\..\common.h"\
|
||||
".\..\..\gmain.h"\
|
||||
".\..\..\gevents.h"\
|
||||
".\..\..\gdriver.h"\
|
||||
".\..\..\display.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
|
||||
NODEP_CPP_HACK_=\
|
||||
".\..\..\std.h"\
|
||||
".\..\..\graflink.h"\
|
||||
".\..\..\armsup.c"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_ftview.obj" : $(SOURCE) $(DEP_CPP_HACK_) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_common.c
|
||||
DEP_CPP_HACK_C=\
|
||||
".\..\..\common.c"\
|
||||
".\..\..\common.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_common.obj" : $(SOURCE) $(DEP_CPP_HACK_C) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftdump.c
|
||||
|
||||
!IF "$(CFG)" == "testw32 - Win32 Release"
|
||||
|
||||
DEP_CPP_HACK_F=\
|
||||
".\..\..\ftdump.c"\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
".\..\..\common.h"\
|
||||
".\..\..\..\lib\ttobjs.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
".\..\..\..\lib\ttconfig.h"\
|
||||
".\..\..\..\lib\ttengine.h"\
|
||||
".\..\..\..\lib\ttmutex.h"\
|
||||
".\..\..\..\lib\ttcache.h"\
|
||||
".\..\..\..\lib\tttables.h"\
|
||||
".\..\..\..\lib\ttcmap.h"\
|
||||
".\..\..\..\lib\tttypes.h"\
|
||||
|
||||
NODEP_CPP_HACK_F=\
|
||||
".\..\..\std.h"\
|
||||
".\..\..\graflink.h"\
|
||||
".\..\..\armsup.c"\
|
||||
".\..\..\ftxerr18.h"\
|
||||
".\..\..\..\lib\ft_conf.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_ftdump.obj" : $(SOURCE) $(DEP_CPP_HACK_F) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "testw32 - Win32 Debug"
|
||||
|
||||
DEP_CPP_HACK_F=\
|
||||
".\..\..\ftdump.c"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_ftdump.obj" : $(SOURCE) $(DEP_CPP_HACK_F) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftlint.c
|
||||
DEP_CPP_HACK_FT=\
|
||||
".\..\..\ftlint.c"\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
|
||||
NODEP_CPP_HACK_FT=\
|
||||
".\..\..\std.h"\
|
||||
".\..\..\graflink.h"\
|
||||
".\..\..\armsup.c"\
|
||||
".\..\..\ftxerr18.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_ftlint.obj" : $(SOURCE) $(DEP_CPP_HACK_FT) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_ftstring.c
|
||||
DEP_CPP_HACK_FTS=\
|
||||
".\..\..\ftstring.c"\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
".\..\..\common.h"\
|
||||
".\..\..\gmain.h"\
|
||||
".\..\..\gevents.h"\
|
||||
".\..\..\gdriver.h"\
|
||||
".\..\..\display.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
|
||||
NODEP_CPP_HACK_FTS=\
|
||||
".\..\..\std.h"\
|
||||
".\..\..\graflink.h"\
|
||||
".\..\..\armsup.c"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_ftstring.obj" : $(SOURCE) $(DEP_CPP_HACK_FTS) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hack_fttimer.c
|
||||
DEP_CPP_HACK_FTT=\
|
||||
".\..\..\fttimer.c"\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
".\..\..\common.h"\
|
||||
".\..\..\gmain.h"\
|
||||
".\..\..\gdriver.h"\
|
||||
".\..\..\gevents.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\hack_fttimer.obj" : $(SOURCE) $(DEP_CPP_HACK_FTT) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\driver32.c
|
||||
DEP_CPP_DRIVE=\
|
||||
".\..\..\gdriver.h"\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\driver32.obj" : $(SOURCE) $(DEP_CPP_DRIVE) "$(INTDIR)"
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\winlib\freetype.orig\test\gmain.c
|
||||
DEP_CPP_GMAIN=\
|
||||
".\..\..\gmain.h"\
|
||||
".\..\..\gdriver.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\gmain.obj" : $(SOURCE) $(DEP_CPP_GMAIN) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
# End Source File
|
||||
################################################################################
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=\winlib\freetype.orig\test\display.c
|
||||
DEP_CPP_DISPL=\
|
||||
".\..\..\..\lib\freetype.h"\
|
||||
".\..\..\gmain.h"\
|
||||
".\..\..\display.h"\
|
||||
"..\..\..\lib\fterrid.h"\
|
||||
"..\..\..\lib\ftnameid.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\display.obj" : $(SOURCE) $(DEP_CPP_DISPL) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
################################################################################
|
||||
BIN
contrib/win32/testw32.mdp
Normal file
BIN
contrib/win32/testw32.mdp
Normal file
Binary file not shown.
202
contrib/win32/testw32.rc
Normal file
202
contrib/win32/testw32.rc
Normal file
@@ -0,0 +1,202 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Italian (Italy) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 16, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#endif\r\n"
|
||||
"#include ""res\\testw32.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""l.ita\\afxres.rc"" // Standard components\r\n"
|
||||
"#endif\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON DISCARDABLE "res\\testw32.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_TESTW32_DIALOG DIALOGEX 0, 0, 331, 274
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "testw32"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Run",IDOK,105,100,28,14
|
||||
PUSHBUTTON "Exit",IDCANCEL,105,116,28,14
|
||||
CONTROL "",IDC_BITMAP,"Static",SS_BLACKRECT,146,47,178,120
|
||||
LISTBOX IDC_LIST_BOX,7,171,317,97,LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "<-Select Action (q to quit test pgm)",IDC_SELECT_ACTION,
|
||||
34,56,110,15
|
||||
EDITTEXT IDC_ACTION,23,56,9,12,ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_TEST_PROGRAM,13,12,90,64,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Test Program",IDC_STATIC,13,1,60,8
|
||||
EDITTEXT IDC_OPTIONS,111,12,204,12,ES_AUTOHSCROLL
|
||||
LTEXT "Options/Arguments",IDC_STATIC,109,2,73,8
|
||||
LTEXT "Show Window",IDC_STATIC,146,37,70,8
|
||||
END
|
||||
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "041004B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "testw32 Applicazione MFC\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "InternalName", "testw32\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 1998\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "testw32.EXE\0"
|
||||
VALUE "ProductName", "testw32 Applicazione\0"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x410, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_TESTW32_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 324
|
||||
BOTTOMMARGIN, 268
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog Info
|
||||
//
|
||||
|
||||
IDD_TESTW32_DIALOG DLGINIT
|
||||
BEGIN
|
||||
IDC_TEST_PROGRAM, 0x403, 7, 0
|
||||
0x5446, 0x4956, 0x5745, "\000"
|
||||
IDC_TEST_PROGRAM, 0x403, 7, 0
|
||||
0x5446, 0x5544, 0x504d, "\000"
|
||||
IDC_TEST_PROGRAM, 0x403, 9, 0
|
||||
0x5446, 0x5453, 0x4952, 0x474e, "\000"
|
||||
IDC_TEST_PROGRAM, 0x403, 7, 0
|
||||
0x5446, 0x494c, 0x544e, "\000"
|
||||
0
|
||||
END
|
||||
|
||||
#endif // Italian (Italy) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 16, 1
|
||||
#pragma code_page(1252)
|
||||
#endif
|
||||
#include "res\testw32.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "l.ita\afxres.rc" // Standard components
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
358
contrib/win32/testw32dlg.cpp
Normal file
358
contrib/win32/testw32dlg.cpp
Normal file
@@ -0,0 +1,358 @@
|
||||
/*********************************************************/
|
||||
/* Test program driver for freetype on Win32 Platform */
|
||||
/* CopyRight(left) G. Ramat 1998 (gcramat@radiostudio.it)*/
|
||||
/* */
|
||||
/*********************************************************/
|
||||
|
||||
// testw32Dlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "testw32.h"
|
||||
#include "testw32dlg.h"
|
||||
#include "gdriver.h"
|
||||
#include "gevents.h"
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
CWnd *button_OK,*button_Cancel;
|
||||
DWORD thrd_spool; // output spooler
|
||||
HANDLE spool_thread;
|
||||
|
||||
//Sync data:
|
||||
extern "C" {
|
||||
HANDLE evgetevent,evdriverdisplaybitmap,this_cwnd,main_thread,listbox,bitmap;
|
||||
TEvent evevent;
|
||||
char *ev_buffer;
|
||||
int ev_lines,ev_columns;
|
||||
char *save_buffer;
|
||||
int save_lines,save_cols,exit_code;
|
||||
int ftview(int,char**);
|
||||
int ftdump(int,char**);
|
||||
int ftlint(int,char**);
|
||||
int ftstring(int,char**);
|
||||
int ftstrpnm(int,char**);
|
||||
int ftzoom(int,char**);
|
||||
int call_test_program(int (*)(int,char**),int,char **);
|
||||
|
||||
}
|
||||
//pipe handling variables
|
||||
int pipe_std[2]={2*0},pipe_err[2]={2*0},error;
|
||||
int old_std,old_err;
|
||||
//end of pipe handling variables
|
||||
|
||||
|
||||
#define TEST_PROG_N 4
|
||||
//Sync data end
|
||||
char ProgramName[16];
|
||||
char fontname[16];
|
||||
char fullfont[MAX_PATH];
|
||||
char *argv[255];
|
||||
int argc;
|
||||
DWORD WINAPI ThreadHead(LPVOID );
|
||||
DWORD WINAPI ThreadSpool(LPVOID );
|
||||
void readpipe(int);
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
extern main(int,char **);
|
||||
extern int X_Link;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32Dlg dialog
|
||||
|
||||
CTestw32Dlg::CTestw32Dlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CTestw32Dlg::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CTestw32Dlg)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CTestw32Dlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CTestw32Dlg)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CTestw32Dlg, CDialog)
|
||||
//{{AFX_MSG_MAP(CTestw32Dlg)
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
ON_BN_CLICKED(IDC_SELECT_ACTION, OnSelectAction)
|
||||
ON_WM_DESTROY()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32Dlg message handlers
|
||||
|
||||
BOOL CTestw32Dlg::OnInitDialog()
|
||||
{ int error;
|
||||
FILE *retf;
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// Set the icon for this dialog. The framework does this automatically
|
||||
// when the application's main window is not a dialog
|
||||
SetIcon(m_hIcon, TRUE); // Set big icon
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
//save CWnd objects for utility fns;
|
||||
evgetevent=CreateEvent(NULL,FALSE,FALSE,"Get_Event");
|
||||
evdriverdisplaybitmap=CreateEvent(NULL,FALSE,FALSE,"Driver_Display_Bitmap");
|
||||
listbox=(GetDlgItem(IDC_LIST_BOX))->m_hWnd;
|
||||
bitmap=(GetDlgItem(IDC_BITMAP))->m_hWnd;
|
||||
button_OK=GetDlgItem(IDOK);
|
||||
button_Cancel=GetDlgItem(IDCANCEL);
|
||||
error=_pipe(pipe_std,1024,_O_TEXT);
|
||||
// error=_pipe(pipe_err,1024,_O_TEXT);
|
||||
// enable piping
|
||||
if(-1==_fileno(stdout))
|
||||
{retf=freopen("throwaway_stdout.tmp","wt",stdout);
|
||||
}
|
||||
if(-1==_fileno(stderr))
|
||||
{retf=freopen("throwaway_stderr.tmp","wt",stderr);
|
||||
}
|
||||
old_std=dup(_fileno(stdout));
|
||||
old_err=dup(_fileno(stderr));
|
||||
error=dup2(pipe_std[1],_fileno(stdout));
|
||||
error=dup2(pipe_std[1],_fileno(stderr)); //error=dup2(pipe_err[1],_fileno(stderr));
|
||||
save_buffer=NULL;
|
||||
// error=write(pipe_std[1],"Pipe_test:Write\n",16);
|
||||
// error=fprintf(stdout,"Pipe_test:fprintf");
|
||||
// error=fflush(stdout);
|
||||
// activate spooler
|
||||
spool_thread=CreateThread(NULL,0,ThreadSpool,NULL,0,&thrd_spool);
|
||||
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
}
|
||||
|
||||
// If you add a minimize button to your dialog, you will need the code below
|
||||
// to draw the icon. For MFC applications using the document/view model,
|
||||
// this is automatically done for you by the framework.
|
||||
|
||||
void CTestw32Dlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
|
||||
|
||||
// Center icon in client rectangle
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// Draw the icon
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// The system calls this to obtain the cursor to display while the user drags
|
||||
// the minimized window.
|
||||
HCURSOR CTestw32Dlg::OnQueryDragIcon()
|
||||
{
|
||||
return (HCURSOR) m_hIcon;
|
||||
}
|
||||
|
||||
void CTestw32Dlg::OnOK()
|
||||
{
|
||||
DWORD thrd_id;
|
||||
char Options[256];
|
||||
char *p,*pb,*pe;
|
||||
int i;
|
||||
// TODO: Add extra validation here
|
||||
GetDlgItemText(IDC_TEST_PROGRAM,ProgramName,sizeof(ProgramName)-1);
|
||||
GetDlgItemText(IDC_OPTIONS,Options,sizeof(Options)-1);
|
||||
argv[0]=ProgramName;
|
||||
p=Options;
|
||||
i=1;
|
||||
while (*p!=0)
|
||||
{
|
||||
while (*p==' ') p++;
|
||||
pb=p;
|
||||
while (*p>' ') p++;
|
||||
pe=p;
|
||||
if (pe>pb)
|
||||
{
|
||||
argv[i]=new char[1+pe-pb];
|
||||
strncpy(argv[i],pb,pe-pb);
|
||||
argv[i][pe-pb]=0;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
argv[0]=ProgramName;
|
||||
argc=i;
|
||||
main_thread=CreateThread(NULL,0,ThreadHead,NULL,0,&thrd_id);
|
||||
|
||||
// CDialog::OnOK();
|
||||
}
|
||||
|
||||
DWORD WINAPI ThreadHead(LPVOID Parm)
|
||||
{ int i,rc;
|
||||
|
||||
struct {
|
||||
char pname[16];
|
||||
int (*program)(int,char**);
|
||||
} tab[TEST_PROG_N]=
|
||||
{
|
||||
{"FTVIEW",&ftview},
|
||||
{"FTDUMP",&ftdump},
|
||||
{"FTLINT",&ftlint},
|
||||
{"FTSTRING",&ftstring}
|
||||
// {"FTSTRPNM",&ftstrpnm},
|
||||
// {"FTZOOM",&ftzoom}
|
||||
};
|
||||
//disable Ok button
|
||||
rc=button_OK->EnableWindow(FALSE);
|
||||
rc=button_Cancel->EnableWindow(FALSE);
|
||||
|
||||
for (i=0;(i< TEST_PROG_N) &&strcmp(tab[i].pname,ProgramName);i++);
|
||||
if (i>= TEST_PROG_N)
|
||||
{
|
||||
MessageBox(NULL,"Please select a valid Test Program Name","FreeType Test ",MB_ICONQUESTION);
|
||||
}
|
||||
else
|
||||
call_test_program(tab[i].program,argc,(char **)&argv);
|
||||
//enable buttons again
|
||||
rc=button_OK->EnableWindow(TRUE);
|
||||
rc=button_Cancel->EnableWindow(TRUE);
|
||||
rc=fflush(stdout);
|
||||
rc=fflush(stderr);
|
||||
ExitThread(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void translate_command(char nChar)
|
||||
{ int rc,i;
|
||||
// TODO: Add your message handler code here and/or call default
|
||||
typedef struct _Translator
|
||||
{
|
||||
char key;
|
||||
GEvent event_class;
|
||||
int event_info;
|
||||
} Translator;
|
||||
|
||||
#define NUM_Translators 20
|
||||
|
||||
static const Translator trans[ NUM_Translators] =
|
||||
{
|
||||
{ 'q', event_Quit, 0 },
|
||||
{ (char)27, event_Quit, 0 },
|
||||
|
||||
{ 'x', event_Rotate_Glyph, -1 },
|
||||
{ 'c', event_Rotate_Glyph, 1 },
|
||||
{ 'v', event_Rotate_Glyph, -16 },
|
||||
{ 'b', event_Rotate_Glyph, 16 },
|
||||
|
||||
{ '{', event_Change_Glyph, -10000 },
|
||||
{ '}', event_Change_Glyph, 10000 },
|
||||
{ '(', event_Change_Glyph, -1000 },
|
||||
{ ')', event_Change_Glyph, 1000 },
|
||||
{ '9', event_Change_Glyph, -100 },
|
||||
{ '0', event_Change_Glyph, 100 },
|
||||
{ 'i', event_Change_Glyph, -10 },
|
||||
{ 'o', event_Change_Glyph, 10 },
|
||||
{ 'k', event_Change_Glyph, -1 },
|
||||
{ 'l', event_Change_Glyph, 1 },
|
||||
|
||||
{ '+', event_Scale_Glyph, 10 },
|
||||
{ '-', event_Scale_Glyph, -10 },
|
||||
{ 'u', event_Scale_Glyph, 1 },
|
||||
{ 'j', event_Scale_Glyph, -1 }
|
||||
};
|
||||
for ( i = 0; i < NUM_Translators; i++ )
|
||||
{
|
||||
if ( nChar == trans[i].key )
|
||||
{
|
||||
evevent.what = trans[i].event_class;
|
||||
evevent.info = trans[i].event_info;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i>= NUM_Translators)
|
||||
{
|
||||
evevent.what=event_Keyboard;
|
||||
evevent.what=nChar;
|
||||
}
|
||||
rc=SetEvent(evgetevent);
|
||||
}
|
||||
|
||||
void CTestw32Dlg::OnSelectAction()
|
||||
{
|
||||
char c[2];
|
||||
GetDlgItemText(IDC_ACTION,c,2);
|
||||
translate_command(c[0]);
|
||||
}
|
||||
|
||||
|
||||
DWORD WINAPI ThreadSpool(LPVOID Parm)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
if (pipe_std[0]) readpipe(pipe_std[0]); // will never get out of there !!!!
|
||||
// if (pipe_err[0]) readpipe(pipe_err[0]);
|
||||
Sleep(1000);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void readpipe(int h)
|
||||
{ int i,j,rc;
|
||||
|
||||
char buffer[1024],line[1024];
|
||||
rc=1;
|
||||
while(rc)
|
||||
{
|
||||
rc=read(h,buffer,sizeof(buffer));
|
||||
if (rc)
|
||||
{ j=0;
|
||||
for(i=0;i<rc;i++)
|
||||
{
|
||||
if (buffer[i]=='\n')
|
||||
{ line[j]=0;
|
||||
::SendMessage((HWND)listbox,LB_ADDSTRING,0,(LPARAM)line);
|
||||
j=0;
|
||||
}
|
||||
else
|
||||
line[j++]=buffer[i];
|
||||
}
|
||||
line[j]=0; //flush the buffer
|
||||
::SendMessage((HWND)listbox,LB_ADDSTRING,0,(LPARAM)line);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CTestw32Dlg::OnDestroy()
|
||||
{ int rc;
|
||||
CDialog::OnDestroy();
|
||||
if (spool_thread!=0)
|
||||
{
|
||||
rc=TerminateThread(spool_thread,2);
|
||||
spool_thread=0;
|
||||
}
|
||||
dup2(old_std,_fileno(stdout));
|
||||
dup2(old_err,_fileno(stderr));
|
||||
}
|
||||
51
contrib/win32/testw32dlg.h
Normal file
51
contrib/win32/testw32dlg.h
Normal file
@@ -0,0 +1,51 @@
|
||||
// testw32Dlg.h : header file
|
||||
//
|
||||
|
||||
#if !defined(AFX_TESTW32DLG_H__70F52CAB_06A4_11D2_9AC4_0060978849F3__INCLUDED_)
|
||||
#define AFX_TESTW32DLG_H__70F52CAB_06A4_11D2_9AC4_0060978849F3__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTestw32Dlg dialog
|
||||
|
||||
class CTestw32Dlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CTestw32Dlg(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CTestw32Dlg)
|
||||
enum { IDD = IDD_TESTW32_DIALOG };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
//}}AFX_DATA
|
||||
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CTestw32Dlg)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CTestw32Dlg)
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
virtual void OnOK();
|
||||
afx_msg void OnSelectAction();
|
||||
afx_msg void OnDestroy();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_TESTW32DLG_H__70F52CAB_06A4_11D2_9AC4_0060978849F3__INCLUDED_)
|
||||
Reference in New Issue
Block a user