summaryrefslogtreecommitdiff
path: root/src/emacsgtkfixed.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-04-23 00:34:29 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-04-23 00:34:29 -0700
commit1068fe4d1bde1f532aedb612244f0f3c4ad555be (patch)
tree55328f6213ec8c47bb225e560bd96de88f0aaee6 /src/emacsgtkfixed.c
parent0ba2624f7dd2253853c6caf4fbfdc272822de3e3 (diff)
downloademacs-1068fe4d1bde1f532aedb612244f0f3c4ad555be.tar.gz
Fix minor GTK3 problems found by static checking.
* emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) (struct _EmacsFixedClass, emacs_fixed_get_type): Move decls here from emacsgtkfixed.h, since they needn't be public. (emacs_fixed_get_type): Now static. (emacs_fixed_class_init): Omit unused local. (emacs_fixed_child_type): Remove; unused. * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) (struct _EmacsFixedClass): Move to emacsgtkfixed.c. (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS) (EMACS_FIXED_GET_CLASS): Remove; unused. * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
Diffstat (limited to 'src/emacsgtkfixed.c')
-rw-r--r--src/emacsgtkfixed.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index fba672ff74d..1a62b59b7af 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -28,6 +28,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "frame.h"
#include "xterm.h"
+#define EMACS_TYPE_FIXED emacs_fixed_get_type ()
+#define EMACS_FIXED(obj) \
+ G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed)
+
+typedef struct _EmacsFixed EmacsFixed;
+typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
+typedef struct _EmacsFixedClass EmacsFixedClass;
+
+struct _EmacsFixed
+{
+ GtkFixed container;
+
+ /*< private >*/
+ EmacsFixedPrivate *priv;
+};
+
+struct _EmacsFixedClass
+{
+ GtkFixedClass parent_class;
+};
+
struct _EmacsFixedPrivate
{
struct frame *f;
@@ -40,28 +61,21 @@ 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 void
emacs_fixed_class_init (EmacsFixedClass *klass)
{
GtkWidgetClass *widget_class;
- GtkFixedClass *fixed_class;
widget_class = (GtkWidgetClass*) klass;
- fixed_class = (GtkFixedClass*) klass;
widget_class->get_preferred_width = emacs_fixed_get_preferred_width;
widget_class->get_preferred_height = emacs_fixed_get_preferred_height;
g_type_class_add_private (klass, sizeof (EmacsFixedPrivate));
}
-static GType
-emacs_fixed_child_type (GtkFixed *container)
-{
- return GTK_TYPE_WIDGET;
-}
-
static void
emacs_fixed_init (EmacsFixed *fixed)
{