21 |
/* Contributed by Andrew Choi (akochoi@mac.com). */ |
/* Contributed by Andrew Choi (akochoi@mac.com). */ |
22 |
|
|
23 |
#include <config.h> |
#include <config.h> |
|
|
|
24 |
#include <stdio.h> |
#include <stdio.h> |
25 |
#include <math.h> |
#include <math.h> |
|
#include <limits.h> |
|
|
#include <errno.h> |
|
26 |
|
|
27 |
#include "lisp.h" |
#include "lisp.h" |
|
#include "charset.h" |
|
28 |
#include "macterm.h" |
#include "macterm.h" |
29 |
#include "frame.h" |
#include "frame.h" |
30 |
#include "window.h" |
#include "window.h" |
31 |
#include "buffer.h" |
#include "buffer.h" |
|
#include "dispextern.h" |
|
|
#include "fontset.h" |
|
32 |
#include "intervals.h" |
#include "intervals.h" |
33 |
|
#include "dispextern.h" |
34 |
#include "keyboard.h" |
#include "keyboard.h" |
35 |
#include "blockinput.h" |
#include "blockinput.h" |
36 |
#include "epaths.h" |
#include <epaths.h> |
37 |
#include "termhooks.h" |
#include "charset.h" |
38 |
#include "coding.h" |
#include "coding.h" |
39 |
|
#include "fontset.h" |
40 |
#include "systime.h" |
#include "systime.h" |
41 |
|
#include "termhooks.h" |
42 |
|
#include "atimer.h" |
43 |
|
|
|
/* #include "bitmaps/gray.xbm" */ |
|
|
#define gray_width 2 |
|
|
#define gray_height 2 |
|
|
static unsigned char gray_bits[] = { |
|
|
0x01, 0x02}; |
|
|
|
|
|
/*#include <commdlg.h> |
|
|
#include <shellapi.h>*/ |
|
44 |
#include <ctype.h> |
#include <ctype.h> |
45 |
#include <sys/types.h> |
#include <sys/types.h> |
46 |
#include <sys/stat.h> |
#include <sys/stat.h> |
47 |
|
#include <limits.h> |
48 |
|
#include <errno.h> |
49 |
#include <sys/param.h> |
#include <sys/param.h> |
50 |
|
|
51 |
#include <stdlib.h> |
extern void free_frame_menubar (); |
|
#include <string.h> |
|
|
|
|
|
/*extern void free_frame_menubar (); |
|
|
extern double atof (); |
|
|
extern int w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state); |
|
|
extern int quit_char;*/ |
|
|
|
|
|
extern char *lispy_function_keys[]; |
|
|
|
|
|
/* The gray bitmap `bitmaps/gray'. This is done because macterm.c uses |
|
|
it, and including `bitmaps/gray' more than once is a problem when |
|
|
config.h defines `static' as an empty replacement string. */ |
|
|
|
|
|
int gray_bitmap_width = gray_width; |
|
|
int gray_bitmap_height = gray_height; |
|
|
unsigned char *gray_bitmap_bits = gray_bits; |
|
52 |
|
|
53 |
/* Non-zero means we're allowed to display an hourglass cursor. */ |
/* Non-zero means we're allowed to display an hourglass cursor. */ |
54 |
|
|
85 |
|
|
86 |
Lisp_Object Vx_pixel_size_width_font_regexp; |
Lisp_Object Vx_pixel_size_width_font_regexp; |
87 |
|
|
|
/* Evaluate this expression to rebuild the section of syms_of_macfns |
|
|
that initializes and staticpros the symbols declared below. Note |
|
|
that Emacs 18 has a bug that keeps C-x C-e from being able to |
|
|
evaluate this expression. |
|
|
|
|
|
(progn |
|
|
;; Accumulate a list of the symbols we want to initialize from the |
|
|
;; declarations at the top of the file. |
|
|
(goto-char (point-min)) |
|
|
(search-forward "/\*&&& symbols declared here &&&*\/\n") |
|
|
(let (symbol-list) |
|
|
(while (looking-at "Lisp_Object \\(Q[a-z_]+\\)") |
|
|
(setq symbol-list |
|
|
(cons (buffer-substring (match-beginning 1) (match-end 1)) |
|
|
symbol-list)) |
|
|
(forward-line 1)) |
|
|
(setq symbol-list (nreverse symbol-list)) |
|
|
;; Delete the section of syms_of_... where we initialize the symbols. |
|
|
(search-forward "\n /\*&&& init symbols here &&&*\/\n") |
|
|
(let ((start (point))) |
|
|
(while (looking-at "^ Q") |
|
|
(forward-line 2)) |
|
|
(kill-region start (point))) |
|
|
;; Write a new symbol initialization section. |
|
|
(while symbol-list |
|
|
(insert (format " %s = intern (\"" (car symbol-list))) |
|
|
(let ((start (point))) |
|
|
(insert (substring (car symbol-list) 1)) |
|
|
(subst-char-in-region start (point) ?_ ?-)) |
|
|
(insert (format "\");\n staticpro (&%s);\n" (car symbol-list))) |
|
|
(setq symbol-list (cdr symbol-list))))) |
|
|
|
|
|
*/ |
|
|
|
|
|
/*&&& symbols declared here &&&*/ |
|
88 |
Lisp_Object Qnone; |
Lisp_Object Qnone; |
89 |
Lisp_Object Qsuppress_icon; |
Lisp_Object Qsuppress_icon; |
90 |
Lisp_Object Qundefined_color; |
Lisp_Object Qundefined_color; |
91 |
Lisp_Object Qcancel_timer; |
Lisp_Object Qcancel_timer; |
92 |
|
|
93 |
|
/* In dispnew.c */ |
94 |
|
|
95 |
extern Lisp_Object Vwindow_system_version; |
extern Lisp_Object Vwindow_system_version; |
96 |
|
|
97 |
#if 0 /* Use xstricmp instead. */ |
#if 0 /* Use xstricmp instead. */ |
186 |
|
|
187 |
return dpyinfo; |
return dpyinfo; |
188 |
} |
} |
|
|
|
|
/* Return the Emacs frame-object corresponding to a mac window. |
|
|
It could be the frame's main window or an icon window. */ |
|
|
|
|
|
/* This function can be called during GC, so use GC_xxx type test macros. */ |
|
|
|
|
|
struct frame * |
|
|
x_window_to_frame (dpyinfo, wdesc) |
|
|
struct mac_display_info *dpyinfo; |
|
|
WindowPtr wdesc; |
|
|
{ |
|
|
Lisp_Object tail, frame; |
|
|
struct frame *f; |
|
|
|
|
|
for (tail = Vframe_list; GC_CONSP (tail); tail = XCDR (tail)) |
|
|
{ |
|
|
frame = XCAR (tail); |
|
|
if (!GC_FRAMEP (frame)) |
|
|
continue; |
|
|
f = XFRAME (frame); |
|
|
if (!FRAME_W32_P (f) || FRAME_MAC_DISPLAY_INFO (f) != dpyinfo) |
|
|
continue; |
|
|
/*if (f->output_data.w32->hourglass_window == wdesc) |
|
|
return f;*/ |
|
|
|
|
|
/* MAC_TODO: Check tooltips when supported. */ |
|
|
if (FRAME_MAC_WINDOW (f) == wdesc) |
|
|
return f; |
|
|
} |
|
|
return 0; |
|
|
} |
|
189 |
|
|
190 |
|
|
191 |
|
|
192 |
static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); |
static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); |
193 |
|
static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object)); |
194 |
|
|
195 |
void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
196 |
void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); |
216 |
|
|
217 |
extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); |
extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); |
218 |
|
|
219 |
|
|
220 |
|
|
221 |
/* Store the screen positions of frame F into XPTR and YPTR. |
/* Store the screen positions of frame F into XPTR and YPTR. |
222 |
These are the positions of the containing window manager window, |
These are the positions of the containing window manager window, |
223 |
not Emacs's own window. */ |
not Emacs's own window. */ |
1750 |
} |
} |
1751 |
|
|
1752 |
|
|
1753 |
|
|
1754 |
|
/* Set the Mac window title to NAME for frame F. */ |
1755 |
|
|
1756 |
|
static void |
1757 |
|
x_set_name_internal (f, name) |
1758 |
|
FRAME_PTR f; |
1759 |
|
Lisp_Object name; |
1760 |
|
{ |
1761 |
|
if (FRAME_MAC_WINDOW (f)) |
1762 |
|
{ |
1763 |
|
if (STRING_MULTIBYTE (name)) |
1764 |
|
#if TARGET_API_MAC_CARBON |
1765 |
|
name = ENCODE_UTF_8 (name); |
1766 |
|
#else |
1767 |
|
name = ENCODE_SYSTEM (name); |
1768 |
|
#endif |
1769 |
|
|
1770 |
|
BLOCK_INPUT; |
1771 |
|
|
1772 |
|
{ |
1773 |
|
#if TARGET_API_MAC_CARBON |
1774 |
|
CFStringRef windowTitle = |
1775 |
|
cfstring_create_with_utf8_cstring (SDATA (name)); |
1776 |
|
|
1777 |
|
SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle); |
1778 |
|
CFRelease (windowTitle); |
1779 |
|
#else |
1780 |
|
Str255 windowTitle; |
1781 |
|
if (strlen (SDATA (name)) < 255) |
1782 |
|
{ |
1783 |
|
strcpy (windowTitle, SDATA (name)); |
1784 |
|
c2pstr (windowTitle); |
1785 |
|
SetWTitle (FRAME_MAC_WINDOW (f), windowTitle); |
1786 |
|
} |
1787 |
|
#endif |
1788 |
|
} |
1789 |
|
|
1790 |
|
UNBLOCK_INPUT; |
1791 |
|
} |
1792 |
|
} |
1793 |
|
|
1794 |
/* Change the name of frame F to NAME. If NAME is nil, set F's name to |
/* Change the name of frame F to NAME. If NAME is nil, set F's name to |
1795 |
w32_id_name. |
mac_id_name. |
1796 |
|
|
1797 |
If EXPLICIT is non-zero, that indicates that lisp code is setting the |
If EXPLICIT is non-zero, that indicates that lisp code is setting the |
1798 |
name; if NAME is a string, set F's name to NAME and set |
name; if NAME is a string, set F's name to NAME and set |
1822 |
else if (f->explicit_name) |
else if (f->explicit_name) |
1823 |
return; |
return; |
1824 |
|
|
1825 |
/* If NAME is nil, set the name to the w32_id_name. */ |
/* If NAME is nil, set the name to the mac_id_name. */ |
1826 |
if (NILP (name)) |
if (NILP (name)) |
1827 |
{ |
{ |
1828 |
/* Check for no change needed in this very common case |
/* Check for no change needed in this very common case |
1846 |
if (! NILP (f->title)) |
if (! NILP (f->title)) |
1847 |
name = f->title; |
name = f->title; |
1848 |
|
|
1849 |
if (FRAME_MAC_WINDOW (f)) |
x_set_name_internal (f, name); |
|
{ |
|
|
if (STRING_MULTIBYTE (name)) |
|
|
#if TARGET_API_MAC_CARBON |
|
|
name = ENCODE_UTF_8 (name); |
|
|
#else |
|
|
name = ENCODE_SYSTEM (name); |
|
|
#endif |
|
|
|
|
|
BLOCK_INPUT; |
|
|
|
|
|
{ |
|
|
#if TARGET_API_MAC_CARBON |
|
|
CFStringRef windowTitle = |
|
|
cfstring_create_with_utf8_cstring (SDATA (name)); |
|
|
|
|
|
SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle); |
|
|
CFRelease (windowTitle); |
|
|
#else |
|
|
Str255 windowTitle; |
|
|
if (strlen (SDATA (name)) < 255) |
|
|
{ |
|
|
strcpy (windowTitle, SDATA (name)); |
|
|
c2pstr (windowTitle); |
|
|
SetWTitle (FRAME_MAC_WINDOW (f), windowTitle); |
|
|
} |
|
|
#endif |
|
|
} |
|
|
|
|
|
UNBLOCK_INPUT; |
|
|
} |
|
1850 |
} |
} |
1851 |
|
|
1852 |
/* This function should be called when the user's lisp code has |
/* This function should be called when the user's lisp code has |
1897 |
|
|
1898 |
if (NILP (name)) |
if (NILP (name)) |
1899 |
name = f->name; |
name = f->name; |
1900 |
|
else |
1901 |
|
CHECK_STRING (name); |
1902 |
|
|
1903 |
if (FRAME_MAC_WINDOW (f)) |
x_set_name_internal (f, name); |
|
{ |
|
|
if (STRING_MULTIBYTE (name)) |
|
|
#if TARGET_API_MAC_CARBON |
|
|
name = ENCODE_UTF_8 (name); |
|
|
#else |
|
|
name = ENCODE_SYSTEM (name); |
|
|
#endif |
|
|
|
|
|
BLOCK_INPUT; |
|
|
|
|
|
{ |
|
|
#if TARGET_API_MAC_CARBON |
|
|
CFStringRef windowTitle = |
|
|
cfstring_create_with_utf8_cstring (SDATA (name)); |
|
|
|
|
|
SetWindowTitleWithCFString (FRAME_MAC_WINDOW (f), windowTitle); |
|
|
CFRelease (windowTitle); |
|
|
#else |
|
|
Str255 windowTitle; |
|
|
if (strlen (SDATA (name)) < 255) |
|
|
{ |
|
|
strcpy (windowTitle, SDATA (name)); |
|
|
c2pstr (windowTitle); |
|
|
SetWTitle (FRAME_MAC_WINDOW (f), windowTitle); |
|
|
} |
|
|
#endif |
|
|
} |
|
|
|
|
|
UNBLOCK_INPUT; |
|
|
} |
|
1904 |
} |
} |
1905 |
|
|
1906 |
void |
void |
2369 |
|
|
2370 |
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, |
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, |
2371 |
1, 1, 0, |
1, 1, 0, |
2372 |
doc: /* Make a new window, which is called a \"frame\" in Emacs terms. |
doc: /* Make a new window, which is called a "frame" in Emacs terms. |
2373 |
Returns an Emacs frame object. |
Returns an Emacs frame object. |
2374 |
ALIST is an alist of frame parameters. |
ALIST is an alist of frame parameters. |
2375 |
If the parameters specify that the frame should not have a minibuffer, |
If the parameters specify that the frame should not have a minibuffer, |
2378 |
be shared by the new frame. |
be shared by the new frame. |
2379 |
|
|
2380 |
This function is an internal primitive--use `make-frame' instead. */) |
This function is an internal primitive--use `make-frame' instead. */) |
2381 |
(parms) |
(parms) |
2382 |
Lisp_Object parms; |
Lisp_Object parms; |
2383 |
{ |
{ |
2384 |
struct frame *f; |
struct frame *f; |
2703 |
|
|
2704 |
DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, |
2705 |
doc: /* Internal function called by `color-defined-p', which see. */) |
doc: /* Internal function called by `color-defined-p', which see. */) |
2706 |
(color, frame) |
(color, frame) |
2707 |
Lisp_Object color, frame; |
Lisp_Object color, frame; |
2708 |
{ |
{ |
2709 |
XColor foo; |
XColor foo; |
2719 |
|
|
2720 |
DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, |
DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, |
2721 |
doc: /* Internal function called by `color-values', which see. */) |
doc: /* Internal function called by `color-values', which see. */) |
2722 |
(color, frame) |
(color, frame) |
2723 |
Lisp_Object color, frame; |
Lisp_Object color, frame; |
2724 |
{ |
{ |
2725 |
XColor foo; |
XColor foo; |
2742 |
|
|
2743 |
DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, |
DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, |
2744 |
doc: /* Internal function called by `display-color-p', which see. */) |
doc: /* Internal function called by `display-color-p', which see. */) |
2745 |
(display) |
(display) |
2746 |
Lisp_Object display; |
Lisp_Object display; |
2747 |
{ |
{ |
2748 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2755 |
|
|
2756 |
DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, |
DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, Sx_display_grayscale_p, |
2757 |
0, 1, 0, |
0, 1, 0, |
2758 |
doc: /* Return t if the X display supports shades of gray. |
doc: /* Return t if DISPLAY supports shades of gray. |
2759 |
Note that color displays do support shades of gray. |
Note that color displays do support shades of gray. |
2760 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2761 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2762 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2763 |
(display) |
(display) |
2764 |
Lisp_Object display; |
Lisp_Object display; |
2765 |
{ |
{ |
2766 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2773 |
|
|
2774 |
DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, |
DEFUN ("x-display-pixel-width", Fx_display_pixel_width, Sx_display_pixel_width, |
2775 |
0, 1, 0, |
0, 1, 0, |
2776 |
doc: /* Returns the width in pixels of the X display DISPLAY. |
doc: /* Returns the width in pixels of DISPLAY. |
2777 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2778 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2779 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2780 |
(display) |
(display) |
2781 |
Lisp_Object display; |
Lisp_Object display; |
2782 |
{ |
{ |
2783 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2787 |
|
|
2788 |
DEFUN ("x-display-pixel-height", Fx_display_pixel_height, |
DEFUN ("x-display-pixel-height", Fx_display_pixel_height, |
2789 |
Sx_display_pixel_height, 0, 1, 0, |
Sx_display_pixel_height, 0, 1, 0, |
2790 |
doc: /* Returns the height in pixels of the X display DISPLAY. |
doc: /* Returns the height in pixels of DISPLAY. |
2791 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2792 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2793 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2794 |
(display) |
(display) |
2795 |
Lisp_Object display; |
Lisp_Object display; |
2796 |
{ |
{ |
2797 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2801 |
|
|
2802 |
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, |
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, |
2803 |
0, 1, 0, |
0, 1, 0, |
2804 |
doc: /* Returns the number of bitplanes of the display DISPLAY. |
doc: /* Returns the number of bitplanes of DISPLAY. |
2805 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2806 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2807 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2808 |
(display) |
(display) |
2809 |
Lisp_Object display; |
Lisp_Object display; |
2810 |
{ |
{ |
2811 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2815 |
|
|
2816 |
DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, |
DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, |
2817 |
0, 1, 0, |
0, 1, 0, |
2818 |
doc: /* Returns the number of color cells of the display DISPLAY. |
doc: /* Returns the number of color cells of DISPLAY. |
2819 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2820 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2821 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2822 |
(display) |
(display) |
2823 |
Lisp_Object display; |
Lisp_Object display; |
2824 |
{ |
{ |
2825 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2831 |
DEFUN ("x-server-max-request-size", Fx_server_max_request_size, |
DEFUN ("x-server-max-request-size", Fx_server_max_request_size, |
2832 |
Sx_server_max_request_size, |
Sx_server_max_request_size, |
2833 |
0, 1, 0, |
0, 1, 0, |
2834 |
doc: /* Returns the maximum request size of the server of display DISPLAY. |
doc: /* Returns the maximum request size of the server of DISPLAY. |
2835 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2836 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2837 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2838 |
(display) |
(display) |
2839 |
Lisp_Object display; |
Lisp_Object display; |
2840 |
{ |
{ |
2841 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2844 |
} |
} |
2845 |
|
|
2846 |
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, |
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, |
2847 |
doc: /* Returns the vendor ID string of the Mac OS system (Apple). |
doc: /* Returns the "vendor ID" string of the Mac OS system (Apple). |
2848 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2849 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2850 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2851 |
(display) |
(display) |
2852 |
Lisp_Object display; |
Lisp_Object display; |
2853 |
{ |
{ |
2854 |
return build_string ("Apple Computers"); |
return build_string ("Apple Computers"); |
2855 |
} |
} |
2856 |
|
|
2857 |
DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, |
DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, |
2858 |
doc: /* Returns the version numbers of the server of display DISPLAY. |
doc: /* Returns the version numbers of the Mac OS system. |
2859 |
The value is a list of three integers: the major and minor |
The value is a list of three integers: the major and minor |
2860 |
version numbers, and the vendor-specific release |
version numbers, and the vendor-specific release |
2861 |
number. See also the function `x-server-vendor'. |
number. See also the function `x-server-vendor'. |
2863 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2864 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2865 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2866 |
(display) |
(display) |
2867 |
Lisp_Object display; |
Lisp_Object display; |
2868 |
{ |
{ |
2869 |
int mac_major_version; |
int mac_major_version; |
2888 |
} |
} |
2889 |
|
|
2890 |
DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, |
DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, |
2891 |
doc: /* Return the number of screens on the server of display DISPLAY. |
doc: /* Return the number of screens on the server of DISPLAY. |
2892 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2893 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2894 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2895 |
(display) |
(display) |
2896 |
Lisp_Object display; |
Lisp_Object display; |
2897 |
{ |
{ |
2898 |
return make_number (1); |
return make_number (1); |
2899 |
} |
} |
2900 |
|
|
2901 |
DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0, |
DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0, |
2902 |
doc: /* Return the height in millimeters of the X display DISPLAY. |
doc: /* Return the height in millimeters of DISPLAY. |
2903 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2904 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2905 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2906 |
(display) |
(display) |
2907 |
Lisp_Object display; |
Lisp_Object display; |
2908 |
{ |
{ |
2909 |
/* MAC_TODO: this is an approximation, and only of the main display */ |
/* MAC_TODO: this is an approximation, and only of the main display */ |
2914 |
} |
} |
2915 |
|
|
2916 |
DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, |
DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, |
2917 |
doc: /* Return the width in millimeters of the X display DISPLAY. |
doc: /* Return the width in millimeters of DISPLAY. |
2918 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2919 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2920 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2921 |
(display) |
(display) |
2922 |
Lisp_Object display; |
Lisp_Object display; |
2923 |
{ |
{ |
2924 |
/* MAC_TODO: this is an approximation, and only of the main display */ |
/* MAC_TODO: this is an approximation, and only of the main display */ |
2930 |
|
|
2931 |
DEFUN ("x-display-backing-store", Fx_display_backing_store, |
DEFUN ("x-display-backing-store", Fx_display_backing_store, |
2932 |
Sx_display_backing_store, 0, 1, 0, |
Sx_display_backing_store, 0, 1, 0, |
2933 |
doc: /* Returns an indication of whether display DISPLAY does backing store. |
doc: /* Returns an indication of whether DISPLAY does backing store. |
2934 |
The value may be `always', `when-mapped', or `not-useful'. |
The value may be `always', `when-mapped', or `not-useful'. |
2935 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2936 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2937 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2938 |
(display) |
(display) |
2939 |
Lisp_Object display; |
Lisp_Object display; |
2940 |
{ |
{ |
2941 |
return intern ("not-useful"); |
return intern ("not-useful"); |
2943 |
|
|
2944 |
DEFUN ("x-display-visual-class", Fx_display_visual_class, |
DEFUN ("x-display-visual-class", Fx_display_visual_class, |
2945 |
Sx_display_visual_class, 0, 1, 0, |
Sx_display_visual_class, 0, 1, 0, |
2946 |
doc: /* Returns the visual class of the display DISPLAY. |
doc: /* Returns the visual class of DISPLAY. |
2947 |
The value is one of the symbols `static-gray', `gray-scale', |
The value is one of the symbols `static-gray', `gray-scale', |
2948 |
`static-color', `pseudo-color', `true-color', or `direct-color'. |
`static-color', `pseudo-color', `true-color', or `direct-color'. |
2949 |
|
|
2950 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2951 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2952 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2953 |
(display) |
(display) |
2954 |
Lisp_Object display; |
Lisp_Object display; |
2955 |
{ |
{ |
2956 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
2974 |
|
|
2975 |
DEFUN ("x-display-save-under", Fx_display_save_under, |
DEFUN ("x-display-save-under", Fx_display_save_under, |
2976 |
Sx_display_save_under, 0, 1, 0, |
Sx_display_save_under, 0, 1, 0, |
2977 |
doc: /* Returns t if the display DISPLAY supports the save-under feature. |
doc: /* Returns t if DISPLAY supports the save-under feature. |
2978 |
The optional argument DISPLAY specifies which display to ask about. |
The optional argument DISPLAY specifies which display to ask about. |
2979 |
DISPLAY should be either a frame or a display name (a string). |
DISPLAY should be either a frame or a display name (a string). |
2980 |
If omitted or nil, that stands for the selected frame's display. */) |
If omitted or nil, that stands for the selected frame's display. */) |
2981 |
(display) |
(display) |
2982 |
Lisp_Object display; |
Lisp_Object display; |
2983 |
{ |
{ |
2984 |
return Qnil; |
return Qnil; |
3068 |
Optional second arg XRM-STRING is a string of resources in xrdb format. |
Optional second arg XRM-STRING is a string of resources in xrdb format. |
3069 |
If the optional third arg MUST-SUCCEED is non-nil, |
If the optional third arg MUST-SUCCEED is non-nil, |
3070 |
terminate Emacs if we can't open the connection. */) |
terminate Emacs if we can't open the connection. */) |
3071 |
(display, xrm_string, must_succeed) |
(display, xrm_string, must_succeed) |
3072 |
Lisp_Object display, xrm_string, must_succeed; |
Lisp_Object display, xrm_string, must_succeed; |
3073 |
{ |
{ |
3074 |
unsigned char *xrm_option; |
unsigned char *xrm_option; |
3113 |
doc: /* Close the connection to DISPLAY's server. |
doc: /* Close the connection to DISPLAY's server. |
3114 |
For DISPLAY, specify either a frame or a display name (a string). |
For DISPLAY, specify either a frame or a display name (a string). |
3115 |
If DISPLAY is nil, that stands for the selected frame's display. */) |
If DISPLAY is nil, that stands for the selected frame's display. */) |
3116 |
(display) |
(display) |
3117 |
Lisp_Object display; |
Lisp_Object display; |
3118 |
{ |
{ |
3119 |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
struct mac_display_info *dpyinfo = check_x_display_info (display); |
3120 |
int i; |
int i; |
3140 |
|
|
3141 |
DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, |
DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, |
3142 |
doc: /* Return the list of display names that Emacs has connections to. */) |
doc: /* Return the list of display names that Emacs has connections to. */) |
3143 |
() |
() |
3144 |
{ |
{ |
3145 |
Lisp_Object tail, result; |
Lisp_Object tail, result; |
3146 |
|
|
3152 |
} |
} |
3153 |
|
|
3154 |
DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, |
DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, |
3155 |
doc: /* If ON is non-nil, report errors as soon as the erring request is made. |
doc: /* This is a noop on Mac OS systems. */) |
3156 |
If ON is nil, allow buffering of requests. |
(on, display) |
|
This is a noop on Mac OS systems. |
|
|
The optional second argument DISPLAY specifies which display to act on. |
|
|
DISPLAY should be either a frame or a display name (a string). |
|
|
If DISPLAY is omitted or nil, that stands for the selected frame's display. */) |
|
|
(on, display) |
|
3157 |
Lisp_Object display, on; |
Lisp_Object display, on; |
3158 |
{ |
{ |
3159 |
return Qnil; |
return Qnil; |
3212 |
Sx_delete_window_property, 1, 2, 0, |
Sx_delete_window_property, 1, 2, 0, |
3213 |
doc: /* Remove window property PROP from X window of FRAME. |
doc: /* Remove window property PROP from X window of FRAME. |
3214 |
FRAME nil or omitted means use the selected frame. Value is PROP. */) |
FRAME nil or omitted means use the selected frame. Value is PROP. */) |
3215 |
(prop, frame) |
(prop, frame) |
3216 |
Lisp_Object prop, frame; |
Lisp_Object prop, frame; |
3217 |
{ |
{ |
3218 |
#if 0 /* MAC_TODO : port window properties to Mac */ |
#if 0 /* MAC_TODO : port window properties to Mac */ |
3240 |
If FRAME is nil or omitted, use the selected frame. Value is nil |
If FRAME is nil or omitted, use the selected frame. Value is nil |
3241 |
if FRAME hasn't a property with name PROP or if PROP has no string |
if FRAME hasn't a property with name PROP or if PROP has no string |
3242 |
value. */) |
value. */) |
3243 |
(prop, frame) |
(prop, frame) |
3244 |
Lisp_Object prop, frame; |
Lisp_Object prop, frame; |
3245 |
{ |
{ |
3246 |
#if 0 /* MAC_TODO : port window properties to Mac */ |
#if 0 /* MAC_TODO : port window properties to Mac */ |
3842 |
|
|
3843 |
DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, |
DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, |
3844 |
doc: /* Show STRING in a "tooltip" window on frame FRAME. |
doc: /* Show STRING in a "tooltip" window on frame FRAME. |
3845 |
A tooltip window is a small X window displaying a string. |
A tooltip window is a small window displaying a string. |
3846 |
|
|
3847 |
FRAME nil or omitted means use the selected frame. |
FRAME nil or omitted means use the selected frame. |
3848 |
|
|
3852 |
Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil |
Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil |
3853 |
means use the default timeout of 5 seconds. |
means use the default timeout of 5 seconds. |
3854 |
|
|
3855 |
If the list of frame parameters PARAMS contains a `left' parameters, |
If the list of frame parameters PARMS contains a `left' parameter, |
3856 |
the tooltip is displayed at that x-position. Otherwise it is |
the tooltip is displayed at that x-position. Otherwise it is |
3857 |
displayed at the mouse position, with offset DX added (default is 5 if |
displayed at the mouse position, with offset DX added (default is 5 if |
3858 |
DX isn't specified). Likewise for the y-position; if a `top' frame |
DX isn't specified). Likewise for the y-position; if a `top' frame |
4110 |
Select DEFAULT-FILENAME in the dialog's file selection box, if |
Select DEFAULT-FILENAME in the dialog's file selection box, if |
4111 |
specified. Ensure that file exists if MUSTMATCH is non-nil. |
specified. Ensure that file exists if MUSTMATCH is non-nil. |
4112 |
If ONLY-DIR-P is non-nil, the user can only select directories. */) |
If ONLY-DIR-P is non-nil, the user can only select directories. */) |
4113 |
(prompt, dir, default_filename, mustmatch, only_dir_p) |
(prompt, dir, default_filename, mustmatch, only_dir_p) |
4114 |
Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p; |
Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p; |
4115 |
{ |
{ |
4116 |
struct frame *f = SELECTED_FRAME (); |
struct frame *f = SELECTED_FRAME (); |