- Timestamp:
- Jun 9, 2003, 10:54:18 AM (20 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 6bf73ce
- Parents:
- d559df9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
popwin.c
r1aee7d9 rb2b0773 3 3 static const char fileIdent[] = "$Id$"; 4 4 5 int owl_popwin_init(owl_popwin *pw) { 5 int owl_popwin_init(owl_popwin *pw) 6 { 6 7 pw->active=0; 7 8 pw->needsfirstrefresh=0; … … 11 12 } 12 13 13 int owl_popwin_up(owl_popwin *pw) { 14 int owl_popwin_up(owl_popwin *pw) 15 { 14 16 int glines, gcols, startcol, startline; 15 17 … … 50 52 } 51 53 52 int owl_popwin_display_text(owl_popwin *pw, char *text) { 54 int owl_popwin_display_text(owl_popwin *pw, char *text) 55 { 53 56 waddstr(pw->popwin, text); 54 57 wnoutrefresh(pw->popwin); … … 59 62 } 60 63 61 int owl_popwin_close(owl_popwin *pw) { 64 int owl_popwin_close(owl_popwin *pw) 65 { 62 66 delwin(pw->popwin); 63 67 delwin(pw->borderwin); … … 69 73 } 70 74 71 int owl_popwin_is_active(owl_popwin *pw) { 75 int owl_popwin_is_active(owl_popwin *pw) 76 { 72 77 if (pw->active==1) return(1); 73 78 return(0); 74 79 } 75 80 76 int owl_popwin_refresh(owl_popwin *pw) { 77 /* this will refresh the border as well as the text area */ 81 /* this will refresh the border as well as the text area */ 82 int owl_popwin_refresh(owl_popwin *pw) 83 { 78 84 touchwin(pw->borderwin); 79 85 touchwin(pw->popwin); … … 85 91 } 86 92 87 void owl_popwin_set_handler(owl_popwin *pw, void (*func)(int ch)) { 93 void owl_popwin_set_handler(owl_popwin *pw, void (*func)(int ch)) 94 { 88 95 pw->handler=func; 89 96 } 90 97 91 void owl_popwin_unset_handler(owl_popwin *pw) { 98 void owl_popwin_unset_handler(owl_popwin *pw) 99 { 92 100 pw->handler=NULL; 93 101 } 94 102 95 WINDOW *owl_popwin_get_curswin(owl_popwin *pw) { 103 WINDOW *owl_popwin_get_curswin(owl_popwin *pw) 104 { 96 105 return(pw->popwin); 97 106 } 98 107 99 int owl_popwin_get_lines(owl_popwin *pw) { 108 int owl_popwin_get_lines(owl_popwin *pw) 109 { 100 110 return(pw->lines-2); 101 111 } 102 112 103 int owl_popwin_get_cols(owl_popwin *pw) { 113 int owl_popwin_get_cols(owl_popwin *pw) 114 { 104 115 return(pw->cols-2); 105 116 } 106 117 107 int owl_popwin_needs_first_refresh(owl_popwin *pw) { 118 int owl_popwin_needs_first_refresh(owl_popwin *pw) 119 { 108 120 if (pw->needsfirstrefresh) return(1); 109 121 return(0); 110 122 } 111 123 112 void owl_popwin_no_needs_first_refresh(owl_popwin *pw) { 124 void owl_popwin_no_needs_first_refresh(owl_popwin *pw) 125 { 113 126 pw->needsfirstrefresh=0; 114 127 }
Note: See TracChangeset
for help on using the changeset viewer.