From: Dana Jansens Date: Tue, 12 Aug 2003 18:12:17 +0000 (+0000) Subject: prefix/capitalize the mouse actions enum X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=8b67ce7030aa22595d77527cdc5b74b84d185a8b;p=chaz%2Fopenbox prefix/capitalize the mouse actions enum --- diff --git a/openbox/config.c b/openbox/config.c index b7241f59..9e32609d 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -133,22 +133,22 @@ static void parse_mouse(xmlDocPtr doc, xmlNodePtr node, void *d) 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 || diff --git a/openbox/mouse.c b/openbox/mouse.c index 2624ecb9..21612484 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -14,7 +14,7 @@ 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. */ @@ -70,7 +70,7 @@ static void clearall() 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); @@ -204,7 +204,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e) 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); @@ -249,18 +249,18 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e) 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, @@ -302,7 +302,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e) 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; diff --git a/openbox/mouse.h b/openbox/mouse.h index a5e8f9a8..7b0f5ad5 100644 --- a/openbox/mouse.h +++ b/openbox/mouse.h @@ -7,12 +7,12 @@ #include typedef enum { - MouseAction_Press, - MouseAction_Release, - MouseAction_Click, - MouseAction_DClick, - MouseAction_Motion, - NUM_MOUSEACTION + OB_MOUSE_ACTION_PRESS, + OB_MOUSE_ACTION_RELEASE, + OB_MOUSE_ACTION_CLICK, + OB_MOUSE_ACTION_DOUBLE_CLICK, + OB_MOUSE_ACTION_MOTION, + OB_MOUSE_NUM_ACTIONS } ObMouseAction; void mouse_startup();