Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
clientapi.hh
Go to the documentation of this file.
00001 /* --- Generated by PLIC-CxxStub --- */
00002 #ifndef __RAPICORN_CLIENTAPI_HH_
00003 #define __RAPICORN_CLIENTAPI_HH_
00004 
00005 // includes:
00006 #include <ui/utilities.hh>
00007 namespace Rapicorn {
00008 class ItemImpl; // FIXME
00009 class WindowImpl;
00010 }
00011 
00012 // --- ClientHH Boilerplate ---
00013 #include <plic/runtime.hh>
00014 
00015 #include <rapicorn-core.hh> // for rcore/rapicornsignal.hh
00016 using Rapicorn::Signals::slot;
00017 
00018 // --- Interfaces (class declarations) ---
00019 
00020 namespace Rapicorn {
00021 
00022 struct AnySeq_Handle : public std::vector<Plic::Any> {
00023   typedef std::vector<Plic::Any> Sequence;
00024   reference append_back(); 
00025 };
00026 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const AnySeq_Handle&);
00027 Plic::FieldReader& operator>> (Plic::FieldReader&, AnySeq_Handle&);
00030 typedef AnySeq_Handle AnySeq; 
00031 
00032 struct AnySeqSeq_Handle : public std::vector<AnySeq_Handle> {
00033   typedef std::vector<AnySeq_Handle> Sequence;
00034   reference append_back(); 
00035 };
00036 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const AnySeqSeq_Handle&);
00037 Plic::FieldReader& operator>> (Plic::FieldReader&, AnySeqSeq_Handle&);
00040 typedef AnySeqSeq_Handle AnySeqSeq; 
00041 
00042 struct StringList_Handle : public std::vector<std::string> {
00043   typedef std::vector<std::string> Sequence;
00044   reference append_back(); 
00045   // class_scope:StringList:
00046   /*Con*/  StringList_Handle () {}
00047   /*Con*/  StringList_Handle (const std::vector<String> &strv) : Sequence (strv) {}
00048 };
00049 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const StringList_Handle&);
00050 Plic::FieldReader& operator>> (Plic::FieldReader&, StringList_Handle&);
00053 typedef StringList_Handle StringList; 
00054 
00055 class ListModel_SmartHandle : public virtual Plic::SmartHandle
00057 {
00058   static ListModel_SmartHandle  _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00059   static const Plic::TypeHash&  _type ();
00060 protected:
00061   typedef Rapicorn::Signals::SignalProxy<ListModel_SmartHandle, void (int first, int last)> Signal_inserted;
00062   typedef Rapicorn::Signals::SignalProxy<ListModel_SmartHandle, void (int first, int last)> Signal_changed;
00063   typedef Rapicorn::Signals::SignalProxy<ListModel_SmartHandle, void (int first, int last)> Signal_removed;
00064 public:
00065   template<class C>
00066   static ListModel_SmartHandle  downcast (C c) { return _cast (c, c.cast_types()); }
00067   const Plic::TypeHashList&     cast_types ();
00068   explicit                      ListModel_SmartHandle ();
00069   Signal_inserted&              sig_inserted();
00070   Signal_changed&               sig_changed();
00071   Signal_removed&               sig_removed();
00072   int                           size                  ();
00073   int                           columns               ();
00074   AnySeq_Handle                 row                   (int n);
00075 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00076 };
00077 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const ListModel_SmartHandle&);
00078 Plic::FieldReader& operator>> (Plic::FieldReader&, ListModel_SmartHandle&);
00081 typedef ListModel_SmartHandle ListModel; 
00082 
00083 class ListModelRelay_SmartHandle : public virtual Plic::SmartHandle
00085 {
00086   static ListModelRelay_SmartHandle _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00087   static const Plic::TypeHash&  _type ();
00088 protected:
00089   typedef Rapicorn::Signals::SignalProxy<ListModelRelay_SmartHandle, void (int first, int last)> Signal_refill;
00090 public:
00091   template<class C>
00092   static ListModelRelay_SmartHandle downcast (C c) { return _cast (c, c.cast_types()); }
00093   const Plic::TypeHashList&     cast_types ();
00094   explicit                      ListModelRelay_SmartHandle ();
00095   Signal_refill&                sig_refill();
00096   void                          resize                     (int size);
00097   void                          inserted                   (int first,
00098                                                             int last = 0);
00099   void                          changed                    (int first,
00100                                                             int last = 0);
00101   void                          removed                    (int first,
00102                                                             int last = 0);
00103   void                          fill                       (int first,
00104                                                             const AnySeqSeq_Handle &ss);
00105   ListModel_SmartHandle         model                      ();
00106 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00107 };
00108 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const ListModelRelay_SmartHandle&);
00109 Plic::FieldReader& operator>> (Plic::FieldReader&, ListModelRelay_SmartHandle&);
00112 typedef ListModelRelay_SmartHandle ListModelRelay; 
00113 
00114 struct Requisition_Handle {
00115   double                        width;
00116   double                        height;
00117   inline                        Requisition_Handle () { width = 0; height = 0; }
00118   // class_scope:Requisition:
00119   inline Requisition_Handle (double w, double h) : width (w), height (h) {}
00120 };
00121 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Requisition_Handle&);
00122 Plic::FieldReader& operator>> (Plic::FieldReader&, Requisition_Handle&);
00125 typedef Requisition_Handle Requisition; 
00126 
00127 class Item_SmartHandle;
00128 
00129 struct ItemSeq_Handle : public std::vector<Item_SmartHandle> {
00130   typedef std::vector<Item_SmartHandle> Sequence;
00131   reference append_back(); 
00132 };
00133 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const ItemSeq_Handle&);
00134 Plic::FieldReader& operator>> (Plic::FieldReader&, ItemSeq_Handle&);
00137 typedef ItemSeq_Handle ItemSeq; 
00138 
00139 class Item_SmartHandle : public virtual Plic::SmartHandle
00141 {
00142   static Item_SmartHandle       _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00143   static const Plic::TypeHash&  _type ();
00144 protected:
00145 public:
00146   template<class C>
00147   static Item_SmartHandle       downcast (C c) { return _cast (c, c.cast_types()); }
00148   const Plic::TypeHashList&     cast_types ();
00149   explicit                      Item_SmartHandle ();
00150   std::string                   name () const;
00151   void                          name (const std::string&);
00152   Item_SmartHandle              unique_component   (const std::string &path);
00153   ItemSeq_Handle                collect_components (const std::string &path);
00154   std::string                   test_dump          ();
00155 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00156   // class_scope:Item:
00158   template<class Target> Target component (const std::string &path) { return Target::downcast (unique_component (path)); }
00159 };
00160 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Item_SmartHandle&);
00161 Plic::FieldReader& operator>> (Plic::FieldReader&, Item_SmartHandle&);
00164 typedef Item_SmartHandle Item; 
00165 
00166 class Container_SmartHandle : public Item_SmartHandle
00168 {
00169   static Container_SmartHandle  _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00170   static const Plic::TypeHash&  _type ();
00171 protected:
00172 public:
00173   template<class C>
00174   static Container_SmartHandle  downcast (C c) { return _cast (c, c.cast_types()); }
00175   const Plic::TypeHashList&     cast_types ();
00176   explicit                      Container_SmartHandle ();
00177   Item_SmartHandle              create_child          (const std::string &item_identifier,
00178                                                        const StringList_Handle &args = StringList_Handle());
00179 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00180 };
00181 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Container_SmartHandle&);
00182 Plic::FieldReader& operator>> (Plic::FieldReader&, Container_SmartHandle&);
00185 typedef Container_SmartHandle Container; 
00186 
00187 class ButtonArea_SmartHandle : public Container_SmartHandle
00189 {
00190   static ButtonArea_SmartHandle _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00191   static const Plic::TypeHash&  _type ();
00192 protected:
00193 public:
00194   template<class C>
00195   static ButtonArea_SmartHandle downcast (C c) { return _cast (c, c.cast_types()); }
00196   const Plic::TypeHashList&     cast_types ();
00197   explicit                      ButtonArea_SmartHandle ();
00198   std::string                   on_click  () const;
00199   void                          on_click  (const std::string&);
00200   std::string                   on_click2 () const;
00201   void                          on_click2 (const std::string&);
00202   std::string                   on_click3 () const;
00203   void                          on_click3 (const std::string&);
00204 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00205 };
00206 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const ButtonArea_SmartHandle&);
00207 Plic::FieldReader& operator>> (Plic::FieldReader&, ButtonArea_SmartHandle&);
00210 typedef ButtonArea_SmartHandle ButtonArea; 
00211 
00212 struct Pixels_Handle : public std::vector<int> {
00213   typedef std::vector<int> Sequence;
00214   reference append_back(); 
00215 };
00216 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Pixels_Handle&);
00217 Plic::FieldReader& operator>> (Plic::FieldReader&, Pixels_Handle&);
00220 typedef Pixels_Handle Pixels; 
00221 
00222 struct PixelRect_Handle {
00223   int                           x;
00224   int                           y;
00225   int                           width;
00226   int                           height;
00227   int                           rowstride;
00228   int                           offset;
00229   std::string                   comment;
00230   Pixels_Handle                 argb_pixels;
00231   inline                        PixelRect_Handle () { x = 0; y = 0; width = 0; height = 0; rowstride = 0; offset = 0; }
00232 };
00233 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const PixelRect_Handle&);
00234 Plic::FieldReader& operator>> (Plic::FieldReader&, PixelRect_Handle&);
00237 typedef PixelRect_Handle PixelRect; 
00238 
00239 class Drawable_SmartHandle : public Item_SmartHandle
00241 {
00242   static Drawable_SmartHandle   _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00243   static const Plic::TypeHash&  _type ();
00244 protected:
00245   typedef Rapicorn::Signals::SignalProxy<Drawable_SmartHandle, void (int x, int y, int w, int h)> Signal_redraw;
00246 public:
00247   template<class C>
00248   static Drawable_SmartHandle   downcast (C c) { return _cast (c, c.cast_types()); }
00249   const Plic::TypeHashList&     cast_types ();
00250   explicit                      Drawable_SmartHandle ();
00251   Signal_redraw&                sig_redraw();
00252   void                          draw_rect            (const PixelRect_Handle &pixrect);
00253 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00254 };
00255 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Drawable_SmartHandle&);
00256 Plic::FieldReader& operator>> (Plic::FieldReader&, Drawable_SmartHandle&);
00259 typedef Drawable_SmartHandle Drawable; 
00260 
00261 class Wind0w_SmartHandle : public Container_SmartHandle
00263 {
00264   static Wind0w_SmartHandle     _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00265   static const Plic::TypeHash&  _type ();
00266 protected:
00267   typedef Rapicorn::Signals::SignalProxy<Wind0w_SmartHandle, bool (const std::string &cmdname, const StringList_Handle &args)> Signal_commands;
00268   typedef Rapicorn::Signals::SignalProxy<Wind0w_SmartHandle, void ()> Signal_displayed;
00269 public:
00270   template<class C>
00271   static Wind0w_SmartHandle     downcast (C c) { return _cast (c, c.cast_types()); }
00272   const Plic::TypeHashList&     cast_types ();
00273   explicit                      Wind0w_SmartHandle ();
00274   Signal_commands&              sig_commands();
00275   Signal_displayed&             sig_displayed();
00276   bool                          viewable           ();
00277   void                          show               ();
00278   bool                          closed             ();
00279   void                          close              ();
00280   bool                          synthesize_click   (Item_SmartHandle &item,
00281                                                     int button,
00282                                                     double xalign = 0.5,
00283                                                     double yalign = 0.5);
00284   bool                          synthesize_enter   (double xalign = 0.5,
00285                                                     double yalign = 0.5);
00286   bool                          synthesize_leave   ();
00287   bool                          synthesize_delete  ();
00288 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00289 };
00290 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Wind0w_SmartHandle&);
00291 Plic::FieldReader& operator>> (Plic::FieldReader&, Wind0w_SmartHandle&);
00294 typedef Wind0w_SmartHandle Wind0w; 
00295 
00296 struct Wind0wList_Handle : public std::vector<Wind0w_SmartHandle> {
00297   typedef std::vector<Wind0w_SmartHandle> Sequence;
00298   reference append_back(); 
00299 };
00300 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Wind0wList_Handle&);
00301 Plic::FieldReader& operator>> (Plic::FieldReader&, Wind0wList_Handle&);
00304 typedef Wind0wList_Handle Wind0wList; 
00305 
00306 class Application_SmartHandle : public virtual Plic::SmartHandle
00308 {
00309   static Application_SmartHandle _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00310   static const Plic::TypeHash&  _type ();
00311 protected:
00312   typedef Rapicorn::Signals::SignalProxy<Application_SmartHandle, void ()> Signal_missing_primary;
00313 public:
00314   template<class C>
00315   static Application_SmartHandle downcast (C c) { return _cast (c, c.cast_types()); }
00316   const Plic::TypeHashList&     cast_types ();
00317   explicit                      Application_SmartHandle ();
00318   Signal_missing_primary&       sig_missing_primary();
00319   std::string                   auto_path               (const std::string &file_name,
00320                                                          const std::string &binary_path,
00321                                                          bool search_vpath = 1);
00322   StringList_Handle             auto_load               (const std::string &defs_domain,
00323                                                          const std::string &file_name,
00324                                                          const std::string &binary_path,
00325                                                          const std::string &i18n_domain = "");
00326   bool                          factory_window          (const std::string &factory_definition);
00327   void                          load_string             (const std::string &xml_string,
00328                                                          const std::string &i18n_domain = "");
00329   Wind0w_SmartHandle            create_wind0w           (const std::string &wind0w_identifier,
00330                                                          const StringList_Handle &arguments = StringList_Handle(),
00331                                                          const StringList_Handle &env_variables = StringList_Handle());
00332   bool                          finishable              ();
00333   void                          close                   ();
00334   Wind0wList_Handle             list_wind0ws            ();
00335   Item_SmartHandle              unique_component        (const std::string &path);
00336   ItemSeq_Handle                collect_components      (const std::string &path);
00337   ListModelRelay_SmartHandle    create_list_model_relay (int n_columns,
00338                                                          const std::string &name = "");
00339   void                          test_counter_set        (int val);
00340   void                          test_counter_add        (int val);
00341   int                           test_counter_get        ();
00342   int                           test_counter_inc_fetch  ();
00343 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00344   // class_scope:Application:
00345   static int                      run           ();
00346   static void                     quit          (int quit_code = 0);
00347   static void                     shutdown      ();
00348   static int                      run_and_exit  () RAPICORN_NORETURN;
00349   static Application_SmartHandle  the              ();
00350 protected:
00351   static MainLoop*                main_loop     ();
00352   // FIXME: static void        pixstream     (const String &pix_name, const uint8 *static_const_pixstream);
00353   int           m_tc;           // FIXME: uninitialized
00354 };
00355 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const Application_SmartHandle&);
00356 Plic::FieldReader& operator>> (Plic::FieldReader&, Application_SmartHandle&);
00359 typedef Application_SmartHandle Application; 
00360 
00361 enum TestEnum {
00362   TEST_ENUM_VALUE1 = 1,
00363   TEST_ENUM_VALUE2 = 2,
00364   TEST_ENUM_VALUE3 = 3,
00365 };
00366 inline Plic::FieldBuffer& operator<< (Plic::FieldBuffer &fb,  TestEnum &e) { fb << Plic::EnumValue (e); return fb; }
00367 inline Plic::FieldReader& operator>> (Plic::FieldReader &frr, TestEnum &e) { e = TestEnum (frr.pop_evalue()); return frr; }
00368 
00369 class IdlTestItem_SmartHandle : public Item_SmartHandle
00371 {
00372   static IdlTestItem_SmartHandle _cast (Plic::SmartHandle&, const Plic::TypeHashList&);
00373   static const Plic::TypeHash&  _type ();
00374 protected:
00375 public:
00376   template<class C>
00377   static IdlTestItem_SmartHandle downcast (C c) { return _cast (c, c.cast_types()); }
00378   const Plic::TypeHashList&     cast_types ();
00379   explicit                      IdlTestItem_SmartHandle ();
00380   bool                          bool_prop     () const;
00381   void                          bool_prop     (bool);
00382   int                           int_prop      () const;
00383   void                          int_prop      (int);
00384   double                        float_prop    () const;
00385   void                          float_prop    (double);
00386   std::string                   string_prop   () const;
00387   void                          string_prop   (const std::string&);
00388   TestEnum                      enum_prop     () const;
00389   void                          enum_prop     (TestEnum);
00390   Requisition_Handle            record_prop   () const;
00391   void                          record_prop   (const Requisition_Handle&);
00392   StringList_Handle             sequence_prop () const;
00393   void                          sequence_prop (const StringList_Handle&);
00394   IdlTestItem_SmartHandle       self_prop     () const;
00395   void                          self_prop     (IdlTestItem_SmartHandle);
00396 //inline               operator _UnspecifiedBool () const { return _is_null() ? NULL : _unspecified_bool_true(); }
00397 };
00398 Plic::FieldBuffer& operator<< (Plic::FieldBuffer&, const IdlTestItem_SmartHandle&);
00399 Plic::FieldReader& operator>> (Plic::FieldReader&, IdlTestItem_SmartHandle&);
00402 typedef IdlTestItem_SmartHandle IdlTestItem; 
00403 } // Rapicorn
00404 
00405 // global_scope:
00406 namespace Rapicorn {
00407 
00408 Application_SmartHandle init_app                (const String       &app_ident,
00409                                                  int                *argcp,
00410                                                  char              **argv,
00411                                                  const StringVector &args = StringVector());
00412 Application_SmartHandle init_test_app           (const String       &app_ident,
00413                                                  int                *argcp,
00414                                                  char              **argv,
00415                                                  const StringVector &args = StringVector());
00416 Plic::Connection*       uithread_connection     (void);
00417 void                    exit                    (int status) RAPICORN_NORETURN;
00418 
00419 } // Rapicorn
00420 #endif /* __RAPICORN_CLIENTAPI_HH_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines