aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Tamm2004-12-30 02:04:31 +0000
committerSteven Tamm2004-12-30 02:04:31 +0000
commit456e761becb3d7dc0b7a707079b4f1259e9da598 (patch)
tree454fbf8751a183ab52de718af3abc65f0e739c96 /src
parentc4cb00d05e5e3a227681de41a4aef0067bce106a (diff)
downloademacs-456e761becb3d7dc0b7a707079b4f1259e9da598.tar.gz
emacs-456e761becb3d7dc0b7a707079b4f1259e9da598.zip
* macterm.c (SelectionRange): Add Xcode position apple event struct.
(do_ae_open_documents): Handle Xcode-style file position open events. * term/mac-win.el (mac-drag-n-drop): Handle drag-n-drop events that include line numbers.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/macterm.c19
2 files changed, 25 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2f974365cdc..4bc9e69ce12 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12004-12-29 Sanghyuk Suh <han9kin@mac.com>
2
3 * macterm.c (SelectionRange): Add Xcode position apple event struct.
4 (do_ae_open_documents): Handle Xcode-style file position open
5 events.
6
12004-12-29 Luc Teirlinck <teirllm@auburn.edu> 72004-12-29 Luc Teirlinck <teirllm@auburn.edu>
2 8
3 * buffer.c (syms_of_buffer) <vertical-scroll-bar>: Correct typo. 9 * buffer.c (syms_of_buffer) <vertical-scroll-bar>: Correct typo.
diff --git a/src/macterm.c b/src/macterm.c
index 745457f0ff3..4df30e74386 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -7928,6 +7928,17 @@ path_from_vol_dir_name (char *, int, short, long, char *);
7928/* Called when we receive an AppleEvent with an ID of 7928/* Called when we receive an AppleEvent with an ID of
7929 "kAEOpenDocuments". This routine gets the direct parameter, 7929 "kAEOpenDocuments". This routine gets the direct parameter,
7930 extracts the FSSpecs in it, and puts their names on a list. */ 7930 extracts the FSSpecs in it, and puts their names on a list. */
7931#pragma options align=mac68k
7932typedef struct SelectionRange {
7933 short unused1; // 0 (not used)
7934 short lineNum; // line to select (<0 to specify range)
7935 long startRange; // start of selection range (if line < 0)
7936 long endRange; // end of selection range (if line < 0)
7937 long unused2; // 0 (not used)
7938 long theDate; // modification date/time
7939} SelectionRange;
7940#pragma options align=reset
7941
7931static pascal OSErr 7942static pascal OSErr
7932do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) 7943do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon)
7933{ 7944{
@@ -7936,11 +7947,19 @@ do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon)
7936 AEKeyword keyword; 7947 AEKeyword keyword;
7937 DescType actual_type; 7948 DescType actual_type;
7938 Size actual_size; 7949 Size actual_size;
7950 SelectionRange position;
7939 7951
7940 err = AEGetParamDesc (message, keyDirectObject, typeAEList, &the_desc); 7952 err = AEGetParamDesc (message, keyDirectObject, typeAEList, &the_desc);
7941 if (err != noErr) 7953 if (err != noErr)
7942 goto descriptor_error_exit; 7954 goto descriptor_error_exit;
7943 7955
7956 err = AEGetParamPtr (message, keyAEPosition, typeChar, &actual_type, &position, sizeof(SelectionRange), &actual_size);
7957 if (err == noErr)
7958 drag_and_drop_file_list = Fcons (list3 (make_number (position.lineNum + 1),
7959 make_number (position.startRange + 1),
7960 make_number (position.endRange + 1)),
7961 drag_and_drop_file_list);
7962
7944 /* Check to see that we got all of the required parameters from the 7963 /* Check to see that we got all of the required parameters from the
7945 event descriptor. For an 'odoc' event this should just be the 7964 event descriptor. For an 'odoc' event this should just be the
7946 file list. */ 7965 file list. */