Hi !
> > > To resum: in true color mode I step from one pixel to the other by adding
> > > the size of either uint32 or sizeof( struct....) to pixelPointer.
> >
> > To be precise: By adding pixelformat->size/8 bytes.
> Is 8 bytes right, not 8 bits?
Umm - I see my notation is unclear. I'll better put it in words:
You divide pixelformat->size, which is in bits, by eight, what gives you the
step size in bytes.
Unless you have <8 BPP (yes, S3 cards do have a linear 4-bit mode), that
should always result in a whole integer.
> If I'm at the last pixel of a row, the jump should be only the size of one
> pixel, or pixelPointer++ to get to the first pixel of the next row.
Yes, but only, if there is no padding. The graphics hardware may (for whatever
reason) decide to set a frame with a larger xvirtual and even that might not
correspond to the framebuffer layout, as there might be extra padding
areas that may not be used in each line. IIRC the MediaGX chipset does this
to gain alignment advantages and use less bandwidth by having precalculated
"compressed" lines in the extra space.
> Program received signal SIGSEGV, Segmentation fault.
> _GGI_mansync_deinit (vis=0x804c9f0) at child.c:266
> 266 int i, nrvisuals = _GGI_mansync_state.nrvisuals;
> (gdb) bt
> #0 _GGI_mansync_deinit (vis=0x804c9f0) at child.c:266
> Cannot access memory at address 0x40115011.
That's strange. However there was a SEGV problem with ggiClose for quite
some time. I hope the latest Changes by Marcus fixed that. Please try with
a recent snapshot.
> I'd like to change the mouse pointer pixmap, how can I do that with ggi?
? GGI has no notion of a mouse-pointer. If you want one, you got to generate
it yourself.
> What are those ggiSet/GetGCClipping functions for? what means clipping?
> Where would I use this functions?
It sets a rectangle that limits the area that is drawn to. This is interesting
when drawing into divided regions like "windows" or "Cockpits" with
routines that do not necessarily care about giving proper coordinates.
It will inhibit any drawing outside the clipping region. Note, that
Directbuffer access can usually bypass this mechanism.
> How do I set the timeval struct in ggiEventPoll to a value that the
> function waits infinitly?
You pass NULL instead of a pointer to the timeval struct.
> Is there a macro or something, I found nothing in the libc info pages.
man select
> I want to get only key press events and button press events, therefore I
> set in my application:
> if( ggiSetEventMask( visual, emPtrButton | emKeyPress ) != 0 )
> {
> fail( "Couldn't set event mask\n" );
> }
This is an advisory thing only. IIRC it as well only stops _new_ events from
being queued. Already queued events are unaffected.
> while ( 1 )
> {
> if ( ( eventMask = ggiEventPoll( visual, emPtrButton | emKeyPress,
> &theTimer ) ) < 0 )
> {
> fail( "Error in event poll\n" );
> }
> Why do I still get events when neither a key nor a mouse button was
> pressed???
What kind of events do you get ?
> Do I have to use a ggiEventRead call to get an event out of the queue, or
You have to read. Poll only tells you that events are there.
> will it be removed automatically by ggiEventPoll?
No, as they would go to /dev/null then. ggiEventPoll has no place to store
them ...
> Are there more undocumented functions like ggiGetCharSize?
Maybe, but undocumented functions are undocumented for a reason:
They shouldn't be used normally.
CU, NAdy
--
Andreas Beck | Email : <[EMAIL PROTECTED]>