aboutsummaryrefslogtreecommitdiff
path: root/nexgb/auto_xvmc.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-10 12:47:19 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-10 12:47:19 -0400
commite239bb3c68a4981a3916534203c2fbd6b96f593c (patch)
treeebb9b1a4a4659d09edaf57ec39a744ff4bc15ff0 /nexgb/auto_xvmc.go
parent00c6217ca905b08ce0acda9a90492b5c1dc358e8 (diff)
downloadhaven-e239bb3c68a4981a3916534203c2fbd6b96f593c.tar.gz
haven-e239bb3c68a4981a3916534203c2fbd6b96f593c.tar.xz
haven-e239bb3c68a4981a3916534203c2fbd6b96f593c.zip
make resource ids their own individual types. last commit before overhaul to sub-packages
Diffstat (limited to 'nexgb/auto_xvmc.go')
-rw-r--r--nexgb/auto_xvmc.go102
1 files changed, 62 insertions, 40 deletions
diff --git a/nexgb/auto_xvmc.go b/nexgb/auto_xvmc.go
index 4797488..ba4bd44 100644
--- a/nexgb/auto_xvmc.go
+++ b/nexgb/auto_xvmc.go
@@ -1,7 +1,7 @@
package xgb
/*
- This file was generated by xvmc.xml on May 8 2012 11:03:25pm EDT.
+ This file was generated by xvmc.xml on May 10 2012 12:39:35pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -37,14 +37,6 @@ func init() {
newExtErrorFuncs["XVideo-MotionCompensation"] = make(map[int]newErrorFun)
}
-// Skipping definition for base type 'Int16'
-
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
// Skipping definition for base type 'Int8'
// Skipping definition for base type 'Card16'
@@ -59,20 +51,50 @@ func init() {
// Skipping definition for base type 'Float'
-// Skipping definition for base type 'Id'
-
// Skipping definition for base type 'Card8'
-// Skipping resource definition of 'Context'
+// Skipping definition for base type 'Int16'
+
+// Skipping definition for base type 'Int32'
-// Skipping resource definition of 'Surface'
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
-// Skipping resource definition of 'Subpicture'
+type XvmcContext uint32
+
+func (c *Conn) NewXvmcContextId() (XvmcContext, error) {
+ id, err := c.NewId()
+ if err != nil {
+ return 0, err
+ }
+ return XvmcContext(id), nil
+}
+
+type XvmcSurface uint32
+
+func (c *Conn) NewXvmcSurfaceId() (XvmcSurface, error) {
+ id, err := c.NewId()
+ if err != nil {
+ return 0, err
+ }
+ return XvmcSurface(id), nil
+}
+
+type XvmcSubpicture uint32
+
+func (c *Conn) NewXvmcSubpictureId() (XvmcSubpicture, error) {
+ id, err := c.NewId()
+ if err != nil {
+ return 0, err
+ }
+ return XvmcSubpicture(id), nil
+}
// 'XvmcSurfaceInfo' struct definition
// Size: 24
type XvmcSurfaceInfo struct {
- Id Id
+ Id XvmcSurface
ChromaFormat uint16
Pad0 uint16
MaxWidth uint16
@@ -87,7 +109,7 @@ type XvmcSurfaceInfo struct {
func ReadXvmcSurfaceInfo(buf []byte, v *XvmcSurfaceInfo) int {
b := 0
- v.Id = Id(Get32(buf[b:]))
+ v.Id = XvmcSurface(Get32(buf[b:]))
b += 4
v.ChromaFormat = Get16(buf[b:])
@@ -264,13 +286,13 @@ type XvmcListSurfaceTypesCookie struct {
*cookie
}
-func (c *Conn) XvmcListSurfaceTypes(PortId Id) XvmcListSurfaceTypesCookie {
+func (c *Conn) XvmcListSurfaceTypes(PortId XvPort) XvmcListSurfaceTypesCookie {
cookie := c.newCookie(true, true)
c.newRequest(c.xvmcListSurfaceTypesRequest(PortId), cookie)
return XvmcListSurfaceTypesCookie{cookie}
}
-func (c *Conn) XvmcListSurfaceTypesUnchecked(PortId Id) XvmcListSurfaceTypesCookie {
+func (c *Conn) XvmcListSurfaceTypesUnchecked(PortId XvPort) XvmcListSurfaceTypesCookie {
cookie := c.newCookie(false, true)
c.newRequest(c.xvmcListSurfaceTypesRequest(PortId), cookie)
return XvmcListSurfaceTypesCookie{cookie}
@@ -328,7 +350,7 @@ func (cook XvmcListSurfaceTypesCookie) Check() error {
}
// Write request to wire for XvmcListSurfaceTypes
-func (c *Conn) xvmcListSurfaceTypesRequest(PortId Id) []byte {
+func (c *Conn) xvmcListSurfaceTypesRequest(PortId XvPort) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -354,13 +376,13 @@ type XvmcCreateContextCookie struct {
*cookie
}
-func (c *Conn) XvmcCreateContext(ContextId Id, PortId Id, SurfaceId Id, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie {
+func (c *Conn) XvmcCreateContext(ContextId XvmcContext, PortId XvPort, SurfaceId XvmcSurface, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie {
cookie := c.newCookie(true, true)
c.newRequest(c.xvmcCreateContextRequest(ContextId, PortId, SurfaceId, Width, Height, Flags), cookie)
return XvmcCreateContextCookie{cookie}
}
-func (c *Conn) XvmcCreateContextUnchecked(ContextId Id, PortId Id, SurfaceId Id, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie {
+func (c *Conn) XvmcCreateContextUnchecked(ContextId XvmcContext, PortId XvPort, SurfaceId XvmcSurface, Width uint16, Height uint16, Flags uint32) XvmcCreateContextCookie {
cookie := c.newCookie(false, true)
c.newRequest(c.xvmcCreateContextRequest(ContextId, PortId, SurfaceId, Width, Height, Flags), cookie)
return XvmcCreateContextCookie{cookie}
@@ -430,7 +452,7 @@ func (cook XvmcCreateContextCookie) Check() error {
}
// Write request to wire for XvmcCreateContext
-func (c *Conn) xvmcCreateContextRequest(ContextId Id, PortId Id, SurfaceId Id, Width uint16, Height uint16, Flags uint32) []byte {
+func (c *Conn) xvmcCreateContextRequest(ContextId XvmcContext, PortId XvPort, SurfaceId XvmcSurface, Width uint16, Height uint16, Flags uint32) []byte {
size := 24
b := 0
buf := make([]byte, size)
@@ -472,13 +494,13 @@ type XvmcDestroyContextCookie struct {
}
// Write request to wire for XvmcDestroyContext
-func (c *Conn) XvmcDestroyContext(ContextId Id) XvmcDestroyContextCookie {
+func (c *Conn) XvmcDestroyContext(ContextId XvmcContext) XvmcDestroyContextCookie {
cookie := c.newCookie(false, false)
c.newRequest(c.xvmcDestroyContextRequest(ContextId), cookie)
return XvmcDestroyContextCookie{cookie}
}
-func (c *Conn) XvmcDestroyContextChecked(ContextId Id) XvmcDestroyContextCookie {
+func (c *Conn) XvmcDestroyContextChecked(ContextId XvmcContext) XvmcDestroyContextCookie {
cookie := c.newCookie(true, false)
c.newRequest(c.xvmcDestroyContextRequest(ContextId), cookie)
return XvmcDestroyContextCookie{cookie}
@@ -489,7 +511,7 @@ func (cook XvmcDestroyContextCookie) Check() error {
}
// Write request to wire for XvmcDestroyContext
-func (c *Conn) xvmcDestroyContextRequest(ContextId Id) []byte {
+func (c *Conn) xvmcDestroyContextRequest(ContextId XvmcContext) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -515,13 +537,13 @@ type XvmcCreateSurfaceCookie struct {
*cookie
}
-func (c *Conn) XvmcCreateSurface(SurfaceId Id, ContextId Id) XvmcCreateSurfaceCookie {
+func (c *Conn) XvmcCreateSurface(SurfaceId XvmcSurface, ContextId XvmcContext) XvmcCreateSurfaceCookie {
cookie := c.newCookie(true, true)
c.newRequest(c.xvmcCreateSurfaceRequest(SurfaceId, ContextId), cookie)
return XvmcCreateSurfaceCookie{cookie}
}
-func (c *Conn) XvmcCreateSurfaceUnchecked(SurfaceId Id, ContextId Id) XvmcCreateSurfaceCookie {
+func (c *Conn) XvmcCreateSurfaceUnchecked(SurfaceId XvmcSurface, ContextId XvmcContext) XvmcCreateSurfaceCookie {
cookie := c.newCookie(false, true)
c.newRequest(c.xvmcCreateSurfaceRequest(SurfaceId, ContextId), cookie)
return XvmcCreateSurfaceCookie{cookie}
@@ -579,7 +601,7 @@ func (cook XvmcCreateSurfaceCookie) Check() error {
}
// Write request to wire for XvmcCreateSurface
-func (c *Conn) xvmcCreateSurfaceRequest(SurfaceId Id, ContextId Id) []byte {
+func (c *Conn) xvmcCreateSurfaceRequest(SurfaceId XvmcSurface, ContextId XvmcContext) []byte {
size := 12
b := 0
buf := make([]byte, size)
@@ -609,13 +631,13 @@ type XvmcDestroySurfaceCookie struct {
}
// Write request to wire for XvmcDestroySurface
-func (c *Conn) XvmcDestroySurface(SurfaceId Id) XvmcDestroySurfaceCookie {
+func (c *Conn) XvmcDestroySurface(SurfaceId XvmcSurface) XvmcDestroySurfaceCookie {
cookie := c.newCookie(false, false)
c.newRequest(c.xvmcDestroySurfaceRequest(SurfaceId), cookie)
return XvmcDestroySurfaceCookie{cookie}
}
-func (c *Conn) XvmcDestroySurfaceChecked(SurfaceId Id) XvmcDestroySurfaceCookie {
+func (c *Conn) XvmcDestroySurfaceChecked(SurfaceId XvmcSurface) XvmcDestroySurfaceCookie {
cookie := c.newCookie(true, false)
c.newRequest(c.xvmcDestroySurfaceRequest(SurfaceId), cookie)
return XvmcDestroySurfaceCookie{cookie}
@@ -626,7 +648,7 @@ func (cook XvmcDestroySurfaceCookie) Check() error {
}
// Write request to wire for XvmcDestroySurface
-func (c *Conn) xvmcDestroySurfaceRequest(SurfaceId Id) []byte {
+func (c *Conn) xvmcDestroySurfaceRequest(SurfaceId XvmcSurface) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -652,13 +674,13 @@ type XvmcCreateSubpictureCookie struct {
*cookie
}
-func (c *Conn) XvmcCreateSubpicture(SubpictureId Id, Context Id, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie {
+func (c *Conn) XvmcCreateSubpicture(SubpictureId XvmcSubpicture, Context XvmcContext, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie {
cookie := c.newCookie(true, true)
c.newRequest(c.xvmcCreateSubpictureRequest(SubpictureId, Context, XvimageId, Width, Height), cookie)
return XvmcCreateSubpictureCookie{cookie}
}
-func (c *Conn) XvmcCreateSubpictureUnchecked(SubpictureId Id, Context Id, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie {
+func (c *Conn) XvmcCreateSubpictureUnchecked(SubpictureId XvmcSubpicture, Context XvmcContext, XvimageId uint32, Width uint16, Height uint16) XvmcCreateSubpictureCookie {
cookie := c.newCookie(false, true)
c.newRequest(c.xvmcCreateSubpictureRequest(SubpictureId, Context, XvimageId, Width, Height), cookie)
return XvmcCreateSubpictureCookie{cookie}
@@ -737,7 +759,7 @@ func (cook XvmcCreateSubpictureCookie) Check() error {
}
// Write request to wire for XvmcCreateSubpicture
-func (c *Conn) xvmcCreateSubpictureRequest(SubpictureId Id, Context Id, XvimageId uint32, Width uint16, Height uint16) []byte {
+func (c *Conn) xvmcCreateSubpictureRequest(SubpictureId XvmcSubpicture, Context XvmcContext, XvimageId uint32, Width uint16, Height uint16) []byte {
size := 20
b := 0
buf := make([]byte, size)
@@ -776,13 +798,13 @@ type XvmcDestroySubpictureCookie struct {
}
// Write request to wire for XvmcDestroySubpicture
-func (c *Conn) XvmcDestroySubpicture(SubpictureId Id) XvmcDestroySubpictureCookie {
+func (c *Conn) XvmcDestroySubpicture(SubpictureId XvmcSubpicture) XvmcDestroySubpictureCookie {
cookie := c.newCookie(false, false)
c.newRequest(c.xvmcDestroySubpictureRequest(SubpictureId), cookie)
return XvmcDestroySubpictureCookie{cookie}
}
-func (c *Conn) XvmcDestroySubpictureChecked(SubpictureId Id) XvmcDestroySubpictureCookie {
+func (c *Conn) XvmcDestroySubpictureChecked(SubpictureId XvmcSubpicture) XvmcDestroySubpictureCookie {
cookie := c.newCookie(true, false)
c.newRequest(c.xvmcDestroySubpictureRequest(SubpictureId), cookie)
return XvmcDestroySubpictureCookie{cookie}
@@ -793,7 +815,7 @@ func (cook XvmcDestroySubpictureCookie) Check() error {
}
// Write request to wire for XvmcDestroySubpicture
-func (c *Conn) xvmcDestroySubpictureRequest(SubpictureId Id) []byte {
+func (c *Conn) xvmcDestroySubpictureRequest(SubpictureId XvmcSubpicture) []byte {
size := 8
b := 0
buf := make([]byte, size)
@@ -819,13 +841,13 @@ type XvmcListSubpictureTypesCookie struct {
*cookie
}
-func (c *Conn) XvmcListSubpictureTypes(PortId Id, SurfaceId Id) XvmcListSubpictureTypesCookie {
+func (c *Conn) XvmcListSubpictureTypes(PortId XvPort, SurfaceId XvmcSurface) XvmcListSubpictureTypesCookie {
cookie := c.newCookie(true, true)
c.newRequest(c.xvmcListSubpictureTypesRequest(PortId, SurfaceId), cookie)
return XvmcListSubpictureTypesCookie{cookie}
}
-func (c *Conn) XvmcListSubpictureTypesUnchecked(PortId Id, SurfaceId Id) XvmcListSubpictureTypesCookie {
+func (c *Conn) XvmcListSubpictureTypesUnchecked(PortId XvPort, SurfaceId XvmcSurface) XvmcListSubpictureTypesCookie {
cookie := c.newCookie(false, true)
c.newRequest(c.xvmcListSubpictureTypesRequest(PortId, SurfaceId), cookie)
return XvmcListSubpictureTypesCookie{cookie}
@@ -883,7 +905,7 @@ func (cook XvmcListSubpictureTypesCookie) Check() error {
}
// Write request to wire for XvmcListSubpictureTypes
-func (c *Conn) xvmcListSubpictureTypesRequest(PortId Id, SurfaceId Id) []byte {
+func (c *Conn) xvmcListSubpictureTypesRequest(PortId XvPort, SurfaceId XvmcSurface) []byte {
size := 12
b := 0
buf := make([]byte, size)