CurUtil.h File Reference

#include <X11/Xfuncproto.h>

Include dependency graph for CurUtil.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

_XFUNCPROTOBEGIN int XmuCursorNameToIndex (_Xconst char *name)


Function Documentation

_XFUNCPROTOBEGIN int XmuCursorNameToIndex ( _Xconst char *  name  ) 

Definition at line 36 of file CursorName.c.

References i, NUM_CURSOR_NAMES, table, and XmuCopyISOLatin1Lowered().

00037 {
00038     static _Xconst struct _CursorName {
00039         _Xconst char    *name;
00040         unsigned int    shape;
00041     } cursor_names[] = {
00042                         {"x_cursor",            XC_X_cursor},
00043                         {"arrow",               XC_arrow},
00044                         {"based_arrow_down",    XC_based_arrow_down},
00045                         {"based_arrow_up",      XC_based_arrow_up},
00046                         {"boat",                XC_boat},
00047                         {"bogosity",            XC_bogosity},
00048                         {"bottom_left_corner",  XC_bottom_left_corner},
00049                         {"bottom_right_corner", XC_bottom_right_corner},
00050                         {"bottom_side",         XC_bottom_side},
00051                         {"bottom_tee",          XC_bottom_tee},
00052                         {"box_spiral",          XC_box_spiral},
00053                         {"center_ptr",          XC_center_ptr},
00054                         {"circle",              XC_circle},
00055                         {"clock",               XC_clock},
00056                         {"coffee_mug",          XC_coffee_mug},
00057                         {"cross",               XC_cross},
00058                         {"cross_reverse",       XC_cross_reverse},
00059                         {"crosshair",           XC_crosshair},
00060                         {"diamond_cross",       XC_diamond_cross},
00061                         {"dot",                 XC_dot},
00062                         {"dotbox",              XC_dotbox},
00063                         {"double_arrow",        XC_double_arrow},
00064                         {"draft_large",         XC_draft_large},
00065                         {"draft_small",         XC_draft_small},
00066                         {"draped_box",          XC_draped_box},
00067                         {"exchange",            XC_exchange},
00068                         {"fleur",               XC_fleur},
00069                         {"gobbler",             XC_gobbler},
00070                         {"gumby",               XC_gumby},
00071                         {"hand1",               XC_hand1},
00072                         {"hand2",               XC_hand2},
00073                         {"heart",               XC_heart},
00074                         {"icon",                XC_icon},
00075                         {"iron_cross",          XC_iron_cross},
00076                         {"left_ptr",            XC_left_ptr},
00077                         {"left_side",           XC_left_side},
00078                         {"left_tee",            XC_left_tee},
00079                         {"leftbutton",          XC_leftbutton},
00080                         {"ll_angle",            XC_ll_angle},
00081                         {"lr_angle",            XC_lr_angle},
00082                         {"man",                 XC_man},
00083                         {"middlebutton",        XC_middlebutton},
00084                         {"mouse",               XC_mouse},
00085                         {"pencil",              XC_pencil},
00086                         {"pirate",              XC_pirate},
00087                         {"plus",                XC_plus},
00088                         {"question_arrow",      XC_question_arrow},
00089                         {"right_ptr",           XC_right_ptr},
00090                         {"right_side",          XC_right_side},
00091                         {"right_tee",           XC_right_tee},
00092                         {"rightbutton",         XC_rightbutton},
00093                         {"rtl_logo",            XC_rtl_logo},
00094                         {"sailboat",            XC_sailboat},
00095                         {"sb_down_arrow",       XC_sb_down_arrow},
00096                         {"sb_h_double_arrow",   XC_sb_h_double_arrow},
00097                         {"sb_left_arrow",       XC_sb_left_arrow},
00098                         {"sb_right_arrow",      XC_sb_right_arrow},
00099                         {"sb_up_arrow",         XC_sb_up_arrow},
00100                         {"sb_v_double_arrow",   XC_sb_v_double_arrow},
00101                         {"shuttle",             XC_shuttle},
00102                         {"sizing",              XC_sizing},
00103                         {"spider",              XC_spider},
00104                         {"spraycan",            XC_spraycan},
00105                         {"star",                XC_star},
00106                         {"target",              XC_target},
00107                         {"tcross",              XC_tcross},
00108                         {"top_left_arrow",      XC_top_left_arrow},
00109                         {"top_left_corner",     XC_top_left_corner},
00110                         {"top_right_corner",    XC_top_right_corner},
00111                         {"top_side",            XC_top_side},
00112                         {"top_tee",             XC_top_tee},
00113                         {"trek",                XC_trek},
00114                         {"ul_angle",            XC_ul_angle},
00115                         {"umbrella",            XC_umbrella},
00116                         {"ur_angle",            XC_ur_angle},
00117                         {"watch",               XC_watch},
00118                         {"xterm",               XC_xterm},
00119     };
00120 #define NUM_CURSOR_NAMES    (sizeof (cursor_names) / sizeof (cursor_names[0]))
00121     register _Xconst struct _CursorName *table;
00122     register int i;
00123     char tmp[40];
00124     
00125     if (strlen (name) >= sizeof tmp) return -1;
00126     XmuCopyISOLatin1Lowered (tmp, name);
00127 
00128     for (i=0, table=cursor_names; i < NUM_CURSOR_NAMES; i++, table++ ) {
00129         if (strcmp(tmp, table->name) == 0) return table->shape;
00130     }
00131 
00132     return -1;
00133 }

Here is the call graph for this function:


Generated on Sun Mar 4 16:03:39 2007 for Scilab [trunk] by  doxygen 1.5.1