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

  1.  
  2.  
  3.  
  4. XOpenDisplay(3X11)      XLIB FUNCTIONS       XOpenDisplay(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XOpenDisplay, XCloseDisplay - connect or disconnect to X
  9.        server
  10.  
  11. SSYYNNTTAAXX
  12.        Display *XOpenDisplay(_d_i_s_p_l_a_y___n_a_m_e)
  13.          char *_d_i_s_p_l_a_y___n_a_m_e;
  14.  
  15.        XCloseDisplay(_d_i_s_p_l_a_y)
  16.          Display *_d_i_s_p_l_a_y;
  17.  
  18. AARRGGUUMMEENNTTSS
  19.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  20.  
  21.        _d_i_s_p_l_a_y___n_a_m_e
  22.          Specifies the hardware display name, which
  23.          determines the display and communications domain
  24.          to be used.  On a POSIX-conformant system, if
  25.          the display_name is NULL, it defaults to the
  26.          value of the DISPLAY environment variable.
  27.  
  28. DDEESSCCRRIIPPTTIIOONN
  29.        The _X_O_p_e_n_D_i_s_p_l_a_y function returns a _D_i_s_p_l_a_y structure that
  30.        serves as the connection to the X server and that contains
  31.        all the information about that X server.     _X_O_p_e_n_D_i_s_p_l_a_y
  32.        connects your application to the X server through TCP or
  33.        DECnet communications protocols, or through some local
  34.        inter-process communication protocol.  If the hostname is
  35.        a host machine name and a single colon (:) separates the
  36.        hostname and display number, _X_O_p_e_n_D_i_s_p_l_a_y connects using
  37.        TCP streams.  If the hostname is not specified, Xlib uses
  38.        whatever it believes is the fastest transport.  If the
  39.        hostname is a host machine name and a double colon (::)
  40.        separates the hostname and display number, _X_O_p_e_n_D_i_s_p_l_a_y
  41.        connects using DECnet.  A single X server can support any
  42.        or all of these transport mechanisms simultaneously.  A
  43.        particular Xlib implementation can support many more of
  44.        these transport mechanisms.
  45.  
  46.        If successful, _X_O_p_e_n_D_i_s_p_l_a_y returns a pointer to a _D_i_s_p_l_a_y
  47.        structure, which is defined in <_X_1_1_/_X_l_i_b_._h>.  If _X_O_p_e_n_D_i_s_-
  48.        _p_l_a_y does not succeed, it returns NULL.    After a success-
  49.        ful call to _X_O_p_e_n_D_i_s_p_l_a_y, all of the screens in the dis-
  50.        play can be used by the client.    The screen number speci-
  51.        fied in the display_name argument is returned by the
  52.        _D_e_f_a_u_l_t_S_c_r_e_e_n macro (or the _X_D_e_f_a_u_l_t_S_c_r_e_e_n function).  You
  53.        can access elements of the _D_i_s_p_l_a_y and _S_c_r_e_e_n structures
  54.        only by using the information macros or functions.  For
  55.        information about using macros and functions to obtain
  56.        information from the _D_i_s_p_l_a_y structure, see section 2.2.1.
  57.  
  58.        The _X_C_l_o_s_e_D_i_s_p_l_a_y function closes the connection to the X
  59.        server for the display specified in the _D_i_s_p_l_a_y structure
  60.        and destroys all windows, resource IDs (_W_i_n_d_o_w, _F_o_n_t,
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XOpenDisplay(3X11)      XLIB FUNCTIONS       XOpenDisplay(3X11)
  71.  
  72.  
  73.        _P_i_x_m_a_p, _C_o_l_o_r_m_a_p, _C_u_r_s_o_r, and _G_C_o_n_t_e_x_t), or other
  74.        resources that the client has created on this display,
  75.        unless the close-down mode of the resource has been
  76.        changed (see _X_S_e_t_C_l_o_s_e_D_o_w_n_M_o_d_e).     Therefore, these win-
  77.        dows, resource IDs, and other resources should never be
  78.        referenced again or an error will be generated.    Before
  79.        exiting, you should call _X_C_l_o_s_e_D_i_s_p_l_a_y explicitly so that
  80.        any pending errors are reported as _X_C_l_o_s_e_D_i_s_p_l_a_y performs
  81.        a final _X_S_y_n_c operation.
  82.  
  83.        _X_C_l_o_s_e_D_i_s_p_l_a_y can generate a _B_a_d_G_C error.
  84.  
  85. SSEEEE AALLSSOO
  86.        AllPlanes(3X11), XFlush(3X11), XSetCloseDownMode(3X11)
  87.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.