xprint

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2022 License: BSD-3-Clause, GooglePatentClause Imports: 2 Imported by: 0

Documentation

Overview

Package xprint is the X client API for the XpExtension extension.

Index

Constants

View Source
const (
	AttrJobAttr     = 1
	AttrDocAttr     = 2
	AttrPageAttr    = 3
	AttrPrinterAttr = 4
	AttrServerAttr  = 5
	AttrMediumAttr  = 6
	AttrSpoolerAttr = 7
)
View Source
const (
	DetailStartJobNotify  = 1
	DetailEndJobNotify    = 2
	DetailStartDocNotify  = 3
	DetailEndDocNotify    = 4
	DetailStartPageNotify = 5
	DetailEndPageNotify   = 6
)
View Source
const (
	EvMaskNoEventMask   = 0
	EvMaskPrintMask     = 1
	EvMaskAttributeMask = 2
)
View Source
const (
	GetDocFinished       = 0
	GetDocSecondConsumer = 1
)
View Source
const AttributNotify = 1

AttributNotify is the event number for a AttributNotifyEvent.

View Source
const BadBadContext = 0

BadBadContext is the error number for a BadBadContext.

View Source
const BadBadSequence = 1

BadBadSequence is the error number for a BadBadSequence.

View Source
const Notify = 0

Notify is the event number for a NotifyEvent.

Variables

This section is empty.

Functions

func AttributNotifyEventNew

func AttributNotifyEventNew(buf []byte) xgb.Event

AttributNotifyEventNew constructs a AttributNotifyEvent value that implements xgb.Event from a byte slice.

func BadContextErrorNew

func BadContextErrorNew(buf []byte) xgb.Error

BadContextErrorNew constructs a BadContextError value that implements xgb.Error from a byte slice.

func BadSequenceErrorNew

func BadSequenceErrorNew(buf []byte) xgb.Error

BadSequenceErrorNew constructs a BadSequenceError value that implements xgb.Error from a byte slice.

func Init

func Init(c *xgb.Conn) error

Init must be called before using the XpExtension extension.

func NotifyEventNew

func NotifyEventNew(buf []byte) xgb.Event

NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.

func PrinterListBytes

func PrinterListBytes(buf []byte, list []Printer) int

PrinterListBytes writes a list of Printer values to a byte slice.

func PrinterListSize

func PrinterListSize(list []Printer) int

PrinterListSize computes the size (bytes) of a list of Printer values.

func PrinterRead

func PrinterRead(buf []byte, v *Printer) int

PrinterRead reads a byte slice into a Printer value.

func PrinterReadList

func PrinterReadList(buf []byte, dest []Printer) int

PrinterReadList reads a byte slice into a list of Printer values.

Types

type AttributNotifyEvent

type AttributNotifyEvent struct {
	Sequence uint16
	Detail   byte
	Context  Pcontext
}

func (AttributNotifyEvent) Bytes

func (v AttributNotifyEvent) Bytes() []byte

Bytes writes a AttributNotifyEvent value to a byte slice.

func (AttributNotifyEvent) SequenceId

func (v AttributNotifyEvent) SequenceId() uint16

SequenceId returns the sequence id attached to the AttributNotify event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.

func (AttributNotifyEvent) String

func (v AttributNotifyEvent) String() string

String is a rudimentary string representation of AttributNotifyEvent.

type BadContextError

type BadContextError struct {
	Sequence uint16
	NiceName string
}

func (BadContextError) BadId

func (err BadContextError) BadId() uint32

BadId returns the 'BadValue' number if one exists for the BadBadContext error. If no bad value exists, 0 is returned.

func (BadContextError) Error

func (err BadContextError) Error() string

func (BadContextError) SequenceId

func (err BadContextError) SequenceId() uint16

SequenceId returns the sequence id attached to the BadBadContext error. This is mostly used internally.

type BadSequenceError

type BadSequenceError struct {
	Sequence uint16
	NiceName string
}

func (BadSequenceError) BadId

func (err BadSequenceError) BadId() uint32

BadId returns the 'BadValue' number if one exists for the BadBadSequence error. If no bad value exists, 0 is returned.

func (BadSequenceError) Error

func (err BadSequenceError) Error() string

func (BadSequenceError) SequenceId

func (err BadSequenceError) SequenceId() uint16

SequenceId returns the sequence id attached to the BadBadSequence error. This is mostly used internally.

type CreateContextCookie

type CreateContextCookie struct {
	*xgb.Cookie
}

CreateContextCookie is a cookie used only for CreateContext requests.

func CreateContext

func CreateContext(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie

CreateContext sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func CreateContextChecked

func CreateContextChecked(c *xgb.Conn, ContextId uint32, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) CreateContextCookie

CreateContextChecked sends a checked request. If an error occurs, it can be retrieved using CreateContextCookie.Check()

func (CreateContextCookie) Check

func (cook CreateContextCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type NotifyEvent

type NotifyEvent struct {
	Sequence uint16
	Detail   byte
	Context  Pcontext
	Cancel   bool
}

func (NotifyEvent) Bytes

func (v NotifyEvent) Bytes() []byte

Bytes writes a NotifyEvent value to a byte slice.

func (NotifyEvent) SequenceId

func (v NotifyEvent) SequenceId() uint16

SequenceId returns the sequence id attached to the Notify event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.

func (NotifyEvent) String

func (v NotifyEvent) String() string

String is a rudimentary string representation of NotifyEvent.

type Pcontext

type Pcontext uint32

func NewPcontextId

func NewPcontextId(c *xgb.Conn) (Pcontext, error)

type PrintDestroyContextCookie

type PrintDestroyContextCookie struct {
	*xgb.Cookie
}

PrintDestroyContextCookie is a cookie used only for PrintDestroyContext requests.

func PrintDestroyContext

func PrintDestroyContext(c *xgb.Conn, Context uint32) PrintDestroyContextCookie

PrintDestroyContext sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintDestroyContextChecked

func PrintDestroyContextChecked(c *xgb.Conn, Context uint32) PrintDestroyContextCookie

PrintDestroyContextChecked sends a checked request. If an error occurs, it can be retrieved using PrintDestroyContextCookie.Check()

func (PrintDestroyContextCookie) Check

func (cook PrintDestroyContextCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintEndDocCookie

type PrintEndDocCookie struct {
	*xgb.Cookie
}

PrintEndDocCookie is a cookie used only for PrintEndDoc requests.

func PrintEndDoc

func PrintEndDoc(c *xgb.Conn, Cancel bool) PrintEndDocCookie

PrintEndDoc sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintEndDocChecked

func PrintEndDocChecked(c *xgb.Conn, Cancel bool) PrintEndDocCookie

PrintEndDocChecked sends a checked request. If an error occurs, it can be retrieved using PrintEndDocCookie.Check()

func (PrintEndDocCookie) Check

func (cook PrintEndDocCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintEndJobCookie

type PrintEndJobCookie struct {
	*xgb.Cookie
}

PrintEndJobCookie is a cookie used only for PrintEndJob requests.

func PrintEndJob

func PrintEndJob(c *xgb.Conn, Cancel bool) PrintEndJobCookie

PrintEndJob sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintEndJobChecked

func PrintEndJobChecked(c *xgb.Conn, Cancel bool) PrintEndJobCookie

PrintEndJobChecked sends a checked request. If an error occurs, it can be retrieved using PrintEndJobCookie.Check()

func (PrintEndJobCookie) Check

func (cook PrintEndJobCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintEndPageCookie

type PrintEndPageCookie struct {
	*xgb.Cookie
}

PrintEndPageCookie is a cookie used only for PrintEndPage requests.

func PrintEndPage

func PrintEndPage(c *xgb.Conn, Cancel bool) PrintEndPageCookie

PrintEndPage sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintEndPageChecked

func PrintEndPageChecked(c *xgb.Conn, Cancel bool) PrintEndPageCookie

PrintEndPageChecked sends a checked request. If an error occurs, it can be retrieved using PrintEndPageCookie.Check()

func (PrintEndPageCookie) Check

func (cook PrintEndPageCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintGetAttributesCookie

type PrintGetAttributesCookie struct {
	*xgb.Cookie
}

PrintGetAttributesCookie is a cookie used only for PrintGetAttributes requests.

func PrintGetAttributes

func PrintGetAttributes(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie

PrintGetAttributes sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetAttributesCookie.Reply()

func PrintGetAttributesUnchecked

func PrintGetAttributesUnchecked(c *xgb.Conn, Context Pcontext, Pool byte) PrintGetAttributesCookie

PrintGetAttributesUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetAttributesCookie) Reply

Reply blocks and returns the reply data for a PrintGetAttributes request.

type PrintGetAttributesReply

type PrintGetAttributesReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	StringLen uint32
	// padding: 20 bytes
	Attributes []String8 // size: xgb.Pad((int(StringLen) * 1))
}

PrintGetAttributesReply represents the data returned from a PrintGetAttributes request.

type PrintGetContextCookie

type PrintGetContextCookie struct {
	*xgb.Cookie
}

PrintGetContextCookie is a cookie used only for PrintGetContext requests.

func PrintGetContext

func PrintGetContext(c *xgb.Conn) PrintGetContextCookie

PrintGetContext sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetContextCookie.Reply()

func PrintGetContextUnchecked

func PrintGetContextUnchecked(c *xgb.Conn) PrintGetContextCookie

PrintGetContextUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetContextCookie) Reply

Reply blocks and returns the reply data for a PrintGetContext request.

type PrintGetContextReply

type PrintGetContextReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	Context uint32
}

PrintGetContextReply represents the data returned from a PrintGetContext request.

type PrintGetDocumentDataCookie

type PrintGetDocumentDataCookie struct {
	*xgb.Cookie
}

PrintGetDocumentDataCookie is a cookie used only for PrintGetDocumentData requests.

func PrintGetDocumentData

func PrintGetDocumentData(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie

PrintGetDocumentData sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetDocumentDataCookie.Reply()

func PrintGetDocumentDataUnchecked

func PrintGetDocumentDataUnchecked(c *xgb.Conn, Context Pcontext, MaxBytes uint32) PrintGetDocumentDataCookie

PrintGetDocumentDataUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetDocumentDataCookie) Reply

Reply blocks and returns the reply data for a PrintGetDocumentData request.

type PrintGetDocumentDataReply

type PrintGetDocumentDataReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	StatusCode   uint32
	FinishedFlag uint32
	DataLen      uint32
	// padding: 12 bytes
	Data []byte // size: xgb.Pad((int(DataLen) * 1))
}

PrintGetDocumentDataReply represents the data returned from a PrintGetDocumentData request.

type PrintGetImageResolutionCookie

type PrintGetImageResolutionCookie struct {
	*xgb.Cookie
}

PrintGetImageResolutionCookie is a cookie used only for PrintGetImageResolution requests.

func PrintGetImageResolution

func PrintGetImageResolution(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie

PrintGetImageResolution sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetImageResolutionCookie.Reply()

func PrintGetImageResolutionUnchecked

func PrintGetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext) PrintGetImageResolutionCookie

PrintGetImageResolutionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetImageResolutionCookie) Reply

Reply blocks and returns the reply data for a PrintGetImageResolution request.

type PrintGetImageResolutionReply

type PrintGetImageResolutionReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	ImageResolution uint16
}

PrintGetImageResolutionReply represents the data returned from a PrintGetImageResolution request.

type PrintGetOneAttributesCookie

type PrintGetOneAttributesCookie struct {
	*xgb.Cookie
}

PrintGetOneAttributesCookie is a cookie used only for PrintGetOneAttributes requests.

func PrintGetOneAttributes

func PrintGetOneAttributes(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie

PrintGetOneAttributes sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetOneAttributesCookie.Reply()

func PrintGetOneAttributesUnchecked

func PrintGetOneAttributesUnchecked(c *xgb.Conn, Context Pcontext, NameLen uint32, Pool byte, Name []String8) PrintGetOneAttributesCookie

PrintGetOneAttributesUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetOneAttributesCookie) Reply

Reply blocks and returns the reply data for a PrintGetOneAttributes request.

type PrintGetOneAttributesReply

type PrintGetOneAttributesReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	ValueLen uint32
	// padding: 20 bytes
	Value []String8 // size: xgb.Pad((int(ValueLen) * 1))
}

PrintGetOneAttributesReply represents the data returned from a PrintGetOneAttributes request.

type PrintGetPageDimensionsCookie

type PrintGetPageDimensionsCookie struct {
	*xgb.Cookie
}

PrintGetPageDimensionsCookie is a cookie used only for PrintGetPageDimensions requests.

func PrintGetPageDimensions

func PrintGetPageDimensions(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie

PrintGetPageDimensions sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetPageDimensionsCookie.Reply()

func PrintGetPageDimensionsUnchecked

func PrintGetPageDimensionsUnchecked(c *xgb.Conn, Context Pcontext) PrintGetPageDimensionsCookie

PrintGetPageDimensionsUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetPageDimensionsCookie) Reply

Reply blocks and returns the reply data for a PrintGetPageDimensions request.

type PrintGetPageDimensionsReply

type PrintGetPageDimensionsReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	Width              uint16
	Height             uint16
	OffsetX            uint16
	OffsetY            uint16
	ReproducibleWidth  uint16
	ReproducibleHeight uint16
}

PrintGetPageDimensionsReply represents the data returned from a PrintGetPageDimensions request.

type PrintGetPrinterListCookie

type PrintGetPrinterListCookie struct {
	*xgb.Cookie
}

PrintGetPrinterListCookie is a cookie used only for PrintGetPrinterList requests.

func PrintGetPrinterList

func PrintGetPrinterList(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie

PrintGetPrinterList sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetPrinterListCookie.Reply()

func PrintGetPrinterListUnchecked

func PrintGetPrinterListUnchecked(c *xgb.Conn, PrinterNameLen uint32, LocaleLen uint32, PrinterName []String8, Locale []String8) PrintGetPrinterListCookie

PrintGetPrinterListUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetPrinterListCookie) Reply

Reply blocks and returns the reply data for a PrintGetPrinterList request.

type PrintGetPrinterListReply

type PrintGetPrinterListReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	ListCount uint32
	// padding: 20 bytes
	Printers []Printer // size: PrinterListSize(Printers)
}

PrintGetPrinterListReply represents the data returned from a PrintGetPrinterList request.

type PrintGetScreenOfContextCookie

type PrintGetScreenOfContextCookie struct {
	*xgb.Cookie
}

PrintGetScreenOfContextCookie is a cookie used only for PrintGetScreenOfContext requests.

func PrintGetScreenOfContext

func PrintGetScreenOfContext(c *xgb.Conn) PrintGetScreenOfContextCookie

PrintGetScreenOfContext sends a checked request. If an error occurs, it will be returned with the reply by calling PrintGetScreenOfContextCookie.Reply()

func PrintGetScreenOfContextUnchecked

func PrintGetScreenOfContextUnchecked(c *xgb.Conn) PrintGetScreenOfContextCookie

PrintGetScreenOfContextUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintGetScreenOfContextCookie) Reply

Reply blocks and returns the reply data for a PrintGetScreenOfContext request.

type PrintGetScreenOfContextReply

type PrintGetScreenOfContextReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	Root xproto.Window
}

PrintGetScreenOfContextReply represents the data returned from a PrintGetScreenOfContext request.

type PrintInputSelectedCookie

type PrintInputSelectedCookie struct {
	*xgb.Cookie
}

PrintInputSelectedCookie is a cookie used only for PrintInputSelected requests.

func PrintInputSelected

func PrintInputSelected(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie

PrintInputSelected sends a checked request. If an error occurs, it will be returned with the reply by calling PrintInputSelectedCookie.Reply()

func PrintInputSelectedUnchecked

func PrintInputSelectedUnchecked(c *xgb.Conn, Context Pcontext) PrintInputSelectedCookie

PrintInputSelectedUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintInputSelectedCookie) Reply

Reply blocks and returns the reply data for a PrintInputSelected request.

type PrintInputSelectedReply

type PrintInputSelectedReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	EventMask     uint32
	AllEventsMask uint32
}

PrintInputSelectedReply represents the data returned from a PrintInputSelected request.

type PrintPutDocumentDataCookie

type PrintPutDocumentDataCookie struct {
	*xgb.Cookie
}

PrintPutDocumentDataCookie is a cookie used only for PrintPutDocumentData requests.

func PrintPutDocumentData

func PrintPutDocumentData(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie

PrintPutDocumentData sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintPutDocumentDataChecked

func PrintPutDocumentDataChecked(c *xgb.Conn, Drawable xproto.Drawable, LenData uint32, LenFmt uint16, LenOptions uint16, Data []byte, DocFormat []String8, Options []String8) PrintPutDocumentDataCookie

PrintPutDocumentDataChecked sends a checked request. If an error occurs, it can be retrieved using PrintPutDocumentDataCookie.Check()

func (PrintPutDocumentDataCookie) Check

func (cook PrintPutDocumentDataCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintQueryScreensCookie

type PrintQueryScreensCookie struct {
	*xgb.Cookie
}

PrintQueryScreensCookie is a cookie used only for PrintQueryScreens requests.

func PrintQueryScreens

func PrintQueryScreens(c *xgb.Conn) PrintQueryScreensCookie

PrintQueryScreens sends a checked request. If an error occurs, it will be returned with the reply by calling PrintQueryScreensCookie.Reply()

func PrintQueryScreensUnchecked

func PrintQueryScreensUnchecked(c *xgb.Conn) PrintQueryScreensCookie

PrintQueryScreensUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintQueryScreensCookie) Reply

Reply blocks and returns the reply data for a PrintQueryScreens request.

type PrintQueryScreensReply

type PrintQueryScreensReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	ListCount uint32
	// padding: 20 bytes
	Roots []xproto.Window // size: xgb.Pad((int(ListCount) * 4))
}

PrintQueryScreensReply represents the data returned from a PrintQueryScreens request.

type PrintQueryVersionCookie

type PrintQueryVersionCookie struct {
	*xgb.Cookie
}

PrintQueryVersionCookie is a cookie used only for PrintQueryVersion requests.

func PrintQueryVersion

func PrintQueryVersion(c *xgb.Conn) PrintQueryVersionCookie

PrintQueryVersion sends a checked request. If an error occurs, it will be returned with the reply by calling PrintQueryVersionCookie.Reply()

func PrintQueryVersionUnchecked

func PrintQueryVersionUnchecked(c *xgb.Conn) PrintQueryVersionCookie

PrintQueryVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintQueryVersionCookie) Reply

Reply blocks and returns the reply data for a PrintQueryVersion request.

type PrintQueryVersionReply

type PrintQueryVersionReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	MajorVersion uint16
	MinorVersion uint16
}

PrintQueryVersionReply represents the data returned from a PrintQueryVersion request.

type PrintRehashPrinterListCookie

type PrintRehashPrinterListCookie struct {
	*xgb.Cookie
}

PrintRehashPrinterListCookie is a cookie used only for PrintRehashPrinterList requests.

func PrintRehashPrinterList

func PrintRehashPrinterList(c *xgb.Conn) PrintRehashPrinterListCookie

PrintRehashPrinterList sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintRehashPrinterListChecked

func PrintRehashPrinterListChecked(c *xgb.Conn) PrintRehashPrinterListCookie

PrintRehashPrinterListChecked sends a checked request. If an error occurs, it can be retrieved using PrintRehashPrinterListCookie.Check()

func (PrintRehashPrinterListCookie) Check

func (cook PrintRehashPrinterListCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintSelectInputCookie

type PrintSelectInputCookie struct {
	*xgb.Cookie
}

PrintSelectInputCookie is a cookie used only for PrintSelectInput requests.

func PrintSelectInput

func PrintSelectInput(c *xgb.Conn, Context Pcontext, EventMask uint32) PrintSelectInputCookie

PrintSelectInput sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintSelectInputChecked

func PrintSelectInputChecked(c *xgb.Conn, Context Pcontext, EventMask uint32) PrintSelectInputCookie

PrintSelectInputChecked sends a checked request. If an error occurs, it can be retrieved using PrintSelectInputCookie.Check()

func (PrintSelectInputCookie) Check

func (cook PrintSelectInputCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintSetAttributesCookie

type PrintSetAttributesCookie struct {
	*xgb.Cookie
}

PrintSetAttributesCookie is a cookie used only for PrintSetAttributes requests.

func PrintSetAttributes

func PrintSetAttributes(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie

PrintSetAttributes sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintSetAttributesChecked

func PrintSetAttributesChecked(c *xgb.Conn, Context Pcontext, StringLen uint32, Pool byte, Rule byte, Attributes []String8) PrintSetAttributesCookie

PrintSetAttributesChecked sends a checked request. If an error occurs, it can be retrieved using PrintSetAttributesCookie.Check()

func (PrintSetAttributesCookie) Check

func (cook PrintSetAttributesCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintSetContextCookie

type PrintSetContextCookie struct {
	*xgb.Cookie
}

PrintSetContextCookie is a cookie used only for PrintSetContext requests.

func PrintSetContext

func PrintSetContext(c *xgb.Conn, Context uint32) PrintSetContextCookie

PrintSetContext sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintSetContextChecked

func PrintSetContextChecked(c *xgb.Conn, Context uint32) PrintSetContextCookie

PrintSetContextChecked sends a checked request. If an error occurs, it can be retrieved using PrintSetContextCookie.Check()

func (PrintSetContextCookie) Check

func (cook PrintSetContextCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintSetImageResolutionCookie

type PrintSetImageResolutionCookie struct {
	*xgb.Cookie
}

PrintSetImageResolutionCookie is a cookie used only for PrintSetImageResolution requests.

func PrintSetImageResolution

func PrintSetImageResolution(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie

PrintSetImageResolution sends a checked request. If an error occurs, it will be returned with the reply by calling PrintSetImageResolutionCookie.Reply()

func PrintSetImageResolutionUnchecked

func PrintSetImageResolutionUnchecked(c *xgb.Conn, Context Pcontext, ImageResolution uint16) PrintSetImageResolutionCookie

PrintSetImageResolutionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (PrintSetImageResolutionCookie) Reply

Reply blocks and returns the reply data for a PrintSetImageResolution request.

type PrintSetImageResolutionReply

type PrintSetImageResolutionReply struct {
	Sequence            uint16 // sequence number of the request for this reply
	Length              uint32 // number of bytes in this reply
	Status              bool
	PreviousResolutions uint16
}

PrintSetImageResolutionReply represents the data returned from a PrintSetImageResolution request.

type PrintStartDocCookie

type PrintStartDocCookie struct {
	*xgb.Cookie
}

PrintStartDocCookie is a cookie used only for PrintStartDoc requests.

func PrintStartDoc

func PrintStartDoc(c *xgb.Conn, DriverMode byte) PrintStartDocCookie

PrintStartDoc sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintStartDocChecked

func PrintStartDocChecked(c *xgb.Conn, DriverMode byte) PrintStartDocCookie

PrintStartDocChecked sends a checked request. If an error occurs, it can be retrieved using PrintStartDocCookie.Check()

func (PrintStartDocCookie) Check

func (cook PrintStartDocCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintStartJobCookie

type PrintStartJobCookie struct {
	*xgb.Cookie
}

PrintStartJobCookie is a cookie used only for PrintStartJob requests.

func PrintStartJob

func PrintStartJob(c *xgb.Conn, OutputMode byte) PrintStartJobCookie

PrintStartJob sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintStartJobChecked

func PrintStartJobChecked(c *xgb.Conn, OutputMode byte) PrintStartJobCookie

PrintStartJobChecked sends a checked request. If an error occurs, it can be retrieved using PrintStartJobCookie.Check()

func (PrintStartJobCookie) Check

func (cook PrintStartJobCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type PrintStartPageCookie

type PrintStartPageCookie struct {
	*xgb.Cookie
}

PrintStartPageCookie is a cookie used only for PrintStartPage requests.

func PrintStartPage

func PrintStartPage(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie

PrintStartPage sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func PrintStartPageChecked

func PrintStartPageChecked(c *xgb.Conn, Window xproto.Window) PrintStartPageCookie

PrintStartPageChecked sends a checked request. If an error occurs, it can be retrieved using PrintStartPageCookie.Check()

func (PrintStartPageCookie) Check

func (cook PrintStartPageCookie) Check() error

Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.

type Printer

type Printer struct {
	NameLen uint32
	Name    []String8 // size: xgb.Pad((int(NameLen) * 1))
	// alignment gap to multiple of 4
	DescLen     uint32
	Description []String8 // size: xgb.Pad((int(DescLen) * 1))

}

func (Printer) Bytes

func (v Printer) Bytes() []byte

Bytes writes a Printer value to a byte slice.

type String8

type String8 byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL