Mercurial > emacs
comparison src/w32menu.c @ 111234:0576327092ab
merge trunk
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 28 Oct 2010 19:57:59 +0900 |
parents | b8fde5ef9e14 |
children | 968255ee954a |
comparison
equal
deleted
inserted
replaced
111233:d86e0c3de741 | 111234:0576327092ab |
---|---|
104 static int is_simple_dialog (Lisp_Object); | 104 static int is_simple_dialog (Lisp_Object); |
105 static Lisp_Object simple_dialog_show (FRAME_PTR, Lisp_Object, Lisp_Object); | 105 static Lisp_Object simple_dialog_show (FRAME_PTR, Lisp_Object, Lisp_Object); |
106 #endif | 106 #endif |
107 | 107 |
108 static void utf8to16 (unsigned char *, int, WCHAR *); | 108 static void utf8to16 (unsigned char *, int, WCHAR *); |
109 static int fill_in_menu (HMENU, widget_value *); | |
109 | 110 |
110 void w32_free_menu_strings (HWND); | 111 void w32_free_menu_strings (HWND); |
111 | 112 |
112 | 113 |
113 /* This is set nonzero after the user activates the menu bar, and set | 114 /* This is set nonzero after the user activates the menu bar, and set |
994 static Lisp_Object | 995 static Lisp_Object |
995 w32_dialog_show (FRAME_PTR f, int keymaps, | 996 w32_dialog_show (FRAME_PTR f, int keymaps, |
996 Lisp_Object title, Lisp_Object header, | 997 Lisp_Object title, Lisp_Object header, |
997 char **error) | 998 char **error) |
998 { | 999 { |
999 int i, nb_buttons=0; | 1000 int i, nb_buttons = 0; |
1000 char dialog_name[6]; | 1001 char dialog_name[6]; |
1001 int menu_item_selection; | 1002 int menu_item_selection; |
1002 | 1003 |
1003 widget_value *wv, *first_wv = 0, *prev_wv = 0; | 1004 widget_value *wv, *first_wv = 0, *prev_wv = 0; |
1004 | 1005 |
1566 } | 1567 } |
1567 return return_value; | 1568 return return_value; |
1568 } | 1569 } |
1569 | 1570 |
1570 /* Construct native Windows menu(bar) based on widget_value tree. */ | 1571 /* Construct native Windows menu(bar) based on widget_value tree. */ |
1571 int | 1572 static int |
1572 fill_in_menu (HMENU menu, widget_value *wv) | 1573 fill_in_menu (HMENU menu, widget_value *wv) |
1573 { | 1574 { |
1574 int items_added = 0; | 1575 int items_added = 0; |
1575 | 1576 |
1576 for ( ; wv != NULL; wv = wv->next) | 1577 for ( ; wv != NULL; wv = wv->next) |
1737 is non zero. | 1738 is non zero. |
1738 */ | 1739 */ |
1739 void | 1740 void |
1740 globals_of_w32menu (void) | 1741 globals_of_w32menu (void) |
1741 { | 1742 { |
1742 /* See if Get/SetMenuItemInfo functions are available. */ | 1743 /* See if Get/SetMenuItemInfo functions are available. */ |
1743 HMODULE user32 = GetModuleHandle ("user32.dll"); | 1744 HMODULE user32 = GetModuleHandle ("user32.dll"); |
1744 get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA"); | 1745 get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA"); |
1745 set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA"); | 1746 set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA"); |
1746 unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, "AppendMenuW"); | 1747 unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, "AppendMenuW"); |
1747 unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, "MessageBoxW"); | 1748 unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, "MessageBoxW"); |