Commit 8049a9e4fa224e4ca9ec2bbca036be6c9fa67642
1 parent
986f1934
Exists in
master
and in
1 other branch
Moving all internal methods to internals.h
Showing
13 changed files
with
100 additions
and
38 deletions
Show diff stats
src/include/internals.h
| ... | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 | |
| 32 | 32 | #define V3270_INTERNALS_H_INCLUDED 1 |
| 33 | 33 | |
| 34 | + #include <config.h> | |
| 34 | 35 | #include <glib.h> |
| 35 | 36 | #include <gtk/gtk.h> |
| 36 | 37 | #include <lib3270.h> |
| ... | ... | @@ -88,6 +89,92 @@ |
| 88 | 89 | |
| 89 | 90 | #endif //! GTK 3.16 |
| 90 | 91 | |
| 91 | - G_END_DECLS | |
| 92 | + const GtkWidgetClass * v3270_get_parent_class(void); | |
| 93 | + | |
| 94 | + G_GNUC_INTERNAL gboolean v3270_draw(GtkWidget * widget, cairo_t * cr); | |
| 95 | + G_GNUC_INTERNAL void v3270_cursor_draw(v3270 *widget); | |
| 96 | + | |
| 97 | + G_GNUC_INTERNAL void v3270_draw_oia(v3270 *terminal, cairo_t *cr, int row, int cols); | |
| 98 | + G_GNUC_INTERNAL void v3270_update_mouse_pointer(GtkWidget *widget); | |
| 99 | + | |
| 100 | + G_GNUC_INTERNAL AtkObject * v3270_get_accessible(GtkWidget * widget); | |
| 101 | + | |
| 102 | + #if ! GTK_CHECK_VERSION(2,18,0) | |
| 103 | + G_GNUC_INTERNAL void gtk_widget_get_allocation(GtkWidget *widget,GtkAllocation *allocation); | |
| 104 | + #endif // !GTK(2,18) | |
| 105 | + | |
| 106 | + #if ! GTK_CHECK_VERSION(2,20,0) | |
| 107 | + #define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED(w) | |
| 108 | + #define gtk_widget_set_realized(w,r) if(r) { GTK_WIDGET_SET_FLAGS(w,GTK_REALIZED); } else { GTK_WIDGET_UNSET_FLAGS(w,GTK_REALIZED); } | |
| 109 | + #endif // !GTK(2,20) | |
| 110 | + | |
| 111 | + #if ! GTK_CHECK_VERSION(2,22,0) | |
| 112 | + #define gtk_accessible_set_widget(a,w) g_object_set_data(G_OBJECT(a),"widget",w) | |
| 113 | + #define gtk_accessible_get_widget(a) GTK_WIDGET(g_object_get_data(G_OBJECT(a),"widget")) | |
| 114 | + | |
| 115 | + G_GNUC_INTERNAL cairo_surface_t * gdk_window_create_similar_surface(GdkWindow *window, cairo_content_t content, int width, int height); | |
| 116 | + | |
| 117 | + #endif // !GTK(2,22) | |
| 118 | + | |
| 119 | + #if ! GTK_CHECK_VERSION(3,0,0) | |
| 120 | + gboolean v3270_expose(GtkWidget * widget, GdkEventExpose *event); | |
| 121 | + #endif // GTK 3 | |
| 122 | + | |
| 123 | + G_GNUC_INTERNAL void v3270_draw_shift_status(v3270 *terminal); | |
| 124 | + G_GNUC_INTERNAL void v3270_draw_alt_status(v3270 *terminal); | |
| 125 | + G_GNUC_INTERNAL void v3270_draw_ins_status(v3270 *terminal); | |
| 126 | + | |
| 127 | + G_GNUC_INTERNAL void v3270_clear_clipboard(v3270 *terminal); | |
| 128 | + | |
| 129 | + G_GNUC_INTERNAL void v3270_update_cursor_surface(v3270 *widget,unsigned char chr,unsigned short attr); | |
| 130 | + | |
| 131 | + G_GNUC_INTERNAL void v3270_register_io_handlers(v3270Class *cls); | |
| 132 | + | |
| 133 | + 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); | |
| 134 | + G_GNUC_INTERNAL void v3270_draw_text(cairo_t *cr, const GdkRectangle *rect, v3270FontInfo *font, const char *str); | |
| 135 | + G_GNUC_INTERNAL void v3270_draw_text_at(cairo_t *cr, int x, int y, v3270FontInfo *font, const char *str); | |
| 136 | + | |
| 137 | + G_GNUC_INTERNAL void v3270_start_timer(GtkWidget *terminal); | |
| 138 | + G_GNUC_INTERNAL void v3270_stop_timer(GtkWidget *terminal); | |
| 139 | + | |
| 140 | + G_GNUC_INTERNAL void v3270_draw_connection(cairo_t *cr, H3270 *host, v3270FontInfo *metrics, GdkRGBA *color, const GdkRectangle *rect); | |
| 141 | + | |
| 142 | + G_GNUC_INTERNAL void v3270_draw_ssl_status(v3270 *widget, cairo_t *cr, GdkRectangle *rect); | |
| 143 | + | |
| 144 | + G_GNUC_INTERNAL void v3270_update_char(H3270 *session, int addr, unsigned char chr, unsigned short attr, unsigned char cursor); | |
| 145 | + | |
| 146 | + G_GNUC_INTERNAL void v3270_update_font_metrics(v3270 *terminal, cairo_t *cr, unsigned int width, unsigned int height); | |
| 147 | + | |
| 148 | + G_GNUC_INTERNAL void v3270_update_cursor_rect(v3270 *widget, GdkRectangle *rect, unsigned char chr, unsigned short attr); | |
| 149 | + | |
| 150 | + G_GNUC_INTERNAL void v3270_update_message(v3270 *widget, LIB3270_MESSAGE id); | |
| 151 | + G_GNUC_INTERNAL void v3270_update_cursor(H3270 *session, unsigned short row, unsigned short col, unsigned char c, unsigned short attr); | |
| 152 | + G_GNUC_INTERNAL void v3270_update_oia(v3270 *terminal, LIB3270_FLAG id, unsigned char on); | |
| 153 | + | |
| 154 | + G_GNUC_INTERNAL void v3270_blink_ssl(v3270 *terminal); | |
| 155 | + | |
| 156 | + G_GNUC_INTERNAL void v3270_update_luname(GtkWidget *widget,const gchar *name); | |
| 157 | + G_GNUC_INTERNAL void v3270_init_properties(GObjectClass * gobject_class); | |
| 158 | + G_GNUC_INTERNAL void v3270_queue_draw_area(GtkWidget *widget, gint x, gint y, gint width, gint height); | |
| 159 | + | |
| 160 | + G_GNUC_INTERNAL void v3270_disable_updates(GtkWidget *widget); | |
| 161 | + G_GNUC_INTERNAL void v3270_enable_updates(GtkWidget *widget); | |
| 162 | + | |
| 163 | + // Keyboard & Mouse | |
| 164 | + 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); | |
| 166 | + G_GNUC_INTERNAL void v3270_key_commit(GtkIMContext *imcontext, gchar *str, v3270 *widget); | |
| 167 | + G_GNUC_INTERNAL gboolean v3270_button_press_event(GtkWidget *widget, GdkEventButton *event); | |
| 168 | + G_GNUC_INTERNAL gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event); | |
| 169 | + G_GNUC_INTERNAL gboolean v3270_motion_notify_event(GtkWidget *widget, GdkEventMotion *event); | |
| 170 | + G_GNUC_INTERNAL void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event); | |
| 171 | + G_GNUC_INTERNAL gint v3270_get_offset_at_point(v3270 *widget, gint x, gint y); | |
| 172 | + G_GNUC_INTERNAL gboolean v3270_scroll_event(GtkWidget *widget, GdkEventScroll *event); | |
| 173 | + | |
| 174 | + // I/O Callbacks | |
| 175 | + 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); | |
| 176 | + G_GNUC_INTERNAL void IO_source_set_state(GSource *source, gboolean enable); | |
| 177 | + | |
| 178 | +G_END_DECLS | |
| 92 | 179 | |
| 93 | 180 | #endif // V3270_INTERNALS_H_INCLUDED | ... | ... |
src/include/v3270.h
src/terminal/accessible.c
src/terminal/blink.c
src/terminal/callbacks.c
src/terminal/draw.c
src/terminal/iocallback.c
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | #include <config.h> |
| 31 | 31 | #include <lib3270.h> |
| 32 | 32 | #include <lib3270/log.h> |
| 33 | +#include <internals.h> | |
| 33 | 34 | #include "private.h" |
| 34 | 35 | |
| 35 | 36 | static void * static_AddSource(H3270 *session, int fd, LIB3270_IO_FLAG flag, void(*proc)(H3270 *, int, LIB3270_IO_FLAG, void *), void *userdata); | ... | ... |
src/terminal/keyboard.c
src/terminal/linux/iosource.c
src/terminal/mouse.c
src/terminal/oia.c
src/terminal/private.h
| ... | ... | @@ -182,44 +182,8 @@ G_BEGIN_DECLS |
| 182 | 182 | GSource * timer; /**< @brief Timer source. */ |
| 183 | 183 | } blink; |
| 184 | 184 | |
| 185 | - /* | |
| 186 | - // Scripting | |
| 187 | - struct | |
| 188 | - { | |
| 189 | - int blink : 1; | |
| 190 | - gchar id; ///< Script indicator | |
| 191 | - GSource * timer; | |
| 192 | - } script; | |
| 193 | - */ | |
| 194 | - | |
| 195 | 185 | }; |
| 196 | 186 | |
| 197 | -/*--[ Properties ]-----------------------------------------------------------------------------------*/ | |
| 198 | - | |
| 199 | - /* | |
| 200 | - enum | |
| 201 | - { | |
| 202 | - PROP_0, | |
| 203 | - | |
| 204 | - // Construct | |
| 205 | - PROP_TYPE, | |
| 206 | - | |
| 207 | - // Widget properties | |
| 208 | - PROP_ONLINE, | |
| 209 | - PROP_SELECTION, | |
| 210 | - PROP_MODEL, | |
| 211 | - PROP_LUNAME, | |
| 212 | - PROP_AUTO_DISCONNECT, | |
| 213 | - PROP_URL, | |
| 214 | - PROP_SESSION_NAME, | |
| 215 | - | |
| 216 | - // Toggles - always the last one, the real values are PROP_TOGGLE+LIB3270_TOGGLE | |
| 217 | - PROP_TOGGLE | |
| 218 | - }; | |
| 219 | - | |
| 220 | - #define PROP_LAST (PROP_TOGGLE+LIB3270_TOGGLE_COUNT) | |
| 221 | - */ | |
| 222 | - | |
| 223 | 187 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
| 224 | 188 | |
| 225 | 189 | G_GNUC_INTERNAL guint v3270_widget_signal[V3270_LAST_SIGNAL]; |
| ... | ... | @@ -260,6 +224,7 @@ G_BEGIN_DECLS |
| 260 | 224 | |
| 261 | 225 | /*--[ Prototipes ]-----------------------------------------------------------------------------------*/ |
| 262 | 226 | |
| 227 | +/* | |
| 263 | 228 | const GtkWidgetClass * v3270_get_parent_class(void); |
| 264 | 229 | |
| 265 | 230 | G_GNUC_INTERNAL gboolean v3270_draw(GtkWidget * widget, cairo_t * cr); |
| ... | ... | @@ -346,5 +311,6 @@ G_GNUC_INTERNAL gboolean v3270_scroll_event(GtkWidget *widget, GdkEventScroll * |
| 346 | 311 | // I/O Callbacks |
| 347 | 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); |
| 348 | 313 | G_GNUC_INTERNAL void IO_source_set_state(GSource *source, gboolean enable); |
| 314 | +*/ | |
| 349 | 315 | |
| 350 | 316 | G_END_DECLS | ... | ... |
src/terminal/selection.c