public inbox for
 help / color / mirror / Atom feed
From: Marius Vollmer <>
To: Stanislas Pinte <>
Cc: guile-gtk <>,
	David Pirotte <>
Subject: Re: implementing guile-gtk drag & drop...
Date: Sun, 03 Nov 2002 07:03:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Stanislas Pinte <> writes:

> -I need to define new strucs, used by GTK: GtkTargetEntry; for example.
> 	How do I define a new struct? define-struct is not that
> documented, and I suppose I will have to play with C (I looked at the
> GTimer struct, define in gdk-1.2-defs), to define creator and
> destructor functions,

Hmm, that's a difficult thing, in general.  I'd say that you should
probably first decide how you would like the function to appear in
Scheme. I.e., what would be convenient to use, in contrast to what is
currently easily done with guile-gtk.

Then, try to write a wrapper function by hand (based on examples from
gtk-glue.c, for example), and then we can discuss whether it is useful
to extend build-guile-gtk to make writing your wrapper function

For example, since GtkTargetEntry seems only to be used as a read-only
struct when passing parameters to gtk_drag_source_set, it might be
best to use a list in Scheme:

    (gtk-drag-source-set widget '(button1-mask) '((foo (same-app)))

We could then write a function to fill a GtkTargetEntry struct from
'(foo (same-app)) and tell build-guile-gtk to use it.  (I don't know
the details right now.)  The .defs file entry might then look like

    (define-func gtk_drag_source_set
      ((GtkWidget widget)
       (GdkModifierType start_button_mask)
       ((cvecr GtkTargetEntry) targets)
       (GdkDragAction actions)))

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

  reply	other threads:[~2002-11-03 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-01  3:49 Stanislas Pinte
2002-11-03  7:03 ` Marius Vollmer [this message]
2002-11-05 16:20   ` Daniel Skarda
2002-11-06  0:58     ` Stan Pinte
2002-11-06  5:17       ` Daniel Skarda
2002-11-06  5:26         ` Stan Pinte
2002-11-09 10:56     ` Marius Vollmer
2002-11-10 12:20       ` Daniel Skarda
2002-11-10 12:57         ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).