*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> XmGetSecondaryResourceData (3X)              
Title
Content
Arch
Section
 

XmGetSecondaryResourceData(3X)

Contents


NAME    [Toc]    [Back]

       XmGetSecondaryResourceData  -  A  function  that  provides
       access to secondary widget resource data

SYNOPSIS    [Toc]    [Back]

       #include <Xm/Xm.h>

       Cardinal  XmGetSecondaryResourceData  (widget_class,  secondary_data_return)

               WidgetClass widget_class;
               XmSecondaryResourceData **secondary_data_return;

DESCRIPTION    [Toc]    [Back]

       Some  Motif widget classes (such as Gadget, Text, and VendorShell)
 have resources that are not accessible  via  the
       functions    XtGetResourceList    and   XtGetConstraintResourceList.
  To  retrieve  the   descriptions   of   these
       resources, an application must use XmGetSecondaryResourceData.


       When a widget class has such resources, this function provides
  descriptions  of  the resources in one or more data
       structures.  XmGetSecondaryResourceData  takes  a   widget
       class argument and returns the number of these data structures
 associated with the  widget  class.  If  the  return
       value  is greater than 0, the function allocates and fills
       an array of pointers to the corresponding data structures.
       It  returns this array at the address that is the value of
       the secondary_data_return argument.

       The type XmSecondaryResourceData is a pointer to a  structure
  with  two members that are useful to an application:
       resources, of type XtResourceList, and  num_resources,  of
       type  Cardinal. The resources member is a list of the widget
 resources that are not accessible using Xt  functions.
       The  num_resources  member  is the length of the resources
       list. If the return value is  greater  than  0,  XmGetSecondaryResourceData
  allocates  memory that the application
       must free. Use XtFree to free the resource  list  in  each
       structure  (the value of the resources member), the structures
 themselves, and the array of pointers to the  structures
  (the  array  with  address  secondary_data_return).
       Specifies the widget class for  which  secondary  resource
       data  is to be retrieved.  Specifies a pointer to an array
       of XmSecondaryResourceData pointers to be returned by this
       function.  If  the  widget class has no secondary resource
       data (i.e., if the value returned by the function  is  0),
       the  function  returns  no meaningful value for this argument.

RETURN VALUES    [Toc]    [Back]

       Returns the number of secondary resource  data  structures
       associated with this widget class.








EXAMPLES    [Toc]    [Back]

       The  following  example  prints the names of the secondary
       resources of the Text widget and then frees the data allocated
 by the function:

       XmSecondaryResourceData    *    block_array   ;   Cardinal
       num_blocks, i, j  ;  if  (num_blocks  =  XmGetSecondaryResourceData
 (xmTextWidgetClass,
                                                    &block_array))
       {
         for (i = 0; i < num_blocks; i++) {
           for (j = 0 ; j < block_array[i]->num_resources; j++) {
             printf("%s\n",
       block_array[i]->resources[j].resource_name);
           }
           XtFree((char*)block_array[i]->resources);
           XtFree((char*)block_array[i]);
         }
         XtFree((char*)block_array); }




                                   XmGetSecondaryResourceData(3X)
[ Back ]
 Similar pages
Name OS Title
DXmSvnGetSecondaryWorkWidget Tru64 Retrieves (returns) the identifier (widget ID) of the secondary SVN work widget.
SgFinderGetChild IRIX A Finder function used to access a widget component
cached IRIX monitor single bit secondary cache errors.
cvmeter IRIX examine process resource consumption data
XmGetDestination HP-UX A function that returns the widget ID of the widget to be used as the current destination for quick paste and
XmGetDestination IRIX A function that returns the widget ID of the widget to be used as the current destination for quick paste and
XmGetDestination Tru64 A function that returns the widget ID of the widget to be used as the current destination for quick ...
XmMainWindowSep3 HP-UX A MainWindow function that returns the widget ID of the third Separator widget
XmMainWindowSep2 Tru64 A MainWindow function that returns the widget ID of the second Separator widget
XmMainWindowSep2 HP-UX A MainWindow function that returns the widget ID of the second Separator widget
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service