Re: Hard API freeze soon
- From: "Timothy M. Shead" <tshead k-3d com>
- To: Carl Nygard <cjnygard fast net>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Hard API freeze soon
- Date: Fri, 25 Feb 2005 17:26:57 -0800
Carl Nygard wrote:
a) I want to print out the value, just for debugging purposes.
I assume you're trying to establish identity for debugging - why not
print the value of the underlying GTK object, which should share the
lifetime of the gtkmm object?
Glib::RefPtr<Gdk::Screen> foo = // whatever
std::cout << foo->gobj() << "\n";
b) I want to pass the ref_ptr to a function taking the raw ptr
class MyScreen : public Gdk::Screen {}
class YourScreen : public Gdk::Screen {}
void FooFunction(Gdk::Screen* screen) { //.... }
Define FooFunction() the way gtkmm would:
void FooFunction(Glib::RefPtr<Gdk::Screen>); // or ...
void FooFunction(Glib::RefPtr<Gdk::Screen>&);
Cheers,
Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]