Mercurial > emacs
comparison src/w32fns.c @ 112434:9de5a68b57e1
Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 22 Jan 2011 18:56:06 -0800 |
parents | 4cddf15c8d9a |
children |
comparison
equal
deleted
inserted
replaced
112433:7b649f6eac4f | 112434:9de5a68b57e1 |
---|---|
1505 return; | 1505 return; |
1506 | 1506 |
1507 BLOCK_INPUT; | 1507 BLOCK_INPUT; |
1508 | 1508 |
1509 result = x_text_icon (f, | 1509 result = x_text_icon (f, |
1510 (char *) SDATA ((!NILP (f->icon_name) | 1510 SSDATA ((!NILP (f->icon_name) |
1511 ? f->icon_name | 1511 ? f->icon_name |
1512 : !NILP (f->title) | 1512 : !NILP (f->title) |
1513 ? f->title | 1513 ? f->title |
1514 : f->name))); | 1514 : f->name))); |
1515 | 1515 |
1516 if (result) | 1516 if (result) |
1517 { | 1517 { |
1518 UNBLOCK_INPUT; | 1518 UNBLOCK_INPUT; |
1519 error ("No icon window available"); | 1519 error ("No icon window available"); |
3875 for the window manager, so GC relocation won't bother it. | 3875 for the window manager, so GC relocation won't bother it. |
3876 | 3876 |
3877 Elsewhere we specify the window name for the window manager. */ | 3877 Elsewhere we specify the window name for the window manager. */ |
3878 | 3878 |
3879 { | 3879 { |
3880 char *str = (char *) SDATA (Vx_resource_name); | 3880 char *str = SSDATA (Vx_resource_name); |
3881 f->namebuf = (char *) xmalloc (strlen (str) + 1); | 3881 f->namebuf = (char *) xmalloc (strlen (str) + 1); |
3882 strcpy (f->namebuf, str); | 3882 strcpy (f->namebuf, str); |
3883 } | 3883 } |
3884 | 3884 |
3885 my_create_window (f); | 3885 my_create_window (f); |
3941 x_wm_set_window_state | 3941 x_wm_set_window_state |
3942 (f, (EQ (x_get_arg (dpyinfo, parms, Qvisibility, 0, 0, RES_TYPE_SYMBOL), Qicon) | 3942 (f, (EQ (x_get_arg (dpyinfo, parms, Qvisibility, 0, 0, RES_TYPE_SYMBOL), Qicon) |
3943 ? IconicState | 3943 ? IconicState |
3944 : NormalState)); | 3944 : NormalState)); |
3945 | 3945 |
3946 x_text_icon (f, (char *) SDATA ((!NILP (f->icon_name) | 3946 x_text_icon (f, SSDATA ((!NILP (f->icon_name) |
3947 ? f->icon_name | 3947 ? f->icon_name |
3948 : f->name))); | 3948 : f->name))); |
3949 #endif | 3949 #endif |
3950 | 3950 |
3951 UNBLOCK_INPUT; | 3951 UNBLOCK_INPUT; |
3952 } | 3952 } |
3953 | 3953 |
4721 Vx_resource_name = Vinvocation_name; | 4721 Vx_resource_name = Vinvocation_name; |
4722 | 4722 |
4723 validate_x_resource_name (); | 4723 validate_x_resource_name (); |
4724 | 4724 |
4725 dpyinfo = w32_term_init (name, (unsigned char *)0, | 4725 dpyinfo = w32_term_init (name, (unsigned char *)0, |
4726 (char *) SDATA (Vx_resource_name)); | 4726 SSDATA (Vx_resource_name)); |
4727 | 4727 |
4728 if (dpyinfo == 0) | 4728 if (dpyinfo == 0) |
4729 error ("Cannot connect to server %s", SDATA (name)); | 4729 error ("Cannot connect to server %s", SDATA (name)); |
4730 | 4730 |
4731 w32_in_use = 1; | 4731 w32_in_use = 1; |
4784 | 4784 |
4785 /* Merge in system logical colors. */ | 4785 /* Merge in system logical colors. */ |
4786 add_system_logical_colors_to_map (&Vw32_color_map); | 4786 add_system_logical_colors_to_map (&Vw32_color_map); |
4787 | 4787 |
4788 if (! NILP (xrm_string)) | 4788 if (! NILP (xrm_string)) |
4789 xrm_option = (unsigned char *) SDATA (xrm_string); | 4789 xrm_option = SDATA (xrm_string); |
4790 else | 4790 else |
4791 xrm_option = (unsigned char *) 0; | 4791 xrm_option = (unsigned char *) 0; |
4792 | 4792 |
4793 /* Use this general default value to start with. */ | 4793 /* Use this general default value to start with. */ |
4794 /* First remove .exe suffix from invocation-name - it looks ugly. */ | 4794 /* First remove .exe suffix from invocation-name - it looks ugly. */ |
4805 validate_x_resource_name (); | 4805 validate_x_resource_name (); |
4806 | 4806 |
4807 /* This is what opens the connection and sets x_current_display. | 4807 /* This is what opens the connection and sets x_current_display. |
4808 This also initializes many symbols, such as those used for input. */ | 4808 This also initializes many symbols, such as those used for input. */ |
4809 dpyinfo = w32_term_init (display, xrm_option, | 4809 dpyinfo = w32_term_init (display, xrm_option, |
4810 (char *) SDATA (Vx_resource_name)); | 4810 SSDATA (Vx_resource_name)); |
4811 | 4811 |
4812 if (dpyinfo == 0) | 4812 if (dpyinfo == 0) |
4813 { | 4813 { |
4814 if (!NILP (must_succeed)) | 4814 if (!NILP (must_succeed)) |
4815 fatal ("Cannot connect to server %s.\n", | 4815 fatal ("Cannot connect to server %s.\n", |
6186 { | 6186 { |
6187 Lisp_Object decoded = | 6187 Lisp_Object decoded = |
6188 code_convert_string_norecord (make_unibyte_string (errstr, | 6188 code_convert_string_norecord (make_unibyte_string (errstr, |
6189 strlen (errstr)), | 6189 strlen (errstr)), |
6190 Vlocale_coding_system, 0); | 6190 Vlocale_coding_system, 0); |
6191 errstr = (char *)SDATA (decoded); | 6191 errstr = SSDATA (decoded); |
6192 } | 6192 } |
6193 error ("ShellExecute failed: %s", errstr); | 6193 error ("ShellExecute failed: %s", errstr); |
6194 } | 6194 } |
6195 | 6195 |
6196 /* Lookup virtual keycode from string representing the name of a | 6196 /* Lookup virtual keycode from string representing the name of a |
7201 int | 7201 int |
7202 w32_last_error (void) | 7202 w32_last_error (void) |
7203 { | 7203 { |
7204 return GetLastError (); | 7204 return GetLastError (); |
7205 } | 7205 } |
7206 |