Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / include / fwl / basewidget / fwl_barcode.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FWL_BARCODE_H\r
8 #define _FWL_BARCODE_H\r
9 #include "fwl_edit.h"\r
10 class CFWL_WidgetImpProperties;\r
11 class IFWL_Widget;\r
12 class IFWL_BarcodeDP;\r
13 class IFWL_Barcode;\r
14 #define FWL_CLASS_Barcode                               L"FWL_BARCODE"\r
15 #define FWL_CLASSHASH_Barcode                   366886968\r
16 #define FWL_BCDATTRIBUTE_CHARENCODING           (1L << 0)\r
17 #define FWL_BCDATTRIBUTE_MODULEHEIGHT           (1L << 1)\r
18 #define FWL_BCDATTRIBUTE_MODULEWIDTH            (1L << 2)\r
19 #define FWL_BCDATTRIBUTE_DATALENGTH                     (1L << 3)\r
20 #define FWL_BCDATTRIBUTE_CALCHECKSUM            (1L << 4)\r
21 #define FWL_BCDATTRIBUTE_PRINTCHECKSUM          (1L << 5)\r
22 #define FWL_BCDATTRIBUTE_TEXTLOCATION           (1L << 6)\r
23 #define FWL_BCDATTRIBUTE_WIDENARROWRATIO        (1L << 7)\r
24 #define FWL_BCDATTRIBUTE_STARTCHAR                      (1L << 8)\r
25 #define FWL_BCDATTRIBUTE_ENDCHAR                        (1L << 9)\r
26 #define FWL_BCDATTRIBUTE_VERSION                        (1L << 10)\r
27 #define FWL_BCDATTRIBUTE_ECLEVEL                        (1L << 11)\r
28 #define FWL_BCDATTRIBUTE_TRUNCATED                      (1L << 12)\r
29 #define FWL_PART_BCD_Border                             1\r
30 #define FWL_PART_BCD_Edge                               2\r
31 #define FWL_PART_BCD_Background                 3\r
32 #define FWL_BCUPDATECMD_Data                    FWL_WGTUPDATECMD_User\r
33 class IFWL_BarcodeDP : public IFWL_EditDP\r
34 {\r
35 public:\r
36     virtual BC_CHAR_ENCODING    GetCharEncoding() = 0;\r
37     virtual int32_t                     GetModuleHeight() = 0;\r
38     virtual int32_t                     GetModuleWidth() = 0;\r
39     virtual int32_t                     GetDataLength() = 0;\r
40     virtual int32_t                     GetCalChecksum() = 0;\r
41     virtual FX_BOOL                             GetPrintChecksum() = 0;\r
42     virtual BC_TEXT_LOC                 GetTextLocation() = 0;\r
43     virtual int32_t                     GetWideNarrowRatio() = 0;\r
44     virtual FX_CHAR                             GetStartChar() = 0;\r
45     virtual FX_CHAR                             GetEndChar() = 0;\r
46     virtual int32_t                     GetVersion() = 0;\r
47     virtual int32_t                     GetErrorCorrectionLevel() = 0;\r
48     virtual FX_BOOL                             GetTruncated() = 0;\r
49     virtual FX_DWORD                    GetBarcodeAttributeMask() = 0;\r
50 };\r
51 class IFWL_Barcode : public IFWL_Edit\r
52 {\r
53 public:\r
54     static IFWL_Barcode* Create();\r
55     FWL_ERR             Initialize(IFWL_Widget *pOuter = NULL);\r
56     FWL_ERR             Initialize(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);\r
57     void                SetType(BC_TYPE type);\r
58     FX_BOOL             IsProtectedType();\r
59 protected:\r
60     IFWL_Barcode();\r
61     virtual ~IFWL_Barcode();\r
62 };\r
63 #endif\r