Mercurial > hg > xemacs-beta
comparison src/objects-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 | 04bc9d2f42c7 |
comparison
equal
deleted
inserted
replaced
2053:11e709117623 | 2054:91d4c8c65a0f |
---|---|
228 maybe_signal_error (Qgui_error, "couldn't load font", f->name, | 228 maybe_signal_error (Qgui_error, "couldn't load font", f->name, |
229 Qfont, errb); | 229 Qfont, errb); |
230 return 0; | 230 return 0; |
231 } | 231 } |
232 | 232 |
233 xf = GDK_FONT_XFONT (gf); | 233 xf = (XFontStruct*) GDK_FONT_XFONT (gf); |
234 | 234 |
235 /* Don't allocate the data until we're sure that we will succeed, | 235 /* Don't allocate the data until we're sure that we will succeed, |
236 or the finalize method may get fucked. */ | 236 or the finalize method may get fucked. */ |
237 f->data = xnew (struct gtk_font_instance_data); | 237 f->data = xnew (struct gtk_font_instance_data); |
238 FONT_INSTANCE_GTK_FONT (f) = gf; | 238 FONT_INSTANCE_GTK_FONT (f) = gf; |
505 TO_INTERNAL_FORMAT (C_STRING, names[i], ALLOCA, (intname, intlen), | 505 TO_INTERNAL_FORMAT (C_STRING, names[i], ALLOCA, (intname, intlen), |
506 Qctext); | 506 Qctext); |
507 if (gtk_font_spec_matches_charset (XDEVICE (device), charset, | 507 if (gtk_font_spec_matches_charset (XDEVICE (device), charset, |
508 intname, Qnil, 0, -1, 0)) | 508 intname, Qnil, 0, -1, 0)) |
509 { | 509 { |
510 result = make_string ((char *) intname, intlen); | 510 result = make_string (intname, intlen); |
511 break; | 511 break; |
512 } | 512 } |
513 } | 513 } |
514 | 514 |
515 if (names) | 515 if (names) |
554 | 554 |
555 while (names) | 555 while (names) |
556 { | 556 { |
557 if (names->data) | 557 if (names->data) |
558 { | 558 { |
559 if (valid_font_name_p (dpy, names->data)) | 559 if (valid_font_name_p (dpy, (char*) names->data)) |
560 { | 560 { |
561 if (!expandp) | 561 if (!expandp) |
562 { | 562 { |
563 /* They want the wildcarded version */ | 563 /* They want the wildcarded version */ |
564 font_name = build_string (names->data); | 564 font_name = build_string ((char*) names->data); |
565 } | 565 } |
566 else | 566 else |
567 { | 567 { |
568 /* Need to expand out */ | 568 /* Need to expand out */ |
569 int nnames = 0; | 569 int nnames = 0; |
570 char **x_font_names = 0; | 570 char **x_font_names = 0; |
571 | 571 |
572 x_font_names = XListFonts (dpy, names->data, 1, &nnames); | 572 x_font_names = XListFonts (dpy, (char*) names->data, 1, &nnames); |
573 if (x_font_names) | 573 if (x_font_names) |
574 { | 574 { |
575 font_name = build_string (x_font_names[0]); | 575 font_name = build_string (x_font_names[0]); |
576 XFreeFontNames (x_font_names); | 576 XFreeFontNames (x_font_names); |
577 } | 577 } |