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

  1.  
  2.  
  3.  
  4. XGetFeedbackControl(3X11)  X FUNCTIONS    XGetFeedbackControl(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGetFeedbackControl,  XChangeFeedbackControl  -    query and
  9.        change input device feedbacks
  10.  
  11. SSYYNNTTAAXX
  12.        XFeedbackState  *   XGetFeedbackControl(_d_i_s_p_l_a_y,      _d_e_v_i_c_e,
  13.        _n_u_m___f_e_e_d_b_a_c_k_s)
  14.          Display *_d_i_s_p_l_a_y;
  15.          XDevice *_d_e_v_i_c_e;
  16.          int *_n_u_m___f_e_e_d_b_a_c_k_s;
  17.  
  18.        int XChangeFeedbackControl(_d_i_s_p_l_a_y, _d_e_v_i_c_e, _m_a_s_k, _c_o_n_t_r_o_l)
  19.          Display *_d_i_s_p_l_a_y;
  20.          XDevice *_d_e_v_i_c_e;
  21.          Mask _m_a_s_k;
  22.          XFeedbackControl *_c_o_n_t_r_o_l;
  23.  
  24. AARRGGUUMMEENNTTSS
  25.        _d_i_s_p_l_a_y          Specifies the connection to the X server.
  26.  
  27.        _d_e_v_i_c_e          Specifies the device whose feedbacks are to
  28.               be queried or modified.
  29.  
  30.        _n_u_m___f_e_e_d_b_a_c_k_s  Specifies     an address into which the number
  31.               of feedbacks supported by the device is  to
  32.               be returned.
  33.  
  34.        _m_a_s_k          Specifies     a  mask specific to each type of
  35.               feedback that describes how the feedback is
  36.               to be modified.
  37.  
  38.        _c_o_n_t_r_o_l          Specifies     the  address of an _X_F_e_e_d_b_a_c_k_C_o_n_-
  39.               _t_r_o_l structure that contains the new values
  40.               for the feedback.
  41.  
  42. DDEESSCCRRIIPPTTIIOONN
  43.        These  requests    are  provided  to  manipulate those input
  44.        devices that support feedbacks.    A _B_a_d_M_a_t_c_h error will  be
  45.        generated  if  the requested device does not support feed-
  46.        backs.  Whether or not a given device  supports    feedbacks
  47.        can be determined by examining the information returned by
  48.        the _X_O_p_e_n_D_e_v_i_c_e request.     For those devices  that  support
  49.        feedbacks,  _X_O_p_e_n_D_e_v_i_c_e    will  return  an  _X_I_n_p_u_t_C_l_a_s_s_I_n_f_o
  50.        structure with the input_class field equal to the constant
  51.        _F_e_e_d_b_a_c_k_C_l_a_s_s (defined in the file _X_I_._h).
  52.  
  53.        The  _X_G_e_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l     request  returns  a pointer to a
  54.        list of _X_F_e_e_d_b_a_c_k_S_t_a_t_e structures.  Each item in this list
  55.        describes  one  of  the feedbacks supported by the device.
  56.        The items are variable length, so each contains its length
  57.        to allow traversal to the next item in the list.
  58.  
  59.        The feedback classes that are currently defined are:  _K_b_d_-
  60.        _F_e_e_d_b_a_c_k_C_l_a_s_s,    _P_t_r_F_e_e_d_b_a_c_k_C_l_a_s_s,    _S_t_r_i_n_g_F_e_e_d_b_a_c_k_C_l_a_s_s,
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGetFeedbackControl(3X11)  X FUNCTIONS    XGetFeedbackControl(3X11)
  71.  
  72.  
  73.        _I_n_t_e_g_e_r_F_e_e_d_b_a_c_k_C_l_a_s_s,  _L_e_d_F_e_e_d_b_a_c_k_C_l_a_s_s, and _B_e_l_l_F_e_e_d_b_a_c_k_-
  74.        _C_l_a_s_s.  These constants are defined in the file _X_I_._h.   An
  75.        input device may support zero or more classes of feedback,
  76.        and may support multiple     feedbacks  of    the  same  class.
  77.        Each  feedback  contains a class identifier and an id that
  78.        is unique within that class for that input device.  The id
  79.        is  used     to identify the feedback when making an _X_C_h_a_n_g_e_-
  80.        _F_e_e_d_b_a_c_k_C_o_n_t_r_o_l request.
  81.  
  82.        _X_G_e_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l can generate a _B_a_d_D_e_v_i_c_e  or     _B_a_d_M_a_t_c_h
  83.        error.
  84.  
  85.        The  _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l request modifies the values of
  86.        one feedback on the specified  device.    The  feedback  is
  87.        identified  by the id field of the _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l struc-
  88.        ture that is passed with the request.  The fields  of  the
  89.        feedback     that  are  to    be modified are identified by the
  90.        bits of the mask that is passed with the request.
  91.  
  92.        _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l can generate a _B_a_d_D_e_v_i_c_e, _B_a_d_M_a_t_c_h,
  93.        or _B_a_d_V_a_l_u_e  error.
  94.  
  95. SSTTRRUUCCTTUURREESS
  96.        Each  class  of    feedback is described by a structure spe-
  97.        cific to that class.  These structures are defined in  the
  98.        file  _X_I_n_p_u_t_._h.     _X_F_e_e_d_b_a_c_k_S_t_a_t_e     and _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l are
  99.        generic structures that contain three fields that  are  at
  100.        the beginning of each class of feedback:
  101.  
  102.        typedef struct {
  103.         XID class;
  104.         int length;
  105.         XID id;
  106.        } XFeedbackState, XFeedbackControl;
  107.  
  108.        The  _X_K_b_d_F_e_e_d_b_a_c_k_S_t_a_t_e  structure  defines  the attributes
  109.        that are returned for feedbacks equivalent to those on the
  110.        X keyboard.
  111.  
  112.        typedef struct {
  113.         XID        class;
  114.         int        length;
  115.         XID        id;
  116.         int        click;
  117.         int        percent;
  118.         int        pitch;
  119.         int        duration;
  120.         int        led_mask;
  121.         int        global_auto_repeat;
  122.         char    auto_repeats[32];
  123.        } XKbdFeedbackState;
  124.  
  125.        The  _X_P_t_r_F_e_e_d_b_a_c_k_S_t_a_t_e  structure  defines  the attributes
  126.        that are returned for feedbacks equivalent to those on the
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGetFeedbackControl(3X11)  X FUNCTIONS    XGetFeedbackControl(3X11)
  137.  
  138.  
  139.        the X pointer.
  140.  
  141.        typedef struct {
  142.         XID        class;
  143.         int        length;
  144.         XID        id;
  145.         int        accelNum;
  146.         int        accelDenom;
  147.         int        threshold;
  148.        } XPtrFeedbackState;
  149.  
  150.        The  _X_I_n_t_e_g_e_r_F_e_e_d_b_a_c_k_S_t_a_t_e  structure  defines  attributes
  151.        that are returned for integer feedbacks.
  152.  
  153.        typedef struct {
  154.         XID        class;
  155.         int        length;
  156.         XID        id;
  157.         int        resolution;
  158.         int        minVal;
  159.         int        maxVal;
  160.        } XIntegerFeedbackState;
  161.  
  162.        The _X_S_t_r_i_n_g_F_e_e_d_b_a_c_k_S_t_a_t_e structure defines the  attributes
  163.        that are returned for string feedbacks.
  164.  
  165.        typedef struct {
  166.         XID        class;
  167.         int        length;
  168.         XID        id;
  169.         int        max_symbols;
  170.         int        num_syms_supported;
  171.         KeySym  *syms_supported;
  172.        } XStringFeedbackState;
  173.  
  174.        The  _X_B_e_l_l_F_e_e_d_b_a_c_k_S_t_a_t_e    structure  defines the attributes
  175.        that are returned for bell feedbacks.
  176.  
  177.        typedef struct {
  178.         XID        class;
  179.         int        length;
  180.         XID        id;
  181.         int        percent;
  182.         int        pitch;
  183.         int        duration;
  184.        } XBellFeedbackState;
  185.  
  186.        The _X_L_e_d_F_e_e_d_b_a_c_k_S_t_a_t_e  structure     defines  the  attributes
  187.        that are returned for LED feedbacks.
  188.  
  189.        typedef struct {
  190.         XID        class;
  191.         int        length;
  192.         XID        id;
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XGetFeedbackControl(3X11)  X FUNCTIONS    XGetFeedbackControl(3X11)
  203.  
  204.  
  205.         int        led_values;
  206.        } XLedFeedbackState;
  207.  
  208.        The  _X_P_r_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l     structure defines the attributes
  209.        that can be controlled for pointer feedbacks.
  210.  
  211.        typedef struct {
  212.         XID        class;
  213.         int        length;
  214.         XID        id;
  215.         int        accelNum;
  216.         int        accelDenom;
  217.         int        threshold;
  218.        } XPtrFeedbackControl;
  219.  
  220.        The _X_K_b_d_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines  the  attributes
  221.        that can be controlled for keyboard feedbacks.
  222.  
  223.        typedef struct {
  224.         XID        class;
  225.         int        length;
  226.         XID        id;
  227.         int        click;
  228.         int        percent;
  229.         int        pitch;
  230.         int        duration;
  231.         int        led_mask;
  232.         int        led_value;
  233.         int        key;
  234.         int        auto_repeat_mode;
  235.        } XKbdFeedbackControl;
  236.  
  237.        The    _X_S_t_r_i_n_g_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l    structure   defines   the
  238.        attributes that can be controlled for string feedbacks.
  239.  
  240.        typedef struct {
  241.         XID        class;
  242.         int        length;
  243.         XID        id;
  244.         int        num_keysyms;
  245.         KeySym  *syms_to_display;
  246.        } XStringFeedbackControl;
  247.  
  248.        The   _X_I_n_t_e_g_e_r_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l   structure   defines    the
  249.        attributes that can be controlled for integer feedbacks.
  250.  
  251.        typedef struct {
  252.         XID        class;
  253.         int        length;
  254.         XID        id;
  255.         int        int_to_display;
  256.        } XIntegerFeedbackControl;
  257.  
  258.        The  _X_B_e_l_l_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines the attributes
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. XGetFeedbackControl(3X11)  X FUNCTIONS    XGetFeedbackControl(3X11)
  269.  
  270.  
  271.        that can be controlled for bell feedbacks.
  272.  
  273.        typedef struct {
  274.         XID        class;
  275.         int        length;
  276.         XID        id;
  277.         int        percent;
  278.         int        pitch;
  279.         int        duration;
  280.        } XBellFeedbackControl;
  281.  
  282.        The _X_L_e_d_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l structure defines  the  attributes
  283.        that can be controlled for LED feedbacks.
  284.  
  285.        typedef struct {
  286.         XID        class;
  287.         int        length;
  288.         XID        id;
  289.         int        led_mask;
  290.         int        led_values;
  291.        } XLedFeedbackControl;
  292.  
  293. DDIIAAGGNNOOSSTTIICCSS
  294.        _B_a_d_D_e_v_i_c_e   An  invalid    device was specified.  The speci-
  295.            fied device does not exist  or  has    not  been
  296.            opened  by  this  client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  297.            This error may also occur if some other client
  298.            has    caused the specified device to become the
  299.            X  keyboard    or  X  pointer    device    via   the
  300.            _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_D_e_v_i_c_e  or _X_C_h_a_n_g_e_P_o_i_n_t_e_r_D_e_v_i_c_e
  301.            requests.
  302.  
  303.        _B_a_d_M_a_t_c_h       This error may occur if an _X_G_e_t_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  304.            request  was made specifying a device that has
  305.            no  feedbacks,  or  an  _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  306.            request  was     made  with  an     _X_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  307.            structure that contains  an    invalid     feedback
  308.            type.   It may also occur if an invalid combi-
  309.            nation of mask bits is specified (_D_v_K_e_y but no
  310.            _D_v_A_u_t_o_R_e_p_e_a_t_M_o_d_e  for  keyboard feedbacks), or
  311.            if an invalid KeySym is specified for a string
  312.            feedback.
  313.  
  314.        _B_a_d_V_a_l_u_e       Some     numeric value falls outside the range of
  315.            values accepted by the  _X_C_h_a_n_g_e_F_e_e_d_b_a_c_k_C_o_n_t_r_o_l
  316.            request.  Unless a specific range is specified
  317.            for an argument, the full range defined by the
  318.            argument's  type  is     accepted.   Any argument
  319.            defined as a set of alternatives can     generate
  320.            this error.
  321.  
  322. SSEEEE AALLSSOO
  323.        _P_r_o_g_r_a_m_m_i_n_g _W_i_t_h _X_l_i_b
  324.  
  325.  
  326.  
  327.  
  328. X Version 11           Release 6.1                5
  329.  
  330.  
  331.