Commit 179483d8ddd02efccedb42d056cd44b338bc2dc7
1 parent
8049a9e4
Exists in
master
and in
1 other branch
Reorganizing sources, moving font properties definition to class.
Showing
11 changed files
with
121 additions
and
193 deletions
Show diff stats
src/dialogs/print/print.c
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | debug("%s",__FUNCTION__); | 44 | debug("%s",__FUNCTION__); |
45 | 45 | ||
46 | if(operation->widget) | 46 | if(operation->widget) |
47 | - g_signal_emit(GTK_WIDGET(operation->widget), v3270_widget_signal[SIGNAL_PRINT_DONE], 0, prt, (guint) result); | 47 | + g_signal_emit(GTK_WIDGET(operation->widget), v3270_widget_signal[V3270_SIGNAL_PRINT_DONE], 0, prt, (guint) result); |
48 | 48 | ||
49 | } | 49 | } |
50 | 50 | ||
@@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
93 | V3270PrintOperation * operation = GTK_V3270_PRINT_OPERATION(prt); | 93 | V3270PrintOperation * operation = GTK_V3270_PRINT_OPERATION(prt); |
94 | 94 | ||
95 | if(operation->widget) | 95 | if(operation->widget) |
96 | - g_signal_emit(operation->widget, v3270_widget_signal[SIGNAL_PRINT_SETUP], 0, prt); | 96 | + g_signal_emit(operation->widget, v3270_widget_signal[V3270_SIGNAL_PRINT_SETUP], 0, prt); |
97 | 97 | ||
98 | // Create dialog | 98 | // Create dialog |
99 | 99 | ||
@@ -151,7 +151,7 @@ | @@ -151,7 +151,7 @@ | ||
151 | debug("%s",__FUNCTION__); | 151 | debug("%s",__FUNCTION__); |
152 | 152 | ||
153 | if(operation->widget) | 153 | if(operation->widget) |
154 | - g_signal_emit(operation->widget, v3270_widget_signal[SIGNAL_PRINT_APPLY], 0, prt); | 154 | + g_signal_emit(operation->widget, v3270_widget_signal[V3270_SIGNAL_PRINT_APPLY], 0, prt); |
155 | 155 | ||
156 | } | 156 | } |
157 | 157 |
src/include/internals.h
@@ -32,6 +32,10 @@ | @@ -32,6 +32,10 @@ | ||
32 | #define V3270_INTERNALS_H_INCLUDED 1 | 32 | #define V3270_INTERNALS_H_INCLUDED 1 |
33 | 33 | ||
34 | #include <config.h> | 34 | #include <config.h> |
35 | + | ||
36 | + #define ENABLE_NLS | ||
37 | + #define GETTEXT_PACKAGE PACKAGE_NAME | ||
38 | + | ||
35 | #include <glib.h> | 39 | #include <glib.h> |
36 | #include <gtk/gtk.h> | 40 | #include <gtk/gtk.h> |
37 | #include <lib3270.h> | 41 | #include <lib3270.h> |
@@ -48,6 +52,42 @@ | @@ -48,6 +52,42 @@ | ||
48 | 52 | ||
49 | G_BEGIN_DECLS | 53 | G_BEGIN_DECLS |
50 | 54 | ||
55 | +/*--[ Signals ]--------------------------------------------------------------------------------------*/ | ||
56 | + | ||
57 | + /// @brief V3270 Signal list | ||
58 | + enum | ||
59 | + { | ||
60 | + V3270_SIGNAL_TOGGLE_CHANGED, | ||
61 | + V3270_SIGNAL_MESSAGE_CHANGED, | ||
62 | + V3270_SIGNAL_KEYPRESS, | ||
63 | + V3270_SIGNAL_CONNECTED, | ||
64 | + V3270_SIGNAL_DISCONNECTED, | ||
65 | + V3270_SIGNAL_UPDATE_CONFIG, | ||
66 | + V3270_SIGNAL_MODEL_CHANGED, | ||
67 | + V3270_SIGNAL_SELECTING, | ||
68 | + V3270_SIGNAL_POPUP, | ||
69 | + V3270_SIGNAL_PASTENEXT, | ||
70 | + V3270_SIGNAL_CLIPBOARD, | ||
71 | + V3270_SIGNAL_CHANGED, | ||
72 | + V3270_SIGNAL_MESSAGE, | ||
73 | + V3270_SIGNAL_FIELD, | ||
74 | + V3270_SIGNAL_PRINT_SETUP, | ||
75 | + V3270_SIGNAL_PRINT_APPLY, | ||
76 | + V3270_SIGNAL_PRINT_DONE, | ||
77 | + V3270_SIGNAL_SESSION_CHANGED, | ||
78 | + | ||
79 | + V3270_SIGNAL_LAST | ||
80 | + }; | ||
81 | + | ||
82 | + G_GNUC_INTERNAL guint v3270_widget_signal[V3270_SIGNAL_LAST]; | ||
83 | + | ||
84 | +/*--[ Constants ]------------------------------------------------------------------------------------*/ | ||
85 | + | ||
86 | + G_GNUC_INTERNAL const gchar * v3270_default_colors; | ||
87 | + G_GNUC_INTERNAL const gchar * v3270_default_font; | ||
88 | + | ||
89 | +/*--[ Internal methods ]-----------------------------------------------------------------------------*/ | ||
90 | + | ||
51 | G_GNUC_INTERNAL void v3270_drag_dest_set(GtkWidget *widget, GCallback callback); | 91 | G_GNUC_INTERNAL void v3270_drag_dest_set(GtkWidget *widget, GCallback callback); |
52 | 92 | ||
53 | G_GNUC_INTERNAL GtkWidget * v3270_box_pack_start(GtkWidget *box, GtkWidget *child, gboolean expand, gboolean fill, guint padding); | 93 | G_GNUC_INTERNAL GtkWidget * v3270_box_pack_start(GtkWidget *box, GtkWidget *child, gboolean expand, gboolean fill, guint padding); |
@@ -160,6 +200,11 @@ | @@ -160,6 +200,11 @@ | ||
160 | G_GNUC_INTERNAL void v3270_disable_updates(GtkWidget *widget); | 200 | G_GNUC_INTERNAL void v3270_disable_updates(GtkWidget *widget); |
161 | G_GNUC_INTERNAL void v3270_enable_updates(GtkWidget *widget); | 201 | G_GNUC_INTERNAL void v3270_enable_updates(GtkWidget *widget); |
162 | 202 | ||
203 | + G_GNUC_INTERNAL void v3270_start_blinking(GtkWidget *widget); | ||
204 | + G_GNUC_INTERNAL void v3270_oia_update_text_field(v3270 *terminal, gboolean flag, V3270_OIA_FIELD id, const gchar chr); | ||
205 | + G_GNUC_INTERNAL cairo_t * v3270_oia_set_update_region(v3270 * terminal, GdkRectangle **r, V3270_OIA_FIELD id); | ||
206 | + G_GNUC_INTERNAL void v3270_install_callbacks(v3270 *widget); | ||
207 | + | ||
163 | // Keyboard & Mouse | 208 | // Keyboard & Mouse |
164 | G_GNUC_INTERNAL gboolean v3270_key_press_event(GtkWidget *widget, GdkEventKey *event); | 209 | G_GNUC_INTERNAL gboolean v3270_key_press_event(GtkWidget *widget, GdkEventKey *event); |
165 | G_GNUC_INTERNAL gboolean v3270_key_release_event(GtkWidget *widget, GdkEventKey *event); | 210 | G_GNUC_INTERNAL gboolean v3270_key_release_event(GtkWidget *widget, GdkEventKey *event); |
src/terminal/callbacks.c
@@ -134,7 +134,7 @@ static void update_toggle(H3270 *session, LIB3270_TOGGLE ix, unsigned char value | @@ -134,7 +134,7 @@ static void update_toggle(H3270 *session, LIB3270_TOGGLE ix, unsigned char value | ||
134 | } | 134 | } |
135 | 135 | ||
136 | g_object_notify_by_pspec(G_OBJECT(widget), v3270_properties.toggle[ix]); | 136 | g_object_notify_by_pspec(G_OBJECT(widget), v3270_properties.toggle[ix]); |
137 | - g_signal_emit(widget, v3270_widget_signal[SIGNAL_TOGGLE_CHANGED], 0, (guint) ix, (gboolean) (value != 0), (gchar *) name); | 137 | + g_signal_emit(widget, v3270_widget_signal[V3270_SIGNAL_TOGGLE_CHANGED], 0, (guint) ix, (gboolean) (value != 0), (gchar *) name); |
138 | 138 | ||
139 | } | 139 | } |
140 | 140 | ||
@@ -145,7 +145,7 @@ static gboolean bg_update_message(H3270 *session) | @@ -145,7 +145,7 @@ static gboolean bg_update_message(H3270 *session) | ||
145 | 145 | ||
146 | g_signal_emit( | 146 | g_signal_emit( |
147 | GTK_WIDGET(widget), | 147 | GTK_WIDGET(widget), |
148 | - v3270_widget_signal[SIGNAL_MESSAGE_CHANGED], | 148 | + v3270_widget_signal[V3270_SIGNAL_MESSAGE_CHANGED], |
149 | 0, | 149 | 0, |
150 | (gint) lib3270_get_program_message(session) | 150 | (gint) lib3270_get_program_message(session) |
151 | ); | 151 | ); |
@@ -218,12 +218,12 @@ static void update_connect(H3270 *session, unsigned char connected) | @@ -218,12 +218,12 @@ static void update_connect(H3270 *session, unsigned char connected) | ||
218 | if(connected) | 218 | if(connected) |
219 | { | 219 | { |
220 | widget->cursor.show |= 2; | 220 | widget->cursor.show |= 2; |
221 | - g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[SIGNAL_CONNECTED], 0, lib3270_get_host(session)); | 221 | + g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[V3270_SIGNAL_CONNECTED], 0, lib3270_get_host(session)); |
222 | } | 222 | } |
223 | else | 223 | else |
224 | { | 224 | { |
225 | widget->cursor.show &= ~2; | 225 | widget->cursor.show &= ~2; |
226 | - g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[SIGNAL_DISCONNECTED], 0); | 226 | + g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[V3270_SIGNAL_DISCONNECTED], 0); |
227 | } | 227 | } |
228 | 228 | ||
229 | if(v3270_properties.online) | 229 | if(v3270_properties.online) |
@@ -245,7 +245,7 @@ static void update_model(H3270 *session, const char *name, int model, G_GNUC_UNU | @@ -245,7 +245,7 @@ static void update_model(H3270 *session, const char *name, int model, G_GNUC_UNU | ||
245 | if(v3270_properties.model) | 245 | if(v3270_properties.model) |
246 | g_object_notify_by_pspec(G_OBJECT(lib3270_get_user_data(session)), v3270_properties.model); | 246 | g_object_notify_by_pspec(G_OBJECT(lib3270_get_user_data(session)), v3270_properties.model); |
247 | 247 | ||
248 | - g_signal_emit(GTK_WIDGET(lib3270_get_user_data(session)),v3270_widget_signal[SIGNAL_MODEL_CHANGED], 0, (guint) model, name); | 248 | + g_signal_emit(GTK_WIDGET(lib3270_get_user_data(session)),v3270_widget_signal[V3270_SIGNAL_MODEL_CHANGED], 0, (guint) model, name); |
249 | } | 249 | } |
250 | 250 | ||
251 | static void changed(H3270 *session, int offset, int len) | 251 | static void changed(H3270 *session, int offset, int len) |
@@ -292,7 +292,7 @@ static void changed(H3270 *session, int offset, int len) | @@ -292,7 +292,7 @@ static void changed(H3270 *session, int offset, int len) | ||
292 | gtk_widget_queue_draw(widget); | 292 | gtk_widget_queue_draw(widget); |
293 | #endif // WIN32 | 293 | #endif // WIN32 |
294 | 294 | ||
295 | - g_signal_emit(GTK_WIDGET(widget),v3270_widget_signal[SIGNAL_CHANGED], 0, (guint) offset, (guint) len); | 295 | + g_signal_emit(GTK_WIDGET(widget),v3270_widget_signal[V3270_SIGNAL_CHANGED], 0, (guint) offset, (guint) len); |
296 | } | 296 | } |
297 | 297 | ||
298 | static void set_selection(H3270 *session, unsigned char status) | 298 | static void set_selection(H3270 *session, unsigned char status) |
@@ -302,7 +302,7 @@ static void set_selection(H3270 *session, unsigned char status) | @@ -302,7 +302,7 @@ static void set_selection(H3270 *session, unsigned char status) | ||
302 | if(v3270_properties.selection) | 302 | if(v3270_properties.selection) |
303 | g_object_notify_by_pspec(G_OBJECT(widget), v3270_properties.selection); | 303 | g_object_notify_by_pspec(G_OBJECT(widget), v3270_properties.selection); |
304 | 304 | ||
305 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_SELECTING], 0, status ? TRUE : FALSE); | 305 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_SELECTING], 0, status ? TRUE : FALSE); |
306 | 306 | ||
307 | } | 307 | } |
308 | 308 | ||
@@ -319,7 +319,7 @@ static void update_selection(H3270 *session, G_GNUC_UNUSED int start, G_GNUC_UNU | @@ -319,7 +319,7 @@ static void update_selection(H3270 *session, G_GNUC_UNUSED int start, G_GNUC_UNU | ||
319 | 319 | ||
320 | static void message(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *text) | 320 | static void message(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *text) |
321 | { | 321 | { |
322 | - g_signal_emit( GTK_WIDGET(lib3270_get_user_data(session)), v3270_widget_signal[SIGNAL_MESSAGE], 0, | 322 | + g_signal_emit( GTK_WIDGET(lib3270_get_user_data(session)), v3270_widget_signal[V3270_SIGNAL_MESSAGE], 0, |
323 | (int) id, | 323 | (int) id, |
324 | (gchar *) title, | 324 | (gchar *) title, |
325 | (gchar *) message, | 325 | (gchar *) message, |
src/terminal/colors.c
@@ -83,7 +83,7 @@ LIB3270_EXPORT void v3270_set_colors(GtkWidget *widget, const gchar *colors) | @@ -83,7 +83,7 @@ LIB3270_EXPORT void v3270_set_colors(GtkWidget *widget, const gchar *colors) | ||
83 | } | 83 | } |
84 | 84 | ||
85 | v3270_set_color_table(GTK_V3270(widget)->color,colors); | 85 | v3270_set_color_table(GTK_V3270(widget)->color,colors); |
86 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_UPDATE_CONFIG], 0, "colors", colors); | 86 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_UPDATE_CONFIG], 0, "colors", colors); |
87 | v3270_reload(widget); | 87 | v3270_reload(widget); |
88 | 88 | ||
89 | } | 89 | } |
src/terminal/font.c
@@ -282,8 +282,8 @@ LIB3270_EXPORT void v3270_set_font_family(GtkWidget *widget, const gchar *name) | @@ -282,8 +282,8 @@ LIB3270_EXPORT void v3270_set_font_family(GtkWidget *widget, const gchar *name) | ||
282 | terminal->font.family = g_strdup(name); | 282 | terminal->font.family = g_strdup(name); |
283 | terminal->font.weight = lib3270_get_toggle(terminal->host,LIB3270_TOGGLE_BOLD) ? CAIRO_FONT_WEIGHT_BOLD : CAIRO_FONT_WEIGHT_NORMAL; | 283 | terminal->font.weight = lib3270_get_toggle(terminal->host,LIB3270_TOGGLE_BOLD) ? CAIRO_FONT_WEIGHT_BOLD : CAIRO_FONT_WEIGHT_NORMAL; |
284 | 284 | ||
285 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_UPDATE_CONFIG], 0, "font-family", name); | ||
286 | - g_object_notify_by_pspec(G_OBJECT(widget), v3270_properties.font_family); | 285 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_UPDATE_CONFIG], 0, "font-family", name); |
286 | + g_object_notify_by_pspec(G_OBJECT(widget), GTK_V3270_GET_CLASS(widget)->properties.font_family); | ||
287 | 287 | ||
288 | v3270_reload(widget); | 288 | v3270_reload(widget); |
289 | gtk_widget_queue_draw(widget); | 289 | gtk_widget_queue_draw(widget); |
src/terminal/keyboard.c
@@ -138,7 +138,7 @@ | @@ -138,7 +138,7 @@ | ||
138 | state &= ~GDK_CONTROL_MASK; | 138 | state &= ~GDK_CONTROL_MASK; |
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | - g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[SIGNAL_KEYPRESS], 0, event->keyval, state, &handled); | 141 | + g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[V3270_SIGNAL_KEYPRESS], 0, event->keyval, state, &handled); |
142 | debug("Keyboard action was %s",handled ? "Handled" : "Not handled"); | 142 | debug("Keyboard action was %s",handled ? "Handled" : "Not handled"); |
143 | if(handled) | 143 | if(handled) |
144 | return TRUE; | 144 | return TRUE; |
src/terminal/mouse.c
@@ -125,7 +125,7 @@ void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event) | @@ -125,7 +125,7 @@ void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event) | ||
125 | 125 | ||
126 | lib3270_get_contents(widget->host,baddr,baddr,&chr,&attr); | 126 | lib3270_get_contents(widget->host,baddr,baddr,&chr,&attr); |
127 | 127 | ||
128 | - g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[SIGNAL_POPUP], 0, | 128 | + g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[V3270_SIGNAL_POPUP], 0, |
129 | (attr & LIB3270_ATTR_SELECTED) ? TRUE : FALSE, | 129 | (attr & LIB3270_ATTR_SELECTED) ? TRUE : FALSE, |
130 | lib3270_connected(widget->host) ? TRUE : FALSE, | 130 | lib3270_connected(widget->host) ? TRUE : FALSE, |
131 | event, | 131 | event, |
@@ -195,7 +195,7 @@ gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event) | @@ -195,7 +195,7 @@ gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event) | ||
195 | { | 195 | { |
196 | gboolean handled = FALSE; | 196 | gboolean handled = FALSE; |
197 | 197 | ||
198 | - g_signal_emit(widget, v3270_widget_signal[SIGNAL_FIELD], 0, | 198 | + g_signal_emit(widget, v3270_widget_signal[V3270_SIGNAL_FIELD], 0, |
199 | lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE, | 199 | lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE, |
200 | GTK_V3270(widget)->oia.selected, | 200 | GTK_V3270(widget)->oia.selected, |
201 | event, | 201 | event, |
src/terminal/private.h
@@ -29,8 +29,7 @@ | @@ -29,8 +29,7 @@ | ||
29 | 29 | ||
30 | #include <config.h> | 30 | #include <config.h> |
31 | 31 | ||
32 | -#define ENABLE_NLS | ||
33 | -#define GETTEXT_PACKAGE PACKAGE_NAME | 32 | +#include <internals.h> |
34 | 33 | ||
35 | #include <libintl.h> | 34 | #include <libintl.h> |
36 | #include <glib/gi18n.h> | 35 | #include <glib/gi18n.h> |
@@ -44,7 +43,15 @@ G_BEGIN_DECLS | @@ -44,7 +43,15 @@ G_BEGIN_DECLS | ||
44 | { | 43 | { |
45 | GtkWidgetClass parent_class; | 44 | GtkWidgetClass parent_class; |
46 | 45 | ||
47 | - /* Signals */ | 46 | + // Internal properties. |
47 | + struct { | ||
48 | + size_t count; // Number of properties. | ||
49 | + | ||
50 | + GParamSpec * font_family; | ||
51 | + | ||
52 | + } properties; | ||
53 | + | ||
54 | + // Signals | ||
48 | void (*activate)(GtkWidget *widget); | 55 | void (*activate)(GtkWidget *widget); |
49 | void (*toggle_changed)(v3270 *widget,LIB3270_TOGGLE toggle_id,gboolean toggle_state,const gchar *toggle_name); | 56 | void (*toggle_changed)(v3270 *widget,LIB3270_TOGGLE toggle_id,gboolean toggle_state,const gchar *toggle_name); |
50 | void (*message_changed)(v3270 *widget, LIB3270_MESSAGE id); | 57 | void (*message_changed)(v3270 *widget, LIB3270_MESSAGE id); |
@@ -62,31 +69,6 @@ G_BEGIN_DECLS | @@ -62,31 +69,6 @@ G_BEGIN_DECLS | ||
62 | #define KEY_FLAG_ALT 0x0002 | 69 | #define KEY_FLAG_ALT 0x0002 |
63 | #endif // !WIN32 | 70 | #endif // !WIN32 |
64 | 71 | ||
65 | - enum | ||
66 | - { | ||
67 | - SIGNAL_TOGGLE_CHANGED, | ||
68 | - SIGNAL_MESSAGE_CHANGED, | ||
69 | - SIGNAL_KEYPRESS, | ||
70 | - SIGNAL_CONNECTED, | ||
71 | - SIGNAL_DISCONNECTED, | ||
72 | - SIGNAL_UPDATE_CONFIG, | ||
73 | - SIGNAL_MODEL_CHANGED, | ||
74 | - SIGNAL_SELECTING, | ||
75 | - SIGNAL_POPUP, | ||
76 | - SIGNAL_PASTENEXT, | ||
77 | - SIGNAL_CLIPBOARD, | ||
78 | - SIGNAL_CHANGED, | ||
79 | - SIGNAL_MESSAGE, | ||
80 | - SIGNAL_FIELD, | ||
81 | - SIGNAL_PRINT_SETUP, | ||
82 | - SIGNAL_PRINT_APPLY, | ||
83 | - SIGNAL_PRINT_DONE, | ||
84 | - SIGNAL_SESSION_CHANGED, | ||
85 | - | ||
86 | - V3270_LAST_SIGNAL | ||
87 | - }; | ||
88 | - | ||
89 | - | ||
90 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 72 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
91 | 73 | ||
92 | struct v3270_ssl_status_msg | 74 | struct v3270_ssl_status_msg |
@@ -186,20 +168,10 @@ G_BEGIN_DECLS | @@ -186,20 +168,10 @@ G_BEGIN_DECLS | ||
186 | 168 | ||
187 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 169 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
188 | 170 | ||
189 | - G_GNUC_INTERNAL guint v3270_widget_signal[V3270_LAST_SIGNAL]; | ||
190 | G_GNUC_INTERNAL GdkCursor * v3270_cursor[LIB3270_POINTER_COUNT]; | 171 | G_GNUC_INTERNAL GdkCursor * v3270_cursor[LIB3270_POINTER_COUNT]; |
191 | - G_GNUC_INTERNAL const gchar * v3270_default_colors; | ||
192 | - G_GNUC_INTERNAL const gchar * v3270_default_font; | ||
193 | - G_GNUC_INTERNAL void v3270_start_blinking(GtkWidget *widget); | ||
194 | - | ||
195 | - G_GNUC_INTERNAL void v3270_oia_update_text_field(v3270 *terminal, gboolean flag, V3270_OIA_FIELD id, const gchar chr); | ||
196 | - G_GNUC_INTERNAL cairo_t * v3270_oia_set_update_region(v3270 * terminal, GdkRectangle **r, V3270_OIA_FIELD id); | ||
197 | - | ||
198 | - G_GNUC_INTERNAL void v3270_install_callbacks(v3270 *widget); | ||
199 | 172 | ||
200 | G_GNUC_INTERNAL struct _v3270_properties | 173 | G_GNUC_INTERNAL struct _v3270_properties |
201 | { | 174 | { |
202 | - size_t count; // Number of properties. | ||
203 | GParamSpec * toggle[LIB3270_TOGGLE_COUNT]; // Toggle properties. | 175 | GParamSpec * toggle[LIB3270_TOGGLE_COUNT]; // Toggle properties. |
204 | 176 | ||
205 | struct | 177 | struct |
@@ -210,8 +182,10 @@ G_BEGIN_DECLS | @@ -210,8 +182,10 @@ G_BEGIN_DECLS | ||
210 | guint str; | 182 | guint str; |
211 | } type; | 183 | } type; |
212 | 184 | ||
185 | + /* | ||
213 | // V3270 Internal properties. | 186 | // V3270 Internal properties. |
214 | GParamSpec * font_family; | 187 | GParamSpec * font_family; |
188 | + */ | ||
215 | 189 | ||
216 | // Properties who launch signals. | 190 | // Properties who launch signals. |
217 | GParamSpec * online; | 191 | GParamSpec * online; |
@@ -221,96 +195,4 @@ G_BEGIN_DECLS | @@ -221,96 +195,4 @@ G_BEGIN_DECLS | ||
221 | 195 | ||
222 | } v3270_properties; | 196 | } v3270_properties; |
223 | 197 | ||
224 | - | ||
225 | -/*--[ Prototipes ]-----------------------------------------------------------------------------------*/ | ||
226 | - | ||
227 | -/* | ||
228 | -const GtkWidgetClass * v3270_get_parent_class(void); | ||
229 | - | ||
230 | -G_GNUC_INTERNAL gboolean v3270_draw(GtkWidget * widget, cairo_t * cr); | ||
231 | -G_GNUC_INTERNAL void v3270_cursor_draw(v3270 *widget); | ||
232 | - | ||
233 | -G_GNUC_INTERNAL void v3270_draw_oia(v3270 *terminal, cairo_t *cr, int row, int cols); | ||
234 | -G_GNUC_INTERNAL void v3270_update_mouse_pointer(GtkWidget *widget); | ||
235 | - | ||
236 | -G_GNUC_INTERNAL AtkObject * v3270_get_accessible(GtkWidget * widget); | ||
237 | - | ||
238 | -#if ! GTK_CHECK_VERSION(2,18,0) | ||
239 | - G_GNUC_INTERNAL void gtk_widget_get_allocation(GtkWidget *widget,GtkAllocation *allocation); | ||
240 | -#endif // !GTK(2,18) | ||
241 | - | ||
242 | -#if ! GTK_CHECK_VERSION(2,20,0) | ||
243 | - #define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED(w) | ||
244 | - #define gtk_widget_set_realized(w,r) if(r) { GTK_WIDGET_SET_FLAGS(w,GTK_REALIZED); } else { GTK_WIDGET_UNSET_FLAGS(w,GTK_REALIZED); } | ||
245 | -#endif // !GTK(2,20) | ||
246 | - | ||
247 | -#if ! GTK_CHECK_VERSION(2,22,0) | ||
248 | - #define gtk_accessible_set_widget(a,w) g_object_set_data(G_OBJECT(a),"widget",w) | ||
249 | - #define gtk_accessible_get_widget(a) GTK_WIDGET(g_object_get_data(G_OBJECT(a),"widget")) | ||
250 | - | ||
251 | - G_GNUC_INTERNAL cairo_surface_t * gdk_window_create_similar_surface(GdkWindow *window, cairo_content_t content, int width, int height); | ||
252 | - | ||
253 | -#endif // !GTK(2,22) | ||
254 | - | ||
255 | - | ||
256 | -#if ! GTK_CHECK_VERSION(3,0,0) | ||
257 | -gboolean v3270_expose(GtkWidget * widget, GdkEventExpose *event); | ||
258 | -#endif // GTK 3 | ||
259 | - | ||
260 | -G_GNUC_INTERNAL void v3270_draw_shift_status(v3270 *terminal); | ||
261 | -G_GNUC_INTERNAL void v3270_draw_alt_status(v3270 *terminal); | ||
262 | -G_GNUC_INTERNAL void v3270_draw_ins_status(v3270 *terminal); | ||
263 | - | ||
264 | -G_GNUC_INTERNAL void v3270_clear_clipboard(v3270 *terminal); | ||
265 | - | ||
266 | -G_GNUC_INTERNAL void v3270_update_cursor_surface(v3270 *widget,unsigned char chr,unsigned short attr); | ||
267 | - | ||
268 | -G_GNUC_INTERNAL void v3270_register_io_handlers(v3270Class *cls); | ||
269 | - | ||
270 | -G_GNUC_INTERNAL void v3270_draw_char(cairo_t *cr, unsigned char chr, unsigned short attr, H3270 *session, v3270FontInfo *font, GdkRectangle *rect, GdkRGBA *fg, GdkRGBA *bg); | ||
271 | -G_GNUC_INTERNAL void v3270_draw_text(cairo_t *cr, const GdkRectangle *rect, v3270FontInfo *font, const char *str); | ||
272 | -G_GNUC_INTERNAL void v3270_draw_text_at(cairo_t *cr, int x, int y, v3270FontInfo *font, const char *str); | ||
273 | - | ||
274 | -G_GNUC_INTERNAL void v3270_start_timer(GtkWidget *terminal); | ||
275 | -G_GNUC_INTERNAL void v3270_stop_timer(GtkWidget *terminal); | ||
276 | - | ||
277 | -G_GNUC_INTERNAL void v3270_draw_connection(cairo_t *cr, H3270 *host, v3270FontInfo *metrics, GdkRGBA *color, const GdkRectangle *rect); | ||
278 | - | ||
279 | -G_GNUC_INTERNAL void v3270_draw_ssl_status(v3270 *widget, cairo_t *cr, GdkRectangle *rect); | ||
280 | - | ||
281 | -G_GNUC_INTERNAL void v3270_update_char(H3270 *session, int addr, unsigned char chr, unsigned short attr, unsigned char cursor); | ||
282 | - | ||
283 | -G_GNUC_INTERNAL void v3270_update_font_metrics(v3270 *terminal, cairo_t *cr, unsigned int width, unsigned int height); | ||
284 | - | ||
285 | -G_GNUC_INTERNAL void v3270_update_cursor_rect(v3270 *widget, GdkRectangle *rect, unsigned char chr, unsigned short attr); | ||
286 | - | ||
287 | -G_GNUC_INTERNAL void v3270_update_message(v3270 *widget, LIB3270_MESSAGE id); | ||
288 | -G_GNUC_INTERNAL void v3270_update_cursor(H3270 *session, unsigned short row, unsigned short col, unsigned char c, unsigned short attr); | ||
289 | -G_GNUC_INTERNAL void v3270_update_oia(v3270 *terminal, LIB3270_FLAG id, unsigned char on); | ||
290 | - | ||
291 | -G_GNUC_INTERNAL void v3270_blink_ssl(v3270 *terminal); | ||
292 | - | ||
293 | -G_GNUC_INTERNAL void v3270_update_luname(GtkWidget *widget,const gchar *name); | ||
294 | -G_GNUC_INTERNAL void v3270_init_properties(GObjectClass * gobject_class); | ||
295 | -G_GNUC_INTERNAL void v3270_queue_draw_area(GtkWidget *widget, gint x, gint y, gint width, gint height); | ||
296 | - | ||
297 | -G_GNUC_INTERNAL void v3270_disable_updates(GtkWidget *widget); | ||
298 | -G_GNUC_INTERNAL void v3270_enable_updates(GtkWidget *widget); | ||
299 | - | ||
300 | -// Keyboard & Mouse | ||
301 | -G_GNUC_INTERNAL gboolean v3270_key_press_event(GtkWidget *widget, GdkEventKey *event); | ||
302 | -G_GNUC_INTERNAL gboolean v3270_key_release_event(GtkWidget *widget, GdkEventKey *event); | ||
303 | -G_GNUC_INTERNAL void v3270_key_commit(GtkIMContext *imcontext, gchar *str, v3270 *widget); | ||
304 | -G_GNUC_INTERNAL gboolean v3270_button_press_event(GtkWidget *widget, GdkEventButton *event); | ||
305 | -G_GNUC_INTERNAL gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event); | ||
306 | -G_GNUC_INTERNAL gboolean v3270_motion_notify_event(GtkWidget *widget, GdkEventMotion *event); | ||
307 | -G_GNUC_INTERNAL void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event); | ||
308 | -G_GNUC_INTERNAL gint v3270_get_offset_at_point(v3270 *widget, gint x, gint y); | ||
309 | -G_GNUC_INTERNAL gboolean v3270_scroll_event(GtkWidget *widget, GdkEventScroll *event); | ||
310 | - | ||
311 | -// I/O Callbacks | ||
312 | -G_GNUC_INTERNAL GSource * IO_source_new(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*call)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata); | ||
313 | -G_GNUC_INTERNAL void IO_source_set_state(GSource *source, gboolean enable); | ||
314 | -*/ | ||
315 | - | ||
316 | G_END_DECLS | 198 | G_END_DECLS |
src/terminal/properties.c
@@ -191,6 +191,7 @@ | @@ -191,6 +191,7 @@ | ||
191 | { | 191 | { |
192 | size_t ix; | 192 | size_t ix; |
193 | GParamSpec * spec; | 193 | GParamSpec * spec; |
194 | + v3270Class * klass = GTK_V3270_CLASS(gobject_class); | ||
194 | 195 | ||
195 | debug("%s",__FUNCTION__); | 196 | debug("%s",__FUNCTION__); |
196 | 197 | ||
@@ -198,21 +199,21 @@ | @@ -198,21 +199,21 @@ | ||
198 | gobject_class->set_property = v3270_set_property; | 199 | gobject_class->set_property = v3270_set_property; |
199 | gobject_class->get_property = v3270_get_property; | 200 | gobject_class->get_property = v3270_get_property; |
200 | 201 | ||
201 | - v3270_properties.count = PROP_BEGIN; | 202 | + klass->properties.count = PROP_BEGIN; |
202 | 203 | ||
203 | // Setup internal properties. | 204 | // Setup internal properties. |
204 | - v3270_properties.font_family = g_param_spec_string( | ||
205 | - "font_family", | ||
206 | - "font_family", | ||
207 | - _("Font family for terminal contents"), | ||
208 | - FALSE, | ||
209 | - G_PARAM_READABLE|G_PARAM_WRITABLE | ||
210 | - ); | 205 | + klass->properties.font_family = g_param_spec_string( |
206 | + "font_family", | ||
207 | + "font_family", | ||
208 | + _("Font family for terminal contents"), | ||
209 | + FALSE, | ||
210 | + G_PARAM_READABLE|G_PARAM_WRITABLE | ||
211 | + ); | ||
211 | 212 | ||
212 | g_object_class_install_property( | 213 | g_object_class_install_property( |
213 | gobject_class, | 214 | gobject_class, |
214 | - v3270_properties.count++, | ||
215 | - v3270_properties.font_family | 215 | + klass->properties.count++, |
216 | + klass->properties.font_family | ||
216 | ); | 217 | ); |
217 | 218 | ||
218 | // | 219 | // |
@@ -220,7 +221,7 @@ | @@ -220,7 +221,7 @@ | ||
220 | // | 221 | // |
221 | 222 | ||
222 | // Extract toggle class. | 223 | // Extract toggle class. |
223 | - v3270_properties.type.toggle = v3270_properties.count; | 224 | + v3270_properties.type.toggle = klass->properties.count; |
224 | for(ix = 0; ix < LIB3270_TOGGLE_COUNT; ix++) | 225 | for(ix = 0; ix < LIB3270_TOGGLE_COUNT; ix++) |
225 | { | 226 | { |
226 | debug("Property %u=%s (Toggle)",(unsigned int) v3270_properties.type.toggle + ix, lib3270_get_toggle_name(ix)); | 227 | debug("Property %u=%s (Toggle)",(unsigned int) v3270_properties.type.toggle + ix, lib3270_get_toggle_name(ix)); |
@@ -234,12 +235,12 @@ | @@ -234,12 +235,12 @@ | ||
234 | G_PARAM_WRITABLE|G_PARAM_READABLE | 235 | G_PARAM_WRITABLE|G_PARAM_READABLE |
235 | ); | 236 | ); |
236 | 237 | ||
237 | - v3270_install_property(gobject_class, v3270_properties.count++, v3270_properties.toggle[ix]); | 238 | + v3270_install_property(gobject_class, klass->properties.count++, v3270_properties.toggle[ix]); |
238 | 239 | ||
239 | } | 240 | } |
240 | 241 | ||
241 | // Creating boolean properties. | 242 | // Creating boolean properties. |
242 | - v3270_properties.type.boolean = v3270_properties.count; | 243 | + v3270_properties.type.boolean = klass->properties.count; |
243 | const LIB3270_INT_PROPERTY * bool_props = lib3270_get_boolean_properties_list(); | 244 | const LIB3270_INT_PROPERTY * bool_props = lib3270_get_boolean_properties_list(); |
244 | 245 | ||
245 | for(ix = 0; bool_props[ix].name; ix++) | 246 | for(ix = 0; bool_props[ix].name; ix++) |
@@ -253,13 +254,13 @@ | @@ -253,13 +254,13 @@ | ||
253 | (bool_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) | 254 | (bool_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) |
254 | ); | 255 | ); |
255 | 256 | ||
256 | - v3270_install_property(gobject_class, v3270_properties.count++, spec); | 257 | + v3270_install_property(gobject_class, klass->properties.count++, spec); |
257 | 258 | ||
258 | } | 259 | } |
259 | 260 | ||
260 | // Creating integer properties. | 261 | // Creating integer properties. |
261 | const LIB3270_INT_PROPERTY * int_props = lib3270_get_int_properties_list(); | 262 | const LIB3270_INT_PROPERTY * int_props = lib3270_get_int_properties_list(); |
262 | - v3270_properties.type.integer = v3270_properties.count; | 263 | + v3270_properties.type.integer = klass->properties.count; |
263 | 264 | ||
264 | for(ix = 0; int_props[ix].name; ix++) | 265 | for(ix = 0; int_props[ix].name; ix++) |
265 | { | 266 | { |
@@ -274,19 +275,19 @@ | @@ -274,19 +275,19 @@ | ||
274 | 0, // Default | 275 | 0, // Default |
275 | (int_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) | 276 | (int_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) |
276 | ); | 277 | ); |
277 | - debug("Creating %u properties", (unsigned int) v3270_properties.count); | 278 | + debug("Creating %u properties", (unsigned int) klass->properties.count); |
278 | 279 | ||
279 | 280 | ||
280 | 281 | ||
281 | 282 | ||
282 | 283 | ||
283 | - v3270_install_property(gobject_class, v3270_properties.count++, spec); | 284 | + v3270_install_property(gobject_class, klass->properties.count++, spec); |
284 | 285 | ||
285 | } | 286 | } |
286 | 287 | ||
287 | // Creating string properties. | 288 | // Creating string properties. |
288 | const LIB3270_STRING_PROPERTY * str_props = lib3270_get_string_properties_list(); | 289 | const LIB3270_STRING_PROPERTY * str_props = lib3270_get_string_properties_list(); |
289 | - v3270_properties.type.str = v3270_properties.count; | 290 | + v3270_properties.type.str = klass->properties.count; |
290 | 291 | ||
291 | for(ix = 0; str_props[ix].name; ix++) | 292 | for(ix = 0; str_props[ix].name; ix++) |
292 | { | 293 | { |
@@ -301,7 +302,7 @@ | @@ -301,7 +302,7 @@ | ||
301 | (str_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) | 302 | (str_props[ix].set == NULL ? G_PARAM_READABLE : (G_PARAM_READABLE|G_PARAM_WRITABLE)) |
302 | ); | 303 | ); |
303 | 304 | ||
304 | - v3270_install_property(gobject_class, v3270_properties.count++, spec); | 305 | + v3270_install_property(gobject_class, klass->properties.count++, spec); |
305 | 306 | ||
306 | } | 307 | } |
307 | 308 |
src/terminal/selection.c
@@ -133,7 +133,7 @@ static const char * update_selected_text(GtkWidget *widget, gboolean cut) | @@ -133,7 +133,7 @@ static const char * update_selected_text(GtkWidget *widget, gboolean cut) | ||
133 | 133 | ||
134 | if(!text) | 134 | if(!text) |
135 | { | 135 | { |
136 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_CLIPBOARD], 0, FALSE); | 136 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_CLIPBOARD], 0, FALSE); |
137 | lib3270_ring_bell(terminal->host); | 137 | lib3270_ring_bell(terminal->host); |
138 | return NULL; | 138 | return NULL; |
139 | } | 139 | } |
@@ -267,7 +267,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) | @@ -267,7 +267,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) | ||
267 | if(!text) | 267 | if(!text) |
268 | { | 268 | { |
269 | /* No string, signal clipboard clear and return */ | 269 | /* No string, signal clipboard clear and return */ |
270 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_CLIPBOARD], 0, FALSE); | 270 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_CLIPBOARD], 0, FALSE); |
271 | return; | 271 | return; |
272 | } | 272 | } |
273 | 273 | ||
@@ -278,7 +278,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) | @@ -278,7 +278,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) | ||
278 | if(!isotext) | 278 | if(!isotext) |
279 | { | 279 | { |
280 | /* No string, signal clipboard clear and return */ | 280 | /* No string, signal clipboard clear and return */ |
281 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_CLIPBOARD], 0, FALSE); | 281 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_CLIPBOARD], 0, FALSE); |
282 | return; | 282 | return; |
283 | } | 283 | } |
284 | 284 | ||
@@ -286,7 +286,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) | @@ -286,7 +286,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) | ||
286 | 286 | ||
287 | g_free(isotext); | 287 | g_free(isotext); |
288 | 288 | ||
289 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_CLIPBOARD], 0, TRUE); | 289 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_CLIPBOARD], 0, TRUE); |
290 | } | 290 | } |
291 | 291 | ||
292 | static void update_system_clipboard(GtkWidget *widget) | 292 | static void update_system_clipboard(GtkWidget *widget) |
@@ -306,7 +306,7 @@ static void update_system_clipboard(GtkWidget *widget) | @@ -306,7 +306,7 @@ static void update_system_clipboard(GtkWidget *widget) | ||
306 | gtk_clipboard_set_can_store(clipboard,targets,1); | 306 | gtk_clipboard_set_can_store(clipboard,targets,1); |
307 | } | 307 | } |
308 | 308 | ||
309 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_CLIPBOARD], 0, TRUE); | 309 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_CLIPBOARD], 0, TRUE); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
@@ -506,7 +506,7 @@ LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, con | @@ -506,7 +506,7 @@ LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, con | ||
506 | } | 506 | } |
507 | else | 507 | else |
508 | { | 508 | { |
509 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_PASTENEXT], 0, FALSE); | 509 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_PASTENEXT], 0, FALSE); |
510 | return; | 510 | return; |
511 | } | 511 | } |
512 | 512 | ||
@@ -514,7 +514,7 @@ LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, con | @@ -514,7 +514,7 @@ LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, con | ||
514 | 514 | ||
515 | g_free(buffer); | 515 | g_free(buffer); |
516 | 516 | ||
517 | - g_signal_emit(widget,v3270_widget_signal[SIGNAL_PASTENEXT], 0, next); | 517 | + g_signal_emit(widget,v3270_widget_signal[V3270_SIGNAL_PASTENEXT], 0, next); |
518 | 518 | ||
519 | } | 519 | } |
520 | 520 |
src/terminal/widget.c
@@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
63 | 63 | ||
64 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 64 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
65 | 65 | ||
66 | - guint v3270_widget_signal[V3270_LAST_SIGNAL] = { 0 }; | 66 | + guint v3270_widget_signal[V3270_SIGNAL_LAST] = { 0 }; |
67 | GdkCursor * v3270_cursor[LIB3270_POINTER_COUNT] = { 0 }; | 67 | GdkCursor * v3270_cursor[LIB3270_POINTER_COUNT] = { 0 }; |
68 | 68 | ||
69 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ | 69 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ |
@@ -354,7 +354,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -354,7 +354,7 @@ static void v3270_class_init(v3270Class *klass) | ||
354 | v3270_VOID__VOID, | 354 | v3270_VOID__VOID, |
355 | G_TYPE_NONE, 0); | 355 | G_TYPE_NONE, 0); |
356 | 356 | ||
357 | - v3270_widget_signal[SIGNAL_TOGGLE_CHANGED] = | 357 | + v3270_widget_signal[V3270_SIGNAL_TOGGLE_CHANGED] = |
358 | g_signal_new( "toggle_changed", | 358 | g_signal_new( "toggle_changed", |
359 | G_OBJECT_CLASS_TYPE (gobject_class), | 359 | G_OBJECT_CLASS_TYPE (gobject_class), |
360 | G_SIGNAL_RUN_FIRST, | 360 | G_SIGNAL_RUN_FIRST, |
@@ -363,7 +363,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -363,7 +363,7 @@ static void v3270_class_init(v3270Class *klass) | ||
363 | v3270_VOID__VOID_ENUM_BOOLEAN_POINTER, | 363 | v3270_VOID__VOID_ENUM_BOOLEAN_POINTER, |
364 | G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_BOOLEAN, G_TYPE_STRING); | 364 | G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_BOOLEAN, G_TYPE_STRING); |
365 | 365 | ||
366 | - v3270_widget_signal[SIGNAL_MESSAGE_CHANGED] = | 366 | + v3270_widget_signal[V3270_SIGNAL_MESSAGE_CHANGED] = |
367 | g_signal_new( "message_changed", | 367 | g_signal_new( "message_changed", |
368 | G_OBJECT_CLASS_TYPE (gobject_class), | 368 | G_OBJECT_CLASS_TYPE (gobject_class), |
369 | G_SIGNAL_RUN_FIRST, | 369 | G_SIGNAL_RUN_FIRST, |
@@ -372,7 +372,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -372,7 +372,7 @@ static void v3270_class_init(v3270Class *klass) | ||
372 | v3270_VOID__VOID_ENUM, | 372 | v3270_VOID__VOID_ENUM, |
373 | G_TYPE_NONE, 1, G_TYPE_UINT); | 373 | G_TYPE_NONE, 1, G_TYPE_UINT); |
374 | 374 | ||
375 | - v3270_widget_signal[SIGNAL_KEYPRESS] = | 375 | + v3270_widget_signal[V3270_SIGNAL_KEYPRESS] = |
376 | g_signal_new( "keypress", | 376 | g_signal_new( "keypress", |
377 | G_OBJECT_CLASS_TYPE (gobject_class), | 377 | G_OBJECT_CLASS_TYPE (gobject_class), |
378 | G_SIGNAL_RUN_LAST, | 378 | G_SIGNAL_RUN_LAST, |
@@ -381,7 +381,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -381,7 +381,7 @@ static void v3270_class_init(v3270Class *klass) | ||
381 | v3270_BOOLEAN__UINT_ENUM, | 381 | v3270_BOOLEAN__UINT_ENUM, |
382 | G_TYPE_BOOLEAN, 2, G_TYPE_UINT, G_TYPE_UINT); | 382 | G_TYPE_BOOLEAN, 2, G_TYPE_UINT, G_TYPE_UINT); |
383 | 383 | ||
384 | - v3270_widget_signal[SIGNAL_CONNECTED] = | 384 | + v3270_widget_signal[V3270_SIGNAL_CONNECTED] = |
385 | g_signal_new( "connected", | 385 | g_signal_new( "connected", |
386 | G_OBJECT_CLASS_TYPE (gobject_class), | 386 | G_OBJECT_CLASS_TYPE (gobject_class), |
387 | G_SIGNAL_RUN_FIRST, | 387 | G_SIGNAL_RUN_FIRST, |
@@ -390,7 +390,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -390,7 +390,7 @@ static void v3270_class_init(v3270Class *klass) | ||
390 | v3270_VOID__POINTER, | 390 | v3270_VOID__POINTER, |
391 | G_TYPE_NONE, 1, G_TYPE_STRING); | 391 | G_TYPE_NONE, 1, G_TYPE_STRING); |
392 | 392 | ||
393 | - v3270_widget_signal[SIGNAL_DISCONNECTED] = | 393 | + v3270_widget_signal[V3270_SIGNAL_DISCONNECTED] = |
394 | g_signal_new( "disconnected", | 394 | g_signal_new( "disconnected", |
395 | G_OBJECT_CLASS_TYPE (gobject_class), | 395 | G_OBJECT_CLASS_TYPE (gobject_class), |
396 | G_SIGNAL_RUN_FIRST, | 396 | G_SIGNAL_RUN_FIRST, |
@@ -399,7 +399,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -399,7 +399,7 @@ static void v3270_class_init(v3270Class *klass) | ||
399 | v3270_VOID__VOID, | 399 | v3270_VOID__VOID, |
400 | G_TYPE_NONE, 0); | 400 | G_TYPE_NONE, 0); |
401 | 401 | ||
402 | - v3270_widget_signal[SIGNAL_SESSION_CHANGED] = | 402 | + v3270_widget_signal[V3270_SIGNAL_SESSION_CHANGED] = |
403 | g_signal_new( "session_changed", | 403 | g_signal_new( "session_changed", |
404 | G_OBJECT_CLASS_TYPE (gobject_class), | 404 | G_OBJECT_CLASS_TYPE (gobject_class), |
405 | G_SIGNAL_RUN_FIRST, | 405 | G_SIGNAL_RUN_FIRST, |
@@ -408,7 +408,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -408,7 +408,7 @@ static void v3270_class_init(v3270Class *klass) | ||
408 | v3270_VOID__VOID, | 408 | v3270_VOID__VOID, |
409 | G_TYPE_NONE, 0); | 409 | G_TYPE_NONE, 0); |
410 | 410 | ||
411 | - v3270_widget_signal[SIGNAL_UPDATE_CONFIG] = | 411 | + v3270_widget_signal[V3270_SIGNAL_UPDATE_CONFIG] = |
412 | g_signal_new( "update_config", | 412 | g_signal_new( "update_config", |
413 | G_OBJECT_CLASS_TYPE (gobject_class), | 413 | G_OBJECT_CLASS_TYPE (gobject_class), |
414 | G_SIGNAL_RUN_FIRST, | 414 | G_SIGNAL_RUN_FIRST, |
@@ -417,7 +417,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -417,7 +417,7 @@ static void v3270_class_init(v3270Class *klass) | ||
417 | v3270_VOID__VOID_POINTER_POINTER, | 417 | v3270_VOID__VOID_POINTER_POINTER, |
418 | G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); | 418 | G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); |
419 | 419 | ||
420 | - v3270_widget_signal[SIGNAL_MODEL_CHANGED] = | 420 | + v3270_widget_signal[V3270_SIGNAL_MODEL_CHANGED] = |
421 | g_signal_new( "model_changed", | 421 | g_signal_new( "model_changed", |
422 | G_OBJECT_CLASS_TYPE (gobject_class), | 422 | G_OBJECT_CLASS_TYPE (gobject_class), |
423 | G_SIGNAL_RUN_FIRST, | 423 | G_SIGNAL_RUN_FIRST, |
@@ -426,7 +426,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -426,7 +426,7 @@ static void v3270_class_init(v3270Class *klass) | ||
426 | v3270_VOID__VOID_UINT_POINTER, | 426 | v3270_VOID__VOID_UINT_POINTER, |
427 | G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); | 427 | G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_STRING); |
428 | 428 | ||
429 | - v3270_widget_signal[SIGNAL_SELECTING] = | 429 | + v3270_widget_signal[V3270_SIGNAL_SELECTING] = |
430 | g_signal_new( "selecting", | 430 | g_signal_new( "selecting", |
431 | G_OBJECT_CLASS_TYPE (gobject_class), | 431 | G_OBJECT_CLASS_TYPE (gobject_class), |
432 | G_SIGNAL_RUN_FIRST, | 432 | G_SIGNAL_RUN_FIRST, |
@@ -435,7 +435,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -435,7 +435,7 @@ static void v3270_class_init(v3270Class *klass) | ||
435 | v3270_VOID__VOID_BOOLEAN, | 435 | v3270_VOID__VOID_BOOLEAN, |
436 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); | 436 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); |
437 | 437 | ||
438 | - v3270_widget_signal[SIGNAL_POPUP] = | 438 | + v3270_widget_signal[V3270_SIGNAL_POPUP] = |
439 | g_signal_new( "popup", | 439 | g_signal_new( "popup", |
440 | G_OBJECT_CLASS_TYPE (gobject_class), | 440 | G_OBJECT_CLASS_TYPE (gobject_class), |
441 | G_SIGNAL_RUN_LAST, | 441 | G_SIGNAL_RUN_LAST, |
@@ -444,7 +444,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -444,7 +444,7 @@ static void v3270_class_init(v3270Class *klass) | ||
444 | v3270_BOOLEAN__VOID_BOOLEAN_BOOLEAN_POINTER, | 444 | v3270_BOOLEAN__VOID_BOOLEAN_BOOLEAN_POINTER, |
445 | G_TYPE_BOOLEAN, 3, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_POINTER); | 445 | G_TYPE_BOOLEAN, 3, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_POINTER); |
446 | 446 | ||
447 | - v3270_widget_signal[SIGNAL_PASTENEXT] = | 447 | + v3270_widget_signal[V3270_SIGNAL_PASTENEXT] = |
448 | g_signal_new( "pastenext", | 448 | g_signal_new( "pastenext", |
449 | G_OBJECT_CLASS_TYPE (gobject_class), | 449 | G_OBJECT_CLASS_TYPE (gobject_class), |
450 | G_SIGNAL_RUN_FIRST, | 450 | G_SIGNAL_RUN_FIRST, |
@@ -453,7 +453,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -453,7 +453,7 @@ static void v3270_class_init(v3270Class *klass) | ||
453 | v3270_VOID__VOID_BOOLEAN, | 453 | v3270_VOID__VOID_BOOLEAN, |
454 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); | 454 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); |
455 | 455 | ||
456 | - v3270_widget_signal[SIGNAL_CLIPBOARD] = | 456 | + v3270_widget_signal[V3270_SIGNAL_CLIPBOARD] = |
457 | g_signal_new( "has_text", | 457 | g_signal_new( "has_text", |
458 | G_OBJECT_CLASS_TYPE (gobject_class), | 458 | G_OBJECT_CLASS_TYPE (gobject_class), |
459 | G_SIGNAL_RUN_FIRST, | 459 | G_SIGNAL_RUN_FIRST, |
@@ -462,7 +462,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -462,7 +462,7 @@ static void v3270_class_init(v3270Class *klass) | ||
462 | v3270_VOID__VOID_BOOLEAN, | 462 | v3270_VOID__VOID_BOOLEAN, |
463 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); | 463 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); |
464 | 464 | ||
465 | - v3270_widget_signal[SIGNAL_CHANGED] = | 465 | + v3270_widget_signal[V3270_SIGNAL_CHANGED] = |
466 | g_signal_new( "changed", | 466 | g_signal_new( "changed", |
467 | G_OBJECT_CLASS_TYPE (gobject_class), | 467 | G_OBJECT_CLASS_TYPE (gobject_class), |
468 | G_SIGNAL_RUN_FIRST, | 468 | G_SIGNAL_RUN_FIRST, |
@@ -471,7 +471,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -471,7 +471,7 @@ static void v3270_class_init(v3270Class *klass) | ||
471 | v3270_VOID__VOID_UINT_UINT, | 471 | v3270_VOID__VOID_UINT_UINT, |
472 | G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); | 472 | G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); |
473 | 473 | ||
474 | - v3270_widget_signal[SIGNAL_MESSAGE] = | 474 | + v3270_widget_signal[V3270_SIGNAL_MESSAGE] = |
475 | g_signal_new( "popup_message", | 475 | g_signal_new( "popup_message", |
476 | G_OBJECT_CLASS_TYPE (gobject_class), | 476 | G_OBJECT_CLASS_TYPE (gobject_class), |
477 | G_SIGNAL_RUN_FIRST, | 477 | G_SIGNAL_RUN_FIRST, |
@@ -480,7 +480,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -480,7 +480,7 @@ static void v3270_class_init(v3270Class *klass) | ||
480 | v3270_VOID__VOID_UINT_POINTER_POINTER_POINTER, | 480 | v3270_VOID__VOID_UINT_POINTER_POINTER_POINTER, |
481 | G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); | 481 | G_TYPE_NONE, 4, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); |
482 | 482 | ||
483 | - v3270_widget_signal[SIGNAL_FIELD] = | 483 | + v3270_widget_signal[V3270_SIGNAL_FIELD] = |
484 | g_signal_new( "field_clicked", | 484 | g_signal_new( "field_clicked", |
485 | G_OBJECT_CLASS_TYPE (gobject_class), | 485 | G_OBJECT_CLASS_TYPE (gobject_class), |
486 | G_SIGNAL_RUN_LAST, | 486 | G_SIGNAL_RUN_LAST, |
@@ -490,7 +490,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -490,7 +490,7 @@ static void v3270_class_init(v3270Class *klass) | ||
490 | G_TYPE_BOOLEAN, 3, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_POINTER); | 490 | G_TYPE_BOOLEAN, 3, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_POINTER); |
491 | 491 | ||
492 | 492 | ||
493 | - v3270_widget_signal[SIGNAL_PRINT_SETUP] = | 493 | + v3270_widget_signal[V3270_SIGNAL_PRINT_SETUP] = |
494 | g_signal_new( "print-begin", | 494 | g_signal_new( "print-begin", |
495 | G_OBJECT_CLASS_TYPE (gobject_class), | 495 | G_OBJECT_CLASS_TYPE (gobject_class), |
496 | G_SIGNAL_RUN_FIRST, | 496 | G_SIGNAL_RUN_FIRST, |
@@ -499,7 +499,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -499,7 +499,7 @@ static void v3270_class_init(v3270Class *klass) | ||
499 | v3270_VOID__VOID_POINTER, | 499 | v3270_VOID__VOID_POINTER, |
500 | G_TYPE_NONE, 1, G_TYPE_POINTER, 0); | 500 | G_TYPE_NONE, 1, G_TYPE_POINTER, 0); |
501 | 501 | ||
502 | - v3270_widget_signal[SIGNAL_PRINT_APPLY] = | 502 | + v3270_widget_signal[V3270_SIGNAL_PRINT_APPLY] = |
503 | g_signal_new( "print-apply", | 503 | g_signal_new( "print-apply", |
504 | G_OBJECT_CLASS_TYPE (gobject_class), | 504 | G_OBJECT_CLASS_TYPE (gobject_class), |
505 | G_SIGNAL_RUN_FIRST, | 505 | G_SIGNAL_RUN_FIRST, |
@@ -508,7 +508,7 @@ static void v3270_class_init(v3270Class *klass) | @@ -508,7 +508,7 @@ static void v3270_class_init(v3270Class *klass) | ||
508 | v3270_VOID__VOID_POINTER, | 508 | v3270_VOID__VOID_POINTER, |
509 | G_TYPE_NONE, 1, G_TYPE_POINTER, 0); | 509 | G_TYPE_NONE, 1, G_TYPE_POINTER, 0); |
510 | 510 | ||
511 | - v3270_widget_signal[SIGNAL_PRINT_DONE] = | 511 | + v3270_widget_signal[V3270_SIGNAL_PRINT_DONE] = |
512 | g_signal_new( "print-done", | 512 | g_signal_new( "print-done", |
513 | G_OBJECT_CLASS_TYPE (gobject_class), | 513 | G_OBJECT_CLASS_TYPE (gobject_class), |
514 | G_SIGNAL_RUN_FIRST, | 514 | G_SIGNAL_RUN_FIRST, |
@@ -992,7 +992,7 @@ LIB3270_EXPORT void v3270_set_session_name(GtkWidget *widget, const gchar *name) | @@ -992,7 +992,7 @@ LIB3270_EXPORT void v3270_set_session_name(GtkWidget *widget, const gchar *name) | ||
992 | 992 | ||
993 | debug("New session name is \"%s\"",GTK_V3270(widget)->session_name); | 993 | debug("New session name is \"%s\"",GTK_V3270(widget)->session_name); |
994 | 994 | ||
995 | - g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[SIGNAL_SESSION_CHANGED], 0); | 995 | + g_signal_emit(GTK_WIDGET(widget), v3270_widget_signal[V3270_SIGNAL_SESSION_CHANGED], 0); |
996 | 996 | ||
997 | } | 997 | } |
998 | 998 |