public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* about boolean types
@ 2000-01-11  6:13 Vladimir Tsyshevsky
  2000-01-11  8:37 ` Ariel Rios
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Tsyshevsky @ 2000-01-11  6:13 UTC (permalink / raw)
  To: guile-gtk

Hi,

many parameters in gtk+ have formal integer type, but are booleans
really. Nevertheless, all they are mentioned as integer in Scheme
prototypes. I think, if is not very difficult to introduce 'bool' type 
in guile-gtk to fix this problem.

Regards,

Vladimir V. Tsychevski
senior expert

-----------------------------------------------------
                  Jet Infosystems
Krasnoproletarskaya 6,		Tel. (+7 095) 972-1182
Moscow 103006, Russia		Fax  (+7 095) 972-0791
-----------------------------------------------------
Any opinions or recommendations herein are those of
the author and not of his computer.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: about boolean types
  2000-01-11  6:13 about boolean types Vladimir Tsyshevsky
@ 2000-01-11  8:37 ` Ariel Rios
  2000-01-12  0:10   ` ÷ÌÁÄÉÍÉÒ ãÉÛÅ×ÓËÉÊ
  0 siblings, 1 reply; 3+ messages in thread
From: Ariel Rios @ 2000-01-11  8:37 UTC (permalink / raw)
  To: Vladimir Tsyshevsky; +Cc: guile-gtk

Vladimir Tsyshevsky wrote:
> 
> Hi,
> 
> many parameters in gtk+ have formal integer type, but are booleans
> really. Nevertheless, all they are mentioned as integer in Scheme
> prototypes. I think, if is not very difficult to introduce 'bool' type
> in guile-gtk to fix this problem.
Boolena types are already included on guile-gtk. Eg,

(define-func gtk_widget_set_sensitive
  none
  ((GtkWidget widget)
   (bool sensitive)))

However bool expects scheme values (#t #f) instead of C.

Ariel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: about boolean types
  2000-01-11  8:37 ` Ariel Rios
@ 2000-01-12  0:10   ` ÷ÌÁÄÉÍÉÒ ãÉÛÅ×ÓËÉÊ
  0 siblings, 0 replies; 3+ messages in thread
From: ÷ÌÁÄÉÍÉÒ ãÉÛÅ×ÓËÉÊ @ 2000-01-12  0:10 UTC (permalink / raw)
  To: ariel; +Cc: guile-gtk

>
>Vladimir Tsyshevsky wrote:
>> 
>> Hi,
>> 
>> many parameters in gtk+ have formal integer type, but are booleans
>> really. Nevertheless, all they are mentioned as integer in Scheme
>> prototypes. I think, if is not very difficult to introduce 'bool' type
>> in guile-gtk to fix this problem.
>Boolena types are already included on guile-gtk. Eg,
>
>(define-func gtk_widget_set_sensitive
>  none
>  ((GtkWidget widget)
>   (bool sensitive)))
>
>However bool expects scheme values (#t #f) instead of C.
>
>Ariel
>

True. But I accidently bumped into one of the following
definitions, in which the parameters still defined as having type 'int'
(the definitions below are corrected already):

(define-func gtk_aspect_frame_new
  GtkWidget
  ((string label)
   (float xalign)
   (float yalign)
   (float ratio)
   (bool obey_child)))

(define-func gtk_aspect_frame_set
  none
  ((GtkAspectFrame aspect_frame)
   (float xalign)
   (float yalign)
   (float ratio)
   (bool obey_child)))

(define-func gtk_progress_set_show_text
  none
  ((GtkProgress progress)
   (bool show_text)))

(define-func gtk_progress_set_activity_mode
  none
  ((GtkProgress progress)
   (bool activity_mode)))

(define-object GtkPlug (GtkWindow)
 (fields
  (GdkWindow socket_window)
  (bool same_app)))

Regargs,
Vladimir V. Tsychevski
senior expert

-----------------------------------------------------
                  Jet Infosystems
Krasnoproletarskaya 6,		Tel. (+7 095) 972-1182
Moscow 103006, Russia		Fax  (+7 095) 972-0791
-----------------------------------------------------
Any opinions or recommendations herein are those of
the author and not of his computer.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-01-12  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-11  6:13 about boolean types Vladimir Tsyshevsky
2000-01-11  8:37 ` Ariel Rios
2000-01-12  0:10   ` ÷ÌÁÄÉÍÉÒ ãÉÛÅ×ÓËÉÊ

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).