Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dmFXMergeResources(3dm) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dmPMGetLocalName(3dm)



dmFXMergeResources(3dm)                                dmFXMergeResources(3dm)



NAME
     dmFXMergeResources - load and merge plugin resources with those of the
     parent application


SYNOPSIS
     #include <dmedia/fxutils.h>

     DMstatus dmFXMergeResources
           ( const char* rf )


PARAMETERS
     rf   The name of the X resource file.


DESCRIPTION
     To support internationalization it is desirable for all user interface
     strings to be defined in locale-specific X resource files.
     dmFXMergeResources is a utility function which plugins may use to merge
     their own X resource files with those of the current application.
     Plugins may use the merged resources to define a locale-specific name
     and, if desired, locale-specific labels for their own user interface
     components.  Even if you only ever intend to support English it may still
     be desirable to use a resource file since it allows simple changes to the
     user interface without any need to recompile.

     Internationalized applications (such as Moviemaker) will search the
     merged resource database for a unique plugin identifier and use the value
     of that resource to replace PK_Name in user-interface components.

     The unique plugin identifier is constructed from the plugin prefix, name
     and type as follows (with any non alpanumeric characters replaced by
     ``_''):

          PK_UniquePrefix ``_'' PK_Name ``_Video_Filter''

          PK_UniquePrefix ``_'' PK_Name ``_Video_Transition''

          PK_UniquePrefix ``_'' PK_Name ``_Audio_Filter''

          PK_UniquePrefix ``_'' PK_Name ``_Other''

     For example, if a video filter has a prefix of ``SGI'' and a name of
     ``Brightness & Contrast'' then the parent application will expect a
     resource line of the form:

     *SGI_Brightness___Contrast_Video_Filter: Brightness and Contrast

     If your plugin has a user interface you may also specifiy localized
     string labels for buttons and dialogs in rf - just be careful to
     sufficiently qualify the resource names so you don't interfere with any



                                                                        Page 1





dmFXMergeResources(3dm)                                dmFXMergeResources(3dm)



     resources which other plugins may specify.  We recommended you use
     PK_UniquePrefix as part of the label for your dialog and specify that
     with every resource.

     dmFXMergeResources should be called in your PRX_PluginProperties
     function.  This guarantees that resources will have been merged before
     the parent application searches the resource database for your localized
     plugin name.

     Plugin resource files should be located in:

     /usr/lib/X11/app-defaults/dmedia/plugins/premiere/rf

     with optional locale-specific versions in:

     /usr/lib/X11/$LANG/app-defaults/dmedia/plugins/premiere/rf

     dmFXMergeResources searches for your resource file using the same rules
     as XtResolvePathname with a file type of ``app-
     defaults/dmedia/plugins/premiere''.

     For assistance in debugging set the plugin property PK_Debugging to True
     and observe messages printed to stderr.

RETURN VALUES
     Returns DM_SUCCESS on success and DM_FAILURE otherwise.


SEE ALSO
     dmPMGetLocalName(3dm), XtResolvePathname(Xt).

























                                                                        Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026