Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtappbuilder / src / abmf / write_cP.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23
24 /*
25  *      $XConsortium: write_cP.h /main/3 1995/11/06 18:18:07 rswiston $
26  *
27  *      @(#)write_cP.h  1.6 16 Feb 1994 cde_app_builder/src/abmf
28  *
29  *      RESTRICTED CONFIDENTIAL INFORMATION:
30  *      
31  *      The information in this document is subject to special
32  *      restrictions in a confidential disclosure agreement between
33  *      HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
34  *      document outside HP, IBM, Sun, USL, SCO, or Univel without
35  *      Sun's specific written approval.  This document and all copies
36  *      and derivative works thereof must be returned or destroyed at
37  *      Sun's request.
38  *
39  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
40  *
41  */
42
43 /*
44  * write_cP.h - generic utilities for writing C output
45  */
46 #ifndef _ABMF_WRITE_CP_H_
47 #define _ABMF_WRITE_CP_H_
48
49 #include "abmfP.h"
50 #include "write_codeP.h"
51
52 typedef enum
53 {
54     ABMF_MODIFY_UNDEF = 0,
55     ABMF_MODIFY_NOT,
56     ABMF_MODIFY_USER_SEGS,
57     ABMF_MODIFY_UNMARKED,
58     ABMF_MODIFY_ANY,
59     ABMF_MODIFY_TYPE_NUM_VALUES
60 } ABMF_MODIFY_TYPE;
61
62 int abmfP_write_c_block_begin(GenCodeInfo genCodeInfo);
63
64 int abmfP_write_c_block_end(GenCodeInfo genCodeInfo);
65
66 int abmfP_write_c_comment(
67                 GenCodeInfo     genCodeInfo,
68                 BOOL            oneLiner,
69                 STRING          comment
70 );
71
72 int abmfP_write_c_func_decl(
73                 GenCodeInfo     genCodeInfo,
74                 BOOL    is_static,
75                 STRING  return_type,
76                 STRING  func_name,
77                 ...                     /* "type", "name", ..., NULL */
78                 );
79
80 int abmfP_write_c_func_begin(
81                 GenCodeInfo     genCodeInfo,
82                 BOOL    is_static,
83                 STRING  return_type,
84                 STRING  func_name,
85                 ...                     /* "type", "name", ..., NULL */
86                 );
87
88 int abmfP_write_c_func_end(
89                 GenCodeInfo, 
90                 STRING return_value
91                 );
92
93 int abmfP_write_c_include(GenCodeInfo, STRING file_name);
94
95 /* wriutes #include "blah" */
96 int abmfP_write_c_local_include(GenCodeInfo, STRING file_name);
97
98 /* writes #include <blah> */
99 int abmfP_write_c_system_include(GenCodeInfo, STRING file_name);
100
101 int abmfP_write_xm_callback_decl(
102                 GenCodeInfo, 
103                 BOOL    is_static,
104                 STRING  func_name
105                 );
106
107 int abmfP_write_xm_callback_begin(
108                 GenCodeInfo, 
109                 BOOL    is_static,
110                 STRING  func_name
111                 );
112
113 int abmfP_write_tooltalk_callback_decl(
114                 GenCodeInfo,
115                 BOOL    is_static,
116                 STRING  func_name
117                 );
118
119 int abmfP_write_session_save_callback_decl(
120                 GenCodeInfo,
121                 BOOL    is_static,
122                 STRING  func_name
123                 );
124
125 int abmfP_write_session_restore_callback_decl(
126                 GenCodeInfo,
127                 BOOL    is_static,
128                 STRING  func_name
129                 );
130
131 int abmfP_write_tooltalk_callback_begin(
132                 GenCodeInfo,
133                 BOOL    is_static,
134                 STRING  func_name
135                 );
136
137
138 int abmfP_write_clear_proc_decl(
139                 GenCodeInfo,
140                 ABObj   obj
141                 );
142
143 int abmfP_write_msg_clear_proc_decl(
144                 GenCodeInfo,
145                 ABObj   obj
146                 );
147
148 int abmfP_write_clear_proc_begin(
149                 GenCodeInfo,
150                 ABObj   obj
151                 );
152
153
154 int abmfP_write_create_proc_decl(
155                 GenCodeInfo,
156                 ABObj   obj
157                 );
158
159 int abmfP_write_create_proc_begin(
160                 GenCodeInfo,
161                 ABObj   obj
162                 );
163
164
165 int abmfP_write_init_proc_decl(
166                 GenCodeInfo,
167                 ABObj   obj
168                 );
169
170 int     abmfP_write_init_proc_begin(
171                 GenCodeInfo,
172                 ABObj   obj
173                 );
174
175 int     abmfP_write_file_header(
176                 GenCodeInfo             genCodeInfo,
177                 STRING                  fileName,
178                 BOOL                    openIfdef,
179                 STRING                  gennedFrom,
180                 STRING                  gennedBy,
181                 ABMF_MODIFY_TYPE        modifyType,
182                 STRING                  description
183         );
184
185 int     abmfP_write_file_footer(
186                         GenCodeInfo     genCodeInfo,
187                         STRING          fileName,
188                         BOOL            closeIfdef
189         );
190
191 /* types */
192 extern STRING   abmfP_str_bool;
193 extern STRING   abmfP_str_int;
194 extern STRING   abmfP_str_string;
195 extern STRING   abmfP_str_void;
196 extern STRING   abmfP_str_void_ptr;
197 extern STRING   abmfP_str_widget;
198 extern STRING   abmfP_str_xtpointer;
199
200 /* common values */
201 extern STRING   abmfP_str_empty;        /* "" */
202 extern STRING   abmfP_str_null;         /* "NULL" */
203 extern STRING   abmfP_str_zero;         /* "0" */
204
205 #endif /* _ABMF_WRITE_CP_H_ */
206