D

Standard Cursors

This appendix shows the standard cursor images that can be used by X programs.

D

Standard Cursors

Table D-1 lists the cursors available in the standard distribution of X from MIT; the cursor shapes themselves are pictured in Figure D-1. The cursor shapes in the standard distribution are the same in Release 3 and Release 4.

To specify a cursor as an argument to a command line option, as the value of a resource variable, etc., strip the XC_ prefix from the symbol name. For example, to specify the XC_sailboat cursor as the xterm pointer, you could enter the command:

% xterm -xrm 'xterm*pointerShape: sailboat'

Each cursor has an associated numeric value (to the right of the symbol name in the table). You may notice that the values skip the odd numbers. Each cursor is actually comprised of two font characters: the character that defines the shape (pictured in Figure D-1), and a mask character (not shown) that sets the cursor shape off from the root (or other) window. (More precisely, the mask selects which pixels in the screen around the cursor are disturbed by the cursor.) The mask is generally the same shape as the character it underlies, but is one pixel wider in all directions.

To get an idea of what masks look like, display the entire cursor font using the command:

% xfd -fn cursor

Table D-1. Standard Cursor Symbols

Symbol Value
XC_X_cursor 0
XC_arrow 2
XC_based_arrow_down 4
XC_based_arrow_up 6
XC_boat 8
XC_bogosity 10
XC_bottom_left_corner 12
XC_bottom_right_corner 14
XC_bottom_side 16
XC_bottom_tee 18
XC_box_spiral 20
XC_center_ptr 22
XC_circle 24
XC_clock 26
XC_coffee_mug 28
XC_cross 30
XC_cross_reverse 32
XC_crosshair 34
XC_diamond_cross 36
XC_dot 38
XC_dotbox 40
XC_double_arrow 42
XC_draft_large 44
XC_draft_small 46
XC_draped_box 48
XC_exchange 50
XC_fleur 52
XC_gobbler 54
XC_gumby 56
XC_hand1 58
XC_hand2 60
XC_heart 62
XC_icon 64
XC_iron_cross 66
XC_left_ptr 68
XC_left_side 70
XC_left_tee 72
XC_leftbutton 74
XC_ll_angle 76
XC_lr_angle 78
XC_man 80
XC_middlebutton 82
XC_mouse 84
XC_pencil 86
XC_pirate 88
XC_plus 90
XC_question_arrow 92
XC_right_ptr 94
XC_right_side 96
XC_right_tee 98
XC_rightbutton 100
XC_rtl_logo 102
XC_sailboat 104
XC_sb_down_arrow 106
XC_sb_h_double_arrow 108
XC_sb_left_arrow 110
XC_sb_right_arrow 112
XC_sb_up_arrow 114
XC_sb_v_double_arrow 116
XC_shuttle 118
XC_sizing 120
XC_spider 122
XC_spraycan 124
XC_star 126
XC_target 128
XC_tcross 130
XC_top_left_arrow 132
XC_top_left_corner 134
XC_top_right_corner 136
XC_top_side 138
XC_top_tee 140
XC_trek 142
XC_ul_angle 144
XC_umbrella 146
XC_ur_angle 148
XC_watch 150
XC_xterm 152

Image

Figure D-1. The Standard Cursors

Get X Window System User's Guide for X11 R3 and R4 of the X Window System now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.