case OB_WINDOW_CLASS_MENUFRAME:
menu = WINDOW_AS_MENUFRAME(obwin);
break;
- case OB_WINDOW_CLASS_INTERNALWINDOW:
+ case OB_WINDOW_CLASS_INTERNAL:
/* we don't do anything with events directly on these windows */
break;
}
ObWindow *w;
if ((w = window_find(e->xbutton.subwindow)) &&
- WINDOW_IS_INTERNALWINDOW(w))
+ WINDOW_IS_INTERNAL(w))
{
event_handle_user_input(client, e);
}
if (reconfig) return;
- focus_indicator.top.obwin.type = OB_WINDOW_CLASS_INTERNALWINDOW;
- focus_indicator.left.obwin.type = OB_WINDOW_CLASS_INTERNALWINDOW;
- focus_indicator.right.obwin.type = OB_WINDOW_CLASS_INTERNALWINDOW;
- focus_indicator.bottom.obwin.type = OB_WINDOW_CLASS_INTERNALWINDOW;
+ focus_indicator.top.obwin.type = OB_WINDOW_CLASS_INTERNAL;
+ focus_indicator.left.obwin.type = OB_WINDOW_CLASS_INTERNAL;
+ focus_indicator.right.obwin.type = OB_WINDOW_CLASS_INTERNAL;
+ focus_indicator.bottom.obwin.type = OB_WINDOW_CLASS_INTERNAL;
attr.override_redirect = True;
attr.background_pixel = BlackPixel(obt_display, ob_screen);
create_window(obt_root(ob_screen),
CWOverrideRedirect | CWBackPixel, &attr);
- stacking_add(INTERNALWINDOW_AS_WINDOW(&focus_indicator.top));
- stacking_add(INTERNALWINDOW_AS_WINDOW(&focus_indicator.left));
- stacking_add(INTERNALWINDOW_AS_WINDOW(&focus_indicator.right));
- stacking_add(INTERNALWINDOW_AS_WINDOW(&focus_indicator.bottom));
+ stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.top));
+ stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.left));
+ stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.right));
+ stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.bottom));
window_add(&focus_indicator.top.window,
- INTERNALWINDOW_AS_WINDOW(&focus_indicator.top));
+ INTERNAL_AS_WINDOW(&focus_indicator.top));
window_add(&focus_indicator.left.window,
- INTERNALWINDOW_AS_WINDOW(&focus_indicator.left));
+ INTERNAL_AS_WINDOW(&focus_indicator.left));
window_add(&focus_indicator.right.window,
- INTERNALWINDOW_AS_WINDOW(&focus_indicator.right));
+ INTERNAL_AS_WINDOW(&focus_indicator.right));
window_add(&focus_indicator.bottom.window,
- INTERNALWINDOW_AS_WINDOW(&focus_indicator.bottom));
+ INTERNAL_AS_WINDOW(&focus_indicator.bottom));
color_white = RrColorNew(ob_rr_inst, 0xff, 0xff, 0xff);
window_remove(focus_indicator.right.window);
window_remove(focus_indicator.bottom.window);
- stacking_remove(INTERNALWINDOW_AS_WINDOW(&focus_indicator.top));
- stacking_remove(INTERNALWINDOW_AS_WINDOW(&focus_indicator.left));
- stacking_remove(INTERNALWINDOW_AS_WINDOW(&focus_indicator.right));
- stacking_remove(INTERNALWINDOW_AS_WINDOW(&focus_indicator.bottom));
+ stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.top));
+ stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.left));
+ stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.right));
+ stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.bottom));
XDestroyWindow(obt_display, focus_indicator.top.window);
XDestroyWindow(obt_display, focus_indicator.left.window);
single_popup = icon_popup_new();
- popup.obwin.type = OB_WINDOW_CLASS_INTERNALWINDOW;
+ popup.obwin.type = OB_WINDOW_CLASS_INTERNAL;
popup.a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
popup.a_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label);
popup.a_icon = RrAppearanceCopy(ob_rr_theme->a_clear_tex);
XMapWindow(obt_display, popup.text);
- stacking_add(INTERNALWINDOW_AS_WINDOW(&popup));
- window_add(&popup.bg, INTERNALWINDOW_AS_WINDOW(&popup));
+ stacking_add(INTERNAL_AS_WINDOW(&popup));
+ window_add(&popup.bg, INTERNAL_AS_WINDOW(&popup));
}
void focus_cycle_popup_shutdown(gboolean reconfig)
icon_popup_free(single_popup);
window_remove(popup.bg);
- stacking_remove(INTERNALWINDOW_AS_WINDOW(&popup));
+ stacking_remove(INTERNAL_AS_WINDOW(&popup));
while(popup.targets) {
ObFocusCyclePopupTarget *t = popup.targets->data;
struct _ObMenuFrame
{
/* stuff to be an ObWindow */
- Window_InternalType type;
+ ObWindow type;
Window window;
struct _ObMenu *menu;
XSetWindowAttributes attrib;
ObPopup *self = g_new0(ObPopup, 1);
- self->obwin.type = OB_WINDOW_CLASS_INTERNALWINDOW;
+ self->obwin.type = OB_WINDOW_CLASS_INTERNAL;
self->gravity = NorthWestGravity;
self->x = self->y = self->textw = self->h = 0;
self->a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
XMapWindow(obt_display, self->text);
- stacking_add(INTERNALWINDOW_AS_WINDOW(self));
- window_add(&self->bg, INTERNALWINDOW_AS_WINDOW(self));
+ stacking_add(INTERNAL_AS_WINDOW(self));
+ window_add(&self->bg, INTERNAL_AS_WINDOW(self));
return self;
}
ObPopup *self = data;
XMapWindow(obt_display, self->bg);
- stacking_raise(INTERNALWINDOW_AS_WINDOW(self));
+ stacking_raise(INTERNAL_AS_WINDOW(self));
self->mapped = TRUE;
self->delay_mapped = FALSE;
return WINDOW_AS_DOCK(self)->frame;
case OB_WINDOW_CLASS_CLIENT:
return WINDOW_AS_CLIENT(self)->frame->window;
- case OB_WINDOW_CLASS_INTERNALWINDOW:
- return WINDOW_AS_INTERNALWINDOW(self)->window;
+ case OB_WINDOW_CLASS_INTERNAL:
+ return WINDOW_AS_INTERNAL(self)->window;
}
g_assert_not_reached();
return None;
case OB_WINDOW_CLASS_CLIENT:
return ((ObClient*)self)->layer;
case OB_WINDOW_CLASS_MENUFRAME:
- case OB_WINDOW_CLASS_INTERNALWINDOW:
+ case OB_WINDOW_CLASS_INTERNAL:
return OB_STACKING_LAYER_INTERNAL;
}
g_assert_not_reached();
OB_WINDOW_CLASS_MENUFRAME,
OB_WINDOW_CLASS_DOCK,
OB_WINDOW_CLASS_CLIENT,
- OB_WINDOW_CLASS_INTERNALWINDOW
-} Window_InternalType;
+ OB_WINDOW_CLASS_INTERNAL
+} ObWindowClass;
/* In order to be an ObWindow, you need to make this struct the top of your
struct */
struct _ObWindow {
- Window_InternalType type;
+ ObWindowClass type;
};
#define WINDOW_IS_MENUFRAME(win) \
(((ObWindow*)win)->type == OB_WINDOW_CLASS_DOCK)
#define WINDOW_IS_CLIENT(win) \
(((ObWindow*)win)->type == OB_WINDOW_CLASS_CLIENT)
-#define WINDOW_IS_INTERNALWINDOW(win) \
- (((ObWindow*)win)->type == OB_WINDOW_CLASS_INTERNALWINDOW)
+#define WINDOW_IS_INTERNAL(win) \
+ (((ObWindow*)win)->type == OB_WINDOW_CLASS_INTERNAL)
struct _ObMenu;
struct _ObDock;
#define WINDOW_AS_MENUFRAME(win) ((struct _ObMenuFrame*)win)
#define WINDOW_AS_DOCK(win) ((struct _ObDock*)win)
#define WINDOW_AS_CLIENT(win) ((struct _ObClient*)win)
-#define WINDOW_AS_INTERNALWINDOW(win) ((struct _ObInternalWindow*)win)
+#define WINDOW_AS_INTERNAL(win) ((struct _ObInternalWindow*)win)
#define MENUFRAME_AS_WINDOW(menu) ((ObWindow*)menu)
#define DOCK_AS_WINDOW(dock) ((ObWindow*)dock)
#define CLIENT_AS_WINDOW(client) ((ObWindow*)client)
-#define INTERNALWINDOW_AS_WINDOW(intern) ((ObWindow*)intern)
+#define INTERNAL_AS_WINDOW(intern) ((ObWindow*)intern)
void window_startup (gboolean reconfig);
void window_shutdown(gboolean reconfig);