mirror of https://github.com/subgraph/fw-daemon
parent
807d18770a
commit
4208f93f94
@ -0,0 +1,28 @@
|
||||
package cairo
|
||||
|
||||
// #cgo pkg-config: cairo cairo-gobject
|
||||
// #include <stdlib.h>
|
||||
// #include <cairo.h>
|
||||
// #include <cairo-gobject.h>
|
||||
import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// Format is a representation of Cairo's cairo_format_t.
|
||||
type Format int
|
||||
|
||||
const (
|
||||
FORMAT_INVALID Format = C.CAIRO_FORMAT_INVALID
|
||||
FORMAT_ARGB32 Format = C.CAIRO_FORMAT_ARGB32
|
||||
FORMAT_RGB24 Format = C.CAIRO_FORMAT_RGB24
|
||||
FORMAT_A8 Format = C.CAIRO_FORMAT_A8
|
||||
FORMAT_A1 Format = C.CAIRO_FORMAT_A1
|
||||
FORMAT_RGB16_565 Format = C.CAIRO_FORMAT_RGB16_565
|
||||
FORMAT_RGB30 Format = C.CAIRO_FORMAT_RGB30
|
||||
)
|
||||
|
||||
func marshalFormat(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p)))
|
||||
return Format(c), nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
package glib
|
||||
|
||||
// #cgo pkg-config: glib-2.0 gobject-2.0 gio-2.0
|
||||
// #include <gio/gio.h>
|
||||
// #include <glib.h>
|
||||
// #include <glib-object.h>
|
||||
// #include "glib.go.h"
|
||||
import "C"
|
||||
|
||||
type MainContext C.GMainContext
|
||||
|
||||
// native returns a pointer to the underlying GMainContext.
|
||||
func (v *MainContext) native() *C.GMainContext {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return (*C.GMainContext)(v)
|
||||
}
|
||||
|
||||
// MainContextDefault is a wrapper around g_main_context_default().
|
||||
func MainContextDefault() *MainContext {
|
||||
c := C.g_main_context_default()
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return (*MainContext)(c)
|
||||
}
|
||||
|
||||
// MainDepth is a wrapper around g_main_depth().
|
||||
func MainDepth() int {
|
||||
return int(C.g_main_depth())
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package glib
|
||||
|
||||
// #cgo pkg-config: glib-2.0 gobject-2.0 gio-2.0
|
||||
// #include <gio/gio.h>
|
||||
// #include <glib.h>
|
||||
// #include <glib-object.h>
|
||||
// #include "glib.go.h"
|
||||
import "C"
|
||||
|
||||
type Source C.GSource
|
||||
|
||||
// native returns a pointer to the underlying GSource.
|
||||
func (v *Source) native() *C.GSource {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return (*C.GSource)(v)
|
||||
}
|
||||
|
||||
// MainCurrentSource is a wrapper around g_main_current_source().
|
||||
func MainCurrentSource() *Source {
|
||||
c := C.g_main_current_source()
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return (*Source)(c)
|
||||
}
|
@ -0,0 +1,277 @@
|
||||
package glib
|
||||
|
||||
// #cgo pkg-config: glib-2.0 gobject-2.0
|
||||
// #include <gio/gio.h>
|
||||
// #include <glib.h>
|
||||
// #include <glib-object.h>
|
||||
// #include "glib.go.h"
|
||||
import "C"
|
||||
import "unsafe"
|
||||
|
||||
// Settings is a representation of GSettings.
|
||||
type Settings struct {
|
||||
*Object
|
||||
}
|
||||
|
||||
// native() returns a pointer to the underlying GSettings.
|
||||
func (v *Settings) native() *C.GSettings {
|
||||
if v == nil || v.GObject == nil {
|
||||
return nil
|
||||
}
|
||||
return C.toGSettings(unsafe.Pointer(v.GObject))
|
||||
}
|
||||
|
||||
func (v *Settings) Native() uintptr {
|
||||
return uintptr(unsafe.Pointer(v.native()))
|
||||
}
|
||||
|
||||
func marshalSettings(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
|
||||
return wrapSettings(wrapObject(unsafe.Pointer(c))), nil
|
||||
}
|
||||
|
||||
func wrapSettings(obj *Object) *Settings {
|
||||
return &Settings{obj}
|
||||
}
|
||||
|
||||
func wrapFullSettings(obj *C.GSettings) *Settings {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapSettings(wrapObject(unsafe.Pointer(obj)))
|
||||
}
|
||||
|
||||
// SettingsNew is a wrapper around g_settings_new().
|
||||
func SettingsNew(schemaID string) *Settings {
|
||||
cstr := (*C.gchar)(C.CString(schemaID))
|
||||
defer C.free(unsafe.Pointer(cstr))
|
||||
|
||||
return wrapFullSettings(C.g_settings_new(cstr))
|
||||
}
|
||||
|
||||
// SettingsNewWithPath is a wrapper around g_settings_new_with_path().
|
||||
func SettingsNewWithPath(schemaID, path string) *Settings {
|
||||
cstr1 := (*C.gchar)(C.CString(schemaID))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
cstr2 := (*C.gchar)(C.CString(path))
|
||||
defer C.free(unsafe.Pointer(cstr2))
|
||||
|
||||
return wrapFullSettings(C.g_settings_new_with_path(cstr1, cstr2))
|
||||
}
|
||||
|
||||
// SettingsNewWithBackend is a wrapper around g_settings_new_with_backend().
|
||||
func SettingsNewWithBackend(schemaID string, backend *SettingsBackend) *Settings {
|
||||
cstr1 := (*C.gchar)(C.CString(schemaID))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return wrapFullSettings(C.g_settings_new_with_backend(cstr1, backend.native()))
|
||||
}
|
||||
|
||||
// SettingsNewWithBackendAndPath is a wrapper around g_settings_new_with_backend_and_path().
|
||||
func SettingsNewWithBackendAndPath(schemaID string, backend *SettingsBackend, path string) *Settings {
|
||||
cstr1 := (*C.gchar)(C.CString(schemaID))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
cstr2 := (*C.gchar)(C.CString(path))
|
||||
defer C.free(unsafe.Pointer(cstr2))
|
||||
|
||||
return wrapFullSettings(C.g_settings_new_with_backend_and_path(cstr1, backend.native(), cstr2))
|
||||
}
|
||||
|
||||
// SettingsNewFull is a wrapper around g_settings_new_full().
|
||||
func SettingsNewFull(schema *SettingsSchema, backend *SettingsBackend, path string) *Settings {
|
||||
cstr1 := (*C.gchar)(C.CString(path))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return wrapFullSettings(C.g_settings_new_full(schema.native(), backend.native(), cstr1))
|
||||
}
|
||||
|
||||
// SettingsSync is a wrapper around g_settings_sync().
|
||||
func SettingsSync() {
|
||||
C.g_settings_sync()
|
||||
}
|
||||
|
||||
// IsWritable is a wrapper around g_settings_is_writable().
|
||||
func (v *Settings) IsWritable(name string) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_is_writable(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// Delay is a wrapper around g_settings_delay().
|
||||
func (v *Settings) Delay() {
|
||||
C.g_settings_delay(v.native())
|
||||
}
|
||||
|
||||
// Apply is a wrapper around g_settings_apply().
|
||||
func (v *Settings) Apply() {
|
||||
C.g_settings_apply(v.native())
|
||||
}
|
||||
|
||||
// Revert is a wrapper around g_settings_revert().
|
||||
func (v *Settings) Revert() {
|
||||
C.g_settings_revert(v.native())
|
||||
}
|
||||
|
||||
// GetHasUnapplied is a wrapper around g_settings_get_has_unapplied().
|
||||
func (v *Settings) GetHasUnapplied() bool {
|
||||
return gobool(C.g_settings_get_has_unapplied(v.native()))
|
||||
}
|
||||
|
||||
// GetChild is a wrapper around g_settings_get_child().
|
||||
func (v *Settings) GetChild(name string) *Settings {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return wrapFullSettings(C.g_settings_get_child(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// Reset is a wrapper around g_settings_reset().
|
||||
func (v *Settings) Reset(name string) {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
C.g_settings_reset(v.native(), cstr1)
|
||||
}
|
||||
|
||||
// ListChildren is a wrapper around g_settings_list_children().
|
||||
func (v *Settings) ListChildren() []string {
|
||||
return toGoStringArray(C.g_settings_list_children(v.native()))
|
||||
}
|
||||
|
||||
// GetBoolean is a wrapper around g_settings_get_boolean().
|
||||
func (v *Settings) GetBoolean(name string) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_get_boolean(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// SetBoolean is a wrapper around g_settings_set_boolean().
|
||||
func (v *Settings) SetBoolean(name string, value bool) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_set_boolean(v.native(), cstr1, gbool(value)))
|
||||
}
|
||||
|
||||
// GetInt is a wrapper around g_settings_get_int().
|
||||
func (v *Settings) GetInt(name string) int {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return int(C.g_settings_get_int(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// SetInt is a wrapper around g_settings_set_int().
|
||||
func (v *Settings) SetInt(name string, value int) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_set_int(v.native(), cstr1, C.gint(value)))
|
||||
}
|
||||
|
||||
// GetUInt is a wrapper around g_settings_get_uint().
|
||||
func (v *Settings) GetUInt(name string) uint {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return uint(C.g_settings_get_uint(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// SetUInt is a wrapper around g_settings_set_uint().
|
||||
func (v *Settings) SetUInt(name string, value uint) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_set_uint(v.native(), cstr1, C.guint(value)))
|
||||
}
|
||||
|
||||
// GetDouble is a wrapper around g_settings_get_double().
|
||||
func (v *Settings) GetDouble(name string) float64 {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return float64(C.g_settings_get_double(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// SetDouble is a wrapper around g_settings_set_double().
|
||||
func (v *Settings) SetDouble(name string, value float64) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_set_double(v.native(), cstr1, C.gdouble(value)))
|
||||
}
|
||||
|
||||
// GetString is a wrapper around g_settings_get_string().
|
||||
func (v *Settings) GetString(name string) string {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return C.GoString((*C.char)(C.g_settings_get_string(v.native(), cstr1)))
|
||||
}
|
||||
|
||||
// SetString is a wrapper around g_settings_set_string().
|
||||
func (v *Settings) SetString(name string, value string) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
cstr2 := (*C.gchar)(C.CString(value))
|
||||
defer C.free(unsafe.Pointer(cstr2))
|
||||
|
||||
return gobool(C.g_settings_set_string(v.native(), cstr1, cstr2))
|
||||
}
|
||||
|
||||
// GetEnum is a wrapper around g_settings_get_enum().
|
||||
func (v *Settings) GetEnum(name string) int {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return int(C.g_settings_get_enum(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// SetEnum is a wrapper around g_settings_set_enum().
|
||||
func (v *Settings) SetEnum(name string, value int) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_set_enum(v.native(), cstr1, C.gint(value)))
|
||||
}
|
||||
|
||||
// GetFlags is a wrapper around g_settings_get_flags().
|
||||
func (v *Settings) GetFlags(name string) uint {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return uint(C.g_settings_get_flags(v.native(), cstr1))
|
||||
}
|
||||
|
||||
// SetFlags is a wrapper around g_settings_set_flags().
|
||||
func (v *Settings) SetFlags(name string, value uint) bool {
|
||||
cstr1 := (*C.gchar)(C.CString(name))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
return gobool(C.g_settings_set_flags(v.native(), cstr1, C.guint(value)))
|
||||
}
|
||||
|
||||
// GVariant * g_settings_get_value ()
|
||||
// gboolean g_settings_set_value ()
|
||||
// GVariant * g_settings_get_user_value ()
|
||||
// GVariant * g_settings_get_default_value ()
|
||||
// const gchar * const * g_settings_list_schemas ()
|
||||
// const gchar * const * g_settings_list_relocatable_schemas ()
|
||||
// gchar ** g_settings_list_keys ()
|
||||
// GVariant * g_settings_get_range ()
|
||||
// gboolean g_settings_range_check ()
|
||||
// void g_settings_get ()
|
||||
// gboolean g_settings_set ()
|
||||
// gpointer g_settings_get_mapped ()
|
||||
// void g_settings_bind ()
|
||||
// void g_settings_bind_with_mapping ()
|
||||
// void g_settings_bind_writable ()
|
||||
// void g_settings_unbind ()
|
||||
// gaction * g_settings_create_action ()
|
||||
// gchar ** g_settings_get_strv ()
|
||||
// gboolean g_settings_set_strv ()
|
@ -0,0 +1,71 @@
|
||||
package glib
|
||||
|
||||
// #cgo pkg-config: glib-2.0 gobject-2.0
|
||||
// #include <glib.h>
|
||||
// #include <glib-object.h>
|
||||
// #include "glib.go.h"
|
||||
import "C"
|
||||
import "unsafe"
|
||||
|
||||
// SettingsBackend is a representation of GSettingsBackend.
|
||||
type SettingsBackend struct {
|
||||
*Object
|
||||
}
|
||||
|
||||
// native() returns a pointer to the underlying GSettingsBackend.
|
||||
func (v *SettingsBackend) native() *C.GSettingsBackend {
|
||||
if v == nil || v.GObject == nil {
|
||||
return nil
|
||||
}
|
||||
return C.toGSettingsBackend(unsafe.Pointer(v.GObject))
|
||||
}
|
||||
|
||||
func (v *SettingsBackend) Native() uintptr {
|
||||
return uintptr(unsafe.Pointer(v.native()))
|
||||
}
|
||||
|
||||
func marshalSettingsBackend(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
|
||||
return wrapSettingsBackend(wrapObject(unsafe.Pointer(c))), nil
|
||||
}
|
||||
|
||||
func wrapSettingsBackend(obj *Object) *SettingsBackend {
|
||||
return &SettingsBackend{obj}
|
||||
}
|
||||
|
||||
// SettingsBackendGetDefault is a wrapper around g_settings_backend_get_default().
|
||||
func SettingsBackendGetDefault() *SettingsBackend {
|
||||
return wrapSettingsBackend(wrapObject(unsafe.Pointer(C.g_settings_backend_get_default())))
|
||||
}
|
||||
|
||||
// KeyfileSettingsBackendNew is a wrapper around g_keyfile_settings_backend_new().
|
||||
func KeyfileSettingsBackendNew(filename, rootPath, rootGroup string) *SettingsBackend {
|
||||
cstr1 := (*C.gchar)(C.CString(filename))
|
||||
defer C.free(unsafe.Pointer(cstr1))
|
||||
|
||||
cstr2 := (*C.gchar)(C.CString(rootPath))
|
||||
defer C.free(unsafe.Pointer(cstr2))
|
||||
|
||||
cstr3 := (*C.gchar)(C.CString(rootGroup))
|
||||
defer C.free(unsafe.Pointer(cstr3))
|
||||
|
||||
return wrapSettingsBackend(wrapObject(unsafe.Pointer(C.g_keyfile_settings_backend_new(cstr1, cstr2, cstr3))))
|
||||
}
|
||||
|
||||
// MemorySettingsBackendNew is a wrapper around g_memory_settings_backend_new().
|
||||
func MemorySettingsBackendNew() *SettingsBackend {
|
||||
return wrapSettingsBackend(wrapObject(unsafe.Pointer(C.g_memory_settings_backend_new())))
|
||||
}
|
||||
|
||||
// NullSettingsBackendNew is a wrapper around g_null_settings_backend_new().
|
||||
func NullSettingsBackendNew() *SettingsBackend {
|
||||
return wrapSettingsBackend(wrapObject(unsafe.Pointer(C.g_null_settings_backend_new())))
|
||||
}
|
||||
|
||||
// void g_settings_backend_changed ()
|
||||
// void g_settings_backend_path_changed ()
|
||||
// void g_settings_backend_keys_changed ()
|
||||
// void g_settings_backend_path_writable_changed ()
|
||||
// void g_settings_backend_writable_changed ()
|
||||
// void g_settings_backend_changed_tree ()
|
||||
// void g_settings_backend_flatten_tree ()
|
@ -0,0 +1,96 @@
|
||||
package glib
|
||||
|
||||
// #cgo pkg-config: glib-2.0 gobject-2.0
|
||||
// #include <gio/gio.h>
|
||||
// #include <glib.h>
|
||||
// #include <glib-object.h>
|
||||
// #include "glib.go.h"
|
||||
import "C"
|
||||
import "unsafe"
|
||||
|
||||
// SettingsSchema is a representation of GSettingsSchema.
|
||||
type SettingsSchema struct {
|
||||
schema *C.GSettingsSchema
|
||||
}
|
||||
|
||||
func wrapSettingsSchema(obj *C.GSettingsSchema) *SettingsSchema {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
return &SettingsSchema{obj}
|
||||
}
|
||||
|
||||
func (v *SettingsSchema) Native() uintptr {
|
||||
return uintptr(unsafe.Pointer(v.schema))
|
||||
}
|
||||
|
||||
func (v *SettingsSchema) native() *C.GSettingsSchema {
|
||||
if v == nil || v.schema == nil {
|
||||
return nil
|
||||
}
|
||||
return v.schema
|
||||
}
|
||||
|
||||
// Ref() is a wrapper around g_settings_schema_ref().
|
||||
func (v *SettingsSchema) Ref() *SettingsSchema {
|
||||
return wrapSettingsSchema(C.g_settings_schema_ref(v.native()))
|
||||
}
|
||||
|
||||
// Unref() is a wrapper around g_settings_schema_unref().
|
||||
func (v *SettingsSchema) Unref() {
|
||||
C.g_settings_schema_unref(v.native())
|
||||
}
|
||||
|
||||
// GetID() is a wrapper around g_settings_schema_get_id().
|
||||
func (v *SettingsSchema) GetID() string {
|
||||
return C.GoString((*C.char)(C.g_settings_schema_get_id(v.native())))
|
||||
}
|
||||
|
||||
// GetPath() is a wrapper around g_settings_schema_get_path().
|
||||
func (v *SettingsSchema) GetPath() string {
|
||||
return C.GoString((*C.char)(C.g_settings_schema_get_path(v.native())))
|
||||
}
|
||||
|
||||
// HasKey() is a wrapper around g_settings_schema_has_key().
|
||||
func (v *SettingsSchema) HasKey(v1 string) bool {
|
||||
cstr := (*C.gchar)(C.CString(v1))
|
||||
defer C.free(unsafe.Pointer(cstr))
|
||||
|
||||
return gobool(C.g_settings_schema_has_key(v.native(), cstr))
|
||||
}
|
||||
|
||||
func toGoStringArray(c **C.gchar) []string {
|
||||
var strs []string
|
||||
originalc := c
|
||||
defer C.g_strfreev(originalc)
|
||||
|
||||
for *c != nil {
|
||||
strs = append(strs, C.GoString((*C.char)(*c)))
|
||||
c = C.next_gcharptr(c)
|
||||
}
|
||||
|
||||
return strs
|
||||
|
||||
}
|
||||
|
||||
// // ListChildren() is a wrapper around g_settings_schema_list_children().
|
||||
// func (v *SettingsSchema) ListChildren() []string {
|
||||
// return toGoStringArray(C.g_settings_schema_list_children(v.native()))
|
||||
// }
|
||||
|
||||
// // ListKeys() is a wrapper around g_settings_schema_list_keys().
|
||||
// func (v *SettingsSchema) ListKeys() []string {
|
||||
// return toGoStringArray(C.g_settings_schema_list_keys(v.native()))
|
||||
// }
|
||||
|
||||
// const GVariantType * g_settings_schema_key_get_value_type ()
|
||||
// GVariant * g_settings_schema_key_get_default_value ()
|
||||
// GVariant * g_settings_schema_key_get_range ()
|
||||
// gboolean g_settings_schema_key_range_check ()
|
||||
// const gchar * g_settings_schema_key_get_name ()
|
||||
// const gchar * g_settings_schema_key_get_summary ()
|
||||
// const gchar * g_settings_schema_key_get_description ()
|
||||
|
||||
// GSettingsSchemaKey * g_settings_schema_get_key ()
|
||||
// GSettingsSchemaKey * g_settings_schema_key_ref ()
|
||||
// void g_settings_schema_key_unref ()
|
@ -0,0 +1,70 @@
|
||||
package glib
|
||||
|
||||
// #cgo pkg-config: glib-2.0 gobject-2.0
|
||||
// #include <gio/gio.h>
|
||||
// #include <glib.h>
|
||||
// #include <glib-object.h>
|
||||
// #include "glib.go.h"
|
||||
import "C"
|
||||
import "unsafe"
|
||||
|
||||
// SettingsSchemaSource is a representation of GSettingsSchemaSource.
|
||||
type SettingsSchemaSource struct {
|
||||
source *C.GSettingsSchemaSource
|
||||
}
|
||||
|
||||
func wrapSettingsSchemaSource(obj *C.GSettingsSchemaSource) *SettingsSchemaSource {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
return &SettingsSchemaSource{obj}
|
||||
}
|
||||
|
||||
func (v *SettingsSchemaSource) Native() uintptr {
|
||||
return uintptr(unsafe.Pointer(v.source))
|
||||
}
|
||||
|
||||
func (v *SettingsSchemaSource) native() *C.GSettingsSchemaSource {
|
||||
if v == nil || v.source == nil {
|
||||
return nil
|
||||
}
|
||||
return v.source
|
||||
}
|
||||
|
||||
// SettingsSchemaSourceGetDefault is a wrapper around g_settings_schema_source_get_default().
|
||||
func SettingsSchemaSourceGetDefault() *SettingsSchemaSource {
|
||||
return wrapSettingsSchemaSource(C.g_settings_schema_source_get_default())
|
||||
}
|
||||
|
||||
// Ref() is a wrapper around g_settings_schema_source_ref().
|
||||
func (v *SettingsSchemaSource) Ref() *SettingsSchemaSource {
|
||||
return wrapSettingsSchemaSource(C.g_settings_schema_source_ref(v.native()))
|
||||
}
|
||||
|
||||
// Unref() is a wrapper around g_settings_schema_source_unref().
|
||||
func (v *SettingsSchemaSource) Unref() {
|
||||
C.g_settings_schema_source_unref(v.native())
|
||||
}
|
||||
|
||||
// SettingsSchemaSourceNewFromDirectory() is a wrapper around g_settings_schema_source_new_from_directory().
|
||||
func SettingsSchemaSourceNewFromDirectory(dir string, parent *SettingsSchemaSource, trusted bool) *SettingsSchemaSource {
|
||||
cstr := (*C.gchar)(C.CString(dir))
|
||||
defer C.free(unsafe.Pointer(cstr))
|
||||
|
||||
return wrapSettingsSchemaSource(C.g_settings_schema_source_new_from_directory(cstr, parent.native(), gbool(trusted), nil))
|
||||
}
|
||||
|
||||
// Lookup() is a wrapper around g_settings_schema_source_lookup().
|
||||
func (v *SettingsSchemaSource) Lookup(schema string, recursive bool) *SettingsSchema {
|
||||
cstr := (*C.gchar)(C.CString(schema))
|
||||
defer C.free(unsafe.Pointer(cstr))
|
||||
|
||||
return wrapSettingsSchema(C.g_settings_schema_source_lookup(v.native(), cstr, gbool(recursive)))
|
||||
}
|
||||
|
||||
// ListSchemas is a wrapper around g_settings_schema_source_list_schemas().
|
||||
func (v *SettingsSchemaSource) ListSchemas(recursive bool) (nonReolcatable, relocatable []string) {
|
||||
var nonRel, rel **C.gchar
|
||||
C.g_settings_schema_source_list_schemas(v.native(), gbool(recursive), &nonRel, &rel)
|
||||
return toGoStringArray(nonRel), toGoStringArray(rel)
|
||||
}
|
@ -0,0 +1,404 @@
|
||||
// Same copyright and license as the rest of the files in this project
|
||||
|
||||
package gtk
|
||||
|
||||
// #include <gtk/gtk.h>
|
||||
// #include "gtk.go.h"
|
||||
import "C"
|
||||
|
||||
import "unsafe"
|
||||
|
||||
/*
|
||||
* GtkTextIter
|
||||
*/
|
||||
|
||||
// TextIter is a representation of GTK's GtkTextIter
|
||||
type TextIter C.GtkTextIter
|
||||
|
||||
// native returns a pointer to the underlying GtkTextIter.
|
||||
func (v *TextIter) native() *C.GtkTextIter {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return (*C.GtkTextIter)(v)
|
||||
}
|
||||
|
||||
func marshalTextIter(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p)))
|
||||
return (*TextIter)(unsafe.Pointer(c)), nil
|
||||
}
|
||||
|
||||
// GetBuffer is a wrapper around gtk_text_iter_get_buffer().
|
||||
func (v *TextIter) GetBuffer() *TextBuffer {
|
||||
c := C.gtk_text_iter_get_buffer(v.native())
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return wrapTextBuffer(wrapObject(unsafe.Pointer(c)))
|
||||
}
|
||||
|
||||
// GetOffset is a wrapper around gtk_text_iter_get_offset().
|
||||
func (v *TextIter) GetOffset() int {
|
||||
return int(C.gtk_text_iter_get_offset(v.native()))
|
||||
}
|
||||
|
||||
// GetLine is a wrapper around gtk_text_iter_get_line().
|
||||
func (v *TextIter) GetLine() int {
|
||||
return int(C.gtk_text_iter_get_line(v.native()))
|
||||
}
|
||||
|
||||
// GetLineOffset is a wrapper around gtk_text_iter_get_line_offset().
|
||||
func (v *TextIter) GetLineOffset() int {
|
||||
return int(C.gtk_text_iter_get_line_offset(v.native()))
|
||||
}
|
||||
|
||||
// GetLineIndex is a wrapper around gtk_text_iter_get_line_index().
|
||||
func (v *TextIter) GetLineIndex() int {
|
||||
return int(C.gtk_text_iter_get_line_index(v.native()))
|
||||
}
|
||||
|
||||
// GetVisibleLineOffset is a wrapper around gtk_text_iter_get_visible_line_offset().
|
||||
func (v *TextIter) GetVisibleLineOffset() int {
|
||||
return int(C.gtk_text_iter_get_visible_line_offset(v.native()))
|
||||
}
|
||||
|
||||
// GetVisibleLineIndex is a wrapper around gtk_text_iter_get_visible_line_index().
|
||||
func (v *TextIter) GetVisibleLineIndex() int {
|
||||
return int(C.gtk_text_iter_get_visible_line_index(v.native()))
|
||||
}
|
||||
|
||||
// GetChar is a wrapper around gtk_text_iter_get_char().
|
||||
func (v *TextIter) GetChar() rune {
|
||||
return rune(C.gtk_text_iter_get_char(v.native()))
|
||||
}
|
||||
|
||||
// GetSlice is a wrapper around gtk_text_iter_get_slice().
|
||||
func (v *TextIter) GetSlice(end *TextIter) string {
|
||||
c := C.gtk_text_iter_get_slice(v.native(), end.native())
|
||||
return C.GoString((*C.char)(c))
|
||||
}
|
||||
|
||||
// GetText is a wrapper around gtk_text_iter_get_text().
|
||||
func (v *TextIter) GetText(end *TextIter) string {
|
||||
c := C.gtk_text_iter_get_text(v.native(), end.native())
|
||||
return C.GoString((*C.char)(c))
|
||||
}
|
||||
|
||||
// GetVisibleSlice is a wrapper around gtk_text_iter_get_visible_slice().
|
||||
func (v *TextIter) GetVisibleSlice(end *TextIter) string {
|
||||
c := C.gtk_text_iter_get_visible_slice(v.native(), end.native())
|
||||
return C.GoString((*C.char)(c))
|
||||
}
|
||||
|
||||
// GetVisibleText is a wrapper around gtk_text_iter_get_visible_text().
|
||||
func (v *TextIter) GetVisibleText(end *TextIter) string {
|
||||
c := C.gtk_text_iter_get_visible_text(v.native(), end.native())
|
||||
return C.GoString((*C.char)(c))
|
||||
}
|
||||
|
||||
// BeginsTag is a wrapper around gtk_text_iter_begins_tag().
|
||||
func (v *TextIter) BeginsTag(v1 *TextTag) bool {
|
||||
return gobool(C.gtk_text_iter_begins_tag(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// EndsTag is a wrapper around gtk_text_iter_ends_tag().
|
||||
func (v *TextIter) EndsTag(v1 *TextTag) bool {
|
||||
return gobool(C.gtk_text_iter_ends_tag(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// TogglesTag is a wrapper around gtk_text_iter_toggles_tag().
|
||||
func (v *TextIter) TogglesTag(v1 *TextTag) bool {
|
||||
return gobool(C.gtk_text_iter_toggles_tag(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// HasTag is a wrapper around gtk_text_iter_has_tag().
|
||||
func (v *TextIter) HasTag(v1 *TextTag) bool {
|
||||
return gobool(C.gtk_text_iter_has_tag(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// Editable is a wrapper around gtk_text_iter_editable().
|
||||
func (v *TextIter) Editable(v1 bool) bool {
|
||||
return gobool(C.gtk_text_iter_editable(v.native(), gbool(v1)))
|
||||
}
|
||||
|
||||
// CanInsert is a wrapper around gtk_text_iter_can_insert().
|
||||
func (v *TextIter) CanInsert(v1 bool) bool {
|
||||
return gobool(C.gtk_text_iter_can_insert(v.native(), gbool(v1)))
|
||||
}
|
||||
|
||||
// StartsWord is a wrapper around gtk_text_iter_starts_word().
|
||||
func (v *TextIter) StartsWord() bool {
|
||||
return gobool(C.gtk_text_iter_starts_word(v.native()))
|
||||
}
|
||||
|
||||
// EndsWord is a wrapper around gtk_text_iter_ends_word().
|
||||
func (v *TextIter) EndsWord() bool {
|
||||
return gobool(C.gtk_text_iter_ends_word(v.native()))
|
||||
}
|
||||
|
||||
// InsideWord is a wrapper around gtk_text_iter_inside_word().
|
||||
func (v *TextIter) InsideWord() bool {
|
||||
return gobool(C.gtk_text_iter_inside_word(v.native()))
|
||||
}
|
||||
|
||||
// StartsLine is a wrapper around gtk_text_iter_starts_line().
|
||||
func (v *TextIter) StartsLine() bool {
|
||||
return gobool(C.gtk_text_iter_starts_line(v.native()))
|
||||
}
|
||||
|
||||
// EndsLine is a wrapper around gtk_text_iter_ends_line().
|
||||
func (v *TextIter) EndsLine() bool {
|
||||
return gobool(C.gtk_text_iter_ends_line(v.native()))
|
||||
}
|
||||
|
||||
// StartsSentence is a wrapper around gtk_text_iter_starts_sentence().
|
||||
func (v *TextIter) StartsSentence() bool {
|
||||
return gobool(C.gtk_text_iter_starts_sentence(v.native()))
|
||||
}
|
||||
|
||||
// EndsSentence is a wrapper around gtk_text_iter_ends_sentence().
|
||||
func (v *TextIter) EndsSentence() bool {
|
||||
return gobool(C.gtk_text_iter_ends_sentence(v.native()))
|
||||
}
|
||||
|
||||
// InsideSentence is a wrapper around gtk_text_iter_inside_sentence().
|
||||
func (v *TextIter) InsideSentence() bool {
|
||||
return gobool(C.gtk_text_iter_inside_sentence(v.native()))
|
||||
}
|
||||
|
||||
// IsCursorPosition is a wrapper around gtk_text_iter_is_cursor_position().
|
||||
func (v *TextIter) IsCursorPosition() bool {
|
||||
return gobool(C.gtk_text_iter_is_cursor_position(v.native()))
|
||||
}
|
||||
|
||||
// GetCharsInLine is a wrapper around gtk_text_iter_get_chars_in_line().
|
||||
func (v *TextIter) GetCharsInLine() int {
|
||||
return int(C.gtk_text_iter_get_chars_in_line(v.native()))
|
||||
}
|
||||
|
||||
// GetBytesInLine is a wrapper around gtk_text_iter_get_bytes_in_line().
|
||||
func (v *TextIter) GetBytesInLine() int {
|
||||
return int(C.gtk_text_iter_get_bytes_in_line(v.native()))
|
||||
}
|
||||
|
||||
// IsEnd is a wrapper around gtk_text_iter_is_end().
|
||||
func (v *TextIter) IsEnd() bool {
|
||||
return gobool(C.gtk_text_iter_is_end(v.native()))
|
||||
}
|
||||
|
||||
// IsStart is a wrapper around gtk_text_iter_is_start().
|
||||
func (v *TextIter) IsStart() bool {
|
||||
return gobool(C.gtk_text_iter_is_start(v.native()))
|
||||
}
|
||||
|
||||
// ForwardChar is a wrapper around gtk_text_iter_forward_char().
|
||||
func (v *TextIter) ForwardChar() bool {
|
||||
return gobool(C.gtk_text_iter_forward_char(v.native()))
|
||||
}
|
||||
|
||||
// BackwardChar is a wrapper around gtk_text_iter_backward_char().
|
||||
func (v *TextIter) BackwardChar() bool {
|
||||
return gobool(C.gtk_text_iter_backward_char(v.native()))
|
||||
}
|
||||
|
||||
// ForwardChars is a wrapper around gtk_text_iter_forward_chars().
|
||||
func (v *TextIter) ForwardChars(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_chars(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// BackwardChars is a wrapper around gtk_text_iter_backward_chars().
|
||||
func (v *TextIter) BackwardChars(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_backward_chars(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardLine is a wrapper around gtk_text_iter_forward_line().
|
||||
func (v *TextIter) ForwardLine() bool {
|
||||
return gobool(C.gtk_text_iter_forward_line(v.native()))
|
||||
}
|
||||
|
||||
// BackwardLine is a wrapper around gtk_text_iter_backward_line().
|
||||
func (v *TextIter) BackwardLine() bool {
|
||||
return gobool(C.gtk_text_iter_backward_line(v.native()))
|
||||
}
|
||||
|
||||
// ForwardLines is a wrapper around gtk_text_iter_forward_lines().
|
||||
func (v *TextIter) ForwardLines(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_lines(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// BackwardLines is a wrapper around gtk_text_iter_backward_lines().
|
||||
func (v *TextIter) BackwardLines(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_backward_lines(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardWordEnds is a wrapper around gtk_text_iter_forward_word_ends().
|
||||
func (v *TextIter) ForwardWordEnds(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_word_ends(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardWordEnd is a wrapper around gtk_text_iter_forward_word_end().
|
||||
func (v *TextIter) ForwardWordEnd() bool {
|
||||
return gobool(C.gtk_text_iter_forward_word_end(v.native()))
|
||||
}
|
||||
|
||||
// ForwardCursorPosition is a wrapper around gtk_text_iter_forward_cursor_position().
|
||||
func (v *TextIter) ForwardCursorPosition() bool {
|
||||
return gobool(C.gtk_text_iter_forward_cursor_position(v.native()))
|
||||
}
|
||||
|
||||
// BackwardCursorPosition is a wrapper around gtk_text_iter_backward_cursor_position().
|
||||
func (v *TextIter) BackwardCursorPosition() bool {
|
||||
return gobool(C.gtk_text_iter_backward_cursor_position(v.native()))
|
||||
}
|
||||
|
||||
// ForwardCursorPositions is a wrapper around gtk_text_iter_forward_cursor_positions().
|
||||
func (v *TextIter) ForwardCursorPositions(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_cursor_positions(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// BackwardCursorPositions is a wrapper around gtk_text_iter_backward_cursor_positions().
|
||||
func (v *TextIter) BackwardCursorPositions(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_backward_cursor_positions(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardSentenceEnds is a wrapper around gtk_text_iter_forward_sentence_ends().
|
||||
func (v *TextIter) ForwardSentenceEnds(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_sentence_ends(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardSentenceEnd is a wrapper around gtk_text_iter_forward_sentence_end().
|
||||
func (v *TextIter) ForwardSentenceEnd() bool {
|
||||
return gobool(C.gtk_text_iter_forward_sentence_end(v.native()))
|
||||
}
|
||||
|
||||
// ForwardVisibleWordEnds is a wrapper around gtk_text_iter_forward_word_ends().
|
||||
func (v *TextIter) ForwardVisibleWordEnds(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_word_ends(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardVisibleWordEnd is a wrapper around gtk_text_iter_forward_visible_word_end().
|
||||
func (v *TextIter) ForwardVisibleWordEnd() bool {
|
||||
return gobool(C.gtk_text_iter_forward_visible_word_end(v.native()))
|
||||
}
|
||||
|
||||
// ForwardVisibleCursorPosition is a wrapper around gtk_text_iter_forward_visible_cursor_position().
|
||||
func (v *TextIter) ForwardVisibleCursorPosition() bool {
|
||||
return gobool(C.gtk_text_iter_forward_visible_cursor_position(v.native()))
|
||||
}
|
||||
|
||||
// BackwardVisibleCursorPosition is a wrapper around gtk_text_iter_backward_visible_cursor_position().
|
||||
func (v *TextIter) BackwardVisibleCursorPosition() bool {
|
||||
return gobool(C.gtk_text_iter_backward_visible_cursor_position(v.native()))
|
||||
}
|
||||
|
||||
// ForwardVisibleCursorPositions is a wrapper around gtk_text_iter_forward_visible_cursor_positions().
|
||||
func (v *TextIter) ForwardVisibleCursorPositions(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_visible_cursor_positions(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// BackwardVisibleCursorPositions is a wrapper around gtk_text_iter_backward_visible_cursor_positions().
|
||||
func (v *TextIter) BackwardVisibleCursorPositions(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_backward_visible_cursor_positions(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// ForwardVisibleLine is a wrapper around gtk_text_iter_forward_visible_line().
|
||||
func (v *TextIter) ForwardVisibleLine() bool {
|
||||
return gobool(C.gtk_text_iter_forward_visible_line(v.native()))
|
||||
}
|
||||
|
||||
// BackwardVisibleLine is a wrapper around gtk_text_iter_backward_visible_line().
|
||||
func (v *TextIter) BackwardVisibleLine() bool {
|
||||
return gobool(C.gtk_text_iter_backward_visible_line(v.native()))
|
||||
}
|
||||
|
||||
// ForwardVisibleLines is a wrapper around gtk_text_iter_forward_visible_lines().
|
||||
func (v *TextIter) ForwardVisibleLines(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_forward_visible_lines(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// BackwardVisibleLines is a wrapper around gtk_text_iter_backward_visible_lines().
|
||||
func (v *TextIter) BackwardVisibleLines(v1 int) bool {
|
||||
return gobool(C.gtk_text_iter_backward_visible_lines(v.native(), C.gint(v1)))
|
||||
}
|
||||
|
||||
// SetOffset is a wrapper around gtk_text_iter_set_offset().
|
||||
func (v *TextIter) SetOffset(v1 int) {
|
||||
C.gtk_text_iter_set_offset(v.native(), C.gint(v1))
|
||||
}
|
||||
|
||||
// SetLine is a wrapper around gtk_text_iter_set_line().
|
||||
func (v *TextIter) SetLine(v1 int) {
|
||||
C.gtk_text_iter_set_line(v.native(), C.gint(v1))
|
||||
}
|
||||
|
||||
// SetLineOffset is a wrapper around gtk_text_iter_set_line_offset().
|
||||
func (v *TextIter) SetLineOffset(v1 int) {
|
||||
C.gtk_text_iter_set_line_offset(v.native(), C.gint(v1))
|
||||
}
|
||||
|
||||
// SetLineIndex is a wrapper around gtk_text_iter_set_line_index().
|
||||
func (v *TextIter) SetLineIndex(v1 int) {
|
||||
C.gtk_text_iter_set_line_index(v.native(), C.gint(v1))
|
||||
}
|
||||
|
||||
// SetVisibleLineOffset is a wrapper around gtk_text_iter_set_visible_line_offset().
|
||||
func (v *TextIter) SetVisibleLineOffset(v1 int) {
|
||||
C.gtk_text_iter_set_visible_line_offset(v.native(), C.gint(v1))
|
||||
}
|
||||
|
||||
// SetVisibleLineIndex is a wrapper around gtk_text_iter_set_visible_line_index().
|
||||
func (v *TextIter) SetVisibleLineIndex(v1 int) {
|
||||
C.gtk_text_iter_set_visible_line_index(v.native(), C.gint(v1))
|
||||
}
|
||||
|
||||
// ForwardToEnd is a wrapper around gtk_text_iter_forward_to_end().
|
||||
func (v *TextIter) ForwardToEnd() {
|
||||
C.gtk_text_iter_forward_to_end(v.native())
|
||||
}
|
||||
|
||||
// ForwardToLineEnd is a wrapper around gtk_text_iter_forward_to_line_end().
|
||||
func (v *TextIter) ForwardToLineEnd() bool {
|
||||
return gobool(C.gtk_text_iter_forward_to_line_end(v.native()))
|
||||
}
|
||||
|
||||
// ForwardToTagToggle is a wrapper around gtk_text_iter_forward_to_tag_toggle().
|
||||
func (v *TextIter) ForwardToTagToggle(v1 *TextTag) bool {
|
||||
return gobool(C.gtk_text_iter_forward_to_tag_toggle(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// BackwardToTagToggle is a wrapper around gtk_text_iter_backward_to_tag_toggle().
|
||||
func (v *TextIter) BackwardToTagToggle(v1 *TextTag) bool {
|
||||
return gobool(C.gtk_text_iter_backward_to_tag_toggle(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// Equal is a wrapper around gtk_text_iter_equal().
|
||||
func (v *TextIter) Equal(v1 *TextIter) bool {
|
||||
return gobool(C.gtk_text_iter_equal(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// Compare is a wrapper around gtk_text_iter_compare().
|
||||
func (v *TextIter) Compare(v1 *TextIter) int {
|
||||
return int(C.gtk_text_iter_compare(v.native(), v1.native()))
|
||||
}
|
||||
|
||||
// InRange is a wrapper around gtk_text_iter_in_range().
|
||||
func (v *TextIter) InRange(v1 *TextIter, v2 *TextIter) bool {
|
||||
return gobool(C.gtk_text_iter_in_range(v.native(), v1.native(), v2.native()))
|
||||
}
|
||||
|
||||
// void gtk_text_iter_order ()
|
||||
// gboolean (*GtkTextCharPredicate) ()
|
||||
// gboolean gtk_text_iter_forward_find_char ()
|
||||
// gboolean gtk_text_iter_backward_find_char ()
|
||||
// gboolean gtk_text_iter_forward_search ()
|
||||
// gboolean gtk_text_iter_backward_search ()
|
||||
// gboolean gtk_text_iter_get_attributes ()
|
||||
// GtkTextIter * gtk_text_iter_copy ()
|
||||
// void gtk_text_iter_assign ()
|
||||
// void gtk_text_iter_free ()
|
||||
// GdkPixbuf * gtk_text_iter_get_pixbuf ()
|
||||
// GSList * gtk_text_iter_get_marks ()
|
||||
// GSList * gtk_text_iter_get_toggled_tags ()
|
||||
// GtkTextChildAnchor * gtk_text_iter_get_child_anchor ()
|
||||
// GSList * gtk_text_iter_get_tags ()
|
||||
// PangoLanguage * gtk_text_iter_get_language ()
|
@ -0,0 +1,29 @@
|
||||
// Same copyright and license as the rest of the files in this project
|
||||
|
||||
package gtk
|
||||
|
||||
// #include <gtk/gtk.h>
|
||||
// #include "gtk.go.h"
|
||||
import "C"
|
||||
|
||||
import "unsafe"
|
||||
|
||||
/*
|
||||
* GtkTextMark
|
||||
*/
|
||||
|
||||
// TextMark is a representation of GTK's GtkTextMark
|
||||
type TextMark C.GtkTextMark
|
||||
|
||||
// native returns a pointer to the underlying GtkTextMark.
|
||||
func (v *TextMark) native() *C.GtkTextMark {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
return (*C.GtkTextMark)(v)
|
||||
}
|
||||
|
||||
func marshalTextMark(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_boxed((*C.GValue)(unsafe.Pointer(p)))
|
||||
return (*TextMark)(unsafe.Pointer(c)), nil
|
||||
}
|
@ -0,0 +1,420 @@
|
||||
// Same copyright and license as the rest of the files in this project
|
||||
|
||||
package gtk
|
||||
|
||||
// #include <gtk/gtk.h>
|
||||
// #include "gtk.go.h"
|
||||
import "C"
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/gotk3/gotk3/gdk"
|
||||
"github.com/gotk3/gotk3/glib"
|
||||
)
|
||||
|
||||
// TextWindowType is a representation of GTK's GtkTextWindowType.
|
||||
type TextWindowType int
|
||||
|
||||
const (
|
||||
TEXT_WINDOW_WIDGET TextWindowType = C.GTK_TEXT_WINDOW_WIDGET
|
||||
TEXT_WINDOW_TEXT TextWindowType = C.GTK_TEXT_WINDOW_TEXT
|
||||
TEXT_WINDOW_LEFT TextWindowType = C.GTK_TEXT_WINDOW_LEFT
|
||||
TEXT_WINDOW_RIGHT TextWindowType = C.GTK_TEXT_WINDOW_RIGHT
|
||||
TEXT_WINDOW_TOP TextWindowType = C.GTK_TEXT_WINDOW_TOP
|
||||
TEXT_WINDOW_BOTTOM TextWindowType = C.GTK_TEXT_WINDOW_BOTTOM
|
||||
)
|
||||
|
||||
/*
|
||||
* GtkTextView
|
||||
*/
|
||||
|
||||
// TextView is a representation of GTK's GtkTextView
|
||||
type TextView struct {
|
||||
Container
|
||||
}
|
||||
|
||||
// native returns a pointer to the underlying GtkTextView.
|
||||
func (v *TextView) native() *C.GtkTextView {
|
||||
if v == nil || v.GObject == nil {
|
||||
return nil
|
||||
}
|
||||
p := unsafe.Pointer(v.GObject)
|
||||
return C.toGtkTextView(p)
|
||||
}
|
||||
|
||||
func marshalTextView(p uintptr) (interface{}, error) {
|
||||
c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
|
||||
obj := wrapObject(unsafe.Pointer(c))
|
||||
return wrapTextView(obj), nil
|
||||
}
|
||||
|
||||
func wrapTextView(obj *glib.Object) *TextView {
|
||||
return &TextView{Container{Widget{glib.InitiallyUnowned{obj}}}}
|
||||
}
|
||||
|
||||
// TextViewNew is a wrapper around gtk_text_view_new().
|
||||
func TextViewNew() (*TextView, error) {
|
||||
c := C.gtk_text_view_new()
|
||||
if c == nil {
|
||||
return nil, nilPtrErr
|
||||
}
|
||||
return wrapTextView(wrapObject(unsafe.Pointer(c))), nil
|
||||
}
|
||||
|
||||
// TextViewNewWithBuffer is a wrapper around gtk_text_view_new_with_buffer().
|
||||
func TextViewNewWithBuffer(buf *TextBuffer) (*TextView, error) {
|
||||
cbuf := buf.native()
|
||||
c := C.gtk_text_view_new_with_buffer(cbuf)
|
||||
return wrapTextView(wrapObject(unsafe.Pointer(c))), nil
|
||||
}
|
||||
|
||||
// GetBuffer is a wrapper around gtk_text_view_get_buffer().
|
||||
func (v *TextView) GetBuffer() (*TextBuffer, error) {
|
||||
c := C.gtk_text_view_get_buffer(v.native())
|
||||
if c == nil {
|
||||
return nil, nilPtrErr
|
||||
}
|
||||
return wrapTextBuffer(wrapObject(unsafe.Pointer(c))), nil
|
||||
}
|
||||
|
||||
// SetBuffer is a wrapper around gtk_text_view_set_buffer().
|
||||
func (v *TextView) SetBuffer(buffer *TextBuffer) {
|
||||
C.gtk_text_view_set_buffer(v.native(), buffer.native())
|
||||
}
|
||||
|
||||
// SetEditable is a wrapper around gtk_text_view_set_editable().
|
||||
func (v *TextView) SetEditable(editable bool) {
|
||||
C.gtk_text_view_set_editable(v.native(), gbool(editable))
|
||||
}
|
||||
|
||||
// GetEditable is a wrapper around gtk_text_view_get_editable().
|
||||
func (v *TextView) GetEditable() bool {
|
||||
c := C.gtk_text_view_get_editable(v.native())
|
||||
return gobool(c)
|
||||
}
|
||||
|
||||
// SetWrapMode is a wrapper around gtk_text_view_set_wrap_mode().
|
||||
func (v *TextView) SetWrapMode(wrapMode WrapMode) {
|
||||
C.gtk_text_view_set_wrap_mode(v.native(), C.GtkWrapMode(wrapMode))
|
||||
}
|
||||
|
||||
// GetWrapMode is a wrapper around gtk_text_view_get_wrap_mode().
|
||||
func (v *TextView) GetWrapMode() WrapMode {
|
||||
return WrapMode(C.gtk_text_view_get_wrap_mode(v.native()))
|
||||
}
|
||||
|
||||
// SetCursorVisible is a wrapper around gtk_text_view_set_cursor_visible().
|
||||
func (v *TextView) SetCursorVisible(visible bool) {
|
||||
C.gtk_text_view_set_cursor_visible(v.native(), gbool(visible))
|
||||
}
|
||||
|
||||
// GetCursorVisible is a wrapper around gtk_text_view_get_cursor_visible().
|
||||
func (v *TextView) GetCursorVisible() bool {
|
||||
c := C.gtk_text_view_get_cursor_visible(v.native())
|
||||
return gobool(c)
|
||||
}
|
||||
|
||||
// SetOverwrite is a wrapper around gtk_text_view_set_overwrite().
|
||||
func (v *TextView) SetOverwrite(overwrite bool) {
|
||||
C.gtk_text_view_set_overwrite(v.native(), gbool(overwrite))
|
||||
}
|
||||
|
||||
// GetOverwrite is a wrapper around gtk_text_view_get_overwrite().
|
||||
func (v *TextView) GetOverwrite() bool {
|
||||
c := C.gtk_text_view_get_overwrite(v.native())
|
||||
return gobool(c)
|
||||
}
|
||||
|
||||
// SetJustification is a wrapper around gtk_text_view_set_justification().
|
||||
func (v *TextView) SetJustification(justify Justification) {
|
||||
C.gtk_text_view_set_justification(v.native(), C.GtkJustification(justify))
|
||||
}
|
||||
|
||||
// GetJustification is a wrapper around gtk_text_view_get_justification().
|
||||
func (v *TextView) GetJustification() Justification {
|
||||
c := C.gtk_text_view_get_justification(v.native())
|
||||
return Justification(c)
|
||||
}
|
||||
|
||||
// SetAcceptsTab is a wrapper around gtk_text_view_set_accepts_tab().
|
||||
func (v *TextView) SetAcceptsTab(acceptsTab bool) {
|
||||
C.gtk_text_view_set_accepts_tab(v.native(), gbool(acceptsTab))
|
||||
}
|
||||
|
||||
// GetAcceptsTab is a wrapper around gtk_text_view_get_accepts_tab().
|
||||
func (v *TextView) GetAcceptsTab() bool {
|
||||
c := C.gtk_text_view_get_accepts_tab(v.native())
|
||||
return gobool(c)
|
||||
}
|
||||
|
||||
// SetPixelsAboveLines is a wrapper around gtk_text_view_set_pixels_above_lines().
|
||||
func (v *TextView) SetPixelsAboveLines(px int) {
|
||||
C.gtk_text_view_set_pixels_above_lines(v.native(), C.gint(px))
|
||||
}
|
||||
|
||||
// GetPixelsAboveLines is a wrapper around gtk_text_view_get_pixels_above_lines().
|
||||
func (v *TextView) GetPixelsAboveLines() int {
|
||||
c := C.gtk_text_view_get_pixels_above_lines(v.native())
|
||||
return int(c)
|
||||
}
|
||||
|
||||
// SetPixelsBelowLines is a wrapper around gtk_text_view_set_pixels_below_lines().
|
||||
func (v *TextView) SetPixelsBelowLines(px int) {
|
||||
C.gtk_text_view_set_pixels_below_lines(v.native(), C.gint(px))
|
||||
}
|
||||
|
||||
// GetPixelsBelowLines is a wrapper around gtk_text_view_get_pixels_below_lines().
|
||||
func (v *TextView) GetPixelsBelowLines() int {
|
||||
c := C.gtk_text_view_get_pixels_below_lines(v.native())
|
||||
return int(c)
|
||||
}
|
||||
|
||||
// SetPixelsInsideWrap is a wrapper around gtk_text_view_set_pixels_inside_wrap().
|
||||
func (v *TextView) SetPixelsInsideWrap(px int) {
|
||||
C.gtk_text_view_set_pixels_inside_wrap(v.native(), C.gint(px))
|
||||
}
|
||||
|
||||
// GetPixelsInsideWrap is a wrapper around gtk_text_view_get_pixels_inside_wrap().
|
||||
func (v *TextView) GetPixelsInsideWrap() int {
|
||||
c := C.gtk_text_view_get_pixels_inside_wrap(v.native())
|
||||
return int(c)
|
||||
}
|
||||
|
||||
// SetLeftMargin is a wrapper around gtk_text_view_set_left_margin().
|
||||
func (v *TextView) SetLeftMargin(margin int) {
|
||||
C.gtk_text_view_set_left_margin(v.native(), C.gint(margin))
|
||||
}
|
||||
|
||||
// GetLeftMargin is a wrapper around gtk_text_view_get_left_margin().
|
||||
func (v *TextView) GetLeftMargin() int {
|
||||
c := C.gtk_text_view_get_left_margin(v.native())
|
||||
return int(c)
|
||||
}
|
||||
|
||||
// SetRightMargin is a wrapper around gtk_text_view_set_right_margin().
|
||||
func (v *TextView) SetRightMargin(margin int) {
|
||||
C.gtk_text_view_set_right_margin(v.native(), C.gint(margin))
|
||||
}
|
||||
|
||||
// GetRightMargin is a wrapper around gtk_text_view_get_right_margin().
|
||||
func (v *TextView) GetRightMargin() int {
|
||||
c := C.gtk_text_view_get_right_margin(v.native())
|
||||
return int(c)
|
||||
}
|
||||
|
||||
// SetIndent is a wrapper around gtk_text_view_set_indent().
|
||||
func (v *TextView) SetIndent(indent int) {
|
||||
C.gtk_text_view_set_indent(v.native(), C.gint(indent))
|
||||
}
|
||||
|
||||
// GetIndent is a wrapper around gtk_text_view_get_indent().
|
||||
func (v *TextView) GetIndent() int {
|
||||
c := C.gtk_text_view_get_indent(v.native())
|
||||
return int(c)
|
||||
}
|
||||
|
||||
// SetInputHints is a wrapper around gtk_text_view_set_input_hints().
|
||||
func (v *TextView) SetInputHints(hints InputHints) {
|
||||
C.gtk_text_view_set_input_hints(v.native(), C.GtkInputHints(hints))
|
||||
}
|
||||
|
||||
// GetInputHints is a wrapper around gtk_text_view_get_input_hints().
|
||||
func (v *TextView) GetInputHints() InputHints {
|
||||
c := C.gtk_text_view_get_input_hints(v.native())
|
||||
return InputHints(c)
|
||||
}
|
||||
|
||||
// SetInputPurpose is a wrapper around gtk_text_view_set_input_purpose().
|
||||
func (v *TextView) SetInputPurpose(purpose InputPurpose) {
|
||||
C.gtk_text_view_set_input_purpose(v.native(),
|
||||
C.GtkInputPurpose(purpose))
|
||||
}
|
||||
|
||||
// GetInputPurpose is a wrapper around gtk_text_view_get_input_purpose().
|
||||
func (v *TextView) GetInputPurpose() InputPurpose {
|
||||
c := C.gtk_text_view_get_input_purpose(v.native())
|
||||
return InputPurpose(c)
|
||||
}
|
||||
|
||||
// ScrollToMark is a wrapper around gtk_text_view_scroll_to_mark().
|
||||
func (v *TextView) ScrollToMark(mark *TextMark, within_margin float64, use_align bool, xalign, yalign float64) {
|
||||
C.gtk_text_view_scroll_to_mark(v.native(), mark.native(), C.gdouble(within_margin), gbool(use_align), C.gdouble(xalign), C.gdouble(yalign))
|
||||
}
|
||||
|
||||
// ScrollToIter is a wrapper around gtk_text_view_scroll_to_iter().
|
||||
func (v *TextView) ScrollToIter(iter *TextIter, within_margin float64, use_align bool, xalign, yalign float64) bool {
|
||||
return gobool(C.gtk_text_view_scroll_to_iter(v.native(), iter.native(), C.gdouble(within_margin), gbool(use_align), C.gdouble(xalign), C.gdouble(yalign)))
|
||||
}
|
||||
|
||||
// ScrollMarkOnscreen is a wrapper around gtk_text_view_scroll_mark_onscreen().
|
||||
func (v *TextView) ScrollMarkOnscreen(mark *TextMark) {
|
||||
C.gtk_text_view_scroll_mark_onscreen(v.native(), mark.native())
|
||||
}
|
||||
|
||||
// MoveMarkOnscreen is a wrapper around gtk_text_view_move_mark_onscreen().
|
||||
func (v *TextView) MoveMarkOnscreen(mark *TextMark) bool {
|
||||
return gobool(C.gtk_text_view_move_mark_onscreen(v.native(), mark.native()))
|
||||
}
|
||||
|
||||
// PlaceCursorOnscreen is a wrapper around gtk_text_view_place_cursor_onscreen().
|
||||
func (v *TextView) PlaceCursorOnscreen() bool {
|
||||
return gobool(C.gtk_text_view_place_cursor_onscreen(v.native()))
|
||||
}
|
||||
|
||||
// GetVisibleRect is a wrapper around gtk_text_view_get_visible_rect().
|
||||
func (v *TextView) GetVisibleRect() *gdk.Rectangle {
|
||||
var rect C.GdkRectangle
|
||||
C.gtk_text_view_get_visible_rect(v.native(), &rect)
|
||||
return gdk.WrapRectangle(uintptr(unsafe.Pointer(&rect)))
|
||||
}
|
||||
|
||||
// GetIterLocation is a wrapper around gtk_text_view_get_iter_location().
|
||||
func (v *TextView) GetIterLocation(iter *TextIter) *gdk.Rectangle {
|
||||
var rect C.GdkRectangle
|
||||
C.gtk_text_view_get_iter_location(v.native(), iter.native(), &rect)
|
||||
return gdk.WrapRectangle(uintptr(unsafe.Pointer(&rect)))
|
||||
}
|
||||
|
||||
// GetCursorLocations is a wrapper around gtk_text_view_get_cursor_locations().
|
||||
func (v *TextView) GetCursorLocations(iter *TextIter) (strong, weak *gdk.Rectangle) {
|
||||
var strongRect, weakRect C.GdkRectangle
|
||||
C.gtk_text_view_get_cursor_locations(v.native(), iter.native(), &strongRect, &weakRect)
|
||||
return gdk.WrapRectangle(uintptr(unsafe.Pointer(&strongRect))), gdk.WrapRectangle(uintptr(unsafe.Pointer(&weakRect)))
|
||||
}
|
||||
|
||||
// GetLineAtY is a wrapper around gtk_text_view_get_line_at_y().
|
||||
func (v *TextView) GetLineAtY(y int) (*TextIter, int) {
|
||||
var iter TextIter
|
||||
var line_top C.gint
|
||||
iiter := (C.GtkTextIter)(iter)
|
||||
C.gtk_text_view_get_line_at_y(v.native(), &iiter, C.gint(y), &line_top)
|
||||
return &iter, int(line_top)
|
||||
}
|
||||
|
||||
// GetLineYrange is a wrapper around gtk_text_view_get_line_yrange().
|
||||
func (v *TextView) GetLineYrange(iter *TextIter) (y, height int) {
|
||||
var yx, heightx C.gint
|
||||
C.gtk_text_view_get_line_yrange(v.native(), iter.native(), &yx, &heightx)
|
||||
return int(yx), int(heightx)
|
||||
}
|
||||
|
||||
// GetIterAtLocation is a wrapper around gtk_text_view_get_iter_at_location().
|
||||
func (v *TextView) GetIterAtLocation(x, y int) *TextIter {
|
||||
var iter TextIter
|
||||
iiter := (C.GtkTextIter)(iter)
|
||||
C.gtk_text_view_get_iter_at_location(v.native(), &iiter, C.gint(x), C.gint(y))
|
||||
return &iter
|
||||
}
|
||||
|
||||
// GetIterAtPosition is a wrapper around gtk_text_view_get_iter_at_position().
|
||||
func (v *TextView) GetIterAtPosition(x, y int) (*TextIter, int) {
|
||||
var iter TextIter
|
||||
var trailing C.gint
|
||||
iiter := (C.GtkTextIter)(iter)
|
||||
C.gtk_text_view_get_iter_at_position(v.native(), &iiter, &trailing, C.gint(x), C.gint(y))
|
||||
return &iter, int(trailing)
|
||||
}
|
||||
|
||||
// BufferToWindowCoords is a wrapper around gtk_text_view_buffer_to_window_coords().
|
||||
func (v *TextView) BufferToWindowCoords(win TextWindowType, buffer_x, buffer_y int) (window_x, window_y int) {
|
||||
var wx, wy C.gint
|
||||
C.gtk_text_view_buffer_to_window_coords(v.native(), C.GtkTextWindowType(win), C.gint(buffer_x), C.gint(buffer_y), &wx, &wy)
|
||||
return int(wx), int(wy)
|
||||
}
|
||||
|
||||
// WindowToBufferCoords is a wrapper around gtk_text_view_window_to_buffer_coords().
|
||||
func (v *TextView) WindowToBufferCoords(win TextWindowType, window_x, window_y int) (buffer_x, buffer_y int) {
|
||||
var bx, by C.gint
|
||||
C.gtk_text_view_window_to_buffer_coords(v.native(), C.GtkTextWindowType(win), C.gint(window_x), C.gint(window_y), &bx, &by)
|
||||
return int(bx), int(by)
|
||||
}
|
||||
|
||||
// GetWindow is a wrapper around gtk_text_view_get_window().
|
||||
func (v *TextView) GetWindow(win TextWindowType) *gdk.Window {
|
||||
c := C.gtk_text_view_get_window(v.native(), C.GtkTextWindowType(win))
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return &gdk.Window{wrapObject(unsafe.Pointer(c))}
|
||||
}
|
||||
|
||||
// GetWindowType is a wrapper around gtk_text_view_get_window_type().
|
||||
func (v *TextView) GetWindowType(w *gdk.Window) TextWindowType {
|
||||
return TextWindowType(C.gtk_text_view_get_window_type(v.native(), (*C.GdkWindow)(unsafe.Pointer(w.Native()))))
|
||||
}
|
||||
|
||||
// SetBorderWindowSize is a wrapper around gtk_text_view_set_border_window_size().
|
||||
func (v *TextView) SetBorderWindowSize(tp TextWindowType, size int) {
|
||||
C.gtk_text_view_set_border_window_size(v.native(), C.GtkTextWindowType(tp), C.gint(size))
|
||||
}
|
||||
|
||||
// GetBorderWindowSize is a wrapper around gtk_text_view_get_border_window_size().
|
||||
func (v *TextView) GetBorderWindowSize(tp TextWindowType) int {
|
||||
return int(C.gtk_text_view_get_border_window_size(v.native(), C.GtkTextWindowType(tp)))
|
||||
}
|
||||
|
||||
// ForwardDisplayLine is a wrapper around gtk_text_view_forward_display_line().
|
||||
func (v *TextView) ForwardDisplayLine(iter *TextIter) bool {
|
||||
return gobool(C.gtk_text_view_forward_display_line(v.native(), iter.native()))
|
||||
}
|
||||
|
||||
// BackwardDisplayLine is a wrapper around gtk_text_view_backward_display_line().
|
||||
func (v *TextView) BackwardDisplayLine(iter *TextIter) bool {
|
||||
return gobool(C.gtk_text_view_backward_display_line(v.native(), iter.native()))
|
||||
}
|
||||
|
||||
// ForwardDisplayLineEnd is a wrapper around gtk_text_view_forward_display_line_end().
|
||||
func (v *TextView) ForwardDisplayLineEnd(iter *TextIter) bool {
|
||||
return gobool(C.gtk_text_view_forward_display_line_end(v.native(), iter.native()))
|
||||
}
|
||||
|
||||
// BackwardDisplayLineStart is a wrapper around gtk_text_view_backward_display_line_start().
|
||||
func (v *TextView) BackwardDisplayLineStart(iter *TextIter) bool {
|
||||
return gobool(C.gtk_text_view_backward_display_line_start(v.native(), iter.native()))
|
||||
}
|
||||
|
||||
// StartsDisplayLine is a wrapper around gtk_text_view_starts_display_line().
|
||||
func (v *TextView) StartsDisplayLine(iter *TextIter) bool {
|
||||
return gobool(C.gtk_text_view_starts_display_line(v.native(), iter.native()))
|
||||
}
|
||||
|
||||
// MoveVisually is a wrapper around gtk_text_view_move_visually().
|
||||
func (v *TextView) MoveVisually(iter *TextIter, count int) bool {
|
||||
return gobool(C.gtk_text_view_move_visually(v.native(), iter.native(), C.gint(count)))
|
||||
}
|
||||
|
||||
// AddChildInWindow is a wrapper around gtk_text_view_add_child_in_window().
|
||||
func (v *TextView) AddChildInWindow(child IWidget, tp TextWindowType, xpos, ypos int) {
|
||||
C.gtk_text_view_add_child_in_window(v.native(), child.toWidget(), C.GtkTextWindowType(tp), C.gint(xpos), C.gint(ypos))
|
||||
}
|
||||
|
||||
// MoveChild is a wrapper around gtk_text_view_move_child().
|
||||
func (v *TextView) MoveChild(child IWidget, xpos, ypos int) {
|
||||
C.gtk_text_view_move_child(v.native(), child.toWidget(), C.gint(xpos), C.gint(ypos))
|
||||
}
|
||||
|
||||
// ImContextFilterKeypress is a wrapper around gtk_text_view_im_context_filter_keypress().
|
||||
func (v *TextView) ImContextFilterKeypress(event *gdk.EventKey) bool {
|
||||
return gobool(C.gtk_text_view_im_context_filter_keypress(v.native(), (*C.GdkEventKey)(unsafe.Pointer(event.Native()))))
|
||||
}
|
||||
|
||||
// ResetImContext is a wrapper around gtk_text_view_reset_im_context().
|
||||
func (v *TextView) ResetImContext() {
|
||||
C.gtk_text_view_reset_im_context(v.native())
|
||||
}
|
||||
|
||||
// GtkAdjustment * gtk_text_view_get_hadjustment () -- DEPRECATED
|
||||
// GtkAdjustment * gtk_text_view_get_vadjustment () -- DEPRECATED
|
||||
// void gtk_text_view_add_child_at_anchor ()
|
||||
// GtkTextChildAnchor * gtk_text_child_anchor_new ()
|
||||
// GList * gtk_text_child_anchor_get_widgets ()
|
||||
// gboolean gtk_text_child_anchor_get_deleted ()
|
||||
// void gtk_text_view_set_top_margin () -- SINCE 3.18
|
||||
// gint gtk_text_view_get_top_margin () -- SINCE 3.18
|
||||
// void gtk_text_view_set_bottom_margin () -- SINCE 3.18
|
||||
// gint gtk_text_view_get_bottom_margin () -- SINCE 3.18
|
||||
// void gtk_text_view_set_tabs () -- PangoTabArray
|
||||
// PangoTabArray * gtk_text_view_get_tabs () -- PangoTabArray
|
||||
// GtkTextAttributes * gtk_text_view_get_default_attributes () -- GtkTextAttributes
|
||||
// void gtk_text_view_set_monospace () -- SINCE 3.16
|
||||
// gboolean gtk_text_view_get_monospace () -- SINCE 3.16
|
Loading…
Reference in new issue