Commit 1c6784d9be3dbbf9dee1823c9bad0ed8d30679a2
1 parent
64608d11
Exists in
master
and in
5 other branches
Acertando empacotamento do SDK
Showing
19 changed files
with
249 additions
and
265 deletions
Show diff stats
Makefile.in
| @@ -261,6 +261,8 @@ install-sdk: | @@ -261,6 +261,8 @@ install-sdk: | ||
| 261 | @$(INSTALL_DATA) src/include/lib3270/config.h $(DESTDIR)/$(includedir)/lib3270 | 261 | @$(INSTALL_DATA) src/include/lib3270/config.h $(DESTDIR)/$(includedir)/lib3270 |
| 262 | @$(INSTALL_DATA) src/include/lib3270/selection.h $(DESTDIR)/$(includedir)/lib3270 | 262 | @$(INSTALL_DATA) src/include/lib3270/selection.h $(DESTDIR)/$(includedir)/lib3270 |
| 263 | @$(INSTALL_DATA) src/include/lib3270/popup.h $(DESTDIR)/$(includedir)/lib3270 | 263 | @$(INSTALL_DATA) src/include/lib3270/popup.h $(DESTDIR)/$(includedir)/lib3270 |
| 264 | + @$(INSTALL_DATA) src/include/v3270.h $(DESTDIR)/$(includedir) | ||
| 265 | + @$(INSTALL_DATA) src/include/pw3270.h $(DESTDIR)/$(includedir) | ||
| 264 | @$(MKDIR) $(DESTDIR)/$(libdir)/pkgconfig | 266 | @$(MKDIR) $(DESTDIR)/$(libdir)/pkgconfig |
| 265 | @$(INSTALL_DATA) lib3270.pc $(DESTDIR)/$(libdir)/pkgconfig | 267 | @$(INSTALL_DATA) lib3270.pc $(DESTDIR)/$(libdir)/pkgconfig |
| 266 | @$(INSTALL_DATA) pw3270.pc $(DESTDIR)/$(libdir)/pkgconfig | 268 | @$(INSTALL_DATA) pw3270.pc $(DESTDIR)/$(libdir)/pkgconfig |
pw3270.cbp
| @@ -67,9 +67,9 @@ | @@ -67,9 +67,9 @@ | ||
| 67 | <Unit filename="src/include/lib3270/selection.h" /> | 67 | <Unit filename="src/include/lib3270/selection.h" /> |
| 68 | <Unit filename="src/include/lib3270/session.h" /> | 68 | <Unit filename="src/include/lib3270/session.h" /> |
| 69 | <Unit filename="src/include/lib3270/trace.h" /> | 69 | <Unit filename="src/include/lib3270/trace.h" /> |
| 70 | - <Unit filename="src/include/lib3270/v3270.h" /> | ||
| 71 | <Unit filename="src/include/pw3270.h" /> | 70 | <Unit filename="src/include/pw3270.h" /> |
| 72 | <Unit filename="src/include/rules.mak.in" /> | 71 | <Unit filename="src/include/rules.mak.in" /> |
| 72 | + <Unit filename="src/include/v3270.h" /> | ||
| 73 | <Unit filename="src/lib3270/3270ds.h" /> | 73 | <Unit filename="src/lib3270/3270ds.h" /> |
| 74 | <Unit filename="src/lib3270/Makefile.in" /> | 74 | <Unit filename="src/lib3270/Makefile.in" /> |
| 75 | <Unit filename="src/lib3270/X11keysym.h" /> | 75 | <Unit filename="src/lib3270/X11keysym.h" /> |
pw3270.spec.in
| @@ -161,6 +161,8 @@ rm -rf $RPM_BUILD_ROOT | @@ -161,6 +161,8 @@ rm -rf $RPM_BUILD_ROOT | ||
| 161 | %files -n lib3270-devel | 161 | %files -n lib3270-devel |
| 162 | %defattr(-,root,root) | 162 | %defattr(-,root,root) |
| 163 | %{_includedir}/lib3270.h | 163 | %{_includedir}/lib3270.h |
| 164 | +%{_includedir}/pw3270.h | ||
| 165 | +%{_includedir}/v3270.h | ||
| 164 | %{_includedir}/lib3270 | 166 | %{_includedir}/lib3270 |
| 165 | %{_datadir}/@PACKAGE_NAME@/ui/99debug.xml | 167 | %{_datadir}/@PACKAGE_NAME@/ui/99debug.xml |
| 166 | %{_libdir}/pkgconfig/*.pc | 168 | %{_libdir}/pkgconfig/*.pc |
src/include/lib3270/v3270.h
| @@ -1,193 +0,0 @@ | @@ -1,193 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
| 3 | - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
| 4 | - * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
| 5 | - * | ||
| 6 | - * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
| 7 | - * | ||
| 8 | - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
| 9 | - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
| 10 | - * Free Software Foundation. | ||
| 11 | - * | ||
| 12 | - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
| 13 | - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
| 14 | - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
| 15 | - * obter mais detalhes. | ||
| 16 | - * | ||
| 17 | - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
| 18 | - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
| 19 | - * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 20 | - * | ||
| 21 | - * Este programa está nomeado como v3270.h e possui - linhas de código. | ||
| 22 | - * | ||
| 23 | - * Contatos: | ||
| 24 | - * | ||
| 25 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
| 26 | - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
| 27 | - * licinio@bb.com.br (Licínio Luis Branco) | ||
| 28 | - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
| 29 | - * | ||
| 30 | - */ | ||
| 31 | - | ||
| 32 | -#ifndef V3270_H_INCLUDED | ||
| 33 | - | ||
| 34 | - #include <lib3270/config.h> | ||
| 35 | - #include <lib3270.h> | ||
| 36 | - | ||
| 37 | - #define V3270_H_INCLUDED 1 | ||
| 38 | - | ||
| 39 | - G_BEGIN_DECLS | ||
| 40 | - | ||
| 41 | - #define GTK_TYPE_V3270 (v3270_get_type ()) | ||
| 42 | - #define GTK_V3270(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_V3270, v3270)) | ||
| 43 | - #define GTK_V3270_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_V3270, v3270Class)) | ||
| 44 | - #define GTK_IS_V3270(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_V3270)) | ||
| 45 | - #define GTK_IS_V3270_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_V3270)) | ||
| 46 | - #define GTK_V3270_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_V3270, v3270Class)) | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - typedef struct _v3270 v3270; | ||
| 50 | - typedef struct _v3270Class v3270Class; | ||
| 51 | - | ||
| 52 | - enum V3270_COLOR | ||
| 53 | - { | ||
| 54 | - V3270_COLOR_BACKGROUND, | ||
| 55 | - V3270_COLOR_BLUE, | ||
| 56 | - V3270_COLOR_RED, | ||
| 57 | - V3270_COLOR_PINK, | ||
| 58 | - V3270_COLOR_GREEN, | ||
| 59 | - V3270_COLOR_TURQUOISE, | ||
| 60 | - V3270_COLOR_YELLOW, | ||
| 61 | - V3270_COLOR_WHITE, | ||
| 62 | - V3270_COLOR_BLACK, | ||
| 63 | - V3270_COLOR_DARK_BLUE, | ||
| 64 | - V3270_COLOR_ORANGE, | ||
| 65 | - V3270_COLOR_PURPLE, | ||
| 66 | - V3270_COLOR_DARK_GREEN, | ||
| 67 | - V3270_COLOR_DARK_TURQUOISE, | ||
| 68 | - V3270_COLOR_MUSTARD, | ||
| 69 | - V3270_COLOR_GRAY, | ||
| 70 | - | ||
| 71 | - V3270_COLOR_FIELD, | ||
| 72 | - V3270_COLOR_FIELD_INTENSIFIED, | ||
| 73 | - V3270_COLOR_FIELD_PROTECTED, | ||
| 74 | - V3270_COLOR_FIELD_PROTECTED_INTENSIFIED, | ||
| 75 | - | ||
| 76 | - V3270_COLOR_SELECTED_BG, | ||
| 77 | - V3270_COLOR_SELECTED_FG, | ||
| 78 | - | ||
| 79 | - V3270_COLOR_CROSS_HAIR, | ||
| 80 | - | ||
| 81 | - // Oia Colors (Must be the last block) | ||
| 82 | - V3270_COLOR_OIA_BACKGROUND, | ||
| 83 | - V3270_COLOR_OIA_FOREGROUND, | ||
| 84 | - V3270_COLOR_OIA_SEPARATOR, | ||
| 85 | - V3270_COLOR_OIA_STATUS_OK, | ||
| 86 | - V3270_COLOR_OIA_STATUS_INVALID, | ||
| 87 | - | ||
| 88 | - V3270_COLOR_COUNT | ||
| 89 | - }; | ||
| 90 | - | ||
| 91 | - #define V3270_COLOR_OIA_STATUS_WARNING V3270_COLOR_OIA_STATUS_OK | ||
| 92 | - | ||
| 93 | - typedef enum _v3270_oia_field | ||
| 94 | - { | ||
| 95 | - V3270_OIA_UNDERA, /**< "A" underlined */ | ||
| 96 | - V3270_OIA_CONNECTION, /**< solid box if connected, "?" in a box if not */ | ||
| 97 | - V3270_OIA_MESSAGE, /**< message area */ | ||
| 98 | - V3270_OIA_SSL, /**< SSL Status */ | ||
| 99 | - /**< Meta indication ("M" or blank) */ | ||
| 100 | - V3270_OIA_ALT, /**< Alt indication ("A" or blank) */ | ||
| 101 | - /**< Compose indication ("C" or blank) */ | ||
| 102 | - /**< Compose first character */ | ||
| 103 | - V3270_OIA_SHIFT, /**< Shift Status */ | ||
| 104 | - V3270_OIA_TYPEAHEAD, /**< Typeahead indication ("T" or blank) */ | ||
| 105 | - V3270_OIA_INSERT, /**< Insert mode indication (Special symbol/"I" or blank) */ | ||
| 106 | - V3270_OIA_SCRIPT, /**< Script indication ("S" or blank) */ | ||
| 107 | - V3270_OIA_LUNAME, /**< LU Name */ | ||
| 108 | - V3270_OIA_SPINNER, /**< command timing spinner */ | ||
| 109 | - V3270_OIA_TIMER, /**< command timing (mmm:ss, or blank) */ | ||
| 110 | - V3270_OIA_CURSOR_POSITION, /**< cursor position (rrr/ccc or blank) */ | ||
| 111 | - | ||
| 112 | -// V3270_OIA_CAPS, /**< Caps indication ("A" or blank) */ | ||
| 113 | - | ||
| 114 | -#ifdef X3270_PRINTER | ||
| 115 | - V3270_OIA_PRINTER, /**< Printer indication ("P" or blank) */ | ||
| 116 | -#endif // X3270_PRINTER | ||
| 117 | - | ||
| 118 | - V3270_OIA_FIELD_COUNT | ||
| 119 | - | ||
| 120 | - } V3270_OIA_FIELD; | ||
| 121 | - | ||
| 122 | - | ||
| 123 | - #define V3270_COLOR_OIA_SPINNER V3270_COLOR_OIA_FOREGROUND | ||
| 124 | - #define V3270_COLOR_OIA_LUNAME V3270_COLOR_OIA_FOREGROUND | ||
| 125 | - #define V3270_COLOR_OIA_INSERT V3270_COLOR_OIA_FOREGROUND | ||
| 126 | - | ||
| 127 | - #ifndef v3270char | ||
| 128 | - #define v3270char void | ||
| 129 | - #endif // v3270_char | ||
| 130 | - | ||
| 131 | - LIB3270_EXPORT GtkWidget * v3270_new(void); | ||
| 132 | - LIB3270_EXPORT GType v3270_get_type(void); | ||
| 133 | - | ||
| 134 | - LIB3270_EXPORT void v3270_reload(GtkWidget * widget); | ||
| 135 | - | ||
| 136 | - LIB3270_EXPORT void v3270_set_font_family(GtkWidget *widget, const gchar *name); | ||
| 137 | - LIB3270_EXPORT const gchar * v3270_get_font_family(GtkWidget *widget); | ||
| 138 | - | ||
| 139 | - LIB3270_EXPORT H3270 * v3270_get_session(GtkWidget *widget); | ||
| 140 | - | ||
| 141 | - LIB3270_EXPORT int v3270_connect(GtkWidget *widget, const gchar *host); | ||
| 142 | - LIB3270_EXPORT void v3270_disconnect(GtkWidget *widget); | ||
| 143 | - | ||
| 144 | - // Clipboard | ||
| 145 | - typedef enum _v3270_select_format | ||
| 146 | - { | ||
| 147 | - V3270_SELECT_TEXT, | ||
| 148 | - V3270_SELECT_TABLE, | ||
| 149 | - | ||
| 150 | - V3270_SELECT_MAX | ||
| 151 | - } V3270_SELECT_FORMAT; | ||
| 152 | - | ||
| 153 | - LIB3270_EXPORT const gchar * v3270_copy(GtkWidget *widget, V3270_SELECT_FORMAT mode); | ||
| 154 | - LIB3270_EXPORT const gchar * v3270_copy_append(GtkWidget *widget); | ||
| 155 | - | ||
| 156 | - LIB3270_EXPORT const gchar * v3270_get_selected_text(GtkWidget *widget); | ||
| 157 | - LIB3270_EXPORT const gchar * v3270_get_copy(GtkWidget *widget); | ||
| 158 | - LIB3270_EXPORT gchar * v3270_get_text(GtkWidget *widget,int offset, int len); | ||
| 159 | - LIB3270_EXPORT gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboolean all); | ||
| 160 | - | ||
| 161 | - LIB3270_EXPORT void v3270_set_string(GtkWidget *widget, const gchar *str); | ||
| 162 | - LIB3270_EXPORT void v3270_tab(GtkWidget *widget); | ||
| 163 | - LIB3270_EXPORT void v3270_backtab(GtkWidget *widget); | ||
| 164 | - | ||
| 165 | - // Cut & Paste | ||
| 166 | - LIB3270_EXPORT gboolean v3270_get_selection_bounds(GtkWidget *widget, gint *start, gint *end); | ||
| 167 | - LIB3270_EXPORT void v3270_unselect(GtkWidget *widget); | ||
| 168 | - LIB3270_EXPORT void v3270_paste(GtkWidget *widget); | ||
| 169 | - LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encoding); | ||
| 170 | - LIB3270_EXPORT void v3270_select_region(GtkWidget *widget, gint start, gint end); | ||
| 171 | - | ||
| 172 | - // Colors | ||
| 173 | - LIB3270_EXPORT void v3270_set_colors(GtkWidget *widget, const gchar *); | ||
| 174 | - LIB3270_EXPORT void v3270_set_color_table(GdkColor *table, const gchar *colors); | ||
| 175 | - LIB3270_EXPORT const GdkColor * v3270_get_color_table(GtkWidget *widget); | ||
| 176 | - LIB3270_EXPORT void v3270_set_mono_color_table(GdkColor *table, const gchar *fg, const gchar *bg); | ||
| 177 | - LIB3270_EXPORT void v3270_draw_element(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, guint height, GdkRectangle *rect, GdkColor *color); | ||
| 178 | - LIB3270_EXPORT void v3270_set_color(GtkWidget *widget, enum V3270_COLOR id, GdkColor *color); | ||
| 179 | - LIB3270_EXPORT GdkColor * v3270_get_color(GtkWidget *widget, enum V3270_COLOR id); | ||
| 180 | - | ||
| 181 | - // Misc | ||
| 182 | - LIB3270_EXPORT GtkIMContext * v3270_get_im_context(GtkWidget *widget); | ||
| 183 | - LIB3270_EXPORT gboolean v3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); | ||
| 184 | - LIB3270_EXPORT void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type, const gchar *title, const gchar *message, const gchar *text); | ||
| 185 | - LIB3270_EXPORT const gchar * v3270_get_session_name(GtkWidget *widget); | ||
| 186 | - LIB3270_EXPORT void v3270_set_session_name(GtkWidget *widget, const gchar *name); | ||
| 187 | - | ||
| 188 | - LIB3270_EXPORT void v3270_set_host(GtkWidget *widget, const gchar *uri); | ||
| 189 | - | ||
| 190 | - | ||
| 191 | -G_END_DECLS | ||
| 192 | - | ||
| 193 | -#endif // V3270_H_INCLUDED |
src/include/pw3270.h
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | 18 | * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin |
| 19 | * St, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | * | 20 | * |
| 21 | - * Este programa está nomeado como widget.h e possui - linhas de código. | 21 | + * Este programa está nomeado como pw3270.h e possui - linhas de código. |
| 22 | * | 22 | * |
| 23 | * Contatos: | 23 | * Contatos: |
| 24 | * | 24 | * |
| @@ -26,72 +26,37 @@ | @@ -26,72 +26,37 @@ | ||
| 26 | * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | 26 | * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) |
| 27 | * licinio@bb.com.br (Licínio Luis Branco) | 27 | * licinio@bb.com.br (Licínio Luis Branco) |
| 28 | * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | 28 | * kraucer@bb.com.br (Kraucer Fernandes Mazuco) |
| 29 | - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) | ||
| 30 | * | 29 | * |
| 31 | */ | 30 | */ |
| 32 | 31 | ||
| 33 | - #ifndef PW3270_H_INCLUDED | 32 | +#ifndef PW3270_H_INCLUDED |
| 34 | 33 | ||
| 34 | + #include <gtk/gtk.h> | ||
| 35 | + #include <lib3270/config.h> | ||
| 36 | + #include <lib3270.h> | ||
| 35 | 37 | ||
| 36 | - #define PW3270_H_INCLUDED 1 | 38 | + #define PW3270_H_INCLUDED 1 |
| 37 | 39 | ||
| 38 | - #ifdef _WIN32 | ||
| 39 | - #include <windows.h> | ||
| 40 | - #endif | 40 | + // pw3270 window |
| 41 | + G_BEGIN_DECLS | ||
| 41 | 42 | ||
| 42 | - #include <gtk/gtk.h> | ||
| 43 | - #include <lib3270.h> | 43 | + #define GTK_TYPE_PW3270 (pw3270_get_type ()) |
| 44 | + #define GTK_PW3270(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PW3270, pw3270)) | ||
| 45 | + #define GTK_PW3270_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PW3270, pw3270Class)) | ||
| 46 | + #define GTK_IS_PW3270(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PW3270)) | ||
| 47 | + #define GTK_IS_PW3270_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PW3270)) | ||
| 48 | + #define GTK_PW3270_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PW3270, pw3270Class)) | ||
| 44 | 49 | ||
| 45 | - // Error management | ||
| 46 | - #include <errno.h> | 50 | + typedef struct _pw3270 pw3270; |
| 51 | + typedef struct _pw3270Class pw3270Class; | ||
| 47 | 52 | ||
| 48 | - #ifndef ETIMEDOUT | ||
| 49 | - #define ETIMEDOUT -1238 | ||
| 50 | - #endif | ||
| 51 | 53 | ||
| 52 | - #ifndef ECANCELED | ||
| 53 | - #ifdef EINTR | ||
| 54 | - #define ECANCELED EINTR | ||
| 55 | - #else | ||
| 56 | - #define ECANCELED -1125 | ||
| 57 | - #endif | ||
| 58 | - #endif | 54 | + LIB3270_EXPORT GtkWidget * pw3270_new(const gchar *host); |
| 55 | + LIB3270_EXPORT void pw3270_set_host(GtkWidget *widget, const gchar *uri); | ||
| 56 | + LIB3270_EXPORT gboolean pw3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); | ||
| 57 | + LIB3270_EXPORT H3270 * pw3270_get_session(GtkWidget *widget); | ||
| 58 | + LIB3270_EXPORT GtkWidget * pw3270_get_terminal_widget(GtkWidget *widget); | ||
| 59 | 59 | ||
| 60 | - #ifndef ENOTCONN | ||
| 61 | - #define ENOTCONN -1107 | ||
| 62 | - #endif | ||
| 63 | - | ||
| 64 | - // Windows | ||
| 65 | - #ifdef _WIN32 | ||
| 66 | - | ||
| 67 | - #ifndef WINVER | ||
| 68 | - #define WINVER 0x0501 | ||
| 69 | - #endif | ||
| 70 | - | ||
| 71 | - #ifndef _WIN32_WINNT | ||
| 72 | - #define _WIN32_WINNT WINVER | ||
| 73 | - #endif | ||
| 74 | - | ||
| 75 | - #endif | ||
| 76 | - | ||
| 77 | - // pw3270 window | ||
| 78 | - G_BEGIN_DECLS | ||
| 79 | - | ||
| 80 | - #define GTK_TYPE_PW3270 (pw3270_get_type ()) | ||
| 81 | - #define GTK_PW3270(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PW3270, pw3270)) | ||
| 82 | - #define GTK_PW3270_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PW3270, pw3270Class)) | ||
| 83 | - #define GTK_IS_PW3270(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PW3270)) | ||
| 84 | - #define GTK_IS_PW3270_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PW3270)) | ||
| 85 | - #define GTK_PW3270_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PW3270, pw3270Class)) | ||
| 86 | - | ||
| 87 | - typedef struct _pw3270 pw3270; | ||
| 88 | - typedef struct _pw3270Class pw3270Class; | ||
| 89 | - | ||
| 90 | - | ||
| 91 | - LIB3270_EXPORT GtkWidget * pw3270_new(const gchar *host); | ||
| 92 | - LIB3270_EXPORT void pw3270_set_host(GtkWidget *widget, const gchar *uri); | ||
| 93 | - LIB3270_EXPORT gboolean pw3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); | ||
| 94 | - | ||
| 95 | - G_END_DECLS | 60 | + G_END_DECLS |
| 96 | 61 | ||
| 97 | #endif // PW3270_H_INCLUDED | 62 | #endif // PW3270_H_INCLUDED |
| @@ -0,0 +1,194 @@ | @@ -0,0 +1,194 @@ | ||
| 1 | +/* | ||
| 2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
| 3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
| 4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
| 5 | + * | ||
| 6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
| 7 | + * | ||
| 8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
| 9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
| 10 | + * Free Software Foundation. | ||
| 11 | + * | ||
| 12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
| 13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
| 14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
| 15 | + * obter mais detalhes. | ||
| 16 | + * | ||
| 17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
| 18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
| 19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 20 | + * | ||
| 21 | + * Este programa está nomeado como v3270.h e possui - linhas de código. | ||
| 22 | + * | ||
| 23 | + * Contatos: | ||
| 24 | + * | ||
| 25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
| 26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
| 27 | + * licinio@bb.com.br (Licínio Luis Branco) | ||
| 28 | + * kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
| 29 | + * | ||
| 30 | + */ | ||
| 31 | + | ||
| 32 | +#ifndef V3270_H_INCLUDED | ||
| 33 | + | ||
| 34 | + #include <gtk/gtk.h> | ||
| 35 | + #include <lib3270/config.h> | ||
| 36 | + #include <lib3270.h> | ||
| 37 | + | ||
| 38 | + #define V3270_H_INCLUDED 1 | ||
| 39 | + | ||
| 40 | + G_BEGIN_DECLS | ||
| 41 | + | ||
| 42 | + #define GTK_TYPE_V3270 (v3270_get_type ()) | ||
| 43 | + #define GTK_V3270(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_V3270, v3270)) | ||
| 44 | + #define GTK_V3270_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_V3270, v3270Class)) | ||
| 45 | + #define GTK_IS_V3270(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_V3270)) | ||
| 46 | + #define GTK_IS_V3270_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_V3270)) | ||
| 47 | + #define GTK_V3270_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_V3270, v3270Class)) | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + typedef struct _v3270 v3270; | ||
| 51 | + typedef struct _v3270Class v3270Class; | ||
| 52 | + | ||
| 53 | + enum V3270_COLOR | ||
| 54 | + { | ||
| 55 | + V3270_COLOR_BACKGROUND, | ||
| 56 | + V3270_COLOR_BLUE, | ||
| 57 | + V3270_COLOR_RED, | ||
| 58 | + V3270_COLOR_PINK, | ||
| 59 | + V3270_COLOR_GREEN, | ||
| 60 | + V3270_COLOR_TURQUOISE, | ||
| 61 | + V3270_COLOR_YELLOW, | ||
| 62 | + V3270_COLOR_WHITE, | ||
| 63 | + V3270_COLOR_BLACK, | ||
| 64 | + V3270_COLOR_DARK_BLUE, | ||
| 65 | + V3270_COLOR_ORANGE, | ||
| 66 | + V3270_COLOR_PURPLE, | ||
| 67 | + V3270_COLOR_DARK_GREEN, | ||
| 68 | + V3270_COLOR_DARK_TURQUOISE, | ||
| 69 | + V3270_COLOR_MUSTARD, | ||
| 70 | + V3270_COLOR_GRAY, | ||
| 71 | + | ||
| 72 | + V3270_COLOR_FIELD, | ||
| 73 | + V3270_COLOR_FIELD_INTENSIFIED, | ||
| 74 | + V3270_COLOR_FIELD_PROTECTED, | ||
| 75 | + V3270_COLOR_FIELD_PROTECTED_INTENSIFIED, | ||
| 76 | + | ||
| 77 | + V3270_COLOR_SELECTED_BG, | ||
| 78 | + V3270_COLOR_SELECTED_FG, | ||
| 79 | + | ||
| 80 | + V3270_COLOR_CROSS_HAIR, | ||
| 81 | + | ||
| 82 | + // Oia Colors (Must be the last block) | ||
| 83 | + V3270_COLOR_OIA_BACKGROUND, | ||
| 84 | + V3270_COLOR_OIA_FOREGROUND, | ||
| 85 | + V3270_COLOR_OIA_SEPARATOR, | ||
| 86 | + V3270_COLOR_OIA_STATUS_OK, | ||
| 87 | + V3270_COLOR_OIA_STATUS_INVALID, | ||
| 88 | + | ||
| 89 | + V3270_COLOR_COUNT | ||
| 90 | + }; | ||
| 91 | + | ||
| 92 | + #define V3270_COLOR_OIA_STATUS_WARNING V3270_COLOR_OIA_STATUS_OK | ||
| 93 | + | ||
| 94 | + typedef enum _v3270_oia_field | ||
| 95 | + { | ||
| 96 | + V3270_OIA_UNDERA, /**< "A" underlined */ | ||
| 97 | + V3270_OIA_CONNECTION, /**< solid box if connected, "?" in a box if not */ | ||
| 98 | + V3270_OIA_MESSAGE, /**< message area */ | ||
| 99 | + V3270_OIA_SSL, /**< SSL Status */ | ||
| 100 | + /**< Meta indication ("M" or blank) */ | ||
| 101 | + V3270_OIA_ALT, /**< Alt indication ("A" or blank) */ | ||
| 102 | + /**< Compose indication ("C" or blank) */ | ||
| 103 | + /**< Compose first character */ | ||
| 104 | + V3270_OIA_SHIFT, /**< Shift Status */ | ||
| 105 | + V3270_OIA_TYPEAHEAD, /**< Typeahead indication ("T" or blank) */ | ||
| 106 | + V3270_OIA_INSERT, /**< Insert mode indication (Special symbol/"I" or blank) */ | ||
| 107 | + V3270_OIA_SCRIPT, /**< Script indication ("S" or blank) */ | ||
| 108 | + V3270_OIA_LUNAME, /**< LU Name */ | ||
| 109 | + V3270_OIA_SPINNER, /**< command timing spinner */ | ||
| 110 | + V3270_OIA_TIMER, /**< command timing (mmm:ss, or blank) */ | ||
| 111 | + V3270_OIA_CURSOR_POSITION, /**< cursor position (rrr/ccc or blank) */ | ||
| 112 | + | ||
| 113 | +// V3270_OIA_CAPS, /**< Caps indication ("A" or blank) */ | ||
| 114 | + | ||
| 115 | +#ifdef X3270_PRINTER | ||
| 116 | + V3270_OIA_PRINTER, /**< Printer indication ("P" or blank) */ | ||
| 117 | +#endif // X3270_PRINTER | ||
| 118 | + | ||
| 119 | + V3270_OIA_FIELD_COUNT | ||
| 120 | + | ||
| 121 | + } V3270_OIA_FIELD; | ||
| 122 | + | ||
| 123 | + | ||
| 124 | + #define V3270_COLOR_OIA_SPINNER V3270_COLOR_OIA_FOREGROUND | ||
| 125 | + #define V3270_COLOR_OIA_LUNAME V3270_COLOR_OIA_FOREGROUND | ||
| 126 | + #define V3270_COLOR_OIA_INSERT V3270_COLOR_OIA_FOREGROUND | ||
| 127 | + | ||
| 128 | + #ifndef v3270char | ||
| 129 | + #define v3270char void | ||
| 130 | + #endif // v3270_char | ||
| 131 | + | ||
| 132 | + LIB3270_EXPORT GtkWidget * v3270_new(void); | ||
| 133 | + LIB3270_EXPORT GType v3270_get_type(void); | ||
| 134 | + | ||
| 135 | + LIB3270_EXPORT void v3270_reload(GtkWidget * widget); | ||
| 136 | + | ||
| 137 | + LIB3270_EXPORT void v3270_set_font_family(GtkWidget *widget, const gchar *name); | ||
| 138 | + LIB3270_EXPORT const gchar * v3270_get_font_family(GtkWidget *widget); | ||
| 139 | + | ||
| 140 | + LIB3270_EXPORT H3270 * v3270_get_session(GtkWidget *widget); | ||
| 141 | + | ||
| 142 | + LIB3270_EXPORT int v3270_connect(GtkWidget *widget, const gchar *host); | ||
| 143 | + LIB3270_EXPORT void v3270_disconnect(GtkWidget *widget); | ||
| 144 | + | ||
| 145 | + // Clipboard | ||
| 146 | + typedef enum _v3270_select_format | ||
| 147 | + { | ||
| 148 | + V3270_SELECT_TEXT, | ||
| 149 | + V3270_SELECT_TABLE, | ||
| 150 | + | ||
| 151 | + V3270_SELECT_MAX | ||
| 152 | + } V3270_SELECT_FORMAT; | ||
| 153 | + | ||
| 154 | + LIB3270_EXPORT const gchar * v3270_copy(GtkWidget *widget, V3270_SELECT_FORMAT mode); | ||
| 155 | + LIB3270_EXPORT const gchar * v3270_copy_append(GtkWidget *widget); | ||
| 156 | + | ||
| 157 | + LIB3270_EXPORT const gchar * v3270_get_selected_text(GtkWidget *widget); | ||
| 158 | + LIB3270_EXPORT const gchar * v3270_get_copy(GtkWidget *widget); | ||
| 159 | + LIB3270_EXPORT gchar * v3270_get_text(GtkWidget *widget,int offset, int len); | ||
| 160 | + LIB3270_EXPORT gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboolean all); | ||
| 161 | + | ||
| 162 | + LIB3270_EXPORT void v3270_set_string(GtkWidget *widget, const gchar *str); | ||
| 163 | + LIB3270_EXPORT void v3270_tab(GtkWidget *widget); | ||
| 164 | + LIB3270_EXPORT void v3270_backtab(GtkWidget *widget); | ||
| 165 | + | ||
| 166 | + // Cut & Paste | ||
| 167 | + LIB3270_EXPORT gboolean v3270_get_selection_bounds(GtkWidget *widget, gint *start, gint *end); | ||
| 168 | + LIB3270_EXPORT void v3270_unselect(GtkWidget *widget); | ||
| 169 | + LIB3270_EXPORT void v3270_paste(GtkWidget *widget); | ||
| 170 | + LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encoding); | ||
| 171 | + LIB3270_EXPORT void v3270_select_region(GtkWidget *widget, gint start, gint end); | ||
| 172 | + | ||
| 173 | + // Colors | ||
| 174 | + LIB3270_EXPORT void v3270_set_colors(GtkWidget *widget, const gchar *); | ||
| 175 | + LIB3270_EXPORT void v3270_set_color_table(GdkColor *table, const gchar *colors); | ||
| 176 | + LIB3270_EXPORT const GdkColor * v3270_get_color_table(GtkWidget *widget); | ||
| 177 | + LIB3270_EXPORT void v3270_set_mono_color_table(GdkColor *table, const gchar *fg, const gchar *bg); | ||
| 178 | + LIB3270_EXPORT void v3270_draw_element(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, guint height, GdkRectangle *rect, GdkColor *color); | ||
| 179 | + LIB3270_EXPORT void v3270_set_color(GtkWidget *widget, enum V3270_COLOR id, GdkColor *color); | ||
| 180 | + LIB3270_EXPORT GdkColor * v3270_get_color(GtkWidget *widget, enum V3270_COLOR id); | ||
| 181 | + | ||
| 182 | + // Misc | ||
| 183 | + LIB3270_EXPORT GtkIMContext * v3270_get_im_context(GtkWidget *widget); | ||
| 184 | + LIB3270_EXPORT gboolean v3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); | ||
| 185 | + LIB3270_EXPORT void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type, const gchar *title, const gchar *message, const gchar *text); | ||
| 186 | + LIB3270_EXPORT const gchar * v3270_get_session_name(GtkWidget *widget); | ||
| 187 | + LIB3270_EXPORT void v3270_set_session_name(GtkWidget *widget, const gchar *name); | ||
| 188 | + | ||
| 189 | + LIB3270_EXPORT void v3270_set_host(GtkWidget *widget, const gchar *uri); | ||
| 190 | + | ||
| 191 | + | ||
| 192 | +G_END_DECLS | ||
| 193 | + | ||
| 194 | +#endif // V3270_H_INCLUDED |
src/pw3270/actions.c
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | 31 | ||
| 32 | #include "globals.h" | 32 | #include "globals.h" |
| 33 | #include "uiparser/parser.h" | 33 | #include "uiparser/parser.h" |
| 34 | - #include <lib3270/v3270.h> | 34 | + #include <v3270.h> |
| 35 | #include "filetransfer.h" | 35 | #include "filetransfer.h" |
| 36 | #include <lib3270/actions.h> | 36 | #include <lib3270/actions.h> |
| 37 | #include <lib3270/selection.h> | 37 | #include <lib3270/selection.h> |
src/pw3270/dialog.c
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | #include "globals.h" | 32 | #include "globals.h" |
| 33 | - #include <lib3270/v3270.h> | 33 | + #include <v3270.h> |
| 34 | 34 | ||
| 35 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 35 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
| 36 | 36 |
src/pw3270/globals.h
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | 18 | * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin |
| 19 | * St, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | * | 20 | * |
| 21 | - * Este programa está nomeado como globals.c e possui - linhas de código. | 21 | + * Este programa está nomeado como globals.h e possui - linhas de código. |
| 22 | * | 22 | * |
| 23 | * Contatos: | 23 | * Contatos: |
| 24 | * | 24 | * |
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | #include <glib/gi18n.h> | 37 | #include <glib/gi18n.h> |
| 38 | #include <gtk/gtk.h> | 38 | #include <gtk/gtk.h> |
| 39 | 39 | ||
| 40 | - #include <lib3270/v3270.h> | 40 | + #include <v3270.h> |
| 41 | 41 | ||
| 42 | // Special actions | 42 | // Special actions |
| 43 | enum | 43 | enum |
src/pw3270/main.c
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | #include <glib.h> | 32 | #include <glib.h> |
| 33 | #include <glib/gstdio.h> | 33 | #include <glib/gstdio.h> |
| 34 | #include "globals.h" | 34 | #include "globals.h" |
| 35 | -#include <lib3270/v3270.h> | 35 | +#include <v3270.h> |
| 36 | #include "v3270/accessible.h" | 36 | #include "v3270/accessible.h" |
| 37 | #include <stdlib.h> | 37 | #include <stdlib.h> |
| 38 | 38 |
src/pw3270/print.c
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | #include "globals.h" | 32 | #include "globals.h" |
| 33 | - #include <lib3270/v3270.h> | 33 | + #include <v3270.h> |
| 34 | #include <lib3270/selection.h> | 34 | #include <lib3270/selection.h> |
| 35 | 35 | ||
| 36 | /*--[ Structs ]--------------------------------------------------------------------------------------*/ | 36 | /*--[ Structs ]--------------------------------------------------------------------------------------*/ |
src/pw3270/v3270/accessible.c
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | 38 | ||
| 39 | #include <pw3270.h> | 39 | #include <pw3270.h> |
| 40 | #include <lib3270/log.h> | 40 | #include <lib3270/log.h> |
| 41 | - #include <lib3270/v3270.h> | 41 | + #include <v3270.h> |
| 42 | #include "private.h" | 42 | #include "private.h" |
| 43 | #include "accessible.h" | 43 | #include "accessible.h" |
| 44 | 44 |
src/pw3270/v3270/draw.c
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | #include <pw3270.h> | 32 | #include <pw3270.h> |
| 33 | #include <lib3270.h> | 33 | #include <lib3270.h> |
| 34 | #include <lib3270/session.h> | 34 | #include <lib3270/session.h> |
| 35 | - #include <lib3270/v3270.h> | 35 | + #include <v3270.h> |
| 36 | #include "private.h" | 36 | #include "private.h" |
| 37 | 37 | ||
| 38 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 38 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
src/pw3270/v3270/keyboard.c
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | #include <string.h> | 38 | #include <string.h> |
| 39 | #include <gdk/gdk.h> | 39 | #include <gdk/gdk.h> |
| 40 | 40 | ||
| 41 | - #include <lib3270/v3270.h> | 41 | + #include <v3270.h> |
| 42 | #include "private.h" | 42 | #include "private.h" |
| 43 | 43 | ||
| 44 | #if GTK_CHECK_VERSION(3,0,0) | 44 | #if GTK_CHECK_VERSION(3,0,0) |
src/pw3270/v3270/mouse.c
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | #include <gtk/gtk.h> | 30 | #include <gtk/gtk.h> |
| 31 | #include <gdk/gdk.h> | 31 | #include <gdk/gdk.h> |
| 32 | #include <pw3270.h> | 32 | #include <pw3270.h> |
| 33 | - #include <lib3270/v3270.h> | 33 | + #include <v3270.h> |
| 34 | #include "private.h" | 34 | #include "private.h" |
| 35 | #include <lib3270/selection.h> | 35 | #include <lib3270/selection.h> |
| 36 | #include <lib3270/actions.h> | 36 | #include <lib3270/actions.h> |
src/pw3270/v3270/oia.c
| @@ -34,12 +34,13 @@ | @@ -34,12 +34,13 @@ | ||
| 34 | #include <lib3270/config.h> | 34 | #include <lib3270/config.h> |
| 35 | #include <gtk/gtk.h> | 35 | #include <gtk/gtk.h> |
| 36 | #include <string.h> | 36 | #include <string.h> |
| 37 | + #include <errno.h> | ||
| 37 | 38 | ||
| 38 | #ifdef HAVE_LIBM | 39 | #ifdef HAVE_LIBM |
| 39 | #include <math.h> | 40 | #include <math.h> |
| 40 | #endif // HAVE_LIBM | 41 | #endif // HAVE_LIBM |
| 41 | 42 | ||
| 42 | - #include <lib3270/v3270.h> | 43 | + #include <v3270.h> |
| 43 | #include "private.h" | 44 | #include "private.h" |
| 44 | #include "accessible.h" | 45 | #include "accessible.h" |
| 45 | 46 |
src/pw3270/v3270/selection.c
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | 18 | * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin |
| 19 | * St, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | * | 20 | * |
| 21 | - * Este programa está nomeado como clipboard.c e possui - linhas de código. | 21 | + * Este programa está nomeado como selection.c e possui - linhas de código. |
| 22 | * | 22 | * |
| 23 | * Contatos: | 23 | * Contatos: |
| 24 | * | 24 | * |
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | 29 | ||
| 30 | #include <gtk/gtk.h> | 30 | #include <gtk/gtk.h> |
| 31 | #include <pw3270.h> | 31 | #include <pw3270.h> |
| 32 | - #include <lib3270/v3270.h> | 32 | + #include <v3270.h> |
| 33 | #include "private.h" | 33 | #include "private.h" |
| 34 | #include <lib3270/selection.h> | 34 | #include <lib3270/selection.h> |
| 35 | #include <lib3270/log.h> | 35 | #include <lib3270/log.h> |
src/pw3270/v3270/widget.c
| @@ -33,12 +33,13 @@ | @@ -33,12 +33,13 @@ | ||
| 33 | #include <lib3270/session.h> | 33 | #include <lib3270/session.h> |
| 34 | #include <lib3270/actions.h> | 34 | #include <lib3270/actions.h> |
| 35 | #include <lib3270/log.h> | 35 | #include <lib3270/log.h> |
| 36 | + #include <errno.h> | ||
| 36 | 37 | ||
| 37 | #ifdef HAVE_MALLOC_H | 38 | #ifdef HAVE_MALLOC_H |
| 38 | #include <malloc.h> | 39 | #include <malloc.h> |
| 39 | #endif // HAVE_MALLOC_H | 40 | #endif // HAVE_MALLOC_H |
| 40 | 41 | ||
| 41 | - #include <lib3270/v3270.h> | 42 | + #include <v3270.h> |
| 42 | #include "private.h" | 43 | #include "private.h" |
| 43 | #include "accessible.h" | 44 | #include "accessible.h" |
| 44 | #include "marshal.h" | 45 | #include "marshal.h" |
src/pw3270/window.c
| @@ -199,6 +199,18 @@ | @@ -199,6 +199,18 @@ | ||
| 199 | return v3270_get_toggle(GTK_PW3270(widget)->terminal,ix); | 199 | return v3270_get_toggle(GTK_PW3270(widget)->terminal,ix); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | + H3270 * pw3270_get_session(GtkWidget *widget) | ||
| 203 | + { | ||
| 204 | + g_return_val_if_fail(GTK_IS_PW3270(widget),NULL); | ||
| 205 | + return v3270_get_session(GTK_PW3270(widget)->terminal); | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + GtkWidget * pw3270_get_terminal_widget(GtkWidget *widget) | ||
| 209 | + { | ||
| 210 | + g_return_val_if_fail(GTK_IS_PW3270(widget),NULL); | ||
| 211 | + return GTK_PW3270(widget)->terminal; | ||
| 212 | + } | ||
| 213 | + | ||
| 202 | static void setup_input_method(GtkWidget *widget, GtkWidget *obj) | 214 | static void setup_input_method(GtkWidget *widget, GtkWidget *obj) |
| 203 | { | 215 | { |
| 204 | GtkWidget *menu = gtk_menu_new(); | 216 | GtkWidget *menu = gtk_menu_new(); |