Mercurial > hg > xemacs-beta
comparison src/frame-gtk.c @ 2054:91d4c8c65a0f
[xemacs-hg @ 2004-05-02 04:06:51 by malcolmp]
Fix warnings and errors when building GTK using C++ and --use-union-type.
author | malcolmp |
---|---|
date | Sun, 02 May 2004 04:07:01 +0000 |
parents | a8d8f419b459 |
children | 95fee4a1420e |
comparison
equal
deleted
inserted
replaced
2053:11e709117623 | 2054:91d4c8c65a0f |
---|---|
342 gtk_set_initial_frame_size (struct frame *f, int x, int y, | 342 gtk_set_initial_frame_size (struct frame *f, int x, int y, |
343 unsigned int w, unsigned int h) | 343 unsigned int w, unsigned int h) |
344 { | 344 { |
345 GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f); | 345 GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f); |
346 GdkGeometry geometry; | 346 GdkGeometry geometry; |
347 GdkWindowHints geometry_mask = 0x00; | |
348 | 347 |
349 if (GTK_IS_WINDOW (shell)) | 348 if (GTK_IS_WINDOW (shell)) |
350 { | 349 { |
350 GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; | |
351 /* Deal with the cell size */ | 351 /* Deal with the cell size */ |
352 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); | 352 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); |
353 geometry_mask |= GDK_HINT_RESIZE_INC; | |
354 | 353 |
355 gtk_window_set_geometry_hints (GTK_WINDOW (shell), | 354 gtk_window_set_geometry_hints (GTK_WINDOW (shell), |
356 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); | 355 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); |
357 gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0, GDK_HINT_POS); | 356 gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0, GDK_HINT_POS); |
358 gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, FALSE); | 357 gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, FALSE); |
597 { | 596 { |
598 gint x = 10, y = 10, w = 80, h = 30; | 597 gint x = 10, y = 10, w = 80, h = 30; |
599 | 598 |
600 if (STRINGP (Vgtk_initial_geometry)) | 599 if (STRINGP (Vgtk_initial_geometry)) |
601 { | 600 { |
602 if (!gnome_parse_geometry (XSTRING_DATA (Vgtk_initial_geometry), &x,&y,&w,&h)) | 601 if (!gnome_parse_geometry ((char*) XSTRING_DATA (Vgtk_initial_geometry), &x,&y,&w,&h)) |
603 { | 602 { |
604 x = y = 10; | 603 x = y = 10; |
605 w = 80; | 604 w = 80; |
606 h = 30; | 605 h = 30; |
607 } | 606 } |
1082 } | 1081 } |
1083 | 1082 |
1084 static Lisp_Object | 1083 static Lisp_Object |
1085 gtk_get_frame_parent (struct frame *f) | 1084 gtk_get_frame_parent (struct frame *f) |
1086 { | 1085 { |
1087 GtkWidget *parentwid = gtk_object_get_data (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)), | 1086 GtkWidget *parentwid = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)), |
1088 TRANSIENT_DATA_IDENTIFIER); | 1087 TRANSIENT_DATA_IDENTIFIER); |
1089 | 1088 |
1090 /* find the frame whose wid is parentwid */ | 1089 /* find the frame whose wid is parentwid */ |
1091 if (parentwid) | 1090 if (parentwid) |
1092 { | 1091 { |
1093 Lisp_Object frmcons; | 1092 Lisp_Object frmcons; |
1135 static void | 1134 static void |
1136 gtk_set_frame_size (struct frame *f, int cols, int rows) | 1135 gtk_set_frame_size (struct frame *f, int cols, int rows) |
1137 { | 1136 { |
1138 GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f); | 1137 GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f); |
1139 GdkGeometry geometry; | 1138 GdkGeometry geometry; |
1140 GdkWindowHints geometry_mask = 0x00; | |
1141 | 1139 |
1142 if (GTK_IS_WINDOW (shell)) | 1140 if (GTK_IS_WINDOW (shell)) |
1143 { | 1141 { |
1142 GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC; | |
1143 | |
1144 /* Update the cell size */ | 1144 /* Update the cell size */ |
1145 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); | 1145 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc); |
1146 geometry_mask |= GDK_HINT_RESIZE_INC; | |
1147 | 1146 |
1148 gtk_window_set_geometry_hints (GTK_WINDOW (shell), | 1147 gtk_window_set_geometry_hints (GTK_WINDOW (shell), |
1149 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); | 1148 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); |
1150 } | 1149 } |
1151 | 1150 |