if (!parse_attr_string("button", nbut, &buttonstr))
goto next_nbut;
if (parse_attr_contains("press", nbut, "action"))
- mact = MouseAction_Press;
+ mact = OB_MOUSE_ACTION_PRESS;
else if (parse_attr_contains("release", nbut, "action"))
- mact = MouseAction_Release;
+ mact = OB_MOUSE_ACTION_RELEASE;
else if (parse_attr_contains("click", nbut, "action"))
- mact = MouseAction_Click;
+ mact = OB_MOUSE_ACTION_CLICK;
else if (parse_attr_contains("doubleclick", nbut,"action"))
- mact = MouseAction_DClick;
+ mact = OB_MOUSE_ACTION_DOUBLE_CLICK;
else if (parse_attr_contains("drag", nbut, "action"))
- mact = MouseAction_Motion;
+ mact = OB_MOUSE_ACTION_MOTION;
else
goto next_nbut;
nact = parse_find_node("action", nbut->xmlChildrenNode);
while (nact) {
if ((action = action_parse(doc, nact))) {
/* validate that its okay for a mouse binding*/
- if (mact == MouseAction_Motion) {
+ if (mact == OB_MOUSE_ACTION_MOTION) {
if (action->func != action_moveresize ||
action->data.moveresize.corner ==
prop_atoms.net_wm_moveresize_move_keyboard ||
typedef struct {
guint state;
guint button;
- GSList *actions[NUM_MOUSEACTION]; /* lists of Action pointers */
+ GSList *actions[OB_MOUSE_NUM_ACTIONS]; /* lists of Action pointers */
} ObMouseBinding;
/* Array of GSList*s of PointerBinding*s. */
int j;
ObMouseBinding *b = it->data;
- for (j = 0; j < NUM_MOUSEACTION; ++j) {
+ for (j = 0; j < OB_MOUSE_NUM_ACTIONS; ++j) {
GSList *it;
for (it = b->actions[j]; it; it = it->next) {
action_free(it->data);
button = e->xbutton.button;
state = e->xbutton.state;
- fire_button(MouseAction_Press, context,
+ fire_button(OB_MOUSE_ACTION_PRESS, context,
client, e->xbutton.state,
e->xbutton.button,
e->xbutton.x_root, e->xbutton.y_root);
state = 0;
ltime = e->xbutton.time;
}
- fire_button(MouseAction_Release, context,
+ fire_button(OB_MOUSE_ACTION_RELEASE, context,
client, e->xbutton.state,
e->xbutton.button,
e->xbutton.x_root, e->xbutton.y_root);
if (click)
- fire_button(MouseAction_Click, context,
+ fire_button(OB_MOUSE_ACTION_CLICK, context,
client, e->xbutton.state,
e->xbutton.button,
e->xbutton.x_root,
e->xbutton.y_root);
if (dclick)
- fire_button(MouseAction_DClick, context,
+ fire_button(OB_MOUSE_ACTION_DOUBLE_CLICK, context,
client, e->xbutton.state,
e->xbutton.button,
e->xbutton.x_root,
client->area.height +
client->frame->size.top +
client->frame->size.bottom);
- fire_motion(MouseAction_Motion, context,
+ fire_motion(OB_MOUSE_ACTION_MOTION, context,
client, state, button, px, py, corner);
button = 0;
state = 0;