[gtkmm] Gdk: Add AppLaunchContext.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk: Add AppLaunchContext.
- Date: Mon, 26 Mar 2012 08:13:57 +0000 (UTC)
commit e56f818f99c1b2160b49ece233c02ec72e98c80b
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Mar 25 23:21:13 2012 +0200
Gdk: Add AppLaunchContext.
* tools/extra_defs_gen/generate_defs_gtk.cc: Mention
GDK_TYPE_APP_LAUNCH_CONTEXT.
* gdk/src/filelist.am:
* gdk/src/applaunchcontext.[hg|ccg]: Add this, deriving from
Gio::AppLaunchContext.
* gdk/gdkmm.h: Include the new header.
* gdk/src/display.[hg|ccg]: Added get_app_launch_context().
ChangeLog | 31 ++++++++++++++++
gdk/gdkmm.h | 1 +
gdk/src/applaunchcontext.ccg | 21 +++++++++++
gdk/src/applaunchcontext.hg | 57 +++++++++++++++++++++++++++++
gdk/src/display.ccg | 1 +
gdk/src/display.hg | 6 +++-
gdk/src/filelist.am | 1 +
tools/extra_defs_gen/generate_defs_gtk.cc | 3 +-
8 files changed, 119 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a69da13..93ac140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2012-03-26 Murray Cumming <murrayc murrayc com>
+
+ ColorChooser: Add add_palette.
+
+ * gtk/src/colorchooser.[hg|ccg]: Wrap gtk_color_chooser_add_palette().
+
+2012-03-25 Murray Cumming <murrayc murrayc com>
+
+ Gtk::CellArea: Add foreach().
+
+ * gtk/src/cellarea.[hg|ccg]: Wrap gtk_cell_area_foreach() and
+ gtk_cell_area_foreach_alloc().
+
+2012-03-25 Murray Cumming <murrayc murrayc com>
+
+ Gdk::Device: Add list_axes().
+
+ * gdk/src/device.[hg|ccg]: Wrap gdk_device_list_axes().
+
+2012-03-25 Murray Cumming <murrayc murrayc com>
+
+ Gdk: Add AppLaunchContext.
+
+ * tools/extra_defs_gen/generate_defs_gtk.cc: Mention
+ GDK_TYPE_APP_LAUNCH_CONTEXT.
+ * gdk/src/filelist.am:
+ * gdk/src/applaunchcontext.[hg|ccg]: Add this, deriving from
+ Gio::AppLaunchContext.
+ * gdk/gdkmm.h: Include the new header.
+ * gdk/src/display.[hg|ccg]: Added get_app_launch_context().
+
2012-03-25 Josà Alburquerque <jaalburquerque gmail com>
Actionable: Ensure all virtual functions don't return freed memory.
diff --git a/gdk/gdkmm.h b/gdk/gdkmm.h
index fdca73c..c0b96c5 100644
--- a/gdk/gdkmm.h
+++ b/gdk/gdkmm.h
@@ -30,6 +30,7 @@
#include <gdkmm/pixbufanimation.h>
#include <gdkmm/pixbufformat.h>
#include <gdkmm/pixbufloader.h>
+#include <gdkmm/applaunchcontext.h>
#include <gdkmm/cursor.h>
#include <gdkmm/rectangle.h>
#include <gdkmm/display.h>
diff --git a/gdk/src/applaunchcontext.ccg b/gdk/src/applaunchcontext.ccg
new file mode 100644
index 0000000..e745a23
--- /dev/null
+++ b/gdk/src/applaunchcontext.ccg
@@ -0,0 +1,21 @@
+/* Copyright (C) 2012 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gdk
+{
+
+} //namespace Gdk
diff --git a/gdk/src/applaunchcontext.hg b/gdk/src/applaunchcontext.hg
new file mode 100644
index 0000000..a614f37
--- /dev/null
+++ b/gdk/src/applaunchcontext.hg
@@ -0,0 +1,57 @@
+/* Copyright (C) 2012 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <giomm/appinfo.h>
+#include <gdkmm/screen.h>
+
+_DEFS(gdkmm,gdk)
+_PINCLUDE(giomm/private/applaunchcontext_p.h)
+
+namespace Gdk
+{
+
+/** This is an implementation of Gio::AppLaunchContext that
+ * handles launching an application in a graphical context. It provides
+ * startup notification and allows to launch applications on a specific
+ * screen or workspace.
+ *
+ * @newin{3,4}
+ */
+class AppLaunchContext : public Gio::AppLaunchContext
+{
+ _CLASS_GOBJECT(AppLaunchContext, GdkAppLaunchContext, GDK_APP_LAUNCH_CONTEXT, Gio::AppLaunchContext, GAppLaunchContext)
+
+protected:
+ _CTOR_DEFAULT()
+ _IGNORE(gdk_app_launch_context_new)
+
+public:
+ _WRAP_CREATE()
+
+ _IGNORE(gdk_app_launch_context_set_display)
+
+ _WRAP_METHOD(void set_screen(const Glib::RefPtr<Gdk::Screen>& screen), gdk_app_launch_context_set_screen)
+ _WRAP_METHOD(void set_desktop(int desktop), gdk_app_launch_context_set_desktop)
+ _WRAP_METHOD(void set_timestamp(guint32 timestamp), gdk_app_launch_context_set_timestamp)
+ _WRAP_METHOD(void set_icon(const Glib::RefPtr<Gio::Icon>& icon), gdk_app_launch_context_set_icon)
+ _WRAP_METHOD(void set_icon_name(const Glib::ustring& icon_name), gdk_app_launch_context_set_icon_name)
+
+ _WRAP_PROPERTY("display", Glib::RefPtr<Display>)
+};
+
+} //namespace Gdk
+
diff --git a/gdk/src/display.ccg b/gdk/src/display.ccg
index 297dd5e..1974a0b 100644
--- a/gdk/src/display.ccg
+++ b/gdk/src/display.ccg
@@ -22,6 +22,7 @@
#include <vector>
+#include <gdkmm/applaunchcontext.h>
#include <gdkmm/devicemanager.h>
#include <gdkmm/window.h>
#include <gdk/gdk.h>
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index fa2812b..df95261 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -22,6 +22,7 @@
#include <vector>
#include <gdkmm/screen.h>
+#include <gdkmm/applaunchcontext.h>
//#include <gdkmm/devicemanager.h>
#include <gdkmm/types.h> //For ModifierType
_DEFS(gdkmm,gdk)
@@ -155,7 +156,10 @@ public:
_WRAP_METHOD(Glib::RefPtr<DeviceManager> get_device_manager(), gdk_display_get_device_manager, refreturn)
_WRAP_METHOD(Glib::RefPtr<const DeviceManager> get_device_manager() const, gdk_display_get_device_manager, refreturn, constversion)
- //TODO: Wrap GdkAppLaunchContext: _WRAP_METHOD(GdkAppLaunchContext* get_app_launch_context(), gdk_display_get_app_launch_context)
+#m4 _CONVERSION(`GdkAppLaunchContext*',`Glib::RefPtr<AppLaunchContext>', `Glib::wrap($3)')
+#m4 _CONVERSION(`GdkAppLaunchContext*',`Glib::RefPtr<const AppLaunchContext>', `Glib::wrap($3)')
+ _WRAP_METHOD(Glib::RefPtr<AppLaunchContext> get_app_launch_context(), gdk_display_get_app_launch_context, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const AppLaunchContext> get_app_launch_context() const, gdk_display_get_app_launch_context, refreturn, constversion)
//We use no_default_handler because GdkDisplayClass is private.
diff --git a/gdk/src/filelist.am b/gdk/src/filelist.am
index 1916fed..7127515 100644
--- a/gdk/src/filelist.am
+++ b/gdk/src/filelist.am
@@ -13,6 +13,7 @@ gdkmm_files_defs = \
gdk_docs_override.xml
gdkmm_files_hg = \
+ applaunchcontext.hg \
color.hg \
cursor.hg \
device.hg \
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 4a29aa2..c4c7cbd 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -41,7 +41,8 @@ int main(int argc, char** argv)
{
gtk_init(&argc, &argv);
- std::cout << get_defs( GDK_TYPE_DRAG_CONTEXT )
+ std::cout << get_defs( GDK_TYPE_APP_LAUNCH_CONTEXT )
+ << get_defs( GDK_TYPE_DRAG_CONTEXT )
<< get_defs( GDK_TYPE_DISPLAY )
#if !defined(G_OS_WIN32)
<< get_defs( GDK_TYPE_DISPLAY_MANAGER )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]