tesseract  4.00.00dev
callcpp.h
Go to the documentation of this file.
1 /**********************************************************************
2  * File: callcpp.h
3  * Description: extern C interface calling C++ from C.
4  * Author: Ray Smith
5  * Created: Sun Feb 04 20:39:23 MST 1996
6  *
7  * (C) Copyright 1996, Hewlett-Packard Co.
8  ** Licensed under the Apache License, Version 2.0 (the "License");
9  ** you may not use this file except in compliance with the License.
10  ** You may obtain a copy of the License at
11  ** http://www.apache.org/licenses/LICENSE-2.0
12  ** Unless required by applicable law or agreed to in writing, software
13  ** distributed under the License is distributed on an "AS IS" BASIS,
14  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  ** See the License for the specific language governing permissions and
16  ** limitations under the License.
17  *
18  **********************************************************************/
19 
20 #ifndef CALLCPP_H
21 #define CALLCPP_H
22 
23 #ifndef __UNIX__
24 #include <assert.h>
25 #endif
26 #include "host.h"
27 #include "params.h"
28 #include "unichar.h"
29 
30 class ScrollView;
31 
32 typedef enum {
35  Red,
75  Tan,
81 } C_COL; /*starbase colours */
82 
83 void cprintf ( //Trace printf
84 const char *format, ... //special message
85 );
86 ScrollView *c_create_window( /*create a window */
87  const char *name, /*name/title of window */
88  inT16 xpos, /*coords of window */
89  inT16 ypos, /*coords of window */
90  inT16 xsize, /*size of window */
91  inT16 ysize, /*size of window */
92  double xmin, /*scrolling limits */
93  double xmax, /*to stop users */
94  double ymin, /*getting lost in */
95  double ymax /*empty space */
96  );
97 void c_line_color_index( /*set color */
98  void *win,
99  C_COL index);
100 void c_move( /*move pen */
101  void *win,
102  double x,
103  double y);
104 void c_draw( /*move pen */
105  void *win,
106  double x,
107  double y);
108 void c_make_current( /*move pen */
109  void *win);
110 void c_clear_window( /*move pen */
111  void *win);
112 char window_wait(ScrollView* win);
113 void reverse32(void *ptr);
114 void reverse16(void *ptr);
115 
116 #endif
ScrollView * c_create_window(const char *name, inT16 xpos, inT16 ypos, inT16 xsize, inT16 ysize, double xmin, double xmax, double ymin, double ymax)
Definition: callcpp.cpp:55
Definition: callcpp.h:53
Definition: callcpp.h:79
Definition: callcpp.h:50
Definition: callcpp.h:34
Definition: callcpp.h:33
void reverse32(void *ptr)
Definition: callcpp.cpp:127
Definition: callcpp.h:65
Definition: callcpp.h:38
C_COL
Definition: callcpp.h:32
void c_clear_window(void *win)
Definition: callcpp.cpp:104
Definition: callcpp.h:39
Definition: callcpp.h:36
Definition: callcpp.h:68
Definition: callcpp.h:37
void c_draw(void *win, double x, double y)
Definition: callcpp.cpp:88
int16_t inT16
Definition: host.h:36
Definition: callcpp.h:51
void c_line_color_index(void *win, C_COL index)
Definition: callcpp.cpp:70
void reverse16(void *ptr)
Definition: callcpp.cpp:140
Definition: callcpp.h:66
Definition: callcpp.h:35
void c_move(void *win, double x, double y)
Definition: callcpp.cpp:79
Definition: callcpp.h:78
void cprintf(const char *format,...)
Definition: callcpp.cpp:40
Definition: callcpp.h:64
Definition: callcpp.h:75
Definition: callcpp.h:69
Definition: callcpp.h:67
Definition: callcpp.h:74
Definition: callcpp.h:70
char window_wait(ScrollView *win)
Definition: callcpp.cpp:111
void c_make_current(void *win)
Definition: callcpp.cpp:97