]> Dogcows Code - chaz/openbox/commitdiff
prefix/capitalize the mouse actions enum
authorDana Jansens <danakj@orodu.net>
Tue, 12 Aug 2003 18:12:17 +0000 (18:12 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 12 Aug 2003 18:12:17 +0000 (18:12 +0000)
openbox/config.c
openbox/mouse.c
openbox/mouse.h

index b7241f5905c4787dde988d734456a0afc773e6e6..9e32609d55dd8ec0e77408d83a7a8381508d96e5 100644 (file)
@@ -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 ||
index 2624ecb930ab7b5458bcb9c9721d93e44a063b36..216124847919a23807efacc722185b1b068f3084 100644 (file)
@@ -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;
index a5e8f9a886548c622a3369a4b5e89d9b7afeae3a..7b0f5ad5c158d71d95202d987adf23c8444b0401 100644 (file)
@@ -7,12 +7,12 @@
 #include <X11/Xlib.h>
 
 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();
This page took 0.028487 seconds and 4 git commands to generate.