Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

plug.h

Go to the documentation of this file.
00001 /*  Inti: Integrated Foundation Classes
00002  *  Copyright (C) 2002-2003 The Inti Development Team.
00003  *  Copyright (C) 2000 Red Hat, Inc.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019  
00025 
00026 #ifndef INTI_GTK_PLUG_H
00027 #define INTI_GTK_PLUG_H
00028 
00029 #ifndef INTI_GTK_WINDOW_H
00030 #include <inti/gtk/window.h>
00031 #endif
00032 
00033 #ifndef __GTK_PLUG_H__
00034 #include <gtk/gtkplug.h>
00035 #endif
00036 
00037 namespace Inti {
00038 
00039 namespace Gdk {
00040 class Display;
00041 }
00042 
00043 namespace Gtk {
00044 
00045 class PlugClass;
00046 class Socket;
00047 
00056 
00057 class Plug : public Window
00058 {
00059         friend class G::Object;
00060         friend class PlugClass;
00061 
00062         Plug(const Plug&);
00063         Plug& operator=(const Plug&);
00064         
00065 protected:
00068 
00069         explicit Plug(GtkPlug *plug, bool reference = false);
00076 
00080 
00081         virtual void on_embedded();
00083 
00085 //  Signals
00086 
00087         typedef G::Signal0<void> EmbeddedSignalType;
00088         typedef G::SignalProxy<TypeInstance, EmbeddedSignalType> EmbeddedSignalProxy;
00089         static const EmbeddedSignalType embedded_signal;
00090 
00091 public:
00094 
00095         Plug(GdkNativeWindow socket_id, const Gdk::Display *display = 0);
00104 
00105         virtual ~Plug();
00107         
00111 
00112         GtkPlug* gtk_plug() const { return (GtkPlug*)instance; }
00114 
00115         GtkPlugClass* gtk_plug_class() const;
00117 
00118         operator GtkPlug* () const;
00120 
00121         bool has_socket() const;
00123 
00124         Gdk::Window* socket_window() const;
00126 
00127         bool same_app() const;
00129         
00130         GdkNativeWindow get_id() const;
00134 
00138 
00139         void add_to_socket(Socket& socket);
00142 
00143         void remove_from_socket(Socket& socket);
00146 
00149 
00150         const EmbeddedSignalProxy sig_embedded()
00151         {
00152                 return EmbeddedSignalProxy(this, &embedded_signal);
00153         }
00155         
00157 };
00158 
00159 } // namespace Gtk
00160 
00161 } // namespace Inti
00162 
00163 #endif // INTI_GTK_PLUG_H
00164 
Main Page - Footer


Generated on Sun Sep 14 20:08:03 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002