[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/oldXMenu/Internal.c
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/oldXMenu/Internal.c |
Date: |
Fri, 04 Apr 2003 01:23:43 -0500 |
Index: emacs/oldXMenu/Internal.c
diff -c emacs/oldXMenu/Internal.c:1.1 emacs/oldXMenu/Internal.c:1.2
*** emacs/oldXMenu/Internal.c:1.1 Sun Oct 3 15:35:07 1999
--- emacs/oldXMenu/Internal.c Tue Feb 4 09:19:01 2003
***************
*** 1,6 ****
#include "copyright.h"
! /* $Header: /cvsroot/emacs/emacs/oldXMenu/Internal.c,v 1.1 1999/10/03
19:35:07 fx Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
--- 1,6 ----
#include "copyright.h"
! /* $Header: /cvsroot/emacs/emacs/oldXMenu/Internal.c,v 1.2 2003/02/04
14:19:01 lektu Exp $ */
/* Copyright Massachusetts Institute of Technology 1985 */
/*
***************
*** 51,57 ****
/*
* _XMErrorCode - Global XMenu error code.
*/
! int _XMErrorCode = XME_NO_ERROR;
/*
* _XMErrorList - Global XMenu error code description strings.
*/
--- 51,57 ----
/*
* _XMErrorCode - Global XMenu error code.
*/
! int _XMErrorCode = XME_NO_ERROR;
/*
* _XMErrorList - Global XMenu error code description strings.
*/
***************
*** 204,210 ****
/*
* If the pane window queue is not empty...
*/
!
if (_XMWinQue.pq_size > 0) {
/*
* set up attributes for pane window to be created.
--- 204,210 ----
/*
* If the pane window queue is not empty...
*/
!
if (_XMWinQue.pq_size > 0) {
/*
* set up attributes for pane window to be created.
***************
*** 214,220 ****
attributes->border_pixel = menu->p_bdr_color;
attributes->background_pixmap = menu->inact_pixmap;
attributes->override_redirect = True;
!
/*
* Create all the pending panes in order, so that the
* current pane will be on top, with the others
--- 214,220 ----
attributes->border_pixel = menu->p_bdr_color;
attributes->background_pixmap = menu->inact_pixmap;
attributes->override_redirect = True;
!
/*
* Create all the pending panes in order, so that the
* current pane will be on top, with the others
***************
*** 222,228 ****
*/
for (pq_index = _XMWinQue.pq_size - 1;
pq_index >= 0;
! pq_index--)
{
p_ptr = _XMWinQue.pq[pq_index]; /* Retrieve next pane. */
if (p_ptr == pane) break;
--- 222,228 ----
*/
for (pq_index = _XMWinQue.pq_size - 1;
pq_index >= 0;
! pq_index--)
{
p_ptr = _XMWinQue.pq[pq_index]; /* Retrieve next pane. */
if (p_ptr == pane) break;
***************
*** 243,249 ****
}
for (pq_index = 0;
pq_index < _XMWinQue.pq_size;
! pq_index++)
{
p_ptr = _XMWinQue.pq[pq_index]; /* Retrieve next pane. */
p_ptr->window = XCreateWindow(display,
--- 243,249 ----
}
for (pq_index = 0;
pq_index < _XMWinQue.pq_size;
! pq_index++)
{
p_ptr = _XMWinQue.pq[pq_index]; /* Retrieve next pane. */
p_ptr->window = XCreateWindow(display,
***************
*** 273,279 ****
/*
* If the selection window queue is not empty...
*/
!
if (_XMWinQue.sq_size > 0) {
for (sq_index = 0; sq_index < _XMWinQue.sq_size; sq_index++) {
--- 273,279 ----
/*
* If the selection window queue is not empty...
*/
!
if (_XMWinQue.sq_size > 0) {
for (sq_index = 0; sq_index < _XMWinQue.sq_size; sq_index++) {
***************
*** 293,302 ****
CopyFromParent,
0,
attributes);
!
/*
* Insert the new window id and its
! * associated XMSelect structure into the
* association table.
*/
XMakeAssoc(display, menu->assoc_tab, s_ptr->window, s_ptr);
--- 293,302 ----
CopyFromParent,
0,
attributes);
!
/*
* Insert the new window id and its
! * associated XMSelect structure into the
* association table.
*/
XMakeAssoc(display, menu->assoc_tab, s_ptr->window, s_ptr);
***************
*** 371,377 ****
{
register XMSelect *s_ptr; /* Selection pointer to be returned. */
register int i; /* Loop counter. */
!
/*
* Is the selection number out of range?
*/
--- 371,377 ----
{
register XMSelect *s_ptr; /* Selection pointer to be returned. */
register int i; /* Loop counter. */
!
/*
* Is the selection number out of range?
*/
***************
*** 400,406 ****
* global values.
*/
_XMRecomputeGlobals(display, menu)
! register Display *display; /*X11 display variable. */
register XMenu *menu; /* Menu object to compute from. */
{
register XMPane *p_ptr; /* Pane pointer. */
--- 400,406 ----
* global values.
*/
_XMRecomputeGlobals(display, menu)
! register Display *display; /*X11 display variable. */
register XMenu *menu; /* Menu object to compute from. */
{
register XMPane *p_ptr; /* Pane pointer. */
***************
*** 418,424 ****
int s_width; /* Selection window width. */
int screen; /* DefaultScreen holder. */
!
/*
* For each pane...
*/
--- 418,424 ----
int s_width; /* Selection window width. */
int screen; /* DefaultScreen holder. */
!
/*
* For each pane...
*/
***************
*** 427,440 ****
p_ptr != menu->p_list;
p_ptr = p_ptr->next
){
!
/*
* Recompute maximum pane label width.
*/
max_p_label = max(max_p_label, p_ptr->label_width);
/*
! * Recompute maximum selection count.
*/
s_count = max(s_count, p_ptr->s_count);
--- 427,440 ----
p_ptr != menu->p_list;
p_ptr = p_ptr->next
){
!
/*
* Recompute maximum pane label width.
*/
max_p_label = max(max_p_label, p_ptr->label_width);
/*
! * Recompute maximum selection count.
*/
s_count = max(s_count, p_ptr->s_count);
***************
*** 495,501 ****
menu->p_width = p_width;
menu->s_width = s_width;
! /*
* Ensure that the origin of the menu is placed so that
* None of the panes ore selections are off the screen.
*/
--- 495,501 ----
menu->p_width = p_width;
menu->s_width = s_width;
! /*
* Ensure that the origin of the menu is placed so that
* None of the panes ore selections are off the screen.
*/
***************
*** 522,531 ****
{
register int window_x; /* Recomputed window X coordinate. */
register int window_y; /* Recomputed window Y coordinate. */
!
unsigned long change_mask; /* Value mask to reconfigure window. */
XWindowChanges *changes; /* Values to use in configure window. */
!
register Bool config_p = False; /* Reconfigure pane window? */
/*
--- 522,531 ----
{
register int window_x; /* Recomputed window X coordinate. */
register int window_y; /* Recomputed window Y coordinate. */
!
unsigned long change_mask; /* Value mask to reconfigure window. */
XWindowChanges *changes; /* Values to use in configure window. */
!
register Bool config_p = False; /* Reconfigure pane window? */
/*
***************
*** 558,564 ****
window_y += menu->y_pos;
/*
! * If the newly compute pane coordinates differ from the
* current coordinates, reset the current coordinates and
* reconfigure the pane.
*/
--- 558,564 ----
window_y += menu->y_pos;
/*
! * If the newly compute pane coordinates differ from the
* current coordinates, reset the current coordinates and
* reconfigure the pane.
*/
***************
*** 608,614 ****
changes->y = p_ptr->window_y;
changes->width = p_ptr->window_w;
changes->height = p_ptr->window_h;
!
XConfigureWindow(
display,
p_ptr->window,
--- 608,614 ----
changes->y = p_ptr->window_y;
changes->width = p_ptr->window_w;
changes->height = p_ptr->window_h;
!
XConfigureWindow(
display,
p_ptr->window,
***************
*** 616,622 ****
changes
);
free(changes);
!
}
else {
if (_XMWinQueAddPane(display, menu, p_ptr) == _FAILURE) {
--- 616,622 ----
changes
);
free(changes);
!
}
else {
if (_XMWinQueAddPane(display, menu, p_ptr) == _FAILURE) {
***************
*** 624,630 ****
}
}
}
!
/*
* Recompute label X position.
*/
--- 624,630 ----
}
}
}
!
/*
* Recompute label X position.
*/
***************
*** 673,679 ****
register Bool config_s = False; /* Reconfigure selection window? */
XWindowChanges *changes; /* Values to change in configure. */
unsigned long change_mask; /* Value mask for
XConfigureWindow. */
!
/*
* If the selection serial numbers are out of order, begin
* resequencing selections. Recompute selection window coordinates
--- 673,679 ----
register Bool config_s = False; /* Reconfigure selection window? */
XWindowChanges *changes; /* Values to change in configure. */
unsigned long change_mask; /* Value mask for
XConfigureWindow. */
!
/*
* If the selection serial numbers are out of order, begin
* resequencing selections. Recompute selection window coordinates
***************
*** 735,741 ****
changes->y = s_ptr->window_y;
changes->width = s_ptr->window_w;
changes->height = s_ptr->window_h;
!
XConfigureWindow(
display,
s_ptr->window,
--- 735,741 ----
changes->y = s_ptr->window_y;
changes->width = s_ptr->window_w;
changes->height = s_ptr->window_h;
!
XConfigureWindow(
display,
s_ptr->window,
***************
*** 743,749 ****
changes
);
free(changes);
!
}
else {
if (_XMWinQueAddSelection(display, menu, s_ptr) == _FAILURE) {
--- 743,749 ----
changes
);
free(changes);
!
}
else {
if (_XMWinQueAddSelection(display, menu, s_ptr) == _FAILURE) {
***************
*** 775,781 ****
* Recompute label Y position.
*/
s_ptr->label_y = s_ptr->window_y + menu->s_fnt_info->max_bounds.ascent +
menu->s_fnt_pad + menu->s_bdr_width;
!
/*
* All went well, return successfully.
*/
--- 775,781 ----
* Recompute label Y position.
*/
s_ptr->label_y = s_ptr->window_y + menu->s_fnt_info->max_bounds.ascent +
menu->s_fnt_pad + menu->s_bdr_width;
!
/*
* All went well, return successfully.
*/
***************
*** 787,793 ****
/*
* _XMTransToOrigin - Internal subroutine to translate the point at
! * the center of the current pane and selection to the
* the menu origin.
*
* WARNING! ****** Be certain that all menu dependencies have been
--- 787,793 ----
/*
* _XMTransToOrigin - Internal subroutine to translate the point at
! * the center of the current pane and selection to the
* the menu origin.
*
* WARNING! ****** Be certain that all menu dependencies have been
***************
*** 806,812 ****
{
register int l_orig_x; /* Local X coordinate of the menu origin. */
register int l_orig_y; /* Local Y coordinate of the menu origin. */
!
/*
* Translate the menu origin such that the cursor hot point will be in the
* center of the desired current selection and pane.
--- 806,812 ----
{
register int l_orig_x; /* Local X coordinate of the menu origin. */
register int l_orig_y; /* Local Y coordinate of the menu origin. */
!
/*
* Translate the menu origin such that the cursor hot point will be in the
* center of the desired current selection and pane.
***************
*** 863,869 ****
register XMSelect *s_ptr;
/*
! * First clear the pane.
*/
XClearWindow(display, pane->window);
if (!pane->activated) {
--- 863,869 ----
register XMSelect *s_ptr;
/*
! * First clear the pane.
*/
XClearWindow(display, pane->window);
if (!pane->activated) {
***************
*** 916,927 ****
}
}
}
!
!
/*
! * _XMRefreshSelection - Internal subroutine that refreshes
* a single selection window.
*/
_XMRefreshSelection(display, menu, select)
--- 916,927 ----
}
}
}
!
!
/*
! * _XMRefreshSelection - Internal subroutine that refreshes
* a single selection window.
*/
_XMRefreshSelection(display, menu, select)
***************
*** 932,938 ****
register int width = select->window_w;
register int height = select->window_h;
register int bdr_width = menu->s_bdr_width;
!
if (select->type == SEPARATOR) {
XDrawLine(display,
select->parent_p->window,
--- 932,938 ----
register int width = select->window_w;
register int height = select->window_h;
register int bdr_width = menu->s_bdr_width;
!
if (select->type == SEPARATOR) {
XDrawLine(display,
select->parent_p->window,
***************
*** 944,954 ****
}
else if (select->activated) {
if (menu->menu_mode == INVERT) {
! XFillRectangle(display,
select->parent_p->window,
menu->normal_select_GC,
select->window_x, select->window_y,
! width, height);
XDrawString(display,
select->parent_p->window,
menu->inverse_select_GC,
--- 944,954 ----
}
else if (select->activated) {
if (menu->menu_mode == INVERT) {
! XFillRectangle(display,
select->parent_p->window,
menu->normal_select_GC,
select->window_x, select->window_y,
! width, height);
XDrawString(display,
select->parent_p->window,
menu->inverse_select_GC,
***************
*** 963,969 ****
* are slow compared to raster-ops lets use a raster-op to
* draw the boxes.
*/
!
XDrawRectangle(display,
select->parent_p->window,
menu->normal_select_GC,
--- 963,969 ----
* are slow compared to raster-ops lets use a raster-op to
* draw the boxes.
*/
!
XDrawRectangle(display,
select->parent_p->window,
menu->normal_select_GC,
***************
*** 980,986 ****
}
}
else {
! XClearArea(display,
select->parent_p->window,
select->window_x, select->window_y,
width, height,
--- 980,986 ----
}
}
else {
! XClearArea(display,
select->parent_p->window,
select->window_x, select->window_y,
width, height,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/oldXMenu/Internal.c,
Miles Bader <=