#define FOF_NO_CONNECTED_ELEMENTS 0x2000
#endif
-void syms_of_w32fns (void);
-void globals_of_w32fns (void);
-
-extern void free_frame_menubar (struct frame *);
extern int w32_console_toggle_lock_key (int, Lisp_Object);
extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
extern void w32_free_menu_strings (HWND);
extern const char *map_w32_filename (const char *, const char **);
-extern char * w32_strerror (int error_no);
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
EnumDisplayMonitors_Proc enum_display_monitors_fn = NULL;
GetTitleBarInfo_Proc get_title_bar_info_fn = NULL;
-#ifdef NTGUI_UNICODE
-#define unicode_append_menu AppendMenuW
-#else /* !NTGUI_UNICODE */
extern AppendMenuW_Proc unicode_append_menu;
-#endif /* NTGUI_UNICODE */
/* Flag to selectively ignore WM_IME_CHAR messages. */
static int ignore_ime_char = 0;
static int w32_unicode_gui;
/* From w32menu.c */
-extern HMENU current_popup_menu;
int menubar_in_use = 0;
/* From w32uniscribe.c */
} kbdhook;
typedef HWND (WINAPI *GetConsoleWindow_Proc) (void);
+typedef BOOL (WINAPI *IsDebuggerPresent_Proc) (void);
+
/* stdin, from w32console.c */
extern HANDLE keyboard_handle;
\f
static Lisp_Object unwind_create_frame (Lisp_Object);
-static void unwind_create_tip_frame (Lisp_Object);
static void my_create_window (struct frame *);
static void my_create_tip_window (struct frame *);
void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_internal_border_width (struct frame *f, Lisp_Object, Lisp_Object);
\f
/* Store the screen positions of frame F into XPTR and YPTR.
/* The default colors for the w32 color map */
typedef struct colormap_t
{
- char *name;
+ const char *name;
COLORREF colorref;
} colormap_t;
NULL, NULL, (LPBYTE)color_buffer, &color_size)
== ERROR_SUCCESS)
{
- int r, g, b;
+ unsigned r, g, b;
if (sscanf (color_buffer, " %u %u %u", &r, &g, &b) == 3)
*system_colors = Fcons (Fcons (build_string (full_name_buffer),
make_number (RGB (r, g, b))),
If F is not a color screen, return DEF (default) regardless of what
ARG says. */
-int
+static int
x_decode_color (struct frame *f, Lisp_Object arg, int def)
{
XColor cdef;
Note that this does not fully take effect if done before
F has a window. */
-void
+static void
x_set_border_pixel (struct frame *f, int pix)
{
#endif
}
\f
-void
+static void
x_clear_under_internal_border (struct frame *f)
{
int border = FRAME_INTERNAL_BORDER_WIDTH (f);
if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
{
- FRAME_INTERNAL_BORDER_WIDTH (f) = border;
+ f->internal_border_width = border;
if (FRAME_X_WINDOW (f) != 0)
{
suggesting a new name, which lisp code should override; if
F->explicit_name is set, ignore the new name; otherwise, set it. */
-void
+static void
x_set_name (struct frame *f, Lisp_Object name, bool explicit)
{
/* Make sure that requests from lisp code override requests from
\f
/* Subroutines for creating a frame. */
+Cursor w32_load_cursor (LPCTSTR);
+
Cursor
w32_load_cursor (LPCTSTR name)
{
can prevent this by setting the
w32-pass-[lr]window-to-system variable to
NIL. */
- if (hs->vkCode == VK_LWIN && !NILP (Vw32_pass_lwindow_to_system) ||
- hs->vkCode == VK_RWIN && !NILP (Vw32_pass_rwindow_to_system))
+ if ((hs->vkCode == VK_LWIN && !NILP (Vw32_pass_lwindow_to_system)) ||
+ (hs->vkCode == VK_RWIN && !NILP (Vw32_pass_rwindow_to_system)))
{
/* Not prevented - Simulate the keypress to the system. */
memset (inputs, 0, sizeof (inputs));
/* Some other key was pressed while a captured Win key is down.
This is either an Emacs registered hotkey combination, or a
system hotkey. */
- if (kbdhook.lwindown && kbdhook.lwin_hooked[hs->vkCode] ||
- kbdhook.rwindown && kbdhook.rwin_hooked[hs->vkCode])
+ if ((kbdhook.lwindown && kbdhook.lwin_hooked[hs->vkCode]) ||
+ (kbdhook.rwindown && kbdhook.rwin_hooked[hs->vkCode]))
{
/* Hooked Win-x combination, do not pass the keypress to Windows. */
kbdhook.suppress_lone = 1;
{
kbdhook.hook_count++;
+ /* This hook gets in the way of debugging, since when Emacs stops,
+ its input thread stops, and there's nothing to process keyboard
+ events, whereas this hook is global, and is invoked in the
+ context of the thread that installed it. So we don't install the
+ hook if the process is being debugged. */
+ if (w32_kbdhook_active)
+ {
+ IsDebuggerPresent_Proc is_debugger_present = (IsDebuggerPresent_Proc)
+ GetProcAddress (GetModuleHandle ("kernel32.dll"), "IsDebuggerPresent");
+ if (is_debugger_present && is_debugger_present ())
+ return;
+ }
+
/* Hooking is only available on NT architecture systems, as
indicated by the w32_kbdhook_active variable. */
if (kbdhook.hook_count == 1 && w32_kbdhook_active)
/* Mark a specific key combination as hooked, preventing it to be
handled by the system. */
-void
+static void
hook_w32_key (int hook, int modifier, int vkey)
{
char *tbl = NULL;
}
}
+#ifdef WINDOWSNT
/* Check the current Win key pressed state. */
int
check_w32_winkey_state (int vkey)
}
return 0;
}
+#endif /* WINDOWSNT */
/* Reset the keyboard hook state. Locking the workstation with Win-L
leaves the Win key(s) "down" from the hook's point of view - the
keyup event is never seen. Thus, this function must be called when
the system is locked. */
-void
+static void
reset_w32_kbdhook_state (void)
{
kbdhook.lwindown = 0;
else
return (GetKeyState (vkey) & 0x1);
}
+#ifdef WINDOWSNT
if (w32_kbdhook_active && (vkey == VK_LWIN || vkey == VK_RWIN))
return check_w32_winkey_state (vkey);
+#endif
if (!modifiers_recorded)
return (GetKeyState (vkey) & 0x8000);
/* Convert between the modifier bits W32 uses and the modifier bits
Emacs uses. */
+unsigned int w32_key_to_modifier (int);
unsigned int
w32_key_to_modifier (int key)
return mods;
}
+unsigned int map_keypad_keys (unsigned int, unsigned int);
+
unsigned int
map_keypad_keys (unsigned int virt_key, unsigned int extended)
{
PostThreadMessage (dwWindowsThreadId, WM_NULL, 0, 0);
}
+DWORD WINAPI w32_msg_worker (void *);
+
DWORD WINAPI
w32_msg_worker (void *arg)
{
Be ready to treat the case when this delivers WM_(SYS)DEADCHAR. */
static int after_deadkey = -1;
-int
+static int
deliver_wm_chars (int do_translate, HWND hwnd, UINT msg, UINT wParam,
UINT lParam, int legacy_alt_meta)
{
W32Msg wmsg;
DWORD console_modifiers = construct_console_modifiers ();
int *b = buf, strip_ExtraMods = 1, hairy = 0;
- char *type_CtrlAlt = NULL;
+ const char *type_CtrlAlt = NULL;
/* XXXX In fact, there may be another case when we need to do the same:
What happens if the string defined in the LIGATURES has length
SHORT r = VkKeyScanW (*b), bitmap = 0x1FF;
FPRINTF_WM_CHARS((stderr, "VkKeyScanW %#06x %#04x\n", (int)r,
- wParam));
+ wParam));
if ((r & 0xFF) == wParam)
bitmap = r>>8; /* *b is reachable via simple interface */
+ else
+ {
+ /* VkKeyScanW() (essentially) returns the FIRST key with
+ the specified character; so here the pressed key is the
+ SECONDARY key producing the character.
+
+ Essentially, we have no information about the "role" of
+ modifiers on this key: which contribute into the
+ produced character (so "are consumed"), and which are
+ "extra" (must attache to bindable events).
+
+ The default above would consume ALL modifiers, so the
+ character is reported "as is". However, on many layouts
+ the ordering of the keys (in the layout table) is not
+ thought out well, so the "secondary" keys are often those
+ which the users would prefer to use with Alt-CHAR.
+ (Moreover - with e.g. Czech-QWERTY - the ASCII
+ punctuation is accessible from two equally [nu]preferable
+ AltGr-keys.)
+
+ SO: Heuristic: if the reported char is ASCII, AND Meta
+ modifier is a candidate, behave as if Meta is present
+ (fallback to the legacy branch; bug#23251).
+
+ (This would break layouts
+ - delivering ASCII characters
+ - on SECONDARY keys
+ - with not Shift/AltGr-like modifier combinations.
+ All 3 conditions together must be pretty exotic
+ cases - and a workaround exists: use "primary" keys!) */
+ if (*b < 0x80
+ && (wmsg.dwModifiers
+ & (alt_modifier | meta_modifier
+ | super_modifier | hyper_modifier)))
+ return 0;
+ }
if (*type_CtrlAlt == 'a') /* Simple Alt seen */
{
if ((bitmap & ~1) == 0) /* 1: KBDSHIFT */
my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
return 0;
+ case WM_ENDSESSION:
+ my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
+ /* If we return, the process will be terminated immediately. */
+ sleep (1000);
+
case WM_WINDOWPOSCHANGING:
/* Don't restrict the sizing of any kind of frames. If the window
manager doesn't, there's no reason to do it ourselves. */
my_create_tip_window (struct frame *f)
{
RECT rect;
+ Window tip_window;
rect.left = rect.top = 0;
rect.right = FRAME_PIXEL_WIDTH (f);
}
-/* Handler for signals raised during x_create_frame and
- x_create_tip_frame. FRAME is the frame which is partially
- constructed. */
+/* Handler for signals raised during x_create_frame.
+ FRAME is the frame which is partially constructed. */
static Lisp_Object
unwind_create_frame (Lisp_Object frame)
if (!STRINGP (font))
{
int i;
- static char *names[]
+ static const char *names[]
= { "Courier New-10",
"-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1",
"-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-iso8859-1",
else if (! NILP (visibility))
x_make_frame_visible (f);
else
- /* Must have been Qnil. */
- ;
+ {
+ /* Must have been Qnil. */
+ ;
+ }
}
/* Initialize `default-minibuffer-frame' in case this is the first
{
struct frame *f = XFRAME (frame);
- if (FRAME_W32_P (f) && !EQ (frame, tip_frame))
+ if (FRAME_W32_P (f) && !FRAME_TOOLTIP_P (f))
{
HMONITOR monitor =
monitor_from_window_fn (FRAME_W32_WINDOW (f),
{
struct frame *f = XFRAME (frame);
- if (FRAME_W32_P (f) && !EQ (frame, tip_frame))
+ if (FRAME_W32_P (f) && FRAME_TOOLTIP_P (f))
frames = Fcons (frame, frames);
}
attributes = Fcons (Fcons (Qframes, frames), attributes);
return sound;
}
+#if 0 /* unused */
int
x_screen_planes (register struct frame *f)
{
return FRAME_DISPLAY_INFO (f)->n_planes;
}
+#endif
\f
/* Return the display structure for the display named NAME.
Open a new connection if necessary. */
Tool tips
***********************************************************************/
-static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
- Lisp_Object, int, int, int *, int *);
-
-/* The frame of a currently visible tooltip. */
-
-Lisp_Object tip_frame;
-
-/* If non-nil, a timer started that hides the last tooltip when it
- fires. */
-
-Lisp_Object tip_timer;
-Window tip_window;
-
-/* If non-nil, a vector of 3 elements containing the last args
- with which x-show-tip was called. See there. */
-
-Lisp_Object last_show_tip_args;
-
-
-static void
-unwind_create_tip_frame (Lisp_Object frame)
-{
- Lisp_Object deleted;
-
- deleted = unwind_create_frame (frame);
- if (EQ (deleted, Qt))
- {
- tip_window = NULL;
- tip_frame = Qnil;
- }
-}
-
-
/* Create a frame for a tooltip on the display described by DPYINFO.
PARMS is a list of frame parameters. Value is the frame.
f->wants_modeline = false;
XSETFRAME (frame, f);
- record_unwind_protect (unwind_create_tip_frame, frame);
+ record_unwind_protect (do_unwind_create_frame, frame);
/* By setting the output method, we're essentially saying that
the frame is live, as per FRAME_LIVE_P. If we get a signal
FRAME_FONTSET (f) = -1;
fset_icon_name (f, Qnil);
+ f->tooltip = true;
#ifdef GLYPH_DEBUG
image_cache_refcount =
height = FRAME_LINES (f);
SET_FRAME_COLS (f, 0);
SET_FRAME_LINES (f, 0);
- adjust_frame_size (f, width * FRAME_COLUMN_WIDTH (f),
- height * FRAME_LINE_HEIGHT (f), 0, true, Qtip_frame);
- /* Add `tooltip' frame parameter's default value. */
- if (NILP (Fframe_parameter (frame, Qtooltip)))
- Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil));
+ change_frame_size (f, width, height, true, false, false, false);
/* Set up faces after all frame parameters are known. This call
also merges in face attributes specified for new frames.
f->no_split = true;
+ /* Now this is an official tooltip frame on this display. */
+ dpyinfo->w32_tooltip_frame = f;
+
/* Now that the frame is official, it counts as a reference to
its display. */
FRAME_DISPLAY_INFO (f)->reference_count++;
*root_x = min_x;
}
-/* Hide tooltip. Delete its frame if DELETE is true. */
+/* Hide tooltip frame F and delete it if DELETE is true. */
+
static Lisp_Object
-x_hide_tip (bool delete)
+x_hide_tip (struct frame *f, bool delete)
{
- if (!NILP (tip_timer))
+ if (f)
{
- call1 (Qcancel_timer, tip_timer);
- tip_timer = Qnil;
- }
+ Lisp_Object frame, timer;
- if (NILP (tip_frame)
- || (!delete && FRAMEP (tip_frame)
- && !FRAME_VISIBLE_P (XFRAME (tip_frame))))
- return Qnil;
- else
- {
- ptrdiff_t count;
- Lisp_Object was_open = Qnil;
+ XSETFRAME (frame, f);
+ timer = Fframe_parameter (frame, Qtooltip_timer);
- count = SPECPDL_INDEX ();
- specbind (Qinhibit_redisplay, Qt);
- specbind (Qinhibit_quit, Qt);
+ if (!NILP (timer))
+ call1 (Qcancel_timer, timer);
- if (FRAMEP (tip_frame))
+ if (!delete && !FRAME_VISIBLE_P (f))
+ return Qnil;
+ else
{
+ ptrdiff_t count = SPECPDL_INDEX ();
+
+ specbind (Qinhibit_redisplay, Qt);
+ specbind (Qinhibit_quit, Qt);
+
if (delete)
- {
- delete_frame (tip_frame, Qnil);
- tip_frame = Qnil;
- }
+ delete_frame (frame, Qnil);
else
- x_make_frame_invisible (XFRAME (tip_frame));
+ x_make_frame_invisible (f);
- was_open = Qt;
+ return unbind_to (count, Qt);
}
- else
- tip_frame = Qnil;
-
- return unbind_to (count, was_open);
}
+ return Qnil;
}
A tooltip's maximum size is specified by `x-max-tooltip-size'.
Text larger than the specified size is clipped. */)
- (Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
+ (Lisp_Object string, Lisp_Object frame, Lisp_Object parms,
+ Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
{
- struct frame *f, *tip_f;
+ struct frame *tip_f;
struct window *w;
int root_x, root_y;
struct buffer *old_buffer;
struct text_pos pos;
- int i, width, height;
+ int width, height;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
ptrdiff_t count = SPECPDL_INDEX ();
ptrdiff_t count_1;
- Lisp_Object window, size;
+ Lisp_Object window, size, tip_frame, parameters;
+ AUTO_STRING (tip, " *tip*");
specbind (Qinhibit_redisplay, Qt);
CHECK_STRING (string);
- f = decode_window_system_frame (frame);
+ decode_window_system_frame (frame);
if (NILP (timeout))
timeout = make_number (5);
else
else
CHECK_NUMBER (dy);
- if (NILP (last_show_tip_args))
- last_show_tip_args = Fmake_vector (make_number (3), Qnil);
+ parameters = Fframe_parameter (frame, Qtooltip_parameters);
+ if (NILP (parameters))
+ parameters = Fmake_vector (make_number (3), Qnil);
+
+ /* Look at current tooltip frame, if any. */
+ tip_f = FRAME_DISPLAY_INFO (XFRAME (frame))->w32_tooltip_frame;
+ if (tip_f)
+ XSETFRAME (tip_frame, tip_f);
+ else
+ tip_frame = Qnil;
- if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
+ if (tip_f && FRAME_LIVE_P (tip_f))
{
- Lisp_Object last_string = AREF (last_show_tip_args, 0);
- Lisp_Object last_frame = AREF (last_show_tip_args, 1);
- Lisp_Object last_parms = AREF (last_show_tip_args, 2);
+ Lisp_Object last_string = AREF (parameters, 0);
+ Lisp_Object last_frame = AREF (parameters, 1);
+ Lisp_Object last_parms = AREF (parameters, 2);
if (FRAME_VISIBLE_P (XFRAME (tip_frame))
&& EQ (frame, last_frame)
&& !NILP (Fequal (last_parms, parms)))
{
/* Only DX and DY have changed. */
- tip_f = XFRAME (tip_frame);
- if (!NILP (tip_timer))
- {
- Lisp_Object timer = tip_timer;
+ Lisp_Object timer = Fframe_parameter (tip_frame, Qtooltip_timer);
- tip_timer = Qnil;
- call1 (Qcancel_timer, timer);
- }
+ if (!NILP (timer))
+ call1 (Qcancel_timer, timer);
block_input ();
compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f),
}
}
- x_hide_tip (delete);
+ x_hide_tip (tip_f, delete);
}
else
- x_hide_tip (true);
+ x_hide_tip (tip_f, true);
}
else
- x_hide_tip (true);
+ x_hide_tip (tip_f, true);
- ASET (last_show_tip_args, 0, string);
- ASET (last_show_tip_args, 1, frame);
- ASET (last_show_tip_args, 2, parms);
+ /* Update tooltip parameters. */
+ {
+ AUTO_FRAME_ARG (arg, Qtooltip_parameters, parameters);
+ ASET (parameters, 0, string);
+ ASET (parameters, 1, frame);
+ ASET (parameters, 2, parms);
+ Fmodify_frame_parameters (frame, arg);
+ }
/* Block input until the tip has been fully drawn, to avoid crashes
when drawing tips in menus. */
if (NILP (Fassq (Qbackground_color, parms)))
parms = Fcons (Fcons (Qbackground_color, build_string ("lightyellow")),
parms);
-
- /* Create a frame for the tooltip, and record it in the global
- variable tip_frame. */
- if (NILP (tip_frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms)))
+ if (NILP (tip_frame
+ = x_create_tip_frame (FRAME_DISPLAY_INFO (XFRAME (frame)), parms)))
{
/* Creating the tip frame failed. */
unblock_input ();
tip_f = XFRAME (tip_frame);
window = FRAME_ROOT_WINDOW (tip_f);
- AUTO_STRING (tip, " *tip*");
set_window_buffer (window, Fget_buffer_create (tip), false, false);
w = XWINDOW (window);
w->pseudo_window_p = true;
windows_or_buffers_changed = old_windows_or_buffers_changed;
start_timer:
- /* Let the tip disappear after timeout seconds. */
- tip_timer = call3 (intern ("run-at-time"), timeout, Qnil,
- intern ("x-hide-tip"));
-
+ {
+ /* Let the tip disappear after timeout seconds. */
+ AUTO_FRAME_ARG (arg, Qtooltip_timer,
+ call3 (intern ("run-at-time"), timeout,
+ Qnil, intern ("x-hide-tip")));
+ Fmodify_frame_parameters (tip_frame, arg);
+ }
return unbind_to (count, Qnil);
}
-DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 0, 0,
+DEFUN ("x-hide-tip", Fx_hide_tip, Sx_hide_tip, 0, 1, 0,
doc: /* Hide the current tooltip window, if there is any.
+Optional FRAME is the frame to hide tooltip on.
Value is t if tooltip was open, nil otherwise. */)
- (void)
+ (Lisp_Object frame)
{
- return x_hide_tip (!tooltip_reuse_hidden_frame);
+ Lisp_Object obj = Qnil;
+
+ if (NILP (frame))
+ {
+ struct w32_display_info *dpyinfo;
+
+ for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
+ if (dpyinfo->w32_tooltip_frame)
+ if (!NILP (x_hide_tip (dpyinfo->w32_tooltip_frame,
+ !tooltip_reuse_hidden_frame)))
+ obj = Qt;
+ }
+ else
+ {
+ struct frame *f;
+
+ CHECK_FRAME (frame);
+ f = XFRAME (frame);
+ if (FRAME_DISPLAY_INFO (f)
+ && FRAME_DISPLAY_INFO (f)->w32_tooltip_frame)
+ obj = x_hide_tip (FRAME_DISPLAY_INFO (f)->w32_tooltip_frame,
+ !tooltip_reuse_hidden_frame);
+ }
+ return obj;
}
\f
/***********************************************************************
{
/* Filter index: 1: All Files, 2: Directories only */
static const wchar_t filter_w[] = L"All Files (*.*)\0*.*\0Directories\0*|*\0";
+#ifndef NTGUI_UNICODE
static const char filter_a[] = "All Files (*.*)\0*.*\0Directories\0*|*\0";
+#endif
Lisp_Object filename = default_filename;
struct frame *f = SELECTED_FRAME ();
/* Alphanumerics map to themselves. */
if (key[1] == 0)
{
- if (key[0] >= 'A' && key[0] <= 'Z' ||
- key[0] >= '0' && key[0] <= '9')
+ if ((key[0] >= 'A' && key[0] <= 'Z')
+ || (key[0] >= '0' && key[0] <= '9'))
return key[0];
if (key[0] >= 'a' && key[0] <= 'z')
return toupper(key[0]);
else
{
long m;
- float h;
+ double h;
char buffer[16];
snprintf (buffer, 16, "%ld", seconds_left);
seconds = build_string (buffer);
--ret;
buf[ret] = '\0';
if (!ret)
- sprintf (buf, "w32 error %u", error_no);
+ sprintf (buf, "w32 error %d", error_no);
return buf;
}
/* For convenience when debugging. (You cannot call GetLastError
directly from GDB: it will crash, because it uses the __stdcall
calling convention, not the _cdecl convention assumed by GDB.) */
+DWORD w32_last_error (void);
+
DWORD
w32_last_error (void)
{
EMACS_INT retval;
char *icon, *tip, *title, *msg;
enum NI_Severity severity;
- unsigned timeout;
+ unsigned timeout = 0;
if (nargs == 0)
return Qnil;
if (STRINGP (lres))
icon = SSDATA (ENCODE_FILE (Fexpand_file_name (lres, Qnil)));
else
- icon = "";
+ icon = (char *)"";
/* Tip. */
lres = Fplist_get (arg_plist, QCtip);
if (STRINGP (lres))
tip = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
else
- tip = "Emacs notification";
+ tip = (char *)"Emacs notification";
/* Severity. */
lres = Fplist_get (arg_plist, QClevel);
if (STRINGP (lres))
title = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
else
- title = "";
+ title = (char *)"";
/* Notification body text. */
lres = Fplist_get (arg_plist, QCbody);
if (STRINGP (lres))
msg = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
else
- msg = "";
+ msg = (char *)"";
/* Do it! */
retval = add_tray_notification (f, icon, tip, severity, timeout, title, msg);
DEFSYM (Qworkarea, "workarea");
DEFSYM (Qmm_size, "mm-size");
DEFSYM (Qframes, "frames");
- DEFSYM (Qtip_frame, "tip-frame");
DEFSYM (Qassq_delete_all, "assq-delete-all");
DEFSYM (Qunicode_sip, "unicode-sip");
#if defined WINDOWSNT && !defined HAVE_DBUS
defsubr (&Sset_message_beep);
defsubr (&Sx_show_tip);
defsubr (&Sx_hide_tip);
- tip_timer = Qnil;
- staticpro (&tip_timer);
- tip_frame = Qnil;
- staticpro (&tip_frame);
-
- last_show_tip_args = Qnil;
- staticpro (&last_show_tip_args);
defsubr (&Sx_file_dialog);
#ifdef WINDOWSNT
#define BACKTRACE_LIMIT_MAX 62
-int
+static int
w32_backtrace (void **buffer, int limit)
{
static CaptureStackBackTrace_proc s_pfn_CaptureStackBackTrace = NULL;
but not on Windows 7. addr2line doesn't mind a missing
"0x", but will be confused by an extra one. */
if (except_addr)
- sprintf (buf, "\r\nException 0x%lx at this address:\r\n%p\r\n",
- except_code, except_addr);
+ sprintf (buf, "\r\nException 0x%x at this address:\r\n%p\r\n",
+ (unsigned int) except_code, except_addr);
if (stderr_fd >= 0)
{
if (except_addr)