/* Copyright 2003 libpanelappletmm 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. */ _DEFS(libpanelappletmm,libpanelapplet) #include #include #include #include #include #include #include #include namespace Gnome { namespace Panel { _CC_INCLUDE(gtkmm/private/eventbox_p.h) class Applet : public Gtk::EventBox { _CLASS_GTKOBJECT(Applet,PanelApplet,PANEL_APPLET,Gtk::EventBox,GtkEventBox) _IGNORE(panel_applet_gconf_set_list, panel_applet_gconf_get_list, panel_applet_set_size_hints) public: #m4 _CONVERSION(`guint',`AppletOrient',`$2($3)') #m4 _CONVERSION(`AppletOrient',`guint',`$2($3)') _CTOR_DEFAULT _WRAP_SIGNAL(void change_orientation(AppletOrient orient), "change_orient") _WRAP_SIGNAL(void change_size(int size), "change_size") _WRAP_SIGNAL(void change_background(AppletBackgroundType type, const Gdk::Color color&, const Glib::RefPtr& pixmap), "change_background") _WRAP_SIGNAL(void move_focus_out_of_applet(Gtk::DirectionType direction), "move_focus_out_of_applet") _IGNORE(panel_applet_get_orient) AppletOrient get_orientation() const; _WRAP_METHOD(int get_size() const, panel_applet_get_size) _WRAP_METHOD(bool get_locked_down() const, panel_applet_get_locked_down) //color and pixmap are output variables. TODO: Document this method properly, as if it had been wrapped automaticaly AppletBackgroundType get_background(Gdk::Color& color, Glib::RefPtr& pixmap) const; _IGNORE(panel_applet_get_background) _WRAP_METHOD(Glib::ustring get_preferences_key() const, panel_applet_get_preferences_key) _WRAP_METHOD(void add_preferences(const Glib::ustring& schema_dir), panel_applet_add_preferences, errthrow) _WRAP_METHOD(AppletFlags get_flags() const, panel_applet_get_flags) _WRAP_METHOD(void set_flags(AppletFlags flags), panel_applet_set_flags) void set_size_hints(const Glib::ArrayHandle& size_hints, int base_size); _WRAP_METHOD(BonoboControl* get_control(), panel_applet_get_control) _WRAP_METHOD(const BonoboControl* get_control() const, panel_applet_get_control) _WRAP_METHOD(BonoboUIComponent* get_popup_component(), panel_applet_get_popup_component) _WRAP_METHOD(const BonoboUIComponent* get_popup_component() const, panel_applet_get_popup_component) _WRAP_METHOD(void setup_menu(const Glib::ArrayHandle& xml, const BonoboUIVerb* verb_list, gpointer user_data), panel_applet_setup_menu) _WRAP_METHOD(void setup_menu(const Glib::ustring& xml, const BonoboUIVerb* verb_list, gpointer user_data), panel_applet_setup_menu) _WRAP_METHOD(void setup_menu(const Glib::ustring& opt_datadir, const Glib::ustring& file, const Glib::ustring& opt_app_name, const BonoboUIVerb* verb_list, gpointer user_data), panel_applet_setup_menu_from_file) _WRAP_METHOD(Glib::ustring gconf_get_full_key(const Glib::ustring& key) const, panel_applet_gconf_get_full_key) _WRAP_METHOD(void gconf_set(const Glib::ustring& key, bool the_bool), panel_applet_gconf_set_bool, errthrow) _WRAP_METHOD(void gconf_set(const Glib::ustring& key, int the_int), panel_applet_gconf_set_int, errthrow) _WRAP_METHOD(void gconf_set(const Glib::ustring& key, const Glib::ustring& the_string), panel_applet_gconf_set_string, errthrow) _WRAP_METHOD(void gconf_set(const Glib::ustring& key, double the_float), panel_applet_gconf_set_float, errthrow) _WRAP_METHOD(void gconf_set(const Glib::ustring& key, const Gnome::Conf::Value& value), panel_applet_gconf_set_value, errthrow) _WRAP_METHOD(bool gconf_get_bool(const Glib::ustring& key) const, panel_applet_gconf_get_bool, errthrow) _WRAP_METHOD(int gconf_get_int(const Glib::ustring& key) const, panel_applet_gconf_get_int, errthrow) _WRAP_METHOD(Glib::ustring gconf_get_string(const Glib::ustring& key) const, panel_applet_gconf_get_string, errthrow) _WRAP_METHOD(double gconf_get_float(const Glib::ustring& key) const, panel_applet_gconf_get_float, errthrow) _WRAP_METHOD(Gnome::Conf::Value gconf_get_value(const Glib::ustring& key) const, panel_applet_gconf_get_value, errthrow) //TODO: there has to be a way to do a template function for this, right? -Bryan //Maybe - look in gconfmm for similar stuff, or even reimplement it if these are convenience functions. murrayc. void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueBool& list); void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueInt& list); void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueString& list); void gconf_set_list(const Glib::ustring& key, const Gnome::Conf::SListHandle_ValueFloat& list); Gnome::Conf::SListHandle_ValueBool gconf_get_bool_list(const Glib::ustring& key) const; Gnome::Conf::SListHandle_ValueInt gconf_get_int_list(const Glib::ustring& key) const; Gnome::Conf::SListHandle_ValueString gconf_get_string_list(const Glib::ustring& key) const; Gnome::Conf::SListHandle_ValueFloat gconf_get_float_list(const Glib::ustring& key) const; _WRAP_PROPERTY("name", Glib::ustring) _WRAP_PROPERTY("width-request", int) _WRAP_PROPERTY("height-request", int) _WRAP_PROPERTY("visible", bool) _WRAP_PROPERTY("sensitive", bool) _WRAP_PROPERTY("app-paintable", bool) _WRAP_PROPERTY("can-focus", bool) _WRAP_PROPERTY("has-focus", bool) _WRAP_PROPERTY("is-focus", bool) _WRAP_PROPERTY("can-default", bool) _WRAP_PROPERTY("has-default", bool) _WRAP_PROPERTY("receives-default", bool) _WRAP_PROPERTY("composite-child", bool) _WRAP_PROPERTY("no-show-all", bool) _WRAP_PROPERTY("border-width", int) _WRAP_PROPERTY("visible-window", bool) _WRAP_PROPERTY("above-child", bool) _WRAP_PROPERTY("style", Gtk::Style) _WRAP_PROPERTY("parent", Glib::Object) _WRAP_PROPERTY("child", Glib::Object) }; } // namespace Panel } // namespace Gnome