Commit af9615e4ba8f2f1a45caec88799077b55cc93549
1 parent
0058af64
Exists in
master
Incluindo sinal quando o conteudo da tela muda,acertando funcoes de seleção para…
… usar a estrutura de sessão
Showing
3 changed files
with
11 additions
and
7 deletions
Show diff stats
latest/src/gtk2/mouse.c
@@ -924,7 +924,7 @@ | @@ -924,7 +924,7 @@ | ||
924 | SetSelectionMode(Toggled(RECTANGLE_SELECT) ? SELECT_MODE_RECTANGLE : SELECT_MODE_TEXT); | 924 | SetSelectionMode(Toggled(RECTANGLE_SELECT) ? SELECT_MODE_RECTANGLE : SELECT_MODE_TEXT); |
925 | } | 925 | } |
926 | 926 | ||
927 | - static void doSelect(int (*call)(void)) | 927 | + static void doSelect(H3270 *hSession, int (*call)(H3270 *hSession)) |
928 | { | 928 | { |
929 | int row; | 929 | int row; |
930 | int col; | 930 | int col; |
@@ -937,7 +937,7 @@ | @@ -937,7 +937,7 @@ | ||
937 | startCol = endCol = (cursor_position % screen->cols); | 937 | startCol = endCol = (cursor_position % screen->cols); |
938 | } | 938 | } |
939 | 939 | ||
940 | - call(); | 940 | + call(hSession); |
941 | 941 | ||
942 | row = cursor_position / screen->cols; | 942 | row = cursor_position / screen->cols; |
943 | col = cursor_position % screen->cols; | 943 | col = cursor_position % screen->cols; |
@@ -950,22 +950,22 @@ | @@ -950,22 +950,22 @@ | ||
950 | 950 | ||
951 | PW3270_ACTION( selectleft ) | 951 | PW3270_ACTION( selectleft ) |
952 | { | 952 | { |
953 | - doSelect(lib3270_cursor_left); | 953 | + doSelect(hSession,lib3270_cursor_left); |
954 | } | 954 | } |
955 | 955 | ||
956 | PW3270_ACTION( selectright ) | 956 | PW3270_ACTION( selectright ) |
957 | { | 957 | { |
958 | - doSelect(lib3270_cursor_right); | 958 | + doSelect(hSession,lib3270_cursor_right); |
959 | } | 959 | } |
960 | 960 | ||
961 | PW3270_ACTION( selectup ) | 961 | PW3270_ACTION( selectup ) |
962 | { | 962 | { |
963 | - doSelect(lib3270_cursor_up); | 963 | + doSelect(hSession,lib3270_cursor_up); |
964 | } | 964 | } |
965 | 965 | ||
966 | PW3270_ACTION( selectdown ) | 966 | PW3270_ACTION( selectdown ) |
967 | { | 967 | { |
968 | - doSelect(lib3270_cursor_down); | 968 | + doSelect(hSession,lib3270_cursor_down); |
969 | } | 969 | } |
970 | 970 | ||
971 | static void MoveSelection(int row, int col) | 971 | static void MoveSelection(int row, int col) |
latest/src/include/lib3270/api.h
@@ -272,6 +272,7 @@ | @@ -272,6 +272,7 @@ | ||
272 | /* Session based callbacks */ | 272 | /* Session based callbacks */ |
273 | void (*configure)(H3270 *session, unsigned short rows, unsigned short cols); | 273 | void (*configure)(H3270 *session, unsigned short rows, unsigned short cols); |
274 | void (*update)(H3270 *session, int baddr, unsigned char c, unsigned short attr); | 274 | void (*update)(H3270 *session, int baddr, unsigned char c, unsigned short attr); |
275 | + void (*changed)(H3270 *session, int bstart, int bend); | ||
275 | void (*update_cursor)(H3270 *session, unsigned short row, unsigned short col); | 276 | void (*update_cursor)(H3270 *session, unsigned short row, unsigned short col); |
276 | void (*update_oia)(H3270 *session, OIA_FLAG id, unsigned char on); | 277 | void (*update_oia)(H3270 *session, OIA_FLAG id, unsigned char on); |
277 | void (*set_timer)(H3270 *session, unsigned char on); | 278 | void (*set_timer)(H3270 *session, unsigned char on); |
latest/src/lib/screen.c
@@ -369,7 +369,6 @@ int screen_read(char *dest, int baddr, int count) | @@ -369,7 +369,6 @@ int screen_read(char *dest, int baddr, int count) | ||
369 | /* Display what's in the buffer. */ | 369 | /* Display what's in the buffer. */ |
370 | static void screen_update(H3270 *session, int bstart, int bend) | 370 | static void screen_update(H3270 *session, int bstart, int bend) |
371 | { | 371 | { |
372 | - | ||
373 | int baddr; | 372 | int baddr; |
374 | unsigned short a; | 373 | unsigned short a; |
375 | int attr = COLOR_GREEN; | 374 | int attr = COLOR_GREEN; |
@@ -434,6 +433,10 @@ static void screen_update(H3270 *session, int bstart, int bend) | @@ -434,6 +433,10 @@ static void screen_update(H3270 *session, int bstart, int bend) | ||
434 | } | 433 | } |
435 | 434 | ||
436 | } | 435 | } |
436 | + | ||
437 | + if(session->changed) | ||
438 | + session->changed(session,bstart,bend); | ||
439 | + | ||
437 | } | 440 | } |
438 | 441 | ||
439 | void screen_disp(H3270 *session) | 442 | void screen_disp(H3270 *session) |