Ejemplo n.º 1
0
void FindVisual () {

  XVisualInfo* pVisualInfo;
  int aAttributes[32];
  int nAttribute = 0;

  CLEAR_ATTRIBUTES();
  SET_ATTRIBUTE_VALUE( GLX_LEVEL, 0 );
  SET_ATTRIBUTE( GLX_RGBA );
  RUN_TEST();

  /* RGB screen. try the test at different phases. */
  SET_ATTRIBUTE_VALUE( GLX_RED_SIZE, 1 );
  SET_ATTRIBUTE_VALUE( GLX_GREEN_SIZE, 1 );
  SET_ATTRIBUTE_VALUE( GLX_BLUE_SIZE, 1 );
  RUN_TEST();

  SET_ATTRIBUTE_VALUE( GLX_ALPHA_SIZE, 1 );
  RUN_TEST();

  SET_ATTRIBUTE_VALUE( GLX_ACCUM_RED_SIZE, 1 );
  SET_ATTRIBUTE_VALUE( GLX_ACCUM_GREEN_SIZE, 1 );
  SET_ATTRIBUTE_VALUE( GLX_ACCUM_BLUE_SIZE, 1 );
  RUN_TEST();

  SET_ATTRIBUTE_VALUE( GLX_ACCUM_ALPHA_SIZE, 1 );
  RUN_TEST();

  /* try with and without double buffer. */
  SET_ATTRIBUTE( GLX_DOUBLEBUFFER );
  RUN_TEST();

  /* try with and without depth buffer. */
  SET_ATTRIBUTE_VALUE( GLX_DEPTH_SIZE, 1 );
  RUN_TEST();

  /* try with and without stencil buffer. */
  SET_ATTRIBUTE_VALUE( GLX_STENCIL_SIZE, 1 );
  RUN_TEST();

#if 0
  /* indexed screen */
  CLEAR_ATTRIBUTES();
  SET_ATTRIBUTE_VALUE( GLX_LEVEL, 0 );
  SET_ATTRIBUTE_VALUE( GLX_BUFFER_SIZE, 1 );
  RUN_TEST();

  /* try with and without double buffer. */
  SET_ATTRIBUTE( GLX_DOUBLEBUFFER );
  RUN_TEST();

  /* try with and without depth buffer. */
  SET_ATTRIBUTE_VALUE( GLX_DEPTH_SIZE, 1 );
  RUN_TEST();

  /* try with and without stencil buffer. */
  SET_ATTRIBUTE_VALUE( GLX_STENCIL_SIZE, 1 );
  RUN_TEST();
#endif
}
Ejemplo n.º 2
0
void *NclLayoutConverter::createRegion( DOMElement* parentElement, void* parent ) {

	bptcf::XMLChHandler *xmlHndl = getXmlHandler();
	bool isValid = true;

	std::string id = xmlHndl->getStr( parentElement->getAttribute( xmlHndl->getXMLCh( "id" ) ) );
	bptnl::LayoutRegion *region = new bptnl::LayoutRegion( id );

	region->setParent( (bptnl::LayoutRegion *) parent );

	SET_ATTRIBUTE( width, isValid );
	SET_ATTRIBUTE( left, isValid );
	SET_ATTRIBUTE( right, isValid );

	SET_ATTRIBUTE( height, isValid );
	SET_ATTRIBUTE( top, isValid );
	SET_ATTRIBUTE( bottom, isValid );

	SET_ATTRIBUTE( zIndex, isValid );
	SET_ATTRIBUTE( title, isValid );

	if (!isValid){
		region = NULL;
	}
	return region;
}
Ejemplo n.º 3
0
/* This function allocates a sequence slot and initializes the parts that are used by the normal
   objects so that a sequence object is not inadvertently used for an operation that is not
   appropriate for a sequence. */
static HASH_OBJECT *
AllocateSequenceSlot(
		     TPM_HANDLE      *newHandle,     // OUT: receives the allocated handle
		     TPM2B_AUTH      *auth           // IN: the authValue for the slot
		     )
{
    HASH_OBJECT      *object = (HASH_OBJECT *)ObjectAllocateSlot(newHandle);
    //
    // Validate that the proper location of the hash state data relative to the
    // object state data. It would be good if this could have been done at compile
    // time but it can't so do it in something that can be removed after debug.
    cAssert(offsetof(HASH_OBJECT, auth) == offsetof(OBJECT, publicArea.authPolicy));
    if(object != NULL)
	{
	    // Set the common values that a sequence object shares with an ordinary object
	    // First, clear all attributes
	    MemorySet(&object->objectAttributes, 0, sizeof(TPMA_OBJECT));
	    // The type is TPM_ALG_NULL
	    object->type = TPM_ALG_NULL;
	    // This has no name algorithm and the name is the Empty Buffer
	    object->nameAlg = TPM_ALG_NULL;
	    // A sequence object is considered to be in the NULL hierarchy so it should
	    // be marked as temporary so that it can't be persisted
	    object->attributes.temporary = SET;
	    // A sequence object is DA exempt.
	    SET_ATTRIBUTE(object->objectAttributes, TPMA_OBJECT, noDA);
	    // Copy the authorization value
	    if(auth != NULL)
		object->auth = *auth;
	    else
		object->auth.t.size = 0;
	}
    return object;
}