001
002    package com.pax.dal;
003
004    import com.pax.dal.entity.FontInfo;
005    import com.pax.dal.entity.WLLcdCusorPosition;
006    import com.pax.dal.entity.WLLcdDisplaySize;
007    import com.pax.dal.exceptions.WLCustomerDisplayDevException;
008
009    /**
010     *  <div class="zh">如果开启权限检查,需在AndroidManifest下添加权限:"com.pax.permission.LCD"</div>
011     *  <div class="en">If permission check is enabled, you need to add permission under AndroidManifest: "com.pax.permission.LCD".</div>
012     */
013    public interface IWLCustomerDisplay {
014        /**
015         * <div class="zh">初始化客显屏 </div> <div class="en"> Initialize the guest screen. </div>
016         *
017         * @throws WLCustomerDisplayDevException
018         *
019         * @since V4.11.00
020         *
021         */
022        void scrInit()throws WLCustomerDisplayDevException;
023
024        /**
025         * <div class="zh">解除初始化客显屏 </div> <div class="en">Uninitialize the guest screen. </div>
026         *
027         * @throws WLCustomerDisplayDevException
028         *
029         * @since V4.11.00
030         */
031        void scrUninit()throws WLCustomerDisplayDevException;
032
033        /**
034         * <div class="zh">清除指定的一行或若干行,参数不合理时无动作。 </div> <div class="en">Uninitialize the guest screen. </div>
035         *
036         * @param startline
037         *        <div class="zh">开始行数 </div> <div class="en">Start line</div>
038         * @param endline
039         *         <div class="zh">结束行数 </div> <div class="en">End line</div>
040         *
041         * @throws WLCustomerDisplayDevException
042         *
043         * @since V4.11.00
044         */
045        void scrClrLine(byte startline,byte endline)throws WLCustomerDisplayDevException;
046
047        /**
048         * <div class="zh">定位 LCD 显示光标 </div> <div class="en">Position the LCD display cursor. </div>
049         *
050         * @param pixel_X
051         *        <div class="zh">x坐标 </div> <div class="en">x coordinate</div>
052         * @param pixel_Y
053         *         <div class="zh">y坐标 </div> <div class="en">y coordinate</div>
054         *
055         * @throws WLCustomerDisplayDevException
056         *
057         * @since V4.11.00
058         */
059        void scrGotoxyEx(int pixel_X, int pixel_Y)throws WLCustomerDisplayDevException;
060
061        /**
062         * <div class="zh">将光标移到屏幕指定的位置 </div> <div class="en">Moves the cursor to the specified position on the screen. </div>
063         *
064         * @param x
065         *        <div class="zh">x坐标 </div> <div class="en">x coordinate</div>
066         * @param y
067         *         <div class="zh">y坐标 </div> <div class="en">y coordinate</div>
068         *
069         * @throws WLCustomerDisplayDevException
070         *
071         * @since V4.11.00
072         */
073        void scrGotoxy(byte x, byte y)throws WLCustomerDisplayDevException;
074
075        /**
076         * <div class="zh">在屏幕当前位置格式化显示字符串 </div> <div class="en">Format the display string at the current position on the screen. </div>
077         *
078         * @param display
079         *        <div class="zh">显示内容 </div> <div class="en">Display content</div>
080         *
081         * @throws WLCustomerDisplayDevException
082         *
083         * @since V4.11.00
084         */
085        void scrLcdDisplay(String display)throws WLCustomerDisplayDevException;
086
087        /**
088         * <div class="zh">在指定的屏幕位置显示字符串。 </div> <div class="en">Displays a string at the specified screen location. </div>
089         *
090         * @param x
091         *      <div class="zh">x坐标 </div> <div class="en">x coordinate</div>
092         *
093         * @param y
094         *      <div class="zh">y坐标 </div> <div class="en">y coordinate</div>
095         *
096         * @param display
097         *        <div class="zh">显示内容 </div> <div class="en">Display content</div>
098         *
099         * @throws WLCustomerDisplayDevException
100         *
101         * @since V4.11.00
102         */
103        void scrLcdDisplay(int x,int y,String display)throws WLCustomerDisplayDevException;
104
105        /**
106         * <div class="zh">在屏幕指定位置格式化显示字符串 </div> <div class="en">Format the display string at a specified location on the screen </div>
107         *
108         * @param col
109         *      <div class="zh">显示的起始点阵列号 </div> <div class="en">Display starting point array number</div>
110         *
111         * @param row
112         *      <div class="zh">显示的起始行号.注:8个像素点为1行,需要屏幕分辨率看支持显示几行 </div> <div class="en">The start line number displayed. Note: 8 pixels are 1 line, and the screen resolution is required to see how many lines are supported</div>
113         *
114         * @param mode
115         *      <div class="zh">Bit0:字体设置,为0-ASCII字体,1-CFONT 字体;Bit1~Bit6:预留;Bit7:显示属性,0-正常显示,1-反显。 0x00-ASCII/正常显示 ;0x01-CFONT/正常显示; 0x80-ASCII/反显; 0x81-CFONT/反显</div>
116         *      <div class="en">Bit0: Font setting, 0-ASCII font, 1-CFONT font; Bit1~Bit6: reserved; Bit7: Display attribute, 0- normal display, 1- reverse display 0x00-ASCII/ Normal display; 0x01-CFONT/ Normal display; 0x80-ASCII/ reverse display; 0x81-CFONT/ Reverse display.</div>
117         *
118         * @param display
119         *        <div class="zh">显示内容,注:参数col、row超出屏幕范围时,不显示;指定的字体、属性及坐标仅对本函数有效.要显示"%"时,需要2个%号,即"%%" </div> <div class="en">Display content,Note: When the parameters col and row exceed the screen range, they will not be displayed; The specified fonts, properties, and coordinates are valid only for this function. To display "%", you need 2 % signs, i.e. "%%"</div>
120         *
121         * @throws WLCustomerDisplayDevException
122         *
123         * @since V4.11.00
124         */
125        void scrLcdDisplay(byte col,byte row,byte mode,String display)throws WLCustomerDisplayDevException;
126
127        /**
128         * <div class="zh">清除整个屏幕 </div> <div class="en">Clear the entire screen. </div>
129         *
130         * @throws WLCustomerDisplayDevException
131         *
132         * @since V4.11.00
133         */
134        void scrCls()throws WLCustomerDisplayDevException;
135
136        /**
137         * @deprecated <div class="zh">此方法已过时 </div> <div class="en">This method is outdated</div>
138         *
139         * <div class="zh">设置显示屏幕的对比度。 </div> <div class="en">Set the contrast of the display screen. </div>
140         *
141         * @param mode
142         *        <div class="zh">对比度级别[0~7,0最暗,7最亮] </div> <div class="en">Contrast level [0 to 7,0 darkest,7 brightest]</div>
143         *
144         * @throws WLCustomerDisplayDevException
145         *
146         * @since V4.11.00
147         */
148        void scrGray(int mode)throws WLCustomerDisplayDevException;
149
150        /**
151         * <div class="zh">设置屏幕背光 </div> <div class="en">Set the screen backlight. </div>
152         *
153         * @param mode
154         *        <div class="zh">[0~1] 0-灭屏;1-亮屏  </div> <div class="en">[0~1] 0- Off the screen. 1- Light the screen</div>
155         *
156         * @throws WLCustomerDisplayDevException
157         *
158         * @since V4.11.00
159         */
160        void scrBackLight(byte mode)throws WLCustomerDisplayDevException;
161
162        /**
163         * <div class="zh">设置显示属性,正常显示或反白显示 </div> <div class="en">Set display properties, normal display or anti-white display</div>
164         *
165         * @param attr
166         *        <div class="zh">属性值 0:以正常方式显示; 非0:以反白方式显示 </div>
167         *        <div class="en">0: displayed normally; Non-0: Displayed in reverse white mode</div>
168         *
169         * @return  <div class="zh">返回上一次设置的值</div> <div class="en">Returns the last value set</div>
170         *
171         * @throws WLCustomerDisplayDevException
172         *
173         * @since V4.11.00
174         */
175        int scrAttrSet(byte attr)throws WLCustomerDisplayDevException;
176
177        /**
178         * <div class="zh">保存当前的屏幕显示内容或恢复上一次保存的屏幕显示内容 注:该函数不用于保存与恢复图标显示 </div>
179         * <div class="en">Save the current screen display or restore the last saved screen display. Note: This function is not used to save and restore icon display</div>
180         *
181         * @param mode
182         *        <div class="zh">0:保存; >=1:恢复 </div> <div class="en">0: save; >=1: Recovery</div>
183         *
184         * @return
185         *      <div class="zh">0x00 成功; 其它值: 失败(如恢复前没有保存内容)</div>
186         *      <div class="en">0x00 Success; Other value: Failure (e.g. not saving before resuming)</div>
187         *
188         * @throws WLCustomerDisplayDevException
189         *
190         * @since V4.11.00
191         */
192        int scrRestore(byte mode)throws WLCustomerDisplayDevException;
193
194        /**
195         * <div class="zh">读取 LCD 显示区域的大小</div> <div class="en">Read the size of the LCD display area</div>
196         *
197         *
198         * @return  {@link WLLcdDisplaySize}
199         *
200         * @throws WLCustomerDisplayDevException
201         *
202         * @since V4.11.00
203         */
204        WLLcdDisplaySize scrGetLcdSize()throws WLCustomerDisplayDevException;
205
206        /**
207         * <div class="zh">读取LCD上光标的当前位置</div> <div class="en">Read the current position of the cursor on the LCD</div>
208         *
209         *
210         * @return  {@link WLLcdCusorPosition}
211         *
212         * @throws WLCustomerDisplayDevException
213         *
214         * @since V4.11.00
215         */
216        WLLcdCusorPosition scrGetxyEx()throws WLCustomerDisplayDevException;
217
218        /**
219         * <div class="zh">在屏幕指定位置画点。 </div> <div class="en">Draw dots at specified locations on the screen. </div>
220         *
221         * @param x
222         *      <div class="zh">横坐标 </div> <div class="en">Horizontal coordinate</div>
223         *
224         * @param y
225         *      <div class="zh">纵坐标 </div> <div class="en">Vertical coordinate</div>
226         *
227         * @param color
228         *        <div class="zh">指定动作。非0:画点;0:擦点 </div> <div class="en">Specify the action. Non-0: draw points; 0: Rub point</div>
229         *
230         * @throws WLCustomerDisplayDevException
231         *
232         * @since V4.11.00
233         */
234        void scrPlot(byte x, byte y,byte color)throws WLCustomerDisplayDevException;
235
236        /**
237         * <div class="zh">将指定的点阵数据放到显示模块的缓冲区,适合显示 LOGO。 </div>
238         * <div class="en">Put the specified dot matrix data into the buffer of the display module, which is suitable for displaying the LOGO. </div>
239         *
240         * @param logo
241         *        <div class="zh">Logo数据 </div> <div class="en">Logo datat</div>
242         *
243         * @throws WLCustomerDisplayDevException
244         *
245         * @since V4.11.00
246         */
247        void scrDrLogo(byte[] logo)throws WLCustomerDisplayDevException;
248
249        /**
250         * <div class="zh">在指定的坐标处显示LOGO]。 </div>
251         *  <div class="en">Display LOGO at the specified coordinates . </div>
252         *
253         * @param left
254         *      <div class="zh">横坐标 </div> <div class="en">Horizontal coordinate</div>
255         *
256         * @param top
257         *      <div class="zh">纵坐标 </div> <div class="en">Vertical coordinate</div>
258         *
259         * @param logo
260         *        <div class="zh">Logo数据 </div> <div class="en">Logo datat</div>
261         *
262         * @throws WLCustomerDisplayDevException
263         *
264         * @since V4.11.00
265         */
266        void scrDrLogoEx(int left,int top,byte[] logo)throws WLCustomerDisplayDevException;
267
268        /**
269         * <div class="zh">画矩形。 </div> <div class="en">Draw the rectangle. </div>
270         *
271         * @param left
272         *      <div class="zh">左</div> <div class="en">Left</div>
273         *
274         * @param top
275         *      <div class="zh">顶</div> <div class="en">Top</div>
276         *
277         * @param right
278         *        <div class="zh">右</div> <div class="en">Right</div>
279         *
280         * @param bottom
281         *       <div class="zh">底</div> <div class="en">Bottom</div>
282         *
283         * @throws WLCustomerDisplayDevException
284         *
285         * @since V4.11.00
286         */
287        void scrDrawRect(int left,int top,int  right,int bottom)throws WLCustomerDisplayDevException;
288
289        /**
290         * <div class="zh">清除矩形区域的显示信息。</div> <div class="en">Clear the display of the rectangular area. </div>
291         *
292         * @param left
293         *      <div class="zh">左</div> <div class="en">Left</div>
294         *
295         * @param top
296         *      <div class="zh">顶</div> <div class="en">Top</div>
297         *
298         * @param right
299         *        <div class="zh">右</div> <div class="en">Right</div>
300         *
301         * @param bottom
302         *       <div class="zh">底</div> <div class="en">Bottom</div>
303         *
304         * @throws WLCustomerDisplayDevException
305         *
306         * @since V4.11.00
307         */
308        void scrClrRect(int left,int top,int  right,int bottom)throws WLCustomerDisplayDevException;
309
310//        /**
311//         * <div class="zh">选择LCD显示字体</div> <div class="en">Select LCD to display the font</div>
312//         *
313//         *
314//         * @param multiCodeFontAttr   {@link FontInfo}
315//         *
316//         * @param singleCodeFontAttr  {@link FontInfo}
317//         *
318//         * @throws WLCustomerDisplayDevException
319//         *
320//         * @since V4.11.00
321//         */
322//        void scrSelectFont(FontInfo singleCodeFontAttr,FontInfo multiCodeFontAttr)throws WLCustomerDisplayDevException;
323
324        /**
325         * <div class="zh">设置显示的行间距和字间距。</div> <div class="en">Sets the line spacing and word spacing for the display. </div>
326         *
327         * @param charSpace
328         *      <div class="zh">字间距</div> <div class="en">Word spacing</div>
329         *
330         * @param lineSpace
331         *      <div class="zh">行间距</div> <div class="en">Row spacing</div>
332         *
333         * @throws WLCustomerDisplayDevException
334         *
335         * @since V4.11.00
336         */
337        void scrSpaceSet(int charSpace,int lineSpace)throws WLCustomerDisplayDevException;
338    }