home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat1 / xprop.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  15.8 KB  |  463 lines

  1.  
  2.  
  3.  
  4. XPROP(1)                         XPROP(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        xprop - property displayer for X
  9.  
  10. SSYYNNOOPPSSIISS
  11.        xxpprroopp  [-help]  [-grammar]  [-id     _i_d] [-root] [-name _n_a_m_e]
  12.        [-frame]     [-font     _f_o_n_t]    [-display   _d_i_s_p_l_a_y]   [-len   _n]
  13.        [-notype]  [-fs    _f_i_l_e]  [-remove _p_r_o_p_e_r_t_y_-_n_a_m_e] [-spy] [-f
  14.        _a_t_o_m _f_o_r_m_a_t [_d_f_o_r_m_a_t]]* [_f_o_r_m_a_t [_d_f_o_r_m_a_t] _a_t_o_m]*
  15.  
  16. SSUUMMMMAARRYY
  17.        The _x_p_r_o_p utility is for displaying window and font  prop-
  18.        erties  in  an  X  server.  One window or font is selected
  19.        using the command line arguments or possibly in    the  case
  20.        of a window, by clicking on the desired window.    A list of
  21.        properties is then given, possibly with formatting  infor-
  22.        mation.
  23.  
  24. OOPPTTIIOONNSS
  25.        --hheellpp   Print out a summary of command line options.
  26.  
  27.  
  28.        --ggrraammmmaarr
  29.            Print  out a detailed grammar for all command line
  30.            options.
  31.  
  32.  
  33.        --iidd _i_d  This argument allows the user to select window  _i_d
  34.            on  the command line rather than using the pointer
  35.            to select the target window.  This is very  useful
  36.            in  debugging X applications where the target win-
  37.            dow is not mapped to the screen or where     the  use
  38.            of  the    pointer     might be impossible or interfere
  39.            with the application.
  40.  
  41.  
  42.        --nnaammee _n_a_m_e
  43.            This argument allows the user to specify that  the
  44.            window named _n_a_m_e is the target window on the com-
  45.            mand line rather than using the pointer to  select
  46.            the target window.
  47.  
  48.  
  49.        --ffoonntt _f_o_n_t
  50.            This  argument allows the user to specify that the
  51.            properties of font _f_o_n_t should be displayed.
  52.  
  53.  
  54.        --rroooott   This argument specifies that X's     root  window  is
  55.            the  target  window.  This is useful in situations
  56.            where the root window is completely obscured.
  57.  
  58.  
  59.        --ddiissppllaayy _d_i_s_p_l_a_y
  60.            This argument allows you to specify the server  to
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XPROP(1)                         XPROP(1)
  71.  
  72.  
  73.            connect to; see _X_(_1_).
  74.  
  75.  
  76.        --lleenn _n  Specifies  that    at  most  _n bytes of any property
  77.            should be read or displayed.
  78.  
  79.  
  80.        --nnoottyyppee Specifies that the type of  each     property  should
  81.            not be displayed.
  82.  
  83.  
  84.        --ffss _f_i_l_e
  85.            Specifies  that    file  _f_i_l_e  should  be    used as a
  86.            source of more formats for properties.
  87.  
  88.  
  89.        --ffrraammee  Specifies that when selecting  a     window     by  hand
  90.            (i.e.  if none of --nnaammee, --rroooott, or --iidd are given),
  91.            look at the window manager frame (if any)  instead
  92.            of looking for the client window.
  93.  
  94.  
  95.        --rreemmoovvee _p_r_o_p_e_r_t_y_-_n_a_m_e
  96.            Specifies  the  name  of     a property to be removed
  97.            from the indicated window.
  98.  
  99.  
  100.        --ssppyy    Examine window  properties  forever,  looking  for
  101.            property change events.
  102.  
  103.  
  104.        --ff _n_a_m_e _f_o_r_m_a_t [[_d_f_o_r_m_a_t]]
  105.            Specifies  that the _f_o_r_m_a_t for _n_a_m_e should be _f_o_r_-
  106.            _m_a_t and that the _d_f_o_r_m_a_t for _n_a_m_e should be  _d_f_o_r_-
  107.            _m_a_t.   If  _d_f_o_r_m_a_t  is  missing,     "  =  $0+\n"  is
  108.            assumed.
  109.  
  110. DDEESSCCRRIIPPTTIIOONN
  111.        For each of these properties, its value    on  the     selected
  112.        window  or  font     is printed using the supplied formatting
  113.        information if any.  If no formatting information is  sup-
  114.        plied,  internal     defaults are used.  If a property is not
  115.        defined on the selected window or font, "not  defined"  is
  116.        printed    as  the     value for that property.  If no property
  117.        list  is     given,     all  the  properties  possessed  by  the
  118.        selected window or font are printed.
  119.  
  120.        A  window  may be selected in one of four ways.    First, if
  121.        the desired window is the root window, the -root     argument
  122.        may  be    used.  If the desired window is not the root win-
  123.        dow, it may be selected in two ways on the  command  line,
  124.        either  by  id number such as might be obtained from _x_w_i_n_-
  125.        _i_n_f_o, or by name if the window possesses a name.     The  -id
  126.        argument     selects  a window by id number in either decimal
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XPROP(1)                         XPROP(1)
  137.  
  138.  
  139.        or hex (must start  with     0x)  while  the  -name     argument
  140.        selects a window by name.
  141.  
  142.        The  last way to select a window does not involve the com-
  143.        mand line at all.  If none of -font, -id, -name, and -root
  144.        are  specified,    a  crosshairs cursor is displayed and the
  145.        user is allowed to choose any visible window  by     pressing
  146.        any  pointer  button  in     the  desired  window.     If it is
  147.        desired to display properties of a font as  opposed  to    a
  148.        window, the -font argument must be used.
  149.  
  150.        Other than the above four arguments and the -help argument
  151.        for obtaining help, and the -grammar argument for  listing
  152.        the  full grammar for the command line, all the other com-
  153.        mand line arguments are used in specifying both the format
  154.        of the properties to be displayed and how to display them.
  155.        The -len _n argument specifies that at most _n bytes of  any
  156.        given property will be read and displayed.  This is useful
  157.        for example when displaying the cut  buffer  on    the  root
  158.        window  which  could  run to several pages if displayed in
  159.        full.
  160.  
  161.        Normally each property name is displayed by printing first
  162.        the  property name then its type (if it has one) in paren-
  163.        theses followed by its value.  The -notype argument speci-
  164.        fies that property types should not be displayed.  The -fs
  165.        argument is used to specify a file containing  a     list  of
  166.        formats    for  properties     while the -f argument is used to
  167.        specify the format for one property.
  168.  
  169.        The formatting information for a     property  actually  con-
  170.        sists  of  two  parts, a _f_o_r_m_a_t and a _d_f_o_r_m_a_t.  The _f_o_r_m_a_t
  171.        specifies the actual formatting of the property (i.e.,  is
  172.        it  made     up  of     words, bytes, or longs?, etc.) while the
  173.        _d_f_o_r_m_a_t specifies how the property should be displayed.
  174.  
  175.        The following paragraphs describe how to construct _f_o_r_m_a_ts
  176.        and _d_f_o_r_m_a_ts.  However, for the vast majority of users and
  177.        uses, this  should  not    be  necessary  as  the    built  in
  178.        defaults     contain  the  _f_o_r_m_a_ts    and _d_f_o_r_m_a_ts necessary to
  179.        display all the standard properties.  It     should     only  be
  180.        necessary  to  specify _f_o_r_m_a_ts and _d_f_o_r_m_a_ts if a new prop-
  181.        erty is being dealt with or the user dislikes the standard
  182.        display    format.      New  users especially are encouraged to
  183.        skip this part.
  184.  
  185.        A _f_o_r_m_a_t consists of one of 0, 8, 16, or 32 followed by    a
  186.        sequence     of one or more format characters.  The 0, 8, 16,
  187.        or 32 specifies how many bits per field there are  in  the
  188.        property.   Zero     is  a special case meaning use the field
  189.        size information     associated  with  the    property  itself.
  190.        (This  is  only needed for special cases like type INTEGER
  191.        which is actually three different types depending  on  the
  192.        size of the fields of the property)
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XPROP(1)                         XPROP(1)
  203.  
  204.  
  205.        A  value     of  8    means  that the property is a sequence of
  206.        bytes while a value of 16 would mean that the property  is
  207.        a  sequence  of    words.     The difference between these two
  208.        lies in the fact that the sequence of words will     be  byte
  209.        swapped    while the sequence of bytes will not be when read
  210.        by a machine of the opposite byte  order     of  the  machine
  211.        that  originally wrote the property.  For more information
  212.        on how properties are formatted and  stored,  consult  the
  213.        Xlib manual.
  214.  
  215.        Once the size of the fields has been specified, it is nec-
  216.        essary to specify the type of each field (i.e., is  it  an
  217.        integer,     a string, an atom, or what?)  This is done using
  218.        one format character per field.    If there are more  fields
  219.        in  the property than format characters supplied, the last
  220.        character will be repeated as many times as necessary  for
  221.        the extra fields.  The format characters and their meaning
  222.        are as follows:
  223.  
  224.        a      The field holds an atom number.  A  field     of  this
  225.           type should be of size 32.
  226.  
  227.        b      The  field  is  an  boolean.  A 0 means false while
  228.           anything else means true.
  229.  
  230.        c      The field is an unsigned number, a cardinal.
  231.  
  232.        i      The field is a signed integer.
  233.  
  234.        m      The field is a set of bit flags, 1 meaning on.
  235.  
  236.        s      This field and the next ones until either     a  0  or
  237.           the  end    of  the     property represent a sequence of
  238.           bytes.  This format character is only usable with a
  239.           field size of 8 and is most often used to represent
  240.           a string.
  241.  
  242.        x      The field is a hex number (like 'c'  but    displayed
  243.           in  hex - most useful for displaying window ids and
  244.           the like)
  245.  
  246.        An example _f_o_r_m_a_t is 32ica which is the format for a prop-
  247.        erty  of three fields of 32 bits each, the first holding a
  248.        signed integer, the second an unsigned  integer,     and  the
  249.        third an atom.
  250.  
  251.        The  format of a _d_f_o_r_m_a_t unlike that of a _f_o_r_m_a_t is not so
  252.        rigid.  The only limitations on a _d_f_o_r_m_a_t is that one  may
  253.        not start with a letter or a dash.  This is so that it can
  254.        be distinguished from a property name or an  argument.    A
  255.        _d_f_o_r_m_a_t    is  a  text  string containing special characters
  256.        instructing that various     fields     be  printed  at  various
  257.        points  in  a manner similar to the formatting string used
  258.        by printf.  For example, the _d_f_o_r_m_a_t " is ( $0,    $1  \)\n"
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. XPROP(1)                         XPROP(1)
  269.  
  270.  
  271.        would render the POINT 3, -4 which has a _f_o_r_m_a_t of 32ii as
  272.        " is ( 3, -4 )\n".
  273.  
  274.        Any character other than a $, ?, \, or a (  in  a  _d_f_o_r_m_a_t
  275.        prints  as itself.  To print out one of $, ?, \, or ( pre-
  276.        cede it by a \.    For example, to print out a  $,     use  \$.
  277.        Several special backslash sequences are provided as short-
  278.        cuts.  \n will cause a newline to be  displayed    while  \t
  279.        will  cause a tab to be displayed.  \_o where _o is an octal
  280.        number will display character number _o.
  281.  
  282.        A $ followed by a number _n causes field    number    _n  to  be
  283.        displayed.   The     format of the displayed field depends on
  284.        the formatting character used to describe it in the corre-
  285.        sponding     _f_o_r_m_a_t.  I.e., if a cardinal is described by 'c'
  286.        it will print in decimal while if it is described by a 'x'
  287.        it is displayed in hex.
  288.  
  289.        If  the field is not present in the property (this is pos-
  290.        sible with some properties), <field not available> is dis-
  291.        played  instead.      $_n+  will display field number _n then a
  292.        comma then field number _n+1 then another     comma    then  ...
  293.        until  the last field defined.  If field _n is not defined,
  294.        nothing is displayed.  This is useful for a property  that
  295.        is a list of values.
  296.  
  297.        A  ?  is used to start a conditional expression, a kind of
  298.        if-then statement.  ?_e_x_p(_t_e_x_t) will display  _t_e_x_t  if  and
  299.        only if _e_x_p evaluates to non-zero.  This is useful for two
  300.        things.    First, it allows fields to be  displayed  if  and
  301.        only if a flag is set.  And second, it allows a value such
  302.        as a state number to be displayed as a name rather than as
  303.        just a number.  The syntax of _e_x_p is as follows:
  304.  
  305.        _e_x_p    ::= _t_e_r_m | _t_e_r_m=_e_x_p | !_e_x_p
  306.  
  307.        _t_e_r_m   ::= _n | $_n | m_n
  308.  
  309.        The  !  operator is a logical ``not'', changing 0 to 1 and
  310.        any non-zero value to 0.     = is an equality operator.  Note
  311.        that  internally     all  expressions are evaluated as 32 bit
  312.        numbers so -1 is not equal to 65535.  = returns 1  if  the
  313.        two  values are equal and 0 if not.  _n represents the con-
  314.        stant value _n while $_n represents the value of field  num-
  315.        ber _n.  m_n is 1 if flag number _n in the first field having
  316.        format character 'm' in the corresponding _f_o_r_m_a_t is  1,    0
  317.        otherwise.
  318.  
  319.        Examples:  ?m3(count:  $3\n) displays field 3 with a label
  320.        of count if and only if flag number 3 (count starts at 0!)
  321.        is  on.     ?$2=0(True)?!$2=0(False)  displays  the inverted
  322.        value of field 2 as a boolean.
  323.  
  324.        In order to display a property, _x_p_r_o_p needs both a  _f_o_r_m_a_t
  325.  
  326.  
  327.  
  328. X Version 11           Release 6.1                5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. XPROP(1)                         XPROP(1)
  335.  
  336.  
  337.        and  a _d_f_o_r_m_a_t.    Before _x_p_r_o_p uses its default values of a
  338.        _f_o_r_m_a_t of 32x and a _d_f_o_r_m_a_t of " = { $0+ }\n", it searches
  339.        several    places    in  an attempt to find more specific for-
  340.        mats.  First, a search is made using the name of the prop-
  341.        erty.   If  this fails, a search is made using the type of
  342.        the property.  This allows type STRING to be defined  with
  343.        one  set     of formats while allowing property WM_NAME which
  344.        is of type STRING to be defined with a  different  format.
  345.        In  this     way, the display formats for a given type can be
  346.        overridden for specific properties.
  347.  
  348.        The locations searched are in order:  the  format  if  any
  349.        specified  with    the property name (as in 8x WM_NAME), the
  350.        formats defined by -f options in last to first order,  the
  351.        contents     of  the file specified by the -fs option if any,
  352.        the contents of the file specified  by  the  environmental
  353.        variable XPROPFORMATS if any, and finally _x_p_r_o_p's built in
  354.        file of formats.
  355.  
  356.        The format of the files referred to by  the  -fs     argument
  357.        and  the XPROPFORMATS variable is one or more lines of the
  358.        following form:
  359.  
  360.        _n_a_m_e _f_o_r_m_a_t [_d_f_o_r_m_a_t]
  361.  
  362.        Where _n_a_m_e is either the name of a property or the name of
  363.        a  type,     _f_o_r_m_a_t     is  the  _f_o_r_m_a_t to be used with _n_a_m_e and
  364.        _d_f_o_r_m_a_t is the _d_f_o_r_m_a_t to be used with _n_a_m_e.   If  _d_f_o_r_m_a_t
  365.        is not present, " = $0+\n" is assumed.
  366.  
  367. EEXXAAMMPPLLEESS
  368.        To  display  the     name  of  the    root  window: _x_p_r_o_p -root
  369.        WM_NAME
  370.  
  371.        To display the window manager hints for the  clock:  _x_p_r_o_p
  372.        -name xclock WM_HINTS
  373.  
  374.        To  display  the start of the cut buffer: _x_p_r_o_p -root -len
  375.        100 CUT_BUFFER0
  376.  
  377.        To display the point size of the fixed font:  _x_p_r_o_p  -font
  378.        fixed POINT_SIZE
  379.  
  380.        To  display all the properties of window # 0x200007: _x_p_r_o_p
  381.        -id 0x200007
  382.  
  383. EENNVVIIRROONNMMEENNTT
  384.        DDIISSPPLLAAYY To get default display.
  385.  
  386.        XXPPRROOPPFFOORRMMAATTSS
  387.            Specifies the name of a file from which additional
  388.            formats are to be obtained.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. X Version 11           Release 6.1                6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. XPROP(1)                         XPROP(1)
  401.  
  402.  
  403. SSEEEE AALLSSOO
  404.        X(1), xwininfo(1)
  405.  
  406. AAUUTTHHOORR
  407.        Mark Lillibridge, MIT Project Athena
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460. X Version 11           Release 6.1                7
  461.  
  462.  
  463.