- ob_cursors.ptr = XCreateFontCursor(ob_display, XC_left_ptr);
- ob_cursors.busy = XCreateFontCursor(ob_display, XC_watch);
- ob_cursors.move = XCreateFontCursor(ob_display, XC_fleur);
- ob_cursors.tl = XCreateFontCursor(ob_display, XC_top_left_corner);
- ob_cursors.tr = XCreateFontCursor(ob_display, XC_top_right_corner);
- ob_cursors.bl = XCreateFontCursor(ob_display, XC_bottom_left_corner);
- ob_cursors.br = XCreateFontCursor(ob_display, XC_bottom_right_corner);
- ob_cursors.t = XCreateFontCursor(ob_display, XC_top_side);
- ob_cursors.r = XCreateFontCursor(ob_display, XC_right_side);
- ob_cursors.b = XCreateFontCursor(ob_display, XC_bottom_side);
- ob_cursors.l = XCreateFontCursor(ob_display, XC_left_side);
+ /* create available cursors */
+ ob_cursors[OB_CURSOR_POINTER] =
+ XCreateFontCursor(ob_display, XC_left_ptr);
+ ob_cursors[OB_CURSOR_BUSY] =
+ XCreateFontCursor(ob_display, XC_watch);
+ ob_cursors[OB_CURSOR_MOVE] =
+ XCreateFontCursor(ob_display, XC_fleur);
+ ob_cursors[OB_CURSOR_NORTH] =
+ XCreateFontCursor(ob_display, XC_top_side);
+ ob_cursors[OB_CURSOR_NORTHEAST] =
+ XCreateFontCursor(ob_display, XC_top_right_corner);
+ ob_cursors[OB_CURSOR_EAST] =
+ XCreateFontCursor(ob_display, XC_right_side);
+ ob_cursors[OB_CURSOR_SOUTHEAST] =
+ XCreateFontCursor(ob_display, XC_bottom_right_corner);
+ ob_cursors[OB_CURSOR_SOUTH] =
+ XCreateFontCursor(ob_display, XC_bottom_side);
+ ob_cursors[OB_CURSOR_SOUTHWEST] =
+ XCreateFontCursor(ob_display, XC_bottom_left_corner);
+ ob_cursors[OB_CURSOR_WEST] =
+ XCreateFontCursor(ob_display, XC_left_side);
+ ob_cursors[OB_CURSOR_NORTHWEST] =
+ XCreateFontCursor(ob_display, XC_top_left_corner);
+
+ /* create available keycodes */
+ ob_keys[OB_KEY_RETURN] =
+ XKeysymToKeycode(ob_display, XStringToKeysym("Return"));
+ ob_keys[OB_KEY_ESCAPE] =
+ XKeysymToKeycode(ob_display, XStringToKeysym("Escape"));
+ ob_keys[OB_KEY_LEFT] =
+ XKeysymToKeycode(ob_display, XStringToKeysym("Left"));
+ ob_keys[OB_KEY_RIGHT] =
+ XKeysymToKeycode(ob_display, XStringToKeysym("Right"));
+ ob_keys[OB_KEY_UP] =
+ XKeysymToKeycode(ob_display, XStringToKeysym("Up"));
+ ob_keys[OB_KEY_DOWN] =
+ XKeysymToKeycode(ob_display, XStringToKeysym("Down"));