[comp.sys.amiga.tech] Screen Gadgets

ead@cbnewsd.ATT.COM (eric.a.duesing) (09/08/89)

HELP!!!    I am working on a proportional gadget and I am trying
to get it to work on a custom screen.  This gadget uses an Image
structure and works fine on a window in this custom screen, however,
it does NOT work (heck, it doesn't even appear)  when I attach it 
to the screen (and before you ask, I did set the SCRGADGET flag in
the GadgetType field of the Gadget structure). 

Is there something REAL obvious I am overlooking? (I don't
have the code with me so I can't post it.)

Does anyone have a code segment of a screen gadget they could post?


	Thanks a bunch,
		
		Eric A. Duesing

TEETER@HUMBER.BITNET (Doug Teeter) (09/08/89)

 "eric.a.duesing" <ead@cbnewsd.att.com> writes:

> HELP!!!    I am working on a proportional gadget and I am trying
> to get it to work on a custom screen.  This gadget uses an Image
> structure and works fine on a window in this custom screen, however,
> it does NOT work (heck, it doesn't even appear)  when I attach it
> to the screen (and before you ask, I did set the SCRGADGET flag in
> the GadgetType field of the Gadget structure).

 As far as I know there is no support for gadgets on screens in the
current version of OS. (other than system gadgets that is)

> Is there something REAL obvious I am overlooking? (I don't
> have the code with me so I can't post it.)
>
> Does anyone have a code segment of a screen gadget they could post?

 Because there is no IDCMP for Screens,  attaching your gadget to one
would serve no purpose as you would have no means of receiving event
messages when the user did something with it.

 Can anyone tell us if user Screen gadgets will be supported in 1.4?

....Teeter

mks@cbmvax.UUCP (Michael Sinz - CATS) (09/08/89)

In article <1612@cbnewsd.ATT.COM> ead@cbnewsd.ATT.COM (eric.a.duesing) writes:
>
>HELP!!!    I am working on a proportional gadget and I am trying
>to get it to work on a custom screen.  This gadget uses an Image
>structure and works fine on a window in this custom screen, however,
>it does NOT work (heck, it doesn't even appear)  when I attach it 
>to the screen (and before you ask, I did set the SCRGADGET flag in
>the GadgetType field of the Gadget structure). 

You can not have user screen gadgets.  They are not supported.  The easy way
to do this would be to open a STUPID-REFRESH backdrop window on the screen.

The reason user gadgets are not supported on screens is that there is no
UserPort where Intuition message can come to when the gadget is clicked.

/----------------------------------------------------------------------\
|      /// Michael Sinz -- CATS/Amiga Software Engineer                |
|     ///  PHONE 215-431-9422  UUCP ( uunet | rutgers ) !cbmvax!mks    |
|    ///                                                               |
|\\\///          When people are free to do as they please,            |
| \XX/                they usually imitate each other.                 |
\----------------------------------------------------------------------/

jimm@amiga.UUCP (Jim Mackraz) (09/10/89)

) As far as I know there is no support for gadgets on screens in the
)current version of OS. (other than system gadgets that is)

Correct.  The fancy version of the Intuition Manual even says so, in my
own words (my only contribution to the manual).

) Because there is no IDCMP for Screens,  attaching your gadget to one
)would serve no purpose as you would have no means of receiving event
)messages when the user did something with it.

Basically so.

) Can anyone tell us if user Screen gadgets will be supported in 1.4?

Dunno yet.  There is some generalized gadget communication in the works, 
and it might work out that you could stick on in a screen.  But maybe not:
I think it's worked out OK to require a window, often a borderless backdrop
window, for the gadgets.

There are some other problems, about who's active and all that.

	jimm
-- 
Jim Mackraz, I and I Computing	   	"... the signs are very ominous,
{cbmvax,well,oliveb}!amiga!jimm          and a chill wind blows."
							- Justice Blackmun
Opinions are my own.  Comments are not to be taken as Commodore official policy.