cccc [[ ffllaagg ...... ]] ffiillee ...... --llXXttsstt [[ lliibbrraarryy ...... ]]
##iinncclluuddee <
DDiissppllaayy **ddiissppllaayy;;
iinntt **eevveenntt__bbaassee;;
iinntt **eerrrroorr__bbaassee;;
iinntt **mmaajjoorr__vveerrssiioonn;;
iinntt **mmiinnoorr__vveerrssiioonn;;
BBooooll XTestCompareCursorWithWindow((_d_i_s_p_l_a_y,, _w_i_n_d_o_w,, _c_u_r_s_o_r));;
DDiissppllaayy **ddiissppllaayy;;
WWiinnddooww wwiinnddooww;;
CCuurrssoorr ccuurrssoorr;;
BBooooll XTestCompareCurrentCursorWithWindow((_d_i_s_p_l_a_y,, _w_i_n_d_o_w));;
DDiissppllaayy **ddiissppllaayy;;
WWiinnddooww wwiinnddooww;;
iinntt XXTTeessttFFaakkeeKKeeyyEEvveenntt((_d_i_s_p_l_a_y,, _k_e_y_c_o_d_e,, _i_s___p_r_e_s_s,, _d_e_l_a_y));;
DDiissppllaayy **ddiissppllaayy;;
uunnssiiggnneedd iinntt kkeeyyccooddee;;
BBooooll iiss__pprreessss;;
uunnssiiggnneedd lloonngg ddeellaayy;;
iinntt XXTTeessttFFaakkeeBBuuttttoonnEEvveenntt((_d_i_s_p_l_a_y,, _b_u_t_t_o_n,, _i_s___p_r_e_s_s,, _d_e_l_a_y));;
DDiissppllaayy **ddiissppllaayy;;
uunnssiiggnneedd iinntt bbuuttttoonn;;
BBooooll iiss__pprreessss;;
uunnssiiggnneedd lloonngg ddeellaayy;;
iinntt XXTTeessttFFaakkeeMMoottiioonnEEvveenntt((_d_i_s_p_l_a_y,, _s_c_r_e_e_n___n_u_m_b_e_r,, _x,, _y,, _d_e_l_a_y));;
DDiissppllaayy **ddiissppllaayy;;
iinntt ssccrreeeenn__nnuummbbeerr;;
iinntt xx,, yy;;
uunnssiiggnneedd lloonngg ddeellaayy;;
iinntt XXTTeessttFFaakkeeRReellaattiivveeMMoottiioonnEEvveenntt((_d_i_s_p_l_a_y,, _s_c_r_e_e_n___n_u_m_b_e_r,, _x,, _y,, _d_e_l_a_y));;
DDiissppllaayy **ddiissppllaayy;;
iinntt ssccrreeeenn__nnuummbbeerr;;
iinntt xx,, yy;;
uunnssiiggnneedd lloonngg ddeellaayy;;
iinntt XXTTeessttGGrraabbCCoonnttrrooll((_d_i_s_p_l_a_y,, _i_m_p_e_r_v_i_o_u_s));;
DDiissppllaayy **ddiissppllaayy;;
BBooooll iimmppeerrvviioouuss;;
vvooiidd XXTTeessttSSeettGGCCoonntteexxttOOffGGCC((_g_c,, _g_i_d));;
GGCC ggcc;;
GGCCoonntteexxtt ggiidd;;
vvooiidd XXTTeessttSSeettVViissuuaallIIDDOOffVViissuuaall((_v_i_s_u_a_l,, _v_i_s_u_a_l_i_d));;
VViissuuaall **vviissuuaall;;
VViissuuaallIIDD vviissuuaalliidd;;
SSttaattuuss XTestDiscard((_d_i_s_p_l_a_y));;
DDiissppllaayy **ddiissppllaayy;;
This extension is a minimal set of client and server extensions required to completely test the X11 server with no user intervention. This extension is not intended to support general journaling and playback of user actions.
The functions provided by this extension fall into two groups:
All XTEST extension functions and procedures, and all manifest constants and macros, will start with the string
_X_T_e_s_t. All operations are classified as server/client (Server) or client-only (Client).
XXTTeessttQQuueerryyEExxtteennssiioonn
returns
True
if the specified display supports the XTEST extension, else
False. If the extension is supported, *event_base would be set to the event number for the first event for this extension and *error_base would be set to the error number for the first error for this extension. As no errors or events are defined for this version of the extension, the values returned here are not defined (nor useful). If the extension is supported, *major_version and *minor_version are set to the major and minor version numbers of the extension supported by the display. Otherwise, none of the arguments are set.
If the extension is supported,
XXTTeessttCCoommppaarreeCCuurrssoorrWWiitthhWWiinnddooww
performs a comparison of the cursor whose ID is specified by cursor (which may be
_N_o_n_e) with the cursor of the window specified by window returning
True
if they are the same and
False
otherwise. If the extension is not supported, then the request is ignored and zero is returned.
If the extension is supported,
XXTTeessttCCoommppaarreeCCuurrrreennttCCuurrssoorrWWiitthhWWiinnddooww
performs a comparison of the current cursor with the cursor of the specified window returning
True
if they are the same and
False
otherwise. If the extension is not supported, then the request is ignored and zero is returned.
If the extension is supported,
XXTTeessttFFaakkeeKKeeyyEEvveenntt
requests the server to simulate either a
_K_e_y_P_r_e_s_s
(if is_press is
True) or a
_K_e_y_R_e_l_e_a_s_e
(if is_press is
False) of the key with the specified keycode; otherwise, the request is ignored.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is
_C_u_r_r_e_n_t_T_i_m_e, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If the extension is supported,
XXTTeessttFFaakkeeBBuuttttoonnEEvveenntt
requests the server to simulate either a
_B_u_t_t_o_n_P_r_e_s_s
(if is_press is
True) or a
_B_u_t_t_o_n_R_e_l_e_a_s_e
(if is_press is
False) of the logical button numbered by the specified button; otherwise, the request is ignored.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is
_C_u_r_r_e_n_t_T_i_m_e, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If the extension is supported,
XXTTeessttFFaakkeeMMoottiioonnEEvveenntt
requests the server to simulate a movement of the pointer to the specified position (x, y) on the root window of screen_number; otherwise, the request is ignored. If screen_number is -1, the current screen (that the pointer is on) is used.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is
_C_u_r_r_e_n_t_T_i_m_e, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If the extension is supported,
XXTTeessttFFaakkeeRReellaattiivveeMMoottiioonnEEvveenntt
requests the server to simulate a movement of the pointer by the specified offsets (x, y) relative to the current pointer position on screen_number; otherwise, the request is ignored. If screen_number is -1, the current screen (that the pointer is on) is used.
If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is
_C_u_r_r_e_n_t_T_i_m_e, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of the simulated event has been completed.
If impervious is
True, then the executing client becomes impervious to server grabs. If impervious is
False, then the executing client returns to the normal state of being susceptible to server grabs.
XXTTeessttSSeettGGCCoonntteexxttOOffGGCC
sets the GContext within the opaque datatype referenced by gc to be that specified by gid.
XXTTeessttSSeettVViissuuaallIIDDOOffVViissuuaall
sets the VisualID within the opaque datatype referenced by visual to be that specified by visualid.
XXTTeessttDDiissccaarrdd
discards any requests within the output buffer for the specified display. It returns
True
if any requests were discarded; otherwise, it returns
False.
All routines that have return type Status will return nonzero for success and zero for failure. Even if the XTEST extension is supported, the server may withdraw such facilities arbitrarily; in which case they will subsequently return zero.
DESCRIPTION
RETURN VALUES
AUTHOR
Kieron Drake.