[haiku-bugs] Re: [Haiku] #5978: Implement app_server API to get mouse cursor information

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Sat, 15 May 2010 13:41:32 -0000

#5978: Implement app_server API to get mouse cursor information
--------------------------------+-------------------------------------------
 Reporter:  Wim                 |       Owner:  nobody        
     Type:  enhancement         |      Status:  assigned      
 Priority:  normal              |   Milestone:  R1            
Component:  Servers/app_server  |     Version:  R1/Development
 Keywords:  Screenshot          |   Blockedby:                
 Platform:  All                 |    Blocking:  4100          
--------------------------------+-------------------------------------------

Comment(by axeld):

 Cursors don't use just ServerBitmaps, but its own subclass, so I'm afraid
 one doesn't get around doing that, at least I don't think adding the
 CursorBitmaps to an application would work out that good (for those
 bitmaps, there is always one ServerApp that actually owns the bitmap). I
 guess it could made work, but it should be way easier to go the seemingly
 silly road of sending the data to the client, and let it create the
 BBitmap itself.

 Since the link is read one date after the other, you could have code like
 this (might be pseudo code, it's been a while since I looked at that API):
 {{{
 uint32 size = link.Read<uint32>();
 void* data = malloc(size);
 if (data == NULL)
         return B_NO_MEMORY;

 link.Read(data, size);
 // ...
 // read other bitmap values, and create bitmap
 bitmap->SetBits(data, ...);
 }}}

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5978#comment:12>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: