<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="task" id="tour-summary" lang="ko">

  <info>
    <revision version="0.1" date="2013-06-17" status="stub"/>

    <credit type="author copyright">
      <name>Ekaterina Gerasimova</name>
      <email its:translate="no">kittykat3756@gmail.com</email>
      <years>2013</years>
    </credit>
    <credit type="author copyright">
      <name>Gordon Hill</name>
      <email its:translate="no">caseyweederman@gmail.com</email>
      <years>2013</years>
    </credit>

    <license xmlns="http://projectmallard.org/1.0/" href="http://creativecommons.org/licenses/by-sa/3.0/us/">
<p>This work is licensed under a
<link href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons
Attribution-Share Alike 3.0 United States License</link>.</p>
<p>특별히 예외적으로, 이 문서의 예제 코드는 저작권자에 명시한 대로 어떠한 제한 없이 원하는 대로 복제, 수정, 배포할 수 있습니다.</p>
</license>

    <desc>코드 개요 및 관련 링크입니다.</desc>

  <credit type="translator copyright"><name>조성호</name><email>shcho@gnome.org</email><years>2016, 2017, 2018.</years></credit></info>

  <title>요약</title>
  <links type="prevnext" style="top"/>
  <links type="series" style="floatend">
    <title>그놈 시작하기</title>
  </links>

  <p>예제를 어떻게 함께 활용하는지 보여드리겠습니다:</p>
  <code>
#!/usr/bin/gjs

imports.gi.versions.Gtk = '3.0';
const Gtk = imports.gi.Gtk;

class HelloWorld {
    constructor() {
        this.application = new Gtk.Application();
        this.application.connect('activate', this._onActivate.bind(this));
        this.application.connect('startup', this._onStartup.bind(this));
    }

    _onActivate() {
        this._window.show_all();
    }

    _onStartup() {
        let builder = new Gtk.Builder();
        builder.add_from_file('tour.glade');
        this._window = builder.get_object('window1');
        this.application.add_window(this._window);
    }
};

let app = new HelloWorld();
app.application.run(ARGV);
</code>

</page>
