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
- type Atom
- type Colorspace
- type Device
- type DeviceManager
- 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) SupportsComposite() 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) 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 EventType
- type InterpType
- type ModifierType
- type Pixbuf
- 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) ScaleSimple(destWidth, destHeight int, interpType InterpType) (*Pixbuf, error)
- type PixbufAlphaMode
- type PixbufRotation
- type Screen
- type Visual
- type Window
Constants ¶
const ( SHIFT_MASK ModifierType = C.GDK_SHIFT_MASK LOCK_MASK = C.GDK_LOCK_MASK CONTROL_MASK = C.GDK_CONTROL_MASK MOD1_MASK = C.GDK_MOD1_MASK MOD2_MASK = C.GDK_MOD2_MASK MOD3_MASK = C.GDK_MOD3_MASK MOD4_MASK = C.GDK_MOD4_MASK MOD5_MASK = C.GDK_MOD5_MASK BUTTON1_MASK = C.GDK_BUTTON1_MASK BUTTON2_MASK = C.GDK_BUTTON2_MASK BUTTON3_MASK = C.GDK_BUTTON3_MASK BUTTON4_MASK = C.GDK_BUTTON4_MASK BUTTON5_MASK = C.GDK_BUTTON5_MASK SUPER_MASK = C.GDK_SUPER_MASK HYPER_MASK = C.GDK_HYPER_MASK META_MASK = C.GDK_META_MASK RELEASE_MASK = C.GDK_RELEASE_MASK MODIFIER_MASK = C.GDK_MODIFIER_MASK )
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 ¶
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
type Colorspace ¶
type Colorspace int
Colorspace is a representation of GDK's GdkColorspace.
const (
COLORSPACE_RGB Colorspace = C.GDK_COLORSPACE_RGB
)
type DeviceManager ¶
DeviceManager is a representation of GDK's GdkDeviceManager.
func (*DeviceManager) Native ¶
func (v *DeviceManager) Native() uintptr
Native returns a pointer to the underlying GdkDeviceManager.
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) SupportsComposite ¶
SupportsComposite() is a wrapper around gdk_display_supports_composite().
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) 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.
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 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 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 (*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) 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 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 Screen ¶
Screen is a representation of GDK's GdkScreen.
func (*Screen) GetRGBAVisual ¶
GetRGBAVisual is a wrapper around gdk_screen_get_rgba_visual().
func (*Screen) GetSystemVisual ¶
GetSystemVisual is a wrapper around gdk_screen_get_system_visual().