comparison lwlib/lwlib-Xlw.c @ 5993:5feb28cb62c8

*** empty log message ***
author Fred Pierresteguy <F.Pierresteguy@frcl.bull.fr>
date Fri, 18 Feb 1994 13:24:41 +0000
parents 636065f548d6
children f68004daa523
comparison
equal deleted inserted replaced
5992:c072fed85d62 5993:5feb28cb62c8
69 instance->info->post_activate_cb (w, instance->info->id, widget_arg); 69 instance->info->post_activate_cb (w, instance->info->id, widget_arg);
70 70
71 } 71 }
72 72
73 /* creation functions */ 73 /* creation functions */
74
74 static Widget 75 static Widget
75 xlw_create_menubar (instance) 76 xlw_create_menubar (instance)
76 widget_instance* instance; 77 widget_instance* instance;
77 { 78 {
78 Widget widget; 79 Widget widget;
79 80
80 widget_value *tem = (widget_value *) XtMalloc (sizeof (widget_value)); 81 widget_value *tem = malloc_widget_value ();
81 82
82 /* _XtCreate is freeing the object we passed, 83 /* _XtCreate is freeing the object we passed,
83 so make a copy that we free later. */ 84 so make a copy that we free later. */
84 bcopy (instance->info->val, tem, sizeof (widget_value)); 85 bcopy (instance->info->val, tem, sizeof (widget_value));
85 86
87 XtVaCreateWidget (instance->info->name, xlwMenuWidgetClass, 88 XtVaCreateWidget (instance->info->name, xlwMenuWidgetClass,
88 instance->parent, 89 instance->parent,
89 XtNmenu, tem, 90 XtNmenu, tem,
90 0); 91 0);
91 92
92 XtFree (tem); 93 free_widget_value (tem);
93 94
94 XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance); 95 XtAddCallback (widget, XtNopen, pre_hook, (XtPointer)instance);
95 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); 96 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
96 return widget; 97 return widget;
97 } 98 }
104 XtCreatePopupShell (instance->info->name, overrideShellWidgetClass, 105 XtCreatePopupShell (instance->info->name, overrideShellWidgetClass,
105 instance->parent, NULL, 0); 106 instance->parent, NULL, 0);
106 107
107 Widget widget; 108 Widget widget;
108 109
109 widget_value *tem = (widget_value *) XtMalloc (sizeof (widget_value)); 110 widget_value *tem = malloc_widget_value ();
110 111
111 /* _XtCreate is freeing the object we passed, 112 /* _XtCreate is freeing the object we passed,
112 so make a copy that we free later. */ 113 so make a copy that we free later. */
113 bcopy (instance->info->val, tem, sizeof (widget_value)); 114 bcopy (instance->info->val, tem, sizeof (widget_value));
114 115
117 popup_shell, 118 popup_shell,
118 XtNmenu, tem, 119 XtNmenu, tem,
119 XtNhorizontal, False, 120 XtNhorizontal, False,
120 0); 121 0);
121 122
122 XtFree (tem); 123 free_widget_value (tem);
123 124
124 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); 125 XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
125 126
126 return popup_shell; 127 return popup_shell;
127 } 128 }