Hi again!

> > > > It should depend only on the number of pixels/row and their color depth.
> > > No. It can depends on alignment and other hardware restrictions.
> > bad.
> 
> No - as said, you don't need to care about it. You just use the values form 
> the directbuffer descriptor and that's it.

ok.
 
> > 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?

> > When I've reached the last pixel of the row and want to jump into the 
> > next row I have to calculate the jump size with
> 
> (uint8 *)pixelPointer += stride;
> 
> This brings you one pixel down.

yes.

> If you already walked with the pixelPointer,
> you have to compensate like this:
> 
> (uint8 *)pixelPointer += stride - already_walked_bytes;

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. But as
I saw this in a demo, I think this construction has a reason.
 
I've rewritten the test app and it now does exactly what I wanted. But
still I get a segmentation fault in ggiClose.

 gdb says:

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.

Any ideas?


Then I have some more questions, where I found no matching documentation:

I'd like to change the mouse pointer pixmap, how can I do that with ggi?


What are those ggiSet/GetGCClipping functions for? what means clipping?
Where would I use this functions?

How do I set the timeval struct in ggiEventPoll to a value that the
function waits infinitly? Is there a macro or something, I found nothing
in the libc info pages.

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" );
    }

  theTimer.tv_sec = LONG_MAX;

  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???
Do I have to use a ggiEventRead call to get an event out of the queue, or 
will it be removed automatically by ggiEventPoll?


Are there more undocumented functions like ggiGetCharSize?


gr. matthias

Reply via email to