~ubuntu-branches/debian/wheezy/cuneiform/wheezy

« back to all changes in this revision

Viewing changes to cuneiform_src/Kern/hhh/rstuff.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-07-10 17:58:10 UTC
  • Revision ID: james.westby@ubuntu.com-20090710175810-rqc89d2i3tki9m89
Tags: upstream-0.7.0+dfsg
Import upstream version 0.7.0+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 1993-2008, Cognitive Technologies
 
3
All rights reserved.
 
4
 
 
5
����������� ��������� ��������������� � ������������� ��� � ���� ��������� ����,
 
6
��� � � �������� �����, � ����������� ��� ���, ��� ���������� ��������� �������:
 
7
 
 
8
      * ��� ��������� ��������������� ��������� ���� ������ ���������� ���������
 
9
        ���� ����������� �� ��������� �����, ���� ������ ������� � �����������
 
10
        ����� �� ��������.
 
11
      * ��� ��������� ��������������� ��������� ���� � ������������ �/��� �
 
12
        ������ ����������, ������������ ��� ���������������, ������ �����������
 
13
        ��������� ���� ���������� �� ��������� �����, ���� ������ ������� �
 
14
        ����������� ����� �� ��������.
 
15
      * �� �������� Cognitive Technologies, �� ����� �� ����������� �� �����
 
16
        ���� ������������ � �������� �������� ��������� �/��� �����������
 
17
        ���������, ���������� �� ���� ��, ��� ���������������� �����������
 
18
        ����������.
 
19
 
 
20
��� ��������� ������������� ����������� ��������� ���� �/��� ������� ������ "���
 
21
��� ����" ��� ������-���� ���� ��������, ���������� ���� ��� ���������������,
 
22
������� �������� ������������ �������� � ����������� ��� ���������� ����, �� ��
 
23
������������� ���. �� �������� ��������� ���� � �� ���� ������ ����, �������
 
24
����� �������� �/��� �������� �������������� ���������, �� � ���� ������ ��
 
25
��Ѩ� ���������������, ������� ����� �����, ���������, ����������� ���
 
26
������������� ������, ��������� � �������������� ��� ���������� ����������
 
27
������������� ������������� ��������� (������� ������ ������, ��� ������,
 
28
������� ���������, ��� ������ �/��� ������ �������, ���������� ��-�� ��������
 
29
������� ��� �/��� ������ ��������� �������� ��������� � ������� �����������,
 
30
�� �� ������������� ����� ��������), �� �� ������������� ���, ���� ���� �����
 
31
�������� ��� ������ ���� ���� �������� � ����������� ����� ������� � ������.
 
32
 
 
33
Redistribution and use in source and binary forms, with or without modification,
 
34
are permitted provided that the following conditions are met:
 
35
 
 
36
    * Redistributions of source code must retain the above copyright notice,
 
37
      this list of conditions and the following disclaimer.
 
38
    * Redistributions in binary form must reproduce the above copyright notice,
 
39
      this list of conditions and the following disclaimer in the documentation
 
40
      and/or other materials provided with the distribution.
 
41
    * Neither the name of the Cognitive Technologies nor the names of its
 
42
      contributors may be used to endorse or promote products derived from this
 
43
      software without specific prior written permission.
 
44
 
 
45
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 
46
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
47
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
48
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
 
49
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
50
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 
51
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 
52
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 
53
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
54
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
55
*/
 
56
 
 
57
/**********  ���������  *******************************************************/
 
58
/*  �����      :  ��������� ��������                                          */
 
59
/*  �����������                                                               */
 
60
/*  � ���������                                                               */
 
61
/*  ������     :  ������� ��������                                            */
 
62
/*  ��������   :  08.06.00                                                    */
 
63
/*  ����       :  'RSTUFF.H'                                                */
 
64
/*  ���������� :  ��������� ����������                                        */
 
65
/*  ���������� :                                                              */
 
66
/*----------------------------------------------------------------------------*/
 
67
//Almi 16.06.00 //Last edit ........
 
68
#ifndef __RSTUFF_H
 
69
#define __RSTUFF_H
 
70
 
 
71
#ifndef __GLOBUS_H
 
72
 #include "globus.h"
 
73
#endif
 
74
 
 
75
#ifndef __PUMA_H
 
76
 #include "puma.h"
 
77
#endif
 
78
 
 
79
#ifdef __RSTUFF__
 
80
  #define RSTUFF_FUNC  FUN_EXPO
 
81
#else
 
82
  #define RSTUFF_FUNC  FUN_IMPO
 
83
#endif
 
84
 
 
85
#ifdef __cplusplus
 
86
        extern "C" {
 
87
#endif
 
88
 
 
89
#pragma pack (push,8)
 
90
/*
 
91
#ifndef Handle
 
92
        #define Handle void *
 
93
#endif
 
94
*/
 
95
///////////////////////////////////////////////////////////////////////////////////////////
 
96
//
 
97
typedef struct tagRSPreProcessImage
 
98
{
 
99
        PWord8  *pgpRecogDIB;
 
100
        Bool32  gbAutoRotate;
 
101
        Bool32  gbDotMatrix;
 
102
        Bool32  gbFax100;
 
103
        Word32  gnLanguage;
 
104
        Word32  gnTables;
 
105
        Handle  hCPAGE;
 
106
        Handle  hDebugCancelSearchPictures;
 
107
        Handle  hDebugCancelComponent;
 
108
        Handle  hDebugCancelTurn;
 
109
        Handle  hDebugCancelSearchLines;
 
110
        Handle  hDebugCancelVerifyLines;
 
111
        Handle  hDebugCancelSearchDotLines;
 
112
        Handle  hDebugCancelRemoveLines;
 
113
        Handle  hDebugCancelSearchTables;
 
114
        Handle  hDebugCancelAutoTemplate;
 
115
        Handle  hDebugEnableSearchSegment;
 
116
        const char ** pglpRecogName;
 
117
        Handle* phCCOM;
 
118
        void *  pinfo;
 
119
        Handle* phLinesCCOM;
 
120
        void *  phCLINE;
 
121
        PBool32 pgneed_clean_line;
 
122
        PInt32  pgnNumberTables;
 
123
        Word32  gnPictures;
 
124
        Bool32* pgrc_line;
 
125
        Rect32  gRectTemplate;
 
126
        FNPUMA_XSetTemplate fnXSetTemplate;
 
127
        FNPUMA_XGetTemplate fnXGetTemplate;
 
128
        char *szLayoutFileName;
 
129
} RSPreProcessImage, *PRSPreProcessImage;
 
130
///////////////////////////////////////////////////////////////////////////////////////////
 
131
//
 
132
typedef struct tagRSCBProgressPoints
 
133
{
 
134
        void *  pProgressStart;
 
135
        void *  pProgressStep;
 
136
        void *  pProgressStepLines;
 
137
        void *  pProgressStepTables;
 
138
        void *  pProgressFinish;
 
139
        void *  pInitPRGTIME;
 
140
        void *  pStorePRGTIME;
 
141
        void *  pRestorePRGTIME;
 
142
        void *  pDonePRGTIME;
 
143
        void *  prexcProgressStep;
 
144
        void *  pDPumaSkipComponent;
 
145
        void *  pDPumaSkipTurn;
 
146
        void *  pSetReturnCode;
 
147
        void *  pGetModulePath;
 
148
        void *  pSetUpdate;
 
149
} RSCBProgressPoints, *PRSCBProgressPoints;
 
150
///////////////////////////////////////////////////////////////////////////////////////////
 
151
RSTUFF_FUNC(Bool32) RSTUFF_Init(Word16 wHeightCode,Handle hStorage);
 
152
RSTUFF_FUNC(Bool32) RSTUFF_Done();
 
153
RSTUFF_FUNC(Word32) RSTUFF_GetReturnCode();
 
154
RSTUFF_FUNC(Int8 *) RSTUFF_GetReturnString(Word32 dwError);
 
155
RSTUFF_FUNC(Bool32) RSTUFF_GetExportData(Word32 dwType, void * pData);
 
156
RSTUFF_FUNC(Bool32) RSTUFF_SetImportData(Word32 dwType, void * pData);
 
157
/////////////////////////////////////////////////////////////
 
158
 
 
159
typedef enum
 
160
{
 
161
                RSTUFF_FN_RSBinarise = 1,
 
162
                RSTUFF_FN_RSNormalise,
 
163
                RSTUFF_FN_RSLayout,
 
164
                                RSTUFF_FN_RSSetSpecPrj
 
165
} RSTUFF_EXPORT_ENTRIES;
 
166
//////////////////////////////////////////////////////////////////////////////////////////////
 
167
//typedef void   (*PRSTUFFCBPRogressStart)(void);
 
168
//typedef Bool32 (*PRSTUFFCBPRogressStep)(Word32);
 
169
//typedef void   (*PRSTUFFCBPRogressFinish)(void);
 
170
//////////////////////////////////////////////////////////////////////////////////////////////
 
171
typedef enum
 
172
{
 
173
                RSTUFF_FN_SetProgresspoints = 128,
 
174
                RSTUFF_FN_SetProgressStart,
 
175
                RSTUFF_FN_SetProgressStep,
 
176
                RSTUFF_FN_SetProgressFinish,
 
177
                RSTUFF_FN_SetInitPRGTIME,
 
178
                RSTUFF_FN_SetDPumaSkipComponent
 
179
} RSTUFF_IMPORT_ENTRIES;
 
180
////////////////////////////////////////////////////////////////////////////////////////////////
 
181
/*  �������� �������  */
 
182
#define DEC_FUN(a,b,c) typedef a (*FNRSTUFF##b)c; RSTUFF_FUNC(a) RSTUFF_##b c
 
183
DEC_FUN(Bool32, RSBinarise,          (void));
 
184
DEC_FUN(Bool32, RSNormalise,         (PRSPreProcessImage,void* vBuff,int Size,void* vWork,int SizeWork));
 
185
DEC_FUN(Bool32, RSNormVerify,        (PRSPreProcessImage));
 
186
DEC_FUN(Bool32, RSNormRemoveLines,   (PRSPreProcessImage));
 
187
DEC_FUN(Bool32, RSLayout,            (PRSPreProcessImage));
 
188
DEC_FUN(Bool32, RSSetSpecPrj,          (Word8 NoSpecPrj));
 
189
#undef DEC_FUN
 
190
 
 
191
 
 
192
#pragma pack (pop)
 
193
 
 
194
#ifdef __cplusplus
 
195
            }
 
196
#endif
 
197
 
 
198
#endif //