diff options
author | Po Lu <luangruo@yahoo.com> | 2022-05-13 03:14:26 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-05-13 03:14:26 +0000 |
commit | 119f613cf5a39db1712c87ebcc21d7600ef79e5f (patch) | |
tree | 3a59debb0bb401a95669bfa39fc5828896288f95 /src/haiku_support.cc | |
parent | 6d31ac596165f4d57204af1ee87a7badd79c8697 (diff) | |
download | emacs-119f613cf5a39db1712c87ebcc21d7600ef79e5f.tar.gz |
Allow actually setting cursor colors on Haiku
* src/haiku_support.cc (be_create_pixmap_cursor): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_create_frame): Change default cursor
color to "font-color".
(haiku_create_tip_frame): Likewise.
(struct user_cursor_bitmap_info): New struct.
(cursor_bitmaps): New list of bitmaps corresponding to cursors.
(haiku_create_colored_cursor): New function.
(haiku_free_custom_cursors): Set current cursor to the default
cursor before freeing the original value.
(haiku_set_mouse_color): Actually recolor cursors based on
built-in bitmaps.
* src/haikuterm.c (haiku_defined_color): Clean up coding style.
Diffstat (limited to 'src/haiku_support.cc')
-rw-r--r-- | src/haiku_support.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 39e8daa8269..c0bd3c1b0e2 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -5122,3 +5122,21 @@ be_roster_launch (const char *type, const char *file, char **cargs, ? INT_MAX : nargs), cargs, team_id); } + +void * +be_create_pixmap_cursor (void *bitmap, int x, int y) +{ + BBitmap *bm; + BCursor *cursor; + + bm = (BBitmap *) bitmap; + cursor = new BCursor (bm, BPoint (x, y)); + + if (cursor->InitCheck () != B_OK) + { + delete cursor; + return NULL; + } + + return cursor; +} |