// -*- c++ -*-
//  Generated by gtkmmproc from ./../client.gen_h -- DO NOT MODIFY!
#ifndef _GNOMEMM_CLIENT_H
#define _GNOMEMM_CLIENT_H

/* $Id: client.gen_h,v 1.8 2001/04/24 14:39:35 murrayc Exp $ */


/* client.gen_h
 *
 * Copyright (C) 1999 The Gtk-- 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.
 */

#include <gtk--/object.h>
#include <libgnomeui/gnome-client.h>

namespace Gnome {
class Client;
class Client_Class;
}
namespace Gtk { Gnome::Client *wrap (GnomeClient *o); }
namespace Gnome
{
class Dialog;
class Client : public Gtk::Object
{

public:
  typedef Client          CppObjectType;
  typedef Client_Class    CppClassType;
  typedef GnomeClient           BaseObjectType;
  typedef GnomeClientClass      BaseClassType;

private:
  friend class Client_Class;
  static CppClassType client_class;

  Client(const Client&);
  Client& operator=(const Client&); // not implemented

protected:
  void   initialize_class();
  explicit Client(GnomeClient *castitem);

public:
  static GtkType get_type();
  GnomeClient* gtkobj()             { return (GnomeClient*)(gtkobject); }
  const GnomeClient* gtkobj() const { return (GnomeClient*)(gtkobject); }
  static bool isA(Gtk::Object *checkcast);

  // Hook for proxies
  static const char* const signal_names[];

  virtual ~Client();

private:

public:



  Client(bool connect_to_session_manager = true);

  static Client* master_client();


  Gtk::string get_config_prefix();


  Gtk::string get_global_config_prefix();



  void set_global_config_prefix(const Gtk::string& prefix);


  GnomeClientFlags get_flags();


  void set_restart_style(GnomeRestartStyle style);


  void set_priority(guint priority);

  // We keep the argc, argv versions because they can be more
  // convenient that the vector<string> ones


  void set_restart_command(gint argc,gchar** argv);

  void set_restart_command (const Gtk::SArray &argv);

//   WRAP_METHOD(void gnome_client_add_static_arg (GnomeClient*, ...),
// 	      void add_static_arg (...));


  void set_discard_command(gint argc,gchar** argv);

  void set_discard_command (const Gtk::SArray &argv);


  void set_resign_command(gint argc,gchar** argv);

  void set_resign_command (const Gtk::SArray &argv);


  void set_shutdown_command(gint argc,gchar** argv);

  void set_shutdown_command (const Gtk::SArray &argv);


  void set_current_directory(const Gtk::string& dir);


  void set_environment(const Gtk::string& name,const Gtk::string& value);


  void set_clone_command(gint argc,gchar** argv);

  void set_clone_command (const Gtk::SArray &argv);


  void set_process_id(pid_t pid);


  void set_program(const Gtk::string& program);


  void set_user_id(const Gtk::string& user_id);

  void save_any_dialog (const Dialog &dialog);

  void save_error_dialog (const Dialog &dialog);



  void request_phase_2();

  void request_save(GnomeSaveStyle save_style,gboolean shutdown,GnomeInteractStyle interact_style,gboolean fast,gboolean global);


  void flush();


  static void disable_master_connection();

  // Note : there's a naming convention breach here, due to the
  // existence of the connect() signal which isn't emitted after
  // gnome_client_connect() is called
  //

  void connect_to_session_manager();

  bool is_connected();

//   WRAP_METHOD(void gnome_client_disconnect (GnomeClient*),
// 	      void disconnect ());


  void set_id(const Gtk::string& client_id);


  Gtk::string get_id();


  Gtk::string get_previous_id();




  void request_interaction(GnomeDialogType dialog,GnomeInteractFunction func,gpointer client_data);


  static void gnome_interaction_key_return(gint key,gboolean cancel_shutdown);


  // save_yourself should return bool, and the last two gint args
  // should be bools also

public:

  union
    {
      CppObjectType * client_self;
      Gtk::ProxySignal5<gint,gint,GnomeSaveStyle,gint,GnomeInteractStyle,gint,CppObjectType,BaseObjectType,0> save_yourself;
      Gtk::ProxySignal0<void,CppObjectType,BaseObjectType,1> die;
      Gtk::ProxySignal0<void,CppObjectType,BaseObjectType,2> save_complete;
      Gtk::ProxySignal0<void,CppObjectType,BaseObjectType,3> shutdown_cancelled;
      Gtk::ProxySignal1<void,gint,CppObjectType,BaseObjectType,4> connect;
      Gtk::EmitProxySignal0<void,CppObjectType,BaseObjectType,5,&gnome_client_disconnect> disconnect;
    };

protected:
  // impl functions
    virtual gint save_yourself_impl(gint p0,GnomeSaveStyle p1,gint p2,GnomeInteractStyle p3,gint p4);
    virtual void die_impl();
    virtual void save_complete_impl();
    virtual void shutdown_cancelled_impl();
    virtual void connect_impl(gint p0);
    virtual void disconnect_impl();

};



}

#endif
