312 |
Lisp_Object, |
Lisp_Object, |
313 |
char *, char *, |
char *, char *, |
314 |
int)); |
int)); |
315 |
|
|
316 |
|
extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); |
317 |
|
|
318 |
/* Store the screen positions of frame F into XPTR and YPTR. |
/* Store the screen positions of frame F into XPTR and YPTR. |
319 |
These are the positions of the containing window manager window, |
These are the positions of the containing window manager window, |
320 |
not Emacs's own window. */ |
not Emacs's own window. */ |
324 |
FRAME_PTR f; |
FRAME_PTR f; |
325 |
int *xptr, *yptr; |
int *xptr, *yptr; |
326 |
{ |
{ |
327 |
Point pt; |
Rect inner, outer; |
|
GrafPtr oldport; |
|
328 |
|
|
329 |
GetPort (&oldport); |
mac_get_window_bounds (f, &inner, &outer); |
|
SetPortWindowPort (FRAME_MAC_WINDOW (f)); |
|
330 |
|
|
331 |
#if TARGET_API_MAC_CARBON |
f->x_pixels_diff = inner.left - outer.left; |
332 |
{ |
f->y_pixels_diff = inner.top - outer.top; |
|
Rect r; |
|
333 |
|
|
334 |
GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); |
*xptr = outer.left; |
335 |
SetPt (&pt, r.left, r.top); |
*yptr = outer.top; |
|
} |
|
|
#else /* not TARGET_API_MAC_CARBON */ |
|
|
SetPt (&pt, |
|
|
FRAME_MAC_WINDOW (f)->portRect.left, |
|
|
FRAME_MAC_WINDOW (f)->portRect.top); |
|
|
#endif /* not TARGET_API_MAC_CARBON */ |
|
|
LocalToGlobal (&pt); |
|
|
SetPort (oldport); |
|
|
|
|
|
/* MAC has no frame pixel diff. */ |
|
|
f->x_pixels_diff = 0; |
|
|
f->y_pixels_diff = 0; |
|
|
|
|
|
*xptr = pt.h; |
|
|
*yptr = pt.v; |
|
336 |
} |
} |
337 |
|
|
338 |
|
|
4247 |
NavUserAction userAction; |
NavUserAction userAction; |
4248 |
CFStringRef message=NULL, client=NULL, saveName = NULL; |
CFStringRef message=NULL, client=NULL, saveName = NULL; |
4249 |
|
|
4250 |
|
BLOCK_INPUT; |
4251 |
/* No need for a callback function because we are modal */ |
/* No need for a callback function because we are modal */ |
4252 |
NavGetDefaultDialogCreationOptions(&options); |
NavGetDefaultDialogCreationOptions(&options); |
4253 |
options.modality = kWindowModalityAppModal; |
options.modality = kWindowModalityAppModal; |
4318 |
AEDisposeDesc(&defLocAed); |
AEDisposeDesc(&defLocAed); |
4319 |
} |
} |
4320 |
|
|
|
BLOCK_INPUT; |
|
4321 |
status = NavDialogRun(dialogRef); |
status = NavDialogRun(dialogRef); |
|
UNBLOCK_INPUT; |
|
4322 |
} |
} |
4323 |
|
|
4324 |
if (saveName) CFRelease(saveName); |
if (saveName) CFRelease(saveName); |
4331 |
{ |
{ |
4332 |
case kNavUserActionNone: |
case kNavUserActionNone: |
4333 |
case kNavUserActionCancel: |
case kNavUserActionCancel: |
4334 |
NavDialogDispose(dialogRef); |
break; /* Treat cancel like C-g */ |
|
Fsignal (Qquit, Qnil); /* Treat cancel like C-g */ |
|
|
return; |
|
4335 |
case kNavUserActionOpen: |
case kNavUserActionOpen: |
4336 |
case kNavUserActionChoose: |
case kNavUserActionChoose: |
4337 |
case kNavUserActionSaveAs: |
case kNavUserActionSaveAs: |
4366 |
dir, mustmatch, dir, Qfile_name_history, |
dir, mustmatch, dir, Qfile_name_history, |
4367 |
default_filename, Qnil); |
default_filename, Qnil); |
4368 |
} |
} |
4369 |
|
UNBLOCK_INPUT; |
4370 |
} |
} |
4371 |
|
|
4372 |
UNGCPRO; |
UNGCPRO; |