]> git.eshelyaron.com Git - emacs.git/commitdiff
(enter_hook, leave_hook): New functions
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 1 Jan 2007 15:20:33 +0000 (15:20 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 1 Jan 2007 15:20:33 +0000 (15:20 +0000)
(xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
to enter/leave_hook.

lwlib/ChangeLog
lwlib/lwlib-Xlw.c

index 904d8eadf050654c219f2b09d9bf8370cdad40fd..d3e8c2eb4c3c8a6325109e19c2fe8e36342ee752 100644 (file)
@@ -1,3 +1,19 @@
+2007-01-01  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * xlwmenu.c (xlwMenuResources): Add XtNleaveCallback, XtNenterCallback.
+       (display_menu, map_event_to_widget_value): Generate enter and
+       leave callbacks.
+       (pop_up_menu): Initialize mw->menu.inside_entry.
+
+       * xlwmenu.h (XtNleaveCallback, XtNenterCallback): New strings.
+
+       * xlwmenuP.h (_XlwMenu_part): Add enter/leave callbacks and
+       inside_entry.
+
+       * lwlib-Xlw.c (enter_hook, leave_hook): New functions
+       (xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
+       to enter/leave_hook.
+
 2006-10-30  Chong Yidong  <cyd@stupidchicken.com>
 
        * Makefile.in (lwlib-utils.o): Use CPPFLAGS.
index 4799b1dbd9d99149577721e4572095d30d3750e7..dd366e4cca1bf0fd660a75c11248c1c4733d9ddd 100644 (file)
@@ -83,6 +83,25 @@ highlight_hook (w, client_data, call_data)
     instance->info->highlight_cb (w, instance->info->id, call_data);
 }
 
+static void
+enter_hook (w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  highlight_hook (w, client_data, call_data);
+}
+
+static void
+leave_hook (w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  highlight_hook (w, client_data, NULL);
+}
+
+
 static void
 pre_hook (w, client_data, call_data)
      Widget w;
@@ -152,8 +171,8 @@ xlw_create_menubar (instance)
 
   XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
-  XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
-                (XtPointer)instance);
+  XtAddCallback (widget, XtNleaveCallback, leave_hook, (XtPointer)instance);
+  XtAddCallback (widget, XtNenterCallback, enter_hook, (XtPointer)instance);
   return widget;
 }
 
@@ -179,8 +198,8 @@ xlw_create_popup_menu (instance)
                             popup_shell, al, ac);
 
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
-  XtAddCallback (widget, XtNhighlightCallback, highlight_hook,
-                (XtPointer)instance);
+  XtAddCallback (widget, XtNleaveCallback, leave_hook, (XtPointer)instance);
+  XtAddCallback (widget, XtNenterCallback, enter_hook, (XtPointer)instance);
 
   return popup_shell;
 }