vala创建classs类操作代码

代码语言:vala

所属分类:

代码描述:vala创建classs类操作代码

代码标签: 操作

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

/* class derived from GObject */
public class Main : Object {

    /* automatic property, data field is implicit */
    public string name { get; set; }

    /* signal */
    public signal void foo ();

    /* creation method */
    public Main (string name) {
        this.name = name;
    }

    /* public instance method */
    public void run () {
        /* assigning anonymous function as signal handler */
        this.foo.connect ((s.........完整代码请登录后点击上方下载按钮下载查看

网友评论0