Documentation ¶
Overview ¶
Go bindings for GDK 3. Supports version 3.6 and later.
Index ¶
- Constants
- func KeyvalConvertCase(v uint) (lower, upper uint)
- func KeyvalFromName(keyvalName string) uint
- func KeyvalIsLower(v uint) bool
- func KeyvalIsUpper(v uint) bool
- func KeyvalToLower(v uint) uint
- func KeyvalToUpper(v uint) uint
- func PixbufGetFileInfo(filename string) (format interface{}, width, height int)
- func PixbufGetType() glib.Type
- func WorkspaceControlSupported() bool
- type Atom
- type Colorspace
- type Cursor
- type Device
- type DeviceManager
- type DeviceType
- type Display
- func (v *Display) Beep()
- func (v *Display) Close()
- func (v *Display) DeviceIsGrabbed(device *Device) bool
- func (v *Display) Flush()
- func (v *Display) GetAppLaunchContext()
- func (v *Display) GetDefaultCursorSize() uint
- func (v *Display) GetDefaultGroup() (*Window, error)
- func (v *Display) GetDefaultScreen() (*Screen, error)
- func (v *Display) GetDeviceManager() (*DeviceManager, error)
- func (v *Display) GetEvent() (*Event, error)
- func (v *Display) GetMaximalCursorSize() (width, height uint)
- func (v *Display) GetName() (string, error)
- func (v *Display) GetScreen(screenNum int) (*Screen, error)
- func (v *Display) HasPending() bool
- func (v *Display) IsClosed() bool
- func (v *Display) Native() uintptr
- func (v *Display) NotifyStartupComplete(startupID string)
- func (v *Display) PeekEvent() (*Event, error)
- func (v *Display) PutEvent(event *Event)
- func (v *Display) RequestSelectionNotification(selection Atom) bool
- func (v *Display) SetDoubleClickDistance(distance uint)
- func (v *Display) SetDoubleClickTime(msec uint)
- func (v *Display) StoreClipboard(clipboardWindow *Window, time uint32, targets ...Atom)
- func (v *Display) SupportsClipboardPersistence() bool
- func (v *Display) SupportsColorCursor() bool
- func (v *Display) SupportsCursorAlpha() bool
- func (v *Display) SupportsInputShapes() bool
- func (v *Display) SupportsSelectionNotification() bool
- func (v *Display) SupportsShapes() bool
- func (v *Display) Sync()
- type DragAction
- type DragContext
- type Event
- type EventButton
- func (v *EventButton) Button() uint
- func (v *EventButton) ButtonVal() uint
- func (v *EventButton) MotionVal() (float64, float64)
- func (v *EventButton) MotionValRoot() (float64, float64)
- func (v *EventButton) Native() uintptr
- func (v *EventButton) State() uint
- func (v *EventButton) Time() uint32
- func (v *EventButton) Type() EventType
- func (v *EventButton) X() float64
- func (v *EventButton) XRoot() float64
- func (v *EventButton) Y() float64
- func (v *EventButton) YRoot() float64
- type EventKey
- type EventMask
- type EventMotion
- type EventScroll
- type EventType
- type GrabOwnership
- type GrabStatus
- type InterpType
- type ModifierType
- type Pixbuf
- func PixbufCopy(v *Pixbuf) (*Pixbuf, error)
- func PixbufNew(colorspace Colorspace, hasAlpha bool, bitsPerSample, width, height int) (*Pixbuf, error)
- func PixbufNewFromFile(filename string) (*Pixbuf, error)
- func PixbufNewFromFileAtScale(filename string, width, height int, preserveAspectRatio bool) (*Pixbuf, error)
- func PixbufNewFromFileAtSize(filename string, width, height int) (*Pixbuf, error)
- func (v *Pixbuf) ApplyEmbeddedOrientation() (*Pixbuf, error)
- func (v *Pixbuf) Flip(horizontal bool) (*Pixbuf, error)
- func (v *Pixbuf) GetBitsPerSample() int
- func (v *Pixbuf) GetByteLength() int
- func (v *Pixbuf) GetColorspace() Colorspace
- func (v *Pixbuf) GetHasAlpha() bool
- func (v *Pixbuf) GetHeight() int
- func (v *Pixbuf) GetNChannels() int
- func (v *Pixbuf) GetOption(key string) (value string, ok bool)
- func (v *Pixbuf) GetPixels() (channels []byte)
- func (v *Pixbuf) GetRowstride() int
- func (v *Pixbuf) GetWidth() int
- func (v *Pixbuf) Native() uintptr
- func (v *Pixbuf) RotateSimple(angle PixbufRotation) (*Pixbuf, error)
- func (v *Pixbuf) SaveJPEG(path string, quality int) error
- func (v *Pixbuf) SavePNG(path string, compression int) error
- func (v *Pixbuf) ScaleSimple(destWidth, destHeight int, interpType InterpType) (*Pixbuf, error)
- type PixbufAlphaMode
- type PixbufLoader
- type PixbufRotation
- type RGBA
- type Rectangle
- type Screen
- func (v *Screen) GetActiveWindow() (*Window, error)
- func (v *Screen) GetCurrentDesktop() uint32
- func (v *Screen) GetDisplay() (*Display, error)
- func (v *Screen) GetHeight() int
- func (v *Screen) GetHeightMM() int
- func (v *Screen) GetMonitorAtPoint(x, y int) int
- func (v *Screen) GetMonitorAtWindow(w *Window) int
- func (v *Screen) GetMonitorHeightMM(m int) int
- func (v *Screen) GetMonitorPlugName(m int) (string, error)
- func (v *Screen) GetMonitorScaleFactor(m int) int
- func (v *Screen) GetMonitorWidthMM(m int) int
- func (v *Screen) GetNMonitors() int
- func (v *Screen) GetNumber() int
- func (v *Screen) GetNumberOfDesktops() uint32
- func (v *Screen) GetPrimaryMonitor() int
- func (v *Screen) GetRGBAVisual() (*Visual, error)
- func (v *Screen) GetResolution() float64
- func (v *Screen) GetRootWindow() (*Window, error)
- func (v *Screen) GetScreenNumber() int
- func (v *Screen) GetSystemVisual() (*Visual, error)
- func (v *Screen) GetWidth() int
- func (v *Screen) GetWidthMM() int
- func (v *Screen) IsComposited() bool
- func (v *Screen) MakeDisplayName() (string, error)
- func (v *Screen) Native() uintptr
- func (v *Screen) SetResolution(r float64)
- type ScrollDirection
- type Visual
- type Window
Constants ¶
const ( GDK_SHIFT_MASK ModifierType = C.GDK_SHIFT_MASK GDK_LOCK_MASK = C.GDK_LOCK_MASK GDK_CONTROL_MASK = C.GDK_CONTROL_MASK GDK_MOD1_MASK = C.GDK_MOD1_MASK GDK_MOD2_MASK = C.GDK_MOD2_MASK GDK_MOD3_MASK = C.GDK_MOD3_MASK GDK_MOD4_MASK = C.GDK_MOD4_MASK GDK_MOD5_MASK = C.GDK_MOD5_MASK GDK_BUTTON1_MASK = C.GDK_BUTTON1_MASK GDK_BUTTON2_MASK = C.GDK_BUTTON2_MASK GDK_BUTTON3_MASK = C.GDK_BUTTON3_MASK GDK_BUTTON4_MASK = C.GDK_BUTTON4_MASK GDK_BUTTON5_MASK = C.GDK_BUTTON5_MASK GDK_SUPER_MASK = C.GDK_SUPER_MASK GDK_HYPER_MASK = C.GDK_HYPER_MASK GDK_META_MASK = C.GDK_META_MASK GDK_RELEASE_MASK = C.GDK_RELEASE_MASK GDK_MODIFIER_MASK = C.GDK_MODIFIER_MASK )
const CURRENT_TIME = C.GDK_CURRENT_TIME
Variables ¶
This section is empty.
Functions ¶
func KeyvalConvertCase ¶
func KeyvalFromName ¶
KeyvalFromName() is a wrapper around gdk_keyval_from_name().
func KeyvalIsLower ¶
func KeyvalIsUpper ¶
func KeyvalToLower ¶
func KeyvalToUpper ¶
func PixbufGetFileInfo ¶
PixbufGetFileInfo is a wrapper around gdk_pixbuf_get_file_info(). TODO: need to wrap the returned format to GdkPixbufFormat.
func PixbufGetType ¶
PixbufGetType is a wrapper around gdk_pixbuf_get_type().
func WorkspaceControlSupported ¶
func WorkspaceControlSupported() bool
Types ¶
type Atom ¶
type Atom uintptr
Atom is a representation of GDK's GdkAtom.
const ( SELECTION_PRIMARY Atom = 1 SELECTION_SECONDARY Atom = 2 SELECTION_CLIPBOARD Atom = 69 TARGET_BITMAP Atom = 5 TARGET_COLORMAP Atom = 7 TARGET_DRAWABLE Atom = 17 TARGET_PIXMAP Atom = 20 TARGET_STRING Atom = 31 SELECTION_TYPE_ATOM Atom = 4 SELECTION_TYPE_BITMAP Atom = 5 SELECTION_TYPE_COLORMAP Atom = 7 SELECTION_TYPE_DRAWABLE Atom = 17 SELECTION_TYPE_INTEGER Atom = 19 SELECTION_TYPE_PIXMAP Atom = 20 SELECTION_TYPE_WINDOW Atom = 33 SELECTION_TYPE_STRING Atom = 31 )
Selections
func GdkAtomIntern ¶
GdkAtomIntern is a wrapper around gdk_atom_intern
type Colorspace ¶
type Colorspace int
Colorspace is a representation of GDK's GdkColorspace.
const (
COLORSPACE_RGB Colorspace = C.GDK_COLORSPACE_RGB
)
type Device ¶
Device is a representation of GDK's GdkDevice.
func (*Device) Grab ¶
func (v *Device) Grab(w *Window, ownership GrabOwnership, owner_events bool, event_mask EventMask, cursor *Cursor, time uint32) GrabStatus
Grab() is a wrapper around gdk_device_grab().
type DeviceManager ¶
DeviceManager is a representation of GDK's GdkDeviceManager.
func (*DeviceManager) GetClientPointer ¶
func (v *DeviceManager) GetClientPointer() (*Device, error)
GetClientPointer() is a wrapper around gdk_device_manager_get_client_pointer().
func (*DeviceManager) GetDisplay ¶
func (v *DeviceManager) GetDisplay() (*Display, error)
GetDisplay() is a wrapper around gdk_device_manager_get_display().
func (*DeviceManager) ListDevices ¶
func (v *DeviceManager) ListDevices(tp DeviceType) *glib.List
ListDevices() is a wrapper around gdk_device_manager_list_devices().
func (*DeviceManager) Native ¶
func (v *DeviceManager) Native() uintptr
Native returns a pointer to the underlying GdkDeviceManager.
type DeviceType ¶
type DeviceType int
const ( DEVICE_TYPE_MASTER DeviceType = C.GDK_DEVICE_TYPE_MASTER DEVICE_TYPE_SLAVE DeviceType = C.GDK_DEVICE_TYPE_SLAVE DEVICE_TYPE_FLOATING DeviceType = C.GDK_DEVICE_TYPE_FLOATING )
type Display ¶
Display is a representation of GDK's GdkDisplay.
func DisplayGetDefault ¶
DisplayGetDefault() is a wrapper around gdk_display_get_default().
func DisplayOpen ¶
DisplayOpen() is a wrapper around gdk_display_open().
func (*Display) DeviceIsGrabbed ¶
DeviceIsGrabbed() is a wrapper around gdk_display_device_is_grabbed().
func (*Display) GetAppLaunchContext ¶
func (v *Display) GetAppLaunchContext()
TODO(jrick) glib.AppLaunchContext GdkAppLaunchContext
func (*Display) GetDefaultCursorSize ¶
GetDefaultCursorSize() is a wrapper around gdk_display_get_default_cursor_size().
func (*Display) GetDefaultGroup ¶
GetDefaultGroup() is a wrapper around gdk_display_get_default_group().
func (*Display) GetDefaultScreen ¶
GetDefaultScreen() is a wrapper around gdk_display_get_default_screen().
func (*Display) GetDeviceManager ¶
func (v *Display) GetDeviceManager() (*DeviceManager, error)
GetDeviceManager() is a wrapper around gdk_display_get_device_manager().
func (*Display) GetMaximalCursorSize ¶
GetMaximalCursorSize() is a wrapper around gdk_display_get_maximal_cursor_size().
func (*Display) HasPending ¶
HasPending() is a wrapper around gdk_display_has_pending().
func (*Display) NotifyStartupComplete ¶
NotifyStartupComplete() is a wrapper around gdk_display_notify_startup_complete().
func (*Display) RequestSelectionNotification ¶
RequestSelectionNotification() is a wrapper around gdk_display_request_selection_notification().
func (*Display) SetDoubleClickDistance ¶
SetDoubleClickDistance() is a wrapper around gdk_display_set_double_click_distance().
func (*Display) SetDoubleClickTime ¶
SetDoubleClickTime() is a wrapper around gdk_display_set_double_click_time().
func (*Display) StoreClipboard ¶
TODO(jrick)
func (*Display) SupportsClipboardPersistence ¶
SupportsClipboardPersistence() is a wrapper around gdk_display_supports_clipboard_persistence().
func (*Display) SupportsColorCursor ¶
SupportsColorCursor() is a wrapper around gdk_display_supports_cursor_color().
func (*Display) SupportsCursorAlpha ¶
SupportsCursorAlpha() is a wrapper around gdk_display_supports_cursor_alpha().
func (*Display) SupportsInputShapes ¶
SupportsInputShapes() is a wrapper around gdk_display_supports_input_shapes().
func (*Display) SupportsSelectionNotification ¶
SupportsSelectionNotification() is a wrapper around gdk_display_supports_selection_notification().
func (*Display) SupportsShapes ¶
SupportsShapes() is a wrapper around gdk_display_supports_shapes().
type DragAction ¶
type DragAction int
DragAction is a representation of GDK's GdkDragAction.
const ( ACTION_DEFAULT DragAction = C.GDK_ACTION_DEFAULT ACTION_COPY DragAction = C.GDK_ACTION_COPY ACTION_MOVE DragAction = C.GDK_ACTION_MOVE ACTION_LINK DragAction = C.GDK_ACTION_LINK ACTION_PRIVATE DragAction = C.GDK_ACTION_PRIVATE ACTION_ASK DragAction = C.GDK_ACTION_ASK )
type DragContext ¶
DragContext is a representation of GDK's GdkDragContext.
func (*DragContext) ListTargets ¶
func (v *DragContext) ListTargets() *glib.List
func (*DragContext) Native ¶
func (v *DragContext) Native() uintptr
Native returns a pointer to the underlying GdkDragContext.
type EventButton ¶
type EventButton struct {
*Event
}
EventButton is a representation of GDK's GdkEventButton.
func (*EventButton) Button ¶
func (v *EventButton) Button() uint
func (*EventButton) ButtonVal ¶
func (v *EventButton) ButtonVal() uint
func (*EventButton) MotionVal ¶
func (v *EventButton) MotionVal() (float64, float64)
func (*EventButton) MotionValRoot ¶
func (v *EventButton) MotionValRoot() (float64, float64)
func (*EventButton) Native ¶
func (v *EventButton) Native() uintptr
Native returns a pointer to the underlying GdkEventButton.
func (*EventButton) State ¶
func (v *EventButton) State() uint
func (*EventButton) Time ¶
func (v *EventButton) Time() uint32
Time returns the time of the event in milliseconds.
func (*EventButton) Type ¶
func (v *EventButton) Type() EventType
func (*EventButton) X ¶
func (v *EventButton) X() float64
func (*EventButton) XRoot ¶
func (v *EventButton) XRoot() float64
XRoot returns the x coordinate of the pointer relative to the root of the screen.
func (*EventButton) Y ¶
func (v *EventButton) Y() float64
func (*EventButton) YRoot ¶
func (v *EventButton) YRoot() float64
YRoot returns the y coordinate of the pointer relative to the root of the screen.
type EventKey ¶
type EventKey struct {
*Event
}
EventKey is a representation of GDK's GdkEventKey.
func EventKeyNew ¶
func EventKeyNew() *EventKey
type EventMask ¶
type EventMask int
added by terrak EventMask is a representation of GDK's GdkEventMask.
const ( EXPOSURE_MASK EventMask = C.GDK_EXPOSURE_MASK POINTER_MOTION_MASK EventMask = C.GDK_POINTER_MOTION_MASK POINTER_MOTION_HINT_MASK EventMask = C.GDK_POINTER_MOTION_HINT_MASK BUTTON_MOTION_MASK EventMask = C.GDK_BUTTON_MOTION_MASK BUTTON1_MOTION_MASK EventMask = C.GDK_BUTTON1_MOTION_MASK BUTTON2_MOTION_MASK EventMask = C.GDK_BUTTON2_MOTION_MASK BUTTON3_MOTION_MASK EventMask = C.GDK_BUTTON3_MOTION_MASK BUTTON_PRESS_MASK EventMask = C.GDK_BUTTON_PRESS_MASK BUTTON_RELEASE_MASK EventMask = C.GDK_BUTTON_RELEASE_MASK KEY_PRESS_MASK EventMask = C.GDK_KEY_PRESS_MASK KEY_RELEASE_MASK EventMask = C.GDK_KEY_RELEASE_MASK ENTER_NOTIFY_MASK EventMask = C.GDK_ENTER_NOTIFY_MASK LEAVE_NOTIFY_MASK EventMask = C.GDK_LEAVE_NOTIFY_MASK FOCUS_CHANGE_MASK EventMask = C.GDK_FOCUS_CHANGE_MASK STRUCTURE_MASK EventMask = C.GDK_STRUCTURE_MASK PROPERTY_CHANGE_MASK EventMask = C.GDK_PROPERTY_CHANGE_MASK VISIBILITY_NOTIFY_MASK EventMask = C.GDK_VISIBILITY_NOTIFY_MASK PROXIMITY_IN_MASK EventMask = C.GDK_PROXIMITY_IN_MASK PROXIMITY_OUT_MASK EventMask = C.GDK_PROXIMITY_OUT_MASK SUBSTRUCTURE_MASK EventMask = C.GDK_SUBSTRUCTURE_MASK SCROLL_MASK EventMask = C.GDK_SCROLL_MASK TOUCH_MASK EventMask = C.GDK_TOUCH_MASK SMOOTH_SCROLL_MASK EventMask = C.GDK_SMOOTH_SCROLL_MASK ALL_EVENTS_MASK EventMask = C.GDK_ALL_EVENTS_MASK )
type EventMotion ¶
type EventMotion struct {
*Event
}
func (*EventMotion) MotionVal ¶
func (v *EventMotion) MotionVal() (float64, float64)
func (*EventMotion) MotionValRoot ¶
func (v *EventMotion) MotionValRoot() (float64, float64)
func (*EventMotion) Native ¶
func (v *EventMotion) Native() uintptr
Native returns a pointer to the underlying GdkEventMotion.
type EventScroll ¶
type EventScroll struct {
*Event
}
EventScroll is a representation of GDK's GdkEventScroll.
func (*EventScroll) DeltaX ¶
func (v *EventScroll) DeltaX() float64
func (*EventScroll) DeltaY ¶
func (v *EventScroll) DeltaY() float64
func (*EventScroll) Native ¶
func (v *EventScroll) Native() uintptr
Native returns a pointer to the underlying GdkEventScroll.
func (*EventScroll) Type ¶
func (v *EventScroll) Type() EventType
func (*EventScroll) X ¶
func (v *EventScroll) X() float64
func (*EventScroll) Y ¶
func (v *EventScroll) Y() float64
type EventType ¶
type EventType int
EventType is a representation of GDK's GdkEventType. Do not confuse these event types with the signals that GTK+ widgets emit
const ( EVENT_NOTHING EventType = C.GDK_NOTHING EVENT_DELETE EventType = C.GDK_DELETE EVENT_DESTROY EventType = C.GDK_DESTROY EVENT_EXPOSE EventType = C.GDK_EXPOSE EVENT_MOTION_NOTIFY EventType = C.GDK_MOTION_NOTIFY EVENT_BUTTON_PRESS EventType = C.GDK_BUTTON_PRESS EVENT_2BUTTON_PRESS EventType = C.GDK_2BUTTON_PRESS EVENT_DOUBLE_BUTTON_PRESS EventType = C.GDK_DOUBLE_BUTTON_PRESS EVENT_3BUTTON_PRESS EventType = C.GDK_3BUTTON_PRESS EVENT_TRIPLE_BUTTON_PRESS EventType = C.GDK_TRIPLE_BUTTON_PRESS EVENT_BUTTON_RELEASE EventType = C.GDK_BUTTON_RELEASE EVENT_KEY_PRESS EventType = C.GDK_KEY_PRESS EVENT_KEY_RELEASE EventType = C.GDK_KEY_RELEASE EVENT_LEAVE_NOTIFY EventType = C.GDK_ENTER_NOTIFY EVENT_FOCUS_CHANGE EventType = C.GDK_FOCUS_CHANGE EVENT_CONFIGURE EventType = C.GDK_CONFIGURE EVENT_MAP EventType = C.GDK_MAP EVENT_UNMAP EventType = C.GDK_UNMAP EVENT_PROPERTY_NOTIFY EventType = C.GDK_PROPERTY_NOTIFY EVENT_SELECTION_CLEAR EventType = C.GDK_SELECTION_CLEAR EVENT_SELECTION_REQUEST EventType = C.GDK_SELECTION_REQUEST EVENT_SELECTION_NOTIFY EventType = C.GDK_SELECTION_NOTIFY EVENT_PROXIMITY_IN EventType = C.GDK_PROXIMITY_IN EVENT_PROXIMITY_OUT EventType = C.GDK_PROXIMITY_OUT EVENT_DRAG_ENTER EventType = C.GDK_DRAG_ENTER EVENT_DRAG_LEAVE EventType = C.GDK_DRAG_LEAVE EVENT_DRAG_MOTION EventType = C.GDK_DRAG_MOTION EVENT_DRAG_STATUS EventType = C.GDK_DRAG_STATUS EVENT_DROP_START EventType = C.GDK_DROP_START EVENT_DROP_FINISHED EventType = C.GDK_DROP_FINISHED EVENT_CLIENT_EVENT EventType = C.GDK_CLIENT_EVENT EVENT_VISIBILITY_NOTIFY EventType = C.GDK_VISIBILITY_NOTIFY EVENT_SCROLL EventType = C.GDK_SCROLL EVENT_WINDOW_STATE EventType = C.GDK_WINDOW_STATE EVENT_SETTING EventType = C.GDK_SETTING EVENT_OWNER_CHANGE EventType = C.GDK_OWNER_CHANGE EVENT_GRAB_BROKEN EventType = C.GDK_GRAB_BROKEN EVENT_DAMAGE EventType = C.GDK_DAMAGE EVENT_TOUCH_BEGIN EventType = C.GDK_TOUCH_BEGIN EVENT_TOUCH_UPDATE EventType = C.GDK_TOUCH_UPDATE EVENT_TOUCH_END EventType = C.GDK_TOUCH_END EVENT_TOUCH_CANCEL EventType = C.GDK_TOUCH_CANCEL EVENT_LAST EventType = C.GDK_EVENT_LAST )
type GrabOwnership ¶
type GrabOwnership int
const ( OWNERSHIP_NONE GrabOwnership = C.GDK_OWNERSHIP_NONE OWNERSHIP_WINDOW GrabOwnership = C.GDK_OWNERSHIP_WINDOW OWNERSHIP_APPLICATION GrabOwnership = C.GDK_OWNERSHIP_APPLICATION )
type GrabStatus ¶
type GrabStatus int
const ( GRAB_SUCCESS GrabStatus = C.GDK_GRAB_SUCCESS GRAB_ALREADY_GRABBED GrabStatus = C.GDK_GRAB_ALREADY_GRABBED GRAB_INVALID_TIME GrabStatus = C.GDK_GRAB_INVALID_TIME GRAB_FROZEN GrabStatus = C.GDK_GRAB_FROZEN // Only exists since 3.16 // GRAB_FAILED GrabStatus = C.GDK_GRAB_FAILED GRAB_FAILED GrabStatus = 5 )
type InterpType ¶
type InterpType int
InterpType is a representation of GDK's GdkInterpType.
const ( INTERP_NEAREST InterpType = C.GDK_INTERP_NEAREST INTERP_TILES InterpType = C.GDK_INTERP_TILES INTERP_BILINEAR InterpType = C.GDK_INTERP_BILINEAR INTERP_HYPER InterpType = C.GDK_INTERP_HYPER )
type ModifierType ¶
type ModifierType uint
ModifierType is a representation of GDK's GdkModifierType.
type Pixbuf ¶
Pixbuf is a representation of GDK's GdkPixbuf.
func PixbufCopy ¶
PixbufCopy is a wrapper around gdk_pixbuf_copy().
func PixbufNew ¶
func PixbufNew(colorspace Colorspace, hasAlpha bool, bitsPerSample, width, height int) (*Pixbuf, error)
PixbufNew is a wrapper around gdk_pixbuf_new().
func PixbufNewFromFile ¶
PixbufNewFromFile is a wrapper around gdk_pixbuf_new_from_file().
func PixbufNewFromFileAtScale ¶
func PixbufNewFromFileAtScale(filename string, width, height int, preserveAspectRatio bool) (*Pixbuf, error)
PixbufNewFromFileAtScale is a wrapper around gdk_pixbuf_new_from_file_at_scale().
func PixbufNewFromFileAtSize ¶
PixbufNewFromFileAtSize is a wrapper around gdk_pixbuf_new_from_file_at_size().
func (*Pixbuf) ApplyEmbeddedOrientation ¶
ApplyEmbeddedOrientation is a wrapper around gdk_pixbuf_apply_embedded_orientation().
func (*Pixbuf) GetBitsPerSample ¶
GetBitsPerSample is a wrapper around gdk_pixbuf_get_bits_per_sample().
func (*Pixbuf) GetByteLength ¶
GetByteLength is a wrapper around gdk_pixbuf_get_byte_length().
func (*Pixbuf) GetColorspace ¶
func (v *Pixbuf) GetColorspace() Colorspace
GetColorspace is a wrapper around gdk_pixbuf_get_colorspace().
func (*Pixbuf) GetHasAlpha ¶
GetHasAlpha is a wrapper around gdk_pixbuf_get_has_alpha().
func (*Pixbuf) GetNChannels ¶
GetNChannels is a wrapper around gdk_pixbuf_get_n_channels().
func (*Pixbuf) GetOption ¶
GetOption is a wrapper around gdk_pixbuf_get_option(). ok is true if the key has an associated value.
func (*Pixbuf) GetPixels ¶
GetPixels is a wrapper around gdk_pixbuf_get_pixels_with_length(). A Go slice is used to represent the underlying Pixbuf data array, one byte per channel.
func (*Pixbuf) GetRowstride ¶
GetRowstride is a wrapper around gdk_pixbuf_get_rowstride().
func (*Pixbuf) RotateSimple ¶
func (v *Pixbuf) RotateSimple(angle PixbufRotation) (*Pixbuf, error)
RotateSimple is a wrapper around gdk_pixbuf_rotate_simple().
func (*Pixbuf) SaveJPEG ¶
SaveJPEG is a wrapper around gdk_pixbuf_save(). Quality is a number between 0...100
func (*Pixbuf) SavePNG ¶
SavePNG is a wrapper around gdk_pixbuf_save(). Compression is a number between 0...9
func (*Pixbuf) ScaleSimple ¶
func (v *Pixbuf) ScaleSimple(destWidth, destHeight int, interpType InterpType) (*Pixbuf, error)
ScaleSimple is a wrapper around gdk_pixbuf_scale_simple().
type PixbufAlphaMode ¶
type PixbufAlphaMode int
PixbufAlphaMode is a representation of GDK's GdkPixbufAlphaMode.
const ( GDK_PIXBUF_ALPHA_BILEVEL PixbufAlphaMode = C.GDK_PIXBUF_ALPHA_BILEVEL GDK_PIXBUF_ALPHA_FULL PixbufAlphaMode = C.GDK_PIXBUF_ALPHA_FULL )
type PixbufLoader ¶
PixbufLoader is a representation of GDK's GdkPixbufLoader. Users of PixbufLoader are expected to call Close() when they are finished.
func PixbufLoaderNew ¶
func PixbufLoaderNew() (*PixbufLoader, error)
PixbufLoaderNew() is a wrapper around gdk_pixbuf_loader_new().
func (*PixbufLoader) Close ¶
func (v *PixbufLoader) Close() error
Close is a wrapper around gdk_pixbuf_loader_close(). An error is returned instead of a bool like the native C function to support the io.Closer interface.
func (*PixbufLoader) GetPixbuf ¶
func (v *PixbufLoader) GetPixbuf() (*Pixbuf, error)
GetPixbuf is a wrapper around gdk_pixbuf_loader_get_pixbuf().
func (*PixbufLoader) SetSize ¶
func (v *PixbufLoader) SetSize(width, height int)
SetSize is a wrapper around gdk_pixbuf_loader_set_size().
type PixbufRotation ¶
type PixbufRotation int
PixbufRotation is a representation of GDK's GdkPixbufRotation.
const ( PIXBUF_ROTATE_NONE PixbufRotation = C.GDK_PIXBUF_ROTATE_NONE PIXBUF_ROTATE_COUNTERCLOCKWISE PixbufRotation = C.GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE PIXBUF_ROTATE_UPSIDEDOWN PixbufRotation = C.GDK_PIXBUF_ROTATE_UPSIDEDOWN PIXBUF_ROTATE_CLOCKWISE PixbufRotation = C.GDK_PIXBUF_ROTATE_CLOCKWISE )
type RGBA ¶
type RGBA struct {
// contains filtered or unexported fields
}
type Rectangle ¶
type Rectangle struct {
GdkRectangle C.GdkRectangle
}
Rectangle is a representation of GDK's GdkRectangle type.
type Screen ¶
Screen is a representation of GDK's GdkScreen.
func ScreenGetDefault ¶
ScreenGetDefault is a wrapper aroud gdk_screen_get_default().
func (*Screen) GetActiveWindow ¶
GetActiveWindow is a wrapper around gdk_screen_get_active_window().
func (*Screen) GetCurrentDesktop ¶
GetCurrentDesktop is a wrapper around gdk_x11_screen_get_current_desktop(). It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
func (*Screen) GetDisplay ¶
GetDisplay is a wrapper around gdk_screen_get_display().
func (*Screen) GetHeightMM ¶
GetHeightMM is a wrapper around gdk_screen_get_height_mm().
func (*Screen) GetMonitorAtPoint ¶
GetMonitorAtPoint is a wrapper around gdk_screen_get_monitor_at_point().
func (*Screen) GetMonitorAtWindow ¶
GetMonitorAtWindow is a wrapper around gdk_screen_get_monitor_at_window().
func (*Screen) GetMonitorHeightMM ¶
GetMonitorHeightMM is a wrapper around gdk_screen_get_monitor_height_mm().
func (*Screen) GetMonitorPlugName ¶
GetMonitorPlugName is a wrapper around gdk_screen_get_monitor_plug_name().
func (*Screen) GetMonitorScaleFactor ¶
GetMonitorScaleFactor is a wrapper around gdk_screen_get_monitor_scale_factor().
func (*Screen) GetMonitorWidthMM ¶
GetMonitorWidthMM is a wrapper around gdk_screen_get_monitor_width_mm().
func (*Screen) GetNMonitors ¶
GetNMonitors is a wrapper around gdk_screen_get_n_monitors().
func (*Screen) GetNumberOfDesktops ¶
GetNumberOfDesktops is a wrapper around gdk_x11_screen_get_number_of_desktops(). It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
func (*Screen) GetPrimaryMonitor ¶
GetPrimaryMonitor is a wrapper around gdk_screen_get_primary_monitor().
func (*Screen) GetRGBAVisual ¶
GetRGBAVisual is a wrapper around gdk_screen_get_rgba_visual().
func (*Screen) GetResolution ¶
GetResolution is a wrapper around gdk_screen_get_resolution().
func (*Screen) GetRootWindow ¶
GetRootWindow is a wrapper around gdk_screen_get_root_window().
func (*Screen) GetScreenNumber ¶
GetScreenNumber is a wrapper around gdk_x11_screen_get_screen_number(). It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
func (*Screen) GetSystemVisual ¶
GetSystemVisual is a wrapper around gdk_screen_get_system_visual().
func (*Screen) GetWidthMM ¶
GetWidthMM is a wrapper around gdk_screen_get_width_mm().
func (*Screen) IsComposited ¶
IsComposited is a wrapper around gdk_screen_is_composited().
func (*Screen) MakeDisplayName ¶
MakeDisplayName is a wrapper around gdk_screen_make_display_name().
func (*Screen) SetResolution ¶
SetResolution is a wrapper around gdk_screen_set_resolution().
type ScrollDirection ¶
type ScrollDirection int
const ( SCROLL_UP ScrollDirection = C.GDK_SCROLL_UP SCROLL_DOWN ScrollDirection = C.GDK_SCROLL_DOWN SCROLL_LEFT ScrollDirection = C.GDK_SCROLL_LEFT SCROLL_RIGHT ScrollDirection = C.GDK_SCROLL_RIGHT SCROLL_SMOOTH ScrollDirection = C.GDK_SCROLL_SMOOTH )
type Window ¶
Window is a representation of GDK's GdkWindow.
func (*Window) GetDesktop ¶
GetDesktop is a wrapper around gdk_x11_window_get_desktop(). It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
func (*Window) MoveToCurrentDesktop ¶
func (v *Window) MoveToCurrentDesktop()
MoveToCurrentDesktop is a wrapper around gdk_x11_window_move_to_current_desktop(). It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false
func (*Window) MoveToDesktop ¶
MoveToDesktop is a wrapper around gdk_x11_window_move_to_desktop(). It only works on GDK versions compiled with X11 support - its return value can't be used if WorkspaceControlSupported returns false