/* NSFilenamesPboardType is deprecated in macOS 10.14, but
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
#define NS_USE_NSPasteboardTypeFileURL 1
#else
Uncomment suitable NSTRACE_GROUP_xxx lines to trace more.
Hint: keep the trailing whitespace -- the version control system
- will reject accidental commits. */
+ will reject accidental commits. */
/* #define NSTRACE_ENABLED 1 */
/* When non-zero, trace output is enabled for all parts, except those
- explicitly disabled. */
+ explicitly disabled. */
/* #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_UPDATES 1 */
/* #define NSTRACE_GROUP_FRINGE 1 */
This is post prominent when the EVENTS part is enabled.
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
toggle-frame-maximized RET'.
NSRect ns_userRect;
}
-/* AppKit-side interface */
+/* AppKit-side interface. */
- (instancetype)menuDown: (id)sender;
- (instancetype)toolbarClicked: (id)item;
- (instancetype)toggleToolbar: (id)sender;
- (void)mouseUp: (NSEvent *)theEvent;
- (instancetype)setMiniwindowImage: (BOOL)setMini;
-/* Emacs-side interface */
+/* Emacs-side interface. */
- (instancetype) initFrameFromEmacs: (struct frame *) f;
- (void) setWindowClosing: (BOOL)closing;
- (void) deleteWorkingText;
#endif
- (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)windowWillEnterFullScreen;
- (void)windowDidEnterFullScreen;
struct frame *frame;
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;
float min_portion;
int pixel_length;
BOOL horizontal;
- /* optimize against excessive positioning calls generated by emacs */
+ /* Optimize against excessive positioning calls generated by Emacs. */
int em_position;
int em_portion;
int em_whole;
========================================================================== */
-/* 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_OPEN_FILE ((1<<28)|(0<<16)|2)
#define KEY_NS_OPEN_TEMP_FILE ((1<<28)|(0<<16)|3)
{
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. */
ptrdiff_t bitmaps_size;
ptrdiff_t bitmaps_last;
- /* DPI resolution of this screen */
+ /* DPI resolution of this screen. */
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 n_planes;
Emacs_Cursor bottom_edge_cursor;
Emacs_Cursor bottom_left_corner_cursor;
- /* NS-specific */
+ /* NS-specific. */
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;
char explicit_parent;
#ifdef NS_IMPL_GNUSTEP
/* Zero if this is the first time a toolbar has been updated on this
- frame. */
+ frame. */
int tool_bar_adjusted;
#endif
};
extern struct ns_display_info *ns_term_init (Lisp_Object display_name);
extern void ns_term_shutdown (int sig);
-/* constants for text rendering */
+/* Constants for text rendering. */
#define NS_DUMPGLYPH_NORMAL 0
#define NS_DUMPGLYPH_CURSOR 1
#define NS_DUMPGLYPH_FOREGROUND 2
#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,
Lisp_Object font_object);
-/* In nsfont, for debugging */
+/* In nsfont.m, for debugging. */
struct glyph_string;
void ns_dump_glyphstring (struct glyph_string *s) EXTERNALLY_VISIBLE;
#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,
int size, int maxnames);
extern void ns_clear_frame (struct frame *f);
extern const char *ns_get_pending_menu_title (void);
#endif
-/* Implemented in nsfns, published in nsterm. */
+/* Implemented in nsfns.m, published in nsterm.m. */
#ifdef __OBJC__
extern void ns_move_tooltip_to_mouse_location (NSPoint);
#endif
const char *name,
const char *class);
-/* C access to ObjC functionality */
+/* C access to ObjC functionality. */
extern void ns_release_object (void *obj);
extern void ns_retain_object (void *obj);
extern void *ns_alloc_autorelease_pool (void);
extern void ns_init_pool (void);
extern void ns_init_locale (void);
-/* in nsmenu */
+/* Defined in nsmenu.m. */
extern void update_frame_tool_bar (struct frame *f);
#ifdef __OBJC__
extern void update_frame_tool_bar_1 (struct frame *f, EmacsToolbar *toolbar);
extern void syms_of_nsmenu (void);
extern void syms_of_nsselect (void);
-/* From nsimage.m, needed in image.c */
+/* From nsimage.m, needed in image.c. */
struct image;
extern bool ns_can_use_native_image_api (Lisp_Object type);
extern void *ns_image_from_XBM (char *bits, int width, int height,
extern int ns_display_pixel_width (struct ns_display_info *);
extern size_t ns_image_size_in_bytes (void *img);
-/* This in nsterm.m */
+/* Defined in nsterm.m. */
extern float ns_antialias_threshold;
extern void ns_make_frame_visible (struct frame *f);
extern void ns_make_frame_invisible (struct frame *f);
#define NS_SELECTION_FG_COLOR_DEFAULT @"Black";
#define RESIZE_HANDLE_SIZE 12
-/* Little utility macros */
+/* Little utility macros. */
#define IN_BOUND(min, x, max) (((x) < (min)) \
? (min) : (((x)>(max)) ? (max) : (x)))
#define SCREENMAXBOUND(x) IN_BOUND (-SCREENMAX, x, SCREENMAX)