?? asixwin.h
字號:
/*************************************************************************** Copyright 2000 National ASIC Center, All right Reserved** FILE NAME: asixwin.h* PROGRAMMER: Lingming* Date of Creation: 2000/11/30* * DESCRIPTION: The essential declarations for ASIX Windows system* including MACRO define, global var declaration and* public functions prototypes.** NOTE: The application C file MUST include this file if * this application will use ASIX Windows GUI API ** FUNCTIONS LIST:* fun1(arg1,arg2) description of func1* fun2(arg1,arg2,arg3) description of func2** GLOBAL VARS LIST:* * WindowClass[] the window class description const table,which* defines the obj's relevent functions pointer* * CurWindow the pointer that point to the active window* * TaskDescription[] the table descripts the application relevent* information such as app name, stack size ,etc* it is also a const table which means the infor* in this table will not be changed during running * * CurTask the pointer that point to current task * * TaskHead the head pointer of the task list**************************************************************************** MODIFICATION HISTORY** 2000/11/30 by Lingming Creation of this file* 2001/11/07 by Lingming porting to EPSON C33209 MCU with the soft* platform ROS33 * 2001/11/27 by Lingming #define WST_DESTROYED 0x00000000L * #define WST_NORMAL 0xFACE0000L * For wnd id validation checking. If the id* is ok, it must has WST_NORMAL token, if it* is deleted, then a WST_DESTROYED filled in * 2001/11/28 by Lingming add focus related message* Support Color theme * 2002/3/12 by Xuanhui&Zhuli modify definition of ASIX_COLOR_THEME *************************************************************************/#ifndef _ASIXWIN_H#define _ASIXWIN_H#include "cbtype.h"// longn_qi 2001/11/27 added//#include <sys\cdevice.h> // in this header define phyiscal screen size // and pixel size.//#include <sys\key.h>/* some system depended const *//*#define CHINESE_CHAR_HEIGHT 16#define CHINESE_CHAR_WIDTH 16#define ENGLISH_CHAR_WIDTH 8#define ENGLISH_CHAR_HEIGHT 16*///#include <sys\sysdebug.h>// longn_qi 2001/11/27 revised#define ASIX_PLCD_W LCD_WIDTH//phisical LCD width#define ASIX_PLCD_H LCD_HEIGHT//phisical LCD height#define ASIX_STACK_ALARM 400 //if stack mem is lower than this, kill the task/*#ifndef ASIX_ON_PPSM#define ASIX_ON_PPSM //ASIX is building on PPSM#endif*/ #define ASIX_DEBUG //Now we are in debugging//#define ASIX_WITH_UART //ASIX win will handle the UART//#define ASIX_DYNAMIC //supports dynamic load/*-----------------------------*/#ifdef ASIX_ON_PPSM#include <ppsm.h> //PPSM's defines#include <errors.h> //PPSM's error defines#include <proto.h> //PPSM's function prototype#else/* This ppsm.h is the conterpart of Motorola's ppsm.h, we use this * file to covert the ROS33 system layer to a PPSM-like interface * so that the porting of ASIX Window will be easer. *///#include <ppsm.h> //include ppsm simulation layer #endif //#ifdef ASIX_ON_PPSMextern char ASIXVersion[];/* we set the font size as var now , so that we can * update the font size at run time * By Lingming 2001/5/08 *///extern BYTE CHINESE_CHAR_HEIGHT; //extern BYTE CHINESE_CHAR_WIDTH;//extern BYTE ENGLISH_CHAR_WIDTH;//extern BYTE ENGLISH_CHAR_HEIGHT;#define ASIX_LCD_W ( GetLogicalX(GetGC()) ) //logical LCD width#define ASIX_LCD_H ( GetLogicalY(GetGC()) ) //logical LCD height#ifdef ASIX_DYNAMIC/* ASIX Win Use this space to store the standard C ,PPSM and ASIX functions' * pointer, the dynamic code use this pointer to call these functions, this * is because the dynamic code is not linked with these libers. */ extern char *DynamicFunctionPtr;/* the function ptr array size, should be same as specified in SPC file */#define DYNAMIC_FUNCPTR_SIZE 0xb00/* the dynamic code should be linked at the start address that specified * at "dynamic" region in the file asixwin.spc * the ram address from 0x2000 - 0xc000 is reserved for dynamic loading * this ram space is controled by ASIX Win rather than PPSM */ extern char *DynamicCode;/* The code size defined here should be same as the SPC file specified*/#define DYNAMIC_CODE_SIZE 0xa000#define DYNAMIC_RAM_BASE 0x0#endif/***********************************************************************/#ifdef ASIX_ON_PPSM/* MS Windows type define*//* In C33 Version we define this in wintype.h *//*typedef unsigned char BYTE;typedef unsigned short WORD;typedef unsigned int DWORD; //this maybe different from PC //because the cc68000 compiler //assume int as 32 bitstypedef unsigned int UINT;typedef int LONG;#define LOBYTE(w) ((BYTE)(w))#define HIBYTE(w) ((BYTE)((WORD)(w) >> 8))#define LOWORD(l) ((WORD)(l))#define HIWORD(l) ((WORD)((DWORD)(l) >> 16))#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))#ifndef max#define max(a,b) (((a) > (b)) ? (a) : (b))#endif#ifndef min#define min(a,b) (((a) < (b)) ? (a) : (b))#endif*//* Types use for passing & returning polymorphic values *//*typedef WORD WPARAM;typedef LONG LPARAM;typedef LONG LRESULT;#define MAKELPARAM(low, high) ((LPARAM)MAKELONG(low, high))#define MAKELRESULT(low, high) ((LRESULT)MAKELONG(low, high))*/#endif /* error define*/#ifdef ASIX_ON_PPSM#define ASIX_OK PPSM_OK#define ASIX_ERROR PPSM_ERROR#define ASIX_NO_MEM PPSM_ERR_NO_MEMORY #else#define ASIX_OK 0x0000#define ASIX_ERROR 0x0001#define ASIX_NO_MEM 0x4001#endif //#ifdef ASIX_ON_PPSM#define ASIX_NO_MSG 0x5001/* The window class id define*//* Except for WNDCLASS_WIN ,all of other instant of the classes must be * one of windows child */ #define WNDCLASS_WIN 0x00 //normal window#define WNDCLASS_BUTTON 0x01#define WNDCLASS_SELECT 0x02#define WNDCLASS_SELECTCARD 0x03#define WNDCLASS_MENU 0x04#define WNDCLASS_LIST 0x05//#define WNDCLASS_COMBO 0x6#define WNDCLASS_KEYBD 0x06#define WNDCLASS_PROCESS 0x07 //process bar#define WNDCLASS_SCROLL 0x08#define WNDCLASS_KEYBAR 0x09#define WNDCLASS_EDITOR 0x0a //line editor ( single/multi line )//#define WNDCLASS_MUTIEDIT 0x0b //muti_line editor#define WNDCLASS_READER 0x0b#define WNDCLASS_STATIC 0x0c //static win such as icon, group frame etc.#define WNDCLASS_TSKBAR 0x0d //static win such as icon, group frame etc.#define WNDCLASS_TEST 0x0e#define WNDCLASS_MAX 0x0f /* Window Styles *//* Basic window types */#define WS_OVERLAPPED 0x00000000L#define WS_POPUP 0x80000000L#define WS_CHILD 0x40000000L/* Clipping styles */#define WS_CLIPSIBLINGS 0x04000000L /*reserved*/#define WS_CLIPCHILDREN 0x02000000L /*reserved*//* Generic window states */#define WS_VISIBLE 0x10000000L #define WS_DISABLED 0x08000000L /* Main window states */#define WS_MINIMIZE 0x20000000L /*reserved*/#define WS_MAXIMIZE 0x01000000L /*reserved*//* Main window styles */#define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */#define WS_BORDER 0x00800000L#define WS_DLGFRAME 0x00400000L#define WS_VSCROLL 0x00200000L /* not use */#define WS_HSCROLL 0x00100000L /* not use */#define WS_SYSMENU 0x00080000L //use to task swapping and other //system menu item #define WS_THICKFRAME 0x00040000L#define WS_MINIMIZEBOX 0x00020000L#define WS_MAXIMIZEBOX 0x00010000L/* we donot use minimize and maxmize, while we use * user menu box and close box */#define WS_USERBOX WS_MAXIMIZEBOX#define WS_CLOSEBOX WS_MINIMIZEBOX/* Control window styles */#define WS_SAVESCREEN 0x04000000L /* Note: the same as WS_CLIPSIBLINGS*/ #define WS_TABSTOP 0x00010000L /*reserved*//* Common Window Styles */#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLOSEBOX)#define WS_POPUPWINDOW (WS_POPUP | WS_CAPTION | WS_CLOSEBOX)#define WS_CHILDWINDOW (WS_CHILD)/*Keyboard Style*/#define KBS_HANDWRITE 0x00000100L#define KBS_SYMBOL 0x00000200L#define KBS_NUMBER 0x00000400L#define KBS_PINGYING 0x00000800L#define KBS_UPCASE 0x00001000L#define KBS_LOWCASE 0x00002000L#define KBS_DIALPAD 0x00004000L#define KBS_INK 0x00008000L/*button Style*///#define BS_ENABLE 0x00008000L#define BS_BOARD 0x00000001L#define BS_SHADOW 0x00000002L#define BS_LEFT 0x00000004L #define BS_UNDERLINE 0x00000008L#define BS_INVERT 0x00000010L#define BS_PEN_UP_CMD 0x00000020L#define BS_PEN_DOWN_CMD 0x00000040L#define BS_PEN_DOWN_ACTIVE 0x00000080L#define BS_PEN_UP_ACTIVE 0x00000100L#define BS_MULTILINE 0x00000200L#define BS_PEN_DRAG_CMD 0x00000400L#define BS_TRANSPARENT 0x00000800L#define BS_FLAT 0x00001000L//#define BS_REGULAR (BS_BOARD | BS_SHADOW | BS_PEN_UP_CMD | BS_PEN_DOWN_ACTIVE | BS_PEN_UP_ACTIVE )#define BS_REGULAR (BS_SHADOW | BS_PEN_UP_CMD | BS_PEN_DOWN_ACTIVE | BS_PEN_UP_ACTIVE )//#define BS_TOOLBAR (BS_BOARD | BS_PEN_UP_CMD | BS_PEN_DOWN_ACTIVE | BS_PEN_UP_ACTIVE )#define BS_TOOLBAR (BS_SHADOW | BS_PEN_UP_CMD | BS_PEN_DOWN_ACTIVE )#define BS_HYPETEXT (BS_UNDERLINE | BS_LEFT | BS_PEN_DOWN_CMD | BS_PEN_DOWN_ACTIVE | BS_PEN_UP_ACTIVE )#define BS_ICON (BS_PEN_UP_CMD | BS_PEN_DOWN_ACTIVE | BS_PEN_UP_ACTIVE )#define BS_SHELL (BS_PEN_UP_CMD | BS_PEN_DRAG_CMD | BS_PEN_DOWN_CMD)#define BS_BOARD_REGULAR (BS_BOARD | BS_SHADOW | BS_PEN_UP_CMD | BS_PEN_DOWN_ACTIVE | BS_PEN_UP_ACTIVE )/* Scroll Bar Style */#define SBS_HORZ 0x00000001L#define SBS_VERT 0x00000002L/* Menu Style */#define MNS_TEXT 0x00000001L#define MNS_ICON 0x00000002L#define MNS_TRANSPARENT 0x00000004L#define MNS_MID 0x00000008L //ADD by DSA 2004.07.20/* list box style */#define LBS_ROLL 0x00000001L#define LBS_POPUP 0x00000002L/* select bar style */#define SLS_ENABLE 0x00008000L#define SLS_FRAME 0x00000001L#define SLS_CHECKBOX 0x00000002L#define SLS_RADIOBOX 0x00000004L/* Reader Style */#define RDS_ONLYREAD 0x00000001L#define RDS_READ 0x00000002L/* Static Control Styles */#define SS_TEXT 0x00000001L#define SS_ICON 0x00000002L#define SS_BOARD 0x00000004L#define SS_GROUP 0x00000008L#define SS_LEFT 0x00000010L#define SS_RIGHT 0x00000020L#define SS_MULTILINE 0x00000040L#define SS_ALIGN (SS_LEFT | SS_RIGHT)/*#define SS_GRAYRECT 0x00000005L#define SS_WHITERECT 0x00000006L#define SS_BLACKFRAME 0x00000007L#define SS_GRAYFRAME 0x00000008L#define SS_WHITEFRAME 0x00000009L#define SS_SIMPLE 0x0000000BL#define SS_LEFTNOWORDWRAP 0x0000000CL#define SS_NOPREFIX 0x00000080L*//* Editor Control Styles */#define ES_SINGLELINE 0x00000001L#define ES_MULTILINE 0x00000002L#define ES_GROUP1 (ES_SINGLELINE | ES_MULTILINE)#define ES_LEFT 0x00000004L#define ES_CENTER 0x00000008L#define ES_RIGHT 0x00000010L#define ES_GROUP2 (ES_LEFT | ES_CENTER | ES_RIGHT)#define ES_NOBORDER 0x00001000L#define ES_NUMBER 0x00002000L#define ES_READONLY 0x00004000L#define ES_SINGLE_REGULAR ( ES_SINGLELINE | ES_LEFT )#define ES_MULTI_REGULAR ( ES_MULTILINE | ES_LEFT )/* Task Bar Control Styles */#define TBS_TASKMENU 0x00000001L#define TBS_CLOCK 0x00000002L#define TBS_POWER 0x00000004L#define TBS_SIGNAL 0x00000008L#define TBS_TYPICAL ( TBS_TASKMENU | TBS_CLOCK | TBS_POWER | TBS_SIGNAL )#define TBS_REGULAR ( TBS_TASKMENU | TBS_CLOCK )/* ASIX Message*//* NOTE: All messages below 0x0040 are USED by PPSM *//* NOTE: All messages below 0x0400 are RESERVED by ASIX Windows *//* message structure */#ifdef ASIX_ON_PPSMtypedef struct _MSG{ U16 messageType; /* message type */ U16 message; /* message */ U32 lparam; /* long data (32bit) */ P_VOID data; /* associated data, if any */ U16 wparam; /* 16bit data */ U16 reserved; /* for future (broadcast, etc) */} MSG, *PMSG;#endif#ifdef ASIX_ON_PPSM #define ASIX_NONE IRPT_NONE /* no activity */#define ASIX_PEN IRPT_PEN /* pen message */#define ASIX_ICON IRPT_ICON /* icon message */#define ASIX_KEY IRPT_KEY /* soft keyboard */#define ASIX_PAGER IRPT_PAGER /* pager message, system doesn't use this, it can be used by users */#define ASIX_RTC IRPT_RTC /* RTC message */#define ASIX_TIMER IRPT_TIMER /* timer message */#define ASIX_INPUT IRPT_INPUT /* input pad message */#define ASIX_HWR IRPT_HWR /* hand writing recognition */#define ASIX_INPUT_STATUS IRPT_INPUT_STATUS /* input status message */#define ASIX_AUDIO IRPT_AUDIO /* Audio status message */#define ASIX_SPIM IRPT_SPIM /* SPI master message */#define ASIX_SPIS IRPT_SPIS /* SPI Slave message */#define ASIX_IRQ1 IRPT_IRQ1 /* IRQ1 message */#define ASIX_IRQ2 IRPT_IRQ2 /* IRQ2 message */#define ASIX_IRQ3 IRPT_IRQ3 /* IRQ3 message */#define ASIX_IRQ6 IRPT_IRQ6 /* IRQ6 message */#define ASIX_INT IRPT_INT /* INT message */#define ASIX_WDOG IRPT_WDOG /* WatchDog message */#define ASIX_PWM IRPT_PWM /* PWM message */#define ASIX_UART IRPT_UART /* UART data */#define ASIX_USER IRPT_USER#define ASIX_MESSAGE MESSAGE_IRPT
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -