iceWing
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
output.h
Go to the documentation of this file.
1 /* -*- mode: C; tab-width: 4; c-basic-offset: 4; -*- */
2 
3 /*
4  * Author: Frank Loemker
5  *
6  * Copyright (C) 1999-2009
7  * Frank Loemker, Applied Computer Science, Faculty of Technology,
8  * Bielefeld University, Germany
9  *
10  * This file is part of iceWing, a graphical plugin shell.
11  *
12  * iceWing is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * iceWing is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25  */
26 
27 #ifndef iw_output_H
28 #define iw_output_H
29 
30 #include <time.h>
31 #include "region.h"
32 #include "grab.h"
33 
34 /* The typ used in iw_output_hypos() */
35 #define IW_GHYP_TITLE "GestureHyp-Regions"
36 
37 /* Status messages which should be send
38  if something is completed or aborted */
39 #define IW_OUTPUT_STATUS_DONE "DONE"
40 #define IW_OUTPUT_STATUS_CANCEL "CANCEL"
41 
42 extern DACSentry_t *iw_dacs_entry;
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /*********************************************************************
49  Output a SYNC signal on stream 'stream'.
50 *********************************************************************/
51 void iw_output_sync (const char *stream);
52 
53 /*********************************************************************
54  Output 'data' on stream 'stream'.
55 *********************************************************************/
56 void iw_output_stream (const char *stream, const void *data);
57 
58 /*********************************************************************
59  Output img as Bild_t on stream 'stream' (!=NULL) or
60  DACSNAME_images ('stream'==NULL).
61 *********************************************************************/
62 void iw_output_image (const grabImageData *img, const char *stream);
63 
64 /*********************************************************************
65  Output regions as RegionHyp_t on stream 'stream' WITHOUT SYNC
66  (data is entered in the Hypothesenkopf) and return the number of
67  regions given out.
68 *********************************************************************/
69 int iw_output_regions (iwRegion *regions, int nregions,
70  struct timeval time, int img_num, const char *typ,
71  const char *stream);
72 
73 /*********************************************************************
74  Distribute regions as RegionHyp_t on stream 'stream' with time
75  'time' and sequenz_nr 'img_num'.
76 *********************************************************************/
77 void iw_output_hypos (iwRegion *regions, int nregions,
78  struct timeval time, int img_num, const char *stream);
79 
80 /*********************************************************************
81  Output status message msg on stream DACSNAME_status.
82 *********************************************************************/
83 void iw_output_status (const char *msg);
84 
85 /*********************************************************************
86  Register a DACS stream as DACSNAME'suffix' and return a pointer
87  to this newly allocated name.
88 *********************************************************************/
89 char *iw_output_register_stream (const char *suffix, NDRfunction_t *fkt);
90 
91 /*********************************************************************
92  Register a DACS function as DACSNAME'suffix'.
93 *********************************************************************/
94 void iw_output_register_function_with_data (const char *suffix, DACSfunction_t* fkt,
95  NDRfunction_t *ndr_in, NDRfunction_t *ndr_out,
96  void (*out_kill_fkt)(void*), void *data);
97 void iw_output_register_function (const char *suffix, DACSfunction_t* fkt,
98  NDRfunction_t *ndr_in, NDRfunction_t *ndr_out,
99  void (*out_kill_fkt)(void*));
100 
101 /*********************************************************************
102  Register with DACS. The other output_register_...() functions call
103  this by themselves.
104 *********************************************************************/
105 void iw_output_register (void);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* iw_output_H */