static void show_one_widget_busy (Widget, Boolean);
void
-lwlib_memset (address, value, length)
- char *address;
- int value;
- size_t length;
+lwlib_memset (char *address, int value, size_t length)
{
int i;
}
void
-lwlib_bcopy (from, to, length)
- char *from;
- char *to;
- int length;
+lwlib_bcopy (char *from, char *to, int length)
{
int i;
}
\f/* utility functions for widget_instance and widget_info */
char *
-safe_strdup (s)
- const char *s;
+safe_strdup (const char *s)
{
char *result;
if (! s) return 0;
/* Like strcmp but ignore differences in case. */
static int
-my_strcasecmp (s1, s2)
- char *s1, *s2;
+my_strcasecmp (char *s1, char *s2)
{
while (1)
{
}
static void
-safe_free_str (s)
- char *s;
+safe_free_str (char *s)
{
free (s);
}
static int malloc_cpt = 0;
widget_value *
-malloc_widget_value ()
+malloc_widget_value (void)
{
widget_value *wv;
if (widget_value_free_list)
by malloc_widget_value(), and no substructures.
*/
void
-free_widget_value (wv)
- widget_value *wv;
+free_widget_value (widget_value *wv)
{
if (wv->free_list)
abort ();
}
static void
-free_widget_value_tree (wv)
- widget_value *wv;
+free_widget_value_tree (widget_value *wv)
{
if (!wv)
return;
}
static widget_value *
-copy_widget_value_tree (val, change)
- widget_value* val;
- change_type change;
+copy_widget_value_tree (widget_value *val, change_type change)
{
widget_value* copy;
}
static void
-free_widget_info (info)
- widget_info* info;
+free_widget_info (widget_info *info)
{
safe_free_str (info->type);
safe_free_str (info->name);
}
static void
-mark_widget_destroyed (widget, closure, call_data)
- Widget widget;
- XtPointer closure;
- XtPointer call_data;
+mark_widget_destroyed (Widget widget, XtPointer closure, XtPointer call_data)
{
widget_instance* instance = (widget_instance*)closure;
}
static void
-free_widget_instance (instance)
- widget_instance* instance;
+free_widget_instance (widget_instance *instance)
{
lwlib_memset ((void*)instance, 0xDEADBEEF, sizeof (widget_instance));
free (instance);
/* Internal function used by the library dependent implementation to get the
widget_value for a given widget in an instance */
widget_info *
-lw_get_widget_info (id)
- LWLIB_ID id;
+lw_get_widget_info (LWLIB_ID id)
{
return get_widget_info (id, 0);
}
WIDGET, or null if WIDGET is not a lwlib widget. */
widget_instance *
-lw_get_widget_instance (widget)
- Widget widget;
+lw_get_widget_instance (Widget widget)
{
return get_widget_instance (widget, False);
}
\f
/* utility function for widget_value */
static Boolean
-safe_strcmp (s1, s2)
- char* s1;
- char* s2;
+safe_strcmp (char *s1, char *s2)
{
if (!!s1 ^ !!s2) return True;
return (s1 && s2) ? strcmp (s1, s2) : s1 ? False : !!s2;
static widget_value *
-merge_widget_value (val1, val2, level, change_p)
- widget_value* val1;
- widget_value* val2;
- int level;
- int *change_p;
+merge_widget_value (widget_value *val1, widget_value *val2, int level, int *change_p)
{
change_type change, this_one_change;
widget_value* merged_next;
\f
/* modifying the widgets */
static Widget
-name_to_widget (instance, name)
- widget_instance* instance;
- char* name;
+name_to_widget (widget_instance *instance, char *name)
{
Widget widget = NULL;
/* creating the widgets */
static void
-initialize_widget_instance (instance)
- widget_instance* instance;
+initialize_widget_instance (widget_instance *instance)
{
widget_value* val;
static widget_creation_function
-find_in_table (type, table)
- char* type;
- widget_creation_entry* table;
+find_in_table (char *type, widget_creation_entry *table)
{
widget_creation_entry* cur;
for (cur = table; cur->type; cur++)
}
static Boolean
-dialog_spec_p (name)
- char* name;
+dialog_spec_p (char *name)
{
/* return True if name matches [EILPQeilpq][1-9][Bb] or
[EILPQeilpq][1-9][Bb][Rr][1-9] */
}
static void
-instantiate_widget_instance (instance)
- widget_instance* instance;
+instantiate_widget_instance (widget_instance *instance)
{
widget_creation_function function = NULL;
\f
/* destroying the widgets */
static void
-destroy_one_instance (instance)
- widget_instance* instance;
+destroy_one_instance (widget_instance *instance)
{
/* Remove the destroy callback on the widget; that callback will try to
dereference the instance object (to set its widget slot to 0, since the
}
void
-lw_destroy_widget (w)
- Widget w;
+lw_destroy_widget (Widget w)
{
widget_instance* instance = get_widget_instance (w, True);
}
void
-lw_destroy_all_widgets (id)
- LWLIB_ID id;
+lw_destroy_all_widgets (LWLIB_ID id)
{
widget_info* info = get_widget_info (id, True);
widget_instance* instance;
}
void
-lw_destroy_everything ()
+lw_destroy_everything (void)
{
while (all_widget_info)
lw_destroy_all_widgets (all_widget_info->id);
}
void
-lw_destroy_all_pop_ups ()
+lw_destroy_all_pop_ups (void)
{
widget_info* info;
widget_info* next;
#endif
Widget
-lw_raise_all_pop_up_widgets ()
+lw_raise_all_pop_up_widgets (void)
{
widget_info* info;
widget_instance* instance;
}
void
-lw_pop_up_all_widgets (id)
- LWLIB_ID id;
+lw_pop_up_all_widgets (LWLIB_ID id)
{
lw_pop_all_widgets (id, True);
}
void
-lw_pop_down_all_widgets (id)
- LWLIB_ID id;
+lw_pop_down_all_widgets (LWLIB_ID id)
{
lw_pop_all_widgets (id, False);
}
void
-lw_popup_menu (widget, event)
- Widget widget;
- XEvent *event;
+lw_popup_menu (Widget widget, XEvent *event)
{
#if defined (USE_LUCID)
if (lw_lucid_widget_p (widget))
\f/* get the values back */
static Boolean
-get_one_value (instance, val)
- widget_instance* instance;
- widget_value* val;
+get_one_value (widget_instance *instance, widget_value *val)
{
Widget widget = name_to_widget (instance, val->name);
}
Boolean
-lw_get_some_values (id, val_out)
- LWLIB_ID id;
- widget_value* val_out;
+lw_get_some_values (LWLIB_ID id, widget_value *val_out)
{
widget_info* info = get_widget_info (id, False);
widget_instance* instance;
}
widget_value*
-lw_get_all_values (id)
- LWLIB_ID id;
+lw_get_all_values (LWLIB_ID id)
{
widget_info* info = get_widget_info (id, False);
widget_value* val = info->val;
/* internal function used by the library dependent implementation to get the
widget_value for a given widget in an instance */
widget_value*
-lw_get_widget_value_for_widget (instance, w)
- widget_instance* instance;
- Widget w;
+lw_get_widget_value_for_widget (widget_instance *instance, Widget w)
{
char* name = XtName (w);
widget_value* cur;
modified to update other instances of the widgets. Closure should be the
widget_instance. */
void
-lw_internal_update_other_instances (widget, closure, call_data)
- Widget widget;
- XtPointer closure;
- XtPointer call_data;
+lw_internal_update_other_instances (Widget widget, XtPointer closure, XtPointer call_data)
{
widget_instance* instance = (widget_instance*)closure;
char* name = XtName (widget);
\f/* get the id */
LWLIB_ID
-lw_get_widget_id (w)
- Widget w;
+lw_get_widget_id (Widget w)
{
widget_instance* instance = get_widget_instance (w, False);
\f/* set the keyboard focus */
void
-lw_set_keyboard_focus (parent, w)
- Widget parent;
- Widget w;
+lw_set_keyboard_focus (Widget parent, Widget w)
{
#if defined (USE_MOTIF)
xm_set_keyboard_focus (parent, w);
/* Toolkit independent way of determining if an event window is in the
menubar. */
Boolean
-lw_window_is_in_menubar (win, menubar_widget)
- Window win;
- Widget menubar_widget;
+lw_window_is_in_menubar (Window win, Widget menubar_widget)
{
return menubar_widget
#if defined (USE_LUCID)
/* Motif hack to set the main window areas. */
void
-lw_set_main_areas (parent, menubar, work_area)
- Widget parent;
- Widget menubar;
- Widget work_area;
+lw_set_main_areas (Widget parent, Widget menubar, Widget work_area)
{
#if defined (USE_MOTIF)
xm_set_main_areas (parent, menubar, work_area);
to similar ones that are supported. */
int
-lw_separator_p (label, type, motif_p)
- char *label;
- enum menu_separator *type;
- int motif_p;
+lw_separator_p (char *label, enum menu_separator *type, int motif_p)
{
int separator_p = 0;
};
#undef offset
-static Boolean XlwMenuSetValues();
-static void XlwMenuRealize();
-static void XlwMenuResize();
-static void XlwMenuInitialize();
-static void XlwMenuRedisplay();
-static void XlwMenuDestroy();
-static void XlwMenuClassInitialize();
-static void Start();
-static void Drag();
-static void Down();
-static void Up();
-static void Left();
-static void Right();
-static void Select();
-static void Key();
-static void Nothing();
+static Boolean XlwMenuSetValues(Widget current, Widget request, Widget new);
+static void XlwMenuRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes);
+static void XlwMenuResize(Widget w);
+static void XlwMenuInitialize(Widget request, XlwMenuWidget mw, ArgList args, Cardinal *num_args);
+static void XlwMenuRedisplay(Widget w, XEvent *ev, Region region);
+static void XlwMenuDestroy(Widget w);
+static void XlwMenuClassInitialize(void);
+static void Start(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Drag(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Down(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Up(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Left(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Right(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Select(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Key(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+static void Nothing(Widget w, XEvent *ev, String *params, Cardinal *num_params);
static int separator_height (enum menu_separator);
static void pop_up_menu (XlwMenuWidget, XButtonPressedEvent *);
/* Ungrab pointer and keyboard */
static void
-ungrab_all (w, ungrabtime)
- Widget w;
- Time ungrabtime;
+ungrab_all (Widget w, Time ungrabtime)
{
XtUngrabPointer (w, ungrabtime);
if (GRAB_KEYBOARD) XtUngrabKeyboard (w, ungrabtime);
/* Like abort, but remove grabs from widget W before. */
static void
-abort_gracefully (w)
- Widget w;
+abort_gracefully (Widget w)
{
if (XtIsShell (XtParent (w)))
XtRemoveGrab (w);
}
static void
-push_new_stack (mw, val)
- XlwMenuWidget mw;
- widget_value* val;
+push_new_stack (XlwMenuWidget mw, widget_value *val)
{
if (!mw->menu.new_stack)
{
}
static void
-pop_new_stack_if_no_contents (mw)
- XlwMenuWidget mw;
+pop_new_stack_if_no_contents (XlwMenuWidget mw)
{
if (mw->menu.new_depth > 1)
{
}
static void
-make_old_stack_space (mw, n)
- XlwMenuWidget mw;
- int n;
+make_old_stack_space (XlwMenuWidget mw, int n)
{
if (!mw->menu.old_stack)
{
\f/* Size code */
static int
-string_width (mw, s)
- XlwMenuWidget mw;
- char *s;
+string_width (XlwMenuWidget mw, char *s)
{
XCharStruct xcs;
int drop;
#endif
static int
-arrow_width (mw)
- XlwMenuWidget mw;
+arrow_width (XlwMenuWidget mw)
{
return (MENU_FONT_ASCENT (mw) * 3/4) | 1;
}
/* Return the width of toggle buttons of widget MW. */
static int
-toggle_button_width (mw)
- XlwMenuWidget mw;
+toggle_button_width (XlwMenuWidget mw)
{
return (MENU_FONT_HEIGHT (mw) * 2 / 3) | 1;
}
/* Return the width of radio buttons of widget MW. */
static int
-radio_button_width (mw)
- XlwMenuWidget mw;
+radio_button_width (XlwMenuWidget mw)
{
return toggle_button_width (mw) * 1.41;
}
};
static char*
-resource_widget_value (mw, val)
- XlwMenuWidget mw;
- widget_value *val;
+resource_widget_value (XlwMenuWidget mw, widget_value *val)
{
if (!val->toolkit_data)
{
}
static void
-size_menu (mw, level)
- XlwMenuWidget mw;
- int level;
+size_menu (XlwMenuWidget mw, int level)
{
unsigned int label_width = 0;
int rest_width = 0;
\f/* Display code */
static void
-draw_arrow (mw, window, gc, x, y, width, down_p)
- XlwMenuWidget mw;
- Window window;
- GC gc;
- int x;
- int y;
- int width;
- int down_p;
+draw_arrow (XlwMenuWidget mw, Window window, GC gc, int x, int y, int width, int down_p)
{
Display *dpy = XtDisplay (mw);
GC top_gc = mw->menu.shadow_top_gc;
static void
-draw_shadow_rectangle (mw, window, x, y, width, height, erase_p, down_p)
- XlwMenuWidget mw;
- Window window;
- int x;
- int y;
- int width;
- int height;
- int erase_p;
- int down_p;
+draw_shadow_rectangle (XlwMenuWidget mw, Window window, int x, int y, int width, int height, int erase_p, int down_p)
{
Display *dpy = XtDisplay (mw);
GC top_gc = !erase_p ? mw->menu.shadow_top_gc : mw->menu.background_gc;
static void
-draw_shadow_rhombus (mw, window, x, y, width, height, erase_p, down_p)
- XlwMenuWidget mw;
- Window window;
- int x;
- int y;
- int width;
- int height;
- int erase_p;
- int down_p;
+draw_shadow_rhombus (XlwMenuWidget mw, Window window, int x, int y, int width, int height, int erase_p, int down_p)
{
Display *dpy = XtDisplay (mw);
GC top_gc = !erase_p ? mw->menu.shadow_top_gc : mw->menu.background_gc;
toggle button is selected. */
static void
-draw_toggle (mw, window, x, y, selected_p)
- XlwMenuWidget mw;
- Window window;
- int x, y, selected_p;
+draw_toggle (XlwMenuWidget mw, Window window, int x, int y, int selected_p)
{
int width, height;
toggle button is selected. */
static void
-draw_radio (mw, window, x, y, selected_p)
- XlwMenuWidget mw;
- Window window;
- int x, y, selected_p;
+draw_radio (XlwMenuWidget mw, Window window, int x, int y, int selected_p)
{
int width, height;
separator to draw. TYPE is the separator type. */
static void
-draw_separator (mw, window, x, y, width, type)
- XlwMenuWidget mw;
- Window window;
- int x, y, width;
- enum menu_separator type;
+draw_separator (XlwMenuWidget mw, Window window, int x, int y, int width, enum menu_separator type)
{
Display *dpy = XtDisplay (mw);
XGCValues xgcv;
/* Return the pixel height of menu separator SEPARATOR. */
static int
-separator_height (separator)
- enum menu_separator separator;
+separator_height (enum menu_separator separator)
{
switch (separator)
{
}
static void
-display_menu (mw, level, just_compute_p, highlighted_pos, hit, hit_return)
- XlwMenuWidget mw;
- int level;
- Boolean just_compute_p;
- XPoint* highlighted_pos;
- XPoint* hit;
- widget_value** hit_return;
+display_menu (XlwMenuWidget mw, int level, Boolean just_compute_p, XPoint *highlighted_pos, XPoint *hit, widget_value **hit_return)
{
widget_value* val;
widget_value* following_item;
\f/* Motion code */
static void
-set_new_state (mw, val, level)
- XlwMenuWidget mw;
- widget_value* val;
- int level;
+set_new_state (XlwMenuWidget mw, widget_value *val, int level)
{
int i;
for (i = 0; i < mw->menu.windows_length; ++i)
if (mw->menu.windows [i].w == widget) break;
if (i < mw->menu.windows_length && i < mw->menu.old_depth)
- display_menu (mw, i, False, NULL, NULL, NULL, NULL, NULL);
+ display_menu (mw, i, False, NULL, NULL, NULL);
}
static void
static void
-make_windows_if_needed (mw, n)
- XlwMenuWidget mw;
- int n;
+make_windows_if_needed (XlwMenuWidget mw, int n)
{
int i;
int start_at;
/* Value is non-zero if WINDOW is part of menu bar widget W. */
int
-xlwmenu_window_p (w, window)
- Widget w;
- Window window;
+xlwmenu_window_p (Widget w, Window window)
{
XlwMenuWidget mw = (XlwMenuWidget) w;
int i;
/* Make the window fit in the screen */
static void
-fit_to_screen (mw, ws, previous_ws, horizontal_p)
- XlwMenuWidget mw;
- window_state* ws;
- window_state* previous_ws;
- Boolean horizontal_p;
+fit_to_screen (XlwMenuWidget mw, window_state *ws, window_state *previous_ws, Boolean horizontal_p)
{
unsigned int screen_width = WidthOfScreen (XtScreen (mw));
unsigned int screen_height = HeightOfScreen (XtScreen (mw));
/* Updates old_stack from new_stack and redisplays. */
static void
-remap_menubar (mw)
- XlwMenuWidget mw;
+remap_menubar (XlwMenuWidget mw)
{
int i;
int last_same;
}
static Boolean
-motion_event_is_in_menu (mw, ev, level, relative_pos)
- XlwMenuWidget mw;
- XMotionEvent* ev;
- int level;
- XPoint* relative_pos;
+motion_event_is_in_menu (XlwMenuWidget mw, XMotionEvent *ev, int level, XPoint *relative_pos)
{
window_state* ws = &mw->menu.windows [level];
int shadow = level == 0 ? 0 : mw->menu.shadow_thickness;
}
static Boolean
-map_event_to_widget_value (mw, ev, val, level)
- XlwMenuWidget mw;
- XMotionEvent* ev;
- widget_value** val;
- int* level;
+map_event_to_widget_value (XlwMenuWidget mw, XMotionEvent *ev, widget_value **val, int *level)
{
int i;
XPoint relative_pos;
\f/* Procedures */
static void
-make_drawing_gcs (mw)
- XlwMenuWidget mw;
+make_drawing_gcs (XlwMenuWidget mw)
{
XGCValues xgcv;
float scale;
}
static void
-release_drawing_gcs (mw)
- XlwMenuWidget mw;
+release_drawing_gcs (XlwMenuWidget mw)
{
XtReleaseGC ((Widget) mw, mw->menu.foreground_gc);
XtReleaseGC ((Widget) mw, mw->menu.button_gc);
? ((unsigned long) (x)) : ((unsigned long) (y)))
static void
-make_shadow_gcs (mw)
- XlwMenuWidget mw;
+make_shadow_gcs (XlwMenuWidget mw)
{
XGCValues xgcv;
unsigned long pm = 0;
static void
-release_shadow_gcs (mw)
- XlwMenuWidget mw;
+release_shadow_gcs (XlwMenuWidget mw)
{
Display *dpy = XtDisplay ((Widget) mw);
Screen *screen = XtScreen ((Widget) mw);
#ifdef HAVE_XFT
static int
-openXftFont (mw)
- XlwMenuWidget mw;
+openXftFont (XlwMenuWidget mw)
{
char *fname = mw->menu.faceName;
#endif
static void
-XlwMenuInitialize (request, mw, args, num_args)
- Widget request;
- XlwMenuWidget mw;
- ArgList args;
- Cardinal *num_args;
+XlwMenuInitialize (Widget request, XlwMenuWidget mw, ArgList args, Cardinal *num_args)
{
/* Get the GCs and the widget size */
}
static void
-XlwMenuClassInitialize ()
+XlwMenuClassInitialize (void)
{
xlwmenu_default_font = 0;
}
static void
-XlwMenuRealize (w, valueMask, attributes)
- Widget w;
- Mask *valueMask;
- XSetWindowAttributes *attributes;
+XlwMenuRealize (Widget w, Mask *valueMask, XSetWindowAttributes *attributes)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
XSetWindowAttributes xswa;
receives expose events through Xt. So we repaint all the other panes
when receiving an Expose event. */
static void
-XlwMenuRedisplay (w, ev, region)
- Widget w;
- XEvent* ev;
- Region region;
+XlwMenuRedisplay (Widget w, XEvent *ev, Region region)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
int i;
over a menu item is unmapped. */
void
-xlwmenu_redisplay (w)
- Widget w;
+xlwmenu_redisplay (Widget w)
{
XlwMenuRedisplay (w, NULL, None);
}
static void
-XlwMenuDestroy (w)
- Widget w;
+XlwMenuDestroy (Widget w)
{
int i;
XlwMenuWidget mw = (XlwMenuWidget) w;
#endif
static Boolean
-XlwMenuSetValues (current, request, new)
- Widget current;
- Widget request;
- Widget new;
+XlwMenuSetValues (Widget current, Widget request, Widget new)
{
XlwMenuWidget oldmw = (XlwMenuWidget)current;
XlwMenuWidget newmw = (XlwMenuWidget)new;
}
static void
-XlwMenuResize (w)
- Widget w;
+XlwMenuResize (Widget w)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
\f/* Action procedures */
static void
-handle_single_motion_event (mw, ev)
- XlwMenuWidget mw;
- XMotionEvent* ev;
+handle_single_motion_event (XlwMenuWidget mw, XMotionEvent *ev)
{
widget_value* val;
int level;
}
static void
-handle_motion_event (mw, ev)
- XlwMenuWidget mw;
- XMotionEvent* ev;
+handle_motion_event (XlwMenuWidget mw, XMotionEvent *ev)
{
int x = ev->x_root;
int y = ev->y_root;
}
static void
-Start (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Start (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
}
static void
-Drag (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Drag (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
if (mw->menu.popped_up)
/* Do nothing.
This is how we handle presses and releases of modifier keys. */
static void
-Nothing (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Nothing (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
}
static widget_value *
-find_first_selectable (mw, item, skip_titles)
- XlwMenuWidget mw;
- widget_value *item;
- int skip_titles;
+find_first_selectable (XlwMenuWidget mw, widget_value *item, int skip_titles)
{
widget_value *current = item;
enum menu_separator separator;
}
static widget_value *
-find_next_selectable (mw, item, skip_titles)
- XlwMenuWidget mw;
- widget_value *item;
- int skip_titles;
+find_next_selectable (XlwMenuWidget mw, widget_value *item, int skip_titles)
{
widget_value *current = item;
enum menu_separator separator;
}
static widget_value *
-find_prev_selectable (mw, item, skip_titles)
- XlwMenuWidget mw;
- widget_value *item;
- int skip_titles;
+find_prev_selectable (XlwMenuWidget mw, widget_value *item, int skip_titles)
{
widget_value *current = item;
widget_value *prev = item;
}
static void
-Down (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Down (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget) w;
widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
}
static void
-Up (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Up (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget) w;
widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
}
void
-Left (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Left (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget) w;
widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
}
void
-Right (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Right (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget) w;
widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
/* Handle key press and release events while menu is popped up.
Our action is to get rid of the menu. */
static void
-Key (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Key (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
}
static void
-Select (w, ev, params, num_params)
- Widget w;
- XEvent *ev;
- String *params;
- Cardinal *num_params;
+Select (Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
XlwMenuWidget mw = (XlwMenuWidget)w;
widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1];
\f/* Special code to pop-up a menu */
static void
-pop_up_menu (mw, event)
- XlwMenuWidget mw;
- XButtonPressedEvent* event;
+pop_up_menu (XlwMenuWidget mw, XButtonPressedEvent *event)
{
int x = event->x_root;
int y = event->y_root;