| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
# include <stdio.h> |
| 30 |
# include <math.h> |
| 31 |
#include <idi.h> |
| 32 |
#include <x11defs.h> |
| 33 |
|
| 34 |
|
| 35 |
int show_cur(w,cu,curnam) |
| 36 |
Window w; |
| 37 |
unsigned int cu; |
| 38 |
char *curnam; |
| 39 |
|
| 40 |
{ |
| 41 |
Cursor xcu; |
| 42 |
int n; |
| 43 |
double varia, res; |
| 44 |
|
| 45 |
printf("cursor: XC_%s\n",curnam); |
| 46 |
xcu = XCreateFontCursor(mydisp[0],cu); |
| 47 |
XDefineCursor(mydisp[0],w,xcu); |
| 48 |
XFlush(mydisp[0]); |
| 49 |
|
| 50 |
for (n=0; n<99999; n++) |
| 51 |
{ |
| 52 |
varia = n; |
| 53 |
res = sqrt(varia); |
| 54 |
} |
| 55 |
XFreeCursor(mydisp[0],xcu); |
| 56 |
XFlush(mydisp[0]); |
| 57 |
XSync(mydisp[0],1); |
| 58 |
|
| 59 |
return 0; |
| 60 |
} |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
int curs_demo(w) |
| 65 |
Window w; |
| 66 |
|
| 67 |
{ |
| 68 |
unsigned int cu; |
| 69 |
char curnam[20]; |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
strcpy(curnam,"X_cursor"); |
| 75 |
cu = XC_X_cursor; |
| 76 |
show_cur(w,cu,curnam); |
| 77 |
strcpy(curnam,"arrow"); |
| 78 |
cu = XC_arrow; |
| 79 |
show_cur(w,cu,curnam); |
| 80 |
strcpy(curnam,"based_arrow_down"); |
| 81 |
cu = XC_based_arrow_down; |
| 82 |
show_cur(w,cu,curnam); |
| 83 |
strcpy(curnam,"based_arrow_up"); |
| 84 |
cu = XC_based_arrow_up; |
| 85 |
show_cur(w,cu,curnam); |
| 86 |
strcpy(curnam,"boat"); |
| 87 |
cu = XC_boat; |
| 88 |
show_cur(w,cu,curnam); |
| 89 |
strcpy(curnam,"bogosity"); |
| 90 |
cu = XC_bogosity; |
| 91 |
show_cur(w,cu,curnam); |
| 92 |
strcpy(curnam,"bottom_left_corner"); |
| 93 |
cu = XC_bottom_left_corner; |
| 94 |
show_cur(w,cu,curnam); |
| 95 |
strcpy(curnam,"bottom_right_corner"); |
| 96 |
cu = XC_bottom_right_corner; |
| 97 |
show_cur(w,cu,curnam); |
| 98 |
strcpy(curnam,"bottom_side"); |
| 99 |
cu = XC_bottom_side; |
| 100 |
show_cur(w,cu,curnam); |
| 101 |
strcpy(curnam,"bottom_tee"); |
| 102 |
cu = XC_bottom_tee; |
| 103 |
show_cur(w,cu,curnam); |
| 104 |
strcpy(curnam,"box_spiral"); |
| 105 |
cu = XC_box_spiral; |
| 106 |
show_cur(w,cu,curnam); |
| 107 |
strcpy(curnam,"center_ptr"); |
| 108 |
cu = XC_center_ptr; |
| 109 |
show_cur(w,cu,curnam); |
| 110 |
strcpy(curnam,"circle"); |
| 111 |
cu = XC_circle; |
| 112 |
show_cur(w,cu,curnam); |
| 113 |
strcpy(curnam,"clock"); |
| 114 |
cu = XC_clock; |
| 115 |
show_cur(w,cu,curnam); |
| 116 |
strcpy(curnam,"coffee_mug"); |
| 117 |
cu = XC_coffee_mug; |
| 118 |
show_cur(w,cu,curnam); |
| 119 |
strcpy(curnam,"cross"); |
| 120 |
cu = XC_cross; |
| 121 |
show_cur(w,cu,curnam); |
| 122 |
strcpy(curnam,"cross_reverse"); |
| 123 |
cu = XC_cross_reverse; |
| 124 |
show_cur(w,cu,curnam); |
| 125 |
strcpy(curnam,"crosshair"); |
| 126 |
cu = XC_crosshair; |
| 127 |
show_cur(w,cu,curnam); |
| 128 |
strcpy(curnam,"diamond_cross"); |
| 129 |
cu = XC_diamond_cross; |
| 130 |
show_cur(w,cu,curnam); |
| 131 |
strcpy(curnam,"dot"); |
| 132 |
cu = XC_dot; |
| 133 |
show_cur(w,cu,curnam); |
| 134 |
strcpy(curnam,"double_arrow"); |
| 135 |
cu = XC_double_arrow; |
| 136 |
show_cur(w,cu,curnam); |
| 137 |
strcpy(curnam,"draft_large"); |
| 138 |
cu = XC_draft_large; |
| 139 |
show_cur(w,cu,curnam); |
| 140 |
strcpy(curnam,"draft_small"); |
| 141 |
cu = XC_draft_small; |
| 142 |
show_cur(w,cu,curnam); |
| 143 |
strcpy(curnam,"draped_box"); |
| 144 |
cu = XC_draped_box; |
| 145 |
show_cur(w,cu,curnam); |
| 146 |
strcpy(curnam,"exchange"); |
| 147 |
cu = XC_exchange; |
| 148 |
show_cur(w,cu,curnam); |
| 149 |
strcpy(curnam,"fleur"); |
| 150 |
cu = XC_fleur; |
| 151 |
show_cur(w,cu,curnam); |
| 152 |
strcpy(curnam,"gobbler"); |
| 153 |
cu = XC_gobbler; |
| 154 |
show_cur(w,cu,curnam); |
| 155 |
strcpy(curnam,"gumby"); |
| 156 |
cu = XC_gumby; |
| 157 |
show_cur(w,cu,curnam); |
| 158 |
strcpy(curnam,"heart"); |
| 159 |
cu = XC_heart; |
| 160 |
show_cur(w,cu,curnam); |
| 161 |
strcpy(curnam,"icon"); |
| 162 |
cu = XC_icon; |
| 163 |
show_cur(w,cu,curnam); |
| 164 |
strcpy(curnam,"iron_cross"); |
| 165 |
cu = XC_iron_cross; |
| 166 |
show_cur(w,cu,curnam); |
| 167 |
strcpy(curnam,"left_ptr"); |
| 168 |
cu = XC_left_ptr; |
| 169 |
show_cur(w,cu,curnam); |
| 170 |
strcpy(curnam,"left_side"); |
| 171 |
cu = XC_left_side; |
| 172 |
show_cur(w,cu,curnam); |
| 173 |
strcpy(curnam,"left_tee"); |
| 174 |
cu = XC_left_tee; |
| 175 |
show_cur(w,cu,curnam); |
| 176 |
strcpy(curnam,"leftbutton"); |
| 177 |
cu = XC_leftbutton; |
| 178 |
show_cur(w,cu,curnam); |
| 179 |
strcpy(curnam,"ll_angle"); |
| 180 |
cu = XC_ll_angle; |
| 181 |
show_cur(w,cu,curnam); |
| 182 |
strcpy(curnam,"lr_angle"); |
| 183 |
cu = XC_lr_angle; |
| 184 |
show_cur(w,cu,curnam); |
| 185 |
strcpy(curnam,"man"); |
| 186 |
cu = XC_man; |
| 187 |
show_cur(w,cu,curnam); |
| 188 |
strcpy(curnam,"middlebutton"); |
| 189 |
cu = XC_middlebutton; |
| 190 |
show_cur(w,cu,curnam); |
| 191 |
strcpy(curnam,"mouse"); |
| 192 |
cu = XC_mouse; |
| 193 |
show_cur(w,cu,curnam); |
| 194 |
strcpy(curnam,"pencil"); |
| 195 |
cu = XC_pencil; |
| 196 |
show_cur(w,cu,curnam); |
| 197 |
strcpy(curnam,"pirate"); |
| 198 |
cu = XC_pirate; |
| 199 |
show_cur(w,cu,curnam); |
| 200 |
strcpy(curnam,"plus"); |
| 201 |
cu = XC_plus; |
| 202 |
show_cur(w,cu,curnam); |
| 203 |
strcpy(curnam,"question_arrow"); |
| 204 |
cu = XC_question_arrow; |
| 205 |
show_cur(w,cu,curnam); |
| 206 |
strcpy(curnam,"right_ptr"); |
| 207 |
cu = XC_right_ptr; |
| 208 |
show_cur(w,cu,curnam); |
| 209 |
strcpy(curnam,"right_side"); |
| 210 |
cu = XC_right_side; |
| 211 |
show_cur(w,cu,curnam); |
| 212 |
strcpy(curnam,"right_tee"); |
| 213 |
cu = XC_right_tee; |
| 214 |
show_cur(w,cu,curnam); |
| 215 |
strcpy(curnam,"rightbutton"); |
| 216 |
cu = XC_rightbutton; |
| 217 |
show_cur(w,cu,curnam); |
| 218 |
strcpy(curnam,"rtl_logo"); |
| 219 |
cu = XC_rtl_logo; |
| 220 |
show_cur(w,cu,curnam); |
| 221 |
strcpy(curnam,"sailboat"); |
| 222 |
cu = XC_sailboat; |
| 223 |
show_cur(w,cu,curnam); |
| 224 |
strcpy(curnam,"sb_down_arrow"); |
| 225 |
cu = XC_sb_down_arrow; |
| 226 |
show_cur(w,cu,curnam); |
| 227 |
strcpy(curnam,"sb_h_double_arrow"); |
| 228 |
cu = XC_sb_h_double_arrow; |
| 229 |
show_cur(w,cu,curnam); |
| 230 |
strcpy(curnam,"sb_left_arrow"); |
| 231 |
cu = XC_sb_left_arrow; |
| 232 |
show_cur(w,cu,curnam); |
| 233 |
strcpy(curnam,"sb_right_arrow"); |
| 234 |
cu = XC_sb_right_arrow; |
| 235 |
show_cur(w,cu,curnam); |
| 236 |
strcpy(curnam,"sb_up_arrow"); |
| 237 |
cu = XC_sb_up_arrow; |
| 238 |
show_cur(w,cu,curnam); |
| 239 |
strcpy(curnam,"sb_v_double_arrow"); |
| 240 |
cu = XC_sb_v_double_arrow; |
| 241 |
show_cur(w,cu,curnam); |
| 242 |
strcpy(curnam,"shuttle"); |
| 243 |
cu = XC_shuttle; |
| 244 |
show_cur(w,cu,curnam); |
| 245 |
strcpy(curnam,"sizing"); |
| 246 |
cu = XC_sizing; |
| 247 |
show_cur(w,cu,curnam); |
| 248 |
strcpy(curnam,"spider"); |
| 249 |
cu = XC_spider; |
| 250 |
show_cur(w,cu,curnam); |
| 251 |
strcpy(curnam,"spraycan"); |
| 252 |
cu = XC_spraycan; |
| 253 |
show_cur(w,cu,curnam); |
| 254 |
strcpy(curnam,"star"); |
| 255 |
cu = XC_star; |
| 256 |
show_cur(w,cu,curnam); |
| 257 |
strcpy(curnam,"target"); |
| 258 |
cu = XC_target; |
| 259 |
show_cur(w,cu,curnam); |
| 260 |
strcpy(curnam,"tcross"); |
| 261 |
cu = XC_tcross; |
| 262 |
show_cur(w,cu,curnam); |
| 263 |
strcpy(curnam,"top_left_arrow"); |
| 264 |
cu = XC_top_left_arrow; |
| 265 |
show_cur(w,cu,curnam); |
| 266 |
strcpy(curnam,"top_left_corner"); |
| 267 |
cu = XC_top_left_corner; |
| 268 |
show_cur(w,cu,curnam); |
| 269 |
strcpy(curnam,"top_right_corner"); |
| 270 |
cu = XC_top_right_corner; |
| 271 |
show_cur(w,cu,curnam); |
| 272 |
strcpy(curnam,"top_side"); |
| 273 |
cu = XC_top_side; |
| 274 |
show_cur(w,cu,curnam); |
| 275 |
strcpy(curnam,"top_tee"); |
| 276 |
cu = XC_top_tee; |
| 277 |
show_cur(w,cu,curnam); |
| 278 |
strcpy(curnam,"trek"); |
| 279 |
cu = XC_trek; |
| 280 |
show_cur(w,cu,curnam); |
| 281 |
strcpy(curnam,"ul_angle"); |
| 282 |
cu = XC_ul_angle; |
| 283 |
show_cur(w,cu,curnam); |
| 284 |
strcpy(curnam,"umbrella"); |
| 285 |
cu = XC_umbrella; |
| 286 |
show_cur(w,cu,curnam); |
| 287 |
strcpy(curnam,"ur_angle"); |
| 288 |
cu = XC_ur_angle; |
| 289 |
show_cur(w,cu,curnam); |
| 290 |
strcpy(curnam,"watch"); |
| 291 |
cu = XC_watch; |
| 292 |
show_cur(w,cu,curnam); |
| 293 |
strcpy(curnam,"xterm"); |
| 294 |
cu = XC_xterm; |
| 295 |
show_cur(w,cu,curnam); |
| 296 |
|
| 297 |
return 0; |
| 298 |
} |