Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dtappbuilder / src / libABobjXm / objxm.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*
24  *      $XConsortium: objxm.h /main/3 1995/11/06 18:43:58 rswiston $
25  *
26  *      @(#)objxm.h     1.73 24 Apr 1995        
27  *
28  *      RESTRICTED CONFIDENTIAL INFORMATION:
29  *
30  *      The information in this document is subject to special
31  *      restrictions in a confidential disclosure agreement between
32  *      HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
33  *      document outside HP, IBM, Sun, USL, SCO, or Univel without
34  *      Sun's specific written approval.  This document and all copies
35  *      and derivative works thereof must be returned or destroyed at
36  *      Sun's request.
37  *
38  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
39  *
40  */
41
42 /*
43  * objxm.h - Handle Motif-specific mechanism for obj structure
44  *
45  */
46 #ifndef _OBJXM_H_
47 #define _OBJXM_H_
48
49 #include <X11/Intrinsic.h>
50 #include <Xm/Xm.h>
51 #include <ab_private/obj.h>
52 #include <ab_private/istr.h>
53
54
55 /* 
56  * Define Flags for Color Args 
57  */
58 #define ObjxmNone       0x00
59 #define ObjxmForeground 0x01
60 #define ObjxmBackground 0x02
61
62 /*
63  * OBJXM Configuration Types
64  * The difference between the 2 types of XmConfiguring is in
65  * how the Obj's Resource ArgLists are constructed:
66  *
67  *      For Build-mode, resource values are converted to the
68  *      correct 'type' for a real "SetValues" or "Create" call.
69  *      (e.g. For XmNbackground, the value is converted to a Pixel)
70  *
71  *      For Codegen-mode, resource values are converted to what
72  *      should be *written-out* in code.
73  *      (e.g. For XmNbackground, the value is the color-name string,
74  *      NOT a Pixel)
75  *      
76  */
77 typedef enum
78 {
79         OBJXM_CONFIG_BUILD,
80         OBJXM_CONFIG_CODEGEN,
81         OBJXM_CONFIG_TYPE_NUM_VALUES /* number of valid values - MUST BE LAST */
82         /* ANSI: no comma after last enum item! */
83 } OBJXM_CONFIG_TYPE;
84
85 /*
86  * Type of "objects" in an XmConfigured hierarchy
87  */
88 typedef enum
89 {
90         /* Required by all XmConfigured objs */
91         AB_CFG_UNDEF = 0,
92         AB_CFG_OBJECT_OBJ,      /* Object SubObj */
93         AB_CFG_LABEL_OBJ,       /* Label SubObj  */
94         AB_CFG_SIZE_OBJ,        /* SubObj responsible for Sizing */
95         AB_CFG_POSITION_OBJ,    /* SubObj responsible for Positioning*/
96         AB_CFG_PARENT_OBJ,      /* SubObj for parenting children */
97         AB_CFG_SELECT_OBJ,      /* SubObj for displaying Select feedback */
98
99         /* Optional for XmConfigured objs */
100         AB_CFG_BORDER_OBJ,      /* SubObj for displaying border */
101         AB_CFG_DND_OBJ,         /* drag from/drop on this object */
102         AB_CFG_HELP_OBJ,        /* where we attach help */
103         AB_CFG_STATUS_OBJ,      /* SubObj for status display */
104         AB_CFG_MENU_PARENT_OBJ, /* SubObj for parenting menus */
105         AB_CFG_SCROLLBAR_OBJ,   /* Scrollbar SubObj */
106         AB_CFG_SCROLLING_OBJ,   /* Scrolling container SubObj */
107         AB_CFG_MENU_OBJ,        /* Menu (reference) SubObj */
108         AB_CFG_WINDOW_BB_OBJ,   /* Dialog internal BulletinBoard SubObj */
109         AB_CFG_WINDOW_PW_OBJ,   /* Window internal PanedWindow SubObj */
110         AB_CFG_WINDOW_MW_OBJ,   /* Window internal MainWindow SubObj */
111         AB_CFG_OBJ_TYPE_NUM_VALUES /* number of valid values - MUST BE LAST */
112 } AB_CFG_OBJ_TYPE;
113
114
115 typedef int     ObjxmFilenameToPixmapFuncRec(
116                         Widget  widget,
117                         STRING  filename,
118                         Pixmap  *pixmap_out
119                 );
120 typedef ObjxmFilenameToPixmapFuncRec *ObjxmFilenameToPixmapFunc;
121
122 typedef int     ObjxmPostInstantiateFuncRec(
123                         ABObj   obj
124                 );
125 typedef ObjxmPostInstantiateFuncRec *ObjxmPostInstantiateFunc;
126
127 /*
128  * define types for Xm-Configure object "methods"
129  */
130 typedef int     (*XmConfigProc) (
131     ABObj       obj
132 );
133
134 typedef int     (*XmUnconfigProc) (
135     ABObj       obj
136 );
137
138 typedef BOOL    (*XmConfigIsaFunc) (
139     ABObj       obj
140 );
141
142 typedef int     (*XmConfigSetArgProc) (
143     ABObj       obj,
144     OBJXM_CONFIG_TYPE ctype
145 );
146
147 typedef int     (*XmConfigPostInstProc) (
148     ABObj       obj,
149     OBJXM_CONFIG_TYPE ctype
150 );
151
152 typedef ABObj   (*XmConfigGetObjProc) (
153     ABObj       obj,
154     AB_CFG_OBJ_TYPE type
155 );
156
157 /*
158  * XmConfigInfo Structure - one for each type of object supported
159  */
160 typedef struct _XM_CONFIG_INFO_REC {
161     /* Methods...*/
162     XmConfigProc         xmconfig;      /* configures obj hierarchy */
163     XmUnconfigProc       xmunconfig;    /* unconfigures obj         */
164     XmConfigGetObjProc   get_config_obj;/* returns config obj       */
165     XmConfigSetArgProc   set_args;      /* sets appropriate resources */
166     XmConfigPostInstProc post_instantiate; /* does any post-instantiation stuff*/
167     XmConfigIsaFunc      is_a_test;     /* "is a" test              */
168 } XM_CONFIG_INFO_REC, XmConfigInfoRec, *XmConfigInfo;
169
170 /*
171  * Xm String Cache Data structures & defines
172  */
173 /*
174  * ABXm XmCreateFunc structure
175  */
176 typedef  Widget (*XmCreateFunc) (
177     Widget   parent,
178     String   name,
179     ArgList  args,
180     Cardinal arg_count
181 );
182
183 /*
184  * Widget Classes
185  */
186 extern char * const _applicationShell;
187 extern char * const _dtComboBox;
188 extern char * const _dtMenuButton;
189 extern char * const _dtSpinBox;
190 extern char * const _dtTerm;
191 extern char * const _group; 
192 extern char * const _topLevelShell;
193 extern char * const _xmArrowButton;
194 extern char * const _xmBulletinBoard;
195 extern char * const _xmCascadeButton;
196 extern char * const _xmCommand;
197 extern char * const _xmDialogShell;
198 extern char * const _xmDrawingArea;
199 extern char * const _xmDrawnButton;
200 extern char * const _xmFileSelectionBox;
201 extern char * const _xmForm;
202 extern char * const _xmFrame;
203 extern char * const _xmLabel;
204 extern char * const _xmLabelGadget;
205 extern char * const _xmList;
206 extern char * const _xmMainWindow;
207 extern char * const _xmManager;
208 extern char * const _xmMenuShell;
209 extern char * const _xmMessageBox;
210 extern char * const _xmPanedWindow;
211 extern char * const _xmPopupMenu;
212 extern char * const _xmPrimitive;
213 extern char * const _xmPulldownMenu;
214 extern char * const _xmPushButton;
215 extern char * const _xmRowColumn;
216 extern char * const _xmScale;
217 extern char * const _xmScrollBar;
218 extern char * const _xmScrolledList;
219 extern char * const _xmScrolledWindow;
220 extern char * const _xmSelectionBox;
221 extern char * const _xmSeparator;
222 extern char * const _xmSeparatorGadget;
223 extern char * const _xmText;
224 extern char * const _xmTextField;
225 extern char * const _xmToggleButton;
226 extern char * const _xmToggleButtonGadget;
227
228 /*
229  * XmConfigure Routines
230  */
231                 /* Function to initialize objxm 
232                  */
233 extern int      objxm_init(
234                     Widget      toplevel
235                 );
236
237
238                 /*
239                  * Hook to add routine to convert filenames to callbacks.
240                  * NULL callback reinstates default conversion method.
241                  */
242 extern int      objxm_set_cvt_filename_to_pixmap_callback(
243                     ObjxmFilenameToPixmapFunc   filename_to_pixmap_cb
244                 );
245
246                 /*
247                  * Hook to add routine to do additional post instantiate
248                  * stuff
249                  * by default, this callback is NULL, so nothing is called
250                  */
251 extern int      objxm_set_post_instantiate_callback(
252                     ObjxmPostInstantiateFunc    post_instantiate_cb
253                 );
254
255
256                 /* Function to register XmConfigInfo 
257                  * for a single object type
258                  */
259 extern void     objxm_register_config_info(
260                     XmConfigInfo cfginfo
261                 );
262
263                 /* Function which XmConfigures an object
264                  * into it's appropriate Composite object
265                  * hierarchy
266                  */
267 extern int      objxm_obj_configure(
268                     ABObj        obj,
269                     OBJXM_CONFIG_TYPE ctype,
270                     BOOL         set_args
271                 );
272  
273                 /* Function which XmConfigures an entire tree
274                  */
275 extern int      objxm_tree_configure(
276                     ABObj       root,
277                     OBJXM_CONFIG_TYPE ctype 
278                 );
279
280                 /* Function which UnConfigures an object
281                  * NOTE: does NOT destroy associated widgets!
282                  */
283 extern int      objxm_obj_unconfigure(
284                     ABObj       obj
285                 );
286
287                 /* Function which UnConfigures an entire tree
288                  * NOTE: does NOT destroy associated widgets! 
289                  */ 
290 extern int      objxm_tree_unconfigure( 
291                     ABObj      root 
292                 ); 
293
294                 /* Function which returns the correct 
295                  * Composite SubObj corresponding to 'type'
296                  */
297 extern ABObj    objxm_comp_get_subobj(
298                     ABObj       obj,
299                     AB_CFG_OBJ_TYPE type
300                 );
301
302                 /* Function which configures an object with the
303                  * the standard labeled-structure (container
304                  * managing Label & Main-object)
305                  */
306 extern int      objxm_comp_config_labeled_obj(
307                     ABObj       obj,
308                     AB_OBJECT_TYPE obj_type,
309                     STRING      obj_suffix,
310                     STRING      obj_classname
311                 );
312
313                 /* Function which collapses a labeled object
314                  * back down into a single Main-object
315                  */
316 extern int      objxm_comp_unconfig_labeled_obj(
317                     ABObj       obj
318                 );
319
320                 /* Function which builds a Menu-reference object
321                  * if "menu_name" is non-NULL
322                  */
323 extern ABObj    objxm_comp_config_menu_ref(
324                     ABObj       obj
325                 );
326  
327                 /* Function which finds & destroys a Menu-reference
328                  * object if one exists
329                  */
330 extern int      objxm_comp_unconfig_menu_ref(
331                     ABObj       obj
332                 );
333
334                 /* Function which makes the RootObj a "Frame" and
335                  * creates a new SubObj directly underneath to
336                  * represent the actual Obj.
337                  */
338 extern ABObj    objxm_comp_config_border_frame(
339                     ABObj       obj
340                 );
341  
342                 /* Function that collapses a Composite Obj configured
343                  * with a Frame as the Root, back down to an Obj
344                  * without a Frame.
345                  */
346 extern int      objxm_comp_unconfig_border_frame(
347                     ABObj       obj
348                 );
349
350 /*
351  * Xm Instantiation/Change/Destruction routines
352  */
353                 /* Instantiate widgets for an entire tree
354                  * NOTE: for instantiating large trees at once
355                  * (like loading BIL or UIL, set "manage_last" to
356                  * TRUE! (if instantiating a single object or small
357                  * group of objects, set it to FALSE).
358                  */
359 extern int      objxm_tree_instantiate(
360                     ABObj    root,
361                     BOOL     manage_last
362                 );
363
364                 /* Destroy Widgets in a tree and set ui_handles=NULL
365                  * NOTE: this does NOT destroy the Objs
366                  */
367 extern int      objxm_tree_uninstantiate(
368                     ABObj       root,
369                     BOOL        top_most
370                 );
371
372                 /* Destroy Widgets AND Objs for an entire tree
373                  */
374 extern int      objxm_tree_destroy(
375                     ABObj       root
376                 );
377
378                 /* Instantiate any changes made to the
379                  * Composite-obj
380                  * Return whether or not New widgets were
381                  * created as a result of the changes
382                  */
383 extern int      objxm_comp_instantiate_changes(
384                     ABObj       obj,
385                     BOOL        *new_widgets
386                 );
387 extern int      objxm_tree_instantiate_changes(
388                     ABObj       obj,
389                     BOOL        *new_widgets
390                 );
391
392 extern int      objxm_comp_set_item_selection(
393                     ABObj       obj
394                 );
395
396 /*
397  * Routines to Temporarily Instantiate/Destroy Menus
398  */
399 extern int      objxm_instantiate_menus(
400                     ABObj       root
401                 );
402
403 extern int      objxm_destroy_menus(
404                     ABObj       root
405                 );
406
407 extern int      objxm_create_popup_menu_title(
408                     ABObj       menu_ref,
409                     OBJXM_CONFIG_TYPE   ctype,
410                     STRING      title
411                 );
412
413 /*
414  * Routines to Store default Translations & Obj pointer
415  * inside widget's userData
416  */
417 extern int      objxm_store_obj_and_actions(
418                     Widget      w,
419                     ABObj       obj
420                 );
421
422 extern int      objxm_free_obj_and_actions(
423                     Widget      w
424                 );
425
426 extern ABObj    objxm_get_obj_from_widget(
427                     Widget      w
428                 );
429
430 extern XtTranslations
431                 objxm_get_actions_from_widget(
432                     Widget      w
433                 );
434
435 /*
436  * Xm Map/Unmap routine
437  */
438 extern int      objxm_tree_map(
439                     ABObj       root,
440                     BOOL        map
441                 );
442
443 /*
444  * Object-specific methods
445  */
446 extern ABObj    objxm_comp_mainwin_get_area(
447                     ABObj               obj,
448                     AB_CONTAINER_TYPE   area_type
449                 );
450
451 extern ABObj    objxm_comp_custdlg_get_area(
452                     ABObj               obj,
453                     AB_CONTAINER_TYPE   area_type
454                 ); 
455
456 /*
457  * Xm Resource-setting routines
458  */
459
460                 /* Set Xm resource lists for entire tree
461                  */
462 extern int      objxm_tree_set_ui_args(
463                     ABObj root, 
464                     OBJXM_CONFIG_TYPE ctype,
465                     BOOL replace
466                 );
467
468                 /* Remove Xm resource lists for entire tree */
469 extern int      objxm_tree_remove_ui_args(
470                     ABObj root, 
471                     OBJXM_CONFIG_TYPE ctype
472                 );
473
474                 /* Set Xm resource list for a Composite object
475                  * hierarchy
476                  */
477 extern int      objxm_comp_set_ui_args(
478                     ABObj    comproot,
479                     OBJXM_CONFIG_TYPE ctype, 
480                     BOOL replace
481                 );
482                 /* Set Xm resources that can only be set AFTER
483                  * ALL WIDGETS have been instantiated
484                  */
485 extern int      objxm_tree_set_post_inst_args(
486                     ABObj       obj,
487                     OBJXM_CONFIG_TYPE   ctype
488                 );
489 extern int      objxm_obj_set_post_inst_args(
490                     ABObj       obj,
491                     OBJXM_CONFIG_TYPE ctype
492                 );
493
494                 /* Set Xm resource list corresponding to
495                  * attachment properties for a Composite object
496                  * hierarchy
497                  */
498 extern int      objxm_comp_set_attachment_args(
499                     ABObj       comproot,
500                     OBJXM_CONFIG_TYPE ctype
501                 );
502
503                 /* Set Xm resource list corresponding to
504                  * attachment properties for a single object
505                  */
506 extern int      objxm_obj_set_attachment_args(
507                     ABObj       obj,
508                     OBJXM_CONFIG_TYPE ctype
509                 );
510
511                 /* Set Xm resource list corresponding to
512                  * color properties for a Composite object
513                  * hierarchy
514                  */
515 extern int      objxm_comp_set_color_args(
516                     ABObj               comproot,
517                     OBJXM_CONFIG_TYPE   ctype,
518                     unsigned int        flag
519                 );
520
521                 /* Set Xm resources for "default button" within a
522                  * dialog's button-panel
523                  */
524 extern int      objxm_comp_set_default_button_args(
525                     ABObj       comproot,
526                     OBJXM_CONFIG_TYPE   ctype
527                 );
528
529                 /* Set the Label type/value resources
530                  * for a Composite object hierarchy
531                  */
532 extern int      objxm_comp_set_label_args(
533                     ABObj       comproot,
534                     OBJXM_CONFIG_TYPE ctype 
535                 );
536
537                 /* Set Xm resource list corresponding to
538                  * label alignment properties for a 
539                  * Composite object hierarchy
540                  */
541 extern int      objxm_comp_set_lbl_align_args(
542                     ABObj       comproot,
543                     OBJXM_CONFIG_TYPE ctype
544                 );
545
546                 /* Set Xm resource list correspondin gto
547                  * label positioning for a Composite object
548                  * hierarchy
549                  */
550 extern int      objxm_comp_set_lbl_pos_args(
551                     ABObj       comproot,
552                     OBJXM_CONFIG_TYPE ctype
553                 );
554 extern int      objxm_comp_set_icon_args(
555                     ABObj       comproot,
556                    OBJXM_CONFIG_TYPE ctype
557                 );
558
559                 /* Set Xm resource list corresponding to
560                  * Border-frame style for a Composite object
561                  * hierarchy
562                  */
563 extern int      objxm_comp_set_border_args(
564                     ABObj       comproot,
565                     OBJXM_CONFIG_TYPE ctype
566                 );
567 extern int      objxm_comp_set_read_only_args(
568                     ABObj       comproot,
569                     OBJXM_CONFIG_TYPE ctype
570                 );
571                 /* Set Xm resource list corresponding to
572                  * the MessageBox object's buttons.
573                  */
574 extern int      objxm_comp_set_msgbox_button_arg(
575                     ABObj               comproot,
576                     OBJXM_CONFIG_TYPE   ctype,
577                     unsigned char       which_btn
578                 );
579
580 extern int      objxm_obj_set_arrow_style_arg( 
581                     ABObj       obj, 
582                     OBJXM_CONFIG_TYPE ctype 
583                 ); 
584 extern int      objxm_obj_set_direction_arg(
585                     ABObj       obj,
586                     OBJXM_CONFIG_TYPE ctype
587                 );
588 extern int      objxm_obj_set_line_style_arg(
589                     ABObj       obj,
590                     OBJXM_CONFIG_TYPE ctype
591                 );
592 extern int      objxm_obj_set_orientation_arg(
593                     ABObj       obj,
594                     OBJXM_CONFIG_TYPE ctype
595                 );
596 extern int      objxm_obj_set_selection_arg(
597                     ABObj       obj,
598                     OBJXM_CONFIG_TYPE ctype
599                 );
600
601 extern Widget   objxm_set_widget(
602                     ABObj       obj,
603                     Widget      widget
604                 );
605
606 extern Widget   objxm_get_widget(
607                     ABObj       obj
608                 );
609
610 extern WidgetClass
611                 objxm_get_class_ptr(
612                     STRING      class_name
613                 );
614
615 /*
616  * Connections stuff
617  */
618 extern ABObj    objxm_comp_get_source_for_when(
619                     ABObj               sourceObj, 
620                     AB_WHEN             when
621                 );
622 extern ABObj    objxm_comp_get_target_for_builtin_action(
623                     ABObj               targetObj, 
624                     AB_BUILTIN_ACTION   builtin_action
625                 );
626 extern STRING   objxm_get_resource_for_when(
627                     ABObj       sourceObj,
628                     AB_WHEN     when
629                 );
630 extern STRING   objxm_get_resource_for_builtin_action(
631                     ABObj               targetObj, 
632                     AB_BUILTIN_ACTION   builtin_action
633                 );
634
635
636                 /* Return number of resource args presently
637                  * set in ArgList
638                  */
639 extern int      objxm_get_num_args(
640                     ArgList     arglist
641                 );
642
643                 /* Return number of resource args presently in object's
644                 *  ui_arg_list
645                 */
646 extern int      objxm_obj_get_num_ui_args(
647                     ABObj       obj
648                 );
649
650                 /* Return default motif widget-class name
651                  * for a given object's type
652                  */
653 extern STRING   objxm_obj_get_default_motif_class(
654                     ABObj    obj
655                 );
656                 /* Return to Motif Create function for
657                  * the Obj
658                  */
659 extern XmCreateFunc
660                 objxm_obj_get_xmcreate_func(
661                     ABObj       obj
662                 );
663
664                 /* Set resource (name/value) in ArgList
665                  */
666 extern int      objxm_set_arg( 
667                     ArgList     *p_arglist,
668                     AB_ARG_TYPE type,
669                     String      name,
670                     XtArgVal    value
671                 );
672                 /* Set a Literal type (name/value) in ArgList
673                  */
674 extern int      objxm_set_literal_arg(
675                     OBJXM_CONFIG_TYPE   ctype,
676                     ArgList             *p_arglist,
677                     String              name,
678                     unsigned char       literal
679                 );
680                 /* Set a Widget type (name/value) in ArgList 
681                  */ 
682 extern int      objxm_set_widget_arg( 
683                     OBJXM_CONFIG_TYPE   ctype, 
684                     ArgList             *p_arglist, 
685                     String              name, 
686                     ABObj               w_obj
687                 ); 
688
689                 /* Set resource (name/value) in ArgList
690                  * only if not already present
691                  */
692 extern int      objxm_set_arg_if_new(
693                     ArgList     *p_arglist,
694                     AB_ARG_TYPE type,
695                     String      name,
696                     XtArgVal    value
697                 );
698  
699                 /* Remove resource (name/value) from ArgList
700                  */
701 extern int      objxm_remove_arg(
702                     ArgList     *p_arglist,   
703                     String      name
704                 );
705  
706                 /* Remove all resources from ArgList
707                  */
708 extern void     objxm_remove_all_args(
709                     ArgList     *p_arglist,
710                     OBJXM_CONFIG_TYPE   ctype    
711                 );
712
713 extern Arg      *objxm_get_arg(
714                     ArgList     arglist,
715                     char        *name
716                 );
717
718                 /* FOR DEBUG PURPOSES ONLY */
719 extern int      objxm_dump_arglist(
720                     ABObj       obj,
721                     ArgList     args,
722                     int         num_args
723                 );
724
725 extern int      objxm_dump_arglist_indented(
726                     ABObj       obj,
727                     ArgList     args,
728                     int         num_args,
729                     int         spaces
730                 );
731                 /* FOR DEBUG PURPOSES ONLY */
732 extern int      objxm_dump_widget_geometry(
733                     Widget      widget
734                 );
735
736
737 /*
738  * Xm String cache routines
739  */
740                 /* Load internal resource tables with 
741                  * required Xt/Xm resources/enums/createfuncs
742                  */
743 extern void     objxm_strs_init(
744                 );
745
746                 /* return "strname" corresponding to xmname 
747                  */
748 extern ISTRING  objxm_get_res_strname(
749                     String    xmname
750                 );
751  
752                 /* return "xmname" corresponding to strname 
753                  */
754 extern String   objxm_get_res_xmname(
755                     ISTRING    strname
756                 );
757                 /* return type corresponding to resource strname 
758                  */
759 extern AB_ARG_TYPE objxm_get_istr_res_type(
760                     ISTRING    strname
761                 );
762                 /* return type corresponding to resource xmname 
763                  */
764 extern AB_ARG_TYPE objxm_get_res_type(
765                     String      xmname
766                 );
767
768                 /* return arg class corresponding to resource strname 
769                  */
770 extern AB_ARG_CLASS objxm_get_istr_res_class(
771                     ISTRING    strname
772                 );
773                 /* return arg class corresponding to resource xmname 
774                  */
775 extern AB_ARG_CLASS objxm_get_res_class(
776                     String      xmname
777                 );
778                 /* return whether or not the value is defined as the
779                  * "default" for that resource
780                  */
781 extern BOOL     objxm_res_value_is_default(
782                     String      xmname,
783                     WidgetClass wclass,
784                     XtArgVal    value
785                 );
786
787                 /* return "strdef" corresponding to xmdef 
788                  */
789 extern ISTRING  objxm_get_enum_strdef(
790                     String        xmname,
791                     unsigned char xmdef
792                 );
793  
794                 /* return "xmdef" corresponding to strdef 
795                  */
796 extern unsigned char
797                 objxm_get_enum_xmdef(
798                     String      xmname,
799                     ISTRING     strdef
800                 );
801                 /* return "ftnstr" corresponding to ftn 
802                  */
803 extern ISTRING  objxm_get_xmcreate_ftnstr(
804                     XmCreateFunc    ftn
805                 );
806  
807                 /* return "ftn" corresponding to ftnstr 
808                  */
809 XmCreateFunc    objxm_get_xmcreate_xmdef(
810                     ISTRING ftnstr
811                 );
812  
813
814 /*
815  * Xm Utility routines
816  */
817
818 extern BOOL     objxm_color_exists(
819                     String      colorname
820                 );
821
822 extern int      objxm_name_to_pixel(
823                     Widget      widget,
824                     String      colorname,
825                     Pixel       *pixel_p
826                 );
827
828 extern int      objxm_filebase_to_pixmap(
829                     Widget      widget,
830                     String      filebase,
831                     Pixmap      *pixmap_p
832                 );
833
834 extern STRING   objxm_pixmap_conversion_error_msg(
835                     ABObj       obj,
836                     STRING      filebase,
837                     int         status
838                 );
839
840 extern XFontStruct *
841                 objxm_fontlist_to_font(
842                     XmFontList  fontlist
843                 );
844
845 extern XmString objxm_str_to_xmstr(
846                     Widget      widget,
847                     String      string
848                 );
849
850 extern STRING   objxm_xmstr_to_str(
851                     XmString    xmstr
852                 );
853
854 extern String   objxm_accel_to_acceltext(
855                     String      accelstr
856                 );
857
858
859 extern unsigned char
860                 objxm_linestyle_to_enum(
861                     AB_LINE_TYPE        linestyle
862                 );
863
864 extern BOOL     objxm_is_menu_widget(
865                     Widget      widget
866                 );
867
868
869 /*
870  * Debugging functions
871  */
872 int             objxm_print(ABObj obj);
873 int             objxm_print_indented(ABObj obj, int spaces, int verbosity);
874 int             objxm_tree_print(ABObj obj);
875 int             objxm_tree_print_indented(ABObj obj, int spaces, int verbosity);
876
877
878 /*
879  * Xm Resource Setting macros
880  */
881 #define         objxm_obj_set_ui_arg(obj, type, name, val) \
882                         objxm_set_arg((ArgList*)&((obj)->ui_args), type, name, (XtArgVal)val)
883
884 #define         objxm_obj_set_literal_ui_arg(obj, ctype, name, enum) \
885                         objxm_set_literal_arg(ctype, (ArgList*)&((obj)->ui_args), name, enum) 
886
887 #define         objxm_obj_set_widget_ui_arg(obj, ctype, name, w_obj) \
888                         objxm_set_widget_arg(ctype, (ArgList*)&((obj)->ui_args), name, w_obj) 
889
890 #define         objxm_obj_remove_ui_arg(obj, name) \
891                         objxm_remove_arg((ArgList*)&((obj)->ui_args), name)
892
893 #define         objxm_obj_remove_all_ui_args(obj, t) objxm_remove_all_args((ArgList*)&((obj)->ui_args), t)
894
895 #define         objxm_obj_get_ui_args(obj) ((ArgList)((obj)->ui_args))
896
897 #define         objxm_obj_get_num_ui_args(obj) \
898                     (objxm_get_num_args(objxm_obj_get_ui_args(obj)))
899
900 #define         objxm_obj_get_ui_arg(obj,name) \
901                     (objxm_get_arg(objxm_obj_get_ui_args(obj),(name)))
902
903
904 /*************************************************************************
905  **                                                                     **
906  **             INLINE IMPLEMENTATION                                   **
907  **                                                                     **
908  *************************************************************************/
909
910 #define objxm_set_widget(obj,w) ((obj)->ui_handle = ((void *)(w)))
911 #define objxm_get_widget(obj)   ((Widget)((obj)->ui_handle))
912
913 #endif /* _OBJXM_H_ */