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 DRAFTtypedef enum {XrmoptionNoArg, /* Value is specified in XrmOptionDescRec.value */XrmoptionIsArg, /* Value is the option string itself */XrmoptionStickyArg, /* Value is characters immediately following option */XrmoptionSepArg, /* Value is next argument in argv */XrmoptionResArg, /* Resource and value in next argument in argv */XrmoptionSkipArg, /* Ignore this option and the next argument in argv */XrmoptionSkipLine, /* Ignore this option and the rest of argv */XrmoptionSkipNArgs /* Ignore this option and the nextXrmOptionDescRec.value arguments in argv */}XrmOptionKind;Note that XrmoptionSkipArg is equivalent to XrmoptionSkipNArgs with the XrmOptionDescRec.valuefield containing the value one. Note also that the value zero for XrmoptionSkip-NArgs indicates that only the option itself is to be skipped.typedef struct {char *option; /* Option specification string in argv */char *specifier; /* Binding and resource name (sans application name) */XrmOptionKind argKind; /* Which style of option it is */XPointer value;/* Value to provide if XrmoptionNoArg orXrmoptionSkipNArgs */}XrmOptionDescRec, *XrmOptionDescList;To load a resource database from a C command line, use XrmParseCommand.void XrmParseCommand (database, table, table_count, name, argc_in_out, argv_in_out)XrmDatabase *database;XrmOptionDescList table;int table_count;char *name;int *argc_in_out;char **argv_in_out;databasetabletable_countnameargc_in_outargv_in_outSpecifies the resource database.Specifies the table of command line arguments to be parsed.Specifies the number of entries in the table.Specifies the application name.Specifies the number of arguments and returns the number of remaining arguments.Specifies the command line arguments and returns the remaining arguments.The XrmParseCommand function parses an (argc, argv) pair according to the specified optiontable, loads recognized options into the specified database with type ‘‘String,’’ and modifies the(argc, argv) pair to remove all recognized options. If database contains NULL,398

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

Saved successfully!

Ooh no, something went wrong!