<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/haiku_io.c, branch pkg</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Implement font-use-system-font on Haiku</title>
<updated>2022-09-25T13:24:03+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-09-25T13:22:45+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=568920a5b703e80c43e1b6f31778ea5776218a1e'/>
<id>568920a5b703e80c43e1b6f31778ea5776218a1e</id>
<content type='text'>
* doc/emacs/frames.texi (Fonts): Update documentation to say
what font-use-system-font really does and where it can be used.
* src/haiku_font_support.cc (language_code_points): Fix coding
style.
(font_style_to_flags, be_font_style_to_flags): Accept const char
*.
(be_send_font_settings, be_listen_font_settings)
(be_lock_font_defaults, be_unlock_font_defaults)
(be_get_font_default, be_get_font_size): New functions used to
retrieve default font data.

* src/haiku_io.c (haiku_len): Handle FONT_CHANGE_EVENT.
* src/haiku_support.h (enum haiku_event_type): New event type
FONT_CHANGE_EVENT.
(enum haiku_what_font): New enum.
(struct haiku_font_change_event): New struct.

* src/haikufont.c (Ffont_get_system_normal_font)
(Ffont_get_system_font, haiku_handle_font_change_event): New
functions.
(syms_of_haikufont): Provide `dynamic-setting' and define new
variables and subrs.

* src/haikuterm.c (haiku_default_font_parameter): Use system font.
(haiku_read_socket): Handle FONT_CHANGE_EVENTS.
(haiku_term_init): Start listening for font configuration changes.
* src/haikuterm.h: Update prototypes.

* src/xsettings.c (Ffont_get_system_normal_font)
(Ffont_get_system_font): Update doc string.
(syms_of_xsettings): Replace calls to intern with a static
string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* doc/emacs/frames.texi (Fonts): Update documentation to say
what font-use-system-font really does and where it can be used.
* src/haiku_font_support.cc (language_code_points): Fix coding
style.
(font_style_to_flags, be_font_style_to_flags): Accept const char
*.
(be_send_font_settings, be_listen_font_settings)
(be_lock_font_defaults, be_unlock_font_defaults)
(be_get_font_default, be_get_font_size): New functions used to
retrieve default font data.

* src/haiku_io.c (haiku_len): Handle FONT_CHANGE_EVENT.
* src/haiku_support.h (enum haiku_event_type): New event type
FONT_CHANGE_EVENT.
(enum haiku_what_font): New enum.
(struct haiku_font_change_event): New struct.

* src/haikufont.c (Ffont_get_system_normal_font)
(Ffont_get_system_font, haiku_handle_font_change_event): New
functions.
(syms_of_haikufont): Provide `dynamic-setting' and define new
variables and subrs.

* src/haikuterm.c (haiku_default_font_parameter): Use system font.
(haiku_read_socket): Handle FONT_CHANGE_EVENTS.
(haiku_term_init): Start listening for font configuration changes.
* src/haikuterm.h: Update prototypes.

* src/xsettings.c (Ffont_get_system_normal_font)
(Ffont_get_system_font): Update doc string.
(syms_of_xsettings): Replace calls to intern with a static
string.
</pre>
</div>
</content>
</entry>
<entry>
<title>Port `x-lost-selection-functions' to Haiku</title>
<updated>2022-07-07T02:48:19+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-07-07T02:48:19+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=fd016ea99724f7abedfddbb470ab96ece6ddf4ae'/>
<id>fd016ea99724f7abedfddbb470ab96ece6ddf4ae</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement monitor change functions on Haiku</title>
<updated>2022-05-23T10:23:59+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-05-23T10:23:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=caec741c00f907264524fafb5ba058063c898b92'/>
<id>caec741c00f907264524fafb5ba058063c898b92</id>
<content type='text'>
* 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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up Haiku file panel code</title>
<updated>2022-05-04T03:23:11+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-05-04T03:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b5cf6c1ab6cc5ca3d7a4b5d1e2b775d7d59a5866'/>
<id>b5cf6c1ab6cc5ca3d7a4b5d1e2b775d7d59a5866</id>
<content type='text'>
* lisp/term/haiku-win.el (x-file-dialog): Fix nil values of
`default-filename'.
* src/haiku_io.c (haiku_len): Remove `FILE_PANEL_EVENT'.
(record_c_unwind_protect_from_cxx, c_specpdl_idx_from_cxx)
(c_unbind_to_nil_from_cxx): Delete functions.
* src/haiku_support.cc (MessageReceived): Write pointer to
buffer to file panel port instead.
(struct popup_file_dialog_data): Delete strict.
(unwind_popup_file_dialog): Delete functions.
(be_popup_file_dialog): Accept a pointer to
`process_pending_signals' and run nested event loop as usual.

* src/haiku_support.h (enum haiku_event_type): Remove
`FILE_PANEL_EVENT'.
(struct haiku_file_panel_event): Delete struct.
* src/haikufns.c (unwind_popup): Delete function.
(Fhaiku_read_file_name): Update and quit on invalid filename.

* src/haikuterm.c (struct unhandled_event): Delete struct.
(haiku_read_socket): Remove "unhandled events".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/term/haiku-win.el (x-file-dialog): Fix nil values of
`default-filename'.
* src/haiku_io.c (haiku_len): Remove `FILE_PANEL_EVENT'.
(record_c_unwind_protect_from_cxx, c_specpdl_idx_from_cxx)
(c_unbind_to_nil_from_cxx): Delete functions.
* src/haiku_support.cc (MessageReceived): Write pointer to
buffer to file panel port instead.
(struct popup_file_dialog_data): Delete strict.
(unwind_popup_file_dialog): Delete functions.
(be_popup_file_dialog): Accept a pointer to
`process_pending_signals' and run nested event loop as usual.

* src/haiku_support.h (enum haiku_event_type): Remove
`FILE_PANEL_EVENT'.
(struct haiku_file_panel_event): Delete struct.
* src/haikufns.c (unwind_popup): Delete function.
(Fhaiku_read_file_name): Update and quit on invalid filename.

* src/haikuterm.c (struct unhandled_event): Delete struct.
(haiku_read_socket): Remove "unhandled events".
</pre>
</div>
</content>
</entry>
<entry>
<title>Add simple session management support to Haiku</title>
<updated>2022-04-27T05:19:15+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-04-27T05:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0bea75c95a7e59c50be437956916cc0835655575'/>
<id>0bea75c95a7e59c50be437956916cc0835655575</id>
<content type='text'>
* lisp/term/common-win.el (emacs-save-session-functions): Move
from x-win.el to common-win.el.
* lisp/term/haiku-win.el (haiku-save-session-reply)
(emacs-session-save, handle-save-session): New functions.
* lisp/term/x-win.el (emacs-save-session-functions): Delete.

* src/haiku_font_support.cc (font_style_to_flags):
* src/haiku_support.h (enum haiku_font_weight): Turn weight
macros into enum.
(struct haiku_font_pattern): Likewise.
(struct haiku_session_manager_reply): New struct.
* src/haiku_io.c (haiku_io_init): Create sm port.
* src/haiku_support.cc (QuitRequested): Wait for reply from sm
port.
* src/haikufns.c (Fhaiku_save_session_reply): New function.
(syms_of_haikufns): Define new subr.
* src/haikuterm.c (haiku_read_socket): Send session management
events.
(haiku_term_init): Check new port.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/term/common-win.el (emacs-save-session-functions): Move
from x-win.el to common-win.el.
* lisp/term/haiku-win.el (haiku-save-session-reply)
(emacs-session-save, handle-save-session): New functions.
* lisp/term/x-win.el (emacs-save-session-functions): Delete.

* src/haiku_font_support.cc (font_style_to_flags):
* src/haiku_support.h (enum haiku_font_weight): Turn weight
macros into enum.
(struct haiku_font_pattern): Likewise.
(struct haiku_session_manager_reply): New struct.
* src/haiku_io.c (haiku_io_init): Create sm port.
* src/haiku_support.cc (QuitRequested): Wait for reply from sm
port.
* src/haikufns.c (Fhaiku_save_session_reply): New function.
(syms_of_haikufns): Define new subr.
* src/haikuterm.c (haiku_read_socket): Send session management
events.
(haiku_term_init): Check new port.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix hangs when clicking on Haiku menu bar to activate frame</title>
<updated>2022-04-17T08:14:05+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-04-17T07:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e8b0808e20797f84fb2a720e38f315bfab39bde4'/>
<id>e8b0808e20797f84fb2a720e38f315bfab39bde4</id>
<content type='text'>
* src/haiku_io.c (haiku_len): Handle new event `MENU_BAR_CLICK'.
* src/haiku_support.cc (class EmacsWindow): Remove most of the
menu bar cv stuff.
(MessageReceived): Handle REPLAY_MENU_BAR message.
(EmacsWindow_signal_menu_update_complete): Delete function.
(be_replay_menu_bar_event): New function.

* src/haiku_support.h (enum haiku_event_type): New event type
`MENU_BAR_CLICK'.
(struct haiku_menu_bar_click_event): New struct.

* src/haikumenu.c (haiku_activate_menubar): New function.
* src/haikuterm.c (haiku_read_socket): Save a
MENU_BAR_ACTIVATE_EVENT and the menu bar click event instead of
handling the menu bar update synchronously.
(haiku_create_terminal): Set `activate_menubar_hook'.
(syms_of_haikuterm): Remove extraneous newline.

* src/haikuterm.h (struct haiku_output): New field
`saved_menu_event'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/haiku_io.c (haiku_len): Handle new event `MENU_BAR_CLICK'.
* src/haiku_support.cc (class EmacsWindow): Remove most of the
menu bar cv stuff.
(MessageReceived): Handle REPLAY_MENU_BAR message.
(EmacsWindow_signal_menu_update_complete): Delete function.
(be_replay_menu_bar_event): New function.

* src/haiku_support.h (enum haiku_event_type): New event type
`MENU_BAR_CLICK'.
(struct haiku_menu_bar_click_event): New struct.

* src/haikumenu.c (haiku_activate_menubar): New function.
* src/haikuterm.c (haiku_read_socket): Save a
MENU_BAR_ACTIVATE_EVENT and the menu bar click event instead of
handling the menu bar update synchronously.
(haiku_create_terminal): Set `activate_menubar_hook'.
(syms_of_haikuterm): Remove extraneous newline.

* src/haikuterm.h (struct haiku_output): New field
`saved_menu_event'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Redo Haiku DND support</title>
<updated>2022-03-16T13:28:53+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-03-16T13:18:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3de3f12b9402c731aca1a583a15fc6245efea136'/>
<id>3de3f12b9402c731aca1a583a15fc6245efea136</id>
<content type='text'>
* lisp/term/haiku-win.el (haiku-dnd-handle-drag-n-drop-event):
Update for new DND event format.
* src/haiku_io.c (haiku_len): Handle DRAG_AND_DROP_EVENTs.
* src/haiku_select.cc (be_enum_message, be_get_refs_data)
(be_get_message_data): New function.
* src/haiku_support.cc (class Emacs): Remove `RefsReceived'.
(MessageReceived): Generate new kind of drag-n-drop events.
* src/haiku_support.h (enum haiku_event_type): Rename
`REFS_EVENT' to `DRAG_AND_DROP_EVENT'.
(struct haiku_refs_event): Delete struct.
(struct haiku_drag_and_drop_event): New struct.
* src/haikuselect.c (haiku_message_to_lisp): New function.
(syms_of_haikuselect): New symbols.
* src/haikuselect.h: Update prototypes.
* src/haikuterm.c (haiku_read_socket): Handle new type of
drag-and-drop events by serializing drop message to Lisp and
letting Lisp code do the processing.
* src/haikuterm.h: Update prototypes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/term/haiku-win.el (haiku-dnd-handle-drag-n-drop-event):
Update for new DND event format.
* src/haiku_io.c (haiku_len): Handle DRAG_AND_DROP_EVENTs.
* src/haiku_select.cc (be_enum_message, be_get_refs_data)
(be_get_message_data): New function.
* src/haiku_support.cc (class Emacs): Remove `RefsReceived'.
(MessageReceived): Generate new kind of drag-n-drop events.
* src/haiku_support.h (enum haiku_event_type): Rename
`REFS_EVENT' to `DRAG_AND_DROP_EVENT'.
(struct haiku_refs_event): Delete struct.
(struct haiku_drag_and_drop_event): New struct.
* src/haikuselect.c (haiku_message_to_lisp): New function.
(syms_of_haikuselect): New symbols.
* src/haikuselect.h: Update prototypes.
* src/haikuterm.c (haiku_read_socket): Handle new type of
drag-and-drop events by serializing drop message to Lisp and
letting Lisp code do the processing.
* src/haikuterm.h: Update prototypes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up some Haiku toolkit code</title>
<updated>2022-03-14T06:48:53+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-03-14T06:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a1fa3d24d7f96542530f30c28daf9bf8aaaeae13'/>
<id>a1fa3d24d7f96542530f30c28daf9bf8aaaeae13</id>
<content type='text'>
* src/haiku_io.c (haiku_read_with_timeout): Accept `bigtime_t'
instead of `time_t' for values which are cast to bigtime_t
anyway.
* src/haiku_support.cc (BMenu_run): Read all help events instead
of just one.
* src/haiku_support.h: Update prototypes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/haiku_io.c (haiku_read_with_timeout): Accept `bigtime_t'
instead of `time_t' for values which are cast to bigtime_t
anyway.
* src/haiku_support.cc (BMenu_run): Read all help events instead
of just one.
* src/haiku_support.h: Update prototypes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve scroll bar button handling on Haiku</title>
<updated>2022-02-26T06:57:00+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-02-26T06:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=974c44414a1bd3dced0f77ce65c60a41e0f25a1a'/>
<id>974c44414a1bd3dced0f77ce65c60a41e0f25a1a</id>
<content type='text'>
* src/haiku_io.c (haiku_len): Add `SCROLL_BAR_PART_EVENT'.
* src/haiku_support.cc (class EmacsScrollBar): New fields
`dragging' and `current_state', along with `old_value' and
`current_part'.
(EmacsScrollBar): Set horizontal flag to `horizontal_p'.
(MessageReceived): Set old_value when receiving
SCROLL_BAR_UPDATE message.
(ValueChanged): Don't allow scroll bar values to change while
dragging.
(MouseUp, MouseDown): Calculate button under mouse and act
accordingly.
* src/haiku_support.h (enum haiku_event_type): New event
`SCROLL_BAR_PART_EVENT'.
(enum haiku_scroll_bar_part): New enumerator.
(struct haiku_scroll_bar_part_event): New struct.
* src/haikuterm.c (haiku_read_socket): Handle
SCROLL_BAR_PART_EVENTs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/haiku_io.c (haiku_len): Add `SCROLL_BAR_PART_EVENT'.
* src/haiku_support.cc (class EmacsScrollBar): New fields
`dragging' and `current_state', along with `old_value' and
`current_part'.
(EmacsScrollBar): Set horizontal flag to `horizontal_p'.
(MessageReceived): Set old_value when receiving
SCROLL_BAR_UPDATE message.
(ValueChanged): Don't allow scroll bar values to change while
dragging.
(MouseUp, MouseDown): Calculate button under mouse and act
accordingly.
* src/haiku_support.h (enum haiku_event_type): New event
`SCROLL_BAR_PART_EVENT'.
(enum haiku_scroll_bar_part): New enumerator.
(struct haiku_scroll_bar_part_event): New struct.
* src/haikuterm.c (haiku_read_socket): Handle
SCROLL_BAR_PART_EVENTs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't auto-lower when moving onto a menu bar on Haiku</title>
<updated>2022-02-17T01:26:14+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-02-17T01:26:14+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e14317eec4461e86a93906973ff99527e7dfa4df'/>
<id>e14317eec4461e86a93906973ff99527e7dfa4df</id>
<content type='text'>
* src/haiku_io.c (haiku_len): Handle `MENU_BAR_LEFT'.
* src/haiku_support.cc (EmacsMenuBar::MouseMoved): New function.
* src/haiku_support.h (enum haiku_event_type): New event
`MENU_BAR_LEFT'.
(struct haiku_menu_bar_left_event): New structure.
* src/haikuterm.c (haiku_read_socket): Don't auto-lower when the
mouse exits the frame view onto the menu bar and handle
MENU_BAR_LEFT events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/haiku_io.c (haiku_len): Handle `MENU_BAR_LEFT'.
* src/haiku_support.cc (EmacsMenuBar::MouseMoved): New function.
* src/haiku_support.h (enum haiku_event_type): New event
`MENU_BAR_LEFT'.
(struct haiku_menu_bar_left_event): New structure.
* src/haikuterm.c (haiku_read_socket): Don't auto-lower when the
mouse exits the frame view onto the menu bar and handle
MENU_BAR_LEFT events.
</pre>
</div>
</content>
</entry>
</feed>
