1/* Copyright (C) 2007 The gtkmm Development Team 2 * 3 * This library is free software; you can redistribute it and/or 4 * modify it under the terms of the GNU Lesser General Public 5 * License as published by the Free Software Foundation; either 6 * version 2.1 of the License, or (at your option) any later version. 7 * 8 * This library is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public 14 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 15 */ 16 17#include <exception> 18 19#include <string> 20 21#include <glibmm/interface.h> 22#include <glibmm/listhandle.h> 23#include <glibmm/object.h> 24//#include <giomm/file.h> 25#include <giomm/icon.h> 26 27_DEFS(giomm,gio) 28_PINCLUDE(glibmm/private/object_p.h) 29 30namespace Gio 31{ 32 33class GIOMM_API AppInfo; 34class GIOMM_API File; 35 36/** This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window. 37 * See also AppInfo. 38 * 39 * @newin{2,16} 40 */ 41class GIOMM_API AppLaunchContext : public Glib::Object 42{ 43 _CLASS_GOBJECT(AppLaunchContext, GAppLaunchContext, G_APP_LAUNCH_CONTEXT, Glib::Object, GObject, , , GIOMM_API) 44 45protected: 46 _CTOR_DEFAULT() 47 48public: 49 _WRAP_CREATE() 50 51 _WRAP_METHOD(void setenv(const Glib::ustring& variable, const Glib::ustring& value), g_app_launch_context_setenv) 52 _WRAP_METHOD(void unsetenv(const Glib::ustring& variable), g_app_launch_context_unsetenv) 53 54#m4 _CONVERSION(`char**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_DEEP)') 55 _WRAP_METHOD(std::vector<Glib::ustring> get_environment() const, g_app_launch_context_get_environment) 56 57#m4 _CONVERSION(`const Glib::ListHandle<std::string>&',`GList*',`$3.data()') 58 _WRAP_METHOD(std::string get_display(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files), 59 g_app_launch_context_get_display) 60 61 _WRAP_METHOD(std::string get_startup_notify_id(const Glib::RefPtr<AppInfo>& info, const Glib::ListHandle< Glib::RefPtr<Gio::File> >& files), 62 g_app_launch_context_get_startup_notify_id) 63 _WRAP_METHOD(void launch_failed(const std::string& startup_notify_id), 64 g_app_launch_context_launch_failed) 65}; 66 67} // namespace Gio 68 69