• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/src/

Lines Matching +defs:frame +defs:pixel +defs:width

36 #include "frame.h"
174 /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */
278 /* The below are defined in frame.c. */
323 /* Extract a frame as a FRAME_PTR, defaulting to the selected frame
327 check_x_frame (frame)
328 Lisp_Object frame;
332 if (NILP (frame))
333 frame = selected_frame;
334 CHECK_LIVE_FRAME (frame);
335 f = XFRAME (frame);
337 error ("Non-W32 frame used");
341 /* Let the user specify a display with a frame.
342 nil stands for the selected frame--or, if that is not a w32 frame,
346 check_x_display_info (frame)
347 Lisp_Object frame;
349 if (NILP (frame))
351 struct frame *sf = XFRAME (selected_frame);
358 else if (STRINGP (frame))
359 return x_display_info_for_name (frame);
364 CHECK_LIVE_FRAME (frame);
365 f = XFRAME (frame);
367 error ("Non-W32 frame used");
373 /* Return the Emacs frame-object corresponding to an w32 window.
374 It could be the frame's main window or an icon window. */
378 struct frame *
383 Lisp_Object tail, frame;
384 struct frame *f;
388 frame = XCAR (tail);
389 if (!GC_FRAMEP (frame))
391 f = XFRAME (frame);
407 static void my_create_window P_ ((struct frame *));
408 static void my_create_tip_window P_ ((struct frame *));
411 void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
412 void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
413 void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
414 void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
415 void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object));
416 void x_set_cursor_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
417 void x_set_icon_type P_ ((struct frame *, Lisp_Object, Lisp_Object));
418 void x_set_icon_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
419 void x_explicitly_set_name P_ ((struct frame *, Lisp_Object, Lisp_Object));
420 void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
421 void x_set_title P_ ((struct frame *, Lisp_Object, Lisp_Object));
422 void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
423 static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object,
430 /* Store the screen positions of frame F into XPTR and YPTR.
1234 /* Gamma-correct COLOR on frame F. */
1238 struct frame *f;
1252 the selected frame; if so, return the rgb values in COLOR_DEF.
1313 color_def->pixel = w32_color_ref;
1326 /* Given a string ARG naming a color, compute a pixel value from it
1352 return cdef.pixel;
1365 the frame is being created and its window does not exist yet.
1371 struct frame *f;
1394 struct frame *f;
1414 struct frame *f;
1505 fore_color.pixel = f->output_data.w32->mouse_pixel;
1506 back_color.pixel = mask_color;
1564 struct frame *f;
1567 unsigned long fore_pixel, pixel;
1575 pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
1578 if (pixel == FRAME_BACKGROUND_PIXEL (f))
1580 pixel = f->output_data.w32->mouse_pixel;
1581 if (pixel == fore_pixel)
1586 f->output_data.w32->cursor_pixel = pixel;
1591 /* Update frame's cursor_gc. */
1593 f->output_data.w32->cursor_gc->background = pixel;
1607 /* Set the border-color of frame F to pixel value PIX.
1613 struct frame *f;
1626 /* Set the border-color of frame F to value described by ARG.
1634 struct frame *f;
1660 struct frame *f;
1689 struct frame *f;
1740 struct frame *f;
1748 frame itself, and get an error because you can't switch buffers
1767 /* Adjust the frame size so that the client (text) dimensions
1777 /* Set the number of lines used for the tool bar of frame F to VALUE.
1780 height of all windows on frame F to match the new tool bar height.
1781 The frame's height doesn't change. */
1785 struct frame *f;
1801 /* Make sure we redisplay all windows in this frame. */
1820 the frame, below the menu bar or tool bar, is redrawn when the
1839 int width = FRAME_PIXEL_WIDTH (f);
1845 w32_clear_area (f, hdc, 0, y, width, height);
1856 /* Change the name of frame F to NAME. If NAME is nil, set F's name to
1869 struct frame *f;
1906 /* For setting the frame title, the title parameter should override
1923 specified a name for the frame; the name will override any set by the
1945 /* Change the title of frame F to NAME.
1946 If NAME is nil, use the frame name as the title.
1958 struct frame *f;
1985 struct frame *f;
1996 /* Subroutines of creating a frame. */
2063 struct frame *f;
2070 XINT(bar->width) - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
2080 struct frame *f;
2141 /* Update frame positions. */
2528 w32_createwindow ((struct frame *) msg.wParam);
2822 struct frame *f;
2829 not running in the main lisp thread, because frame deletion
2831 a frame struct is returned, it can be used without concern that the
2834 NB. Walking the frame list in this thread is safe (as long as
2836 Although delete-frame can destructively modify the frame list while
2838 delete-frame has synchronized with this thread.
2842 from the frame struct using get_frame_dc which is thread-aware. */
2856 DebPrint (("WM_ERASEBKGND (frame %p): erasing %d,%d-%d,%d\n",
2901 DebPrint (("WM_PAINT (frame %p): painting %d,%d-%d,%d\n",
3339 underlying frame. */
3344 /* If the mouse has just moved into the frame, start tracking
3345 it, so we will be notified when it leaves the frame. Mouse
3348 frame, so we just have to put up with help-echo and mouse
3349 highlighting remaining while the frame is not active. */
3614 client area of the frame from clicks forwarded from the scroll
3618 /* Discard the mouse click that activates a frame, allowing the
3634 /* Inform lisp thread that a frame might have just been obscured
3717 /* Force width and height of client area to be exact
3760 /* Hack to allow resizing the Emacs frame above the screen size.
3781 return (LRESULT) w32_createscrollbar ((struct frame *) wParam,
3839 /* Use the default caret width, and avoid changing it
3934 struct frame * f;
3950 struct frame *f;
3990 /* Create and set up the w32 window for frame F. */
3994 struct frame *f;
4045 struct frame *f;
4085 struct frame *f;
4091 /* Create the GC's of this frame.
4114 x_create_top_frame. FRAME is the frame which is partially
4118 unwind_create_frame (frame)
4119 Lisp_Object frame;
4121 struct frame *f = XFRAME (frame);
4123 /* If frame is ``official'', nothing to do. */
4124 if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame))
4143 DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
4145 doc: /* Make a new window, which is called a \"frame\" in Emacs terms.
4146 Returns an Emacs frame object.
4147 PARAMETERS is an alist of frame parameters.
4148 If the parameters specify that the frame should not have a minibuffer,
4150 then `default-minibuffer-frame' must be a frame whose minibuffer can
4151 be shared by the new frame.
4153 This function is an internal primitive--use `make-frame' instead. */)
4157 struct frame *f;
4158 Lisp_Object frame, tem;
4162 int width, height;
4173 until we know if this frame has a specified name. */
4190 error ("Invalid frame name--not a string or nil");
4205 frame = Qnil;
4206 GCPRO4 (parameters, parent, name, frame);
4221 XSETFRAME (frame, f);
4226 /* By default, make scrollbars the system standard width. */
4234 record_unwind_protect (unwind_create_frame, frame);
4270 /* use the frame's title when getting resources for this frame. */
4389 /* Now consider the frame official. */
4391 Vframe_list = Fcons (frame, Vframe_list);
4410 width = FRAME_COLS (f);
4415 change_frame_size (f, height, width, 1, 0, 0);
4424 /* Make the window appear on the frame and enable display, unless
4445 /* Make sure windows on this frame appear in calls to next-window
4449 return unbind_to (count, frame);
4453 display info directly because we're called from frame.c, which doesn't
4456 x_get_focus_frame (frame)
4457 struct frame *frame;
4459 struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
4468 DEFUN ("w32-focus-frame", Fw32_focus_frame, Sw32_focus_frame, 1, 1, 0,
4470 (frame)
4471 Lisp_Object frame;
4473 x_focus_on_frame (check_x_frame (frame));
4498 struct font_info *w32_load_bdf_font (struct frame *f, char *fontname,
4507 struct frame *f;
4670 /* Fixed width font. */
4679 fontp->space_width = pcm->width;
4731 has a character with a smaller width than any other character
4741 /* Load font named FONTNAME of size SIZE for frame F, and return a
4746 struct frame *f;
5360 #if 0 /* Never put the width in the xfld. It fails on fonts with
5361 double-width characters. */
5376 height_pixels, /* pixel size */
5382 width_pixels, /* avg width */
5425 * "<font name>[:height in pixels[:width in pixels[:weight]]]"
5432 width[10], resy[10], remainder[50];
5438 name, weight, &slant, pixels, height, resy, &pitch, width, remainder);
5518 if (fields > 0 && width[0] != '*')
5519 lplogfont->lfWidth = atoi (width) / 10;
5540 char name[100], height[10], width[10], weight[20];
5544 name, height, width, weight);
5566 lplogfont->lfWidth = atoi (width);
5579 /* Strip the pixel height and point height from the given xlfd, and
5580 return the pixel height. If no pixel height is specified, calculate
5623 /* If the pixel height field is at the end (partial xlfd),
5628 /* If we got a pixel height, the point height can be
5659 /* If we didn't get a pixel height, try to get the point
5676 /* Convert to pixel height. */
5733 comparison between a font that declares only a pixel height and a
5818 Lisp_Object width = Qnil;
5830 width = make_number (lpef->logfont.lfWidth);
5881 charset, width);
5885 charset, width);
5889 charset, width);
5893 charset, width);
5897 charset, width);
5905 enum_font_maybe_add_to_list (lpef, logfont, match_charset, width)
5909 Lisp_Object width;
5925 Lisp_Object entry = Fcons (font_name, width);
6016 /* Return a list of names of available fonts matching PATTERN on frame
6017 F. If SIZE is not 0, it is the size (maximum bound width) of fonts
6019 frame, which means we can't get proper size info, as we don't have
6026 struct frame *f;
6121 /* Make a list of the fonts that have the right width. */
6222 /* Return a pointer to struct font_info of font FONT_IDX of frame F. */
6233 w32_query_font (struct frame *f, char *fontname)
6338 (color, frame)
6339 Lisp_Object color, frame;
6342 FRAME_PTR f = check_x_frame (frame);
6354 (color, frame)
6355 Lisp_Object color, frame;
6358 FRAME_PTR f = check_x_frame (frame);
6363 return list3 (make_number ((GetRValue (foo.pixel) << 8)
6364 | GetRValue (foo.pixel)),
6365 make_number ((GetGValue (foo.pixel) << 8)
6366 | GetGValue (foo.pixel)),
6367 make_number ((GetBValue (foo.pixel) << 8)
6368 | GetBValue (foo.pixel)));
6391 DISPLAY should be either a frame or a display name (a string).
6392 If omitted or nil, that stands for the selected frame's display. */)
6404 DEFUN ("x-display-pixel-width", Fx_display_pixel_width,
6406 doc: /* Returns the width in pixels of DISPLAY.
6408 DISPLAY should be either a frame or a display name (a string).
6409 If omitted or nil, that stands for the selected frame's display. */)
6415 return make_number (dpyinfo->width);
6418 DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
6422 DISPLAY should be either a frame or a display name (a string).
6423 If omitted or nil, that stands for the selected frame's display. */)
6436 DISPLAY should be either a frame or a display name (a string).
6437 If omitted or nil, that stands for the selected frame's display. */)
6450 DISPLAY should be either a frame or a display name (a string).
6451 If omitted or nil, that stands for the selected frame's display. */)
6480 DISPLAY should be either a frame or a display name (a string).
6481 If omitted or nil, that stands for the selected frame's display. */)
6493 DISPLAY should be either a frame or a display name (a string).
6494 If omitted or nil, that stands for the selected frame's display. */)
6508 DISPLAY should be either a frame or a display name (a string).
6509 If omitted or nil, that stands for the selected frame's display. */)
6521 DISPLAY should be either a frame or a display name (a string).
6522 If omitted or nil, that stands for the selected frame's display. */)
6533 DISPLAY should be either a frame or a display name (a string).
6534 If omitted or nil, that stands for the selected frame's display. */)
6551 DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
6552 doc: /* Returns the width in millimeters of DISPLAY.
6554 DISPLAY should be either a frame or a display name (a string).
6555 If omitted or nil, that stands for the selected frame's display. */)
6578 DISPLAY should be either a frame or a display name (a string).
6579 If omitted or nil, that stands for the selected frame's display. */)
6593 DISPLAY should be either a frame or a display name (a string).
6594 If omitted or nil, that stands for the selected frame's display. */)
6617 DISPLAY should be either a frame or a display name (a string).
6618 If omitted or nil, that stands for the selected frame's display. */)
6628 register struct frame *f;
6635 register struct frame *f;
6642 register struct frame *f;
6649 register struct frame *f;
6656 register struct frame *f;
6792 For DISPLAY, specify either a frame or a display name (a string).
6793 If DISPLAY is nil, that stands for the selected frame's display. */)
6857 FRAME nil or omitted means use the selected frame.
6867 (prop, value, frame, type, format, outer_p)
6868 Lisp_Object prop, value, frame, type, format, outer_p;
6871 struct frame *f = check_x_frame (frame);
6896 FRAME nil or omitted means use the selected frame. Value is PROP. */)
6897 (prop, frame)
6898 Lisp_Object prop, frame;
6902 struct frame *f = check_x_frame (frame);
6922 If FRAME is nil or omitted, use the selected frame. Value is nil
6925 (prop, frame)
6926 Lisp_Object prop, frame;
6930 struct frame *f = check_x_frame (frame);
7073 Lisp_Object rest, frame;
7077 FOR_EACH_FRAME (rest, frame)
7078 if (FRAME_W32_P (XFRAME (frame)))
7080 struct frame *f = XFRAME (frame);
7120 Lisp_Object rest, frame;
7123 FOR_EACH_FRAME (rest, frame)
7125 struct frame *f = XFRAME (frame);
7155 static void compute_tip_xy P_ ((struct frame *, Lisp_Object, Lisp_Object,
7158 /* The frame of a currently visible tooltip. */
7179 unwind_create_tip_frame (frame)
7180 Lisp_Object frame;
7184 deleted = unwind_create_frame (frame);
7195 /* Create a frame for a tooltip on the display described by DPYINFO.
7196 PARMS is a list of frame parameters. TEXT is the string to
7197 display in the tip frame. Value is the frame.
7209 struct frame *f;
7210 Lisp_Object frame, tem;
7213 int width, height;
7224 this frame has a specified name. */
7233 /* Get the name of the frame to use for resource lookup. */
7238 error ("Invalid frame name--not a string or nil");
7241 frame = Qnil;
7242 GCPRO3 (parms, name, frame);
7243 /* Make a frame without minibuffer nor mode-line. */
7246 XSETFRAME (frame, f);
7260 record_unwind_protect (unwind_create_tip_frame, frame);
7263 the frame is live, as per FRAME_LIVE_P. If we get a signal
7295 /* use the frame's title when getting resources for this frame. */
7377 /* No fringes on tip frame. */
7398 width = FRAME_COLS (f);
7402 change_frame_size (f, height, width, 1, 0, 0);
7404 /* Add `tooltip' frame parameter's default value. */
7405 if (NILP (Fframe_parameter (frame, intern ("tooltip"))))
7406 Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt),
7409 /* Set up faces after all frame parameters are known. This call
7415 attribute of the frame get's set, which let's the internal border
7416 of the tooltip frame appear in pink. Prevent this. */
7418 Lisp_Object bg = Fframe_parameter (frame, Qbackground_color);
7421 tip_frame = frame;
7422 call1 (Qface_set_after_frame_default, frame);
7424 if (!EQ (bg, Fframe_parameter (frame, Qbackground_color)))
7425 Fmodify_frame_parameters (frame, Fcons (Fcons (Qbackground_color, bg),
7433 /* It is now ok to make the frame official even if we get an error
7434 below. And the frame needs to be on Vframe_list or making it
7436 Vframe_list = Fcons (frame, Vframe_list);
7438 /* Now that the frame is official, it counts as a reference to
7442 /* Setting attributes of faces of the tooltip frame from resources
7446 had before we created the tip frame. */
7450 return unbind_to (count, frame);
7454 /* Compute where to display tip frame F. PARMS is the list of frame
7456 location of the mouse. WIDTH and HEIGHT are the width and height
7461 compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
7462 struct frame *f;
7464 int width, height;
7504 else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width)
7507 else if (width + XINT (dx) <= *root_x)
7509 *root_x -= width + XINT (dx);
7517 doc: /* Show STRING in a \"tooltip\" window on frame FRAME.
7522 FRAME nil or omitted means use the selected frame.
7524 PARMS is an optional list of frame parameters which can be
7530 If the list of frame parameters PARMS contains a `left' parameter,
7533 DX isn't specified). Likewise for the y-position; if a `top' frame
7540 (string, frame, parms, timeout, dx, dy)
7541 Lisp_Object string, frame, parms, timeout, dx, dy;
7543 struct frame *f;
7548 int i, width, height;
7555 GCPRO4 (string, parms, frame, timeout);
7558 f = check_x_frame (frame);
7583 if (EQ (frame, last_frame)
7587 struct frame *f = XFRAME (tip_frame);
7620 ASET (last_show_tip_args, 1, frame);
7623 /* Add default values to frame parameters. */
7640 /* Create a frame for the tooltip, and record it in the global
7642 frame = x_create_tip_frame (FRAME_W32_DISPLAY_INFO (f), parms, string);
7643 f = XFRAME (frame);
7645 /* Set up the frame's root window. */
7677 /* Compute width and height of the tooltip. */
7678 width = height = 0;
7689 /* Let the row go over the full width of the frame. */
7692 #ifdef TODO /* Investigate why some fonts need more width than is
7695 the cursor there. Don't include the width of this glyph. */
7707 width = max (width, row_width);
7710 /* Add the frame's internal border to the width and height the X
7713 width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f);
7717 compute_tip_xy (f, parms, dx, dy, width, height, &root_x, &root_y);
7723 rect.right = width;
7741 /* Let redisplay know that we have made the frame visible already. */
7773 Lisp_Object deleted, frame, timer;
7780 frame = tip_frame;
7782 GCPRO2 (frame, timer);
7792 if (FRAMEP (frame))
7794 Fdelete_frame (frame, Qnil);
7874 struct frame *f = SELECTED_FRAME ();
8005 If FRAME is omitted or nil, it defaults to the selected frame.
8008 (frame, include_proportional)
8009 Lisp_Object frame, include_proportional;
8011 FRAME_PTR f = check_x_frame (frame);
8059 doc: /* Send frame a Windows WM_SYSCOMMAND message of type COMMAND.
8060 Some useful values for COMMAND are #xf030 to maximize frame (#xf020
8061 to minimize), #xf120 to restore frame to original size, and #xf100
8065 If optional parameter FRAME is not specified, use selected frame. */)
8066 (command, frame)
8067 Lisp_Object command, frame;
8069 FRAME_PTR f = check_x_frame (frame);
8586 /* Keep this list in the same order as frame_parms in frame.c.
8587 Use 0 for unsupported frame parameters. */
8823 This variable takes effect when you create a new frame
8839 This variable takes effect when you create a new frame
8846 This variable takes effect when you create a new frame
8850 DEFVAR_LISP ("x-cursor-fore-pixel", &Vx_cursor_fore_pixel,
8867 DEFVAR_LISP ("x-pixel-size-width-font-regexp",
8869 doc: /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'.
8871 Since Emacs gets width of a font matching with this regexp from