/[emacs]/emacs/src/w32fns.c
ViewVC logotype

Diff of /emacs/src/w32fns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.123.2.2 by jasonr, Tue Oct 30 22:32:54 2001 UTC revision 1.123.2.3 by jasonr, Sat Nov 10 13:24:02 2001 UTC
# Line 1956  x_set_foreground_color (f, arg, oldval) Line 1956  x_set_foreground_color (f, arg, oldval)
1956       struct frame *f;       struct frame *f;
1957       Lisp_Object arg, oldval;       Lisp_Object arg, oldval;
1958  {  {
1959    FRAME_FOREGROUND_PIXEL (f)    struct w32_output *x = f->output_data.w32;
1960      = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));    PIX_TYPE fg, old_fg;
1961    
1962      fg = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
1963      old_fg = FRAME_FOREGROUND_PIXEL (f);
1964      FRAME_FOREGROUND_PIXEL (f) = fg;
1965    
1966    if (FRAME_W32_WINDOW (f) != 0)    if (FRAME_W32_WINDOW (f) != 0)
1967      {      {
1968          if (x->cursor_pixel == old_fg)
1969            x->cursor_pixel = fg;
1970    
1971        update_face_from_frame_parameter (f, Qforeground_color, arg);        update_face_from_frame_parameter (f, Qforeground_color, arg);
1972        if (FRAME_VISIBLE_P (f))        if (FRAME_VISIBLE_P (f))
1973          redraw_frame (f);          redraw_frame (f);
# Line 2367  x_set_font (f, arg, oldval) Line 2374  x_set_font (f, arg, oldval)
2374    Lisp_Object result;    Lisp_Object result;
2375    Lisp_Object fontset_name;    Lisp_Object fontset_name;
2376    Lisp_Object frame;    Lisp_Object frame;
2377      int old_fontset = FRAME_FONTSET (f);
2378    
2379    CHECK_STRING (arg, 1);    CHECK_STRING (arg, 1);
2380    
# Line 2384  x_set_font (f, arg, oldval) Line 2392  x_set_font (f, arg, oldval)
2392      error ("The characters of the given font have varying widths");      error ("The characters of the given font have varying widths");
2393    else if (STRINGP (result))    else if (STRINGP (result))
2394      {      {
2395        if (!NILP (Fequal (result, oldval)))        if (STRINGP (fontset_name))
2396            {
2397              /* Fontset names are built from ASCII font names, so the
2398                 names may be equal despite there was a change.  */
2399              if (old_fontset == FRAME_FONTSET (f))
2400                return;
2401            }
2402          else if (!NILP (Fequal (result, oldval)))
2403          return;          return;
2404        store_frame_param (f, Qfont, result);        store_frame_param (f, Qfont, result);
2405        recompute_basic_faces (f);        recompute_basic_faces (f);
# Line 6624  enum_font_cb2 (lplf, lptm, FontType, lpe Line 6639  enum_font_cb2 (lplf, lptm, FontType, lpe
6639      int FontType;      int FontType;
6640      enumfont_t * lpef;      enumfont_t * lpef;
6641  {  {
6642    /* Ignore struck out, underlined and vertical versions of fonts.  */    /* Ignore underlined and struck out versions of fonts.  */
6643    if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline    if (lplf->elfLogFont.lfStrikeOut || lplf->elfLogFont.lfUnderline)
       || lplf->elfLogFont.lfEscapement != 0  
       || lplf->elfLogFont.lfOrientation != 0)  
6644      return 1;      return 1;
6645      
6646      /* Only return fonts with names starting with @ if they were
6647         explicitly specified, since Microsoft uses an initial @ to
6648         denote fonts for vertical writing, without providing a more
6649         convenient way of identifying them.  */
6650      if (lplf->elfLogFont.lfFaceName[0] == '@'
6651          && lpef->logfont.lfFaceName[0] != '@')
6652        return 1;
6653    
6654    /* Check that the character set matches if it was specified */    /* Check that the character set matches if it was specified */
6655    if (lpef->logfont.lfCharSet != DEFAULT_CHARSET &&    if (lpef->logfont.lfCharSet != DEFAULT_CHARSET &&
6656        lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet)        lplf->elfLogFont.lfCharSet != lpef->logfont.lfCharSet)
# Line 6680  enum_font_cb2 (lplf, lptm, FontType, lpe Line 6701  enum_font_cb2 (lplf, lptm, FontType, lpe
6701    
6702      /* TODO: List all relevant charsets if charset not specified. */      /* TODO: List all relevant charsets if charset not specified. */
6703      if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset))      if (!w32_to_x_font (&(lplf->elfLogFont), buf, 100, charset))
6704        return 0;        return 1;
6705    
6706      if (NILP (*(lpef->pattern))      if (NILP (*(lpef->pattern))
6707          || w32_font_match (buf, XSTRING (*(lpef->pattern))->data))          || w32_font_match (buf, XSTRING (*(lpef->pattern))->data))
# Line 6850  w32_list_fonts (f, pattern, size, maxnam Line 6871  w32_list_fonts (f, pattern, size, maxnam
6871          FARPROC enum_font_families_ex          FARPROC enum_font_families_ex
6872            = GetProcAddress ( gdi32, "EnumFontFamiliesExA");            = GetProcAddress ( gdi32, "EnumFontFamiliesExA");
6873    
6874          /* We do our own pattern matching so we can handle wildcards.  */          /* We do our own pattern matching so we can handle wildcards.  */
6875          font_match_pattern.lfFaceName[0] = 0;          font_match_pattern.lfFaceName[0] = 0;
6876          font_match_pattern.lfPitchAndFamily = 0;          font_match_pattern.lfPitchAndFamily = 0;
6877          /* We can use the charset, because if it is a wildcard it will          /* We can use the charset, because if it has a wildcard it will
6878             be DEFAULT_CHARSET anyway.  */             translate to DEFAULT_CHARSET anyway.  */
6879          font_match_pattern.lfCharSet = ef.logfont.lfCharSet;          font_match_pattern.lfCharSet = ef.logfont.lfCharSet;
6880    
6881          ef.hdc = GetDC (dpyinfo->root_window);          ef.hdc = GetDC (dpyinfo->root_window);
# Line 12890  DEFUN ("x-file-dialog", Fx_file_dialog, Line 12911  DEFUN ("x-file-dialog", Fx_file_dialog,
12911    "Read file name, prompting with PROMPT in directory DIR.\n\    "Read file name, prompting with PROMPT in directory DIR.\n\
12912  Use a file selection dialog.\n\  Use a file selection dialog.\n\
12913  Select DEFAULT-FILENAME in the dialog's file selection box, if\n\  Select DEFAULT-FILENAME in the dialog's file selection box, if\n\
12914  specified.  Don't let the user enter a file name in the file\n\  specified.  Ensure that file exists if MUSTMATCH is non-nil.")
 selection dialog's entry field, if MUSTMATCH is non-nil.")  
12915    (prompt, dir, default_filename, mustmatch)    (prompt, dir, default_filename, mustmatch)
12916       Lisp_Object prompt, dir, default_filename, mustmatch;       Lisp_Object prompt, dir, default_filename, mustmatch;
12917  {  {
# Line 12952  selection dialog's entry field, if MUSTM Line 12972  selection dialog's entry field, if MUSTM
12972        bzero (&file_details, sizeof (file_details));        bzero (&file_details, sizeof (file_details));
12973        file_details.lStructSize = sizeof (file_details);        file_details.lStructSize = sizeof (file_details);
12974        file_details.hwndOwner = FRAME_W32_WINDOW (f);        file_details.hwndOwner = FRAME_W32_WINDOW (f);
12975          /* Undocumented Bug in Common File Dialog:
12976             If a filter is not specified, shell links are not resolved.  */
12977          file_details.lpstrFilter = "All Files (*.*)\0*.*\0\0";
12978        file_details.lpstrFile = filename;        file_details.lpstrFile = filename;
12979        file_details.nMaxFile = sizeof (filename);        file_details.nMaxFile = sizeof (filename);
12980        file_details.lpstrInitialDir = init_dir;        file_details.lpstrInitialDir = init_dir;

Legend:
Removed from v.1.123.2.2  
changed lines
  Added in v.1.123.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26