mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-21 03:32:35 +03:00
convert cocoa frontend to bitmap operation table
This commit is contained in:
parent
839f15fc72
commit
8dc2a8f0b2
@ -24,6 +24,7 @@
|
||||
#import "cocoa/SearchWindowController.h"
|
||||
#import "cocoa/selection.h"
|
||||
#import "cocoa/fetch.h"
|
||||
#import "cocoa/bitmap.h"
|
||||
|
||||
#import "utils/filename.h"
|
||||
#import "utils/log.h"
|
||||
@ -220,7 +221,8 @@ int main( int argc, char **argv )
|
||||
.clipboard = cocoa_clipboard_table,
|
||||
.download = cocoa_download_table,
|
||||
.fetch = cocoa_fetch_table,
|
||||
.search = cocoa_search_table,
|
||||
.search = cocoa_search_table,
|
||||
.bitmap = cocoa_bitmap_table,
|
||||
};
|
||||
|
||||
cocoa_autorelease();
|
||||
|
@ -21,4 +21,6 @@
|
||||
|
||||
CGImageRef cocoa_get_cgimage( void *bitmap );
|
||||
|
||||
#endif
|
||||
struct gui_bitmap_table *cocoa_bitmap_table;
|
||||
|
||||
#endif
|
||||
|
@ -215,3 +215,19 @@ static CGImageRef cocoa_prepare_bitmap( void *bitmap )
|
||||
return result;
|
||||
}
|
||||
|
||||
static struct gui_bitmap_table bitmap_table = {
|
||||
.create = bitmap_create,
|
||||
.destroy = bitmap_destroy,
|
||||
.set_opaque = bitmap_set_opaque,
|
||||
.get_opaque = bitmap_get_opaque,
|
||||
.test_opaque = bitmap_test_opaque,
|
||||
.get_buffer = bitmap_get_buffer,
|
||||
.get_rowstride = bitmap_get_rowstride,
|
||||
.get_width = bitmap_get_width,
|
||||
.get_height = bitmap_get_height,
|
||||
.get_bpp = bitmap_get_bpp,
|
||||
.save = bitmap_save,
|
||||
.modified = bitmap_modified,
|
||||
};
|
||||
|
||||
struct gui_bitmap_table *cocoa_bitmap_table = &bitmap_table;
|
||||
|
Loading…
Reference in New Issue
Block a user