Back to index

unity  6.0.0
StandaloneLauncher.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2010 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License version 3, as published
00006  * by the  Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranties of
00010  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * version 3 along with this program.  If not, see
00015  * <http://www.gnu.org/licenses/>
00016  *
00017  * Authored by: Jason Smith <jason.smith@canonical.com>
00018  *
00019  */
00020 
00021 #include "Nux/Nux.h"
00022 #include "Nux/Button.h"
00023 #include "Nux/VLayout.h"
00024 #include "Nux/HLayout.h"
00025 #include "Nux/WindowThread.h"
00026 #include "Nux/CheckBox.h"
00027 #include "Nux/SpinBox.h"
00028 #include "Nux/EditTextBox.h"
00029 #include "Nux/StaticText.h"
00030 #include "Nux/RangeValueInteger.h"
00031 #include "NuxGraphics/GraphicsEngine.h"
00032 #include <gtk/gtk.h>
00033 
00034 #include "unity-shared/BackgroundEffectHelper.h"
00035 #include "FavoriteStoreGSettings.h"
00036 #include "LauncherController.h"
00037 #include "Launcher.h"
00038 #include "unity-shared/PanelStyle.h"
00039 #include "unity-shared/UnitySettings.h"
00040 #include <dbus/dbus-glib.h>
00041 
00042 using namespace unity;
00043 
00044 static launcher::Controller::Ptr controller;
00045 
00046 void ThreadWidgetInit(nux::NThread* thread, void* InitData)
00047 {
00048 //  launcherWindow->SetGeometry (nux::Geometry(0, 0, 300, 800));
00049   controller.reset(new launcher::Controller(0));
00050 }
00051 
00052 int main(int argc, char** argv)
00053 {
00054   g_type_init();
00055   
00056   gtk_init(&argc, &argv);
00057 
00058   dbus_g_thread_init();
00059 
00060   nux::NuxInitialize(0);
00061 
00062   GeisAdapter geis_adapter;
00063   unity::Settings settings;
00064   panel::Style panel_style;
00065   internal::FavoriteStoreGSettings favorite_store;
00066 
00067   BackgroundEffectHelper::blur_type = BLUR_NONE;
00068   nux::WindowThread* wt = nux::CreateGUIThread(TEXT("Unity Switcher"), 300, 800, 0, &ThreadWidgetInit, 0);
00069 
00070   wt->Run(NULL);
00071   delete wt;
00072   return 0;
00073 }