~vtuson/scopecreator/twitter-template

« back to all changes in this revision

Viewing changes to src/go/src/github.com/mattn/go-gtk/pango/pango.go

  • Committer: Victor Palau
  • Date: 2015-03-11 14:24:42 UTC
  • Revision ID: vtuson@gmail.com-20150311142442-f2pxp111c8ynv232
public release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package pango
 
2
 
 
3
// #include "pango.go.h"
 
4
// #cgo pkg-config: pango
 
5
import "C"
 
6
 
 
7
func bool2gboolean(b bool) C.gboolean {
 
8
        if b {
 
9
                return C.gboolean(1)
 
10
        }
 
11
        return C.gboolean(0)
 
12
}
 
13
func gboolean2bool(b C.gboolean) bool {
 
14
        if b != 0 {
 
15
                return true
 
16
        }
 
17
        return false
 
18
}
 
19
 
 
20
type WrapMode int
 
21
 
 
22
const (
 
23
        WRAP_WORD      WrapMode = 0
 
24
        WRAP_CHAR      WrapMode = 1
 
25
        WRAP_WORD_CHAR WrapMode = 2
 
26
)
 
27
 
 
28
type EllipsizeMode int
 
29
 
 
30
const (
 
31
        ELLIPSIZE_NONE   EllipsizeMode = 0
 
32
        ELLIPSIZE_START  EllipsizeMode = 1
 
33
        ELLIPSIZE_MIDDLE EllipsizeMode = 2
 
34
        ELLIPSIZE_END    EllipsizeMode = 3
 
35
)