func GetCredentialsEventType(roleType string) string {
	switch roleType {
	case credentials.ApplicationRoleType:
		return getCredentialsEventType
	case credentials.ExecutionRoleType:
		return getCredentialsTaskExecutionEventType
	default:
		return getCredentialsInvalidRoleTypeEventType
	}
}

func GetCredentialsEventType ( roleType string ) string { switch roleType { case credentials . ApplicationRoleType : return getCredentialsEventType case credentials . ExecutionRoleType : return getCredentialsTaskExecutionEventType default : return getCredentialsInvalidRoleTypeEventType } }

// GetCredentialsEventType is the type for a GetCredentials request


func NewMockGPUManager(ctrl *gomock.Controller) *MockGPUManager {
	mock := &MockGPUManager{ctrl: ctrl}
	mock.recorder = &MockGPUManagerMockRecorder{mock}
	return mock
}

func NewMockGPUManager ( ctrl * gomock . Controller ) * MockGPUManager { mock := & MockGPUManager { ctrl : ctrl } mock . recorder = & MockGPUManagerMockRecorder { mock } return mock }

// NewMockGPUManager creates a new mock instance


func (m *MockGPUManager) GetDevices() []*ecs.PlatformDevice {
	ret := m.ctrl.Call(m, "GetDevices")
	ret0, _ := ret[0].([]*ecs.PlatformDevice)
	return ret0
}

func ( m * MockGPUManager ) GetDevices ( ) [ ] * ecs . PlatformDevice { ret := m . ctrl . Call ( m , " " ) ret0 , _ := ret [ 0 ] . ( [ ] * ecs . PlatformDevice ) return ret0 }


func (m *MockGPUManager) GetGPUIDsUnsafe() []string {
	ret := m.ctrl.Call(m, "GetGPUIDsUnsafe")
	ret0, _ := ret[0].([]string)
	return ret0
}

func ( m * MockGPUManager ) GetGPUIDsUnsafe ( ) [ ] string { ret := m . ctrl . Call ( m , " " ) ret0 , _ := ret [ 0 ] . ( [ ] string ) return ret0 }


func (mr *MockGPUManagerMockRecorder) SetDevices() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDevices", reflect.TypeOf((*MockGPUManager)(nil).SetDevices))
}

func ( mr * MockGPUManagerMockRecorder ) SetDevices ( ) * gomock . Call { return mr . mock . ctrl . RecordCallWithMethodType ( mr . mock , " " , reflect . TypeOf ( ( * MockGPUManager ) ( nil ) . SetDevices ) ) }

// SetDevices indicates an expected call of SetDevices


func (m *MockGPUManager) SetDriverVersion(arg0 string) {
	m.ctrl.Call(m, "SetDriverVersion", arg0)
}

func ( m * MockGPUManager ) SetDriverVersion ( arg0 string ) { m . ctrl . Call ( m , " " , arg0 ) }


func (mr *MockGPUManagerMockRecorder) SetDriverVersion(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDriverVersion", reflect.TypeOf((*MockGPUManager)(nil).SetDriverVersion), arg0)
}

func ( mr * MockGPUManagerMockRecorder ) SetDriverVersion ( arg0 interface { } ) * gomock . Call { return mr . mock . ctrl . RecordCallWithMethodType ( mr . mock , " " , reflect . TypeOf ( ( * MockGPUManager ) ( nil ) . SetDriverVersion ) , arg0 ) }

// SetDriverVersion indicates an expected call of SetDriverVersion


func (m *MockGPUManager) SetGPUIDs(arg0 []string) {
	m.ctrl.Call(m, "SetGPUIDs", arg0)
}

func ( m * MockGPUManager ) SetGPUIDs ( arg0 [ ] string ) { m . ctrl . Call ( m , " " , arg0 ) }


func (m *MockGPUManager) SetRuntimeVersion(arg0 string) {
	m.ctrl.Call(m, "SetRuntimeVersion", arg0)
}

func ( m * MockGPUManager ) SetRuntimeVersion ( arg0 string ) { m . ctrl . Call ( m , " " , arg0 ) }


func NewMockRoundTripper(ctrl *gomock.Controller) *MockRoundTripper {
	mock := &MockRoundTripper{ctrl: ctrl}
	mock.recorder = &MockRoundTripperMockRecorder{mock}
	return mock
}

func NewMockRoundTripper ( ctrl * gomock . Controller ) * MockRoundTripper { mock := & MockRoundTripper { ctrl : ctrl } mock . recorder = & MockRoundTripperMockRecorder { mock } return mock }

// NewMockRoundTripper creates a new mock instance


func (m *MockRoundTripper) RoundTrip(arg0 *http.Request) (*http.Response, error) {
	ret := m.ctrl.Call(m, "RoundTrip", arg0)
	ret0, _ := ret[0].(*http.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func ( m * MockRoundTripper ) RoundTrip ( arg0 * http . Request ) ( * http . Response , error ) { ret := m . ctrl . Call ( m , " " , arg0 ) ret0 , _ := ret [ 0 ] . ( * http . Response ) ret1 , _ := ret [ 1 ] . ( error ) return ret0 , ret1 }


func (mr *MockRoundTripperMockRecorder) RoundTrip(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockRoundTripper)(nil).RoundTrip), arg0)
}

func ( mr * MockRoundTripperMockRecorder ) RoundTrip ( arg0 interface { } ) * gomock . Call { return mr . mock . ctrl . RecordCallWithMethodType ( mr . mock , " " , reflect . TypeOf ( ( * MockRoundTripper ) ( nil ) . RoundTrip ) , arg0 ) }

// RoundTrip indicates an expected call of RoundTrip


func NewMockNetLink(ctrl *gomock.Controller) *MockNetLink {
	mock := &MockNetLink{ctrl: ctrl}
	mock.recorder = &MockNetLinkMockRecorder{mock}
	return mock
}

func NewMockNetLink ( ctrl * gomock . Controller ) * MockNetLink { mock := & MockNetLink { ctrl : ctrl } mock . recorder = & MockNetLinkMockRecorder { mock } return mock }

// NewMockNetLink creates a new mock instance


func (m *MockNetLink) LinkByName(arg0 string) (netlink.Link, error) {
	ret := m.ctrl.Call(m, "LinkByName", arg0)
	ret0, _ := ret[0].(netlink.Link)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func ( m * MockNetLink ) LinkByName ( arg0 string ) ( netlink . Link , error ) { ret := m . ctrl . Call ( m , " " , arg0 ) ret0 , _ := ret [ 0 ] . ( netlink . Link ) ret1 , _ := ret [ 1 ] . ( error ) return ret0 , ret1 }


func (mr *MockNetLinkMockRecorder) LinkByName(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkByName", reflect.TypeOf((*MockNetLink)(nil).LinkByName), arg0)
}

func ( mr * MockNetLinkMockRecorder ) LinkByName ( arg0 interface { } ) * gomock . Call { return mr . mock . ctrl . RecordCallWithMethodType ( mr . mock , " " , reflect . TypeOf ( ( * MockNetLink ) ( nil ) . LinkByName ) , arg0 ) }

// LinkByName indicates an expected call of LinkByName


func (m *MockNetLink) LinkList() ([]netlink.Link, error) {
	ret := m.ctrl.Call(m, "LinkList")
	ret0, _ := ret[0].([]netlink.Link)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func ( m * MockNetLink ) LinkList ( ) ( [ ] netlink . Link , error ) { ret := m . ctrl . Call ( m , " " ) ret0 , _ := ret [ 0 ] . ( [ ] netlink . Link ) ret1 , _ := ret [ 1 ] . ( error ) return ret0 , ret1 }


func (mr *MockNetLinkMockRecorder) LinkList() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkList", reflect.TypeOf((*MockNetLink)(nil).LinkList))
}

func ( mr * MockNetLinkMockRecorder ) LinkList ( ) * gomock . Call { return mr . mock . ctrl . RecordCallWithMethodType ( mr . mock , " " , reflect . TypeOf ( ( * MockNetLink ) ( nil ) . LinkList ) ) }

// LinkList indicates an expected call of LinkList


func NewMockCNI(ctrl *gomock.Controller) *MockCNI {
	mock := &MockCNI{ctrl: ctrl}
	mock.recorder = &MockCNIMockRecorder{mock}
	return mock
}

func NewMockCNI ( ctrl * gomock . Controller ) * MockCNI { mock := & MockCNI { ctrl : ctrl } mock . recorder = & MockCNIMockRecorder { mock } return mock }

// NewMockCNI creates a new mock instance


func (m *MockCNI) AddNetwork(arg0 *libcni.NetworkConfig, arg1 *libcni.RuntimeConf) (types.Result, error) {
	ret := m.ctrl.Call(m, "AddNetwork", arg0, arg1)
	ret0, _ := ret[0].(types.Result)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func ( m * MockCNI ) AddNetwork ( arg0 * libcni . NetworkConfig , arg1 * libcni . RuntimeConf ) ( types . Result , error ) { ret := m . ctrl . Call ( m , " " , arg0 , arg1 ) ret0 , _ := ret [ 0 ] . ( types . Result ) ret1 , _ := ret [ 1 ] . ( error ) return ret0 , ret1 }


func (m *MockCNI) AddNetworkList(arg0 *libcni.NetworkConfigList, arg1 *libcni.RuntimeConf) (types.Result, error) {
	ret := m.ctrl.Call(m, "AddNetworkList", arg0, arg1)
	ret0, _ := ret[0].(types.Result)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

func ( m * MockCNI ) AddNetworkList ( arg0 * libcni . NetworkConfigList , arg1 * libcni . RuntimeConf ) ( types . Result , error ) { ret := m . ctrl . Call ( m , " " , arg0 , arg1 ) ret0 , _ := ret [ 0 ] . ( types . Result ) ret1 , _ := ret [ 1 ] . ( error ) return ret0 , ret1 }


func (m *MockCNI) DelNetwork(arg0 *libcni.NetworkConfig, arg1 *libcni.RuntimeConf) error {
	ret := m.ctrl.Call(m, "DelNetwork", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}

func ( m * MockCNI ) DelNetwork ( arg0 * libcni . NetworkConfig , arg1 * libcni . RuntimeConf ) error { ret := m . ctrl . Call ( m , " " , arg0 , arg1 ) ret0 , _ := ret [ 0 ] . ( error ) return ret0 }


func (mr *MockCNIMockRecorder) DelNetwork(arg0, arg1 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelNetwork", reflect.TypeOf((*MockCNI)(nil).DelNetwork), arg0, arg1)
}

func ( mr * MockCNIMockRecorder ) DelNetwork ( arg0 , arg1 interface { } ) * gomock . Call { return mr . mock . ctrl . RecordCallWithMethodType ( mr . mock , " " , reflect . TypeOf ( ( * MockCNI ) ( nil ) . DelNetwork ) , arg0 , arg1 ) }

// DelNetwork indicates an expected call of DelNetwork


func (m *MockCNI) DelNetworkList(arg0 *libcni.NetworkConfigList, arg1 *libcni.RuntimeConf) error {
	ret := m.ctrl.Call(m, "DelNetworkList", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}

func ( m * MockCNI ) DelNetworkList ( arg0 * libcni . NetworkConfigList , arg1 * libcni . RuntimeConf ) error { ret := m . ctrl . Call ( m , " " , arg0 , arg1 ) ret0 , _ := ret [ 0 ] . ( error ) return ret0 }


func NewLRUCache(size int, ttl time.Duration) Cache {
	lru := &lruCache{size: size,
		ttl:       ttl,
		cache:     make(map[string]*entry),
		evictList: list.New(),
	}
	return lru
}

func NewLRUCache ( size int , ttl time . Duration ) Cache { lru := & lruCache { size : size , ttl : ttl , cache : make ( map [ string ] * entry ) , evictList : list . New ( ) , } return lru }

// Creates an LRUCache with maximum size, ttl for items.

Creates an LRUCache with maximum size ttl for items .


func (lru *lruCache) Get(key string) (Value, bool) {
	lru.Lock()
	defer lru.Unlock()

	entry, ok := lru.cache[key]

	if !ok {
		return nil, false
	}

	ok = lru.evictStale(entry, key)
	if !ok {
		return nil, false
	}

	lru.updateAccessed(key)

	return entry.value, true
}

func ( lru * lruCache ) Get ( key string ) ( Value , bool ) { lru . Lock ( ) defer lru . Unlock ( ) entry , ok := lru . cache [ key ] if ! ok { return nil , false } ok = lru . evictStale ( entry , key ) if ! ok { return nil , false } lru . updateAccessed ( key ) return entry . value , true }

// Get returns the value associated with the key


func (lru *lruCache) Set(key string, value Value) {
	lru.Lock()
	defer lru.Unlock()

	lru.cache[key] = &entry{value: value, added: time.Now()}

	// Remove from the evict list if an entry already existed
	lru.removeFromEvictList(key)

	lru.evictList.PushBack(key)
	lru.purgeSize()
}

// Set sets the key-value pair in the cache

Set sets the key - value pair in the cache


func (lru *lruCache) Delete(key string) {
	lru.Lock()
	defer lru.Unlock()

	lru.removeFromEvictList(key)
	delete(lru.cache, key)
}

func ( lru * lruCache ) Delete ( key string ) { lru . Lock ( ) defer lru . Unlock ( ) lru . removeFromEvictList ( key ) delete ( lru . cache , key ) }

// Delete removes the entry associated with the key from cache


func (eni *ENIAttachment) StartTimer(timeoutFunc func()) error {
	eni.guard.Lock()
	defer eni.guard.Unlock()

	if eni.ackTimer != nil {
		// The timer has already been initialized, do nothing
		return nil
	}
	now := time.Now()
	duration := eni.ExpiresAt.Sub(now)
	if duration <= 0 {
		return errors.Errorf("eni attachment: timer expiration is in the past; expiration [%s] < now [%s]",
			eni.ExpiresAt.String(), now.String())
	}
	seelog.Infof("Starting ENI ack timer with duration=%s, %s", duration.String(), eni.stringUnsafe())
	eni.ackTimer = time.AfterFunc(duration, timeoutFunc)
	return nil
}

// StartTimer starts the ack timer to record the expiration of ENI attachment


func (eni *ENIAttachment) IsSent() bool {
	eni.guard.RLock()
	defer eni.guard.RUnlock()

	return eni.AttachStatusSent
}

func ( eni * ENIAttachment ) IsSent ( ) bool { eni . guard . RLock ( ) defer eni . guard . RUnlock ( ) return eni . AttachStatusSent }

// IsSent checks if the eni attached status has been sent


func (eni *ENIAttachment) SetSentStatus() {
	eni.guard.Lock()
	defer eni.guard.Unlock()

	eni.AttachStatusSent = true
}

func ( eni * ENIAttachment ) SetSentStatus ( ) { eni . guard . Lock ( ) defer eni . guard . Unlock ( ) eni . AttachStatusSent = true }

// SetSentStatus marks the eni attached status has been sent


func (eni *ENIAttachment) StopAckTimer() {
	eni.guard.Lock()
	defer eni.guard.Unlock()

	eni.ackTimer.Stop()
}

func ( eni * ENIAttachment ) StopAckTimer ( ) { eni . guard . Lock ( ) defer eni . guard . Unlock ( ) eni . ackTimer . Stop ( ) }

// StopAckTimer stops the ack timer set on the ENI attachment


func (eni *ENIAttachment) HasExpired() bool {
	eni.guard.RLock()
	defer eni.guard.RUnlock()

	return time.Now().After(eni.ExpiresAt)
}

func ( eni * ENIAttachment ) HasExpired ( ) bool { eni . guard . RLock ( ) defer eni . guard . RUnlock ( ) return time . Now ( ) . After ( eni . ExpiresAt ) }

// HasExpired returns true if the ENI attachment object has exceeded the
// threshold for notifying the backend of the attachment

HasExpired returns true if the ENI attachment object has exceeded the threshold for notifying the backend of the attachment


func (eni *ENIAttachment) String() string {
	eni.guard.RLock()
	defer eni.guard.RUnlock()

	return eni.stringUnsafe()
}

func ( eni * ENIAttachment ) String ( ) string { eni . guard . RLock ( ) defer eni . guard . RUnlock ( ) return eni . stringUnsafe ( ) }

// String returns a string representation of the ENI Attachment


func (eni *ENIAttachment) stringUnsafe() string {
	return fmt.Sprintf(
		"ENI Attachment: task=%s;attachment=%s;attachmentSent=%t;mac=%s;status=%s;expiresAt=%s",
		eni.TaskARN, eni.AttachmentARN, eni.AttachStatusSent, eni.MACAddress, eni.Status.String(), eni.ExpiresAt.String())
}

func ( eni * ENIAttachment ) stringUnsafe ( ) string { return fmt . Sprintf ( " " , eni . TaskARN , eni . AttachmentARN , eni . AttachStatusSent , eni . MACAddress , eni . Status . String ( ) , eni . ExpiresAt . String ( ) ) }

// stringUnsafe returns a string representation of the ENI Attachment


func StartMetricsSession(params *TelemetrySessionParams) {
	ok, err := params.isContainerHealthMetricsDisabled()
	if err != nil {
		seelog.Warnf("Error starting metrics session: %v", err)
		return
	}
	if ok {
		seelog.Warnf("Metrics were disabled, not starting the telemetry session")
		return
	}

	err = params.StatsEngine.MustInit(params.Ctx, params.TaskEngine, params.Cfg.Cluster,
		params.ContainerInstanceArn)
	if err != nil {
		seelog.Warnf("Error initializing metrics engine: %v", err)
		return
	}

	err = StartSession(params, params.StatsEngine)
	if err != nil {
		seelog.Warnf("Error starting metrics session with backend: %v", err)
	}
}

func StartMetricsSession ( params * TelemetrySessionParams ) { ok , err := params . isContainerHealthMetricsDisabled ( ) if err != nil { seelog . Warnf ( " " , err ) return } if ok { seelog . Warnf ( " " ) return } err = params . StatsEngine . MustInit ( params . Ctx , params . TaskEngine , params . Cfg . Cluster , params . ContainerInstanceArn ) if err != nil { seelog . Warnf ( " " , err ) return } err = StartSession ( params , params . StatsEngine ) if err != nil { seelog . Warnf ( " " , err ) } }

// StartMetricsSession starts a metric session. It initializes the stats engine
// and invokes StartSession.

StartMetricsSession starts a metric session . It initializes the stats engine and invokes StartSession .


func StartSession(params *TelemetrySessionParams, statsEngine stats.Engine) error {
	backoff := retry.NewExponentialBackoff(time.Second, 1*time.Minute, 0.2, 2)
	for {
		tcsError := startTelemetrySession(params, statsEngine)
		if tcsError == nil || tcsError == io.EOF {
			seelog.Info("TCS Websocket connection closed for a valid reason")
			backoff.Reset()
		} else {
			seelog.Infof("Error from tcs; backing off: %v", tcsError)
			params.time().Sleep(backoff.Duration())
		}
	}
}

func StartSession ( params * TelemetrySessionParams , statsEngine stats . Engine ) error { backoff := retry . NewExponentialBackoff ( time . Second , 1 * time . Minute , 0.2 , 2 ) for { tcsError := startTelemetrySession ( params , statsEngine ) if tcsError == nil || tcsError == io . EOF { seelog . Info ( " " ) backoff . Reset ( ) } else { seelog . Infof ( " " , tcsError ) params . time ( ) . Sleep ( backoff . Duration ( ) ) } } }

// StartSession creates a session with the backend and handles requests
// using the passed in arguments.
// The engine is expected to initialized and gathering container metrics by
// the time the websocket client starts using it.

StartSession creates a session with the backend and handles requests using the passed in arguments . The engine is expected to initialized and gathering container metrics by the time the websocket client starts using it .


func heartbeatHandler(timer *time.Timer) func(*ecstcs.HeartbeatMessage) {
	return func(*ecstcs.HeartbeatMessage) {
		seelog.Debug("Received HeartbeatMessage from tcs")
		timer.Reset(retry.AddJitter(defaultHeartbeatTimeout, defaultHeartbeatJitter))
	}
}

func heartbeatHandler ( timer * time . Timer ) func ( * ecstcs . HeartbeatMessage ) { return func ( * ecstcs . HeartbeatMessage ) { seelog . Debug ( " " ) timer . Reset ( retry . AddJitter ( defaultHeartbeatTimeout , defaultHeartbeatJitter ) ) } }

// heartbeatHandler resets the heartbeat timer when HeartbeatMessage message is received from tcs.

heartbeatHandler resets the heartbeat timer when HeartbeatMessage message is received from tcs .


func ackPublishMetricHandler(timer *time.Timer) func(*ecstcs.AckPublishMetric) {
	return func(*ecstcs.AckPublishMetric) {
		seelog.Debug("Received AckPublishMetric from tcs")
		timer.Reset(retry.AddJitter(defaultHeartbeatTimeout, defaultHeartbeatJitter))
	}
}

func ackPublishMetricHandler ( timer * time . Timer ) func ( * ecstcs . AckPublishMetric ) { return func ( * ecstcs . AckPublishMetric ) { seelog . Debug ( " " ) timer . Reset ( retry . AddJitter ( defaultHeartbeatTimeout , defaultHeartbeatJitter ) ) } }

// ackPublishMetricHandler consumes the ack message from the backend. THe backend sends
// the ack each time it processes a metric message.

ackPublishMetricHandler consumes the ack message from the backend . THe backend sends the ack each time it processes a metric message .


func ackPublishHealthMetricHandler(timer *time.Timer) func(*ecstcs.AckPublishHealth) {
	return func(*ecstcs.AckPublishHealth) {
		seelog.Debug("Received ACKPublishHealth from tcs")
		timer.Reset(retry.AddJitter(defaultHeartbeatTimeout, defaultHeartbeatJitter))
	}
}

func ackPublishHealthMetricHandler ( timer * time . Timer ) func ( * ecstcs . AckPublishHealth ) { return func ( * ecstcs . AckPublishHealth ) { seelog . Debug ( " " ) timer . Reset ( retry . AddJitter ( defaultHeartbeatTimeout , defaultHeartbeatJitter ) ) } }

// ackPublishHealthMetricHandler consumes the ack message from backend. The backend sends
// the ack each time it processes a health message

ackPublishHealthMetricHandler consumes the ack message from backend . The backend sends the ack each time it processes a health message


func anyMessageHandler(client wsclient.ClientServer) func(interface{}) {
	return func(interface{}) {
		seelog.Trace("TCS activity occurred")
		// Reset read deadline as there's activity on the channel
		if err := client.SetReadDeadline(time.Now().Add(wsRWTimeout)); err != nil {
			seelog.Warnf("Unable to extend read deadline for TCS connection: %v", err)
		}
	}
}

// anyMessageHandler handles any server message. Any server message means the
// connection is active

anyMessageHandler handles any server message . Any server message means the connection is active


func formatURL(endpoint string, cluster string, containerInstance string) string {
	tcsURL := endpoint
	if !strings.HasSuffix(tcsURL, "/") {
		tcsURL += "/"
	}
	query := url.Values{}
	query.Set("cluster", cluster)
	query.Set("containerInstance", containerInstance)
	return tcsURL + "ws?" + query.Encode()
}

func formatURL ( endpoint string , cluster string , containerInstance string ) string { tcsURL := endpoint if ! strings . HasSuffix ( tcsURL , " " ) { tcsURL += " " } query := url . Values { } query . Set ( " " , cluster ) query . Set ( " " , containerInstance ) return tcsURL + " " + query . Encode ( ) }

// formatURL returns formatted url for tcs endpoint.

formatURL returns formatted url for tcs endpoint .


func (v *StackSwitcher) native() *C.GtkStackSwitcher {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkStackSwitcher(p)
}

func ( v * StackSwitcher ) native ( ) * C . GtkStackSwitcher { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkStackSwitcher ( p ) }

// native returns a pointer to the underlying GtkStackSwitcher.

native returns a pointer to the underlying GtkStackSwitcher .


func (v *ComboBox) native() *C.GtkComboBox {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkComboBox(p)
}

func ( v * ComboBox ) native ( ) * C . GtkComboBox { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkComboBox ( p ) }

// native returns a pointer to the underlying GtkComboBox.

native returns a pointer to the underlying GtkComboBox .


func (v *ComboBoxText) native() *C.GtkComboBoxText {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkComboBoxText(p)
}

func ( v * ComboBoxText ) native ( ) * C . GtkComboBoxText { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkComboBoxText ( p ) }

// native returns a pointer to the underlying GtkComboBoxText.

native returns a pointer to the underlying GtkComboBoxText .


func (v *AppChooser) native() *C.GtkAppChooser {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAppChooser(p)
}

func ( v * AppChooser ) native ( ) * C . GtkAppChooser { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAppChooser ( p ) }

// native returns a pointer to the underlying GtkAppChooser.

native returns a pointer to the underlying GtkAppChooser .


func (v *AppChooserWidget) native() *C.GtkAppChooserWidget {
	if v == nil || v.GObject == nil {
		return nil
	}

	p := unsafe.Pointer(v.GObject)
	return C.toGtkAppChooserWidget(p)
}

func ( v * AppChooserWidget ) native ( ) * C . GtkAppChooserWidget { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAppChooserWidget ( p ) }

// native returns a pointer to the underlying GtkAppChooserWidget.

native returns a pointer to the underlying GtkAppChooserWidget .


func (v *PixbufFormat) native() *C.GdkPixbufFormat {
	if v == nil {
		return nil
	}

	return v.format
}

func ( v * PixbufFormat ) native ( ) * C . GdkPixbufFormat { if v == nil { return nil } return v . format }

// native returns a pointer to the underlying GdkPixbuf.

native returns a pointer to the underlying GdkPixbuf .


func (v *Alignment) native() *C.GtkAlignment {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAlignment(p)
}

func ( v * Alignment ) native ( ) * C . GtkAlignment { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAlignment ( p ) }

// native returns a pointer to the underlying GtkAlignment.

native returns a pointer to the underlying GtkAlignment .


func (v *Misc) native() *C.GtkMisc {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkMisc(p)
}

func ( v * Misc ) native ( ) * C . GtkMisc { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkMisc ( p ) }

// native returns a pointer to the underlying GtkMisc.

native returns a pointer to the underlying GtkMisc .


func (v *ApplicationWindow) native() *C.GtkApplicationWindow {
	if v == nil || v.Window.GObject == nil { // v.Window is necessary because v.GObject would be ambiguous
		return nil
	}
	p := unsafe.Pointer(v.Window.GObject)
	return C.toGtkApplicationWindow(p)
}

// native returns a pointer to the underlying GtkApplicationWindow.

native returns a pointer to the underlying GtkApplicationWindow .


func (v *Variant) TypeString() string {
	// the string returned from this belongs to GVariant and must not be freed.
	return C.GoString((*C.char)(C.g_variant_get_type_string(v.native())))
}

// TypeString returns the g variant type string for this variant.

TypeString returns the g variant type string for this variant .


func (v *Variant) GetString() string {
	var len C.gsize
	gc := C.g_variant_get_string(v.native(), &len)
	defer C.g_free(C.gpointer(gc))
	return C.GoStringN((*C.char)(gc), (C.int)(len))
}

func ( v * Variant ) GetString ( ) string { var len C . gsize gc := C . g_variant_get_string ( v . native ( ) , & len ) defer C . g_free ( C . gpointer ( gc ) ) return C . GoStringN ( ( * C . char ) ( gc ) , ( C . int ) ( len ) ) }

// GetString returns the string value of the variant.

GetString returns the string value of the variant .


func (v *Variant) GetStrv() []string {
	gstrv := C.g_variant_get_strv(v.native(), nil)
	// we do not own the memory for these strings, so we must not use strfreev
	// but we must free the actual pointer we receive.
	c := gstrv
	defer C.g_free(C.gpointer(gstrv))
	var strs []string

	for *c != nil {
		strs = append(strs, C.GoString((*C.char)(*c)))
		c = C.next_gcharptr(c)
	}
	return strs
}

// GetStrv returns a slice of strings from this variant.  It wraps
// g_variant_get_strv, but returns copies of the strings instead.

GetStrv returns a slice of strings from this variant . It wraps g_variant_get_strv but returns copies of the strings instead .


func (v *Variant) IsType(t *VariantType) bool {
	return gobool(C.g_variant_is_of_type(v.native(), t.native()))
}

func ( v * Variant ) IsType ( t * VariantType ) bool { return gobool ( C . g_variant_is_of_type ( v . native ( ) , t . native ( ) ) ) }

// IsType returns true if the variant's type matches t.

IsType returns true if the variant s type matches t .


func (v *FrameClock) native() *C.GdkFrameClock {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGdkFrameClock(p)
}

func ( v * FrameClock ) native ( ) * C . GdkFrameClock { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGdkFrameClock ( p ) }

// native returns a pointer to the underlying GdkFrameClock.

native returns a pointer to the underlying GdkFrameClock .


func (v *FrameTimings) native() *C.GdkFrameTimings {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGdkFrameTimings(p)
}

func ( v * FrameTimings ) native ( ) * C . GdkFrameTimings { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGdkFrameTimings ( p ) }

// native returns a pointer to the underlying GdkFrameTimings.

native returns a pointer to the underlying GdkFrameTimings .


func (v *Monitor) native() *C.GdkMonitor {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGdkMonitor(p)
}

func ( v * Monitor ) native ( ) * C . GdkMonitor { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGdkMonitor ( p ) }

// native returns a pointer to the underlying GdkMonitor.

native returns a pointer to the underlying GdkMonitor .


func (v *Screen) native() *C.GdkScreen {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGdkScreen(p)
}

func ( v * Screen ) native ( ) * C . GdkScreen { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGdkScreen ( p ) }

// native returns a pointer to the underlying GdkScreen.

native returns a pointer to the underlying GdkScreen .


func (v *VariantBuilder) native() *C.GVariantBuilder {
	if v == nil || v.GVariantBuilder == nil {
		return nil
	}
	p := unsafe.Pointer(v.GVariantBuilder)
	return C.toGVariantBuilder(p)
}

func ( v * VariantBuilder ) native ( ) * C . GVariantBuilder { if v == nil || v . GVariantBuilder == nil { return nil } p := unsafe . Pointer ( v . GVariantBuilder ) return C . toGVariantBuilder ( p ) }

// native returns a pointer to the underlying GVariantBuilder.

native returns a pointer to the underlying GVariantBuilder .


func (s Status) String() string {
	str := StatusToString(s)
	str = strings.Replace(str, "CAIRO_STATUS_", "", 1)
	str = strings.Replace(str, "_", " ", 0)
	return strings.ToLower(str)
}

func ( s Status ) String ( ) string { str := StatusToString ( s ) str = strings . Replace ( str , " " , " " , 1 ) str = strings . Replace ( str , " " , " " , 0 ) return strings . ToLower ( str ) }

// String returns a readable status messsage usable in texts.

String returns a readable status messsage usable in texts .


func (s Status) ToError() error {
	if s == STATUS_SUCCESS {
		return nil
	}
	return errors.New(s.String())
}

func ( s Status ) ToError ( ) error { if s == STATUS_SUCCESS { return nil } return errors . New ( s . String ( ) ) }

// ToError returns the error for the status. Returns nil if success.

ToError returns the error for the status . Returns nil if success .


func (v *LevelBar) native() *C.GtkLevelBar {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkLevelBar(p)
}

func ( v * LevelBar ) native ( ) * C . GtkLevelBar { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkLevelBar ( p ) }

// native returns a pointer to the underlying GtkLevelBar.

native returns a pointer to the underlying GtkLevelBar .


func (v *AccelGroup) native() *C.GtkAccelGroup {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAccelGroup(p)
}

func ( v * AccelGroup ) native ( ) * C . GtkAccelGroup { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAccelGroup ( p ) }

// native returns a pointer to the underlying GtkAccelGroup.

native returns a pointer to the underlying GtkAccelGroup .


func (v *AccelMap) native() *C.GtkAccelMap {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAccelMap(p)
}

func ( v * AccelMap ) native ( ) * C . GtkAccelMap { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAccelMap ( p ) }

// native returns a pointer to the underlying GtkAccelMap.

native returns a pointer to the underlying GtkAccelMap .


func (v *List) dataRaw() unsafe.Pointer {
	return unsafe.Pointer(v.native().data)
}

func ( v * List ) dataRaw ( ) unsafe . Pointer { return unsafe . Pointer ( v . native ( ) . data ) }

// dataRaw is a wrapper around the data struct field


func (v *Context) native() *C.cairo_t {
	if v == nil {
		return nil
	}
	return v.context
}

func ( v * Context ) native ( ) * C . cairo_t { if v == nil { return nil } return v . context }

// native returns a pointer to the underlying cairo_t.

native returns a pointer to the underlying cairo_t .


func (v *TextView) native() *C.GtkTextView {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkTextView(p)
}

func ( v * TextView ) native ( ) * C . GtkTextView { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkTextView ( p ) }

// native returns a pointer to the underlying GtkTextView.

native returns a pointer to the underlying GtkTextView .


func (v *VariantType) String() string {
	ch := C.g_variant_type_dup_string(v.native())
	defer C.g_free(C.gpointer(ch))
	return C.GoString((*C.char)(ch))
}

func ( v * VariantType ) String ( ) string { ch := C . g_variant_type_dup_string ( v . native ( ) ) defer C . g_free ( C . gpointer ( ch ) ) return C . GoString ( ( * C . char ) ( ch ) ) }

// String returns a copy of this VariantType's type string.

String returns a copy of this VariantType s type string .


func (v *Application) native() *C.GtkApplication {
	if v == nil || v.GObject == nil {
		return nil
	}
	return C.toGtkApplication(unsafe.Pointer(v.GObject))
}

func ( v * Application ) native ( ) * C . GtkApplication { if v == nil || v . GObject == nil { return nil } return C . toGtkApplication ( unsafe . Pointer ( v . GObject ) ) }

// native returns a pointer to the underlying GtkApplication.

native returns a pointer to the underlying GtkApplication .


func (v *MenuShell) native() *C.GtkMenuShell {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkMenuShell(p)
}

func ( v * MenuShell ) native ( ) * C . GtkMenuShell { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkMenuShell ( p ) }

// native returns a pointer to the underlying GtkMenuShell.

native returns a pointer to the underlying GtkMenuShell .


func (v *StyleContext) native() *C.GtkStyleContext {
	if v == nil || v.Object == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkStyleContext(p)
}

func ( v * StyleContext ) native ( ) * C . GtkStyleContext { if v == nil || v . Object == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkStyleContext ( p ) }

// native returns a pointer to the underlying GtkStyleContext.

native returns a pointer to the underlying GtkStyleContext .


func NewMatrix(xx, yx, xy, yy, x0, y0 float64) *Matrix {
	return &Matrix{
		Xx: xx,
		Yx: yx,
		Xy: xy,
		Yy: yy,
		X0: x0,
		Y0: y0,
	}
}

func NewMatrix ( xx , yx , xy , yy , x0 , y0 float64 ) * Matrix { return & Matrix { Xx : xx , Yx : yx , Xy : xy , Yy : yy , X0 : x0 , Y0 : y0 , } }

// NewMatrix creates a new identiy matrix


func (m *Matrix) native() *C.cairo_matrix_t {
	return (*C.cairo_matrix_t)(unsafe.Pointer(m))
}

func ( m * Matrix ) native ( ) * C . cairo_matrix_t { return ( * C . cairo_matrix_t ) ( unsafe . Pointer ( m ) ) }

// Native returns native c pointer to a matrix


func (m *Matrix) InitTranslate(tx, ty float64) {
	C.cairo_matrix_init_translate(m.native(), C.double(tx), C.double(ty))
}

func ( m * Matrix ) InitTranslate ( tx , ty float64 ) { C . cairo_matrix_init_translate ( m . native ( ) , C . double ( tx ) , C . double ( ty ) ) }

// InitTranslate initializes a matrix with the given translation


func (m *Matrix) InitScale(sx, sy float64) {
	C.cairo_matrix_init_scale(m.native(), C.double(sx), C.double(sy))
}

func ( m * Matrix ) InitScale ( sx , sy float64 ) { C . cairo_matrix_init_scale ( m . native ( ) , C . double ( sx ) , C . double ( sy ) ) }

// InitScale initializes a matrix with the give scale


func (m *Matrix) InitRotate(radians float64) {
	C.cairo_matrix_init_rotate(m.native(), C.double(radians))
}

func ( m * Matrix ) InitRotate ( radians float64 ) { C . cairo_matrix_init_rotate ( m . native ( ) , C . double ( radians ) ) }

// InitRotate initializes a matrix with the given rotation


func (m *Matrix) Translate(tx, ty float64) {
	C.cairo_matrix_translate(m.native(), C.double(tx), C.double(ty))
}

func ( m * Matrix ) Translate ( tx , ty float64 ) { C . cairo_matrix_translate ( m . native ( ) , C . double ( tx ) , C . double ( ty ) ) }

// Translate translates a matrix by the given amount


func (m *Matrix) Scale(sx, sy float64) {
	C.cairo_matrix_scale(m.native(), C.double(sx), C.double(sy))
}

func ( m * Matrix ) Scale ( sx , sy float64 ) { C . cairo_matrix_scale ( m . native ( ) , C . double ( sx ) , C . double ( sy ) ) }

// Scale scales the matrix by the given amounts


func (m *Matrix) Rotate(radians float64) {
	C.cairo_matrix_rotate(m.native(), C.double(radians))
}

func ( m * Matrix ) Rotate ( radians float64 ) { C . cairo_matrix_rotate ( m . native ( ) , C . double ( radians ) ) }

// Rotate rotates the matrix by the given amount


func (m *Matrix) Multiply(a, b Matrix) {
	C.cairo_matrix_multiply(m.native(), a.native(), b.native())
}

func ( m * Matrix ) Multiply ( a , b Matrix ) { C . cairo_matrix_multiply ( m . native ( ) , a . native ( ) , b . native ( ) ) }

// Multiply multiplies the matrix by another matrix


func (ps *PaperSize) native() *C.GtkPaperSize {
	if ps == nil {
		return nil
	}
	return ps.GtkPaperSize
}

func ( ps * PaperSize ) native ( ) * C . GtkPaperSize { if ps == nil { return nil } return ps . GtkPaperSize }

// native returns a pointer to the underlying GtkPaperSize.

native returns a pointer to the underlying GtkPaperSize .


func (v *GLContext) native() *C.GdkGLContext {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGdkGLContext(p)
}

func ( v * GLContext ) native ( ) * C . GdkGLContext { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGdkGLContext ( p ) }

// native returns a pointer to the underlying GdkGLContext.

native returns a pointer to the underlying GdkGLContext .


func (v *ButtonBox) native() *C.GtkButtonBox {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkButtonBox(p)
}

func ( v * ButtonBox ) native ( ) * C . GtkButtonBox { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkButtonBox ( p ) }

// native returns a pointer to the underlying GtkButtonBox.

native returns a pointer to the underlying GtkButtonBox .


func (v *TextIter) native() *C.GtkTextIter {
	if v == nil {
		return nil
	}
	return (*C.GtkTextIter)(v)
}

func ( v * TextIter ) native ( ) * C . GtkTextIter { if v == nil { return nil } return ( * C . GtkTextIter ) ( v ) }

// native returns a pointer to the underlying GtkTextIter.

native returns a pointer to the underlying GtkTextIter .


func (v *MainContext) native() *C.GMainContext {
	if v == nil {
		return nil
	}
	return (*C.GMainContext)(v)
}

func ( v * MainContext ) native ( ) * C . GMainContext { if v == nil { return nil } return ( * C . GMainContext ) ( v ) }

// native returns a pointer to the underlying GMainContext.

native returns a pointer to the underlying GMainContext .


func (v *TreeViewColumn) native() *C.GtkTreeViewColumn {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkTreeViewColumn(p)
}

func ( v * TreeViewColumn ) native ( ) * C . GtkTreeViewColumn { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkTreeViewColumn ( p ) }

// native returns a pointer to the underlying GtkTreeViewColumn.

native returns a pointer to the underlying GtkTreeViewColumn .


func (v *VariantIter) native() *C.GVariantIter {
	if v == nil || v.GVariantIter == nil {
		return nil
	}
	p := unsafe.Pointer(v.GVariantIter)
	return C.toGVariantIter(p)
}

func ( v * VariantIter ) native ( ) * C . GVariantIter { if v == nil || v . GVariantIter == nil { return nil } p := unsafe . Pointer ( v . GVariantIter ) return C . toGVariantIter ( p ) }

// native returns a pointer to the underlying GVariantIter.

native returns a pointer to the underlying GVariantIter .


func (v *SList) Next() *SList {
	n := v.native()
	if n == nil {
		return nil
	}

	return wrapSList(n.next)
}

func ( v * SList ) Next ( ) * SList { n := v . native ( ) if n == nil { return nil } return wrapSList ( n . next ) }

// Next is a wrapper around the next struct field


func (v *ActionMap) LookupAction(actionName string) *Action {
	c := C.g_action_map_lookup_action(v.native(), (*C.gchar)(C.CString(actionName)))
	if c == nil {
		return nil
	}
	return wrapAction(wrapObject(unsafe.Pointer(c)))
}

func ( v * ActionMap ) LookupAction ( actionName string ) * Action { c := C . g_action_map_lookup_action ( v . native ( ) , ( * C . gchar ) ( C . CString ( actionName ) ) ) if c == nil { return nil } return wrapAction ( wrapObject ( unsafe . Pointer ( c ) ) ) }

// LookupAction is a wrapper around g_action_map_lookup_action


func (v *ActionMap) AddAction(action IAction) {
	C.g_action_map_add_action(v.native(), action.toGAction())
}

func ( v * ActionMap ) AddAction ( action IAction ) { C . g_action_map_add_action ( v . native ( ) , action . toGAction ( ) ) }

// AddAction is a wrapper around g_action_map_add_action


func (v *ActionMap) RemoveAction(actionName string) {
	C.g_action_map_remove_action(v.native(), (*C.gchar)(C.CString(actionName)))
}

func ( v * ActionMap ) RemoveAction ( actionName string ) { C . g_action_map_remove_action ( v . native ( ) , ( * C . gchar ) ( C . CString ( actionName ) ) ) }

// RemoveAction is a wrapper around g_action_map_remove_action


func (v *Surface) native() *C.cairo_surface_t {
	if v == nil {
		return nil
	}
	return v.surface
}

func ( v * Surface ) native ( ) * C . cairo_surface_t { if v == nil { return nil } return v . surface }

// native returns a pointer to the underlying cairo_surface_t.

native returns a pointer to the underlying cairo_surface_t .


func NewSurface(s uintptr, needsRef bool) *Surface {
	surface := WrapSurface(s)
	if needsRef {
		surface.reference()
	}
	runtime.SetFinalizer(surface, (*Surface).destroy)
	return surface
}

func NewSurface ( s uintptr , needsRef bool ) * Surface { surface := WrapSurface ( s ) if needsRef { surface . reference ( ) } runtime . SetFinalizer ( surface , ( * Surface ) . destroy ) return surface }

// NewSurface creates a gotk3 cairo Surface from a pointer to a
// C cairo_surface_t.  This is primarily designed for use with other
// gotk3 packages and should be avoided by applications.

NewSurface creates a gotk3 cairo Surface from a pointer to a C cairo_surface_t . This is primarily designed for use with other gotk3 packages and should be avoided by applications .


func (v *AboutDialog) native() *C.GtkAboutDialog {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAboutDialog(p)
}

func ( v * AboutDialog ) native ( ) * C . GtkAboutDialog { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAboutDialog ( p ) }

// native returns a pointer to the underlying GtkAboutDialog.

native returns a pointer to the underlying GtkAboutDialog .


func AddFont(fontPath string) {
	path := (*C.uchar)(unsafe.Pointer(C.CString(fontPath)))
	C.addFont(path)
}

func AddFont ( fontPath string ) { path := ( * C . uchar ) ( unsafe . Pointer ( C . CString ( fontPath ) ) ) C . addFont ( path ) }

// AddFont adds the font to the configuration.

AddFont adds the font to the configuration .


func (v *Label) native() *C.GtkLabel {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkLabel(p)
}

func ( v * Label ) native ( ) * C . GtkLabel { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkLabel ( p ) }

// native returns a pointer to the underlying GtkLabel.

native returns a pointer to the underlying GtkLabel .


func (v *VariantDict) native() *C.GVariantDict {
	if v == nil || v.GVariantDict == nil {
		return nil
	}
	p := unsafe.Pointer(v.GVariantDict)
	return C.toGVariantDict(p)
}

func ( v * VariantDict ) native ( ) * C . GVariantDict { if v == nil || v . GVariantDict == nil { return nil } p := unsafe . Pointer ( v . GVariantDict ) return C . toGVariantDict ( p ) }

// native returns a pointer to the underlying GVariantDict.

native returns a pointer to the underlying GVariantDict .


func (v *Actionable) native() *C.GtkActionable {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkActionable(p)
}

func ( v * Actionable ) native ( ) * C . GtkActionable { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkActionable ( p ) }

// native returns a pointer to the underlying GtkActionable.

native returns a pointer to the underlying GtkActionable .


func (v *HeaderBar) native() *C.GtkHeaderBar {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkHeaderBar(p)
}

func ( v * HeaderBar ) native ( ) * C . GtkHeaderBar { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkHeaderBar ( p ) }

// native returns a pointer to the underlying GtkHeaderBar.

native returns a pointer to the underlying GtkHeaderBar .


func (v *ListBox) native() *C.GtkListBox {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkListBox(p)
}

func ( v * ListBox ) native ( ) * C . GtkListBox { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkListBox ( p ) }

// native returns a pointer to the underlying GtkListBox.

native returns a pointer to the underlying GtkListBox .


func (v *ListBoxRow) native() *C.GtkListBoxRow {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkListBoxRow(p)
}

func ( v * ListBoxRow ) native ( ) * C . GtkListBoxRow { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkListBoxRow ( p ) }

// native returns a pointer to the underlying GtkListBoxRow.

native returns a pointer to the underlying GtkListBoxRow .


func (v *Revealer) native() *C.GtkRevealer {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkRevealer(p)
}

func ( v * Revealer ) native ( ) * C . GtkRevealer { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkRevealer ( p ) }

// native returns a pointer to the underlying GtkRevealer.

native returns a pointer to the underlying GtkRevealer .


func (v *SearchBar) native() *C.GtkSearchBar {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkSearchBar(p)
}

func ( v * SearchBar ) native ( ) * C . GtkSearchBar { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkSearchBar ( p ) }

// native returns a pointer to the underlying GtkSearchBar.

native returns a pointer to the underlying GtkSearchBar .


func BindProperty(source *Object, sourceProperty string,
	target *Object, targetProperty string,
	flags BindingFlags) *Binding {
	srcStr := (*C.gchar)(C.CString(sourceProperty))
	defer C.free(unsafe.Pointer(srcStr))
	tgtStr := (*C.gchar)(C.CString(targetProperty))
	defer C.free(unsafe.Pointer(tgtStr))
	obj := C.g_object_bind_property(
		C.gpointer(source.GObject), srcStr,
		C.gpointer(target.GObject), tgtStr,
		C.GBindingFlags(flags),
	)
	if obj == nil {
		return nil
	}
	return &Binding{wrapObject(unsafe.Pointer(obj))}
}

func BindProperty ( source * Object , sourceProperty string , target * Object , targetProperty string , flags BindingFlags ) * Binding { srcStr := ( * C . gchar ) ( C . CString ( sourceProperty ) ) defer C . free ( unsafe . Pointer ( srcStr ) ) tgtStr := ( * C . gchar ) ( C . CString ( targetProperty ) ) defer C . free ( unsafe . Pointer ( tgtStr ) ) obj := C . g_object_bind_property ( C . gpointer ( source . GObject ) , srcStr , C . gpointer ( target . GObject ) , tgtStr , C . GBindingFlags ( flags ) , ) if obj == nil { return nil } return & Binding { wrapObject ( unsafe . Pointer ( obj ) ) } }

// Creates a binding between source property on source and target property on
// target . Whenever the source property is changed the target_property is
// updated using the same value.

Creates a binding between source property on source and target property on target . Whenever the source property is changed the target_property is updated using the same value .


func (v *Binding) GetSource() *Object {
	obj := C.g_binding_get_source(v.native())
	if obj == nil {
		return nil
	}
	return wrapObject(unsafe.Pointer(obj))
}

func ( v * Binding ) GetSource ( ) * Object { obj := C . g_binding_get_source ( v . native ( ) ) if obj == nil { return nil } return wrapObject ( unsafe . Pointer ( obj ) ) }

// Retrieves the GObject instance used as the source of the binding


func (v *Binding) GetTarget() *Object {
	obj := C.g_binding_get_target(v.native())
	if obj == nil {
		return nil
	}
	return wrapObject(unsafe.Pointer(obj))
}

func ( v * Binding ) GetTarget ( ) * Object { obj := C . g_binding_get_target ( v . native ( ) ) if obj == nil { return nil } return wrapObject ( unsafe . Pointer ( obj ) ) }

// Retrieves the GObject instance used as the target of the binding.

Retrieves the GObject instance used as the target of the binding .


func (v *Binding) GetFlags() BindingFlags {
	flags := C.g_binding_get_flags(v.native())
	return BindingFlags(flags)
}

func ( v * Binding ) GetFlags ( ) BindingFlags { flags := C . g_binding_get_flags ( v . native ( ) ) return BindingFlags ( flags ) }

// Retrieves the flags passed when constructing the GBinding.

Retrieves the flags passed when constructing the GBinding .


func (v *FontChooser) native() *C.GtkFontChooser {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFontChooser(p)
}

func ( v * FontChooser ) native ( ) * C . GtkFontChooser { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFontChooser ( p ) }

// native returns a pointer to the underlying GtkFontChooser.

native returns a pointer to the underlying GtkFontChooser .


func (v *FontButton) native() *C.GtkFontButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFontButton(p)
}

func ( v * FontButton ) native ( ) * C . GtkFontButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFontButton ( p ) }

// native returns a pointer to the underlying GtkFontButton.

native returns a pointer to the underlying GtkFontButton .


func (v *ActionGroup) ChangeActionState(actionName string, value *Variant) {
	C.g_action_group_change_action_state(v.native(), (*C.gchar)(C.CString(actionName)), value.native())
}

func ( v * ActionGroup ) ChangeActionState ( actionName string , value * Variant ) { C . g_action_group_change_action_state ( v . native ( ) , ( * C . gchar ) ( C . CString ( actionName ) ) , value . native ( ) ) }

// ChangeActionState is a wrapper around g_action_group_change_action_state


func (v *ActionGroup) Activate(actionName string, parameter *Variant) {
	C.g_action_group_activate_action(v.native(), (*C.gchar)(C.CString(actionName)), parameter.native())
}

func ( v * ActionGroup ) Activate ( actionName string , parameter * Variant ) { C . g_action_group_activate_action ( v . native ( ) , ( * C . gchar ) ( C . CString ( actionName ) ) , parameter . native ( ) ) }

// Activate is a wrapper around g_action_group_activate_action


func (v *Widget) native() *C.GtkWidget {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkWidget(p)
}

func ( v * Widget ) native ( ) * C . GtkWidget { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkWidget ( p ) }

// native returns a pointer to the underlying GtkWidget.

native returns a pointer to the underlying GtkWidget .


func (v *Allocation) native() *C.GtkAllocation {
	return (*C.GtkAllocation)(unsafe.Pointer(&v.GdkRectangle))
}

func ( v * Allocation ) native ( ) * C . GtkAllocation { return ( * C . GtkAllocation ) ( unsafe . Pointer ( & v . GdkRectangle ) ) }

// Native returns a pointer to the underlying GtkAllocation.

Native returns a pointer to the underlying GtkAllocation .


func (v *GLArea) native() *C.GtkGLArea {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkGLArea(p)
}

func ( v * GLArea ) native ( ) * C . GtkGLArea { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkGLArea ( p ) }

// native returns a pointer to the underlying GtkGLArea.

native returns a pointer to the underlying GtkGLArea .


func (v *TreeView) native() *C.GtkTreeView {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkTreeView(p)
}

func ( v * TreeView ) native ( ) * C . GtkTreeView { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkTreeView ( p ) }

// native returns a pointer to the underlying GtkTreeView.

native returns a pointer to the underlying GtkTreeView .


func (v *TreeView) SetSearchEqualSubstringMatch() {
	C.gtk_tree_view_set_search_equal_func(
		v.native(),
		(C.GtkTreeViewSearchEqualFunc)(unsafe.Pointer(C.substring_match_equal_func)),
		nil,
		nil)
}

func ( v * TreeView ) SetSearchEqualSubstringMatch ( ) { C . gtk_tree_view_set_search_equal_func ( v . native ( ) , ( C . GtkTreeViewSearchEqualFunc ) ( unsafe . Pointer ( C . substring_match_equal_func ) ) , nil , nil ) }

// SetSearchEqualSubstringMatch sets TreeView to search by substring match.

SetSearchEqualSubstringMatch sets TreeView to search by substring match .


func goMarshal(closure *C.GClosure, retValue *C.GValue,
	nParams C.guint, params *C.GValue,
	invocationHint C.gpointer, marshalData *C.GValue) {

	// Get the context associated with this callback closure.
	closures.RLock()
	cc := closures.m[closure]
	closures.RUnlock()

	// Get number of parameters passed in.  If user data was saved with the
	// closure context, increment the total number of parameters.
	nGLibParams := int(nParams)
	nTotalParams := nGLibParams
	if cc.userData.IsValid() {
		nTotalParams++
	}

	// Get number of parameters from the callback closure.  If this exceeds
	// the total number of marshaled parameters, a warning will be printed
	// to stderr, and the callback will not be run.
	nCbParams := cc.rf.Type().NumIn()
	if nCbParams > nTotalParams {
		fmt.Fprintf(os.Stderr,
			"too many closure args: have %d, max allowed %d\n",
			nCbParams, nTotalParams)
		return
	}

	// Create a slice of reflect.Values as arguments to call the function.
	gValues := gValueSlice(params, nCbParams)
	args := make([]reflect.Value, 0, nCbParams)

	// Fill beginning of args, up to the minimum of the total number of callback
	// parameters and parameters from the glib runtime.
	for i := 0; i < nCbParams && i < nGLibParams; i++ {
		v := &Value{&gValues[i]}
		val, err := v.GoValue()
		if err != nil {
			fmt.Fprintf(os.Stderr,
				"no suitable Go value for arg %d: %v\n", i, err)
			return
		}
		// Parameters that are descendants of GObject come wrapped in another GObject.
		// For C applications, the default marshaller (g_cclosure_marshal_VOID__VOID in
		// gmarshal.c in the GTK glib library) 'peeks' into the enclosing object and
		// passes the wrapped object to the handler. Use the *Object.goValue function
		// to emulate that for Go signal handlers.
		switch objVal := val.(type) {
		case *Object:
			innerVal, err := objVal.goValue()
			if err != nil {
				// print warning and leave val unchanged to preserve old
				// behavior
				fmt.Fprintf(os.Stderr,
					"warning: no suitable Go value from object for arg %d: %v\n", i, err)
			} else {
				val = innerVal
			}
		}
		rv := reflect.ValueOf(val)
		args = append(args, rv.Convert(cc.rf.Type().In(i)))
	}

	// If non-nil user data was passed in and not all args have been set,
	// get and set the reflect.Value directly from the GValue.
	if cc.userData.IsValid() && len(args) < cap(args) {
		args = append(args, cc.userData.Convert(cc.rf.Type().In(nCbParams-1)))
	}

	// Call closure with args. If the callback returns one or more
	// values, save the GValue equivalent of the first.
	rv := cc.rf.Call(args)
	if retValue != nil && len(rv) > 0 {
		if g, err := GValue(rv[0].Interface()); err != nil {
			fmt.Fprintf(os.Stderr,
				"cannot save callback return value: %v", err)
		} else {
			*retValue = *g.native()
		}
	}
}

// goMarshal is called by the GLib runtime when a closure needs to be invoked.
// The closure will be invoked with as many arguments as it can take, from 0 to
// the full amount provided by the call. If the closure asks for more parameters
// than there are to give, a warning is printed to stderr and the closure is
// not run.
//
//export goMarshal

goMarshal is called by the GLib runtime when a closure needs to be invoked . The closure will be invoked with as many arguments as it can take from 0 to the full amount provided by the call . If the closure asks for more parameters than there are to give a warning is printed to stderr and the closure is not run . export goMarshal


func gValueSlice(values *C.GValue, nValues int) (slice []C.GValue) {
	header := (*reflect.SliceHeader)((unsafe.Pointer(&slice)))
	header.Cap = nValues
	header.Len = nValues
	header.Data = uintptr(unsafe.Pointer(values))
	return
}

func gValueSlice ( values * C . GValue , nValues int ) ( slice [ ] C . GValue ) { header := ( * reflect . SliceHeader ) ( ( unsafe . Pointer ( & slice ) ) ) header . Cap = nValues header . Len = nValues header . Data = uintptr ( unsafe . Pointer ( values ) ) return }

// gValueSlice converts a C array of GValues to a Go slice.

gValueSlice converts a C array of GValues to a Go slice .


func IdleAdd(f interface{}, args ...interface{}) (SourceHandle, error) {
	// f must be a func with no parameters.
	rf := reflect.ValueOf(f)
	if rf.Type().Kind() != reflect.Func {
		return 0, errors.New("f is not a function")
	}

	// Create an idle source func to be added to the main loop context.
	idleSrc := C.g_idle_source_new()
	if idleSrc == nil {
		return 0, errNilPtr
	}
	return sourceAttach(idleSrc, rf, args...)
}

// IdleAdd adds an idle source to the default main event loop
// context.  After running once, the source func will be removed
// from the main event loop, unless f returns a single bool true.
//
// This function will cause a panic when f eventually runs if the
// types of args do not match those of f.

IdleAdd adds an idle source to the default main event loop context . After running once the source func will be removed from the main event loop unless f returns a single bool true . This function will cause a panic when f eventually runs if the types of args do not match those of f .


func TimeoutAdd(timeout uint, f interface{}, args ...interface{}) (SourceHandle, error) {
	// f must be a func with no parameters.
	rf := reflect.ValueOf(f)
	if rf.Type().Kind() != reflect.Func {
		return 0, errors.New("f is not a function")
	}

	// Create a timeout source func to be added to the main loop context.
	timeoutSrc := C.g_timeout_source_new(C.guint(timeout))
	if timeoutSrc == nil {
		return 0, errNilPtr
	}

	return sourceAttach(timeoutSrc, rf, args...)
}

// TimeoutAdd adds an timeout source to the default main event loop
// context.  After running once, the source func will be removed
// from the main event loop, unless f returns a single bool true.
//
// This function will cause a panic when f eventually runs if the
// types of args do not match those of f.
// timeout is in milliseconds

TimeoutAdd adds an timeout source to the default main event loop context . After running once the source func will be removed from the main event loop unless f returns a single bool true . This function will cause a panic when f eventually runs if the types of args do not match those of f . timeout is in milliseconds


func sourceAttach(src *C.struct__GSource, rf reflect.Value, args ...interface{}) (SourceHandle, error) {
	if src == nil {
		return 0, errNilPtr
	}

	// rf must be a func with no parameters.
	if rf.Type().Kind() != reflect.Func {
		C.g_source_destroy(src)
		return 0, errors.New("rf is not a function")
	}

	// Create a new GClosure from f that invalidates itself when
	// f returns false.  The error is ignored here, as this will
	// always be a function.
	var closure *C.GClosure
	closure, _ = ClosureNew(rf.Interface(), args...)

	// Remove closure context when closure is finalized.
	C._g_closure_add_finalize_notifier(closure)

	// Set closure to run as a callback when the idle source runs.
	C.g_source_set_closure(src, closure)

	// Attach the idle source func to the default main event loop
	// context.
	cid := C.g_source_attach(src, nil)
	return SourceHandle(cid), nil
}

// sourceAttach attaches a source to the default main loop context.

sourceAttach attaches a source to the default main loop context .


func (v *Object) native() *C.GObject {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGObject(p)
}

func ( v * Object ) native ( ) * C . GObject { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGObject ( p ) }

// native returns a pointer to the underlying GObject.

native returns a pointer to the underlying GObject .


func Take(ptr unsafe.Pointer) *Object {
	obj := newObject(ToGObject(ptr))

	if obj.IsFloating() {
		obj.RefSink()
	} else {
		obj.Ref()
	}

	runtime.SetFinalizer(obj, (*Object).Unref)
	return obj
}

func Take ( ptr unsafe . Pointer ) * Object { obj := newObject ( ToGObject ( ptr ) ) if obj . IsFloating ( ) { obj . RefSink ( ) } else { obj . Ref ( ) } runtime . SetFinalizer ( obj , ( * Object ) . Unref ) return obj }

// Take wraps a unsafe.Pointer as a glib.Object, taking ownership of it.
// This function is exported for visibility in other gotk3 packages and
// is not meant to be used by applications.

Take wraps a unsafe . Pointer as a glib . Object taking ownership of it . This function is exported for visibility in other gotk3 packages and is not meant to be used by applications .


func (v *Object) GetPropertyType(name string) (Type, error) {
	cstr := C.CString(name)
	defer C.free(unsafe.Pointer(cstr))

	paramSpec := C.g_object_class_find_property(C._g_object_get_class(v.native()), (*C.gchar)(cstr))
	if paramSpec == nil {
		return TYPE_INVALID, errors.New("couldn't find Property")
	}
	return Type(paramSpec.value_type), nil
}

func ( v * Object ) GetPropertyType ( name string ) ( Type , error ) { cstr := C . CString ( name ) defer C . free ( unsafe . Pointer ( cstr ) ) paramSpec := C . g_object_class_find_property ( C . _g_object_get_class ( v . native ( ) ) , ( * C . gchar ) ( cstr ) ) if paramSpec == nil { return TYPE_INVALID , errors . New ( " " ) } return Type ( paramSpec . value_type ) , nil }

// GetPropertyType returns the Type of a property of the underlying GObject.
// If the property is missing it will return TYPE_INVALID and an error.

GetPropertyType returns the Type of a property of the underlying GObject . If the property is missing it will return TYPE_INVALID and an error .


func (v *InitiallyUnowned) Native() uintptr {
	if v == nil || v.Object == nil {
		return uintptr(unsafe.Pointer(nil))
	}
	return v.Object.Native()
}

func ( v * InitiallyUnowned ) Native ( ) uintptr { if v == nil || v . Object == nil { return uintptr ( unsafe . Pointer ( nil ) ) } return v . Object . Native ( ) }

// Native returns a pointer to the underlying GObject.  This is implemented
// here rather than calling Native on the embedded Object to prevent a nil
// pointer dereference.

Native returns a pointer to the underlying GObject . This is implemented here rather than calling Native on the embedded Object to prevent a nil pointer dereference .


func InitI18n(domain string, dir string) {
	domainStr := C.CString(domain)
	defer C.free(unsafe.Pointer(domainStr))

	dirStr := C.CString(dir)
	defer C.free(unsafe.Pointer(dirStr))

	C.init_i18n(domainStr, dirStr)
}

func InitI18n ( domain string , dir string ) { domainStr := C . CString ( domain ) defer C . free ( unsafe . Pointer ( domainStr ) ) dirStr := C . CString ( dir ) defer C . free ( unsafe . Pointer ( dirStr ) ) C . init_i18n ( domainStr , dirStr ) }

// InitI18n initializes the i18n subsystem.

InitI18n initializes the i18n subsystem .


func Local(input string) string {
	cstr := C.CString(input)
	defer C.free(unsafe.Pointer(cstr))

	return C.GoString(C.localize(cstr))
}

func Local ( input string ) string { cstr := C . CString ( input ) defer C . free ( unsafe . Pointer ( cstr ) ) return C . GoString ( C . localize ( cstr ) ) }

// Local localizes a string using gettext


func (v *ShortcutsSection) native() *C.GtkShortcutsSection {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsSection(p)
}

func ( v * ShortcutsSection ) native ( ) * C . GtkShortcutsSection { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkShortcutsSection ( p ) }

// native returns a pointer to the underlying GtkShortcutsSection.

native returns a pointer to the underlying GtkShortcutsSection .


func (v *ShortcutsGroup) native() *C.GtkShortcutsGroup {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsGroup(p)
}

func ( v * ShortcutsGroup ) native ( ) * C . GtkShortcutsGroup { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkShortcutsGroup ( p ) }

// native returns a pointer to the underlying GtkShortcutsGroup.

native returns a pointer to the underlying GtkShortcutsGroup .


func (v *ShortcutsShortcut) native() *C.GtkShortcutsShortcut {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsShortcut(p)
}

func ( v * ShortcutsShortcut ) native ( ) * C . GtkShortcutsShortcut { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkShortcutsShortcut ( p ) }

// native returns a pointer to the underlying GtkShortcutsShortcut.

native returns a pointer to the underlying GtkShortcutsShortcut .


func SimpleActionGroupNew() *SimpleActionGroup {
	c := C.g_simple_action_group_new()
	if c == nil {
		return nil
	}
	return wrapSimpleActionGroup(wrapObject(unsafe.Pointer(c)))
}

func SimpleActionGroupNew ( ) * SimpleActionGroup { c := C . g_simple_action_group_new ( ) if c == nil { return nil } return wrapSimpleActionGroup ( wrapObject ( unsafe . Pointer ( c ) ) ) }

// SimpleActionGroupNew is a wrapper around g_simple_action_group_new


func ActionNameIsValid(actionName string) bool {
	cstr := (*C.gchar)(C.CString(actionName))
	return gobool(C.g_action_name_is_valid(cstr))
}

func ActionNameIsValid ( actionName string ) bool { cstr := ( * C . gchar ) ( C . CString ( actionName ) ) return gobool ( C . g_action_name_is_valid ( cstr ) ) }

// ActionNameIsValid is a wrapper around g_action_name_is_valid


func (v *Action) GetName() string {
	return C.GoString((*C.char)(C.g_action_get_name(v.native())))
}

func ( v * Action ) GetName ( ) string { return C . GoString ( ( * C . char ) ( C . g_action_get_name ( v . native ( ) ) ) ) }

// GetName is a wrapper around g_action_get_name


func (v *Action) GetState() *Variant {
	c := C.g_action_get_state(v.native())
	if c == nil {
		return nil
	}
	return newVariant((*C.GVariant)(c))
}

func ( v * Action ) GetState ( ) * Variant { c := C . g_action_get_state ( v . native ( ) ) if c == nil { return nil } return newVariant ( ( * C . GVariant ) ( c ) ) }

// GetState is a wrapper around g_action_get_state


func (v *Action) GetStateHint() *Variant {
	c := C.g_action_get_state_hint(v.native())
	if c == nil {
		return nil
	}
	return newVariant((*C.GVariant)(c))
}

func ( v * Action ) GetStateHint ( ) * Variant { c := C . g_action_get_state_hint ( v . native ( ) ) if c == nil { return nil } return newVariant ( ( * C . GVariant ) ( c ) ) }

// GetStateHint is a wrapper around g_action_get_state_hint


func (v *Action) GetParameterType() *VariantType {
	c := C.g_action_get_parameter_type(v.native())
	if c == nil {
		return nil
	}
	return newVariantType((*C.GVariantType)(c))
}

func ( v * Action ) GetParameterType ( ) * VariantType { c := C . g_action_get_parameter_type ( v . native ( ) ) if c == nil { return nil } return newVariantType ( ( * C . GVariantType ) ( c ) ) }

// GetParameterType is a wrapper around g_action_get_parameter_type


func (v *Action) GetStateType() *VariantType {
	c := C.g_action_get_state_type(v.native())
	if c == nil {
		return nil
	}
	return newVariantType((*C.GVariantType)(c))
}

func ( v * Action ) GetStateType ( ) * VariantType { c := C . g_action_get_state_type ( v . native ( ) ) if c == nil { return nil } return newVariantType ( ( * C . GVariantType ) ( c ) ) }

// GetStateType is a wrapper around g_action_get_state_type


func (v *Action) ChangeState(value *Variant) {
	C.g_action_change_state(v.native(), value.native())
}

func ( v * Action ) ChangeState ( value * Variant ) { C . g_action_change_state ( v . native ( ) , value . native ( ) ) }

// ChangeState is a wrapper around g_action_change_state


func (v *Action) Activate(parameter *Variant) {
	C.g_action_activate(v.native(), parameter.native())
}

func ( v * Action ) Activate ( parameter * Variant ) { C . g_action_activate ( v . native ( ) , parameter . native ( ) ) }

// Activate is a wrapper around g_action_activate


func SimpleActionNew(name string, parameterType *VariantType) *SimpleAction {
	c := C.g_simple_action_new((*C.gchar)(C.CString(name)), parameterType.native())
	if c == nil {
		return nil
	}
	return wrapSimpleAction(wrapObject(unsafe.Pointer(c)))
}

func SimpleActionNew ( name string , parameterType * VariantType ) * SimpleAction { c := C . g_simple_action_new ( ( * C . gchar ) ( C . CString ( name ) ) , parameterType . native ( ) ) if c == nil { return nil } return wrapSimpleAction ( wrapObject ( unsafe . Pointer ( c ) ) ) }

// SimpleActionNew is a wrapper around g_simple_action_new


func SimpleActionNewStateful(name string, parameterType *VariantType, state *Variant) *SimpleAction {
	c := C.g_simple_action_new_stateful((*C.gchar)(C.CString(name)), parameterType.native(), state.native())
	if c == nil {
		return nil
	}
	return wrapSimpleAction(wrapObject(unsafe.Pointer(c)))
}

func SimpleActionNewStateful ( name string , parameterType * VariantType , state * Variant ) * SimpleAction { c := C . g_simple_action_new_stateful ( ( * C . gchar ) ( C . CString ( name ) ) , parameterType . native ( ) , state . native ( ) ) if c == nil { return nil } return wrapSimpleAction ( wrapObject ( unsafe . Pointer ( c ) ) ) }

// SimpleActionNewStateful is a wrapper around g_simple_action_new_stateful


func (v *SimpleAction) SetEnabled(enabled bool) {
	C.g_simple_action_set_enabled(v.native(), gbool(enabled))
}

func ( v * SimpleAction ) SetEnabled ( enabled bool ) { C . g_simple_action_set_enabled ( v . native ( ) , gbool ( enabled ) ) }

// SetEnabled is a wrapper around g_simple_action_set_enabled


func PropertyActionNew(name string, object *Object, propertyName string) *PropertyAction {
	c := C.g_property_action_new((*C.gchar)(C.CString(name)), C.gpointer(unsafe.Pointer(object.native())), (*C.gchar)(C.CString(propertyName)))
	if c == nil {
		return nil
	}
	return wrapPropertyAction(wrapObject(unsafe.Pointer(c)))
}

func PropertyActionNew ( name string , object * Object , propertyName string ) * PropertyAction { c := C . g_property_action_new ( ( * C . gchar ) ( C . CString ( name ) ) , C . gpointer ( unsafe . Pointer ( object . native ( ) ) ) , ( * C . gchar ) ( C . CString ( propertyName ) ) ) if c == nil { return nil } return wrapPropertyAction ( wrapObject ( unsafe . Pointer ( c ) ) ) }

// PropertyActionNew is a wrapper around g_property_action_new


func (v *Adjustment) native() *C.GtkAdjustment {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAdjustment(p)
}

func ( v * Adjustment ) native ( ) * C . GtkAdjustment { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAdjustment ( p ) }

// native returns a pointer to the underlying GtkAdjustment.

native returns a pointer to the underlying GtkAdjustment .


func (v *Assistant) native() *C.GtkAssistant {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAssistant(p)
}

func ( v * Assistant ) native ( ) * C . GtkAssistant { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAssistant ( p ) }

// native returns a pointer to the underlying GtkAssistant.

native returns a pointer to the underlying GtkAssistant .


func (v *Bin) native() *C.GtkBin {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkBin(p)
}

func ( v * Bin ) native ( ) * C . GtkBin { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkBin ( p ) }

// native returns a pointer to the underlying GtkBin.

native returns a pointer to the underlying GtkBin .


func (v *ColorButton) native() *C.GtkColorButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkColorButton(p)
}

func ( v * ColorButton ) native ( ) * C . GtkColorButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkColorButton ( p ) }

// Native returns a pointer to the underlying GtkColorButton.

Native returns a pointer to the underlying GtkColorButton .


func (v *CellRenderer) native() *C.GtkCellRenderer {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCellRenderer(p)
}

func ( v * CellRenderer ) native ( ) * C . GtkCellRenderer { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCellRenderer ( p ) }

// native returns a pointer to the underlying GtkCellRenderer.

native returns a pointer to the underlying GtkCellRenderer .


func (v *CellRendererSpinner) native() *C.GtkCellRendererSpinner {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCellRendererSpinner(p)
}

func ( v * CellRendererSpinner ) native ( ) * C . GtkCellRendererSpinner { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCellRendererSpinner ( p ) }

// native returns a pointer to the underlying GtkCellRendererSpinner.

native returns a pointer to the underlying GtkCellRendererSpinner .


func (v *CellRendererPixbuf) native() *C.GtkCellRendererPixbuf {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCellRendererPixbuf(p)
}

func ( v * CellRendererPixbuf ) native ( ) * C . GtkCellRendererPixbuf { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCellRendererPixbuf ( p ) }

// native returns a pointer to the underlying GtkCellRendererPixbuf.

native returns a pointer to the underlying GtkCellRendererPixbuf .


func (v *CellRendererText) native() *C.GtkCellRendererText {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCellRendererText(p)
}

func ( v * CellRendererText ) native ( ) * C . GtkCellRendererText { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCellRendererText ( p ) }

// native returns a pointer to the underlying GtkCellRendererText.

native returns a pointer to the underlying GtkCellRendererText .


func (v *CellRendererToggle) native() *C.GtkCellRendererToggle {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCellRendererToggle(p)
}

func ( v * CellRendererToggle ) native ( ) * C . GtkCellRendererToggle { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCellRendererToggle ( p ) }

// native returns a pointer to the underlying GtkCellRendererToggle.

native returns a pointer to the underlying GtkCellRendererToggle .


func (v *CheckButton) native() *C.GtkCheckButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCheckButton(p)
}

func ( v * CheckButton ) native ( ) * C . GtkCheckButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCheckButton ( p ) }

// native returns a pointer to the underlying GtkCheckButton.

native returns a pointer to the underlying GtkCheckButton .


func (v *CheckMenuItem) native() *C.GtkCheckMenuItem {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCheckMenuItem(p)
}

func ( v * CheckMenuItem ) native ( ) * C . GtkCheckMenuItem { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCheckMenuItem ( p ) }

// native returns a pointer to the underlying GtkCheckMenuItem.

native returns a pointer to the underlying GtkCheckMenuItem .


func (v *Clipboard) native() *C.GtkClipboard {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkClipboard(p)
}

func ( v * Clipboard ) native ( ) * C . GtkClipboard { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkClipboard ( p ) }

// native returns a pointer to the underlying GtkClipboard.

native returns a pointer to the underlying GtkClipboard .


func (v *Clipboard) WaitIsTextAvailable() bool {
	c := C.gtk_clipboard_wait_is_text_available(v.native())
	return gobool(c)
}

func ( v * Clipboard ) WaitIsTextAvailable ( ) bool { c := C . gtk_clipboard_wait_is_text_available ( v . native ( ) ) return gobool ( c ) }

// WaitIsTextAvailable is a wrapper around gtk_clipboard_wait_is_text_available


func (v *Clipboard) WaitForText() (string, error) {
	c := C.gtk_clipboard_wait_for_text(v.native())
	if c == nil {
		return "", nilPtrErr
	}
	defer C.g_free(C.gpointer(c))
	return goString(c), nil
}

func ( v * Clipboard ) WaitForText ( ) ( string , error ) { c := C . gtk_clipboard_wait_for_text ( v . native ( ) ) if c == nil { return " " , nilPtrErr } defer C . g_free ( C . gpointer ( c ) ) return goString ( c ) , nil }

// WaitForText is a wrapper around gtk_clipboard_wait_for_text


func (v *Clipboard) WaitIsRichTextAvailable(buf *TextBuffer) bool {
	c := C.gtk_clipboard_wait_is_rich_text_available(v.native(), buf.native())
	return gobool(c)
}

// WaitIsRichTextAvailable is a wrapper around gtk_clipboard_wait_is_rich_text_available


func (v *Clipboard) WaitIsUrisAvailable() bool {
	c := C.gtk_clipboard_wait_is_uris_available(v.native())
	return gobool(c)
}

func ( v * Clipboard ) WaitIsUrisAvailable ( ) bool { c := C . gtk_clipboard_wait_is_uris_available ( v . native ( ) ) return gobool ( c ) }

// WaitIsUrisAvailable is a wrapper around gtk_clipboard_wait_is_uris_available


func (v *Clipboard) WaitIsImageAvailable() bool {
	c := C.gtk_clipboard_wait_is_image_available(v.native())
	return gobool(c)
}

func ( v * Clipboard ) WaitIsImageAvailable ( ) bool { c := C . gtk_clipboard_wait_is_image_available ( v . native ( ) ) return gobool ( c ) }

// WaitIsImageAvailable is a wrapper around gtk_clipboard_wait_is_image_available


func (v *Clipboard) SetImage(pixbuf *gdk.Pixbuf) {
	C.gtk_clipboard_set_image(v.native(), (*C.GdkPixbuf)(unsafe.Pointer(pixbuf.Native())))
}

func ( v * Clipboard ) SetImage ( pixbuf * gdk . Pixbuf ) { C . gtk_clipboard_set_image ( v . native ( ) , ( * C . GdkPixbuf ) ( unsafe . Pointer ( pixbuf . Native ( ) ) ) ) }

// SetImage is a wrapper around gtk_clipboard_set_image


func (v *Clipboard) WaitForImage() (*gdk.Pixbuf, error) {
	c := C.gtk_clipboard_wait_for_image(v.native())
	if c == nil {
		return nil, nilPtrErr
	}

	p := &gdk.Pixbuf{glib.Take(unsafe.Pointer(c))}
	return p, nil
}

func ( v * Clipboard ) WaitForImage ( ) ( * gdk . Pixbuf , error ) { c := C . gtk_clipboard_wait_for_image ( v . native ( ) ) if c == nil { return nil , nilPtrErr } p := & gdk . Pixbuf { glib . Take ( unsafe . Pointer ( c ) ) } return p , nil }

// WaitForImage is a wrapper around gtk_clipboard_wait_for_image


func (v *Clipboard) WaitIsTargetAvailable(target gdk.Atom) bool {
	c := C.gtk_clipboard_wait_is_target_available(v.native(), C.GdkAtom(unsafe.Pointer(target)))
	return gobool(c)
}

func ( v * Clipboard ) WaitIsTargetAvailable ( target gdk . Atom ) bool { c := C . gtk_clipboard_wait_is_target_available ( v . native ( ) , C . GdkAtom ( unsafe . Pointer ( target ) ) ) return gobool ( c ) }

// WaitIsTargetAvailable is a wrapper around gtk_clipboard_wait_is_target_available


func (v *Clipboard) WaitForContents(target gdk.Atom) (*SelectionData, error) {
	c := C.gtk_clipboard_wait_for_contents(v.native(), C.GdkAtom(unsafe.Pointer(target)))
	if c == nil {
		return nil, nilPtrErr
	}
	p := &SelectionData{c}
	runtime.SetFinalizer(p, (*SelectionData).free)
	return p, nil
}

func ( v * Clipboard ) WaitForContents ( target gdk . Atom ) ( * SelectionData , error ) { c := C . gtk_clipboard_wait_for_contents ( v . native ( ) , C . GdkAtom ( unsafe . Pointer ( target ) ) ) if c == nil { return nil , nilPtrErr } p := & SelectionData { c } runtime . SetFinalizer ( p , ( * SelectionData ) . free ) return p , nil }

// WaitForContents is a wrapper around gtk_clipboard_wait_for_contents


func (v *Container) native() *C.GtkContainer {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkContainer(p)
}

func ( v * Container ) native ( ) * C . GtkContainer { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkContainer ( p ) }

// native returns a pointer to the underlying GtkContainer.

native returns a pointer to the underlying GtkContainer .


func (v *CssProvider) native() *C.GtkCssProvider {
	if v == nil || v.Object == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkCssProvider(p)
}

func ( v * CssProvider ) native ( ) * C . GtkCssProvider { if v == nil || v . Object == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkCssProvider ( p ) }

// native returns a pointer to the underlying GtkCssProvider.

native returns a pointer to the underlying GtkCssProvider .


func (v *Dialog) native() *C.GtkDialog {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkDialog(p)
}

func ( v * Dialog ) native ( ) * C . GtkDialog { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkDialog ( p ) }

// native returns a pointer to the underlying GtkDialog.

native returns a pointer to the underlying GtkDialog .


func (v *Entry) native() *C.GtkEntry {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkEntry(p)
}

func ( v * Entry ) native ( ) * C . GtkEntry { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkEntry ( p ) }

// native returns a pointer to the underlying GtkEntry.

native returns a pointer to the underlying GtkEntry .


func (v *EntryBuffer) native() *C.GtkEntryBuffer {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkEntryBuffer(p)
}

func ( v * EntryBuffer ) native ( ) * C . GtkEntryBuffer { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkEntryBuffer ( p ) }

// native returns a pointer to the underlying GtkEntryBuffer.

native returns a pointer to the underlying GtkEntryBuffer .


func (v *EntryCompletion) native() *C.GtkEntryCompletion {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkEntryCompletion(p)
}

func ( v * EntryCompletion ) native ( ) * C . GtkEntryCompletion { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkEntryCompletion ( p ) }

// native returns a pointer to the underlying GtkEntryCompletion.

native returns a pointer to the underlying GtkEntryCompletion .


func (v *EventBox) native() *C.GtkEventBox {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkEventBox(p)
}

func ( v * EventBox ) native ( ) * C . GtkEventBox { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkEventBox ( p ) }

// native returns a pointer to the underlying GtkEventBox.

native returns a pointer to the underlying GtkEventBox .


func (v *Expander) native() *C.GtkExpander {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkExpander(p)
}

func ( v * Expander ) native ( ) * C . GtkExpander { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkExpander ( p ) }

// native returns a pointer to the underlying GtkExpander.

native returns a pointer to the underlying GtkExpander .


func (v *FileChooser) native() *C.GtkFileChooser {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFileChooser(p)
}

func ( v * FileChooser ) native ( ) * C . GtkFileChooser { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFileChooser ( p ) }

// native returns a pointer to the underlying GObject as a GtkFileChooser.

native returns a pointer to the underlying GObject as a GtkFileChooser .


func (v *FileChooserButton) native() *C.GtkFileChooserButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFileChooserButton(p)
}

func ( v * FileChooserButton ) native ( ) * C . GtkFileChooserButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFileChooserButton ( p ) }

// native returns a pointer to the underlying GtkFileChooserButton.

native returns a pointer to the underlying GtkFileChooserButton .


func (v *FileChooserDialog) native() *C.GtkFileChooserDialog {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFileChooserDialog(p)
}

func ( v * FileChooserDialog ) native ( ) * C . GtkFileChooserDialog { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFileChooserDialog ( p ) }

// native returns a pointer to the underlying GtkFileChooserDialog.

native returns a pointer to the underlying GtkFileChooserDialog .


func (v *FileChooserWidget) native() *C.GtkFileChooserWidget {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFileChooserWidget(p)
}

func ( v * FileChooserWidget ) native ( ) * C . GtkFileChooserWidget { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFileChooserWidget ( p ) }

// native returns a pointer to the underlying GtkFileChooserWidget.

native returns a pointer to the underlying GtkFileChooserWidget .


func (v *FileFilter) native() *C.GtkFileFilter {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFileFilter(p)
}

func ( v * FileFilter ) native ( ) * C . GtkFileFilter { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFileFilter ( p ) }

// native returns a pointer to the underlying GObject as a GtkFileFilter.

native returns a pointer to the underlying GObject as a GtkFileFilter .


func (v *Frame) native() *C.GtkFrame {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkFrame(p)
}

func ( v * Frame ) native ( ) * C . GtkFrame { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkFrame ( p ) }

// native returns a pointer to the underlying GtkFrame.

native returns a pointer to the underlying GtkFrame .


func (v *AspectFrame) native() *C.GtkAspectFrame {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkAspectFrame(p)
}

func ( v * AspectFrame ) native ( ) * C . GtkAspectFrame { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkAspectFrame ( p ) }

// native returns a pointer to the underlying GtkAspectFrame.

native returns a pointer to the underlying GtkAspectFrame .


func (v *Grid) native() *C.GtkGrid {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkGrid(p)
}

func ( v * Grid ) native ( ) * C . GtkGrid { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkGrid ( p ) }

// native returns a pointer to the underlying GtkGrid.

native returns a pointer to the underlying GtkGrid .


func (v *Image) native() *C.GtkImage {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkImage(p)
}

func ( v * Image ) native ( ) * C . GtkImage { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkImage ( p ) }

// native returns a pointer to the underlying GtkImage.

native returns a pointer to the underlying GtkImage .


func (v *Layout) SetSize(width, height uint) {
	C.gtk_layout_set_size(v.native(), C.guint(width), C.guint(height))
}

func ( v * Layout ) SetSize ( width , height uint ) { C . gtk_layout_set_size ( v . native ( ) , C . guint ( width ) , C . guint ( height ) ) }

// Layout.SetSize is a wrapper around gtk_layout_set_size

Layout . SetSize is a wrapper around gtk_layout_set_size


func (v *Layout) GetSize() (width, height uint) {
	var w, h C.guint
	C.gtk_layout_get_size(v.native(), &w, &h)
	return uint(w), uint(h)
}

func ( v * Layout ) GetSize ( ) ( width , height uint ) { var w , h C . guint C . gtk_layout_get_size ( v . native ( ) , & w , & h ) return uint ( w ) , uint ( h ) }

// Layout.GetSize is a wrapper around gtk_layout_get_size

Layout . GetSize is a wrapper around gtk_layout_get_size


func (v *LinkButton) native() *C.GtkLinkButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkLinkButton(p)
}

func ( v * LinkButton ) native ( ) * C . GtkLinkButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkLinkButton ( p ) }

// native returns a pointer to the underlying GtkLinkButton.

native returns a pointer to the underlying GtkLinkButton .


func (v *ListStore) native() *C.GtkListStore {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkListStore(p)
}

func ( v * ListStore ) native ( ) * C . GtkListStore { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkListStore ( p ) }

// native returns a pointer to the underlying GtkListStore.

native returns a pointer to the underlying GtkListStore .


func (v *MenuButton) native() *C.GtkMenuButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkMenuButton(p)
}

func ( v * MenuButton ) native ( ) * C . GtkMenuButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkMenuButton ( p ) }

// native returns a pointer to the underlying GtkMenuButton.

native returns a pointer to the underlying GtkMenuButton .


func (v *MenuItem) native() *C.GtkMenuItem {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkMenuItem(p)
}

func ( v * MenuItem ) native ( ) * C . GtkMenuItem { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkMenuItem ( p ) }

// native returns a pointer to the underlying GtkMenuItem.

native returns a pointer to the underlying GtkMenuItem .


func (v *MenuItem) SetLabel(label string) {
	cstr := C.CString(label)
	defer C.free(unsafe.Pointer(cstr))
	C.gtk_menu_item_set_label(v.native(), (*C.gchar)(cstr))
}

func ( v * MenuItem ) SetLabel ( label string ) { cstr := C . CString ( label ) defer C . free ( unsafe . Pointer ( cstr ) ) C . gtk_menu_item_set_label ( v . native ( ) , ( * C . gchar ) ( cstr ) ) }


func (v *MenuItem) GetLabel() string {
	l := C.gtk_menu_item_get_label(v.native())
	return goString(l)
}

func ( v * MenuItem ) GetLabel ( ) string { l := C . gtk_menu_item_get_label ( v . native ( ) ) return goString ( l ) }


func (v *MessageDialog) native() *C.GtkMessageDialog {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkMessageDialog(p)
}

func ( v * MessageDialog ) native ( ) * C . GtkMessageDialog { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkMessageDialog ( p ) }

// native returns a pointer to the underlying GtkMessageDialog.

native returns a pointer to the underlying GtkMessageDialog .


func (v *Notebook) native() *C.GtkNotebook {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkNotebook(p)
}

func ( v * Notebook ) native ( ) * C . GtkNotebook { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkNotebook ( p ) }

// native returns a pointer to the underlying GtkNotebook.

native returns a pointer to the underlying GtkNotebook .


func (v *OffscreenWindow) native() *C.GtkOffscreenWindow {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkOffscreenWindow(p)
}

func ( v * OffscreenWindow ) native ( ) * C . GtkOffscreenWindow { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkOffscreenWindow ( p ) }

// native returns a pointer to the underlying GtkOffscreenWindow.

native returns a pointer to the underlying GtkOffscreenWindow .


func (v *Orientable) native() *C.GtkOrientable {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkOrientable(p)
}

func ( v * Orientable ) native ( ) * C . GtkOrientable { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkOrientable ( p ) }

// native returns a pointer to the underlying GObject as a GtkOrientable.

native returns a pointer to the underlying GObject as a GtkOrientable .


func (v *Overlay) native() *C.GtkOverlay {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkOverlay(p)
}

func ( v * Overlay ) native ( ) * C . GtkOverlay { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkOverlay ( p ) }

// native returns a pointer to the underlying GtkOverlay.

native returns a pointer to the underlying GtkOverlay .


func (v *Paned) native() *C.GtkPaned {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkPaned(p)
}

func ( v * Paned ) native ( ) * C . GtkPaned { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkPaned ( p ) }

// native returns a pointer to the underlying GtkPaned.

native returns a pointer to the underlying GtkPaned .


func (v *ProgressBar) native() *C.GtkProgressBar {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkProgressBar(p)
}

func ( v * ProgressBar ) native ( ) * C . GtkProgressBar { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkProgressBar ( p ) }

// native returns a pointer to the underlying GtkProgressBar.

native returns a pointer to the underlying GtkProgressBar .


func (v *RadioButton) native() *C.GtkRadioButton {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkRadioButton(p)
}

func ( v * RadioButton ) native ( ) * C . GtkRadioButton { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkRadioButton ( p ) }

// native returns a pointer to the underlying GtkRadioButton.

native returns a pointer to the underlying GtkRadioButton .


func (v *RadioMenuItem) native() *C.GtkRadioMenuItem {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkRadioMenuItem(p)
}

func ( v * RadioMenuItem ) native ( ) * C . GtkRadioMenuItem { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkRadioMenuItem ( p ) }

// native returns a pointer to the underlying GtkRadioMenuItem.

native returns a pointer to the underlying GtkRadioMenuItem .


func (v *Range) native() *C.GtkRange {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkRange(p)
}

func ( v * Range ) native ( ) * C . GtkRange { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkRange ( p ) }

// native returns a pointer to the underlying GtkRange.

native returns a pointer to the underlying GtkRange .


func (v *RecentChooser) native() *C.GtkRecentChooser {
	if v == nil || v.Object == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkRecentChooser(p)
}

func ( v * RecentChooser ) native ( ) * C . GtkRecentChooser { if v == nil || v . Object == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkRecentChooser ( p ) }

// native returns a pointer to the underlying GtkRecentChooser.

native returns a pointer to the underlying GtkRecentChooser .


func (v *RecentFilter) native() *C.GtkRecentFilter {
	if v == nil || v.Object == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkRecentFilter(p)
}

func ( v * RecentFilter ) native ( ) * C . GtkRecentFilter { if v == nil || v . Object == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkRecentFilter ( p ) }

// native returns a pointer to the underlying GtkRecentFilter.

native returns a pointer to the underlying GtkRecentFilter .


func (v *Scale) native() *C.GtkScale {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkScale(p)
}

func ( v * Scale ) native ( ) * C . GtkScale { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkScale ( p ) }

// native returns a pointer to the underlying GtkScale.

native returns a pointer to the underlying GtkScale .


func (v *Scrollbar) native() *C.GtkScrollbar {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkScrollbar(p)
}

func ( v * Scrollbar ) native ( ) * C . GtkScrollbar { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkScrollbar ( p ) }

// native returns a pointer to the underlying GtkScrollbar.

native returns a pointer to the underlying GtkScrollbar .


func (v *ScrolledWindow) native() *C.GtkScrolledWindow {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkScrolledWindow(p)
}

func ( v * ScrolledWindow ) native ( ) * C . GtkScrolledWindow { if v == nil || v . GObject == nil { return nil } p := unsafe . Pointer ( v . GObject ) return C . toGtkScrolledWindow ( p ) }

// native returns a pointer to the underlying GtkScrolledWindow.

native returns a pointer to the underlying GtkScrolledWindow .