From 9e05faf3d6ac1c527032efb7210de8bbfeb2212c Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 15 Feb 2008 16:47:10 +0100 Subject: [PATCH] () -> (void) also in .h files, and fix a place that gave arguments when it shouldn't have. --- obt/display.h | 2 +- obt/internal.h | 4 +- obt/keyboard.h | 2 +- obt/mainloop.h | 2 +- obt/parse.h | 2 +- obt/paths.h | 2 +- obt/xevent.h | 2 +- openbox/actions.h | 6 +-- openbox/actions/all.h | 74 ++++++++++++++++++------------------- openbox/client.h | 6 +-- openbox/client_menu.h | 2 +- openbox/config.h | 4 +- openbox/debug.h | 4 +- openbox/dock.h | 4 +- openbox/event.h | 8 ++-- openbox/focus.h | 2 +- openbox/focus_cycle_popup.h | 4 +- openbox/grab.h | 6 +-- openbox/keyboard.h | 4 +- openbox/menu.h | 4 +- openbox/menuframe.h | 2 +- openbox/mouse.h | 4 +- openbox/openbox.c | 4 +- openbox/openbox.h | 8 ++-- openbox/popup.h | 6 +-- openbox/screen.h | 18 ++++----- openbox/stacking.h | 4 +- openbox/startupnotify.h | 4 +- 28 files changed, 97 insertions(+), 97 deletions(-) diff --git a/obt/display.h b/obt/display.h index 8c074b5b..ff20f9c9 100644 --- a/obt/display.h +++ b/obt/display.h @@ -57,7 +57,7 @@ extern gint obt_display_extension_sync_basep; extern Display* obt_display; gboolean obt_display_open(const char *display_name); -void obt_display_close(); +void obt_display_close(void); void obt_display_ignore_errors(gboolean ignore); diff --git a/obt/internal.h b/obt/internal.h index dae854c1..818107dd 100644 --- a/obt/internal.h +++ b/obt/internal.h @@ -20,8 +20,8 @@ #ifndef __obt_internal_h #define __obt_internal_h -void obt_prop_startup(); +void obt_prop_startup(void); -void obt_keyboard_shutdown(); +void obt_keyboard_shutdown(void); #endif /* __obt_internal_h */ diff --git a/obt/keyboard.h b/obt/keyboard.h index a9029df3..dd28cb86 100644 --- a/obt/keyboard.h +++ b/obt/keyboard.h @@ -40,7 +40,7 @@ typedef enum { OBT_KEYBOARD_NUM_MODKEYS } ObtModkeysKey; -void obt_keyboard_reload(); +void obt_keyboard_reload(void); /*! Get the modifier mask(s) for a KeyCode. (eg. a keycode bound to Alt_L could return a mask of (Mod1Mask | Mask3Mask)) */ diff --git a/obt/mainloop.h b/obt/mainloop.h index cce7d5b5..f455d629 100644 --- a/obt/mainloop.h +++ b/obt/mainloop.h @@ -27,7 +27,7 @@ G_BEGIN_DECLS typedef struct _ObtMainLoop ObtMainLoop; -ObtMainLoop *obt_main_loop_new(); +ObtMainLoop *obt_main_loop_new(void); void obt_main_loop_ref(ObtMainLoop *loop); void obt_main_loop_unref(ObtMainLoop *loop); diff --git a/obt/parse.h b/obt/parse.h index 8e5acd72..acc3f5c6 100644 --- a/obt/parse.h +++ b/obt/parse.h @@ -28,7 +28,7 @@ typedef struct _ObtParseInst ObtParseInst; typedef void (*ObtParseCallback)(xmlNodePtr node, gpointer data); -ObtParseInst* obt_parse_instance_new(); +ObtParseInst* obt_parse_instance_new(void); void obt_parse_instance_ref(ObtParseInst *inst); void obt_parse_instance_unref(ObtParseInst *inst); diff --git a/obt/paths.h b/obt/paths.h index a6e32ae1..8753d4f6 100644 --- a/obt/paths.h +++ b/obt/paths.h @@ -25,7 +25,7 @@ G_BEGIN_DECLS typedef struct _ObtPaths ObtPaths; -ObtPaths* obt_paths_new(); +ObtPaths* obt_paths_new(void); void obt_paths_ref(ObtPaths *p); void obt_paths_unref(ObtPaths *p); diff --git a/obt/xevent.h b/obt/xevent.h index a93a1a61..ec0b66e5 100644 --- a/obt/xevent.h +++ b/obt/xevent.h @@ -30,7 +30,7 @@ typedef struct _ObtXEventHandler ObtXEventHandler; typedef void (*ObtXEventCallback) (const XEvent *e, gpointer data); -ObtXEventHandler* xevent_new(); +ObtXEventHandler* xevent_new(void); void xevent_ref(ObtXEventHandler *h); void xevent_unref(ObtXEventHandler *h); diff --git a/openbox/actions.h b/openbox/actions.h index 7975d4eb..7a09a665 100644 --- a/openbox/actions.h +++ b/openbox/actions.h @@ -79,7 +79,7 @@ void actions_act_unref(ObActionsAct *act); void actions_set_need_pointer_replay_before_move(gboolean replay); /*! Returns if a ReplayPointer is still needed. If it was called while running actions then this will be false */ -gboolean actions_get_need_pointer_replay_before_move(); +gboolean actions_get_need_pointer_replay_before_move(void); /*! Pass in a GSList of ObActionsAct's to be run. */ void actions_run_acts(GSList *acts, @@ -91,8 +91,8 @@ void actions_run_acts(GSList *acts, ObFrameContext con, struct _ObClient *client); -gboolean actions_interactive_act_running(); -void actions_interactive_cancel_act(); +gboolean actions_interactive_act_running(void); +void actions_interactive_cancel_act(void); gboolean actions_interactive_input_event(XEvent *e); diff --git a/openbox/actions/all.h b/openbox/actions/all.h index 5f3f573f..35e1537c 100644 --- a/openbox/actions/all.h +++ b/openbox/actions/all.h @@ -1,43 +1,43 @@ #ifndef __actions_all_h #define __actions_all_h -void action_all_startup(); +void action_all_startup(void); -void action_execute_startup(); -void action_debug_startup(); -void action_showmenu_startup(); -void action_showdesktop_startup(); -void action_reconfigure_startup(); -void action_exit_startup(); -void action_restart_startup(); -void action_cyclewindows_startup(); -void action_breakchroot_startup(); -void action_close_startup(); -void action_move_startup(); -void action_focus_startup(); -void action_raise_startup(); -void action_lower_startup(); -void action_raiselower_startup(); -void action_unfocus_startup(); -void action_iconify_startup(); -void action_fullscreen_startup(); -void action_maximize_startup(); -void action_moveresizeto_startup(); -void action_moverelative_startup(); -void action_shade_startup(); -void action_kill_startup(); -void action_omnipresent_startup(); -void action_directionalwindows_startup(); -void action_resize_startup(); -void action_decorations_startup(); -void action_desktop_startup(); -void action_resizerelative_startup(); -void action_addremovedesktop_startup(); -void action_dockautohide_startup(); -void action_layer_startup(); -void action_movetoedge_startup(); -void action_growtoedge_startup(); -void action_if_startup(); -void action_focustobottom_startup(); +void action_execute_startup(void); +void action_debug_startup(void); +void action_showmenu_startup(void); +void action_showdesktop_startup(void); +void action_reconfigure_startup(void); +void action_exit_startup(void); +void action_restart_startup(void); +void action_cyclewindows_startup(void); +void action_breakchroot_startup(void); +void action_close_startup(void); +void action_move_startup(void); +void action_focus_startup(void); +void action_raise_startup(void); +void action_lower_startup(void); +void action_raiselower_startup(void); +void action_unfocus_startup(void); +void action_iconify_startup(void); +void action_fullscreen_startup(void); +void action_maximize_startup(void); +void action_moveresizeto_startup(void); +void action_moverelative_startup(void); +void action_shade_startup(void); +void action_kill_startup(void); +void action_omnipresent_startup(void); +void action_directionalwindows_startup(void); +void action_resize_startup(void); +void action_decorations_startup(void); +void action_desktop_startup(void); +void action_resizerelative_startup(void); +void action_addremovedesktop_startup(void); +void action_dockautohide_startup(void); +void action_layer_startup(void); +void action_movetoedge_startup(void); +void action_growtoedge_startup(void); +void action_if_startup(void); +void action_focustobottom_startup(void); #endif diff --git a/openbox/client.h b/openbox/client.h index c24fcb20..6a396cf4 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -327,7 +327,7 @@ void client_remove_destroy_notify(ObClientCallback func); */ void client_manage(Window win, struct _ObPrompt *prompt); /*! Unmanages all managed windows */ -void client_unmanage_all(); +void client_unmanage_all(void); /*! Unmanages a given client */ void client_unmanage(ObClient *client); @@ -340,7 +340,7 @@ ObClient *client_fake_manage(Window win); void client_fake_unmanage(ObClient *self); /*! Sets the client list on the root window from the client_list */ -void client_set_list(); +void client_set_list(void); /*! Determines if the client should be shown or hidden currently. @return TRUE if it should be visible; otherwise, FALSE. @@ -715,7 +715,7 @@ void client_set_layer(ObClient *self, gint layer); guint client_monitor(ObClient *self); -ObClient* client_under_pointer(); +ObClient* client_under_pointer(void); gboolean client_has_group_siblings(ObClient *self); diff --git a/openbox/client_menu.h b/openbox/client_menu.h index fe145022..5c555168 100644 --- a/openbox/client_menu.h +++ b/openbox/client_menu.h @@ -19,6 +19,6 @@ #ifndef ob__client_menu_h #define ob__client_menu_h -void client_menu_startup(); +void client_menu_startup(void); #endif diff --git a/openbox/config.h b/openbox/config.h index 1f4ae326..8a01ee1f 100644 --- a/openbox/config.h +++ b/openbox/config.h @@ -188,10 +188,10 @@ extern GSList *config_menu_files; extern GSList *config_per_app_settings; void config_startup(ObtParseInst *i); -void config_shutdown(); +void config_shutdown(void); /*! Create an ObAppSettings structure with the default values */ -ObAppSettings* config_create_app_settings(); +ObAppSettings* config_create_app_settings(void); /*! Copies any settings in src to dest, if they are their default value in src. */ void config_app_settings_copy_non_defaults(const ObAppSettings *src, diff --git a/openbox/debug.h b/openbox/debug.h index 3af413a7..a24e66ea 100644 --- a/openbox/debug.h +++ b/openbox/debug.h @@ -21,8 +21,8 @@ #include -void ob_debug_startup(); -void ob_debug_shutdown(); +void ob_debug_startup(void); +void ob_debug_shutdown(void); void ob_debug(const gchar *a, ...); diff --git a/openbox/dock.h b/openbox/dock.h index d632ee74..3463f27b 100644 --- a/openbox/dock.h +++ b/openbox/dock.h @@ -67,12 +67,12 @@ extern StrutPartial dock_strut; void dock_startup(gboolean reconfig); void dock_shutdown(gboolean reconfig); -void dock_configure(); +void dock_configure(void); void dock_hide(gboolean hide); void dock_manage(Window icon_win, Window name_win); -void dock_unmanage_all(); +void dock_unmanage_all(void); void dock_unmanage(ObDockApp *app, gboolean reparent); void dock_app_drag(ObDockApp *app, XMotionEvent *e); diff --git a/openbox/event.h b/openbox/event.h index 65ff915b..cdddc2f5 100644 --- a/openbox/event.h +++ b/openbox/event.h @@ -42,20 +42,20 @@ void event_enter_client(struct _ObClient *client); /*! Make mouse focus not move at all from the stuff that happens between these two function calls. */ -gulong event_start_ignore_all_enters(); +gulong event_start_ignore_all_enters(void); void event_end_ignore_all_enters(gulong start); /*! End *all* active and passive grabs on the keyboard */ -void event_cancel_all_key_grabs(); +void event_cancel_all_key_grabs(void); /* Halts any focus delay in progress, use this when the user is selecting a window for focus */ -void event_halt_focus_delay(); +void event_halt_focus_delay(void); /*! Compare t1 and t2, taking into account wraparound. True if t1 comes at the same time or later than t2. */ gboolean event_time_after(Time t1, Time t2); -Time event_get_server_time(); +Time event_get_server_time(void); #endif diff --git a/openbox/focus.h b/openbox/focus.h index b8f89994..4f37b728 100644 --- a/openbox/focus.h +++ b/openbox/focus.h @@ -41,7 +41,7 @@ void focus_shutdown(gboolean reconfig); void focus_set_client(struct _ObClient *client); /*! Focus nothing, but let keyboard events be caught. */ -void focus_nothing(); +void focus_nothing(void); /*! Call this when you need to focus something! */ struct _ObClient* focus_fallback(gboolean allow_refocus, diff --git a/openbox/focus_cycle_popup.h b/openbox/focus_cycle_popup.h index b940583b..c289be36 100644 --- a/openbox/focus_cycle_popup.h +++ b/openbox/focus_cycle_popup.h @@ -37,13 +37,13 @@ void focus_cycle_popup_show(struct _ObClient *c, gboolean iconic_windows, gboolean all_desktops, gboolean dock_windows, gboolean desktop_windows, ObFocusCyclePopupMode mode); -void focus_cycle_popup_hide(); +void focus_cycle_popup_hide(void); void focus_cycle_popup_single_show(struct _ObClient *c, gboolean iconic_windows, gboolean all_desktops, gboolean dock_windows, gboolean desktop_windows); -void focus_cycle_popup_single_hide(); +void focus_cycle_popup_single_hide(void); #endif diff --git a/openbox/grab.h b/openbox/grab.h index 30c4b709..82536373 100644 --- a/openbox/grab.h +++ b/openbox/grab.h @@ -38,8 +38,8 @@ gint grab_server(gboolean grab); #define grab_pointer(o,c,u) grab_pointer_full(TRUE, (o), (c), (u)) #define ungrab_pointer() grab_pointer_full(FALSE, FALSE, FALSE, OB_CURSOR_NONE) -gboolean grab_on_keyboard(); -gboolean grab_on_pointer(); +gboolean grab_on_keyboard(void); +gboolean grab_on_pointer(void); void grab_button_full(guint button, guint state, Window win, guint mask, gint pointer_mode, ObCursor cursor); @@ -50,6 +50,6 @@ void grab_key(guint keycode, guint state, Window win, gint keyboard_mode); void ungrab_all_keys(Window win); void grab_key_passive_count(int change); -void ungrab_passive_key(); +void ungrab_passive_key(void); #endif diff --git a/openbox/keyboard.h b/openbox/keyboard.h index 995cdbc5..1674cf92 100644 --- a/openbox/keyboard.h +++ b/openbox/keyboard.h @@ -34,11 +34,11 @@ extern KeyBindingTree *keyboard_firstnode; void keyboard_startup(gboolean reconfig); void keyboard_shutdown(gboolean reconfig); -void keyboard_rebind(); +void keyboard_rebind(void); void keyboard_chroot(GList *keylist); gboolean keyboard_bind(GList *keylist, struct _ObActionsAct *action); -void keyboard_unbind_all(); +void keyboard_unbind_all(void); void keyboard_event(struct _ObClient *client, const XEvent *e); /*! @param break_chroots how many chroots to break. -1 means to break them ALL! diff --git a/openbox/menu.h b/openbox/menu.h index c488f67d..43efd413 100644 --- a/openbox/menu.h +++ b/openbox/menu.h @@ -168,13 +168,13 @@ void menu_free(ObMenu *menu); /*! Repopulate a pipe-menu by running its command */ void menu_pipe_execute(ObMenu *self); /*! Clear a pipe-menu's entries */ -void menu_clear_pipe_caches(); +void menu_clear_pipe_caches(void); void menu_show_all_shortcuts(ObMenu *self, gboolean show); void menu_show(gchar *name, gint x, gint y, gboolean mouse, struct _ObClient *client); -gboolean menu_hide_delay_reached(); +gboolean menu_hide_delay_reached(void); void menu_set_show_func(ObMenu *menu, ObMenuShowFunc func); void menu_set_hide_func(ObMenu *menu, ObMenuHideFunc func); diff --git a/openbox/menuframe.h b/openbox/menuframe.h index daac34d2..1d5dd0cb 100644 --- a/openbox/menuframe.h +++ b/openbox/menuframe.h @@ -117,7 +117,7 @@ gboolean menu_frame_show_topmenu(ObMenuFrame *self, gint x, gint y, gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent, ObMenuEntryFrame *parent_entry); -void menu_frame_hide_all(); +void menu_frame_hide_all(void); void menu_frame_hide_all_client(struct _ObClient *client); void menu_frame_render(ObMenuFrame *self); diff --git a/openbox/mouse.h b/openbox/mouse.h index a862fe5b..2bd5d577 100644 --- a/openbox/mouse.h +++ b/openbox/mouse.h @@ -31,7 +31,7 @@ void mouse_shutdown(gboolean reconfig); gboolean mouse_bind(const gchar *buttonstr, const gchar *contextstr, ObMouseAction mact, struct _ObActionsAct *action); -void mouse_unbind_all(); +void mouse_unbind_all(void); void mouse_event(struct _ObClient *client, XEvent *e); @@ -43,6 +43,6 @@ ObFrameContext mouse_button_frame_context(ObFrameContext context, /*! If a replay pointer is needed, then do it. Call this when windows are going to be moving/appearing/disappearing, so that you know the mouse click will go to the right window */ -void mouse_replay_pointer(); +void mouse_replay_pointer(void); #endif diff --git a/openbox/openbox.c b/openbox/openbox.c index d6da5ec7..012666dc 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -148,7 +148,7 @@ gint main(gint argc, gchar **argv) * remote_control = 2 -> restart */ OBT_PROP_MSG(ob_screen, obt_root(ob_screen), OB_CONTROL, remote_control, 0, 0, 0, 0); - obt_display_close(obt_display); + obt_display_close(); exit(EXIT_SUCCESS); } @@ -384,7 +384,7 @@ gint main(gint argc, gchar **argv) session_shutdown(being_replaced); - obt_display_close(obt_display); + obt_display_close(); if (restart) { if (restart_path != NULL) { diff --git a/openbox/openbox.h b/openbox/openbox.h index 471aa779..ba221832 100644 --- a/openbox/openbox.h +++ b/openbox/openbox.h @@ -48,14 +48,14 @@ extern gboolean ob_replace_wm; extern gboolean ob_debug_xinerama; /* The state of execution of the window manager */ -ObState ob_state(); +ObState ob_state(void); void ob_restart_other(const gchar *path); -void ob_restart(); +void ob_restart(void); void ob_exit(gint code); -void ob_exit_replace(); +void ob_exit_replace(void); -void ob_reconfigure(); +void ob_reconfigure(void); void ob_exit_with_error(const gchar *msg); diff --git a/openbox/popup.h b/openbox/popup.h index 2b01ce24..503e2773 100644 --- a/openbox/popup.h +++ b/openbox/popup.h @@ -77,7 +77,7 @@ struct _ObPagerPopup RrAppearance *unhilight; }; -ObPopup *popup_new(); +ObPopup *popup_new(void); void popup_free(ObPopup *self); /*! Position the popup. The gravity rules are not the same X uses for windows, @@ -105,7 +105,7 @@ void popup_hide(ObPopup *self); RrAppearance *popup_icon_appearance(ObPopup *self); -ObIconPopup *icon_popup_new(); +ObIconPopup *icon_popup_new(void); void icon_popup_free(ObIconPopup *self); #define icon_popup_show(s, t, i) icon_popup_delay_show((s),0,(t),(i)) @@ -124,7 +124,7 @@ void icon_popup_delay_show(ObIconPopup *self, gulong usec, #define icon_popup_set_text_align(p, j) popup_set_text_align((p)->popup,(j)) void icon_popup_icon_size_multiplier(ObIconPopup *self, guint wm, guint hm); -ObPagerPopup *pager_popup_new(); +ObPagerPopup *pager_popup_new(void); void pager_popup_free(ObPagerPopup *self); #define pager_popup_show(s, t, d) pager_popup_delay_show((s),0,(t),(d)) diff --git a/openbox/screen.h b/openbox/screen.h index 39871e33..11915f11 100644 --- a/openbox/screen.h +++ b/openbox/screen.h @@ -53,7 +53,7 @@ extern ObDesktopLayout screen_desktop_layout; extern gchar **screen_desktop_names; /*! Take over the screen, set the basic hints on it claming it as ours */ -gboolean screen_annex(); +gboolean screen_annex(void); /*! Once the screen is ours, set up its initial state */ void screen_startup(gboolean reconfig); @@ -61,7 +61,7 @@ void screen_startup(gboolean reconfig); void screen_shutdown(gboolean reconfig); /*! Figure out the new size of the screen and adjust stuff for it */ -void screen_resize(); +void screen_resize(void); /*! Change the number of available desktops */ void screen_set_num_desktops(guint num); @@ -78,7 +78,7 @@ guint screen_find_desktop(guint from, ObDirection dir, /*! Show the desktop popup/notification */ void screen_show_desktop_popup(guint d); /*! Hide it */ -void screen_hide_desktop_popup(); +void screen_hide_desktop_popup(void); /*! Shows and focuses the desktop and hides all the client windows, or returns to the normal state, showing client windows. @@ -89,22 +89,22 @@ void screen_hide_desktop_popup(); void screen_show_desktop(gboolean show, struct _ObClient *show_only); /*! Updates the desktop layout from the root property if available */ -void screen_update_layout(); +void screen_update_layout(void); /*! Get desktop names from the root window property */ -void screen_update_desktop_names(); +void screen_update_desktop_names(void); /*! Installs or uninstalls a colormap for a client. If client is NULL, then it handles the root colormap. */ void screen_install_colormap(struct _ObClient *client, gboolean install); -void screen_update_areas(); +void screen_update_areas(void); -Rect *screen_physical_area_all_monitors(); +Rect *screen_physical_area_all_monitors(void); Rect *screen_physical_area_monitor(guint head); -Rect *screen_physical_area_active(); +Rect *screen_physical_area_active(void); /* doesn't include struts which the search area is already outside of when 'search' is not NULL */ @@ -127,7 +127,7 @@ guint screen_find_monitor(Rect *search); /*! Sets the root cursor. This function decides which cursor to use, but you gotta call it to let it know it should change. */ -void screen_set_root_cursor(); +void screen_set_root_cursor(void); /*! Gives back the pointer's position in x and y. Returns TRUE if the pointer is on this screen and FALSE if it is on another screen. */ diff --git a/openbox/stacking.h b/openbox/stacking.h index e226f36f..773f6588 100644 --- a/openbox/stacking.h +++ b/openbox/stacking.h @@ -43,7 +43,7 @@ extern GList *stacking_list; /*! Sets the window stacking list on the root window from the stacking_list */ -void stacking_set_list(); +void stacking_set_list(void); void stacking_add(struct _ObWindow *win); void stacking_add_nonintrusive(struct _ObWindow *win); @@ -56,7 +56,7 @@ void stacking_raise(struct _ObWindow *window); void stacking_temp_raise(struct _ObWindow *window); /*! Restores any temporarily raised windows to their correct place */ -void stacking_restore(); +void stacking_restore(void); /*! Lowers a window below all others in its stacking layer */ void stacking_lower(struct _ObWindow *window); diff --git a/openbox/startupnotify.h b/openbox/startupnotify.h index 758beee6..d524bcaa 100644 --- a/openbox/startupnotify.h +++ b/openbox/startupnotify.h @@ -25,7 +25,7 @@ void sn_startup(gboolean reconfig); void sn_shutdown(gboolean reconfig); -gboolean sn_app_starting(); +gboolean sn_app_starting(void); /*! Notify that an app has started @param wmclass the WM_CLASS[1] hint @@ -45,6 +45,6 @@ void sn_setup_spawn_environment(const gchar *program, const gchar *name, /* Tell startup notification we're not actually running the program we told it we were */ -void sn_spawn_cancel(); +void sn_spawn_cancel(void); #endif