Documentation ¶
Index ¶
- Constants
- func FilenameFromUri(uri string) (filename string, hostname string, err error)
- func FilenameToUri(filename string, hostname string) (uri string, err error)
- func GPtrToString(p interface{}) string
- func GValueFromNative(value interface{}) *C.GValue
- func GetApplicationName() string
- func GetCurrentDir() string
- func GetHomeDir() string
- func GetHostName() string
- func GetPrgName() string
- func GetRealName() string
- func GetSystemConfigDirs() []string
- func GetSystemDataDirs() []string
- func GetTmpDir() string
- func GetUserCacheDir() string
- func GetUserConfigDir() string
- func GetUserDataDir() string
- func GetUserName() string
- func GetUserRuntimeDir() string
- func GetUserSpecialDir(directory UserDirectory) string
- func IdleAdd(f interface{}, datas ...interface{})
- func ReloadUserSpecialDirsCache()
- func SetApplicationName(name string)
- func SetPrgname(name string)
- func ThreadInit(a ...interface{})
- func TimeoutAdd(interval uint, f interface{}, datas ...interface{})
- func Utf8Validate(str []byte, len int, bar **byte) bool
- type CallbackArg
- type CallbackContext
- type ConnectFlags
- type ContextStorage
- type Error
- type GMainContext
- type GMainLoop
- type GObject
- func (v *GObject) Connect(s string, f interface{}, datas ...interface{}) int
- func (v *GObject) Emit(s string)
- func (v *GObject) GetData(s string) unsafe.Pointer
- func (v *GObject) HandlerBlock(call_id int)
- func (v *GObject) HandlerDisconnect(call_id int)
- func (v *GObject) HandlerUnblock(call_id int)
- func (v *GObject) Ref()
- func (v *GObject) Set(name string, value interface{})
- func (v *GObject) SetData(s string, p unsafe.Pointer)
- func (v *GObject) SetProperty(name string, val *GValue)
- func (v *GObject) SignalConnect(s string, f interface{}, data interface{}, flags ConnectFlags) int
- func (v *GObject) SignalConnectAfter(s string, f interface{}, datas ...interface{}) int
- func (v *GObject) SignalConnectSwapped(s string, f interface{}, datas ...interface{}) int
- func (v *GObject) StopEmission(s string)
- func (v *GObject) Unref()
- type GValue
- type List
- func (v List) Append(data unsafe.Pointer) *List
- func (v List) Concat(link List) *List
- func (v List) Copy() *List
- func (v List) Data() interface{}
- func (v List) DeleteLink(link List) *List
- func (v List) Find(data unsafe.Pointer) *List
- func (v List) First() *List
- func (v List) ForEach(callback func(unsafe.Pointer, interface{}), user_datas ...interface{})
- func (v List) Free()
- func (v List) Free1()
- func (v List) Index(data unsafe.Pointer) int
- func (v List) Insert(data unsafe.Pointer, pos int) *List
- func (v List) InsertBefore(sib List, data unsafe.Pointer) *List
- func (v List) Last() *List
- func (v List) Length() uint
- func (v List) Nth(n uint) *List
- func (v List) NthData(n uint) unsafe.Pointer
- func (v List) NthPrev(n uint) *List
- func (v List) Position(link List) int
- func (v List) Prepend(data unsafe.Pointer) *List
- func (v List) Remove(data unsafe.Pointer) *List
- func (v List) RemoveAll(data unsafe.Pointer) *List
- func (v List) RemoveLink(link List) *List
- func (v List) Reverse() *List
- type ObjectLike
- type SList
- func (v SList) Append(data unsafe.Pointer) *SList
- func (v SList) Concat(llink SList) *SList
- func (v SList) Copy() *SList
- func (v SList) Data() unsafe.Pointer
- func (v SList) DeleteLink(llink SList) *SList
- func (v SList) Find(data unsafe.Pointer) *SList
- func (v SList) ForEach(callback func(unsafe.Pointer, interface{}), user_datas ...interface{})
- func (v SList) Free()
- func (v SList) Free1()
- func (v SList) Index(data unsafe.Pointer) int
- func (v SList) InsertBefore(sibling SList, data unsafe.Pointer) *SList
- func (v SList) Last() *SList
- func (v SList) Length() uint
- func (v SList) Nth(n uint) *SList
- func (v SList) NthData(n uint) unsafe.Pointer
- func (v SList) Position(llink SList) int
- func (v SList) Prepend(data unsafe.Pointer) *SList
- func (v SList) Remove(data unsafe.Pointer) *SList
- func (v SList) RemoveAll(data unsafe.Pointer) *SList
- func (v SList) RemoveLink(llink SList) *SList
- func (v SList) Reverse() *SList
- func (v SList) ToSList() *C.GSList
- type SourcefuncContext
- type UserDirectory
- type WrappedObject
Constants ¶
const ( G_TYPE_CHAR = 3 << 2 G_TYPE_UCHAR = 4 << 2 G_TYPE_BOOL = 5 << 2 G_TYPE_INT = 6 << 2 G_TYPE_UINT = 7 << 2 G_TYPE_LONG = 8 << 2 G_TYPE_ULONG = 9 << 2 G_TYPE_INT64 = 10 << 2 G_TYPE_UINT64 = 11 << 2 G_TYPE_ENUM = 12 << 2 G_TYPE_FLAGS = 13 << 2 G_TYPE_FLOAT = 14 << 2 G_TYPE_DOUBLE = 15 << 2 G_TYPE_STRING = 16 << 2 G_TYPE_POINTER = 17 << 2 G_TYPE_BOXED = 18 << 2 )
Variables ¶
This section is empty.
Functions ¶
func FilenameFromUri ¶
func GPtrToString ¶
func GPtrToString(p interface{}) string
func GValueFromNative ¶
----------------------------------------------------------------------- GValue -----------------------------------------------------------------------
func GetApplicationName ¶
func GetApplicationName() string
----------------------------------------------------------------------- Application -----------------------------------------------------------------------
func GetCurrentDir ¶
func GetCurrentDir() string
func GetHomeDir ¶
func GetHomeDir() string
func GetHostName ¶
func GetHostName() string
func GetPrgName ¶
func GetPrgName() string
func GetRealName ¶
func GetRealName() string
func GetSystemConfigDirs ¶
func GetSystemConfigDirs() []string
func GetSystemDataDirs ¶
func GetSystemDataDirs() []string
----------------------------------------------------------------------- System Information -----------------------------------------------------------------------
func GetUserCacheDir ¶
func GetUserCacheDir() string
func GetUserConfigDir ¶
func GetUserConfigDir() string
func GetUserDataDir ¶
func GetUserDataDir() string
func GetUserName ¶
func GetUserName() string
----------------------------------------------------------------------- User Information -----------------------------------------------------------------------
func GetUserRuntimeDir ¶
func GetUserRuntimeDir() string
func GetUserSpecialDir ¶
func GetUserSpecialDir(directory UserDirectory) string
func ReloadUserSpecialDirsCache ¶
func ReloadUserSpecialDirsCache()
func SetApplicationName ¶
func SetApplicationName(name string)
func SetPrgname ¶
func SetPrgname(name string)
func ThreadInit ¶
func ThreadInit(a ...interface{})
----------------------------------------------------------------------- thread -----------------------------------------------------------------------
func TimeoutAdd ¶
func TimeoutAdd(interval uint, f interface{}, datas ...interface{})
Types ¶
type CallbackArg ¶
type CallbackArg uintptr
func (CallbackArg) ToString ¶
func (c CallbackArg) ToString() string
type CallbackContext ¶
type CallbackContext struct {
// contains filtered or unexported fields
}
----------------------------------------------------------------------- Events ----------------------------------------------------------------------- the go-gtk Callback is simpler than the one in C, because we have full closures, so there is never a need to pass additional data via a void * pointer. Where you might have wanted to do that, you can instead just use func () { ... using data } to pass the data in.
func (*CallbackContext) Args ¶
func (c *CallbackContext) Args(n int) CallbackArg
func (*CallbackContext) Data ¶
func (c *CallbackContext) Data() interface{}
func (*CallbackContext) Target ¶
func (c *CallbackContext) Target() interface{}
type ConnectFlags ¶
type ConnectFlags C.GConnectFlags
const ( ConnectAfter ConnectFlags = C.G_CONNECT_AFTER ConnectSwapped ConnectFlags = C.G_CONNECT_SWAPPED )
type ContextStorage ¶
type ContextStorage struct {
// contains filtered or unexported fields
}
func NewContextStorage ¶
func NewContextStorage() *ContextStorage
func (*ContextStorage) Add ¶
func (c *ContextStorage) Add(value interface{}) int
func (*ContextStorage) Get ¶
func (c *ContextStorage) Get(id int) (value interface{}, found bool)
func (*ContextStorage) Len ¶
func (c *ContextStorage) Len() int
func (*ContextStorage) Remove ¶
func (c *ContextStorage) Remove(id int)
type Error ¶
----------------------------------------------------------------------- g_error -----------------------------------------------------------------------
func ErrorFromNative ¶
func LocaleFromUtf8 ¶
func LocaleToUtf8 ¶
type GMainContext ¶
type GMainContext struct {
MainContext *C.GMainContext
}
----------------------------------------------------------------------- Main Loop -----------------------------------------------------------------------
func MainContextDefault ¶
func MainContextDefault() *GMainContext
func NewMainContext ¶
func NewMainContext() *GMainContext
func (*GMainContext) Iteration ¶
func (v *GMainContext) Iteration(blocking bool) bool
func (*GMainContext) Pending ¶
func (v *GMainContext) Pending() bool
func (*GMainContext) Ref ¶
func (v *GMainContext) Ref() *GMainContext
func (*GMainContext) Unref ¶
func (v *GMainContext) Unref()
type GMainLoop ¶
func NewMainLoop ¶
func NewMainLoop(context *GMainContext, is_running bool) *GMainLoop
func (*GMainLoop) GetContext ¶
func (v *GMainLoop) GetContext() *GMainContext
type GObject ¶
func ObjectFromNative ¶
func (*GObject) Connect ¶
Return the handler call_id to use with HandlerBlock, HandlerUnblock and HandlerDisconnect.
func (*GObject) HandlerBlock ¶
func (*GObject) HandlerDisconnect ¶
func (*GObject) HandlerUnblock ¶
func (*GObject) SetProperty ¶
func (*GObject) SignalConnect ¶
func (v *GObject) SignalConnect(s string, f interface{}, data interface{}, flags ConnectFlags) int
func (*GObject) SignalConnectAfter ¶
func (*GObject) SignalConnectSwapped ¶
func (*GObject) StopEmission ¶
type GValue ¶
func ValueFromNative ¶
func ValueFromNative(val interface{}) *GValue
type List ¶
----------------------------------------------------------------------- List -----------------------------------------------------------------------
func GListAlloc ¶
func GListAlloc() *List
func ListFromNative ¶
func (List) Concat ¶
GList* g_list_sort (GList *list,
GCompareFunc compare_func);
gint (*GCompareFunc) (gconstpointer a,
gconstpointer b);
GList* g_list_insert_sorted_with_data (GList *list,
gpointer data, GCompareDataFunc func, gpointer user_data);
GList* g_list_sort_with_data (GList *list,
GCompareDataFunc compare_func, gpointer user_data);
gint (*GCompareDataFunc) (gconstpointer a,
gconstpointer b, gpointer user_data);
func (List) DeleteLink ¶
func (List) Position ¶
GList* g_list_find_custom (GList *list,
gconstpointer data, GCompareFunc func);
func (List) RemoveLink ¶
type ObjectLike ¶
type ObjectLike interface { Ref() Unref() Connect(s string, f interface{}, data ...interface{}) }
----------------------------------------------------------------------- GObject -----------------------------------------------------------------------
type SList ¶
----------------------------------------------------------------------- g_slist -----------------------------------------------------------------------
func GSListAlloc ¶
func GSListAlloc() *SList
func SListFromNative ¶
func (SList) DeleteLink ¶
func (SList) InsertBefore ¶
GSList* g_slist_insert (GSList *list, gpointer data, gint position) G_GNUC_WARN_UNUSED_RESULT; GSList* g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT; GSList* g_slist_insert_sorted_with_data (GSList *list, gpointer data, GCompareDataFunc func, gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
func (SList) NthData ¶
GSList* g_slist_sort (GSList *list, GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT; GSList* g_slist_sort_with_data (GSList *list, GCompareDataFunc compare_func, gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
func (SList) Position ¶
GSList* g_slist_find_custom (GSList *list, gconstpointer data, GCompareFunc func);
func (SList) RemoveLink ¶
type SourcefuncContext ¶
type SourcefuncContext struct {
// contains filtered or unexported fields
}
type UserDirectory ¶
type UserDirectory C.GUserDirectory
const ( UserDirectoryDesktop UserDirectory = C.G_USER_DIRECTORY_DESKTOP UserDirectoryDocuments UserDirectory = C.G_USER_DIRECTORY_DOCUMENTS UserDirectoryDownload UserDirectory = C.G_USER_DIRECTORY_DOWNLOAD UserDirectoryMusic UserDirectory = C.G_USER_DIRECTORY_MUSIC UserDirectoryPictures UserDirectory = C.G_USER_DIRECTORY_PICTURES UserDirectoryTemplates UserDirectory = C.G_USER_DIRECTORY_TEMPLATES UserDirectoryVideos UserDirectory = C.G_USER_DIRECTORY_VIDEOS )
type WrappedObject ¶
----------------------------------------------------------------------- WrappedObject -----------------------------------------------------------------------