gdk

package
v0.0.0-...-7a6ce3e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: ISC Imports: 6 Imported by: 0

Documentation

Overview

Go bindings for GDK 3. Supports version 3.6 and later.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atom

type Atom uintptr

Atom is a representation of GDK's GdkAtom.

const (
	SELECTION_PRIMARY       Atom = 1
	SELECTION_SECONDARY     Atom = 2
	SELECTION_CLIPBOARD     Atom = 69
	TARGET_BITMAP           Atom = 5
	TARGET_COLORMAP         Atom = 7
	TARGET_DRAWABLE         Atom = 17
	TARGET_PIXMAP           Atom = 20
	TARGET_STRING           Atom = 31
	SELECTION_TYPE_ATOM     Atom = 4
	SELECTION_TYPE_BITMAP   Atom = 5
	SELECTION_TYPE_COLORMAP Atom = 7
	SELECTION_TYPE_DRAWABLE Atom = 17
	SELECTION_TYPE_INTEGER  Atom = 19
	SELECTION_TYPE_PIXMAP   Atom = 20
	SELECTION_TYPE_WINDOW   Atom = 33
	SELECTION_TYPE_STRING   Atom = 31
)

Selections

type Colorspace

type Colorspace int

Colorspace is a representation of GDK's GdkColorspace.

const (
	COLORSPACE_RGB Colorspace = C.GDK_COLORSPACE_RGB
)

type Device

type Device struct {
	*glib.Object
}

Device is a representation of GDK's GdkDevice.

func (*Device) Native

func (v *Device) Native() uintptr

Native returns a pointer to the underlying GdkDevice.

type DeviceManager

type DeviceManager struct {
	*glib.Object
}

DeviceManager is a representation of GDK's GdkDeviceManager.

func (*DeviceManager) Native

func (v *DeviceManager) Native() uintptr

Native returns a pointer to the underlying GdkDeviceManager.

type Display

type Display struct {
	*glib.Object
}

Display is a representation of GDK's GdkDisplay.

func DisplayGetDefault

func DisplayGetDefault() (*Display, error)

DisplayGetDefault() is a wrapper around gdk_display_get_default().

func DisplayOpen

func DisplayOpen(displayName string) (*Display, error)

DisplayOpen() is a wrapper around gdk_display_open().

func (*Display) Beep

func (v *Display) Beep()

Beep() is a wrapper around gdk_display_beep().

func (*Display) Close

func (v *Display) Close()

Close() is a wrapper around gdk_display_close().

func (*Display) DeviceIsGrabbed

func (v *Display) DeviceIsGrabbed(device *Device) bool

DeviceIsGrabbed() is a wrapper around gdk_display_device_is_grabbed().

func (*Display) Flush

func (v *Display) Flush()

Flush() is a wrapper around gdk_display_flush().

func (*Display) GetAppLaunchContext

func (v *Display) GetAppLaunchContext()

TODO(jrick) glib.AppLaunchContext GdkAppLaunchContext

func (*Display) GetDefaultCursorSize

func (v *Display) GetDefaultCursorSize() uint

GetDefaultCursorSize() is a wrapper around gdk_display_get_default_cursor_size().

func (*Display) GetDefaultGroup

func (v *Display) GetDefaultGroup() (*Window, error)

GetDefaultGroup() is a wrapper around gdk_display_get_default_group().

func (*Display) GetDefaultScreen

func (v *Display) GetDefaultScreen() (*Screen, error)

GetDefaultScreen() is a wrapper around gdk_display_get_default_screen().

func (*Display) GetDeviceManager

func (v *Display) GetDeviceManager() (*DeviceManager, error)

GetDeviceManager() is a wrapper around gdk_display_get_device_manager().

func (*Display) GetEvent

func (v *Display) GetEvent() (*Event, error)

GetEvent() is a wrapper around gdk_display_get_event().

func (*Display) GetMaximalCursorSize

func (v *Display) GetMaximalCursorSize() (width, height uint)

GetMaximalCursorSize() is a wrapper around gdk_display_get_maximal_cursor_size().

func (*Display) GetName

func (v *Display) GetName() (string, error)

GetName() is a wrapper around gdk_display_get_name().

func (*Display) GetScreen

func (v *Display) GetScreen(screenNum int) (*Screen, error)

GetScreen() is a wrapper around gdk_display_get_screen().

func (*Display) HasPending

func (v *Display) HasPending() bool

HasPending() is a wrapper around gdk_display_has_pending().

func (*Display) IsClosed

func (v *Display) IsClosed() bool

IsClosed() is a wrapper around gdk_display_is_closed().

func (*Display) Native

func (v *Display) Native() uintptr

Native returns a pointer to the underlying GdkDisplay.

func (*Display) NotifyStartupComplete

func (v *Display) NotifyStartupComplete(startupID string)

NotifyStartupComplete() is a wrapper around gdk_display_notify_startup_complete().

func (*Display) PeekEvent

func (v *Display) PeekEvent() (*Event, error)

PeekEvent() is a wrapper around gdk_display_peek_event().

func (*Display) PutEvent

func (v *Display) PutEvent(event *Event)

PutEvent() is a wrapper around gdk_display_put_event().

func (*Display) RequestSelectionNotification

func (v *Display) RequestSelectionNotification(selection Atom) bool

RequestSelectionNotification() is a wrapper around gdk_display_request_selection_notification().

func (*Display) SetDoubleClickDistance

func (v *Display) SetDoubleClickDistance(distance uint)

SetDoubleClickDistance() is a wrapper around gdk_display_set_double_click_distance().

func (*Display) SetDoubleClickTime

func (v *Display) SetDoubleClickTime(msec uint)

SetDoubleClickTime() is a wrapper around gdk_display_set_double_click_time().

func (*Display) StoreClipboard

func (v *Display) StoreClipboard(clipboardWindow *Window, time uint32, targets ...Atom)

TODO(jrick)

func (*Display) SupportsClipboardPersistence

func (v *Display) SupportsClipboardPersistence() bool

SupportsClipboardPersistence() is a wrapper around gdk_display_supports_clipboard_persistence().

func (*Display) SupportsColorCursor

func (v *Display) SupportsColorCursor() bool

SupportsColorCursor() is a wrapper around gdk_display_supports_cursor_color().

func (*Display) SupportsComposite

func (v *Display) SupportsComposite() bool

SupportsComposite() is a wrapper around gdk_display_supports_composite().

func (*Display) SupportsCursorAlpha

func (v *Display) SupportsCursorAlpha() bool

SupportsCursorAlpha() is a wrapper around gdk_display_supports_cursor_alpha().

func (*Display) SupportsInputShapes

func (v *Display) SupportsInputShapes() bool

SupportsInputShapes() is a wrapper around gdk_display_supports_input_shapes().

func (*Display) SupportsSelectionNotification

func (v *Display) SupportsSelectionNotification() bool

SupportsSelectionNotification() is a wrapper around gdk_display_supports_selection_notification().

func (*Display) SupportsShapes

func (v *Display) SupportsShapes() bool

SupportsShapes() is a wrapper around gdk_display_supports_shapes().

func (*Display) Sync

func (v *Display) Sync()

Sync() is a wrapper around gdk_display_sync().

type Event

type Event struct {
	GdkEvent *C.GdkEvent
}

Event is a representation of GDK's GdkEvent.

func (*Event) Native

func (v *Event) Native() uintptr

Native returns a pointer to the underlying GdkEvent.

type EventKey

type EventKey struct {
	*Event
}

EventKey is a representation of GDK's GdkEventKey.

func (*EventKey) KeyVal

func (v *EventKey) KeyVal() uint

func (*EventKey) Native

func (v *EventKey) Native() uintptr

Native returns a pointer to the underlying GdkEventKey.

type InterpType

type InterpType int

InterpType is a representation of GDK's GdkInterpType.

const (
	INTERP_NEAREST  InterpType = C.GDK_INTERP_NEAREST
	INTERP_TILES    InterpType = C.GDK_INTERP_TILES
	INTERP_BILINEAR InterpType = C.GDK_INTERP_BILINEAR
	INTERP_HYPER    InterpType = C.GDK_INTERP_HYPER
)

type Pixbuf

type Pixbuf struct {
	*glib.Object
}

Pixbuf is a representation of GDK's GdkPixbuf.

func PixbufNew

func PixbufNew(colorspace Colorspace, hasAlpha bool, bitsPerSample, width, height int) (*Pixbuf, error)

PixbufNew is a wrapper around gdk_pixbuf_new().

func PixbufNewFromFile

func PixbufNewFromFile(filename string) (*Pixbuf, error)

PixbufNewFromFile is a wrapper around gdk_pixbuf_new_from_file().

func (*Pixbuf) GetBitsPerSample

func (v *Pixbuf) GetBitsPerSample() int

GetBitsPerSample is a wrapper around gdk_pixbuf_get_bits_per_sample().

func (*Pixbuf) GetByteLength

func (v *Pixbuf) GetByteLength() int

GetByteLength is a wrapper around gdk_pixbuf_get_byte_length().

func (*Pixbuf) GetColorspace

func (v *Pixbuf) GetColorspace() Colorspace

GetColorspace is a wrapper around gdk_pixbuf_get_colorspace().

func (*Pixbuf) GetHasAlpha

func (v *Pixbuf) GetHasAlpha() bool

GetHasAlpha is a wrapper around gdk_pixbuf_get_has_alpha().

func (*Pixbuf) GetHeight

func (v *Pixbuf) GetHeight() int

GetHeight is a wrapper around gdk_pixbuf_get_height().

func (*Pixbuf) GetNChannels

func (v *Pixbuf) GetNChannels() int

GetNChannels is a wrapper around gdk_pixbuf_get_n_channels().

func (*Pixbuf) GetOption

func (v *Pixbuf) GetOption(key string) (value string, ok bool)

GetOption is a wrapper around gdk_pixbuf_get_option(). ok is true if the key has an associated value.

func (*Pixbuf) GetPixels

func (v *Pixbuf) GetPixels() (channels []byte)

GetPixels is a wrapper around gdk_pixbuf_get_pixels_with_length(). A Go slice is used to represent the underlying Pixbuf data array, one byte per channel.

func (*Pixbuf) GetRowstride

func (v *Pixbuf) GetRowstride() int

GetRowstride is a wrapper around gdk_pixbuf_get_rowstride().

func (*Pixbuf) GetWidth

func (v *Pixbuf) GetWidth() int

GetWidth is a wrapper around gdk_pixbuf_get_width().

func (*Pixbuf) Native

func (v *Pixbuf) Native() uintptr

Native returns a pointer to the underlying GdkPixbuf.

func (*Pixbuf) RotateSimple

func (v *Pixbuf) RotateSimple(angle PixbufRotation) (*Pixbuf, error)

RotateSimple is a wrapper around gdk_pixbuf_rotate_simple().

func (*Pixbuf) ScaleSimple

func (v *Pixbuf) ScaleSimple(destWidth, destHeight int, interpType InterpType) (*Pixbuf, error)

ScaleSimple is a wrapper around gdk_pixbuf_scale_simple().

type PixbufAlphaMode

type PixbufAlphaMode int

PixbufAlphaMode is a representation of GDK's GdkPixbufAlphaMode.

const (
	GDK_PIXBUF_ALPHA_BILEVEL PixbufAlphaMode = C.GDK_PIXBUF_ALPHA_BILEVEL
	GDK_PIXBUF_ALPHA_FULL    PixbufAlphaMode = C.GDK_PIXBUF_ALPHA_FULL
)

type PixbufRotation

type PixbufRotation int

PixbufRotation is a representation of GDK's GdkPixbufRotation.

const (
	PIXBUF_ROTATE_NONE             PixbufRotation = C.GDK_PIXBUF_ROTATE_NONE
	PIXBUF_ROTATE_COUNTERCLOCKWISE PixbufRotation = C.GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE
	PIXBUF_ROTATE_UPSIDEDOWN       PixbufRotation = C.GDK_PIXBUF_ROTATE_UPSIDEDOWN
	PIXBUF_ROTATE_CLOCKWISE        PixbufRotation = C.GDK_PIXBUF_ROTATE_CLOCKWISE
)

type Screen

type Screen struct {
	*glib.Object
}

Screen is a representation of GDK's GdkScreen.

func (*Screen) GetHeight

func (v *Screen) GetHeight() int

GetHeight is a wrapper around gdk_screen_get_height().

func (*Screen) GetRGBAVisual

func (v *Screen) GetRGBAVisual() (*Visual, error)

GetRGBAVisual is a wrapper around gdk_screen_get_rgba_visual().

func (*Screen) GetSystemVisual

func (v *Screen) GetSystemVisual() (*Visual, error)

GetSystemVisual is a wrapper around gdk_screen_get_system_visual().

func (*Screen) GetWidth

func (v *Screen) GetWidth() int

GetWidth is a wrapper around gdk_screen_get_width().

func (*Screen) Native

func (v *Screen) Native() uintptr

Native returns a pointer to the underlying GdkScreen.

type Visual

type Visual struct {
	*glib.Object
}

Visual is a representation of GDK's GdkVisual.

func (*Visual) Native

func (v *Visual) Native() uintptr

type Window

type Window struct {
	*glib.Object
}

Window is a representation of GDK's GdkWindow.

func (*Window) Native

func (v *Window) Native() uintptr

Native returns a pointer to the underlying GdkWindow.

Jump to

Keyboard shortcuts

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