return image;
}
-/*ARGSUSED*/
static gint
-toolbar_button_focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+toolbar_button_focus_in_event(GtkWidget *widget UNUSED,
+ GdkEventFocus *event UNUSED,
+ gpointer data UNUSED)
{
- /* When we're in a GtkPlug, we don't have window focus events, only widget focus.
- * To emulate stand-alone gvim, if a button gets focus (e.g., <Tab> into GtkPlug)
- * immediately pass it to mainwin.
- */
+ /* When we're in a GtkPlug, we don't have window focus events, only widget
+ * focus. To emulate stand-alone gvim, if a button gets focus (e.g.,
+ * <Tab> into GtkPlug) immediately pass it to mainwin. */
if (gtk_socket_id != 0)
gtk_widget_grab_focus(gui.drawarea);
gtk_menu_prepend(GTK_MENU(menu->submenu_id), menu->tearoff_handle);
}
-/*ARGSUSED*/
static void
-menu_item_activate(GtkWidget *widget, gpointer data)
+menu_item_activate(GtkWidget *widget UNUSED, gpointer data)
{
gui_menu_cb((vimmenu_T *)data);
#endif
#ifndef USE_FILE_CHOOSER
-/*ARGSUSED*/
static void
-browse_ok_cb(GtkWidget *widget, gpointer cbdata)
+browse_ok_cb(GtkWidget *widget UNUSED, gpointer cbdata)
{
gui_T *vw = (gui_T *)cbdata;
gtk_main_quit();
}
-/*ARGSUSED*/
static void
-browse_cancel_cb(GtkWidget *widget, gpointer cbdata)
+browse_cancel_cb(GtkWidget *widget UNUSED, gpointer cbdata)
{
gui_T *vw = (gui_T *)cbdata;
gtk_main_quit();
}
-/*ARGSUSED*/
static gboolean
-browse_destroy_cb(GtkWidget * widget)
+browse_destroy_cb(GtkWidget *widget UNUSED)
{
if (gui.browse_fname != NULL)
{
* initdir initial directory, NULL for current dir
* filter not used (file name filter)
*/
-/*ARGSUSED*/
char_u *
-gui_mch_browse(int saving,
+gui_mch_browse(int saving UNUSED,
char_u *title,
char_u *dflt,
- char_u *ext,
+ char_u *ext UNUSED,
char_u *initdir,
- char_u *filter)
+ char_u *filter UNUSED)
{
#ifdef USE_FILE_CHOOSER
GtkWidget *fc;
* dflt default name
* initdir initial directory, NULL for current dir
*/
-/*ARGSUSED*/
char_u *
gui_mch_browsedir(
char_u *title,
}
# ifdef FEAT_GUI_GNOME
-/* ARGSUSED */
static int
gui_gnome_dialog( int type,
char_u *title,
GtkWidget *dialog;
} CancelData;
-/* ARGSUSED */
static void
dlg_button_clicked(GtkWidget * widget, ButtonData *data)
{
/*
* This makes the Escape key equivalent to the cancel button.
*/
-/*ARGSUSED*/
static int
dlg_key_press_event(GtkWidget *widget, GdkEventKey *event, CancelData *data)
{
gtk_main_quit();
}
-/* ARGSUSED */
int
gui_mch_dialog( int type, /* type of dialog */
char_u *title, /* title of dialog */
GtkDialog *dialog; /* Widget of the dialog */
} DialogInfo;
-/*ARGSUSED2*/
static gboolean
dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
* Note: The push_in output argument seems to affect scrolling of huge
* menus that don't fit on the screen. Leave it at the default for now.
*/
-/*ARGSUSED0*/
static void
-popup_menu_position_func(GtkMenu *menu,
+popup_menu_position_func(GtkMenu *menu UNUSED,
gint *x, gint *y,
# ifdef HAVE_GTK2
- gboolean *push_in,
+ gboolean *push_in UNUSED,
# endif
- gpointer user_data)
+ gpointer user_data UNUSED)
{
gdk_window_get_origin(gui.drawarea->window, x, y);
GtkWidget *all; /* 'Replace All' action button */
} SharedFindReplace;
-static SharedFindReplace find_widgets = { NULL, };
-static SharedFindReplace repl_widgets = { NULL, };
+static SharedFindReplace find_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+static SharedFindReplace repl_widgets = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
-/* ARGSUSED */
static int
find_key_press_event(
- GtkWidget *widget,
+ GtkWidget *widget UNUSED,
GdkEventKey *event,
SharedFindReplace *frdp)
{
/*
* Callback for actions of the find and replace dialogs
*/
-/*ARGSUSED*/
static void
-find_replace_cb(GtkWidget *widget, gpointer data)
+find_replace_cb(GtkWidget *widget UNUSED, gpointer data)
{
int flags;
char_u *find_text;
}
/* our usual callback function */
-/*ARGSUSED*/
static void
-entry_activate_cb(GtkWidget *widget, gpointer data)
+entry_activate_cb(GtkWidget *widget UNUSED, gpointer data)
{
gtk_widget_grab_focus(GTK_WIDGET(data));
}
/*
* ":helpfind"
*/
-/*ARGSUSED*/
void
ex_helpfind(eap)
- exarg_T *eap;
+ exarg_T *eap UNUSED;
{
/* This will fail when menus are not loaded. Well, it's only for
* backwards compatibility anyway. */
* Doesn't seem possible, since check_copy_area() relies on
* this information. --danielk
*/
-/*ARGSUSED*/
static gint
-visibility_event(GtkWidget *widget, GdkEventVisibility *event, gpointer data)
+visibility_event(GtkWidget *widget UNUSED,
+ GdkEventVisibility *event,
+ gpointer data UNUSED)
{
gui.visibility = event->state;
/*
/*
* Redraw the corresponding portions of the screen.
*/
-/*ARGSUSED*/
static gint
-expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
+expose_event(GtkWidget *widget UNUSED,
+ GdkEventExpose *event,
+ gpointer data UNUSED)
{
/* Skip this when the GUI isn't set up yet, will redraw later. */
if (gui.starting)
/*
* Handle changes to the "Comm" property
*/
-/*ARGSUSED2*/
static gint
-property_event(GtkWidget *widget, GdkEventProperty *event, gpointer data)
+property_event(GtkWidget *widget,
+ GdkEventProperty *event,
+ gpointer data UNUSED)
{
if (event->type == GDK_PROPERTY_NOTIFY
&& event->state == (int)GDK_PROPERTY_NEW_VALUE
blink_state = BLINK_NONE;
}
-/*ARGSUSED*/
static gint
-blink_cb(gpointer data)
+blink_cb(gpointer data UNUSED)
{
if (blink_state == BLINK_ON)
{
}
}
-/*ARGSUSED*/
static gint
-enter_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+enter_notify_event(GtkWidget *widget UNUSED,
+ GdkEventCrossing *event UNUSED,
+ gpointer data UNUSED)
{
if (blink_state == BLINK_NONE)
gui_mch_start_blink();
return FALSE;
}
-/*ARGSUSED*/
static gint
-leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+leave_notify_event(GtkWidget *widget UNUSED,
+ GdkEventCrossing *event UNUSED,
+ gpointer data UNUSED)
{
if (blink_state != BLINK_NONE)
gui_mch_stop_blink();
return FALSE;
}
-/*ARGSUSED*/
static gint
-focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+focus_in_event(GtkWidget *widget,
+ GdkEventFocus *event UNUSED,
+ gpointer data UNUSED)
{
gui_focus_change(TRUE);
return TRUE;
}
-/*ARGSUSED*/
static gint
-focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+focus_out_event(GtkWidget *widget UNUSED,
+ GdkEventFocus *event UNUSED,
+ gpointer data UNUSED)
{
gui_focus_change(FALSE);
/*
* Main keyboard handler:
*/
-/*ARGSUSED*/
static gint
-key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
+key_press_event(GtkWidget *widget UNUSED,
+ GdkEventKey *event,
+ gpointer data UNUSED)
{
#ifdef HAVE_GTK2
/* 256 bytes is way over the top, but for safety let's reduce it only
}
#if defined(FEAT_XIM) && defined(HAVE_GTK2)
-/*ARGSUSED0*/
static gboolean
-key_release_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
+key_release_event(GtkWidget *widget UNUSED,
+ GdkEventKey *event,
+ gpointer data UNUSED)
{
/*
* GTK+ 2 input methods may do fancy stuff on key release events too.
* Selection handlers:
*/
-/*ARGSUSED*/
static gint
-selection_clear_event(GtkWidget *widget,
+selection_clear_event(GtkWidget *widget UNUSED,
GdkEventSelection *event,
- gpointer user_data)
+ gpointer user_data UNUSED)
{
if (event->selection == clip_plus.gtk_sel_atom)
clip_lose_selection(&clip_plus);
#define RS_FAIL 2 /* selection_received_cb() called and failed */
static int received_selection = RS_NONE;
-/*ARGSUSED*/
static void
-selection_received_cb(GtkWidget *widget,
+selection_received_cb(GtkWidget *widget UNUSED,
GtkSelectionData *data,
- guint time_,
- gpointer user_data)
+ guint time_ UNUSED,
+ gpointer user_data UNUSED)
{
VimClipboard *cbd;
char_u *text;
* Prepare our selection data for passing it to the external selection
* client.
*/
-/*ARGSUSED*/
static void
-selection_get_cb(GtkWidget *widget,
+selection_get_cb(GtkWidget *widget UNUSED,
GtkSelectionData *selection_data,
guint info,
- guint time_,
- gpointer user_data)
+ guint time_ UNUSED,
+ gpointer user_data UNUSED)
{
char_u *string;
char_u *tmpbuf;
offshoot = dx > dy ? dx : dy;
- /* Make a linearly declaying timer delay with a threshold of 5 at a
+ /* Make a linearly decaying timer delay with a threshold of 5 at a
* distance of 127 pixels from the main window.
*
* One could think endlessly about the most ergonomic variant here.
/*
* Timer used to recognize multiple clicks of the mouse button.
*/
-/*ARGSUSED0*/
static gint
-motion_repeat_timer_cb(gpointer data)
+motion_repeat_timer_cb(gpointer data UNUSED)
{
int x;
int y;
return FALSE;
}
-/*ARGSUSED2*/
static gint
-motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer data)
+motion_notify_event(GtkWidget *widget,
+ GdkEventMotion *event,
+ gpointer data UNUSED)
{
if (event->is_hint)
{
* by our own timeout mechanism instead of the one provided by GTK+ itself.
* This is due to the way the generic VIM code is recognizing multiple clicks.
*/
-/*ARGSUSED2*/
static gint
-button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
+button_press_event(GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer data UNUSED)
{
int button;
int repeated_click = FALSE;
* GTK+ 2 doesn't handle mouse buttons 4, 5, 6 and 7 the same way as GTK+ 1.
* Instead, it abstracts scrolling via the new GdkEventScroll.
*/
-/*ARGSUSED2*/
static gboolean
-scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
+scroll_event(GtkWidget *widget,
+ GdkEventScroll *event,
+ gpointer data UNUSED)
{
int button;
int_u vim_modifiers;
#endif /* HAVE_GTK2 */
-/*ARGSUSED*/
static gint
-button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
+button_release_event(GtkWidget *widget UNUSED,
+ GdkEventButton *event,
+ gpointer data UNUSED)
{
int x, y;
int_u vim_modifiers;
/*
* DND receiver.
*/
-/*ARGSUSED2*/
static void
drag_data_received_cb(GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *data,
guint info,
guint time_,
- gpointer user_data)
+ gpointer user_data UNUSED)
{
GdkModifierType state;
* be abandoned and pop up a dialog asking the user for confirmation if
* necessary.
*/
-/*ARGSUSED0*/
static void
sm_client_check_changed_any(GnomeClient *client,
gint key,
* for confirmation if necessary. Save the current editing session and tell
* the session manager how to restart Vim.
*/
-/*ARGSUSED1*/
static gboolean
sm_client_save_yourself(GnomeClient *client,
gint phase,
* here since "save_yourself" has been emitted before (unless serious trouble
* is happening).
*/
-/*ARGSUSED0*/
static void
sm_client_die(GnomeClient *client, gpointer data)
{
/*
* GTK tells us that XSMP needs attention
*/
-/*ARGSUSED*/
static gboolean
local_xsmp_handle_requests(source, condition, data)
- GIOChannel *source;
+ GIOChannel *source UNUSED;
GIOCondition condition;
gpointer data;
{
* WM_SAVE_YOURSELF hack it actually stores the session... And yes,
* it should work with KDE as well.
*/
-/*ARGSUSED1*/
static GdkFilterReturn
-global_event_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
+global_event_filter(GdkXEvent *xev,
+ GdkEvent *event UNUSED,
+ gpointer data UNUSED)
{
XEvent *xevent = (XEvent *)xev;
if (xevent != NULL
&& xevent->type == ClientMessage
&& xevent->xclient.message_type == GET_X_ATOM(wm_protocols_atom)
- && xevent->xclient.data.l[0] == GET_X_ATOM(save_yourself_atom))
+ && (long_u)xevent->xclient.data.l[0]
+ == GET_X_ATOM(save_yourself_atom))
{
out_flush();
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
/*
* GDK handler for X ClientMessage events.
*/
-/*ARGSUSED2*/
static GdkFilterReturn
gdk_wm_protocols_filter(GdkXEvent *xev, GdkEvent *event, gpointer data)
{
/*
* Setup the window icon & xcmdsrv comm after the main window has been realized.
*/
-/*ARGSUSED*/
static void
-mainwin_realize(GtkWidget *widget, gpointer data)
+mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
{
/* If you get an error message here, you still need to unpack the runtime
* archive! */
}
#ifdef HAVE_GTK_MULTIHEAD
-/*ARGSUSED1*/
static void
mainwin_screen_changed_cb(GtkWidget *widget,
- GdkScreen *previous_screen,
- gpointer data)
+ GdkScreen *previous_screen UNUSED,
+ gpointer data UNUSED)
{
if (!gtk_widget_has_screen(widget))
return;
* Don't try to set any VIM scrollbar sizes anywhere here. I'm relying on the
* fact that the main VIM engine doesn't take them into account anywhere.
*/
-/*ARGSUSED1*/
static void
-drawarea_realize_cb(GtkWidget *widget, gpointer data)
+drawarea_realize_cb(GtkWidget *widget, gpointer data UNUSED)
{
GtkWidget *sbar;
/*
* Properly clean up on shutdown.
*/
-/*ARGSUSED0*/
static void
-drawarea_unrealize_cb(GtkWidget *widget, gpointer data)
+drawarea_unrealize_cb(GtkWidget *widget UNUSED, gpointer data UNUSED)
{
/* Don't write messages to the GUI anymore */
full_screen = FALSE;
#endif
}
-/*ARGSUSED0*/
static void
-drawarea_style_set_cb(GtkWidget *widget,
- GtkStyle *previous_style,
- gpointer data)
+drawarea_style_set_cb(GtkWidget *widget UNUSED,
+ GtkStyle *previous_style UNUSED,
+ gpointer data UNUSED)
{
gui_mch_new_colors();
}
* Callback routine for the "delete_event" signal on the toplevel window.
* Tries to vim gracefully, or refuses to exit with changed buffers.
*/
-/*ARGSUSED*/
static gint
-delete_event_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
+delete_event_cb(GtkWidget *widget UNUSED,
+ GdkEventAny *event UNUSED,
+ gpointer data UNUSED)
{
gui_shell_closed();
return TRUE;
/* At start-up, don't try to set the hints until the initial
* values have been used (those that dictate our initial size)
- * Let forced (i.e., correct) values thruogh always.
+ * Let forced (i.e., correct) values through always.
*/
if (!(force_width && force_height) && init_window_hints_state > 0)
{
/*
* Handle selecting an item in the tab line popup menu.
*/
-/*ARGSUSED*/
static void
-tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
+tabline_menu_handler(GtkMenuItem *item UNUSED, gpointer user_data)
{
/* Add the string cmd into input buffer */
send_tabline_menu_event(clicked_page, (int)(long)user_data);
/*
* Handle selecting one of the tabs.
*/
-/*ARGSUSED*/
static void
on_select_tab(
- GtkNotebook *notebook,
- GtkNotebookPage *page,
+ GtkNotebook *notebook UNUSED,
+ GtkNotebookPage *page UNUSED,
gint idx,
- gpointer data)
+ gpointer data UNUSED)
{
if (!ignore_tabline_evt)
{
#endif
if (gtk_socket_id != 0)
- /* make sure keybord input can go to the drawarea */
+ /* make sure keyboard input can go to the drawarea */
GTK_WIDGET_SET_FLAGS(gui.drawarea, GTK_CAN_FOCUS);
/*
/*
* This signal informs us about the need to rearrange our sub-widgets.
*/
-/*ARGSUSED*/
static gint
-form_configure_event(GtkWidget *widget, GdkEventConfigure *event,
- gpointer data)
+form_configure_event(GtkWidget *widget UNUSED,
+ GdkEventConfigure *event,
+ gpointer data UNUSED)
{
int usable_height = event->height;
* We can't do much more here than to trying to preserve what had been done,
* since the window is already inevitably going away.
*/
-/*ARGSUSED0*/
static void
-mainwin_destroy_cb(GtkObject *object, gpointer data)
+mainwin_destroy_cb(GtkObject *object UNUSED, gpointer data UNUSED)
{
/* Don't write messages to the GUI anymore */
full_screen = FALSE;
* scrollbar init.), actually do the standard hinst and stop the timer.
* We'll not let the default hints be set while this timer's active.
*/
-/*ARGSUSED*/
static gboolean
-check_startup_plug_hints(gpointer data)
+check_startup_plug_hints(gpointer data UNUSED)
{
if (init_window_hints_state == 1)
{
Columns = w;
if (mask & HeightValue)
{
- if (p_window > h - 1 || !option_was_set((char_u *)"window"))
+ if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
p_window = h - 1;
Rows = h;
}
}
-/*ARGSUSED0*/
void
-gui_mch_exit(int rc)
+gui_mch_exit(int rc UNUSED)
{
if (gui.mainwin != NULL)
gtk_widget_destroy(gui.mainwin);
* report the new size through form_configure_event(). That caused the window
* layout to be messed up.
*/
-/*ARGSUSED0*/
static gboolean
force_shell_resize_idle(gpointer data)
{
/*
* Set the windows size.
*/
-/*ARGSUSED2*/
void
gui_mch_set_shellsize(int width, int height,
- int min_width, int min_height,
- int base_width, int base_height,
- int direction)
+ int min_width UNUSED, int min_height UNUSED,
+ int base_width UNUSED, int base_height UNUSED,
+ int direction UNUSED)
{
#ifndef HAVE_GTK2
/* Hack: When the form already is at the desired size, the window might
}
#if defined(FEAT_TITLE) || defined(PROTO)
-/*ARGSUSED*/
void
-gui_mch_settitle(char_u *title, char_u *icon)
+gui_mch_settitle(char_u *title, char_u *icon UNUSED)
{
# ifdef HAVE_GTK2
if (title != NULL && output_conv.vc_type != CONV_NONE)
* Get a font structure for highlighting.
* "cbdata" is a pointer to the global gui structure.
*/
-/*ARGSUSED*/
static void
font_sel_ok(GtkWidget *wgt, gpointer cbdata)
{
gtk_main_quit();
}
-/*ARGSUSED*/
static void
font_sel_cancel(GtkWidget *wgt, gpointer cbdata)
{
gtk_main_quit();
}
-/*ARGSUSED*/
static void
font_sel_destroy(GtkWidget *wgt, gpointer cbdata)
{
/*
* Try to load the requested fontset.
*/
-/*ARGSUSED2*/
GuiFontset
gui_mch_get_fontset(char_u *name, int report_error, int fixed_width)
{
styled_font[1] = &gui.ital_font;
styled_font[2] = &gui.boldital_font;
- /* First free whatever was freviously there. */
+ /* First free whatever was previously there. */
for (i = 0; i < 3; ++i)
if (*styled_font[i])
{
* Initialize Vim to use the font or fontset with the given name.
* Return FAIL if the font could not be loaded, OK otherwise.
*/
-/*ARGSUSED1*/
int
-gui_mch_init_font(char_u *font_name, int fontset)
+gui_mch_init_font(char_u *font_name, int fontset UNUSED)
{
#ifdef HAVE_GTK2
PangoFontDescription *font_desc;
/*
* Return the name of font "font" in allocated memory.
*/
-/*ARGSUSED*/
char_u *
-gui_mch_get_fontname(GuiFont font, char_u *name)
+gui_mch_get_fontname(GuiFont font, char_u *name UNUSED)
{
# ifdef HAVE_GTK2
if (font != NOFONT)
{
int i;
int offset;
- const static int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
+ static const int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
int y = FILL_Y(row + 1) - 1;
/* Undercurl: draw curl at the bottom of the character cell. */
/*
* Callback function, used when data is available on the SNiFF connection.
*/
-/* ARGSUSED */
static void
sniff_request_cb(
gpointer data,
/*
* Disown the selection.
*/
-/*ARGSUSED*/
void
-clip_mch_lose_selection(VimClipboard *cbd)
+clip_mch_lose_selection(VimClipboard *cbd UNUSED)
{
/* WEIRD: when using NULL to actually disown the selection, we lose the
* selection the first time we own it. */
* Send the current selection to the clipboard. Do nothing for X because we
* will fill in the selection only when requested by another app.
*/
-/*ARGSUSED*/
void
-clip_mch_set_selection(VimClipboard *cbd)
+clip_mch_set_selection(VimClipboard *cbd UNUSED)
{
}
else
id &= ~1; /* they are always even (why?) */
}
- else if (shape < sizeof(mshape_ids) / sizeof(int))
+ else if (shape < (int)(sizeof(mshape_ids) / sizeof(int)))
id = mshape_ids[shape];
else
return;