diff options
| author | Joakim Verona | 2012-05-21 09:04:41 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-21 09:04:41 +0200 |
| commit | aec4aaf7216eb43c374f7b065e518368adf316b7 (patch) | |
| tree | 9f5e3389fac92b229b515dd63ff86f9e003c8ca2 /src | |
| parent | 74f082445c1dd0c92d5bb187db0d50287e3a7bae (diff) | |
| download | emacs-aec4aaf7216eb43c374f7b065e518368adf316b7.tar.gz emacs-aec4aaf7216eb43c374f7b065e518368adf316b7.zip | |
reinstal emocsfiked changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacsgtkfixed.c | 31 | ||||
| -rw-r--r-- | src/emacsgtkfixed.h | 26 |
2 files changed, 34 insertions, 23 deletions
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index 194d3d3879f..e45cc716a31 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -30,28 +30,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #ifdef HAVE_XWIDGETS | 30 | #ifdef HAVE_XWIDGETS |
| 31 | #include "xwidget.h" | 31 | #include "xwidget.h" |
| 32 | #endif | 32 | #endif |
| 33 | |||
| 34 | #define EMACS_TYPE_FIXED emacs_fixed_get_type () | ||
| 35 | #define EMACS_FIXED(obj) \ | ||
| 36 | G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed) | ||
| 37 | |||
| 38 | typedef struct _EmacsFixed EmacsFixed; | ||
| 39 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; | ||
| 40 | typedef struct _EmacsFixedClass EmacsFixedClass; | ||
| 41 | |||
| 42 | struct _EmacsFixed | ||
| 43 | { | ||
| 44 | GtkFixed container; | ||
| 45 | |||
| 46 | /*< private >*/ | ||
| 47 | EmacsFixedPrivate *priv; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct _EmacsFixedClass | ||
| 51 | { | ||
| 52 | GtkFixedClass parent_class; | ||
| 53 | }; | ||
| 54 | |||
| 55 | struct _EmacsFixedPrivate | 33 | struct _EmacsFixedPrivate |
| 56 | { | 34 | { |
| 57 | struct frame *f; | 35 | struct frame *f; |
| @@ -64,7 +42,6 @@ static void emacs_fixed_get_preferred_width (GtkWidget *widget, | |||
| 64 | static void emacs_fixed_get_preferred_height (GtkWidget *widget, | 42 | static void emacs_fixed_get_preferred_height (GtkWidget *widget, |
| 65 | gint *minimum, | 43 | gint *minimum, |
| 66 | gint *natural); | 44 | gint *natural); |
| 67 | static GType emacs_fixed_get_type (void); | ||
| 68 | G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED) | 45 | G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED) |
| 69 | 46 | ||
| 70 | #ifdef HAVE_XWIDGETS | 47 | #ifdef HAVE_XWIDGETS |
| @@ -187,8 +164,10 @@ static void | |||
| 187 | emacs_fixed_class_init (EmacsFixedClass *klass) | 164 | emacs_fixed_class_init (EmacsFixedClass *klass) |
| 188 | { | 165 | { |
| 189 | GtkWidgetClass *widget_class; | 166 | GtkWidgetClass *widget_class; |
| 167 | GtkFixedClass *fixed_class; | ||
| 190 | 168 | ||
| 191 | widget_class = (GtkWidgetClass*) klass; | 169 | widget_class = (GtkWidgetClass*) klass; |
| 170 | fixed_class = (GtkFixedClass*) klass; | ||
| 192 | 171 | ||
| 193 | widget_class->get_preferred_width = emacs_fixed_get_preferred_width; | 172 | widget_class->get_preferred_width = emacs_fixed_get_preferred_width; |
| 194 | widget_class->get_preferred_height = emacs_fixed_get_preferred_height; | 173 | widget_class->get_preferred_height = emacs_fixed_get_preferred_height; |
| @@ -198,6 +177,12 @@ emacs_fixed_class_init (EmacsFixedClass *klass) | |||
| 198 | g_type_class_add_private (klass, sizeof (EmacsFixedPrivate)); | 177 | g_type_class_add_private (klass, sizeof (EmacsFixedPrivate)); |
| 199 | } | 178 | } |
| 200 | 179 | ||
| 180 | static GType | ||
| 181 | emacs_fixed_child_type (GtkFixed *container) | ||
| 182 | { | ||
| 183 | return GTK_TYPE_WIDGET; | ||
| 184 | } | ||
| 185 | |||
| 201 | static void | 186 | static void |
| 202 | emacs_fixed_init (EmacsFixed *fixed) | 187 | emacs_fixed_init (EmacsFixed *fixed) |
| 203 | { | 188 | { |
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index 3fa294aa41e..90fb37e521b 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h | |||
| @@ -27,7 +27,33 @@ G_BEGIN_DECLS | |||
| 27 | 27 | ||
| 28 | struct frame; | 28 | struct frame; |
| 29 | 29 | ||
| 30 | #define EMACS_TYPE_FIXED (emacs_fixed_get_type ()) | ||
| 31 | #define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed)) | ||
| 32 | #define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass)) | ||
| 33 | #define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMACS_TYPE_FIXED)) | ||
| 34 | #define EMACS_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EMACS_TYPE_FIXED)) | ||
| 35 | #define EMACS_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EMACS_TYPE_FIXED, EmacsFixedClass)) | ||
| 36 | |||
| 37 | typedef struct _EmacsFixed EmacsFixed; | ||
| 38 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; | ||
| 39 | typedef struct _EmacsFixedClass EmacsFixedClass; | ||
| 40 | |||
| 41 | struct _EmacsFixed | ||
| 42 | { | ||
| 43 | GtkFixed container; | ||
| 44 | |||
| 45 | /*< private >*/ | ||
| 46 | EmacsFixedPrivate *priv; | ||
| 47 | }; | ||
| 48 | |||
| 49 | |||
| 50 | struct _EmacsFixedClass | ||
| 51 | { | ||
| 52 | GtkFixedClass parent_class; | ||
| 53 | }; | ||
| 54 | |||
| 30 | extern GtkWidget *emacs_fixed_new (struct frame *f); | 55 | extern GtkWidget *emacs_fixed_new (struct frame *f); |
| 56 | extern GType emacs_fixed_get_type (void); | ||
| 31 | 57 | ||
| 32 | G_END_DECLS | 58 | G_END_DECLS |
| 33 | 59 | ||