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

  man pages->IRIX man pages -> standard/glresources (3)              
Title
Content
Arch
Section
 

Contents


glresources(3G)						       glresources(3G)


NAME    [Toc]    [Back]

     GLResources -  X resources	used by	GL programs

DESCRIPTION    [Toc]    [Back]

     In	IRIX 4.0 and later, the	GL responds to several X resources, allowing
     run-time control over some	aspects	of GL programs.

     This man page assumes you are somewhat familiar with X resources, if you
     are not, you should read some X documentation such	as Volume 3 of the
     O'Reily X books.

     The GL uses resources names with the prefixes
	  appname.gl.		     (instance prefix)
	  Appname.GL.		     (class prefix)
     where appname and Appname are derived from	the argument to	the GL
     program's first call to winopen(3G) upper case.

     appname may not exactly match the first argument to winopen, because
     appname must follow the rules for legal resource names.  The following
     processing	is done	on all winopen names to	turn them into resource	names:

	  In the instance name (appname), the first character, if it is	a
	  letter, is changed to	be in lower case.

	  In the class name (Appname), the first character, if it is a letter,
	  is changed to	be in upper case.

	  All spaces are removed, alphabetic characters	following space	are
	  changed to upper case.

	  All characters except	0-9, A-Z, "-" (dash) and "_" (underscore) are
	  stripped.

     For example, if the first call to winopen of a gl program was
	  winopen("clock view #123");
     All the resources instance	names for the program would be prefixed	with
     clockView123.gl. and class	names with ClockView123.GL.

WINDOW SPECIFIC	RESOURCES
     The following resources affect only windows whose full resource names
     match resource specification.  That is, it	is possible to specify these
     resources in such a way that only some of the windows of a	GL program are
     affected by these resources.

     All of theses resources are fully specified by the	names listed here,
     preceded by the window resource path name of the window.  That is the
     application prefix	mentioned above, followed by .winName in the instance
     string and	.GLWindow in the class name.

     That is, if the above "clock view"	program	were to	open another window
     with the call
	  winopen("second one");



									Page 1






glresources(3G)						       glresources(3G)



     the winName would be secondOne, and its window specific resources would
     all by fully specified by preceding the names with
     clockView123.gl.secondOne.	and ClockView123.GL.GLWindow.

     Here are the window specific resources.  Each resource has	two names, a
     class name	and an instance	name.  In most cases the class name is the
     same as the instance name except for case.

     geometry
     Geometry  Specifies an initial size and/or	position for the window.  The
	       syntax and interpretation of the	geometry resource is the same
	       as for X	window:	 widthxheight[+-]xpos[+-]ypos.

	       For all the resources controlling size and position, values in
	       the resource file override program specified position (through
	       prefposition(3G)), but not program specified placement (through
	       winposition(3G)).

     position
     Position  Specifies initial size and position of the window, the
	       coordinate system is 0,0	at the lower left hand corner of the
	       screen.	Syntax is:  xpos ypos [	units ]	width height [ units ]
	       .  The units are	optional and are one of	pixels,	inches or mm.
	       If no units are specified, the numbers are assumed to be	in
	       pixels.

     size
     Size      Specifies initial size only.  Syntax is:	width height [ units ]

     origin
     Origin    Specifies initial lower left origin only.  If program doesn't
	       call prefsize(3G), or if	another	resource doesn't specify a
	       size, this resource has no effect.  Syntax is: xpos ypos	[
	       units ]

     pointerShape
     Cursor    Sets the	default	cursor for that	window to the X	font cursor
	       shape with the given name.  This	is the cursor which the	window
	       will show when GL cursor	number 0 is active.  Syntax: cursor
	       name

     pointerColor
     Foreground
	       Sets the	foreground color of the	default	gl cursor.  Syntax:
	       colorname | #RRGGBB

     pointerColorBackground
     Background
	       Sets the	background color of the	default	gl cursor.  Syntax:
	       colorname | #RRGGBB





									Page 2






glresources(3G)						       glresources(3G)


MENU RELATED RESOURCES    [Toc]    [Back]

     These resources control the behavior and appearance of the	popup menus
     displayed by defpup(3G).  Some IRIX 4.0 programs use menus	that look the
     same, but aren't controlled by exactly the	same resources.	 Two examples
     of	programs with similar-looking, but non-GL, menus would be workspace(1)
     and wsh(1).

     menu.overFirst
     Menu.OverFirst
	       If this resource	is specified and is set	to "True" then when
	       the popop menu is first drawn, it will be placed	so that	the
	       first menu item is automatically	selected.  Syntax: False |
	       True

     menu.darkColor
     Menu.Foreground

     menu.mediumColor
     Menu.Background

     menu.lightColor
     Menu.Background
	       The menus are drawn in the overlay planes by using dither
	       patterns	made from three	colors:	 dark, medium, and light.
	       Syntax: colorname | #RRGGBB

     menu.font
     Menu.Font This is the font	used for the body of the menus.	 Syntax:
	       xfontname

     menuTitle.font
     MenuTitle.Font
	       This is the font	used for the title of the menus.  Syntax:
	       xfontname

COMPATIBILITY RELATED RESOURCES    [Toc]    [Back]

     There are a few areas where the GL	behaves	in an incompatible way in IRIX
     4.0.  In order to enable compatible behavior for programs that can't be
     re-compiled, there	are the	following resources.

     glCompat.softAttach
     GLCompat.SoftAttach
	       Under previous window systems, if any keyboard key were held
	       down, a window would keep receiving mouse events, even if the
	       mouse moved out of the window.  This type of input distribution
	       is not supported	as a generally available focus policy in X, so
	       the GL can provide a similar behavior from programs that	ask
	       for it.	If a program calls
		       glcompat(GLC_SOFTATTACH,	TRUE);
	       or if it	has the	softAttach resource set	to true, then holding
	       down any	of the modifier	keys (other than alt) locks the	mouse
	       focus onto that window until all	modifier keys (other than alt)



									Page 3






glresources(3G)						       glresources(3G)



	       are released.  (Modifier	keys other than	alt are	shift and
	       control.)  Syntax: True | False

     glCompat.motionQGrowthRate
     GLCompat.MotionQGrowthRate
	       Prior to	release	4.0 there was an artificial throttle on	the
	       number of mouse events per second that would be delivered to a
	       program.	 This was set at around	15 events per second.  In IRIX
	       4.0 programs can	receive	over 100 mouse events per second.
	       Programs	that do	a lot of processing on each mouse event	can
	       suddenly	find themselves	doing 10 times more work.  This
	       resource	enables	varying	levels of compression of mouse motion.
	       Syntax: compat |	compress, where	compat produces	a rate similar
	       to pre 4.0, and compress	gives maximum compression of motion
	       events.

	       Note: when this resource	is used	to cause libgl to compress
	       motion events, the most recent motion event is never thrown
	       away.  Rather, if a new event arrives at	a rate faster than
	       allowed by the value of this resource, the new event overwrites
	       the former most recent event.  That is, using compression does
	       not in any way prohibit a program from keeping up with the
	       device.

	       This functionality may be accessed from a C program by calling
		   glcompat(GLC_MQUEUERATE, GLC_COMPATRATE);
	       or
		   glcompat(GLC_MQUEUERATE, GLC_CMPRESS);

     glCompat.manageBackground
     GLCompat.ManageBackground
	       If set to True, imakebackround(3G) windows will be managed by
	       the window manager.  The	correct	setting	of this	will vary
	       based on	type of	background program and type of machine and the
	       user's selection	of window managers.  See imakebackground(3G)
	       for more	information.  Syntax: True | False

     glCompat.slowMapcolors
     GLCompat.SlowMapcolors
	       If set to true, then the	default	behavior of mapcolor buffering
	       will be disabled.  See mapcolor(3G) for more details.  Syntax:
	       True | False

     glCompat.inputChangeBug
     GLCompat.InputChangeBug
	       If set to True, the pseudo device INPUTCHANGE retains a bug
	       compatible behavior relating to subwindows.  See	glcompat(3G)
	       for more	information.  Syntax: True | False

     glCompat.noBorderBug





									Page 4






glresources(3G)						       glresources(3G)



     GLCompat.NoBorderBug    [Toc]    [Back]
	       If set to True, then windows which remove their borders with
	       winconstraints(3G) can never get	them back.  See	glcompat(3G)
	       for more	information.  Syntax: True | False

     glCompat.forceCIMap
     GLCompat.ForceCIMap
	       If set to True, then the	color index colormap will also be
	       installed when an RGB window receives colormap focus.  Syntax:
	       True | False

     glCompat.tabletScale
     GLCompat.TabletScale
	       determines how tablet coordinates are scaled when the tablet
	       controls	the pointer (graphics cursor).

	       If the value is 0, there	is a 1-1 mapping between tablet
	       coordinates and screen coordinates, so that on a	typical
	       tablet, only the	lower left quadrant will be mapped to the
	       screen.

	       If the value is 1 (the default),	then "iso" scaling is
	       performed.  That	is, as much of the tablet as possible is
	       mapped to the screen, with the restriction that a 1-1 aspect
	       ratio is	preserved.  (I.e. the same scaling is applied to both
	       x and y.)

	       If the value is 2, then the entire tablet is mapped to the
	       entire screen.  (This is	called "fit" scaling.)

OTHER MISCELLANEOUS RESOURCES    [Toc]    [Back]

     autoFork
     AutoFork  If autoFork is set to False, or if foreground(3G) is called,
	       then the	GL will	not fork when it firsts	calls winopen.
	       Syntax: True | False

     setvalConstrains
     SetvalConstrains
	       When setvaluator(3G) is used for	a device such as MOUSEX	which
	       controls	the cursor, the	vmin and vmax arguments	can cause the
	       cursor to be constrained	to a rectangle which is	less than the
	       full screen.  If	setvalConstrains is set	to False, then
	       setvaluator(3G) will not	constrain the cursor.  The default is
	       True. Syntax: True | False

SOURCES	OF RESOURCES
     The GL mimics Xt's	resource search	rules, and looks for resources in the
     following places:

	  $XFILESEARCHPATH/Appname or /usr/lib/X11/app-defaults/Appname





									Page 5






glresources(3G)						       glresources(3G)



	  $XUSERFILESEARCHPATH/Appname or $XAPPLRESDIR/Appname or
	  $HOME/Appname

	  Server resource database or $HOME/Xdefaults

	  $XENVIRONMENT	or.Xdefaults-hostname

	  Contents of the environment variable GLRES

EXAMPLES    [Toc]    [Back]

     The following program and resource	file show some examples	of how these
     resources can be used to customize	the behavior of	a GL program.

	  /* Begin C Program */
	  #include	  <gl.h>
	  #include	  <device.h>

	  main()
	  {
	      int m;
	      winopen("res test");
	      color(0);	clear();
	      wintitle("Resource Test -- First Window");
	      winopen("2nd window");
	      color(0);	clear();
	      qdevice(RIGHTMOUSE);
	      m	= defpup("Main Menu%t|One|Two|Three");
	      for (;;) {
		  short	val;
		  switch (qread(&val)) {
		  case REDRAW:
		      winset(val);
		      reshapeviewport();
		      color(0);
		      clear();
		      break;
		  case RIGHTMOUSE:
		      if (val) dopup(m);
		      break;
		  }
	      }
	  }
	  /* End C Program */

	  !
	  ! Begin Resource file, put this in $HOME/ResTest
	  !
	  ! Give these windows an interesting cursor
	  resTest*pointerShape:	gumby
	  !
	  ! Make all fonts for this program's menus be large
	  resTest*Font:	-*-times-*-r-*-*-34-*-*-*-*-170-*-*



									Page 6






glresources(3G)						       glresources(3G)



	  !
	  ! Make the first window appear in the	lower left corner,
	  ! and	be 1 inch square
	  resTest.gl.resTest.position: 0 0 pixels 1 1 inches
	  !
	  ! Make the second window appear in the upper right corner
	  resTest.gl.2ndWindow.geometry: 300x300-50+50
	  !
	  ! Keep the program from backgrounding	itself
	  resTest.gl.autoFork: False
	  !
	  ! Note that wildcarding can be used in resource names.
	  ! For	example, the entry for autoFork	could have been	written
	  !  "*gl*autoFork: False" or "*gl.autoFork: False".

SEE ALSO    [Toc]    [Back]

      
      
     glcompat(3G), xrdb(1), Xlib Resource Manager documentation,
     foreground(3G), imakebackground(3G), winopen(3G)


									PPPPaaaaggggeeee 7777
[ Back ]
 Similar pages
Name OS Title
bus_release_resource FreeBSD release resources on a bus
SgTextField IRIX XmText SGI Resources
bus_alloc_resource FreeBSD alloc resources on a bus
SgText IRIX XmText SGI Resources
SgScale IRIX XmScale SGI Resources
alResources IRIX Audio Library resources
alConnect IRIX connect two audio I/O resources
rfork FreeBSD manipulate process resources
listres Tru64 list resources in widgets
windres Linux manipulate Windows resources.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service