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 | 44 | debug("%s",__FUNCTION__); |
| 45 | 45 | |
| 46 | 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 | 93 | V3270PrintOperation * operation = GTK_V3270_PRINT_OPERATION(prt); |
| 94 | 94 | |
| 95 | 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 | 98 | // Create dialog |
| 99 | 99 | |
| ... | ... | @@ -151,7 +151,7 @@ |
| 151 | 151 | debug("%s",__FUNCTION__); |
| 152 | 152 | |
| 153 | 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 | 32 | #define V3270_INTERNALS_H_INCLUDED 1 |
| 33 | 33 | |
| 34 | 34 | #include <config.h> |
| 35 | + | |
| 36 | + #define ENABLE_NLS | |
| 37 | + #define GETTEXT_PACKAGE PACKAGE_NAME | |
| 38 | + | |
| 35 | 39 | #include <glib.h> |
| 36 | 40 | #include <gtk/gtk.h> |
| 37 | 41 | #include <lib3270.h> |
| ... | ... | @@ -48,6 +52,42 @@ |
| 48 | 52 | |
| 49 | 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 | 91 | G_GNUC_INTERNAL void v3270_drag_dest_set(GtkWidget *widget, GCallback callback); |
| 52 | 92 | |
| 53 | 93 | G_GNUC_INTERNAL GtkWidget * v3270_box_pack_start(GtkWidget *box, GtkWidget *child, gboolean expand, gboolean fill, guint padding); |
| ... | ... | @@ -160,6 +200,11 @@ |
| 160 | 200 | G_GNUC_INTERNAL void v3270_disable_updates(GtkWidget *widget); |
| 161 | 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 | 208 | // Keyboard & Mouse |
| 164 | 209 | G_GNUC_INTERNAL gboolean v3270_key_press_event(GtkWidget *widget, GdkEventKey *event); |
| 165 | 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 | 134 | } |
| 135 | 135 | |
| 136 | 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 | 145 | |
| 146 | 146 | g_signal_emit( |
| 147 | 147 | GTK_WIDGET(widget), |
| 148 | - v3270_widget_signal[SIGNAL_MESSAGE_CHANGED], | |
| 148 | + v3270_widget_signal[V3270_SIGNAL_MESSAGE_CHANGED], | |
| 149 | 149 | 0, |
| 150 | 150 | (gint) lib3270_get_program_message(session) |
| 151 | 151 | ); |
| ... | ... | @@ -218,12 +218,12 @@ static void update_connect(H3270 *session, unsigned char connected) |
| 218 | 218 | if(connected) |
| 219 | 219 | { |
| 220 | 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 | 223 | else |
| 224 | 224 | { |
| 225 | 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 | 229 | if(v3270_properties.online) |
| ... | ... | @@ -245,7 +245,7 @@ static void update_model(H3270 *session, const char *name, int model, G_GNUC_UNU |
| 245 | 245 | if(v3270_properties.model) |
| 246 | 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 | 251 | static void changed(H3270 *session, int offset, int len) |
| ... | ... | @@ -292,7 +292,7 @@ static void changed(H3270 *session, int offset, int len) |
| 292 | 292 | gtk_widget_queue_draw(widget); |
| 293 | 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 | 298 | static void set_selection(H3270 *session, unsigned char status) |
| ... | ... | @@ -302,7 +302,7 @@ static void set_selection(H3270 *session, unsigned char status) |
| 302 | 302 | if(v3270_properties.selection) |
| 303 | 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 | 319 | |
| 320 | 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 | 323 | (int) id, |
| 324 | 324 | (gchar *) title, |
| 325 | 325 | (gchar *) message, | ... | ... |
src/terminal/colors.c
| ... | ... | @@ -83,7 +83,7 @@ LIB3270_EXPORT void v3270_set_colors(GtkWidget *widget, const gchar *colors) |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 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 | 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 | 282 | terminal->font.family = g_strdup(name); |
| 283 | 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 | 288 | v3270_reload(widget); |
| 289 | 289 | gtk_widget_queue_draw(widget); | ... | ... |
src/terminal/keyboard.c
| ... | ... | @@ -138,7 +138,7 @@ |
| 138 | 138 | state &= ~GDK_CONTROL_MASK; |
| 139 | 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 | 142 | debug("Keyboard action was %s",handled ? "Handled" : "Not handled"); |
| 143 | 143 | if(handled) |
| 144 | 144 | return TRUE; | ... | ... |
src/terminal/mouse.c
| ... | ... | @@ -125,7 +125,7 @@ void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event) |
| 125 | 125 | |
| 126 | 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 | 129 | (attr & LIB3270_ATTR_SELECTED) ? TRUE : FALSE, |
| 130 | 130 | lib3270_connected(widget->host) ? TRUE : FALSE, |
| 131 | 131 | event, |
| ... | ... | @@ -195,7 +195,7 @@ gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event) |
| 195 | 195 | { |
| 196 | 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 | 199 | lib3270_connected(GTK_V3270(widget)->host) ? TRUE : FALSE, |
| 200 | 200 | GTK_V3270(widget)->oia.selected, |
| 201 | 201 | event, | ... | ... |
src/terminal/private.h
| ... | ... | @@ -29,8 +29,7 @@ |
| 29 | 29 | |
| 30 | 30 | #include <config.h> |
| 31 | 31 | |
| 32 | -#define ENABLE_NLS | |
| 33 | -#define GETTEXT_PACKAGE PACKAGE_NAME | |
| 32 | +#include <internals.h> | |
| 34 | 33 | |
| 35 | 34 | #include <libintl.h> |
| 36 | 35 | #include <glib/gi18n.h> |
| ... | ... | @@ -44,7 +43,15 @@ G_BEGIN_DECLS |
| 44 | 43 | { |
| 45 | 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 | 55 | void (*activate)(GtkWidget *widget); |
| 49 | 56 | void (*toggle_changed)(v3270 *widget,LIB3270_TOGGLE toggle_id,gboolean toggle_state,const gchar *toggle_name); |
| 50 | 57 | void (*message_changed)(v3270 *widget, LIB3270_MESSAGE id); |
| ... | ... | @@ -62,31 +69,6 @@ G_BEGIN_DECLS |
| 62 | 69 | #define KEY_FLAG_ALT 0x0002 |
| 63 | 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 | 72 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
| 91 | 73 | |
| 92 | 74 | struct v3270_ssl_status_msg |
| ... | ... | @@ -186,20 +168,10 @@ G_BEGIN_DECLS |
| 186 | 168 | |
| 187 | 169 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
| 188 | 170 | |
| 189 | - G_GNUC_INTERNAL guint v3270_widget_signal[V3270_LAST_SIGNAL]; | |
| 190 | 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 | 173 | G_GNUC_INTERNAL struct _v3270_properties |
| 201 | 174 | { |
| 202 | - size_t count; // Number of properties. | |
| 203 | 175 | GParamSpec * toggle[LIB3270_TOGGLE_COUNT]; // Toggle properties. |
| 204 | 176 | |
| 205 | 177 | struct |
| ... | ... | @@ -210,8 +182,10 @@ G_BEGIN_DECLS |
| 210 | 182 | guint str; |
| 211 | 183 | } type; |
| 212 | 184 | |
| 185 | + /* | |
| 213 | 186 | // V3270 Internal properties. |
| 214 | 187 | GParamSpec * font_family; |
| 188 | + */ | |
| 215 | 189 | |
| 216 | 190 | // Properties who launch signals. |
| 217 | 191 | GParamSpec * online; |
| ... | ... | @@ -221,96 +195,4 @@ G_BEGIN_DECLS |
| 221 | 195 | |
| 222 | 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 | 198 | G_END_DECLS | ... | ... |
src/terminal/properties.c
| ... | ... | @@ -191,6 +191,7 @@ |
| 191 | 191 | { |
| 192 | 192 | size_t ix; |
| 193 | 193 | GParamSpec * spec; |
| 194 | + v3270Class * klass = GTK_V3270_CLASS(gobject_class); | |
| 194 | 195 | |
| 195 | 196 | debug("%s",__FUNCTION__); |
| 196 | 197 | |
| ... | ... | @@ -198,21 +199,21 @@ |
| 198 | 199 | gobject_class->set_property = v3270_set_property; |
| 199 | 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 | 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 | 213 | g_object_class_install_property( |
| 213 | 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 | 221 | // |
| 221 | 222 | |
| 222 | 223 | // Extract toggle class. |
| 223 | - v3270_properties.type.toggle = v3270_properties.count; | |
| 224 | + v3270_properties.type.toggle = klass->properties.count; | |
| 224 | 225 | for(ix = 0; ix < LIB3270_TOGGLE_COUNT; ix++) |
| 225 | 226 | { |
| 226 | 227 | debug("Property %u=%s (Toggle)",(unsigned int) v3270_properties.type.toggle + ix, lib3270_get_toggle_name(ix)); |
| ... | ... | @@ -234,12 +235,12 @@ |
| 234 | 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 | 242 | // Creating boolean properties. |
| 242 | - v3270_properties.type.boolean = v3270_properties.count; | |
| 243 | + v3270_properties.type.boolean = klass->properties.count; | |
| 243 | 244 | const LIB3270_INT_PROPERTY * bool_props = lib3270_get_boolean_properties_list(); |
| 244 | 245 | |
| 245 | 246 | for(ix = 0; bool_props[ix].name; ix++) |
| ... | ... | @@ -253,13 +254,13 @@ |
| 253 | 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 | 261 | // Creating integer properties. |
| 261 | 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 | 265 | for(ix = 0; int_props[ix].name; ix++) |
| 265 | 266 | { |
| ... | ... | @@ -274,19 +275,19 @@ |
| 274 | 275 | 0, // Default |
| 275 | 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 | 288 | // Creating string properties. |
| 288 | 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 | 292 | for(ix = 0; str_props[ix].name; ix++) |
| 292 | 293 | { |
| ... | ... | @@ -301,7 +302,7 @@ |
| 301 | 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 | 133 | |
| 134 | 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 | 137 | lib3270_ring_bell(terminal->host); |
| 138 | 138 | return NULL; |
| 139 | 139 | } |
| ... | ... | @@ -267,7 +267,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) |
| 267 | 267 | if(!text) |
| 268 | 268 | { |
| 269 | 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 | 271 | return; |
| 272 | 272 | } |
| 273 | 273 | |
| ... | ... | @@ -278,7 +278,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) |
| 278 | 278 | if(!isotext) |
| 279 | 279 | { |
| 280 | 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 | 282 | return; |
| 283 | 283 | } |
| 284 | 284 | |
| ... | ... | @@ -286,7 +286,7 @@ LIB3270_EXPORT void v3270_set_copy(GtkWidget *widget, const gchar *text) |
| 286 | 286 | |
| 287 | 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 | 292 | static void update_system_clipboard(GtkWidget *widget) |
| ... | ... | @@ -306,7 +306,7 @@ static void update_system_clipboard(GtkWidget *widget) |
| 306 | 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 | 506 | } |
| 507 | 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 | 510 | return; |
| 511 | 511 | } |
| 512 | 512 | |
| ... | ... | @@ -514,7 +514,7 @@ LIB3270_EXPORT void v3270_paste_string(GtkWidget *widget, const gchar *text, con |
| 514 | 514 | |
| 515 | 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 | 63 | |
| 64 | 64 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
| 65 | 65 | |
| 66 | - guint v3270_widget_signal[V3270_LAST_SIGNAL] = { 0 }; | |
| 66 | + guint v3270_widget_signal[V3270_SIGNAL_LAST] = { 0 }; | |
| 67 | 67 | GdkCursor * v3270_cursor[LIB3270_POINTER_COUNT] = { 0 }; |
| 68 | 68 | |
| 69 | 69 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ |
| ... | ... | @@ -354,7 +354,7 @@ static void v3270_class_init(v3270Class *klass) |
| 354 | 354 | v3270_VOID__VOID, |
| 355 | 355 | G_TYPE_NONE, 0); |
| 356 | 356 | |
| 357 | - v3270_widget_signal[SIGNAL_TOGGLE_CHANGED] = | |
| 357 | + v3270_widget_signal[V3270_SIGNAL_TOGGLE_CHANGED] = | |
| 358 | 358 | g_signal_new( "toggle_changed", |
| 359 | 359 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 360 | 360 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -363,7 +363,7 @@ static void v3270_class_init(v3270Class *klass) |
| 363 | 363 | v3270_VOID__VOID_ENUM_BOOLEAN_POINTER, |
| 364 | 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 | 367 | g_signal_new( "message_changed", |
| 368 | 368 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 369 | 369 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -372,7 +372,7 @@ static void v3270_class_init(v3270Class *klass) |
| 372 | 372 | v3270_VOID__VOID_ENUM, |
| 373 | 373 | G_TYPE_NONE, 1, G_TYPE_UINT); |
| 374 | 374 | |
| 375 | - v3270_widget_signal[SIGNAL_KEYPRESS] = | |
| 375 | + v3270_widget_signal[V3270_SIGNAL_KEYPRESS] = | |
| 376 | 376 | g_signal_new( "keypress", |
| 377 | 377 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 378 | 378 | G_SIGNAL_RUN_LAST, |
| ... | ... | @@ -381,7 +381,7 @@ static void v3270_class_init(v3270Class *klass) |
| 381 | 381 | v3270_BOOLEAN__UINT_ENUM, |
| 382 | 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 | 385 | g_signal_new( "connected", |
| 386 | 386 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 387 | 387 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -390,7 +390,7 @@ static void v3270_class_init(v3270Class *klass) |
| 390 | 390 | v3270_VOID__POINTER, |
| 391 | 391 | G_TYPE_NONE, 1, G_TYPE_STRING); |
| 392 | 392 | |
| 393 | - v3270_widget_signal[SIGNAL_DISCONNECTED] = | |
| 393 | + v3270_widget_signal[V3270_SIGNAL_DISCONNECTED] = | |
| 394 | 394 | g_signal_new( "disconnected", |
| 395 | 395 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 396 | 396 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -399,7 +399,7 @@ static void v3270_class_init(v3270Class *klass) |
| 399 | 399 | v3270_VOID__VOID, |
| 400 | 400 | G_TYPE_NONE, 0); |
| 401 | 401 | |
| 402 | - v3270_widget_signal[SIGNAL_SESSION_CHANGED] = | |
| 402 | + v3270_widget_signal[V3270_SIGNAL_SESSION_CHANGED] = | |
| 403 | 403 | g_signal_new( "session_changed", |
| 404 | 404 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 405 | 405 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -408,7 +408,7 @@ static void v3270_class_init(v3270Class *klass) |
| 408 | 408 | v3270_VOID__VOID, |
| 409 | 409 | G_TYPE_NONE, 0); |
| 410 | 410 | |
| 411 | - v3270_widget_signal[SIGNAL_UPDATE_CONFIG] = | |
| 411 | + v3270_widget_signal[V3270_SIGNAL_UPDATE_CONFIG] = | |
| 412 | 412 | g_signal_new( "update_config", |
| 413 | 413 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 414 | 414 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -417,7 +417,7 @@ static void v3270_class_init(v3270Class *klass) |
| 417 | 417 | v3270_VOID__VOID_POINTER_POINTER, |
| 418 | 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 | 421 | g_signal_new( "model_changed", |
| 422 | 422 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 423 | 423 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -426,7 +426,7 @@ static void v3270_class_init(v3270Class *klass) |
| 426 | 426 | v3270_VOID__VOID_UINT_POINTER, |
| 427 | 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 | 430 | g_signal_new( "selecting", |
| 431 | 431 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 432 | 432 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -435,7 +435,7 @@ static void v3270_class_init(v3270Class *klass) |
| 435 | 435 | v3270_VOID__VOID_BOOLEAN, |
| 436 | 436 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); |
| 437 | 437 | |
| 438 | - v3270_widget_signal[SIGNAL_POPUP] = | |
| 438 | + v3270_widget_signal[V3270_SIGNAL_POPUP] = | |
| 439 | 439 | g_signal_new( "popup", |
| 440 | 440 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 441 | 441 | G_SIGNAL_RUN_LAST, |
| ... | ... | @@ -444,7 +444,7 @@ static void v3270_class_init(v3270Class *klass) |
| 444 | 444 | v3270_BOOLEAN__VOID_BOOLEAN_BOOLEAN_POINTER, |
| 445 | 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 | 448 | g_signal_new( "pastenext", |
| 449 | 449 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 450 | 450 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -453,7 +453,7 @@ static void v3270_class_init(v3270Class *klass) |
| 453 | 453 | v3270_VOID__VOID_BOOLEAN, |
| 454 | 454 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); |
| 455 | 455 | |
| 456 | - v3270_widget_signal[SIGNAL_CLIPBOARD] = | |
| 456 | + v3270_widget_signal[V3270_SIGNAL_CLIPBOARD] = | |
| 457 | 457 | g_signal_new( "has_text", |
| 458 | 458 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 459 | 459 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -462,7 +462,7 @@ static void v3270_class_init(v3270Class *klass) |
| 462 | 462 | v3270_VOID__VOID_BOOLEAN, |
| 463 | 463 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); |
| 464 | 464 | |
| 465 | - v3270_widget_signal[SIGNAL_CHANGED] = | |
| 465 | + v3270_widget_signal[V3270_SIGNAL_CHANGED] = | |
| 466 | 466 | g_signal_new( "changed", |
| 467 | 467 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 468 | 468 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -471,7 +471,7 @@ static void v3270_class_init(v3270Class *klass) |
| 471 | 471 | v3270_VOID__VOID_UINT_UINT, |
| 472 | 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 | 475 | g_signal_new( "popup_message", |
| 476 | 476 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 477 | 477 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -480,7 +480,7 @@ static void v3270_class_init(v3270Class *klass) |
| 480 | 480 | v3270_VOID__VOID_UINT_POINTER_POINTER_POINTER, |
| 481 | 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 | 484 | g_signal_new( "field_clicked", |
| 485 | 485 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 486 | 486 | G_SIGNAL_RUN_LAST, |
| ... | ... | @@ -490,7 +490,7 @@ static void v3270_class_init(v3270Class *klass) |
| 490 | 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 | 494 | g_signal_new( "print-begin", |
| 495 | 495 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 496 | 496 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -499,7 +499,7 @@ static void v3270_class_init(v3270Class *klass) |
| 499 | 499 | v3270_VOID__VOID_POINTER, |
| 500 | 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 | 503 | g_signal_new( "print-apply", |
| 504 | 504 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 505 | 505 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -508,7 +508,7 @@ static void v3270_class_init(v3270Class *klass) |
| 508 | 508 | v3270_VOID__VOID_POINTER, |
| 509 | 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 | 512 | g_signal_new( "print-done", |
| 513 | 513 | G_OBJECT_CLASS_TYPE (gobject_class), |
| 514 | 514 | G_SIGNAL_RUN_FIRST, |
| ... | ... | @@ -992,7 +992,7 @@ LIB3270_EXPORT void v3270_set_session_name(GtkWidget *widget, const gchar *name) |
| 992 | 992 | |
| 993 | 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 | ... | ... |