commit 061d81c8496f55500ea899349ed75d3762066c62
parent 8bb87b53c97c07733260271e81aac8d04e426918
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Wed, 3 Oct 2012 14:41:15 -0600
get rid of a buttload of prototypes by using static
Diffstat:
M | src/callbacks.c | | | 100 | ++++++++++++++++++++++++++++++------------------------------------------------- |
1 file changed, 38 insertions(+), 62 deletions(-)
diff --git a/src/callbacks.c b/src/callbacks.c
@@ -11,34 +11,6 @@
#include "callbacks.h"
-void inputbox_activate_cb (void *, Evas_Object *, void *);
-void inputbox_changed_cb (void *, Evas_Object *, void *);
-void inputbox_keypress_cb (void *, Evas *, Evas_Object *, void *);
-void inputbox_keyrelease_cb (void *, Evas *, Evas_Object *, void *);
-
-void webview_console_cb(void *, Evas_Object *, const char *, unsigned int, const char *);
-void webview_hoverlink_cb (void *, Evas_Object *, void*);
-void webview_hoverlink_out_cb (void *, Evas_Object *, void*);
-void webview_uri_changed_cb (void *, Evas_Object *, void*);
-void webview_load_finished_cb (void *, Evas_Object *, void*);
-void webview_progress_changed_cb(void *, Evas_Object *, void *);
-void webview_title_changed_cb (void *, Evas_Object *, void *);
-void webview_download_cb (void *, Evas_Object *, void *);
-void inputmethod_changed_cb (void *, Evas_Object *, void *);
-void webview_inspector_cb (void *, Evas_Object *, void *);
-void webview_inspector_close_cb (void *, Evas_Object *, void *);
-void load_error_cb (void *, Evas_Object *, void *);
-void webview_keypress_cb (void *, Evas *, Evas_Object *, void *);
-void webview_focus_in_cb (void *, Evas *, Evas_Object *, void *);
-void webview_focus_out_cb (void *, Evas *, Evas_Object *, void *);
-void webview_mousewheel_cb (void *, Evas *, Evas_Object *, void *);
-void _web_free_cb (void *, Evas *, Evas_Object *, void *);
-void _win_del_request_cb (void *, Evas_Object *, void *);
-void webview_create_window_cb(void*, Evas_Object*, Eina_Bool, const Elm_Web_Window_Features*);
-void populate_visited_links_cb(void *data, Evas_Object *obj, void *event_info);
-
-
-
static Eina_Bool commandhistoryfetch (const Arg *, void *);
static Eina_Bool process_keypress (void *, void*);
@@ -49,7 +21,7 @@ int download_progress_cb(void*, const char*, long int, long int, long int, long
(!strcmp(ev->keyname, "[") && evas_key_modifier_is_set(ev->modifiers, "Control")))
-void
+static void
webview_title_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
Buffer_Data *bd = data;
@@ -63,7 +35,7 @@ webview_title_changed_cb(void *data, Evas_Object *obj, void *event_info)
elm_win_title_set(wd->win, buf);
}
-void
+static void
webview_progress_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
Buffer_Data *td = data;
@@ -80,7 +52,7 @@ webview_progress_changed_cb(void *data, Evas_Object *obj, void *event_info)
*/
}
-void
+static void
load_error_cb(void *data, Evas_Object *obj, void *event_info)
{
/*
@@ -107,10 +79,10 @@ load_error_cb(void *data, Evas_Object *obj, void *event_info)
*/
}
-void
+/*
+static void
webview_inspector_cb(void *data, Evas_Object *obj, void *event_info)
{
- /*
Buffer_Data *bd = data;
Window_Data *wd = bd->window;
@@ -127,13 +99,13 @@ webview_inspector_cb(void *data, Evas_Object *obj, void *event_info)
evas_object_size_hint_weight_set(wd->web_inspector, EVAS_HINT_EXPAND, 0.66);
evas_object_show(wd->web_inspector);
- */
}
+*/
-void
+/*
+static void
webview_inspector_close_cb(void *data, Evas_Object *obj, void *event_info)
{
- /*
Buffer_Data *bd = data;
Window_Data *wd = bd->window;
@@ -142,10 +114,10 @@ webview_inspector_close_cb(void *data, Evas_Object *obj, void *event_info)
ewk_view_web_inspector_view_set(bd->view, NULL);
bd->web_inspector = NULL;
- */
}
+*/
-void
+static void
webview_uri_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
Arg a = { .i = Silent, .s = strdup(JS_SETUP_HINTS) };
@@ -226,7 +198,7 @@ webview_uri_changed_cb(void *data, Evas_Object *obj, void *event_info)
static Eina_Bool escape_input_on_load = TRUE; /* TRUE will disable automatic focusing of input fields via Javascript*/
-void
+static void
webview_load_finished_cb(void *data, Evas_Object *obj, void *event_info)
{
/* WebKitWebSettings *settings = webkit_web_view_get_settings(webview); */
@@ -371,7 +343,7 @@ download_progress_cb(void *data, const char *file, long int dltotal, long int dl
return 0;
}
-void
+static void
webview_download_cb(void *data, Evas_Object *obj, void *event_info)
{
/*
@@ -409,7 +381,7 @@ webview_download_cb(void *data, Evas_Object *obj, void *event_info)
}
-void
+static void
webview_mousewheel_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Buffer_Data *bd = data;
@@ -456,7 +428,7 @@ process_keypress(void *event_info, void *data)
return EINA_FALSE;
}
-void
+static void
webview_focus_in_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
/*
@@ -469,7 +441,7 @@ webview_focus_in_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
*/
}
-void
+static void
webview_focus_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
/*
@@ -482,7 +454,7 @@ webview_focus_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
*/
}
-void
+static void
webview_keypress_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Arg a = { .i = ModeNormal, .s = NULL };
@@ -552,13 +524,14 @@ webview_keypress_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
}
-void
+/*
+static void
webview_hoverlink_cb(void *data, Evas_Object *obj, void *event_info)
{
Buffer_Data *td = data;
const char *uri = ewk_view_uri_get(td->view);
- /* event_info is a char *link[2] where the first string contains the URL
- * and the second the title of the link */
+ // event_info is a char *link[2] where the first string contains the URL
+ // and the second the title of the link
char **link = event_info;
// char *markup;
@@ -575,20 +548,20 @@ webview_hoverlink_cb(void *data, Evas_Object *obj, void *event_info)
update_url(uri, td->window);
}
-void
+static void
webview_hoverlink_out_cb(void *data, Evas_Object *obj, void *event_info)
{
Buffer_Data *td = data;
update_url(ewk_view_uri_get(td->view), td->window);
}
-void
+static void
webview_console_cb(void *data, Evas_Object *obj, const char *message, unsigned int line, const char *source)
{
Arg a;
Buffer_Data *td = data;
- /* Don't change internal mode if the browser doesn't have focus to prevent inconsistent states */
+ // Don't change internal mode if the browser doesn't have focus to prevent inconsistent states
// if (gtk_window_has_toplevel_focus(window)) {
if (elm_object_focus_get(td->window->win)) {
if (!strcmp(message, "hintmode_off") || !strcmp(message, "insertmode_off")) {
@@ -602,8 +575,9 @@ webview_console_cb(void *data, Evas_Object *obj, const char *message, unsigned i
}
}
}
+*/
-void
+static void
inputbox_activate_cb(void *data, Evas_Object *obj, void *event_info)
{
const char *text;
@@ -680,7 +654,7 @@ commandhistoryfetch(const Arg *arg, void *data)
return FALSE;
}
-void
+static void
inputbox_keypress_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Arg a;
@@ -807,7 +781,7 @@ inputbox_keypress_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
}
-void
+static void
inputmethod_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
const char *value = NULL;
@@ -919,7 +893,7 @@ notify_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
*/
-void
+static void
inputbox_keyrelease_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Arg a;
@@ -936,7 +910,7 @@ inputbox_keyrelease_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
/* used for incremental search */
-void
+static void
inputbox_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
Arg a;
@@ -1028,10 +1002,10 @@ inputbox_changed_cb(void *data, Evas_Object *obj, void *event_info)
}
}
-void
+/*
+static void
populate_visited_links_cb(void *data, Evas_Object *obj, void *event_info)
{
- /*
Buffer_Data *bd = data;
App_Data *ad = bd->window->app;
@@ -1043,10 +1017,10 @@ populate_visited_links_cb(void *data, Evas_Object *obj, void *event_info)
Hist_Item *hist_item = t->data;
ewk_view_visited_link_add(bd->view, hist_item_url_get(hist_item));
}
- */
}
+*/
-void
+static void
_web_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Buffer_Data *bd = data;
@@ -1065,7 +1039,7 @@ _web_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
free(bd);
}
-void
+static void
_win_del_request_cb(void *data, Evas_Object *obj, void *event_info)
{
Window_Data *wd = data;
@@ -1074,7 +1048,8 @@ _win_del_request_cb(void *data, Evas_Object *obj, void *event_info)
free(wd);
}
-void
+/*
+static void
webview_create_window_cb(void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *wf)
{
Arg a;
@@ -1082,6 +1057,7 @@ webview_create_window_cb(void *data, Evas_Object *obj, Eina_Bool js, const Elm_W
buffer_add(&a, wd);
}
+*/
void
setup_buffer_callbacks(Buffer_Data *td)
@@ -1098,7 +1074,7 @@ setup_buffer_callbacks(Buffer_Data *td)
evas_object_smart_callback_add(td->view, "inputmethod,changed", inputmethod_changed_cb, td);
/* these signals are not offered by elm_web */
- // evas_object_smart_callback_add(td->view, "load,error", load_error_cb, td);
+ evas_object_smart_callback_add(td->view, "load,error", load_error_cb, td);
// evas_object_smart_callback_add(td->view, "inspector,view,create", webview_inspector_cb, td);
// evas_object_smart_callback_add(td->view, "inspector,view,close", webview_inspector_close_cb, td);
// evas_object_smart_callback_add(td->view, "populate,visited,links", populate_visited_links_cb, td);