[comp.windows.x] Any way to access app->rv ?

marbru@auto-trol.UUCP (Martin Brunecky) (10/17/90)

Xt Intrinsics "application context" contains a field app->rv (reverse video),
initialized at the application startup.

To get to this field in Motif's R3 Intrinsics, I am forced to include
the whole suite of ...I.h header files.

Is there any better way to find out, in particular in R4 or R5(?), what
this value is ?
I need this value inside the StringToPixel convertor, as I have to reload
the default one to be able to keep track of color cell allocation counts
[Bob Scheifler explained that the server should keep reference counts,
 but none of the servers I'v got around does, so I have to do it myself
 to prevent application from freeing a color allocated by the converter]

-- 
=*= Opinions presented here are solely of my own and not those of Auto-trol =*=
Martin Brunecky [BORN TO BASH UIL]                  marbru@auto-trol.COM
(303) 252-2499                                 {...}ncar!ico!auto-trol!marbru
Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404 

jsparkes@bwdls49.bnr.ca (Jeff Sparkes) (10/17/90)

In <886@auto-trol.UUCP> marbru@auto-trol.UUCP (Martin Brunecky) writes:
>I need this value inside the StringToPixel convertor, as I have to reload
>the default one to be able to keep track of color cell allocation counts

Just put it into the args for the converter.   See the example in section
9.6.2 of the Intrinsics manual.
--
Jeff Sparkes		jsparkes@bnr.ca
Another feature is that the seats float, so that the airline can recover
them if the plane crashes into the ocean. -- Dave Barry

marbru@auto-trol.UUCP (Martin Brunecky) (10/18/90)

In article <jsparkes.656169877@bwdls49> jsparkes@bwdls49.bnr.ca (Jeff Sparkes) writes:
>In <886@auto-trol.UUCP> marbru@auto-trol.UUCP (Martin Brunecky) writes:
>>I need this value inside the StringToPixel convertor, as I have to reload
>>the default one to be able to keep track of color cell allocation counts
>
>Just put it into the args for the converter.   See the example in section
>9.6.2 of the Intrinsics manual.

  How ??? Arguments can only use one of 5 address modes, referencing either
  widget instance field, constant or resources.
  Here I am talking about a field in application context, i.e. the
  dereferncing goes from display -> application context -> rv.
  All that is defined in xxxxxI.h files, which, for example, are not
  provided by DEC.

-- 
=*= Opinions presented here are solely of my own and not those of Auto-trol =*=
Martin Brunecky [BORN TO BASH UIL]                  marbru@auto-trol.COM
(303) 252-2499                                 {...}ncar!ico!auto-trol!marbru
Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404 

jsparkes@bwdls49.bnr.ca (Jeff Sparkes) (10/19/90)

In <890@auto-trol.UUCP> marbru@auto-trol.UUCP (Martin Brunecky) writes:

>In article <jsparkes.656169877@bwdls49> jsparkes@bwdls49.bnr.ca (Jeff Sparkes) writes:
>>In <886@auto-trol.UUCP> marbru@auto-trol.UUCP (Martin Brunecky) writes:
>>>I need this value inside the StringToPixel convertor, as I have to reload
>>>the default one to be able to keep track of color cell allocation counts
>>
>>Just put it into the args for the converter.   See the example in section
>>9.6.2 of the Intrinsics manual.

>  How ??? Arguments can only use one of 5 address modes, referencing either
>  widget instance field, constant or resources.
>  Here I am talking about a field in application context, i.e. the
>  dereferncing goes from display -> application context -> rv.
>  All that is defined in xxxxxI.h files, which, for example, are not
>  provided by DEC.

I sort of answered this sideways.  I didn't find a way to use app->rv.
It is set from the *reverseVideo resource, so just get the value of that
and pass it to your converter.  According to R4 includes you can pass the
address of a static Boolean variable:

typedef enum {
/* address mode		parameter representation    */
/* ------------		------------------------    */
    XtAddress,		/* address		    */
    XtBaseOffset,	/* offset		    */
    XtImmediate,	/* constant		    */
    XtResourceString,	/* resource name string	    */
    XtResourceQuark,	/* resource name quark	    */
    XtWidgetBaseOffset,	/* offset from ancestor	    */
    XtProcedureArg	/* procedure to invoke	    */
} XtAddressMode;
--
Jeff Sparkes		jsparkes@bnr.ca
Another feature is that the seats float, so that the airline can recover
them if the plane crashes into the ocean. -- Dave Barry