aboutsummaryrefslogtreecommitdiffstats
path: root/src/haiku_support.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Merge from savannah/emacs-30Po Lu2025-02-211-1/+1
|\ | | | | | | | | 25ba2536091 Fix reported Haiku build error in emacs-30.1-rc1 92e96a11752 ; Delete troff markers from ChangeLog files
| * Fix reported Haiku build error in emacs-30.1-rc1Po Lu2025-02-211-1/+1
| | | | | | | | | | * src/haiku_support.cc (keysym_from_raw_char): Don't define duplicate cases on the previous release.
| * Update copyright year to 2025Stefan Kangas2025-01-021-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Fix compilation on Haiku Nightly hrev58622Po Lu2025-02-101-0/+10
| | | | | | | | | | | | | | | | | | | | * configure.ac (BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER): Define if BObjectList ownership over its contents is specified as a template parameter. * src/haiku_support.cc (class EmacsFontSelectionDialog) [BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER]: Adjust accordingly.
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
|/ | | | Run "TZ=UTC0 admin/update-copyright".
* ; * src/haiku_support.cc: Correct last change.Po Lu2024-09-151-6/+6
|
* Port to Haiku R1/beta5Po Lu2024-09-151-1/+9
| | | | | * src/haiku_support.cc (keysym_from_raw_char): Use revised names for B_HANGUL and B_HANGUL_HANJA.
* New variable haiku-pass-control-tab-to-systemTor-björn Claesson2024-04-041-0/+7
| | | | | | | | | | | | | | Allow passing C-TAB on to the Haiku operating system, fixing window switching when an Emacs frame has focus (Bug#70138). * src/haiku_support.cc (DispatchMessage): Conditionally pass message to BWindow. * src/haiku_support.h: * src/haikufns.c (haiku_should_pass_control_tab_to_system): Add variable haiku-pass-control-tab-to-system, and C function haiku_should_pass_control_tab_to_system. Co-authored-by: Po Lu <luangruo@yahoo.com> Copyright-paperwork-exempt: yes
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Correctly register Num Lock keys under HaikuPo Lu2023-10-231-3/+35
| | | | | | | | | | | | * src/haiku_support.cc (DispatchMessage): If B_NUM_LOCK is set, invert B_SHIFT_KEY; should it be subsequently set, omit mapping from raw_char.
* | Delete unused fieldsPo Lu2023-08-311-4/+0
| | | | | | | | | | * src/haiku_support.cc (class EmacsWindow) <x_before_zoom, y_before_zoom>: Delete fields.
* | Stifle a compiler warning under GCC 13Po Lu2023-08-241-3/+1
| | | | | | | | | | * src/haiku_support.cc (MessageReceived): Shun snprintf, as GCC produces false positives cautioning against truncation.
* | Introduce support for Desktop Notifications on HaikuPo Lu2023-08-171-1/+53
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Desktop Notifications): Document Haiku desktop notifications. * etc/NEWS: Announce this change. * lisp/org/org-clock.el (haiku-notifications-notify): New declaration. (org-show-notification): Employ that function. * src/haiku_io.c (haiku_len) <NOTIFICATION_CLICK_EVENT>: Return the length for this type of event. * src/haiku_select.cc (my_team_id, be_display_notification): New functions. * src/haiku_support.cc (my_team_id, ArgvReceived): New functions. * src/haiku_support.h (enum haiku_event_type): New event type NOTIFICATION_CLICK_EVENT. (struct haiku_notification_click_event): New structure. * src/haikuselect.c (haiku_notifications_notify_1) (Fhaiku_notifications_notify): New functions. (syms_of_haikuselect): Register new defsubr. * src/haikuterm.c (haiku_read_socket): * src/haikuselect.h: * src/termhooks.h: Add new events for notification clicks on Haiku.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Correctly handle key map updates on HaikuPo Lu2022-11-121-0/+18
| | | | | * src/haiku_support.cc (MessageReceived): Handle B_KEY_MAP_LOADED by clearing the previous keymap.
* Implement wallpaper.el support for HaikuPo Lu2022-09-141-0/+53
| | | | | | | | | | | | | | | | * lisp/image/wallpaper.el (haiku-set-wallpaper, wallpaper-set): Use `haiku-set-wallpaper' on Haiku. * lisp/term/haiku-win.el (haiku-write-node-attribute) (haiku-send-message, haiku-set-wallpaper): New function. * src/haiku_support.cc (be_write_node_message, be_send_message): New functions. * src/haiku_support.h: Update prototypes. * src/haikuselect.c (haiku_message_to_lisp) (haiku_lisp_to_message): Fix CSTR type handling to include NULL byte. (haiku_report_system_error, Fhaiku_write_node_attribute) (Fhaiku_send_message): New functions. (syms_of_haikuselect): Add defsubrs.
* Implement primitive frame synchronization on HaikuPo Lu2022-08-011-3/+30
| | | | | | | | | | | | | | | | | | | Instead of relying on a compositor to do the work, we simply wait for VBLANK and hope that the update finishes soon enough. * doc/lispref/frames.texi (Management Parameters): Document that frame synchronization is now supported on Haiku. * src/haiku_support.cc (class EmacsView): New field `use_frame_synchronization'. (FlipBuffers): Wait for vertical blanking period. (be_set_use_frame_synchronization): New function. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_create_frame): Set `use-frame-synchronization'. (haiku_set_use_frame_synchronization) (haiku_frame_parm_handlers): New param handler.
* Fix grab view persisting on Haiku after popup menu closesPo Lu2022-07-281-4/+21
| | | | | | | | * src/haiku_support.cc (BasicMouseUp): Improve handling of wait_for_release_message. (be_clear_grab_view): New function. * src/haiku_support.h: Update prototypes. * src/haikumenu.c (haiku_menu_show): Call it here.
* Fix minor problem with scroll bar grabs on HaikuPo Lu2022-07-281-7/+8
| | | | | | * haiku_support.cc (class EmacsScrollBar, EmacsScrollBar) (MouseDown, MouseUp): Keep a counter of the mouse down events received.
* Fix race conditions in mouse button handling on HaikuPo Lu2022-07-281-49/+87
| | | | | | | | | * src/haiku_support.cc (class EmacsView): New field `grabbed_buttons'. Remove `previous_buttons'. (BasicMouseDown, BasicMouseUp): Accept new parameter `message'. Use data from that message instead. (MouseDown, MouseUp): Pass the current message to BasicMouseUp and BasicMouseDown.
* Implement wheel movement during DND on HaikuPo Lu2022-07-201-17/+15
| | | | | | | | | | | | | | | | | | | | * lisp/term/haiku-win.el (haiku-dnd-wheel-count): New defvar. (haiku-note-wheel-click, haiku-handle-drag-wheel): New functions. * src/haiku_support.cc (EmacsWindow): Get rid of window ID logic. (MessageReceived, MouseMoved, be_drag_message): Use thread ID to identify windows instead of window ID. * src/haikuselect.c (Fhaiku_drag_message): Record whether or not the DND frame is a valid drop target. (haiku_note_drag_wheel): New function. (syms_of_haikuselect): New defvar. * src/haikuterm.c (haiku_read_socket): Call `haiku_note_drag_wheel' when appropriate. * src/haikuterm.h: Update prototypes.
* ; Fix typos: prefer American spellingStefan Kangas2022-07-141-1/+1
|
* Improve behavior of sticky tooltips on HaikuPo Lu2022-07-081-29/+60
| | | | | | | | | | | * src/haiku_support.cc (class EmacsView, MouseMoved): Remove `tooltip_position'. (class EmacsMotionSuppressionView): New class. (BView_set_and_show_sticky_tooltip): Rename to `be_show_sticky_tooltip'. Add motion suppression view. * src/haiku_support.h: Update prototypes. * src/haikufns.c (Fx_show_tip): Update for renamed function.
* Fix flickering system tooltips on HaikuPo Lu2022-07-081-15/+34
| | | | | | | * src/haiku_support.cc (class EmacsView, MouseMoved): Restore sticky status and mouse relative position. (BView_set_and_show_sticky_tooltip): * src/haikufns.c (haiku_hide_tip): Fix coding style.
* Port `x-lost-selection-functions' to HaikuPo Lu2022-07-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/haiku_io.c (haiku_len): Add `CLIPBOARD_CHANGED_EVENT'. * src/haiku_select.cc (be_update_clipboard_count): Set ownership flags. (be_handle_clipboard_changed_message): (be_start_watching_selection): New functions. * src/haiku_support.cc (class Emacs): Handle B_CLIPBOARD_CHANGED. * src/haiku_support.h (enum haiku_event_type): New event `CLIPBOARD_CHANGED_EVENT'. (struct haiku_clipboard_changed_event): New struct. * src/haikuselect.c (haiku_handle_selection_clear) (haiku_selection_disowned, haiku_start_watching_selections): New functions. (syms_of_haikuselect): New defsym and defvar. * src/haikuselect.h: Update prototypes. * src/haikuterm.c (haiku_read_socket): Handle selection events. (haiku_term_init): Start watching selections. * src/haikuterm.h: Update prototypes. * src/keyboard.c (kbd_buffer_get_event, process_special_events) (mark_kboards): Handle SELECTON_CLEAR_EVENTs correctly on Haiku.
* Allow toggling antialiasing inside the Haiku font dialogPo Lu2022-06-211-31/+74
| | | | | | | | | | | | | | | | | | | | | * src/haiku_support.cc (struct font_selection_dialog_message): New field `disable_antialias'. (MessageReceived): Handle new message SET_DISABLE_ANTIALIASING. (class DualLayoutView): Rename to `TripleLayoutView'. (class TripleLayoutView): Rename from `DualLayoutView'. (MinSize): Update computations for three views. (class EmacsFontSelectionDialog, UpdatePreview) (EmacsFontSelectionDialog): Add an antialiasing checkbox to control antialiasing. (be_select_font): New arguments `initial_antialias' and `disable_antialias'. * src/haiku_support.h: Update prototypes. * src/haikufont.c (haikufont_pattern_from_object): Set FSPEC_ANTIALIAS. (Fx_select_font): Update accordingly.
* Fix computation of screen width and height on HaikuPo Lu2022-06-171-2/+2
| | | | | * src/haiku_support.cc (be_get_screen_dimensions): Use correct macros to extract width and height.
* Fix handling of scroll bar clicks on HaikuPo Lu2022-06-121-27/+42
| | | | | | | | | | | | | | | | | | | * src/haiku_support.cc (class EmacsView, BasicMouseDown) (BasicMouseUp): Move MouseDown and MouseUp here. New parameter `scroll_bar'. (MouseDown, MouseUp): Call basic variants. (class EmacsScrollBar): New field `parent'. (BScrollBar_make_for_view): Rename to `be_create_scroll_bar_for_view'. * src/haiku_support.h (struct haiku_button_event): New field `scroll_bar'. * src/haikuterm.c (haiku_scroll_bar_from_widget): Handle NULL widget. (haiku_scroll_bar_create): Update calls. (haiku_mouse_position): Fix scroll bar part. (haiku_read_socket): Handle button events on scroll bars as scroll bar click events.
* Fix initializers for Haiku scroll barsPo Lu2022-06-111-10/+16
| | | | | * src/haiku_support.cc (class Emacs): (class EmacsScrollBar): Fix initializers.
* Fix coding style of some Haiku filesPo Lu2022-06-071-15/+24
| | | | | | | | | | * src/haiku_support.cc: (FrameResized): (class EmacsView, AfterResize): Fix coding and initializer style. * src/haiku_support.h (struct haiku_resize_event): Rename confusingly named fields. * src/haikuterm.c (haiku_read_socket): Update accordingly.
* Fix creation of menu items without help text on HaikuPo Lu2022-06-011-1/+2
| | | | | * src/haiku_support.cc (EmacsMenuItem): Don't mistakenly assume help is non-NULL.
* Update frame positions on Haiku after changing Z groupPo Lu2022-05-301-2/+2
| | | | | | * src/haiku_support.cc (EmacsScreenChangeMonitor): Fix comment. * src/haikufns.c (haiku_set_z_group): Ask for a position update, since changing the Z group might change the feel of the window.
* Handle allocation errors when creating menu items on HaikuPo Lu2022-05-271-22/+17
| | | | | * src/haiku_support.cc (class EmacsMenuItem): Don't abort on failed strdup.
* Implement monitor change functions on HaikuPo Lu2022-05-231-4/+72
| | | | | | | | | | | | | | | | * src/haiku_io.c (haiku_len): Handle new event type. * src/haiku_support.cc (class EmacsScreenChangeMonitor): New class. (class Emacs, Emacs): Create new screen change monitor. (DispatchMessage): Update fullscreen state if the screen changed. (SetFullscreen): Don't punt if fullscreen mode is identical. * src/haiku_support.h (enum haiku_event_type): New event `SCREEN_CHANGE_EVENT'. (struct haiku_screen_changed_event): New struct. * src/haikuterm.c (haiku_read_socket): Handle new event.
* Clean up Haiku codePo Lu2022-05-221-43/+35
| | | | | | | | | | | | * src/haiku_support.cc (movement_locker, class EmacsWindow) (MouseMoved): Delete `movement_locker' and associated hack, since it's superseeded by some code in haiku_read_socket. (key_map, key_chars, dpy_color_space, popup_track_message) (alert_popup_value, grab_view, grab_view_locker) (drag_and_drop_in_progress): Write comments and fix initializers. * src/haikuterm.c (haiku_read_socket): Update comment.
* Compute frame workareas on HaikuPo Lu2022-05-211-72/+98
| | | | | | | | | | | | | | * lisp/frame.el (display-monitor-attributes-list): Implement specially on Haiku as well. * src/haiku_support.cc (get_zoom_rect): New function. Extract CalculateZoomRect here. (class EmacsWindow, SetFullscreen): Use that instead of CalculateZoomRect. (be_get_explicit_workarea): New function. * src/haiku_support.h: Update prototypes. * src/haikufns.c (Fhaiku_display_monitor_attributes_list): New function. (syms_of_haikufns): Register new subr.
* Fix race conditions processing zoom events on HaikuPo Lu2022-05-201-0/+1
| | | | | | | | | * src/haiku_support.cc (Zoom): * src/haiku_support.h (struct haiku_zoom_event): Include the current fullscreen mode in the event. * src/haikuterm.c (haiku_read_socket): Use that instead of the current frame's fullscreen mode.
* Remove flickering when toggling between different fullscreen states on HaikuPo Lu2022-05-201-14/+39
| | | | | | | | | * src/haiku_support.cc (FrameMoved): Don't allow moving the frame along the "filled" axis when fullwidth or fullheight. (ClearFullscreen): New argument `mode'. Return the previous rect but don't revert the frame to it if the target mode is not NONE. (SetFullscreen): Use rect provided by ClearFullscreen instead.
* Fix race conditions processing frame fullscreen state on HaikuPo Lu2022-05-191-119/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/frames.texi (Size Parameters): Remove note saying Haiku doesn't support `fullwidth' and `fullboth'. * src/haiku_support.cc (subset_windows, class EmacsWindow) (Unparent, ParentTo): Stop calling old fullscreen functions. (ClearFullscreen, FullscreenRectForMode, SetFullscreen): New functions. Completely rewrite old zoom and fullscreen handling code. (Zoom): Send a ZOOM_EVENT and don't actually zoom. (BWindow_zoom, EmacsWindow_make_fullscreen, EmacsWindow_unzoom): Delete functions. (be_set_window_fullscreen_mode): New function. * src/haiku_support.h (struct haiku_zoom_event): Remove `zoomed_p' parameter. (enum haiku_fullscreen_mode): New enum. Update prototypes. * src/haikufns.c (Fx_display_pixel_height): Return height instead of width. * src/haikuterm.c (haiku_make_fullscreen_consistent) (haiku_read_socket, haiku_fullscreen): Adjust to always set zoom and fullscreen in the main thread instead of the UI threads. * src/haikuterm.h (struct haiku_output): Remove flag `zoomed_p' and add field `fullscreen_mode'.
* Fix race conditions when calculating Haiku frame geometryPo Lu2022-05-181-0/+17
| | | | | | | | | * src/haiku_support.cc (be_lock_window, be_unlock_window): New functions. * src/haiku_support.h: Update prototypes. * src/haikufns.c (frame_geometry): Lock window before asking for its dimensions and frame.
* Avoid race conditions when computing real frame positions on HaikuPo Lu2022-05-171-8/+36
| | | | | | | | | | | | | | | | * src/haiku_support.cc (DispatchMessage): Accept SEND_MOVE_FRAME_EVENT. (class EmacsWindow, FrameMoved): Include decorator frame in MOVE_EVENT events. (be_send_move_frame_event): New function. * src/haiku_support.h (struct haiku_move_event): Include decorator dimensions. Update prototypes. * src/haikufns.c (haiku_update_after_decoration_change): Ask for a move frame event and don't do anything if configury is not yet complete. * src/haikuterm.c (haiku_read_socket): Adjust accordingly.
* Rewrite Haiku frame geometry code to handle decorator framesPo Lu2022-05-171-42/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/frames.texi (Frame Layout): Document changes to Haiku frame layout. * src/haiku_support.cc (class EmacsWindow, MoveToIncludingFrame) (EmacsMoveTo, MakeFullscreen): Move to an offset including the decorator frames. (be_get_window_decorator_dimensions): (be_get_window_decorator_frame): New functions. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_update_after_decoration_change): New function. (haiku_create_frame, haiku_set_undecorated) (haiku_set_override_redirect): Call that function. (frame_geometry): Actually calculate frame geometry based on decorator and frame sizes. * src/haikuterm.c (haiku_coords_from_parent): Use frame width instead. (haiku_read_socket): Set left and top positions based on decorator width and height. * src/haikuterm.h (struct haiku_output): New field `frame_x' and `frame_y'.
* Remove extra EmacsPopUpMenu classPo Lu2022-05-171-20/+7
| | | | | | | * src/haiku_support.cc (class EmacsPopUpMenu): Delete class that does nothing. (BPopUpMenu_new): Use BPopUpMenu directly. (BMenu_add_title): Clean up coding style.
* Clean up Haiku code after file panel changesPo Lu2022-05-161-2/+0
| | | | | | | | * src/haiku_support.cc: * src/haiku_support.h: Stop including pthread.h and specpdl_ref. * src/haikumenu.c (run_menu_bar_help_event): Ignore invalid help events instead of aborting.
* ; Fix typosStefan Kangas2022-05-151-1/+1
|
* Simplify Haiku cursor management codePo Lu2022-05-151-39/+11
| | | | | | | | | | | | | * src/haiku_support.cc (BCursor_create_default) (BCursor_create_modeline, BCursor_from_id, BCursor_create_i_beam) (BCursor_create_progress_cursor, BCursor_create_grab) (BCursor_delete): Delete specialized cursor creation functions. (be_delete_cursor, be_create_cursor_from_id): New functions. (BView_set_view_cursor): Fix coding style. * src/haiku_support.h (enum haiku_cursor): Add all cursor IDs. * src/haikufns.c (haiku_free_custom_cursors): (haiku_set_mouse_color): * src/haikuterm.c (haiku_term_init): Adjust accordingly.
* Allow actually setting cursor colors on HaikuPo Lu2022-05-131-0/+18
| | | | | | | | | | | | | | | | | | | * src/haiku_support.cc (be_create_pixmap_cursor): New function. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_create_frame): Change default cursor color to "font-color". (haiku_create_tip_frame): Likewise. (struct user_cursor_bitmap_info): New struct. (cursor_bitmaps): New list of bitmaps corresponding to cursors. (haiku_create_colored_cursor): New function. (haiku_free_custom_cursors): Set current cursor to the default cursor before freeing the original value. (haiku_set_mouse_color): Actually recolor cursors based on built-in bitmaps. * src/haikuterm.c (haiku_defined_color): Clean up coding style.
* Add support for changing pointer types on HaikuPo Lu2022-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/frames.texi (Pointer Shape): Document that the pointer shape can now be changed on some window systems other than X. * lisp/term/haiku-win.el (x-pointer-X-cursor, x-pointer-arrow) (x-pointer-bottom-left-corner, x-pointer-bottom-right-corner) (x-pointer-bottom-side, x-pointer-clock, x-pointer-cross) (x-pointer-cross-reverse, x-pointer-crosshair) (x-pointer-diamond-cross, x-pointer-hand1, x-pointer-hand2) (x-pointer-left-side, x-pointer-right-side) (x-pointer-sb-down-arrow, x-pointer-sb-left-arrow) (x-pointer-sb-right-arrow, x-pointer-sb-up-arrow, x-pointer-target) (x-pointer-top-left-corner, x-pointer-top-right-corner) (x-pointer-top-side, x-pointer-watch, x-pointer-invisible): New pointer constants. * src/haiku_support.cc (BCursor_from_id): Accept int instead of enum. * src/haiku_support.h: Update prototypes. * src/haikufns.c (haiku_create_frame): Stop manually assigning cursors and set default value of the mouse color property. (haiku_free_frame_resources): Free custom cursors too. (struct user_cursor_info, INIT_USER_CURSOR): New struct. (haiku_free_custom_cursors): New function. (haiku_set_mouse_color): New param handler. (haiku_frame_parm_handlers): Add param handler. (syms_of_haikufns): New cursor shape variables from X. * src/haikuterm.h: Update prototypes.