Documentation ¶
Index ¶
- Constants
- Variables
- func CairoDrawFromGL(cr *cairo.Context, surface Surfacer, ...)
- func CairoRectangle(cr *cairo.Context, rectangle *Rectangle)
- func CairoRegion(cr *cairo.Context, region *cairo.Region)
- func CairoRegionCreateFromSurface(surface *cairo.Surface) *cairo.Region
- func CairoSetSourcePixbuf(cr *cairo.Context, pixbuf *gdkpixbuf.Pixbuf, pixbufX, pixbufY float64)
- func CairoSetSourceRGBA(cr *cairo.Context, rgba *RGBA)
- func ContentDeserializeAsync(ctx context.Context, stream gio.InputStreamer, mimeType string, ...)
- func ContentDeserializeFinish(result gio.AsyncResulter, value *coreglib.Value) error
- func ContentSerializeAsync(ctx context.Context, stream gio.OutputStreamer, mimeType string, ...)
- func ContentSerializeFinish(result gio.AsyncResulter) error
- func DragActionIsUnique(action DragAction) bool
- func EventsGetAngle(event1, event2 Eventer) (float64, bool)
- func EventsGetCenter(event1, event2 Eventer) (x, y float64, ok bool)
- func EventsGetDistance(event1, event2 Eventer) (float64, bool)
- func GLContextClearCurrent()
- func GLErrorQuark() glib.Quark
- func InternMIMEType(str string) string
- func KeyvalConvertCase(symbol uint) (lower, upper uint)
- func KeyvalFromName(keyvalName string) uint
- func KeyvalIsLower(keyval uint) bool
- func KeyvalIsUpper(keyval uint) bool
- func KeyvalName(keyval uint) string
- func KeyvalToLower(keyval uint) uint
- func KeyvalToUnicode(keyval uint) uint32
- func KeyvalToUpper(keyval uint) uint
- func PixbufGetFromSurface(surface *cairo.Surface, srcX, srcY, width, height int) *gdkpixbuf.Pixbuf
- func PixbufGetFromTexture(texture Texturer) *gdkpixbuf.Pixbuf
- func SetAllowedBackends(backends string)
- func ToplevelSizeGetType() coreglib.Type
- func UnicodeToKeyval(wc uint32) uint
- func VulkanErrorQuark() glib.Quark
- type AnchorHints
- type AppLaunchContext
- type AxisFlags
- type AxisUse
- type ButtonEvent
- type CairoContext
- type CairoContexter
- type Clipboard
- func (clipboard *Clipboard) ConnectChanged(f func()) coreglib.SignalHandle
- func (clipboard *Clipboard) Content() *ContentProvider
- func (clipboard *Clipboard) Display() *Display
- func (clipboard *Clipboard) Formats() *ContentFormats
- func (clipboard *Clipboard) IsLocal() bool
- func (clipboard *Clipboard) ReadAsync(ctx context.Context, mimeTypes []string, ioPriority int, ...)
- func (clipboard *Clipboard) ReadFinish(result gio.AsyncResulter) (string, gio.InputStreamer, error)
- func (clipboard *Clipboard) ReadTextAsync(ctx context.Context, callback gio.AsyncReadyCallback)
- func (clipboard *Clipboard) ReadTextFinish(result gio.AsyncResulter) (string, error)
- func (clipboard *Clipboard) ReadTextureAsync(ctx context.Context, callback gio.AsyncReadyCallback)
- func (clipboard *Clipboard) ReadTextureFinish(result gio.AsyncResulter) (Texturer, error)
- func (clipboard *Clipboard) ReadValueAsync(ctx context.Context, typ coreglib.Type, ioPriority int, ...)
- func (clipboard *Clipboard) ReadValueFinish(result gio.AsyncResulter) (*coreglib.Value, error)
- func (clipboard *Clipboard) Set(value *coreglib.Value)
- func (clipboard *Clipboard) SetContent(provider *ContentProvider) bool
- func (clipboard *Clipboard) SetText(text string)
- func (clipboard *Clipboard) SetTexture(texture Texturer)
- func (clipboard *Clipboard) StoreAsync(ctx context.Context, ioPriority int, callback gio.AsyncReadyCallback)
- func (clipboard *Clipboard) StoreFinish(result gio.AsyncResulter) error
- type ContentDeserializer
- func (deserializer *ContentDeserializer) Cancellable() *gio.Cancellable
- func (deserializer *ContentDeserializer) GType() coreglib.Type
- func (deserializer *ContentDeserializer) InputStream() gio.InputStreamer
- func (deserializer *ContentDeserializer) MIMEType() string
- func (deserializer *ContentDeserializer) Priority() int
- func (deserializer *ContentDeserializer) ReturnError(err error)
- func (deserializer *ContentDeserializer) ReturnSuccess()
- func (deserializer *ContentDeserializer) TaskData() unsafe.Pointer
- func (deserializer *ContentDeserializer) UserData() unsafe.Pointer
- func (deserializer *ContentDeserializer) Value() *coreglib.Value
- type ContentFormats
- func (formats *ContentFormats) ContainGType(typ coreglib.Type) bool
- func (formats *ContentFormats) ContainMIMEType(mimeType string) bool
- func (formats *ContentFormats) GTypes() []coreglib.Type
- func (formats *ContentFormats) MIMETypes() []string
- func (first *ContentFormats) Match(second *ContentFormats) bool
- func (first *ContentFormats) MatchGType(second *ContentFormats) coreglib.Type
- func (first *ContentFormats) MatchMIMEType(second *ContentFormats) string
- func (formats *ContentFormats) String() string
- func (first *ContentFormats) Union(second *ContentFormats) *ContentFormats
- func (formats *ContentFormats) UnionDeserializeGTypes() *ContentFormats
- func (formats *ContentFormats) UnionDeserializeMIMETypes() *ContentFormats
- func (formats *ContentFormats) UnionSerializeGTypes() *ContentFormats
- func (formats *ContentFormats) UnionSerializeMIMETypes() *ContentFormats
- type ContentFormatsBuilder
- type ContentProvider
- func (provider *ContentProvider) ConnectContentChanged(f func()) coreglib.SignalHandle
- func (provider *ContentProvider) ContentChanged()
- func (provider *ContentProvider) RefFormats() *ContentFormats
- func (provider *ContentProvider) RefStorableFormats() *ContentFormats
- func (provider *ContentProvider) Value(value *coreglib.Value) error
- func (provider *ContentProvider) WriteMIMETypeAsync(ctx context.Context, mimeType string, stream gio.OutputStreamer, ...)
- func (provider *ContentProvider) WriteMIMETypeFinish(result gio.AsyncResulter) error
- type ContentProviderClass
- type ContentProviderOverrides
- type ContentSerializer
- func (serializer *ContentSerializer) Cancellable() *gio.Cancellable
- func (serializer *ContentSerializer) GType() coreglib.Type
- func (serializer *ContentSerializer) MIMEType() string
- func (serializer *ContentSerializer) OutputStream() gio.OutputStreamer
- func (serializer *ContentSerializer) Priority() int
- func (serializer *ContentSerializer) ReturnError(err error)
- func (serializer *ContentSerializer) ReturnSuccess()
- func (serializer *ContentSerializer) TaskData() unsafe.Pointer
- func (serializer *ContentSerializer) UserData() unsafe.Pointer
- func (serializer *ContentSerializer) Value() *coreglib.Value
- type CrossingEvent
- type CrossingMode
- type Cursor
- type DNDEvent
- type DeleteEvent
- type Device
- func (device *Device) CapsLockState() bool
- func (device *Device) ConnectChanged(f func()) coreglib.SignalHandle
- func (device *Device) ConnectToolChanged(f func(tool *DeviceTool)) coreglib.SignalHandle
- func (device *Device) DeviceTool() *DeviceTool
- func (device *Device) Direction() pango.Direction
- func (device *Device) Display() *Display
- func (device *Device) HasBidiLayouts() bool
- func (device *Device) HasCursor() bool
- func (device *Device) ModifierState() ModifierType
- func (device *Device) Name() string
- func (device *Device) NumLockState() bool
- func (device *Device) NumTouches() uint
- func (device *Device) ProductID() string
- func (device *Device) ScrollLockState() bool
- func (device *Device) Seat() Seater
- func (device *Device) Source() InputSource
- func (device *Device) SurfaceAtPosition() (winX, winY float64, surface Surfacer)
- func (device *Device) Timestamp() uint32
- func (device *Device) VendorID() string
- type DevicePad
- type DevicePadFeature
- type DevicePadder
- type DeviceTool
- type DeviceToolType
- type Devicer
- type Display
- func (display *Display) AppLaunchContext() *AppLaunchContext
- func (display *Display) Beep()
- func (display *Display) Clipboard() *Clipboard
- func (display *Display) Close()
- func (display *Display) ConnectClosed(f func(isError bool)) coreglib.SignalHandle
- func (display *Display) ConnectOpened(f func()) coreglib.SignalHandle
- func (display *Display) ConnectSeatAdded(f func(seat Seater)) coreglib.SignalHandle
- func (display *Display) ConnectSeatRemoved(f func(seat Seater)) coreglib.SignalHandle
- func (display *Display) ConnectSettingChanged(f func(setting string)) coreglib.SignalHandle
- func (display *Display) DefaultSeat() Seater
- func (display *Display) DeviceIsGrabbed(device Devicer) bool
- func (display *Display) Flush()
- func (display *Display) IsClosed() bool
- func (display *Display) IsComposited() bool
- func (display *Display) IsRGBA() bool
- func (display *Display) ListSeats() []Seater
- func (display *Display) MapKeycode(keycode uint) ([]KeymapKey, []uint, bool)
- func (display *Display) MapKeyval(keyval uint) ([]KeymapKey, bool)
- func (display *Display) MonitorAtSurface(surface Surfacer) *Monitor
- func (self *Display) Monitors() *gio.ListModel
- func (display *Display) Name() string
- func (display *Display) NotifyStartupComplete(startupId string)
- func (display *Display) PrimaryClipboard() *Clipboard
- func (display *Display) PutEvent(event Eventer)
- func (display *Display) Setting(name string, value *coreglib.Value) bool
- func (display *Display) StartupNotificationID() string
- func (display *Display) SupportsInputShapes() bool
- func (display *Display) Sync()
- func (display *Display) TranslateKey(keycode uint, state ModifierType, group int) (keyval uint, effectiveGroup, level int, consumed ModifierType, ok bool)
- type DisplayManager
- func (manager *DisplayManager) ConnectDisplayOpened(f func(display *Display)) coreglib.SignalHandle
- func (manager *DisplayManager) DefaultDisplay() *Display
- func (manager *DisplayManager) ListDisplays() []*Display
- func (manager *DisplayManager) OpenDisplay(name string) *Display
- func (manager *DisplayManager) SetDefaultDisplay(display *Display)
- type Drag
- func (drag *Drag) Actions() DragAction
- func (drag *Drag) ConnectCancel(f func(reason DragCancelReason)) coreglib.SignalHandle
- func (drag *Drag) ConnectDNDFinished(f func()) coreglib.SignalHandle
- func (drag *Drag) ConnectDropPerformed(f func()) coreglib.SignalHandle
- func (drag *Drag) Content() *ContentProvider
- func (drag *Drag) Device() Devicer
- func (drag *Drag) Display() *Display
- func (drag *Drag) DragSurface() Surfacer
- func (drag *Drag) DropDone(success bool)
- func (drag *Drag) Formats() *ContentFormats
- func (drag *Drag) SelectedAction() DragAction
- func (drag *Drag) SetHotspot(hotX, hotY int)
- func (drag *Drag) Surface() Surfacer
- type DragAction
- type DragCancelReason
- type DragSurface
- type DragSurfacer
- type Dragger
- type DrawContext
- type DrawContexter
- type Drop
- func (self *Drop) Actions() DragAction
- func (self *Drop) Device() Devicer
- func (self *Drop) Display() *Display
- func (self *Drop) Drag() Dragger
- func (self *Drop) Finish(action DragAction)
- func (self *Drop) Formats() *ContentFormats
- func (self *Drop) ReadAsync(ctx context.Context, mimeTypes []string, ioPriority int, ...)
- func (self *Drop) ReadFinish(result gio.AsyncResulter) (string, gio.InputStreamer, error)
- func (self *Drop) ReadValueAsync(ctx context.Context, typ coreglib.Type, ioPriority int, ...)
- func (self *Drop) ReadValueFinish(result gio.AsyncResulter) (*coreglib.Value, error)
- func (self *Drop) Status(actions, preferred DragAction)
- func (self *Drop) Surface() Surfacer
- type Dropper
- type Event
- func (event *Event) Axes() ([]float64, bool)
- func (event *Event) Axis(axisUse AxisUse) (float64, bool)
- func (event *Event) Device() Devicer
- func (event *Event) DeviceTool() *DeviceTool
- func (event *Event) Display() *Display
- func (event *Event) EventSequence() *EventSequence
- func (event *Event) EventType() EventType
- func (event *Event) History() []TimeCoord
- func (event *Event) ModifierState() ModifierType
- func (event *Event) PointerEmulated() bool
- func (event *Event) Position() (x, y float64, ok bool)
- func (event *Event) Seat() Seater
- func (event *Event) Surface() Surfacer
- func (event *Event) Time() uint32
- func (event *Event) TriggersContextMenu() bool
- type EventSequence
- type EventType
- type Eventer
- type FocusEvent
- type FrameClock
- func (frameClock *FrameClock) BeginUpdating()
- func (frameClock *FrameClock) ConnectAfterPaint(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) ConnectBeforePaint(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) ConnectFlushEvents(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) ConnectLayout(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) ConnectPaint(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) ConnectResumeEvents(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) ConnectUpdate(f func()) coreglib.SignalHandle
- func (frameClock *FrameClock) CurrentTimings() *FrameTimings
- func (frameClock *FrameClock) EndUpdating()
- func (frameClock *FrameClock) FPS() float64
- func (frameClock *FrameClock) FrameCounter() int64
- func (frameClock *FrameClock) FrameTime() int64
- func (frameClock *FrameClock) HistoryStart() int64
- func (frameClock *FrameClock) RefreshInfo(baseTime int64) (refreshIntervalReturn, presentationTimeReturn int64)
- func (frameClock *FrameClock) RequestPhase(phase FrameClockPhase)
- func (frameClock *FrameClock) Timings(frameCounter int64) *FrameTimings
- type FrameClockPhase
- type FrameClocker
- type FrameTimings
- func (timings *FrameTimings) Complete() bool
- func (timings *FrameTimings) FrameCounter() int64
- func (timings *FrameTimings) FrameTime() int64
- func (timings *FrameTimings) PredictedPresentationTime() int64
- func (timings *FrameTimings) PresentationTime() int64
- func (timings *FrameTimings) RefreshInterval() int64
- type FullscreenMode
- type GLContext
- func (context *GLContext) DebugEnabled() bool
- func (context *GLContext) Display() *Display
- func (context *GLContext) ForwardCompatible() bool
- func (context *GLContext) IsLegacy() bool
- func (context *GLContext) MakeCurrent()
- func (context *GLContext) Realize() error
- func (context *GLContext) RequiredVersion() (major, minor int)
- func (context *GLContext) SetDebugEnabled(enabled bool)
- func (context *GLContext) SetForwardCompatible(compatible bool)
- func (context *GLContext) SetRequiredVersion(major, minor int)
- func (context *GLContext) SetUseES(useEs int)
- func (context *GLContext) SharedContext() GLContexter
- func (context *GLContext) Surface() Surfacer
- func (context *GLContext) UseES() bool
- func (context *GLContext) Version() (major, minor int)
- type GLContexter
- type GLError
- type GLTexture
- type GrabBrokenEvent
- type Gravity
- type InputSource
- type KeyEvent
- func (event *KeyEvent) ConsumedModifiers() ModifierType
- func (event *KeyEvent) IsModifier() bool
- func (event *KeyEvent) Keycode() uint
- func (event *KeyEvent) Keyval() uint
- func (event *KeyEvent) Layout() uint
- func (event *KeyEvent) Level() uint
- func (event *KeyEvent) Match() (uint, ModifierType, bool)
- func (event *KeyEvent) Matches(keyval uint, modifiers ModifierType) KeyMatch
- type KeyMatch
- type KeymapKey
- type MemoryFormat
- type MemoryTexture
- type ModifierType
- type Monitor
- func (monitor *Monitor) ConnectInvalidate(f func()) coreglib.SignalHandle
- func (monitor *Monitor) Connector() string
- func (monitor *Monitor) Display() *Display
- func (monitor *Monitor) Geometry() *Rectangle
- func (monitor *Monitor) HeightMm() int
- func (monitor *Monitor) IsValid() bool
- func (monitor *Monitor) Manufacturer() string
- func (monitor *Monitor) Model() string
- func (monitor *Monitor) RefreshRate() int
- func (monitor *Monitor) ScaleFactor() int
- func (monitor *Monitor) SubpixelLayout() SubpixelLayout
- func (monitor *Monitor) WidthMm() int
- type MotionEvent
- type NotifyType
- type PadEvent
- type Paintable
- func (paintable *Paintable) ComputeConcreteSize(specifiedWidth, specifiedHeight, defaultWidth, defaultHeight float64) (concreteWidth, concreteHeight float64)
- func (paintable *Paintable) ConnectInvalidateContents(f func()) coreglib.SignalHandle
- func (paintable *Paintable) ConnectInvalidateSize(f func()) coreglib.SignalHandle
- func (paintable *Paintable) CurrentImage() *Paintable
- func (paintable *Paintable) Flags() PaintableFlags
- func (paintable *Paintable) IntrinsicAspectRatio() float64
- func (paintable *Paintable) IntrinsicHeight() int
- func (paintable *Paintable) IntrinsicWidth() int
- func (paintable *Paintable) InvalidateContents()
- func (paintable *Paintable) InvalidateSize()
- func (paintable *Paintable) Snapshot(snapshot Snapshotter, width, height float64)
- type PaintableFlags
- type PaintableInterface
- type Paintabler
- type Popup
- func (popup *Popup) Autohide() bool
- func (popup *Popup) Parent() Surfacer
- func (popup *Popup) PositionX() int
- func (popup *Popup) PositionY() int
- func (popup *Popup) Present(width, height int, layout *PopupLayout) bool
- func (popup *Popup) RectAnchor() Gravity
- func (popup *Popup) SurfaceAnchor() Gravity
- type PopupLayout
- func (layout *PopupLayout) AnchorHints() AnchorHints
- func (layout *PopupLayout) AnchorRect() *Rectangle
- func (layout *PopupLayout) Copy() *PopupLayout
- func (layout *PopupLayout) Equal(other *PopupLayout) bool
- func (layout *PopupLayout) Offset() (dx int, dy int)
- func (layout *PopupLayout) RectAnchor() Gravity
- func (layout *PopupLayout) SetAnchorHints(anchorHints AnchorHints)
- func (layout *PopupLayout) SetAnchorRect(anchorRect *Rectangle)
- func (layout *PopupLayout) SetOffset(dx int, dy int)
- func (layout *PopupLayout) SetRectAnchor(anchor Gravity)
- func (layout *PopupLayout) SetShadowWidth(left int, right int, top int, bottom int)
- func (layout *PopupLayout) SetSurfaceAnchor(anchor Gravity)
- func (layout *PopupLayout) ShadowWidth() (left int, right int, top int, bottom int)
- func (layout *PopupLayout) SurfaceAnchor() Gravity
- type Popupper
- type ProximityEvent
- type RGBA
- func (r *RGBA) Alpha() float32
- func (r *RGBA) Blue() float32
- func (rgba *RGBA) Copy() *RGBA
- func (p1 *RGBA) Equal(p2 *RGBA) bool
- func (r *RGBA) Green() float32
- func (p *RGBA) Hash() uint
- func (rgba *RGBA) IsClear() bool
- func (rgba *RGBA) IsOpaque() bool
- func (rgba *RGBA) Parse(spec string) bool
- func (r *RGBA) Red() float32
- func (r *RGBA) SetAlpha(alpha float32)
- func (r *RGBA) SetBlue(blue float32)
- func (r *RGBA) SetGreen(green float32)
- func (r *RGBA) SetRed(red float32)
- func (rgba *RGBA) String() string
- type Rectangle
- func (rect *Rectangle) ContainsPoint(x int, y int) bool
- func (rect1 *Rectangle) Equal(rect2 *Rectangle) bool
- func (r *Rectangle) Height() int
- func (src1 *Rectangle) Intersect(src2 *Rectangle) (*Rectangle, bool)
- func (r *Rectangle) SetHeight(height int)
- func (r *Rectangle) SetWidth(width int)
- func (r *Rectangle) SetX(x int)
- func (r *Rectangle) SetY(y int)
- func (src1 *Rectangle) Union(src2 *Rectangle) *Rectangle
- func (r *Rectangle) Width() int
- func (r *Rectangle) X() int
- func (r *Rectangle) Y() int
- type ScrollDirection
- type ScrollEvent
- type Seat
- func (seat *Seat) Capabilities() SeatCapabilities
- func (seat *Seat) ConnectDeviceAdded(f func(device Devicer)) coreglib.SignalHandle
- func (seat *Seat) ConnectDeviceRemoved(f func(device Devicer)) coreglib.SignalHandle
- func (seat *Seat) ConnectToolAdded(f func(tool *DeviceTool)) coreglib.SignalHandle
- func (seat *Seat) ConnectToolRemoved(f func(tool *DeviceTool)) coreglib.SignalHandle
- func (seat *Seat) Devices(capabilities SeatCapabilities) []Devicer
- func (seat *Seat) Display() *Display
- func (seat *Seat) Keyboard() Devicer
- func (seat *Seat) Pointer() Devicer
- func (seat *Seat) Tools() []*DeviceTool
- type SeatCapabilities
- type Seater
- type Snapshot
- type Snapshotter
- type SubpixelLayout
- type Surface
- func (surface *Surface) Beep()
- func (surface *Surface) ConnectEnterMonitor(f func(monitor *Monitor)) coreglib.SignalHandle
- func (surface *Surface) ConnectEvent(f func(event Eventer) (ok bool)) coreglib.SignalHandle
- func (surface *Surface) ConnectLayout(f func(width, height int)) coreglib.SignalHandle
- func (surface *Surface) ConnectLeaveMonitor(f func(monitor *Monitor)) coreglib.SignalHandle
- func (surface *Surface) ConnectRender(f func(region *cairo.Region) (ok bool)) coreglib.SignalHandle
- func (surface *Surface) CreateCairoContext() CairoContexter
- func (surface *Surface) CreateGLContext() (GLContexter, error)
- func (surface *Surface) CreateSimilarSurface(content cairo.Content, width, height int) *cairo.Surface
- func (surface *Surface) CreateVulkanContext() (VulkanContexter, error)
- func (surface *Surface) Cursor() *Cursor
- func (surface *Surface) Destroy()
- func (surface *Surface) DeviceCursor(device Devicer) *Cursor
- func (surface *Surface) DevicePosition(device Devicer) (x, y float64, mask ModifierType, ok bool)
- func (surface *Surface) Display() *Display
- func (surface *Surface) FrameClock() FrameClocker
- func (surface *Surface) Height() int
- func (surface *Surface) Hide()
- func (surface *Surface) IsDestroyed() bool
- func (surface *Surface) Mapped() bool
- func (surface *Surface) QueueRender()
- func (surface *Surface) RequestLayout()
- func (surface *Surface) ScaleFactor() int
- func (surface *Surface) SetCursor(cursor *Cursor)
- func (surface *Surface) SetDeviceCursor(device Devicer, cursor *Cursor)
- func (surface *Surface) SetInputRegion(region *cairo.Region)
- func (surface *Surface) SetOpaqueRegion(region *cairo.Region)
- func (surface *Surface) Width() int
- type SurfaceEdge
- type Surfacer
- type Texture
- type Texturer
- type TimeCoord
- type Toplevel
- func (toplevel *Toplevel) BeginMove(device Devicer, button int, x, y float64, timestamp uint32)
- func (toplevel *Toplevel) BeginResize(edge SurfaceEdge, device Devicer, button int, x, y float64, timestamp uint32)
- func (toplevel *Toplevel) Focus(timestamp uint32)
- func (toplevel *Toplevel) InhibitSystemShortcuts(event Eventer)
- func (toplevel *Toplevel) Lower() bool
- func (toplevel *Toplevel) Minimize() bool
- func (toplevel *Toplevel) Present(layout *ToplevelLayout)
- func (toplevel *Toplevel) RestoreSystemShortcuts()
- func (toplevel *Toplevel) SetDecorated(decorated bool)
- func (toplevel *Toplevel) SetDeletable(deletable bool)
- func (toplevel *Toplevel) SetIconList(surfaces []Texturer)
- func (toplevel *Toplevel) SetModal(modal bool)
- func (toplevel *Toplevel) SetStartupID(startupId string)
- func (toplevel *Toplevel) SetTitle(title string)
- func (toplevel *Toplevel) SetTransientFor(parent Surfacer)
- func (toplevel *Toplevel) ShowWindowMenu(event Eventer) bool
- func (toplevel *Toplevel) State() ToplevelState
- func (toplevel *Toplevel) SupportsEdgeConstraints() bool
- type ToplevelLayout
- func (layout *ToplevelLayout) Copy() *ToplevelLayout
- func (layout *ToplevelLayout) Equal(other *ToplevelLayout) bool
- func (layout *ToplevelLayout) Fullscreen() (fullscreen bool, ok bool)
- func (layout *ToplevelLayout) FullscreenMonitor() *Monitor
- func (layout *ToplevelLayout) Maximized() (maximized bool, ok bool)
- func (layout *ToplevelLayout) Resizable() bool
- func (layout *ToplevelLayout) SetFullscreen(fullscreen bool, monitor *Monitor)
- func (layout *ToplevelLayout) SetMaximized(maximized bool)
- func (layout *ToplevelLayout) SetResizable(resizable bool)
- type ToplevelState
- type Topleveller
- type TouchEvent
- type TouchpadEvent
- type TouchpadGesturePhase
- type VulkanContext
- type VulkanContexter
- type VulkanError
Constants ¶
const ACTION_ALL = 7
ACTION_ALL defines all possible DND actions.
This can be used in gdk.Drop.Status() messages when any drop can be accepted or a more specific drop method is not yet known.
const BUTTON_MIDDLE = 2
BUTTON_MIDDLE: middle button.
const BUTTON_PRIMARY = 1
BUTTON_PRIMARY: primary button. This is typically the left mouse button, or the right button in a left-handed setup.
const BUTTON_SECONDARY = 3
BUTTON_SECONDARY: secondary button. This is typically the right mouse button, or the left button in a left-handed setup.
const CURRENT_TIME = 0
CURRENT_TIME represents the current time, and can be used anywhere a time is expected.
const EVENT_PROPAGATE = false
EVENT_PROPAGATE: use this macro as the return value for continuing the propagation of an event handler.
const EVENT_STOP = true
EVENT_STOP: use this macro as the return value for stopping the propagation of an event handler.
const KEY_0 = 48
const KEY_1 = 49
const KEY_2 = 50
const KEY_3 = 51
const KEY_3270_AltCursor = 64784
const KEY_3270_Attn = 64782
const KEY_3270_BackTab = 64773
const KEY_3270_ChangeScreen = 64793
const KEY_3270_Copy = 64789
const KEY_3270_CursorBlink = 64783
const KEY_3270_CursorSelect = 64796
const KEY_3270_DeleteWord = 64794
const KEY_3270_Duplicate = 64769
const KEY_3270_Enter = 64798
const KEY_3270_EraseEOF = 64774
const KEY_3270_EraseInput = 64775
const KEY_3270_ExSelect = 64795
const KEY_3270_FieldMark = 64770
const KEY_3270_Ident = 64787
const KEY_3270_Jump = 64786
const KEY_3270_KeyClick = 64785
const KEY_3270_Left2 = 64772
const KEY_3270_PA1 = 64778
const KEY_3270_PA2 = 64779
const KEY_3270_PA3 = 64780
const KEY_3270_Play = 64790
const KEY_3270_PrintScreen = 64797
const KEY_3270_Quit = 64777
const KEY_3270_Record = 64792
const KEY_3270_Reset = 64776
const KEY_3270_Right2 = 64771
const KEY_3270_Rule = 64788
const KEY_3270_Setup = 64791
const KEY_3270_Test = 64781
const KEY_4 = 52
const KEY_5 = 53
const KEY_6 = 54
const KEY_7 = 55
const KEY_8 = 56
const KEY_9 = 57
const KEY_A = 65
const KEY_AE = 198
const KEY_Aacute = 193
const KEY_Abelowdot = 16785056
const KEY_Abreve = 451
const KEY_Abreveacute = 16785070
const KEY_Abrevebelowdot = 16785078
const KEY_Abrevegrave = 16785072
const KEY_Abrevehook = 16785074
const KEY_Abrevetilde = 16785076
const KEY_AccessX_Enable = 65136
const KEY_AccessX_Feedback_Enable = 65137
const KEY_Acircumflex = 194
const KEY_Acircumflexacute = 16785060
const KEY_Acircumflexbelowdot = 16785068
const KEY_Acircumflexgrave = 16785062
const KEY_Acircumflexhook = 16785064
const KEY_Acircumflextilde = 16785066
const KEY_AddFavorite = 269025081
const KEY_Adiaeresis = 196
const KEY_Agrave = 192
const KEY_Ahook = 16785058
const KEY_Alt_L = 65513
const KEY_Alt_R = 65514
const KEY_Amacron = 960
const KEY_Aogonek = 417
const KEY_ApplicationLeft = 269025104
const KEY_ApplicationRight = 269025105
const KEY_Arabic_0 = 16778848
const KEY_Arabic_1 = 16778849
const KEY_Arabic_2 = 16778850
const KEY_Arabic_3 = 16778851
const KEY_Arabic_4 = 16778852
const KEY_Arabic_5 = 16778853
const KEY_Arabic_6 = 16778854
const KEY_Arabic_7 = 16778855
const KEY_Arabic_8 = 16778856
const KEY_Arabic_9 = 16778857
const KEY_Arabic_ain = 1497
const KEY_Arabic_alef = 1479
const KEY_Arabic_alefmaksura = 1513
const KEY_Arabic_beh = 1480
const KEY_Arabic_comma = 1452
const KEY_Arabic_dad = 1494
const KEY_Arabic_dal = 1487
const KEY_Arabic_damma = 1519
const KEY_Arabic_dammatan = 1516
const KEY_Arabic_ddal = 16778888
const KEY_Arabic_farsi_yeh = 16778956
const KEY_Arabic_fatha = 1518
const KEY_Arabic_fathatan = 1515
const KEY_Arabic_feh = 1505
const KEY_Arabic_fullstop = 16778964
const KEY_Arabic_gaf = 16778927
const KEY_Arabic_ghain = 1498
const KEY_Arabic_ha = 1511
const KEY_Arabic_hah = 1485
const KEY_Arabic_hamza = 1473
const KEY_Arabic_hamza_above = 16778836
const KEY_Arabic_hamza_below = 16778837
const KEY_Arabic_hamzaonalef = 1475
const KEY_Arabic_hamzaonwaw = 1476
const KEY_Arabic_hamzaonyeh = 1478
const KEY_Arabic_hamzaunderalef = 1477
const KEY_Arabic_heh = 1511
const KEY_Arabic_heh_doachashmee = 16778942
const KEY_Arabic_heh_goal = 16778945
const KEY_Arabic_jeem = 1484
const KEY_Arabic_jeh = 16778904
const KEY_Arabic_kaf = 1507
const KEY_Arabic_kasra = 1520
const KEY_Arabic_kasratan = 1517
const KEY_Arabic_keheh = 16778921
const KEY_Arabic_khah = 1486
const KEY_Arabic_lam = 1508
const KEY_Arabic_madda_above = 16778835
const KEY_Arabic_maddaonalef = 1474
const KEY_Arabic_meem = 1509
const KEY_Arabic_noon = 1510
const KEY_Arabic_noon_ghunna = 16778938
const KEY_Arabic_peh = 16778878
const KEY_Arabic_percent = 16778858
const KEY_Arabic_qaf = 1506
const KEY_Arabic_question_mark = 1471
const KEY_Arabic_ra = 1489
const KEY_Arabic_rreh = 16778897
const KEY_Arabic_sad = 1493
const KEY_Arabic_seen = 1491
const KEY_Arabic_semicolon = 1467
const KEY_Arabic_shadda = 1521
const KEY_Arabic_sheen = 1492
const KEY_Arabic_sukun = 1522
const KEY_Arabic_superscript_alef = 16778864
const KEY_Arabic_switch = 65406
const KEY_Arabic_tah = 1495
const KEY_Arabic_tatweel = 1504
const KEY_Arabic_tcheh = 16778886
const KEY_Arabic_teh = 1482
const KEY_Arabic_tehmarbuta = 1481
const KEY_Arabic_thal = 1488
const KEY_Arabic_theh = 1483
const KEY_Arabic_tteh = 16778873
const KEY_Arabic_veh = 16778916
const KEY_Arabic_waw = 1512
const KEY_Arabic_yeh = 1514
const KEY_Arabic_yeh_baree = 16778962
const KEY_Arabic_zah = 1496
const KEY_Arabic_zain = 1490
const KEY_Aring = 197
const KEY_Armenian_AT = 16778552
const KEY_Armenian_AYB = 16778545
const KEY_Armenian_BEN = 16778546
const KEY_Armenian_CHA = 16778569
const KEY_Armenian_DA = 16778548
const KEY_Armenian_DZA = 16778561
const KEY_Armenian_E = 16778551
const KEY_Armenian_FE = 16778582
const KEY_Armenian_GHAT = 16778562
const KEY_Armenian_GIM = 16778547
const KEY_Armenian_HI = 16778565
const KEY_Armenian_HO = 16778560
const KEY_Armenian_INI = 16778555
const KEY_Armenian_JE = 16778571
const KEY_Armenian_KE = 16778580
const KEY_Armenian_KEN = 16778559
const KEY_Armenian_KHE = 16778557
const KEY_Armenian_LYUN = 16778556
const KEY_Armenian_MEN = 16778564
const KEY_Armenian_NU = 16778566
const KEY_Armenian_O = 16778581
const KEY_Armenian_PE = 16778570
const KEY_Armenian_PYUR = 16778579
const KEY_Armenian_RA = 16778572
const KEY_Armenian_RE = 16778576
const KEY_Armenian_SE = 16778573
const KEY_Armenian_SHA = 16778567
const KEY_Armenian_TCHE = 16778563
const KEY_Armenian_TO = 16778553
const KEY_Armenian_TSA = 16778558
const KEY_Armenian_TSO = 16778577
const KEY_Armenian_TYUN = 16778575
const KEY_Armenian_VEV = 16778574
const KEY_Armenian_VO = 16778568
const KEY_Armenian_VYUN = 16778578
const KEY_Armenian_YECH = 16778549
const KEY_Armenian_ZA = 16778550
const KEY_Armenian_ZHE = 16778554
const KEY_Armenian_accent = 16778587
const KEY_Armenian_amanak = 16778588
const KEY_Armenian_apostrophe = 16778586
const KEY_Armenian_at = 16778600
const KEY_Armenian_ayb = 16778593
const KEY_Armenian_ben = 16778594
const KEY_Armenian_but = 16778589
const KEY_Armenian_cha = 16778617
const KEY_Armenian_da = 16778596
const KEY_Armenian_dza = 16778609
const KEY_Armenian_e = 16778599
const KEY_Armenian_exclam = 16778588
const KEY_Armenian_fe = 16778630
const KEY_Armenian_full_stop = 16778633
const KEY_Armenian_ghat = 16778610
const KEY_Armenian_gim = 16778595
const KEY_Armenian_hi = 16778613
const KEY_Armenian_ho = 16778608
const KEY_Armenian_hyphen = 16778634
const KEY_Armenian_ini = 16778603
const KEY_Armenian_je = 16778619
const KEY_Armenian_ke = 16778628
const KEY_Armenian_ken = 16778607
const KEY_Armenian_khe = 16778605
const KEY_Armenian_ligature_ew = 16778631
const KEY_Armenian_lyun = 16778604
const KEY_Armenian_men = 16778612
const KEY_Armenian_nu = 16778614
const KEY_Armenian_o = 16778629
const KEY_Armenian_paruyk = 16778590
const KEY_Armenian_pe = 16778618
const KEY_Armenian_pyur = 16778627
const KEY_Armenian_question = 16778590
const KEY_Armenian_ra = 16778620
const KEY_Armenian_re = 16778624
const KEY_Armenian_se = 16778621
const KEY_Armenian_separation_mark = 16778589
const KEY_Armenian_sha = 16778615
const KEY_Armenian_shesht = 16778587
const KEY_Armenian_tche = 16778611
const KEY_Armenian_to = 16778601
const KEY_Armenian_tsa = 16778606
const KEY_Armenian_tso = 16778625
const KEY_Armenian_tyun = 16778623
const KEY_Armenian_verjaket = 16778633
const KEY_Armenian_vev = 16778622
const KEY_Armenian_vo = 16778616
const KEY_Armenian_vyun = 16778626
const KEY_Armenian_yech = 16778597
const KEY_Armenian_yentamna = 16778634
const KEY_Armenian_za = 16778598
const KEY_Armenian_zhe = 16778602
const KEY_Atilde = 195
const KEY_AudibleBell_Enable = 65146
const KEY_AudioCycleTrack = 269025179
const KEY_AudioForward = 269025175
const KEY_AudioLowerVolume = 269025041
const KEY_AudioMedia = 269025074
const KEY_AudioMicMute = 269025202
const KEY_AudioMute = 269025042
const KEY_AudioNext = 269025047
const KEY_AudioPause = 269025073
const KEY_AudioPlay = 269025044
const KEY_AudioPreset = 269025206
const KEY_AudioPrev = 269025046
const KEY_AudioRaiseVolume = 269025043
const KEY_AudioRandomPlay = 269025177
const KEY_AudioRecord = 269025052
const KEY_AudioRepeat = 269025176
const KEY_AudioRewind = 269025086
const KEY_AudioStop = 269025045
const KEY_Away = 269025165
const KEY_B = 66
const KEY_Babovedot = 16784898
const KEY_Back = 269025062
const KEY_BackForward = 269025087
const KEY_BackSpace = 65288
const KEY_Battery = 269025171
const KEY_Begin = 65368
const KEY_Blue = 269025190
const KEY_Bluetooth = 269025172
const KEY_Book = 269025106
const KEY_BounceKeys_Enable = 65140
const KEY_Break = 65387
const KEY_BrightnessAdjust = 269025083
const KEY_Byelorussian_SHORTU = 1726
const KEY_Byelorussian_shortu = 1710
const KEY_C = 67
const KEY_CD = 269025107
const KEY_CH = 65186
const KEY_C_H = 65189
const KEY_C_h = 65188
const KEY_Cabovedot = 709
const KEY_Cacute = 454
const KEY_Calculator = 269025053
const KEY_Calendar = 269025056
const KEY_Cancel = 65385
const KEY_Caps_Lock = 65509
const KEY_Ccaron = 456
const KEY_Ccedilla = 199
const KEY_Ccircumflex = 710
const KEY_Ch = 65185
const KEY_Clear = 65291
const KEY_ClearGrab = 269024801
const KEY_Close = 269025110
const KEY_Codeinput = 65335
const KEY_ColonSign = 16785569
const KEY_Community = 269025085
const KEY_ContrastAdjust = 269025058
const KEY_Control_L = 65507
const KEY_Control_R = 65508
const KEY_Copy = 269025111
const KEY_CruzeiroSign = 16785570
const KEY_Cut = 269025112
const KEY_CycleAngle = 269025180
const KEY_Cyrillic_A = 1761
const KEY_Cyrillic_BE = 1762
const KEY_Cyrillic_CHE = 1790
const KEY_Cyrillic_CHE_descender = 16778422
const KEY_Cyrillic_CHE_vertstroke = 16778424
const KEY_Cyrillic_DE = 1764
const KEY_Cyrillic_DZHE = 1727
const KEY_Cyrillic_E = 1788
const KEY_Cyrillic_EF = 1766
const KEY_Cyrillic_EL = 1772
const KEY_Cyrillic_EM = 1773
const KEY_Cyrillic_EN = 1774
const KEY_Cyrillic_EN_descender = 16778402
const KEY_Cyrillic_ER = 1778
const KEY_Cyrillic_ES = 1779
const KEY_Cyrillic_GHE = 1767
const KEY_Cyrillic_GHE_bar = 16778386
const KEY_Cyrillic_HA = 1768
const KEY_Cyrillic_HARDSIGN = 1791
const KEY_Cyrillic_HA_descender = 16778418
const KEY_Cyrillic_I = 1769
const KEY_Cyrillic_IE = 1765
const KEY_Cyrillic_IO = 1715
const KEY_Cyrillic_I_macron = 16778466
const KEY_Cyrillic_JE = 1720
const KEY_Cyrillic_KA = 1771
const KEY_Cyrillic_KA_descender = 16778394
const KEY_Cyrillic_KA_vertstroke = 16778396
const KEY_Cyrillic_LJE = 1721
const KEY_Cyrillic_NJE = 1722
const KEY_Cyrillic_O = 1775
const KEY_Cyrillic_O_bar = 16778472
const KEY_Cyrillic_PE = 1776
const KEY_Cyrillic_SCHWA = 16778456
const KEY_Cyrillic_SHA = 1787
const KEY_Cyrillic_SHCHA = 1789
const KEY_Cyrillic_SHHA = 16778426
const KEY_Cyrillic_SHORTI = 1770
const KEY_Cyrillic_SOFTSIGN = 1784
const KEY_Cyrillic_TE = 1780
const KEY_Cyrillic_TSE = 1763
const KEY_Cyrillic_U = 1781
const KEY_Cyrillic_U_macron = 16778478
const KEY_Cyrillic_U_straight = 16778414
const KEY_Cyrillic_U_straight_bar = 16778416
const KEY_Cyrillic_VE = 1783
const KEY_Cyrillic_YA = 1777
const KEY_Cyrillic_YERU = 1785
const KEY_Cyrillic_YU = 1760
const KEY_Cyrillic_ZE = 1786
const KEY_Cyrillic_ZHE = 1782
const KEY_Cyrillic_ZHE_descender = 16778390
const KEY_Cyrillic_a = 1729
const KEY_Cyrillic_be = 1730
const KEY_Cyrillic_che = 1758
const KEY_Cyrillic_che_descender = 16778423
const KEY_Cyrillic_che_vertstroke = 16778425
const KEY_Cyrillic_de = 1732
const KEY_Cyrillic_dzhe = 1711
const KEY_Cyrillic_e = 1756
const KEY_Cyrillic_ef = 1734
const KEY_Cyrillic_el = 1740
const KEY_Cyrillic_em = 1741
const KEY_Cyrillic_en = 1742
const KEY_Cyrillic_en_descender = 16778403
const KEY_Cyrillic_er = 1746
const KEY_Cyrillic_es = 1747
const KEY_Cyrillic_ghe = 1735
const KEY_Cyrillic_ghe_bar = 16778387
const KEY_Cyrillic_ha = 1736
const KEY_Cyrillic_ha_descender = 16778419
const KEY_Cyrillic_hardsign = 1759
const KEY_Cyrillic_i = 1737
const KEY_Cyrillic_i_macron = 16778467
const KEY_Cyrillic_ie = 1733
const KEY_Cyrillic_io = 1699
const KEY_Cyrillic_je = 1704
const KEY_Cyrillic_ka = 1739
const KEY_Cyrillic_ka_descender = 16778395
const KEY_Cyrillic_ka_vertstroke = 16778397
const KEY_Cyrillic_lje = 1705
const KEY_Cyrillic_nje = 1706
const KEY_Cyrillic_o = 1743
const KEY_Cyrillic_o_bar = 16778473
const KEY_Cyrillic_pe = 1744
const KEY_Cyrillic_schwa = 16778457
const KEY_Cyrillic_sha = 1755
const KEY_Cyrillic_shcha = 1757
const KEY_Cyrillic_shha = 16778427
const KEY_Cyrillic_shorti = 1738
const KEY_Cyrillic_softsign = 1752
const KEY_Cyrillic_te = 1748
const KEY_Cyrillic_tse = 1731
const KEY_Cyrillic_u = 1749
const KEY_Cyrillic_u_macron = 16778479
const KEY_Cyrillic_u_straight = 16778415
const KEY_Cyrillic_u_straight_bar = 16778417
const KEY_Cyrillic_ve = 1751
const KEY_Cyrillic_ya = 1745
const KEY_Cyrillic_yeru = 1753
const KEY_Cyrillic_yu = 1728
const KEY_Cyrillic_ze = 1754
const KEY_Cyrillic_zhe = 1750
const KEY_Cyrillic_zhe_descender = 16778391
const KEY_D = 68
const KEY_DOS = 269025114
const KEY_Dabovedot = 16784906
const KEY_Dcaron = 463
const KEY_Delete = 65535
const KEY_Display = 269025113
const KEY_Documents = 269025115
const KEY_DongSign = 16785579
const KEY_Down = 65364
const KEY_Dstroke = 464
const KEY_E = 69
const KEY_ENG = 957
const KEY_ETH = 208
const KEY_EZH = 16777655
const KEY_Eabovedot = 972
const KEY_Eacute = 201
const KEY_Ebelowdot = 16785080
const KEY_Ecaron = 460
const KEY_Ecircumflex = 202
const KEY_Ecircumflexacute = 16785086
const KEY_Ecircumflexbelowdot = 16785094
const KEY_Ecircumflexgrave = 16785088
const KEY_Ecircumflexhook = 16785090
const KEY_Ecircumflextilde = 16785092
const KEY_EcuSign = 16785568
const KEY_Ediaeresis = 203
const KEY_Egrave = 200
const KEY_Ehook = 16785082
const KEY_Eisu_Shift = 65327
const KEY_Eisu_toggle = 65328
const KEY_Eject = 269025068
const KEY_Emacron = 938
const KEY_End = 65367
const KEY_Eogonek = 458
const KEY_Escape = 65307
const KEY_Eth = 208
const KEY_Etilde = 16785084
const KEY_EuroSign = 8364
const KEY_Excel = 269025116
const KEY_Execute = 65378
const KEY_Explorer = 269025117
const KEY_F = 70
const KEY_F1 = 65470
const KEY_F10 = 65479
const KEY_F11 = 65480
const KEY_F12 = 65481
const KEY_F13 = 65482
const KEY_F14 = 65483
const KEY_F15 = 65484
const KEY_F16 = 65485
const KEY_F17 = 65486
const KEY_F18 = 65487
const KEY_F19 = 65488
const KEY_F2 = 65471
const KEY_F20 = 65489
const KEY_F21 = 65490
const KEY_F22 = 65491
const KEY_F23 = 65492
const KEY_F24 = 65493
const KEY_F25 = 65494
const KEY_F26 = 65495
const KEY_F27 = 65496
const KEY_F28 = 65497
const KEY_F29 = 65498
const KEY_F3 = 65472
const KEY_F30 = 65499
const KEY_F31 = 65500
const KEY_F32 = 65501
const KEY_F33 = 65502
const KEY_F34 = 65503
const KEY_F35 = 65504
const KEY_F4 = 65473
const KEY_F5 = 65474
const KEY_F6 = 65475
const KEY_F7 = 65476
const KEY_F8 = 65477
const KEY_F9 = 65478
const KEY_FFrancSign = 16785571
const KEY_Fabovedot = 16784926
const KEY_Farsi_0 = 16778992
const KEY_Farsi_1 = 16778993
const KEY_Farsi_2 = 16778994
const KEY_Farsi_3 = 16778995
const KEY_Farsi_4 = 16778996
const KEY_Farsi_5 = 16778997
const KEY_Farsi_6 = 16778998
const KEY_Farsi_7 = 16778999
const KEY_Farsi_8 = 16779000
const KEY_Farsi_9 = 16779001
const KEY_Farsi_yeh = 16778956
const KEY_Favorites = 269025072
const KEY_Finance = 269025084
const KEY_Find = 65384
const KEY_First_Virtual_Screen = 65232
const KEY_Forward = 269025063
const KEY_FrameBack = 269025181
const KEY_FrameForward = 269025182
const KEY_G = 71
const KEY_Gabovedot = 725
const KEY_Game = 269025118
const KEY_Gbreve = 683
const KEY_Gcaron = 16777702
const KEY_Gcedilla = 939
const KEY_Gcircumflex = 728
const KEY_Georgian_an = 16781520
const KEY_Georgian_ban = 16781521
const KEY_Georgian_can = 16781546
const KEY_Georgian_char = 16781549
const KEY_Georgian_chin = 16781545
const KEY_Georgian_cil = 16781548
const KEY_Georgian_don = 16781523
const KEY_Georgian_en = 16781524
const KEY_Georgian_fi = 16781558
const KEY_Georgian_gan = 16781522
const KEY_Georgian_ghan = 16781542
const KEY_Georgian_hae = 16781552
const KEY_Georgian_har = 16781556
const KEY_Georgian_he = 16781553
const KEY_Georgian_hie = 16781554
const KEY_Georgian_hoe = 16781557
const KEY_Georgian_in = 16781528
const KEY_Georgian_jhan = 16781551
const KEY_Georgian_jil = 16781547
const KEY_Georgian_kan = 16781529
const KEY_Georgian_khar = 16781541
const KEY_Georgian_las = 16781530
const KEY_Georgian_man = 16781531
const KEY_Georgian_nar = 16781532
const KEY_Georgian_on = 16781533
const KEY_Georgian_par = 16781534
const KEY_Georgian_phar = 16781540
const KEY_Georgian_qar = 16781543
const KEY_Georgian_rae = 16781536
const KEY_Georgian_san = 16781537
const KEY_Georgian_shin = 16781544
const KEY_Georgian_tan = 16781527
const KEY_Georgian_tar = 16781538
const KEY_Georgian_un = 16781539
const KEY_Georgian_vin = 16781525
const KEY_Georgian_we = 16781555
const KEY_Georgian_xan = 16781550
const KEY_Georgian_zen = 16781526
const KEY_Georgian_zhar = 16781535
const KEY_Go = 269025119
const KEY_Greek_ALPHA = 1985
const KEY_Greek_ALPHAaccent = 1953
const KEY_Greek_BETA = 1986
const KEY_Greek_CHI = 2007
const KEY_Greek_DELTA = 1988
const KEY_Greek_EPSILON = 1989
const KEY_Greek_EPSILONaccent = 1954
const KEY_Greek_ETA = 1991
const KEY_Greek_ETAaccent = 1955
const KEY_Greek_GAMMA = 1987
const KEY_Greek_IOTA = 1993
const KEY_Greek_IOTAaccent = 1956
const KEY_Greek_IOTAdiaeresis = 1957
const KEY_Greek_IOTAdieresis = 1957
const KEY_Greek_KAPPA = 1994
const KEY_Greek_LAMBDA = 1995
const KEY_Greek_LAMDA = 1995
const KEY_Greek_MU = 1996
const KEY_Greek_NU = 1997
const KEY_Greek_OMEGA = 2009
const KEY_Greek_OMEGAaccent = 1963
const KEY_Greek_OMICRON = 1999
const KEY_Greek_OMICRONaccent = 1959
const KEY_Greek_PHI = 2006
const KEY_Greek_PI = 2000
const KEY_Greek_PSI = 2008
const KEY_Greek_RHO = 2001
const KEY_Greek_SIGMA = 2002
const KEY_Greek_TAU = 2004
const KEY_Greek_THETA = 1992
const KEY_Greek_UPSILON = 2005
const KEY_Greek_UPSILONaccent = 1960
const KEY_Greek_UPSILONdieresis = 1961
const KEY_Greek_XI = 1998
const KEY_Greek_ZETA = 1990
const KEY_Greek_accentdieresis = 1966
const KEY_Greek_alpha = 2017
const KEY_Greek_alphaaccent = 1969
const KEY_Greek_beta = 2018
const KEY_Greek_chi = 2039
const KEY_Greek_delta = 2020
const KEY_Greek_epsilon = 2021
const KEY_Greek_epsilonaccent = 1970
const KEY_Greek_eta = 2023
const KEY_Greek_etaaccent = 1971
const KEY_Greek_finalsmallsigma = 2035
const KEY_Greek_gamma = 2019
const KEY_Greek_horizbar = 1967
const KEY_Greek_iota = 2025
const KEY_Greek_iotaaccent = 1972
const KEY_Greek_iotaaccentdieresis = 1974
const KEY_Greek_iotadieresis = 1973
const KEY_Greek_kappa = 2026
const KEY_Greek_lambda = 2027
const KEY_Greek_lamda = 2027
const KEY_Greek_mu = 2028
const KEY_Greek_nu = 2029
const KEY_Greek_omega = 2041
const KEY_Greek_omegaaccent = 1979
const KEY_Greek_omicron = 2031
const KEY_Greek_omicronaccent = 1975
const KEY_Greek_phi = 2038
const KEY_Greek_pi = 2032
const KEY_Greek_psi = 2040
const KEY_Greek_rho = 2033
const KEY_Greek_sigma = 2034
const KEY_Greek_switch = 65406
const KEY_Greek_tau = 2036
const KEY_Greek_theta = 2024
const KEY_Greek_upsilon = 2037
const KEY_Greek_upsilonaccent = 1976
const KEY_Greek_upsilonaccentdieresis = 1978
const KEY_Greek_upsilondieresis = 1977
const KEY_Greek_xi = 2030
const KEY_Greek_zeta = 2022
const KEY_Green = 269025188
const KEY_H = 72
const KEY_Hangul = 65329
const KEY_Hangul_A = 3775
const KEY_Hangul_AE = 3776
const KEY_Hangul_AraeA = 3830
const KEY_Hangul_AraeAE = 3831
const KEY_Hangul_Banja = 65337
const KEY_Hangul_Cieuc = 3770
const KEY_Hangul_Codeinput = 65335
const KEY_Hangul_Dikeud = 3751
const KEY_Hangul_E = 3780
const KEY_Hangul_EO = 3779
const KEY_Hangul_EU = 3793
const KEY_Hangul_End = 65331
const KEY_Hangul_Hanja = 65332
const KEY_Hangul_Hieuh = 3774
const KEY_Hangul_I = 3795
const KEY_Hangul_Ieung = 3767
const KEY_Hangul_J_Cieuc = 3818
const KEY_Hangul_J_Dikeud = 3802
const KEY_Hangul_J_Hieuh = 3822
const KEY_Hangul_J_Ieung = 3816
const KEY_Hangul_J_Jieuj = 3817
const KEY_Hangul_J_Khieuq = 3819
const KEY_Hangul_J_Kiyeog = 3796
const KEY_Hangul_J_KiyeogSios = 3798
const KEY_Hangul_J_KkogjiDalrinIeung = 3833
const KEY_Hangul_J_Mieum = 3811
const KEY_Hangul_J_Nieun = 3799
const KEY_Hangul_J_NieunHieuh = 3801
const KEY_Hangul_J_NieunJieuj = 3800
const KEY_Hangul_J_PanSios = 3832
const KEY_Hangul_J_Phieuf = 3821
const KEY_Hangul_J_Pieub = 3812
const KEY_Hangul_J_PieubSios = 3813
const KEY_Hangul_J_Rieul = 3803
const KEY_Hangul_J_RieulHieuh = 3810
const KEY_Hangul_J_RieulKiyeog = 3804
const KEY_Hangul_J_RieulMieum = 3805
const KEY_Hangul_J_RieulPhieuf = 3809
const KEY_Hangul_J_RieulPieub = 3806
const KEY_Hangul_J_RieulSios = 3807
const KEY_Hangul_J_RieulTieut = 3808
const KEY_Hangul_J_Sios = 3814
const KEY_Hangul_J_SsangKiyeog = 3797
const KEY_Hangul_J_SsangSios = 3815
const KEY_Hangul_J_Tieut = 3820
const KEY_Hangul_J_YeorinHieuh = 3834
const KEY_Hangul_Jamo = 65333
const KEY_Hangul_Jeonja = 65336
const KEY_Hangul_Jieuj = 3768
const KEY_Hangul_Khieuq = 3771
const KEY_Hangul_Kiyeog = 3745
const KEY_Hangul_KiyeogSios = 3747
const KEY_Hangul_KkogjiDalrinIeung = 3827
const KEY_Hangul_Mieum = 3761
const KEY_Hangul_MultipleCandidate = 65341
const KEY_Hangul_Nieun = 3748
const KEY_Hangul_NieunHieuh = 3750
const KEY_Hangul_NieunJieuj = 3749
const KEY_Hangul_O = 3783
const KEY_Hangul_OE = 3786
const KEY_Hangul_PanSios = 3826
const KEY_Hangul_Phieuf = 3773
const KEY_Hangul_Pieub = 3762
const KEY_Hangul_PieubSios = 3764
const KEY_Hangul_PostHanja = 65339
const KEY_Hangul_PreHanja = 65338
const KEY_Hangul_PreviousCandidate = 65342
const KEY_Hangul_Rieul = 3753
const KEY_Hangul_RieulHieuh = 3760
const KEY_Hangul_RieulKiyeog = 3754
const KEY_Hangul_RieulMieum = 3755
const KEY_Hangul_RieulPhieuf = 3759
const KEY_Hangul_RieulPieub = 3756
const KEY_Hangul_RieulSios = 3757
const KEY_Hangul_RieulTieut = 3758
const KEY_Hangul_RieulYeorinHieuh = 3823
const KEY_Hangul_Romaja = 65334
const KEY_Hangul_SingleCandidate = 65340
const KEY_Hangul_Sios = 3765
const KEY_Hangul_Special = 65343
const KEY_Hangul_SsangDikeud = 3752
const KEY_Hangul_SsangJieuj = 3769
const KEY_Hangul_SsangKiyeog = 3746
const KEY_Hangul_SsangPieub = 3763
const KEY_Hangul_SsangSios = 3766
const KEY_Hangul_Start = 65330
const KEY_Hangul_SunkyeongeumMieum = 3824
const KEY_Hangul_SunkyeongeumPhieuf = 3828
const KEY_Hangul_SunkyeongeumPieub = 3825
const KEY_Hangul_Tieut = 3772
const KEY_Hangul_U = 3788
const KEY_Hangul_WA = 3784
const KEY_Hangul_WAE = 3785
const KEY_Hangul_WE = 3790
const KEY_Hangul_WEO = 3789
const KEY_Hangul_WI = 3791
const KEY_Hangul_YA = 3777
const KEY_Hangul_YAE = 3778
const KEY_Hangul_YE = 3782
const KEY_Hangul_YEO = 3781
const KEY_Hangul_YI = 3794
const KEY_Hangul_YO = 3787
const KEY_Hangul_YU = 3792
const KEY_Hangul_YeorinHieuh = 3829
const KEY_Hangul_switch = 65406
const KEY_Hankaku = 65321
const KEY_Hcircumflex = 678
const KEY_Hebrew_switch = 65406
const KEY_Help = 65386
const KEY_Henkan = 65315
const KEY_Henkan_Mode = 65315
const KEY_Hibernate = 269025192
const KEY_Hiragana = 65317
const KEY_Hiragana_Katakana = 65319
const KEY_History = 269025079
const KEY_Home = 65360
const KEY_HomePage = 269025048
const KEY_HotLinks = 269025082
const KEY_Hstroke = 673
const KEY_Hyper_L = 65517
const KEY_Hyper_R = 65518
const KEY_I = 73
const KEY_ISO_Center_Object = 65075
const KEY_ISO_Continuous_Underline = 65072
const KEY_ISO_Discontinuous_Underline = 65073
const KEY_ISO_Emphasize = 65074
const KEY_ISO_Enter = 65076
const KEY_ISO_Fast_Cursor_Down = 65071
const KEY_ISO_Fast_Cursor_Left = 65068
const KEY_ISO_Fast_Cursor_Right = 65069
const KEY_ISO_Fast_Cursor_Up = 65070
const KEY_ISO_First_Group = 65036
const KEY_ISO_First_Group_Lock = 65037
const KEY_ISO_Group_Latch = 65030
const KEY_ISO_Group_Lock = 65031
const KEY_ISO_Group_Shift = 65406
const KEY_ISO_Last_Group = 65038
const KEY_ISO_Last_Group_Lock = 65039
const KEY_ISO_Left_Tab = 65056
const KEY_ISO_Level2_Latch = 65026
const KEY_ISO_Level3_Latch = 65028
const KEY_ISO_Level3_Lock = 65029
const KEY_ISO_Level3_Shift = 65027
const KEY_ISO_Level5_Latch = 65042
const KEY_ISO_Level5_Lock = 65043
const KEY_ISO_Level5_Shift = 65041
const KEY_ISO_Lock = 65025
const KEY_ISO_Move_Line_Down = 65058
const KEY_ISO_Move_Line_Up = 65057
const KEY_ISO_Next_Group = 65032
const KEY_ISO_Next_Group_Lock = 65033
const KEY_ISO_Partial_Line_Down = 65060
const KEY_ISO_Partial_Line_Up = 65059
const KEY_ISO_Partial_Space_Left = 65061
const KEY_ISO_Partial_Space_Right = 65062
const KEY_ISO_Prev_Group = 65034
const KEY_ISO_Prev_Group_Lock = 65035
const KEY_ISO_Release_Both_Margins = 65067
const KEY_ISO_Release_Margin_Left = 65065
const KEY_ISO_Release_Margin_Right = 65066
const KEY_ISO_Set_Margin_Left = 65063
const KEY_ISO_Set_Margin_Right = 65064
const KEY_Iabovedot = 681
const KEY_Iacute = 205
const KEY_Ibelowdot = 16785098
const KEY_Ibreve = 16777516
const KEY_Icircumflex = 206
const KEY_Idiaeresis = 207
const KEY_Igrave = 204
const KEY_Ihook = 16785096
const KEY_Imacron = 975
const KEY_Insert = 65379
const KEY_Iogonek = 967
const KEY_Itilde = 933
const KEY_J = 74
const KEY_Jcircumflex = 684
const KEY_K = 75
const KEY_KP_0 = 65456
const KEY_KP_1 = 65457
const KEY_KP_2 = 65458
const KEY_KP_3 = 65459
const KEY_KP_4 = 65460
const KEY_KP_5 = 65461
const KEY_KP_6 = 65462
const KEY_KP_7 = 65463
const KEY_KP_8 = 65464
const KEY_KP_9 = 65465
const KEY_KP_Add = 65451
const KEY_KP_Begin = 65437
const KEY_KP_Decimal = 65454
const KEY_KP_Delete = 65439
const KEY_KP_Divide = 65455
const KEY_KP_Down = 65433
const KEY_KP_End = 65436
const KEY_KP_Enter = 65421
const KEY_KP_Equal = 65469
const KEY_KP_F1 = 65425
const KEY_KP_F2 = 65426
const KEY_KP_F3 = 65427
const KEY_KP_F4 = 65428
const KEY_KP_Home = 65429
const KEY_KP_Insert = 65438
const KEY_KP_Left = 65430
const KEY_KP_Multiply = 65450
const KEY_KP_Next = 65435
const KEY_KP_Page_Down = 65435
const KEY_KP_Page_Up = 65434
const KEY_KP_Prior = 65434
const KEY_KP_Right = 65432
const KEY_KP_Separator = 65452
const KEY_KP_Space = 65408
const KEY_KP_Subtract = 65453
const KEY_KP_Tab = 65417
const KEY_KP_Up = 65431
const KEY_Kana_Lock = 65325
const KEY_Kana_Shift = 65326
const KEY_Kanji = 65313
const KEY_Kanji_Bangou = 65335
const KEY_Katakana = 65318
const KEY_KbdBrightnessDown = 269025030
const KEY_KbdBrightnessUp = 269025029
const KEY_KbdLightOnOff = 269025028
const KEY_Kcedilla = 979
const KEY_Keyboard = 269025203
const KEY_Korean_Won = 3839
const KEY_L = 76
const KEY_L1 = 65480
const KEY_L10 = 65489
const KEY_L2 = 65481
const KEY_L3 = 65482
const KEY_L4 = 65483
const KEY_L5 = 65484
const KEY_L6 = 65485
const KEY_L7 = 65486
const KEY_L8 = 65487
const KEY_L9 = 65488
const KEY_Lacute = 453
const KEY_Last_Virtual_Screen = 65236
const KEY_Launch0 = 269025088
const KEY_Launch1 = 269025089
const KEY_Launch2 = 269025090
const KEY_Launch3 = 269025091
const KEY_Launch4 = 269025092
const KEY_Launch5 = 269025093
const KEY_Launch6 = 269025094
const KEY_Launch7 = 269025095
const KEY_Launch8 = 269025096
const KEY_Launch9 = 269025097
const KEY_LaunchA = 269025098
const KEY_LaunchB = 269025099
const KEY_LaunchC = 269025100
const KEY_LaunchD = 269025101
const KEY_LaunchE = 269025102
const KEY_LaunchF = 269025103
const KEY_Lbelowdot = 16784950
const KEY_Lcaron = 421
const KEY_Lcedilla = 934
const KEY_Left = 65361
const KEY_LightBulb = 269025077
const KEY_Linefeed = 65290
const KEY_LiraSign = 16785572
const KEY_LogGrabInfo = 269024805
const KEY_LogOff = 269025121
const KEY_LogWindowTree = 269024804
const KEY_Lstroke = 419
const KEY_M = 77
const KEY_Mabovedot = 16784960
const KEY_Macedonia_DSE = 1717
const KEY_Macedonia_GJE = 1714
const KEY_Macedonia_KJE = 1724
const KEY_Macedonia_dse = 1701
const KEY_Macedonia_gje = 1698
const KEY_Macedonia_kje = 1708
const KEY_Mae_Koho = 65342
const KEY_Mail = 269025049
const KEY_MailForward = 269025168
const KEY_Market = 269025122
const KEY_Massyo = 65324
const KEY_Meeting = 269025123
const KEY_Memo = 269025054
const KEY_Menu = 65383
const KEY_MenuKB = 269025125
const KEY_MenuPB = 269025126
const KEY_Messenger = 269025166
const KEY_Meta_L = 65511
const KEY_Meta_R = 65512
const KEY_MillSign = 16785573
const KEY_ModeLock = 269025025
const KEY_Mode_switch = 65406
const KEY_MonBrightnessDown = 269025027
const KEY_MonBrightnessUp = 269025026
const KEY_MouseKeys_Accel_Enable = 65143
const KEY_MouseKeys_Enable = 65142
const KEY_Muhenkan = 65314
const KEY_Multi_key = 65312
const KEY_MultipleCandidate = 65341
const KEY_Music = 269025170
const KEY_MyComputer = 269025075
const KEY_MySites = 269025127
const KEY_N = 78
const KEY_Nacute = 465
const KEY_NairaSign = 16785574
const KEY_Ncaron = 466
const KEY_Ncedilla = 977
const KEY_New = 269025128
const KEY_NewSheqelSign = 16785578
const KEY_News = 269025129
const KEY_Next = 65366
const KEY_Next_VMode = 269024802
const KEY_Next_Virtual_Screen = 65234
const KEY_Ntilde = 209
const KEY_Num_Lock = 65407
const KEY_O = 79
const KEY_OE = 5052
const KEY_Oacute = 211
const KEY_Obarred = 16777631
const KEY_Obelowdot = 16785100
const KEY_Ocaron = 16777681
const KEY_Ocircumflex = 212
const KEY_Ocircumflexacute = 16785104
const KEY_Ocircumflexbelowdot = 16785112
const KEY_Ocircumflexgrave = 16785106
const KEY_Ocircumflexhook = 16785108
const KEY_Ocircumflextilde = 16785110
const KEY_Odiaeresis = 214
const KEY_Odoubleacute = 469
const KEY_OfficeHome = 269025130
const KEY_Ograve = 210
const KEY_Ohook = 16785102
const KEY_Ohorn = 16777632
const KEY_Ohornacute = 16785114
const KEY_Ohornbelowdot = 16785122
const KEY_Ohorngrave = 16785116
const KEY_Ohornhook = 16785118
const KEY_Ohorntilde = 16785120
const KEY_Omacron = 978
const KEY_Ooblique = 216
const KEY_Open = 269025131
const KEY_OpenURL = 269025080
const KEY_Option = 269025132
const KEY_Oslash = 216
const KEY_Otilde = 213
const KEY_Overlay1_Enable = 65144
const KEY_Overlay2_Enable = 65145
const KEY_P = 80
const KEY_Pabovedot = 16784982
const KEY_Page_Down = 65366
const KEY_Page_Up = 65365
const KEY_Paste = 269025133
const KEY_Pause = 65299
const KEY_PesetaSign = 16785575
const KEY_Phone = 269025134
const KEY_Pictures = 269025169
const KEY_Pointer_Accelerate = 65274
const KEY_Pointer_Button1 = 65257
const KEY_Pointer_Button2 = 65258
const KEY_Pointer_Button3 = 65259
const KEY_Pointer_Button4 = 65260
const KEY_Pointer_Button5 = 65261
const KEY_Pointer_Button_Dflt = 65256
const KEY_Pointer_DblClick1 = 65263
const KEY_Pointer_DblClick2 = 65264
const KEY_Pointer_DblClick3 = 65265
const KEY_Pointer_DblClick4 = 65266
const KEY_Pointer_DblClick5 = 65267
const KEY_Pointer_DblClick_Dflt = 65262
const KEY_Pointer_DfltBtnNext = 65275
const KEY_Pointer_DfltBtnPrev = 65276
const KEY_Pointer_Down = 65251
const KEY_Pointer_DownLeft = 65254
const KEY_Pointer_DownRight = 65255
const KEY_Pointer_Drag1 = 65269
const KEY_Pointer_Drag2 = 65270
const KEY_Pointer_Drag3 = 65271
const KEY_Pointer_Drag4 = 65272
const KEY_Pointer_Drag5 = 65277
const KEY_Pointer_Drag_Dflt = 65268
const KEY_Pointer_EnableKeys = 65273
const KEY_Pointer_Left = 65248
const KEY_Pointer_Right = 65249
const KEY_Pointer_Up = 65250
const KEY_Pointer_UpLeft = 65252
const KEY_Pointer_UpRight = 65253
const KEY_PowerDown = 269025057
const KEY_PowerOff = 269025066
const KEY_Prev_VMode = 269024803
const KEY_Prev_Virtual_Screen = 65233
const KEY_PreviousCandidate = 65342
const KEY_Print = 65377
const KEY_Prior = 65365
const KEY_Q = 81
const KEY_R = 82
const KEY_R1 = 65490
const KEY_R10 = 65499
const KEY_R11 = 65500
const KEY_R12 = 65501
const KEY_R13 = 65502
const KEY_R14 = 65503
const KEY_R15 = 65504
const KEY_R2 = 65491
const KEY_R3 = 65492
const KEY_R4 = 65493
const KEY_R5 = 65494
const KEY_R6 = 65495
const KEY_R7 = 65496
const KEY_R8 = 65497
const KEY_R9 = 65498
const KEY_RFKill = 269025205
const KEY_Racute = 448
const KEY_Rcaron = 472
const KEY_Rcedilla = 931
const KEY_Red = 269025187
const KEY_Redo = 65382
const KEY_Refresh = 269025065
const KEY_Reload = 269025139
const KEY_RepeatKeys_Enable = 65138
const KEY_Reply = 269025138
const KEY_Return = 65293
const KEY_Right = 65363
const KEY_RockerDown = 269025060
const KEY_RockerEnter = 269025061
const KEY_RockerUp = 269025059
const KEY_Romaji = 65316
const KEY_RotateWindows = 269025140
const KEY_RotationKB = 269025142
const KEY_RotationPB = 269025141
const KEY_RupeeSign = 16785576
const KEY_S = 83
const KEY_SCHWA = 16777615
const KEY_Sabovedot = 16784992
const KEY_Sacute = 422
const KEY_Save = 269025143
const KEY_Scaron = 425
const KEY_Scedilla = 426
const KEY_Scircumflex = 734
const KEY_ScreenSaver = 269025069
const KEY_ScrollClick = 269025146
const KEY_ScrollDown = 269025145
const KEY_ScrollUp = 269025144
const KEY_Scroll_Lock = 65300
const KEY_Search = 269025051
const KEY_Select = 65376
const KEY_SelectButton = 269025184
const KEY_Send = 269025147
const KEY_Serbian_DJE = 1713
const KEY_Serbian_DZE = 1727
const KEY_Serbian_JE = 1720
const KEY_Serbian_LJE = 1721
const KEY_Serbian_NJE = 1722
const KEY_Serbian_TSHE = 1723
const KEY_Serbian_dje = 1697
const KEY_Serbian_dze = 1711
const KEY_Serbian_je = 1704
const KEY_Serbian_lje = 1705
const KEY_Serbian_nje = 1706
const KEY_Serbian_tshe = 1707
const KEY_Shift_L = 65505
const KEY_Shift_Lock = 65510
const KEY_Shift_R = 65506
const KEY_Shop = 269025078
const KEY_SingleCandidate = 65340
const KEY_Sinh_a = 16780677
const KEY_Sinh_aa = 16780678
const KEY_Sinh_aa2 = 16780751
const KEY_Sinh_ae = 16780679
const KEY_Sinh_ae2 = 16780752
const KEY_Sinh_aee = 16780680
const KEY_Sinh_aee2 = 16780753
const KEY_Sinh_ai = 16780691
const KEY_Sinh_ai2 = 16780763
const KEY_Sinh_al = 16780746
const KEY_Sinh_au = 16780694
const KEY_Sinh_au2 = 16780766
const KEY_Sinh_ba = 16780726
const KEY_Sinh_bha = 16780727
const KEY_Sinh_ca = 16780704
const KEY_Sinh_cha = 16780705
const KEY_Sinh_dda = 16780713
const KEY_Sinh_ddha = 16780714
const KEY_Sinh_dha = 16780719
const KEY_Sinh_dhha = 16780720
const KEY_Sinh_e = 16780689
const KEY_Sinh_e2 = 16780761
const KEY_Sinh_ee = 16780690
const KEY_Sinh_ee2 = 16780762
const KEY_Sinh_fa = 16780742
const KEY_Sinh_ga = 16780700
const KEY_Sinh_gha = 16780701
const KEY_Sinh_h2 = 16780675
const KEY_Sinh_ha = 16780740
const KEY_Sinh_i = 16780681
const KEY_Sinh_i2 = 16780754
const KEY_Sinh_ii = 16780682
const KEY_Sinh_ii2 = 16780755
const KEY_Sinh_ja = 16780706
const KEY_Sinh_jha = 16780707
const KEY_Sinh_jnya = 16780709
const KEY_Sinh_ka = 16780698
const KEY_Sinh_kha = 16780699
const KEY_Sinh_kunddaliya = 16780788
const KEY_Sinh_la = 16780733
const KEY_Sinh_lla = 16780741
const KEY_Sinh_lu = 16780687
const KEY_Sinh_lu2 = 16780767
const KEY_Sinh_luu = 16780688
const KEY_Sinh_luu2 = 16780787
const KEY_Sinh_ma = 16780728
const KEY_Sinh_mba = 16780729
const KEY_Sinh_na = 16780721
const KEY_Sinh_ndda = 16780716
const KEY_Sinh_ndha = 16780723
const KEY_Sinh_ng = 16780674
const KEY_Sinh_ng2 = 16780702
const KEY_Sinh_nga = 16780703
const KEY_Sinh_nja = 16780710
const KEY_Sinh_nna = 16780715
const KEY_Sinh_nya = 16780708
const KEY_Sinh_o = 16780692
const KEY_Sinh_o2 = 16780764
const KEY_Sinh_oo = 16780693
const KEY_Sinh_oo2 = 16780765
const KEY_Sinh_pa = 16780724
const KEY_Sinh_pha = 16780725
const KEY_Sinh_ra = 16780731
const KEY_Sinh_ri = 16780685
const KEY_Sinh_rii = 16780686
const KEY_Sinh_ru2 = 16780760
const KEY_Sinh_ruu2 = 16780786
const KEY_Sinh_sa = 16780739
const KEY_Sinh_sha = 16780737
const KEY_Sinh_ssha = 16780738
const KEY_Sinh_tha = 16780717
const KEY_Sinh_thha = 16780718
const KEY_Sinh_tta = 16780711
const KEY_Sinh_ttha = 16780712
const KEY_Sinh_u = 16780683
const KEY_Sinh_u2 = 16780756
const KEY_Sinh_uu = 16780684
const KEY_Sinh_uu2 = 16780758
const KEY_Sinh_va = 16780736
const KEY_Sinh_ya = 16780730
const KEY_Sleep = 269025071
const KEY_SlowKeys_Enable = 65139
const KEY_Spell = 269025148
const KEY_SplitScreen = 269025149
const KEY_Standby = 269025040
const KEY_Start = 269025050
const KEY_StickyKeys_Enable = 65141
const KEY_Stop = 269025064
const KEY_Subtitle = 269025178
const KEY_Super_L = 65515
const KEY_Super_R = 65516
const KEY_Support = 269025150
const KEY_Suspend = 269025191
const KEY_Switch_VT_1 = 269024769
const KEY_Switch_VT_10 = 269024778
const KEY_Switch_VT_11 = 269024779
const KEY_Switch_VT_12 = 269024780
const KEY_Switch_VT_2 = 269024770
const KEY_Switch_VT_3 = 269024771
const KEY_Switch_VT_4 = 269024772
const KEY_Switch_VT_5 = 269024773
const KEY_Switch_VT_6 = 269024774
const KEY_Switch_VT_7 = 269024775
const KEY_Switch_VT_8 = 269024776
const KEY_Switch_VT_9 = 269024777
const KEY_Sys_Req = 65301
const KEY_T = 84
const KEY_THORN = 222
const KEY_Tab = 65289
const KEY_Tabovedot = 16785002
const KEY_TaskPane = 269025151
const KEY_Tcaron = 427
const KEY_Tcedilla = 478
const KEY_Terminal = 269025152
const KEY_Terminate_Server = 65237
const KEY_Thai_baht = 3551
const KEY_Thai_bobaimai = 3514
const KEY_Thai_chochan = 3496
const KEY_Thai_chochang = 3498
const KEY_Thai_choching = 3497
const KEY_Thai_chochoe = 3500
const KEY_Thai_dochada = 3502
const KEY_Thai_dodek = 3508
const KEY_Thai_fofa = 3517
const KEY_Thai_fofan = 3519
const KEY_Thai_hohip = 3531
const KEY_Thai_honokhuk = 3534
const KEY_Thai_khokhai = 3490
const KEY_Thai_khokhon = 3493
const KEY_Thai_khokhuat = 3491
const KEY_Thai_khokhwai = 3492
const KEY_Thai_khorakhang = 3494
const KEY_Thai_kokai = 3489
const KEY_Thai_lakkhangyao = 3557
const KEY_Thai_lekchet = 3575
const KEY_Thai_lekha = 3573
const KEY_Thai_lekhok = 3574
const KEY_Thai_lekkao = 3577
const KEY_Thai_leknung = 3569
const KEY_Thai_lekpaet = 3576
const KEY_Thai_leksam = 3571
const KEY_Thai_leksi = 3572
const KEY_Thai_leksong = 3570
const KEY_Thai_leksun = 3568
const KEY_Thai_lochula = 3532
const KEY_Thai_loling = 3525
const KEY_Thai_lu = 3526
const KEY_Thai_maichattawa = 3563
const KEY_Thai_maiek = 3560
const KEY_Thai_maihanakat = 3537
const KEY_Thai_maihanakat_maitho = 3550
const KEY_Thai_maitaikhu = 3559
const KEY_Thai_maitho = 3561
const KEY_Thai_maitri = 3562
const KEY_Thai_maiyamok = 3558
const KEY_Thai_moma = 3521
const KEY_Thai_ngongu = 3495
const KEY_Thai_nikhahit = 3565
const KEY_Thai_nonen = 3507
const KEY_Thai_nonu = 3513
const KEY_Thai_oang = 3533
const KEY_Thai_paiyannoi = 3535
const KEY_Thai_phinthu = 3546
const KEY_Thai_phophan = 3518
const KEY_Thai_phophung = 3516
const KEY_Thai_phosamphao = 3520
const KEY_Thai_popla = 3515
const KEY_Thai_rorua = 3523
const KEY_Thai_ru = 3524
const KEY_Thai_saraa = 3536
const KEY_Thai_saraaa = 3538
const KEY_Thai_saraae = 3553
const KEY_Thai_saraaimaimalai = 3556
const KEY_Thai_saraaimaimuan = 3555
const KEY_Thai_saraam = 3539
const KEY_Thai_sarae = 3552
const KEY_Thai_sarai = 3540
const KEY_Thai_saraii = 3541
const KEY_Thai_sarao = 3554
const KEY_Thai_sarau = 3544
const KEY_Thai_saraue = 3542
const KEY_Thai_sarauee = 3543
const KEY_Thai_sarauu = 3545
const KEY_Thai_sorusi = 3529
const KEY_Thai_sosala = 3528
const KEY_Thai_soso = 3499
const KEY_Thai_sosua = 3530
const KEY_Thai_thanthakhat = 3564
const KEY_Thai_thonangmontho = 3505
const KEY_Thai_thophuthao = 3506
const KEY_Thai_thothahan = 3511
const KEY_Thai_thothan = 3504
const KEY_Thai_thothong = 3512
const KEY_Thai_thothung = 3510
const KEY_Thai_topatak = 3503
const KEY_Thai_totao = 3509
const KEY_Thai_wowaen = 3527
const KEY_Thai_yoyak = 3522
const KEY_Thai_yoying = 3501
const KEY_Thorn = 222
const KEY_Time = 269025183
const KEY_ToDoList = 269025055
const KEY_Tools = 269025153
const KEY_TopMenu = 269025186
const KEY_TouchpadOff = 269025201
const KEY_TouchpadOn = 269025200
const KEY_TouchpadToggle = 269025193
const KEY_Touroku = 65323
const KEY_Travel = 269025154
const KEY_Tslash = 940
const KEY_U = 85
const KEY_UWB = 269025174
const KEY_Uacute = 218
const KEY_Ubelowdot = 16785124
const KEY_Ubreve = 733
const KEY_Ucircumflex = 219
const KEY_Udiaeresis = 220
const KEY_Udoubleacute = 475
const KEY_Ugrave = 217
const KEY_Uhook = 16785126
const KEY_Uhorn = 16777647
const KEY_Uhornacute = 16785128
const KEY_Uhornbelowdot = 16785136
const KEY_Uhorngrave = 16785130
const KEY_Uhornhook = 16785132
const KEY_Uhorntilde = 16785134
const KEY_Ukrainian_GHE_WITH_UPTURN = 1725
const KEY_Ukrainian_I = 1718
const KEY_Ukrainian_IE = 1716
const KEY_Ukrainian_YI = 1719
const KEY_Ukrainian_ghe_with_upturn = 1709
const KEY_Ukrainian_i = 1702
const KEY_Ukrainian_ie = 1700
const KEY_Ukrainian_yi = 1703
const KEY_Ukranian_I = 1718
const KEY_Ukranian_JE = 1716
const KEY_Ukranian_YI = 1719
const KEY_Ukranian_i = 1702
const KEY_Ukranian_je = 1700
const KEY_Ukranian_yi = 1703
const KEY_Umacron = 990
const KEY_Undo = 65381
const KEY_Ungrab = 269024800
const KEY_Uogonek = 985
const KEY_Up = 65362
const KEY_Uring = 473
const KEY_User1KB = 269025157
const KEY_User2KB = 269025158
const KEY_UserPB = 269025156
const KEY_Utilde = 989
const KEY_V = 86
const KEY_VendorHome = 269025076
const KEY_Video = 269025159
const KEY_View = 269025185
const KEY_VoidSymbol = 16777215
const KEY_W = 87
const KEY_WLAN = 269025173
const KEY_WWAN = 269025204
const KEY_WWW = 269025070
const KEY_Wacute = 16785026
const KEY_WakeUp = 269025067
const KEY_Wcircumflex = 16777588
const KEY_Wdiaeresis = 16785028
const KEY_WebCam = 269025167
const KEY_Wgrave = 16785024
const KEY_WheelButton = 269025160
const KEY_WindowClear = 269025109
const KEY_WonSign = 16785577
const KEY_Word = 269025161
const KEY_X = 88
const KEY_Xabovedot = 16785034
const KEY_Xfer = 269025162
const KEY_Y = 89
const KEY_Yacute = 221
const KEY_Ybelowdot = 16785140
const KEY_Ycircumflex = 16777590
const KEY_Ydiaeresis = 5054
const KEY_Yellow = 269025189
const KEY_Ygrave = 16785138
const KEY_Yhook = 16785142
const KEY_Ytilde = 16785144
const KEY_Z = 90
const KEY_Zabovedot = 431
const KEY_Zacute = 428
const KEY_Zcaron = 430
const KEY_Zen_Koho = 65341
const KEY_Zenkaku = 65320
const KEY_Zenkaku_Hankaku = 65322
const KEY_ZoomIn = 269025163
const KEY_ZoomOut = 269025164
const KEY_Zstroke = 16777653
const KEY_a = 97
const KEY_aacute = 225
const KEY_abelowdot = 16785057
const KEY_abovedot = 511
const KEY_abreve = 483
const KEY_abreveacute = 16785071
const KEY_abrevebelowdot = 16785079
const KEY_abrevegrave = 16785073
const KEY_abrevehook = 16785075
const KEY_abrevetilde = 16785077
const KEY_acircumflex = 226
const KEY_acircumflexacute = 16785061
const KEY_acircumflexbelowdot = 16785069
const KEY_acircumflexgrave = 16785063
const KEY_acircumflexhook = 16785065
const KEY_acircumflextilde = 16785067
const KEY_acute = 180
const KEY_adiaeresis = 228
const KEY_ae = 230
const KEY_agrave = 224
const KEY_ahook = 16785059
const KEY_amacron = 992
const KEY_ampersand = 38
const KEY_aogonek = 433
const KEY_apostrophe = 39
const KEY_approxeq = 16785992
const KEY_approximate = 2248
const KEY_aring = 229
const KEY_asciicircum = 94
const KEY_asciitilde = 126
const KEY_asterisk = 42
const KEY_at = 64
const KEY_atilde = 227
const KEY_b = 98
const KEY_babovedot = 16784899
const KEY_backslash = 92
const KEY_ballotcross = 2804
const KEY_bar = 124
const KEY_because = 16785973
const KEY_blank = 2527
const KEY_botintegral = 2213
const KEY_botleftparens = 2220
const KEY_botleftsqbracket = 2216
const KEY_botleftsummation = 2226
const KEY_botrightparens = 2222
const KEY_botrightsqbracket = 2218
const KEY_botrightsummation = 2230
const KEY_bott = 2550
const KEY_botvertsummationconnector = 2228
const KEY_braceleft = 123
const KEY_braceright = 125
const KEY_bracketleft = 91
const KEY_bracketright = 93
const KEY_braille_blank = 16787456
const KEY_braille_dot_1 = 65521
const KEY_braille_dot_10 = 65530
const KEY_braille_dot_2 = 65522
const KEY_braille_dot_3 = 65523
const KEY_braille_dot_4 = 65524
const KEY_braille_dot_5 = 65525
const KEY_braille_dot_6 = 65526
const KEY_braille_dot_7 = 65527
const KEY_braille_dot_8 = 65528
const KEY_braille_dot_9 = 65529
const KEY_braille_dots_1 = 16787457
const KEY_braille_dots_12 = 16787459
const KEY_braille_dots_123 = 16787463
const KEY_braille_dots_1234 = 16787471
const KEY_braille_dots_12345 = 16787487
const KEY_braille_dots_123456 = 16787519
const KEY_braille_dots_1234567 = 16787583
const KEY_braille_dots_12345678 = 16787711
const KEY_braille_dots_1234568 = 16787647
const KEY_braille_dots_123457 = 16787551
const KEY_braille_dots_1234578 = 16787679
const KEY_braille_dots_123458 = 16787615
const KEY_braille_dots_12346 = 16787503
const KEY_braille_dots_123467 = 16787567
const KEY_braille_dots_1234678 = 16787695
const KEY_braille_dots_123468 = 16787631
const KEY_braille_dots_12347 = 16787535
const KEY_braille_dots_123478 = 16787663
const KEY_braille_dots_12348 = 16787599
const KEY_braille_dots_1235 = 16787479
const KEY_braille_dots_12356 = 16787511
const KEY_braille_dots_123567 = 16787575
const KEY_braille_dots_1235678 = 16787703
const KEY_braille_dots_123568 = 16787639
const KEY_braille_dots_12357 = 16787543
const KEY_braille_dots_123578 = 16787671
const KEY_braille_dots_12358 = 16787607
const KEY_braille_dots_1236 = 16787495
const KEY_braille_dots_12367 = 16787559
const KEY_braille_dots_123678 = 16787687
const KEY_braille_dots_12368 = 16787623
const KEY_braille_dots_1237 = 16787527
const KEY_braille_dots_12378 = 16787655
const KEY_braille_dots_1238 = 16787591
const KEY_braille_dots_124 = 16787467
const KEY_braille_dots_1245 = 16787483
const KEY_braille_dots_12456 = 16787515
const KEY_braille_dots_124567 = 16787579
const KEY_braille_dots_1245678 = 16787707
const KEY_braille_dots_124568 = 16787643
const KEY_braille_dots_12457 = 16787547
const KEY_braille_dots_124578 = 16787675
const KEY_braille_dots_12458 = 16787611
const KEY_braille_dots_1246 = 16787499
const KEY_braille_dots_12467 = 16787563
const KEY_braille_dots_124678 = 16787691
const KEY_braille_dots_12468 = 16787627
const KEY_braille_dots_1247 = 16787531
const KEY_braille_dots_12478 = 16787659
const KEY_braille_dots_1248 = 16787595
const KEY_braille_dots_125 = 16787475
const KEY_braille_dots_1256 = 16787507
const KEY_braille_dots_12567 = 16787571
const KEY_braille_dots_125678 = 16787699
const KEY_braille_dots_12568 = 16787635
const KEY_braille_dots_1257 = 16787539
const KEY_braille_dots_12578 = 16787667
const KEY_braille_dots_1258 = 16787603
const KEY_braille_dots_126 = 16787491
const KEY_braille_dots_1267 = 16787555
const KEY_braille_dots_12678 = 16787683
const KEY_braille_dots_1268 = 16787619
const KEY_braille_dots_127 = 16787523
const KEY_braille_dots_1278 = 16787651
const KEY_braille_dots_128 = 16787587
const KEY_braille_dots_13 = 16787461
const KEY_braille_dots_134 = 16787469
const KEY_braille_dots_1345 = 16787485
const KEY_braille_dots_13456 = 16787517
const KEY_braille_dots_134567 = 16787581
const KEY_braille_dots_1345678 = 16787709
const KEY_braille_dots_134568 = 16787645
const KEY_braille_dots_13457 = 16787549
const KEY_braille_dots_134578 = 16787677
const KEY_braille_dots_13458 = 16787613
const KEY_braille_dots_1346 = 16787501
const KEY_braille_dots_13467 = 16787565
const KEY_braille_dots_134678 = 16787693
const KEY_braille_dots_13468 = 16787629
const KEY_braille_dots_1347 = 16787533
const KEY_braille_dots_13478 = 16787661
const KEY_braille_dots_1348 = 16787597
const KEY_braille_dots_135 = 16787477
const KEY_braille_dots_1356 = 16787509
const KEY_braille_dots_13567 = 16787573
const KEY_braille_dots_135678 = 16787701
const KEY_braille_dots_13568 = 16787637
const KEY_braille_dots_1357 = 16787541
const KEY_braille_dots_13578 = 16787669
const KEY_braille_dots_1358 = 16787605
const KEY_braille_dots_136 = 16787493
const KEY_braille_dots_1367 = 16787557
const KEY_braille_dots_13678 = 16787685
const KEY_braille_dots_1368 = 16787621
const KEY_braille_dots_137 = 16787525
const KEY_braille_dots_1378 = 16787653
const KEY_braille_dots_138 = 16787589
const KEY_braille_dots_14 = 16787465
const KEY_braille_dots_145 = 16787481
const KEY_braille_dots_1456 = 16787513
const KEY_braille_dots_14567 = 16787577
const KEY_braille_dots_145678 = 16787705
const KEY_braille_dots_14568 = 16787641
const KEY_braille_dots_1457 = 16787545
const KEY_braille_dots_14578 = 16787673
const KEY_braille_dots_1458 = 16787609
const KEY_braille_dots_146 = 16787497
const KEY_braille_dots_1467 = 16787561
const KEY_braille_dots_14678 = 16787689
const KEY_braille_dots_1468 = 16787625
const KEY_braille_dots_147 = 16787529
const KEY_braille_dots_1478 = 16787657
const KEY_braille_dots_148 = 16787593
const KEY_braille_dots_15 = 16787473
const KEY_braille_dots_156 = 16787505
const KEY_braille_dots_1567 = 16787569
const KEY_braille_dots_15678 = 16787697
const KEY_braille_dots_1568 = 16787633
const KEY_braille_dots_157 = 16787537
const KEY_braille_dots_1578 = 16787665
const KEY_braille_dots_158 = 16787601
const KEY_braille_dots_16 = 16787489
const KEY_braille_dots_167 = 16787553
const KEY_braille_dots_1678 = 16787681
const KEY_braille_dots_168 = 16787617
const KEY_braille_dots_17 = 16787521
const KEY_braille_dots_178 = 16787649
const KEY_braille_dots_18 = 16787585
const KEY_braille_dots_2 = 16787458
const KEY_braille_dots_23 = 16787462
const KEY_braille_dots_234 = 16787470
const KEY_braille_dots_2345 = 16787486
const KEY_braille_dots_23456 = 16787518
const KEY_braille_dots_234567 = 16787582
const KEY_braille_dots_2345678 = 16787710
const KEY_braille_dots_234568 = 16787646
const KEY_braille_dots_23457 = 16787550
const KEY_braille_dots_234578 = 16787678
const KEY_braille_dots_23458 = 16787614
const KEY_braille_dots_2346 = 16787502
const KEY_braille_dots_23467 = 16787566
const KEY_braille_dots_234678 = 16787694
const KEY_braille_dots_23468 = 16787630
const KEY_braille_dots_2347 = 16787534
const KEY_braille_dots_23478 = 16787662
const KEY_braille_dots_2348 = 16787598
const KEY_braille_dots_235 = 16787478
const KEY_braille_dots_2356 = 16787510
const KEY_braille_dots_23567 = 16787574
const KEY_braille_dots_235678 = 16787702
const KEY_braille_dots_23568 = 16787638
const KEY_braille_dots_2357 = 16787542
const KEY_braille_dots_23578 = 16787670
const KEY_braille_dots_2358 = 16787606
const KEY_braille_dots_236 = 16787494
const KEY_braille_dots_2367 = 16787558
const KEY_braille_dots_23678 = 16787686
const KEY_braille_dots_2368 = 16787622
const KEY_braille_dots_237 = 16787526
const KEY_braille_dots_2378 = 16787654
const KEY_braille_dots_238 = 16787590
const KEY_braille_dots_24 = 16787466
const KEY_braille_dots_245 = 16787482
const KEY_braille_dots_2456 = 16787514
const KEY_braille_dots_24567 = 16787578
const KEY_braille_dots_245678 = 16787706
const KEY_braille_dots_24568 = 16787642
const KEY_braille_dots_2457 = 16787546
const KEY_braille_dots_24578 = 16787674
const KEY_braille_dots_2458 = 16787610
const KEY_braille_dots_246 = 16787498
const KEY_braille_dots_2467 = 16787562
const KEY_braille_dots_24678 = 16787690
const KEY_braille_dots_2468 = 16787626
const KEY_braille_dots_247 = 16787530
const KEY_braille_dots_2478 = 16787658
const KEY_braille_dots_248 = 16787594
const KEY_braille_dots_25 = 16787474
const KEY_braille_dots_256 = 16787506
const KEY_braille_dots_2567 = 16787570
const KEY_braille_dots_25678 = 16787698
const KEY_braille_dots_2568 = 16787634
const KEY_braille_dots_257 = 16787538
const KEY_braille_dots_2578 = 16787666
const KEY_braille_dots_258 = 16787602
const KEY_braille_dots_26 = 16787490
const KEY_braille_dots_267 = 16787554
const KEY_braille_dots_2678 = 16787682
const KEY_braille_dots_268 = 16787618
const KEY_braille_dots_27 = 16787522
const KEY_braille_dots_278 = 16787650
const KEY_braille_dots_28 = 16787586
const KEY_braille_dots_3 = 16787460
const KEY_braille_dots_34 = 16787468
const KEY_braille_dots_345 = 16787484
const KEY_braille_dots_3456 = 16787516
const KEY_braille_dots_34567 = 16787580
const KEY_braille_dots_345678 = 16787708
const KEY_braille_dots_34568 = 16787644
const KEY_braille_dots_3457 = 16787548
const KEY_braille_dots_34578 = 16787676
const KEY_braille_dots_3458 = 16787612
const KEY_braille_dots_346 = 16787500
const KEY_braille_dots_3467 = 16787564
const KEY_braille_dots_34678 = 16787692
const KEY_braille_dots_3468 = 16787628
const KEY_braille_dots_347 = 16787532
const KEY_braille_dots_3478 = 16787660
const KEY_braille_dots_348 = 16787596
const KEY_braille_dots_35 = 16787476
const KEY_braille_dots_356 = 16787508
const KEY_braille_dots_3567 = 16787572
const KEY_braille_dots_35678 = 16787700
const KEY_braille_dots_3568 = 16787636
const KEY_braille_dots_357 = 16787540
const KEY_braille_dots_3578 = 16787668
const KEY_braille_dots_358 = 16787604
const KEY_braille_dots_36 = 16787492
const KEY_braille_dots_367 = 16787556
const KEY_braille_dots_3678 = 16787684
const KEY_braille_dots_368 = 16787620
const KEY_braille_dots_37 = 16787524
const KEY_braille_dots_378 = 16787652
const KEY_braille_dots_38 = 16787588
const KEY_braille_dots_4 = 16787464
const KEY_braille_dots_45 = 16787480
const KEY_braille_dots_456 = 16787512
const KEY_braille_dots_4567 = 16787576
const KEY_braille_dots_45678 = 16787704
const KEY_braille_dots_4568 = 16787640
const KEY_braille_dots_457 = 16787544
const KEY_braille_dots_4578 = 16787672
const KEY_braille_dots_458 = 16787608
const KEY_braille_dots_46 = 16787496
const KEY_braille_dots_467 = 16787560
const KEY_braille_dots_4678 = 16787688
const KEY_braille_dots_468 = 16787624
const KEY_braille_dots_47 = 16787528
const KEY_braille_dots_478 = 16787656
const KEY_braille_dots_48 = 16787592
const KEY_braille_dots_5 = 16787472
const KEY_braille_dots_56 = 16787504
const KEY_braille_dots_567 = 16787568
const KEY_braille_dots_5678 = 16787696
const KEY_braille_dots_568 = 16787632
const KEY_braille_dots_57 = 16787536
const KEY_braille_dots_578 = 16787664
const KEY_braille_dots_58 = 16787600
const KEY_braille_dots_6 = 16787488
const KEY_braille_dots_67 = 16787552
const KEY_braille_dots_678 = 16787680
const KEY_braille_dots_68 = 16787616
const KEY_braille_dots_7 = 16787520
const KEY_braille_dots_78 = 16787648
const KEY_braille_dots_8 = 16787584
const KEY_breve = 418
const KEY_brokenbar = 166
const KEY_c = 99
const KEY_c_h = 65187
const KEY_cabovedot = 741
const KEY_cacute = 486
const KEY_careof = 2744
const KEY_caret = 2812
const KEY_caron = 439
const KEY_ccaron = 488
const KEY_ccedilla = 231
const KEY_ccircumflex = 742
const KEY_cedilla = 184
const KEY_cent = 162
const KEY_ch = 65184
const KEY_checkerboard = 2529
const KEY_checkmark = 2803
const KEY_circle = 3023
const KEY_club = 2796
const KEY_colon = 58
const KEY_comma = 44
const KEY_containsas = 16785931
const KEY_copyright = 169
const KEY_cr = 2532
const KEY_crossinglines = 2542
const KEY_cuberoot = 16785947
const KEY_currency = 164
const KEY_cursor = 2815
const KEY_d = 100
const KEY_dabovedot = 16784907
const KEY_dagger = 2801
const KEY_dcaron = 495
const KEY_dead_A = 65153
const KEY_dead_E = 65155
const KEY_dead_I = 65157
const KEY_dead_O = 65159
const KEY_dead_U = 65161
const KEY_dead_a = 65152
const KEY_dead_abovecomma = 65124
const KEY_dead_abovedot = 65110
const KEY_dead_abovereversedcomma = 65125
const KEY_dead_abovering = 65112
const KEY_dead_aboveverticalline = 65169
const KEY_dead_acute = 65105
const KEY_dead_belowbreve = 65131
const KEY_dead_belowcircumflex = 65129
const KEY_dead_belowcomma = 65134
const KEY_dead_belowdiaeresis = 65132
const KEY_dead_belowdot = 65120
const KEY_dead_belowmacron = 65128
const KEY_dead_belowring = 65127
const KEY_dead_belowtilde = 65130
const KEY_dead_belowverticalline = 65170
const KEY_dead_breve = 65109
const KEY_dead_capital_schwa = 65163
const KEY_dead_caron = 65114
const KEY_dead_cedilla = 65115
const KEY_dead_circumflex = 65106
const KEY_dead_currency = 65135
const KEY_dead_dasia = 65125
const KEY_dead_diaeresis = 65111
const KEY_dead_doubleacute = 65113
const KEY_dead_doublegrave = 65126
const KEY_dead_e = 65154
const KEY_dead_grave = 65104
const KEY_dead_greek = 65164
const KEY_dead_hook = 65121
const KEY_dead_horn = 65122
const KEY_dead_i = 65156
const KEY_dead_invertedbreve = 65133
const KEY_dead_iota = 65117
const KEY_dead_longsolidusoverlay = 65171
const KEY_dead_lowline = 65168
const KEY_dead_macron = 65108
const KEY_dead_o = 65158
const KEY_dead_ogonek = 65116
const KEY_dead_perispomeni = 65107
const KEY_dead_psili = 65124
const KEY_dead_semivoiced_sound = 65119
const KEY_dead_small_schwa = 65162
const KEY_dead_stroke = 65123
const KEY_dead_tilde = 65107
const KEY_dead_u = 65160
const KEY_dead_voiced_sound = 65118
const KEY_decimalpoint = 2749
const KEY_degree = 176
const KEY_diaeresis = 168
const KEY_diamond = 2797
const KEY_digitspace = 2725
const KEY_dintegral = 16785964
const KEY_division = 247
const KEY_dollar = 36
const KEY_doubbaselinedot = 2735
const KEY_doubleacute = 445
const KEY_doubledagger = 2802
const KEY_doublelowquotemark = 2814
const KEY_downarrow = 2302
const KEY_downcaret = 2984
const KEY_downshoe = 3030
const KEY_downstile = 3012
const KEY_downtack = 3010
const KEY_dstroke = 496
const KEY_e = 101
const KEY_eabovedot = 1004
const KEY_eacute = 233
const KEY_ebelowdot = 16785081
const KEY_ecaron = 492
const KEY_ecircumflex = 234
const KEY_ecircumflexacute = 16785087
const KEY_ecircumflexbelowdot = 16785095
const KEY_ecircumflexgrave = 16785089
const KEY_ecircumflexhook = 16785091
const KEY_ecircumflextilde = 16785093
const KEY_ediaeresis = 235
const KEY_egrave = 232
const KEY_ehook = 16785083
const KEY_eightsubscript = 16785544
const KEY_eightsuperior = 16785528
const KEY_elementof = 16785928
const KEY_ellipsis = 2734
const KEY_em3space = 2723
const KEY_em4space = 2724
const KEY_emacron = 954
const KEY_emdash = 2729
const KEY_emfilledcircle = 2782
const KEY_emfilledrect = 2783
const KEY_emopencircle = 2766
const KEY_emopenrectangle = 2767
const KEY_emptyset = 16785925
const KEY_emspace = 2721
const KEY_endash = 2730
const KEY_enfilledcircbullet = 2790
const KEY_enfilledsqbullet = 2791
const KEY_eng = 959
const KEY_enopencircbullet = 2784
const KEY_enopensquarebullet = 2785
const KEY_enspace = 2722
const KEY_eogonek = 490
const KEY_equal = 61
const KEY_eth = 240
const KEY_etilde = 16785085
const KEY_exclam = 33
const KEY_exclamdown = 161
const KEY_ezh = 16777874
const KEY_f = 102
const KEY_fabovedot = 16784927
const KEY_femalesymbol = 2808
const KEY_ff = 2531
const KEY_figdash = 2747
const KEY_filledlefttribullet = 2780
const KEY_filledrectbullet = 2779
const KEY_filledrighttribullet = 2781
const KEY_filledtribulletdown = 2793
const KEY_filledtribulletup = 2792
const KEY_fiveeighths = 2757
const KEY_fivesixths = 2743
const KEY_fivesubscript = 16785541
const KEY_fivesuperior = 16785525
const KEY_fourfifths = 2741
const KEY_foursubscript = 16785540
const KEY_foursuperior = 16785524
const KEY_fourthroot = 16785948
const KEY_function = 2294
const KEY_g = 103
const KEY_gabovedot = 757
const KEY_gbreve = 699
const KEY_gcaron = 16777703
const KEY_gcedilla = 955
const KEY_gcircumflex = 760
const KEY_grave = 96
const KEY_greater = 62
const KEY_greaterthanequal = 2238
const KEY_guillemotleft = 171
const KEY_guillemotright = 187
const KEY_h = 104
const KEY_hairspace = 2728
const KEY_hcircumflex = 694
const KEY_heart = 2798
const KEY_hebrew_aleph = 3296
const KEY_hebrew_ayin = 3314
const KEY_hebrew_bet = 3297
const KEY_hebrew_beth = 3297
const KEY_hebrew_chet = 3303
const KEY_hebrew_dalet = 3299
const KEY_hebrew_daleth = 3299
const KEY_hebrew_doublelowline = 3295
const KEY_hebrew_finalkaph = 3306
const KEY_hebrew_finalmem = 3309
const KEY_hebrew_finalnun = 3311
const KEY_hebrew_finalpe = 3315
const KEY_hebrew_finalzade = 3317
const KEY_hebrew_finalzadi = 3317
const KEY_hebrew_gimel = 3298
const KEY_hebrew_gimmel = 3298
const KEY_hebrew_he = 3300
const KEY_hebrew_het = 3303
const KEY_hebrew_kaph = 3307
const KEY_hebrew_kuf = 3319
const KEY_hebrew_lamed = 3308
const KEY_hebrew_mem = 3310
const KEY_hebrew_nun = 3312
const KEY_hebrew_pe = 3316
const KEY_hebrew_qoph = 3319
const KEY_hebrew_resh = 3320
const KEY_hebrew_samech = 3313
const KEY_hebrew_samekh = 3313
const KEY_hebrew_shin = 3321
const KEY_hebrew_taf = 3322
const KEY_hebrew_taw = 3322
const KEY_hebrew_tet = 3304
const KEY_hebrew_teth = 3304
const KEY_hebrew_waw = 3301
const KEY_hebrew_yod = 3305
const KEY_hebrew_zade = 3318
const KEY_hebrew_zadi = 3318
const KEY_hebrew_zain = 3302
const KEY_hebrew_zayin = 3302
const KEY_hexagram = 2778
const KEY_horizconnector = 2211
const KEY_horizlinescan1 = 2543
const KEY_horizlinescan3 = 2544
const KEY_horizlinescan5 = 2545
const KEY_horizlinescan7 = 2546
const KEY_horizlinescan9 = 2547
const KEY_hstroke = 689
const KEY_ht = 2530
const KEY_hyphen = 173
const KEY_i = 105
const KEY_iTouch = 269025120
const KEY_iacute = 237
const KEY_ibelowdot = 16785099
const KEY_ibreve = 16777517
const KEY_icircumflex = 238
const KEY_identical = 2255
const KEY_idiaeresis = 239
const KEY_idotless = 697
const KEY_ifonlyif = 2253
const KEY_igrave = 236
const KEY_ihook = 16785097
const KEY_imacron = 1007
const KEY_implies = 2254
const KEY_includedin = 2266
const KEY_includes = 2267
const KEY_infinity = 2242
const KEY_integral = 2239
const KEY_intersection = 2268
const KEY_iogonek = 999
const KEY_itilde = 949
const KEY_j = 106
const KEY_jcircumflex = 700
const KEY_jot = 3018
const KEY_k = 107
const KEY_kana_A = 1201
const KEY_kana_CHI = 1217
const KEY_kana_E = 1204
const KEY_kana_FU = 1228
const KEY_kana_HA = 1226
const KEY_kana_HE = 1229
const KEY_kana_HI = 1227
const KEY_kana_HO = 1230
const KEY_kana_HU = 1228
const KEY_kana_I = 1202
const KEY_kana_KA = 1206
const KEY_kana_KE = 1209
const KEY_kana_KI = 1207
const KEY_kana_KO = 1210
const KEY_kana_KU = 1208
const KEY_kana_MA = 1231
const KEY_kana_ME = 1234
const KEY_kana_MI = 1232
const KEY_kana_MO = 1235
const KEY_kana_MU = 1233
const KEY_kana_N = 1245
const KEY_kana_NA = 1221
const KEY_kana_NE = 1224
const KEY_kana_NI = 1222
const KEY_kana_NO = 1225
const KEY_kana_NU = 1223
const KEY_kana_O = 1205
const KEY_kana_RA = 1239
const KEY_kana_RE = 1242
const KEY_kana_RI = 1240
const KEY_kana_RO = 1243
const KEY_kana_RU = 1241
const KEY_kana_SA = 1211
const KEY_kana_SE = 1214
const KEY_kana_SHI = 1212
const KEY_kana_SO = 1215
const KEY_kana_SU = 1213
const KEY_kana_TA = 1216
const KEY_kana_TE = 1219
const KEY_kana_TI = 1217
const KEY_kana_TO = 1220
const KEY_kana_TSU = 1218
const KEY_kana_TU = 1218
const KEY_kana_U = 1203
const KEY_kana_WA = 1244
const KEY_kana_WO = 1190
const KEY_kana_YA = 1236
const KEY_kana_YO = 1238
const KEY_kana_YU = 1237
const KEY_kana_a = 1191
const KEY_kana_closingbracket = 1187
const KEY_kana_comma = 1188
const KEY_kana_conjunctive = 1189
const KEY_kana_e = 1194
const KEY_kana_fullstop = 1185
const KEY_kana_i = 1192
const KEY_kana_middledot = 1189
const KEY_kana_o = 1195
const KEY_kana_openingbracket = 1186
const KEY_kana_switch = 65406
const KEY_kana_tsu = 1199
const KEY_kana_tu = 1199
const KEY_kana_u = 1193
const KEY_kana_ya = 1196
const KEY_kana_yo = 1198
const KEY_kana_yu = 1197
const KEY_kappa = 930
const KEY_kcedilla = 1011
const KEY_kra = 930
const KEY_l = 108
const KEY_lacute = 485
const KEY_latincross = 2777
const KEY_lbelowdot = 16784951
const KEY_lcaron = 437
const KEY_lcedilla = 950
const KEY_leftanglebracket = 2748
const KEY_leftarrow = 2299
const KEY_leftcaret = 2979
const KEY_leftdoublequotemark = 2770
const KEY_leftmiddlecurlybrace = 2223
const KEY_leftopentriangle = 2764
const KEY_leftpointer = 2794
const KEY_leftradical = 2209
const KEY_leftshoe = 3034
const KEY_leftsinglequotemark = 2768
const KEY_leftt = 2548
const KEY_lefttack = 3036
const KEY_less = 60
const KEY_lessthanequal = 2236
const KEY_lf = 2533
const KEY_logicaland = 2270
const KEY_logicalor = 2271
const KEY_lowleftcorner = 2541
const KEY_lowrightcorner = 2538
const KEY_lstroke = 435
const KEY_m = 109
const KEY_mabovedot = 16784961
const KEY_macron = 175
const KEY_malesymbol = 2807
const KEY_maltesecross = 2800
const KEY_marker = 2751
const KEY_masculine = 186
const KEY_minus = 45
const KEY_minutes = 2774
const KEY_mu = 181
const KEY_multiply = 215
const KEY_musicalflat = 2806
const KEY_musicalsharp = 2805
const KEY_n = 110
const KEY_nabla = 2245
const KEY_nacute = 497
const KEY_ncaron = 498
const KEY_ncedilla = 1009
const KEY_ninesubscript = 16785545
const KEY_ninesuperior = 16785529
const KEY_nl = 2536
const KEY_nobreakspace = 160
const KEY_notapproxeq = 16785991
const KEY_notelementof = 16785929
const KEY_notequal = 2237
const KEY_notidentical = 16786018
const KEY_notsign = 172
const KEY_ntilde = 241
const KEY_numbersign = 35
const KEY_numerosign = 1712
const KEY_o = 111
const KEY_oacute = 243
const KEY_obarred = 16777845
const KEY_obelowdot = 16785101
const KEY_ocaron = 16777682
const KEY_ocircumflex = 244
const KEY_ocircumflexacute = 16785105
const KEY_ocircumflexbelowdot = 16785113
const KEY_ocircumflexgrave = 16785107
const KEY_ocircumflexhook = 16785109
const KEY_ocircumflextilde = 16785111
const KEY_odiaeresis = 246
const KEY_odoubleacute = 501
const KEY_oe = 5053
const KEY_ogonek = 434
const KEY_ograve = 242
const KEY_ohook = 16785103
const KEY_ohorn = 16777633
const KEY_ohornacute = 16785115
const KEY_ohornbelowdot = 16785123
const KEY_ohorngrave = 16785117
const KEY_ohornhook = 16785119
const KEY_ohorntilde = 16785121
const KEY_omacron = 1010
const KEY_oneeighth = 2755
const KEY_onefifth = 2738
const KEY_onehalf = 189
const KEY_onequarter = 188
const KEY_onesixth = 2742
const KEY_onesubscript = 16785537
const KEY_onesuperior = 185
const KEY_onethird = 2736
const KEY_ooblique = 248
const KEY_openrectbullet = 2786
const KEY_openstar = 2789
const KEY_opentribulletdown = 2788
const KEY_opentribulletup = 2787
const KEY_ordfeminine = 170
const KEY_oslash = 248
const KEY_otilde = 245
const KEY_overbar = 3008
const KEY_overline = 1150
const KEY_p = 112
const KEY_pabovedot = 16784983
const KEY_paragraph = 182
const KEY_parenleft = 40
const KEY_parenright = 41
const KEY_partdifferential = 16785922
const KEY_partialderivative = 2287
const KEY_percent = 37
const KEY_period = 46
const KEY_periodcentered = 183
const KEY_permille = 2773
const KEY_phonographcopyright = 2811
const KEY_plus = 43
const KEY_plusminus = 177
const KEY_prescription = 2772
const KEY_prolongedsound = 1200
const KEY_punctspace = 2726
const KEY_q = 113
const KEY_quad = 3020
const KEY_question = 63
const KEY_questiondown = 191
const KEY_quotedbl = 34
const KEY_quoteleft = 96
const KEY_quoteright = 39
const KEY_r = 114
const KEY_racute = 480
const KEY_radical = 2262
const KEY_rcaron = 504
const KEY_rcedilla = 947
const KEY_registered = 174
const KEY_rightanglebracket = 2750
const KEY_rightarrow = 2301
const KEY_rightcaret = 2982
const KEY_rightdoublequotemark = 2771
const KEY_rightmiddlecurlybrace = 2224
const KEY_rightmiddlesummation = 2231
const KEY_rightopentriangle = 2765
const KEY_rightpointer = 2795
const KEY_rightshoe = 3032
const KEY_rightsinglequotemark = 2769
const KEY_rightt = 2549
const KEY_righttack = 3068
const KEY_s = 115
const KEY_sabovedot = 16784993
const KEY_sacute = 438
const KEY_scaron = 441
const KEY_scedilla = 442
const KEY_schwa = 16777817
const KEY_scircumflex = 766
const KEY_script_switch = 65406
const KEY_seconds = 2775
const KEY_section = 167
const KEY_semicolon = 59
const KEY_semivoicedsound = 1247
const KEY_seveneighths = 2758
const KEY_sevensubscript = 16785543
const KEY_sevensuperior = 16785527
const KEY_signaturemark = 2762
const KEY_signifblank = 2732
const KEY_similarequal = 2249
const KEY_singlelowquotemark = 2813
const KEY_sixsubscript = 16785542
const KEY_sixsuperior = 16785526
const KEY_slash = 47
const KEY_soliddiamond = 2528
const KEY_space = 32
const KEY_squareroot = 16785946
const KEY_ssharp = 223
const KEY_sterling = 163
const KEY_stricteq = 16786019
const KEY_t = 116
const KEY_tabovedot = 16785003
const KEY_tcaron = 443
const KEY_tcedilla = 510
const KEY_telephone = 2809
const KEY_telephonerecorder = 2810
const KEY_therefore = 2240
const KEY_thinspace = 2727
const KEY_thorn = 254
const KEY_threeeighths = 2756
const KEY_threefifths = 2740
const KEY_threequarters = 190
const KEY_threesubscript = 16785539
const KEY_threesuperior = 179
const KEY_tintegral = 16785965
const KEY_topintegral = 2212
const KEY_topleftparens = 2219
const KEY_topleftradical = 2210
const KEY_topleftsqbracket = 2215
const KEY_topleftsummation = 2225
const KEY_toprightparens = 2221
const KEY_toprightsqbracket = 2217
const KEY_toprightsummation = 2229
const KEY_topt = 2551
const KEY_topvertsummationconnector = 2227
const KEY_trademark = 2761
const KEY_trademarkincircle = 2763
const KEY_tslash = 956
const KEY_twofifths = 2739
const KEY_twosubscript = 16785538
const KEY_twosuperior = 178
const KEY_twothirds = 2737
const KEY_u = 117
const KEY_uacute = 250
const KEY_ubelowdot = 16785125
const KEY_ubreve = 765
const KEY_ucircumflex = 251
const KEY_udiaeresis = 252
const KEY_udoubleacute = 507
const KEY_ugrave = 249
const KEY_uhook = 16785127
const KEY_uhorn = 16777648
const KEY_uhornacute = 16785129
const KEY_uhornbelowdot = 16785137
const KEY_uhorngrave = 16785131
const KEY_uhornhook = 16785133
const KEY_uhorntilde = 16785135
const KEY_umacron = 1022
const KEY_underbar = 3014
const KEY_underscore = 95
const KEY_union = 2269
const KEY_uogonek = 1017
const KEY_uparrow = 2300
const KEY_upcaret = 2985
const KEY_upleftcorner = 2540
const KEY_uprightcorner = 2539
const KEY_upshoe = 3011
const KEY_upstile = 3027
const KEY_uptack = 3022
const KEY_uring = 505
const KEY_utilde = 1021
const KEY_v = 118
const KEY_variation = 2241
const KEY_vertbar = 2552
const KEY_vertconnector = 2214
const KEY_voicedsound = 1246
const KEY_vt = 2537
const KEY_w = 119
const KEY_wacute = 16785027
const KEY_wcircumflex = 16777589
const KEY_wdiaeresis = 16785029
const KEY_wgrave = 16785025
const KEY_x = 120
const KEY_xabovedot = 16785035
const KEY_y = 121
const KEY_yacute = 253
const KEY_ybelowdot = 16785141
const KEY_ycircumflex = 16777591
const KEY_ydiaeresis = 255
const KEY_yen = 165
const KEY_ygrave = 16785139
const KEY_yhook = 16785143
const KEY_ytilde = 16785145
const KEY_z = 122
const KEY_zabovedot = 447
const KEY_zacute = 444
const KEY_zcaron = 446
const KEY_zerosubscript = 16785536
const KEY_zerosuperior = 16785520
const KEY_zstroke = 16777654
const MODIFIER_MASK = 469769999
MODIFIER_MASK: mask covering all entries in GdkModifierType.
const PRIORITY_REDRAW = 120
PRIORITY_REDRAW: this is the priority that the idle handler processing surface updates is given in the main loop.
Variables ¶
var ( GTypeAxisUse = coreglib.Type(C.gdk_axis_use_get_type()) GTypeCrossingMode = coreglib.Type(C.gdk_crossing_mode_get_type()) GTypeDevicePadFeature = coreglib.Type(C.gdk_device_pad_feature_get_type()) GTypeDeviceToolType = coreglib.Type(C.gdk_device_tool_type_get_type()) GTypeDragCancelReason = coreglib.Type(C.gdk_drag_cancel_reason_get_type()) GTypeEventType = coreglib.Type(C.gdk_event_type_get_type()) GTypeFullscreenMode = coreglib.Type(C.gdk_fullscreen_mode_get_type()) GTypeGLError = coreglib.Type(C.gdk_gl_error_get_type()) GTypeGravity = coreglib.Type(C.gdk_gravity_get_type()) GTypeInputSource = coreglib.Type(C.gdk_input_source_get_type()) GTypeKeyMatch = coreglib.Type(C.gdk_key_match_get_type()) GTypeMemoryFormat = coreglib.Type(C.gdk_memory_format_get_type()) GTypeNotifyType = coreglib.Type(C.gdk_notify_type_get_type()) GTypeScrollDirection = coreglib.Type(C.gdk_scroll_direction_get_type()) GTypeSubpixelLayout = coreglib.Type(C.gdk_subpixel_layout_get_type()) GTypeSurfaceEdge = coreglib.Type(C.gdk_surface_edge_get_type()) GTypeTouchpadGesturePhase = coreglib.Type(C.gdk_touchpad_gesture_phase_get_type()) GTypeVulkanError = coreglib.Type(C.gdk_vulkan_error_get_type()) GTypeAnchorHints = coreglib.Type(C.gdk_anchor_hints_get_type()) GTypeAxisFlags = coreglib.Type(C.gdk_axis_flags_get_type()) GTypeDragAction = coreglib.Type(C.gdk_drag_action_get_type()) GTypeFrameClockPhase = coreglib.Type(C.gdk_frame_clock_phase_get_type()) GTypeModifierType = coreglib.Type(C.gdk_modifier_type_get_type()) GTypePaintableFlags = coreglib.Type(C.gdk_paintable_flags_get_type()) GTypeSeatCapabilities = coreglib.Type(C.gdk_seat_capabilities_get_type()) GTypeToplevelState = coreglib.Type(C.gdk_toplevel_state_get_type()) GTypeDevicePad = coreglib.Type(C.gdk_device_pad_get_type()) GTypeDragSurface = coreglib.Type(C.gdk_drag_surface_get_type()) GTypePaintable = coreglib.Type(C.gdk_paintable_get_type()) GTypePopup = coreglib.Type(C.gdk_popup_get_type()) GTypeToplevel = coreglib.Type(C.gdk_toplevel_get_type()) GTypeAppLaunchContext = coreglib.Type(C.gdk_app_launch_context_get_type()) GTypeButtonEvent = coreglib.Type(C.gdk_button_event_get_type()) GTypeCairoContext = coreglib.Type(C.gdk_cairo_context_get_type()) GTypeClipboard = coreglib.Type(C.gdk_clipboard_get_type()) GTypeContentDeserializer = coreglib.Type(C.gdk_content_deserializer_get_type()) GTypeContentProvider = coreglib.Type(C.gdk_content_provider_get_type()) GTypeContentSerializer = coreglib.Type(C.gdk_content_serializer_get_type()) GTypeCrossingEvent = coreglib.Type(C.gdk_crossing_event_get_type()) GTypeCursor = coreglib.Type(C.gdk_cursor_get_type()) GTypeDNDEvent = coreglib.Type(C.gdk_dnd_event_get_type()) GTypeDeleteEvent = coreglib.Type(C.gdk_delete_event_get_type()) GTypeDevice = coreglib.Type(C.gdk_device_get_type()) GTypeDeviceTool = coreglib.Type(C.gdk_device_tool_get_type()) GTypeDisplay = coreglib.Type(C.gdk_display_get_type()) GTypeDisplayManager = coreglib.Type(C.gdk_display_manager_get_type()) GTypeDrag = coreglib.Type(C.gdk_drag_get_type()) GTypeDrawContext = coreglib.Type(C.gdk_draw_context_get_type()) GTypeDrop = coreglib.Type(C.gdk_drop_get_type()) GTypeEvent = coreglib.Type(C.gdk_event_get_type()) GTypeFocusEvent = coreglib.Type(C.gdk_focus_event_get_type()) GTypeFrameClock = coreglib.Type(C.gdk_frame_clock_get_type()) GTypeGLContext = coreglib.Type(C.gdk_gl_context_get_type()) GTypeGLTexture = coreglib.Type(C.gdk_gl_texture_get_type()) GTypeGrabBrokenEvent = coreglib.Type(C.gdk_grab_broken_event_get_type()) GTypeKeyEvent = coreglib.Type(C.gdk_key_event_get_type()) GTypeMemoryTexture = coreglib.Type(C.gdk_memory_texture_get_type()) GTypeMonitor = coreglib.Type(C.gdk_monitor_get_type()) GTypeMotionEvent = coreglib.Type(C.gdk_motion_event_get_type()) GTypePadEvent = coreglib.Type(C.gdk_pad_event_get_type()) GTypeProximityEvent = coreglib.Type(C.gdk_proximity_event_get_type()) GTypeScrollEvent = coreglib.Type(C.gdk_scroll_event_get_type()) GTypeSeat = coreglib.Type(C.gdk_seat_get_type()) GTypeSnapshot = coreglib.Type(C.gdk_snapshot_get_type()) GTypeSurface = coreglib.Type(C.gdk_surface_get_type()) GTypeTexture = coreglib.Type(C.gdk_texture_get_type()) GTypeTouchEvent = coreglib.Type(C.gdk_touch_event_get_type()) GTypeTouchpadEvent = coreglib.Type(C.gdk_touchpad_event_get_type()) GTypeVulkanContext = coreglib.Type(C.gdk_vulkan_context_get_type()) GTypeContentFormats = coreglib.Type(C.gdk_content_formats_get_type()) GTypeContentFormatsBuilder = coreglib.Type(C.gdk_content_formats_builder_get_type()) GTypeEventSequence = coreglib.Type(C.gdk_event_sequence_get_type()) GTypeFrameTimings = coreglib.Type(C.gdk_frame_timings_get_type()) GTypePopupLayout = coreglib.Type(C.gdk_popup_layout_get_type()) GTypeRGBA = coreglib.Type(C.gdk_rgba_get_type()) GTypeRectangle = coreglib.Type(C.gdk_rectangle_get_type()) GTypeToplevelLayout = coreglib.Type(C.gdk_toplevel_layout_get_type()) )
GType values.
Functions ¶
func CairoDrawFromGL ¶
func CairoDrawFromGL(cr *cairo.Context, surface Surfacer, source, sourceType, bufferScale, x, y, width, height int)
CairoDrawFromGL: main way to draw GL content in GTK.
It takes a render buffer ID (source_type == RENDERBUFFER) or a texture id (source_type == TEXTURE) and draws it onto cr with an OVER operation, respecting the current clip. The top left corner of the rectangle specified by x, y, width and height will be drawn at the current (0,0) position of the cairo_t.
This will work for *all* cairo_t, as long as surface is realized, but the fallback implementation that reads back the pixels from the buffer may be used in the general case. In the case of direct drawing to a surface with no special effects applied to cr it will however use a more efficient approach.
For RENDERBUFFER the code will always fall back to software for buffers with alpha components, so make sure you use TEXTURE if using alpha.
Calling this may change the current GL context.
The function takes the following parameters:
- cr: cairo context.
- surface we're rendering for (not necessarily into).
- source: GL ID of the source buffer.
- sourceType: type of the source.
- bufferScale: scale-factor that the source buffer is allocated for.
- x: source x position in source to start copying from in GL coordinates.
- y: source y position in source to start copying from in GL coordinates.
- width of the region to draw.
- height of the region to draw.
func CairoRectangle ¶
CairoRectangle adds the given rectangle to the current path of cr.
The function takes the following parameters:
- cr: cairo context.
- rectangle: Rectangle.
func CairoRegion ¶
CairoRegion adds the given region to the current path of cr.
The function takes the following parameters:
- cr: cairo context.
- region: #cairo_region_t.
func CairoRegionCreateFromSurface ¶
CairoRegionCreateFromSurface creates region that covers the area where the given surface is more than 50% opaque.
This function takes into account device offsets that might be set with cairo_surface_set_device_offset().
The function takes the following parameters:
- surface: cairo surface.
The function returns the following values:
- region: cairo_region_t; must be freed with cairo_region_destroy().
func CairoSetSourcePixbuf ¶
CairoSetSourcePixbuf sets the given pixbuf as the source pattern for cr.
The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.
The function takes the following parameters:
- cr: cairo context.
- pixbuf: Pixbuf.
- pixbufX: x coordinate of location to place upper left corner of pixbuf.
- pixbufY: y coordinate of location to place upper left corner of pixbuf.
func CairoSetSourceRGBA ¶
CairoSetSourceRGBA sets the specified RGBA as the source color of cr.
The function takes the following parameters:
- cr: cairo context.
- rgba: RGBA.
func ContentDeserializeAsync ¶
func ContentDeserializeAsync(ctx context.Context, stream gio.InputStreamer, mimeType string, typ coreglib.Type, ioPriority int, callback gio.AsyncReadyCallback)
ContentDeserializeAsync: read content from the given input stream and deserialize it, asynchronously.
The default I/O priority is G_PRIORITY_DEFAULT (i.e. 0), and lower numbers indicate a higher priority.
When the operation is finished, callback will be called. You must then call content_deserialize_finish to get the result of the operation.
The function takes the following parameters:
- ctx (optional): optional GCancellable object.
- stream: GInputStream to read the serialized content from.
- mimeType: mime type to deserialize from.
- typ: GType to deserialize from.
- ioPriority: i/O priority of the operation.
- callback (optional) to call when the operation is done.
func ContentDeserializeFinish ¶
ContentDeserializeFinish finishes a content deserialization operation.
The function takes the following parameters:
- result: GAsyncResult.
- value: return location for the result of the operation.
func ContentSerializeAsync ¶
func ContentSerializeAsync(ctx context.Context, stream gio.OutputStreamer, mimeType string, value *coreglib.Value, ioPriority int, callback gio.AsyncReadyCallback)
ContentSerializeAsync: serialize content and write it to the given output stream, asynchronously.
The default I/O priority is G_PRIORITY_DEFAULT (i.e. 0), and lower numbers indicate a higher priority.
When the operation is finished, callback will be called. You must then call content_serialize_finish to get the result of the operation.
The function takes the following parameters:
- ctx (optional): optional #GCancellable object.
- stream: GOutputStream to write the serialized content to.
- mimeType: mime type to serialize to.
- value: content to serialize.
- ioPriority: i/O priority of the operation.
- callback (optional) to call when the operation is done.
func ContentSerializeFinish ¶
func ContentSerializeFinish(result gio.AsyncResulter) error
ContentSerializeFinish finishes a content serialization operation.
The function takes the following parameters:
- result: GAsyncResult.
func DragActionIsUnique ¶
func DragActionIsUnique(action DragAction) bool
DragActionIsUnique checks if action represents a single action or includes multiple actions.
When action is 0 - ie no action was given, TRUE is returned.
The function takes the following parameters:
- action: GdkDragAction.
The function returns the following values:
- ok: TRUE if exactly one action was given.
func EventsGetAngle ¶
EventsGetAngle returns the relative angle from event1 to event2.
The relative angle is the angle between the X axis and the line through both events' positions. The rotation direction for positive angles is from the positive X axis towards the positive Y axis.
This assumes that both events have X/Y information. If not, this function returns FALSE.
The function takes the following parameters:
- event1: first GdkEvent.
- event2: second GdkEvent.
The function returns the following values:
- angle: return location for the relative angle between both events.
- ok: TRUE if the angle could be calculated.
func EventsGetCenter ¶
EventsGetCenter returns the point halfway between the events' positions.
This assumes that both events have X/Y information. If not, this function returns FALSE.
The function takes the following parameters:
- event1: first GdkEvent.
- event2: second GdkEvent.
The function returns the following values:
- x: return location for the X coordinate of the center.
- y: return location for the Y coordinate of the center.
- ok: TRUE if the center could be calculated.
func EventsGetDistance ¶
EventsGetDistance returns the distance between the event locations.
This assumes that both events have X/Y information. If not, this function returns FALSE.
The function takes the following parameters:
- event1: first GdkEvent.
- event2: second GdkEvent.
The function returns the following values:
- distance: return location for the distance.
- ok: TRUE if the distance could be calculated.
func GLContextClearCurrent ¶
func GLContextClearCurrent()
GLContextClearCurrent clears the current GdkGLContext.
Any OpenGL call after this function returns will be ignored until gdk.GLContext.MakeCurrent() is called.
func InternMIMEType ¶
InternMIMEType canonicalizes the given mime type and interns the result.
If string is not a valid mime type, NULL is returned instead. See RFC 2048 for the syntax if mime types.
The function takes the following parameters:
- str: string of a potential mime type.
The function returns the following values:
- utf8: interned string for the canonicalized mime type or NULL if the string wasn't a valid mime type.
func KeyvalConvertCase ¶
KeyvalConvertCase obtains the upper- and lower-case versions of the keyval symbol.
Examples of keyvals are K_KEY_a, K_KEY_Enter, K_KEY_F1, etc.
The function takes the following parameters:
- symbol: keyval.
The function returns the following values:
- lower: return location for lowercase version of symbol.
- upper: return location for uppercase version of symbol.
func KeyvalFromName ¶
KeyvalFromName converts a key name to a key value.
The names are the same as those in the gdk/gdkkeysyms.h header file but without the leading “GDK_KEY_”.
The function takes the following parameters:
- keyvalName: key name.
The function returns the following values:
- guint: corresponding key value, or GDK_KEY_VoidSymbol if the key name is not a valid key.
func KeyvalIsLower ¶
KeyvalIsLower returns TRUE if the given key value is in lower case.
The function takes the following parameters:
- keyval: key value.
The function returns the following values:
- ok: TRUE if keyval is in lower case, or if keyval is not subject to case conversion.
func KeyvalIsUpper ¶
KeyvalIsUpper returns TRUE if the given key value is in upper case.
The function takes the following parameters:
- keyval: key value.
The function returns the following values:
- ok: TRUE if keyval is in upper case, or if keyval is not subject to case conversion.
func KeyvalName ¶
KeyvalName converts a key value into a symbolic name.
The names are the same as those in the gdk/gdkkeysyms.h header file but without the leading “GDK_KEY_”.
The function takes the following parameters:
- keyval: key value.
The function returns the following values:
- utf8 (optional): string containing the name of the key, or NULL if keyval is not a valid key. The string should not be modified.
func KeyvalToLower ¶
KeyvalToLower converts a key value to lower case, if applicable.
The function takes the following parameters:
- keyval: key value.
The function returns the following values:
- guint: lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case conversion.
func KeyvalToUnicode ¶
KeyvalToUnicode: convert from a GDK key symbol to the corresponding Unicode character.
Note that the conversion does not take the current locale into consideration, which might be expected for particular keyvals, such as GDK_KEY_KP_Decimal.
The function takes the following parameters:
- keyval: GDK key symbol.
The function returns the following values:
- guint32: corresponding unicode character, or 0 if there is no corresponding character.
func KeyvalToUpper ¶
KeyvalToUpper converts a key value to upper case, if applicable.
The function takes the following parameters:
- keyval: key value.
The function returns the following values:
- guint: upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case conversion.
func PixbufGetFromSurface ¶
PixbufGetFromSurface transfers image data from a cairo_surface_t and converts it to a GdkPixbuf.
This allows you to efficiently read individual pixels from cairo surfaces.
This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the surface contains one.
The function takes the following parameters:
- surface to copy from.
- srcX: source X coordinate within surface.
- srcY: source Y coordinate within surface.
- width: width in pixels of region to get.
- height: height in pixels of region to get.
The function returns the following values:
- pixbuf (optional): newly-created pixbuf with a reference count of 1, or NULL on error.
func PixbufGetFromTexture ¶
func PixbufGetFromTexture(texture Texturer) *gdkpixbuf.Pixbuf
PixbufGetFromTexture creates a new pixbuf from texture.
This should generally not be used in newly written code as later stages will almost certainly convert the pixbuf back into a texture to draw it on screen.
The function takes the following parameters:
- texture: GdkTexture.
The function returns the following values:
- pixbuf (optional): new Pixbuf or NULL in case of an error.
func SetAllowedBackends ¶
func SetAllowedBackends(backends string)
SetAllowedBackends sets a list of backends that GDK should try to use.
This can be useful if your application does not work with certain GDK backends.
By default, GDK tries all included backends.
For example:
gdk_set_allowed_backends ("wayland,macos,*");
instructs GDK to try the Wayland backend first, followed by the MacOs backend, and then all others.
If the GDK_BACKEND environment variable is set, it determines what backends are tried in what order, while still respecting the set of allowed backends that are specified by this function.
The possible backend names are:
- broadway
- macos
- wayland.
- win32
- x11
You can also include a * in the list to try all remaining backends.
This call must happen prior to functions that open a display, such as gdk.Display().Open, gtk_init(), or gtk_init_check() in order to take effect.
The function takes the following parameters:
- backends: comma-separated list of backends.
func ToplevelSizeGetType ¶
The function returns the following values:
func UnicodeToKeyval ¶
UnicodeToKeyval: convert from a Unicode character to a key symbol.
The function takes the following parameters:
- wc: unicode character.
The function returns the following values:
- guint: corresponding GDK key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000.
func VulkanErrorQuark ¶
func VulkanErrorQuark() glib.Quark
The function returns the following values:
Types ¶
type AnchorHints ¶
AnchorHints: positioning hints for aligning a surface relative to a rectangle.
These hints determine how the surface should be positioned in the case that the surface would fall off-screen if placed in its ideal position.
For example, GDK_ANCHOR_FLIP_X will replace GDK_GRAVITY_NORTH_WEST with GDK_GRAVITY_NORTH_EAST and vice versa if the surface extends beyond the left or right edges of the monitor.
If GDK_ANCHOR_SLIDE_X is set, the surface can be shifted horizontally to fit on-screen. If GDK_ANCHOR_RESIZE_X is set, the surface can be shrunken horizontally to fit.
In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.
const ( // AnchorFlipX: allow flipping anchors horizontally. AnchorFlipX AnchorHints = 0b1 // AnchorFlipY: allow flipping anchors vertically. AnchorFlipY AnchorHints = 0b10 // AnchorSlideX: allow sliding surface horizontally. AnchorSlideX AnchorHints = 0b100 // AnchorSlideY: allow sliding surface vertically. AnchorSlideY AnchorHints = 0b1000 // AnchorResizeX: allow resizing surface horizontally. AnchorResizeX AnchorHints = 0b10000 // AnchorResizeY: allow resizing surface vertically. AnchorResizeY AnchorHints = 0b100000 // AnchorFlip: allow flipping anchors on both axes. AnchorFlip AnchorHints = 0b11 // AnchorSlide: allow sliding surface on both axes. AnchorSlide AnchorHints = 0b1100 // AnchorResize: allow resizing surface on both axes. AnchorResize AnchorHints = 0b110000 )
func (AnchorHints) Has ¶
func (a AnchorHints) Has(other AnchorHints) bool
Has returns true if a contains other.
func (AnchorHints) String ¶
func (a AnchorHints) String() string
String returns the names in string for AnchorHints.
type AppLaunchContext ¶
type AppLaunchContext struct { gio.AppLaunchContext // contains filtered or unexported fields }
AppLaunchContext: GdkAppLaunchContext handles launching an application in a graphical context.
It is an implementation of GAppLaunchContext that provides startup notification and allows to launch applications on a specific screen or workspace.
Launching an application
GdkAppLaunchContext *context; context = gdk_display_get_app_launch_context (display); gdk_app_launch_context_set_display (display); gdk_app_launch_context_set_timestamp (gdk_event_get_time (event)); if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error)) g_warning ("Launching failed: s\n", error->message); g_object_unref (context);.
func (*AppLaunchContext) Display ¶
func (context *AppLaunchContext) Display() *Display
Display gets the GdkDisplay that context is for.
The function returns the following values:
- display of context.
func (*AppLaunchContext) SetDesktop ¶
func (context *AppLaunchContext) SetDesktop(desktop int)
SetDesktop sets the workspace on which applications will be launched.
This only works when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec).
When the workspace is not specified or desktop is set to -1, it is up to the window manager to pick one, typically it will be the current workspace.
The function takes the following parameters:
- desktop: number of a workspace, or -1.
func (*AppLaunchContext) SetIcon ¶
func (context *AppLaunchContext) SetIcon(icon gio.Iconner)
SetIcon sets the icon for applications that are launched with this context.
Window Managers can use this information when displaying startup notification.
See also gdk.AppLaunchContext.SetIconName().
The function takes the following parameters:
- icon (optional) or NULL.
func (*AppLaunchContext) SetIconName ¶
func (context *AppLaunchContext) SetIconName(iconName string)
SetIconName sets the icon for applications that are launched with this context.
The icon_name will be interpreted in the same way as the Icon field in desktop files. See also gdk.AppLaunchContext.SetIcon()().
If both icon and icon_name are set, the icon_name takes priority. If neither icon or icon_name is set, the icon is taken from either the file that is passed to launched application or from the GAppInfo for the launched application itself.
The function takes the following parameters:
- iconName (optional): icon name, or NULL.
func (*AppLaunchContext) SetTimestamp ¶
func (context *AppLaunchContext) SetTimestamp(timestamp uint32)
SetTimestamp sets the timestamp of context.
The timestamp should ideally be taken from the event that triggered the launch.
Window managers can use this information to avoid moving the focus to the newly launched application when the user is busy typing in another window. This is also known as 'focus stealing prevention'.
The function takes the following parameters:
- timestamp: timestamp.
type AxisFlags ¶
AxisFlags flags describing the current capabilities of a device/tool.
const ( // AxisFlagX: x axis is present. AxisFlagX AxisFlags = 0b10 // AxisFlagY: y axis is present. AxisFlagY AxisFlags = 0b100 // AxisFlagDeltaX: scroll X delta axis is present. AxisFlagDeltaX AxisFlags = 0b1000 // AxisFlagDeltaY: scroll Y delta axis is present. AxisFlagDeltaY AxisFlags = 0b10000 // AxisFlagPressure: pressure axis is present. AxisFlagPressure AxisFlags = 0b100000 // AxisFlagXtilt: x tilt axis is present. AxisFlagXtilt AxisFlags = 0b1000000 // AxisFlagYtilt: y tilt axis is present. AxisFlagYtilt AxisFlags = 0b10000000 // AxisFlagWheel: wheel axis is present. AxisFlagWheel AxisFlags = 0b100000000 // AxisFlagDistance: distance axis is present. AxisFlagDistance AxisFlags = 0b1000000000 // AxisFlagRotation z-axis rotation is present. AxisFlagRotation AxisFlags = 0b10000000000 // AxisFlagSlider: slider axis is present. AxisFlagSlider AxisFlags = 0b100000000000 )
type AxisUse ¶
AxisUse defines how device axes are interpreted by GTK.
Note that the X and Y axes are not really needed; pointer devices report their location via the x/y members of events regardless. Whether X and Y are present as axes depends on the GDK backend.
const ( // AxisIgnore axis is ignored. AxisIgnore AxisUse = iota // AxisX axis is used as the x axis. AxisX // AxisY axis is used as the y axis. AxisY // AxisDeltaX axis is used as the scroll x delta. AxisDeltaX // AxisDeltaY axis is used as the scroll y delta. AxisDeltaY // AxisPressure axis is used for pressure information. AxisPressure // AxisXtilt axis is used for x tilt information. AxisXtilt // AxisYtilt axis is used for y tilt information. AxisYtilt // AxisWheel axis is used for wheel information. AxisWheel // AxisDistance axis is used for pen/tablet distance information. AxisDistance // AxisRotation axis is used for pen rotation information. AxisRotation // AxisSlider axis is used for pen slider information. AxisSlider // AxisLast: constant equal to the numerically highest axis value. AxisLast )
type ButtonEvent ¶
type ButtonEvent struct { Event // contains filtered or unexported fields }
ButtonEvent: event related to a button on a pointer device.
func (*ButtonEvent) Button ¶
func (event *ButtonEvent) Button() uint
Button: extract the button number from a button event.
The function returns the following values:
- guint: button of event.
type CairoContext ¶
type CairoContext struct { DrawContext // contains filtered or unexported fields }
CairoContext: GdkCairoContext is an object representing the platform-specific draw context.
GdkCairoContexts are created for a surface using gdk.Surface.CreateCairoContext(), and the context can then be used to draw on that surface.
func BaseCairoContext ¶
func BaseCairoContext(obj CairoContexter) *CairoContext
BaseCairoContext returns the underlying base object.
func (*CairoContext) CairoCreate ¶
func (self *CairoContext) CairoCreate() *cairo.Context
CairoCreate retrieves a Cairo context to be used to draw on the GdkSurface of context.
A call to gdk.DrawContext.BeginFrame() with this context must have been done or this function will return NULL.
The returned context is guaranteed to be valid until gdk.DrawContext.EndFrame() is called.
The function returns the following values:
- context (optional): cairo context to be used to draw the contents of the GdkSurface. NULL is returned when context is not drawing.
type CairoContexter ¶
CairoContexter describes types inherited from class CairoContext.
To get the original type, the caller must assert this to an interface or another type.
type Clipboard ¶
Clipboard: GdkClipboard object represents data shared between applications or inside an application.
To get a GdkClipboard object, use gdk.Display.GetClipboard() or gdk.Display.GetPrimaryClipboard(). You can find out about the data that is currently available in a clipboard using gdk.Clipboard.GetFormats().
To make text or image data available in a clipboard, use gdk.Clipboard.SetText() or gdk.Clipboard.SetTexture(). For other data, you can use gdk.Clipboard.SetContent(), which takes a gdk.ContentProvider object.
To read textual or image data from a clipboard, use gdk.Clipboard.ReadTextAsync() or gdk.Clipboard.ReadTextureAsync(). For other data, use gdk.Clipboard.ReadAsync(), which provides a GInputStream object.
func (*Clipboard) ConnectChanged ¶
func (clipboard *Clipboard) ConnectChanged(f func()) coreglib.SignalHandle
ConnectChanged is emitted when the clipboard changes ownership.
func (*Clipboard) Content ¶
func (clipboard *Clipboard) Content() *ContentProvider
Content returns the GdkContentProvider currently set on clipboard.
If the clipboard is empty or its contents are not owned by the current process, NULL will be returned.
The function returns the following values:
- contentProvider (optional): content of a clipboard or NULL if the clipboard does not maintain any content.
func (*Clipboard) Display ¶
Display gets the GdkDisplay that the clipboard was created for.
The function returns the following values:
- display: GdkDisplay.
func (*Clipboard) Formats ¶
func (clipboard *Clipboard) Formats() *ContentFormats
Formats gets the formats that the clipboard can provide its current contents in.
The function returns the following values:
- contentFormats formats of the clipboard.
func (*Clipboard) IsLocal ¶
IsLocal returns if the clipboard is local.
A clipboard is considered local if it was last claimed by the running application.
Note that gdk.Clipboard.GetContent() may return NULL even on a local clipboard. In this case the clipboard is empty.
The function returns the following values:
- ok: TRUE if the clipboard is local.
func (*Clipboard) ReadAsync ¶
func (clipboard *Clipboard) ReadAsync(ctx context.Context, mimeTypes []string, ioPriority int, callback gio.AsyncReadyCallback)
ReadAsync: asynchronously requests an input stream to read the clipboard's contents from.
When the operation is finished callback will be called. You must then call gdk.Clipboard.ReadFinish() to get the result of the operation.
The clipboard will choose the most suitable mime type from the given list to fulfill the request, preferring the ones listed first.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- mimeTypes: NULL-terminated array of mime types to choose from.
- ioPriority: i/O priority of the request.
- callback (optional) to call when the request is satisfied.
func (*Clipboard) ReadFinish ¶
ReadFinish finishes an asynchronous clipboard read.
See gdk.Clipboard.ReadAsync().
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- outMimeType (optional): pointer to store the chosen mime type in or NULL.
- inputStream (optional): GInputStream or NULL on error.
func (*Clipboard) ReadTextAsync ¶
ReadTextAsync: asynchronously request the clipboard contents converted to a string.
When the operation is finished callback will be called. You must then call gdk.Clipboard.ReadTextFinish() to get the result.
This is a simple wrapper around gdk.Clipboard.ReadValueAsync(). Use that function or gdk.Clipboard.ReadAsync() directly if you need more control over the operation.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- callback (optional) to call when the request is satisfied.
func (*Clipboard) ReadTextFinish ¶
ReadTextFinish finishes an asynchronous clipboard read.
See gdk.Clipboard.ReadTextAsync().
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- utf8 (optional): new string or NULL on error.
func (*Clipboard) ReadTextureAsync ¶
ReadTextureAsync: asynchronously request the clipboard contents converted to a GdkPixbuf.
When the operation is finished callback will be called. You must then call gdk.Clipboard.ReadTextureFinish() to get the result.
This is a simple wrapper around gdk.Clipboard.ReadValueAsync(). Use that function or gdk.Clipboard.ReadAsync directly if you need more control over the operation.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- callback (optional) to call when the request is satisfied.
func (*Clipboard) ReadTextureFinish ¶
ReadTextureFinish finishes an asynchronous clipboard read.
See gdk.Clipboard.ReadTextureAsync().
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- texture (optional): new GdkTexture or NULL on error.
func (*Clipboard) ReadValueAsync ¶
func (clipboard *Clipboard) ReadValueAsync(ctx context.Context, typ coreglib.Type, ioPriority int, callback gio.AsyncReadyCallback)
ReadValueAsync: asynchronously request the clipboard contents converted to the given type.
When the operation is finished callback will be called. You must then call gdk.Clipboard.ReadValueFinish() to get the resulting GValue.
For local clipboard contents that are available in the given GType, the value will be copied directly. Otherwise, GDK will try to use content_deserialize_async to convert the clipboard's data.
The function takes the following parameters:
- ctx (optional): optional #GCancellable object, NULL to ignore.
- typ: GType to read.
- ioPriority: i/O priority of the request.
- callback (optional) to call when the request is satisfied.
func (*Clipboard) ReadValueFinish ¶
ReadValueFinish finishes an asynchronous clipboard read.
See gdk.Clipboard.ReadValueAsync().
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- value: GValue containing the result.
func (*Clipboard) Set ¶
Set sets the clipboard to contain the given value.
The function takes the following parameters:
- value: GValue to set.
func (*Clipboard) SetContent ¶
func (clipboard *Clipboard) SetContent(provider *ContentProvider) bool
SetContent sets a new content provider on clipboard.
The clipboard will claim the GdkDisplay's resources and advertise these new contents to other applications.
In the rare case of a failure, this function will return FALSE. The clipboard will then continue reporting its old contents and ignore provider.
If the contents are read by either an external application or the clipboard's read functions, clipboard will select the best format to transfer the contents and then request that format from provider.
The function takes the following parameters:
- provider (optional): new contents of clipboard or NULL to clear the clipboard.
The function returns the following values:
- ok: TRUE if setting the clipboard succeeded.
func (*Clipboard) SetText ¶
SetText puts the given text into the clipboard.
The function takes the following parameters:
- text: text to put into the clipboard.
func (*Clipboard) SetTexture ¶
SetTexture puts the given texture into the clipboard.
The function takes the following parameters:
- texture: GdkTexture to put into the clipboard.
func (*Clipboard) StoreAsync ¶
func (clipboard *Clipboard) StoreAsync(ctx context.Context, ioPriority int, callback gio.AsyncReadyCallback)
StoreAsync: asynchronously instructs the clipboard to store its contents remotely.
If the clipboard is not local, this function does nothing but report success.
The callback must call gdk.Clipboard.StoreFinish().
The purpose of this call is to preserve clipboard contents beyond the lifetime of an application, so this function is typically called on exit. Depending on the platform, the functionality may not be available unless a "clipboard manager" is running.
This function is called automatically when a gtk.Application is shut down, so you likely don't need to call it.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- ioPriority: i/O priority of the request.
- callback (optional) to call when the request is satisfied.
func (*Clipboard) StoreFinish ¶
StoreFinish finishes an asynchronous clipboard store.
See gdk.Clipboard.StoreAsync().
The function takes the following parameters:
- result: GAsyncResult.
type ContentDeserializer ¶
type ContentDeserializer struct { *coreglib.Object gio.AsyncResult // contains filtered or unexported fields }
ContentDeserializer: GdkContentDeserializer is used to deserialize content received via inter-application data transfers.
The GdkContentDeserializer transforms serialized content that is identified by a mime type into an object identified by a GType.
GTK provides serializers and deserializers for common data types such as text, colors, images or file lists. To register your own deserialization functions, use content_register_deserializer.
Also see gdk.ContentSerializer.
func (*ContentDeserializer) Cancellable ¶
func (deserializer *ContentDeserializer) Cancellable() *gio.Cancellable
Cancellable gets the cancellable for the current operation.
This is the GCancellable that was passed to content_deserialize_async.
The function returns the following values:
- cancellable for the current operation.
func (*ContentDeserializer) GType ¶
func (deserializer *ContentDeserializer) GType() coreglib.Type
GType gets the GType to create an instance of.
The function returns the following values:
- gType: GType for the current operation.
func (*ContentDeserializer) InputStream ¶
func (deserializer *ContentDeserializer) InputStream() gio.InputStreamer
InputStream gets the input stream for the current operation.
This is the stream that was passed to content_deserialize_async.
The function returns the following values:
- inputStream: input stream for the current operation.
func (*ContentDeserializer) MIMEType ¶
func (deserializer *ContentDeserializer) MIMEType() string
MIMEType gets the mime type to deserialize from.
The function returns the following values:
- utf8: mime type for the current operation.
func (*ContentDeserializer) Priority ¶
func (deserializer *ContentDeserializer) Priority() int
Priority gets the I/O priority for the current operation.
This is the priority that was passed to [funccontent_deserialize_async].
The function returns the following values:
- gint: i/O priority for the current operation.
func (*ContentDeserializer) ReturnError ¶
func (deserializer *ContentDeserializer) ReturnError(err error)
ReturnError: indicate that the deserialization has ended with an error.
This function consumes error.
The function takes the following parameters:
- err: GError.
func (*ContentDeserializer) ReturnSuccess ¶
func (deserializer *ContentDeserializer) ReturnSuccess()
ReturnSuccess: indicate that the deserialization has been successfully completed.
func (*ContentDeserializer) TaskData ¶
func (deserializer *ContentDeserializer) TaskData() unsafe.Pointer
TaskData gets the data that was associated with the current operation.
See gdk.ContentDeserializer.SetTaskData().
The function returns the following values:
- gpointer (optional): task data for deserializer.
func (*ContentDeserializer) UserData ¶
func (deserializer *ContentDeserializer) UserData() unsafe.Pointer
UserData gets the user data that was passed when the deserializer was registered.
The function returns the following values:
- gpointer (optional): user data for this deserializer.
func (*ContentDeserializer) Value ¶
func (deserializer *ContentDeserializer) Value() *coreglib.Value
Value gets the GValue to store the deserialized object in.
The function returns the following values:
- value: GValue for the current operation.
type ContentFormats ¶
type ContentFormats struct {
// contains filtered or unexported fields
}
ContentFormats: GdkContentFormats structure is used to advertise and negotiate the format of content.
You will encounter GdkContentFormats when interacting with objects controlling operations that pass data between different widgets, window or application, like gdk.Drag, gdk.Drop, gdk.Clipboard or gdk.ContentProvider.
GDK supports content in 2 forms: GType and mime type. Using GTypes is meant only for in-process content transfers. Mime types are meant to be used for data passing both in-process and out-of-process. The details of how data is passed is described in the documentation of the actual implementations. To transform between the two forms, gdk.ContentSerializer and gdk.ContentDeserializer are used.
A GdkContentFormats describes a set of possible formats content can be exchanged in. It is assumed that this set is ordered. GTypes are more important than mime types. Order between different GTypes or mime types is the order they were added in, most important first. Functions that care about order, such as gdk.ContentFormats.Union(), will describe in their documentation how they interpret that order, though in general the order of the first argument is considered the primary order of the result, followed by the order of further arguments.
For debugging purposes, the function gdk.ContentFormats.ToString() exists. It will print a comma-separated list of formats from most important to least important.
GdkContentFormats is an immutable struct. After creation, you cannot change the types it represents. Instead, new GdkContentFormats have to be created. The gdk.ContentFormatsBuilder` structure is meant to help in this endeavor.
An instance of this type is always passed by reference.
func NewContentFormats ¶
func NewContentFormats(mimeTypes []string) *ContentFormats
NewContentFormats constructs a struct ContentFormats.
func NewContentFormatsForGType ¶
func NewContentFormatsForGType(typ coreglib.Type) *ContentFormats
NewContentFormatsForGType constructs a struct ContentFormats.
func (*ContentFormats) ContainGType ¶
func (formats *ContentFormats) ContainGType(typ coreglib.Type) bool
ContainGType checks if a given GType is part of the given formats.
The function takes the following parameters:
- typ: GType to search for.
The function returns the following values:
- ok: TRUE if the #GType was found.
func (*ContentFormats) ContainMIMEType ¶
func (formats *ContentFormats) ContainMIMEType(mimeType string) bool
ContainMIMEType checks if a given mime type is part of the given formats.
The function takes the following parameters:
- mimeType: mime type to search for.
The function returns the following values:
- ok: TRUE if the mime_type was found.
func (*ContentFormats) GTypes ¶
func (formats *ContentFormats) GTypes() []coreglib.Type
GTypes gets the GTypes included in formats.
Note that formats may not contain any #GTypes, in particular when they are empty. In that case NULL will be returned.
The function returns the following values:
- gTypes (optional): G_TYPE_INVALID-terminated array of types included in formats or NULL if none.
func (*ContentFormats) MIMETypes ¶
func (formats *ContentFormats) MIMETypes() []string
MIMETypes gets the mime types included in formats.
Note that formats may not contain any mime types, in particular when they are empty. In that case NULL will be returned.
The function returns the following values:
- utf8s (optional): NULL-terminated array of interned strings of mime types included in formats or NULL if none.
func (*ContentFormats) Match ¶
func (first *ContentFormats) Match(second *ContentFormats) bool
Match checks if first and second have any matching formats.
The function takes the following parameters:
- second: GdkContentFormats to intersect with.
The function returns the following values:
- ok: TRUE if a matching format was found.
func (*ContentFormats) MatchGType ¶
func (first *ContentFormats) MatchGType(second *ContentFormats) coreglib.Type
MatchGType finds the first GType from first that is also contained in second.
If no matching GType is found, G_TYPE_INVALID is returned.
The function takes the following parameters:
- second: GdkContentFormats to intersect with.
The function returns the following values:
- gType: first common GType or G_TYPE_INVALID if none.
func (*ContentFormats) MatchMIMEType ¶
func (first *ContentFormats) MatchMIMEType(second *ContentFormats) string
MatchMIMEType finds the first mime type from first that is also contained in second.
If no matching mime type is found, NULL is returned.
The function takes the following parameters:
- second: GdkContentFormats to intersect with.
The function returns the following values:
- utf8 (optional): first common mime type or NULL if none.
func (*ContentFormats) String ¶
func (formats *ContentFormats) String() string
String prints the given formats into a human-readable string.
This is a small wrapper around gdk.ContentFormats.Print() to help when debugging.
The function returns the following values:
- utf8: new string.
func (*ContentFormats) Union ¶
func (first *ContentFormats) Union(second *ContentFormats) *ContentFormats
Union: append all missing types from second to first, in the order they had in second.
The function takes the following parameters:
- second: GdkContentFormats to merge from.
The function returns the following values:
- contentFormats: new GdkContentFormats.
func (*ContentFormats) UnionDeserializeGTypes ¶
func (formats *ContentFormats) UnionDeserializeGTypes() *ContentFormats
UnionDeserializeGTypes: add GTypes for mime types in formats for which deserializers are registered.
The function returns the following values:
- contentFormats: new GdkContentFormats.
func (*ContentFormats) UnionDeserializeMIMETypes ¶
func (formats *ContentFormats) UnionDeserializeMIMETypes() *ContentFormats
UnionDeserializeMIMETypes: add mime types for GTypes in formats for which deserializers are registered.
The function returns the following values:
- contentFormats: new GdkContentFormats.
func (*ContentFormats) UnionSerializeGTypes ¶
func (formats *ContentFormats) UnionSerializeGTypes() *ContentFormats
UnionSerializeGTypes: add GTypes for the mime types in formats for which serializers are registered.
The function returns the following values:
- contentFormats: new GdkContentFormats.
func (*ContentFormats) UnionSerializeMIMETypes ¶
func (formats *ContentFormats) UnionSerializeMIMETypes() *ContentFormats
UnionSerializeMIMETypes: add mime types for GTypes in formats for which serializers are registered.
The function returns the following values:
- contentFormats: new GdkContentFormats.
type ContentFormatsBuilder ¶
type ContentFormatsBuilder struct {
// contains filtered or unexported fields
}
ContentFormatsBuilder: GdkContentFormatsBuilder is an auxiliary struct used to create new GdkContentFormats, and should not be kept around.
An instance of this type is always passed by reference.
func NewContentFormatsBuilder ¶
func NewContentFormatsBuilder() *ContentFormatsBuilder
NewContentFormatsBuilder constructs a struct ContentFormatsBuilder.
func (*ContentFormatsBuilder) AddFormats ¶
func (builder *ContentFormatsBuilder) AddFormats(formats *ContentFormats)
AddFormats appends all formats from formats to builder, skipping those that already exist.
The function takes the following parameters:
- formats to add.
func (*ContentFormatsBuilder) AddGType ¶
func (builder *ContentFormatsBuilder) AddGType(typ coreglib.Type)
AddGType appends type to builder if it has not already been added.
The function takes the following parameters:
- typ: GType.
func (*ContentFormatsBuilder) AddMIMEType ¶
func (builder *ContentFormatsBuilder) AddMIMEType(mimeType string)
AddMIMEType appends mime_type to builder if it has not already been added.
The function takes the following parameters:
- mimeType: mime type.
func (*ContentFormatsBuilder) ToFormats ¶
func (builder *ContentFormatsBuilder) ToFormats() *ContentFormats
ToFormats creates a new GdkContentFormats from the given builder.
The given GdkContentFormatsBuilder is reset once this function returns; you cannot call this function multiple times on the same builder instance.
This function is intended primarily for bindings. C code should use gdk.ContentFormatsBuilder.FreeToFormats().
The function returns the following values:
- contentFormats: newly created GdkContentFormats with all the formats added to builder.
type ContentProvider ¶
ContentProvider: GdkContentProvider is used to provide content for the clipboard or for drag-and-drop operations in a number of formats.
To create a GdkContentProvider, use gdk.ContentProvider.NewForValue or gdk.ContentProvider.NewForBytes.
GDK knows how to handle common text and image formats out-of-the-box. See gdk.ContentSerializer and gdk.ContentDeserializer if you want to add support for application-specific data formats.
func NewContentProviderForBytes ¶
func NewContentProviderForBytes(mimeType string, bytes *glib.Bytes) *ContentProvider
NewContentProviderForBytes: create a content provider that provides the given bytes as data for the given mime_type.
The function takes the following parameters:
- mimeType: mime type.
- bytes: GBytes with the data for mime_type.
The function returns the following values:
- contentProvider: new GdkContentProvider.
func NewContentProviderForValue ¶
func NewContentProviderForValue(value *coreglib.Value) *ContentProvider
NewContentProviderForValue: create a content provider that provides the given value.
The function takes the following parameters:
- value: GValue.
The function returns the following values:
- contentProvider: new GdkContentProvider.
func NewContentProviderUnion ¶
func NewContentProviderUnion(providers []*ContentProvider) *ContentProvider
NewContentProviderUnion creates a content provider that represents all the given providers.
Whenever data needs to be written, the union provider will try the given providers in the given order and the first one supporting a format will be chosen to provide it.
This allows an easy way to support providing data in different formats. For example, an image may be provided by its file and by the image contents with a call such as
gdk_content_provider_new_union ((GdkContentProvider *[2]) { gdk_content_provider_new_typed (G_TYPE_FILE, file), gdk_content_provider_new_typed (G_TYPE_TEXTURE, texture) }, 2);.
The function takes the following parameters:
- providers (optional): The ContentProviders to present the union of.
The function returns the following values:
- contentProvider: new GdkContentProvider.
func (*ContentProvider) ConnectContentChanged ¶
func (provider *ContentProvider) ConnectContentChanged(f func()) coreglib.SignalHandle
ConnectContentChanged is emitted whenever the content provided by this provider has changed.
func (*ContentProvider) ContentChanged ¶
func (provider *ContentProvider) ContentChanged()
ContentChanged emits the ::content-changed signal.
func (*ContentProvider) RefFormats ¶
func (provider *ContentProvider) RefFormats() *ContentFormats
RefFormats gets the formats that the provider can provide its current contents in.
The function returns the following values:
- contentFormats formats of the provider.
func (*ContentProvider) RefStorableFormats ¶
func (provider *ContentProvider) RefStorableFormats() *ContentFormats
RefStorableFormats gets the formats that the provider suggests other applications to store the data in.
An example of such an application would be a clipboard manager.
This can be assumed to be a subset of gdk.ContentProvider.RefFormats().
The function returns the following values:
- contentFormats: storable formats of the provider.
func (*ContentProvider) Value ¶
func (provider *ContentProvider) Value(value *coreglib.Value) error
Value gets the contents of provider stored in value.
The value will have been initialized to the GType the value should be provided in. This given GType does not need to be listed in the formats returned by gdk.ContentProvider.RefFormats(). However, if the given GType is not supported, this operation can fail and IO_ERROR_NOT_SUPPORTED will be reported.
The function takes the following parameters:
- value: GValue to fill.
func (*ContentProvider) WriteMIMETypeAsync ¶
func (provider *ContentProvider) WriteMIMETypeAsync(ctx context.Context, mimeType string, stream gio.OutputStreamer, ioPriority int, callback gio.AsyncReadyCallback)
WriteMIMETypeAsync: asynchronously writes the contents of provider to stream in the given mime_type.
When the operation is finished callback will be called. You must then call gdk.ContentProvider.WriteMIMETypeFinish() to get the result of the operation.
The given mime type does not need to be listed in the formats returned by gdk.ContentProvider.RefFormats(). However, if the given GType is not supported, IO_ERROR_NOT_SUPPORTED will be reported.
The given stream will not be closed.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- mimeType: mime type to provide the data in.
- stream: GOutputStream to write to.
- ioPriority: i/O priority of the request.
- callback (optional) to call when the request is satisfied.
func (*ContentProvider) WriteMIMETypeFinish ¶
func (provider *ContentProvider) WriteMIMETypeFinish(result gio.AsyncResulter) error
WriteMIMETypeFinish finishes an asynchronous write operation.
See gdk.ContentProvider.WriteMIMETypeAsync().
The function takes the following parameters:
- result: GAsyncResult.
type ContentProviderClass ¶ added in v0.0.5
type ContentProviderClass struct {
// contains filtered or unexported fields
}
ContentProviderClass class structure for ContentProvider.
An instance of this type is always passed by reference.
type ContentProviderOverrides ¶ added in v0.0.5
type ContentProviderOverrides struct { // The function takes the following parameters: // AttachClipboard func(clipboard *Clipboard) // ContentChanged emits the ::content-changed signal. ContentChanged func() // The function takes the following parameters: // DetachClipboard func(clipboard *Clipboard) // Value gets the contents of provider stored in value. // // The value will have been initialized to the GType the value should be // provided in. This given GType does not need to be listed in the formats // returned by gdk.ContentProvider.RefFormats(). However, if the given GType // is not supported, this operation can fail and IO_ERROR_NOT_SUPPORTED will // be reported. // // The function takes the following parameters: // // - value: GValue to fill. // Value func(value *coreglib.Value) error // RefFormats gets the formats that the provider can provide its current // contents in. // // The function returns the following values: // // - contentFormats formats of the provider. // RefFormats func() *ContentFormats // RefStorableFormats gets the formats that the provider suggests other // applications to store the data in. // // An example of such an application would be a clipboard manager. // // This can be assumed to be a subset of gdk.ContentProvider.RefFormats(). // // The function returns the following values: // // - contentFormats: storable formats of the provider. // RefStorableFormats func() *ContentFormats // WriteMIMETypeFinish finishes an asynchronous write operation. // // See gdk.ContentProvider.WriteMIMETypeAsync(). // // The function takes the following parameters: // // - result: GAsyncResult. // WriteMIMETypeFinish func(result gio.AsyncResulter) error }
ContentProviderOverrides contains methods that are overridable.
type ContentSerializer ¶
type ContentSerializer struct { *coreglib.Object gio.AsyncResult // contains filtered or unexported fields }
ContentSerializer: GdkContentSerializer is used to serialize content for inter-application data transfers.
The GdkContentSerializer transforms an object that is identified by a GType into a serialized form (i.e. a byte stream) that is identified by a mime type.
GTK provides serializers and deserializers for common data types such as text, colors, images or file lists. To register your own serialization functions, use content_register_serializer.
Also see gdk.ContentDeserializer.
func (*ContentSerializer) Cancellable ¶
func (serializer *ContentSerializer) Cancellable() *gio.Cancellable
Cancellable gets the cancellable for the current operation.
This is the GCancellable that was passed to [content_serialize_async].
The function returns the following values:
- cancellable for the current operation.
func (*ContentSerializer) GType ¶
func (serializer *ContentSerializer) GType() coreglib.Type
GType gets the GType to of the object to serialize.
The function returns the following values:
- gType: GType for the current operation.
func (*ContentSerializer) MIMEType ¶
func (serializer *ContentSerializer) MIMEType() string
MIMEType gets the mime type to serialize to.
The function returns the following values:
- utf8: mime type for the current operation.
func (*ContentSerializer) OutputStream ¶
func (serializer *ContentSerializer) OutputStream() gio.OutputStreamer
OutputStream gets the output stream for the current operation.
This is the stream that was passed to content_serialize_async.
The function returns the following values:
- outputStream: output stream for the current operation.
func (*ContentSerializer) Priority ¶
func (serializer *ContentSerializer) Priority() int
Priority gets the I/O priority for the current operation.
This is the priority that was passed to content_serialize_async.
The function returns the following values:
- gint: i/O priority for the current operation.
func (*ContentSerializer) ReturnError ¶
func (serializer *ContentSerializer) ReturnError(err error)
ReturnError: indicate that the serialization has ended with an error.
This function consumes error.
The function takes the following parameters:
- err: GError.
func (*ContentSerializer) ReturnSuccess ¶
func (serializer *ContentSerializer) ReturnSuccess()
ReturnSuccess: indicate that the serialization has been successfully completed.
func (*ContentSerializer) TaskData ¶
func (serializer *ContentSerializer) TaskData() unsafe.Pointer
TaskData gets the data that was associated with the current operation.
See gdk.ContentSerializer.SetTaskData().
The function returns the following values:
- gpointer (optional): task data for serializer.
func (*ContentSerializer) UserData ¶
func (serializer *ContentSerializer) UserData() unsafe.Pointer
UserData gets the user data that was passed when the serializer was registered.
The function returns the following values:
- gpointer (optional): user data for this serializer.
func (*ContentSerializer) Value ¶
func (serializer *ContentSerializer) Value() *coreglib.Value
Value gets the GValue to read the object to serialize from.
The function returns the following values:
- value: GValue for the current operation.
type CrossingEvent ¶
type CrossingEvent struct { Event // contains filtered or unexported fields }
CrossingEvent: event caused by a pointing device moving between surfaces.
func (*CrossingEvent) Detail ¶
func (event *CrossingEvent) Detail() NotifyType
Detail extracts the notify detail from a crossing event.
The function returns the following values:
- notifyType: notify detail of event.
func (*CrossingEvent) Focus ¶
func (event *CrossingEvent) Focus() bool
Focus checks if the event surface is the focus surface.
The function returns the following values:
- ok: TRUE if the surface is the focus surface.
func (*CrossingEvent) Mode ¶
func (event *CrossingEvent) Mode() CrossingMode
Mode extracts the crossing mode from a crossing event.
The function returns the following values:
- crossingMode: mode of event.
type CrossingMode ¶
CrossingMode specifies the crossing mode for enter and leave events.
const ( // CrossingNormal: crossing because of pointer motion. CrossingNormal CrossingMode = iota // CrossingGrab: crossing because a grab is activated. CrossingGrab // CrossingUngrab: crossing because a grab is deactivated. CrossingUngrab // CrossingGTKGrab: crossing because a GTK grab is activated. CrossingGTKGrab // CrossingGTKUngrab: crossing because a GTK grab is deactivated. CrossingGTKUngrab // CrossingStateChanged: crossing because a GTK widget changed state (e.g. // sensitivity). CrossingStateChanged // CrossingTouchBegin: crossing because a touch sequence has begun, this // event is synthetic as the pointer might have not left the surface. CrossingTouchBegin // CrossingTouchEnd: crossing because a touch sequence has ended, this event // is synthetic as the pointer might have not left the surface. CrossingTouchEnd // CrossingDeviceSwitch: crossing because of a device switch (i.e. // a mouse taking control of the pointer after a touch device), this event // is synthetic as the pointer didn’t leave the surface. CrossingDeviceSwitch )
func (CrossingMode) String ¶
func (c CrossingMode) String() string
String returns the name in string for CrossingMode.
type Cursor ¶
Cursor: GdkCursor is used to create and destroy cursors.
Cursors are immutable objects, so once you created them, there is no way to modify them later. You should create a new cursor when you want to change something about it.
Cursors by themselves are not very interesting: they must be bound to a window for users to see them. This is done with gdk.Surface.SetCursor() or gdk.Surface.SetDeviceCursor(). Applications will typically use higher-level GTK functions such as gtk.Widget.SetCursor()` instead.
Cursors are not bound to a given gdk.Display, so they can be shared. However, the appearance of cursors may vary when used on different platforms.
Named and texture cursors ¶
There are multiple ways to create cursors. The platform's own cursors can be created with gdk.Cursor.NewFromName. That function lists the commonly available names that are shared with the CSS specification. Other names may be available, depending on the platform in use. On some platforms, what images are used for named cursors may be influenced by the cursor theme.
Another option to create a cursor is to use gdk.Cursor.NewFromTexture and provide an image to use for the cursor.
To ease work with unsupported cursors, a fallback cursor can be provided. If a gdk.Surface cannot use a cursor because of the reasons mentioned above, it will try the fallback cursor. Fallback cursors can themselves have fallback cursors again, so it is possible to provide a chain of progressively easier to support cursors. If none of the provided cursors can be supported, the default cursor will be the ultimate fallback.
func NewCursorFromName ¶
NewCursorFromName creates a new cursor by looking up name in the current cursor theme.
A recommended set of cursor names that will work across different platforms can be found in the CSS specification:
| | | | | | --- | --- | ---- | --- | | "none" | ! (default_cursor.png) "default" | ! (help_cursor.png) "help" | ! (pointer_cursor.png) "pointer" | | ! (context_menu_cursor.png) "context-menu" | ! (progress_cursor.png) "progress" | ! (wait_cursor.png) "wait" | ! (cell_cursor.png) "cell" | | ! (crosshair_cursor.png) "crosshair" | ! (text_cursor.png) "text" | ! (vertical_text_cursor.png) "vertical-text" | ! (alias_cursor.png) "alias" | | ! (copy_cursor.png) "copy" | ! (no_drop_cursor.png) "no-drop" | ! (move_cursor.png) "move" | ! (not_allowed_cursor.png) "not-allowed" | | ! (grab_cursor.png) "grab" | ! (grabbing_cursor.png) "grabbing" | ! (all_scroll_cursor.png) "all-scroll" | ! (col_resize_cursor.png) "col-resize" | | ! (row_resize_cursor.png) "row-resize" | ! (n_resize_cursor.png) "n-resize" | ! (e_resize_cursor.png) "e-resize" | ! (s_resize_cursor.png) "s-resize" | | ! (w_resize_cursor.png) "w-resize" | ! (ne_resize_cursor.png) "ne-resize" | ! (nw_resize_cursor.png) "nw-resize" | ! (sw_resize_cursor.png) "sw-resize" | | ! (se_resize_cursor.png) "se-resize" | ! (ew_resize_cursor.png) "ew-resize" | ! (ns_resize_cursor.png) "ns-resize" | ! (nesw_resize_cursor.png) "nesw-resize" | | ! (nwse_resize_cursor.png) "nwse-resize" | ! (zoom_in_cursor.png) "zoom-in" | ! (zoom_out_cursor.png) "zoom-out" | |.
The function takes the following parameters:
- name of the cursor.
- fallback (optional): NULL or the GdkCursor to fall back to when this one cannot be supported.
The function returns the following values:
- cursor (optional): new GdkCursor, or NULL if there is no cursor with the given name.
func NewCursorFromTexture ¶
NewCursorFromTexture creates a new cursor from a GdkTexture.
The function takes the following parameters:
- texture providing the pixel data.
- hotspotX: horizontal offset of the “hotspot” of the cursor.
- hotspotY: vertical offset of the “hotspot” of the cursor.
- fallback (optional): NULL or the GdkCursor to fall back to when this one cannot be supported.
The function returns the following values:
- cursor: new GdkCursor.
func (*Cursor) Fallback ¶
Fallback returns the fallback for this cursor.
The fallback will be used if this cursor is not available on a given GdkDisplay. For named cursors, this can happen when using nonstandard names or when using an incomplete cursor theme. For textured cursors, this can happen when the texture is too large or when the GdkDisplay it is used on does not support textured cursors.
The function returns the following values:
- ret (optional): fallback of the cursor or NULL to use the default cursor as fallback.
func (*Cursor) HotspotX ¶
HotspotX returns the horizontal offset of the hotspot.
The hotspot indicates the pixel that will be directly above the cursor.
Note that named cursors may have a nonzero hotspot, but this function will only return the hotspot position for cursors created with gdk.Cursor.NewFromTexture.
The function returns the following values:
- gint: horizontal offset of the hotspot or 0 for named cursors.
func (*Cursor) HotspotY ¶
HotspotY returns the vertical offset of the hotspot.
The hotspot indicates the pixel that will be directly above the cursor.
Note that named cursors may have a nonzero hotspot, but this function will only return the hotspot position for cursors created with gdk.Cursor.NewFromTexture.
The function returns the following values:
- gint: vertical offset of the hotspot or 0 for named cursors.
type DNDEvent ¶
type DNDEvent struct { Event // contains filtered or unexported fields }
DNDEvent: event related to drag and drop operations.
type DeleteEvent ¶
type DeleteEvent struct { Event // contains filtered or unexported fields }
DeleteEvent: event related to closing a top-level surface.
type Device ¶
Device: GdkDevice object represents an input device, such as a keyboard, a mouse, or a touchpad.
See the gdk.Seat documentation for more information about the various kinds of devices, and their relationships.
func BaseDevice ¶
BaseDevice returns the underlying base object.
func (*Device) CapsLockState ¶
CapsLockState retrieves whether the Caps Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.
The function returns the following values:
- ok: TRUE if Caps Lock is on for device.
func (*Device) ConnectChanged ¶
func (device *Device) ConnectChanged(f func()) coreglib.SignalHandle
ConnectChanged is emitted either when the the number of either axes or keys changes.
On X11 this will normally happen when the physical device routing events through the logical device changes (for example, user switches from the USB mouse to a tablet); in that case the logical device will change to reflect the axes and keys on the new physical device.
func (*Device) ConnectToolChanged ¶
func (device *Device) ConnectToolChanged(f func(tool *DeviceTool)) coreglib.SignalHandle
ConnectToolChanged is emitted on pen/eraser devices whenever tools enter or leave proximity.
func (*Device) DeviceTool ¶
func (device *Device) DeviceTool() *DeviceTool
DeviceTool retrieves the current tool for device.
The function returns the following values:
- deviceTool: GdkDeviceTool, or NULL.
func (*Device) Direction ¶
Direction returns the direction of effective layout of the keyboard.
This is only relevant for keyboard devices.
The direction of a layout is the direction of the majority of its symbols. See pango.UnicharDirection().
The function returns the following values:
- direction: PANGO_DIRECTION_LTR or PANGO_DIRECTION_RTL if it can determine the direction. PANGO_DIRECTION_NEUTRAL otherwise.
func (*Device) Display ¶
Display returns the GdkDisplay to which device pertains.
The function returns the following values:
- display: GdkDisplay.
func (*Device) HasBidiLayouts ¶
HasBidiLayouts determines if layouts for both right-to-left and left-to-right languages are in use on the keyboard.
This is only relevant for keyboard devices.
The function returns the following values:
- ok: TRUE if there are layouts with both directions, FALSE otherwise.
func (*Device) HasCursor ¶
HasCursor determines whether the pointer follows device motion.
This is not meaningful for keyboard devices, which don't have a pointer.
The function returns the following values:
- ok: TRUE if the pointer follows device motion.
func (*Device) ModifierState ¶
func (device *Device) ModifierState() ModifierType
ModifierState retrieves the current modifier state of the keyboard.
This is only relevant for keyboard devices.
The function returns the following values:
- modifierType: current modifier state.
func (*Device) Name ¶
Name: name of the device, suitable for showing in a user interface.
The function returns the following values:
- utf8: name.
func (*Device) NumLockState ¶
NumLockState retrieves whether the Num Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.
The function returns the following values:
- ok: TRUE if Num Lock is on for device.
func (*Device) NumTouches ¶
NumTouches retrieves the number of touch points associated to device.
The function returns the following values:
- guint: number of touch points.
func (*Device) ProductID ¶
ProductID returns the product ID of this device.
This ID is retrieved from the device, and does not change. See gdk.Device.GetVendorID() for more information.
The function returns the following values:
- utf8 (optional): product ID, or NULL.
func (*Device) ScrollLockState ¶
ScrollLockState retrieves whether the Scroll Lock modifier of the keyboard is locked.
This is only relevant for keyboard devices.
The function returns the following values:
- ok: TRUE if Scroll Lock is on for device.
func (*Device) Seat ¶
Seat returns the GdkSeat the device belongs to.
The function returns the following values:
- seat: GdkSeat.
func (*Device) Source ¶
func (device *Device) Source() InputSource
Source determines the type of the device.
The function returns the following values:
- inputSource: GdkInputSource.
func (*Device) SurfaceAtPosition ¶
SurfaceAtPosition obtains the surface underneath device, returning the location of the device in win_x and win_y
Returns NULL if the surface tree under device is not known to GDK (for example, belongs to another application).
The function returns the following values:
- winX (optional): return location for the X coordinate of the device location, relative to the surface origin, or NULL.
- winY (optional): return location for the Y coordinate of the device location, relative to the surface origin, or NULL.
- surface (optional): GdkSurface under the device position, or NULL.
func (*Device) Timestamp ¶
Timestamp returns the timestamp of the last activity for this device.
In practice, this means the timestamp of the last event that was received from the OS for this device. (GTK may occasionally produce events for a device that are not received from the OS, and will not update the timestamp).
The function returns the following values:
- guint32: timestamp of the last activity for this device.
func (*Device) VendorID ¶
VendorID returns the vendor ID of this device.
This ID is retrieved from the device, and does not change.
This function, together with gdk.Device.GetProductID(), can be used to eg. compose GSettings paths to store settings for this device.
static GSettings * get_device_settings (GdkDevice *device) { const char *vendor, *product; GSettings *settings; GdkDevice *device; char *path; vendor = gdk_device_get_vendor_id (device); product = gdk_device_get_product_id (device); path = g_strdup_printf ("/org/example/app/devices/s:s/", vendor, product); settings = g_settings_new_with_path (DEVICE_SCHEMA, path); g_free (path); return settings; }.
The function returns the following values:
- utf8 (optional): vendor ID, or NULL.
type DevicePad ¶
type DevicePad struct { Device // contains filtered or unexported fields }
DevicePad: GdkDevicePad is an interface implemented by devices of type GDK_SOURCE_TABLET_PAD
It allows querying the features provided by the pad device.
Tablet pads may contain one or more groups, each containing a subset of the buttons/rings/strips available. gdk.DevicePad.GetNGroups() can be used to obtain the number of groups, gdk.DevicePad.GetNFeatures() and gdk.DevicePad.GetFeatureGroup() can be combined to find out the number of buttons/rings/strips the device has, and how are they grouped.
Each of those groups have different modes, which may be used to map each individual pad feature to multiple actions. Only one mode is effective (current) for each given group, different groups may have different current modes. The number of available modes in a group can be found out through gdk.DevicePad.GetGroupNModes(), and the current mode for a given group will be notified through events of type K_PAD_GROUP_MODE.
DevicePad wraps an interface. This means the user can get the underlying type by calling Cast().
func (*DevicePad) FeatureGroup ¶
func (pad *DevicePad) FeatureGroup(feature DevicePadFeature, featureIdx int) int
FeatureGroup returns the group the given feature and idx belong to.
f the feature or index do not exist in pad, -1 is returned.
The function takes the following parameters:
- feature type to get the group from.
- featureIdx: index of the feature to get the group from.
The function returns the following values:
- gint: group number of the queried pad feature.
func (*DevicePad) GroupNModes ¶
GroupNModes returns the number of modes that group may have.
The function takes the following parameters:
- groupIdx: group to get the number of available modes from.
The function returns the following values:
- gint: number of modes available in group.
func (*DevicePad) NFeatures ¶
func (pad *DevicePad) NFeatures(feature DevicePadFeature) int
NFeatures returns the number of features a tablet pad has.
The function takes the following parameters:
- feature: pad feature.
The function returns the following values:
- gint: amount of elements of type feature that this pad has.
func (*DevicePad) NGroups ¶
NGroups returns the number of groups this pad device has.
Pads have at least one group. A pad group is a subcollection of buttons/strip/rings that is affected collectively by a same current mode.
The function returns the following values:
- gint: number of button/ring/strip groups in the pad.
type DevicePadFeature ¶
DevicePadFeature: pad feature.
const ( // DevicePadFeatureButton: button. DevicePadFeatureButton DevicePadFeature = iota // DevicePadFeatureRing: ring-shaped interactive area. DevicePadFeatureRing // DevicePadFeatureStrip: straight interactive area. DevicePadFeatureStrip )
func (DevicePadFeature) String ¶
func (d DevicePadFeature) String() string
String returns the name in string for DevicePadFeature.
type DevicePadder ¶
type DevicePadder interface { coreglib.Objector // FeatureGroup returns the group the given feature and idx belong to. FeatureGroup(feature DevicePadFeature, featureIdx int) int // GroupNModes returns the number of modes that group may have. GroupNModes(groupIdx int) int // NFeatures returns the number of features a tablet pad has. NFeatures(feature DevicePadFeature) int // NGroups returns the number of groups this pad device has. NGroups() int }
DevicePadder describes DevicePad's interface methods.
type DeviceTool ¶
DeviceTool: physical tool associated to a GdkDevice.
func (*DeviceTool) Axes ¶
func (tool *DeviceTool) Axes() AxisFlags
Axes gets the axes of the tool.
The function returns the following values:
- axisFlags axes of tool.
func (*DeviceTool) HardwareID ¶
func (tool *DeviceTool) HardwareID() uint64
HardwareID gets the hardware ID of this tool, or 0 if it's not known.
When non-zero, the identificator is unique for the given tool model, meaning that two identical tools will share the same hardware_id, but will have different serial numbers (see gdk.DeviceTool.GetSerial()).
This is a more concrete (and device specific) method to identify a GdkDeviceTool than gdk.DeviceTool.GetToolType(), as a tablet may support multiple devices with the same GdkDeviceToolType, but different hardware identificators.
The function returns the following values:
- guint64: hardware identificator of this tool.
func (*DeviceTool) Serial ¶
func (tool *DeviceTool) Serial() uint64
Serial gets the serial number of this tool.
This value can be used to identify a physical tool (eg. a tablet pen) across program executions.
The function returns the following values:
- guint64: serial ID for this tool.
func (*DeviceTool) ToolType ¶
func (tool *DeviceTool) ToolType() DeviceToolType
ToolType gets the GdkDeviceToolType of the tool.
The function returns the following values:
- deviceToolType: physical type for this tool. This can be used to figure out what sort of pen is being used, such as an airbrush or a pencil.
type DeviceToolType ¶
DeviceToolType indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.
const ( // DeviceToolTypeUnknown: tool is of an unknown type. DeviceToolTypeUnknown DeviceToolType = iota // DeviceToolTypePen: tool is a standard tablet stylus. DeviceToolTypePen // DeviceToolTypeEraser: tool is standard tablet eraser. DeviceToolTypeEraser // DeviceToolTypeBrush: tool is a brush stylus. DeviceToolTypeBrush // DeviceToolTypePencil: tool is a pencil stylus. DeviceToolTypePencil // DeviceToolTypeAirbrush: tool is an airbrush stylus. DeviceToolTypeAirbrush // DeviceToolTypeMouse: tool is a mouse. DeviceToolTypeMouse // DeviceToolTypeLens: tool is a lens cursor. DeviceToolTypeLens )
func (DeviceToolType) String ¶
func (d DeviceToolType) String() string
String returns the name in string for DeviceToolType.
type Devicer ¶
Devicer describes types inherited from class Device.
To get the original type, the caller must assert this to an interface or another type.
type Display ¶
Display: GdkDisplay objects are the GDK representation of a workstation.
Their purpose are two-fold:
- To manage and provide information about input devices (pointers, keyboards, etc)
- To manage and provide information about output devices (monitors, projectors, etc)
Most of the input device handling has been factored out into separate gdk.Seat objects. Every display has a one or more seats, which can be accessed with gdk.Display.GetDefaultSeat() and gdk.Display.ListSeats().
Output devices are represented by gdk.Monitor objects, which can be accessed with gdk.Display.GetMonitorAtSurface() and similar APIs.
func DisplayGetDefault ¶
func DisplayGetDefault() *Display
DisplayGetDefault gets the default GdkDisplay.
This is a convenience function for: gdk_display_manager_get_default_display (gdk_display_manager_get ()).
The function returns the following values:
- display (optional): GdkDisplay, or NULL if there is no default display.
func DisplayOpen ¶
DisplayOpen opens a display.
The function takes the following parameters:
- displayName: name of the display to open.
The function returns the following values:
- display (optional): GdkDisplay, or NULL if the display could not be opened.
func (*Display) AppLaunchContext ¶
func (display *Display) AppLaunchContext() *AppLaunchContext
AppLaunchContext returns a GdkAppLaunchContext suitable for launching applications on the given display.
The function returns the following values:
- appLaunchContext: new GdkAppLaunchContext for display. Free with g_object_unref() when done.
func (*Display) Clipboard ¶
Clipboard gets the clipboard used for copy/paste operations.
The function returns the following values:
- clipboard display's clipboard.
func (*Display) Close ¶
func (display *Display) Close()
Close closes the connection to the windowing system for the given display.
This cleans up associated resources.
func (*Display) ConnectClosed ¶
func (display *Display) ConnectClosed(f func(isError bool)) coreglib.SignalHandle
ConnectClosed is emitted when the connection to the windowing system for display is closed.
func (*Display) ConnectOpened ¶
func (display *Display) ConnectOpened(f func()) coreglib.SignalHandle
ConnectOpened is emitted when the connection to the windowing system for display is opened.
func (*Display) ConnectSeatAdded ¶
func (display *Display) ConnectSeatAdded(f func(seat Seater)) coreglib.SignalHandle
ConnectSeatAdded is emitted whenever a new seat is made known to the windowing system.
func (*Display) ConnectSeatRemoved ¶
func (display *Display) ConnectSeatRemoved(f func(seat Seater)) coreglib.SignalHandle
ConnectSeatRemoved is emitted whenever a seat is removed by the windowing system.
func (*Display) ConnectSettingChanged ¶
func (display *Display) ConnectSettingChanged(f func(setting string)) coreglib.SignalHandle
ConnectSettingChanged is emitted whenever a setting changes its value.
func (*Display) DefaultSeat ¶
DefaultSeat returns the default GdkSeat for this display.
Note that a display may not have a seat. In this case, this function will return NULL.
The function returns the following values:
- seat (optional): default seat.
func (*Display) DeviceIsGrabbed ¶
DeviceIsGrabbed returns TRUE if there is an ongoing grab on device for display.
The function takes the following parameters:
- device: GdkDevice.
The function returns the following values:
- ok: TRUE if there is a grab in effect for device.
func (*Display) Flush ¶
func (display *Display) Flush()
Flush flushes any requests queued for the windowing system.
This happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitly. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running.
This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.
func (*Display) IsClosed ¶
IsClosed finds out if the display has been closed.
The function returns the following values:
- ok: TRUE if the display is closed.
func (*Display) IsComposited ¶
IsComposited returns whether surfaces can reasonably be expected to have their alpha channel drawn correctly on the screen.
Check gdk.Display.IsRGBA() for whether the display supports an alpha channel.
On X11 this function returns whether a compositing manager is compositing on display.
On modern displays, this value is always TRUE.
The function returns the following values:
- ok: whether surfaces with RGBA visuals can reasonably be expected to have their alpha channels drawn correctly on the screen.
func (*Display) IsRGBA ¶
IsRGBA returns whether surfaces on this display are created with an alpha channel.
Even if a TRUE is returned, it is possible that the surface’s alpha channel won’t be honored when displaying the surface on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display. Use gdk.Display.IsComposited() to check if that is the case.
On modern displays, this value is always TRUE.
The function returns the following values:
- ok: TRUE if surfaces are created with an alpha channel or FALSE if the display does not support this functionality.
func (*Display) ListSeats ¶
ListSeats returns the list of seats known to display.
The function returns the following values:
- list: the list of seats known to the GdkDisplay.
func (*Display) MapKeycode ¶
MapKeycode returns the keyvals bound to keycode.
The Nth GdkKeymapKey in keys is bound to the Nth keyval in keyvals.
When a keycode is pressed by the user, the keyval from this list of entries is selected by considering the effective keyboard group and level.
Free the returned arrays with g_free().
The function takes the following parameters:
- keycode: keycode.
The function returns the following values:
- keys (optional): return location for array of GdkKeymapKey, or NULL.
- keyvals (optional): return location for array of keyvals, or NULL.
- ok: TRUE if there were any entries.
func (*Display) MapKeyval ¶
MapKeyval obtains a list of keycode/group/level combinations that will generate keyval.
Groups and levels are two kinds of keyboard mode; in general, the level determines whether the top or bottom symbol on a key is used, and the group determines whether the left or right symbol is used.
On US keyboards, the shift key changes the keyboard level, and there are no groups. A group switch key might convert a keyboard between Hebrew to English modes, for example.
GdkEventKey contains a group field that indicates the active keyboard group. The level is computed from the modifier mask.
The returned array should be freed with g_free().
The function takes the following parameters:
- keyval: keyval, such as GDK_KEY_a, GDK_KEY_Up, GDK_KEY_Return, etc.
The function returns the following values:
- keys: return location for an array of GdkKeymapKey.
- ok: TRUE if keys were found and returned.
func (*Display) MonitorAtSurface ¶
MonitorAtSurface gets the monitor in which the largest area of surface resides.
Returns a monitor close to surface if it is outside of all monitors.
The function takes the following parameters:
- surface: GdkSurface.
The function returns the following values:
- monitor with the largest overlap with surface.
func (*Display) Monitors ¶
func (self *Display) Monitors() *gio.ListModel
Monitors gets the list of monitors associated with this display.
Subsequent calls to this function will always return the same list for the same display.
You can listen to the GListModel::items-changed signal on this list to monitor changes to the monitor of this display.
The function returns the following values:
- listModel of GdkMonitor.
func (*Display) Name ¶
Name gets the name of the display.
The function returns the following values:
- utf8: string representing the display name. This string is owned by GDK and should not be modified or freed.
func (*Display) NotifyStartupComplete ¶
NotifyStartupComplete indicates to the GUI environment that the application has finished loading, using a given identifier.
GTK will call this function automatically for gtk.Window with custom startup-notification identifier unless gtk.Window.SetAutoStartupNotification() is called to disable that feature.
The function takes the following parameters:
- startupId: startup-notification identifier, for which notification process should be completed.
func (*Display) PrimaryClipboard ¶
PrimaryClipboard gets the clipboard used for the primary selection.
On backends where the primary clipboard is not supported natively, GDK emulates this clipboard locally.
The function returns the following values:
- clipboard: primary clipboard.
func (*Display) PutEvent ¶
PutEvent appends the given event onto the front of the event queue for display.
This function is only useful in very special situations and should not be used by applications.
The function takes the following parameters:
- event: GdkEvent.
func (*Display) Setting ¶
Setting retrieves a desktop-wide setting such as double-click time for the display.
The function takes the following parameters:
- name of the setting.
- value: location to store the value of the setting.
The function returns the following values:
- ok: TRUE if the setting existed and a value was stored in value, FALSE otherwise.
func (*Display) StartupNotificationID ¶
StartupNotificationID gets the startup notification ID for a Wayland display, or NULL if no ID has been defined.
The function returns the following values:
- utf8 (optional): startup notification ID for display, or NULL.
func (*Display) SupportsInputShapes ¶
SupportsInputShapes returns TRUE if the display supports input shapes.
This means that gdk.Surface.SetInputRegion() can be used to modify the input shape of surfaces on display.
On modern displays, this value is always TRUE.
The function returns the following values:
- ok: TRUE if surfaces with modified input shape are supported.
func (*Display) Sync ¶
func (display *Display) Sync()
Sync flushes any requests queued for the windowing system and waits until all requests have been handled.
This is often used for making sure that the display is synchronized with the current state of the program. Calling gdk.Display.Sync() before gdkx11.Display.ErrorTrapPop() makes sure that any errors generated from earlier requests are handled before the error trap is removed.
This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.
func (*Display) TranslateKey ¶
func (display *Display) TranslateKey(keycode uint, state ModifierType, group int) (keyval uint, effectiveGroup, level int, consumed ModifierType, ok bool)
TranslateKey translates the contents of a GdkEventKey into a keyval, effective group, and level.
Modifiers that affected the translation and are thus unavailable for application use are returned in consumed_modifiers.
The effective_group is the group that was actually used for the translation; some keys such as Enter are not affected by the active keyboard group. The level is derived from state.
consumed_modifiers gives modifiers that should be masked out from state when comparing this key press to a keyboard shortcut. For instance, on a US keyboard, the plus symbol is shifted, so when comparing a key press to a <Control>plus accelerator <Shift> should be masked out.
This function should rarely be needed, since GdkEventKey already contains the translated keyval. It is exported for the benefit of virtualized test environments.
The function takes the following parameters:
- keycode: keycode.
- state: modifier state.
- group: active keyboard group.
The function returns the following values:
- keyval (optional): return location for keyval, or NULL.
- effectiveGroup (optional): return location for effective group, or NULL.
- level (optional): return location for level, or NULL.
- consumed (optional): return location for modifiers that were used to determine the group or level, or NULL.
- ok: TRUE if there was a keyval bound to keycode/state/group.
type DisplayManager ¶
DisplayManager: singleton object that offers notification when displays appear or disappear.
You can use gdk.DisplayManager().Get to obtain the GdkDisplayManager singleton, but that should be rarely necessary. Typically, initializing GTK opens a display that you can work with without ever accessing the GdkDisplayManager.
The GDK library can be built with support for multiple backends. The GdkDisplayManager object determines which backend is used at runtime.
In the rare case that you need to influence which of the backends is being used, you can use gdk.SetAllowedBackends(). Note that you need to call this function before initializing GTK.
Backend-specific code ¶
When writing backend-specific code that is supposed to work with multiple GDK backends, you have to consider both compile time and runtime. At compile time, use the K_WINDOWING_X11, K_WINDOWING_WIN32 macros, etc. to find out which backends are present in the GDK library you are building your application against. At runtime, use type-check macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:
#ifdef GDK_WINDOWING_X11 if (GDK_IS_X11_DISPLAY (display)) { // make X11-specific calls here } else #endif #ifdef GDK_WINDOWING_MACOS if (GDK_IS_MACOS_DISPLAY (display)) { // make Quartz-specific calls here } else #endif g_error ("Unsupported GDK backend");.
func DisplayManagerGet ¶
func DisplayManagerGet() *DisplayManager
DisplayManagerGet gets the singleton GdkDisplayManager object.
When called for the first time, this function consults the GDK_BACKEND environment variable to find out which of the supported GDK backends to use (in case GDK has been compiled with multiple backends).
Applications can use set_allowed_backends to limit what backends wil be used.
The function returns the following values:
- displayManager: global GdkDisplayManager singleton.
func (*DisplayManager) ConnectDisplayOpened ¶
func (manager *DisplayManager) ConnectDisplayOpened(f func(display *Display)) coreglib.SignalHandle
ConnectDisplayOpened is emitted when a display is opened.
func (*DisplayManager) DefaultDisplay ¶
func (manager *DisplayManager) DefaultDisplay() *Display
DefaultDisplay gets the default GdkDisplay.
The function returns the following values:
- display (optional): GdkDisplay, or NULL if there is no default display.
func (*DisplayManager) ListDisplays ¶
func (manager *DisplayManager) ListDisplays() []*Display
ListDisplays: list all currently open displays.
The function returns the following values:
- sList: newly allocated GSList of GdkDisplay objects. Free with g_slist_free() when you are done with it.
func (*DisplayManager) OpenDisplay ¶
func (manager *DisplayManager) OpenDisplay(name string) *Display
OpenDisplay opens a display.
The function takes the following parameters:
- name of the display to open.
The function returns the following values:
- display (optional): GdkDisplay, or NULL if the display could not be opened.
func (*DisplayManager) SetDefaultDisplay ¶
func (manager *DisplayManager) SetDefaultDisplay(display *Display)
SetDefaultDisplay sets display as the default display.
The function takes the following parameters:
- display: GdkDisplay.
type Drag ¶
Drag: GdkDrag object represents the source of an ongoing DND operation.
A GdkDrag is created when a drag is started, and stays alive for duration of the DND operation. After a drag has been started with gdk.Drag().Begin, the caller gets informed about the status of the ongoing drag operation with signals on the GdkDrag object.
GTK provides a higher level abstraction based on top of these functions, and so they are not normally needed in GTK applications. See the "Drag and Drop" section of the GTK documentation for more information.
func (*Drag) Actions ¶
func (drag *Drag) Actions() DragAction
Actions determines the bitmask of possible actions proposed by the source.
The function returns the following values:
- dragAction: GdkDragAction flags.
func (*Drag) ConnectCancel ¶
func (drag *Drag) ConnectCancel(f func(reason DragCancelReason)) coreglib.SignalHandle
ConnectCancel is emitted when the drag operation is cancelled.
func (*Drag) ConnectDNDFinished ¶
func (drag *Drag) ConnectDNDFinished(f func()) coreglib.SignalHandle
ConnectDNDFinished is emitted when the destination side has finished reading all data.
The drag object can now free all miscellaneous data.
func (*Drag) ConnectDropPerformed ¶
func (drag *Drag) ConnectDropPerformed(f func()) coreglib.SignalHandle
ConnectDropPerformed is emitted when the drop operation is performed on an accepting client.
func (*Drag) Content ¶
func (drag *Drag) Content() *ContentProvider
Content returns the GdkContentProvider associated to the GdkDrag object.
The function returns the following values:
- contentProvider: GdkContentProvider associated to drag.
func (*Drag) Device ¶
Device returns the GdkDevice associated to the GdkDrag object.
The function returns the following values:
- device: GdkDevice associated to drag.
func (*Drag) Display ¶
Display gets the GdkDisplay that the drag object was created for.
The function returns the following values:
- display: GdkDisplay.
func (*Drag) DragSurface ¶
DragSurface returns the surface on which the drag icon should be rendered during the drag operation.
Note that the surface may not be available until the drag operation has begun. GDK will move the surface in accordance with the ongoing drag operation. The surface is owned by drag and will be destroyed when the drag operation is over.
The function returns the following values:
- surface (optional): drag surface, or NULL.
func (*Drag) DropDone ¶
DropDone informs GDK that the drop ended.
Passing FALSE for success may trigger a drag cancellation animation.
This function is called by the drag source, and should be the last call before dropping the reference to the drag.
The GdkDrag will only take the first gdk.Drag.DropDone() call as effective, if this function is called multiple times, all subsequent calls will be ignored.
The function takes the following parameters:
- success: whether the drag was ultimatively successful.
func (*Drag) Formats ¶
func (drag *Drag) Formats() *ContentFormats
Formats retrieves the formats supported by this GdkDrag object.
The function returns the following values:
- contentFormats: GdkContentFormats.
func (*Drag) SelectedAction ¶
func (drag *Drag) SelectedAction() DragAction
SelectedAction determines the action chosen by the drag destination.
The function returns the following values:
- dragAction: GdkDragAction value.
func (*Drag) SetHotspot ¶
SetHotspot sets the position of the drag surface that will be kept under the cursor hotspot.
Initially, the hotspot is at the top left corner of the drag surface.
The function takes the following parameters:
- hotX: x coordinate of the drag surface hotspot.
- hotY: y coordinate of the drag surface hotspot.
type DragAction ¶
DragAction: used in GdkDrop and GdkDrag to indicate the actions that the destination can and should do with the dropped data.
const ( // ActionCopy: copy the data. ActionCopy DragAction = 0b1 // ActionMove: move the data, i.e. first copy it, then delete it from the // source using the DELETE target of the X selection protocol. ActionMove DragAction = 0b10 // ActionLink: add a link to the data. Note that this is only useful if // source and destination agree on what it means, and is not supported on // all platforms. ActionLink DragAction = 0b100 // ActionAsk: ask the user what to do with the data. ActionAsk DragAction = 0b1000 )
func (DragAction) Has ¶
func (d DragAction) Has(other DragAction) bool
Has returns true if d contains other.
func (DragAction) String ¶
func (d DragAction) String() string
String returns the names in string for DragAction.
type DragCancelReason ¶
DragCancelReason: used in GdkDrag to the reason of a cancelled DND operation.
const ( // DragCancelNoTarget: there is no suitable drop target. DragCancelNoTarget DragCancelReason = iota // DragCancelUserCancelled: drag cancelled by the user. DragCancelUserCancelled // DragCancelError: unspecified error. DragCancelError )
func (DragCancelReason) String ¶
func (d DragCancelReason) String() string
String returns the name in string for DragCancelReason.
type DragSurface ¶
type DragSurface struct { Surface // contains filtered or unexported fields }
DragSurface is an interface for surfaces used during DND.
DragSurface wraps an interface. This means the user can get the underlying type by calling Cast().
func (*DragSurface) Present ¶
func (dragSurface *DragSurface) Present(width, height int) bool
Present drag_surface.
The function takes the following parameters:
- width: unconstrained drag_surface width to layout.
- height: unconstrained drag_surface height to layout.
The function returns the following values:
- ok: FALSE if it failed to be presented, otherwise TRUE.
type DragSurfacer ¶
type DragSurfacer interface { coreglib.Objector // Present drag_surface. Present(width, height int) bool }
DragSurfacer describes DragSurface's interface methods.
type Dragger ¶
Dragger describes types inherited from class Drag.
To get the original type, the caller must assert this to an interface or another type.
func DragBegin ¶
func DragBegin(surface Surfacer, device Devicer, content *ContentProvider, actions DragAction, dx, dy float64) Dragger
DragBegin starts a drag and creates a new drag context for it.
This function is called by the drag source. After this call, you probably want to set up the drag icon using the surface returned by gdk.Drag.GetDragSurface().
This function returns a reference to the gdk.Drag object, but GTK keeps its own reference as well, as long as the DND operation is going on.
Note: if actions include GDK_ACTION_MOVE, you need to listen for the gdk.Drag::dnd-finished signal and delete the data at the source if gdk.Drag.GetSelectedAction() returns GDK_ACTION_MOVE.
The function takes the following parameters:
- surface: source surface for this drag.
- device that controls this drag.
- content: offered content.
- actions supported by this drag.
- dx: x offset to device's position where the drag nominally started.
- dy: y offset to device's position where the drag nominally started.
The function returns the following values:
- drag (optional): newly created gdk.Drag or NULL on error.
type DrawContext ¶
DrawContext: base class for objects implementing different rendering methods.
GdkDrawContext is the base object used by contexts implementing different rendering methods, such as gdk.CairoContext or gdk.GLContext. It provides shared functionality between those contexts.
You will always interact with one of those subclasses.
A GdkDrawContext is always associated with a single toplevel surface.
func BaseDrawContext ¶
func BaseDrawContext(obj DrawContexter) *DrawContext
BaseDrawContext returns the underlying base object.
func (*DrawContext) BeginFrame ¶
func (context *DrawContext) BeginFrame(region *cairo.Region)
BeginFrame indicates that you are beginning the process of redrawing region on the context's surface.
Calling this function begins a drawing operation using context on the surface that context was created from. The actual requirements and guarantees for the drawing operation vary for different implementations of drawing, so a gdk.CairoContext and a gdk.GLContext need to be treated differently.
A call to this function is a requirement for drawing and must be followed by a call to gdk.DrawContext.EndFrame(), which will complete the drawing operation and ensure the contents become visible on screen.
Note that the region passed to this function is the minimum region that needs to be drawn and depending on implementation, windowing system and hardware in use, it might be necessary to draw a larger region. Drawing implementation must use [methodGdk.DrawContext.get_frame_region() to query the region that must be drawn.
When using GTK, the widget system automatically places calls to gdk_draw_context_begin_frame() and gdk_draw_context_end_frame() via the use of gsk.Renderers, so application code does not need to call these functions explicitly.
The function takes the following parameters:
- region: minimum region that should be drawn.
func (*DrawContext) Display ¶
func (context *DrawContext) Display() *Display
Display retrieves the GdkDisplay the context is created for.
The function returns the following values:
- display (optional): GdkDisplay or NULL.
func (*DrawContext) EndFrame ¶
func (context *DrawContext) EndFrame()
EndFrame ends a drawing operation started with gdk_draw_context_begin_frame().
This makes the drawing available on screen. See gdk.DrawContext.BeginFrame() for more details about drawing.
When using a gdk.GLContext, this function may call glFlush() implicitly before returning; it is not recommended to call glFlush() explicitly before calling this function.
func (*DrawContext) FrameRegion ¶
func (context *DrawContext) FrameRegion() *cairo.Region
FrameRegion retrieves the region that is currently being repainted.
After a call to gdk.DrawContext.BeginFrame() this function will return a union of the region passed to that function and the area of the surface that the context determined needs to be repainted.
If context is not in between calls to gdk.DrawContext.BeginFrame() and gdk.DrawContext.EndFrame(), NULL will be returned.
The function returns the following values:
- region (optional): cairo region or NULL if not drawing a frame.
func (*DrawContext) IsInFrame ¶
func (context *DrawContext) IsInFrame() bool
IsInFrame returns TRUE if context is in the process of drawing to its surface.
This is the case between calls to gdk.DrawContext.BeginFrame() and gdk.DrawContext.EndFrame(). In this situation, drawing commands may be effecting the contents of the context's surface.
The function returns the following values:
- ok: TRUE if the context is between gdk.DrawContext.BeginFrame() and gdk.DrawContext.EndFrame() calls.
func (*DrawContext) Surface ¶
func (context *DrawContext) Surface() Surfacer
Surface retrieves the surface that context is bound to.
The function returns the following values:
- surface (optional) or NULL.
type DrawContexter ¶
DrawContexter describes types inherited from class DrawContext.
To get the original type, the caller must assert this to an interface or another type.
type Drop ¶
Drop: GdkDrop object represents the target of an ongoing DND operation.
Possible drop sites get informed about the status of the ongoing drag operation with events of type GDK_DRAG_ENTER, GDK_DRAG_LEAVE, GDK_DRAG_MOTION and GDK_DROP_START. The GdkDrop object can be obtained from these gdk.Event types using gdk.DNDEvent.GetDrop().
The actual data transfer is initiated from the target side via an async read, using one of the GdkDrop methods for this purpose: gdk.Drop.ReadAsync() or gdk.Drop.ReadValueAsync().
GTK provides a higher level abstraction based on top of these functions, and so they are not normally needed in GTK applications. See the "Drag and Drop" section of the GTK documentation for more information.
func (*Drop) Actions ¶
func (self *Drop) Actions() DragAction
Actions returns the possible actions for this GdkDrop.
If this value contains multiple actions - i.e. gdk.DragAction().IsUnique returns FALSE for the result - gdk.Drop.Finish() must choose the action to use when accepting the drop. This will only happen if you passed GDK_ACTION_ASK as one of the possible actions in gdk.Drop.Status(). GDK_ACTION_ASK itself will not be included in the actions returned by this function.
This value may change over the lifetime of the gdk.Drop both as a response to source side actions as well as to calls to gdk.Drop.Status() or gdk.Drop.Finish(). The source side will not change this value anymore once a drop has started.
The function returns the following values:
- dragAction: possible GdkDragActions.
func (*Drop) Device ¶
Device returns the GdkDevice performing the drop.
The function returns the following values:
- device: GdkDevice performing the drop.
func (*Drop) Display ¶
Display gets the GdkDisplay that self was created for.
The function returns the following values:
- display: GdkDisplay.
func (*Drop) Drag ¶
Drag: if this is an in-app drag-and-drop operation, returns the GdkDrag that corresponds to this drop.
If it is not, NULL is returned.
The function returns the following values:
- drag (optional): corresponding GdkDrag.
func (*Drop) Finish ¶
func (self *Drop) Finish(action DragAction)
Finish ends the drag operation after a drop.
The action must be a single action selected from the actions available via gdk.Drop.GetActions().
The function takes the following parameters:
- action performed by the destination or 0 if the drop failed.
func (*Drop) Formats ¶
func (self *Drop) Formats() *ContentFormats
Formats returns the GdkContentFormats that the drop offers the data to be read in.
The function returns the following values:
- contentFormats: possible GdkContentFormats.
func (*Drop) ReadAsync ¶
func (self *Drop) ReadAsync(ctx context.Context, mimeTypes []string, ioPriority int, callback gio.AsyncReadyCallback)
ReadAsync: asynchronously read the dropped data from a GdkDrop in a format that complies with one of the mime types.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- mimeTypes: pointer to an array of mime types.
- ioPriority: i/O priority for the read operation.
- callback (optional): GAsyncReadyCallback to call when the request is satisfied.
func (*Drop) ReadFinish ¶
ReadFinish finishes an async drop read operation.
Note that you must not use blocking read calls on the returned stream in the GTK thread, since some platforms might require communication with GTK to complete the data transfer. You can use async APIs such as g_input_stream_read_bytes_async().
See gdk.Drop.ReadAsync().
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- outMimeType: return location for the used mime type.
- inputStream (optional): GInputStream, or NULL.
func (*Drop) ReadValueAsync ¶
func (self *Drop) ReadValueAsync(ctx context.Context, typ coreglib.Type, ioPriority int, callback gio.AsyncReadyCallback)
ReadValueAsync: asynchronously request the drag operation's contents converted to the given type.
When the operation is finished callback will be called. You must then call gdk.Drop.ReadValueFinish() to get the resulting GValue.
For local drag'n'drop operations that are available in the given GType, the value will be copied directly. Otherwise, GDK will try to use gdk.ContentDeserializeAsync() to convert the data.
The function takes the following parameters:
- ctx (optional): optional GCancellable object, NULL to ignore.
- typ: GType to read.
- ioPriority: i/O priority of the request.
- callback (optional) to call when the request is satisfied.
func (*Drop) ReadValueFinish ¶
ReadValueFinish finishes an async drop read.
See gdk.Drop.ReadValueAsync().
The function takes the following parameters:
- result: GAsyncResult.
The function returns the following values:
- value: GValue containing the result.
func (*Drop) Status ¶
func (self *Drop) Status(actions, preferred DragAction)
Status selects all actions that are potentially supported by the destination.
When calling this function, do not restrict the passed in actions to the ones provided by gdk.Drop.GetActions(). Those actions may change in the future, even depending on the actions you provide here.
The preferred action is a hint to the drag'n'drop mechanism about which action to use when multiple actions are possible.
This function should be called by drag destinations in response to GDK_DRAG_ENTER or GDK_DRAG_MOTION events. If the destination does not yet know the exact actions it supports, it should set any possible actions first and then later call this function again.
The function takes the following parameters:
- actions: supported actions of the destination, or 0 to indicate that a drop will not be accepted.
- preferred: unique action that's a member of actions indicating the preferred action.
type Dropper ¶
Dropper describes types inherited from class Drop.
To get the original type, the caller must assert this to an interface or another type.
type Event ¶
Event GdkEvents are immutable data structures, created by GDK to represent windowing system events.
In GTK applications the events are handled automatically by toplevel widgets and passed on to the event controllers of appropriate widgets, so using GdkEvent and its related API is rarely needed.
func (*Event) Axes ¶
Axes extracts all axis values from an event.
The function returns the following values:
- axes: array of values for all axes.
- ok: TRUE on success, otherwise FALSE.
func (*Event) Axis ¶
Axis: extract the axis value for a particular axis use from an event structure.
The function takes the following parameters:
- axisUse axis use to look for.
The function returns the following values:
- value: location to store the value found.
- ok: TRUE if the specified axis was found, otherwise FALSE.
func (*Event) Device ¶
Device returns the device of an event.
The function returns the following values:
- device (optional): Device.
func (*Event) DeviceTool ¶
func (event *Event) DeviceTool() *DeviceTool
DeviceTool returns a GdkDeviceTool representing the tool that caused the event.
If the was not generated by a device that supports different tools (such as a tablet), this function will return NULL.
Note: the GdkDeviceTool will be constant during the application lifetime, if settings must be stored persistently across runs, see gdk.DeviceTool.GetSerial().
The function returns the following values:
- deviceTool (optional): current device tool, or NULL.
func (*Event) Display ¶
Display retrieves the display associated to the event.
The function returns the following values:
- display (optional): Display.
func (*Event) EventSequence ¶
func (event *Event) EventSequence() *EventSequence
EventSequence retuns the event sequence to which the event belongs.
Related touch events are connected in a sequence. Other events typically don't have event sequence information.
The function returns the following values:
- eventSequence: event sequence that the event belongs to.
func (*Event) EventType ¶
EventType retrieves the type of the event.
The function returns the following values:
- eventType: GdkEventType.
func (*Event) History ¶
History retrieves the history of the device that event is for, as a list of time and coordinates.
The history includes positions that are not delivered as separate events to the application because they occurred in the same frame as event.
Note that only motion and scroll events record history, and motion events do it only if one of the mouse buttons is down.
The function returns the following values:
- timeCoords (optional): an array of time and coordinates.
func (*Event) ModifierState ¶
func (event *Event) ModifierState() ModifierType
ModifierState returns the modifier state field of an event.
The function returns the following values:
- modifierType: modifier state of event.
func (*Event) PointerEmulated ¶
PointerEmulated returns whether this event is an 'emulated' pointer event.
Emulated pointer events typically originate from a touch events.
The function returns the following values:
- ok: TRUE if this event is emulated.
func (*Event) Position ¶
Position: extract the event surface relative x/y coordinates from an event.
The function returns the following values:
- x: location to put event surface x coordinate.
- y: location to put event surface y coordinate.
- ok
func (*Event) Seat ¶
Seat returns the seat that originated the event.
The function returns the following values:
- seat (optional): Seat.
func (*Event) Surface ¶
Surface extracts the surface associated with an event.
The function returns the following values:
- surface associated with the event.
func (*Event) Time ¶
Time returns the timestamp of event.
Not all events have timestamps. In that case, this function returns GDK_CURRENT_TIME.
The function returns the following values:
- guint32: timestamp field from event.
func (*Event) TriggersContextMenu ¶
TriggersContextMenu returns whether a GdkEvent should trigger a context menu, according to platform conventions.
The right mouse button typically triggers context menus.
This function should always be used instead of simply checking for event->button == GDK_BUTTON_SECONDARY.
The function returns the following values:
- ok: TRUE if the event should trigger a context menu.
type EventSequence ¶
type EventSequence struct {
// contains filtered or unexported fields
}
EventSequence: GdkEventSequence is an opaque type representing a sequence of related touch events.
An instance of this type is always passed by reference.
type EventType ¶
EventType specifies the type of the event.
const ( // Delete: window manager has requested that the toplevel surface be hidden // or destroyed, usually when the user clicks on a special icon in the title // bar. Delete EventType = iota // MotionNotify: pointer (usually a mouse) has moved. MotionNotify // ButtonPress: mouse button has been pressed. ButtonPress // ButtonRelease: mouse button has been released. ButtonRelease // KeyPress: key has been pressed. KeyPress // KeyRelease: key has been released. KeyRelease // EnterNotify: pointer has entered the surface. EnterNotify // LeaveNotify: pointer has left the surface. LeaveNotify // FocusChange: keyboard focus has entered or left the surface. FocusChange // ProximityIn: input device has moved into contact with a sensing surface // (e.g. a touchscreen or graphics tablet). ProximityIn // ProximityOut: input device has moved out of contact with a sensing // surface. ProximityOut // DragEnter: mouse has entered the surface while a drag is in progress. DragEnter // DragLeave: mouse has left the surface while a drag is in progress. DragLeave // DragMotion: mouse has moved in the surface while a drag is in progress. DragMotion // DropStart: drop operation onto the surface has started. DropStart // Scroll: scroll wheel was turned. Scroll // GrabBroken: pointer or keyboard grab was broken. GrabBroken // TouchBegin: new touch event sequence has just started. TouchBegin // TouchUpdate: touch event sequence has been updated. TouchUpdate // TouchEnd: touch event sequence has finished. TouchEnd // TouchCancel: touch event sequence has been canceled. TouchCancel // TouchpadSwipe: touchpad swipe gesture event, the current state is // determined by its phase field. TouchpadSwipe // TouchpadPinch: touchpad pinch gesture event, the current state is // determined by its phase field. TouchpadPinch // PadButtonPress: tablet pad button press event. PadButtonPress // PadButtonRelease: tablet pad button release event. PadButtonRelease // PadRing: tablet pad axis event from a "ring". PadRing // PadStrip: tablet pad axis event from a "strip". PadStrip // PadGroupMode: tablet pad group mode change. PadGroupMode // EventLast marks the end of the GdkEventType enumeration. EventLast )
type Eventer ¶
Eventer describes types inherited from class Event.
To get the original type, the caller must assert this to an interface or another type.
type FocusEvent ¶
type FocusEvent struct { Event // contains filtered or unexported fields }
FocusEvent: event related to a keyboard focus change.
func (*FocusEvent) In ¶
func (event *FocusEvent) In() bool
In extracts whether this event is about focus entering or leaving the surface.
The function returns the following values:
- ok: TRUE of the focus is entering.
type FrameClock ¶
FrameClock: GdkFrameClock tells the application when to update and repaint a surface.
This may be synced to the vertical refresh rate of the monitor, for example. Even when the frame clock uses a simple timer rather than a hardware-based vertical sync, the frame clock helps because it ensures everything paints at the same time (reducing the total number of frames).
The frame clock can also automatically stop painting when it knows the frames will not be visible, or scale back animation framerates.
GdkFrameClock is designed to be compatible with an OpenGL-based implementation or with mozRequestAnimationFrame in Firefox, for example.
A frame clock is idle until someone requests a frame with gdk.FrameClock.RequestPhase(). At some later point that makes sense for the synchronization being implemented, the clock will process a frame and emit signals for each phase that has been requested. (See the signals of the GdkFrameClock class for documentation of the phases. GDK_FRAME_CLOCK_PHASE_UPDATE and the gdkframeclock::update signal are most interesting for application writers, and are used to update the animations, using the frame time given by gdk.FrameClock.GetFrameTime.
The frame time is reported in microseconds and generally in the same timescale as g_get_monotonic_time(), however, it is not the same as g_get_monotonic_time(). The frame time does not advance during the time a frame is being painted, and outside of a frame, an attempt is made so that all calls to gdk.FrameClock.GetFrameTime() that are called at a “similar” time get the same value. This means that if different animations are timed by looking at the difference in time between an initial value from gdk.FrameClock.GetFrameTime() and the value inside the gdkframeclock::update signal of the clock, they will stay exactly synchronized.
func BaseFrameClock ¶
func BaseFrameClock(obj FrameClocker) *FrameClock
BaseFrameClock returns the underlying base object.
func (*FrameClock) BeginUpdating ¶
func (frameClock *FrameClock) BeginUpdating()
BeginUpdating starts updates for an animation.
Until a matching call to gdk.FrameClock.EndUpdating() is made, the frame clock will continually request a new frame with the GDK_FRAME_CLOCK_PHASE_UPDATE phase. This function may be called multiple times and frames will be requested until gdk_frame_clock_end_updating() is called the same number of times.
func (*FrameClock) ConnectAfterPaint ¶
func (frameClock *FrameClock) ConnectAfterPaint(f func()) coreglib.SignalHandle
ConnectAfterPaint: this signal ends processing of the frame.
Applications should generally not handle this signal.
func (*FrameClock) ConnectBeforePaint ¶
func (frameClock *FrameClock) ConnectBeforePaint(f func()) coreglib.SignalHandle
ConnectBeforePaint begins processing of the frame.
Applications should generally not handle this signal.
func (*FrameClock) ConnectFlushEvents ¶
func (frameClock *FrameClock) ConnectFlushEvents(f func()) coreglib.SignalHandle
ConnectFlushEvents: used to flush pending motion events that are being batched up and compressed together.
Applications should not handle this signal.
func (*FrameClock) ConnectLayout ¶
func (frameClock *FrameClock) ConnectLayout(f func()) coreglib.SignalHandle
ConnectLayout is emitted as the second step of toolkit and application processing of the frame.
Any work to update sizes and positions of application elements should be performed. GTK normally handles this internally.
func (*FrameClock) ConnectPaint ¶
func (frameClock *FrameClock) ConnectPaint(f func()) coreglib.SignalHandle
ConnectPaint is emitted as the third step of toolkit and application processing of the frame.
The frame is repainted. GDK normally handles this internally and emits gdk.Surface::render signals which are turned into gtk.Widget::snapshot signals by GTK.
func (*FrameClock) ConnectResumeEvents ¶
func (frameClock *FrameClock) ConnectResumeEvents(f func()) coreglib.SignalHandle
ConnectResumeEvents is emitted after processing of the frame is finished.
This signal is handled internally by GTK to resume normal event processing. Applications should not handle this signal.
func (*FrameClock) ConnectUpdate ¶
func (frameClock *FrameClock) ConnectUpdate(f func()) coreglib.SignalHandle
ConnectUpdate is emitted as the first step of toolkit and application processing of the frame.
Animations should be updated using gdk.FrameClock.GetFrameTime(). Applications can connect directly to this signal, or use gtk.Widget.AddTickCallback() as a more convenient interface.
func (*FrameClock) CurrentTimings ¶
func (frameClock *FrameClock) CurrentTimings() *FrameTimings
CurrentTimings gets the frame timings for the current frame.
The function returns the following values:
- frameTimings (optional): GdkFrameTimings for the frame currently being processed, or even no frame is being processed, for the previous frame. Before any frames have been processed, returns NULL.
func (*FrameClock) EndUpdating ¶
func (frameClock *FrameClock) EndUpdating()
EndUpdating stops updates for an animation.
See the documentation for gdk.FrameClock.BeginUpdating().
func (*FrameClock) FPS ¶
func (frameClock *FrameClock) FPS() float64
FPS calculates the current frames-per-second, based on the frame timings of frame_clock.
The function returns the following values:
- gdouble: current fps, as a double.
func (*FrameClock) FrameCounter ¶
func (frameClock *FrameClock) FrameCounter() int64
FrameCounter: GdkFrameClock maintains a 64-bit counter that increments for each frame drawn.
The function returns the following values:
- gint64: inside frame processing, the value of the frame counter for the current frame. Outside of frame processing, the frame counter for the last frame.
func (*FrameClock) FrameTime ¶
func (frameClock *FrameClock) FrameTime() int64
FrameTime gets the time that should currently be used for animations.
Inside the processing of a frame, it’s the time used to compute the animation position of everything in a frame. Outside of a frame, it's the time of the conceptual “previous frame,” which may be either the actual previous frame time, or if that’s too old, an updated time.
The function returns the following values:
- gint64: timestamp in microseconds, in the timescale of of g_get_monotonic_time().
func (*FrameClock) HistoryStart ¶
func (frameClock *FrameClock) HistoryStart() int64
HistoryStart returns the frame counter for the oldest frame available in history.
GdkFrameClock internally keeps a history of GdkFrameTimings objects for recent frames that can be retrieved with gdk.FrameClock.GetTimings(). The set of stored frames is the set from the counter values given by gdk.FrameClock.GetHistoryStart() and gdk.FrameClock.GetFrameCounter(), inclusive.
The function returns the following values:
- gint64: frame counter value for the oldest frame that is available in the internal frame history of the GdkFrameClock.
func (*FrameClock) RefreshInfo ¶
func (frameClock *FrameClock) RefreshInfo(baseTime int64) (refreshIntervalReturn, presentationTimeReturn int64)
RefreshInfo predicts a presentation time, based on history.
Using the frame history stored in the frame clock, finds the last known presentation time and refresh interval, and assuming that presentation times are separated by the refresh interval, predicts a presentation time that is a multiple of the refresh interval after the last presentation time, and later than base_time.
The function takes the following parameters:
- baseTime: base time for determining a presentaton time.
The function returns the following values:
- refreshIntervalReturn (optional): location to store the determined refresh interval, or NULL. A default refresh interval of 1/60th of a second will be stored if no history is present.
- presentationTimeReturn: location to store the next candidate presentation time after the given base time. 0 will be will be stored if no history is present.
func (*FrameClock) RequestPhase ¶
func (frameClock *FrameClock) RequestPhase(phase FrameClockPhase)
RequestPhase asks the frame clock to run a particular phase.
The signal corresponding the requested phase will be emitted the next time the frame clock processes. Multiple calls to gdk_frame_clock_request_phase() will be combined together and only one frame processed. If you are displaying animated content and want to continually request the GDK_FRAME_CLOCK_PHASE_UPDATE phase for a period of time, you should use gdk.FrameClock.BeginUpdating() instead, since this allows GTK to adjust system parameters to get maximally smooth animations.
The function takes the following parameters:
- phase that is requested.
func (*FrameClock) Timings ¶
func (frameClock *FrameClock) Timings(frameCounter int64) *FrameTimings
Timings retrieves a GdkFrameTimings object holding timing information for the current frame or a recent frame.
The GdkFrameTimings object may not yet be complete: see gdk.FrameTimings.GetComplete().
The function takes the following parameters:
- frameCounter: frame counter value identifying the frame to be received.
The function returns the following values:
- frameTimings (optional): GdkFrameTimings object for the specified frame, or NULL if it is not available. See gdk.FrameClock.GetHistoryStart().
type FrameClockPhase ¶
FrameClockPhase: used to represent the different paint clock phases that can be requested.
The elements of the enumeration correspond to the signals of GdkFrameClock.
const ( // FrameClockPhaseNone: no phase. FrameClockPhaseNone FrameClockPhase = 0b0 // FrameClockPhaseFlushEvents corresponds to GdkFrameClock::flush-events. // Should not be handled by applications. FrameClockPhaseFlushEvents FrameClockPhase = 0b1 // FrameClockPhaseBeforePaint corresponds to GdkFrameClock::before-paint. // Should not be handled by applications. FrameClockPhaseBeforePaint FrameClockPhase = 0b10 // FrameClockPhaseUpdate corresponds to GdkFrameClock::update. FrameClockPhaseUpdate FrameClockPhase = 0b100 // FrameClockPhaseLayout corresponds to GdkFrameClock::layout. Should not be // handled by applicatiosn. FrameClockPhaseLayout FrameClockPhase = 0b1000 // FrameClockPhasePaint corresponds to GdkFrameClock::paint. FrameClockPhasePaint FrameClockPhase = 0b10000 // FrameClockPhaseResumeEvents corresponds to GdkFrameClock::resume-events. // Should not be handled by applications. FrameClockPhaseResumeEvents FrameClockPhase = 0b100000 // FrameClockPhaseAfterPaint corresponds to GdkFrameClock::after-paint. // Should not be handled by applications. FrameClockPhaseAfterPaint FrameClockPhase = 0b1000000 )
func (FrameClockPhase) Has ¶
func (f FrameClockPhase) Has(other FrameClockPhase) bool
Has returns true if f contains other.
func (FrameClockPhase) String ¶
func (f FrameClockPhase) String() string
String returns the names in string for FrameClockPhase.
type FrameClocker ¶
FrameClocker describes types inherited from class FrameClock.
To get the original type, the caller must assert this to an interface or another type.
type FrameTimings ¶
type FrameTimings struct {
// contains filtered or unexported fields
}
FrameTimings: GdkFrameTimings object holds timing information for a single frame of the application’s displays.
To retrieve GdkFrameTimings objects, use gdk.FrameClock.GetTimings() or gdk.FrameClock.GetCurrentTimings(). The information in GdkFrameTimings is useful for precise synchronization of video with the event or audio streams, and for measuring quality metrics for the application’s display, such as latency and jitter.
An instance of this type is always passed by reference.
func (*FrameTimings) Complete ¶
func (timings *FrameTimings) Complete() bool
Complete returns whether timings are complete.
The timing information in a GdkFrameTimings is filled in incrementally as the frame as drawn and passed off to the window system for processing and display to the user. The accessor functions for GdkFrameTimings can return 0 to indicate an unavailable value for two reasons: either because the information is not yet available, or because it isn't available at all.
Once this function returns TRUE for a frame, you can be certain that no further values will become available and be stored in the GdkFrameTimings.
The function returns the following values:
- ok: TRUE if all information that will be available for the frame has been filled in.
func (*FrameTimings) FrameCounter ¶
func (timings *FrameTimings) FrameCounter() int64
FrameCounter gets the frame counter value of the GdkFrameClock when this frame was drawn.
The function returns the following values:
- gint64: frame counter value for this frame.
func (*FrameTimings) FrameTime ¶
func (timings *FrameTimings) FrameTime() int64
FrameTime returns the frame time for the frame.
This is the time value that is typically used to time animations for the frame. See gdk.FrameClock.GetFrameTime().
The function returns the following values:
- gint64: frame time for the frame, in the timescale of g_get_monotonic_time().
func (*FrameTimings) PredictedPresentationTime ¶
func (timings *FrameTimings) PredictedPresentationTime() int64
PredictedPresentationTime gets the predicted time at which this frame will be displayed.
Although no predicted time may be available, if one is available, it will be available while the frame is being generated, in contrast to gdk.FrameTimings.GetPresentationTime(), which is only available after the frame has been presented.
In general, if you are simply animating, you should use gdk.FrameClock.GetFrameTime() rather than this function, but this function is useful for applications that want exact control over latency. For example, a movie player may want this information for Audio/Video synchronization.
The function returns the following values:
- gint64: predicted time at which the frame will be presented, in the timescale of g_get_monotonic_time(), or 0 if no predicted presentation time is available.
func (*FrameTimings) PresentationTime ¶
func (timings *FrameTimings) PresentationTime() int64
PresentationTime reurns the presentation time.
This is the time at which the frame became visible to the user.
The function returns the following values:
- gint64: time the frame was displayed to the user, in the timescale of g_get_monotonic_time(), or 0 if no presentation time is available. See gdk.FrameTimings.GetComplete().
func (*FrameTimings) RefreshInterval ¶
func (timings *FrameTimings) RefreshInterval() int64
RefreshInterval gets the natural interval between presentation times for the display that this frame was displayed on.
Frame presentation usually happens during the “vertical blanking interval”.
The function returns the following values:
- gint64: refresh interval of the display, in microseconds, or 0 if the refresh interval is not available. See gdk.FrameTimings.GetComplete().
type FullscreenMode ¶
FullscreenMode indicates which monitor a surface should span over when in fullscreen mode.
const ( // FullscreenOnCurrentMonitor: fullscreen on current monitor only. FullscreenOnCurrentMonitor FullscreenMode = iota // FullscreenOnAllMonitors: span across all monitors when fullscreen. FullscreenOnAllMonitors )
func (FullscreenMode) String ¶
func (f FullscreenMode) String() string
String returns the name in string for FullscreenMode.
type GLContext ¶
type GLContext struct { DrawContext // contains filtered or unexported fields }
GLContext: GdkGLContext is an object representing a platform-specific OpenGL draw context.
GdkGLContexts are created for a surface using gdk.Surface.CreateGLContext(), and the context will match the the characteristics of the surface.
A GdkGLContext is not tied to any particular normal framebuffer. For instance, it cannot draw to the surface back buffer. The GDK repaint system is in full control of the painting to that. Instead, you can create render buffers or textures and use cairo_draw_from_gl in the draw function of your widget to draw them. Then GDK will handle the integration of your rendering with that of other widgets.
Support for GdkGLContext is platform-specific and context creation can fail, returning NULL context.
A GdkGLContext has to be made "current" in order to start using it, otherwise any OpenGL call will be ignored.
Creating a new OpenGL context ¶
In order to create a new GdkGLContext instance you need a GdkSurface, which you typically get during the realize call of a widget.
A GdkGLContext is not realized until either gdk.GLContext.MakeCurrent() or gdk.GLContext.Realize() is called. It is possible to specify details of the GL context like the OpenGL version to be used, or whether the GL context should have extra state validation enabled after calling gdk.Surface.CreateGLContext() by calling gdk.GLContext.Realize(). If the realization fails you have the option to change the settings of the GdkGLContext and try again.
Using a GdkGLContext ¶
You will need to make the GdkGLContext the current context before issuing OpenGL calls; the system sends OpenGL commands to whichever context is current. It is possible to have multiple contexts, so you always need to ensure that the one which you want to draw with is the current one before issuing commands:
gdk_gl_context_make_current (context);
You can now perform your drawing using OpenGL commands.
You can check which GdkGLContext is the current one by using gdk.GLContext().GetCurrent; you can also unset any GdkGLContext that is currently set by calling gdk.GLContext().ClearCurrent.
func BaseGLContext ¶
func BaseGLContext(obj GLContexter) *GLContext
BaseGLContext returns the underlying base object.
func (*GLContext) DebugEnabled ¶
DebugEnabled retrieves whether the context is doing extra validations and runtime checking.
See gdk.GLContext.SetDebugEnabled().
The function returns the following values:
- ok: TRUE if debugging is enabled.
func (*GLContext) Display ¶
Display retrieves the display the context is created for.
The function returns the following values:
- display (optional): GdkDisplay or NULL.
func (*GLContext) ForwardCompatible ¶
ForwardCompatible retrieves whether the context is forward-compatible.
See gdk.GLContext.SetForwardCompatible().
The function returns the following values:
- ok: TRUE if the context should be forward-compatible.
func (*GLContext) IsLegacy ¶
IsLegacy: whether the GdkGLContext is in legacy mode or not.
The GdkGLContext must be realized before calling this function.
When realizing a GL context, GDK will try to use the OpenGL 3.2 core profile; this profile removes all the OpenGL API that was deprecated prior to the 3.2 version of the specification. If the realization is successful, this function will return FALSE.
If the underlying OpenGL implementation does not support core profiles, GDK will fall back to a pre-3.2 compatibility profile, and this function will return TRUE.
You can use the value returned by this function to decide which kind of OpenGL API to use, or whether to do extension discovery, or what kind of shader programs to load.
The function returns the following values:
- ok: TRUE if the GL context is in legacy mode.
func (*GLContext) MakeCurrent ¶
func (context *GLContext) MakeCurrent()
MakeCurrent makes the context the current one.
func (*GLContext) Realize ¶
Realize realizes the given GdkGLContext.
It is safe to call this function on a realized GdkGLContext.
func (*GLContext) RequiredVersion ¶
RequiredVersion retrieves required OpenGL version.
See gdk.GLContext.SetRequiredVersion().
The function returns the following values:
- major (optional): return location for the major version to request.
- minor (optional): return location for the minor version to request.
func (*GLContext) SetDebugEnabled ¶
SetDebugEnabled sets whether the GdkGLContext should perform extra validations and runtime checking.
This is useful during development, but has additional overhead.
The GdkGLContext must not be realized or made current prior to calling this function.
The function takes the following parameters:
- enabled: whether to enable debugging in the context.
func (*GLContext) SetForwardCompatible ¶
SetForwardCompatible sets whether the GdkGLContext should be forward-compatible.
Forward-compatible contexts must not support OpenGL functionality that has been marked as deprecated in the requested version; non-forward compatible contexts, on the other hand, must support both deprecated and non deprecated functionality.
The GdkGLContext must not be realized or made current prior to calling this function.
The function takes the following parameters:
- compatible: whether the context should be forward-compatible.
func (*GLContext) SetRequiredVersion ¶
SetRequiredVersion sets the major and minor version of OpenGL to request.
Setting major and minor to zero will use the default values.
The GdkGLContext must not be realized or made current prior to calling this function.
The function takes the following parameters:
- major version to request.
- minor version to request.
func (*GLContext) SetUseES ¶
SetUseES requests that GDK create an OpenGL ES context instead of an OpenGL one.
Not all platforms support OpenGL ES.
The context must not have been realized.
By default, GDK will attempt to automatically detect whether the underlying GL implementation is OpenGL or OpenGL ES once the context is realized.
You should check the return value of gdk.GLContext.GetUseES() after calling gdk.GLContext.Realize() to decide whether to use the OpenGL or OpenGL ES API, extensions, or shaders.
The function takes the following parameters:
- useEs: whether the context should use OpenGL ES instead of OpenGL, or -1 to allow auto-detection.
func (*GLContext) SharedContext ¶
func (context *GLContext) SharedContext() GLContexter
SharedContext retrieves the GdkGLContext that this context share data with.
The function returns the following values:
- glContext (optional): GdkGLContext or NULL.
func (*GLContext) Surface ¶
Surface retrieves the surface used by the context.
The function returns the following values:
- surface (optional): GdkSurface or NULL.
func (*GLContext) UseES ¶
UseES checks whether the context is using an OpenGL or OpenGL ES profile.
The function returns the following values:
- ok: TRUE if the GdkGLContext is using an OpenGL ES profile.
type GLContexter ¶
GLContexter describes types inherited from class GLContext.
To get the original type, the caller must assert this to an interface or another type.
func GLContextGetCurrent ¶
func GLContextGetCurrent() GLContexter
GLContextGetCurrent retrieves the current GdkGLContext.
The function returns the following values:
- glContext (optional): current GdkGLContext, or NULL.
type GLError ¶
GLError: error enumeration for GdkGLContext.
const ( // GLErrorNotAvailable: openGL support is not available. GLErrorNotAvailable GLError = iota // GLErrorUnsupportedFormat: requested visual format is not supported. GLErrorUnsupportedFormat // GLErrorUnsupportedProfile: requested profile is not supported. GLErrorUnsupportedProfile // GLErrorCompilationFailed: shader compilation failed. GLErrorCompilationFailed // GLErrorLinkFailed: shader linking failed. GLErrorLinkFailed )
type GLTexture ¶
type GLTexture struct { Texture // contains filtered or unexported fields }
GLTexture: gdkTexture representing a GL texture object.
type GrabBrokenEvent ¶
type GrabBrokenEvent struct { Event // contains filtered or unexported fields }
GrabBrokenEvent: event related to a broken windowing system grab.
func (*GrabBrokenEvent) GrabSurface ¶
func (event *GrabBrokenEvent) GrabSurface() Surfacer
GrabSurface extracts the grab surface from a grab broken event.
The function returns the following values:
- surface: grab surface of event.
func (*GrabBrokenEvent) Implicit ¶
func (event *GrabBrokenEvent) Implicit() bool
Implicit checks whether the grab broken event is for an implicit grab.
The function returns the following values:
- ok: TRUE if the an implicit grab was broken.
type Gravity ¶
Gravity defines the reference point of a surface and is used in PopupLayout.
const ( // GravityNorthWest: reference point is at the top left corner. GravityNorthWest Gravity = 1 // GravityNorth: reference point is in the middle of the top edge. GravityNorth Gravity = 2 // GravityNorthEast: reference point is at the top right corner. GravityNorthEast Gravity = 3 // GravityWest: reference point is at the middle of the left edge. GravityWest Gravity = 4 // GravityCenter: reference point is at the center of the surface. GravityCenter Gravity = 5 // GravityEast: reference point is at the middle of the right edge. GravityEast Gravity = 6 // GravitySouthWest: reference point is at the lower left corner. GravitySouthWest Gravity = 7 // GravitySouth: reference point is at the middle of the lower edge. GravitySouth Gravity = 8 // GravitySouthEast: reference point is at the lower right corner. GravitySouthEast Gravity = 9 // GravityStatic: reference point is at the top left corner of the surface // itself, ignoring window manager decorations. GravityStatic Gravity = 10 )
type InputSource ¶
InputSource: enumeration describing the type of an input device in general terms.
const ( // SourceMouse: device is a mouse. (This will be reported for the core // pointer, even if it is something else, such as a trackball.). SourceMouse InputSource = iota // SourcePen: device is a stylus of a graphics tablet or similar device. SourcePen // SourceKeyboard: device is a keyboard. SourceKeyboard // SourceTouchscreen: device is a direct-input touch device, such as a // touchscreen or tablet. SourceTouchscreen // SourceTouchpad: device is an indirect touch device, such as a touchpad. SourceTouchpad // SourceTrackpoint: device is a trackpoint. SourceTrackpoint // SourceTabletPad: device is a "pad", a collection of buttons, rings and // strips found in drawing tablets. SourceTabletPad )
func (InputSource) String ¶
func (i InputSource) String() string
String returns the name in string for InputSource.
type KeyEvent ¶
type KeyEvent struct { Event // contains filtered or unexported fields }
KeyEvent: event related to a key-based device.
func (*KeyEvent) ConsumedModifiers ¶
func (event *KeyEvent) ConsumedModifiers() ModifierType
ConsumedModifiers extracts the consumed modifiers from a key event.
The function returns the following values:
- modifierType: consumed modifiers or event.
func (*KeyEvent) IsModifier ¶
IsModifier extracts whether the key event is for a modifier key.
The function returns the following values:
- ok: TRUE if the event is for a modifier key.
func (*KeyEvent) Keycode ¶
Keycode extracts the keycode from a key event.
The function returns the following values:
- guint: keycode of event.
func (*KeyEvent) Keyval ¶
Keyval extracts the keyval from a key event.
The function returns the following values:
- guint: keyval of event.
func (*KeyEvent) Layout ¶
Layout extracts the layout from a key event.
The function returns the following values:
- guint: layout of event.
func (*KeyEvent) Level ¶
Level extracts the shift level from a key event.
The function returns the following values:
- guint: shift level of event.
func (*KeyEvent) Match ¶
func (event *KeyEvent) Match() (uint, ModifierType, bool)
Match gets a keyval and modifier combination that will match the event.
See gdk.KeyEvent.Matches().
The function returns the following values:
- keyval: return location for a keyval.
- modifiers: return location for modifiers.
- ok: TRUE on success.
func (*KeyEvent) Matches ¶
func (event *KeyEvent) Matches(keyval uint, modifiers ModifierType) KeyMatch
Matches a key event against a keyval and modifiers.
This is typically used to trigger keyboard shortcuts such as Ctrl-C.
Partial matches are possible where the combination matches if the currently active group is ignored.
Note that we ignore Caps Lock for matching.
The function takes the following parameters:
- keyval to match.
- modifiers to match.
The function returns the following values:
- keyMatch: GdkKeyMatch value describing whether event matches.
type KeyMatch ¶
KeyMatch describes how well an event matches a given keyval and modifiers.
GdkKeyMatch values are returned by gdk.KeyEvent.Matches().
type KeymapKey ¶
type KeymapKey struct {
// contains filtered or unexported fields
}
KeymapKey: GdkKeymapKey is a hardware key that can be mapped to a keyval.
An instance of this type is always passed by reference.
func NewKeymapKey ¶
NewKeymapKey creates a new KeymapKey instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!
func (*KeymapKey) Group ¶
Group indicates movement in a horizontal direction. Usually groups are used for two different languages. In group 0, a key might have two English characters, and in group 1 it might have two Hebrew characters. The Hebrew characters will be printed on the key next to the English characters.
func (*KeymapKey) Keycode ¶
Keycode: hardware keycode. This is an identifying number for a physical key.
func (*KeymapKey) Level ¶
Level indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number “1” on it also has the exclamation point ("!") character on it. The level indicates whether to use the “1” or the “!” symbol. The letter keys are considered to have a lowercase letter at level 0, and an uppercase letter at level 1, though only the uppercase letter is printed.
func (*KeymapKey) SetGroup ¶
Group indicates movement in a horizontal direction. Usually groups are used for two different languages. In group 0, a key might have two English characters, and in group 1 it might have two Hebrew characters. The Hebrew characters will be printed on the key next to the English characters.
func (*KeymapKey) SetKeycode ¶
Keycode: hardware keycode. This is an identifying number for a physical key.
func (*KeymapKey) SetLevel ¶
Level indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number “1” on it also has the exclamation point ("!") character on it. The level indicates whether to use the “1” or the “!” symbol. The letter keys are considered to have a lowercase letter at level 0, and an uppercase letter at level 1, though only the uppercase letter is printed.
type MemoryFormat ¶
MemoryFormat: GdkMemoryFormat describes a format that bytes can have in memory.
It describes formats by listing the contents of the memory passed to it. So GDK_MEMORY_A8R8G8B8 will be 1 byte (8 bits) of alpha, followed by a byte each of red, green and blue. It is not endian-dependent, so CAIRO_FORMAT_ARGB32 is represented by different GdkMemoryFormats on architectures with different endiannesses.
Its naming is modelled after VkFormat (see https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.htmlFormat for details).
const ( // MemoryB8G8R8A8Premultiplied: 4 bytes; for blue, green, red, alpha. // The color values are premultiplied with the alpha value. MemoryB8G8R8A8Premultiplied MemoryFormat = iota // MemoryA8R8G8B8Premultiplied: 4 bytes; for alpha, red, green, blue. // The color values are premultiplied with the alpha value. MemoryA8R8G8B8Premultiplied // MemoryR8G8B8A8Premultiplied: 4 bytes; for red, green, blue, alpha The // color values are premultiplied with the alpha value. MemoryR8G8B8A8Premultiplied // MemoryB8G8R8A8: 4 bytes; for blue, green, red, alpha. MemoryB8G8R8A8 // MemoryA8R8G8B8: 4 bytes; for alpha, red, green, blue. MemoryA8R8G8B8 // MemoryR8G8B8A8: 4 bytes; for red, green, blue, alpha. MemoryR8G8B8A8 // MemoryA8B8G8R8: 4 bytes; for alpha, blue, green, red. MemoryA8B8G8R8 // MemoryR8G8B8: 3 bytes; for red, green, blue. The data is opaque. MemoryR8G8B8 // MemoryB8G8R8: 3 bytes; for blue, green, red. The data is opaque. MemoryB8G8R8 // MemoryNFormats: number of formats. This value will change as more formats // get added, so do not rely on its concrete integer. MemoryNFormats )
func (MemoryFormat) String ¶
func (m MemoryFormat) String() string
String returns the name in string for MemoryFormat.
type MemoryTexture ¶
type MemoryTexture struct { Texture // contains filtered or unexported fields }
MemoryTexture: GdkTexture representing image data in memory.
func NewMemoryTexture ¶
func NewMemoryTexture(width, height int, format MemoryFormat, bytes *glib.Bytes, stride uint) *MemoryTexture
NewMemoryTexture creates a new texture for a blob of image data.
The GBytes must contain stride x height pixels in the given format.
The function takes the following parameters:
- width of the texture.
- height of the texture.
- format of the data.
- bytes: GBytes containing the pixel data.
- stride for the data.
The function returns the following values:
- memoryTexture: newly-created GdkTexture.
type ModifierType ¶
ModifierType flags to indicate the state of modifier keys and mouse buttons in events.
Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
Note that GDK may add internal values to events which include values outside of this enumeration. Your code should preserve and ignore them. You can use GDK_MODIFIER_MASK to remove all private values.
const ( // ShiftMask: shift key. ShiftMask ModifierType = 0b1 // LockMask: lock key (depending on the modifier mapping of the X server // this may either be CapsLock or ShiftLock). LockMask ModifierType = 0b10 // ControlMask: control key. ControlMask ModifierType = 0b100 // AltMask: fourth modifier key (it depends on the modifier mapping of the X // server which key is interpreted as this modifier, but normally it is the // Alt key). AltMask ModifierType = 0b1000 // Button1Mask: first mouse button. Button1Mask ModifierType = 0b100000000 // Button2Mask: second mouse button. Button2Mask ModifierType = 0b1000000000 // Button3Mask: third mouse button. Button3Mask ModifierType = 0b10000000000 // Button4Mask: fourth mouse button. Button4Mask ModifierType = 0b100000000000 // Button5Mask: fifth mouse button. Button5Mask ModifierType = 0b1000000000000 // SuperMask: super modifier. SuperMask ModifierType = 0b100000000000000000000000000 // HyperMask: hyper modifier. HyperMask ModifierType = 0b1000000000000000000000000000 // MetaMask: meta modifier. MetaMask ModifierType = 0b10000000000000000000000000000 )
func (ModifierType) Has ¶
func (m ModifierType) Has(other ModifierType) bool
Has returns true if m contains other.
func (ModifierType) String ¶
func (m ModifierType) String() string
String returns the names in string for ModifierType.
type Monitor ¶
Monitor: GdkMonitor objects represent the individual outputs that are associated with a GdkDisplay.
GdkDisplay keeps a GListModel to enumerate and monitor monitors with gdk.Display.GetMonitors(). You can use gdk.Display.GetMonitorAtSurface() to find a particular monitor.
func (*Monitor) ConnectInvalidate ¶
func (monitor *Monitor) ConnectInvalidate(f func()) coreglib.SignalHandle
ConnectInvalidate is emitted when the output represented by monitor gets disconnected.
func (*Monitor) Connector ¶
Connector gets the name of the monitor's connector, if available.
The function returns the following values:
- utf8 (optional): name of the connector.
func (*Monitor) Display ¶
Display gets the display that this monitor belongs to.
The function returns the following values:
- display: display.
func (*Monitor) Geometry ¶
Geometry retrieves the size and position of the monitor within the display coordinate space.
The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk.Monitor.GetScaleFactor()).
The function returns the following values:
- geometry: GdkRectangle to be filled with the monitor geometry.
func (*Monitor) HeightMm ¶
HeightMm gets the height in millimeters of the monitor.
The function returns the following values:
- gint: physical height of the monitor.
func (*Monitor) IsValid ¶
IsValid returns TRUE if the monitor object corresponds to a physical monitor.
The monitor becomes invalid when the physical monitor is unplugged or removed.
The function returns the following values:
- ok: TRUE if the object corresponds to a physical monitor.
func (*Monitor) Manufacturer ¶
Manufacturer gets the name or PNP ID of the monitor's manufacturer.
Note that this value might also vary depending on actual display backend.
The PNP ID registry is located at https://uefi.org/pnp_id_list (https://uefi.org/pnp_id_list).
The function returns the following values:
- utf8 (optional): name of the manufacturer, or NULL.
func (*Monitor) Model ¶
Model gets the string identifying the monitor model, if available.
The function returns the following values:
- utf8 (optional): monitor model, or NULL.
func (*Monitor) RefreshRate ¶
RefreshRate gets the refresh rate of the monitor, if available.
The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.
The function returns the following values:
- gint: refresh rate in milli-Hertz, or 0.
func (*Monitor) ScaleFactor ¶
ScaleFactor gets the internal scale factor that maps from monitor coordinates to device pixels.
On traditional systems this is 1, but on very high density outputs it can be a higher value (often 2).
This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a surface where it is better to use gdk.Surface.GetScaleFactor() instead.
The function returns the following values:
- gint: scale factor.
func (*Monitor) SubpixelLayout ¶
func (monitor *Monitor) SubpixelLayout() SubpixelLayout
SubpixelLayout gets information about the layout of red, green and blue primaries for pixels.
The function returns the following values:
- subpixelLayout: subpixel layout.
type MotionEvent ¶
type MotionEvent struct { Event // contains filtered or unexported fields }
MotionEvent: event related to a pointer or touch device motion.
type NotifyType ¶
NotifyType specifies the kind of crossing for enter and leave events.
See the X11 protocol specification of LeaveNotify for full details of crossing event generation.
const ( // NotifyAncestor: surface is entered from an ancestor or left towards an // ancestor. NotifyAncestor NotifyType = iota // NotifyVirtual: pointer moves between an ancestor and an inferior of the // surface. NotifyVirtual // NotifyInferior: surface is entered from an inferior or left towards an // inferior. NotifyInferior // NotifyNonlinear: surface is entered from or left towards a surface which // is neither an ancestor nor an inferior. NotifyNonlinear // NotifyNonlinearVirtual: pointer moves between two surfaces which are not // ancestors of each other and the surface is part of the ancestor chain // between one of these surfaces and their least common ancestor. NotifyNonlinearVirtual // NotifyUnknown: unknown type of enter/leave event occurred. NotifyUnknown )
func (NotifyType) String ¶
func (n NotifyType) String() string
String returns the name in string for NotifyType.
type PadEvent ¶
type PadEvent struct { Event // contains filtered or unexported fields }
PadEvent: event related to a pad-based device.
func (*PadEvent) AxisValue ¶
AxisValue extracts the information from a pad strip or ring event.
The function returns the following values:
- index: return location for the axis index.
- value: return location for the axis value.
type Paintable ¶
Paintable: GdkPaintable is a simple interface used by GTK to represent content that can be painted.
The content of a GdkPaintable can be painted anywhere at any size without requiring any sort of layout. The interface is inspired by similar concepts elsewhere, such as ClutterContent (https://developer.gnome.org/clutter/stable/ClutterContent.html), HTML/CSS Paint Sources (https://www.w3.org/TR/css-images-4/#paint-source), or SVG Paint Servers (https://www.w3.org/TR/SVG2/pservers.html).
A GdkPaintable can be snapshot at any time and size using gdk.Paintable.Snapshot(). How the paintable interprets that size and if it scales or centers itself into the given rectangle is implementation defined, though if you are implementing a GdkPaintable and don't know what to do, it is suggested that you scale your paintable ignoring any potential aspect ratio.
The contents that a GdkPaintable produces may depend on the gdksnapshot passed to it. For example, paintables may decide to use more detailed images on higher resolution screens or when OpenGL is available. A GdkPaintable will however always produce the same output for the same snapshot.
A GdkPaintable may change its contents, meaning that it will now produce a different output with the same snapshot. Once that happens, it will call gdk.Paintable.InvalidateContents() which will emit the gdkpaintable::invalidate-contents signal. If a paintable is known to never change its contents, it will set the GDK_PAINTABLE_STATIC_CONTENTS flag. If a consumer cannot deal with changing contents, it may call gdk.Paintable.GetCurrentImage() which will return a static paintable and use that.
A paintable can report an intrinsic (or preferred) size or aspect ratio it wishes to be rendered at, though it doesn't have to. Consumers of the interface can use this information to layout thepaintable appropriately. Just like the contents, the size of a paintable can change. A paintable will indicate this by calling gdk.Paintable.InvalidateSize() which will emit the gdkpaintable::invalidate-size signal. And just like for contents, if a paintable is known to never change its size, it will set the GDK_PAINTABLE_STATIC_SIZE flag.
Besides API for applications, there are some functions that are only useful for implementing subclasses and should not be used by applications: gdk.Paintable.InvalidateContents(), gdk.Paintable.InvalidateSize(), gdk.Paintable().NewEmpty.
Paintable wraps an interface. This means the user can get the underlying type by calling Cast().
func NewPaintableEmpty ¶
NewPaintableEmpty returns a paintable that has the given intrinsic size and draws nothing.
This is often useful for implementing the PaintableInterface.get_current_image() virtual function when the paintable is in an incomplete state (like a gtk.MediaStream before receiving the first frame).
The function takes the following parameters:
- intrinsicWidth: intrinsic width to report. Can be 0 for no width.
- intrinsicHeight: intrinsic height to report. Can be 0 for no height.
The function returns the following values:
- paintable: GdkPaintable.
func (*Paintable) ComputeConcreteSize ¶
func (paintable *Paintable) ComputeConcreteSize(specifiedWidth, specifiedHeight, defaultWidth, defaultHeight float64) (concreteWidth, concreteHeight float64)
ComputeConcreteSize: compute a concrete size for the GdkPaintable.
Applies the sizing algorithm outlined in the CSS Image spec (https://drafts.csswg.org/css-images-3/#default-sizing) to the given paintable. See that link for more details.
It is not necessary to call this function when both specified_width and specified_height are known, but it is useful to call this function in GtkWidget:measure implementations to compute the other dimension when only one dimension is given.
The function takes the following parameters:
- specifiedWidth: width paintable could be drawn into or 0.0 if unknown.
- specifiedHeight: height paintable could be drawn into or 0.0 if unknown.
- defaultWidth: width paintable would be drawn into if no other constraints were given.
- defaultHeight: height paintable would be drawn into if no other constraints were given.
The function returns the following values:
- concreteWidth will be set to the concrete width computed.
- concreteHeight will be set to the concrete height computed.
func (*Paintable) ConnectInvalidateContents ¶
func (paintable *Paintable) ConnectInvalidateContents(f func()) coreglib.SignalHandle
ConnectInvalidateContents is emitted when the contents of the paintable change.
Examples for such an event would be videos changing to the next frame or the icon theme for an icon changing.
func (*Paintable) ConnectInvalidateSize ¶
func (paintable *Paintable) ConnectInvalidateSize(f func()) coreglib.SignalHandle
ConnectInvalidateSize is emitted when the intrinsic size of the paintable changes.
This means the values reported by at least one of gdk.Paintable.GetIntrinsicWidth(), gdk.Paintable.GetIntrinsicHeight() or gdk.Paintable.GetIntrinsicAspectRatio() has changed.
Examples for such an event would be a paintable displaying the contents of a toplevel surface being resized.
func (*Paintable) CurrentImage ¶
CurrentImage gets an immutable paintable for the current contents displayed by paintable.
This is useful when you want to retain the current state of an animation, for example to take a screenshot of a running animation.
If the paintable is already immutable, it will return itself.
The function returns the following values:
- ret: immutable paintable for the current contents of paintable.
func (*Paintable) Flags ¶
func (paintable *Paintable) Flags() PaintableFlags
Flags: get flags for the paintable.
This is oftentimes useful for optimizations.
See gdk.PaintableFlags for the flags and what they mean.
The function returns the following values:
- paintableFlags: GdkPaintableFlags for this paintable.
func (*Paintable) IntrinsicAspectRatio ¶
IntrinsicAspectRatio gets the preferred aspect ratio the paintable would like to be displayed at.
The aspect ratio is the width divided by the height, so a value of 0.5 means that the paintable prefers to be displayed twice as high as it is wide. Consumers of this interface can use this to preserve aspect ratio when displaying the paintable.
This is a purely informational value and does not in any way limit the values that may be passed to gdk.Paintable.Snapshot().
Usually when a paintable returns nonzero values from gdk.Paintable.GetIntrinsicWidth() and gdk.Paintable.GetIntrinsicHeight() the aspect ratio should conform to those values, though that is not required.
If the paintable does not have a preferred aspect ratio, it returns 0. Negative values are never returned.
The function returns the following values:
- gdouble: intrinsic aspect ratio of paintable or 0 if none.
func (*Paintable) IntrinsicHeight ¶
IntrinsicHeight gets the preferred height the paintable would like to be displayed at.
Consumers of this interface can use this to reserve enough space to draw the paintable.
This is a purely informational value and does not in any way limit the values that may be passed to gdk.Paintable.Snapshot().
If the paintable does not have a preferred height, it returns 0. Negative values are never returned.
The function returns the following values:
- gint: intrinsic height of paintable or 0 if none.
func (*Paintable) IntrinsicWidth ¶
IntrinsicWidth gets the preferred width the paintable would like to be displayed at.
Consumers of this interface can use this to reserve enough space to draw the paintable.
This is a purely informational value and does not in any way limit the values that may be passed to gdk.Paintable.Snapshot().
If the paintable does not have a preferred width, it returns 0. Negative values are never returned.
The function returns the following values:
- gint: intrinsic width of paintable or 0 if none.
func (*Paintable) InvalidateContents ¶
func (paintable *Paintable) InvalidateContents()
InvalidateContents: called by implementations of GdkPaintable to invalidate their contents.
Unless the contents are invalidated, implementations must guarantee that multiple calls of gdk.Paintable.Snapshot() produce the same output.
This function will emit the gdk.Paintable::invalidate-contents signal.
If a paintable reports the GDK_PAINTABLE_STATIC_CONTENTS flag, it must not call this function.
func (*Paintable) InvalidateSize ¶
func (paintable *Paintable) InvalidateSize()
InvalidateSize: called by implementations of GdkPaintable to invalidate their size.
As long as the size is not invalidated, paintable must return the same values for its intrinsic width, height and aspect ratio.
This function will emit the gdk.Paintable::invalidate-size signal.
If a paintable reports the GDK_PAINTABLE_STATIC_SIZE flag, it must not call this function.
func (*Paintable) Snapshot ¶
func (paintable *Paintable) Snapshot(snapshot Snapshotter, width, height float64)
Snapshot snapshots the given paintable with the given width and height.
The paintable is drawn at the current (0,0) offset of the snapshot. If width and height are not larger than zero, this function will do nothing.
The function takes the following parameters:
- snapshot: GdkSnapshot to snapshot to.
- width to snapshot in.
- height to snapshot in.
type PaintableFlags ¶
PaintableFlags flags about a paintable object.
Implementations use these for optimizations such as caching.
const ( // PaintableStaticSize: size is immutable. The gdkpaintable::invalidate-size // signal will never be emitted. PaintableStaticSize PaintableFlags = 0b1 // PaintableStaticContents: content is immutable. The // gdkpaintable::invalidate-contents signal will never be emitted. PaintableStaticContents PaintableFlags = 0b10 )
func (PaintableFlags) Has ¶
func (p PaintableFlags) Has(other PaintableFlags) bool
Has returns true if p contains other.
func (PaintableFlags) String ¶
func (p PaintableFlags) String() string
String returns the names in string for PaintableFlags.
type PaintableInterface ¶ added in v0.0.5
type PaintableInterface struct {
// contains filtered or unexported fields
}
PaintableInterface: list of functions that can be implemented for the GdkPaintable interface.
Note that apart from the PaintableInterface.snapshot() function, no virtual function of this interface is mandatory to implement, though it is a good idea to implement PaintableInterface.get_current_image() for non-static paintables and PaintableInterface.get_flags() if the image is not dynamic as the default implementation returns no flags and that will make the implementation likely quite slow.
An instance of this type is always passed by reference.
type Paintabler ¶
type Paintabler interface { coreglib.Objector // ComputeConcreteSize: compute a concrete size for the GdkPaintable. ComputeConcreteSize(specifiedWidth, specifiedHeight, defaultWidth, defaultHeight float64) (concreteWidth, concreteHeight float64) // CurrentImage gets an immutable paintable for the current contents // displayed by paintable. CurrentImage() *Paintable // Flags: get flags for the paintable. Flags() PaintableFlags // IntrinsicAspectRatio gets the preferred aspect ratio the paintable would // like to be displayed at. IntrinsicAspectRatio() float64 // IntrinsicHeight gets the preferred height the paintable would like to be // displayed at. IntrinsicHeight() int // IntrinsicWidth gets the preferred width the paintable would like to be // displayed at. IntrinsicWidth() int // InvalidateContents: called by implementations of GdkPaintable to // invalidate their contents. InvalidateContents() // InvalidateSize: called by implementations of GdkPaintable to invalidate // their size. InvalidateSize() // Snapshot snapshots the given paintable with the given width and height. Snapshot(snapshot Snapshotter, width, height float64) // Invalidate-contents is emitted when the contents of the paintable change. ConnectInvalidateContents(func()) coreglib.SignalHandle // Invalidate-size is emitted when the intrinsic size of the paintable // changes. ConnectInvalidateSize(func()) coreglib.SignalHandle }
Paintabler describes Paintable's interface methods.
type Popup ¶
type Popup struct { Surface // contains filtered or unexported fields }
Popup: GdkPopup is a surface that is attached to another surface.
The GdkPopup is positioned relative to its parent surface.
GdkPopups are typically used to implement menus and similar popups. They can be modal, which is indicated by the gdkpopup:autohide property.
Popup wraps an interface. This means the user can get the underlying type by calling Cast().
func (*Popup) Autohide ¶
Autohide returns whether this popup is set to hide on outside clicks.
The function returns the following values:
- ok: TRUE if popup will autohide.
func (*Popup) Parent ¶
Parent returns the parent surface of a popup.
The function returns the following values:
- surface: parent surface.
func (*Popup) PositionX ¶
PositionX obtains the position of the popup relative to its parent.
The function returns the following values:
- gint: x coordinate of popup position.
func (*Popup) PositionY ¶
PositionY obtains the position of the popup relative to its parent.
The function returns the following values:
- gint: y coordinate of popup position.
func (*Popup) Present ¶
func (popup *Popup) Present(width, height int, layout *PopupLayout) bool
Present popup after having processed the PopupLayout rules.
If the popup was previously now showing, it will be showed, otherwise it will change position according to layout.
After calling this function, the result should be handled in response to the gdksurface::layout signal being emitted. The resulting popup position can be queried using gdk.Popup.GetPositionX(), gdk.Popup.GetPositionY(), and the resulting size will be sent as parameters in the layout signal. Use gdk.Popup.GetRectAnchor() and gdk.Popup.GetSurfaceAnchor() to get the resulting anchors.
Presenting may fail, for example if the popup is set to autohide and is immediately hidden upon being presented. If presenting failed, the gdk.Surface::layout signal will not me emitted.
The function takes the following parameters:
- width: unconstrained popup width to layout.
- height: unconstrained popup height to layout.
- layout: GdkPopupLayout object used to layout.
The function returns the following values:
- ok: FALSE if it failed to be presented, otherwise TRUE.
func (*Popup) RectAnchor ¶
RectAnchor gets the current popup rectangle anchor.
The value returned may change after calling gdk.Popup.Present(), or after the gdk.Surface::layout signal is emitted.
The function returns the following values:
- gravity: current rectangle anchor value of popup.
func (*Popup) SurfaceAnchor ¶
SurfaceAnchor gets the current popup surface anchor.
The value returned may change after calling gdk.Popup.Present(), or after the gdk.Surface::layout signal is emitted.
The function returns the following values:
- gravity: current surface anchor value of popup.
type PopupLayout ¶
type PopupLayout struct {
// contains filtered or unexported fields
}
PopupLayout: GdkPopupLayout struct contains information that is necessary position a gdk.Popup relative to its parent.
The positioning requires a negotiation with the windowing system, since it depends on external constraints, such as the position of the parent surface, and the screen dimensions.
The basic ingredients are a rectangle on the parent surface, and the anchor on both that rectangle and the popup. The anchors specify a side or corner to place next to each other.
!Popup anchors (popup-anchors.png)
For cases where placing the anchors next to each other would make the popup extend offscreen, the layout includes some hints for how to resolve this problem. The hints may suggest to flip the anchor position to the other side, or to 'slide' the popup along a side, or to resize it.
!Flipping popups (popup-flip.png)
!Sliding popups (popup-slide.png)
These hints may be combined.
Ultimatively, it is up to the windowing system to determine the position and size of the popup. You can learn about the result by calling gdk.Popup.GetPositionX(), gdk.Popup.GetPositionY(), gdk.Popup.GetRectAnchor() and gdk.Popup.GetSurfaceAnchor() after the popup has been presented. This can be used to adjust the rendering. For example, gtk.Popover changes its arrow position accordingly. But you have to be careful avoid changing the size of the popover, or it has to be presented again.
An instance of this type is always passed by reference.
func NewPopupLayout ¶
func NewPopupLayout(anchorRect *Rectangle, rectAnchor Gravity, surfaceAnchor Gravity) *PopupLayout
NewPopupLayout constructs a struct PopupLayout.
func (*PopupLayout) AnchorHints ¶
func (layout *PopupLayout) AnchorHints() AnchorHints
AnchorHints: get the GdkAnchorHints.
The function returns the following values:
- anchorHints: GdkAnchorHints.
func (*PopupLayout) AnchorRect ¶
func (layout *PopupLayout) AnchorRect() *Rectangle
AnchorRect: get the anchor rectangle.
The function returns the following values:
- rectangle: anchor rectangle.
func (*PopupLayout) Copy ¶
func (layout *PopupLayout) Copy() *PopupLayout
Copy makes a copy of layout.
The function returns the following values:
- popupLayout: copy of layout.
func (*PopupLayout) Equal ¶
func (layout *PopupLayout) Equal(other *PopupLayout) bool
Equal: check whether layout and other has identical layout properties.
The function takes the following parameters:
- other GdkPopupLayout.
The function returns the following values:
- ok: TRUE if layout and other have identical layout properties, otherwise FALSE.
func (*PopupLayout) Offset ¶
func (layout *PopupLayout) Offset() (dx int, dy int)
Offset retrieves the offset for the anchor rectangle.
The function returns the following values:
- dx: return location for the delta X coordinate.
- dy: return location for the delta Y coordinate.
func (*PopupLayout) RectAnchor ¶
func (layout *PopupLayout) RectAnchor() Gravity
RectAnchor returns the anchor position on the anchor rectangle.
The function returns the following values:
- gravity: anchor on the anchor rectangle.
func (*PopupLayout) SetAnchorHints ¶
func (layout *PopupLayout) SetAnchorHints(anchorHints AnchorHints)
SetAnchorHints: set new anchor hints.
The set anchor_hints determines how surface will be moved if the anchor points cause it to move off-screen. For example, GDK_ANCHOR_FLIP_X will replace GDK_GRAVITY_NORTH_WEST with GDK_GRAVITY_NORTH_EAST and vice versa if surface extends beyond the left or right edges of the monitor.
The function takes the following parameters:
- anchorHints: new GdkAnchorHints.
func (*PopupLayout) SetAnchorRect ¶
func (layout *PopupLayout) SetAnchorRect(anchorRect *Rectangle)
SetAnchorRect: set the anchor rectangle.
The function takes the following parameters:
- anchorRect: new anchor rectangle.
func (*PopupLayout) SetOffset ¶
func (layout *PopupLayout) SetOffset(dx int, dy int)
SetOffset: offset the position of the anchor rectangle with the given delta.
The function takes the following parameters:
- dx: x delta to offset the anchor rectangle with.
- dy: y delta to offset the anchor rectangle with.
func (*PopupLayout) SetRectAnchor ¶
func (layout *PopupLayout) SetRectAnchor(anchor Gravity)
SetRectAnchor: set the anchor on the anchor rectangle.
The function takes the following parameters:
- anchor: new rect anchor.
func (*PopupLayout) SetShadowWidth ¶
func (layout *PopupLayout) SetShadowWidth(left int, right int, top int, bottom int)
SetShadowWidth sets the shadow width of the popup.
The shadow width corresponds to the part of the computed surface size that would consist of the shadow margin surrounding the window, would there be any.
The function takes the following parameters:
- left: width of the left part of the shadow.
- right: width of the right part of the shadow.
- top: height of the top part of the shadow.
- bottom: height of the bottom part of the shadow.
func (*PopupLayout) SetSurfaceAnchor ¶
func (layout *PopupLayout) SetSurfaceAnchor(anchor Gravity)
SetSurfaceAnchor: set the anchor on the popup surface.
The function takes the following parameters:
- anchor: new popup surface anchor.
func (*PopupLayout) ShadowWidth ¶
func (layout *PopupLayout) ShadowWidth() (left int, right int, top int, bottom int)
ShadowWidth obtains the shadow widths of this layout.
The function returns the following values:
- left: return location for the left shadow width.
- right: return location for the right shadow width.
- top: return location for the top shadow width.
- bottom: return location for the bottom shadow width.
func (*PopupLayout) SurfaceAnchor ¶
func (layout *PopupLayout) SurfaceAnchor() Gravity
SurfaceAnchor returns the anchor position on the popup surface.
The function returns the following values:
- gravity: anchor on the popup surface.
type Popupper ¶
type Popupper interface { coreglib.Objector // Autohide returns whether this popup is set to hide on outside clicks. Autohide() bool // Parent returns the parent surface of a popup. Parent() Surfacer // PositionX obtains the position of the popup relative to its parent. PositionX() int // PositionY obtains the position of the popup relative to its parent. PositionY() int // RectAnchor gets the current popup rectangle anchor. RectAnchor() Gravity // SurfaceAnchor gets the current popup surface anchor. SurfaceAnchor() Gravity // Present popup after having processed the PopupLayout rules. Present(width, height int, layout *PopupLayout) bool }
Popupper describes Popup's interface methods.
type ProximityEvent ¶
type ProximityEvent struct { Event // contains filtered or unexported fields }
ProximityEvent: event related to the proximity of a tool to a device.
type RGBA ¶
type RGBA struct {
// contains filtered or unexported fields
}
RGBA: GdkRGBA is used to represent a color, in a way that is compatible with cairo’s notion of color.
GdkRGBA is a convenient way to pass colors around. It’s based on cairo’s way to deal with colors and mirrors its behavior. All values are in the range from 0.0 to 1.0 inclusive. So the color (0.0, 0.0, 0.0, 0.0) represents transparent black and (1.0, 1.0, 1.0, 1.0) is opaque white. Other values will be clamped to this range when drawing.
An instance of this type is always passed by reference.
func NewRGBA ¶
NewRGBA creates a new RGBA instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!
func (*RGBA) Alpha ¶
Alpha: opacity of the color from 0.0 for completely translucent to 1.0 for opaque.
func (*RGBA) Copy ¶
Copy makes a copy of a GdkRGBA.
The result must be freed through gdk.RGBA.Free().
The function returns the following values:
- rgbA: newly allocated GdkRGBA, with the same contents as rgba.
func (*RGBA) Equal ¶
Equal compares two GdkRGBA colors.
The function takes the following parameters:
- p2: another GdkRGBA.
The function returns the following values:
- ok: TRUE if the two colors compare equal.
func (*RGBA) Hash ¶
Hash: hash function suitable for using for a hash table that stores GdkRGBAs.
The function returns the following values:
- guint: hash value for p.
func (*RGBA) IsClear ¶
IsClear checks if an rgba value is transparent.
That is, drawing with the value would not produce any change.
The function returns the following values:
- ok: TRUE if the rgba is clear.
func (*RGBA) IsOpaque ¶
IsOpaque checks if an rgba value is opaque.
That is, drawing with the value will not retain any results from previous contents.
The function returns the following values:
- ok: TRUE if the rgba is opaque.
func (*RGBA) Parse ¶
Parse parses a textual representation of a color.
The string can be either one of:
- A standard name (Taken from the X11 rgb.txt file).
- A hexadecimal value in the form “\#rgb”, “\#rrggbb”, “\#rrrgggbbb” or ”\#rrrrggggbbbb”
- A hexadecimal value in the form “\#rgba”, “\#rrggbbaa”, or ”\#rrrrggggbbbbaaaa”
- A RGB color in the form “rgb(r,g,b)” (In this case the color will have full opacity)
- A RGBA color in the form “rgba(r,g,b,a)”
Where “r”, “g”, “b” and “a” are respectively the red, green, blue and alpha color values. In the last two cases, “r”, “g”, and “b” are either integers in the range 0 to 255 or percentage values in the range 0% to 100%, and a is a floating point value in the range 0 to 1.
The function takes the following parameters:
- spec: string specifying the color.
The function returns the following values:
- ok: TRUE if the parsing succeeded.
func (*RGBA) SetAlpha ¶
Alpha: opacity of the color from 0.0 for completely translucent to 1.0 for opaque.
func (*RGBA) String ¶
String returns a textual specification of rgba in the form rgb(r,g,b) or rgba(r,g,b,a), where “r”, “g”, “b” and “a” represent the red, green, blue and alpha values respectively. “r”, “g”, and “b” are represented as integers in the range 0 to 255, and “a” is represented as a floating point value in the range 0 to 1.
These string forms are string forms that are supported by the CSS3 colors module, and can be parsed by gdk.RGBA.Parse().
Note that this string representation may lose some precision, since “r”, “g” and “b” are represented as 8-bit integers. If this is a concern, you should use a different representation.
The function returns the following values:
- utf8: newly allocated text string.
type Rectangle ¶
type Rectangle struct {
// contains filtered or unexported fields
}
Rectangle: GdkRectangle data type for representing rectangles.
GdkRectangle is identical to cairo_rectangle_t. Together with Cairo’s cairo_region_t data type, these are the central types for representing sets of pixels.
The intersection of two rectangles can be computed with gdk.Rectangle.Intersect(); to find the union of two rectangles use gdk.Rectangle.Union().
The cairo_region_t type provided by Cairo is usually used for managing non-rectangular clipping of graphical operations.
The Graphene library has a number of other data types for regions and volumes in 2D and 3D.
An instance of this type is always passed by reference.
func NewRectangle ¶
NewRectangle creates a new Rectangle instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!
func (*Rectangle) ContainsPoint ¶
ContainsPoint returns UE if rect contains the point described by x and y.
The function takes the following parameters:
- x: x coordinate.
- y: y coordinate.
The function returns the following values:
- ok if rect contains the point.
func (*Rectangle) Equal ¶
Equal checks if the two given rectangles are equal.
The function takes the following parameters:
- rect2: GdkRectangle.
The function returns the following values:
- ok: TRUE if the rectangles are equal.
func (*Rectangle) Intersect ¶
Intersect calculates the intersection of two rectangles.
It is allowed for dest to be the same as either src1 or src2. If the rectangles do not intersect, dest’s width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass NULL for dest.
The function takes the following parameters:
- src2: GdkRectangle.
The function returns the following values:
- dest (optional): return location for the intersection of src1 and src2, or NULL.
- ok: TRUE if the rectangles intersect.
func (*Rectangle) Union ¶
Union calculates the union of two rectangles.
The union of rectangles src1 and src2 is the smallest rectangle which includes both src1 and src2 within it. It is allowed for dest to be the same as either src1 or src2.
Note that this function does not ignore 'empty' rectangles (ie. with zero width or height).
The function takes the following parameters:
- src2: GdkRectangle.
The function returns the following values:
- dest: return location for the union of src1 and src2.
type ScrollDirection ¶
ScrollDirection specifies the direction for scroll events.
const ( // ScrollUp: surface is scrolled up. ScrollUp ScrollDirection = iota // ScrollDown: surface is scrolled down. ScrollDown // ScrollLeft: surface is scrolled to the left. ScrollLeft // ScrollRight: surface is scrolled to the right. ScrollRight // ScrollSmooth: scrolling is determined by the delta values in scroll // events. See gdk_scroll_event_get_deltas(). ScrollSmooth )
func (ScrollDirection) String ¶
func (s ScrollDirection) String() string
String returns the name in string for ScrollDirection.
type ScrollEvent ¶
type ScrollEvent struct { Event // contains filtered or unexported fields }
ScrollEvent: event related to a scrolling motion.
func (*ScrollEvent) Deltas ¶
func (event *ScrollEvent) Deltas() (deltaX, deltaY float64)
Deltas extracts the scroll deltas of a scroll event.
The deltas will be zero unless the scroll direction is GDK_SCROLL_SMOOTH.
The function returns the following values:
- deltaX: return location for x scroll delta.
- deltaY: return location for y scroll delta.
func (*ScrollEvent) Direction ¶
func (event *ScrollEvent) Direction() ScrollDirection
Direction extracts the direction of a scroll event.
The function returns the following values:
- scrollDirection: scroll direction of event.
func (*ScrollEvent) IsStop ¶
func (event *ScrollEvent) IsStop() bool
IsStop: check whether a scroll event is a stop scroll event.
Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity.
Stop scroll events always have a delta of 0/0.
The function returns the following values:
- ok: TRUE if the event is a scroll stop event.
type Seat ¶
Seat: GdkSeat object represents a collection of input devices that belong to a user.
func (*Seat) Capabilities ¶
func (seat *Seat) Capabilities() SeatCapabilities
Capabilities returns the capabilities this GdkSeat currently has.
The function returns the following values:
- seatCapabilities: seat capabilities.
func (*Seat) ConnectDeviceAdded ¶
func (seat *Seat) ConnectDeviceAdded(f func(device Devicer)) coreglib.SignalHandle
ConnectDeviceAdded is emitted when a new input device is related to this seat.
func (*Seat) ConnectDeviceRemoved ¶
func (seat *Seat) ConnectDeviceRemoved(f func(device Devicer)) coreglib.SignalHandle
ConnectDeviceRemoved is emitted when an input device is removed (e.g. unplugged).
func (*Seat) ConnectToolAdded ¶
func (seat *Seat) ConnectToolAdded(f func(tool *DeviceTool)) coreglib.SignalHandle
ConnectToolAdded is emitted whenever a new tool is made known to the seat.
The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the [signalGdkDevice::tool-changed] signal accordingly.
A same tool may be used by several devices.
func (*Seat) ConnectToolRemoved ¶
func (seat *Seat) ConnectToolRemoved(f func(tool *DeviceTool)) coreglib.SignalHandle
ConnectToolRemoved is emitted whenever a tool is no longer known to this seat.
func (*Seat) Devices ¶
func (seat *Seat) Devices(capabilities SeatCapabilities) []Devicer
Devices returns the devices that match the given capabilities.
The function takes the following parameters:
- capabilities to get devices for.
The function returns the following values:
- list: list of GdkDevices. The list must be freed with g_list_free(), the elements are owned by GTK and must not be freed.
func (*Seat) Display ¶
Display returns the GdkDisplay this seat belongs to.
The function returns the following values:
- display: GdkDisplay. This object is owned by GTK and must not be freed.
func (*Seat) Keyboard ¶
Keyboard returns the device that routes keyboard events.
The function returns the following values:
- device (optional): GdkDevice with keyboard capabilities. This object is owned by GTK and must not be freed.
func (*Seat) Pointer ¶
Pointer returns the device that routes pointer events.
The function returns the following values:
- device (optional): GdkDevice with pointer capabilities. This object is owned by GTK and must not be freed.
func (*Seat) Tools ¶
func (seat *Seat) Tools() []*DeviceTool
Tools returns all GdkDeviceTools that are known to the application.
The function returns the following values:
- list: A list of tools. Free with g_list_free().
type SeatCapabilities ¶
SeatCapabilities flags describing the seat capabilities.
const ( // SeatCapabilityNone: no input capabilities. SeatCapabilityNone SeatCapabilities = 0b0 // SeatCapabilityPointer: seat has a pointer (e.g. mouse). SeatCapabilityPointer SeatCapabilities = 0b1 // SeatCapabilityTouch: seat has touchscreen(s) attached. SeatCapabilityTouch SeatCapabilities = 0b10 // SeatCapabilityTabletStylus: seat has drawing tablet(s) attached. SeatCapabilityTabletStylus SeatCapabilities = 0b100 // SeatCapabilityKeyboard: seat has keyboard(s) attached. SeatCapabilityKeyboard SeatCapabilities = 0b1000 // SeatCapabilityTabletPad: seat has drawing tablet pad(s) attached. SeatCapabilityTabletPad SeatCapabilities = 0b10000 // SeatCapabilityAllPointing: union of all pointing capabilities. SeatCapabilityAllPointing SeatCapabilities = 0b111 // SeatCapabilityAll: union of all capabilities. SeatCapabilityAll SeatCapabilities = 0b1111 )
func (SeatCapabilities) Has ¶
func (s SeatCapabilities) Has(other SeatCapabilities) bool
Has returns true if s contains other.
func (SeatCapabilities) String ¶
func (s SeatCapabilities) String() string
String returns the names in string for SeatCapabilities.
type Seater ¶
Seater describes types inherited from class Seat.
To get the original type, the caller must assert this to an interface or another type.
type Snapshot ¶
Snapshot: base type for snapshot operations.
The subclass of GdkSnapshot used by GTK is gtk.Snapshot.
func BaseSnapshot ¶
func BaseSnapshot(obj Snapshotter) *Snapshot
BaseSnapshot returns the underlying base object.
type Snapshotter ¶
Snapshotter describes types inherited from class Snapshot.
To get the original type, the caller must assert this to an interface or another type.
type SubpixelLayout ¶
SubpixelLayout: this enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.
const ( // SubpixelLayoutUnknown: layout is not known. SubpixelLayoutUnknown SubpixelLayout = iota // SubpixelLayoutNone: not organized in this way. SubpixelLayoutNone // SubpixelLayoutHorizontalRGB: layout is horizontal, the order is RGB. SubpixelLayoutHorizontalRGB // SubpixelLayoutHorizontalBGR: layout is horizontal, the order is BGR. SubpixelLayoutHorizontalBGR // SubpixelLayoutVerticalRGB: layout is vertical, the order is RGB. SubpixelLayoutVerticalRGB // SubpixelLayoutVerticalBGR: layout is vertical, the order is BGR. SubpixelLayoutVerticalBGR )
func (SubpixelLayout) String ¶
func (s SubpixelLayout) String() string
String returns the name in string for SubpixelLayout.
type Surface ¶
Surface: GdkSurface is a rectangular region on the screen.
It’s a low-level object, used to implement high-level objects such as gtk.Window or gtk.Dialog in GTK.
The surfaces you see in practice are either gdk.Toplevel or gdk.Popup, and those interfaces provide much of the required API to interact with these surfaces. Other, more specialized surface types exist, but you will rarely interact with them directly.
func BaseSurface ¶
BaseSurface returns the underlying base object.
func NewSurfacePopup ¶
NewSurfacePopup: create a new popup surface.
The surface will be attached to parent and can be positioned relative to it using gdk.Popup.Present().
The function takes the following parameters:
- parent surface to attach the surface to.
- autohide: whether to hide the surface on outside clicks.
The function returns the following values:
- surface: new GdkSurface.
func NewSurfaceToplevel ¶
NewSurfaceToplevel creates a new toplevel surface.
The function takes the following parameters:
- display to create the surface on.
The function returns the following values:
- surface: new GdkSurface.
func (*Surface) Beep ¶
func (surface *Surface) Beep()
Beep emits a short beep associated to surface.
If the display of surface does not support per-surface beeps, emits a short beep on the display just as gdk.Display.Beep().
func (*Surface) ConnectEnterMonitor ¶
func (surface *Surface) ConnectEnterMonitor(f func(monitor *Monitor)) coreglib.SignalHandle
ConnectEnterMonitor is emitted when surface starts being present on the monitor.
func (*Surface) ConnectEvent ¶
func (surface *Surface) ConnectEvent(f func(event Eventer) (ok bool)) coreglib.SignalHandle
ConnectEvent is emitted when GDK receives an input event for surface.
func (*Surface) ConnectLayout ¶
func (surface *Surface) ConnectLayout(f func(width, height int)) coreglib.SignalHandle
ConnectLayout is emitted when the size of surface is changed, or when relayout should be performed.
Surface size is reported in ”application pixels”, not ”device pixels” (see gdk_surface_get_scale_factor()).
func (*Surface) ConnectLeaveMonitor ¶
func (surface *Surface) ConnectLeaveMonitor(f func(monitor *Monitor)) coreglib.SignalHandle
ConnectLeaveMonitor is emitted when surface stops being present on the monitor.
func (*Surface) ConnectRender ¶
ConnectRender is emitted when part of the surface needs to be redrawn.
func (*Surface) CreateCairoContext ¶
func (surface *Surface) CreateCairoContext() CairoContexter
CreateCairoContext creates a new GdkCairoContext for rendering on surface.
The function returns the following values:
- cairoContext: newly created GdkCairoContext.
func (*Surface) CreateGLContext ¶
func (surface *Surface) CreateGLContext() (GLContexter, error)
CreateGLContext creates a new GdkGLContext for the GdkSurface.
The context is disconnected from any particular surface or surface. If the creation of the GdkGLContext failed, error will be set. Before using the returned GdkGLContext, you will need to call gdk.GLContext.MakeCurrent() or gdk.GLContext.Realize().
The function returns the following values:
- glContext: newly created GdkGLContext, or NULL on error.
func (*Surface) CreateSimilarSurface ¶
func (surface *Surface) CreateSimilarSurface(content cairo.Content, width, height int) *cairo.Surface
CreateSimilarSurface: create a new Cairo surface that is as compatible as possible with the given surface.
For example the new surface will have the same fallback resolution and font options as surface. Generally, the new surface will also use the same backend as surface, unless that is not possible for some reason. The type of the returned surface may be examined with cairo_surface_get_type().
Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)
This function always returns a valid pointer, but it will return a pointer to a “nil” surface if other is already in an error state or any other error occurs.
The function takes the following parameters:
- content for the new surface.
- width of the new surface.
- height of the new surface.
The function returns the following values:
- ret: pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it.
func (*Surface) CreateVulkanContext ¶
func (surface *Surface) CreateVulkanContext() (VulkanContexter, error)
CreateVulkanContext creates a new GdkVulkanContext for rendering on surface.
If the creation of the GdkVulkanContext failed, error will be set.
The function returns the following values:
- vulkanContext: newly created GdkVulkanContext, or NULL on error.
func (*Surface) Cursor ¶
Cursor retrieves a GdkCursor pointer for the cursor currently set on the GdkSurface.
If the return value is NULL then there is no custom cursor set on the surface, and it is using the cursor for its parent surface.
The function returns the following values:
- cursor (optional): GdkCursor, or NULL. The returned object is owned by the GdkSurface and should not be unreferenced directly. Use gdk.Surface.SetCursor() to unset the cursor of the surface.
func (*Surface) Destroy ¶
func (surface *Surface) Destroy()
Destroy destroys the window system resources associated with surface and decrements surface's reference count.
The window system resources for all children of surface are also destroyed, but the children’s reference counts are not decremented.
Note that a surface will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens.
func (*Surface) DeviceCursor ¶
DeviceCursor retrieves a GdkCursor pointer for the device currently set on the specified GdkSurface.
If the return value is NULL then there is no custom cursor set on the specified surface, and it is using the cursor for its parent surface.
The function takes the following parameters:
- device: pointer GdkDevice.
The function returns the following values:
- cursor (optional): GdkCursor, or NULL. The returned object is owned by the GdkSurface and should not be unreferenced directly. Use gdk.Surface.SetCursor() to unset the cursor of the surface.
func (*Surface) DevicePosition ¶
func (surface *Surface) DevicePosition(device Devicer) (x, y float64, mask ModifierType, ok bool)
DevicePosition obtains the current device position and modifier state.
The position is given in coordinates relative to the upper left corner of surface.
The function takes the following parameters:
- device: pointer GdkDevice to query to.
The function returns the following values:
- x (optional): return locatio for the X coordinate of device, or NULL.
- y (optional): return location for the Y coordinate of device, or NULL.
- mask (optional): return location for the modifier mask, or NULL.
- ok: TRUE if the device is over the surface.
func (*Surface) Display ¶
Display gets the GdkDisplay associated with a GdkSurface.
The function returns the following values:
- display: GdkDisplay associated with surface.
func (*Surface) FrameClock ¶
func (surface *Surface) FrameClock() FrameClocker
FrameClock gets the frame clock for the surface.
The frame clock for a surface never changes unless the surface is reparented to a new toplevel surface.
The function returns the following values:
- frameClock: frame clock.
func (*Surface) Height ¶
Height returns the height of the given surface.
Surface size is reported in ”application pixels”, not ”device pixels” (see gdk.Surface.GetScaleFactor()).
The function returns the following values:
- gint: height of surface.
func (*Surface) Hide ¶
func (surface *Surface) Hide()
Hide the surface.
For toplevel surfaces, withdraws them, so they will no longer be known to the window manager; for all surfaces, unmaps them, so they won’t be displayed. Normally done automatically as part of gtk.Widget.Hide().
func (*Surface) IsDestroyed ¶
IsDestroyed: check to see if a surface is destroyed.
The function returns the following values:
- ok: TRUE if the surface is destroyed.
func (*Surface) Mapped ¶
Mapped checks whether the surface has been mapped.
A surface is mapped with gdk.Toplevel.Present() or gdk.Popup.Present().
The function returns the following values:
- ok: TRUE if the surface is mapped.
func (*Surface) QueueRender ¶
func (surface *Surface) QueueRender()
QueueRender forces a gdk.Surface::render signal emission for surface to be scheduled.
This function is useful for implementations that track invalid regions on their own.
func (*Surface) RequestLayout ¶
func (surface *Surface) RequestLayout()
RequestLayout: request a layout phase from the surface's frame clock.
See gdk.FrameClock.RequestPhase().
func (*Surface) ScaleFactor ¶
ScaleFactor returns the internal scale factor that maps from surface coordinates to the actual device pixels.
On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2). A higher value means that drawing is automatically scaled up to a higher resolution, so any code doing drawing will automatically look nicer. However, if you are supplying pixel-based data the scale value can be used to determine whether to use a pixel resource with higher resolution data.
The scale of a surface may change during runtime.
The function returns the following values:
- gint: scale factor.
func (*Surface) SetCursor ¶
SetCursor sets the default mouse pointer for a GdkSurface.
Passing NULL for the cursor argument means that surface will use the cursor of its parent surface. Most surfaces should use this default. Note that cursor must be for the same display as surface.
Use gdk.Cursor.NewFromName or gdk.Cursor.NewFromTexture to create the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR.
The function takes the following parameters:
- cursor (optional): GdkCursor.
func (*Surface) SetDeviceCursor ¶
SetDeviceCursor sets a specific GdkCursor for a given device when it gets inside surface.
Passing NULL for the cursor argument means that surface will use the cursor of its parent surface. Most surfaces should use this default.
Use gdk.Cursor.NewFromName or gdk.Cursor.NewFromTexture to create the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR.
The function takes the following parameters:
- device: pointer GdkDevice.
- cursor: GdkCursor.
func (*Surface) SetInputRegion ¶
SetInputRegion: apply the region to the surface for the purpose of event handling.
Mouse events which happen while the pointer position corresponds to an unset bit in the mask will be passed on the surface below surface.
An input region is typically used with RGBA surfaces. The alpha channel of the surface defines which pixels are invisible and allows for nicely antialiased borders, and the input region controls where the surface is “clickable”.
Use gdk.Display.SupportsInputShapes() to find out if a particular backend supports input regions.
The function takes the following parameters:
- region of surface to be reactive.
func (*Surface) SetOpaqueRegion ¶
SetOpaqueRegion marks a region of the GdkSurface as opaque.
For optimisation purposes, compositing window managers may like to not draw obscured regions of surfaces, or turn off blending during for these regions. With RGB windows with no transparency, this is just the shape of the window, but with ARGB32 windows, the compositor does not know what regions of the window are transparent or not.
This function only works for toplevel surfaces.
GTK will update this property automatically if the surface background is opaque, as we know where the opaque regions are. If your surface background is not opaque, please update this property in your WidgetClass.css_changed() handler.
The function takes the following parameters:
- region (optional): region, or NULL.
type SurfaceEdge ¶
SurfaceEdge determines a surface edge or corner.
const ( // SurfaceEdgeNorthWest: top left corner. SurfaceEdgeNorthWest SurfaceEdge = iota // SurfaceEdgeNorth: top edge. SurfaceEdgeNorth // SurfaceEdgeNorthEast: top right corner. SurfaceEdgeNorthEast // SurfaceEdgeWest: left edge. SurfaceEdgeWest // SurfaceEdgeEast: right edge. SurfaceEdgeEast // SurfaceEdgeSouthWest: lower left corner. SurfaceEdgeSouthWest // SurfaceEdgeSouth: lower edge. SurfaceEdgeSouth // SurfaceEdgeSouthEast: lower right corner. SurfaceEdgeSouthEast )
func (SurfaceEdge) String ¶
func (s SurfaceEdge) String() string
String returns the name in string for SurfaceEdge.
type Surfacer ¶
Surfacer describes types inherited from class Surface.
To get the original type, the caller must assert this to an interface or another type.
type Texture ¶
Texture: GdkTexture is the basic element used to refer to pixel data.
It is primarily meant for pixel data that will not change over multiple frames, and will be used for a long time.
There are various ways to create GdkTexture objects from a GdkPixbuf, or a Cairo surface, or other pixel data.
The ownership of the pixel data is transferred to the GdkTexture instance; you can only make a copy of it, via gdk.Texture.Download().
GdkTexture is an immutable object: That means you cannot change anything about it other than increasing the reference count via g_object_ref().
func BaseTexture ¶
BaseTexture returns the underlying base object.
func NewTextureForPixbuf ¶
func NewTextureForPixbuf(pixbuf *gdkpixbuf.Pixbuf) *Texture
NewTextureForPixbuf creates a new texture object representing the GdkPixbuf.
The function takes the following parameters:
- pixbuf: GdkPixbuf.
The function returns the following values:
- texture: new GdkTexture.
func NewTextureFromFile ¶
NewTextureFromFile creates a new texture by loading an image from a file.
The file format is detected automatically. The supported formats are PNG and JPEG, though more formats might be available.
If NULL is returned, then error will be set.
The function takes the following parameters:
- file: GFile to load.
The function returns the following values:
- texture: newly-created GdkTexture or NULL if an error occurred.
func NewTextureFromResource ¶
NewTextureFromResource creates a new texture by loading an image from a resource.
The file format is detected automatically. The supported formats are PNG and JPEG, though more formats might be available.
It is a fatal error if resource_path does not specify a valid image resource and the program will abort if that happens. If you are unsure about the validity of a resource, use gdk.Texture.NewFromFile to load it.
The function takes the following parameters:
- resourcePath: path of the resource file.
The function returns the following values:
- texture: newly-created GdkTexture.
func (*Texture) Height ¶
Height returns the height of the texture, in pixels.
The function returns the following values:
- gint: height of the GdkTexture.
func (*Texture) SaveToPNG ¶
SaveToPNG: store the given texture to the filename as a PNG file.
This is a utility function intended for debugging and testing. If you want more control over formats, proper error handling or want to store to a GFile or other location, you might want to look into using the gdk-pixbuf library.
The function takes the following parameters:
- filename to store to.
The function returns the following values:
- ok: TRUE if saving succeeded, FALSE on failure.
type Texturer ¶
Texturer describes types inherited from class Texture.
To get the original type, the caller must assert this to an interface or another type.
type TimeCoord ¶
type TimeCoord struct {
// contains filtered or unexported fields
}
TimeCoord stores a single event in a motion history.
An instance of this type is always passed by reference.
type Toplevel ¶
type Toplevel struct { Surface // contains filtered or unexported fields }
Toplevel: GdkToplevel is a freestanding toplevel surface.
The GdkToplevel interface provides useful APIs for interacting with the windowing system, such as controlling maximization and size of the surface, setting icons and transient parents for dialogs.
Toplevel wraps an interface. This means the user can get the underlying type by calling Cast().
func (*Toplevel) BeginMove ¶
BeginMove begins an interactive move operation.
You might use this function to implement draggable titlebars.
The function takes the following parameters:
- device used for the operation.
- button being used to drag, or 0 for a keyboard-initiated drag.
- x: surface X coordinate of mouse click that began the drag.
- y: surface Y coordinate of mouse click that began the drag.
- timestamp of mouse click that began the drag (use gdk.Event.GetTime()).
func (*Toplevel) BeginResize ¶
func (toplevel *Toplevel) BeginResize(edge SurfaceEdge, device Devicer, button int, x, y float64, timestamp uint32)
BeginResize begins an interactive resize operation.
You might use this function to implement a “window resize grip.”.
The function takes the following parameters:
- edge or corner from which the drag is started.
- device (optional) used for the operation.
- button being used to drag, or 0 for a keyboard-initiated drag.
- x: surface X coordinate of mouse click that began the drag.
- y: surface Y coordinate of mouse click that began the drag.
- timestamp of mouse click that began the drag (use gdk.Event.GetTime()).
func (*Toplevel) Focus ¶
Focus sets keyboard focus to surface.
In most cases, gtk.Window.PresentWithTime() should be used on a gtk.Window, rather than calling this function.
The function takes the following parameters:
- timestamp of the event triggering the surface focus.
func (*Toplevel) InhibitSystemShortcuts ¶
InhibitSystemShortcuts requests that the toplevel inhibit the system shortcuts.
This is asking the desktop environment/windowing system to let all keyboard events reach the surface, as long as it is focused, instead of triggering system actions.
If granted, the rerouting remains active until the default shortcuts processing is restored with gdk.Toplevel.RestoreSystemShortcuts(), or the request is revoked by the desktop environment, windowing system or the user.
A typical use case for this API is remote desktop or virtual machine viewers which need to inhibit the default system keyboard shortcuts so that the remote session or virtual host gets those instead of the local environment.
The windowing system or desktop environment may ask the user to grant or deny the request or even choose to ignore the request entirely.
The caller can be notified whenever the request is granted or revoked by listening to the gdk.Toplevel:shortcuts-inhibited property.
The function takes the following parameters:
- event (optional): GdkEvent that is triggering the inhibit request, or NULL if none is available.
func (*Toplevel) Lower ¶
Lower asks to lower the toplevel below other windows.
The windowing system may choose to ignore the request.
The function returns the following values:
- ok: TRUE if the surface was lowered.
func (*Toplevel) Minimize ¶
Minimize asks to minimize the toplevel.
The windowing system may choose to ignore the request.
The function returns the following values:
- ok: TRUE if the surface was minimized.
func (*Toplevel) Present ¶
func (toplevel *Toplevel) Present(layout *ToplevelLayout)
Present toplevel after having processed the GdkToplevelLayout rules.
If the toplevel was previously not showing, it will be showed, otherwise it will change layout according to layout.
GDK may emit the gdk.Toplevel::compute-size signal to let the user of this toplevel compute the preferred size of the toplevel surface.
Presenting is asynchronous and the specified layout parameters are not guaranteed to be respected.
The function takes the following parameters:
- layout: GdkToplevelLayout object used to layout.
func (*Toplevel) RestoreSystemShortcuts ¶
func (toplevel *Toplevel) RestoreSystemShortcuts()
RestoreSystemShortcuts: restore default system keyboard shortcuts which were previously inhibited.
This undoes the effect of gdk.Toplevel.InhibitSystemShortcuts().
func (*Toplevel) SetDecorated ¶
SetDecorated sets the toplevel to be decorated.
Setting decorated to FALSE hints the desktop environment that the surface has its own, client-side decorations and does not need to have window decorations added.
The function takes the following parameters:
- decorated: TRUE to request decorations.
func (*Toplevel) SetDeletable ¶
SetDeletable sets the toplevel to be deletable.
Setting deletable to TRUE hints the desktop environment that it should offer the user a way to close the surface.
The function takes the following parameters:
- deletable: TRUE to request a delete button.
func (*Toplevel) SetIconList ¶
SetIconList sets a list of icons for the surface.
One of these will be used to represent the surface in iconic form. The icon may be shown in window lists or task bars. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality.
Note that some platforms don't support surface icons.
The function takes the following parameters:
- surfaces: A list of textures to use as icon, of different sizes.
func (*Toplevel) SetModal ¶
SetModal sets the toplevel to be modal.
The application can use this hint to tell the window manager that a certain surface has modal behaviour. The window manager can use this information to handle modal surfaces in a special way.
You should only use this on surfaces for which you have previously called gdk.Toplevel.SetTransientFor().
The function takes the following parameters:
- modal: TRUE if the surface is modal, FALSE otherwise.
func (*Toplevel) SetStartupID ¶
SetStartupID sets the startup notification ID.
When using GTK, typically you should use gtk.Window.SetStartupID() instead of this low-level function.
The function takes the following parameters:
- startupId: string with startup-notification identifier.
func (*Toplevel) SetTitle ¶
SetTitle sets the title of a toplevel surface.
The title maybe be displayed in the titlebar, in lists of windows, etc.
The function takes the following parameters:
- title of surface.
func (*Toplevel) SetTransientFor ¶
SetTransientFor sets a transient-for parent.
Indicates to the window manager that surface is a transient dialog associated with the application surface parent. This allows the window manager to do things like center surface on parent and keep surface above parent.
See gtk.Window.SetTransientFor() if you’re using gtk.Window or gtk.Dialog.
The function takes the following parameters:
- parent: another toplevel GdkSurface.
func (*Toplevel) ShowWindowMenu ¶
ShowWindowMenu asks the windowing system to show the window menu.
The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations.
The function takes the following parameters:
- event: GdkEvent to show the menu for.
The function returns the following values:
- ok: TRUE if the window menu was shown and FALSE otherwise.
func (*Toplevel) State ¶
func (toplevel *Toplevel) State() ToplevelState
State gets the bitwise or of the currently active surface state flags, from the GdkToplevelState enumeration.
The function returns the following values:
- toplevelState: surface state bitfield.
func (*Toplevel) SupportsEdgeConstraints ¶
SupportsEdgeConstraints returns whether the desktop environment supports tiled window states.
The function returns the following values:
- ok: TRUE if the desktop environment supports tiled window states.
type ToplevelLayout ¶
type ToplevelLayout struct {
// contains filtered or unexported fields
}
ToplevelLayout: GdkToplevelLayout struct contains information that is necessary to present a sovereign window on screen.
The GdkToplevelLayout struct is necessary for using gdk.Toplevel.Present().
Toplevel surfaces are sovereign windows that can be presented to the user in various states (maximized, on all workspaces, etc).
An instance of this type is always passed by reference.
func NewToplevelLayout ¶
func NewToplevelLayout() *ToplevelLayout
NewToplevelLayout constructs a struct ToplevelLayout.
func (*ToplevelLayout) Copy ¶
func (layout *ToplevelLayout) Copy() *ToplevelLayout
Copy: create a new ToplevelLayout and copy the contents of layout into it.
The function returns the following values:
- toplevelLayout: copy of layout.
func (*ToplevelLayout) Equal ¶
func (layout *ToplevelLayout) Equal(other *ToplevelLayout) bool
Equal: check whether layout and other has identical layout properties.
The function takes the following parameters:
- other ToplevelLayout.
The function returns the following values:
- ok: TRUE if layout and other have identical layout properties, otherwise FALSE.
func (*ToplevelLayout) Fullscreen ¶
func (layout *ToplevelLayout) Fullscreen() (fullscreen bool, ok bool)
Fullscreen: if the layout specifies whether to the toplevel should go fullscreen, the value pointed to by fullscreen is set to TRUE if it should go fullscreen, or FALSE, if it should go unfullscreen.
The function returns the following values:
- fullscreen: location to store whether the toplevel should be fullscreen.
- ok: whether the layout specifies the fullscreen state for the toplevel.
func (*ToplevelLayout) FullscreenMonitor ¶
func (layout *ToplevelLayout) FullscreenMonitor() *Monitor
FullscreenMonitor returns the monitor that the layout is fullscreening the surface on.
The function returns the following values:
- monitor (optional) on which layout fullscreens.
func (*ToplevelLayout) Maximized ¶
func (layout *ToplevelLayout) Maximized() (maximized bool, ok bool)
Maximized: if the layout specifies whether to the toplevel should go maximized, the value pointed to by maximized is set to TRUE if it should go fullscreen, or FALSE, if it should go unmaximized.
The function returns the following values:
- maximized: set to TRUE if the toplevel should be maximized.
- ok: whether the layout specifies the maximized state for the toplevel.
func (*ToplevelLayout) Resizable ¶
func (layout *ToplevelLayout) Resizable() bool
Resizable returns whether the layout should allow the user to resize the surface.
The function returns the following values:
- ok: TRUE if the layout is resizable.
func (*ToplevelLayout) SetFullscreen ¶
func (layout *ToplevelLayout) SetFullscreen(fullscreen bool, monitor *Monitor)
SetFullscreen sets whether the layout should cause the surface to be fullscreen when presented.
The function takes the following parameters:
- fullscreen: TRUE to fullscreen the surface.
- monitor (optional) to fullscreen on.
func (*ToplevelLayout) SetMaximized ¶
func (layout *ToplevelLayout) SetMaximized(maximized bool)
SetMaximized sets whether the layout should cause the surface to be maximized when presented.
The function takes the following parameters:
- maximized: TRUE to maximize.
func (*ToplevelLayout) SetResizable ¶
func (layout *ToplevelLayout) SetResizable(resizable bool)
SetResizable sets whether the layout should allow the user to resize the surface after it has been presented.
The function takes the following parameters:
- resizable: TRUE to allow resizing.
type ToplevelState ¶
ToplevelState specifies the state of a toplevel surface.
On platforms that support information about individual edges, the GDK_TOPLEVEL_STATE_TILED state will be set whenever any of the individual tiled states is set. On platforms that lack that support, the tiled state will give an indication of tiledness without any of the per-edge states being set.
const ( // ToplevelStateMinimized: surface is minimized. ToplevelStateMinimized ToplevelState = 0b1 // ToplevelStateMaximized: surface is maximized. ToplevelStateMaximized ToplevelState = 0b10 // ToplevelStateSticky: surface is sticky. ToplevelStateSticky ToplevelState = 0b100 // ToplevelStateFullscreen: surface is maximized without decorations. ToplevelStateFullscreen ToplevelState = 0b1000 // ToplevelStateAbove: surface is kept above other surfaces. ToplevelStateAbove ToplevelState = 0b10000 // ToplevelStateBelow: surface is kept below other surfaces. ToplevelStateBelow ToplevelState = 0b100000 // ToplevelStateFocused: surface is presented as focused (with active // decorations). ToplevelStateFocused ToplevelState = 0b1000000 // ToplevelStateTiled: surface is in a tiled state. ToplevelStateTiled ToplevelState = 0b10000000 // ToplevelStateTopTiled: whether the top edge is tiled. ToplevelStateTopTiled ToplevelState = 0b100000000 // ToplevelStateTopResizable: whether the top edge is resizable. ToplevelStateTopResizable ToplevelState = 0b1000000000 // ToplevelStateRightTiled: whether the right edge is tiled. ToplevelStateRightTiled ToplevelState = 0b10000000000 // ToplevelStateRightResizable: whether the right edge is resizable. ToplevelStateRightResizable ToplevelState = 0b100000000000 // ToplevelStateBottomTiled: whether the bottom edge is tiled. ToplevelStateBottomTiled ToplevelState = 0b1000000000000 // ToplevelStateBottomResizable: whether the bottom edge is resizable. ToplevelStateBottomResizable ToplevelState = 0b10000000000000 // ToplevelStateLeftTiled: whether the left edge is tiled. ToplevelStateLeftTiled ToplevelState = 0b100000000000000 // ToplevelStateLeftResizable: whether the left edge is resizable. ToplevelStateLeftResizable ToplevelState = 0b1000000000000000 )
func (ToplevelState) Has ¶
func (t ToplevelState) Has(other ToplevelState) bool
Has returns true if t contains other.
func (ToplevelState) String ¶
func (t ToplevelState) String() string
String returns the names in string for ToplevelState.
type Topleveller ¶
type Topleveller interface { coreglib.Objector // BeginMove begins an interactive move operation. BeginMove(device Devicer, button int, x, y float64, timestamp uint32) // BeginResize begins an interactive resize operation. BeginResize(edge SurfaceEdge, device Devicer, button int, x, y float64, timestamp uint32) // Focus sets keyboard focus to surface. Focus(timestamp uint32) // State gets the bitwise or of the currently active surface state flags, // from the GdkToplevelState enumeration. State() ToplevelState // InhibitSystemShortcuts requests that the toplevel inhibit the system // shortcuts. InhibitSystemShortcuts(event Eventer) // Lower asks to lower the toplevel below other windows. Lower() bool // Minimize asks to minimize the toplevel. Minimize() bool // Present toplevel after having processed the GdkToplevelLayout rules. Present(layout *ToplevelLayout) // RestoreSystemShortcuts: restore default system keyboard shortcuts which // were previously inhibited. RestoreSystemShortcuts() // SetDecorated sets the toplevel to be decorated. SetDecorated(decorated bool) // SetDeletable sets the toplevel to be deletable. SetDeletable(deletable bool) // SetIconList sets a list of icons for the surface. SetIconList(surfaces []Texturer) // SetModal sets the toplevel to be modal. SetModal(modal bool) // SetStartupID sets the startup notification ID. SetStartupID(startupId string) // SetTitle sets the title of a toplevel surface. SetTitle(title string) // SetTransientFor sets a transient-for parent. SetTransientFor(parent Surfacer) // ShowWindowMenu asks the windowing system to show the window menu. ShowWindowMenu(event Eventer) bool // SupportsEdgeConstraints returns whether the desktop environment supports // tiled window states. SupportsEdgeConstraints() bool }
Topleveller describes Toplevel's interface methods.
type TouchEvent ¶
type TouchEvent struct { Event // contains filtered or unexported fields }
TouchEvent: event related to a touch-based device.
func (*TouchEvent) EmulatingPointer ¶
func (event *TouchEvent) EmulatingPointer() bool
EmulatingPointer extracts whether a touch event is emulating a pointer event.
The function returns the following values:
- ok: TRUE if event is emulating.
type TouchpadEvent ¶
type TouchpadEvent struct { Event // contains filtered or unexported fields }
TouchpadEvent: event related to a gesture on a touchpad device.
Unlike touchscreens, where the windowing system sends basic sequences of begin, update, end events, and leaves gesture recognition to the clients, touchpad gestures are typically processed by the system, resulting in these events.
func (*TouchpadEvent) Deltas ¶
func (event *TouchpadEvent) Deltas() (dx, dy float64)
Deltas extracts delta information from a touchpad event.
The function returns the following values:
- dx: return location for x.
- dy: return location for y.
func (*TouchpadEvent) GesturePhase ¶
func (event *TouchpadEvent) GesturePhase() TouchpadGesturePhase
GesturePhase extracts the touchpad gesture phase from a touchpad event.
The function returns the following values:
- touchpadGesturePhase: gesture phase of event.
func (*TouchpadEvent) NFingers ¶
func (event *TouchpadEvent) NFingers() uint
NFingers extracts the number of fingers from a touchpad event.
The function returns the following values:
- guint: number of fingers for event.
func (*TouchpadEvent) PinchAngleDelta ¶
func (event *TouchpadEvent) PinchAngleDelta() float64
PinchAngleDelta extracts the angle delta from a touchpad pinch event.
The function returns the following values:
- gdouble: angle delta of event.
func (*TouchpadEvent) PinchScale ¶
func (event *TouchpadEvent) PinchScale() float64
PinchScale extracts the scale from a touchpad pinch event.
The function returns the following values:
- gdouble: scale of event.
type TouchpadGesturePhase ¶
TouchpadGesturePhase specifies the current state of a touchpad gesture.
All gestures are guaranteed to begin with an event with phase GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, followed by 0 or several events with phase GDK_TOUCHPAD_GESTURE_PHASE_UPDATE.
A finished gesture may have 2 possible outcomes, an event with phase GDK_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is considered successful, this should be used as the hint to perform any permanent changes.
Cancelled gestures may be so for a variety of reasons, due to hardware or the compositor, or due to the gesture recognition layers hinting the gesture did not finish resolutely (eg. a 3rd finger being added during a pinch gesture). In these cases, the last event will report the phase GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint to undo any visible/permanent changes that were done throughout the progress of the gesture.
const ( // TouchpadGesturePhaseBegin: gesture has begun. TouchpadGesturePhaseBegin TouchpadGesturePhase = iota // TouchpadGesturePhaseUpdate: gesture has been updated. TouchpadGesturePhaseUpdate // TouchpadGesturePhaseEnd: gesture was finished, changes should be // permanently applied. TouchpadGesturePhaseEnd // TouchpadGesturePhaseCancel: gesture was cancelled, all changes should be // undone. TouchpadGesturePhaseCancel )
func (TouchpadGesturePhase) String ¶
func (t TouchpadGesturePhase) String() string
String returns the name in string for TouchpadGesturePhase.
type VulkanContext ¶
type VulkanContext struct { DrawContext *coreglib.Object gio.Initable // contains filtered or unexported fields }
VulkanContext: GdkVulkanContext is an object representing the platform-specific Vulkan draw context.
GdkVulkanContexts are created for a surface using gdk.Surface.CreateVulkanContext(), and the context will match the the characteristics of the surface.
Support for GdkVulkanContext is platform-specific and context creation can fail, returning NULL context.
func BaseVulkanContext ¶
func BaseVulkanContext(obj VulkanContexter) *VulkanContext
BaseVulkanContext returns the underlying base object.
func (*VulkanContext) ConnectImagesUpdated ¶
func (v *VulkanContext) ConnectImagesUpdated(f func()) coreglib.SignalHandle
ConnectImagesUpdated is emitted when the images managed by this context have changed.
Usually this means that the swapchain had to be recreated, for example in response to a change of the surface size.
type VulkanContexter ¶
VulkanContexter describes types inherited from class VulkanContext.
To get the original type, the caller must assert this to an interface or another type.
type VulkanError ¶
VulkanError: error enumeration for VulkanContext.
const ( // VulkanErrorUnsupported: vulkan is not supported on this backend or has // not been compiled in. VulkanErrorUnsupported VulkanError = iota // VulkanErrorNotAvailable: vulkan support is not available on this Surface. VulkanErrorNotAvailable )
func (VulkanError) String ¶
func (v VulkanError) String() string
String returns the name in string for VulkanError.