From sopwith@redhat.com
Received: (qmail 31613 invoked from network); 13 Jun 1997 14:31:24 -0000
Received: from dilbert.redhat.com (sopwith@207.220.27.4)
  by mail2.redhat.com with SMTP; 13 Jun 1997 14:31:24 -0000
Received: from localhost (sopwith@localhost)
	by dilbert.redhat.com (8.8.5/8.8.5) with SMTP id KAA20525
	for < gtk-list@redhat.com>; Fri, 13 Jun 1997 10:31:18 -0400
Date: Fri, 13 Jun 1997 10:31:17 -0400 (EDT)
From: Elliot Lee < sopwith@redhat.com>
To: gtk-list@redhat.com
Subject: Drag and Drop, try 1
Message-ID: < Pine.LNX.3.95.970613095446.20286E-101000@dilbert.redhat.com>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="453300188-1793485751-866212277=:20286"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--453300188-1793485751-866212277=:20286
Content-Type: TEXT/PLAIN; charset=US-ASCII

MIME-attached is a gzip'd (it's 40K uncompressed, I don't like to fill
people's mailboxes up) patch for my first try at drag and drop support,
for 0.99.10.

Documentation so far:
	- Accepting drops is not very hard. You add a signal handler for
	a "drop_notify_event" to a widget. The signal handler should have
	a prototype like:
		void drop_signal(GtkWidget *widget, GdkEventDrop *what);
	In the GdkEventDrop structure, there are 'data', 'datanumbytes',
	and 'datatype' elements. Only one that needs explaining is
	'datatype', which comes from < gdk/gdktypes.h> and tells you
	whether you have raw data, text, a file, files, MIME data, etc.
	being dropped. You must free the 'data' after you are done with
	it.
	BTW only widgets which have their own ->window element set up
	can do drag and drop.

	- Allowing drags is much more hairy. After creating the widget,
	it has to be realized (i.e. its ->window element created), after
	which you can do
		gtk_widget_set_dnd_data(widget,
			gint dnd_enable /*{FALSE,TRUE} */,
			GdkDropType dnd_type, /* See gdk/gdktypes.h */
			gpointer dnd_data  /* You do not have to keep this
					      around after doing the set,
					      a copy of it is saved with
					      the widget */,
			guint32 dnd_datanumbytes /* Number of bytes in data */,
			GdkCursorType dnd_cursor /* Cursor to change to
						    when dragging this widget */
			);
	The best way to do things IMHO is to set_dnd_data with
	dnd_enable = TRUE, but passing GDK_DNDTYPE_NOTDND,
	NULL, and 0 in for the type/data/datanumbytes. Then you
	can set your signal handler on the widget for the
	"drag_begin_notify_event" and set the correct data as each
	drag occurs.

Bugs/Todo:
	- Drag cursor doesn't get set correctly the first time the
	  widget is dragged.
	- A widget shouldn't have to be realized to set_dnd_data on it.
	- Separate set_dnd_data into set_dnd_data and set_dnd_options
	  functions.
	- Would be nice to add drag & drop to different widgets -
	  i.e. be able to drag a color from the color selector to anywhere
	  in your application.
	- Feedback on the implementation needed. There *have* to be
	  mistakes I made that are yours to correct ;-) Please let me know
	  when you find something.
	- A DRAG_ACCEPTED_NOTIFY_EVENT would be very useful especially
	  for file managers where you need to know the outcome, however
	  OffiX does not provide this in the protocol. A PROPERTY_NOTIFY
	  should be generated when the receiving application receives &
	  deletes the dndselection property through which data is passed,
	  but the receiving application sometimes does a read without
	  delete, and even if it did it wouldn't let you know if the
	  application had actually accepted. (see below)
	- Add Motif drag & drop (a much more robust protocol than OffiX)
	  (see below)
Soapbox:
	The types made available by the OffiX protocol are not going
	to suffice for a lot of the applications needed. I
	would like to suggest always using a GDK_DNDTYPE_MIME, and
	then following the standard HTTP header convention. So for
	dragging an image, you could do something like
Content-type: image/gif

[imagedatahere]
	This will add a little bit of parsing to your apps, but allow
	for a lot more flexibility (you don't need a Content-length:
	header, just subtract strlen(line1) + 1 from total length).

	I'm hoping to get Motif DND protocol docs and implement that.
	KDE uses Offix protocol version 0 as a base and then adds
	DndEnter and DndLeave events, making it Yet Another protocol to
	support.
	(this implementation is vanilla OffiX protocol version 1).

	There are problems with supporting multiple drop protocols, namely
	that you might get drops in three different protocols from another
	gtk application, and think that you had got 3 separate drop
	events.

That's my blathering, now do your thing ;-)
-- Elliot					http://www.redhat.com/
How do you explain school to a higher intelligence?
                -- Elliot, "E.T.

From martynas@nomagic.com
Received: (qmail 32597 invoked from network); 13 Jun 1997 15:10:11 -0000
Received: from unknown (HELO banginis.nm3.ktu.lt) (qmailr@193.219.67.66)
  by mail2.redhat.com with SMTP; 13 Jun 1997 15:10:09 -0000
Received: (qmail 27641 invoked from network); 13 Jun 1997 15:10:47 -0000
Received: from avis.nm3.ktu.lt (HELO avis) (193.219.67.181)
  by banginis.nm3.ktu.lt with SMTP; 13 Jun 1997 15:10:47 -0000
Message-ID: <33A162CA.6344@nomagic.com>
Date: Fri, 13 Jun 1997 18:10:02 +0300
From: Martynas Kunigelis < martynas@nomagic.com>
Organization: No Magic, Inc.
X-Mailer: Mozilla 3.01Gold (WinNT; I)
MIME-Version: 1.0
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Drag and Drop, try 1
References: < Pine.LNX.3.95.970613095446.20286E-101000@dilbert.redhat.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Elliot Lee wrote:
>         I'm hoping to get Motif DND protocol docs and implement that.
>         KDE uses Offix protocol version 0 as a base and then adds
>         DndEnter and DndLeave events, making it Yet Another protocol to
>         support.
>         (this implementation is vanilla OffiX protocol version 1).
> 
Note that most probably KDE will use a different protocol in a near 
future, since Troll Tech promised to add Drand And Drop to Qt 1.3, 
which is promised to be released "in summer". Hope the Trolls will
choose a good protocol, they always do the right thing programmingwise.
If only Qt was LGPL!

It would be nice, however, if gtk would support DND to/from KDE, since
I (as many others) see KDE as a wide-spread desktop environment in the
future.

Martynas

P.S. I don't want to start a flamewar, but has anybody asked why did
     the autors choose C for gtk? I mean my heart hurts when I see
     all the "C++ emulation" stuff. IMHO well written C++ code can be
     as small/fast as C, and there's one BIG advantage that I see.
     Here it is: I bet that every gtk_*_new() call returns a pointer
     to malloc()'ed GtkWidget, right? Widget structures are pretty
     small, right? The heap fragmentation gets pretty big, also the
     overhead of having a lot of small heap chunks appears. Damn, 
     testgtk eats 2M on my Linux system, where any of the Qt demos
     eat about 1M (I'm not subtracting the shared lib size, I know
     several apps would share it, but I'm taking a standalone app).
     And with C++ you can easily create widgets on the stack or agregate
     them into other classes. Allright, just don't start a flamewar,
     that's just a simple $0.0002.

From otto@redhat.com
Received: (qmail 15389 invoked from network); 13 Jun 1997 15:34:09 -0000
Received: from nimrod.redhat.com (otto@199.183.24.13)
  by mail2.redhat.com with SMTP; 13 Jun 1997 15:34:09 -0000
Received: (from otto@localhost)
	by nimrod.redhat.com (8.8.5/8.8.5) id LAA28338;
	Fri, 13 Jun 1997 11:34:02 -0400
Message-ID: <19970613113401.61292@redhat.com>
Date: Fri, 13 Jun 1997 11:34:01 -0400
From: Otto Hammersmith < otto@redhat.com>
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: Drag and Drop, try 1
References: < Pine.LNX.3.95.970613095446.20286E-101000@dilbert.redhat.com> 

<33A162CA.6344@nomagic.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.74
In-Reply-To: <33A162CA.6344@nomagic.com>; from Martynas Kunigelis on Fri, Jun 

13, 1997 at 06:10:02PM +0300

On Fri, Jun 13, 1997 at 06:10:02PM +0300, Martynas Kunigelis wrote:
> Elliot Lee wrote:
> >         I'm hoping to get Motif DND protocol docs and implement that.
> >         KDE uses Offix protocol version 0 as a base and then adds
> >         DndEnter and DndLeave events, making it Yet Another protocol to
> >         support.
> >         (this implementation is vanilla OffiX protocol version 1).
> > 
> Note that most probably KDE will use a different protocol in a near 
> future, since Troll Tech promised to add Drand And Drop to Qt 1.3, 
> which is promised to be released "in summer". Hope the Trolls will
> choose a good protocol, they always do the right thing programmingwise.
> If only Qt was LGPL!

Let's just hope they're bright enough to use OffiX. :)

> It would be nice, however, if gtk would support DND to/from KDE, since
> I (as many others) see KDE as a wide-spread desktop environment in the
> future.

Probably, will... though, it'll mean rewriting their libraries in C,
if they do something funky (i.e., non-OffiX-like). :-/
 
> Martynas
> 
> P.S. I don't want to start a flamewar, but has anybody asked why did
>      the autors choose C for gtk? I mean my heart hurts when I see
>      all the "C++ emulation" stuff. IMHO well written C++ code can be
>      as small/fast as C, and there's one BIG advantage that I see.
>      Here it is: I bet that every gtk_*_new() call returns a pointer
>      to malloc()'ed GtkWidget, right? Widget structures are pretty
>      small, right? The heap fragmentation gets pretty big, also the
>      overhead of having a lot of small heap chunks appears. Damn, 
>      testgtk eats 2M on my Linux system, where any of the Qt demos
>      eat about 1M (I'm not subtracting the shared lib size, I know
>      several apps would share it, but I'm taking a standalone app).
>      And with C++ you can easily create widgets on the stack or agregate
>      them into other classes. Allright, just don't start a flamewar,
>      that's just a simple $0.0002.

There's nothing stopping you from writing a C++ wrapper for gtk+.
There is no way for me to write a C interface to Qt... at least, not
easily.  Flexibitliy is a Good Thing (tm).

I won't get into the problems with C++ itself...

As for memory...

testgtk only eats just shy of a meg on my system, just after startup.
700k of that is shared.  That's nothing compared to Motif... not to
mention what happens because not everyone has Motif, static linking. :-/

Keep in mind, that testgtk has an awful lot of widgets, plus a pixmap
background.  I'd say it's pretty memory lean, all things considered.
Yes, it grows when you open more windows... I just opened every window
in testgtk, and got it up to just shy of 2M, 1.1M shared.  Is that how
you came to your number?  That's damned small!  I'd love to see the
equivilent numbers for Qt and Motif, if anyone has the time and
ability to do it. (I might end up doing it for my gtk+ article in the
LJ.. but I doubt I'll have the time to learn enough Motif and Qt to do
it.:-/)

I don't think fragmentation is going to be a problem for most
applications... if bunches of widgets are being allocated and
decallocated, the allocator probably will find a perfect fit chunk
from the last time it (or another of it's type) was allocated.
Something like gzilla might start having problem, since it will be
constantly allocating new and different widgets, but web browsers are
notorious for being HUGE... I'd bet that gzilla ends up being one of
the smaller ones.

I will admit the overhead of wasted space in small allocations is
something to think about... I believe S&P already are.

Okay, enough of my $0.02.

-- 
					-Otto.

From sopwith@redhat.com
Received: (qmail 21848 invoked from network); 13 Jun 1997 15:41:28 -0000
Received: from dilbert.redhat.com (sopwith@207.220.27.4)
  by mail2.redhat.com with SMTP; 13 Jun 1997 15:41:28 -0000
Received: from localhost (sopwith@localhost)
	by dilbert.redhat.com (8.8.5/8.8.5) with SMTP id LAA20964
	for < gtk-list@redhat.com>; Fri, 13 Jun 1997 11:41:22 -0400
Date: Fri, 13 Jun 1997 11:41:21 -0400 (EDT)
From: Elliot Lee < sopwith@redhat.com>
Reply-To: Elliot Lee < sopwith@redhat.com>
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: Drag and Drop, try 1
In-Reply-To: <33A162CA.6344@nomagic.com>
Message-ID: < Pine.LNX.3.95.970613112858.20286M-100000@dilbert.redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 13 Jun 1997, Martynas Kunigelis wrote:

> Note that most probably KDE will use a different protocol in a near 
> future, since Troll Tech promised to add Drand And Drop to Qt 1.3, 
> which is promised to be released "in summer". Hope the Trolls will
> choose a good protocol, they always do the right thing programmingwise.
> If only Qt was LGPL!
>
> It would be nice, however, if gtk would support DND to/from KDE, since

That would be nice.

Here's what I would like to do:
	Get talking with Troll Tech, the OffiX people (who seem to be
	rather lax in maintaining things), and you KDE people, along with
	the people on this list, and figure out what would be the ultimate
	drag and drop protocol. I can't find docs on Motif protocol, but I
	suspect it would be a very good place to start.

Then once we have agreed on a protocol, things will work much better.

> P.S. I don't want to start a flamewar, but has anybody asked why did
>      the autors choose C for gtk? I mean my heart hurts when I see
>      all the "C++ emulation" stuff. IMHO well written C++ code can be
>      as small/fast as C, and there's one BIG advantage that I see.

Maybe because C++ has a lot of shortcomings in many people's minds (and
reality) (not that I don't like C++, it has its uses), and also writing
gtk in C allows you to easily create bindings to other languages such as
python, perl, scheme, and last-but-not-least C++.

There are no bindings to other languages for Qt, to my knowledge, and a
quick search of TrollTech's web site seems to bear this out. 

Also, gcc's c++ front end is the only widespread C++ compiler in the free
software community, and it is not up to the quality of commercial
compilers like gcc's C front end is. 

>      Here it is: I bet that every gtk_*_new() call returns a pointer
>      to malloc()'ed GtkWidget, right? Widget structures are pretty
>      small, right? The heap fragmentation gets pretty big, also the
>      overhead of having a lot of small heap chunks appears. Damn, 
>      testgtk eats 2M on my Linux system, where any of the Qt demos
>      eat about 1M (I'm not subtracting the shared lib size, I know

testgtk exercises every widget available in gtk. Does an equivalent Qt app
exist that does the same?

'new' in C++ will do equiv of a malloc, I think.

(Looking at the shared library sizes, it does seem like gtk is larger -
libgtk.so.1.0.0 is 1.8M on the sparc, and that's not include libgdk or
libglib. Needs to be looked into.).

>      several apps would share it, but I'm taking a standalone app).
>      And with C++ you can easily create widgets on the stack or agregate
>      them into other classes. Allright, just don't start a flamewar,

You can get the same results in gtk, and as soon as bindings appear for
the other languages, you'll be able to do it in whatever language you
choose.

-- Elliot					http://www.redhat.com/
How do you explain school to a higher intelligence?
                -- Elliot, "E.T."

From sopwith@redhat.com
Received: (qmail 30246 invoked from network); 13 Jun 1997 15:49:23 -0000
Received: from dilbert.redhat.com (sopwith@207.220.27.4)
  by mail2.redhat.com with SMTP; 13 Jun 1997 15:49:23 -0000
Received: from localhost (sopwith@localhost)
	by dilbert.redhat.com (8.8.5/8.8.5) with SMTP id LAA20997
	for < gtk-list@redhat.com>; Fri, 13 Jun 1997 11:49:17 -0400
Date: Fri, 13 Jun 1997 11:49:17 -0400 (EDT)
From: Elliot Lee < sopwith@redhat.com>
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: Drag and Drop, try 1
In-Reply-To: <19970613113401.61292@redhat.com>
Message-ID: < Pine.LNX.3.95.970613114126.20286N-100000@dilbert.redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Fri, 13 Jun 1997, Otto Hammersmith wrote:

> Let's just hope they're bright enough to use OffiX. :)

Heaven help them if they do. OffiX has a lot of shortcomings, and the
'phase 2' talked about on the OffiX home page is nowhere in sight.

I think we need to lay out what we want in a DnD protocol and make it
happen. The KDE people and Troll Tech people probably have some thoughts
on this too.

> I don't think fragmentation is going to be a problem for most
> applications... if bunches of widgets are being allocated and
> decallocated, the allocator probably will find a perfect fit chunk
> from the last time it (or another of it's type) was allocated.
> Something like gzilla might start having problem, since it will be
> constantly allocating new and different widgets, but web browsers are
> notorious for being HUGE... I'd bet that gzilla ends up being one of
> the smaller ones.
> 
> I will admit the overhead of wasted space in small allocations is
> something to think about... I believe S&P already are.

A good approach to take is the pool allocator. apache does this to avoid
memory leaks. Basically you allocate a "pool" of memory that is
approximately the size that you expect to use for a particular object.
Then from that pool you allocate subpools and/or blocks and use them for
The neat thing is, you can free a pool and all the blocks/subpools within
it are freed as well.

So for example the gtk_init could malloc() all available address space
(Linux won't actually give it the memory until it is used), and then as
needed new windows could grab subpools/blocks of this memory and allocate
them for widgets...

alloc.c in apache is the place to look, it has a complete implementation
of this that we could "steal" :-)

-- Elliot		http://www.redhat.com/
How do you explain school to a higher intelligence? 
                -- Elliot, "E.T."

From otto@redhat.com
Received: (qmail 1476 invoked from network); 13 Jun 1997 16:43:28 -0000
Received: from nimrod.redhat.com (otto@199.183.24.13)
  by mail2.redhat.com with SMTP; 13 Jun 1997 16:43:28 -0000
Received: (from otto@localhost)
	by nimrod.redhat.com (8.8.5/8.8.5) id MAA00789;
	Fri, 13 Jun 1997 12:43:19 -0400
Message-ID: <19970613124313.04356@redhat.com>
Date: Fri, 13 Jun 1997 12:43:13 -0400
From: Otto Hammersmith < otto@redhat.com>
To: Elliot Lee < sopwith@redhat.com>
Cc: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: Drag and Drop, try 1
References: <33A162CA.6344@nomagic.com> 

< Pine.LNX.3.95.970613112858.20286M-100000@dilbert.redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.74
In-Reply-To: < Pine.LNX.3.95.970613112858.20286M-100000@dilbert.redhat.com>; from 

Elliot Lee on Fri, Jun 13, 1997 at 11:41:21AM -0400

On Fri, Jun 13, 1997 at 11:41:21AM -0400, Elliot Lee wrote:
> On Fri, 13 Jun 1997, Martynas Kunigelis wrote:
> 
> > Note that most probably KDE will use a different protocol in a near 
> > future, since Troll Tech promised to add Drand And Drop to Qt 1.3, 
> > which is promised to be released "in summer". Hope the Trolls will
> > choose a good protocol, they always do the right thing programmingwise.
> > If only Qt was LGPL!
> >
> > It would be nice, however, if gtk would support DND to/from KDE, since
> 
> That would be nice.
> 
> Here's what I would like to do:
> 	Get talking with Troll Tech, the OffiX people (who seem to be
> 	rather lax in maintaining things), and you KDE people, along with
> 	the people on this list, and figure out what would be the ultimate
> 	drag and drop protocol. I can't find docs on Motif protocol, but I
> 	suspect it would be a very good place to start.
> 
> Then once we have agreed on a protocol, things will work much better.

I think this is a very Good Idea.  Can you draft a message to send to
the various appropriate mailing lists.  (I have a feeling a post to
usenet would generate an awful lot of krfut... enough to justify a
cross-mailing list post.) I suppose a post to comp.os.linux.apps might
not be soooo bad....

[snipage]
> There are no bindings to other languages for Qt, to my knowledge, and a
> quick search of TrollTech's web site seems to bear this out. 

Python bindings do exist for Qt.  Not sure how good or useful it is,
as it came out after I stoped dinkering with Qt. (Now, Michael, this
doesn't mean you can start programming with Qt... ;)

[more snipage]
-- 
					-Otto.

From agulbra@troll.no
Received: (qmail 11269 invoked from network); 13 Jun 1997 16:57:29 -0000
Received: from lupinella.troll.no (root@195.0.254.19)
  by mail2.redhat.com with SMTP; 13 Jun 1997 16:57:28 -0000
Received: by troll.no id <79594-2487>; Fri, 13 Jun 1997 18:57:15 +0200
Sender: agulbra@troll.no
To: gtk-list@redhat.com
Cc: Matthias Ettrich < ettrich@kde.org>
Cc: Torben Weis < weis@kde.org>
Cc: John Lindal < jafl@cheshire-cat.wonderland.caltech.edu>
Subject: Re: [gtk-list] Re: Drag and Drop, try 1
References: < Pine.LNX.3.95.970613114126.20286N-100000@dilbert.redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
From: Arnt Gulbrandsen < agulbra@troll.no>
Date: 13 Jun 1997 18:57:04 +0200
In-Reply-To: Elliot Lee's message of Fri, 13 Jun 1997 11:49:17 -0400 (EDT)
Message-ID: < m3bu5aigpr.fsf@lupinella.troll.no>
Lines: 35

Elliot Lee < sopwith@redhat.com>
> On Fri, 13 Jun 1997, Otto Hammersmith wrote:
> 
> > Let's just hope they're bright enough to use OffiX. :)
> 
> Heaven help them if they do. OffiX has a lot of shortcomings, and the
> 'phase 2' talked about on the OffiX home page is nowhere in sight.
> 
> I think we need to lay out what we want in a DnD protocol and make it
> happen. The KDE people and Troll Tech people probably have some thoughts
> on this too.

Certainly - we want interoperability whenever there's anything to be
gained from it.  On windows 95/nt interoperable drag and drop is
simple, but on x11... imho, both offix dnd and motif dnd suck like
tornadoes.

John Lindal has been bothering me slightly about this - he wants Qt
and jx to use the same protocol.  It probably would be a good idea to
hash out a usable and well-defined protocol on a separate
implementer-only mailing list together, and then stick to this
protocol.  No proprietary extensions, no partial support.

(Implementer-only because people who have to implement a protocol tend
to have reservations against gee-whiz features and other protocol
bloat.)

Cc to John Lindal (who wrote jx drag and drop) and to Torben Weis and
Matthias Ettrich (the most active drag and drop developers of the
KDE).

I can set up a list here, but note that I'll be off the net for next
week.

--Arnt

From otto@redhat.com
Received: (qmail 12015 invoked from network); 13 Jun 1997 17:00:45 -0000
Received: from nimrod.redhat.com (otto@199.183.24.13)
  by mail2.redhat.com with SMTP; 13 Jun 1997 17:00:45 -0000
Received: (from otto@localhost)
	by nimrod.redhat.com (8.8.5/8.8.5) id NAA01003;
	Fri, 13 Jun 1997 13:00:38 -0400
Message-ID: <19970613130037.20713@redhat.com>
Date: Fri, 13 Jun 1997 13:00:37 -0400
From: Otto Hammersmith < otto@redhat.com>
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: Drag and Drop, try 1
References: <33A162CA.6344@nomagic.com> 

< Pine.LNX.3.95.970613112858.20286M-100000@dilbert.redhat.com> 

<19970613124313.04356@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.74
In-Reply-To: <19970613124313.04356@redhat.com>; from Otto Hammersmith on Fri, 

Jun 13, 1997 at 12:43:13PM -0400

On Fri, Jun 13, 1997 at 12:43:13PM -0400, Otto Hammersmith wrote:
> On Fri, Jun 13, 1997 at 11:41:21AM -0400, Elliot Lee wrote:
> > On Fri, 13 Jun 1997, Martynas Kunigelis wrote:
> > 
> > > Note that most probably KDE will use a different protocol in a near 
> > > future, since Troll Tech promised to add Drand And Drop to Qt 1.3, 
> > > which is promised to be released "in summer". Hope the Trolls will
> > > choose a good protocol, they always do the right thing programmingwise.
> > > If only Qt was LGPL!
> > >
> > > It would be nice, however, if gtk would support DND to/from KDE, since
> > 
> > That would be nice.
> > 
> > Here's what I would like to do:
> > 	Get talking with Troll Tech, the OffiX people (who seem to be
> > 	rather lax in maintaining things), and you KDE people, along with
> > 	the people on this list, and figure out what would be the ultimate
> > 	drag and drop protocol. I can't find docs on Motif protocol, but I
> > 	suspect it would be a very good place to start.
> > 
> > Then once we have agreed on a protocol, things will work much better.
> 
> I think this is a very Good Idea.  Can you draft a message to send to
> the various appropriate mailing lists.  (I have a feeling a post to
> usenet would generate an awful lot of krfut... enough to justify a
> cross-mailing list post.) I suppose a post to comp.os.linux.apps might
> not be soooo bad....

Okay, ignore that brain-fart.  I didn't see the cc: line.. and still
don't.. I guess the mailing list stripped it out or something dumb
like that. *sigh*

-- 
					-Otto.

From sopwith@redhat.com
Received: (qmail 11035 invoked from network); 13 Jun 1997 19:30:18 -0000
Received: from dilbert.redhat.com (sopwith@207.220.27.4)
  by mail2.redhat.com with SMTP; 13 Jun 1997 19:30:18 -0000
Received: from localhost (sopwith@localhost)
	by dilbert.redhat.com (8.8.5/8.8.5) with SMTP id PAA29427
	for < gtk-list@redhat.com>; Fri, 13 Jun 1997 15:30:21 -0400
Date: Fri, 13 Jun 1997 15:30:21 -0400 (EDT)
From: Elliot Lee < sopwith@redhat.com>
To: gtk-list@redhat.com
Subject: RFC: Drag And Drop standard
Message-ID: < Pine.LNX.3.95.970613152701.27935I-100000@dilbert.redhat.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Drag and drop in X11 is not currently standardized. There currently exist
at least four incompatible protocols for doing something that is standard
in the MS Windows world.

It seems like various people on the Qt, KDE, JX, and gtk projects want to
come up with a standard protocol for drag and drop, possibly along with a
reference implementation. The protocol should encompass all possible drag
and drop operations.

There's a mailing list we can use for discussing this -
libapp-list@cuc.edu. To subscribe, send a message to
libapp-list-request@cuc.edu with a subject of 'subscribe'. This is a
closed mailing list for protocol implementers mostly; with your
subscription request please put a reason why you want to subscribe in the
body of your message. 

Thanks,
-- Elliot					http://www.redhat.com/
How do you explain school to a higher intelligence?
                -- Elliot, "E.T."

From jay@a42.com
Received: (qmail 30830 invoked from network); 13 Jun 1997 18:58:28 -0000
Received: from cascadia.a42.com (jay@199.184.169.71)
  by mail2.redhat.com with SMTP; 13 Jun 1997 18:58:26 -0000
Received: (from jay@localhost) by cascadia.a42.com (8.6.12/8.6.9) 
id LAA11602; Fri, 13 Jun 1997 11:58:34 -0700
Date: Fri, 13 Jun 1997 11:58:34 -0700 (PDT)
From: Jay Painter < jay@a42.com>
To: gtk-list@redhat.com
Subject: C++ Wrappers
Message-ID: < Pine.LNX.3.91.970613114204.11126C-100000@cascadia.a42.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Here's a problem that I'm sure has been solved elegantly by someone.  
I've been porting some software (more like re-writing it) from Qt to GTK, 
and in the process I've played around with some basic C++ wrappers.  
Since GTK uses inhertance, I thought that the wrapper classes could be 
inherited also.  So the problem is how to initalize somthing like this.  
I can't make constructors virtual.  The first solution I thought of was 
to create a _GTKObject which is the object which is the base object which 
gets inherited by derived classes.  _GTKObject has a blank constructor, 
and the functional GTKObject would be created by inheriting _GTKObject 
and adding the proper constructer, which would contain the gtk_new_object 
call or whatever.

Also, I haven't noticed any Postscript printing ability with GTK.  Have I 
just missed it?

-------------------------------------------
Jay Painter -- jay@ssc.com -- jay@a42.com
Systema Admin., SSC/Linux Journal
http://www.a42.com/~jay

From martynas@nomagic.com
Received: (qmail 21960 invoked from network); 14 Jun 1997 09:10:23 -0000
Received: from unknown (HELO banginis.nm3.ktu.lt) (qmailr@193.219.67.66)
  by mail2.redhat.com with SMTP; 14 Jun 1997 09:10:20 -0000
Received: (qmail 29363 invoked from network); 14 Jun 1997 09:11:12 -0000
Received: from slibinas.nm3.ktu.lt (HELO slibinas) (193.219.67.176)
  by banginis.nm3.ktu.lt with SMTP; 14 Jun 1997 09:11:12 -0000
Message-ID: <33A2601C.F8B29EA0@nomagic.com>
Date: Sat, 14 Jun 1997 12:10:52 +0300
From: Martynas Kunigelis < martynas@nomagic.com>
X-Mailer: Mozilla 4.0 [en] (WinNT; I)
MIME-Version: 1.0
To: gtk-list@redhat.com
Subject: Re: [gtk-list] C++ Wrappers
X-Priority: 3 (Normal)
References: < Pine.LNX.3.91.970613114204.11126C-100000@cascadia.a42.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Jay Painter wrote:
> 
> Here's a problem that I'm sure has been solved elegantly by someone.
> I've been porting some software (more like re-writing it) from Qt to GTK,
> and in the process I've played around with some basic C++ wrappers.
> Since GTK uses inhertance, I thought that the wrapper classes could be
> inherited also.  So the problem is how to initalize somthing like this.
> I can't make constructors virtual.  The first solution I thought of was
> to create a _GTKObject which is the object which is the base object which
> gets inherited by derived classes.  _GTKObject has a blank constructor,
> and the functional GTKObject would be created by inheriting _GTKObject
> and adding the proper constructer, which would contain the gtk_new_object
> call or whatever.
> 
This can be solved using templates, too lazy to type in the example,
just
pass a widget creation function as a class template parameter. This
sucks
big time though as I hate templates. BTW, someone said the code gets
very 
bloated by using templates. Not really. Of course the code gets
regenerated
for different template parameters, but there's no other way. The real
problem
is that g++ produces and links the same code for every template instance
with the same parameter in different compile units. Except for ELF
format,
where it places the code into a common section and duplicate code gets
eliminated
during link time. Argh, this is not a C++ list. Anyway, I would
volunteer to
do the C++ wrappers once my exams are over if someone cares for that. Or
we could unify forces with someone who's already doing it. Just please
make
the button label move as you press it!! Please please please. I see no
problem
with the way Windows does it, maybe it's not ABSOLUTELY realistic, but
it's
something most of us are used to and it does RELATIVELY look realistic.

> Also, I haven't noticed any Postscript printing ability with GTK.  Have I
> just missed it?
> 

That's kinda hard to do you know. I think it would be a good idea to
move on
with the technology and use the XPrint extension or R6.3 for that, that
makes
it _damn_ easy compared to "manual" PostScript creation. "Wanna print
from gtk -
get R6.3". Yeah, the right way to force people to move on.


BTW, what about a flashing cursor for line edit widgets? Use the
timeout, and
that's it. I know, I know "do it yourself". It's exams time, man...

Martynas

P.S. I'm glad I started a thread on dnd compatiblity. Arnt "the Troll"
noticed
it and notified the KDE folks and the JX folk, so maybe we'll al come up
with a good dnd protocol. I think the MIME stuf is very cool.

P.P.S. I'm very glad to see really fast development and good response.
COOL!
Also it's very cool that you guys take performance concerns seriously,
that's
not what most C++ guys do (Troll is definitely _not_ an example here).

From wille@kew.netlife.de
Received: (qmail 14630 invoked from network); 25 Oct 1997 17:11:04 -0000
Received: from public.uni-hamburg.de (134.100.41.1)
  by mail2.redhat.com with SMTP; 25 Oct 1997 17:11:04 -0000
Received: from [194.221.212.226] by public.uni-hamburg.de (AIX 4.1/UCB 5.64/4.03)
          id AA20424; Sat, 25 Oct 1997 19:10:59 +0200
Message-Id: <9710251710.AA20424@public.uni-hamburg.de>
Date: Sat, 25 Oct 1997 21:08:25 +0200 (MET DST)
From: Stefan_Wille@public.uni-hamburg.de
Sender: Stefan Wille <wille@kew.netlife.de>
Subject: DnD docs?
To: gtk-list@redhat.com
Mime-Version: 1.0
Content-Type: TEXT/plain; CHARSET=US-ASCII

Hello,

is there documentation or a demo program
for the drag and drag facility?

Thanks
Stefan

From sopwith@cuc.edu  Thu May 11 19:23:40 2000
Received: (qmail 5778 invoked from network); 26 Oct 1997 20:14:35 -0000
Received: from helix.cs.cuc.edu (HELO cuc.edu) (sopwith@207.222.40.128)
  by mail2.redhat.com with SMTP; 26 Oct 1997 20:14:35 -0000
Received: from localhost (sopwith@localhost)
	by cuc.edu (8.8.5/8.8.5) with SMTP id PAA04080
	for <gtk-list@redhat.com>; Sun, 26 Oct 1997 15:13:54 -0500
Date: Sun, 26 Oct 1997 15:13:54 -0500 (EST)
From: Elliot Lee <sopwith@cuc.edu>
X-Sender: sopwith@helix.cs.cuc.edu
To: gtk-list@redhat.com
Subject: Re: [gtk-list] DnD docs?
In-Reply-To: <9710251710.AA20424@public.uni-hamburg.de>
Message-ID: <Pine.LNX.3.95.971026151335.4025A-100000@helix.cs.cuc.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Sat, 25 Oct 1997 Stefan_Wille@public.uni-hamburg.de wrote:

> is there documentation or a demo program
> for the drag and drag facility?

testgtk has an example built into the buttons demo. You can drag button
one to button two...

-- Elliot					http://www.redhat.com/
"They don't let my code go into shipping products," Gates said. "They
 haven't done that for eight years." (at the 1997 PDC)

From risacher@worldnet.att.net
Received: (qmail 31827 invoked from network); 26 Oct 1997 22:07:31 -0000
Received: from 184.dallas-09.tx.dial-access.att.net (HELO risacher) 
(magnus@12.67.2.184)
  by mail2.redhat.com with SMTP; 26 Oct 1997 22:07:31 -0000
Received: (from magnus@localhost) by risacher (8.6.12/8.6.9) id QAA24306; 
Sun, 26 Oct 1997 16:07:08 -0600
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: DnD docs?
References: <Pine.LNX.3.95.971026151335.4025A-100000@helix.cs.cuc.edu>
From: Daniel R Risacher <risacher@worldnet.att.net>
Date: 26 Oct 1997 16:07:08 -0600
In-Reply-To: Elliot Lee's message of Sun, 26 Oct 97 20:13:54 +0000
Message-ID: <m2ra98uqk3.fsf@worldnet.att.net>
Lines: 19
X-Mailer: Gnus v5.5/Emacs 20.0


>>>>> "Elliot" == Elliot Lee <sopwith@cuc.edu> writes:

    Elliot> testgtk has an example built into the buttons demo. You
    Elliot> can drag button one to button two...

Quik recipe for a crash:

Run testgtk
Open the button window
Drag button one onto button two
Close the button window
Open the button window
Drag button one onto button two
Poof!

-- 
I wonder if man will walk on the moon in my lifetime?
magnus@alum.mit.edu

From sopwith@cuc.edu
Received: (qmail 17564 invoked from network); 26 Oct 1997 22:46:45 -0000
Received: from helix.cs.cuc.edu (HELO cuc.edu) (sopwith@207.222.40.128)
  by mail2.redhat.com with SMTP; 26 Oct 1997 22:46:45 -0000
Received: from localhost (sopwith@localhost)
	by cuc.edu (8.8.5/8.8.5) with SMTP id RAA16353
	for <gtk-list@redhat.com>; Sun, 26 Oct 1997 17:46:04 -0500
Date: Sun, 26 Oct 1997 17:46:04 -0500 (EST)
From: Elliot Lee <sopwith@cuc.edu>
X-Sender: sopwith@helix.cs.cuc.edu
To: gtk-list@redhat.com
Subject: Re: [gtk-list] Re: DnD docs?
In-Reply-To: <m2ra98uqk3.fsf@worldnet.att.net>
Message-ID: <Pine.LNX.3.95.971026174522.16327A-100000@helix.cs.cuc.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On 26 Oct 1997, Daniel R Risacher wrote:

> >>>>> "Elliot" == Elliot Lee <sopwith@cuc.edu> writes:
> 
>     Elliot> testgtk has an example built into the buttons demo. You
>     Elliot> can drag button one to button two...
> 
> Quik recipe for a crash:
> 
> Run testgtk
> Open the button window
> Drag button one onto button two
> Close the button window
> Open the button window
> Drag button one onto button two
> Poof!

I know there are problems; that's why it's in CVS, so you all can look at
it and find the solutions (since I don't have luck in debugging my own
code:-) 

-- Elliot				http://www.redhat.com/
"They don't let my code go into shipping products," Gates said. "They
 haven't done that for eight years." (at the 1997 PDC)