|
From: Mapi B. <ma...@us...> - 2009-11-02 17:37:34
|
Update of /cvsroot/easycalc/PPCport/discarded In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv26895 Added Files: clie-util.c clie.c clie.h clie_readme.txt Log Message: 1.25b --- NEW FILE: clie_readme.txt --- The files clie.c, clie.h and clie-util.c now support both PalmOS 5 hires and Sony PalmOS 4 hires. Sony PalmOS 5 uses the generic PalmOS 5 hires code. The text below by Arno Welzel is now mostly obsolete. It is left to preserve the history. Ton van Overbeek, 2006-08 ------------------------------------------------------------------------------ Changes for EasyCalc 1.20/hr Arno Welzel / 2003-05 1. Sony Clie SDK 3.0 All changes are based on the Sony Clie SDK 3.0. This SDK may be obtained at http://www.us.sonypdadev.com/develop_tool/sdk_30.html IMPORTANT: The header files are not usable "out of the box" with prc-tools! Some files have to be modified in the following way, e.h. Libraries/SonyHRLib.h: typedef enum tagHRTrapNumEnum { HRTrapGetAPIVersion = sysLibTrapCustom, HRTrapWinClipRectangle, HRTrapWinCopyRectangle, ... } This has to be changed to: //typedef enum tagHRTrapNumEnum //{ #define HRTrapGetAPIVersion (sysLibTrapCustom+0) //= sysLibTrapCustom, #define HRTrapWinClipRectangle (sysLibTrapCustom+1) // #define HRTrapWinCopyRectangle (sysLibTrapCustom+2) // ... // } I provide a version of these files, which are already changed. 2. Makefile The makefile modified to include the Sony SDK header files, which should be available in the path /PalmDev/clie-sdk. Additionally, a new file clie.c with its header clie.h has to be included in the build: CFLAGS=-Wall -Wno-switch -O2 -I./include -I. -I/PalmDev/clie-sdk/include -I/PalmDev/clie-sdk/include/Libraries -I/PalmDev/clie-sdk/include/System CALC_OBJS = calc.o clie.o mlib/calcDB.o mlib/fl_num.o mlib/fp.o mlib/funcs.o \ mlib/guess.o mlib/konvert.o mlib/mathem.o mlib/stack.o prefs.o \ mlib/MathLib.o mlib/display.o mlib/history.o mlib/complex.o \ finance.o result.o ansops.o defmgr.o mlib/meqstack.o \ mlib/txtask.o \ main.o memo.o varmgr.o $(TARGET)-sections.o 3. New files For a number of functions to handle the Clie specific stuff there is a new file clie.c with a header clie.h. 4. Changes calc.c - new global variable palmOS50 as an indicator for OS 5.0 (this is neccessary to do the proper coordinate handling for the result display) - gadget_bounds() contains adjustments for high resolution display on Sony Clie - StartApplication() contains additional initialization code for Sony Clie HR mode graph.c - A number of Win..() calls where replaced with clie_..() calls (see clie.c), which handle high resolution modes as well grtaps.c - A number of Win..() calls where replaced with clie_..() calls (see clie.c), which handle high resolution modes as well result.c - A number of Win..() calls where replaced with clie_..() calls (see clie.c), which handle high resolution modes as well --- NEW FILE: clie.c --- (This appears to be a binary file; contents omitted.) --- NEW FILE: clie-util.c --- (This appears to be a binary file; contents omitted.) --- NEW FILE: clie.h --- /* * $Id: clie.h,v 1.1 2009/11/02 17:26:58 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 2000 Ondrej Palkovsky * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * You can contact me at 'on...@pe...'. */ #ifndef _CLIE_H_ #define _CLIE_H_ enum { hrNone = 0, hrSony, hrPalm }; extern UInt16 gHrMode; extern Int16 gSonyFactor; extern UInt16 gHrLibApiVersion; // HRLib version extern UInt16 gHrLibRefNum; // HRLib reference number extern Boolean gHrLibIsV2; // True when HR Lib is ver.2 or later extern UInt16 GetHRLibVersion(UInt16 *hrLibRefNum); extern void clie_drawpixel(Coord x, Coord y); extern void clie_drawline(Coord x1, Coord y1, Coord x2, Coord y2); extern void clie_invertline(Coord x1, Coord y1, Coord x2, Coord y2); extern void clie_cliprectangle(RectangleType *rP); extern void clie_eraserectangle(RectangleType *rP, UInt16 cornerDiam); extern WinHandle clie_createoffscreenwindow(Coord width, Coord height, WindowFormatType format, UInt16 *error); extern void clie_copyrectangle(WinHandle srcWin, WinHandle dstWin, RectangleType *srcRect, Coord destX, Coord destY, WinDrawOperation mode); extern void clie_setclip(RectangleType *rP); extern void clie_getclip(RectangleType *rP); extern void clie_drawrectangleframe(FrameType frame, const RectangleType *rP); extern void clie_getwindowextent(Coord *extentX, Coord *extentY); extern void clie_drawbitmap(BitmapPtr bitmapP, Coord x, Coord y); extern void clie_drawchars(const Char *chars, Int16 len, Coord x, Coord y); #endif |