Commit f17f14a5a35876670320d58b802f80d66d707d8b
1 parent
618e246e
Exists in
master
and in
1 other branch
Fixing windows build.
Showing
5 changed files
with
67 additions
and
78 deletions
Show diff stats
src/include/v3270.h
... | ... | @@ -164,27 +164,19 @@ |
164 | 164 | #define v3270char void |
165 | 165 | #endif // v3270_char |
166 | 166 | |
167 | - GtkWidget * v3270_new(void); | |
168 | - | |
169 | - GtkWidget * v3270_new_trace_window(GtkWidget *widget); | |
170 | - | |
171 | - GType v3270_get_type(void); | |
172 | - | |
173 | - void v3270_reload(GtkWidget * widget); | |
174 | - | |
175 | - void v3270_set_font_family(GtkWidget *widget, const gchar *name); | |
176 | - const gchar * v3270_get_font_family(GtkWidget *widget); | |
177 | - | |
178 | - H3270 * v3270_get_session(GtkWidget *widget); | |
179 | - gboolean v3270_is_connected(GtkWidget *widget); | |
180 | - | |
181 | - int v3270_reconnect(GtkWidget *widget); | |
182 | - void v3270_disconnect(GtkWidget *widget); | |
183 | - | |
184 | - int v3270_set_host_charset(GtkWidget *widget, const gchar *name); | |
185 | - | |
186 | - void v3270_set_auto_disconnect(GtkWidget *widget, guint minutes); | |
187 | - guint v3270_get_auto_disconnect(GtkWidget *widget); | |
167 | + LIB3270_EXPORT GtkWidget * v3270_new(void); | |
168 | + LIB3270_EXPORT GtkWidget * v3270_new_trace_window(GtkWidget *widget); | |
169 | + LIB3270_EXPORT GType v3270_get_type(void); | |
170 | + LIB3270_EXPORT void v3270_reload(GtkWidget * widget); | |
171 | + LIB3270_EXPORT void v3270_set_font_family(GtkWidget *widget, const gchar *name); | |
172 | + LIB3270_EXPORT const gchar * v3270_get_font_family(GtkWidget *widget); | |
173 | + LIB3270_EXPORT H3270 * v3270_get_session(GtkWidget *widget); | |
174 | + LIB3270_EXPORT gboolean v3270_is_connected(GtkWidget *widget); | |
175 | + LIB3270_EXPORT int v3270_reconnect(GtkWidget *widget); | |
176 | + LIB3270_EXPORT void v3270_disconnect(GtkWidget *widget); | |
177 | + LIB3270_EXPORT int v3270_set_host_charset(GtkWidget *widget, const gchar *name); | |
178 | + LIB3270_EXPORT void v3270_set_auto_disconnect(GtkWidget *widget, guint minutes); | |
179 | + LIB3270_EXPORT guint v3270_get_auto_disconnect(GtkWidget *widget); | |
188 | 180 | |
189 | 181 | |
190 | 182 | // Clipboard |
... | ... | @@ -196,80 +188,77 @@ |
196 | 188 | V3270_SELECT_MAX |
197 | 189 | } V3270_SELECT_FORMAT; |
198 | 190 | |
199 | - void v3270_copy(GtkWidget *widget, V3270_SELECT_FORMAT mode, gboolean cut); | |
200 | - void v3270_copy_append(GtkWidget *widget); | |
201 | - gchar * v3270_get_selected(GtkWidget *widget, gboolean cut); | |
202 | - gchar * v3270_get_copy(GtkWidget *widget); | |
203 | - void v3270_set_copy(GtkWidget *widget, const gchar *text); | |
191 | + LIB3270_EXPORT void v3270_copy(GtkWidget *widget, V3270_SELECT_FORMAT mode, gboolean cut); | |
192 | + LIB3270_EXPORT void v3270_copy_append(GtkWidget *widget); | |
193 | + LIB3270_EXPORT gchar * v3270_get_selected(GtkWidget *widget, gboolean cut); | |
194 | + LIB3270_EXPORT gchar * v3270_get_copy(GtkWidget *widget); | |
195 | + LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text); | |
204 | 196 | |
205 | -// int v3270_run_script(GtkWidget *widget, const gchar *script); | |
197 | + LIB3270_EXPORT gchar * v3270_get_text(GtkWidget *widget,int offset, int len); | |
198 | + LIB3270_EXPORT gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboolean all); | |
206 | 199 | |
207 | - gchar * v3270_get_text(GtkWidget *widget,int offset, int len); | |
208 | - gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboolean all); | |
209 | - | |
210 | - void v3270_set_string(GtkWidget *widget, const gchar *str); | |
211 | - void v3270_tab(GtkWidget *widget); | |
212 | - void v3270_backtab(GtkWidget *widget); | |
200 | + LIB3270_EXPORT void v3270_set_string(GtkWidget *widget, const gchar *str); | |
201 | + LIB3270_EXPORT void v3270_tab(GtkWidget *widget); | |
202 | + LIB3270_EXPORT void v3270_backtab(GtkWidget *widget); | |
213 | 203 | |
214 | 204 | // Cut & Paste |
215 | - gboolean v3270_get_selection_bounds(GtkWidget *widget, gint *start, gint *end); | |
216 | - void v3270_unselect(GtkWidget *widget); | |
217 | - void v3270_select_all(GtkWidget *widget); | |
218 | - void v3270_paste(GtkWidget *widget); | |
219 | - void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encoding); | |
220 | - void v3270_select_region(GtkWidget *widget, gint start, gint end); | |
205 | + LIB3270_EXPORT gboolean v3270_get_selection_bounds(GtkWidget *widget, gint *start, gint *end); | |
206 | + LIB3270_EXPORT void v3270_unselect(GtkWidget *widget); | |
207 | + LIB3270_EXPORT void v3270_select_all(GtkWidget *widget); | |
208 | + LIB3270_EXPORT void v3270_paste(GtkWidget *widget); | |
209 | + LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encoding); | |
210 | + LIB3270_EXPORT void v3270_select_region(GtkWidget *widget, gint start, gint end); | |
221 | 211 | |
222 | 212 | // Colors |
223 | - void v3270_set_colors(GtkWidget *widget, const gchar *); | |
224 | - void v3270_set_color_table(GdkRGBA *table, const gchar *colors); | |
225 | - const GdkRGBA * v3270_get_color_table(GtkWidget *widget); | |
226 | - void v3270_set_mono_color_table(GdkRGBA *table, const gchar *fg, const gchar *bg); | |
227 | - void v3270_draw_element(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, v3270FontInfo *font, GdkRectangle *rect, GdkRGBA *color); | |
228 | - void v3270_set_color(GtkWidget *widget, enum V3270_COLOR id, GdkRGBA *color); | |
229 | - GdkRGBA * v3270_get_color(GtkWidget *widget, enum V3270_COLOR id); | |
213 | + LIB3270_EXPORT void v3270_set_colors(GtkWidget *widget, const gchar *); | |
214 | + LIB3270_EXPORT void v3270_set_color_table(GdkRGBA *table, const gchar *colors); | |
215 | + LIB3270_EXPORT const GdkRGBA * v3270_get_color_table(GtkWidget *widget); | |
216 | + LIB3270_EXPORT void v3270_set_mono_color_table(GdkRGBA *table, const gchar *fg, const gchar *bg); | |
217 | + LIB3270_EXPORT void v3270_draw_element(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, v3270FontInfo *font, GdkRectangle *rect, GdkRGBA *color); | |
218 | + LIB3270_EXPORT void v3270_set_color(GtkWidget *widget, enum V3270_COLOR id, GdkRGBA *color); | |
219 | + LIB3270_EXPORT GdkRGBA * v3270_get_color(GtkWidget *widget, enum V3270_COLOR id); | |
230 | 220 | |
231 | 221 | // Misc |
232 | - GtkIMContext * v3270_get_im_context(GtkWidget *widget); | |
222 | + LIB3270_EXPORT GtkIMContext * v3270_get_im_context(GtkWidget *widget); | |
233 | 223 | |
234 | - gboolean v3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); | |
235 | - gboolean v3270_set_toggle(GtkWidget *widget, LIB3270_TOGGLE ix, gboolean state); | |
224 | + LIB3270_EXPORT gboolean v3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); | |
225 | + LIB3270_EXPORT gboolean v3270_set_toggle(GtkWidget *widget, LIB3270_TOGGLE ix, gboolean state); | |
236 | 226 | |
237 | - void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type, const gchar *title, const gchar *message, const gchar *text); | |
238 | - const gchar * v3270_get_session_name(GtkWidget *widget); | |
239 | - void v3270_set_session_name(GtkWidget *widget, const gchar *name); | |
240 | - int v3270_set_script(GtkWidget *widget, const gchar id); | |
241 | - void v3270_set_scaled_fonts(GtkWidget *widget, gboolean on); | |
242 | - int v3270_set_session_color_type(GtkWidget *widget, unsigned short colortype); | |
227 | + LIB3270_EXPORT void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type, const gchar *title, const gchar *message, const gchar *text); | |
228 | + LIB3270_EXPORT const gchar * v3270_get_session_name(GtkWidget *widget); | |
229 | + LIB3270_EXPORT void v3270_set_session_name(GtkWidget *widget, const gchar *name); | |
230 | + LIB3270_EXPORT int v3270_set_script(GtkWidget *widget, const gchar id); | |
231 | + LIB3270_EXPORT void v3270_set_scaled_fonts(GtkWidget *widget, gboolean on); | |
232 | + LIB3270_EXPORT int v3270_set_session_color_type(GtkWidget *widget, unsigned short colortype); | |
243 | 233 | |
244 | - int v3270_set_host_type(GtkWidget *widget, LIB3270_HOST_TYPE type); | |
245 | - int v3270_set_host_type_by_name(GtkWidget *widget, const char *name); | |
234 | + LIB3270_EXPORT int v3270_set_host_type(GtkWidget *widget, LIB3270_HOST_TYPE type); | |
235 | + LIB3270_EXPORT int v3270_set_host_type_by_name(GtkWidget *widget, const char *name); | |
246 | 236 | |
247 | - void v3270_set_url(GtkWidget *widget, const gchar *uri); | |
248 | - const gchar * v3270_get_hostname(GtkWidget *widget); | |
249 | - const char * v3270_get_luname(GtkWidget *widget); | |
250 | - GtkWidget * v3270_get_default_widget(void); | |
237 | + LIB3270_EXPORT void v3270_set_url(GtkWidget *widget, const gchar *uri); | |
238 | + LIB3270_EXPORT const gchar * v3270_get_hostname(GtkWidget *widget); | |
239 | + LIB3270_EXPORT const char * v3270_get_luname(GtkWidget *widget); | |
240 | + LIB3270_EXPORT GtkWidget * v3270_get_default_widget(void); | |
251 | 241 | |
252 | - void v3270_set_session_host_type(GtkWidget *widget, LIB3270_HOST_TYPE); | |
242 | + LIB3270_EXPORT void v3270_set_session_host_type(GtkWidget *widget, LIB3270_HOST_TYPE); | |
253 | 243 | |
254 | - void v3270_remap_from_xml(GtkWidget *widget, const gchar *path); | |
244 | + LIB3270_EXPORT void v3270_remap_from_xml(GtkWidget *widget, const gchar *path); | |
255 | 245 | |
256 | 246 | // Keyboard & Mouse special actions |
257 | - gboolean v3270_set_keyboard_action(GtkWidget *widget, const gchar *key_name, GtkAction *action); | |
258 | - void v3270_set_scroll_action(GtkWidget *widget, GdkScrollDirection direction, GtkAction *action); | |
247 | + LIB3270_EXPORT gboolean v3270_set_keyboard_action(GtkWidget *widget, const gchar *key_name, GtkAction *action); | |
248 | + LIB3270_EXPORT void v3270_set_scroll_action(GtkWidget *widget, GdkScrollDirection direction, GtkAction *action); | |
259 | 249 | |
260 | 250 | // SSL & Security |
261 | - const gchar * v3270_get_ssl_status_icon(GtkWidget *widget); | |
262 | - const gchar * v3270_get_ssl_status_text(GtkWidget *widget); | |
263 | - const gchar * v3270_get_ssl_status_message(GtkWidget *widget); | |
264 | - void v3270_popup_security_dialog(GtkWidget *widget); | |
265 | - | |
251 | + LIB3270_EXPORT const gchar * v3270_get_ssl_status_icon(GtkWidget *widget); | |
252 | + LIB3270_EXPORT const gchar * v3270_get_ssl_status_text(GtkWidget *widget); | |
253 | + LIB3270_EXPORT const gchar * v3270_get_ssl_status_message(GtkWidget *widget); | |
254 | + LIB3270_EXPORT void v3270_popup_security_dialog(GtkWidget *widget); | |
266 | 255 | |
267 | 256 | // File transfer |
268 | - gint v3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft); | |
257 | + LIB3270_EXPORT gint v3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft); | |
269 | 258 | |
270 | 259 | // Auxiliary widgets |
271 | - GtkWidget * v3270_host_select_new(GtkWidget *widget); | |
272 | - void v3270_select_host(GtkWidget *widget); | |
260 | + LIB3270_EXPORT GtkWidget * v3270_host_select_new(GtkWidget *widget); | |
261 | + LIB3270_EXPORT void v3270_select_host(GtkWidget *widget); | |
273 | 262 | |
274 | 263 | |
275 | 264 | G_END_DECLS | ... | ... |
src/v3270/colors.c
... | ... | @@ -132,7 +132,7 @@ LIB3270_EXPORT void v3270_set_mono_color_table(GdkRGBA *clr, const gchar *fg, co |
132 | 132 | |
133 | 133 | } |
134 | 134 | |
135 | -void v3270_set_color_table(GdkRGBA *table, const gchar *colors) | |
135 | +LIB3270_EXPORT void v3270_set_color_table(GdkRGBA *table, const gchar *colors) | |
136 | 136 | { |
137 | 137 | gchar **clr; |
138 | 138 | guint cnt; | ... | ... |
src/v3270/draw.c
... | ... | @@ -120,7 +120,7 @@ static void get_element_colors(unsigned short attr, GdkRGBA **fg, GdkRGBA **bg, |
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
123 | -void v3270_draw_element(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, v3270FontInfo *fontInfo, GdkRectangle *rect, GdkRGBA *color) | |
123 | +LIB3270_EXPORT void v3270_draw_element(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, v3270FontInfo *fontInfo, GdkRectangle *rect, GdkRGBA *color) | |
124 | 124 | { |
125 | 125 | GdkRGBA *fg; |
126 | 126 | GdkRGBA *bg; | ... | ... |
src/v3270/font.c
... | ... | @@ -183,7 +183,7 @@ LIB3270_EXPORT const gchar * v3270_get_font_family(GtkWidget *widget) |
183 | 183 | return GTK_V3270(widget)->font.family; |
184 | 184 | } |
185 | 185 | |
186 | -void v3270_set_scaled_fonts(GtkWidget *widget, gboolean on) | |
186 | +LIB3270_EXPORT void v3270_set_scaled_fonts(GtkWidget *widget, gboolean on) | |
187 | 187 | { |
188 | 188 | g_return_if_fail(GTK_IS_V3270(widget)); |
189 | 189 | ... | ... |
src/v3270ft/v3270ft.c
... | ... | @@ -121,7 +121,7 @@ static void local_file_changed(GtkEntry *widget, v3270ft *dialog) { |
121 | 121 | struct v3270ft_entry *entry = v3270ft_get_selected(dialog); |
122 | 122 | |
123 | 123 | if(entry) { |
124 | - strncpy(entry->local,gtk_entry_get_text(widget),sizeof(entry->local)); | |
124 | + strncpy(entry->local,gtk_entry_get_text(widget),sizeof(entry->local)-1); | |
125 | 125 | v3270ft_update_actions(dialog); |
126 | 126 | } |
127 | 127 | |
... | ... | @@ -132,7 +132,7 @@ static void remote_file_changed(GtkEntry *widget, v3270ft *dialog) { |
132 | 132 | struct v3270ft_entry *entry = v3270ft_get_selected(dialog); |
133 | 133 | |
134 | 134 | if(entry) { |
135 | - strncpy(entry->remote,gtk_entry_get_text(widget),sizeof(entry->remote)); | |
135 | + strncpy(entry->remote,gtk_entry_get_text(widget),sizeof(entry->remote)-1); | |
136 | 136 | v3270ft_update_actions(dialog); |
137 | 137 | } |
138 | 138 | ... | ... |