summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-01-20 14:55:09 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-01-20 14:55:57 -0800
commit9d7265ba1a3f93e107a88c3fc4b76557e36192b5 (patch)
tree634801dc846d2fa73ea649462e8ecae1a35c036b
parent6a9399f7fd3ea6f4eaa0c6ceee92308553fadd39 (diff)
downloademacs-9d7265ba1a3f93e107a88c3fc4b76557e36192b5.tar.gz
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.
-rw-r--r--src/emacsgtkfixed.c20
-rw-r--r--src/emacsgtkfixed.h8
-rw-r--r--src/xwidget.c36
-rw-r--r--src/xwidget.h3
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,
static void emacs_fixed_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural);
+
+static GType emacs_fixed_get_type (void);
G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED)
+static EmacsFixed *
+EMACS_FIXED (GtkWidget *widget)
+{
+ return G_TYPE_CHECK_INSTANCE_CAST (widget, emacs_fixed_get_type (),
+ EmacsFixed);
+}
+
#ifdef HAVE_XWIDGETS
+static EmacsFixedClass *
+EMACS_FIXED_GET_CLASS (GtkWidget *widget)
+{
+ return G_TYPE_INSTANCE_GET_CLASS (widget, emacs_fixed_get_type (),
+ EmacsFixedClass);
+}
+
struct GtkFixedPrivateL
{
GList *children;
@@ -151,7 +167,7 @@ emacs_fixed_class_init (EmacsFixedClass *klass)
static void
emacs_fixed_init (EmacsFixed *fixed)
{
- fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, EMACS_TYPE_FIXED,
+ fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed, emacs_fixed_get_type (),
EmacsFixedPrivate);
fixed->priv->f = 0;
}
@@ -166,7 +182,7 @@ emacs_fixed_init (EmacsFixed *fixed)
GtkWidget*
emacs_fixed_new (struct frame *f)
{
- EmacsFixed *fixed = g_object_new (EMACS_TYPE_FIXED, NULL);
+ EmacsFixed *fixed = g_object_new (emacs_fixed_get_type (), NULL);
EmacsFixedPrivate *priv = fixed->priv;
priv->f = f;
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
struct frame;
-#define EMACS_TYPE_FIXED (emacs_fixed_get_type ())
-#define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed))
-#define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass))
-#define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMACS_TYPE_FIXED))
-#define EMACS_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EMACS_TYPE_FIXED))
-#define EMACS_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EMACS_TYPE_FIXED, EmacsFixedClass))
-
//typedef struct _EmacsFixed EmacsFixed;
typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
typedef struct _EmacsFixedClass EmacsFixedClass;
@@ -55,7 +48,6 @@ struct _EmacsFixedClass
};
extern GtkWidget *emacs_fixed_new (struct frame *f);
-extern GType emacs_fixed_get_type (void);
G_END_DECLS
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)
#define XSETXWIDGET(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET))
#define XSETXWIDGET_VIEW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_XWIDGET_VIEW))
-struct xwidget_view *xwidget_view_lookup (struct xwidget *, struct window *);
-Lisp_Object xwidget_spec_value (Lisp_Object , Lisp_Object , int *);
-gboolean offscreen_damage_event (GtkWidget * , GdkEvent * , gpointer );
-void webkit_document_load_finished_cb (WebKitWebView *, WebKitWebFrame *,
- gpointer );
-gboolean webkit_download_cb (WebKitWebView *, WebKitDownload *, gpointer);
+static struct xwidget_view *xwidget_view_lookup (struct xwidget *,
+ struct window *);
+static void webkit_document_load_finished_cb (WebKitWebView *, WebKitWebFrame *,
+ gpointer);
+static gboolean webkit_download_cb (WebKitWebView *, WebKitDownload *, gpointer);
-gboolean
+static gboolean
webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *,
WebKitWebFrame *,
WebKitNetworkRequest *,
@@ -138,7 +137,7 @@ webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *,
WebKitWebPolicyDecision *,
gpointer);
-gboolean
+static gboolean
webkit_new_window_policy_decision_requested_cb (WebKitWebView *,
WebKitWebFrame *,
WebKitNetworkRequest *,
@@ -146,7 +145,7 @@ webkit_new_window_policy_decision_requested_cb (WebKitWebView *,
WebKitWebPolicyDecision *,
gpointer);
-gboolean
+static gboolean
webkit_navigation_policy_decision_requested_cb (WebKitWebView *,
WebKitWebFrame *,
WebKitNetworkRequest *,
@@ -261,8 +260,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */)
{
g_signal_connect (G_OBJECT (xw->widget_osr),
"document-load-finished",
- G_CALLBACK
- (webkit_document_load_finished_cb), xw);
+ G_CALLBACK (webkit_document_load_finished_cb), xw);
g_signal_connect (G_OBJECT (xw->widget_osr),
"download-requested",
@@ -352,7 +350,7 @@ xwidget_hide_view (struct xwidget_view *xv)
/* When the off-screen webkit master view changes this signal is called.
It copies the bitmap from the off-screen instance. */
-gboolean
+static gboolean
offscreen_damage_event (GtkWidget * widget, GdkEvent * event,
gpointer xv_widget)
{
@@ -415,7 +413,7 @@ webkit_download_cb (WebKitWebView * webkitwebview,
return FALSE;
}
-gboolean
+static gboolean
webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView,
WebKitWebFrame *frame,
WebKitNetworkRequest * request,
@@ -438,7 +436,7 @@ webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView,
}
-gboolean
+static gboolean
webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView,
WebKitWebFrame *frame,
WebKitNetworkRequest *request,
@@ -456,7 +454,7 @@ webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView,
return FALSE;
}
-gboolean
+static gboolean
webkit_navigation_policy_decision_requested_cb (WebKitWebView *webView,
WebKitWebFrame *frame,
WebKitNetworkRequest *request,
@@ -1138,7 +1136,7 @@ valid_xwidget_spec_p (Lisp_Object object)
/* Find a value associated with key in spec. */
-Lisp_Object
+static Lisp_Object
xwidget_spec_value (Lisp_Object spec, Lisp_Object key, int *found)
{
Lisp_Object tail;
@@ -1180,7 +1178,7 @@ xwidget_view_delete_all_in_window (struct window *w)
}
}
-struct xwidget_view *
+static struct xwidget_view *
xwidget_view_lookup (struct xwidget *xw, struct window *w)
{
Lisp_Object xwidget, window, ret;
@@ -1210,7 +1208,7 @@ lookup_xwidget (Lisp_Object spec)
}
/* Set up detection of touched xwidget */
-void
+static void
xwidget_start_redisplay (void)
{
for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
@@ -1223,7 +1221,7 @@ xwidget_start_redisplay (void)
/* The xwidget was touched during redisplay, so it isn't a candidate
for hiding. */
-void
+static void
xwidget_touch (struct xwidget_view *xv)
{
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
struct xwidget *xwidget_from_id (int id);
-void xwidget_start_redisplay (void);
void xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix);
-void xwidget_touch (struct xwidget_view *xw);
-
struct xwidget *lookup_xwidget (Lisp_Object spec);
#define XG_XWIDGET "emacs_xwidget"
#define XG_XWIDGET_VIEW "emacs_xwidget_view"