]> code.delx.au - gnu-emacs/blobdiff - src/emacsgtkfixed.c
Ibuffer change marks
[gnu-emacs] / src / emacsgtkfixed.c
index 08b840389c53df16235934afe3ad4f1fa36b6c5a..c04adf28b3672ebf57a33846847ec8c487fdfad9 100644 (file)
@@ -7,8 +7,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,19 +23,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 #include "frame.h"
 #include "xterm.h"
-#ifdef HAVE_XWIDGETS
-# include "xwidget.h"
-#endif
+#include "xwidget.h"
 #include "emacsgtkfixed.h"
 
 /* Silence a bogus diagnostic; see GNOME bug 683906.  */
-#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#if GNUC_PREREQ (4, 7, 0) && ! GLIB_CHECK_VERSION (2, 35, 7)
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-local-typedefs"
 #endif
 
 typedef struct _EmacsFixed EmacsFixed;
-typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
 typedef struct _EmacsFixedClass EmacsFixedClass;
 
 struct _EmacsFixedPrivate
@@ -50,7 +47,6 @@ 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)
 
@@ -75,28 +71,28 @@ struct GtkFixedPrivateL
   GList *children;
 };
 
-static void emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
-                                                  GtkAllocation *allocation)
+static void
+emacs_fixed_gtk_widget_size_allocate (GtkWidget *widget,
+                                     GtkAllocation *allocation)
 {
-  // For xwidgets.
+  /* For xwidgets.
 
-  // This basically re-implements the base class method and adds an
-  // additional case for an xwidget view.
+     This basically re-implements the base class method and adds an
+     additional case for an xwidget view.
 
-  // It would be nicer if the bse class method could be called first,
-  // and the the xview modification only would remain here. It wasn't
-  // possible to solve it that way yet.
+     It would be nicer if the bse class method could be called first,
+     and the the xview modification only would remain here. It wasn't
+     possible to solve it that way yet.  */
   EmacsFixedClass *klass;
   GtkWidgetClass *parent_class;
-  struct GtkFixedPrivateLpriv;
+  struct GtkFixedPrivateL *priv;
 
   klass = EMACS_FIXED_GET_CLASS (widget);
   parent_class = g_type_class_peek_parent (klass);
   parent_class->size_allocate (widget, allocation);
 
-  priv = G_TYPE_INSTANCE_GET_PRIVATE (widget,
-                               GTK_TYPE_FIXED,
-                               struct GtkFixedPrivateL);
+  priv = G_TYPE_INSTANCE_GET_PRIVATE (widget, GTK_TYPE_FIXED,
+                                     struct GtkFixedPrivateL);
 
   gtk_widget_set_allocation (widget, allocation);
 
@@ -154,7 +150,6 @@ emacs_fixed_class_init (EmacsFixedClass *klass)
 
   widget_class = (GtkWidgetClass*) klass;
 
-
   widget_class->get_preferred_width = emacs_fixed_get_preferred_width;
   widget_class->get_preferred_height = emacs_fixed_get_preferred_height;
 #ifdef HAVE_XWIDGETS
@@ -163,7 +158,6 @@ emacs_fixed_class_init (EmacsFixedClass *klass)
   g_type_class_add_private (klass, sizeof (EmacsFixedPrivate));
 }
 
-
 static void
 emacs_fixed_init (EmacsFixed *fixed)
 {
@@ -172,14 +166,7 @@ emacs_fixed_init (EmacsFixed *fixed)
   fixed->priv->f = 0;
 }
 
-/**
- * emacs_fixed_new:
- *
- * Creates a new #EmacsFixed.
- *
- * Returns: a new #EmacsFixed.
- */
-GtkWidget*
+GtkWidget *
 emacs_fixed_new (struct frame *f)
 {
   EmacsFixed *fixed = g_object_new (emacs_fixed_get_type (), NULL);