Index: uspace/lib/ui/src/menubar.c
===================================================================
--- uspace/lib/ui/src/menubar.c	(revision 5d380b63867e347a3212398238dbe95d3b227d35)
+++ uspace/lib/ui/src/menubar.c	(revision 46bd63c90e62ae2887633555d123a6aa959d3b05)
@@ -45,6 +45,6 @@
 #include <ui/control.h>
 #include <ui/paint.h>
-#include <ui/menu.h>
 #include <ui/menubar.h>
+#include <ui/menudd.h>
 #include <ui/window.h>
 #include "../private/menubar.h"
@@ -95,5 +95,5 @@
 	mbar->ui = ui;
 	mbar->window = window;
-	list_initialize(&mbar->menus);
+	list_initialize(&mbar->menudds);
 	*rmbar = mbar;
 	return EOK;
@@ -106,14 +106,14 @@
 void ui_menu_bar_destroy(ui_menu_bar_t *mbar)
 {
-	ui_menu_t *menu;
+	ui_menu_dd_t *mdd;
 
 	if (mbar == NULL)
 		return;
 
-	/* Destroy menus */
-	menu = ui_menu_first(mbar);
-	while (menu != NULL) {
-		ui_menu_destroy(menu);
-		menu = ui_menu_first(mbar);
+	/* Destroy menu drop-downs */
+	mdd = ui_menu_dd_first(mbar);
+	while (mdd != NULL) {
+		ui_menu_dd_destroy(mdd);
+		mdd = ui_menu_dd_first(mbar);
 	}
 
@@ -155,5 +155,5 @@
 	gfx_rect_t rect;
 	gfx_color_t *bg_color;
-	ui_menu_t *menu;
+	ui_menu_dd_t *mdd;
 	const char *caption;
 	gfx_coord_t width;
@@ -189,7 +189,7 @@
 	fmt.valign = gfx_valign_top;
 
-	menu = ui_menu_first(mbar);
-	while (menu != NULL) {
-		caption = ui_menu_caption(menu);
+	mdd = ui_menu_dd_first(mbar);
+	while (mdd != NULL) {
+		caption = ui_menu_dd_caption(mdd);
 		width = ui_text_width(res->font, caption) + 2 * hpad;
 		tpos.x = pos.x + hpad;
@@ -200,5 +200,5 @@
 		rect.p1.y = mbar->rect.p1.y;
 
-		if (menu == mbar->selected) {
+		if (mdd == mbar->selected) {
 			fmt.color = res->wnd_sel_text_color;
 			fmt.hgl_color = res->wnd_sel_text_hgl_color;
@@ -223,5 +223,5 @@
 
 		pos.x += width;
-		menu = ui_menu_next(menu);
+		mdd = ui_menu_dd_next(mdd);
 	}
 
@@ -241,23 +241,23 @@
  *
  * @param mbar Menu bar
- * @param menu Menu to select (or deselect if selected) or @c NULL
+ * @param mdd Menu drop-down to select (or deselect if selected) or @c NULL
  * @param openup Open menu even if not currently open
  * @param idev_id Input device ID associated with the selecting seat
  */
-void ui_menu_bar_select(ui_menu_bar_t *mbar, ui_menu_t *menu, bool openup,
+void ui_menu_bar_select(ui_menu_bar_t *mbar, ui_menu_dd_t *mdd, bool openup,
     sysarg_t idev_id)
 {
-	ui_menu_t *old_menu;
+	ui_menu_dd_t *old_mdd;
 	gfx_rect_t rect;
 	bool was_open;
 
-	old_menu = mbar->selected;
-
-	mbar->selected = menu;
-
-	/* Close previously open menu */
-	if (old_menu != NULL && ui_menu_is_open(old_menu)) {
+	old_mdd = mbar->selected;
+
+	mbar->selected = mdd;
+
+	/* Close previously open menu drop-down */
+	if (old_mdd != NULL && ui_menu_dd_is_open(old_mdd)) {
 		was_open = true;
-		(void) ui_menu_close(old_menu);
+		(void) ui_menu_dd_close(old_mdd);
 	} else {
 		was_open = false;
@@ -270,9 +270,9 @@
 		if (openup || was_open) {
 			/*
-			 * Open the newly selected menu if either
-			 * the old menu was open or @a openup was
+			 * Open the newly selected menu drop-down if either
+			 * the old menu drop-down was open or @a openup was
 			 * specified.
 			 */
-			(void) ui_menu_open(mbar->selected, &rect, idev_id);
+			(void) ui_menu_dd_open(mbar->selected, &rect, idev_id);
 		}
 	}
@@ -289,15 +289,15 @@
 void ui_menu_bar_left(ui_menu_bar_t *mbar, sysarg_t idev_id)
 {
-	ui_menu_t *nmenu;
+	ui_menu_dd_t *nmdd;
 
 	if (mbar->selected == NULL)
 		return;
 
-	nmenu = ui_menu_prev(mbar->selected);
-	if (nmenu == NULL)
-		nmenu = ui_menu_last(mbar);
-
-	if (nmenu != mbar->selected)
-		ui_menu_bar_select(mbar, nmenu, false, idev_id);
+	nmdd = ui_menu_dd_prev(mbar->selected);
+	if (nmdd == NULL)
+		nmdd = ui_menu_dd_last(mbar);
+
+	if (nmdd != mbar->selected)
+		ui_menu_bar_select(mbar, nmdd, false, idev_id);
 }
 
@@ -312,15 +312,15 @@
 void ui_menu_bar_right(ui_menu_bar_t *mbar, sysarg_t idev_id)
 {
-	ui_menu_t *nmenu;
+	ui_menu_dd_t *nmdd;
 
 	if (mbar->selected == NULL)
 		return;
 
-	nmenu = ui_menu_next(mbar->selected);
-	if (nmenu == NULL)
-		nmenu = ui_menu_first(mbar);
-
-	if (nmenu != mbar->selected)
-		ui_menu_bar_select(mbar, nmenu, false, idev_id);
+	nmdd = ui_menu_dd_next(mbar->selected);
+	if (nmdd == NULL)
+		nmdd = ui_menu_dd_first(mbar);
+
+	if (nmdd != mbar->selected)
+		ui_menu_bar_select(mbar, nmdd, false, idev_id);
 }
 
@@ -355,8 +355,9 @@
 
 	if (event->key == KC_ENTER || event->key == KC_DOWN) {
-		if (mbar->selected != NULL && !ui_menu_is_open(mbar->selected)) {
+		if (mbar->selected != NULL &&
+		    !ui_menu_dd_is_open(mbar->selected)) {
 			ui_menu_bar_entry_rect(mbar, mbar->selected,
 			    &rect);
-			ui_menu_open(mbar->selected, &rect, event->kbd_id);
+			ui_menu_dd_open(mbar->selected, &rect, event->kbd_id);
 		}
 
@@ -364,5 +365,5 @@
 	}
 
-	if (event->c != '\0' && !ui_menu_is_open(mbar->selected)) {
+	if (event->c != '\0' && !ui_menu_dd_is_open(mbar->selected)) {
 		/* Check if it is an accelerator. */
 		ui_menu_bar_press_accel(mbar, event->c, event->kbd_id);
@@ -407,16 +408,16 @@
 void ui_menu_bar_press_accel(ui_menu_bar_t *mbar, char32_t c, sysarg_t kbd_id)
 {
-	ui_menu_t *menu;
+	ui_menu_dd_t *mdd;
 	char32_t maccel;
 
-	menu = ui_menu_first(mbar);
-	while (menu != NULL) {
-		maccel = ui_menu_get_accel(menu);
+	mdd = ui_menu_dd_first(mbar);
+	while (mdd != NULL) {
+		maccel = ui_menu_dd_get_accel(mdd);
 		if (c == maccel) {
-			ui_menu_bar_select(mbar, menu, true, kbd_id);
+			ui_menu_bar_select(mbar, mdd, true, kbd_id);
 			return;
 		}
 
-		menu = ui_menu_next(menu);
+		mdd = ui_menu_dd_next(mdd);
 	}
 }
@@ -433,5 +434,5 @@
 	gfx_coord2_t pos;
 	gfx_rect_t rect;
-	ui_menu_t *menu;
+	ui_menu_dd_t *mdd;
 	const char *caption;
 	gfx_coord_t width;
@@ -454,7 +455,7 @@
 	pos_id = event->pos_id;
 
-	menu = ui_menu_first(mbar);
-	while (menu != NULL) {
-		caption = ui_menu_caption(menu);
+	mdd = ui_menu_dd_first(mbar);
+	while (mdd != NULL) {
+		caption = ui_menu_dd_caption(mdd);
 		width = ui_text_width(res->font, caption) + 2 * hpad;
 
@@ -469,8 +470,8 @@
 
 			/* Open the menu, close if already open. */
-			if (menu == mbar->selected)
+			if (mdd == mbar->selected)
 				ui_menu_bar_select(mbar, NULL, false, pos_id);
 			else
-				ui_menu_bar_select(mbar, menu, true, pos_id);
+				ui_menu_bar_select(mbar, mdd, true, pos_id);
 
 			return ui_claimed;
@@ -478,5 +479,5 @@
 
 		pos.x += width;
-		menu = ui_menu_next(menu);
+		mdd = ui_menu_dd_next(mdd);
 	}
 
@@ -487,8 +488,8 @@
  *
  * @param mbar Menu bar
- * @param menu Menu whose entry's rectangle is to be returned
+ * @param mdd Menu drop-down whose entry's rectangle is to be returned
  * @param rrect Place to store entry rectangle
  */
-void ui_menu_bar_entry_rect(ui_menu_bar_t *mbar, ui_menu_t *menu,
+void ui_menu_bar_entry_rect(ui_menu_bar_t *mbar, ui_menu_dd_t *mdd,
     gfx_rect_t *rrect)
 {
@@ -496,5 +497,5 @@
 	gfx_coord2_t pos;
 	gfx_rect_t rect;
-	ui_menu_t *cur;
+	ui_menu_dd_t *cur;
 	const char *caption;
 	gfx_coord_t width;
@@ -511,7 +512,7 @@
 	pos = mbar->rect.p0;
 
-	cur = ui_menu_first(mbar);
+	cur = ui_menu_dd_first(mbar);
 	while (cur != NULL) {
-		caption = ui_menu_caption(cur);
+		caption = ui_menu_dd_caption(cur);
 		width = ui_text_width(res->font, caption) + 2 * hpad;
 
@@ -520,5 +521,5 @@
 		rect.p1.y = mbar->rect.p1.y;
 
-		if (cur == menu) {
+		if (cur == mdd) {
 			*rrect = rect;
 			return;
@@ -526,5 +527,5 @@
 
 		pos.x += width;
-		cur = ui_menu_next(cur);
+		cur = ui_menu_dd_next(cur);
 	}
 
@@ -544,5 +545,5 @@
 	mbar->active = true;
 	if (mbar->selected == NULL)
-		mbar->selected = ui_menu_first(mbar);
+		mbar->selected = ui_menu_dd_first(mbar);
 
 	(void) ui_menu_bar_paint(mbar);
