Mercurial > projects > dynamin
comparison dynamin/c/xlib.d @ 23:d55b5b998412
Implement built-in mouse cursors with X.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 25 Jul 2009 14:58:43 -0500 |
parents | e6e201c3a439 |
children | 43a88caead16 |
comparison
equal
deleted
inserted
replaced
22:9a50d6d96815 | 23:d55b5b998412 |
---|---|
243 uint height, | 243 uint height, |
244 uint fg, | 244 uint fg, |
245 uint bg, | 245 uint bg, |
246 uint depth); | 246 uint depth); |
247 | 247 |
248 Pixmap XCreateBitmapFromData( | |
249 Display* display, | |
250 Drawable d, | |
251 /*const*/ char* data, | |
252 uint width, | |
253 uint height); | |
254 | |
248 int XFreePixmap(Display* display, Pixmap pixmap); | 255 int XFreePixmap(Display* display, Pixmap pixmap); |
249 //}}} | 256 //}}} |
250 | 257 |
251 //{{{ cursor functions | 258 //{{{ cursor functions |
252 Cursor XCreatePixmapCursor( | 259 Cursor XCreatePixmapCursor( |
256 XColor* foreground_color, | 263 XColor* foreground_color, |
257 XColor* background_color, | 264 XColor* background_color, |
258 uint x, | 265 uint x, |
259 uint y); | 266 uint y); |
260 | 267 |
268 Cursor XCreateFontCursor(Display* display, uint shape); | |
269 | |
261 int XDefineCursor(Display* display, Window w, Cursor cursor); | 270 int XDefineCursor(Display* display, Window w, Cursor cursor); |
262 | 271 |
263 int XUndefineCursor(Display* display, Window w); | 272 int XUndefineCursor(Display* display, Window w); |
264 | 273 |
265 int XFreeCursor(Display* display, Cursor cursor); | 274 int XFreeCursor(Display* display, Cursor cursor); |
266 | 275 |
276 // cursorfont.h | |
277 enum { | |
278 XC_num_glyphs = 154, | |
279 XC_X_cursor = 0, | |
280 XC_arrow = 2, | |
281 XC_based_arrow_down = 4, | |
282 XC_based_arrow_up = 6, | |
283 XC_boat = 8, | |
284 XC_bogosity = 10, | |
285 XC_bottom_left_corner = 12, | |
286 XC_bottom_right_corner = 14, | |
287 XC_bottom_side = 16, | |
288 XC_bottom_tee = 18, | |
289 XC_box_spiral = 20, | |
290 XC_center_ptr = 22, | |
291 XC_circle = 24, | |
292 XC_clock = 26, | |
293 XC_coffee_mug = 28, | |
294 XC_cross = 30, | |
295 XC_cross_reverse = 32, | |
296 XC_crosshair = 34, | |
297 XC_diamond_cross = 36, | |
298 XC_dot = 38, | |
299 XC_dotbox = 40, | |
300 XC_double_arrow = 42, | |
301 XC_draft_large = 44, | |
302 XC_draft_small = 46, | |
303 XC_draped_box = 48, | |
304 XC_exchange = 50, | |
305 XC_fleur = 52, | |
306 XC_gobbler = 54, | |
307 XC_gumby = 56, | |
308 XC_hand1 = 58, | |
309 XC_hand2 = 60, | |
310 XC_heart = 62, | |
311 XC_icon = 64, | |
312 XC_iron_cross = 66, | |
313 XC_left_ptr = 68, | |
314 XC_left_side = 70, | |
315 XC_left_tee = 72, | |
316 XC_leftbutton = 74, | |
317 XC_ll_angle = 76, | |
318 XC_lr_angle = 78, | |
319 XC_man = 80, | |
320 XC_middlebutton = 82, | |
321 XC_mouse = 84, | |
322 XC_pencil = 86, | |
323 XC_pirate = 88, | |
324 XC_plus = 90, | |
325 XC_question_arrow = 92, | |
326 XC_right_ptr = 94, | |
327 XC_right_side = 96, | |
328 XC_right_tee = 98, | |
329 XC_rightbutton = 100, | |
330 XC_rtl_logo = 102, | |
331 XC_sailboat = 104, | |
332 XC_sb_down_arrow = 106, | |
333 XC_sb_h_double_arrow = 108, | |
334 XC_sb_left_arrow = 110, | |
335 XC_sb_right_arrow = 112, | |
336 XC_sb_up_arrow = 114, | |
337 XC_sb_v_double_arrow = 116, | |
338 XC_shuttle = 118, | |
339 XC_sizing = 120, | |
340 XC_spider = 122, | |
341 XC_spraycan = 124, | |
342 XC_star = 126, | |
343 XC_target = 128, | |
344 XC_tcross = 130, | |
345 XC_top_left_arrow = 132, | |
346 XC_top_left_corner = 134, | |
347 XC_top_right_corner = 136, | |
348 XC_top_side = 138, | |
349 XC_top_tee = 140, | |
350 XC_trek = 142, | |
351 XC_ul_angle = 144, | |
352 XC_umbrella = 146, | |
353 XC_ur_angle = 148, | |
354 XC_watch = 150, | |
355 XC_xterm = 152, | |
356 } | |
267 //}}} | 357 //}}} |
268 | 358 |
269 //{{{ keyboard functions | 359 //{{{ keyboard functions |
270 KeyCode XKeysymToKeycode(Display* display, KeySym keysym); | 360 KeyCode XKeysymToKeycode(Display* display, KeySym keysym); |
271 | 361 |