ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvt.h
(Generate patch)

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.555 by sf-exg, Sat May 8 06:16:21 2021 UTC vs.
Revision 1.556 by sf-exg, Thu May 13 19:40:19 2021 UTC

135 * PROTOTYPES 135 * PROTOTYPES
136 ***************************************************************************** 136 *****************************************************************************
137 */ 137 */
138// main.C 138// main.C
139#define SET_LOCALE(locale) rxvt_set_locale (locale) 139#define SET_LOCALE(locale) rxvt_set_locale (locale)
140extern bool rxvt_set_locale (const char *locale) NOTHROW; 140extern bool rxvt_set_locale (const char *locale) noexcept;
141extern void rxvt_push_locale (const char *locale) NOTHROW; 141extern void rxvt_push_locale (const char *locale) noexcept;
142extern void rxvt_pop_locale () NOTHROW; 142extern void rxvt_pop_locale () noexcept;
143void rxvt_init (); 143void rxvt_init ();
144 144
145// misc.C 145// misc.C
146char * rxvt_wcstombs (const wchar_t *str, int len = -1); 146char * rxvt_wcstombs (const wchar_t *str, int len = -1);
147wchar_t * rxvt_mbstowcs (const char *str, int len = -1); 147wchar_t * rxvt_mbstowcs (const char *str, int len = -1);
148char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); 148char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1);
149wchar_t * rxvt_utf8towcs (const char *str, int len = -1); 149wchar_t * rxvt_utf8towcs (const char *str, int len = -1);
150 150
151const char * rxvt_basename (const char *str) NOTHROW; 151const char * rxvt_basename (const char *str) noexcept;
152void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; 152void rxvt_vlog (const char *fmt, va_list arg_ptr) noexcept;
153void rxvt_log (const char *fmt,...) NOTHROW; 153void rxvt_log (const char *fmt,...) noexcept;
154void rxvt_warn (const char *fmt,...) NOTHROW; 154void rxvt_warn (const char *fmt,...) noexcept;
155ecb_noreturn ecb_cold 155ecb_noreturn ecb_cold
156void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)); 156void rxvt_fatal (const char *fmt, ...);
157ecb_noreturn ecb_cold 157ecb_noreturn ecb_cold
158void rxvt_exit_failure () THROW ((class rxvt_failure_exception)); 158void rxvt_exit_failure ();
159 159
160void * rxvt_malloc (size_t size); 160void * rxvt_malloc (size_t size);
161void * rxvt_calloc (size_t number, size_t size); 161void * rxvt_calloc (size_t number, size_t size);
162void * rxvt_realloc (void *ptr, size_t size); 162void * rxvt_realloc (void *ptr, size_t size);
163 163
164char * rxvt_strtrim (char *str) NOTHROW; 164char * rxvt_strtrim (char *str) noexcept;
165char ** rxvt_strsplit (char delim, const char *str) NOTHROW; 165char ** rxvt_strsplit (char delim, const char *str) noexcept;
166 166
167static inline void 167static inline void
168rxvt_free_strsplit (char **ptr) NOTHROW 168rxvt_free_strsplit (char **ptr) noexcept
169{ 169{
170 free (ptr[0]); 170 free (ptr[0]);
171 free (ptr); 171 free (ptr);
172} 172}
173 173
1116#endif 1116#endif
1117 1117
1118#if ENABLE_OVERLAY 1118#if ENABLE_OVERLAY
1119 overlay_base ov; 1119 overlay_base ov;
1120 1120
1121 void scr_swap_overlay () NOTHROW; 1121 void scr_swap_overlay () noexcept;
1122 void scr_overlay_new (int x, int y, int w, int h) NOTHROW; 1122 void scr_overlay_new (int x, int y, int w, int h) noexcept;
1123 void scr_overlay_off () NOTHROW; 1123 void scr_overlay_off () noexcept;
1124 void scr_overlay_set (int x, int y, 1124 void scr_overlay_set (int x, int y,
1125 text_t text, 1125 text_t text,
1126 rend_t rend = OVERLAY_RSTYLE) NOTHROW; 1126 rend_t rend = OVERLAY_RSTYLE) noexcept;
1127 void scr_overlay_set (int x, int y, const char *s) NOTHROW; 1127 void scr_overlay_set (int x, int y, const char *s) noexcept;
1128 void scr_overlay_set (int x, int y, const wchar_t *s) NOTHROW; 1128 void scr_overlay_set (int x, int y, const wchar_t *s) noexcept;
1129#endif 1129#endif
1130 1130
1131 vector<void *> allocated; // free these memory blocks with free() 1131 vector<void *> allocated; // free these memory blocks with free()
1132 1132
1133 int parent_x, parent_y; // parent window position relative to root, only updated on demand 1133 int parent_x, parent_y; // parent window position relative to root, only updated on demand
1174# endif 1174# endif
1175#endif 1175#endif
1176 1176
1177 long vt_emask, vt_emask_perl, vt_emask_xim, vt_emask_mouse; 1177 long vt_emask, vt_emask_perl, vt_emask_xim, vt_emask_mouse;
1178 1178
1179 void vt_select_input () const NOTHROW 1179 void vt_select_input () const noexcept
1180 { 1180 {
1181 XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim | vt_emask_mouse); 1181 XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim | vt_emask_mouse);
1182 } 1182 }
1183 1183
1184#if ENABLE_PERL 1184#if ENABLE_PERL
1248 XPoint spot; // most recently sent spot position 1248 XPoint spot; // most recently sent spot position
1249 1249
1250 void im_destroy (); 1250 void im_destroy ();
1251 void im_cb (); im_watcher im_ev; 1251 void im_cb (); im_watcher im_ev;
1252 void im_set_size (XRectangle &size); 1252 void im_set_size (XRectangle &size);
1253 void im_set_position (XPoint &pos) NOTHROW; 1253 void im_set_position (XPoint &pos) noexcept;
1254 void im_set_color (unsigned long &fg, unsigned long &bg); 1254 void im_set_color (unsigned long &fg, unsigned long &bg);
1255 void im_set_preedit_area (XRectangle &preedit_rect, XRectangle &status_rect, const XRectangle &needed_rect); 1255 void im_set_preedit_area (XRectangle &preedit_rect, XRectangle &status_rect, const XRectangle &needed_rect);
1256 1256
1257 bool im_is_running (); 1257 bool im_is_running ();
1258 void im_send_spot (); 1258 void im_send_spot ();
1262 1262
1263 // command.C 1263 // command.C
1264 void key_press (XKeyEvent &ev); 1264 void key_press (XKeyEvent &ev);
1265 void key_release (XKeyEvent &ev); 1265 void key_release (XKeyEvent &ev);
1266 1266
1267 wchar_t next_char () NOTHROW; 1267 wchar_t next_char () noexcept;
1268 wchar_t cmd_getc () THROW ((class out_of_input)); 1268 wchar_t cmd_getc ();
1269 uint32_t next_octet () NOTHROW; 1269 uint32_t next_octet () noexcept;
1270 uint32_t cmd_get8 () THROW ((class out_of_input)); 1270 uint32_t cmd_get8 ();
1271 1271
1272 void cmd_parse (); 1272 void cmd_parse ();
1273 void mouse_report (XButtonEvent &ev); 1273 void mouse_report (XButtonEvent &ev);
1274 void button_press (XButtonEvent &ev); 1274 void button_press (XButtonEvent &ev);
1275 void button_release (XButtonEvent &ev); 1275 void button_release (XButtonEvent &ev);
1340 void set_widthheight (unsigned int newwidth, unsigned int newheight); 1340 void set_widthheight (unsigned int newwidth, unsigned int newheight);
1341 void get_window_origin (int &x, int &y); 1341 void get_window_origin (int &x, int &y);
1342 1342
1343 // screen.C 1343 // screen.C
1344 1344
1345 bool option (uint8_t opt) const NOTHROW 1345 bool option (uint8_t opt) const noexcept
1346 { 1346 {
1347 return options[opt >> 3] & (1 << (opt & 7)); 1347 return options[opt >> 3] & (1 << (opt & 7));
1348 } 1348 }
1349 1349
1350 void set_option (uint8_t opt, bool set = true) NOTHROW; 1350 void set_option (uint8_t opt, bool set = true) noexcept;
1351 1351
1352 int fgcolor_of (rend_t r) const NOTHROW 1352 int fgcolor_of (rend_t r) const noexcept
1353 { 1353 {
1354 int base = GET_BASEFG (r); 1354 int base = GET_BASEFG (r);
1355#ifndef NO_BRIGHTCOLOR 1355#ifndef NO_BRIGHTCOLOR
1356 if (r & RS_Bold 1356 if (r & RS_Bold
1357# if ENABLE_STYLES 1357# if ENABLE_STYLES
1361 base += minBrightCOLOR - minCOLOR; 1361 base += minBrightCOLOR - minCOLOR;
1362#endif 1362#endif
1363 return base; 1363 return base;
1364 } 1364 }
1365 1365
1366 int bgcolor_of (rend_t r) const NOTHROW 1366 int bgcolor_of (rend_t r) const noexcept
1367 { 1367 {
1368 int base = GET_BASEBG (r); 1368 int base = GET_BASEBG (r);
1369#ifndef NO_BRIGHTCOLOR 1369#ifndef NO_BRIGHTCOLOR
1370 if (r & RS_Blink 1370 if (r & RS_Blink
1371# if ENABLE_STYLES 1371# if ENABLE_STYLES
1376#endif 1376#endif
1377 return base; 1377 return base;
1378 } 1378 }
1379 1379
1380 // modifies first argument(!) 1380 // modifies first argument(!)
1381 void tt_paste (char *data, unsigned int len) NOTHROW; 1381 void tt_paste (char *data, unsigned int len) noexcept;
1382 void paste (char *data, unsigned int len) NOTHROW; 1382 void paste (char *data, unsigned int len) noexcept;
1383 void scr_alloc () NOTHROW; 1383 void scr_alloc () noexcept;
1384 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1384 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const noexcept;
1385 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1385 void scr_blank_screen_mem (line_t &l, rend_t efs) const noexcept;
1386 void scr_kill_char (line_t &l, int col) const NOTHROW; 1386 void scr_kill_char (line_t &l, int col) const noexcept;
1387 void scr_set_char_rend (line_t &l, int col, rend_t rend); 1387 void scr_set_char_rend (line_t &l, int col, rend_t rend);
1388 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1388 int scr_scroll_text (int row1, int row2, int count) noexcept;
1389 void copy_line (line_t &dst, line_t &src); 1389 void copy_line (line_t &dst, line_t &src);
1390 void scr_reset (); 1390 void scr_reset ();
1391 void scr_release () NOTHROW; 1391 void scr_release () noexcept;
1392 void scr_clear (bool really = false) NOTHROW; 1392 void scr_clear (bool really = false) noexcept;
1393 void scr_refresh () NOTHROW; 1393 void scr_refresh () noexcept;
1394 bool scr_refresh_rend (rend_t mask, rend_t value) NOTHROW; 1394 bool scr_refresh_rend (rend_t mask, rend_t value) noexcept;
1395 void scr_erase_screen (int mode) NOTHROW; 1395 void scr_erase_screen (int mode) noexcept;
1396#if ENABLE_FRILLS 1396#if ENABLE_FRILLS
1397 void scr_erase_savelines () NOTHROW; 1397 void scr_erase_savelines () noexcept;
1398 void scr_backindex () NOTHROW; 1398 void scr_backindex () noexcept;
1399 void scr_forwardindex () NOTHROW; 1399 void scr_forwardindex () noexcept;
1400#endif 1400#endif
1401 void scr_touch (bool refresh) NOTHROW; 1401 void scr_touch (bool refresh) noexcept;
1402 void scr_expose (int x, int y, int width, int height, bool refresh) NOTHROW; 1402 void scr_expose (int x, int y, int width, int height, bool refresh) noexcept;
1403 void scr_recolor (bool refresh = true) NOTHROW; 1403 void scr_recolor (bool refresh = true) noexcept;
1404 void scr_remap_chars () NOTHROW; 1404 void scr_remap_chars () noexcept;
1405 void scr_remap_chars (line_t &l) NOTHROW; 1405 void scr_remap_chars (line_t &l) noexcept;
1406 1406
1407 enum cursor_mode { SAVE, RESTORE }; 1407 enum cursor_mode { SAVE, RESTORE };
1408 1408
1409 void scr_poweron (); 1409 void scr_poweron ();
1410 void scr_soft_reset () NOTHROW; 1410 void scr_soft_reset () noexcept;
1411 void scr_cursor (cursor_mode mode) NOTHROW; 1411 void scr_cursor (cursor_mode mode) noexcept;
1412 void scr_do_wrap () NOTHROW; 1412 void scr_do_wrap () noexcept;
1413 void scr_swap_screen () NOTHROW; 1413 void scr_swap_screen () noexcept;
1414 void scr_change_screen (int scrn); 1414 void scr_change_screen (int scrn);
1415 void scr_color (unsigned int color, int fgbg) NOTHROW; 1415 void scr_color (unsigned int color, int fgbg) noexcept;
1416 void scr_rendition (int set, int style) NOTHROW; 1416 void scr_rendition (int set, int style) noexcept;
1417 void scr_add_lines (const wchar_t *str, int len, int minlines = 0) NOTHROW; 1417 void scr_add_lines (const wchar_t *str, int len, int minlines = 0) noexcept;
1418 void scr_backspace () NOTHROW; 1418 void scr_backspace () noexcept;
1419 void scr_tab (int count, bool ht = false) NOTHROW; 1419 void scr_tab (int count, bool ht = false) noexcept;
1420 void scr_gotorc (int row, int col, int relative) NOTHROW; 1420 void scr_gotorc (int row, int col, int relative) noexcept;
1421 void scr_index (enum page_dirn direction) NOTHROW; 1421 void scr_index (enum page_dirn direction) noexcept;
1422 void scr_erase_line (int mode) NOTHROW; 1422 void scr_erase_line (int mode) noexcept;
1423 void scr_E () NOTHROW; 1423 void scr_E () noexcept;
1424 void scr_insdel_lines (int count, int insdel) NOTHROW; 1424 void scr_insdel_lines (int count, int insdel) noexcept;
1425 void scr_insdel_chars (int count, int insdel) NOTHROW; 1425 void scr_insdel_chars (int count, int insdel) noexcept;
1426 void scr_scroll_region (int top, int bot) NOTHROW; 1426 void scr_scroll_region (int top, int bot) noexcept;
1427 void scr_cursor_visible (int mode) NOTHROW; 1427 void scr_cursor_visible (int mode) noexcept;
1428 void scr_autowrap (int mode) NOTHROW; 1428 void scr_autowrap (int mode) noexcept;
1429 void scr_relative_origin (int mode) NOTHROW; 1429 void scr_relative_origin (int mode) noexcept;
1430 void scr_insert_mode (int mode) NOTHROW; 1430 void scr_insert_mode (int mode) noexcept;
1431 void scr_set_tab (int mode) NOTHROW; 1431 void scr_set_tab (int mode) noexcept;
1432 void scr_rvideo_mode (bool on) NOTHROW; 1432 void scr_rvideo_mode (bool on) noexcept;
1433 void scr_report_position () NOTHROW; 1433 void scr_report_position () noexcept;
1434 void set_font_style () NOTHROW; 1434 void set_font_style () noexcept;
1435 void scr_charset_choose (int set) NOTHROW; 1435 void scr_charset_choose (int set) noexcept;
1436 void scr_charset_set (int set, unsigned int ch) NOTHROW; 1436 void scr_charset_set (int set, unsigned int ch) noexcept;
1437 void scr_move_to (int y, int len) NOTHROW; 1437 void scr_move_to (int y, int len) noexcept;
1438 bool scr_page (int nlines) NOTHROW; 1438 bool scr_page (int nlines) noexcept;
1439 bool scr_page (enum page_dirn direction, int nlines) NOTHROW 1439 bool scr_page (enum page_dirn direction, int nlines) noexcept
1440 { 1440 {
1441 return scr_page (direction * nlines); 1441 return scr_page (direction * nlines);
1442 } 1442 }
1443 bool scr_changeview (int new_view_start) NOTHROW; 1443 bool scr_changeview (int new_view_start) noexcept;
1444 void scr_bell () NOTHROW; 1444 void scr_bell () noexcept;
1445 void scr_printscreen (int fullhist) NOTHROW; 1445 void scr_printscreen (int fullhist) noexcept;
1446 void scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2) NOTHROW; 1446 void scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2) noexcept;
1447 void scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle) NOTHROW; 1447 void scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle) noexcept;
1448 void scr_reverse_selection () NOTHROW; 1448 void scr_reverse_selection () noexcept;
1449 void scr_dump (int fd) NOTHROW; 1449 void scr_dump (int fd) noexcept;
1450 1450
1451 void selection_check (int check_more) NOTHROW; 1451 void selection_check (int check_more) noexcept;
1452 void selection_changed () NOTHROW; /* sets want_refresh, corrects coordinates */ 1452 void selection_changed () noexcept; /* sets want_refresh, corrects coordinates */
1453 void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; 1453 void selection_request (Time tm, int selnum = Sel_Primary) noexcept;
1454 void selection_clear (bool clipboard = false) NOTHROW; 1454 void selection_clear (bool clipboard = false) noexcept;
1455 void selection_make (Time tm); 1455 void selection_make (Time tm);
1456 bool selection_grab (Time tm, bool clipboard = false) NOTHROW; 1456 bool selection_grab (Time tm, bool clipboard = false) noexcept;
1457 void selection_start_colrow (int col, int row) NOTHROW; 1457 void selection_start_colrow (int col, int row) noexcept;
1458 void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW; 1458 void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) noexcept;
1459 void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW; 1459 void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) noexcept;
1460 void selection_remove_trailing_spaces () NOTHROW; 1460 void selection_remove_trailing_spaces () noexcept;
1461 void selection_send (const XSelectionRequestEvent &rq) NOTHROW; 1461 void selection_send (const XSelectionRequestEvent &rq) noexcept;
1462 void selection_click (int clicks, int x, int y) NOTHROW; 1462 void selection_click (int clicks, int x, int y) noexcept;
1463 void selection_extend (int x, int y, int flag) NOTHROW; 1463 void selection_extend (int x, int y, int flag) noexcept;
1464 void selection_rotate (int x, int y) NOTHROW; 1464 void selection_rotate (int x, int y) noexcept;
1465 1465
1466 // xdefaults.C 1466 // xdefaults.C
1467 void rxvt_usage (int type); 1467 void rxvt_usage (int type);
1468 const char **get_options (int argc, const char *const *argv); 1468 const char **get_options (int argc, const char *const *argv);
1469 int parse_keysym (const char *str, unsigned int &state); 1469 int parse_keysym (const char *str, unsigned int &state);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines