[gnome-builder/wip/loganek/libidemm] libidemm: wrap recentprojects
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/loganek/libidemm] libidemm: wrap recentprojects
- Date: Wed, 6 Apr 2016 20:57:42 +0000 (UTC)
commit f403c68318ff3d3f2c2d49d79616eb2aca1e4bcc
Author: Marcin Kolny <marcin kolny gmail com>
Date: Tue Apr 5 21:28:16 2016 +0200
libidemm: wrap recentprojects
libidemm/.gitignore | 2 +
libidemm/idemm.h | 5 ++-
libidemm/src/application.ccg | 18 +++++++++++++++++
libidemm/src/application.hg | 21 +++++++++++++++++++
libidemm/src/filelist.am | 3 +-
libidemm/src/recentprojects.ccg | 17 ++++++++++++++++
libidemm/src/recentprojects.hg | 37 +++++++++++++++++++++++++++++++++++
libidemm/tools/m4/convert_libide.m4 | 3 ++
8 files changed, 103 insertions(+), 3 deletions(-)
---
diff --git a/libidemm/.gitignore b/libidemm/.gitignore
index 19957d4..83ef409 100644
--- a/libidemm/.gitignore
+++ b/libidemm/.gitignore
@@ -36,6 +36,8 @@ stamp-h2
/idemm/private/
/idemm/application.cc
/idemm/application.h
+/idemm/recentprojects.cc
+/idemm/recentprojects.h
/idemm/wrap_init.cc
# docs/
diff --git a/libidemm/idemm.h b/libidemm/idemm.h
index b57e1af..8239c67 100644
--- a/libidemm/idemm.h
+++ b/libidemm/idemm.h
@@ -1,7 +1,8 @@
#ifndef _IDEMM_H
#define _IDEMM_H
-#include "libidemm/application.h"
-#include "libidemm/wrap_init.h"
+#include <idemm/application.h>
+#include <idemm/recentprojects.h>
+#include <libidemm/wrap_init.h>
#endif
diff --git a/libidemm/src/application.ccg b/libidemm/src/application.ccg
index 99e0fec..730a6b2 100644
--- a/libidemm/src/application.ccg
+++ b/libidemm/src/application.ccg
@@ -1,3 +1,21 @@
+/* application.ccg
+ *
+ * Copyright (C) 2016 Marcin Kolny <marcin kolny gmail com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#include "application.h"
namespace {
diff --git a/libidemm/src/application.hg b/libidemm/src/application.hg
index 5dc2b8d..c270db1 100644
--- a/libidemm/src/application.hg
+++ b/libidemm/src/application.hg
@@ -1,3 +1,23 @@
+/* application.hg
+ *
+ * Copyright (C) 2016 Marcin Kolny <marcin kolny gmail com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <idemm/recentprojects.h>
+
#include <gtkmm/application.h>
#include <giomm/asyncresult.h>
#include <giomm/cancellable.h>
@@ -28,6 +48,7 @@ public:
_WRAP_METHOD(void show_projects_window(), ide_application_show_projects_window)
_WRAP_METHOD(Glib::ustring get_keybindings_mode() const, ide_application_get_keybindings_mode)
_WRAP_METHOD(Glib::RefPtr<Gio::Menu> get_menu_by_id(const Glib::ustring& id),
ide_application_get_menu_by_id)
+ _WRAP_METHOD(Glib::RefPtr<Ide::RecentProjects> get_recent_projects(), ide_application_get_recent_projects)
// TODO: remove the conversion when bug #764547 is fixed
#m4 _CONVERSION(`GDBusProxy*',`Glib::RefPtr<Gio::DBus::Proxy>',`Glib::wrap($3)')
diff --git a/libidemm/src/filelist.am b/libidemm/src/filelist.am
index 34703db..0ba98d2 100644
--- a/libidemm/src/filelist.am
+++ b/libidemm/src/filelist.am
@@ -8,6 +8,7 @@ idemm_files_defs = \
libide_docs.xml
idemm_files_hg = \
- application.hg
+ application.hg \
+ recentprojects.hg
idemm_files_ccg = $(idemm_files_hg:.hg=.ccg)
diff --git a/libidemm/src/recentprojects.ccg b/libidemm/src/recentprojects.ccg
new file mode 100644
index 0000000..40843d8
--- /dev/null
+++ b/libidemm/src/recentprojects.ccg
@@ -0,0 +1,17 @@
+/* recentprojects.ccg
+ *
+ * Copyright (C) 2016 Marcin Kolny <marcin kolny gmail com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
diff --git a/libidemm/src/recentprojects.hg b/libidemm/src/recentprojects.hg
new file mode 100644
index 0000000..d9b4e4f
--- /dev/null
+++ b/libidemm/src/recentprojects.hg
@@ -0,0 +1,37 @@
+/* recentprojects.hg
+ *
+ * Copyright (C) 2016 Marcin Kolny <marcin kolny gmail com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <ide.h>
+
+_DEFS(idemm, libide)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Ide {
+
+class RecentProjects : public Glib::Object
+{
+protected:
+ _CLASS_GOBJECT(RecentProjects, IdeRecentProjects, IDE_RECENT_PROJECTS, Glib::Object, GObject)
+ _STRUCT_NOT_HIDDEN
+
+ _WRAP_CTOR(RecentProjects(), ide_recent_projects_new)
+public:
+ _WRAP_CREATE()
+};
+
+}
diff --git a/libidemm/tools/m4/convert_libide.m4 b/libidemm/tools/m4/convert_libide.m4
index 40db454..37e348f 100644
--- a/libidemm/tools/m4/convert_libide.m4
+++ b/libidemm/tools/m4/convert_libide.m4
@@ -35,3 +35,6 @@ _CONVERSION(`gchararray',`const Glib::ustring&',__GCHARP_TO_USTRING)
_CONVERSION(`const gchar*',`const Glib::ustring&',__GCHARP_TO_USTRING)
_CONVERSION(`Glib::ustring&',`const guchar*', ($2)($3.c_str()))
_CONVERSION(`const Glib::ustring&',`gchararray', $3.c_str())
+
+dnl Ide::RecentProjects
+_CONVERSION(`IdeRecentProjects*',`Glib::RefPtr<Ide::RecentProjects>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]