summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2007-06-14 08:40:24 +0000
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>2007-06-14 08:40:24 +0000
commit446ba96f1f6d175e07f388fb8e571355dd00465f (patch)
tree32fbafa659a1fa637655462825b9bbd58f239346 /src
parenta28c8af38985cd56829f6d38c8913b311d95df72 (diff)
downloademacs-446ba96f1f6d175e07f388fb8e571355dd00465f.tar.gz
(update_tool_bar, redisplay_tool_bar, redisplay_window)
[USE_MAC_TOOLBAR]: Sync with GTK+ tool bar display.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog43
-rw-r--r--src/xdisp.c6
2 files changed, 46 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0ebcdd103fb..fd8c3235166 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,46 @@
+2007-06-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * frame.h (struct frame) [MAC_OS]: New member external_tool_bar.
+ (FRAME_EXTERNAL_TOOL_BAR) [MAC_OS]: Use it.
+
+ * macfns.c (mac_window) [USE_MAC_TOOLBAR]: Set toolbar_win_gravity.
+ (x_set_tool_bar_lines) [USE_MAC_TOOLBAR]: Set FRAME_EXTERNAL_TOOL_BAR.
+
+ * macgui.h (USE_MAC_TOOLBAR): New define.
+
+ * macmenu.c [TARGET_API_MAC_CARBON] (menu_target_item_handler):
+ Return immediately unless popup is activated.
+
+ * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe
+ background to scroll bar gap.
+ (x_scroll_bar_create) [MAC_OSX]: Set bar->fringe_extended_p.
+ (XTset_vertical_scroll_bar) [MAC_OSX]: Put leftmost/rightmost
+ scroll bars on frame edge. Check fringe background extension.
+ Don't clear extended fringe background area.
+ (TOOLBAR_IDENTIFIER, TOOLBAR_ICON_ITEM_IDENTIFIER)
+ (TOOLBAR_ITEM_COMMAND_ID_OFFSET, TOOLBAR_ITEM_COMMAND_ID_P)
+ (TOOLBAR_ITEM_COMMAND_ID_VALUE, TOOLBAR_ITEM_MAKE_COMMAND_ID):
+ [USE_MAC_TOOLBAR]: New macros.
+ (mac_move_window_with_gravity, mac_get_window_origin_with_gravity)
+ (mac_handle_toolbar_event, mac_image_spec_to_cg_image)
+ (mac_create_frame_tool_bar, update_frame_tool_bar, free_frame_tool_bar)
+ (mac_tool_bar_note_mouse_movement, mac_handle_toolbar_command_event)
+ [USE_MAC_TOOLBAR]: New functions.
+ (mac_handle_window_event) [USE_MAC_TOOLBAR]: Reposition window
+ manually if previous repositioning has failed.
+ (mac_handle_keyboard_event): Use precomputed event kind.
+ (XTread_socket) [USE_MAC_TOOLBAR]: Handle click in structure region
+ as tool bar item click. Handle mouse movement over tool bar items.
+
+ * macterm.h (struct mac_output) [USE_MAC_TOOLBAR]: New member
+ toolbar_win_gravity.
+ (struct scroll_bar) [MAC_OSX]: New member fringe_extended_p.
+ (update_frame_tool_bar, free_frame_tool_bar) [USE_MAC_TOOLBAR]:
+ Add externs.
+
+ * xdisp.c (update_tool_bar, redisplay_tool_bar, redisplay_window)
+ [USE_MAC_TOOLBAR]: Sync with GTK+ tool bar display.
+
2007-06-14 Chong Yidong <cyd@stupidchicken.com>
* image.c (search_image_cache): Remove unused variable.
diff --git a/src/xdisp.c b/src/xdisp.c
index f3e1aa1112c..e1c29ce72eb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9365,7 +9365,7 @@ update_tool_bar (f, save_match_data)
struct frame *f;
int save_match_data;
{
-#ifdef USE_GTK
+#if defined (USE_GTK) || USE_MAC_TOOLBAR
int do_update = FRAME_EXTERNAL_TOOL_BAR (f);
#else
int do_update = WINDOWP (f->tool_bar_window)
@@ -9831,7 +9831,7 @@ redisplay_tool_bar (f)
struct it it;
struct glyph_row *row;
-#ifdef USE_GTK
+#if defined (USE_GTK) || USE_MAC_TOOLBAR
if (FRAME_EXTERNAL_TOOL_BAR (f))
update_frame_tool_bar (f);
return 0;
@@ -13467,7 +13467,7 @@ redisplay_window (window, just_this_one_p)
display_menu_bar (w);
#ifdef HAVE_WINDOW_SYSTEM
-#ifdef USE_GTK
+#if defined (USE_GTK) || USE_MAC_TOOLBAR
redisplay_tool_bar_p = FRAME_EXTERNAL_TOOL_BAR (f);
#else
redisplay_tool_bar_p = WINDOWP (f->tool_bar_window)