aboutsummaryrefslogtreecommitdiff
path: root/core/sys/darwin/Foundation/NSBitmapImageRep.odin
blob: 059a75e43089358a4d7fa0257e6f0fb075c929c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package objc_Foundation

import "base:intrinsics"

@(objc_class="NSBitmapImageRep")
BitmapImageRep :: struct { using _: Object }

@(objc_type=BitmapImageRep, objc_name="alloc", objc_is_class_method=true)
BitmapImageRep_alloc :: proc "c" () -> ^BitmapImageRep {
	return msgSend(^BitmapImageRep, BitmapImageRep, "alloc")
}

@(objc_type=BitmapImageRep, objc_name="initWithBitmapDataPlanes")
BitmapImageRep_initWithBitmapDataPlanes :: proc "c" (
	self: ^BitmapImageRep, 
	bitmapDataPlanes: ^^u8,
	pixelsWide: Integer, 
	pixelsHigh: Integer,
	bitsPerSample: Integer,
	samplesPerPixel: Integer,
	hasAlpha: bool, 
	isPlanar: bool,
	colorSpaceName: ^String,
	bytesPerRow: Integer,
	bitsPerPixel: Integer) -> ^BitmapImageRep {

	return msgSend(^BitmapImageRep, 
		self, 
		"initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:",
		bitmapDataPlanes,
		pixelsWide, 
		pixelsHigh,
		bitsPerSample,
		samplesPerPixel,
		hasAlpha,
		isPlanar, 
		colorSpaceName,
		bytesPerRow,
		bitsPerPixel)
}

@(objc_type=BitmapImageRep, objc_name="bitmapData")
BitmapImageRep_bitmapData :: proc "c" (self: ^BitmapImageRep) -> rawptr {
	return msgSend(rawptr, self, "bitmapData") 
}

@(objc_type=BitmapImageRep, objc_name="CGImage")
BitmapImageRep_CGImage :: proc "c" (self: ^BitmapImageRep) -> rawptr {
	return msgSend(rawptr, self, "CGImage") 
}