aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32menu.c
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-06 16:22:29 +0200
committerJuanma Barranquero2010-07-06 16:22:29 +0200
commitb56ceb92bf4d470af2e9172d1fcd4d85232c40a6 (patch)
tree50ab60b4715be45ed671c386c5b9336b45443539 /src/w32menu.c
parent7af07b967171736a35e0af8b6ecf6feb072184dc (diff)
downloademacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.tar.gz
emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.zip
src/w32*.c: Convert function definitions to standard C.
Diffstat (limited to 'src/w32menu.c')
-rw-r--r--src/w32menu.c53
1 files changed, 21 insertions, 32 deletions
diff --git a/src/w32menu.c b/src/w32menu.c
index 2c8a5308d3b..37be0bd028d 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -59,8 +59,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
59 59
60HMENU current_popup_menu; 60HMENU current_popup_menu;
61 61
62void syms_of_w32menu (); 62void syms_of_w32menu (void);
63void globals_of_w32menu (); 63void globals_of_w32menu (void);
64 64
65typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) ( 65typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) (
66 IN HMENU, 66 IN HMENU,
@@ -116,8 +116,7 @@ int pending_menu_activation;
116 ID, or 0 if none. */ 116 ID, or 0 if none. */
117 117
118static struct frame * 118static struct frame *
119menubar_id_to_frame (id) 119menubar_id_to_frame (HMENU id)
120 HMENU id;
121{ 120{
122 Lisp_Object tail, frame; 121 Lisp_Object tail, frame;
123 FRAME_PTR f; 122 FRAME_PTR f;
@@ -276,8 +275,7 @@ otherwise it is "Question". */)
276 This way we can safely execute Lisp code. */ 275 This way we can safely execute Lisp code. */
277 276
278void 277void
279x_activate_menubar (f) 278x_activate_menubar (FRAME_PTR f)
280 FRAME_PTR f;
281{ 279{
282 set_frame_menubar (f, 0, 1); 280 set_frame_menubar (f, 0, 1);
283 281
@@ -386,10 +384,7 @@ menubar_selection_callback (FRAME_PTR f, void * client_data)
386 it is set the first time this is called, from initialize_frame_menubar. */ 384 it is set the first time this is called, from initialize_frame_menubar. */
387 385
388void 386void
389set_frame_menubar (f, first_time, deep_p) 387set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
390 FRAME_PTR f;
391 int first_time;
392 int deep_p;
393{ 388{
394 HMENU menubar_widget = f->output_data.w32->menubar_widget; 389 HMENU menubar_widget = f->output_data.w32->menubar_widget;
395 Lisp_Object items; 390 Lisp_Object items;
@@ -648,8 +643,7 @@ set_frame_menubar (f, first_time, deep_p)
648 is visible. */ 643 is visible. */
649 644
650void 645void
651initialize_frame_menubar (f) 646initialize_frame_menubar (FRAME_PTR f)
652 FRAME_PTR f;
653{ 647{
654 /* This function is called before the first chance to redisplay 648 /* This function is called before the first chance to redisplay
655 the frame. It has to be, so the frame will have the right size. */ 649 the frame. It has to be, so the frame will have the right size. */
@@ -661,8 +655,7 @@ initialize_frame_menubar (f)
661 This is used when deleting a frame, and when turning off the menu bar. */ 655 This is used when deleting a frame, and when turning off the menu bar. */
662 656
663void 657void
664free_frame_menubar (f) 658free_frame_menubar (FRAME_PTR f)
665 FRAME_PTR f;
666{ 659{
667 BLOCK_INPUT; 660 BLOCK_INPUT;
668 661
@@ -1020,11 +1013,9 @@ static char * button_names [] = {
1020 "button6", "button7", "button8", "button9", "button10" }; 1013 "button6", "button7", "button8", "button9", "button10" };
1021 1014
1022static Lisp_Object 1015static Lisp_Object
1023w32_dialog_show (f, keymaps, title, header, error) 1016w32_dialog_show (FRAME_PTR f, int keymaps,
1024 FRAME_PTR f; 1017 Lisp_Object title, Lisp_Object header,
1025 int keymaps; 1018 char **error)
1026 Lisp_Object title, header;
1027 char **error;
1028{ 1019{
1029 int i, nb_buttons=0; 1020 int i, nb_buttons=0;
1030 char dialog_name[6]; 1021 char dialog_name[6];
@@ -1213,8 +1204,8 @@ w32_dialog_show (f, keymaps, title, header, error)
1213 anywhere in Emacs that uses the other specific dialog choices that 1204 anywhere in Emacs that uses the other specific dialog choices that
1214 MessageBox provides. */ 1205 MessageBox provides. */
1215 1206
1216static int is_simple_dialog (contents) 1207static int
1217 Lisp_Object contents; 1208is_simple_dialog (Lisp_Object contents)
1218{ 1209{
1219 Lisp_Object options = XCDR (contents); 1210 Lisp_Object options = XCDR (contents);
1220 Lisp_Object name, yes, no, other; 1211 Lisp_Object name, yes, no, other;
@@ -1249,9 +1240,8 @@ static int is_simple_dialog (contents)
1249 return !(CONSP (options)); 1240 return !(CONSP (options));
1250} 1241}
1251 1242
1252static Lisp_Object simple_dialog_show (f, contents, header) 1243static Lisp_Object
1253 FRAME_PTR f; 1244simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header)
1254 Lisp_Object contents, header;
1255{ 1245{
1256 int answer; 1246 int answer;
1257 UINT type; 1247 UINT type;
@@ -1315,8 +1305,7 @@ static Lisp_Object simple_dialog_show (f, contents, header)
1315 1305
1316/* Is this item a separator? */ 1306/* Is this item a separator? */
1317static int 1307static int
1318name_is_separator (name) 1308name_is_separator (char *name)
1319 char *name;
1320{ 1309{
1321 char *start = name; 1310 char *start = name;
1322 1311
@@ -1647,8 +1636,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
1647 1636
1648/* Free memory used by owner-drawn strings. */ 1637/* Free memory used by owner-drawn strings. */
1649static void 1638static void
1650w32_free_submenu_strings (menu) 1639w32_free_submenu_strings (HMENU menu)
1651 HMENU menu;
1652{ 1640{
1653 int i, num = GetMenuItemCount (menu); 1641 int i, num = GetMenuItemCount (menu);
1654 for (i = 0; i < num; i++) 1642 for (i = 0; i < num; i++)
@@ -1676,8 +1664,7 @@ w32_free_submenu_strings (menu)
1676} 1664}
1677 1665
1678void 1666void
1679w32_free_menu_strings (hwnd) 1667w32_free_menu_strings (HWND hwnd)
1680 HWND hwnd;
1681{ 1668{
1682 HMENU menu = current_popup_menu; 1669 HMENU menu = current_popup_menu;
1683 1670
@@ -1712,7 +1699,8 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
1712#endif /* HAVE_MENUS */ 1699#endif /* HAVE_MENUS */
1713} 1700}
1714 1701
1715void syms_of_w32menu () 1702void
1703syms_of_w32menu (void)
1716{ 1704{
1717 globals_of_w32menu (); 1705 globals_of_w32menu ();
1718 1706
@@ -1734,7 +1722,8 @@ void syms_of_w32menu ()
1734 variable initialized is 0 and directly from main when initialized 1722 variable initialized is 0 and directly from main when initialized
1735 is non zero. 1723 is non zero.
1736 */ 1724 */
1737void globals_of_w32menu () 1725void
1726globals_of_w32menu (void)
1738{ 1727{
1739 /* See if Get/SetMenuItemInfo functions are available. */ 1728 /* See if Get/SetMenuItemInfo functions are available. */
1740 HMODULE user32 = GetModuleHandle ("user32.dll"); 1729 HMODULE user32 = GetModuleHandle ("user32.dll");