Main Page - Header
Author: The Inti Development Team

Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# socket.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 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_SOCKET_H
    00027 #define INTI_GTK_SOCKET_H
    00028
    00029 #ifndef INTI_GTK_CONTAINER_H
    00030 #include <inti/gtk/container.h>
    00031 #endif
    00032
    00033 #ifndef __GTK_SOCKET_H__
    00034 #include <gtk/gtksocket.h>
    00035 #endif
    00036
    00037 namespace Inti {
    00038
    00039 namespace Gtk {
    00040
    00041 class SocketClass;
    00042
    00079
    00080 class Socket : public Container
    00081 {
    00082         friend class G::Object;
    00083         friend class SocketClass;
    00084
    00085         Socket(const Socket&);
    00086         Socket& operator=(const Socket&);
    00087
    00088 protected:
    00091
    00092         explicit Socket(GtkSocket *socket, bool reference = false);
    00099
    00103
    00104         virtual void on_plug_added();
    00106
    00107         virtual bool on_plug_removed();
    00109
    00111 //  Signals
    00112
    00113         typedef G::Signal0<void> PlugAddedSignalType;
    00114         typedef G::SignalProxy<TypeInstance, PlugAddedSignalType> PlugAddedSignalProxy;
    00115         static const PlugAddedSignalType plug_added_signal;
    00116
    00117         typedef G::Signal0<bool> PlugRemovedSignalType;
    00118         typedef G::SignalProxy<TypeInstance, PlugRemovedSignalType> PlugRemovedSignalProxy;
    00119         static const PlugRemovedSignalType plug_removed_signal;
    00120
    00121 public:
    00123
    00124         Socket();
    00126
    00127         virtual ~Socket();
    00129
    00133
    00134         GtkSocket* gtk_socket() const { return (GtkSocket*)instance; }
    00136
    00137         GtkSocketClass* gtk_socket_class() const;
    00139
    00140         operator GtkSocket* () const;
    00142
    00143         bool has_plug() const;
    00145
    00146         Gdk::Window* plug_window() const;
    00148
    00149         Widget* plug_widget() const;
    00151
    00152         bool same_app() const;
    00154
    00155         GdkNativeWindow get_id() const;
    00162
    00166
    00167         void add_id(GdkNativeWindow window_id);
    00177
    00181
    00182         const PlugAddedSignalProxy sig_plug_added()
    00183         {
    00184                 return PlugAddedSignalProxy(this, &plug_added_signal);
    00185         }
    00187
    00188         const PlugRemovedSignalProxy sig_plug_removed()
    00189         {
    00190                 return PlugRemovedSignalProxy(this, &plug_removed_signal);
    00191         }
    00193
    00195 };
    00196
    00197 } // namespace Gtk
    00198
    00199 } // namespace Inti
    00200
    00201 #endif // INTI_GTK_SOCKET_H
    00202

Main Page - Footer