[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/widget.c
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/widget.c |
Date: |
Sat, 24 May 2003 18:07:04 -0400 |
Index: emacs/src/widget.c
diff -c emacs/src/widget.c:1.68 emacs/src/widget.c:1.69
*** emacs/src/widget.c:1.68 Wed Mar 12 07:12:25 2003
--- emacs/src/widget.c Sat May 24 18:07:03 2003
***************
*** 183,190 ****
int* pixel_height;
{
struct frame* f = ew->emacs_frame.frame;
! *pixel_width = FONT_WIDTH (f->output_data.x->font);
! *pixel_height = f->output_data.x->line_height;
}
static void
--- 183,190 ----
int* pixel_height;
{
struct frame* f = ew->emacs_frame.frame;
! *pixel_width = FRAME_COLUMN_WIDTH (f);
! *pixel_height = FRAME_LINE_HEIGHT (f);
}
static void
***************
*** 196,203 ****
int* char_height;
{
struct frame* f = ew->emacs_frame.frame;
! *char_width = PIXEL_TO_CHAR_WIDTH (f, (int) pixel_width);
! *char_height = PIXEL_TO_CHAR_HEIGHT (f, (int) pixel_height);
}
static void
--- 196,203 ----
int* char_height;
{
struct frame* f = ew->emacs_frame.frame;
! *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width);
! *char_height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, (int) pixel_height);
}
static void
***************
*** 209,216 ****
Dimension* pixel_height;
{
struct frame* f = ew->emacs_frame.frame;
! *pixel_width = CHAR_TO_PIXEL_WIDTH (f, char_width);
! *pixel_height = CHAR_TO_PIXEL_HEIGHT (f, char_height);
}
static void
--- 209,216 ----
Dimension* pixel_height;
{
struct frame* f = ew->emacs_frame.frame;
! *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width);
! *pixel_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, char_height);
}
static void
***************
*** 305,312 ****
*/
/* Hairily merged geometry */
! unsigned int w = ew->emacs_frame.frame->width;
! unsigned int h = ew->emacs_frame.frame->height;
Widget wmshell = get_wm_shell ((Widget) ew);
/* Each Emacs shell is now independent and top-level. */
--- 305,312 ----
*/
/* Hairily merged geometry */
! unsigned int w = FRAME_COLS (ew->emacs_frame.frame);
! unsigned int h = FRAME_LINES (ew->emacs_frame.frame);
Widget wmshell = get_wm_shell ((Widget) ew);
/* Each Emacs shell is now independent and top-level. */
***************
*** 420,426 ****
}
#endif /* 0 */
{
! struct frame* frame = ew->emacs_frame.frame;
Dimension pixel_width, pixel_height;
/* Take into account the size of the scrollbar. Always use the
--- 420,426 ----
}
#endif /* 0 */
{
! struct frame *f = ew->emacs_frame.frame;
Dimension pixel_width, pixel_height;
/* Take into account the size of the scrollbar. Always use the
***************
*** 428,445 ****
might end up with a frame width that is not a multiple of the
frame's character width which is bad for vertically split
windows. */
! frame->output_data.x->vertical_scroll_bar_extra
! = (!FRAME_HAS_VERTICAL_SCROLL_BARS (frame)
! ? 0
! : (FRAME_SCROLL_BAR_COLS (frame)
! * FONT_WIDTH (frame->output_data.x->font)));
! compute_fringe_widths (frame, 0);
#if 0 /* This can run Lisp code, and it is dangerous to give
out the frame to Lisp code before it officially exists.
This is handled in Fx_create_frame so not needed here. */
! change_frame_size (frame, h, w, 1, 0, 0);
#endif
char_to_pixel_size (ew, w, h, &pixel_width, &pixel_height);
ew->core.width = pixel_width;
--- 428,442 ----
might end up with a frame width that is not a multiple of the
frame's character width which is bad for vertically split
windows. */
! f->scroll_bar_actual_width
! = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f);
! compute_fringe_widths (f, 0);
#if 0 /* This can run Lisp code, and it is dangerous to give
out the frame to Lisp code before it officially exists.
This is handled in Fx_create_frame so not needed here. */
! change_frame_size (f, h, w, 1, 0, 0);
#endif
char_to_pixel_size (ew, w, h, &pixel_width, &pixel_height);
ew->core.width = pixel_width;
***************
*** 645,654 ****
update_various_frame_slots (ew)
EmacsFrame ew;
{
! struct x_output *x = ew->emacs_frame.frame->output_data.x;
! x->pixel_height = ew->core.height + x->menubar_height;
! x->pixel_width = ew->core.width;
! x->internal_border_width = ew->emacs_frame.internal_border_width;
}
--- 642,652 ----
update_various_frame_slots (ew)
EmacsFrame ew;
{
! struct frame *f = ew->emacs_frame.frame;
! struct x_output *x = f->output_data.x;
! FRAME_PIXEL_HEIGHT (f) = ew->core.height + x->menubar_height;
! FRAME_PIXEL_WIDTH (f) = ew->core.width;
! f->internal_border_width = ew->emacs_frame.internal_border_width;
}
***************
*** 656,666 ****
update_from_various_frame_slots (ew)
EmacsFrame ew;
{
! struct x_output *x = ew->emacs_frame.frame->output_data.x;
! ew->core.height = x->pixel_height - x->menubar_height;
! ew->core.width = x->pixel_width;
ew->core.background_pixel = x->background_pixel;
! ew->emacs_frame.internal_border_width = x->internal_border_width;
ew->emacs_frame.font = x->font;
ew->emacs_frame.foreground_pixel = x->foreground_pixel;
ew->emacs_frame.cursor_color = x->cursor_pixel;
--- 654,665 ----
update_from_various_frame_slots (ew)
EmacsFrame ew;
{
! struct frame *f = ew->emacs_frame.frame;
! struct x_output *x = f->output_data.x;
! ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
! ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = x->background_pixel;
! ew->emacs_frame.internal_border_width = f->internal_border_width;
ew->emacs_frame.font = x->font;
ew->emacs_frame.foreground_pixel = x->foreground_pixel;
ew->emacs_frame.cursor_color = x->cursor_pixel;
***************
*** 717,723 ****
}
/* Update the font field in frame */
! ew->emacs_frame.frame->output_data.x->font = ew->emacs_frame.font;
#endif
update_from_various_frame_slots (ew);
--- 716,722 ----
}
/* Update the font field in frame */
! FRAME_FONT (ew->emacs_frame.frame) = ew->emacs_frame.font;
#endif
update_from_various_frame_slots (ew);
***************
*** 910,919 ****
if (columns < 3) columns = 3; /* no way buddy */
check_frame_size (f, &rows, &columns);
! f->output_data.x->vertical_scroll_bar_extra
! = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
! ? 0
! : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
compute_fringe_widths (f, 0);
--- 909,916 ----
if (columns < 3) columns = 3; /* no way buddy */
check_frame_size (f, &rows, &columns);
! f->scroll_bar_actual_width
! = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f);
compute_fringe_widths (f, 0);
***************
*** 923,929 ****
/* Something is really strange here wrt to the border width:
Apparently, XtNwidth and XtNheight include the border, so we have
to add it here. But the XtNborderWidth set for the widgets has
! no similarity to what f->output_data.x->border_width is set to. */
XtVaGetValues (widget, XtNborderWidth, &border_width, NULL);
pixel_height += 2 * border_width;
pixel_width += 2 * border_width;
--- 920,926 ----
/* Something is really strange here wrt to the border width:
Apparently, XtNwidth and XtNheight include the border, so we have
to add it here. But the XtNborderWidth set for the widgets has
! no similarity to what f->border_width is set to. */
XtVaGetValues (widget, XtNborderWidth, &border_width, NULL);
pixel_height += 2 * border_width;
pixel_width += 2 * border_width;
***************
*** 1017,1022 ****
EmacsFrame ew = (EmacsFrame) widget;
FRAME_PTR f = ew->emacs_frame.frame;
! ew->emacs_frame.internal_border_width
! = f->output_data.x->internal_border_width;
}
--- 1014,1018 ----
EmacsFrame ew = (EmacsFrame) widget;
FRAME_PTR f = ew->emacs_frame.frame;
! ew->emacs_frame.internal_border_width = f->internal_border_width;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/widget.c,
Kim F. Storm <=