comparison src/w32term.c @ 46370:40db0673e6f0

Most uses of XSTRING combined with STRING_BYTES or indirection changed to SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references left unchanged for now.
author Ken Raeburn <raeburn@raeburn.org>
date Mon, 15 Jul 2002 00:00:41 +0000
parents 9484de301252
children 4a9df8aa130c
comparison
equal deleted inserted replaced
46369:dd1d3b1d0053 46370:40db0673e6f0
6506 ++glyph; 6506 ++glyph;
6507 } 6507 }
6508 6508
6509 if (glyph < end 6509 if (glyph < end
6510 && STRINGP (glyph->object) 6510 && STRINGP (glyph->object)
6511 && XSTRING (glyph->object)->intervals 6511 && STRING_INTERVALS (glyph->object)
6512 && glyph->charpos >= 0 6512 && glyph->charpos >= 0
6513 && glyph->charpos < XSTRING (glyph->object)->size) 6513 && glyph->charpos < SCHARS (glyph->object))
6514 { 6514 {
6515 /* If we're on a string with `help-echo' text property, 6515 /* If we're on a string with `help-echo' text property,
6516 arrange for the help to be displayed. This is done by 6516 arrange for the help to be displayed. This is done by
6517 setting the global variable help_echo to the help string. */ 6517 setting the global variable help_echo to the help string. */
6518 help = Fget_text_property (make_number (glyph->charpos), 6518 help = Fget_text_property (make_number (glyph->charpos),
6827 e = Fnext_single_property_change (position, Qmouse_face, 6827 e = Fnext_single_property_change (position, Qmouse_face,
6828 object, Qnil); 6828 object, Qnil);
6829 if (NILP (b)) 6829 if (NILP (b))
6830 b = make_number (0); 6830 b = make_number (0);
6831 if (NILP (e)) 6831 if (NILP (e))
6832 e = make_number (XSTRING (object)->size - 1); 6832 e = make_number (SCHARS (object) - 1);
6833 fast_find_string_pos (w, XINT (b), object, 6833 fast_find_string_pos (w, XINT (b), object,
6834 &dpyinfo->mouse_face_beg_col, 6834 &dpyinfo->mouse_face_beg_col,
6835 &dpyinfo->mouse_face_beg_row, 6835 &dpyinfo->mouse_face_beg_row,
6836 &dpyinfo->mouse_face_beg_x, 6836 &dpyinfo->mouse_face_beg_x,
6837 &dpyinfo->mouse_face_beg_y, 0); 6837 &dpyinfo->mouse_face_beg_y, 0);
6925 int charpos = glyph->charpos; 6925 int charpos = glyph->charpos;
6926 6926
6927 /* Try text properties. */ 6927 /* Try text properties. */
6928 if (STRINGP (object) 6928 if (STRINGP (object)
6929 && charpos >= 0 6929 && charpos >= 0
6930 && charpos < XSTRING (object)->size) 6930 && charpos < SCHARS (object))
6931 { 6931 {
6932 help = Fget_text_property (make_number (charpos), 6932 help = Fget_text_property (make_number (charpos),
6933 Qhelp_echo, object); 6933 Qhelp_echo, object);
6934 if (NILP (help)) 6934 if (NILP (help))
6935 { 6935 {
8617 msg.rect.bottom == msg.rect.top) 8617 msg.rect.bottom == msg.rect.top)
8618 { 8618 {
8619 /* We may get paint messages even though the client 8619 /* We may get paint messages even though the client
8620 area is clipped - these are not expose events. */ 8620 area is clipped - these are not expose events. */
8621 DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f, 8621 DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f,
8622 XSTRING (f->name)->data)); 8622 SDATA (f->name)));
8623 } 8623 }
8624 else if (f->async_visible != 1) 8624 else if (f->async_visible != 1)
8625 { 8625 {
8626 /* Definitely not obscured, so mark as visible. */ 8626 /* Definitely not obscured, so mark as visible. */
8627 f->async_visible = 1; 8627 f->async_visible = 1;
8628 f->async_iconified = 0; 8628 f->async_iconified = 0;
8629 SET_FRAME_GARBAGED (f); 8629 SET_FRAME_GARBAGED (f);
8630 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, 8630 DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
8631 XSTRING (f->name)->data)); 8631 SDATA (f->name)));
8632 8632
8633 /* WM_PAINT serves as MapNotify as well, so report 8633 /* WM_PAINT serves as MapNotify as well, so report
8634 visibility changes properly. */ 8634 visibility changes properly. */
8635 if (f->iconified) 8635 if (f->iconified)
8636 { 8636 {
9306 f->async_visible = 2; 9306 f->async_visible = 2;
9307 9307
9308 if (!FRAME_OBSCURED_P (f)) 9308 if (!FRAME_OBSCURED_P (f))
9309 { 9309 {
9310 DebPrint (("frame %p (%s) obscured\n", f, 9310 DebPrint (("frame %p (%s) obscured\n", f,
9311 XSTRING (f->name)->data)); 9311 SDATA (f->name)));
9312 } 9312 }
9313 } 9313 }
9314 else 9314 else
9315 { 9315 {
9316 /* Frame is not obscured, so mark it as such. */ 9316 /* Frame is not obscured, so mark it as such. */
9318 9318
9319 if (FRAME_OBSCURED_P (f)) 9319 if (FRAME_OBSCURED_P (f))
9320 { 9320 {
9321 SET_FRAME_GARBAGED (f); 9321 SET_FRAME_GARBAGED (f);
9322 DebPrint (("obscured frame %p (%s) found to be visible\n", f, 9322 DebPrint (("obscured frame %p (%s) found to be visible\n", f,
9323 XSTRING (f->name)->data)); 9323 SDATA (f->name)));
9324 9324
9325 /* Force a redisplay sooner or later. */ 9325 /* Force a redisplay sooner or later. */
9326 record_asynch_buffer_change (); 9326 record_asynch_buffer_change ();
9327 } 9327 }
9328 } 9328 }
9989 return 1; 9989 return 1;
9990 9990
9991 if (NILP (icon)) 9991 if (NILP (icon))
9992 hicon = LoadIcon (hinst, EMACS_CLASS); 9992 hicon = LoadIcon (hinst, EMACS_CLASS);
9993 else if (STRINGP (icon)) 9993 else if (STRINGP (icon))
9994 hicon = LoadImage (NULL, (LPCTSTR) XSTRING (icon)->data, IMAGE_ICON, 0, 0, 9994 hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,
9995 LR_DEFAULTSIZE | LR_LOADFROMFILE); 9995 LR_DEFAULTSIZE | LR_LOADFROMFILE);
9996 else if (SYMBOLP (icon)) 9996 else if (SYMBOLP (icon))
9997 { 9997 {
9998 LPCTSTR name; 9998 LPCTSTR name;
9999 9999
10119 if (FRAME_FONTSET (f) == fontset) 10119 if (FRAME_FONTSET (f) == fontset)
10120 /* This fontset is already set in frame F. There's nothing more 10120 /* This fontset is already set in frame F. There's nothing more
10121 to do. */ 10121 to do. */
10122 return fontset_name (fontset); 10122 return fontset_name (fontset);
10123 10123
10124 result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); 10124 result = x_new_font (f, (SDATA (fontset_ascii (fontset))));
10125 10125
10126 if (!STRINGP (result)) 10126 if (!STRINGP (result))
10127 /* Can't load ASCII font. */ 10127 /* Can't load ASCII font. */
10128 return Qnil; 10128 return Qnil;
10129 10129
11045 w32_display_name_list = Fcons (Fcons (display_name, Qnil), 11045 w32_display_name_list = Fcons (Fcons (display_name, Qnil),
11046 w32_display_name_list); 11046 w32_display_name_list);
11047 dpyinfo->name_list_element = XCAR (w32_display_name_list); 11047 dpyinfo->name_list_element = XCAR (w32_display_name_list);
11048 11048
11049 dpyinfo->w32_id_name 11049 dpyinfo->w32_id_name
11050 = (char *) xmalloc (XSTRING (Vinvocation_name)->size 11050 = (char *) xmalloc (SCHARS (Vinvocation_name)
11051 + XSTRING (Vsystem_name)->size 11051 + SCHARS (Vsystem_name)
11052 + 2); 11052 + 2);
11053 sprintf (dpyinfo->w32_id_name, "%s@%s", 11053 sprintf (dpyinfo->w32_id_name, "%s@%s",
11054 XSTRING (Vinvocation_name)->data, XSTRING (Vsystem_name)->data); 11054 SDATA (Vinvocation_name), SDATA (Vsystem_name));
11055 11055
11056 /* Default Console mode values - overridden when running in GUI mode 11056 /* Default Console mode values - overridden when running in GUI mode
11057 with values obtained from system metrics. */ 11057 with values obtained from system metrics. */
11058 dpyinfo->resx = 1; 11058 dpyinfo->resx = 1;
11059 dpyinfo->resy = 1; 11059 dpyinfo->resy = 1;