"Fossies" - the Fresh Open Source Software Archive

Member "glibmm-2.74.0/gio/src/applaunchcontext.hg" (19 Sep 2022, 2497 Bytes) of package /linux/misc/glibmm-2.74.0.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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/object.h>
   23 //#include <giomm/file.h>
   24 #include <giomm/icon.h>
   25 
   26 _DEFS(giomm,gio)
   27 _PINCLUDE(glibmm/private/object_p.h)
   28 
   29 namespace Gio
   30 {
   31 
   32 class GIOMM_API AppInfo;
   33 class GIOMM_API File;
   34 
   35 /** This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window.
   36  * See also AppInfo.
   37  *
   38  * @newin{2,16}
   39  */
   40 class GIOMM_API AppLaunchContext : public Glib::Object
   41 {
   42   _CLASS_GOBJECT(AppLaunchContext, GAppLaunchContext, G_APP_LAUNCH_CONTEXT, Glib::Object, GObject, , , GIOMM_API)
   43 
   44 protected:
   45   _CTOR_DEFAULT()
   46 
   47 public:
   48   _WRAP_CREATE()
   49 
   50   _WRAP_METHOD(void setenv(const Glib::ustring& variable, const Glib::ustring& value), g_app_launch_context_setenv)
   51   _WRAP_METHOD(void unsetenv(const Glib::ustring& variable), g_app_launch_context_unsetenv)
   52 
   53 #m4 _CONVERSION(`char**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_DEEP)')
   54   _WRAP_METHOD(std::vector<Glib::ustring> get_environment() const, g_app_launch_context_get_environment)
   55 
   56 #m4 _CONVERSION(`const std::vector<std::string>&',`GList*',`Glib::ListHandler<std::string>::vector_to_list$3.data()')
   57   _WRAP_METHOD(std::string get_display(const Glib::RefPtr<AppInfo>& info, const std::vector<Glib::RefPtr<Gio::File>>& files),
   58                g_app_launch_context_get_display)
   59 
   60   _WRAP_METHOD(std::string get_startup_notify_id(const Glib::RefPtr<AppInfo>& info, const std::vector<Glib::RefPtr<Gio::File>>& files),
   61                g_app_launch_context_get_startup_notify_id)
   62   _WRAP_METHOD(void launch_failed(const std::string& startup_notify_id),
   63                g_app_launch_context_launch_failed)
   64 };
   65 
   66 } // namespace Gio
   67