12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFT15.6. Looking Up ResourcesTo retrieve a resource from a resource database, use XrmGetResource, XrmQGetResource, orXrmQGetSearchResource.Bool XrmGetResource(database, str_name, str_class, str_type_return, value_return)XrmDatabase database;char *str_name;char *str_class;char **str_type_return;XrmValue *value_return;databasestr_namestr_classSpecifies the database that is to be used.Specifies the fully qualified name of the value being retrieved (as a string).Specifies the fully qualified class of the value being retrieved (as a string).str_type_returnReturns the representation type of the destination (as a string).value_returnReturns the value in the database.Bool XrmQGetResource(database, quark_name, quark_class, quark_type_return, value_return)XrmDatabase database;XrmNameList quark_name;XrmClassList quark_class;XrmRepresentation *quark_type_return;XrmValue *value_return;databasequark_namequark_classSpecifies the database that is to be used.Specifies the fully qualified name of the value being retrieved (as a quark).Specifies the fully qualified class of the value being retrieved (as a quark).quark_type_returnReturns the representation type of the destination (as a quark).value_returnReturns the value in the database.The XrmGetResource and XrmQGetResource functions retrieve a resource from the specifieddatabase. Both take afully qualified name/class pair, adestination resource representation, andthe address of a value (size/address pair). The value and returned type point into database memory;therefore, you must not modify the data.The database only frees or overwrites entries on XrmPutResource, XrmQPutResource, orXrmMergeDatabases. Aclient that is not storing new values into the database or is not mergingthe database should be safe using the address passed back at any time until it exits. If aresourcewas found, both XrmGetResource and XrmQGetResource return True; otherwise, they returnFalse.392

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!