sqMouseEvent.reserved1?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sqMouseEvent.reserved1?

EstebanLM

Hi,
I'm trying to compile a Cocoa Stack VM and I found that at some points it asks for a sqMouseEvent.reserved1, which is not defined at sq.h.
I just added it to sq.h and everything seems to be working, but I wonder if there is a reason why it is not there?

Cheers,
Esteban
Reply | Threaded
Open this post in threaded view
|

Re: sqMouseEvent.reserved1?

David T. Lewis
 
On Sat, Feb 05, 2011 at 10:19:03AM -0300, Esteban Lorenzano wrote:
>
> Hi,
> I'm trying to compile a Cocoa Stack VM and I found that at some points it asks for a sqMouseEvent.reserved1, which is not defined at sq.h.
> I just added it to sq.h and everything seems to be working, but I wonder if there is a reason why it is not there?
>
> Cheers,
> Esteban

It is defined in Cross/vm/sq.h since SVN rev 1279 (December 2005):

typedef struct sqMouseEvent
{
  int type;                     /* EventTypeMouse */
  unsigned int timeStamp;       /* time stamp */
  int x;                        /* mouse position x */
  int y;                        /* mouse position y */
  int buttons;                  /* combination of xxxButtonBit */
  int modifiers;                /* combination of xxxKeyBit */
  int reserved1;                /* reserved for future use */
  int windowIndex;              /* host window structure */
} sqMouseEvent;

But in the Cog sources it is not present:

typedef struct sqMouseEvent
{
  int type;                     /* EventTypeMouse */
  unsigned int timeStamp;       /* time stamp */
  int x;                        /* mouse position x */
  int y;                        /* mouse position y */
  int buttons;                  /* combination of xxxButtonBit */
  int modifiers;                /* combination of xxxKeyBit */
  int nrClicks;                 /* number of clicks in button downs - was reserved1 */
  int windowIndex;              /* host window structure */
} sqMouseEvent;

So this is a field that was removed in the Cog source tree.

Dave

Reply | Threaded
Open this post in threaded view
|

Re: sqMouseEvent.reserved1?

EstebanLM

yes... but stack vm (at least my sources), are needing it... so, what I do, I re-add it, or I just look for any references and remove it?

cheers,
Esteban

El 05/02/2011, a las 12:19p.m., David T. Lewis escribió:

>
> On Sat, Feb 05, 2011 at 10:19:03AM -0300, Esteban Lorenzano wrote:
>>
>> Hi,
>> I'm trying to compile a Cocoa Stack VM and I found that at some points it asks for a sqMouseEvent.reserved1, which is not defined at sq.h.
>> I just added it to sq.h and everything seems to be working, but I wonder if there is a reason why it is not there?
>>
>> Cheers,
>> Esteban
>
> It is defined in Cross/vm/sq.h since SVN rev 1279 (December 2005):
>
> typedef struct sqMouseEvent
> {
>  int type;                     /* EventTypeMouse */
>  unsigned int timeStamp;       /* time stamp */
>  int x;                        /* mouse position x */
>  int y;                        /* mouse position y */
>  int buttons;                  /* combination of xxxButtonBit */
>  int modifiers;                /* combination of xxxKeyBit */
>  int reserved1;                /* reserved for future use */
>  int windowIndex;              /* host window structure */
> } sqMouseEvent;
>
> But in the Cog sources it is not present:
>
> typedef struct sqMouseEvent
> {
>  int type;                     /* EventTypeMouse */
>  unsigned int timeStamp;       /* time stamp */
>  int x;                        /* mouse position x */
>  int y;                        /* mouse position y */
>  int buttons;                  /* combination of xxxButtonBit */
>  int modifiers;                /* combination of xxxKeyBit */
>  int nrClicks;                 /* number of clicks in button downs - was reserved1 */
>  int windowIndex;              /* host window structure */
> } sqMouseEvent;
>
> So this is a field that was removed in the Cog source tree.
>
> Dave
>

Reply | Threaded
Open this post in threaded view
|

Re: sqMouseEvent.reserved1?

David T. Lewis
 
I do not think that you can re-add it. All of the the event structs
are the same size, so I don't think you can add a field. The reserved1
field is renamed as nrClicks in Eliot's source. So I assume that
nrClicks is being used and should not be changed.

In the trunk branch the only references to sqMouseEvent.reserved1
are for initialization, so you may be able to just change these to
initialize nrClicks instead.

Dave

On Sat, Feb 05, 2011 at 01:27:06PM -0300, Esteban Lorenzano wrote:

>
> yes... but stack vm (at least my sources), are needing it... so, what I do, I re-add it, or I just look for any references and remove it?
>
> cheers,
> Esteban
>
> El 05/02/2011, a las 12:19p.m., David T. Lewis escribi?:
>
> >
> > On Sat, Feb 05, 2011 at 10:19:03AM -0300, Esteban Lorenzano wrote:
> >>
> >> Hi,
> >> I'm trying to compile a Cocoa Stack VM and I found that at some points it asks for a sqMouseEvent.reserved1, which is not defined at sq.h.
> >> I just added it to sq.h and everything seems to be working, but I wonder if there is a reason why it is not there?
> >>
> >> Cheers,
> >> Esteban
> >
> > It is defined in Cross/vm/sq.h since SVN rev 1279 (December 2005):
> >
> > typedef struct sqMouseEvent
> > {
> >  int type;                     /* EventTypeMouse */
> >  unsigned int timeStamp;       /* time stamp */
> >  int x;                        /* mouse position x */
> >  int y;                        /* mouse position y */
> >  int buttons;                  /* combination of xxxButtonBit */
> >  int modifiers;                /* combination of xxxKeyBit */
> >  int reserved1;                /* reserved for future use */
> >  int windowIndex;              /* host window structure */
> > } sqMouseEvent;
> >
> > But in the Cog sources it is not present:
> >
> > typedef struct sqMouseEvent
> > {
> >  int type;                     /* EventTypeMouse */
> >  unsigned int timeStamp;       /* time stamp */
> >  int x;                        /* mouse position x */
> >  int y;                        /* mouse position y */
> >  int buttons;                  /* combination of xxxButtonBit */
> >  int modifiers;                /* combination of xxxKeyBit */
> >  int nrClicks;                 /* number of clicks in button downs - was reserved1 */
> >  int windowIndex;              /* host window structure */
> > } sqMouseEvent;
> >
> > So this is a field that was removed in the Cog source tree.
> >
> > Dave
> >
Reply | Threaded
Open this post in threaded view
|

Re: sqMouseEvent.reserved1?

EstebanLM

yeah... sorry, I wouldn't make the question if I was read carefully. Is fixed and working now :)

Thanks,
Esteban

El 05/02/2011, a las 4:27p.m., David T. Lewis escribió:

>
> I do not think that you can re-add it. All of the the event structs
> are the same size, so I don't think you can add a field. The reserved1
> field is renamed as nrClicks in Eliot's source. So I assume that
> nrClicks is being used and should not be changed.
>
> In the trunk branch the only references to sqMouseEvent.reserved1
> are for initialization, so you may be able to just change these to
> initialize nrClicks instead.
>
> Dave
>
> On Sat, Feb 05, 2011 at 01:27:06PM -0300, Esteban Lorenzano wrote:
>>
>> yes... but stack vm (at least my sources), are needing it... so, what I do, I re-add it, or I just look for any references and remove it?
>>
>> cheers,
>> Esteban
>>
>> El 05/02/2011, a las 12:19p.m., David T. Lewis escribi?:
>>
>>>
>>> On Sat, Feb 05, 2011 at 10:19:03AM -0300, Esteban Lorenzano wrote:
>>>>
>>>> Hi,
>>>> I'm trying to compile a Cocoa Stack VM and I found that at some points it asks for a sqMouseEvent.reserved1, which is not defined at sq.h.
>>>> I just added it to sq.h and everything seems to be working, but I wonder if there is a reason why it is not there?
>>>>
>>>> Cheers,
>>>> Esteban
>>>
>>> It is defined in Cross/vm/sq.h since SVN rev 1279 (December 2005):
>>>
>>> typedef struct sqMouseEvent
>>> {
>>> int type;                     /* EventTypeMouse */
>>> unsigned int timeStamp;       /* time stamp */
>>> int x;                        /* mouse position x */
>>> int y;                        /* mouse position y */
>>> int buttons;                  /* combination of xxxButtonBit */
>>> int modifiers;                /* combination of xxxKeyBit */
>>> int reserved1;                /* reserved for future use */
>>> int windowIndex;              /* host window structure */
>>> } sqMouseEvent;
>>>
>>> But in the Cog sources it is not present:
>>>
>>> typedef struct sqMouseEvent
>>> {
>>> int type;                     /* EventTypeMouse */
>>> unsigned int timeStamp;       /* time stamp */
>>> int x;                        /* mouse position x */
>>> int y;                        /* mouse position y */
>>> int buttons;                  /* combination of xxxButtonBit */
>>> int modifiers;                /* combination of xxxKeyBit */
>>> int nrClicks;                 /* number of clicks in button downs - was reserved1 */
>>> int windowIndex;              /* host window structure */
>>> } sqMouseEvent;
>>>
>>> So this is a field that was removed in the Cog source tree.
>>>
>>> Dave
>>>