mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
; Clean up comments in nsterm.h
This commit is contained in:
parent
d9386cb546
commit
69013ed73d
1 changed files with 27 additions and 27 deletions
54
src/nsterm.h
54
src/nsterm.h
|
|
@ -42,7 +42,7 @@ typedef float EmacsCGFloat;
|
||||||
|
|
||||||
/* NSFilenamesPboardType is deprecated in macOS 10.14, but
|
/* NSFilenamesPboardType is deprecated in macOS 10.14, but
|
||||||
NSPasteboardTypeFileURL is only available in 10.13 (and GNUstep
|
NSPasteboardTypeFileURL is only available in 10.13 (and GNUstep
|
||||||
probably lacks it too). */
|
probably lacks it too). */
|
||||||
#if defined NS_IMPL_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
|
#if defined NS_IMPL_COCOA && MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
|
||||||
#define NS_USE_NSPasteboardTypeFileURL 1
|
#define NS_USE_NSPasteboardTypeFileURL 1
|
||||||
#else
|
#else
|
||||||
|
|
@ -60,16 +60,16 @@ typedef float EmacsCGFloat;
|
||||||
Uncomment suitable NSTRACE_GROUP_xxx lines to trace more.
|
Uncomment suitable NSTRACE_GROUP_xxx lines to trace more.
|
||||||
|
|
||||||
Hint: keep the trailing whitespace -- the version control system
|
Hint: keep the trailing whitespace -- the version control system
|
||||||
will reject accidental commits. */
|
will reject accidental commits. */
|
||||||
|
|
||||||
/* #define NSTRACE_ENABLED 1 */
|
/* #define NSTRACE_ENABLED 1 */
|
||||||
|
|
||||||
|
|
||||||
/* When non-zero, trace output is enabled for all parts, except those
|
/* When non-zero, trace output is enabled for all parts, except those
|
||||||
explicitly disabled. */
|
explicitly disabled. */
|
||||||
/* #define NSTRACE_ALL_GROUPS 1 */
|
/* #define NSTRACE_ALL_GROUPS 1 */
|
||||||
|
|
||||||
/* When non-zero, trace output is enabled in the corresponding part. */
|
/* When non-zero, trace output is enabled in the corresponding part. */
|
||||||
/* #define NSTRACE_GROUP_EVENTS 1 */
|
/* #define NSTRACE_GROUP_EVENTS 1 */
|
||||||
/* #define NSTRACE_GROUP_UPDATES 1 */
|
/* #define NSTRACE_GROUP_UPDATES 1 */
|
||||||
/* #define NSTRACE_GROUP_FRINGE 1 */
|
/* #define NSTRACE_GROUP_FRINGE 1 */
|
||||||
|
|
@ -97,7 +97,7 @@ typedef float EmacsCGFloat;
|
||||||
This is post prominent when the EVENTS part is enabled.
|
This is post prominent when the EVENTS part is enabled.
|
||||||
|
|
||||||
Note that the trace system, when enabled, uses the GCC/Clang
|
Note that the trace system, when enabled, uses the GCC/Clang
|
||||||
"cleanup" extension. */
|
"cleanup" extension. */
|
||||||
|
|
||||||
/* For example, the following is the output of `M-x
|
/* For example, the following is the output of `M-x
|
||||||
toggle-frame-maximized RET'.
|
toggle-frame-maximized RET'.
|
||||||
|
|
@ -487,7 +487,7 @@ enum ns_return_frame_mode
|
||||||
NSRect ns_userRect;
|
NSRect ns_userRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AppKit-side interface */
|
/* AppKit-side interface. */
|
||||||
- (instancetype)menuDown: (id)sender;
|
- (instancetype)menuDown: (id)sender;
|
||||||
- (instancetype)toolbarClicked: (id)item;
|
- (instancetype)toolbarClicked: (id)item;
|
||||||
- (instancetype)toggleToolbar: (id)sender;
|
- (instancetype)toggleToolbar: (id)sender;
|
||||||
|
|
@ -496,7 +496,7 @@ enum ns_return_frame_mode
|
||||||
- (void)mouseUp: (NSEvent *)theEvent;
|
- (void)mouseUp: (NSEvent *)theEvent;
|
||||||
- (instancetype)setMiniwindowImage: (BOOL)setMini;
|
- (instancetype)setMiniwindowImage: (BOOL)setMini;
|
||||||
|
|
||||||
/* Emacs-side interface */
|
/* Emacs-side interface. */
|
||||||
- (instancetype) initFrameFromEmacs: (struct frame *) f;
|
- (instancetype) initFrameFromEmacs: (struct frame *) f;
|
||||||
- (void) setWindowClosing: (BOOL)closing;
|
- (void) setWindowClosing: (BOOL)closing;
|
||||||
- (void) deleteWorkingText;
|
- (void) deleteWorkingText;
|
||||||
|
|
@ -521,7 +521,7 @@ enum ns_return_frame_mode
|
||||||
#endif
|
#endif
|
||||||
- (void)copyRect:(NSRect)srcRect to:(NSPoint)dest;
|
- (void)copyRect:(NSRect)srcRect to:(NSPoint)dest;
|
||||||
|
|
||||||
/* Non-notification versions of NSView methods. Used for direct calls. */
|
/* Non-notification versions of NSView methods. Used for direct calls. */
|
||||||
- (void)adjustEmacsFrameRect;
|
- (void)adjustEmacsFrameRect;
|
||||||
- (void)windowWillEnterFullScreen;
|
- (void)windowWillEnterFullScreen;
|
||||||
- (void)windowDidEnterFullScreen;
|
- (void)windowDidEnterFullScreen;
|
||||||
|
|
@ -717,7 +717,7 @@ enum ns_return_frame_mode
|
||||||
struct frame *frame;
|
struct frame *frame;
|
||||||
NSResponder *prevResponder;
|
NSResponder *prevResponder;
|
||||||
|
|
||||||
/* offset to the bottom of knob of last mouse down */
|
/* Offset to the bottom of knob of last mouse down. */
|
||||||
CGFloat last_mouse_offset;
|
CGFloat last_mouse_offset;
|
||||||
float min_portion;
|
float min_portion;
|
||||||
int pixel_length;
|
int pixel_length;
|
||||||
|
|
@ -727,7 +727,7 @@ enum ns_return_frame_mode
|
||||||
|
|
||||||
BOOL horizontal;
|
BOOL horizontal;
|
||||||
|
|
||||||
/* optimize against excessive positioning calls generated by emacs */
|
/* Optimize against excessive positioning calls generated by Emacs. */
|
||||||
int em_position;
|
int em_position;
|
||||||
int em_portion;
|
int em_portion;
|
||||||
int em_whole;
|
int em_whole;
|
||||||
|
|
@ -792,7 +792,7 @@ extern EmacsMenu *svcsMenu;
|
||||||
|
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
/* Special keycodes that we pass down the event chain */
|
/* Special keycodes that we pass down the event chain. */
|
||||||
#define KEY_NS_POWER_OFF ((1<<28)|(0<<16)|1)
|
#define KEY_NS_POWER_OFF ((1<<28)|(0<<16)|1)
|
||||||
#define KEY_NS_OPEN_FILE ((1<<28)|(0<<16)|2)
|
#define KEY_NS_OPEN_FILE ((1<<28)|(0<<16)|2)
|
||||||
#define KEY_NS_OPEN_TEMP_FILE ((1<<28)|(0<<16)|3)
|
#define KEY_NS_OPEN_TEMP_FILE ((1<<28)|(0<<16)|3)
|
||||||
|
|
@ -825,7 +825,7 @@ struct nsfont_info
|
||||||
{
|
{
|
||||||
struct font font;
|
struct font font;
|
||||||
|
|
||||||
char *name; /* PostScript name, uniquely identifies on NS systems */
|
char *name; /* PostScript name, uniquely identifies on NS systems. */
|
||||||
|
|
||||||
/* The following metrics are stored as float rather than int. */
|
/* The following metrics are stored as float rather than int. */
|
||||||
|
|
||||||
|
|
@ -874,10 +874,10 @@ struct ns_display_info
|
||||||
ptrdiff_t bitmaps_size;
|
ptrdiff_t bitmaps_size;
|
||||||
ptrdiff_t bitmaps_last;
|
ptrdiff_t bitmaps_last;
|
||||||
|
|
||||||
/* DPI resolution of this screen */
|
/* DPI resolution of this screen. */
|
||||||
double resx, resy;
|
double resx, resy;
|
||||||
|
|
||||||
/* Mask of things that cause the mouse to be grabbed */
|
/* Mask of things that cause the mouse to be grabbed. */
|
||||||
int grabbed;
|
int grabbed;
|
||||||
|
|
||||||
int n_planes;
|
int n_planes;
|
||||||
|
|
@ -973,10 +973,10 @@ struct ns_output
|
||||||
Emacs_Cursor bottom_edge_cursor;
|
Emacs_Cursor bottom_edge_cursor;
|
||||||
Emacs_Cursor bottom_left_corner_cursor;
|
Emacs_Cursor bottom_left_corner_cursor;
|
||||||
|
|
||||||
/* NS-specific */
|
/* NS-specific. */
|
||||||
Emacs_Cursor current_pointer;
|
Emacs_Cursor current_pointer;
|
||||||
|
|
||||||
/* lord knows why Emacs needs to know about our Window ids.. */
|
/* Lord knows why Emacs needs to know about our Window ids.. */
|
||||||
Window window_desc, parent_desc;
|
Window window_desc, parent_desc;
|
||||||
char explicit_parent;
|
char explicit_parent;
|
||||||
|
|
||||||
|
|
@ -1016,7 +1016,7 @@ struct ns_output
|
||||||
|
|
||||||
#ifdef NS_IMPL_GNUSTEP
|
#ifdef NS_IMPL_GNUSTEP
|
||||||
/* Zero if this is the first time a toolbar has been updated on this
|
/* Zero if this is the first time a toolbar has been updated on this
|
||||||
frame. */
|
frame. */
|
||||||
int tool_bar_adjusted;
|
int tool_bar_adjusted;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
@ -1108,7 +1108,7 @@ struct x_output
|
||||||
extern struct ns_display_info *ns_term_init (Lisp_Object display_name);
|
extern struct ns_display_info *ns_term_init (Lisp_Object display_name);
|
||||||
extern void ns_term_shutdown (int sig);
|
extern void ns_term_shutdown (int sig);
|
||||||
|
|
||||||
/* constants for text rendering */
|
/* Constants for text rendering. */
|
||||||
#define NS_DUMPGLYPH_NORMAL 0
|
#define NS_DUMPGLYPH_NORMAL 0
|
||||||
#define NS_DUMPGLYPH_CURSOR 1
|
#define NS_DUMPGLYPH_CURSOR 1
|
||||||
#define NS_DUMPGLYPH_FOREGROUND 2
|
#define NS_DUMPGLYPH_FOREGROUND 2
|
||||||
|
|
@ -1116,16 +1116,16 @@ extern void ns_term_shutdown (int sig);
|
||||||
|
|
||||||
|
|
||||||
#ifdef NS_IMPL_GNUSTEP
|
#ifdef NS_IMPL_GNUSTEP
|
||||||
/* In nsfont, called from fontset.c */
|
/* In nsfont.m, called from fontset.c. */
|
||||||
extern void nsfont_make_fontset_for_font (Lisp_Object name,
|
extern void nsfont_make_fontset_for_font (Lisp_Object name,
|
||||||
Lisp_Object font_object);
|
Lisp_Object font_object);
|
||||||
|
|
||||||
/* In nsfont, for debugging */
|
/* In nsfont.m, for debugging. */
|
||||||
struct glyph_string;
|
struct glyph_string;
|
||||||
void ns_dump_glyphstring (struct glyph_string *s) EXTERNALLY_VISIBLE;
|
void ns_dump_glyphstring (struct glyph_string *s) EXTERNALLY_VISIBLE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Implemented in nsterm, published in or needed from nsfns. */
|
/* Implemented in nsterm.m, published in or needed from nsfns.m. */
|
||||||
extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern,
|
extern Lisp_Object ns_list_fonts (struct frame *f, Lisp_Object pattern,
|
||||||
int size, int maxnames);
|
int size, int maxnames);
|
||||||
extern void ns_clear_frame (struct frame *f);
|
extern void ns_clear_frame (struct frame *f);
|
||||||
|
|
@ -1156,7 +1156,7 @@ extern int ns_lisp_to_color (Lisp_Object color, NSColor **col);
|
||||||
extern const char *ns_get_pending_menu_title (void);
|
extern const char *ns_get_pending_menu_title (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Implemented in nsfns, published in nsterm. */
|
/* Implemented in nsfns.m, published in nsterm.m. */
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
extern void ns_move_tooltip_to_mouse_location (NSPoint);
|
extern void ns_move_tooltip_to_mouse_location (NSPoint);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1169,7 +1169,7 @@ extern const char *ns_get_string_resource (void *_rdb,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char *class);
|
const char *class);
|
||||||
|
|
||||||
/* C access to ObjC functionality */
|
/* C access to ObjC functionality. */
|
||||||
extern void ns_release_object (void *obj);
|
extern void ns_release_object (void *obj);
|
||||||
extern void ns_retain_object (void *obj);
|
extern void ns_retain_object (void *obj);
|
||||||
extern void *ns_alloc_autorelease_pool (void);
|
extern void *ns_alloc_autorelease_pool (void);
|
||||||
|
|
@ -1178,7 +1178,7 @@ extern const char *ns_get_defaults_value (const char *key);
|
||||||
extern void ns_init_pool (void);
|
extern void ns_init_pool (void);
|
||||||
extern void ns_init_locale (void);
|
extern void ns_init_locale (void);
|
||||||
|
|
||||||
/* in nsmenu */
|
/* Defined in nsmenu.m. */
|
||||||
extern void update_frame_tool_bar (struct frame *f);
|
extern void update_frame_tool_bar (struct frame *f);
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
extern void update_frame_tool_bar_1 (struct frame *f, EmacsToolbar *toolbar);
|
extern void update_frame_tool_bar_1 (struct frame *f, EmacsToolbar *toolbar);
|
||||||
|
|
@ -1205,7 +1205,7 @@ extern void syms_of_nsfns (void);
|
||||||
extern void syms_of_nsmenu (void);
|
extern void syms_of_nsmenu (void);
|
||||||
extern void syms_of_nsselect (void);
|
extern void syms_of_nsselect (void);
|
||||||
|
|
||||||
/* From nsimage.m, needed in image.c */
|
/* From nsimage.m, needed in image.c. */
|
||||||
struct image;
|
struct image;
|
||||||
extern bool ns_can_use_native_image_api (Lisp_Object type);
|
extern bool ns_can_use_native_image_api (Lisp_Object type);
|
||||||
extern void *ns_image_from_XBM (char *bits, int width, int height,
|
extern void *ns_image_from_XBM (char *bits, int width, int height,
|
||||||
|
|
@ -1227,7 +1227,7 @@ extern int ns_display_pixel_height (struct ns_display_info *);
|
||||||
extern int ns_display_pixel_width (struct ns_display_info *);
|
extern int ns_display_pixel_width (struct ns_display_info *);
|
||||||
extern size_t ns_image_size_in_bytes (void *img);
|
extern size_t ns_image_size_in_bytes (void *img);
|
||||||
|
|
||||||
/* This in nsterm.m */
|
/* Defined in nsterm.m. */
|
||||||
extern float ns_antialias_threshold;
|
extern float ns_antialias_threshold;
|
||||||
extern void ns_make_frame_visible (struct frame *f);
|
extern void ns_make_frame_visible (struct frame *f);
|
||||||
extern void ns_make_frame_invisible (struct frame *f);
|
extern void ns_make_frame_invisible (struct frame *f);
|
||||||
|
|
@ -1284,7 +1284,7 @@ extern char gnustep_base_version[]; /* version tracking */
|
||||||
#define NS_SELECTION_FG_COLOR_DEFAULT @"Black";
|
#define NS_SELECTION_FG_COLOR_DEFAULT @"Black";
|
||||||
#define RESIZE_HANDLE_SIZE 12
|
#define RESIZE_HANDLE_SIZE 12
|
||||||
|
|
||||||
/* Little utility macros */
|
/* Little utility macros. */
|
||||||
#define IN_BOUND(min, x, max) (((x) < (min)) \
|
#define IN_BOUND(min, x, max) (((x) < (min)) \
|
||||||
? (min) : (((x)>(max)) ? (max) : (x)))
|
? (min) : (((x)>(max)) ? (max) : (x)))
|
||||||
#define SCREENMAXBOUND(x) IN_BOUND (-SCREENMAX, x, SCREENMAX)
|
#define SCREENMAXBOUND(x) IN_BOUND (-SCREENMAX, x, SCREENMAX)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue