summaryrefslogtreecommitdiffstats
path: root/views/examples/examples_main_gtk.cc
blob: 041c8d4ec534fb97c255179463f18487ea89eb5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "views/widget/widget_gtk.h"
#include "views/examples/examples_main_base.h"

namespace {

class ExamplesMainGtk : public examples::ExamplesMainBase {
 public:
  ExamplesMainGtk() {}
  virtual ~ExamplesMainGtk() {}

  // Overrides ExamplesMainBase.
  virtual views::Widget* CreateTopLevelWidget() {
    return new views::WidgetGtk(views::WidgetGtk::TYPE_DECORATED_WINDOW);
  }

 private:
  DISALLOW_COPY_AND_ASSIGN(ExamplesMainGtk);
};

}  // namespace

int main(int argc, char** argv) {
  // Initializes gtk stuff.
  g_thread_init(NULL);
  g_type_init();
  gtk_init(&argc, &argv);

  ExamplesMainGtk main;
  main.Run();
  return 0;
}