diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gio/src/Makefile_list_of_hg.am_fragment | 4 | ||||
-rw-r--r-- | gio/src/filenamecompleter.ccg | 26 | ||||
-rw-r--r-- | gio/src/filenamecompleter.hg | 54 | ||||
-rw-r--r-- | gio/src/gio_signals.defs | 10 | ||||
-rw-r--r-- | gio/src/themedicon.ccg | 20 | ||||
-rw-r--r-- | gio/src/themedicon.hg | 62 | ||||
-rw-r--r-- | tools/extra_defs_gen/generate_defs_gio.cc | 2 |
8 files changed, 184 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2008-02-04 Murray Cumming <murrayc@murrayc.com> + + * tools/extra_defs_gen/generate_defs_gio.cc: Added types. + * gio/src/gio_signals.defs: Regenerated. + * gio/src/Makefile_list_of_hg.am_fragment: + * gio/src/filenamecompleter.hg: + * gio/src/themedicon.hg: Added FilenameCompleter and ThemedIcon. + 2008-02-03 José Alburquerque <jaalburqu@svn.gnome.org> * gio/src/bufferedoutputstream.ccg: changed size param of diff --git a/gio/src/Makefile_list_of_hg.am_fragment b/gio/src/Makefile_list_of_hg.am_fragment index ee5f4b34..173ac8b3 100644 --- a/gio/src/Makefile_list_of_hg.am_fragment +++ b/gio/src/Makefile_list_of_hg.am_fragment @@ -7,11 +7,11 @@ files_posix_hg = files_win32_hg = files_general_hg = appinfo.hg asyncresult.hg cancellable.hg drive.hg error.hg file.hg fileattributeinfo.hg \ fileattributeinfolist.hg fileenumerator.hg fileicon.hg fileinfo.hg fileinputstream.hg fileoutputstream.hg \ - filemonitor.hg filterinputstream.hg filteroutputstream.hg \ + filemonitor.hg filterinputstream.hg filteroutputstream.hg filenamecompleter.hg \ icon.hg inputstream.hg loadableicon.hg mount.hg mountoperation.hg outputstream.hg \ seekable.hg simpleasyncresult.hg volume.hg volumemonitor.hg bufferedinputstream.hg \ bufferedoutputstream.hg datainputstream.hg dataoutputstream.hg enums.hg \ - memoryinputstream.hg + memoryinputstream.hg themedicon.hg include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment diff --git a/gio/src/filenamecompleter.ccg b/gio/src/filenamecompleter.ccg new file mode 100644 index 00000000..b927b4ad --- /dev/null +++ b/gio/src/filenamecompleter.ccg @@ -0,0 +1,26 @@ +// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- + +/* Copyright (C) 2007 The gtkmm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library 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/file.h> +#include <gio/gio.h> + +namespace Gio { + + +} // namespace Gio diff --git a/gio/src/filenamecompleter.hg b/gio/src/filenamecompleter.hg new file mode 100644 index 00000000..d93b91c8 --- /dev/null +++ b/gio/src/filenamecompleter.hg @@ -0,0 +1,54 @@ +// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- + +/* Copyright (C) 2007 The gtkmm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library 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/file.h> +#include <glibmm/object.h> + +_DEFS(giomm,gio) +_PINCLUDE(glibmm/private/object_p.h) +_PINCLUDE(gio/gio.h) + +namespace Gio +{ + +class File; + +/** Completes partial file and directory names given a partial string by looking in the file system for clues. + * Can return a list of possible completion strings for widget implementation. + * + * @newin2p16 + */ +class FilenameCompleter : public Glib::Object +{ + _CLASS_GOBJECT(FilenameCompleter, GFilenameCompleter, G_FILENAME_COMPLETER, Glib::Object, GObject) +protected: + _CTOR_DEFAULT + _IGNORE(g_filename_completer_new) +public: + _WRAP_CREATE() + + _WRAP_METHOD(std::string get_completion_suffix(const std::string& initial_text) const, g_filename_completer_get_completion_suffix) + _WRAP_METHOD(Glib::StringArrayHandle get_completions(const std::string& initial_text) const, g_filename_completer_get_completions) + _WRAP_METHOD(void set_dirs_only(bool dirs_only = true), g_filename_completer_set_dirs_only) + + _WRAP_SIGNAL(void got_completion_data(), got_completion_data) +}; + +} // namespace Gio + diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs index 7617dade..a0ebd8dc 100644 --- a/gio/src/gio_signals.defs +++ b/gio/src/gio_signals.defs @@ -156,6 +156,14 @@ (construct-only #f) ) +;; From GFilenameCompleter + +(define-signal got-completion-data + (of-object "GFilenameCompleter") + (return-type "void") + (when "last") +) + ;; From GFileInputStream ;; From GFileOutputStream @@ -283,6 +291,8 @@ ;; From GSimpleAsyncResult +;; From GThemedIcon + ;; From GVolume ;; From GVolumeMonitor diff --git a/gio/src/themedicon.ccg b/gio/src/themedicon.ccg new file mode 100644 index 00000000..7a72047f --- /dev/null +++ b/gio/src/themedicon.ccg @@ -0,0 +1,20 @@ +// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- + +/* Copyright (C) 2007 The gtkmm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <gio/gio.h> diff --git a/gio/src/themedicon.hg b/gio/src/themedicon.hg new file mode 100644 index 00000000..24a1762e --- /dev/null +++ b/gio/src/themedicon.hg @@ -0,0 +1,62 @@ +// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- + +/* Copyright (C) 2007 The gtkmm Development Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include <glibmm/object.h> +#include <giomm/file.h> +#include <giomm/icon.h> +#include <giomm/loadableicon.h> + +_DEFS(giomm,gio) +_PINCLUDE(glibmm/private/object_p.h) + +namespace Gio +{ + +/** Icon theming support + * ThemedIcon is an implementation of Gio::Icon that supports icon themes. + * ThemedIcon contains a list of all of the icons present in an icon + * theme, so that icons can be looked up quickly. ThemedIcon does + * not provide actual pixmaps for icons, just the icon names. + * Ideally something like Gtk::IconTheme::choose_icon() should be used to + * resolve the list of names so that fallback icons work nicely with + * themes that inherit other themes. + * + * @newin2p16 + */ +class ThemedIcon +: public Glib::Object, + public Icon +{ + _CLASS_GOBJECT(ThemedIcon, GThemedIcon, G_THEMED_ICON, Glib::Object, GObject) + _IMPLEMENTS_INTERFACE(Icon) + +protected: + _WRAP_CTOR(ThemedIcon(const std::string& iconname), g_themed_icon_new) + +public: + _WRAP_CREATE(const std::string& iconname) + //TODO: GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname); + //TODO: GIcon *g_themed_icon_new_from_names (char **iconnames, int len); + + //TODO: const char * const *g_themed_icon_get_names (GThemedIcon *icon); + + //There are no signals or properties. +}; + +} // namespace Gio diff --git a/tools/extra_defs_gen/generate_defs_gio.cc b/tools/extra_defs_gen/generate_defs_gio.cc index b17e24d8..7560373c 100644 --- a/tools/extra_defs_gen/generate_defs_gio.cc +++ b/tools/extra_defs_gen/generate_defs_gio.cc @@ -37,6 +37,7 @@ int main (int argc, char** argv) << get_defs(G_TYPE_FILE_INFO) << get_defs(G_TYPE_FILE_ICON) << get_defs(G_TYPE_FILE_MONITOR) + << get_defs(G_TYPE_FILENAME_COMPLETER) // << get_defs(G_TYPE_FILE_ATTRIBUTE_INFO_LIST) // << get_defs(G_TYPE_FILE_ATTRIBUTE_MATCHER) << get_defs(G_TYPE_FILE_INPUT_STREAM) @@ -52,6 +53,7 @@ int main (int argc, char** argv) << get_defs(G_TYPE_MOUNT_OPERATION) << get_defs(G_TYPE_SEEKABLE) << get_defs(G_TYPE_SIMPLE_ASYNC_RESULT) + << get_defs(G_TYPE_THEMED_ICON) //TODO: This causes a g_warning: //GLib-GObject-CRITICAL **: g_param_spec_pool_list: assertion `pool != NULL' failed" |