diff options
| author | Paul Eggert | 2016-01-20 14:55:09 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-01-20 14:55:57 -0800 |
| commit | 9d7265ba1a3f93e107a88c3fc4b76557e36192b5 (patch) | |
| tree | 634801dc846d2fa73ea649462e8ecae1a35c036b /src | |
| parent | 6a9399f7fd3ea6f4eaa0c6ceee92308553fadd39 (diff) | |
| download | emacs-9d7265ba1a3f93e107a88c3fc4b76557e36192b5.tar.gz emacs-9d7265ba1a3f93e107a88c3fc4b76557e36192b5.zip | |
Don’t export C symbols not used elsewhere
These were recently added, mostly as part of xwidget code.
* src/emacsgtkfixed.c (emacs_fixed_get_type): Now static.
(EMACS_FIXED, EMACS_FIXED_GET_CLASS):
Now static functions here, not macros in emacsgtkfixed.h.
* src/emacsgtkfixed.h (EMACS_TYPE_FIXED):
Remove. All uses replaced by definiens.
(EMACS_FIXED, EMACS_FIXED_GET_CLASS):
Remove; these are now static functions in emacsgtkfixed.c.
(EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS):
Remove; unused.
(emacs_fixed_get_type): Remove decl; no longer extern.
* src/xwidget.c (offscreen_damage_event)
(webkit_mime_type_policy_typedecision_requested_cb)
(webkit_new_window_policy_decision_requested_cb)
(webkit_navigation_policy_decision_requested_cb)
(xwidget_spec_value, xwidget_view_lookup)
(xwidget_start_redisplay, xwidget_touch):
Now static.
* src/xwidget.h (xwidget_start_redisplay, xwidget_touch):
Remove decls.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacsgtkfixed.c | 20 | ||||
| -rw-r--r-- | src/emacsgtkfixed.h | 8 | ||||
| -rw-r--r-- | src/xwidget.c | 36 | ||||
| -rw-r--r-- | src/xwidget.h | 3 |
4 files changed, 35 insertions, 32 deletions
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index da1017df2ae..08b840389c5 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -50,10 +50,26 @@ static void emacs_fixed_get_preferred_width (GtkWidget *widget, | |||
| 50 | static void emacs_fixed_get_preferred_height (GtkWidget *widget, | 50 | static void emacs_fixed_get_preferred_height (GtkWidget *widget, |
| 51 | gint *minimum, | 51 | gint *minimum, |
| 52 | gint *natural); | 52 | gint *natural); |
| 53 | |||
| 54 | static GType emacs_fixed_get_type (void); | ||
| 53 | G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED) | 55 | G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED) |
| 54 | 56 | ||
| 57 | static EmacsFixed * | ||
| 58 | EMACS_FIXED (GtkWidget *widget) | ||
| 59 | { | ||
| 60 | return G_TYPE_CHECK_INSTANCE_CAST (widget, emacs_fixed_get_type (), | ||
| 61 | EmacsFixed); | ||
| 62 | } | ||
| 63 | |||
| 55 | #ifdef HAVE_XWIDGETS | 64 | #ifdef HAVE_XWIDGETS |
| 56 | 65 | ||
| 66 | static EmacsFixedClass * | ||
| 67 | EMACS_FIXED_GET_CLASS (GtkWidget *widget) | ||
| 68 | { | ||
| 69 | return G_TYPE_INSTANCE_GET_CLASS (widget, emacs_fixed_get_type (), | ||
| 70 | EmacsFixedClass); | ||
| 71 | } | ||
| 72 | |||
| 57 | struct GtkFixedPrivateL | 73 | struct GtkFixedPrivateL |
| 58 | { | 74 | { |
| 59 | GList *children; | 75 | GList *children; |
| @@ -151,7 +167,7 @@ emacs_fixed_class_init (EmacsFixedClass *klass) | |||
| 151 | static void | 167 | static void |
| 152 | emacs_fixed_init (EmacsFixed *fixed) | 168 | emacs_fixed_init (EmacsFixed *fixed) |
| 153 | { | 169 | { |
| 154 | fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, EMACS_TYPE_FIXED, | 170 | fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, emacs_fixed_get_type (), |
| 155 | EmacsFixedPrivate); | 171 | EmacsFixedPrivate); |
| 156 | fixed->priv->f = 0; | 172 | fixed->priv->f = 0; |
| 157 | } | 173 | } |
| @@ -166,7 +182,7 @@ emacs_fixed_init (EmacsFixed *fixed) | |||
| 166 | GtkWidget* | 182 | GtkWidget* |
| 167 | emacs_fixed_new (struct frame *f) | 183 | emacs_fixed_new (struct frame *f) |
| 168 | { | 184 | { |
| 169 | EmacsFixed *fixed = g_object_new (EMACS_TYPE_FIXED, NULL); | 185 | EmacsFixed *fixed = g_object_new (emacs_fixed_get_type (), NULL); |
| 170 | EmacsFixedPrivate *priv = fixed->priv; | 186 | EmacsFixedPrivate *priv = fixed->priv; |
| 171 | priv->f = f; | 187 | priv->f = f; |
| 172 | return GTK_WIDGET (fixed); | 188 | return GTK_WIDGET (fixed); |
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index 5b2fa566785..378bd2b828c 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h | |||
| @@ -29,13 +29,6 @@ G_BEGIN_DECLS | |||
| 29 | 29 | ||
| 30 | struct frame; | 30 | struct frame; |
| 31 | 31 | ||
| 32 | #define EMACS_TYPE_FIXED (emacs_fixed_get_type ()) | ||
| 33 | #define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed)) | ||
| 34 | #define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass)) | ||
| 35 | #define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMACS_TYPE_FIXED)) | ||
| 36 | #define EMACS_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EMACS_TYPE_FIXED)) | ||
| 37 | #define EMACS_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EMACS_TYPE_FIXED, EmacsFixedClass)) | ||
| 38 | |||
| 39 | //typedef struct _EmacsFixed EmacsFixed; | 32 | //typedef struct _EmacsFixed EmacsFixed; |
| 40 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; | 33 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; |
| 41 | typedef struct _EmacsFixedClass EmacsFixedClass; | 34 | typedef struct _EmacsFixedClass EmacsFixedClass; |
| @@ -55,7 +48,6 @@ struct _EmacsFixedClass | |||
| 55 | }; | 48 | }; |
| 56 | 49 | ||
| 57 | extern GtkWidget *emacs_fixed_new (struct frame *f); | 50 | extern GtkWidget *emacs_fixed_new (struct frame *f); |
| 58 | extern GType emacs_fixed_get_type (void); | ||
| 59 | 51 | ||
| 60 | G_END_DECLS | 52 | G_END_DECLS |
| 61 | 53 | ||
diff --git a/src/xwidget.c b/src/xwidget.c index f8e13cd4522..ea5dea0f9fe 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -123,14 +123,13 @@ allocate_xwidget_view (void) | |||
| 123 | #define XSETXWIDGET(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET)) | 123 | #define XSETXWIDGET(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET)) |
| 124 | #define XSETXWIDGET_VIEW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET_VIEW)) | 124 | #define XSETXWIDGET_VIEW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET_VIEW)) |
| 125 | 125 | ||
| 126 | struct xwidget_view *xwidget_view_lookup (struct xwidget *, struct window *); | 126 | static struct xwidget_view *xwidget_view_lookup (struct xwidget *, |
| 127 | Lisp_Object xwidget_spec_value (Lisp_Object , Lisp_Object , int *); | 127 | struct window *); |
| 128 | gboolean offscreen_damage_event (GtkWidget * , GdkEvent * , gpointer ); | 128 | static void webkit_document_load_finished_cb (WebKitWebView *, WebKitWebFrame *, |
| 129 | void webkit_document_load_finished_cb (WebKitWebView *, WebKitWebFrame *, | 129 | gpointer); |
| 130 | gpointer ); | 130 | static gboolean webkit_download_cb (WebKitWebView *, WebKitDownload *, gpointer); |
| 131 | gboolean webkit_download_cb (WebKitWebView *, WebKitDownload *, gpointer); | ||
| 132 | 131 | ||
| 133 | gboolean | 132 | static gboolean |
| 134 | webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *, | 133 | webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *, |
| 135 | WebKitWebFrame *, | 134 | WebKitWebFrame *, |
| 136 | WebKitNetworkRequest *, | 135 | WebKitNetworkRequest *, |
| @@ -138,7 +137,7 @@ webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *, | |||
| 138 | WebKitWebPolicyDecision *, | 137 | WebKitWebPolicyDecision *, |
| 139 | gpointer); | 138 | gpointer); |
| 140 | 139 | ||
| 141 | gboolean | 140 | static gboolean |
| 142 | webkit_new_window_policy_decision_requested_cb (WebKitWebView *, | 141 | webkit_new_window_policy_decision_requested_cb (WebKitWebView *, |
| 143 | WebKitWebFrame *, | 142 | WebKitWebFrame *, |
| 144 | WebKitNetworkRequest *, | 143 | WebKitNetworkRequest *, |
| @@ -146,7 +145,7 @@ webkit_new_window_policy_decision_requested_cb (WebKitWebView *, | |||
| 146 | WebKitWebPolicyDecision *, | 145 | WebKitWebPolicyDecision *, |
| 147 | gpointer); | 146 | gpointer); |
| 148 | 147 | ||
| 149 | gboolean | 148 | static gboolean |
| 150 | webkit_navigation_policy_decision_requested_cb (WebKitWebView *, | 149 | webkit_navigation_policy_decision_requested_cb (WebKitWebView *, |
| 151 | WebKitWebFrame *, | 150 | WebKitWebFrame *, |
| 152 | WebKitNetworkRequest *, | 151 | WebKitNetworkRequest *, |
| @@ -261,8 +260,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */) | |||
| 261 | { | 260 | { |
| 262 | g_signal_connect (G_OBJECT (xw->widget_osr), | 261 | g_signal_connect (G_OBJECT (xw->widget_osr), |
| 263 | "document-load-finished", | 262 | "document-load-finished", |
| 264 | G_CALLBACK | 263 | G_CALLBACK (webkit_document_load_finished_cb), xw); |
| 265 | (webkit_document_load_finished_cb), xw); | ||
| 266 | 264 | ||
| 267 | g_signal_connect (G_OBJECT (xw->widget_osr), | 265 | g_signal_connect (G_OBJECT (xw->widget_osr), |
| 268 | "download-requested", | 266 | "download-requested", |
| @@ -352,7 +350,7 @@ xwidget_hide_view (struct xwidget_view *xv) | |||
| 352 | 350 | ||
| 353 | /* When the off-screen webkit master view changes this signal is called. | 351 | /* When the off-screen webkit master view changes this signal is called. |
| 354 | It copies the bitmap from the off-screen instance. */ | 352 | It copies the bitmap from the off-screen instance. */ |
| 355 | gboolean | 353 | static gboolean |
| 356 | offscreen_damage_event (GtkWidget * widget, GdkEvent * event, | 354 | offscreen_damage_event (GtkWidget * widget, GdkEvent * event, |
| 357 | gpointer xv_widget) | 355 | gpointer xv_widget) |
| 358 | { | 356 | { |
| @@ -415,7 +413,7 @@ webkit_download_cb (WebKitWebView * webkitwebview, | |||
| 415 | return FALSE; | 413 | return FALSE; |
| 416 | } | 414 | } |
| 417 | 415 | ||
| 418 | gboolean | 416 | static gboolean |
| 419 | webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView, | 417 | webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView, |
| 420 | WebKitWebFrame *frame, | 418 | WebKitWebFrame *frame, |
| 421 | WebKitNetworkRequest * request, | 419 | WebKitNetworkRequest * request, |
| @@ -438,7 +436,7 @@ webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView, | |||
| 438 | } | 436 | } |
| 439 | 437 | ||
| 440 | 438 | ||
| 441 | gboolean | 439 | static gboolean |
| 442 | webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView, | 440 | webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView, |
| 443 | WebKitWebFrame *frame, | 441 | WebKitWebFrame *frame, |
| 444 | WebKitNetworkRequest *request, | 442 | WebKitNetworkRequest *request, |
| @@ -456,7 +454,7 @@ webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView, | |||
| 456 | return FALSE; | 454 | return FALSE; |
| 457 | } | 455 | } |
| 458 | 456 | ||
| 459 | gboolean | 457 | static gboolean |
| 460 | webkit_navigation_policy_decision_requested_cb (WebKitWebView *webView, | 458 | webkit_navigation_policy_decision_requested_cb (WebKitWebView *webView, |
| 461 | WebKitWebFrame *frame, | 459 | WebKitWebFrame *frame, |
| 462 | WebKitNetworkRequest *request, | 460 | WebKitNetworkRequest *request, |
| @@ -1138,7 +1136,7 @@ valid_xwidget_spec_p (Lisp_Object object) | |||
| 1138 | 1136 | ||
| 1139 | 1137 | ||
| 1140 | /* Find a value associated with key in spec. */ | 1138 | /* Find a value associated with key in spec. */ |
| 1141 | Lisp_Object | 1139 | static Lisp_Object |
| 1142 | xwidget_spec_value (Lisp_Object spec, Lisp_Object key, int *found) | 1140 | xwidget_spec_value (Lisp_Object spec, Lisp_Object key, int *found) |
| 1143 | { | 1141 | { |
| 1144 | Lisp_Object tail; | 1142 | Lisp_Object tail; |
| @@ -1180,7 +1178,7 @@ xwidget_view_delete_all_in_window (struct window *w) | |||
| 1180 | } | 1178 | } |
| 1181 | } | 1179 | } |
| 1182 | 1180 | ||
| 1183 | struct xwidget_view * | 1181 | static struct xwidget_view * |
| 1184 | xwidget_view_lookup (struct xwidget *xw, struct window *w) | 1182 | xwidget_view_lookup (struct xwidget *xw, struct window *w) |
| 1185 | { | 1183 | { |
| 1186 | Lisp_Object xwidget, window, ret; | 1184 | Lisp_Object xwidget, window, ret; |
| @@ -1210,7 +1208,7 @@ lookup_xwidget (Lisp_Object spec) | |||
| 1210 | } | 1208 | } |
| 1211 | 1209 | ||
| 1212 | /* Set up detection of touched xwidget */ | 1210 | /* Set up detection of touched xwidget */ |
| 1213 | void | 1211 | static void |
| 1214 | xwidget_start_redisplay (void) | 1212 | xwidget_start_redisplay (void) |
| 1215 | { | 1213 | { |
| 1216 | for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail); | 1214 | for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail); |
| @@ -1223,7 +1221,7 @@ xwidget_start_redisplay (void) | |||
| 1223 | 1221 | ||
| 1224 | /* The xwidget was touched during redisplay, so it isn't a candidate | 1222 | /* The xwidget was touched during redisplay, so it isn't a candidate |
| 1225 | for hiding. */ | 1223 | for hiding. */ |
| 1226 | void | 1224 | static void |
| 1227 | xwidget_touch (struct xwidget_view *xv) | 1225 | xwidget_touch (struct xwidget_view *xv) |
| 1228 | { | 1226 | { |
| 1229 | xv->redisplayed = 1; | 1227 | xv->redisplayed = 1; |
diff --git a/src/xwidget.h b/src/xwidget.h index 4dffaa4750d..fdcf40d8cbb 100644 --- a/src/xwidget.h +++ b/src/xwidget.h | |||
| @@ -121,11 +121,8 @@ struct xwidget_type | |||
| 121 | 121 | ||
| 122 | struct xwidget *xwidget_from_id (int id); | 122 | struct xwidget *xwidget_from_id (int id); |
| 123 | 123 | ||
| 124 | void xwidget_start_redisplay (void); | ||
| 125 | void xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix); | 124 | void xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix); |
| 126 | 125 | ||
| 127 | void xwidget_touch (struct xwidget_view *xw); | ||
| 128 | |||
| 129 | struct xwidget *lookup_xwidget (Lisp_Object spec); | 126 | struct xwidget *lookup_xwidget (Lisp_Object spec); |
| 130 | #define XG_XWIDGET "emacs_xwidget" | 127 | #define XG_XWIDGET "emacs_xwidget" |
| 131 | #define XG_XWIDGET_VIEW "emacs_xwidget_view" | 128 | #define XG_XWIDGET_VIEW "emacs_xwidget_view" |