unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Drag and drop in Carbon Emacs
@ 2004-12-29  7:19 YAMAMOTO Mitsuharu
  2004-12-29 17:26 ` Steven Tamm
  0 siblings, 1 reply; 4+ messages in thread
From: YAMAMOTO Mitsuharu @ 2004-12-29  7:19 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]

The attached patch is for the issue that Carbon Emacs crashes when
some items are drag and dropped into a file open dialog.
Unfortunately, the control it provides is still not as fine as the X11
version; it's much like the W32 version.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

2004-12-29  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* term/mac-win.el: Require x-dnd.
	(mac-drag-n-drop): Sync with W32 version.  Use x-dnd.el functions.
	
	
	* macfns.c (install_window_handler): Modify extern to return OSErr
	value.
	(mac_window): Handle return value of install_window_handler.

	* macterm.c (reflect_byte): Remove function.
	(mac_create_bitmap_from_bitmap_data): Don't call it.  Lookup table
	instead.
	(mac_do_font_lists): Simplify calculation of the longest
	nonspecial string.
	[TARGET_API_MAC_CARBON] (init_mac_drag_n_drop): Remove function
	and declaration.
	(mac_initialize) [TARGET_API_MAC_CARBON]: Don't call it.
	[TARGET_API_MAC_CARBON] (mac_do_track_drag): New function and
	declaration.
	(install_window_handler): Return OSErr value.
	(install_window_handler) [TARGET_API_MAC_CARBON]: Register
	handlers for tracking/receiving drag-and-drop items.
	(do_ae_open_documents): Generate unibyte strings for filenames.
	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise.  Reject
	only non-filename items.  Set event modifiers.  Set return value.

[-- Attachment #2: diff-dnd.gz --]
[-- Type: application/octet-stream, Size: 4072 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Drag and drop in Carbon Emacs
  2004-12-29  7:19 Drag and drop in Carbon Emacs YAMAMOTO Mitsuharu
@ 2004-12-29 17:26 ` Steven Tamm
  2005-01-05  9:08   ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Tamm @ 2004-12-29 17:26 UTC (permalink / raw)
  Cc: emacs-devel '

I just checked this in.  The major visible change is that the green 
plus appears whilst dragging over a valid area, whereas before there 
wouldn't be a visible change.

However I couldn't actually drag onto an file dialog.  You can drag to 
a frame behind the dialog, but that is ignored.

-Steven

On Dec 28, 2004, at 11:19 PM, YAMAMOTO Mitsuharu wrote:

> The attached patch is for the issue that Carbon Emacs crashes when
> some items are drag and dropped into a file open dialog.
> Unfortunately, the control it provides is still not as fine as the X11
> version; it's much like the W32 version.
>
> 				     YAMAMOTO Mitsuharu
> 				mituharu@math.s.chiba-u.ac.jp
>
> 2004-12-29  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
>
> 	* term/mac-win.el: Require x-dnd.
> 	(mac-drag-n-drop): Sync with W32 version.  Use x-dnd.el functions.
> 	
> 	
> 	* macfns.c (install_window_handler): Modify extern to return OSErr
> 	value.
> 	(mac_window): Handle return value of install_window_handler.
>
> 	* macterm.c (reflect_byte): Remove function.
> 	(mac_create_bitmap_from_bitmap_data): Don't call it.  Lookup table
> 	instead.
> 	(mac_do_font_lists): Simplify calculation of the longest
> 	nonspecial string.
> 	[TARGET_API_MAC_CARBON] (init_mac_drag_n_drop): Remove function
> 	and declaration.
> 	(mac_initialize) [TARGET_API_MAC_CARBON]: Don't call it.
> 	[TARGET_API_MAC_CARBON] (mac_do_track_drag): New function and
> 	declaration.
> 	(install_window_handler): Return OSErr value.
> 	(install_window_handler) [TARGET_API_MAC_CARBON]: Register
> 	handlers for tracking/receiving drag-and-drop items.
> 	(do_ae_open_documents): Generate unibyte strings for filenames.
> 	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise.  Reject
> 	only non-filename items.  Set event modifiers.  Set return value.
> <diff-dnd.gz>_______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Drag and drop in Carbon Emacs
  2004-12-29 17:26 ` Steven Tamm
@ 2005-01-05  9:08   ` YAMAMOTO Mitsuharu
  2005-01-05  9:50     ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 4+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-01-05  9:08 UTC (permalink / raw)
  Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

>>>>> On Wed, 29 Dec 2004 09:26:25 -0800, Steven Tamm <steventamm@mac.com> said:

> However I couldn't actually drag onto an file dialog.  You can drag
> to a frame behind the dialog, but that is ignored.

Actually, it is not ignored if the dialog is not canceled.  Anyway,
this behavior is confusing, and maybe non-dialog windows should not
accept ordinary events because the dialog is application-modal.

Also, I noticed another problem on file dialogs:

   1) Open a file dialog.
   2) Type `Command-H' to hide Emacs windows (including the dialog).
   3) Click the Emacs icon in the Dock to show Emacs windows.

Then the dialog is redrawn, but the other Emacs windows don't get
redrawn.

Below is a patch for these problems and to make `drag onto a file
dialog' work.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

[-- Attachment #2: ChangeLog.gz --]
[-- Type: application/octet-stream, Size: 653 bytes --]

[-- Attachment #3: diff-filedialog.gz --]
[-- Type: application/octet-stream, Size: 4393 bytes --]

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Drag and drop in Carbon Emacs
  2005-01-05  9:08   ` YAMAMOTO Mitsuharu
@ 2005-01-05  9:50     ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 4+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-01-05  9:50 UTC (permalink / raw)
  Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

>>>>> On Wed, 05 Jan 2005 18:08:08 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

> Below is a patch for these problems and to make `drag onto a file
> dialog' work.

Sorry, previously posted patch was not right.  Please use this one
instead.

					YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

[-- Attachment #2: ChangeLog.gz --]
[-- Type: application/octet-stream, Size: 615 bytes --]

[-- Attachment #3: diff-filedialog.gz --]
[-- Type: application/octet-stream, Size: 3685 bytes --]

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-05  9:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-29  7:19 Drag and drop in Carbon Emacs YAMAMOTO Mitsuharu
2004-12-29 17:26 ` Steven Tamm
2005-01-05  9:08   ` YAMAMOTO Mitsuharu
2005-01-05  9:50     ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).