diff --git a/c/xlib/type.c b/c/xlib/type.c index 85c6e4d..0f6f8ca 100644 --- a/c/xlib/type.c +++ b/c/xlib/type.c @@ -37,7 +37,7 @@ s48_value Bits_To_Symbols(unsigned long bits, SYMDESCR* table) { name = table[i].name; val = table[i].val; - if ((val & bits) != 0) { + if ((val & bits) == val) { res = s48_cons(s48_enter_symbol(name), res); } i++; @@ -51,7 +51,7 @@ s48_value Bits_To_Symbols(unsigned long bits, SYMDESCR* table) { s48_value Bit_To_Symbol(unsigned long bits, SYMDESCR* table) { int i = 0; while (table[i].name != (char*)0) { - if ((table[i].val & bits) != 0) + if (table[i].val == bits) return s48_enter_symbol(table[i].name); else i++; } @@ -81,6 +81,41 @@ unsigned long Symbols_To_Bits(s48_value Syms, SYMDESCR* table) { return res; } +SYMDESCR Event_Syms[] = { + { "key-press", KeyPress }, + { "key-release", KeyRelease }, + { "button-press", ButtonPress }, + { "button-release", ButtonRelease }, + { "motion-notify", MotionNotify }, + { "enter-notify", EnterNotify }, + { "leave-notify", LeaveNotify }, + { "focus-in", FocusIn }, + { "focus-out", FocusOut }, + { "keymap-notify", KeymapNotify }, + { "expose", Expose }, + { "graphics-expose", GraphicsExpose }, + { "no-expose", NoExpose }, + { "visibility-notify", VisibilityNotify }, + { "create-notify", CreateNotify }, + { "destroy-notify", DestroyNotify }, + { "unmap-notify", UnmapNotify }, + { "map-notify", MapNotify }, + { "map-request", MapRequest }, + { "reparent-notify", ReparentNotify }, + { "configure-notify", ConfigureNotify }, + { "configure-request", ConfigureRequest }, + { "gravity-notify", GravityNotify }, + { "resize-request", ResizeRequest }, + { "circulate-notify", CirculateNotify }, + { "circulate-request", CirculateRequest }, + { "property-notify", PropertyNotify }, + { "selection-clear", SelectionClear }, + { "selection-notify", SelectionNotify }, + { "colormap-notify", ColormapNotify }, + { "client-message", ClientMessage }, + { "mapping-notify", MappingNotify } +}; + SYMDESCR Func_Syms[] = { { "clear", GXclear }, { "and", GXand },