* Completed GdkFont support
@ 2003-05-09 7:58 Marko Rauhamaa
2003-05-12 0:05 ` Kevin Ryde
2003-08-08 22:06 ` gdk-fontset-load (was: Completed GdkFont support) Kevin Ryde
0 siblings, 2 replies; 5+ messages in thread
From: Marko Rauhamaa @ 2003-05-09 7:58 UTC (permalink / raw)
To: guile-gtk
Summary: Completed GdkFont support.
Details:
- gdk-1.2.defs, gdk-support.c, guile-gtk.h: Declared text as SCM
instead of string (as was previously done in gdk_draw_text_scm). That
is necessary because text may well contain nonterminating zero bytes.
- This part of the GDK spec seems a bit confused. Several functions
come in four variants: char, string, text and text_wc. However, not
all combinations are specified (or implemented). So, for example,
there is no gdk_text_wc_height.
- gdk-1.2.defs, gdk-support.c, guile-gtk.h: I allow the fontset name to
be either a string or a list of strings, which are joined with
commas. The strings themselves may contain commas.
- gdk-support.c: Fixed an earlier bug. I used scm_list_p instead of
SCM_CONSP and SCM_NULLP.
Marko
--
Marko Rauhamaa mailto:marko@pacujo.net http://pacujo.net/marko/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Completed GdkFont support
2003-05-09 7:58 Completed GdkFont support Marko Rauhamaa
@ 2003-05-12 0:05 ` Kevin Ryde
2003-05-12 0:14 ` Marko Rauhamaa
2003-05-12 7:07 ` Marko Rauhamaa
2003-08-08 22:06 ` gdk-fontset-load (was: Completed GdkFont support) Kevin Ryde
1 sibling, 2 replies; 5+ messages in thread
From: Kevin Ryde @ 2003-05-12 0:05 UTC (permalink / raw)
To: Marko Rauhamaa; +Cc: guile-gtk
Marko Rauhamaa <marko@pacujo.net> writes:
>
> +(define-func gdk_char_width
> + int
> + ((GdkFont font)
> + (char character)))
This seems to end up requiring an integer parameter. Is that right?
(use-modules (gtk gdk))
(gdk-char-width "fixed" #\A)
<unnamed port>:3:1: In procedure gdk-char-width in expression (gdk-char-width "fixed" #\A):
<unnamed port>:3:1: Wrong type argument in position 2: #\A
I might have hoped to pass a scheme character to gdk_char functions.
I think that'd work better with normal scheme string and character
stuff.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Completed GdkFont support
2003-05-12 0:05 ` Kevin Ryde
@ 2003-05-12 0:14 ` Marko Rauhamaa
2003-05-12 7:07 ` Marko Rauhamaa
1 sibling, 0 replies; 5+ messages in thread
From: Marko Rauhamaa @ 2003-05-12 0:14 UTC (permalink / raw)
To: guile-gtk
Kevin Ryde <user42@zip.com.au>:
> Marko Rauhamaa <marko@pacujo.net> writes:
> >
> > +(define-func gdk_char_width
> > + int
> > + ((GdkFont font)
> > + (char character)))
>
> This seems to end up requiring an integer parameter. Is that right?
>
> I might have hoped to pass a scheme character to gdk_char functions.
> I think that'd work better with normal scheme string and character
> stuff.
Good point. I'll see what I can do tonight.
Marko
--
Marko Rauhamaa mailto:marko@pacujo.net http://pacujo.net/marko/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Completed GdkFont support
2003-05-12 0:05 ` Kevin Ryde
2003-05-12 0:14 ` Marko Rauhamaa
@ 2003-05-12 7:07 ` Marko Rauhamaa
1 sibling, 0 replies; 5+ messages in thread
From: Marko Rauhamaa @ 2003-05-12 7:07 UTC (permalink / raw)
To: guile-gtk
Kevin Ryde <user42@zip.com.au>:
> I might have hoped to pass a scheme character to gdk_char functions.
> I think that'd work better with normal scheme string and character
> stuff.
Now char corresponds to the scheme character type.
Marko
--
Marko Rauhamaa mailto:marko@pacujo.net http://pacujo.net/marko/
^ permalink raw reply [flat|nested] 5+ messages in thread
* gdk-fontset-load (was: Completed GdkFont support)
2003-05-09 7:58 Completed GdkFont support Marko Rauhamaa
2003-05-12 0:05 ` Kevin Ryde
@ 2003-08-08 22:06 ` Kevin Ryde
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Ryde @ 2003-08-08 22:06 UTC (permalink / raw)
To: guile-gtk
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
Marko Rauhamaa <marko@pacujo.net> writes:
>
> - gdk-1.2.defs, gdk-support.c, guile-gtk.h: I allow the fontset name to
> be either a string or a list of strings, which are joined with
> commas. The strings themselves may contain commas.
I don't see any great value in that, I think it'd be cleaner to just
take a string, since that's how Gtk treats a fontset. If someone
wants to use a list instead then I think they can be left to apply
string-join or whatever themselves.
* gdk-1.2.defs (gdk_fontset_load): Accept only a string, per C func.
* gdk-support.c, guile-gtk.h (gdk_fontset_load_interp): Remove.
[-- Attachment #2: gdk-1.2.defs.fontset-load.diff --]
[-- Type: text/plain, Size: 442 bytes --]
--- gdk-1.2.defs.~1.42.~ 2003-08-05 10:30:19.000000000 +1000
+++ gdk-1.2.defs 2003-08-08 16:19:26.000000000 +1000
@@ -1333,11 +1333,9 @@
(GdkFont (copy #f))
((string name)))
-(define-func gdk_fontset_load_interp
+(define-func gdk_fontset_load
(GdkFont (copy #f))
- ; fontset is either a comma-separated string or a list of
- ; comma-separated strings
- ((SCM fontset)))
+ ((string fontset)))
(define-func gdk_font_id
int
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-08-08 22:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-09 7:58 Completed GdkFont support Marko Rauhamaa
2003-05-12 0:05 ` Kevin Ryde
2003-05-12 0:14 ` Marko Rauhamaa
2003-05-12 7:07 ` Marko Rauhamaa
2003-08-08 22:06 ` gdk-fontset-load (was: Completed GdkFont support) Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).