本文整理匯總了Golang中C.next_gcharptr函數的典型用法代碼示例。如果您正苦於以下問題:Golang next_gcharptr函數的具體用法?Golang next_gcharptr怎麽用?Golang next_gcharptr使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了next_gcharptr函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: GetSearchPath
func (v *GtkSourceLanguageManager) GetSearchPath() []string {
var dirs []string
cdirs := C.gtk_source_language_manager_get_search_path(v.LanguageManager)
for {
dirs = append(dirs, C.GoString(C.to_charptr(*cdirs)))
cdirs = C.next_gcharptr(cdirs)
if *cdirs == nil {
break
}
}
return dirs
}
示例2: GetLanguageIds
func (v *GtkSourceLanguageManager) GetLanguageIds() []string {
var ids []string
cids := C.gtk_source_language_manager_get_language_ids(v.LanguageManager)
for {
ids = append(ids, C.GoString(C.to_charptr(*cids)))
cids = C.next_gcharptr(cids)
if *cids == nil {
break
}
}
return ids
}
示例3: GetStyleIds
func (v *GtkSourceLanguage) GetStyleIds() []string {
var ids []string
cids := C.gtk_source_language_get_globs(v.SourceLanguage)
for {
ids = append(ids, C.GoString(C.to_charptr(*cids)))
cids = C.next_gcharptr(cids)
if *cids == nil {
break
}
}
return ids
}
示例4: GetGlobs
func (v *GtkSourceLanguage) GetGlobs() []string {
var globs []string
cglobs := C.gtk_source_language_get_globs(v.SourceLanguage)
for {
globs = append(globs, C.GoString(C.to_charptr(*cglobs)))
cglobs = C.next_gcharptr(cglobs)
if *cglobs == nil {
break
}
}
return globs
}
示例5: GetMimeTypes
func (v *GtkSourceLanguage) GetMimeTypes() []string {
var types []string
ctypes := C.gtk_source_language_get_mime_types(v.SourceLanguage)
for {
types = append(types, C.GoString(C.to_charptr(*ctypes)))
ctypes = C.next_gcharptr(ctypes)
if *ctypes == nil {
break
}
}
return types
}
示例6: ListActionDescriptions
// ListActionDescriptions is a wrapper around gtk_application_list_action_descriptions().
func (v *Application) ListActionDescriptions() []string {
var descs []string
c := C.gtk_application_list_action_descriptions(v.native())
originalc := c
defer C.g_strfreev(originalc)
for *c != nil {
descs = append(descs, C.GoString((*C.char)(*c)))
c = C.next_gcharptr(c)
}
return descs
}
示例7: toGoStringArray
func toGoStringArray(c **C.gchar) []string {
var strs []string
originalc := c
defer C.g_strfreev(originalc)
for *c != nil {
strs = append(strs, C.GoString((*C.char)(*c)))
c = C.next_gcharptr(c)
}
return strs
}
示例8: GetStrv
// 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) 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
}
示例9: _GStringArrayToGoStringSlice
// Convert gchar** null-terminated glib string array to []string, frees "arr"
func _GStringArrayToGoStringSlice(arr **C.gchar) []string {
var slice []string
if arr == nil {
return slice
}
iter := arr
for *iter != nil {
slice = append(slice, _GStringToGoString(*iter))
iter = C.next_gcharptr(iter)
}
C.g_strfreev(arr)
return slice
}
示例10: GetDocumenters
// GetDocumenters is a wrapper around gtk_about_dialog_get_documenters().
func (v *AboutDialog) GetDocumenters() []string {
var documenters []string
cdocumenters := C.gtk_about_dialog_get_documenters(v.native())
if cdocumenters == nil {
return nil
}
for {
if *cdocumenters == nil {
break
}
documenters = append(documenters, C.GoString((*C.char)(*cdocumenters)))
cdocumenters = C.next_gcharptr(cdocumenters)
}
return documenters
}
示例11: GetArtists
// GetArtists is a wrapper around gtk_about_dialog_get_artists().
func (v *AboutDialog) GetArtists() []string {
var artists []string
cartists := C.gtk_about_dialog_get_artists(v.native())
if cartists == nil {
return nil
}
for {
if *cartists == nil {
break
}
artists = append(artists, C.GoString((*C.char)(*cartists)))
cartists = C.next_gcharptr(cartists)
}
return artists
}
示例12: GetAuthors
// GetAuthors is a wrapper around gtk_about_dialog_get_authors().
func (v *AboutDialog) GetAuthors() []string {
var authors []string
cauthors := C.gtk_about_dialog_get_authors(v.native())
if cauthors == nil {
return nil
}
for {
if *cauthors == nil {
break
}
authors = append(authors, C.GoString((*C.char)(*cauthors)))
cauthors = C.next_gcharptr(cauthors)
}
return authors
}
示例13: GetActionsForAccel
// GetActionsForAccel is a wrapper around gtk_application_get_actions_for_accel().
func (v *Application) GetActionsForAccel(acc string) []string {
cstr1 := (*C.gchar)(C.CString(acc))
defer C.free(unsafe.Pointer(cstr1))
var acts []string
c := C.gtk_application_get_actions_for_accel(v.native(), cstr1)
originalc := c
defer C.g_strfreev(originalc)
for *c != nil {
acts = append(acts, C.GoString((*C.char)(*c)))
c = C.next_gcharptr(c)
}
return acts
}