You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Liang Weike <we...@cs2c.com.cn> on 2013/01/15 09:40:04 UTC

Adding a new type of cursor on LINUX platform

Hi all,

I want to add a new type of cursor into office. Currently I've finished it on Windows. But when I run it on Linux the new cursor disappears. So how to write #_mask.h and #_curs.h? And does it come from the converted .cur file? If it does, then how to convert? 




Regards,
Liang Weike

Re: Adding a new type of cursor on LINUX platform

Posted by Herbert Duerr <hd...@apache.org>.
On 15.01.2013 11:28, Herbert Duerr wrote:
> On 15.01.2013 09:40, Liang Weike wrote:
>> I want to add a new type of cursor into office. Currently I've finished it on Windows. But when I run it on Linux the new cursor disappears. So how to write #_mask.h and #_curs.h? And does it come from the converted .cur file? If it does, then how to convert?
> 
> I'm afraid the tool that did such conversions is no longer available and
> has to be rewritten.
> 
> The format of these *_mask.h and *_curs.h files are the ones written out
> by X11's XWriteBitmapFile() [1] function. The Windows CUR file format is
> described in [2].
> 
> [1] http://www.x.org/archive/X11R7.5/doc/man/man3/XReadBitmapFile.3.html
> [2] http://en.wikipedia.org/wiki/ICO_%28icon_image_file_format%29

FWIW both "imagemagick" and "icotool" can read *.cur files and convert
them to a more common format.

> You'd also need to use the MAKE_CURSOR macro in
>    main/vcl/unx/generic/app/saldisp.cxx
> and
>    main/vcl/unx/gtk/app/gtkdata.cxx

Hope that helps,
Herbert


Re: Adding a new type of cursor on LINUX platform

Posted by Herbert Duerr <hd...@apache.org>.
Hi,

On 15.01.2013 09:40, Liang Weike wrote:
> I want to add a new type of cursor into office. Currently I've finished it on Windows. But when I run it on Linux the new cursor disappears. So how to write #_mask.h and #_curs.h? And does it come from the converted .cur file? If it does, then how to convert?

I'm afraid the tool that did such conversions is no longer available and
has to be rewritten.

The format of these *_mask.h and *_curs.h files are the ones written out
by X11's XWriteBitmapFile() [1] function. The Windows CUR file format is
described in [2].

[1] http://www.x.org/archive/X11R7.5/doc/man/man3/XReadBitmapFile.3.html
[2] http://en.wikipedia.org/wiki/ICO_%28icon_image_file_format%29

You'd also need to use the MAKE_CURSOR macro in
  main/vcl/unx/generic/app/saldisp.cxx
and
  main/vcl/unx/gtk/app/gtkdata.cxx

Hope that helps,
Herbert