comparison lwlib/lwlib-Xm.c @ 78:c7528f8e288d r20-0b34

Import from CVS: tag r20-0b34
author cvs
date Mon, 13 Aug 2007 09:05:42 +0200
parents 131b0175ea99
children 1ce6082ce73f
comparison
equal deleted inserted replaced
77:6cb4f478e7bc 78:c7528f8e288d
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 15 GNU General Public License for more details.
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs; see the file COPYING. If not, write to 18 along with GNU Emacs; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
20 21
21 #include <stdlib.h> 22 #include <stdlib.h>
22 #include <unistd.h> 23 #include <unistd.h>
23 #include <string.h> 24 #include <string.h>
24 #include <stdio.h> 25 #include <stdio.h>
108 109
109 static destroyed_instance* 110 static destroyed_instance*
110 make_destroyed_instance (char* name, char* type, Widget widget, Widget parent, 111 make_destroyed_instance (char* name, char* type, Widget widget, Widget parent,
111 Boolean pop_up_p) 112 Boolean pop_up_p)
112 { 113 {
113 destroyed_instance* instance = 114 destroyed_instance *instance =
114 (destroyed_instance*)malloc (sizeof (destroyed_instance)); 115 (destroyed_instance *) malloc (sizeof (destroyed_instance));
115 instance->name = safe_strdup (name); 116 instance->name = safe_strdup (name);
116 instance->type = safe_strdup (type); 117 instance->type = safe_strdup (type);
117 instance->widget = widget; 118 instance->widget = widget;
118 instance->parent = parent; 119 instance->parent = parent;
119 instance->pop_up_p = pop_up_p; 120 instance->pop_up_p = pop_up_p;
150 resource_string (Widget widget, char *name) 151 resource_string (Widget widget, char *name)
151 { 152 {
152 XtResource resource; 153 XtResource resource;
153 char *result = NULL; 154 char *result = NULL;
154 155
155 resource.resource_name = (String) "labelString"; 156 resource.resource_name = "labelString";
156 resource.resource_class = (String) "LabelString"; /* #### should be Xmsomething... */ 157 resource.resource_class = "LabelString"; /* #### should be Xmsomething... */
157 resource.resource_type = XtRString; 158 resource.resource_type = XtRString;
158 resource.resource_size = sizeof (String); 159 resource.resource_size = sizeof (String);
159 resource.resource_offset = 0; 160 resource.resource_offset = 0;
160 resource.default_type = XtRImmediate; 161 resource.default_type = XtRImmediate;
161 resource.default_addr = 0; 162 resource.default_addr = 0;
1113 } 1114 }
1114 1115
1115 /* invisible seperator button */ 1116 /* invisible seperator button */
1116 ac = 0; 1117 ac = 0;
1117 XtSetArg (al[ac], XmNmappedWhenManaged, FALSE); ac++; 1118 XtSetArg (al[ac], XmNmappedWhenManaged, FALSE); ac++;
1118 children [n_children] = XmCreateLabel (row, (char *) "separator_button", 1119 children [n_children] = XmCreateLabel (row, "separator_button",
1119 al, ac); 1120 al, ac);
1120 DO_DND_KLUDGE (children [n_children]); 1121 DO_DND_KLUDGE (children [n_children]);
1121 n_children++; 1122 n_children++;
1122 1123
1123 for (i = 0; i < right_buttons; i++) 1124 for (i = 0; i < right_buttons; i++)