gtkmm r1001 - in trunk: . gtk/gtkmm gtk/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkmm r1001 - in trunk: . gtk/gtkmm gtk/src
- Date: Thu, 10 Jul 2008 20:21:11 +0000 (UTC)
Author: murrayc
Date: Thu Jul 10 20:21:11 2008
New Revision: 1001
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1001&view=rev
Log:
2008-07-10 Murray Cumming <murrayc murrayc com>
* gtk/gtkmm/stock.cc
* gtk/gtkmm/stock.h: Added PAGE_SETUP, PRINT_ERROR, PRINT_REPORT,
PRINT_WARNING.
* gtk/src/statusicon.hg: Added get_x11_window_id().
* gtk/src/toolitem.hg: Added toolbar_reconfigured().
* gtk/src/tooltip.hg: Added set_icon_from_icon_name().
* gtk/src/widget.ccg:
* gtk/src/widget.hg: Added get_snapshot().
Reimplemented get_allocation() and get_window() with the new C
accessor functions instead of direct struct field access.
Modified:
trunk/ChangeLog
trunk/gtk/gtkmm/stock.cc
trunk/gtk/gtkmm/stock.h
trunk/gtk/src/statusicon.hg
trunk/gtk/src/toolbar.hg
trunk/gtk/src/toolitem.hg
trunk/gtk/src/tooltip.hg
trunk/gtk/src/widget.ccg
trunk/gtk/src/widget.hg
Modified: trunk/gtk/gtkmm/stock.cc
==============================================================================
--- trunk/gtk/gtkmm/stock.cc (original)
+++ trunk/gtk/gtkmm/stock.cc Thu Jul 10 20:21:11 2008
@@ -103,8 +103,12 @@
const Gtk::BuiltinStockID OPEN = { GTK_STOCK_OPEN };
const Gtk::BuiltinStockID PASTE = { GTK_STOCK_PASTE };
const Gtk::BuiltinStockID PREFERENCES = { GTK_STOCK_PREFERENCES };
+const Gtk::BuiltinStockID PAGE_SETUP = { GTK_STOCK_PAGE_SETUP };
const Gtk::BuiltinStockID PRINT = { GTK_STOCK_PRINT };
+const Gtk::BuiltinStockID PRINT_ERROR = { GTK_STOCK_PRINT_ERROR };
const Gtk::BuiltinStockID PRINT_PREVIEW = { GTK_STOCK_PRINT_PREVIEW };
+const Gtk::BuiltinStockID PRINT_REPORT = { GTK_STOCK_PRINT_REPORT };
+const Gtk::BuiltinStockID PRINT_WARNING = { GTK_STOCK_PRINT_WARNING };
const Gtk::BuiltinStockID PROPERTIES = { GTK_STOCK_PROPERTIES };
const Gtk::BuiltinStockID QUIT = { GTK_STOCK_QUIT };
const Gtk::BuiltinStockID REDO = { GTK_STOCK_REDO };
Modified: trunk/gtk/gtkmm/stock.h
==============================================================================
--- trunk/gtk/gtkmm/stock.h (original)
+++ trunk/gtk/gtkmm/stock.h Thu Jul 10 20:21:11 2008
@@ -142,8 +142,12 @@
extern GTKMM_API const Gtk::BuiltinStockID ORIENTATION_REVERSE_PORTRAIT; /*!< @image html gtk-orientation-reverse-portrait.png */
extern GTKMM_API const Gtk::BuiltinStockID PASTE; /*!< @image html gtk-paste.png */
extern GTKMM_API const Gtk::BuiltinStockID PREFERENCES; /*!< @image html gtk-preferences.png */
+extern GTKMM_API const Gtk::BuiltinStockID PAGE_SETUP; /*!< @image html gtk-page-setup.png */
extern GTKMM_API const Gtk::BuiltinStockID PRINT; /*!< @image html gtk-print.png */
+extern GTKMM_API const Gtk::BuiltinStockID PRINT_ERROR; /*!< @image html gtk-print-error.png */
extern GTKMM_API const Gtk::BuiltinStockID PRINT_PREVIEW; /*!< @image html gtk-print-preview.png */
+extern GTKMM_API const Gtk::BuiltinStockID PRINT_REPORT; /*!< @image html gtk-print-report.png */
+extern GTKMM_API const Gtk::BuiltinStockID PRINT_WARNING; /*!< @image html gtk-print-warning.png */
extern GTKMM_API const Gtk::BuiltinStockID PROPERTIES; /*!< @image html gtk-properties.png */
extern GTKMM_API const Gtk::BuiltinStockID QUIT; /*!< @image html gtk-quit.png */
extern GTKMM_API const Gtk::BuiltinStockID REDO; /*!< left-to-right languages: @image html gtk-redo-ltr.png
Modified: trunk/gtk/src/statusicon.hg
==============================================================================
--- trunk/gtk/src/statusicon.hg (original)
+++ trunk/gtk/src/statusicon.hg Thu Jul 10 20:21:11 2008
@@ -151,6 +151,8 @@
bool get_geometry(Glib::RefPtr<Gdk::Screen>& screen, Gdk::Rectangle& area, Orientation& orientation);
_IGNORE(gtk_status_icon_get_geometry)
+ _WRAP_METHOD(guint32 get_x11_window_id() const, gtk_status_icon_get_x11_window_id)
+
_WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
_WRAP_PROPERTY("file", std::string)
_WRAP_PROPERTY("stock", StockID)
Modified: trunk/gtk/src/toolbar.hg
==============================================================================
--- trunk/gtk/src/toolbar.hg (original)
+++ trunk/gtk/src/toolbar.hg Thu Jul 10 20:21:11 2008
@@ -35,6 +35,7 @@
namespace Gtk
{
+//TODO: Derive from Toolshell when we can break ABI.
/** Bars of buttons and other widgets.
* @ingroup Widgets
* @ingroup Containers
@@ -67,6 +68,8 @@
/* Style methods */
+
+ //TODO: Probably remove these when we derive from ToolShell, which has the same methods:
_WRAP_METHOD(void set_orientation(Orientation orientation), gtk_toolbar_set_orientation)
_WRAP_METHOD(Orientation get_orientation() const, gtk_toolbar_get_orientation)
Modified: trunk/gtk/src/toolitem.hg
==============================================================================
--- trunk/gtk/src/toolitem.hg (original)
+++ trunk/gtk/src/toolitem.hg Thu Jul 10 20:21:11 2008
@@ -77,6 +77,8 @@
_WRAP_METHOD(void set_proxy_menu_item(const Glib::ustring& menu_item_id, Widget& menu_item), gtk_tool_item_set_proxy_menu_item)
_WRAP_METHOD(void rebuild_menu(), gtk_tool_item_rebuild_menu)
+
+ _WRAP_METHOD(void toolbar_reconfigured(), gtk_tool_item_toolbar_reconfigured)
//TODO: This suggests calling set_proxy_menu_item() with NULL. but the function asserts against that.
/** This signal is emitted when the toolbar needs information from @tool_item
Modified: trunk/gtk/src/tooltip.hg
==============================================================================
--- trunk/gtk/src/tooltip.hg (original)
+++ trunk/gtk/src/tooltip.hg Thu Jul 10 20:21:11 2008
@@ -82,6 +82,8 @@
_WRAP_METHOD(void set_text(const Glib::ustring& markup), gtk_tooltip_set_text)
_WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_tooltip_set_icon)
_WRAP_METHOD(void set_icon_from_stock(const StockID& stock_id, IconSize size), gtk_tooltip_set_icon_from_stock)
+ _WRAP_METHOD(void set_icon_from_icon_name(const Glib::ustring& icon_name, IconSize size), gtk_tooltip_set_icon_from_icon_name)
+
_WRAP_METHOD(void set_custom(Widget& custom_widget), gtk_tooltip_set_custom)
_WRAP_METHOD(void set_tip_area(const Gdk::Rectangle& rect), gtk_tooltip_set_tip_area)
Modified: trunk/gtk/src/widget.ccg
==============================================================================
--- trunk/gtk/src/widget.ccg (original)
+++ trunk/gtk/src/widget.ccg Thu Jul 10 20:21:11 2008
@@ -578,6 +578,10 @@
return requisition;
}
+Glib::RefPtr<Gdk::Pixmap> Widget::get_snapshot() const
+{
+ return Glib::wrap((GdkPixmapObject*)(gtk_widget_get_snapshot(const_cast<GtkWidget*>(gobj()), NULL)));
+}
} // namespace Gtk
Modified: trunk/gtk/src/widget.hg
==============================================================================
--- trunk/gtk/src/widget.hg (original)
+++ trunk/gtk/src/widget.hg Thu Jul 10 20:21:11 2008
@@ -171,6 +171,8 @@
_WRAP_METHOD(bool mnemonic_activate(bool group_cycling), gtk_widget_mnemonic_activate)
+ //Probably not usefule. Too C-specific: _WRAP_METHOD(bool can_activate_accel(guint signal_id) const, gtk_widget_can_activate_accel)
+
//TODO: Use C++ type
_WRAP_METHOD(bool event(GdkEvent* event), gtk_widget_event)
_WRAP_METHOD(int send_expose(GdkEvent* event), gtk_widget_send_expose)
@@ -223,6 +225,11 @@
_WRAP_METHOD(void set_child_visible(bool is_visible = true), gtk_widget_set_child_visible)
_WRAP_METHOD(bool get_child_visible() const, gtk_widget_get_child_visible)
+ _WRAP_METHOD(Allocation get_allocation() const, gtk_widget_get_allocation)
+
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_window(), gtk_widget_get_window, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window() const, gtk_widget_get_window, refreturn, constversion)
+
_WRAP_METHOD(Container* get_parent(), gtk_widget_get_parent)
_WRAP_METHOD(const Container* get_parent() const, gtk_widget_get_parent, constversion)
@@ -270,6 +277,12 @@
_WRAP_METHOD(Glib::RefPtr<Clipboard> get_clipboard(const Glib::ustring& selection), gtk_widget_get_clipboard, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Clipboard> get_clipboard(const Glib::ustring& selection) const, gtk_widget_get_clipboard, refreturn, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Pixmap> get_snapshot(const Gdk::Rectangle& clip_rect) const, gtk_widget_get_snapshot)
+
+ //TODO: Documentation:
+ Glib::RefPtr<Gdk::Pixmap> get_snapshot() const;
+
+
//TODO: This probably needs a special conversion to do an extra ref (take_copy=true) for the returned instance:
_WRAP_METHOD(Glib::RefPtr<Atk::Object> get_accessible(), gtk_widget_get_accessible, refreturn, ifdef GTKMM_ATKMM_ENABLED)
@@ -582,8 +595,6 @@
_MEMBER_GET(state, state, Gtk::StateType, guint8)
_MEMBER_GET(saved_state, saved_state, Gtk::StateType, guint8)
_MEMBER_GET(requisition, requisition, Requisition, GtkRequisition)
- _MEMBER_GET(allocation, allocation, Allocation, GtkAllocation)
- _MEMBER_GET_GOBJECT(window, window, Gdk::Window, GdkWindow*)
_WRAP_SIGNAL(void show(),"show")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]