⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ui.h

📁 这个是单片机4200的ui程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Copy number increase/decrease */
#define COPY_INCREASE            1
#define COPY_DECREASE            2

/* pressed key mode and time period */
#define KEY_PRESSED_MODE_NORMAL  1
#define KEY_PRESSED_MODE_JUMP    2

#define KEY_PRESSED_PERIOD       150   /* pressing time period to consider as a key in(ms unit) */
#define QUICK_JUMP_PRESSED_TIME  1000  /* ms unit */

/* ob object using flag */
#define UI_JOB_UNUSED         0x00
#define UI_JOB_USED           0x01

/* Job executing state */
#define MY_JOB_EXECUTING      (JOB_EXECUTING_AUTO_ALIGN|JOB_EXECUTING_CLEAN_CAR| \
											JOB_EXECUTING_ALIGN_CAR|JOB_EXECUTING_COPY| \
											JOB_EXECUTING_SCAN)

#define OM_PRT_ERROR_MASK			(0xFFFF)
#define OM_ALL_PH_ERROR	\
	(OM_NO_MONO_PH_ERROR		| OM_NO_COLOR_PH_ERROR		|	\
	 OM_INVALID_MONO_PH_ERROR	| OM_INVALID_COLOR_PH_ERROR	|	\
	 OM_COLOR_IN_MONO_ERROR		| OM_MONO_IN_COLOR_ERROR)





// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                               Type/Structure declaration
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


/* Type definition */
typedef Uint8	UIKeyType;
typedef Uint8	UICommandType;

/* Paper size */
typedef enum 
{
   paperLetter,
   paperA4,
   paperExecutive,
   paperB5,
   paperLegal,
   UI_MAX_PAPER_SIZE
} PaperSize;


/* Setting menu */
typedef enum 
{
   setAutoAlignCartridge=0, 
   setAlignCartridge,      
   setCleanCartridge,      
   setOutputPaperSize,
#if PHOTO_PRINT_ENABLED
   setPhotoSize,
#endif
#ifdef ADF_SUPPORTED
   setgScanSource,
#endif
   setDefault,
#if ENABLE_FIREPULSE_SETTING  // Fire Fulse setting
   setBKPreFireWidth,
   setCLRPreFireWidth,
   setBKFireWidth,
   setCLRFireWidth,
#endif
   setVopuMode,
   UI_MAX_SETTING_TYPE
} SettingType;



/* Operation mode */
typedef enum 
{
   opModeNormal=0, 
   opModeMemoryCard, 
   opModeDPS
} OperationMode;

/* Panel monitor mantained structure */
typedef struct
{
   OperationMode  opMode;        /* operation mode */
   PaperSize      paperSize;     /* paper size selection */
   PrintMediaType paperType;     /* paper type selection */
   ImageModeType  imageType;     /* Source image type */
   PrintQualityType   imageQuality;  /* Copy quality setting */
   ScalingType    scaleType;     /* scaling type */
   Uint32         scaleValue;    /* scaling value of each scalinng type 
                                    range from 25 ~ 400 */ 
   Uint8          brightness;    /* Brightness, 0 ~ 10 -- lighter ~ darker */
   Uint8          copyNo;        /* Number of copies */	
   Uint32         lastTime;      /* Keep last operation time */
   Uint32         lastPressTime; /* Last key pressed time */
   Uint8          pressedKeyMode;/* Pressed key mode */
   UIKeyType      HitKey;        /* Last pressed key code */
   Uint8          alignValue[ALIGNMENT_NO];  /* Alignment value */
   Bool           bUpdateInfo;
   Bool           bSaveMode;
   Bool           bAborted;
   Uint32         uJobStartExecTime;
   Uint32         uTimeoutPeriod;

#if ENABLE_FIREPULSE_SETTING
   Uint32         uBKPreFireWidth[3]; /* Pre fire pulse width */
   Uint32         uCLRPreFireWidth[3]; /* Pre fire pulse width */
   Uint32         uBKFireWidth[3];    /* Fire pulse width */
   Uint32         uCLRFireWidth[3];    /* Fire pulse width */
#endif
#if PHOTO_PRINT_ENABLED
//   e_PhotoSize    ePhotoSize;
#endif
#ifdef ADF_SUPPORTED
   Bool           ScanWithADF;
#endif
} UIMaintainState;


typedef enum
{
	JOB_EXEC_STATE_NORMAL=1,
	JOB_EXEC_STATE_DEV_ERROR
} JobExecState;

typedef enum _eVopuMode {
  eVopuMin,
  eVopuOff,
  eVopuLCD,
  eVopuNTSC,
  eVopuPAL,
  eVopuMax
} eVopuMode;


// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                               Globals
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                               Statics
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                               Prototypes
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// ~~~ export functions declaration ~~~

extern API_RET	UIInit(void);
extern API_RET	UIUpdatePersistInfo(void);
static Sint32	UserInterface(void *argv);
extern Bool		NoJobExecuting(void);
extern void		UISetDefault(void);
extern void		UIDoCopiesSelection(void);
extern API_RET	UIDoScalingSelection(UICommandType* pSubCommand);
extern API_RET	UIDoSettingSelection(UICommandType* pSubCommand);
extern void		UIDoQualitySelection(void);
extern void		UIDoModeSelection(void);
extern void		UIDoBrightnessSelection(void);
extern void		UIDoPaperTypeSelection(void);
extern API_RET	UIDoCopyJob(BOOL bColor);
extern API_RET	UIDoScanJob(void);
extern API_RET	UIDoMemoryCard(UICommandType cmd);
extern API_RET	UIDoCancelJob(void);
extern void		UIDoPower(void);
extern API_RET	UIDoAutoAlignCarJob(void);
extern API_RET	UIDoAlignCartridgeJob(void);
extern API_RET	UIDoCleanCartridgeJob(void);
extern API_RET	UIDoChangeCartridgeJob(void);
extern void		UIDoFirePulseWidthSelection(Uint32 uselKeyState);
extern void		UIDoPaperSizeSelection(Uint32 uselKeyState);
extern void		UIDoVopuModeSelection(Uint32 uselKeyState);
extern API_RET	UISetAlignment(UICommandType* pSubCommand);
extern API_RET	UIDeviceErrorHandling(void);



// ~~~ local functions declaration ~~~



extern void		UICopyNoOut(void);
extern void		UIQualityOut(void); 
extern void		UIModeOut(void);
extern void		UIPaperTypeOut(void);
extern void		UIBrightnessOut(void); 
extern void		UISaveModeInfo(void);
extern void		UIIdleInfo(void);
extern JobExecState	UIUpdateJobInfo(void);
extern void		UpdateDeviceStatus(void);
extern Uint8	UIPassSelectionKey(Uint8 uSpecifyKey, Bool bCheckTimeOut);
extern API_RET	UIGetNextKey(UIKeyType* pkeyType);
extern API_RET	UIGetCommand(UICommandType* pCmdType);
extern API_RET	UICoverStateChange(void);
extern OMERROR	PropertyEvent(OMPROPERTY property, OMLEVEL level, POMVARIANT newValue);
extern void		SetupSubscriptions(void);
extern void		cancelPictBridgePrint(void);
extern API_RET	UIMain();







#if PHOTO_PRINT_ENABLED
extern void UIDoPhotoSizeSelection(Uint32 uselKeyState);
extern Bool MemcardReady(void);
extern e_omCARDINSERTSTATE GetMemcardState(void);
extern int IsPhotoCardIn(void);
extern void OnPhotoCardInsertionEvent(int inout);
extern int StartPhoto(int color, int printAll, int printThumbs);
extern PhotoPrintJob *g_pp_job = NULL;
#endif


#ifdef ADF_SUPPORTED
extern void UIDogScanSourceSelection(Uint32 uselKeyState);
#endif

















// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                               Externs
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


// by Cellming.Chen (2006-08-06)

extern Uint8	gIDcopyJobEnable;
extern Uint8	gCopyAutofitJobEnable;
extern Uint8	gCopyCollateJobEnable;
extern Uint8	gCopy2upJobEnable;
extern Uint8	gCopy2upADFScan;
#if	0
extern Uint8	gCopy2cloneJobEnable;
#else
extern Uint8	gCopyncloneJobEnable;
#endif
extern Uint8	gForceCopySource;
extern FORCECOPYSOURCETYPE	gForceCopy_SourceType;
extern Uint8	gCopyAPPJobEnable;
extern Uint8	gCopyMirrorEnable;
extern Uint8	gScanSource;
extern Uint8	gForceCopyWindow;
extern WINDOW	gForceCSW;

extern Uint8	ADFCopyJobEnable;
extern Uint8	FlatbedCopyJobEnable;





extern void		judge_ScannerSource(JOB * pJob);

extern PAPERSIZEINDEX_COV_LUT	gINDEX_PS;











#endif /* ifndef __UI */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -