[gtkmm] Fix the build with GTK+ git master, adding and renaming API.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Fix the build with GTK+ git master, adding and renaming API.
- Date: Thu, 10 Jun 2010 07:57:20 +0000 (UTC)
commit f0328a4245d7c1653a9f0ee6207b99f300d1eaf4
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Jun 10 08:55:27 2010 +0200
Fix the build with GTK+ git master, adding and renaming API.
* configure.ac: Depend on GKT+ 2.90.2.
* gdk/src/device.hg: Reimplement get_name() get_has_cursor(), get_source(),
and get_mode() with the new C functions.
* gdk/src/display.hg: Remove list_devices() and get_core_pointer() because
they are now deprecated in GTK+.
* gdk/src/dragcontext.[hg|ccg]: Rename get_targets() to list_targets(),
and reimplement it with the new C function.
Reimplement get_actions() and get_suggested_action() with the new C
functions. Remove accessors for other (now hidden) struct fields.
* gdk/src/image.hg: Reimplement accessors with the new C functions,
renaming get_bpp() to get_bytes_per_pixel(), renaming get_bpl() to
get_bytes_per_line(), and addding get_depth().
* gdk/src/pixmap.ccg: Hack out use of a struct field to fix the build,
though this needs attention. See the TODO.
* gtk/src/box.[hg|ccg]: Remove the children() list because it used
struct field and strutt type that are now hidden.
* gtk/src/progressbar.hg: Only include GTK+ headers via gtk.h.
Remove the unnused ProgressBarStyle enum because GtkProgressBarStyle has
been removed from GTK+.
* tools/extra_defs_gen/generate_defs_gtk.cc: Remove mention of GtkProgress.
ChangeLog | 27 ++++++++-
configure.ac | 2 +-
gdk/src/device.hg | 35 ++--------
gdk/src/display.hg | 51 ++++++--------
gdk/src/dragcontext.ccg | 4 +-
gdk/src/dragcontext.hg | 51 ++-------------
gdk/src/image.hg | 24 +++----
gdk/src/pixmap.ccg | 5 +-
gtk/src/box.ccg | 78 ----------------------
gtk/src/box.hg | 100 -----------------------------
gtk/src/progressbar.hg | 10 +--
tools/extra_defs_gen/generate_defs_gtk.cc | 1 -
12 files changed, 81 insertions(+), 307 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index adf033b..92e4d63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,31 @@
+2010-06-09 Murray Cumming <murrayc murrayc com>
+
+ Fix the build with GTK+ git master, adding and renaming API.
+
+ * configure.ac: Depend on GKT+ 2.90.2.
+ * gdk/src/device.hg: Reimplement get_name() get_has_cursor(), get_source(),
+ and get_mode() with the new C functions.
+ * gdk/src/display.hg: Remove list_devices() and get_core_pointer() because
+ they are now deprecated in GTK+.
+ * gdk/src/dragcontext.[hg|ccg]: Rename get_targets() to list_targets(),
+ and reimplement it with the new C function.
+ Reimplement get_actions() and get_suggested_action() with the new C
+ functions. Remove accessors for other (now hidden) struct fields.
+ * gdk/src/image.hg: Reimplement accessors with the new C functions,
+ renaming get_bpp() to get_bytes_per_pixel(), renaming get_bpl() to
+ get_bytes_per_line(), and addding get_depth().
+ * gdk/src/pixmap.ccg: Hack out use of a struct field to fix the build,
+ though this needs attention. See the TODO.
+ * gtk/src/box.[hg|ccg]: Remove the children() list because it used
+ struct field and strutt type that are now hidden.
+ * gtk/src/progressbar.hg: Only include GTK+ headers via gtk.h.
+ Remove the unnused ProgressBarStyle enum because GtkProgressBarStyle has
+ been removed from GTK+.
+ * tools/extra_defs_gen/generate_defs_gtk.cc: Remove mention of GtkProgress.
+
2010-06-08 Murray Cumming <murrayc murrayc com>
-Remove unused doxygen_to_devhelp.xsl file.
+ Remove unused doxygen_to_devhelp.xsl file.
* docs/reference/doxygen_to_devhelp.xsl: Remove this unused file.
We use tagfile-to-devhelp2.xsl from mm-common instead.
diff --git a/configure.ac b/configure.ac
index bf7f993..52a58e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,7 @@ AS_IF([test "x$enable_static" = xyes],
AC_SUBST([ATKMM_MODULES], ['glibmm-2.4 >= 2.24 atk >= 1.12'])
# gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
-AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.22 pangomm-1.4 >= 2.26 gtk+-3.0 >= 2.90.0'])
+AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.22 pangomm-1.4 >= 2.26 gtk+-3.0 >= 2.90.2'])
AS_IF([test "x$gtkmm_host_windows" = xyes],
[GTKMM_MODULES=$GDKMM_MODULES],
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index 6d25ba0..13cce6b 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -43,7 +43,12 @@ protected:
public:
+ _WRAP_METHOD(Glib::ustring get_name() const, gdk_device_get_name)
+ _WRAP_METHOD(bool get_has_cursor() const, gdk_device_get_has_cursor)
+
+ _WRAP_METHOD(InputSource get_source() const, gdk_device_get_source)
_WRAP_METHOD(void set_source(InputSource source), gdk_device_set_source)
+ _WRAP_METHOD(InputMode get_mode() const, gdk_device_get_mode)
_WRAP_METHOD(bool set_mode(InputMode mode), gdk_device_set_mode)
_WRAP_METHOD(void set_key(guint index_, guint keyval, ModifierType modifiers), gdk_device_set_key)
_WRAP_METHOD(void set_axis_use(guint index_, AxisUse use), gdk_device_set_axis_use)
@@ -51,36 +56,8 @@ public:
//TODO: Return a list instead because this is ugly and C-like:
_WRAP_METHOD(bool get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop, GdkTimeCoord**& events, guint& n_events), gdk_device_get_history)
-
- _WRAP_METHOD(bool get_axis(double& axes, AxisUse use, double& value) const, gdk_device_get_axis)
-
- /** Gets the name of this device.
- * @result The name of this device.
- */
- _MEMBER_GET(name, name, Glib::ustring, gchar*)
-
- /** Gets the type of this device.
- * @result The type of this device.
- */
- _MEMBER_GET(source, source, InputSource, GdkInputSource)
- /** Gets the mode of this device.
- * @result The mode of this device.
- */
- _MEMBER_GET(mode, mode, InputMode, GdkInputMode)
-
- /** Discover whether the pointer follows device motion.
- * @result true if the pointer follows device motion.
- */
- _MEMBER_GET(has_cursor, has_cursor, bool, gboolean)
-
- //TODO: Add suitable accessor for the information in these fields. For now, people must use gobj() and access them directly.
- //gint num_axes the length of the axes array.
- //GdkDeviceAxis *axes an array of GdkDeviceAxis, describing the axes of this device.
- //
- //gint num_keys the length of the keys array.
- //GdkDeviceKey *keys an array of GdkDeviceKey, describing the mapped macro buttons of this device.
+ _WRAP_METHOD(bool get_axis(double& axes, AxisUse use, double& value) const, gdk_device_get_axis)
};
} // namespace Gdk
-
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index cbc6121..cffdc54 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -56,10 +56,10 @@ public:
_WRAP_METHOD(int get_n_screens() const, gdk_display_get_n_screens)
_WRAP_METHOD(Glib::RefPtr<Screen> get_screen(int screen_num), gdk_display_get_screen, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Screen> get_screen(int screen_num) const, gdk_display_get_screen, refreturn, constversion)
-
+
_WRAP_METHOD(Glib::RefPtr<Screen> get_default_screen(), gdk_display_get_default_screen, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Screen> get_default_screen() const, gdk_display_get_default_screen, refreturn, constversion)
-
+
_WRAP_METHOD(void pointer_ungrab(guint32 timestamp), gdk_display_pointer_ungrab)
_WRAP_METHOD(void keyboard_ungrab(guint32 timestamp), gdk_display_keyboard_ungrab)
_WRAP_METHOD(bool pointer_is_grabbed() const, gdk_display_pointer_is_grabbed)
@@ -67,14 +67,11 @@ public:
_WRAP_METHOD(void sync(), gdk_display_sync)
_WRAP_METHOD(void close(), gdk_display_close)
- _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Device> > list_devices(), gdk_display_list_devices)
- _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const Device> > list_devices() const, gdk_display_list_devices)
-
//TODO: Use C++ Gdk::Event:
//TODO: get_event() might remove the event - if so, then there should not be a const version:
_WRAP_METHOD(GdkEvent* get_event(), gdk_display_get_event)
_WRAP_METHOD(const GdkEvent* get_event() const, gdk_display_get_event, constversion)
-
+
_WRAP_METHOD(GdkEvent* peek_event(), gdk_display_peek_event)
_WRAP_METHOD(GdkEvent* peek_event() const, gdk_display_peek_event, constversion)
_WRAP_METHOD(void put_event(GdkEvent* event), gdk_display_put_event)
@@ -89,9 +86,6 @@ public:
_WRAP_METHOD(static Glib::RefPtr<Display> get_default(), gdk_display_get_default, refreturn)
- _WRAP_METHOD(Glib::RefPtr<Device> get_core_pointer(), gdk_display_get_core_pointer, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Device> get_core_pointer() const, gdk_display_get_core_pointer, refreturn)
-
/** Gets the current location of the pointer and the current modifier
* mask for a given display.
*
@@ -113,9 +107,9 @@ public:
* @param mask location to store current modifier mask.
*
**/
- void get_pointer(int& x, int& y, ModifierType& mask);
+ void get_pointer(int& x, int& y, ModifierType& mask);
_IGNORE(gdk_display_get_pointer)
-
+
_WRAP_METHOD(Glib::RefPtr<Window> get_window_at_pointer(int& win_x, int& win_y), gdk_display_get_window_at_pointer, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Window> get_window_at_pointer(int& win_x, int& win_y) const, gdk_display_get_window_at_pointer, refreturn, constversion)
@@ -132,21 +126,21 @@ public:
* @result The window underneath the mouse pointer.
*/
Glib::RefPtr<const Window> get_window_at_pointer() const;
-
+
_WRAP_METHOD(void warp_pointer(const Glib::RefPtr<Screen>& screen, int x, int y), gdk_display_warp_pointer)
_WRAP_METHOD(GdkDisplayPointerHooks* set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks), gdk_display_set_pointer_hooks)
GdkDisplayPointerHooks* unset_pointer_hooks();
-
+
_WRAP_METHOD(static Glib::RefPtr<Display> open_default_libgtk_only(), gdk_display_open_default_libgtk_only, refreturn)
#ifdef G_OS_WIN32
/** Finds out the DND protocol supported by a window.
- *
+ *
* @newin{2,2}
* @param xid The X id of the destination window.
* @param protocol Location where the supported DND protocol is returned.
- * @return The X id of the window where the drop should happen. This
+ * @return The X id of the window where the drop should happen. This
* may be @a xid or the X id of a proxy window, or None if @a xid doesn't
* support Drag and Drop.
*/
@@ -161,7 +155,7 @@ public:
#ifdef G_OS_WIN32
/** Send a response to SelectionRequest event.
- *
+ *
* @newin{2,2}
* @param requestor Window to which to deliver response.
* @param selection Selection that was requested.
@@ -178,7 +172,7 @@ public:
#endif
/** Send a response to SelectionRequest event.
- *
+ *
* @newin{2,2}
* @param requestor Window to which to deliver response.
* @param selection Selection that was requested.
@@ -198,20 +192,20 @@ public:
_WRAP_METHOD(guint get_default_cursor_size() const, gdk_display_get_default_cursor_size)
_WRAP_METHOD(void get_maximal_cursor_size(guint& width, guint& height), gdk_display_get_maximal_cursor_size)
- _WRAP_METHOD(Glib::RefPtr<Window> get_default_group(), gdk_display_get_default_group, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const Window> get_default_group() const, gdk_display_get_default_group, refreturn, constversion)
-
+ _WRAP_METHOD(Glib::RefPtr<Window> get_default_group(), gdk_display_get_default_group, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Window> get_default_group() const, gdk_display_get_default_group, refreturn, constversion)
+
//TODO: wrap the vfuncs, though they are not very useful because people will not derive from this class? murrayc.
-
+
_WRAP_METHOD(bool supports_selection_notification() const, gdk_display_supports_selection_notification)
_WRAP_METHOD(bool request_selection_notification(const Glib::ustring& selection), gdk_display_request_selection_notification)
_WRAP_METHOD(bool supports_clipboard_persistence() const, gdk_display_supports_clipboard_persistence)
- /** Issues a request to the clipboard manager to store the clipboard data,
+ /** Issues a request to the clipboard manager to store the clipboard data,
* saving all available targets.
- * On X11, this is a special program that works according to the freedesktop clipboard specification,
+ * On X11, this is a special program that works according to the freedesktop clipboard specification,
* available at http://www.freedesktop.org/Standards/clipboard-manager-spec.
* @newin{2,6}
*
@@ -219,22 +213,21 @@ public:
* @param time_ A timestamp.
*/
void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_);
-
+
void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets);
- _IGNORE(gdk_display_store_clipboard)
+ _IGNORE(gdk_display_store_clipboard)
_WRAP_METHOD(bool supports_shapes() const, gdk_display_supports_shapes)
_WRAP_METHOD(bool supports_input_shapes() const, gdk_display_supports_input_shapes)
_WRAP_METHOD(bool supports_composite() const, gdk_display_supports_composite)
-
-
+
+
/** The closed signal is emitted when the connection to the windowing
* system for this display is closed.
*
* @param is_error true if the display was closed due to an error
- */
+ */
_WRAP_SIGNAL(void closed(bool is_error), closed)
};
} /* namespace Gdk */
-
diff --git a/gdk/src/dragcontext.ccg b/gdk/src/dragcontext.ccg
index fb738cb..2c1e33c 100644
--- a/gdk/src/dragcontext.ccg
+++ b/gdk/src/dragcontext.ccg
@@ -40,10 +40,10 @@ void DragContext::drag_refuse(guint32 time)
gdk_drag_status(gobj(), ((GdkDragAction)(0)) /* see GDK docs */, time);
}
-Gdk::ListHandle_AtomString DragContext::get_targets() const
+Gdk::ListHandle_AtomString DragContext::list_targets() const
{
//Note that we don't free the GList* (or it's items), because we are accessing the struct directly:
- return ListHandle_AtomString( gobj()->targets, Glib::OWNERSHIP_NONE);
+ return ListHandle_AtomString( gdk_drag_context_list_targets(const_cast<GdkDragContext*>(gobj())), Glib::OWNERSHIP_NONE);
}
} /* namespace Gdk */
diff --git a/gdk/src/dragcontext.hg b/gdk/src/dragcontext.hg
index 37c9dd5..47296b2 100644
--- a/gdk/src/dragcontext.hg
+++ b/gdk/src/dragcontext.hg
@@ -55,9 +55,9 @@ public:
* @param time The timestamp for this operation.
*/
void drag_refuse(guint32 time);
-
+
_IGNORE(gdk_drag_motion) //gdk_drag_motion is only used in GDK internally.
-
+
_WRAP_METHOD(void drop_reply(bool ok, guint32 time), gdk_drop_reply)
_WRAP_METHOD(void drop_finish(bool success, guint32 time), gdk_drop_finish)
_WRAP_METHOD(Glib::ustring get_selection() const, gdk_drag_get_selection)
@@ -75,57 +75,21 @@ public:
_WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask, int hot_x, int hot_y), gtk_drag_set_icon_pixmap)
_WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, int hot_x, int hot_y), gtk_drag_set_icon_pixbuf)
- // The first argument was changed from StockID to ustring to avoid
+ // The first argument was changed from StockID to ustring to avoid
// cross-dependence between gdkmm and gtkmm.
// See http://bugzilla.gnome.org/show_bug.cgi?id=79124 for details
_WRAP_METHOD(void set_icon(const Glib::ustring& stock_id, int hot_x, int hot_y), gtk_drag_set_icon_stock)
_WRAP_METHOD(void set_icon_name(const Glib::ustring& name, int hot_x, int hot_y), gtk_drag_set_icon_name)
_WRAP_METHOD(void set_icon(), gtk_drag_set_icon_default)
- /** Get the the source window of this drag.
- * @result the source window of this drag.
- */
- _MEMBER_GET_GOBJECT(source_window, source_window, Window, GdkWindow*)
-
- /** Get the the source window of this drag.
- * @result the source window of this drag.
- */
- _MEMBER_GET_GOBJECT(destination_window, dest_window, Window, GdkWindow*)
-
/** Get a list of targets offered by the source.
* @result a list of targets offered by the source.
*/
- Gdk::ListHandle_AtomString get_targets() const;
-
- /** Get the DND protocol which governs this drag.
- * @result the DND protocol which governs this drag.
- */
- _MEMBER_GET(protocol, protocol, DragProtocol, GdkDragProtocol)
-
- /** Discover whether the context is used on the source side.
- * @result true if the context is used on the source side.
- */
- _MEMBER_GET(is_source, is_source, bool, gboolean)
+ Gdk::ListHandle_AtomString list_targets() const;
+ _IGNORE(gdk_drag_context_list_targets)
- /** Get a bitmask of actions proposed by the source when the suggested_action is Gdk::ACTION_ASK
- * @result a bitmask of actions proposed by the source when the suggested_action is Gdk::ACTION_ASK
- */
- _MEMBER_GET(actions, actions, DragAction, GdkDragAction)
-
- /** Get the action suggested by the source.
- * @result The action suggested by the source.
- */
- _MEMBER_GET(suggested_action, suggested_action, DragAction, GdkDragAction)
-
- /** Get the action chosen by the destination.
- * @result the action chosen byt the destination.
- */
- _MEMBER_GET(action, action, DragAction, GdkDragAction)
-
- /** Get a timestamp recording the start time of this drag.
- * @result a timestamp recording the start time of this drag.
- */
- _MEMBER_GET(start_time, start_time, guint32, guint32)
+ _WRAP_METHOD(DragAction get_actions() const, gdk_drag_context_get_actions)
+ _WRAP_METHOD(DragAction get_suggested_action() const, gdk_drag_context_get_suggested_action)
_WRAP_METHOD_DOCS_ONLY(gdk_drag_find_window_for_screen)
void find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol* protocol) const;
@@ -133,4 +97,3 @@ public:
};
} /* namespace Gdk */
-
diff --git a/gdk/src/image.hg b/gdk/src/image.hg
index d508d3e..496a394 100644
--- a/gdk/src/image.hg
+++ b/gdk/src/image.hg
@@ -68,20 +68,16 @@ public:
_WRAP_METHOD(Glib::RefPtr<Colormap> get_colormap(), gdk_image_get_colormap, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Colormap> get_colormap() const, gdk_image_get_colormap, refreturn, constversion)
- _MEMBER_GET(image_type, type, ImageType, GdkImageType)
- _MEMBER_GET_GOBJECT(visual, visual, Visual, GdkVisual*)
- _MEMBER_GET(byte_order, byte_order, ByteOrder, GdkByteOrder)
- _MEMBER_GET(width, width, int, gint)
- _MEMBER_GET(height, height, int, gint)
- _MEMBER_GET(bpp, bpp, guint16, guint16)
- _MEMBER_GET(bpl, bpl, guint16, guint16)
- _MEMBER_GET(bits_per_pixel, bits_per_pixel, guint16, guint16)
-
- //This memory block is not read-only, apparently:
- _MEMBER_GET_PTR(mem, mem, void*, gpointer)
-
- //TODO: This should be const really.
- _MEMBER_GET(windowing_data, windowing_data, void*, gpointer)
+ _WRAP_METHOD(ImageType get_image_type() const, gdk_image_get_image_type)
+ _WRAP_METHOD(Glib::RefPtr<Visual> get_visual(), gdk_image_get_visual)
+ _WRAP_METHOD(Glib::RefPtr<const Visual> get_visual() const, gdk_image_get_visual, constversion)
+ _WRAP_METHOD(ByteOrder get_byte_order() const, gdk_image_get_byte_order)
+ _WRAP_METHOD(int get_width() const, gdk_image_get_width)
+ _WRAP_METHOD(int get_height() const, gdk_image_get_height)
+ _WRAP_METHOD(guint16 get_depth() const, gdk_image_get_depth)
+ _WRAP_METHOD(guint16 get_bytes_per_pixel() const, gdk_image_get_bytes_per_pixel)
+ _WRAP_METHOD(guint16 get_bytes_per_line() const, gdk_image_get_bytes_per_line)
+ _WRAP_METHOD(guint16 get_bits_per_pixel() const, gdk_image_get_bits_per_pixel)
};
} /* namespace Gdk */
diff --git a/gdk/src/pixmap.ccg b/gdk/src/pixmap.ccg
index 13d3c97..6176e7b 100644
--- a/gdk/src/pixmap.ccg
+++ b/gdk/src/pixmap.ccg
@@ -23,6 +23,8 @@
#include <gdk/gdk.h>
+
+
namespace Gdk
{
@@ -37,7 +39,7 @@ Glib::ObjectBase* Pixmap_Class::wrap_new(GObject* object)
// types in gtkmm, we dynamically create either a Pixmap or a Bitmap,
// depending on the depth field.
- if(pixmap_object->depth != 1)
+ if(true) //TODO: //pixmap_object->depth != 1)
return new Gdk::Pixmap((GdkPixmap*) pixmap_object);
else
return new Gdk::Bitmap((GdkBitmap*) pixmap_object);
@@ -201,4 +203,3 @@ Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<Colormap>& color
}
} // namespace Gdk
-
diff --git a/gtk/src/box.ccg b/gtk/src/box.ccg
index 7eb162a..a5af8ea 100644
--- a/gtk/src/box.ccg
+++ b/gtk/src/box.ccg
@@ -27,84 +27,6 @@
namespace Gtk
{
-namespace Box_Helpers
-{
-
-Widget* Child::get_widget() const
-{
- return Glib::wrap(gobj()->widget);
-}
-
-void Child::set_options(PackOptions options, guint padding)
-{
- const bool expand = (options == PACK_EXPAND_PADDING || options == PACK_EXPAND_WIDGET);
- const bool fill = (options == PACK_EXPAND_WIDGET);
-
- set_options(expand, fill, padding);
-}
-
-void Child::set_options(bool expand, bool fill, guint padding)
-{
- gobj()->expand = expand;
- gobj()->fill = fill;
- gobj()->padding = padding;
-}
-
-void Child::set_pack(PackType pack)
-{
- gobj()->pack = pack;
-}
-
-
-/**************************************************************************/
-
-
-typedef Box_Helpers::BoxList::iterator box_iterator;
-
-box_iterator BoxList::insert(box_iterator position, const Element& e)
-{
- iterator i;
- bool expand = (e.options_ == PACK_EXPAND_PADDING) || (e.options_ == PACK_EXPAND_WIDGET);
- bool fill = (e.options_ == PACK_EXPAND_WIDGET);
-
- if (e.pack_ == PACK_START)
- gtk_box_pack_start(gparent(), (e.widget_? e.widget_->gobj() : 0),
- (gboolean)expand, (gboolean)fill, e.padding_);
- else
- gtk_box_pack_end(gparent(), (e.widget_ ? e.widget_->gobj() : 0),
- (gboolean)expand, (gboolean)fill, e.padding_);
-
- i = --end();
-
- if (position!=end())
- {
- reorder(i, position);
- i = --position;
- }
- return i;
-}
-
-// Non-standard
-void BoxList::reorder(box_iterator loc, box_iterator pos)
-{
- int position = g_list_position(glist(), pos.node_);
- gtk_box_reorder_child(gparent(), loc->gobj()->widget, position);
-}
-
-} /* namespace Box_Helpers */
-
-Box::BoxList& Box::children()
-{
- children_proxy_ = BoxList(gobj());
- return children_proxy_;
-}
-
-const Box::BoxList& Box::children() const
-{
- children_proxy_ = BoxList(const_cast<GtkBox*>(gobj()));
- return children_proxy_;
-}
-
void Box::pack_start(Widget& child, PackOptions options, guint padding)
{
bool expand = (options == PACK_EXPAND_PADDING) || (options == PACK_EXPAND_WIDGET);
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 79760c5..cb82c21 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -45,90 +45,6 @@ enum PackOptions
PACK_EXPAND_WIDGET /**< Space is expanded, with extra space filled by increasing the child widget size. */
};
-class Box;
-
-namespace Box_Helpers
-{
-
-//TODO: We will need real iterator API in GTK+ soon: https://bugzilla.gnome.org/show_bug.cgi?id=613132
-//This may not have any data or virtual functions. See below.
-class Child : protected _GtkBoxChild
-{
-private:
- Child& operator=(const Child&); //Not implemented.
- Child(const Child&); //Not implemented.
-
-public:
- /// Provides access to the underlying C GObject.
- inline _GtkBoxChild* gobj() { return this; }
- /// Provides access to the underlying C GObject.
- inline const _GtkBoxChild* gobj() const { return this; }
-
- Widget* get_widget() const;
-
- inline guint16 get_padding() const { return (gobj()->padding); }
- inline bool get_expand() const { return (gobj()->expand); }
- inline bool get_fill() const { return (gobj()->fill); }
- inline bool get_pack() const { return (gobj()->pack); }
-
- void set_options(PackOptions options, guint padding = 0);
- void set_options(bool expand, bool fill, guint padding = 0);
-
- void set_pack(PackType pack);
-
-protected:
- inline GtkBox* parent()
- { return (GtkBox*) (gtk_widget_get_parent(gobj()->widget)); }
-
- void redraw();
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
- friend class Dummy_; // silence the compiler (Child has only private ctors)
-#endif
-};
-
-class Element
-{
-public:
- Element(Widget& widget,
- PackOptions options = PACK_EXPAND_WIDGET,
- guint padding = 0,
- PackType pack = PACK_START)
- : widget_(&widget), options_(options),
- padding_(padding), pack_(pack)
- {}
-
- Widget* widget_;
- PackOptions options_;
- guint padding_;
- PackType pack_;
-};
-
-typedef Element StartElem;
-
-struct EndElem : public Element
-{
- EndElem(Widget& widget,
- PackOptions options = PACK_EXPAND_WIDGET,
- guint padding = 0)
- : Element (widget, options, padding, PACK_END)
- {}
-};
-
-#m4 include(list.m4)
- GP_LIST(BoxList,Box,GtkBox,Child,children)
- //The standard iterator, instead of List_Cpp_Iterator,
- //only works because Child is derived from _GtkBoxChild.
-
- GP_LIST_FIND(get_widget)
- GP_LIST_CONTAINER_REMOVE(get_widget)
- // Non-standard
- void reorder(iterator loc,iterator pos);
- GP_LIST_END()
-
-} /* namespace Box_Helpers */
-
-
/** A base class for box containers.
*
* Abstract base class for horizontal and vertical boxes, which organize a
@@ -167,7 +83,6 @@ class Box
_IMPLEMENTS_INTERFACE(Orientable)
_IGNORE(gtk_box_pack_end_defaults, gtk_box_set_child_packing, gtk_box_pack_start_defaults, gtk_box_query_child_packing)
public:
- typedef Box_Helpers::BoxList BoxList;
protected:
_CTOR_DEFAULT
@@ -199,23 +114,8 @@ public:
_WRAP_METHOD(void reorder_child(Widget& child, int pos), gtk_box_reorder_child)
- /* Get the child widgets.
- * @result An STL-style container of pointers to the box's child widgets.
- */
- BoxList& children();
-
- /* Get the child widgets.
- * @result An STL-style container of pointers to the box's child widgets.
- */
- const BoxList& children() const;
-
_WRAP_PROPERTY("spacing", int)
_WRAP_PROPERTY("homogeneous", bool)
-
-protected:
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
- mutable BoxList children_proxy_;
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
};
diff --git a/gtk/src/progressbar.hg b/gtk/src/progressbar.hg
index 656db8f..ddd37de 100644
--- a/gtk/src/progressbar.hg
+++ b/gtk/src/progressbar.hg
@@ -1,7 +1,7 @@
/* $Id: progressbar.hg,v 1.2 2004/11/10 22:05:57 murrayc Exp $ */
/* progressbar.h
- *
+ *
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -23,14 +23,13 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)
-_PINCLUDE(gtk/gtkprogress.h)
+_PINCLUDE(gtk/gtk.h)
namespace Gtk
{
_CC_INCLUDE(gtk/gtk.h)
-_WRAP_ENUM(ProgressBarStyle, GtkProgressBarStyle)
_WRAP_ENUM(ProgressBarOrientation, GtkProgressBarOrientation)
@@ -57,7 +56,7 @@ _WRAP_ENUM(ProgressBarOrientation, GtkProgressBarOrientation)
* There is quite a bit of flexibility provided to control the appearance of
* the Gtk::ProgressBar. Functions are provided to control the orientation of
* the bar, optional text can be displayed along with the bar, and the step
- * size used in activity mode can be set.
+ * size used in activity mode can be set.
*
* The ProgressBar widget looks like this:
* @image html progressbar1.png
@@ -66,7 +65,7 @@ _WRAP_ENUM(ProgressBarOrientation, GtkProgressBarOrientation)
*/
class ProgressBar : public Widget
{
- _CLASS_GTKOBJECT(ProgressBar,GtkProgressBar,GTK_PROGRESS_BAR,Gtk::Widget,GtkWidget,GtkProgressBar,GtkProgress)
+ _CLASS_GTKOBJECT(ProgressBar,GtkProgressBar,GTK_PROGRESS_BAR,Gtk::Widget,GtkWidget,GtkProgressBar)
_IGNORE(gtk_progress_bar_new_with_adjustment, gtk_progress_bar_set_bar_style, gtk_progress_bar_set_discrete_blocks,
gtk_progress_bar_set_activity_step, gtk_progress_bar_set_activity_blocks, gtk_progress_bar_update)
public:
@@ -98,4 +97,3 @@ public:
};
} // namespace Gtk
-
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index b44f67e..e8ba5bb 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -161,7 +161,6 @@ int main(int argc, char** argv)
<< get_defs( GTK_TYPE_PAGE_SETUP_UNIX_DIALOG )
<< get_defs( GTK_TYPE_PRINT_UNIX_DIALOG )
#endif /* G_OS_WIN32 */
- << get_defs( GTK_TYPE_PROGRESS )
<< get_defs( GTK_TYPE_PROGRESS_BAR )
<< get_defs( GTK_TYPE_RADIO_BUTTON )
<< get_defs( GTK_TYPE_RADIO_TOOL_BUTTON )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]