]> git.eshelyaron.com Git - emacs.git/commitdiff
; Clean up comments in nsterm.h
authorStefan Kangas <stefankangas@gmail.com>
Sat, 22 Mar 2025 11:33:47 +0000 (12:33 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 19:24:41 +0000 (20:24 +0100)
(cherry picked from commit 69013ed73d8fd5e8827335c3e1be47dc652905a6)

src/nsterm.h

index 0009f1ab2bf27a6f7bd7a8c53f5314227c6074b6..04e9ffab131f7dee80610eb6aaee8c7131450703 100644 (file)
@@ -42,7 +42,7 @@ typedef float EmacsCGFloat;
 
 /* 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
@@ -60,16 +60,16 @@ typedef float EmacsCGFloat;
    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     */
@@ -97,7 +97,7 @@ typedef float EmacsCGFloat;
    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'.
@@ -487,7 +487,7 @@ enum ns_return_frame_mode
   NSRect ns_userRect;
 }
 
-/* AppKit-side interface */
+/* AppKit-side interface */
 - (instancetype)menuDown: (id)sender;
 - (instancetype)toolbarClicked: (id)item;
 - (instancetype)toggleToolbar: (id)sender;
@@ -496,7 +496,7 @@ enum ns_return_frame_mode
 - (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;
@@ -521,7 +521,7 @@ enum ns_return_frame_mode
 #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;
@@ -717,7 +717,7 @@ enum ns_return_frame_mode
   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;
@@ -727,7 +727,7 @@ enum ns_return_frame_mode
 
   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;
@@ -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_OPEN_FILE               ((1<<28)|(0<<16)|2)
 #define KEY_NS_OPEN_TEMP_FILE          ((1<<28)|(0<<16)|3)
@@ -825,7 +825,7 @@ struct nsfont_info
 {
   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.  */
 
@@ -874,10 +874,10 @@ struct ns_display_info
   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;
@@ -973,10 +973,10 @@ struct ns_output
   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;
 
@@ -1016,7 +1016,7 @@ struct ns_output
 
 #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
 };
@@ -1108,7 +1108,7 @@ struct x_output
 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
@@ -1116,16 +1116,16 @@ extern void ns_term_shutdown (int sig);
 
 
 #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);
@@ -1156,7 +1156,7 @@ extern int ns_lisp_to_color (Lisp_Object color, NSColor **col);
 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
@@ -1169,7 +1169,7 @@ extern const char *ns_get_string_resource (void *_rdb,
                                            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);
@@ -1178,7 +1178,7 @@ extern const char *ns_get_defaults_value (const char *key);
 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);
@@ -1205,7 +1205,7 @@ extern void syms_of_nsfns (void);
 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,
@@ -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 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);
@@ -1284,7 +1284,7 @@ extern char gnustep_base_version[];  /* version tracking */
 #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)