📄 toupperda.h
字号:
/*************************************************************************** ToUpperDA : ToUpper/ToLower function DA (Desk Accessory) Copyright (C) 1999-2002 Koichi TERADA, All Rights Reserved. > email: kterada@mcn.ne.jp > web: http://www04.u-page.so-net.ne.jp/zd5/kterada 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA****************************************************************************/typedef unsigned char uchar;const int hwrDisplayWidth = 160;const int hwrDisplayHeight = 160;#define MAX_TEXT 255#define MAX_DISPLAY 20#define mainFormLeft 30#define mainFormWidth 100#define mainFormTop 40#define mainFormHeight 80#define FrameWidth 2#define ToUpperAppID 'DATu'#define chrIsHardKey(c) ((((c) >= hardKeyMin) && ((c) <= hardKeyMax)) || ((c) == calcChr))typedef struct parameter { Word formLeft; Word formWidth; Word formTop; Word formHeight; FieldPtr fieldptr; Word start; Word end; Word updatedEnd; Char buf1[MAX_TEXT]; Char buf2[MAX_TEXT]; Char mode; SWord fromX, fromY; SWord lastX, lastY; Boolean moving; WinHandle rootWindow; Char str1[MAX_DISPLAY]; Char str2[MAX_DISPLAY]; Char str3[MAX_DISPLAY];} Param;typedef struct { Char mode; SWord lastX, lastY;} ToUpperPreferenceType;#define ToUpperPrefVersionNum 4#define MODE_JP 0x01#define MODE_US 0x02#define MODE_EU 0x04static int EventMainLoop( Param * );static Boolean HandleMainEvent(EventPtr, Param *);static Word getSelectedText(CharPtr buf, Param *);static FieldPtr GetFocusFieldPtr( void );static void putSelectedText(CharPtr buf, Param *);static void setAndDrawFields( Param * );static char *strNCopyPunct( char *dst, char *src, int limit );static unsigned char *strToUpper( unsigned char *, unsigned char *, Char );static unsigned char *strToLower( unsigned char *, unsigned char *, Char );static unsigned char *strToCaps( unsigned char *, unsigned char *, Char );static void LoadFromPrefs( Param * );static void SaveToPrefs( Param * );static Boolean isDelimiter( unsigned char, Char mode );static Boolean IsInside(RectanglePtr , SWord , SWord );static Boolean IsOutside(RectanglePtr , SWord , SWord );static void ExorFrame(Word , Word );static uchar toUpperEU( unsigned char c, Char mode );static uchar toLowerEU( unsigned char c, Char mode );/* $Revision: 1.6 $ * * $Log: ToUpperDA.h,v $ * Revision 1.6 2002/06/15 16:29:30 kterada * - fix GNU GPL * * Revision 1.5 2001/12/25 16:29:52 kterada * GPLed * * Revision 1.4 2001/03/17 16:00:21 kterada * supress un-punct char * * Revision 1.3 2001/02/08 15:59:35 kterada * support single-quote handling * * Revision 1.2 2001/02/08 15:28:43 kterada * port to GCC env. * * Revision 1.1 2001/01/19 15:49:46 kterada * add all items for repository * * Revision 1.3 2001/01/17 09:41:32 kterada * Remove garbage strings display * * Revision 1.2 2001/01/17 08:47:30 kterada * Support OS3.5 * * Revision 1.1 2000/07/03 17:36:50 kterada * Initial revision * * */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -