diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2007-01-01 15:20:33 +0000 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2007-01-01 15:20:33 +0000 |
commit | 3fcd018655f556a9949f4340589b552a7be26508 (patch) | |
tree | ab5b5ec651c0dd60fd92dcbc9a0bf5e6c11cfdb3 /lwlib | |
parent | 1ecd508641172d55c3dbb5dbbd287316b858d7c5 (diff) | |
download | emacs-3fcd018655f556a9949f4340589b552a7be26508.tar.gz |
(enter_hook, leave_hook): New functions
(xlw_create_menubar, xlw_create_popup_menu): Connect XtNenter/leave
to enter/leave_hook.
Diffstat (limited to 'lwlib')
-rw-r--r-- | lwlib/ChangeLog | 16 | ||||
-rw-r--r-- | lwlib/lwlib-Xlw.c | 27 |
2 files changed, 39 insertions, 4 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 904d8eadf05..d3e8c2eb4c3 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,19 @@ +2007-01-01 Jan Dj,Ad(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. diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c index 4799b1dbd9d..dd366e4cca1 100644 --- a/lwlib/lwlib-Xlw.c +++ b/lwlib/lwlib-Xlw.c @@ -84,6 +84,25 @@ highlight_hook (w, client_data, 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; XtPointer client_data; @@ -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; } |