Mercurial > emacs
view oldXMenu/ChgPane.c @ 83573:b77b83741308
(w32con_move_cursor, w32con_clear_to_end):
(w32con_clear_frame, w32con_clear_end_of_line):
(w32con_ins_del_lines, w32con_insert_glyphs, w32con_write_glyphs):
(w32con_delete_glyphs, w32con_set_terminal_window):
(scroll_line, w32_sys_ring_bell): Add frame arg.
(w32con_set_terminal_modes, w32con_reset_terminal_modes): Add
terminal arg.
(PICK_FRAME): Remove.
(w32con_write_glyphs): Use frame specific terminal coding.
(one_and_only_w32cons): New global variable.
(initialize_w32_display): Use it for storing hooks.
(create_w32cons_output): New function.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Tue, 15 May 2007 23:03:04 +0000 |
parents | fec5e03aaf59 |
children | d4f6522bb9d2 edf631bdbb7a ec58e5c426ef |
line wrap: on
line source
/* Copyright Massachusetts Institute of Technology 1985 */ #include "copyright.h" /* * XMenu: MIT Project Athena, X Window system menu package * * XMenuChangePane - Change the label of a menu pane. * * Author: Tony Della Fera, DEC * December 19, 1985 * */ #include "XMenuInt.h" int XMenuChangePane(menu, p_num, label) register XMenu *menu; /* Menu object to be modified. */ register int p_num; /* Pane number to be modified. */ char *label; /* Selection label. */ { register XMPane *p_ptr; /* XMPane pointer. */ int label_length; /* Label length in characters. */ int label_width; /* Label width in pixels. */ /* * Check for NULL pointers! */ if (label == NULL) { _XMErrorCode = XME_ARG_BOUNDS; return(XM_FAILURE); } /* * Find the right pane. */ p_ptr = _XMGetPanePtr(menu, p_num); if (p_ptr == NULL) return(XM_FAILURE); /* * Determine label size. */ label_length = strlen(label); label_width = XTextWidth(menu->p_fnt_info, label, label_length); /* * Change the pane data. */ p_ptr->label = label; p_ptr->label_width = label_width; p_ptr->label_length = label_length; /* * Schedule a recompute. */ menu->recompute = 1; /* * Return the pane number just changed. */ _XMErrorCode = XME_NO_ERROR; return(p_num); } /* arch-tag: e267e9de-a3f0-4a0d-8c45-413afa176fd8 (do not change this comment) */