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

📄 const.h

📁 一个minigui 工程框架,需要windows 下的minigui 开发环境
💻 H
字号:

#ifndef _CONST_H_
#define _CONST_H_

#define MWINCLUDECOLORS

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>

#include <minigui/common.h>
#include <minigui/minigui.h>
#include <minigui/gdi.h>
#include <minigui/window.h>
#include <minigui/control.h>


// end.
//#include "/home/MicroWindows/microwindows-0.91/src/include/nano-X.h"
//#include "/home/microwindows/src/include/nano-X.h"

// const .

 
#define SB_SIZE  16
#define FILE_DESTROY     0x09
#define SUB_PAGE	0x01
#define MAIN_PAGE	0x00


#define STRING_LEN 100
#define LENGTH_LEN 4
#define TYPEEE_LEN 4
#define OBJECT_LEN 20
#define DATUME_LEN 10
#define BLACKE_STR " "
#define ENTERE_STR "\n"

#define PageSize "PageSize"
#define PageInfo "PageInfo"
#define PageSub "PageSub"
#define PageCreate "PageCreate"
#define PageButton "PageButton"
#define PageBorder "PageBorder"
#define PageImage "PageImage"
#define PageText  "PageText"#define PageLine  "PageLine"#define PageGauge "PageGauge"#define PageClock "PageClock"
#define PageCommunication "PageCommunication"
#define PageVersion "PageVersion"
#define PageThemestyle "PageThemestyle"
#define PageThemeExtend "PageThemeExtend"

#define EMPTY "NULL"
#define EMPTYLONG "__________________________NULL"
#define EMPTYMIDILL "__________NULL"
#define PAGESIZE 0
#define PAGEINFO 1
#define PAGESUB 2
#define PAGECREATE 3
#define PAGEBUTTON 4
#define PAGEBORDER 5
#define PAGEIMAGE 6
#define PAGETEXT 7
#define PAGECOMMUNICATION 8
#define PAGEVERSION 9#define PAGELINE 10#define PAGEGAUGE 11#define PAGECLOCK 12

#define PAGETHEMESTYLE 21
#define PAGETHEMEEXTEND 22

 
// add here.
#define TP_PORT	2009
#define TP_PORT_SEND	2010
#define TP_PORT_RESV	2010


// declare.

struct BUTTONLIST;
struct WININFOLIST;
struct BORDERLIST;
struct IMAGELIST;struct LABELLIST;struct LINELIST;struct GAUGELIST;struct CLOCKLIST;
// base object.
 
#ifndef	FALSE
#define	FALSE	(0)
#endif

#ifndef	TRUE
#define	TRUE	(!FALSE)
#endif
 
typedef enum
{
	CLOCK_TIME,
	TIME_TIME,
	GAUGE_TIME
}eTimeType;

typedef enum 
{
	FEED_NONE,
	FEED_MOMENTARY,
	FEED_TOGGLE,
	FEED_INTERLOCK,
	FEED_DURATION,
	FEED_ORIGINALITY
}eFeedbackType;typedef enum
{
	V_GAUGE,
	H_GAUGE,
	G_GAUGE

}eGaugeType;
typedef enum
{
	DECIMAL_TYPE,
	HEX_TYPE,
	PERCENT_TYPE
}eValueType;
typedef enum 
{
	BUTTON_X,
	BORDER_X,
	IMAGE_X,
	LABEL_X,	LINE_X,	GAUGE_X,	CLOCK_X,
	PAGE_X,
	SUBPAGE_X
}eWidgetType;
 
typedef enum 
{
	Rectangular,
	Elliptical,
	Obround,
	Radius,
	RCorner,
	Diamond
} eShape;
 
typedef enum 
{	
	NOTHING,		
	SHADOW,		
	EXTRUDED
}eBack_Style;
 
typedef enum 
{
	eNone,
		eNeon,
		eRaised
}eFrameStyle;

 
typedef enum  
{
	NONE,
	THIN,
	MEDIUM,
	THICKNESS
}eFrame;
 
typedef enum 
{
	UPPER_LEFT,
	UPPER_CENTER,
	UPPER_RIGHT,
	MIDDLE_LEFT,
	MIDDLE_CENTER,
	MIDDLE_RIGHT,
	LOWER_LEFT,
	LOWER_CENTER,
	LOWER_RIGHT,
	GAUGE_TOP,
	GAUGE_BOTTOM,
	GAUGE_MIDDLE
} eLocation;
 
typedef enum
{
	S2D,

	S3D,

	SHADED
}eFace_Style;
 
 

typedef struct _Point Point;
typedef struct _Point __POINT;
typedef struct _Size Size;
typedef int						BOOL ; 
typedef unsigned long			COLORREF;
typedef unsigned char			BYTE;
typedef long					LONG;
typedef struct _Rect			Rect;
typedef char*					STRING;
typedef struct _WIDGET_LIST*	WidgetList;
typedef struct BUTTONLIST*		ButtonList;
typedef struct BORDERLIST*		BorderList;
typedef struct IMAGELIST*		ImageList;
typedef struct LABELLIST*		LabelList;typedef struct LINELIST*		LineList;typedef struct GAUGELIST*		GaugeList;typedef struct CLOCKLIST*		ClockList;
typedef struct _TextItem		TextItem;
typedef struct _RectItem		RectItem;	
typedef struct _ImageItem		ImageItem;	
typedef char*					LOG_FONT;
typedef struct INDEX			_INDEX;
typedef struct _Miscii		 Miscii;		// 


typedef struct _Page  Page;
typedef struct PAGELIST* PageList;
typedef struct _WinInfo WinInfo;
typedef struct _Button Button;
typedef struct _Border Border;
typedef struct _Image  Image;
typedef struct _Label  Label;typedef struct _Line  Line;typedef struct _Gauge Gauge;typedef struct _Clock Clock;
typedef struct WININFOLIST* WinInfoList ;

 
struct _Rect
{
    LONG    left;
    LONG    top;
    LONG    right;
    LONG    bottom;
};
 

struct _WIDGET_LIST
{
	eWidgetType widget_type;
	void* widget_pointer;
	WidgetList  next;
	int subpage_pos;
};
 
struct BUTTONLIST
{
	Button* button_p;		
	ButtonList next;
};
 
struct BORDERLIST
{
	Border* border_p;
	BorderList next;
};

struct IMAGELIST
{
	Image* image_p;
	ImageList next;
};
struct LINELIST
{
	Line* line_p;
	LineList next;
};
struct LABELLIST
{
	Label* label_p;
	LabelList next;
};struct GAUGELIST
{
	Gauge* gauge_p;
	GaugeList next;
};
 struct CLOCKLIST
{
	Clock* clock_p;
	ClockList next;
};
struct _TextItem{
	STRING m_szContent;	
	LOG_FONT m_LogFont;
	BOOL m_bFring;
	eLocation m_eLocation;	

	unsigned long  m_ulTextColor;	
};
 
struct _ImageItem{	
	STRING  szImageName;
	unsigned long m_ulForeColor;
	unsigned long m_ulBackColor;
	BYTE m_bStatus;
	unsigned long m_ulTransparenceColor;
};

struct _Point{
	long x;
	long y;
};

struct _Size
{
	long cx;
	long cy;
};

struct _RectItem{
	unsigned long m_ulFaceColor;
	unsigned long m_ulFrameColor;
	eFrame m_eFrameThick;
	eFace_Style m_eFaceStyle;	
	Point m_pTopLeft;	
	Point m_pBottomRight;
	eFrameStyle m_eFrameStyle;
	int m_eFrameContrans;

};
 

struct INDEX
{
	int _Length;
	int _Type;
};
 
struct _Miscii{
	int version;
	int mode;
	STRING ip_adress;
	STRING mask_address;

	HWND g_wndMain;

	int m_sleep ;
	int bIdDisplay;
	int m_rfid;
	int m_smartisysid;
	int bOneway;


	int style [2];
	int alpha [2];
	unsigned long color_start[2];
	unsigned long color_end[2];
	int point_start_x[2];
	int point_start_y[2];
	int point_end_x[2];
	int point_end_y[2];

	unsigned long color_margin [2];
	unsigned long color_middle [2];
	int point_marginone_x[2];
	int point_marginone_y[2];
	int point_margintwo_x[2];
	int point_margintwo_y[2];
	
	char* m_Styletheme[2];
	int m_ForPNG[2];


	unsigned long color_image[2];
	unsigned long color_image_active[2];

	int m_switch_two[2];
	int m_switch_three[2];
};
// object.

struct PAGELIST
{
	Page* page_p;
	PageList next;
};
 



// windows info.

struct _WinInfo
{
	int type;		// type.
	HWND id;
	void* obj;		// object.
};


struct WININFOLIST
{
	WinInfo* info_p;
	WinInfoList next;
};


#define CAST_WIDTH 4


#ifdef VERSION_800600
#define WIDTH 800
#define HEIGH 600
#define WIDE 50
#define THINE 20
#else
#define WIDTH 320
#define HEIGH 240
#define WIDE 20
#define THINE 10
#endif


#define TS_GET_CAL	8
#define TS_SET_CAL	9
#define TS_CAL_START	10
#define TS_CAL_END	11
#define TS_SET_TRACE	12
#define TS_GET_PARAM	13
#define TS_GET_RAW	14
#define TS_READ_PARAM 16
#define TS_GET_BOOTMODE 17
#define TS_GET_CPLD 18
#define TS_GET_TOUCHED 19

typedef struct
{
	int vbat;
	int temp0;
	int temp1;
	int auxin;
} TS_PARAM;

typedef struct
{
	int xleft;
	int ytop;
	int xright;
	int ybottom;
	int btracesupport;
} TS_TRACE;

typedef struct 
{
	unsigned short pressure;  // touch pressure
	short x;         // calibrated X
	short y;         // calibrated Y
	unsigned short millisecs; // timestamp of this event
} TS_EVENT;

typedef struct
{
	int xraw;
	int yraw;
	int pendown;
} TS_RAW;

typedef struct 
{
	int xscale;
	int yscale;
	int xrawmax;
	int xrawmin;
	int yrawmax;
	int yrawmin;
	int xyswap;
} TS_CAL;#define FULLCHG_CHK		0x80046701
#define FASTCHG_CHK		0x80046702	
#define POWER_CHK		0x80046703
#define BATTERYFAULT_CHK	0x80046704#define SLEEP_CHK			0x80046705			 // 

#define RING_IOVOLSET	0x40046b01
#define RF_IOSTOP	0x6b02
#define RF_FORBIDANCE	0x6b03
#define RF_ENABLE	0x6b04
#define _LCDCTRL_IOCTL_ON		1
#define _LCDCTRL_IOCTL_OFF		2
#define _LCDCTRL_IOCTL_INTENSITY	3
#define _LCDCTRL_IOCTL_BRIGHTNESS	4
#define _LCDCTRL_IOCTL_CONTRAST		5
#define _LCDCTRL_IOCTL_GET_BRIGHTNESS	6
#define _LCDCTRL_IOCTL_GET_CONTRAST	7
#define _LCDCTRL_IOCTL_GET_INTENSITY	8
#define _LCDCTRL_IOCTL_SET_PARAM	9

extern int debug_flag;


#define TPS_DIGITAL	0x1
#define TPS_ANALOG	0x2	
#define TPS_SERIAL	0x3

#define TPS_ACK		0xAA



#endif//_CONST_H_

⌨️ 快捷键说明

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