aboutsummaryrefslogtreecommitdiffstats
path: root/src/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.c')
-rw-r--r--src/widget.c97
1 files changed, 25 insertions, 72 deletions
diff --git a/src/widget.c b/src/widget.c
index 0c3aa64a74e..2301f76c7c9 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -76,14 +76,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
76#define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" 76#define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
77 77
78 78
79static void EmacsFrameInitialize (/*Widget, Widget, ArgList, Cardinal * */); 79static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2);
80static void EmacsFrameDestroy (/* Widget */); 80static void EmacsFrameDestroy (Widget widget);
81static void EmacsFrameRealize (/* Widget, XtValueMask*, XSetWindowAttributes* */); 81static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs);
82void EmacsFrameResize (/* Widget widget */); 82void EmacsFrameResize (Widget widget);
83static Boolean EmacsFrameSetValues (/* Widget, Widget, Widget, 83static Boolean EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2);
84 ArgList, Cardinal * */); 84static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result);
85static XtGeometryResult EmacsFrameQueryGeometry (/* Widget, XtWidgetGeometry*,
86 XtWidgetGeometry* */);
87 85
88 86
89#undef XtOffset 87#undef XtOffset
@@ -180,10 +178,7 @@ EmacsFrameClassRec emacsFrameClassRec = {
180WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec; 178WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec;
181 179
182static void 180static void
183get_default_char_pixel_size (ew, pixel_width, pixel_height) 181get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
184 EmacsFrame ew;
185 int* pixel_width;
186 int* pixel_height;
187{ 182{
188 struct frame* f = ew->emacs_frame.frame; 183 struct frame* f = ew->emacs_frame.frame;
189 *pixel_width = FRAME_COLUMN_WIDTH (f); 184 *pixel_width = FRAME_COLUMN_WIDTH (f);
@@ -191,12 +186,7 @@ get_default_char_pixel_size (ew, pixel_width, pixel_height)
191} 186}
192 187
193static void 188static void
194pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height) 189pixel_to_char_size (EmacsFrame ew, Dimension pixel_width, Dimension pixel_height, int *char_width, int *char_height)
195 EmacsFrame ew;
196 Dimension pixel_width;
197 Dimension pixel_height;
198 int* char_width;
199 int* char_height;
200{ 190{
201 struct frame* f = ew->emacs_frame.frame; 191 struct frame* f = ew->emacs_frame.frame;
202 *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width); 192 *char_width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, (int) pixel_width);
@@ -204,12 +194,7 @@ pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height)
204} 194}
205 195
206static void 196static void
207char_to_pixel_size (ew, char_width, char_height, pixel_width, pixel_height) 197char_to_pixel_size (EmacsFrame ew, int char_width, int char_height, Dimension *pixel_width, Dimension *pixel_height)
208 EmacsFrame ew;
209 int char_width;
210 int char_height;
211 Dimension* pixel_width;
212 Dimension* pixel_height;
213{ 198{
214 struct frame* f = ew->emacs_frame.frame; 199 struct frame* f = ew->emacs_frame.frame;
215 *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width); 200 *pixel_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, char_width);
@@ -217,12 +202,7 @@ char_to_pixel_size (ew, char_width, char_height, pixel_width, pixel_height)
217} 202}
218 203
219static void 204static void
220round_size_to_char (ew, in_width, in_height, out_width, out_height) 205round_size_to_char (EmacsFrame ew, Dimension in_width, Dimension in_height, Dimension *out_width, Dimension *out_height)
221 EmacsFrame ew;
222 Dimension in_width;
223 Dimension in_height;
224 Dimension* out_width;
225 Dimension* out_height;
226{ 206{
227 int char_width; 207 int char_width;
228 int char_height; 208 int char_height;
@@ -231,8 +211,7 @@ round_size_to_char (ew, in_width, in_height, out_width, out_height)
231} 211}
232 212
233static Widget 213static Widget
234get_wm_shell (w) 214get_wm_shell (Widget w)
235 Widget w;
236{ 215{
237 Widget wmshell; 216 Widget wmshell;
238 217
@@ -269,8 +248,7 @@ static Boolean first_frame_p = True;
269#endif 248#endif
270 249
271static void 250static void
272set_frame_size (ew) 251set_frame_size (EmacsFrame ew)
273 EmacsFrame ew;
274{ 252{
275 /* The widget hierarchy is 253 /* The widget hierarchy is
276 254
@@ -491,8 +469,7 @@ set_frame_size (ew)
491int update_hints_inhibit; 469int update_hints_inhibit;
492 470
493static void 471static void
494update_wm_hints (ew) 472update_wm_hints (EmacsFrame ew)
495 EmacsFrame ew;
496{ 473{
497 Widget wmshell = get_wm_shell ((Widget)ew); 474 Widget wmshell = get_wm_shell ((Widget)ew);
498 int cw; 475 int cw;
@@ -570,8 +547,7 @@ static char setup_frame_cursor_bits[] =
570}; 547};
571 548
572static void 549static void
573setup_frame_gcs (ew) 550setup_frame_gcs (EmacsFrame ew)
574 EmacsFrame ew;
575{ 551{
576 XGCValues gc_values; 552 XGCValues gc_values;
577 struct frame* s = ew->emacs_frame.frame; 553 struct frame* s = ew->emacs_frame.frame;
@@ -649,8 +625,7 @@ setup_frame_gcs (ew)
649} 625}
650 626
651static void 627static void
652update_various_frame_slots (ew) 628update_various_frame_slots (EmacsFrame ew)
653 EmacsFrame ew;
654{ 629{
655 struct frame *f = ew->emacs_frame.frame; 630 struct frame *f = ew->emacs_frame.frame;
656 struct x_output *x = f->output_data.x; 631 struct x_output *x = f->output_data.x;
@@ -661,8 +636,7 @@ update_various_frame_slots (ew)
661} 636}
662 637
663static void 638static void
664update_from_various_frame_slots (ew) 639update_from_various_frame_slots (EmacsFrame ew)
665 EmacsFrame ew;
666{ 640{
667 struct frame *f = ew->emacs_frame.frame; 641 struct frame *f = ew->emacs_frame.frame;
668 struct x_output *x = f->output_data.x; 642 struct x_output *x = f->output_data.x;
@@ -677,11 +651,7 @@ update_from_various_frame_slots (ew)
677} 651}
678 652
679static void 653static void
680EmacsFrameInitialize (request, new, dum1, dum2) 654EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2)
681 Widget request;
682 Widget new;
683 ArgList dum1;
684 Cardinal *dum2;
685{ 655{
686 EmacsFrame ew = (EmacsFrame)new; 656 EmacsFrame ew = (EmacsFrame)new;
687 657
@@ -698,10 +668,7 @@ EmacsFrameInitialize (request, new, dum1, dum2)
698 668
699 669
700static void 670static void
701EmacsFrameRealize (widget, mask, attrs) 671EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs)
702 Widget widget;
703 XtValueMask *mask;
704 XSetWindowAttributes *attrs;
705{ 672{
706 EmacsFrame ew = (EmacsFrame)widget; 673 EmacsFrame ew = (EmacsFrame)widget;
707 674
@@ -717,11 +684,10 @@ EmacsFrameRealize (widget, mask, attrs)
717 update_wm_hints (ew); 684 update_wm_hints (ew);
718} 685}
719 686
720extern void free_frame_faces (/* struct frame * */); 687extern void free_frame_faces (struct frame *);
721 688
722static void 689static void
723EmacsFrameDestroy (widget) 690EmacsFrameDestroy (Widget widget)
724 Widget widget;
725{ 691{
726 EmacsFrame ew = (EmacsFrame) widget; 692 EmacsFrame ew = (EmacsFrame) widget;
727 struct frame* s = ew->emacs_frame.frame; 693 struct frame* s = ew->emacs_frame.frame;
@@ -739,8 +705,7 @@ EmacsFrameDestroy (widget)
739} 705}
740 706
741void 707void
742EmacsFrameResize (widget) 708EmacsFrameResize (Widget widget)
743 Widget widget;
744{ 709{
745 EmacsFrame ew = (EmacsFrame)widget; 710 EmacsFrame ew = (EmacsFrame)widget;
746 struct frame *f = ew->emacs_frame.frame; 711 struct frame *f = ew->emacs_frame.frame;
@@ -756,12 +721,7 @@ EmacsFrameResize (widget)
756} 721}
757 722
758static Boolean 723static Boolean
759EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2) 724EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2)
760 Widget cur_widget;
761 Widget req_widget;
762 Widget new_widget;
763 ArgList dum1;
764 Cardinal *dum2;
765{ 725{
766 EmacsFrame cur = (EmacsFrame)cur_widget; 726 EmacsFrame cur = (EmacsFrame)cur_widget;
767 EmacsFrame new = (EmacsFrame)new_widget; 727 EmacsFrame new = (EmacsFrame)new_widget;
@@ -834,10 +794,7 @@ EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2)
834} 794}
835 795
836static XtGeometryResult 796static XtGeometryResult
837EmacsFrameQueryGeometry (widget, request, result) 797EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result)
838 Widget widget;
839 XtWidgetGeometry* request;
840 XtWidgetGeometry* result;
841{ 798{
842 EmacsFrame ew = (EmacsFrame)widget; 799 EmacsFrame ew = (EmacsFrame)widget;
843 800
@@ -867,10 +824,7 @@ EmacsFrameQueryGeometry (widget, request, result)
867 824
868/* Special entrypoints */ 825/* Special entrypoints */
869void 826void
870EmacsFrameSetCharSize (widget, columns, rows) 827EmacsFrameSetCharSize (Widget widget, int columns, int rows)
871 Widget widget;
872 int columns;
873 int rows;
874{ 828{
875 EmacsFrame ew = (EmacsFrame) widget; 829 EmacsFrame ew = (EmacsFrame) widget;
876 struct frame *f = ew->emacs_frame.frame; 830 struct frame *f = ew->emacs_frame.frame;
@@ -880,8 +834,7 @@ EmacsFrameSetCharSize (widget, columns, rows)
880 834
881 835
882void 836void
883widget_store_internal_border (widget) 837widget_store_internal_border (Widget widget)
884 Widget widget;
885{ 838{
886 EmacsFrame ew = (EmacsFrame) widget; 839 EmacsFrame ew = (EmacsFrame) widget;
887 FRAME_PTR f = ew->emacs_frame.frame; 840 FRAME_PTR f = ew->emacs_frame.frame;