Annotation of 43BSDTahoe/new/X/doc/Xlib/ch05b.t, revision 1.1.1.1

1.1       root        1: .NH 2
                      2: Manipulating Windows
                      3: .PP
                      4: .IN "XMapWindow"
                      5: A window is considered `mapped' if a \fIXMapWindow\fP
                      6: call has been made on it.
                      7: It may not be visible on the screen for either of two reasons:
                      8: 1) it may be obscured by another opaque sibling window or
                      9: 2) one of its ancestors is not mapped.
                     10: .IN "Exposure Events"
                     11: Exposure events will be generated for the window when part or all of
                     12: it become visible on the screen; a client will only receive the
                     13: exposure events if it has asked for them using \fIXSelectInput\fP.
                     14: .IN "XSelectInput"
                     15: .FD
                     16: .IN "Definitions" "XMapWindow"
                     17: .IN "XMapWindow"
                     18: XMapWindow (w)
                     19:        Window w;
                     20: .FN
                     21: \fIXMapWindow\fP maps the window and raises the window and all of its
                     22: subwindows which have had map requests to the top of the stack of windows.
                     23: A subwindow will appear on the screen so long as all of its ancestors
                     24: are mapped.
                     25: The previous contents of all
                     26: opaque windows are lost; mapping of transparent windows does not affect
                     27: the screen.
                     28: .PP
                     29: Mapping a window that has an unmapped ancestor does not display the
                     30: window, but marks it as eligible for display when the ancestor becomes
                     31: mapped.
                     32: .PP
                     33: Mapping an already mapped window has no effect
                     34: (it does NOT raise it).
                     35: .PP
                     36: .IN "XMapWindow"
                     37: .IN "ExposeWindow Event"
                     38: If the window is opaque,
                     39: \fIXMapWindow\fP generates \fIExposeWindow\fP events on
                     40: each opaque window that it causes to become displayed.  If the client
                     41: first maps the window, then paints the window, then begins
                     42: processing input events, the window will be painted twice.   To avoid this,
                     43: the client should either
                     44: .IN "XSelectInput"
                     45:   a) first Map, then call \fIXSelectInput\fP for exposure events,
                     46: then repaint the
                     47: window(s) explicitly, or
                     48:   b) first call \fIXSelectInput\fP for exposure events, 
                     49: then map, then process input
                     50: events normally.  The event list will include \fIExposeWindow\fP for each
                     51: window that has appeared on the screen; the client's normal response to
                     52: an \fIExposeWindow\fP should be to repaint the window.
                     53: Method b) is preferred as it usually leads to simpler programs.
                     54: .FD
                     55: .IN "Definitions" "XMapSubwindows"
                     56: .IN "XMapSubwindows"
                     57: XMapSubwindows (w)
                     58:        Window w;
                     59: .FN
                     60: .PP
                     61: \fIXMapSubwindows\fP maps all subwindows of the specified window in
                     62: an unpredictable order.
                     63: .PP
                     64: .IN "ExposeWindow Event"
                     65: It also generates an \fIExposeWindow\fP
                     66: event on each newly displayed opaque window.
                     67: .PP
                     68: Note that this is MUCH more efficient than mapping many windows
                     69: one at a time, as much of the work need only be performed once for all
                     70: of the windows rather than for each window.
                     71: .FD
                     72: .IN "Definitions" "XUnmapWindow"
                     73: .IN "XUnmapWindow"
                     74: XUnmapWindow (w)
                     75:        Window w;
                     76: .FN
                     77: \fIXUnmapWindow\fP unmaps the window.
                     78: Any child window will no longer be visible until another map call is
                     79: made on the parent.
                     80: (Another words, the subwindows are still mapped, but not visible
                     81: until the parent is mapped.)
                     82: .IN "UnmapWindow Event"
                     83: It generates an \fIUnmapWindow\fP event for \fIw\fP, regardless
                     84: of whether it is opaque or transparent.
                     85: Child windows will NOT receive \fIUnmapWindow\fP events.
                     86: .PP
                     87: Unmapping a transparent window does not affect the
                     88: screen or generate any exposure events.
                     89: Unmapping an opaque window will
                     90: generate exposure events on opaque windows that were formerly obscured
                     91: by it and its children.
                     92: .FD
                     93: .IN "Definitions" "XUnmapTransparent"
                     94: .IN "XUnmapTransparent"
                     95: XUnmapTransparent (w)
                     96:        Window w;
                     97: .FN
                     98: Unmaps the window but does not affect the
                     99: screen, even if the window is opaque, and does not generate any
                    100: exposure (or unmap) events.
                    101: .IN "Menus"
                    102: This is intended for use mainly by pop-up
                    103: menus in conjunction with
                    104: .IN "XPixmapSave"
                    105: \fIXPixmapSave\fP to suppress exposure events; the client should normally
                    106: restore the saved pixmap to the area formerly covered by the unmapped
                    107: window.
                    108: .FD
                    109: .IN "Definitions" "XUnmapSubwindows"
                    110: .IN "XUnmapSubwindows"
                    111: XUnmapSubwindows(w)
                    112:        Window w;
                    113: .FN
                    114: Unmaps all subwindows of the specified window.
                    115: .IN "UnmapWindow Event"
                    116: It also generates an UnmapWindow event on each subwindow and generates
                    117: Exposure events on formerly obscured opaque windows.
                    118: .PP
                    119: Note that this is MUCH more efficient than unmapping many windows
                    120: one at a time, as much of the work need only be performed once for all
                    121: of the windows rather than for each window.
                    122: .FD 
                    123: .IN "Definitions" "XMoveWindow"
                    124: .IN "XMoveWindow"
                    125: XMoveWindow (w, x, y)
                    126:        Window w;
                    127:        int x, y;
                    128: .FN    
                    129: \fIXMoveWindow\fP moves and raises the window, without changing its size.
                    130: It does not change the mapping state of the window.
                    131: The
                    132: \fIx\fP and \fIy\fP are the new location of the top
                    133: left pixel of the window's border (or the window itself, if it has
                    134: no border).
                    135: Moving an mapped opaque window may or may not lose its contents depending on
                    136: 1) if its tile mode is
                    137: relative or 2) if the window is obscured by non-children.
                    138: Moving a transparent window does not affect the screen.
                    139: .IN "Exposure Events"
                    140: If the
                    141: contents are lost, exposure events will be generated for the window and
                    142: any mapped opaque subwindows.
                    143: Moving a transparent window does not
                    144: affect the screen.
                    145: .PP
                    146: .IN "Exposure Events"
                    147: Moving a mapped opaque window will generate exposure events on any
                    148: formerly obscured opaque windows.
                    149: .FD
                    150: .IN "Definitions" "XChangeWindow"
                    151: .IN "XChangeWindow"
                    152: XChangeWindow (w, width, height)
                    153:        Window w;
                    154:        int width, height;
                    155: .FN    
                    156: \fIXChangeWindow\fP changes the size of the window without
                    157: changing its upper left coordinate.  
                    158: The new \fIwidth\fP and \fIheight\fP are inside
                    159: dimensions; they do not include the window's borders.
                    160: .PP
                    161: \fIXChangeWindow\fP always raises the window.
                    162: .IN "ExposeWindow Event"
                    163: Changing the size of a mapped opaque window loses its contents and generates
                    164: an \fIExposeWindow\fP event.
                    165: Changing the size of a transparent window does
                    166: not affect the screen.
                    167: .PP
                    168: If a mapped opaque window is made smaller, exposure events will be generated on
                    169: opaque windows that it formerly obscured.
                    170: .PP
                    171: The origin of the window is not changed.
                    172: .FD
                    173: .IN "Definitions" "XConfigureWindow"
                    174: .IN "XConfigureWindow"
                    175: XConfigureWindow (w, x, y, width, height)
                    176:        Window w;
                    177:        int x, y, width, height;
                    178: .FN
                    179: \fIXConfigureWindow\fP changes the size and location of the window.
                    180: Configuring a mapped opaque window loses its contents and generates an
                    181: .IN "ExposeWindow Event"
                    182: ExposeWindow event;  configuring a transparent window does not affect the
                    183: screen.
                    184: \fIXConfigureWindow\fP always raises the window.
                    185: .PP
                    186: Configuring a window may generate exposure events on opaque windows that the
                    187: window formerly obscured, depending on the new size and location parameters.
                    188: .PP
                    189: .IN "XChangeWindow"
                    190: To change the size only, call \fIXChangeWindow\fP.  To change the location
                    191: .IN "XMoveWindow"
                    192: only, call \fIXMoveWindow\fP.
                    193: .FD
                    194: .IN "Definitions" "XRaiseWindow"
                    195: .IN "XRaiseWindow"
                    196: XRaiseWindow (w)
                    197:        Window w;
                    198: .FN
                    199: \fIXRaiseWindow\fP `raises' this window so that no sibling window obscures it.
                    200: If the windows are regarded as overlapping sheets of paper stacked on a desk,
                    201: then raising a window is analogous to moving the sheet to the top of
                    202: the stack, while leaving its x and y location on the desk constant.
                    203: .PP
                    204: .IN "Exposure Events"
                    205: Raising a mapped opaque window may generate exposure events for the
                    206: window and any mapped opaque subwindows that were formerly obscured.  
                    207: .PP
                    208: Raising a transparent window does not affect the screen.
                    209: Transparent windows never obscure other windows for the purposes
                    210: of output, but do obscure for the purposes of cursor and input
                    211: control.
                    212: .FD
                    213: .IN "Definitions" "XLowerWindow"
                    214: .IN "XLowerWindow"
                    215: XLowerWindow (w)
                    216:        Window w;
                    217: .FN
                    218: \fIXLowerWindow\fP `lowers' this window so that it does 
                    219: not obscure any sibling
                    220: windows. 
                    221: If the windows are regarded as overlapping sheets of paper
                    222: stacked on a desk, then lowering a window is analogous to moving the
                    223: sheet to the bottom of the stack, while leaving its x and y location on
                    224: the desk constant.
                    225: .PP
                    226: .IN "Exposure Events"
                    227: Lowering a mapped opaque window will generate exposure events on any
                    228: opaque windows it formerly obscured.
                    229: .PP
                    230: Lowering a transparent window does not affect the screen.
                    231: .FD
                    232: .IN "Definitions" "XCircWindowUp"
                    233: .IN "XCircWindowUp"
                    234: XCircWindowUp (w)
                    235:        Window w;
                    236: .FN
                    237: \fIXCircWindowUp\fP raises the lowest mapped child of this window that is partially
                    238: or completely
                    239: obscured by another child.
                    240: Completely unobscured children are not affected.
                    241: .IN "Exposure Events"
                    242: This will
                    243: generate exposure events on that child (and its opaque descendents) if any part
                    244: of it was formerly obscured. 
                    245: Repeated executions lead to round robin raising.
                    246: .FD
                    247: .IN "Definitions" "XCircWindowDown"
                    248: XCircWindowDown (w)
                    249:        Window w;
                    250: .FN
                    251: Lower the highest mapped child of the window that partially or completely
                    252: obscures another child.
                    253: Completely unobscured children are not affected.
                    254: Generates exposure events on any window formerly obscured.
                    255: Repeated executions lead to round robin lowering.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.