Mercurial > emacs
comparison src/macfns.c @ 83514:d9f8d2a65d18
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-252
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-253
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-254
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-255
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-256
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-257
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-258
Clean up lisp/gnus/ChangeLog a bit
* emacs@sv.gnu.org/emacs--devo--0--patch-259
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-260
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-261
lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t
* emacs@sv.gnu.org/emacs--devo--0--patch-262
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-96
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-97
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-98
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-554
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 03 May 2006 11:56:53 +0000 |
parents | 2d2f6f096f6e 452969a39863 |
children | 1321f6cfb389 |
comparison
equal
deleted
inserted
replaced
83513:966a40e7fb54 | 83514:d9f8d2a65d18 |
---|---|
1917 } | 1917 } |
1918 #endif | 1918 #endif |
1919 x_set_scroll_bar_width (f, arg, oldval); | 1919 x_set_scroll_bar_width (f, arg, oldval); |
1920 } | 1920 } |
1921 | 1921 |
1922 #if TARGET_API_MAC_CARBON | |
1923 static void | |
1924 mac_update_proxy_icon (f) | |
1925 struct frame *f; | |
1926 { | |
1927 Lisp_Object file_name = | |
1928 XBUFFER (XWINDOW (FRAME_SELECTED_WINDOW (f))->buffer)->filename; | |
1929 Window w = FRAME_MAC_WINDOW (f); | |
1930 | |
1931 if (FRAME_FILE_NAME (f) == NULL && !STRINGP (file_name)) | |
1932 return; | |
1933 if (FRAME_FILE_NAME (f) && STRINGP (file_name) | |
1934 && strcmp (FRAME_FILE_NAME (f), SDATA (file_name)) == 0) | |
1935 return; | |
1936 | |
1937 if (FRAME_FILE_NAME (f)) | |
1938 { | |
1939 xfree (FRAME_FILE_NAME (f)); | |
1940 FRAME_FILE_NAME (f) = NULL; | |
1941 } | |
1942 | |
1943 BLOCK_INPUT; | |
1944 | |
1945 if (STRINGP (file_name)) | |
1946 { | |
1947 OSStatus err; | |
1948 AEDesc desc; | |
1949 Lisp_Object encoded_file_name = ENCODE_FILE (file_name); | |
1950 | |
1951 #ifdef MAC_OS8 | |
1952 SetPortWindowPort (w); | |
1953 #endif | |
1954 err = AECoercePtr (TYPE_FILE_NAME, SDATA (encoded_file_name), | |
1955 SBYTES (encoded_file_name), typeAlias, &desc); | |
1956 if (err == noErr) | |
1957 { | |
1958 Size size = AEGetDescDataSize (&desc); | |
1959 AliasHandle alias = (AliasHandle) NewHandle (size); | |
1960 | |
1961 if (alias == NULL) | |
1962 err = memFullErr; | |
1963 else | |
1964 { | |
1965 HLock ((Handle) alias); | |
1966 err = AEGetDescData (&desc, *alias, size); | |
1967 HUnlock ((Handle) alias); | |
1968 if (err == noErr) | |
1969 err = SetWindowProxyAlias (w, alias); | |
1970 DisposeHandle ((Handle) alias); | |
1971 } | |
1972 AEDisposeDesc (&desc); | |
1973 } | |
1974 if (err == noErr) | |
1975 { | |
1976 FRAME_FILE_NAME (f) = xmalloc (SBYTES (file_name) + 1); | |
1977 strcpy (FRAME_FILE_NAME (f), SDATA (file_name)); | |
1978 } | |
1979 } | |
1980 | |
1981 if (FRAME_FILE_NAME (f) == NULL) | |
1982 RemoveWindowProxy (w); | |
1983 | |
1984 UNBLOCK_INPUT; | |
1985 } | |
1986 #endif | |
1987 | |
1988 void | |
1989 mac_update_title_bar (f, save_match_data) | |
1990 struct frame *f; | |
1991 int save_match_data; | |
1992 { | |
1993 #if TARGET_API_MAC_CARBON | |
1994 struct window *w; | |
1995 int modified_p; | |
1996 | |
1997 if (!FRAME_MAC_P (f)) | |
1998 return; | |
1999 | |
2000 w = XWINDOW (FRAME_SELECTED_WINDOW (f)); | |
2001 modified_p = (BUF_SAVE_MODIFF (XBUFFER (w->buffer)) | |
2002 < BUF_MODIFF (XBUFFER (w->buffer))); | |
2003 if (windows_or_buffers_changed | |
2004 /* Minibuffer modification status shown in the close button is | |
2005 confusing. */ | |
2006 || (!MINI_WINDOW_P (w) | |
2007 && (modified_p != !NILP (w->last_had_star)))) | |
2008 SetWindowModified (FRAME_MAC_WINDOW (f), | |
2009 !MINI_WINDOW_P (w) && modified_p); | |
2010 | |
2011 if (windows_or_buffers_changed) | |
2012 mac_update_proxy_icon (f); | |
2013 #endif | |
2014 } | |
2015 | |
1922 | 2016 |
1923 /* Subroutines of creating a frame. */ | 2017 /* Subroutines of creating a frame. */ |
1924 | 2018 |
1925 /* Retrieve the string resource specified by NAME with CLASS from | 2019 /* Retrieve the string resource specified by NAME with CLASS from |
1926 database RDB. | 2020 database RDB. |
3468 struct frame *f = XFRAME (frame); | 3562 struct frame *f = XFRAME (frame); |
3469 | 3563 |
3470 if (FRAME_LIVE_P (f) && FRAME_MAC_P (f) | 3564 if (FRAME_LIVE_P (f) && FRAME_MAC_P (f) |
3471 && FRAME_MAC_WINDOW (f) != tip_window) | 3565 && FRAME_MAC_WINDOW (f) != tip_window) |
3472 { | 3566 { |
3567 #if USE_CG_DRAWING | |
3568 mac_prepare_for_quickdraw (f); | |
3569 #endif | |
3473 if (!f->output_data.mac->hourglass_control) | 3570 if (!f->output_data.mac->hourglass_control) |
3474 { | 3571 { |
3475 Window w = FRAME_MAC_WINDOW (f); | 3572 Window w = FRAME_MAC_WINDOW (f); |
3476 Rect r; | 3573 Rect r; |
3477 ControlRef c; | 3574 ControlRef c; |
3512 struct frame *f = XFRAME (frame); | 3609 struct frame *f = XFRAME (frame); |
3513 | 3610 |
3514 if (FRAME_MAC_P (f) | 3611 if (FRAME_MAC_P (f) |
3515 /* Watch out for newly created frames. */ | 3612 /* Watch out for newly created frames. */ |
3516 && f->output_data.mac->hourglass_control) | 3613 && f->output_data.mac->hourglass_control) |
3517 HideControl (f->output_data.mac->hourglass_control); | 3614 { |
3615 #if USE_CG_DRAWING | |
3616 mac_prepare_for_quickdraw (f); | |
3617 #endif | |
3618 HideControl (f->output_data.mac->hourglass_control); | |
3619 } | |
3518 } | 3620 } |
3519 | 3621 |
3520 hourglass_shown_p = 0; | 3622 hourglass_shown_p = 0; |
3521 UNBLOCK_INPUT; | 3623 UNBLOCK_INPUT; |
3522 } | 3624 } |