diff --git a/ChangeLog b/ChangeLog index 879574654d3795c01187c12798536f1c111b762c..6d549111fae565205cbc39f8f3050a94484ea721 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-11-01 Murray Cumming + + * gtk/src/: Added wrappers for FileChooser, FileChooserWidget, + FileChooserDialog and FileFilter. FileChooser is an interface + but I see no way to override it. + * Wrapped some more signals and vfuncs. + 2003-10-31 Murray Cumming * docs/index.html: Corrected links to glibmm docs, using relative diff --git a/NEWS b/NEWS index 88766444d64808d2d3c3f4eb07bc4a8ea1707f11..588a83283a34e1a457b4c93d1cc0f3bc7be28426 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ - ToggleAction::create() has extra bool is_active parameter. * Gtk::Menu::AccelKey is now Gtk::AccelKey * AccelGroup: Now takes +* Gtk::MessageDialog: Added set_markup(). +* Added Gtk::FileChooser (interface), FileChooserWidget, FileChooserDialog, FileFilter. + 2.3.0: diff --git a/configure.in b/configure.in index 587207c304ddaa398ce34f4e486288282cc184cd..1ab9380a56f3d7a58c70499974641733d447c4ba 100644 --- a/configure.in +++ b/configure.in @@ -116,7 +116,7 @@ AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked]) ######################################################################### # Dependancy checks ######################################################################### -gtkmm_min_glibmm_version=2.3.1 +gtkmm_min_glibmm_version=2.3.2 gtkmm_min_gtk_version=2.3.0 diff --git a/gtk/src/Makefile_list_of_hg.am_fragment b/gtk/src/Makefile_list_of_hg.am_fragment index 430a139703a1a32df8055f1a23c094af459f98fc..a454e86ad39bc422facfbf05e2825c8e36892e56 100644 --- a/gtk/src/Makefile_list_of_hg.am_fragment +++ b/gtk/src/Makefile_list_of_hg.am_fragment @@ -12,7 +12,8 @@ files_general_hg = accelgroup.hg accellabel.hg action.hg actiongroup.hg adjustme checkbutton.hg checkmenuitem.hg clipboard.hg colorselection.hg colorbutton.hg \ combo.hg combobox.hg comboboxentry.hg container.hg curve.hg \ dialog.hg drawingarea.hg \ - editable.hg entry.hg entrycompletion.hg enums.hg eventbox.hg expander.hg\ + editable.hg entry.hg entrycompletion.hg enums.hg eventbox.hg expander.hg \ + filechooser.hg filechooserwidget.hg filechooserdialog.hg filefilter.hg \ fileselection.hg fixed.hg fontbutton.hg fontselection.hg frame.hg \ handlebox.hg \ iconfactory.hg iconset.hg iconsource.hg image.hg imagemenuitem.hg inputdialog.hg invisible.hg item.hg \ diff --git a/gtk/src/accelgroup.hg b/gtk/src/accelgroup.hg index 77609b0f4d745e6a41a24e017fb529f64f1877bd..3416862d6921841978e7f08f4121b68ccc547d42 100644 --- a/gtk/src/accelgroup.hg +++ b/gtk/src/accelgroup.hg @@ -100,7 +100,10 @@ public: _WRAP_METHOD(static bool activate(Gtk::Object& object, guint accel_key, Gdk::ModifierType accel_mods), gtk_accel_groups_activate) - _WRAP_SIGNAL(void accel_changed(guint keyval, GdkModifierType modifier, GClosure* accel_closure), "accel_changed") + //TODO: Discover real parameter names: + _WRAP_SIGNAL(bool accel_activate(const Glib::RefPtr& object, guint param2, Gdk::ModifierType param3), "accel_activate", no_default_handler) + //TODO: The C type is unpleasant: + _WRAP_SIGNAL(void accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure), "accel_changed") }; } // namespace Gtk diff --git a/gtk/src/action.hg b/gtk/src/action.hg index 7ebcb6a71318a18d9651714bd7b66affd556987b..6cf007edd2367ecadd6b84dceea60fa3f7fbc18a 100644 --- a/gtk/src/action.hg +++ b/gtk/src/action.hg @@ -52,7 +52,9 @@ public: /// For instance, void on_activate(); typedef SigC::Slot0 SlotActivate; _WRAP_SIGNAL(void activate(), "activate") - //TODO: There are other signals, without default signal handlers. + + _WRAP_SIGNAL(void connect_proxy(Widget* proxy), "connect_proxy", no_default_handler) + _WRAP_SIGNAL(void disconnect_proxy(Widget* proxy), "disconnect_proxy", no_default_handler) //Used by AccelGroup: _WRAP_METHOD(void set_accel_path(const Glib::ustring& accel_path), gtk_action_set_accel_path) @@ -68,7 +70,7 @@ protected: _WRAP_VFUNC(Widget* create_menu_item(), "create_menu_item") _WRAP_VFUNC(Widget* create_tool_item(), "create_tool_item") _WRAP_VFUNC(void connect_proxy(Widget* proxy), "connect_proxy") - _WRAP_VFUNC(void disconnect_proxy(Widget* proxy), "disconnect_proxy") + _WRAP_VFUNC(void disconnect_proxy(Widget* proxy), "disconnect_proxy") }; } // namespace Gtk diff --git a/gtk/src/actiongroup.hg b/gtk/src/actiongroup.hg index 3f49e588a9e0aba3f46fc5ee4b02af8cd64cdaaf..3012d5d88cb1627d0abe364690fdf5b69fb5a5d7 100644 --- a/gtk/src/actiongroup.hg +++ b/gtk/src/actiongroup.hg @@ -41,13 +41,15 @@ public: //TODO: Const version: _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr > list_actions(), gtk_action_group_list_actions) _WRAP_METHOD(void add_action(const Glib::RefPtr& action), gtk_action_group_add_action) - + + //TODO: Could this whole class have an STL-style interface? + //TODO: rename to push_back() instead? void add_action(const Glib::RefPtr& action, const Action::SlotActivate& slot); void add_action(const Glib::RefPtr& action, const AccelKey& accel_key, const Action::SlotActivate& slot); _WRAP_METHOD(void remove_action(const Glib::RefPtr& action), gtk_action_group_remove_action) -//TODO: _WRAP_METHOD(void add_actions(GtkActionEntry *entries, guint n_entries, gpointer user_data), gtk_action_group_add_actions) +//TODO: _WRAP_METHOD(void add_actions(GtkActionEntry* entries, guint n_entries, gpointer user_data), gtk_action_group_add_actions) //TODO: _WRAP_METHOD(void add_toggle_actions(GtkToggleActionEntry *entries, guint n_entries, gpointer user_data), gtk_action_group_add_toggle_actions) //TODO: _WRAP_METHOD(void add_radio_actions(GtkRadioActionEntry *entries, guint n_entries, int value, GCallback on_change, gpointer user_data), gtk_action_group_add_radio_actions), gtk_action_group_add_radio_actions) //TODO: _WRAP_METHOD(void add_actions_full(GtkActionEntry* entries, guint n_entries, gpointer user_data, GDestroyNotify destroy), gtk_action_group_add_actions_full) diff --git a/gtk/src/calendar.hg b/gtk/src/calendar.hg index 2dfb4d62368a48a952dbd55572707bbe2872d3d6..75694070cc3d8769c5036f0f9133c025100cac5e 100644 --- a/gtk/src/calendar.hg +++ b/gtk/src/calendar.hg @@ -39,7 +39,7 @@ _WRAP_ENUM(CalendarDisplayOptions, GtkCalendarDisplayOptions) * using select_day(). * * The way in which the calendar itself is displayed can be altered using - * display_options(). + * set_display_options(). * * The selected date can be retrieved from a GtkCalendar using get_date(). * @@ -52,10 +52,8 @@ class Calendar : public Widget { _CLASS_GTKOBJECT(Calendar,GtkCalendar,GTK_CALENDAR,Gtk::Widget,GtkWidget) public: - _CTOR_DEFAULT - _WRAP_METHOD(int select_month(guint month, guint year), gtk_calendar_select_month) _WRAP_METHOD(void select_day(guint day), gtk_calendar_select_day) _WRAP_METHOD(int mark_day(guint day), gtk_calendar_mark_day) diff --git a/gtk/src/cellrenderer.hg b/gtk/src/cellrenderer.hg index a20811f64d16219f2a970db0908b7ba585c2e123..341d44de021af373f7fc31ce6c2930f632bfcc31 100644 --- a/gtk/src/cellrenderer.hg +++ b/gtk/src/cellrenderer.hg @@ -32,7 +32,7 @@ namespace Gtk _CC_INCLUDE(gtk/gtktypebuiltins.h) _WRAP_ENUM(CellRendererState, GtkCellRendererState) - _WRAP_ENUM(CellRendererMode, GtkCellRendererMode) +_WRAP_ENUM(CellRendererMode, GtkCellRendererMode) /** CellRenderers are used by Gtk::TreeView columns to render the Gtk::TreeModel column data appropriately. * They display, and allow editing of, the values of their _property_renderable() properties. diff --git a/gtk/src/dialog.hg b/gtk/src/dialog.hg index 88712115f7422f03dc06c4661a88e0b59c46740a..266a2de823d2cc749157753b91fc9ff647dea4d3 100644 --- a/gtk/src/dialog.hg +++ b/gtk/src/dialog.hg @@ -91,8 +91,6 @@ public: _WRAP_PROPERTY("has_separator", bool) _WRAP_SIGNAL(void response(int response_id), "response") - //_WRAP_SIGNAL(void response(int response_id), "response", custom_default_handler) - _IGNORE_SIGNAL("close") diff --git a/gtk/src/entrycompletion.ccg b/gtk/src/entrycompletion.ccg index 895ce86fce8e16be4053e8572584040b44f34a5b..83b989d5f36f4f44126c71ab79d4fe0f6d39c49a 100644 --- a/gtk/src/entrycompletion.ccg +++ b/gtk/src/entrycompletion.ccg @@ -18,6 +18,7 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include #include diff --git a/gtk/src/entrycompletion.hg b/gtk/src/entrycompletion.hg index 3177247d4c3834b9de330e094e86d8a20d0a5d8f..d60ba89d24a4057fed8cfe705531ca92d3d52afa 100644 --- a/gtk/src/entrycompletion.hg +++ b/gtk/src/entrycompletion.hg @@ -57,6 +57,11 @@ public: _WRAP_METHOD(void set_text_column(int column), gtk_entry_completion_set_text_column) + //TODO: The C++ iterator needs to know about the model. We need some custom stuff here. + //but I think I've done it elsewhere. murrayc: + //_WRAP_SIGNAL(bool match_selected(const Glib::RefPtr& model, const TreeModel::iterator& iter), match_selected) + _WRAP_SIGNAL(void action_activated(int index), action_activated) + }; diff --git a/gtk/src/expander.ccg b/gtk/src/expander.ccg index fc989e71b9fd649da4da5b5151e57793b2514a28..db3406c0afda3b271af671349ac83a52ebfa7045 100644 --- a/gtk/src/expander.ccg +++ b/gtk/src/expander.ccg @@ -3,7 +3,7 @@ /* * - * Copyright 1998-2002 The gtkmm Development Team + * Copyright 2003 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 diff --git a/gtk/src/expander.hg b/gtk/src/expander.hg index 2a3362ab474ff4f653f06cf02e3a4e32454999d7..b7cde120058cf47c3ec999bf8235ae823160a08f 100644 --- a/gtk/src/expander.hg +++ b/gtk/src/expander.hg @@ -1,8 +1,8 @@ /* $Id$ */ -/* box.h +/* expander.h * - * Copyright (C) 1998-2002 The gtkmm Development Team + * Copyright (C) 2003 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 diff --git a/gtk/src/filechooser.ccg b/gtk/src/filechooser.ccg new file mode 100644 index 0000000000000000000000000000000000000000..3b22707c44aa1c9c10bb14bfc5084369addadc3e --- /dev/null +++ b/gtk/src/filechooser.ccg @@ -0,0 +1,22 @@ +// -*- c++ -*- +/* $Id$ */ + +/* Copyright 2003 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 + diff --git a/gtk/src/filechooser.hg b/gtk/src/filechooser.hg new file mode 100644 index 0000000000000000000000000000000000000000..aecfc61cd274bdad5d82b86e9e0da759d52d5622 --- /dev/null +++ b/gtk/src/filechooser.hg @@ -0,0 +1,134 @@ +/* $Id$ */ + +/* Copyright (C) 2003 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 +#include +#include + + +#include //TODO: Remove C header. +_DEFS(gtkmm,gtk) +_PINCLUDE(glibmm/private/interface_p.h) + + +namespace Gtk +{ + +_WRAP_ENUM(FileChooserAction, GtkFileChooserAction) + +/** + * + */ +class FileChooser : public Glib::Interface +{ + _CLASS_INTERFACE(FileChooser, GtkFileChooser, GTK_FILE_CHOOSER, GtkFileChooserClass) +public: + + _WRAP_METHOD(void set_action(FileChooserAction action), gtk_file_chooser_set_action) + _WRAP_METHOD(FileChooserAction get_action() const, gtk_file_chooser_get_action) + _WRAP_METHOD(void set_folder_mode(bool folder_mode = true), gtk_file_chooser_set_folder_mode) + _WRAP_METHOD(bool get_folder_mode() const, gtk_file_chooser_get_folder_mode) + _WRAP_METHOD(void set_local_only(bool files_only = true), gtk_file_chooser_set_local_only) + _WRAP_METHOD(bool get_local_only() const, gtk_file_chooser_get_local_only) + _WRAP_METHOD(void set_select_multiple(bool select_multiple = true), gtk_file_chooser_set_select_multiple) + _WRAP_METHOD(bool get_select_multiple() const, gtk_file_chooser_get_select_multiple) + + _WRAP_METHOD(void set_current_name(const Glib::ustring& name), gtk_file_chooser_set_current_name) + _WRAP_METHOD(Glib::ustring get_filename() const, gtk_file_chooser_get_filename) + _WRAP_METHOD(void set_filename(const Glib::ustring& filename), gtk_file_chooser_set_filename) + _WRAP_METHOD(void select_filename(const Glib::ustring& filename), gtk_file_chooser_select_filename) + _WRAP_METHOD(void unselect_filename(const Glib::ustring& filename), gtk_file_chooser_unselect_filename) + _WRAP_METHOD(void select_all(), gtk_file_chooser_select_all) + _WRAP_METHOD(void unselect_all(), gtk_file_chooser_unselect_all) + _WRAP_METHOD(Glib::SListHandle get_filenames () const, gtk_file_chooser_get_filenames) + _WRAP_METHOD(void set_current_folder(const Glib::ustring& filename), gtk_file_chooser_set_current_folder) + _WRAP_METHOD(Glib::ustring get_current_folder() const, gtk_file_chooser_get_current_folder) + + +/* URI manipulation + */ + _WRAP_METHOD(Glib::ustring get_uri() const, gtk_file_chooser_get_uri) + _WRAP_METHOD(void set_uri(const Glib::ustring& uri), gtk_file_chooser_set_uri) + _WRAP_METHOD(void select_uri(const Glib::ustring& uri), gtk_file_chooser_select_uri) + _WRAP_METHOD(void unselect_uri(const Glib::ustring& uri), gtk_file_chooser_unselect_uri) + _WRAP_METHOD(GSList* get_uris() const, gtk_file_chooser_get_uris) + + _WRAP_METHOD(void set_current_folder_uri(const Glib::ustring& uri), gtk_file_chooser_set_current_folder_uri) + _WRAP_METHOD(Glib::ustring get_current_folder_uri() const, gtk_file_chooser_get_current_folder_uri) + +/* Preview widget + */ + _WRAP_METHOD(void set_preview_widget(Gtk::Widget& preview_widget), gtk_file_chooser_set_preview_widget) + _WRAP_METHOD(const Gtk::Widget* get_preview_widget() const, gtk_file_chooser_get_preview_widget) + _WRAP_METHOD(Gtk::Widget* get_preview_widget(), gtk_file_chooser_get_preview_widget) + _WRAP_METHOD(void set_preview_widget_active(bool active = true), gtk_file_chooser_set_preview_widget_active) + _WRAP_METHOD(bool get_preview_widget_active() const, gtk_file_chooser_get_preview_widget_active) + + _WRAP_METHOD(Glib::ustring get_preview_filename() const, gtk_file_chooser_get_preview_filename) + _WRAP_METHOD(Glib::ustring get_preview_uri() const, gtk_file_chooser_get_preview_uri) + +/* Extra widget + */ + _WRAP_METHOD(void set_extra_widget(Gtk::Widget& extra_widget), gtk_file_chooser_set_extra_widget) + _WRAP_METHOD(Gtk::Widget* get_extra_widget(), gtk_file_chooser_get_extra_widget) + _WRAP_METHOD(const Gtk::Widget* get_extra_widget() const, gtk_file_chooser_get_extra_widget) + +/* List of user selectable filters + */ +//TODO: _WRAP_METHOD(void add_filter(GtkFileFilter* filter), gtk_file_chooser_add_filter) +//TODO: _WRAP_METHOD(void remove_filter (GtkFileFilter* filter), gtk_file_chooser_remove_filter) +//TODO: _WRAP_METHOD(GSList* list_filters() const, gtk_file_chooser_list_filters) + +/* Current filter + */ +//TODO: _WRAP_METHOD(void set_filter(FileFilter* filter), gtk_file_chooser_set_filter) +//TODO: _WRAP_METHOD(Glib::RefPtr get_filter() const, gtk_file_chooser_get_filter) + +/* Per-application shortcut folders */ + + _WRAP_METHOD(bool add_shortcut_folder(const Glib::ustring& folder), gtk_file_chooser_add_shortcut_folder, errthrow) + _WRAP_METHOD(bool remove_shortcut_folder(const Glib::ustring& folder), gtk_file_chooser_remove_shortcut_folder, errthrow) + _WRAP_METHOD(Glib::SListHandle list_shortcut_folders() const, gtk_file_chooser_list_shortcut_folders) + + _WRAP_METHOD(bool add_shortcut_folder_uri(const Glib::ustring& folder), gtk_file_chooser_add_shortcut_folder_uri, errthrow) + _WRAP_METHOD(bool remove_shortcut_folder_uri(const Glib::ustring& folder), gtk_file_chooser_remove_shortcut_folder_uri, errthrow) + _WRAP_METHOD(Glib::SListHandle list_shortcut_folder_uris() const, gtk_file_chooser_list_shortcut_folder_uris) + + + //TODO: _WRAP_SIGNAL(void current_folder_changed(), "current_folder_changed") + //TODO: _WRAP_SIGNAL(void selection_changed(), "selection_changed") + //TODO: _WRAP_SIGNAL(void update_preview(), "update_preview") + //TODO: _WRAP_SIGNAL(void file_activated(), "file_activated") + + _WRAP_PROPERTY("action", FileChooserAction) + //_WRAP_PROPERTY("file-system", FileSystem) //construct-only + _WRAP_PROPERTY("filter", FileFilter*) //TODO: Use RefPtr? + _WRAP_PROPERTY("folder-mode", bool) + _WRAP_PROPERTY("local-only", bool) + _WRAP_PROPERTY("preview-widget", Widget*) //TODO: Use RefPtr? + _WRAP_PROPERTY("preview-widget-active", bool) + _WRAP_PROPERTY("extra-widget", Widget*) //TODO: Use RefPtr? + _WRAP_PROPERTY("select-multiple", bool) + _WRAP_PROPERTY("show-hidden", bool) + + //TODO: vfuncs +}; + +} // namespace Gtk + diff --git a/gtk/src/filechooserdialog.ccg b/gtk/src/filechooserdialog.ccg new file mode 100644 index 0000000000000000000000000000000000000000..4d8dab08f9f4dc4ad17dc5427d285678947166ee --- /dev/null +++ b/gtk/src/filechooserdialog.ccg @@ -0,0 +1,44 @@ +// -*- c++ -*- +/* $Id$ */ + +/* + * + * Copyright 2003 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 + + +namespace Gtk +{ + +FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action) +: + _CONSTRUCT("title", title.c_str(), "action", (GtkFileChooserAction)action) +{ +} + +FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action) +: + _CONSTRUCT("title", title.c_str(), "action", (GtkFileChooserAction)action) +{ + set_transient_for(parent); +} + + +} // namespace Gtk + diff --git a/gtk/src/filechooserdialog.hg b/gtk/src/filechooserdialog.hg new file mode 100644 index 0000000000000000000000000000000000000000..c61c5100ae2d93e02673367c83b6da0002a4bd2d --- /dev/null +++ b/gtk/src/filechooserdialog.hg @@ -0,0 +1,49 @@ +/* $Id$ */ + +/* filechooserdialog.h + * + * Copyright (C) 1998-2002 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 +#include + +_DEFS(gtkmm,gtk) +_PINCLUDE(gtkmm/private/dialog_p.h) + +namespace Gtk +{ + +/** Convenient file chooser window. + * + * @ingroup Dialogs + */ +class FileChooserDialog + : public Dialog, + public FileChooser +{ + _CLASS_GTKOBJECT(FileChooserDialog, GtkFileChooserDialog, GTK_FILE_CHOOSER_DIALOG, Gtk::Dialog, GtkDialog) + _IMPLEMENTS_INTERFACE(FileChooser) + _UNMANAGEABLE +public: + explicit FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action); + explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action); + _IGNORE(gtk_file_chooser_dialog_new) +}; + +} // namespace Gtk + diff --git a/gtk/src/filechooserwidget.ccg b/gtk/src/filechooserwidget.ccg new file mode 100644 index 0000000000000000000000000000000000000000..09c2ce3e30d0bf677ef32e441a41ccaf88f0e928 --- /dev/null +++ b/gtk/src/filechooserwidget.ccg @@ -0,0 +1,30 @@ +// -*- c++ -*- +/* $Id$ */ + +/* + * + * Copyright 1998-2002 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 + +namespace Gtk +{ + + +} // namespace Gtk + diff --git a/gtk/src/filechooserwidget.hg b/gtk/src/filechooserwidget.hg new file mode 100644 index 0000000000000000000000000000000000000000..1ae742b44145f1118e5fe7d1dd6a44b929725088 --- /dev/null +++ b/gtk/src/filechooserwidget.hg @@ -0,0 +1,48 @@ +/* $Id$ */ + +/* box.h + * + * Copyright (C) 1998-2002 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 +#include + +_DEFS(gtkmm,gtk) +_PINCLUDE(gtkmm/private/box_p.h) + + +namespace Gtk +{ + +/** + * + * @ingroup Widgets + */ +class FileChooserWidget +: public VBox, + public FileChooser +{ + _CLASS_GTKOBJECT(FileChooserWidget, GtkFileChooserWidget, GTK_FILE_CHOOSER_WIDGET, Gtk::VBox, GtkVBox) + _IMPLEMENTS_INTERFACE(FileChooser) +public: + _CTOR_DEFAULT; + _WRAP_CTOR(FileChooserWidget(FileChooserAction action), gtk_file_chooser_widget_new) +}; + +} // namespace Gtk + diff --git a/gtk/src/filefilter.ccg b/gtk/src/filefilter.ccg new file mode 100644 index 0000000000000000000000000000000000000000..904c2c6998221df72fa49a930a4ce9853bee8b55 --- /dev/null +++ b/gtk/src/filefilter.ccg @@ -0,0 +1,28 @@ +// -*- c++ -*- +/* $Id$ */ + +/* Copyright 2003 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 + + +namespace Gtk +{ + +} // namespace Gtk + diff --git a/gtk/src/filefilter.hg b/gtk/src/filefilter.hg new file mode 100644 index 0000000000000000000000000000000000000000..8fd5f60df01f24d4dc7e1c37a5fcb80364f373e5 --- /dev/null +++ b/gtk/src/filefilter.hg @@ -0,0 +1,54 @@ +/* $Id$ */ + +/* Copyright (C) 2003 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 +#include +#include + +_DEFS(gtkmm,gtk) +_PINCLUDE(glibmm/private/object_p.h) + + +namespace Gtk +{ + +_WRAP_ENUM(FileFilterFlags, GtkFileFilterFlags) + +class FileFilter : public Glib::Object +{ + _CLASS_GOBJECT(FileFilter, GtkFileFilter, GTK_FILE_FILTER, Glib::Object, GObject) + _CTOR_DEFAULT +public: + _WRAP_CREATE() + + _WRAP_METHOD(void set_name(const Glib::ustring& name), gtk_file_filter_set_name) + _WRAP_METHOD(Glib::ustring get_name() const, gtk_file_filter_get_name) + + _WRAP_METHOD(void add_mime_type(const Glib::ustring& mime_type), gtk_file_filter_add_mime_type) + _WRAP_METHOD(void add_pattern(const Glib::ustring& pattern), gtk_file_filter_add_pattern) +//TODO: _WRAP_METHOD(void add_custom(FileFilterFlags needed, GtkFileFilterFunc func, gpointer data, GDestroyNotify notify), gtk_file_filter_add_custom) + + _WRAP_METHOD(FileFilterFlags get_needed() const, gtk_file_filter_get_needed) +//TODO: _WRAP_METHOD(bool filter(const GtkFileFilterInfo* filter_info), gtk_file_filter_filter) + + //TODO: Properties and signals and vfuncs. +}; + +} // namespace Gtk + diff --git a/gtk/src/gtk_enums.defs b/gtk/src/gtk_enums.defs index d66f446f07ebf19755dbd4472731d2775c7f9928..956664cfd425db5f62c6fc3ddb5856b55466a787 100644 --- a/gtk/src/gtk_enums.defs +++ b/gtk/src/gtk_enums.defs @@ -571,6 +571,7 @@ ) ) + ;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkicontheme.h (define-enum-extended IconLookupFlags @@ -589,6 +590,116 @@ ) ) + +;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilechooser.h + +(define-enum-extended FileChooserAction + (in-module "Gtk") + (c-name "GtkFileChooserAction") + (values + '("open" "GTK_FILE_CHOOSER_ACTION_OPEN" "0") + '("save" "GTK_FILE_CHOOSER_ACTION_SAVE" "1") + ) +) + +(define-enum-extended FileChooserError + (in-module "Gtk") + (c-name "GtkFileChooserError") + (values + '("nonexistent" "GTK_FILE_CHOOSER_ERROR_NONEXISTENT" "0") + '("bad-filename" "GTK_FILE_CHOOSER_ERROR_BAD_FILENAME" "1") + ) +) + +;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilechooserutils.h + +(define-flags-extended FileChooserProp + (in-module "Gtk") + (c-name "GtkFileChooserProp") + (values + '("first" "GTK_FILE_CHOOSER_PROP_FIRST" "0x1000") + '("action" "GTK_FILE_CHOOSER_PROP_ACTION" "0x1000") + '("file-system" "GTK_FILE_CHOOSER_PROP_FILE_SYSTEM" "1") + '("filter" "GTK_FILE_CHOOSER_PROP_FILTER" "2") + '("folder-mode" "GTK_FILE_CHOOSER_PROP_FOLDER_MODE" "3") + '("local-only" "GTK_FILE_CHOOSER_PROP_LOCAL_ONLY" "4") + '("preview-widget" "GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET" "5") + '("preview-widget-active" "GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET_ACTIVE" "6") + '("extra-widget" "GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET" "7") + '("select-multiple" "GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE" "8") + '("show-hidden" "GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN" "9") + '("last" "GTK_FILE_CHOOSER_PROP_LAST" "0x9") + ) +) + +;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilefilter.h + +(define-flags-extended FileFilterFlags + (in-module "Gtk") + (c-name "GtkFileFilterFlags") + (values + '("filename" "GTK_FILE_FILTER_FILENAME" "1 << 0") + '("uri" "GTK_FILE_FILTER_URI" "1 << 1") + '("display-name" "GTK_FILE_FILTER_DISPLAY_NAME" "1 << 2") + '("mime-type" "GTK_FILE_FILTER_MIME_TYPE" "1 << 3") + ) +) + +;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilesystem.h + +(define-flags-extended FileInfoType + (in-module "Gtk") + (c-name "GtkFileInfoType") + (values + '("display-name" "GTK_FILE_INFO_DISPLAY_NAME" "1 << 0") + '("is-folder" "GTK_FILE_INFO_IS_FOLDER" "1 << 1") + '("is-hidden" "GTK_FILE_INFO_IS_HIDDEN" "1 << 2") + '("mime-type" "GTK_FILE_INFO_MIME_TYPE" "1 << 3") + '("modification-time" "GTK_FILE_INFO_MODIFICATION_TIME" "1 << 4") + '("size" "GTK_FILE_INFO_SIZE" "1 << 5") + '("icon" "GTK_FILE_INFO_ICON" "1 << 6") + ) +) + +(define-enum-extended FileIconType + (in-module "Gtk") + (c-name "GtkFileIconType") + (values + '("regular" "GTK_FILE_ICON_REGULAR" "0") + '("block-device" "GTK_FILE_ICON_BLOCK_DEVICE" "1") + '("broken-symbolic-link" "GTK_FILE_ICON_BROKEN_SYMBOLIC_LINK" "2") + '("character-device" "GTK_FILE_ICON_CHARACTER_DEVICE" "3") + '("directory" "GTK_FILE_ICON_DIRECTORY" "4") + '("executable" "GTK_FILE_ICON_EXECUTABLE" "5") + '("fifo" "GTK_FILE_ICON_FIFO" "6") + '("socket" "GTK_FILE_ICON_SOCKET" "7") + ) +) + +(define-enum-extended FileSystemError + (in-module "Gtk") + (c-name "GtkFileSystemError") + (values + '("nonexistent" "GTK_FILE_SYSTEM_ERROR_NONEXISTENT" "0") + '("not-folder" "GTK_FILE_SYSTEM_ERROR_NOT_FOLDER" "1") + '("invalid-uri" "GTK_FILE_SYSTEM_ERROR_INVALID_URI" "2") + '("bad-filename" "GTK_FILE_SYSTEM_ERROR_BAD_FILENAME" "3") + '("failed" "GTK_FILE_SYSTEM_ERROR_FAILED" "4") + ) +) + +;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkfilesystemmodel.h + +(define-enum-extended FileSystemModelColumns + (in-module "Gtk") + (c-name "GtkFileSystemModelColumns") + (values + '("info" "GTK_FILE_SYSTEM_MODEL_INFO" "0") + '("display-name" "GTK_FILE_SYSTEM_MODEL_DISPLAY_NAME" "1") + '("n-columns" "GTK_FILE_SYSTEM_MODEL_N_COLUMNS" "2") + ) +) + ;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkiconthemeparser.h (define-enum-extended IconThemeFileParseError diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs index 4b5bd856d75ad3b9aca6d26a82326c1d3dd1950e..3554e5b1ab6c9a752b4284d252eb6e546386f4c8 100644 --- a/gtk/src/gtk_methods.defs +++ b/gtk/src/gtk_methods.defs @@ -12713,6 +12713,15 @@ (varargs #t) ) +(define-method set_markup + (of-object "GtkMessageDialog") + (c-name "gtk_message_dialog_set_markup") + (return-type "none") + (parameters + '("const-gchar*" "str") + ) +) + ;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtkmisc.h @@ -15333,6 +15342,21 @@ (return-type "GtkToolItem*") ) +(define-method get_draw + (of-object "GtkSeparatorToolItem") + (c-name "gtk_separator_tool_item_get_draw") + (return-type "gboolean") +) + +(define-method set_draw + (of-object "GtkSeparatorToolItem") + (c-name "gtk_separator_tool_item_set_draw") + (return-type "none") + (parameters + '("gboolean" "draw") + ) +) + ;; From /home/murrayc/cvs/gnome26/gtk+/gtk/gtksettings.h @@ -20912,6 +20936,12 @@ ) ) +(define-method get_show_arrow + (of-object "GtkToolbar") + (c-name "gtk_toolbar_get_show_arrow") + (return-type "gboolean") +) + (define-method set_show_arrow (of-object "GtkToolbar") (c-name "gtk_toolbar_set_show_arrow") @@ -20921,6 +20951,12 @@ ) ) +(define-method get_orientation + (of-object "GtkToolbar") + (c-name "gtk_toolbar_get_orientation") + (return-type "GtkOrientation") +) + (define-method set_orientation (of-object "GtkToolbar") (c-name "gtk_toolbar_set_orientation") @@ -20930,6 +20966,12 @@ ) ) +(define-method get_tooltips + (of-object "GtkToolbar") + (c-name "gtk_toolbar_get_tooltips") + (return-type "gboolean") +) + (define-method set_tooltips (of-object "GtkToolbar") (c-name "gtk_toolbar_set_tooltips") @@ -20939,42 +20981,12 @@ ) ) -(define-method get_show_arrow - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_show_arrow") - (return-type "gboolean") -) - -(define-method get_orientation - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_orientation") - (return-type "GtkOrientation") -) - (define-method get_style (of-object "GtkToolbar") (c-name "gtk_toolbar_get_style") (return-type "GtkToolbarStyle") ) -(define-method get_icon_size - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_icon_size") - (return-type "GtkIconSize") -) - -(define-method get_tooltips - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_tooltips") - (return-type "gboolean") -) - -(define-method get_relief_style - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_relief_style") - (return-type "GtkReliefStyle") -) - (define-method set_style (of-object "GtkToolbar") (c-name "gtk_toolbar_set_style") @@ -20990,6 +21002,18 @@ (return-type "none") ) +(define-method get_icon_size + (of-object "GtkToolbar") + (c-name "gtk_toolbar_get_icon_size") + (return-type "GtkIconSize") +) + +(define-method get_relief_style + (of-object "GtkToolbar") + (c-name "gtk_toolbar_get_relief_style") + (return-type "GtkReliefStyle") +) + (define-method get_drop_index (of-object "GtkToolbar") (c-name "gtk_toolbar_get_drop_index") @@ -21000,24 +21024,16 @@ ) ) -(define-method highlight_drop_location +(define-method set_drop_highlight_item (of-object "GtkToolbar") - (c-name "gtk_toolbar_highlight_drop_location") + (c-name "gtk_toolbar_set_drop_highlight_item") (return-type "none") (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") + '("GtkToolItem*" "tool_item") + '("gint" "index") ) ) -(define-method unhighlight_drop_location - (of-object "GtkToolbar") - (c-name "gtk_toolbar_unhighlight_drop_location") - (return-type "none") -) - (define-function _gtk_toolbar_elide_underscores (c-name "_gtk_toolbar_elide_underscores") (return-type "gchar*") @@ -21364,21 +21380,6 @@ (return-type "gboolean") ) -(define-method set_pack_end - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_pack_end") - (return-type "none") - (parameters - '("gboolean" "pack_end") - ) -) - -(define-method get_pack_end - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_pack_end") - (return-type "gboolean") -) - (define-method set_tooltip (of-object "GtkToolItem") (c-name "gtk_tool_item_set_tooltip") @@ -26507,6 +26508,18 @@ (return-type "GdkScreen*") ) +(define-method is_active + (of-object "GtkWindow") + (c-name "gtk_window_is_active") + (return-type "gboolean") +) + +(define-method has_toplevel_focus + (of-object "GtkWindow") + (c-name "gtk_window_has_toplevel_focus") + (return-type "gboolean") +) + (define-method set_has_frame (of-object "GtkWindow") (c-name "gtk_window_set_has_frame") diff --git a/gtk/src/gtk_other.defs b/gtk/src/gtk_other.defs index 14acd94087646db1cc16843c33fc7e8eb556e54a..072cee304faaf1c3b37bed8da9e5e52f515607a7 100644 --- a/gtk/src/gtk_other.defs +++ b/gtk/src/gtk_other.defs @@ -1,5 +1,5 @@ -; GtkCellEditable: +; GtkCellEditable (written by hand because we can't instantiate an interface): (define-signal editing_done (of-object "GtkCellEditable") @@ -41,7 +41,7 @@ (when "last") ) -; GtkTreeModel: +; GtkTreeModel (written by hand because we can't instantiate an interface): (define-signal row_changed (of-object "GtkTreeModel") @@ -93,7 +93,7 @@ ) ) -;; GtkTreeSortable: +;; GtkTreeSortable (written by hand because we can't instantiate an interface): (define-signal sort_column_changed (of-object "GtkTreeSortable") @@ -157,3 +157,108 @@ (construct-only #f) ) +; GtkFileChooser (written by hand because we can't instantiate an interface): + +(define-signal current_folder_changed + (of-object "GtkFileChooser") + (return-type "void") + (when "last") +) + +(define-signal selection_changed + (of-object "GtkFileChooser") + (return-type "void") + (when "last") +) + +(define-signal update_preview + (of-object "GtkFileChooser") + (return-type "void") + (when "last") +) + +(define-signal file_activated + (of-object "GtkFileChooser") + (return-type "void") + (when "last") +) + +(define-property action + (of-object "GtkFileChooser") + (prop-type "GtkFileChooserAction") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property file-system + (of-object "GtkFileChooser") + (prop-type "GtkFileSystem") + (readable #f) + (writable #t) + (construct-only #t) +) + +(define-property filter + (of-object "GtkFileChooser") + (prop-type "GtkFileFilter*") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property folder-mode + (of-object "GtkFileChooser") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property local-only + (of-object "GtkFileChooser") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property preview-widget + (of-object "GtkFileChooser") + (prop-type "GtkWidget*") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property preview-widget-active + (of-object "GtkFileChooser") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property extra-widget + (of-object "GtkFileChooser") + (prop-type "GtkWidget*") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property select-multiple + (of-object "GtkFileChooser") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property show-hidden + (of-object "GtkFileChooser") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs index a52887276dc643d9ec94ac8a8dc3856c6b068750..2f8e3dc5598e4416b9939bac818a6215965c41d9 100644 --- a/gtk/src/gtk_signals.defs +++ b/gtk/src/gtk_signals.defs @@ -1,3 +1,27 @@ +;; From GtkAccelGroup + +(define-signal accel-activate + (of-object "GtkAccelGroup") + (return-type "gboolean") + (when "unknown") + (parameters + '("GObject*" "p0") + '("guint" "p1") + '("GdkModifierType" "p2") + ) +) + +(define-signal accel-changed + (of-object "GtkAccelGroup") + (return-type "void") + (when "first") + (parameters + '("guint" "p0") + '("GdkModifierType" "p1") + '("GClosure*" "p2") + ) +) + ;; From GtkAccelLabel (define-property user-data @@ -6843,6 +6867,716 @@ (construct-only #f) ) +;; From GtkFileFilter + +(define-property user-data + (of-object "GtkFileFilter") + (prop-type "GParamPointer") + (readable #t) + (writable #t) + (construct-only #f) +) + +;; From GtkFileChooserDialog + +(define-property action + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property preview-widget-active + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property file-system + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #f) + (writable #t) + (construct-only #t) +) + +(define-property preview-widget + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property extra-widget + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property filter + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property select-multiple + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property show-hidden + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property folder-mode + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property local-only + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property user-data + (of-object "GtkFileChooserDialog") + (prop-type "GParamPointer") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property name + (of-object "GtkFileChooserDialog") + (prop-type "GParamString") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property parent + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property width-request + (of-object "GtkFileChooserDialog") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property height-request + (of-object "GtkFileChooserDialog") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property visible + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property sensitive + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property app-paintable + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property can-focus + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property has-focus + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property is-focus + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property can-default + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property has-default + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property receives-default + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property composite-child + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #f) + (construct-only #f) +) + +(define-property style + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property events + (of-object "GtkFileChooserDialog") + (prop-type "GParamFlags") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property extension-events + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property no-show-all + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property border-width + (of-object "GtkFileChooserDialog") + (prop-type "GParamUInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property resize-mode + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property child + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #f) + (writable #t) + (construct-only #f) +) + +(define-property type + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #t) +) + +(define-property title + (of-object "GtkFileChooserDialog") + (prop-type "GParamString") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property role + (of-object "GtkFileChooserDialog") + (prop-type "GParamString") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property allow-shrink + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property allow-grow + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property resizable + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property modal + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property window-position + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property default-width + (of-object "GtkFileChooserDialog") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property default-height + (of-object "GtkFileChooserDialog") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property destroy-with-parent + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property icon + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property screen + (of-object "GtkFileChooserDialog") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property type-hint + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property skip-taskbar-hint + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property skip-pager-hint + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property decorated + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property gravity + (of-object "GtkFileChooserDialog") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property is-active + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #f) + (construct-only #f) +) + +(define-property has-toplevel-focus + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #f) + (construct-only #f) +) + +(define-property has-separator + (of-object "GtkFileChooserDialog") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +;; From GtkFileChooserWidget + +(define-property action + (of-object "GtkFileChooserWidget") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property preview-widget-active + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property file-system + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #f) + (writable #t) + (construct-only #t) +) + +(define-property preview-widget + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property extra-widget + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property filter + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property select-multiple + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property show-hidden + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property folder-mode + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property local-only + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property user-data + (of-object "GtkFileChooserWidget") + (prop-type "GParamPointer") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property name + (of-object "GtkFileChooserWidget") + (prop-type "GParamString") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property parent + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property width-request + (of-object "GtkFileChooserWidget") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property height-request + (of-object "GtkFileChooserWidget") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property visible + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property sensitive + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property app-paintable + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property can-focus + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property has-focus + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property is-focus + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property can-default + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property has-default + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property receives-default + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property composite-child + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #f) + (construct-only #f) +) + +(define-property style + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property events + (of-object "GtkFileChooserWidget") + (prop-type "GParamFlags") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property extension-events + (of-object "GtkFileChooserWidget") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property no-show-all + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property border-width + (of-object "GtkFileChooserWidget") + (prop-type "GParamUInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property resize-mode + (of-object "GtkFileChooserWidget") + (prop-type "GParamEnum") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property child + (of-object "GtkFileChooserWidget") + (prop-type "GParamObject") + (readable #f) + (writable #t) + (construct-only #f) +) + +(define-property spacing + (of-object "GtkFileChooserWidget") + (prop-type "GParamInt") + (readable #t) + (writable #t) + (construct-only #f) +) + +(define-property homogeneous + (of-object "GtkFileChooserWidget") + (prop-type "GParamBoolean") + (readable #t) + (writable #t) + (construct-only #f) +) + ;; From GtkFileSelection (define-property user-data diff --git a/gtk/src/gtk_vfuncs.defs b/gtk/src/gtk_vfuncs.defs index b0448871e00e1b72132daa0b7fc6aab8b2c948e7..21b3fb6cd9c127ccc955f0670a8d2e0656be3eb5 100644 --- a/gtk/src/gtk_vfuncs.defs +++ b/gtk/src/gtk_vfuncs.defs @@ -2,6 +2,34 @@ ; virtual function definitions ; define-vfunc is gtkmm-specific +; GtkAction + +(define-vfunc create_menu_item + (of-object "GtkAction") + (return-type "GtkWidget*") +) + +(define-vfunc create_tool_item + (of-object "GtkAction") + (return-type "GtkWidget*") +) + +(define-vfunc connect_proxy + (of-object "GtkAction") + (return-type "void") + (parameters + '("GtkWidget*" "proxy") + ) +) + +(define-vfunc disconnect_proxy + (of-object "GtkAction") + (return-type "void") + (parameters + '("GtkWidget*" "proxy") + ) +) + ; GtkCellEditable (define-vfunc start_editing @@ -38,7 +66,7 @@ (return-type "none") ) -(define-vfunc add_atribute +(define-vfunc add_attribute (of-object "GtkCellLayout") (return-type "none") (parameters diff --git a/gtk/src/messagedialog.hg b/gtk/src/messagedialog.hg index b9fc33369982933724e56235fe731c3a337d1c98..42f7a03eabb4bc8a840b82adcc31210e4318cef8 100644 --- a/gtk/src/messagedialog.hg +++ b/gtk/src/messagedialog.hg @@ -51,6 +51,8 @@ public: MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false, bool use_separator = false); _IGNORE(gtk_message_dialog_new, gtk_message_dialog_new_with_markup) + _WRAP_METHOD(void set_markup(const Glib::ustring& str), gtk_message_dialog_set_markup) + protected: void set_message(const Glib::ustring& message, bool use_markup); }; diff --git a/gtk/src/scrolledwindow.hg b/gtk/src/scrolledwindow.hg index 4890e55a1b49595781a4694cccefb19f17850712..d24b4bfce06afc05c00818085bc48d3b62b2895d 100644 --- a/gtk/src/scrolledwindow.hg +++ b/gtk/src/scrolledwindow.hg @@ -86,8 +86,8 @@ public: _MEMBER_GET_PTR(vscrollbar,vscrollbar,Gtk::VScrollbar*,GtkWidget*) //Keybinding signals: - _IGNORE("scroll_child") - _IGNORE("move_focus_out") + _IGNORE_SIGNAL("scroll_child") + _IGNORE_SIGNAL("move_focus_out") _WRAP_PROPERTY("hadjustment", Gtk::Adjustment*) _WRAP_PROPERTY("vadjustment", Gtk::Adjustment*) diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg index 11d0db25167ccbf5d6003f2dadb2c468b794ef46..17d607706bc3f556e533bced813d140366b4d22a 100644 --- a/gtk/src/textview.hg +++ b/gtk/src/textview.hg @@ -149,6 +149,8 @@ public: _IGNORE_SIGNAL("paste_clipboard") _IGNORE_SIGNAL("toggle_overwrite") _IGNORE_SIGNAL("move_focus") + _IGNORE_SIGNAL("move_viewport") + _IGNORE_SIGNAL("select_all") _WRAP_PROPERTY("pixels-above-lines", int) _WRAP_PROPERTY("pixels-below-lines", int) @@ -163,7 +165,7 @@ public: _WRAP_PROPERTY("cursor-visible", bool) _WRAP_PROPERTY("buffer", Glib::RefPtr) _WRAP_PROPERTY("overwrite", bool) - _WRAP_PROPERTY("accepts-tabs", bool) + _WRAP_PROPERTY("accepts-tab", bool) }; } /* namespace Gtk */ diff --git a/gtk/src/treepath.hg b/gtk/src/treepath.hg index 30601bfc181f94ce5e81daf2cbc841fd2feb3c1a..0a1e7c206f0a5e9f925fd49ad1b0cf9ccf27e472 100644 --- a/gtk/src/treepath.hg +++ b/gtk/src/treepath.hg @@ -125,7 +125,8 @@ public: //TODO: deprecate: replaced by push_front():_WRAP_METHOD(void prepend_index(int index), gtk_tree_path_prepend_index) //TOOD: deprecate: replaced by size(): _WRAP_METHOD(int get_depth() const, gtk_tree_path_get_depth) //TODO: deprecate: replaced by begin(), end(), and operator[]: Glib::ArrayHandle get_indices() const; - + _IGNORE(gtk_tree_path_get_depth) + /** * Obtains a Gtk::TreeModel and Gtk::TreeModel::Path from selection data of target type * "GTK_TREE_MODEL_ROW". Normally called from a drag_data_received handler. diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc index 132700976ac127d18a1a4cebdae2f34f8f79b7b5..945d6fe399734ef3b0ed56d80bd3300f2e1efda0 100644 --- a/tools/extra_defs_gen/generate_defs_gtk.cc +++ b/tools/extra_defs_gen/generate_defs_gtk.cc @@ -95,6 +95,9 @@ int main (int argc, char *argv[]) << get_defs( GTK_TYPE_ENTRY_COMPLETION ) << get_defs( GTK_TYPE_EVENT_BOX ) << get_defs( GTK_TYPE_EXPANDER ) + << get_defs( GTK_TYPE_FILE_FILTER ) + << get_defs( GTK_TYPE_FILE_CHOOSER_DIALOG ) + << get_defs( GTK_TYPE_FILE_CHOOSER_WIDGET ) << get_defs( GTK_TYPE_FILE_SELECTION ) /* Deprecated */ << get_defs( GTK_TYPE_FIXED ) << get_defs( GTK_TYPE_FONT_BUTTON ) diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4 index 2d1a4cdadaa2ca2ef26a7ec743919fe6d13167c6..16a941ef58ef262e72c70b72190906b756c904b3 100644 --- a/tools/m4/convert_gtk.m4 +++ b/tools/m4/convert_gtk.m4 @@ -97,6 +97,8 @@ _CONV_ENUM(Gtk,WindowPosition) _CONV_ENUM(Gtk,WindowType) _CONV_ENUM(Gtk,WrapMode) _CONV_ENUM(Gtk,UIManagerItemType) +_CONV_ENUM(Gtk,FileChooserAction) +_CONV_ENUM(Gtk,FileFilterFlags) _CONVERSION(`GtkIconSize',`IconSize',`IconSize(static_cast($3))') _CONVERSION(`GtkIconSize',`Gtk::IconSize',`Gtk::IconSize(static_cast($3))') @@ -248,7 +250,10 @@ _CONVERSION(`const Glib::ListHandle&',`GList*',`$3.data()') _CONVERSION(`const Glib::SListHandle< Glib::RefPtr >&',`GSList*',`$3.data()') # GList (gtk+) -> Glib::ListHandle<> (gtkmm) +define(`__FL2H_DEEP',`$`'2($`'3, Glib::OWNERSHIP_DEEP)') define(`__FL2H_SHALLOW',`$`'2($`'3, Glib::OWNERSHIP_SHALLOW)') +define(`__FL2H_NONE',`$`'2($`'3, Glib::OWNERSHIP_NONE)') + _CONVERSION(`GList*',`Glib::ListHandle',__FL2H_SHALLOW) _CONVERSION(`GList*',`Glib::ListHandle',__FL2H_SHALLOW) _CONVERSION(`GList*',`Glib::ListHandle',__FL2H_SHALLOW) @@ -265,13 +270,14 @@ _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',__FL2H_SHALLO _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',__FL2H_SHALLOW) _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',__FL2H_SHALLOW) _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',__FL2H_SHALLOW) +_CONVERSION(`GSList*',`Glib::SListHandle',__FL2H_DEEP) _CONVERSION(`const Widget&',`GtkWidget*',__FCR2P) _CONVERSION(`int&',`int*',`&$3',`*$3') dnl -dnl # These are for fixmegtkconst +dnl # TODO: These are for fixmegtkconst _CONVERSION(`gdouble*',`const gdouble*',`const_cast($3)',`$3') _CONVERSION(`const double*',`gdouble*',`const_cast($3)',`$3') _CONVERSION(`const guchar*',`guchar*',`const_cast($3)',`$3') @@ -362,7 +368,6 @@ _CONVERSION(`GtkCellEditable*',`CellEditable*',`dynamic_cast<$2>(Glib::wrap_auto _CONVERSION(`CellEditable*',`GtkCellEditable*',`Glib::unwrap($3)') - #_CONVERSION(`Clipboard&',`GtkClipboard*',`($3).gobj()') _CONVERSION(`GtkClipboard*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`GtkClipboard*',`Glib::RefPtr',`Glib::wrap($3)') @@ -388,6 +393,10 @@ _CONVERSION(`GtkEntryCompletion*',`Glib::RefPtr',`Glib::wrap($3 _CONVERSION(`GtkEntryCompletion*',`Glib::RefPtr',`Glib::wrap($3)') _CONVERSION(`const Glib::RefPtr&',`GtkEntryCompletion*',__CONVERT_REFPTR_TO_P($3)) +_CONVERSION(`GtkFileFilter*',`Glib::RefPtr',`Glib::wrap($3)') +_CONVERSION(`const Glib::RefPtr&',`GtkFileFilter*',__CONVERT_REFPTR_TO_P($3)) + + _CONVERSION(const Gtk::Widget&,GtkWidget*,__CFR2P) _CONVERSION(`GtkTooltips*',`Tooltips&', `Glib::wrap($3)') @@ -396,6 +405,8 @@ _CONVERSION(`Tooltips&',`GtkTooltips*',__FR2P) # Used by Signals: +# The true here means "take reference", because the code that emits the signal does not do a ref for the receiving signal handler. +# For the return values of methods, we use the optional refreturn parameter instead. _CONVERSION(`GtkTextIter*',`const TextIter&',Glib::wrap($3)) _CONVERSION(`GtkTextIter*',`const TextBuffer::iterator&',Glib::wrap($3)) _CONVERSION(`const GtkTextIter*',`const TextIter&',Glib::wrap($3)) @@ -414,7 +425,9 @@ _CONVERSION(`TreeViewColumn*',`GtkTreeViewColumn*',__FP2P) _CONVERSION(`GtkStyle*',`const Glib::RefPtr