prefix and capitalize ObMenu ObMenuEntry and ObMenuEntryRenderType make the ObMenuEntryRenderType a standard enum instead bitflags
Dana Jansens danakj@orodu.net
10 files changed,
132 insertions(+),
130 deletions(-)
M
openbox/client.c
→
openbox/client.c
@@ -318,8 +318,8 @@
/* called by client_unmanage() to close any menus referencing this client */ void client_close_menus(gpointer key, gpointer value, gpointer self) { - if (((Menu *)value)->client == (ObClient *)self) - menu_hide((Menu *)value); + if (((ObMenu *)value)->client == (ObClient *)self) + menu_hide((ObMenu *)value); } void client_unmanage(ObClient *self)
M
openbox/event.c
→
openbox/event.c
@@ -449,7 +449,7 @@ Window window;
ObClient *client = NULL; ObDock *dock = NULL; ObDockApp *dockapp = NULL; - Menu *menu = NULL; + ObMenu *menu = NULL; ObWindow *obwin = NULL; window = event_get_window(e);@@ -963,9 +963,9 @@ }
static void event_handle_menu(ObClient *client, XEvent *e) { - static MenuEntry *over = NULL; - MenuEntry *entry; - Menu *top; + static ObMenuEntry *over = NULL; + ObMenuEntry *entry; + ObMenu *top; GSList *it; top = g_slist_nth_data(menu_visible, 0);@@ -999,7 +999,7 @@
g_message("BUTTON RELEASED"); for (it = menu_visible; it; it = g_slist_next(it)) { - Menu *m = it->data; + ObMenu *m = it->data; if (e->xbutton.x_root >= m->location.x - ob_rr_theme->bwidth && e->xbutton.y_root >= m->location.y - ob_rr_theme->bwidth && e->xbutton.x_root < m->location.x + m->size.width +@@ -1046,7 +1046,7 @@ break;
case MotionNotify: g_message("motion"); for (it = menu_visible; it; it = g_slist_next(it)) { - Menu *m = it->data; + ObMenu *m = it->data; if ((entry = menu_find_entry_by_pos(it->data, e->xmotion.x_root - m->location.x,
M
openbox/window.c
→
openbox/window.c
@@ -21,7 +21,7 @@ Window window_top(ObWindow *self)
{ switch (self->type) { case Window_Menu: - return ((Menu*)self)->frame; + return ((ObMenu*)self)->frame; case Window_Dock: return ((ObDock*)self)->frame; case Window_DockApp:
M
openbox/window.h
→
openbox/window.h
@@ -33,12 +33,12 @@ #define WINDOW_IS_DOCKAPP(win) (((ObWindow*)win)->type == Window_DockApp)
#define WINDOW_IS_CLIENT(win) (((ObWindow*)win)->type == Window_Client) #define WINDOW_IS_INTERNAL(win) (((ObWindow*)win)->type == Window_Internal) -struct Menu; +struct _ObMenu; struct _ObDock; struct _ObDockApp; struct _ObClient; -#define WINDOW_AS_MENU(win) ((struct Menu*)win) +#define WINDOW_AS_MENU(win) ((struct _ObMenu*)win) #define WINDOW_AS_DOCK(win) ((struct _ObDock*)win) #define WINDOW_AS_DOCKAPP(win) ((struct _ObDockApp*)win) #define WINDOW_AS_CLIENT(win) ((struct _ObClient*)win)